Debian Codegraph @

gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-7.c

raw
1 /* PR preprocessor/41445 DWARF5 variant */
2 /* Test that token after multi-line function-like macro use
3 gets correct locus even when preprocessing separately.
4 If lines are inserted, the expected line number must be updated. */
5 /* { dg-do compile } */
6 /* { dg-options "-save-temps -gdwarf-5 -O0 -dA -fno-merge-debug-strings" } */
7
8 #define A(x) vari x
9 #define vari(x)
10 #define B , varj
11 int A(B) ;
12
13 /* We want to check that both vari and varj have the same line
14 number. */
15
16 /* { dg-final { scan-assembler "DW_TAG_variable\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\"vari\[^\\r\\n\]*DW_AT_name(\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*DW_AT_)*\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\[^\\r\\n\]*DW_AT_decl_line \\((0xb|11)\\)" } } */
17 /* { dg-final { scan-assembler "DW_TAG_variable\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\"varj\[^\\r\\n\]*DW_AT_name(\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*DW_AT_)*\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\[^\\r\\n\]*DW_AT_decl_line \\((0xb|11)\\)" } } */