Sign in
gnu
/
gcc
/
19220ca6aa79921cc431e41f25986e16410c7a6a
/
.
/
gcc
/
testsuite
/
g++.dg
/
opt
/
nrv3.C
blob: 2ec597744695c5701e076d75174b5ae4de4ec7f7 [
file
] [
log
] [
blame
]
// PR optimization/6189
// Bug: we forgot about foo's nrv after writing it out.
// { dg-options -O3 }
// { dg-do run }
struct
A
{
int
i
;
};
A foo
()
{
A a
;
a
.
i
=
42
;
return
a
;
}
int
main
()
{
A b
=
foo
();
return
b
.
i
!=
42
;
}