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 libstdc++/54924 - Warn for std::string constructor with wrong size
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
ipa
/
pr71146.C
blob
b6bd64f4e8cc244cc36c36d30032d039570d5a84
1
// PR ipa/71146
2
// { dg-do compile }
3
// { dg-options "-O3" }
4
5
typedef enum { X } E;
6
struct A {
7
virtual void bar ();
8
};
9
struct B {
10
virtual E fn (const char *, int, int *) = 0;
11
};
12
struct C : A, B {
13
E fn (const char *, int, int *);
14
void fn2 ();
15
B *foo;
16
};
17
void C::fn2 () {
18
if (!foo)
19
return;
20
foo->fn (0, 0, 0);
21
}
22
E
23
C::fn (const char *, int, int *)
24
{
25
fn2 ();
26
foo = 0;
27
fn (0, 0, 0);
28
return X;
29
}