https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100673
--- Comment #1 from John Eivind Helset <jehelset at gmail dot com> --- Created attachment 50854 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50854&action=edit Add CLASSTYPE_TEMPLATE_INFO guard and test-case. Tried to guard the the conditional with CLASSTYPE_TEMPLATE_INFO as it seemed like the common approach in the codebase, to verify that the return-type was a template. And a testcase. Remove the guard to observe ICE in the test-case.