===================================================================
@@ -619,7 +619,7 @@
if (criterion == DINFO_STRUCT_FILE_ANY)
return DUMP_GSTRUCT (type, usage, criterion, generic, false, true);
- type_decl = TYPE_STUB_DECL (type);
+ type_decl = TYPE_STUB_DECL(TYPE_MAIN_VARIANT(type));
if (criterion == DINFO_STRUCT_FILE_SYS && DECL_IN_SYSTEM_HEADER (type_decl))
return DUMP_GSTRUCT (type, usage, criterion, generic, false, true);
===================================================================
@@ -0,0 +1,12 @@
+// { dg-do compile }
+// { dg-options "-femit-struct-debug-baseonly -g" }
+struct A
+{
+ void foo ();
+};
+
+struct B : A
+{
+ typedef const A base;
+ using base::foo;
+};