gcc/testsuite/g++.dg/other/pr55650.C
raw| 1 | // PR gcov-profile/55650 |
| 2 | // { dg-do link } |
| 3 | // { dg-require-profiling "-fprofile-generate" } |
| 4 | // { dg-options "-O2 -fprofile-generate" } |
| 5 | // { dg-additional-sources "pr55650.cc" } |
| 6 | |
| 7 | struct A |
| 8 | { |
| 9 | virtual void foo (); |
| 10 | }; |
| 11 | |
| 12 | struct B : public A |
| 13 | { |
| 14 | B (); |
| 15 | void foo () {} |
| 16 | }; |
| 17 | |
| 18 | inline A * |
| 19 | bar () |
| 20 | { |
| 21 | return new B; |
| 22 | } |