diff options
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 2e8fe614188..ca3b1cf207b 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -9242,13 +9242,17 @@ rtl_for_decl_location (decl) rtl = DECL_RTL_IF_SET (decl); /* When generating abstract instances, ignore everything except - constants and symbols living in memory. */ + constants, symbols living in memory, and symbols living in + fixed registers. */ if (! reload_completed) { if (rtl && (CONSTANT_P (rtl) || (GET_CODE (rtl) == MEM - && CONSTANT_P (XEXP (rtl, 0))))) + && CONSTANT_P (XEXP (rtl, 0))) + || (GET_CODE (rtl) == REG + && TREE_CODE (decl) == VAR_DECL + && TREE_STATIC (decl)))) { #ifdef ASM_SIMPLIFY_DWARF_ADDR rtl = ASM_SIMPLIFY_DWARF_ADDR (rtl); @@ -11473,20 +11477,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 (); @@ -11496,6 +11492,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: |