Fix test-suite fallout of default -Wreturn-type.
[official-gcc.git] / gcc / testsuite / g++.dg / ipa / pr61160-1.C
bloba0fbb5f42bd5b5ecc845c3ac801f72f7b0ff86e2
1 /* { dg-do compile } */
2 /* { dg-options "-O3"  } */
4 struct CBase {
5   virtual void BaseFunc () {}
6 };
8 struct MMixin {
9   virtual void * MixinFunc (int, void *) = 0;
12 struct CExample: CBase, public MMixin
14   void *MixinFunc (int arg, void *arg2)
15   {
16     if (arg != 1 || arg2)
17       return 0;
18     return this;
19   }
22 void *test (MMixin & anExample)
24   return anExample.MixinFunc (1, 0);
27 int main ()
29   CExample c;
30   return (test (c) != &c);