@@ -1299,7 +1299,7 @@ handle_using_decl (tree using_decl, tree t)
old_value = NULL_TREE;
}
- cp_emit_debug_info_for_using (decl, USING_DECL_SCOPE (using_decl));
+ cp_emit_debug_info_for_using (decl, t);
if (is_overloaded_fn (decl))
flist = decl;
new file mode 100644
@@ -0,0 +1,32 @@
+// { dg-do compile }
+// { dg-options "-gdwarf-2 -dA -O0 -fno-merge-debug-strings" }
+
+class AAAA
+{
+ public:
+ int method (void);
+ int a;
+};
+
+int
+AAAA::method (void)
+{
+ return a;
+}
+
+class BBBB : public AAAA
+{
+ public:
+ using AAAA::method;
+
+ int method (int b);
+};
+
+int
+BBBB::method (int b)
+{
+ return a + b;
+}
+
+// { dg-final { scan-assembler-not "ascii \"BBBB\\\\0\".*ascii \"AAAA\\\\0\".*DW_TAG_imported_declaration" } }
+// { dg-final { scan-assembler-times "ascii \"AAAA\\\\0\".*ascii \"BBBB\\\\0\".*DW_TAG_imported_declaration" 1 } }