[Bug c++/52830] ICE: "canonical types differ for identical types ..." when attempting SFINAE with member type

nathan at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jan 14 13:35:28 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52830

Nathan Sidwell <nathan at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---
                 CC|                            |nathan at gcc dot gnu.org

--- Comment #11 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
Sadly the 'fixing' commit was buggy, see 98372.

What;s happening here is that the two declarations are not known to be the same
until the second one is complete and matched with the first.  But they contain
an instantiation over decltype(earlier_arg), and the two different
'earlier_args' have different contexts (and so we think are different from the
POV of specializations), until we do the matching up and morph the second one
into the first.  After that the two parameter instances have the same context
and so we ICE.


More information about the Gcc-bugs mailing list