summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/debug/dwarf2/imported-module.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/debug/dwarf2/imported-module.C')
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/imported-module.C35
1 files changed, 35 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/imported-module.C b/gcc/testsuite/g++.dg/debug/dwarf2/imported-module.C
new file mode 100644
index 000000000..7b25233f1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/imported-module.C
@@ -0,0 +1,35 @@
+// Contributed by Dodji Seketeli <dodji@redhat.com>
+// Origin: PR debug/37410
+// { dg-do compile }
+
+namespace A1
+ {
+ int aaa = 1;
+ };
+namespace A2
+ {
+ int aaa = 2;
+ };
+
+int
+foo (void)
+{
+ int x;
+
+ {
+ int block_create;
+ using namespace A1;
+
+ block_create = aaa; /* break1 */
+ }
+
+ {
+ int block_create;
+ using namespace A2;
+
+ block_create = aaa; /* break2 */
+ }
+
+ return x = 0;
+}
+