Sign in
gnu
/
gcc
/
19220ca6aa79921cc431e41f25986e16410c7a6a
/
.
/
gcc
/
testsuite
/
g++.dg
/
opt
/
cond1.C
blob: ae8fa4d45d9f7ee34f43debb4f38a7dc95ed41d3 [
file
] [
log
] [
blame
]
// { dg-do run }
// { dg-options "-O2" }
struct
D
{
int
x
;
};
struct
W
{
W
()
{}
D
&
operator
*
()
{
return
d
;
}
D d
;
};
int
foo
(
int
y
)
{
W m
;
(*
m
).
x
=
(
y
>
1
?
y
:
0
);
return
(*
m
).
x
;
}
int
main
()
{
return
(
foo
(
6
)
!=
6
);
}