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++/113332] [12/13/14 regression] checking ICE when building fcitx-5.1.6 Date: Wed, 14 Feb 2024 15:21:06 +0000 [thread overview] Message-ID: <bug-113332-4-fR23RS0nW5@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-113332-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113332 --- Comment #5 from GCC 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:9bc6b23d11697545e8a951ccd60691b1e58b98c2 commit r14-8981-g9bc6b23d11697545e8a951ccd60691b1e58b98c2 Author: Patrick Palka <ppalka@redhat.com> Date: Wed Feb 14 10:20:31 2024 -0500 c++: synthesized_method_walk context independence [PR113908] In the second testcase below, during ahead of time checking of the non-dependent new-expr we synthesize B's copy ctor, which we expect to get defined as deleted since A's copy ctor is inaccessible. But during access checking thereof, enforce_access incorrectly decides to defer it since we're in a template context according to current_template_parms (before r14-557 it checked processing_template_decl which got cleared from implicitly_declare_fn), which leads to the access check leaking out to the template context that triggered the synthesization, and B's copy ctor getting declared as non-deleted. This patch fixes this by using maybe_push_to_top_level to clear the context (including current_template_parms) before proceeding with the synthesization. We could do this from implicitly_declare_fn, but it's better to do it more generally from synthesized_method_walk for sake of its other callers. This turns out to fix PR113332 as well: there the lambda context triggering synthesization was causing maybe_dummy_object to misbehave, but now synthesization is sufficiently context-independent. PR c++/113908 PR c++/113332 gcc/cp/ChangeLog: * method.cc (synthesized_method_walk): Use maybe_push_to_top_level. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/lambda/lambda-nsdmi11.C: New test. * g++.dg/template/non-dependent31.C: New test. Reviewed-by: Jason Merrill <jason@redhat.com>
next prev parent reply other threads:[~2024-02-14 15:21 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-01-11 9:58 [Bug c++/113332] New: [12/13/14 regression] " sjames at gcc dot gnu.org 2024-01-11 10:40 ` [Bug c++/113332] " rguenth at gcc dot gnu.org 2024-01-11 12:40 ` sjames at gcc dot gnu.org 2024-01-11 14:50 ` ppalka at gcc dot gnu.org 2024-01-13 11:12 ` [Bug c++/113332] [12/13/14 regression] checking " sjames at gcc dot gnu.org 2024-02-06 4:05 ` ppalka at gcc dot gnu.org 2024-02-14 15:21 ` cvs-commit at gcc dot gnu.org [this message] 2024-02-14 15:23 ` [Bug c++/113332] [12/13 " ppalka at gcc dot gnu.org 2024-05-13 11:29 ` rguenth at gcc dot gnu.org 2024-05-13 16:31 ` 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-113332-4-fR23RS0nW5@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).