public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/107033] [13 Regression] [modules] Variable template of type trait via importable header gives wrong result Date: Mon, 26 Sep 2022 15:31:00 +0000 [thread overview] Message-ID: <bug-107033-4-wHsrgxY8b9@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-107033-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107033 --- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>: https://gcc.gnu.org/g:099a66498bf7a40764002793eba66c881a251b76 commit r13-2878-g099a66498bf7a40764002793eba66c881a251b76 Author: Patrick Palka <ppalka@redhat.com> Date: Mon Sep 26 11:30:17 2022 -0400 c++ modules: variable template partial spec fixes [PR107033] In r13-2775-g32d8123cd6ce87 I missed that we need to adjust the call to add_mergeable_specialization in the MK_partial case to correctly handle variable template partial specializations (it currently assumes we're always dealing with one for a class template). This fixes an ICE when converting the testcase from that commit to use an importable header instead of a named module. PR c++/107033 gcc/cp/ChangeLog: * module.cc (trees_in::decl_value): In the MK_partial case for a variable template partial specialization, pass decl_p=true to add_mergeable_specialization, and set spec to the VAR_DECL not the TEMPLATE_DECL. * pt.cc (add_mergeable_specialization): For a variable template partial specialization, set the TREE_TYPE of the new DECL_TEMPLATE_SPECIALIZATIONS node to the TREE_TYPE of the VAR_DECL not the VAR_DECL itself. gcc/testsuite/ChangeLog: * g++.dg/modules/partial-2.cc, g++.dg/modules/partial-2.h: New files, factored out from ... * g++.dg/modules/partial-2_a.C, g++.dg/modules/partial-2_b.C: ... these. * g++.dg/modules/partial-2_c.H: New test. * g++.dg/modules/partial-2_d.C: New test.
next prev parent reply other threads:[~2022-09-26 15:31 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-09-25 14:08 [Bug c++/107033] New: [13 Regression] [modules] ICE converting to span johelegp at gmail dot com 2022-09-25 16:08 ` [Bug c++/107033] " johelegp at gmail dot com 2022-09-25 16:09 ` johelegp at gmail dot com 2022-09-25 16:32 ` [Bug c++/107033] [13 Regression] [modules] ICE using span as a range johelegp at gmail dot com 2022-09-25 17:12 ` johelegp at gmail dot com 2022-09-26 9:27 ` [Bug c++/107033] [13 Regression] [modules] Variable template of type trait via importable header gives wrong result rguenth at gcc dot gnu.org 2022-09-26 13:07 ` ppalka at gcc dot gnu.org 2022-09-26 15:31 ` cvs-commit at gcc dot gnu.org [this message] 2022-09-29 21:07 ` ppalka at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-107033-4-wHsrgxY8b9@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).