]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c++: ICE on xtreme-header_a.H
authorJason Merrill <jason@redhat.com>
Thu, 10 Feb 2022 19:59:49 +0000 (14:59 -0500)
committerJason Merrill <jason@redhat.com>
Thu, 10 Feb 2022 20:32:19 +0000 (15:32 -0500)
This test regressed after my PR103752 patch with -march=cascadelake.  I
don't understand why that flag makes a difference, but this patch is correct
in any case.

gcc/cp/ChangeLog:

* module.cc (depset::hash::add_specializations): Use
STRIP_TEMPLATE.

gcc/cp/module.cc

index 3cf0af10bc01e65697c7d939779b6b7245dd9f9b..6e6b008b3a5c2b5d55cdeec9a56a7b75d49fb70b 100644 (file)
@@ -12976,7 +12976,7 @@ depset::hash::add_specializations (bool decl_p)
        /* Implicit instantiations only walked if we reach them.  */
        needs_reaching = true;
       else if (!DECL_LANG_SPECIFIC (spec)
-              || !DECL_MODULE_PURVIEW_P (spec))
+              || !DECL_MODULE_PURVIEW_P (STRIP_TEMPLATE (spec)))
        /* Likewise, GMF explicit or partial specializations.  */
        needs_reaching = true;