diff options
author | Jason Merrill <jason@redhat.com> | 2015-04-29 16:51:05 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2015-04-29 16:51:05 -0400 |
commit | 9f7fb685d9173285be6507805ced732d360c09be (patch) | |
tree | 33bcfae4e692d9bc6f67a852a2be730d152ffd58 /gcc/cp/tree.c | |
parent | 0373796b4d886711d59f19dcffb6e0cbe19969cd (diff) | |
download | gcc-9f7fb685d9173285be6507805ced732d360c09be.zip gcc-9f7fb685d9173285be6507805ced732d360c09be.tar.gz gcc-9f7fb685d9173285be6507805ced732d360c09be.tar.bz2 |
re PR c++/50800 (Internal compiler error in finish_member_declarations, possibly related to may_alias attribute)
PR c++/50800
* tree.c (apply_identity_attributes): Fix handling of classes.
From-SVN: r222591
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r-- | gcc/cp/tree.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index d00f0d7..ec9be8c 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -1187,6 +1187,13 @@ apply_identity_attributes (tree result, tree attribs, bool *remove_attributes) tree new_attribs = NULL_TREE; tree *p = &new_attribs; + if (OVERLOAD_TYPE_P (result)) + { + /* On classes and enums all attributes are ingrained. */ + gcc_assert (attribs == TYPE_ATTRIBUTES (result)); + return result; + } + for (tree a = attribs; a; a = TREE_CHAIN (a)) { const attribute_spec *as |