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++/106230] [12/13 Regression] ICE when building folly-2022.07.04.00 in pop_local_binding (cp/name-lookup.cc:2474) since r12-6328-gbeaee0a871b6485d Date: Tue, 26 Jul 2022 00:06:44 +0000 [thread overview] Message-ID: <bug-106230-4-0MaiYwc9MR@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-106230-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106230 --- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jason Merrill <jason@gcc.gnu.org>: https://gcc.gnu.org/g:789c4b9bb015c361bc1a6adfcd0abadce555e562 commit r13-1830-g789c4b9bb015c361bc1a6adfcd0abadce555e562 Author: Jason Merrill <jason@redhat.com> Date: Mon Jul 25 11:13:31 2022 -0400 c++: aggregate prvalue as for range [PR106230] Since my PR94041 work on temporary lifetime in aggregate initialization, we end up calling build_vec_init to initialize the reference-extended temporary for the artificial __for_range variable. And build_vec_init uses finish_for_stmt to implement its loop. That function assumes that if __for_range is in current_binding_level, we're finishing a range-for, and we should fix up the variable as it goes out of scope. But when called from build_vec_init we aren't finishing a range-for, and do_poplevel doesn't remove the variable from scope because stmts_are_full_exprs_p is false. So let's check that here as well, and leave the DECL_NAME alone. PR c++/106230 gcc/cp/ChangeLog: * semantics.cc (finish_for_stmt): Check stmts_are_full_exprs_p. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/range-for38.C: New test.
next prev parent reply other threads:[~2022-07-26 0:06 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-07-08 7:03 [Bug c++/106230] New: ICE when building folly-2022.07.04.00 in pop_local_binding (cp/name-lookup.cc:2474) sam at gentoo dot org 2022-07-08 7:05 ` [Bug c++/106230] " sam at gentoo dot org 2022-07-08 7:11 ` sam at gentoo dot org 2022-07-08 7:21 ` sam at gentoo dot org 2022-07-08 8:11 ` [Bug c++/106230] [12/13 Regression] ICE when building folly-2022.07.04.00 in pop_local_binding (cp/name-lookup.cc:2474) since r12-6328-gbeaee0a871b6485d marxin at gcc dot gnu.org 2022-07-22 5:44 ` jason at gcc dot gnu.org 2022-07-25 13:53 ` jason at gcc dot gnu.org 2022-07-25 15:06 ` rguenth at gcc dot gnu.org 2022-07-26 0:06 ` cvs-commit at gcc dot gnu.org [this message] 2022-07-26 3:12 ` [Bug c++/106230] [12 " cvs-commit at gcc dot gnu.org 2022-07-26 3:13 ` jason 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-106230-4-0MaiYwc9MR@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).