aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2013-01-31 16:33:57 +0000
committerJason Merrill <jason@redhat.com>2013-01-31 16:33:57 +0000
commit35b3db49ba75633a68e52de81fcdc51ab4bdcc35 (patch)
tree60fbb865dbcf70d674dfd0bc60afe3acd942d75f /gcc/dwarf2out.c
parent96dc38a4238bd73fd83072b4882fca8700059582 (diff)
PR c++/54410
* dwarf2out.c (gen_struct_or_union_type_die): Always schedule template parameters the first time. (gen_scheduled_generic_parms_dies): Check completeness here. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@195613 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 5a03280ca73..3106dd937a0 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -19061,6 +19061,10 @@ gen_struct_or_union_type_die (tree type, dw_die_ref context_die,
scope_die = scope_die_for (type, context_die);
+ /* Generate child dies for template paramaters. */
+ if (!type_die && debug_info_level > DINFO_LEVEL_TERSE)
+ schedule_generic_params_dies_gen (type);
+
if (! type_die || (nested && is_cu_die (scope_die)))
/* First occurrence of type or toplevel definition of nested class. */
{
@@ -19078,11 +19082,6 @@ gen_struct_or_union_type_die (tree type, dw_die_ref context_die,
else
remove_AT (type_die, DW_AT_declaration);
- /* Generate child dies for template paramaters. */
- if (debug_info_level > DINFO_LEVEL_TERSE
- && COMPLETE_TYPE_P (type))
- schedule_generic_params_dies_gen (type);
-
/* If this type has been completed, then give it a byte_size attribute and
then give a list of members. */
if (complete && !ns_decl)
@@ -20592,7 +20591,8 @@ gen_scheduled_generic_parms_dies (void)
return;
FOR_EACH_VEC_ELT (*generic_type_instances, i, t)
- gen_generic_params_dies (t);
+ if (COMPLETE_TYPE_P (t))
+ gen_generic_params_dies (t);
}