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
2009-07-17 Richard Guenther <rguenther@suse.de>
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
ext
/
stmtexpr8.C
blob
8e5d0ddcba25983516f0f54fd128ed49c2fa5fa7
1
// PR c++/27115
2
3
// { dg-do run }
4
// { dg-options "" }
5
6
struct A
7
{
8
int i;
9
A (int j) : i(j) {}
10
A (const A &j) : i(j.i) {}
11
A& operator= (const A &j) { i = j.i; return *this; }
12
};
13
14
A foo(int j)
15
{
16
return ({ j ? A(1) : A(0); });
17
}
18
19
int main()
20
{
21
return foo(1).i-1;
22
}
23
24
void foo2()
25
{
26
A b = ({ A a(1); a; });
27
}
28