aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C')
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C b/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C
new file mode 100644
index 00000000000..f5089ca2da8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C
@@ -0,0 +1,14 @@
+// Contributed by Dodji Seketeli <dodji@redhat.com>
+// Origin PR debug/39706
+// { dg-options "-g -dA" }
+// { dg-do compile }
+// { dg-final { scan-assembler-times ".debug_pubnames" 1 } }
+// { dg-final { scan-assembler-times "\"main\".*external name" 1 } }
+// { dg-final { scan-assembler-times "\"ns::ns_x.*external name" 1 } }
+// { dg-final { scan-assembler-times "\"y::y_x.*external name" 1 } }
+
+namespace ns { int ns_x; }
+class y { public: static int y_x; };
+int y::y_x;
+int main() { return ns::ns_x; }
+