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