aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/debug/dwarf2/namespace-1.C
blob: d3f26f11222b5d9e5bee313f8702d0f1489fc302 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin PR debug/41170
// { dg-options "-g -dA -fno-merge-debug-strings" }
//
// We want to test that there is a DW_TAG_namespace DIE DW_AT_name is set
// to "not_emitted". That namespace die has a child DW_TAG_typedef DIE
// which DW_AT_name is the null terminated string "T".
// { dg-final { scan-assembler-times "DIE +\\(.*?\\) DW_TAG_namespace" 1 } }
// { dg-final { scan-assembler-times "\"not_emitted.0\".*?DW_AT_name" 1 } }
// { dg-final { scan-assembler-times "DIE +\\(.*?\\) DW_TAG_typedef" 1 } }
// { dg-final { scan-assembler-times "\.ascii \"T.0\"\[\t \]+.*?DW_AT_name" 1 } }

struct strukt
{
  int m;
};

namespace not_emitted
{
  typedef strukt T;
}

int
main()
{
  not_emitted::T t;
  t.m = 0;
  return 0;
}