summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/debug/dwarf2/redeclaration-1.C
blob: 8aaff8ef2ea04321cb93bd83da2d537f77b8df86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Origin: PR debug/43325
// { dg-options "-g -dA" }
// { dg-do compile }

// { 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 } }

namespace S
{
  int
  f()
  {
    int i = 42;
    {
      extern int i;
      return i;
    }
  }
}