gcc/testsuite/g++.dg/debug/pr89006.C
raw| 1 | // PR debug/89006 |
| 2 | // { dg-do compile } |
| 3 | // { dg-options "-O2 -g -w" } |
| 4 | // { dg-additional-options "-fPIC" { target fpic } } |
| 5 | // { dg-bogus "non-delegitimized UNSPEC UNSPEC_SET_GOT" "" { target { i?86-*-* x86_64-*-* } } 0 } |
| 6 | |
| 7 | struct A { A (bool); }; |
| 8 | |
| 9 | static void |
| 10 | foo (const char *x) |
| 11 | { |
| 12 | new A (x); |
| 13 | } |
| 14 | |
| 15 | void |
| 16 | bar () |
| 17 | { |
| 18 | foo ("foo"); |
| 19 | foo ("bar"); |
| 20 | } |