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++/98881] [modules] internal compiler error: in tpl_parms_fini, at cp/module.cc:9933 Date: Thu, 07 Mar 2024 11:00:04 +0000 [thread overview] Message-ID: <bug-98881-4-4U6lxoMCvI@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-98881-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98881 --- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Nathaniel Shead <nshead@gcc.gnu.org>: https://gcc.gnu.org/g:77772f8a3da8ea30066d2201f8148714a8e89da5 commit r14-9356-g77772f8a3da8ea30066d2201f8148714a8e89da5 Author: Nathaniel Shead <nathanieloshead@gmail.com> Date: Tue Mar 5 15:17:09 2024 +1100 c++: Stream DECL_CONTEXT for template template parms [PR98881] When streaming in a nested template-template parameter as in the attached testcase, we end up reaching the containing template-template parameter in 'tpl_parms_fini'. We should not set the DECL_CONTEXT to this (nested) template-template parameter, as it should already be the struct that the outer template-template parameter is declared on. The precise logic for what DECL_CONTEXT should be for a template template parameter in various situations seems rather obscure. Rather than trying to determine the assumptions that need to hold, it seems simpler to just always re-stream the DECL_CONTEXT as needed for now. PR c++/98881 gcc/cp/ChangeLog: * module.cc (trees_out::tpl_parms_fini): Stream out DECL_CONTEXT for template template parameters. (trees_in::tpl_parms_fini): Read it. gcc/testsuite/ChangeLog: * g++.dg/modules/tpl-tpl-parm-3.h: New test. * g++.dg/modules/tpl-tpl-parm-3_a.H: New test. * g++.dg/modules/tpl-tpl-parm-3_b.C: New test. * g++.dg/modules/tpl-tpl-parm-3_c.C: New test. Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com> Reviewed-by: Patrick Palka <ppalka@redhat.com> Reviewed-by: Jason Merrill <jason@redhat.com>
next prev parent reply other threads:[~2024-03-07 11:00 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-01-29 10:17 [Bug c++/98881] New: " pilarlatiesa at gmail dot com 2021-01-29 12:17 ` [Bug c++/98881] " marxin at gcc dot gnu.org 2021-01-29 13:05 ` nathan at gcc dot gnu.org 2021-01-29 19:36 ` nathan at gcc dot gnu.org 2021-02-03 14:50 ` nathan at gcc dot gnu.org 2021-02-15 10:48 ` pilarlatiesa at gmail dot com 2022-05-27 8:58 ` pilarlatiesa at gmail dot com 2024-03-05 16:39 ` pilarlatiesa at gmail dot com 2024-03-07 11:00 ` cvs-commit at gcc dot gnu.org [this message] 2024-03-07 11:01 ` nshead 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-98881-4-4U6lxoMCvI@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).