aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2024-10-04 22:23:04 -0400
committerJason Merrill <jason@redhat.com>2024-10-07 11:55:42 -0400
commitbc0ca75123b5996773628981a8bab865440fdf3c (patch)
treecfde7e3db7ab279288e4741f2b2e965566187ed5 /gcc
parent53f20f992a7b0f18fec83ea696c466aa53a1293c (diff)
downloadgcc-bc0ca75123b5996773628981a8bab865440fdf3c.zip
gcc-bc0ca75123b5996773628981a8bab865440fdf3c.tar.gz
gcc-bc0ca75123b5996773628981a8bab865440fdf3c.tar.bz2
c++: -Wmismatched-tags and modules
In Wmismatched-tags-6.C, we try to compare two declarations of the Cp alias template, and ICE trying to check whether they're in module purview. We need to check DECL_LANG_SPECIFIC like elsewhere in the compiler. gcc/cp/ChangeLog: * decl.cc (duplicate_decls): Only check PURVIEW_P if DECL_LANG_SPECIFIC.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/decl.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/decl.cc b/gcc/cp/decl.cc
index 07fb985..0c5b5c0 100644
--- a/gcc/cp/decl.cc
+++ b/gcc/cp/decl.cc
@@ -2530,7 +2530,7 @@ duplicate_decls (tree newdecl, tree olddecl, bool hiding, bool was_hidden)
/* Propagate purviewness and importingness as with
set_instantiating_module. */
- if (modules_p ())
+ if (modules_p () && DECL_LANG_SPECIFIC (new_result))
{
if (DECL_MODULE_PURVIEW_P (new_result))
DECL_MODULE_PURVIEW_P (old_result) = true;