diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2007-02-06 01:35:10 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2007-02-06 01:35:10 +0000 |
commit | 792eaee2cb07b64e8f255209e93cf8d95bc0f705 (patch) | |
tree | d183f0b9e7eb1fc5592761718d4cc3a1467dce6f /gcc/dwarf2out.c | |
parent | 613698c025d047e99d9666c37da2f49b97a8c803 (diff) | |
download | gcc-792eaee2cb07b64e8f255209e93cf8d95bc0f705.zip gcc-792eaee2cb07b64e8f255209e93cf8d95bc0f705.tar.gz gcc-792eaee2cb07b64e8f255209e93cf8d95bc0f705.tar.bz2 |
re PR debug/30189 (ICE on modified_type_die)
gcc/ChangeLog:
PR debug/30189
* dwarf2out.c (modified_type_die): Follow DECL_ORIGINAL_TYPE
even if cv-qualification is the same.
gcc/testsuite/ChangeLog:
PR debug/30189
* gcc.dg/pr30189.c: New test.
From-SVN: r121638
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 186c979..d529d8c 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -8519,9 +8519,11 @@ modified_type_die (tree type, int is_const_type, int is_volatile_type, gen_type_die (qualified_type, context_die); return lookup_type_die (qualified_type); } - else if (DECL_ORIGINAL_TYPE (name) - && (is_const_type < TYPE_READONLY (dtype) - || is_volatile_type < TYPE_VOLATILE (dtype))) + else if (is_const_type < TYPE_READONLY (dtype) + || is_volatile_type < TYPE_VOLATILE (dtype) + || (is_const_type <= TYPE_READONLY (dtype) + && is_volatile_type <= TYPE_VOLATILE (dtype) + && DECL_ORIGINAL_TYPE (name) != type)) /* cv-unqualified version of named type. Just use the unnamed type to which it refers. */ return modified_type_die (DECL_ORIGINAL_TYPE (name), |