gcc/testsuite/g++.dg/debug/dwarf2/static-data-member1.C
raw| 1 | // { dg-do compile } |
| 2 | // { dg-options "-gdwarf-2 -dA -fno-merge-debug-strings -fno-debug-types-section" } |
| 3 | |
| 4 | struct A |
| 5 | { |
| 6 | static int staticdatamember; |
| 7 | }; |
| 8 | |
| 9 | int A::staticdatamember = 6; |
| 10 | |
| 11 | // { dg-final { scan-assembler "DW_TAG_member\[^\n\r\]*\[\n\r\]*\[^\n\r\]*staticdatamember\[^\n\r\]*DW_AT_name" } } |
| 12 | // { dg-final { scan-assembler "DW_TAG_variable\[^\n\r\]*\[\n\r\]*\[^\n\r\]*DW_AT_specification" } } |