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++/108116] [12 Regression] ICE in check_noexcept_r, at cp/except.cc:1074 since r12-6897-gdec8d0e5fa00ceb2 Date: Tue, 07 Mar 2023 02:18:30 +0000 [thread overview] Message-ID: <bug-108116-4-iaigpoTZZj@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-108116-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108116 --- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-12 branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>: https://gcc.gnu.org/g:09c5937d8295fbc96f6d05cc12ec3709740a277d commit r12-9230-g09c5937d8295fbc96f6d05cc12ec3709740a277d Author: Patrick Palka <ppalka@redhat.com> Date: Fri Dec 23 11:17:45 2022 -0500 c++: get_nsdmi in template context [PR108116] Here during ahead of time checking of C{}, we indirectly call get_nsdmi for C::m from finish_compound_literal, which in turn calls break_out_target_exprs for C::m's (non-templated) initializer, during which we build a call to A::~A and check expr_noexcept_p for it (from build_vec_delete_1). But this is all done with processing_template_decl set, so the built A::~A call is templated (whose form was recently changed by r12-6897-gdec8d0e5fa00ceb2) which expr_noexcept_p doesn't expect, and we crash. This patch fixes this by clearing processing_template_decl before the call to break_out_target_exprs from get_nsdmi. And since it more generally seems we shouldn't be seeing (or producing) non-templated trees in break_out_target_exprs, this patch also adds an assert to that effect. PR c++/108116 gcc/cp/ChangeLog: * constexpr.cc (maybe_constant_value): Clear processing_template_decl before calling break_out_target_exprs. * init.cc (get_nsdmi): Likewise. * tree.cc (break_out_target_exprs): Assert processing_template_decl is cleared. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/nsdmi-template24.C: New test. (cherry picked from commit cf59c8983ef6590f0d69014f8dc8778b5b7691c6)
next prev parent reply other threads:[~2023-03-07 2:18 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-12-15 2:05 [Bug c++/108116] New: internal compiler error: in check_noexcept_r, at cp/except.cc:1074 m101010a at gmail dot com 2022-12-15 2:07 ` [Bug c++/108116] " m101010a at gmail dot com 2022-12-15 10:48 ` [Bug c++/108116] [12/13 Regression] ICE in check_noexcept_r, at cp/except.cc:1074 since r12-6897-gdec8d0e5fa00ceb2 marxin at gcc dot gnu.org 2022-12-15 10:50 ` marxin at gcc dot gnu.org 2022-12-15 22:27 ` pinskia at gcc dot gnu.org 2022-12-20 19:57 ` ppalka at gcc dot gnu.org 2022-12-21 12:42 ` rguenth at gcc dot gnu.org 2022-12-23 16:18 ` cvs-commit at gcc dot gnu.org 2022-12-23 16:18 ` [Bug c++/108116] [12 " ppalka at gcc dot gnu.org 2023-03-07 2:18 ` cvs-commit at gcc dot gnu.org [this message] 2023-03-07 2:23 ` 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-108116-4-iaigpoTZZj@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).