diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/ipa/pr61654.C')
-rw-r--r-- | gcc-4.9/gcc/testsuite/g++.dg/ipa/pr61654.C | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr61654.C b/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr61654.C new file mode 100644 index 0000000..d07e458 --- /dev/null +++ b/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr61654.C @@ -0,0 +1,40 @@ +/* { dg-do compile } */ +/* { dg-options "-O3" } */ + +/* The bug only presented itself on a 32 bit i386 but in theory it might also + pop up elsewhere and we do not want to put -m32 options to testcase + options. */ + +struct A +{ + virtual int a (int, int = 0) = 0; + void b (); + void c (); + int d; +}; + +struct B : virtual A +{ + int a (int, int); + int e; +}; + +int f; + +void +A::b () +{ + a (0); +} + +void +A::c () +{ + a (f); +} + +int +B::a (int, int) +{ + return e; +} |