Debian Codegraph @

gcc/testsuite/g++.dg/ipa/pr63814.C

raw
1 // { dg-do run { target fpic } }
2 // { dg-options "-O3 -fpic" }
3
4 struct CBase {
5 virtual void BaseFunc () {}
6 };
7
8 struct MMixin {
9 virtual void * MixinFunc (int, int) = 0;
10 };
11
12 struct CExample: CBase, public MMixin
13 {
14 void *MixinFunc (int arg, int arg2)
15 {
16 return this;
17 }
18 };
19
20 void *test (MMixin & anExample)
21 {
22 return anExample.MixinFunc (0, 0);
23 }
24
25 int main ()
26 {
27 CExample c;
28 return (test (c) != &c);
29 }