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 target/117048 aarch64: Use more canonical and optimization-friendly representation...
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.pt
/
tt2.C
blob
694007beb845523fff45d4259dae084a5bfb9414
1
// { dg-do assemble }
2
3
int f1 () {
4
struct A {
5
A() : b (2) { }
6
int fred () { return b.hi_mom; }
7
struct B {
8
int hi_mom;
9
B (int a) { hi_mom = a; }
10
};
11
B b;
12
};
13
A aa;
14
return aa.fred();
15
}
16
17
int f2 () {
18
struct A {
19
~A() { a = 3; }
20
int a;
21
int fred () { return a + 1; }
22
};
23
24
A ab;
25
ab.a = 12;
26
return ab.fred();
27
}