PR c++/55137
[official-gcc.git] / gcc / testsuite / g++.dg / init / new28.C
blob41a78be2a2597d2b59f91d08998f337b92ff6cb9
1 // PR c++/43951
2 // { dg-do run }
3 // { dg-options "-O2" }
5 extern "C" void abort ();
7 class Foo 
9 public:
10   Foo () : xxx (1) {};
11   const int xxx;
13 Foo *
14 bar ()
16   return new Foo;
19 int
20 main ()
22   Foo *p = bar ();
24   if (p->xxx != 1)
25     abort ();
26   return 0;