repo.or.cz
/
gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fortran: Fix PR 47485.
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
torture
/
pr65747.C
blob
a556db5afff1ac3cb70a35d0aa7a66984e159b4e
1
// PR tree-optimization/65747
2
// { dg-do compile }
3
4
struct A {};
5
struct E {
6
virtual A m2();
7
} *a;
8
struct B {
9
char b[sizeof (E)];
10
void m1();
11
};
12
struct C {
13
B c;
14
void m3() { c.m1(); }
15
friend class D;
16
};
17
struct D {
18
int m4(C);
19
void m5();
20
void m6(int, C);
21
void m7(int, C);
22
void m8();
23
bool m9();
24
void m10(int);
25
void m11(int);
26
};
27
void B::m1() { a = (E *)b; a->m2(); }
28
void D::m10(int) { m8(); }
29
void D::m11(int) { m8(); }
30
int D::m4(C p1) { p1.m3(); return 0; }
31
void D::m6(int, C p2) {
32
int b = 0;
33
if (m9()) {
34
m4(p2);
35
m10(b);
36
} else
37
m5();
38
m10(int());
39
}
40
void D::m7(int, C p2) {
41
int c = 0;
42
if (m9()) {
43
m4(p2);
44
m11(c);
45
} else
46
m5();
47
m11(int());
48
}