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
/
pr19317-2.C
blob
70c642b219dd15089396e2da0a4b7bf61eb2209d
1
// PR c++/19317
2
// { dg-options "-O2" }
3
// { dg-do run }
4
5
extern "C" void abort (void);
6
7
struct A
8
{
9
A () { d = e = 0; f = -1; }
10
A (int x) : d (0), e (0), f (x) { }
11
A b () const;
12
int d;
13
int e;
14
int f;
15
};
16
17
A
18
A::b () const
19
{
20
A t;
21
t.f = 10 + this->f;
22
return t;
23
}
24
25
int
26
main ()
27
{
28
A a (100);
29
a = a.b ();
30
if (a.f != 110)
31
abort ();
32
}