aboutsummaryrefslogtreecommitdiff
path: root/gcc/attribs.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2018-02-21 17:12:08 -0500
committerJason Merrill <jason@gcc.gnu.org>2018-02-21 17:12:08 -0500
commita5e2a41f976f6e478a97222d713959cc80c5215e (patch)
treea6098177876a7fecce7e3baf4e32e25a3ed7baaf /gcc/attribs.c
parent5d4991da5c47c3deaa2cd444002ad62cb74c3586 (diff)
downloadgcc-a5e2a41f976f6e478a97222d713959cc80c5215e.zip
gcc-a5e2a41f976f6e478a97222d713959cc80c5215e.tar.gz
gcc-a5e2a41f976f6e478a97222d713959cc80c5215e.tar.bz2
PR c++/84314 - ICE with templates and fastcall attribute.
* attribs.c (build_type_attribute_qual_variant): Remove assert. From-SVN: r257883
Diffstat (limited to 'gcc/attribs.c')
-rw-r--r--gcc/attribs.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/gcc/attribs.c b/gcc/attribs.c
index caa30b9..bfadf12 100644
--- a/gcc/attribs.c
+++ b/gcc/attribs.c
@@ -1155,17 +1155,14 @@ build_type_attribute_qual_variant (tree otype, tree attribute, int quals)
TYPE_CANONICAL. */;
else if (TYPE_STRUCTURAL_EQUALITY_P (ttype)
|| !comp_type_attributes (ntype, ttype))
- {
- /* If the target-dependent attributes make NTYPE different from
- its canonical type, we will need to use structural equality
- checks for this type.
-
- But make sure we don't get here for stripping attributes from a
- type; the no-attribute type might not need structural comparison,
- and it should have been in the hash table already. */
- gcc_assert (attribute);
- SET_TYPE_STRUCTURAL_EQUALITY (ntype);
- }
+ /* If the target-dependent attributes make NTYPE different from
+ its canonical type, we will need to use structural equality
+ checks for this type.
+
+ We shouldn't get here for stripping attributes from a type;
+ the no-attribute type might not need structural comparison. But
+ we can if was discarded from type_hash_table. */
+ SET_TYPE_STRUCTURAL_EQUALITY (ntype);
else if (TYPE_CANONICAL (ntype) == ntype)
TYPE_CANONICAL (ntype) = TYPE_CANONICAL (ttype);