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
Fix test-suite fallout of default -Wreturn-type.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
ipa
/
pr46053.C
blob
7be6fc3a0a65d0a240b2cb72d7d83539039fa7be
1
/* { dg-do run } */
2
/* { dg-options "-O -fipa-cp -fno-early-inlining" } */
3
4
extern "C" void abort ();
5
6
struct A
7
{
8
virtual void foo () = 0;
9
};
10
11
struct B : A
12
{
13
virtual void foo () = 0;
14
};
15
16
struct C : A
17
{
18
};
19
20
struct D : C, B
21
{
22
int i;
23
D () : i(0xaaaa) {}
24
virtual void foo ()
25
{
26
if (i != 0xaaaa)
27
abort();
28
}
29
};
30
31
static inline void bar (B &b)
32
{
33
b.foo ();
34
}
35
36
int main()
37
{
38
D d;
39
bar (d);
40
return 0;
41
}