gcc/testsuite/gcc.dg/debug/dwarf2/pr86964.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -gdwarf -feliminate-unused-debug-symbols -dA" } */ |
| 3 | |
| 4 | struct S { int i; }; |
| 5 | extern struct S x; |
| 6 | int y; |
| 7 | int main() |
| 8 | { |
| 9 | return y; |
| 10 | } |
| 11 | |
| 12 | /* We should elide the DIEs for x and S but not y. */ |
| 13 | /* { dg-final { scan-assembler-times "DW_TAG_variable" 2 } } */ |
| 14 | /* { dg-final { scan-assembler-not "DW_TAG_structure_type" } } */ |