gcc/testsuite/g++.dg/debug/dwarf2/lineno-array1.C
raw| 1 | // PR c++/107154 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | // { dg-additional-options "-gno-as-loc-support -dA" } |
| 4 | // Test that we emit debug info exactly once for the last line. |
| 5 | // { dg-final { scan-assembler-times {:25:1} 1 } } |
| 6 | |
| 7 | bool dummy; |
| 8 | |
| 9 | struct S { |
| 10 | const char *p; |
| 11 | S(const char *p): p(p) {} |
| 12 | ~S() { dummy = true; } |
| 13 | }; |
| 14 | |
| 15 | using Sar = S[]; |
| 16 | |
| 17 | struct X { |
| 18 | X(Sar&&) { } |
| 19 | }; |
| 20 | |
| 21 | int main() |
| 22 | { |
| 23 | X x(Sar{"", ""}); |
| 24 | return 0; |
| 25 | } |