[Bug c++/94454] ICE 'canonical types differ for identical types'
nathan at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Apr 14 17:30:52 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94454
--- Comment #12 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
Created attachment 48270
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48270&action=edit
asserts to trigger it
I have found the cause, but not the underlying reason. We have template
arguments that compare equal but hash differently. So the earlier attempts to
cause hash collisions by neutering the hasher, made the bug go away.
This patch neuters the hasher, but adds an assert into the argyment comparator
-- if the args compare equal, they better hash equal.
This triggers on the testcase with a pair of template_id_exprs.
More information about the Gcc-bugs
mailing list