OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [init/] [new28.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/43951
2
// { dg-do run }
3
// { dg-options "-O2" }
4
 
5
extern "C" void abort ();
6
 
7
class Foo
8
{
9
public:
10
  Foo () : xxx (1) {};
11
  const int xxx;
12
};
13
Foo *
14
bar ()
15
{
16
  return new Foo;
17
}
18
 
19
int
20
main ()
21
{
22
  Foo *p = bar ();
23
 
24
  if (p->xxx != 1)
25
    abort ();
26
  return 0;
27
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.