gcc/testsuite/g++.dg/torture/pr93347.C
raw| 1 | // { dg-additional-options "--param early-inlining-insns=3 --param ipa-cp-eval-threshold=100" } |
| 2 | |
| 3 | |
| 4 | struct A { |
| 5 | int a; |
| 6 | }; |
| 7 | struct B { |
| 8 | int b; |
| 9 | }; |
| 10 | struct C : B, A {}; |
| 11 | struct RA { |
| 12 | virtual A *operator-(); |
| 13 | }; |
| 14 | struct RC : RA { |
| 15 | C *operator-() { |
| 16 | C *x = new C(); |
| 17 | return x; |
| 18 | } |
| 19 | }; |
| 20 | void fop(RC *x) { -static_cast<RA &>(*x); } |