Fix test-suite fallout of default -Wreturn-type.
[official-gcc.git] / gcc / testsuite / g++.dg / ipa / devirt-9.C
blobe8a24aee5043ade83427b2036eae18e5de7f8c66
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-ipa-whole-program"  } */
3 double foo ();
4 struct B
6   bool b1 () { return b3 (); }
7   void b2 ();
8   virtual bool b3 ();
9 };
10 struct C
12   C () {}
13   bool
14   c1 (float x, float y)
15   {
16     if (x != c3 || y != c4)
17       c2.b2 ();
18     return c2.b1 ();
19   }
20   B c2;
21   float c3, c4;
24 void
25 bar ()
27   static C c;
28   c.c1 (60, (int) foo ());
30 /* We optimize out this call just after early passes.  Unfortunately
31    this unreachable removal is not logged in dump file.  */
32 /* { dg-final { scan-ipa-dump-not "OBJ_TYPE_REF" "whole-program" } } */