Commit a5e2a41f by Jason Merrill Committed by Jason Merrill

PR c++/84314 - ICE with templates and fastcall attribute.

	* attribs.c (build_type_attribute_qual_variant): Remove assert.

From-SVN: r257883
parent 5d4991da
2018-02-21 Jason Merrill <jason@redhat.com>
PR c++/84314 - ICE with templates and fastcall attribute.
* attribs.c (build_type_attribute_qual_variant): Remove assert.
2018-02-21 Jan Hubicka <hubicka@ucw.cz> 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
* ipa-cp.c (determine_versionability): Fix comment typos. * ipa-cp.c (determine_versionability): Fix comment typos.
......
...@@ -1155,17 +1155,14 @@ build_type_attribute_qual_variant (tree otype, tree attribute, int quals) ...@@ -1155,17 +1155,14 @@ build_type_attribute_qual_variant (tree otype, tree attribute, int quals)
TYPE_CANONICAL. */; TYPE_CANONICAL. */;
else if (TYPE_STRUCTURAL_EQUALITY_P (ttype) else if (TYPE_STRUCTURAL_EQUALITY_P (ttype)
|| !comp_type_attributes (ntype, ttype)) || !comp_type_attributes (ntype, ttype))
{ /* If the target-dependent attributes make NTYPE different from
/* If the target-dependent attributes make NTYPE different from its canonical type, we will need to use structural equality
its canonical type, we will need to use structural equality checks for this type.
checks for this type.
We shouldn't get here for stripping attributes from a type;
But make sure we don't get here for stripping attributes from a the no-attribute type might not need structural comparison. But
type; the no-attribute type might not need structural comparison, we can if was discarded from type_hash_table. */
and it should have been in the hash table already. */ SET_TYPE_STRUCTURAL_EQUALITY (ntype);
gcc_assert (attribute);
SET_TYPE_STRUCTURAL_EQUALITY (ntype);
}
else if (TYPE_CANONICAL (ntype) == ntype) else if (TYPE_CANONICAL (ntype) == ntype)
TYPE_CANONICAL (ntype) = TYPE_CANONICAL (ttype); TYPE_CANONICAL (ntype) = TYPE_CANONICAL (ttype);
......
// PR c++/84314
// { dg-do compile { target { { i?86-*-* x86_64-*-* } && ia32 } } }
struct a {
void b(long() __attribute__((fastcall))) {}
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment