Fix test-suite fallout of default -Wreturn-type.
[official-gcc.git] / gcc / testsuite / g++.dg / ipa / pr60419.C
blob84461f3acb05bfc00f2ad48657e073e749155907
1 // PR middle-end/60419
2 // { dg-do compile }
3 // { dg-options "-O2" }
5 struct C
7 };
9 struct I : C
11   I ();
14 struct J
16   void foo ();
17   J ();
18   virtual void foo (int &, int);
21 template <class>
22 struct D
24   virtual void foo (I &) const;
25   void bar ()
26   {
27     I p;
28     foo (p);
29   }
32 struct K : J, public D<int>
36 struct F
38   K *operator->();
41 struct N : public K
43   void foo (int &, int);
44   I n;
45   void foo (I &) const {}
48 struct L : J
50   F l;
53 struct M : F
55   L *operator->();
58 struct G
60   G ();
63 M h;
65 G::G ()
66 try
68   N f;
69   f.bar ();
70   throw;
72 catch (int)
76 void
77 baz ()
79   h->l->bar ();