+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.
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 ();
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: