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++/109042] [13 Regression] ICE in emit_support_tinfo_1, at cp/rtti.cc:1584 Date: Tue, 07 Mar 2023 15:29:18 +0000 [thread overview] Message-ID: <bug-109042-4-jBDAU1Q80e@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-109042-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109042 --- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:0d573c1f002fa77a4483aa9ebe310746a313082e commit r13-6527-g0d573c1f002fa77a4483aa9ebe310746a313082e Author: Jakub Jelinek <jakub@redhat.com> Date: Tue Mar 7 16:28:20 2023 +0100 c++: Fix up ICE in emit_support_tinfo_1 [PR109042] In my recent rtti.cc change I assumed when emitting the support tinfos that the tinfos for the fundamental types haven't been created yet. Normally (in libsupc++.a (fundamental_type_info.o)) that is the case, but as can be seen on the testcase, one can violate it by using typeid etc. in the same TU and do it before ~__fundamental_type_info () definition. The following patch fixes that by popping from unemitted_tinfo_decls only in the normal case when it is there, and treating non-NULL DECL_INITIAL on a tinfo node as indication that emit_tinfo_decl has processed it already. 2023-03-07 Jakub Jelinek <jakub@redhat.com> PR c++/109042 * rtti.cc (emit_support_tinfo_1): Don't assert that last unemitted_tinfo_decls element is tinfo, instead pop from it only in that case. * decl2.cc (c_parse_final_cleanups): Don't call emit_tinfo_decl for unemitted_tinfO_decls which have already non-NULL DECL_INITIAL. * g++.dg/rtti/pr109042.C: New test.
next prev parent reply other threads:[~2023-03-07 15:29 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-03-06 16:00 [Bug c++/109042] New: " asolokha at gmx dot com 2023-03-06 16:03 ` [Bug c++/109042] " mpolacek at gcc dot gnu.org 2023-03-06 16:19 ` jakub at gcc dot gnu.org 2023-03-06 18:54 ` jakub at gcc dot gnu.org 2023-03-07 15:29 ` cvs-commit at gcc dot gnu.org [this message] 2023-03-07 15:31 ` jakub 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-109042-4-jBDAU1Q80e@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).