gcc/testsuite/g++.dg/other/final3.C
raw| 1 | // PR c++/67184 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | // { dg-options "-fdump-tree-original" } |
| 4 | |
| 5 | struct V { |
| 6 | virtual void foo(); |
| 7 | }; |
| 8 | |
| 9 | struct wV final : V { |
| 10 | }; |
| 11 | |
| 12 | struct oV final : V { |
| 13 | void foo(); |
| 14 | }; |
| 15 | |
| 16 | void call(wV& x) |
| 17 | { |
| 18 | x.foo(); |
| 19 | x.V::foo(); |
| 20 | } |
| 21 | |
| 22 | void call(oV& x) |
| 23 | { |
| 24 | x.foo(); |
| 25 | x.V::foo(); |
| 26 | } |
| 27 | |
| 28 | // { dg-final { scan-tree-dump-times "OBJ_TYPE_REF" 0 "original" } } |