diff options
author | Andreas Krebbel <krebbel@gcc.gnu.org> | 2014-09-25 07:37:36 +0000 |
---|---|---|
committer | Andreas Krebbel <krebbel@gcc.gnu.org> | 2014-09-25 07:37:36 +0000 |
commit | abdc17f81403fa566c44812777296c6d825c3e65 (patch) | |
tree | 1eb41a28a86278bb43999debd91dff6244dd8c2a /gcc/tree.c | |
parent | d90c0a5980ceedb40f9f7536c32f17856997435a (diff) | |
download | gcc-abdc17f81403fa566c44812777296c6d825c3e65.zip gcc-abdc17f81403fa566c44812777296c6d825c3e65.tar.gz gcc-abdc17f81403fa566c44812777296c6d825c3e65.tar.bz2 |
[multiple changes]
2014-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
PR 63300/debug
* tree.c (check_base_type): New.
(check_qualified_type): Exploit new helper function above.
* tree.h (check_base_type): New prototype.
* dwarf2out.c (get_nearest_type_subqualifiers): New.
(modified_type_die): Fix handling for qualifiers. Qualifiers to
"peel off" are now determined using get_nearest_type_subqualifiers.
2014-09-25 Mark Wielaard <mjw@redhat.com>
PR 63300/debug
* gcc.dg/debug/dwarf2/stacked-qualified-types-1.c: New testcase.
* gcc.dg/debug/dwarf2/stacked-qualified-types-2.c: Likewise.
* gcc.dg/guality/pr63300-const-volatile.c: New testcase.
From-SVN: r215582
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -6185,13 +6185,12 @@ set_type_quals (tree type, int type_quals) TYPE_ADDR_SPACE (type) = DECODE_QUAL_ADDR_SPACE (type_quals); } -/* Returns true iff CAND is equivalent to BASE with TYPE_QUALS. */ +/* Returns true iff unqualified CAND and BASE are equivalent. */ bool -check_qualified_type (const_tree cand, const_tree base, int type_quals) +check_base_type (const_tree cand, const_tree base) { - return (TYPE_QUALS (cand) == type_quals - && TYPE_NAME (cand) == TYPE_NAME (base) + return (TYPE_NAME (cand) == TYPE_NAME (base) /* Apparently this is needed for Objective-C. */ && TYPE_CONTEXT (cand) == TYPE_CONTEXT (base) /* Check alignment. */ @@ -6200,6 +6199,15 @@ check_qualified_type (const_tree cand, const_tree base, int type_quals) TYPE_ATTRIBUTES (base))); } +/* Returns true iff CAND is equivalent to BASE with TYPE_QUALS. */ + +bool +check_qualified_type (const_tree cand, const_tree base, int type_quals) +{ + return (TYPE_QUALS (cand) == type_quals + && check_base_type (cand, base)); +} + /* Returns true iff CAND is equivalent to BASE with ALIGN. */ static bool |