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++/81917 - ICE with void_t and partial specialization.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
opt
/
nrv3.C
blob
2ec597744695c5701e076d75174b5ae4de4ec7f7
1
// PR optimization/6189
2
// Bug: we forgot about foo's nrv after writing it out.
3
// { dg-options -O3 }
4
// { dg-do run }
5
6
struct A
7
{
8
int i;
9
};
10
11
12
A foo ()
13
{
14
A a;
15
a.i = 42;
16
return a;
17
}
18
19
20
int main()
21
{
22
A b = foo();
23
return b.i != 42;
24
}