gcc/testsuite/g++.dg/opt/pr47366.C
raw| 1 | // PR rtl-optimization/47366 |
| 2 | // { dg-do compile } |
| 3 | // { dg-options "-O -fnon-call-exceptions -fno-tree-ccp -fno-tree-forwprop" } |
| 4 | |
| 5 | struct A |
| 6 | { |
| 7 | int i; |
| 8 | virtual ~A (); |
| 9 | }; |
| 10 | |
| 11 | struct B : virtual A |
| 12 | {}; |
| 13 | |
| 14 | struct C : B |
| 15 | { |
| 16 | void bar () {} |
| 17 | }; |
| 18 | |
| 19 | void foo () |
| 20 | { |
| 21 | C ().bar (); |
| 22 | } |