public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/99831] ICE: in reshape_init, at cp/decl.c:6720 Date: Wed, 31 Mar 2021 01:04:30 +0000 [thread overview] Message-ID: <bug-99831-4-RzzaXQzyXT@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-99831-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99831 --- Comment #8 from Marek Polacek <mpolacek at gcc dot gnu.org> --- The problem is that post-r277865 in defaulted_late_check we call synthesize_method here: if (kind == sfk_comparison) { /* If the function was declared constexpr, check that the definition qualifies. Otherwise we can define the function lazily. */ if (DECL_DECLARED_CONSTEXPR_P (fn) && !DECL_INITIAL (fn)) synthesize_method (fn); return; } and that results in garbage collection, which then frees {} that we created when parsing the braced-list in string<"a">{}. Then of course accessing the freed data fails.
next prev parent reply other threads:[~2021-03-31 1:04 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-03-30 14:27 [Bug c++/99831] New: " hewillk at gmail dot com 2021-03-30 14:34 ` [Bug c++/99831] " hewillk at gmail dot com 2021-03-30 14:41 ` mpolacek at gcc dot gnu.org 2021-03-30 15:04 ` mpolacek at gcc dot gnu.org 2021-03-30 17:43 ` hewillk at gmail dot com 2021-03-30 19:14 ` mpolacek at gcc dot gnu.org 2021-03-30 19:34 ` mpolacek at gcc dot gnu.org 2021-03-30 19:46 ` mpolacek at gcc dot gnu.org 2021-03-30 19:51 ` mpolacek at gcc dot gnu.org 2021-03-31 1:04 ` mpolacek at gcc dot gnu.org [this message] 2021-03-31 7:54 ` [Bug c++/99831] [10/11 Regression] " rguenth at gcc dot gnu.org 2021-04-01 18:18 ` mpolacek at gcc dot gnu.org 2021-04-01 21:35 ` cvs-commit at gcc dot gnu.org 2021-04-01 21:37 ` [Bug c++/99831] [10 " mpolacek at gcc dot gnu.org 2021-04-08 12:02 ` rguenth at gcc dot gnu.org 2021-04-09 22:45 ` cvs-commit at gcc dot gnu.org 2021-04-09 22:46 ` mpolacek 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-99831-4-RzzaXQzyXT@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).