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
2013-05-29 Richard Biener <rguenther@suse.de>
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
opt
/
static5.C
blob
1daca6d7194312eeea5147c95d34ef1c47e3ef60
1
// PR c++/31809
2
// { dg-do run }
3
// { dg-options "-O2" }
4
5
struct S
6
{
7
unsigned v;
8
static inline S f (unsigned a);
9
};
10
11
inline S
12
S::f (unsigned a)
13
{
14
static S t = { a };
15
return t;
16
}
17
18
const static S s = S::f (26);
19
20
extern "C" void abort (void);
21
22
int
23
main ()
24
{
25
S t = s;
26
if (t.v != 26)
27
abort ();
28
return 0;
29
}