diff options
author | Jakub Jelinek <jakub@redhat.com> | 2017-04-19 18:32:02 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2017-04-19 18:32:02 +0200 |
commit | f19e6a9c0b51bb432f9754d489f369ab9c9ac052 (patch) | |
tree | f4d4845cd009ac8566bc78439f6aebb91075984a /gcc/dwarf2out.c | |
parent | 541035a63b8adc3900ca0d335382c2808228f191 (diff) | |
download | gcc-f19e6a9c0b51bb432f9754d489f369ab9c9ac052.zip gcc-f19e6a9c0b51bb432f9754d489f369ab9c9ac052.tar.gz gcc-f19e6a9c0b51bb432f9754d489f369ab9c9ac052.tar.bz2 |
re PR debug/80461 (ICE in modified_type_die, at dwarf2out.c:12566)
PR debug/80461
* dwarf2out.c (modified_type_die, gen_type_die_with_usage):
Check for t with zero TYPE_QUALS_NO_ADDR_SPACE.
* g++.dg/debug/pr80461.C: New test.
From-SVN: r247002
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 27fb9f0..98c5157 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -12690,7 +12690,9 @@ modified_type_die (tree type, int cv_quals, bool reverse, but try to canonicalize. */ tree main = TYPE_MAIN_VARIANT (type); for (tree t = main; t; t = TYPE_NEXT_VARIANT (t)) - if (check_base_type (t, main) && check_lang_type (t, type)) + if (TYPE_QUALS_NO_ADDR_SPACE (t) == 0 + && check_base_type (t, main) + && check_lang_type (t, type)) return lookup_type_die (t); return lookup_type_die (type); } @@ -24580,13 +24582,13 @@ gen_type_die_with_usage (tree type, dw_die_ref context_die, but try to canonicalize. */ tree main = TYPE_MAIN_VARIANT (type); for (tree t = main; t; t = TYPE_NEXT_VARIANT (t)) - { - if (check_base_type (t, main) && check_lang_type (t, type)) - { - type = t; - break; - } - } + if (TYPE_QUALS_NO_ADDR_SPACE (t) == 0 + && check_base_type (t, main) + && check_lang_type (t, type)) + { + type = t; + break; + } } else if (TREE_CODE (type) != VECTOR_TYPE && TREE_CODE (type) != ARRAY_TYPE) |