From: Daniel Jacobowitz Date: Sat, 8 Feb 2003 21:51:53 +0000 (+0000) Subject: dwarf2out.c (gen_type_die): Check for typedefs before calling for TYPE_MAIN_VARIANT. X-Git-Tag: releases/gcc-3.2.3~218 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e7d24cf3e9e30148eac6d78053a5509038c5fc81;p=thirdparty%2Fgcc.git dwarf2out.c (gen_type_die): Check for typedefs before calling for TYPE_MAIN_VARIANT. * dwarf2out.c (gen_type_die): Check for typedefs before calling for TYPE_MAIN_VARIANT. From-SVN: r62585 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 257001738cb3..4d56e63e0c9d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2003-02-01 Daniel Jacobowitz + + * dwarf2out.c (gen_type_die): Check for typedefs before calling + for TYPE_MAIN_VARIANT. + 2003-02-07 John David Anglin * pa.c (output_millicode_call): Use $PIC_pcrel$0 for long PIC diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index c691dd0875ae..4eaa81b38d65 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -11058,22 +11058,25 @@ gen_type_die (type, context_die) if (type == NULL_TREE || type == error_mark_node) return; - /* We are going to output a DIE to represent the unqualified version of - this type (i.e. without any const or volatile qualifiers) so get the - main variant (i.e. the unqualified version) of this type now. */ - type = type_main_variant (type); - - if (TREE_ASM_WRITTEN (type)) - return; - if (TYPE_NAME (type) && TREE_CODE (TYPE_NAME (type)) == TYPE_DECL && DECL_ORIGINAL_TYPE (TYPE_NAME (type))) { + if (TREE_ASM_WRITTEN (type)) + return; + TREE_ASM_WRITTEN (type) = 1; gen_decl_die (TYPE_NAME (type), context_die); return; } + /* We are going to output a DIE to represent the unqualified version of + this type (i.e. without any const or volatile qualifiers) so get the + main variant (i.e. the unqualified version) of this type now. */ + type = type_main_variant (type); + + if (TREE_ASM_WRITTEN (type)) + return; + switch (TREE_CODE (type)) { case ERROR_MARK: