gcc/testsuite/g++.dg/torture/pr55260-1.C
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-std=gnu++0x -fno-inline" } */ |
| 3 | /* { dg-add-options bind_pic_locally } */ |
| 4 | |
| 5 | struct B |
| 6 | { |
| 7 | constexpr B (): |
| 8 | bp () |
| 9 | {} |
| 10 | ~B () |
| 11 | { |
| 12 | if (bp) |
| 13 | bp->f (); |
| 14 | } |
| 15 | void f (); |
| 16 | B *bp; |
| 17 | }; |
| 18 | struct A { B b; |
| 19 | }; |
| 20 | |
| 21 | void foo () |
| 22 | { |
| 23 | A a; |
| 24 | } |