aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@mvista.com>2003-02-01 21:12:55 +0000
committerDaniel Jacobowitz <drow@gcc.gnu.org>2003-02-01 21:12:55 +0000
commit5d7bed9d6fd21fe349914dd394b75a353a3e480e (patch)
treeb342e72b5e44a5fc6b007ce46bb7e5f7c63071bb /gcc
parent53585c36db4e5cf2118ee4ff70a57276a9356f0c (diff)
downloadgcc-5d7bed9d6fd21fe349914dd394b75a353a3e480e.zip
gcc-5d7bed9d6fd21fe349914dd394b75a353a3e480e.tar.gz
gcc-5d7bed9d6fd21fe349914dd394b75a353a3e480e.tar.bz2
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: r62258
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/dwarf2out.c25
2 files changed, 19 insertions, 11 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index fef7792..95aff18 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2003-02-01 Daniel Jacobowitz <drow@mvista.com>
+
+ * dwarf2out.c (gen_type_die): Check for typedefs before calling
+ for TYPE_MAIN_VARIANT.
+
2003-02-01 Richard Henderson <rth@redhat.com>
* libgcc2.c: Include auto-host.h.
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 1cd511d..64aac19 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -11606,20 +11606,12 @@ 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. (Vectors are special because the debugging info is in the
- cloned type itself). */
- if (TREE_CODE (type) != VECTOR_TYPE)
- 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;
+
/* Prevent broken recursion; we can't hand off to the same type. */
if (DECL_ORIGINAL_TYPE (TYPE_NAME (type)) == type)
abort ();
@@ -11629,6 +11621,17 @@ gen_type_die (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. (Vectors are special because the debugging info is in the
+ cloned type itself). */
+ if (TREE_CODE (type) != VECTOR_TYPE)
+ type = type_main_variant (type);
+
+ if (TREE_ASM_WRITTEN (type))
+ return;
+
switch (TREE_CODE (type))
{
case ERROR_MARK: