https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109083
--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> --- Created attachment 54673 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54673&action=edit first try Another approach would be to treat the expressions as different for the *_specializations hash tables, as per this patch, which fixes the testcase. But as is this patch breaks the standard library, so more work would need to be done to make type canonicalization continue to work.