repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
PR c++/37276
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
init
/
new28.C
blob
41a78be2a2597d2b59f91d08998f337b92ff6cb9
1
// 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
}