repo.or.cz
/
netbsd-mini2440.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
No empty .Rs/.Re
[netbsd-mini2440.git]
/
gnu
/
dist
/
gcc4
/
gcc
/
testsuite
/
g++.dg
/
opt
/
cond1.C
blob
ae8fa4d45d9f7ee34f43debb4f38a7dc95ed41d3
1
// { dg-do run }
2
// { dg-options "-O2" }
3
4
struct D { int x; };
5
struct W
6
{
7
W () {}
8
D & operator * () { return d; }
9
D d;
10
};
11
12
int
13
foo (int y)
14
{
15
W m;
16
(*m).x = (y > 1 ? y : 0);
17
return (*m).x;
18
}
19
20
int
21
main ()
22
{
23
return (foo (6) != 6);
24
}