aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/debug/dwarf2/global-used-types.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/debug/dwarf2/global-used-types.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/debug/dwarf2/global-used-types.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/debug/dwarf2/global-used-types.c b/gcc-4.9/gcc/testsuite/gcc.dg/debug/dwarf2/global-used-types.c
new file mode 100644
index 000000000..431b429de
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/debug/dwarf2/global-used-types.c
@@ -0,0 +1,14 @@
+/*
+ Contributed by Dodji Seketeli <dodji@redhat.com>
+ { dg-options "-gdwarf -dA -fno-merge-debug-strings" }
+ { dg-do compile }
+ { dg-final { scan-assembler-times "DIE \\(0x\[^\n\]*\\) DW_TAG_enumeration_type" 1 } }
+ { dg-final { scan-assembler-times "DIE \\(0x\[^\n\]*\\) DW_TAG_enumerator" 2 } }
+ { dg-final { scan-assembler-times "ascii \"a.0\"\[\t \]+\[^\n\]*DW_AT_name" 1 } }
+ { dg-final { scan-assembler-times "ascii \"b.0\"\[\t \]+\[^\n\]*DW_AT_name" 1 } }
+ */
+
+enum { a, b };
+
+int v = a;
+char s[b];