Fix type in the changelog entry,
[official-gcc.git] / gcc / testsuite / g++.dg / ipa / pr61160-3.C
blobd7a3afb804d6175823bd996ee05b44bec59aa3c4
1 /* { dg-do run } */
2 /* { dg-options "-O3"  } */
4 struct A {
5   void *p;
6   A (void *q) : p (q) {}
7   A (const A &) : p () {}
8 };
10 struct CBase {
11   virtual void BaseFunc () {}
14 struct MMixin {
15   virtual A MixinFunc (int, A) = 0;
18 struct CExample: CBase, public MMixin
20   A MixinFunc (int arg, A arg2)
21   {
22     if (arg != 1 || arg2.p)
23       return 0;
24     return this;
25   }
28 void *test (MMixin & anExample)
30   return anExample.MixinFunc (1, (0)).p;
33 int main ()
35   CExample c;
36   test (c);
37   return 0;