gcc/testsuite/g++.dg/debug/dwarf2/redeclaration-1.C
raw| 1 | // Origin: PR debug/43325 |
| 2 | // { dg-options "-gdwarf-2 -dA" } |
| 3 | // { dg-do compile } |
| 4 | |
| 5 | // { dg-final { scan-assembler-times "\[^\n\r\]*\\(DIE \[^\n\r\]*DW_TAG_lexical_block\\)\[\n\r\]{1,2}\[^\n\r\]*DW_AT_low_pc\[\n\r\]{1,2}\[^\n\r\]*DW_AT_high_pc\[\n\r\]{1,2}\[^\n\r\]*\\(DIE \[^\n\r\]*DW_TAG_variable\\)\[\n\r\]{1,2}\[^\n\r\]*DW_AT_name" 2 } } |
| 6 | |
| 7 | namespace S |
| 8 | { |
| 9 | int |
| 10 | f() |
| 11 | { |
| 12 | { |
| 13 | int i = 42; |
| 14 | { |
| 15 | extern int i; |
| 16 | return i; |
| 17 | } |
| 18 | } |
| 19 | } |
| 20 | } |