public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/109042] New: [13 Regression] ICE in emit_support_tinfo_1, at cp/rtti.cc:1584
@ 2023-03-06 16:00 asolokha at gmx dot com
2023-03-06 16:03 ` [Bug c++/109042] " mpolacek at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: asolokha at gmx dot com @ 2023-03-06 16:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109042
Bug ID: 109042
Summary: [13 Regression] ICE in emit_support_tinfo_1, at
cp/rtti.cc:1584
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: asolokha at gmx dot com
Target Milestone: ---
g++ 13.0.1 20230305 snapshot (g:6aa1f40a3263741d964ef4716e85a0df5cec83b6) ICEs
when compiling the following testcase, reduced from
test/CodeGenCXX/rtti-fundamental.cpp from the clang 15 test suite:
namespace std {
class type_info {
};
}
std::type_info
foo ()
{
return typeid (void);
}
namespace __cxxabiv1 {
struct __fundamental_type_info {
virtual ~__fundamental_type_info ();
};
__fundamental_type_info::~__fundamental_type_info ()
{
}
}
% g++-13 -c aohjjmiw.cpp
<built-in>: internal compiler error: in emit_support_tinfo_1, at
cp/rtti.cc:1584
0x75a5ae emit_support_tinfo_1(tree_node*)
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230305/work/gcc-13-20230305/gcc/cp/rtti.cc:1584
0xba1794 emit_support_tinfo_1(tree_node*)
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230305/work/gcc-13-20230305/gcc/cp/rtti.cc:1553
0xba1794 emit_support_tinfos()
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230305/work/gcc-13-20230305/gcc/cp/rtti.cc:1647
0xa428e0 c_parse_final_cleanups()
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230305/work/gcc-13-20230305/gcc/cp/decl2.cc:4940
0xc79e7f c_common_parse_file()
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230305/work/gcc-13-20230305/gcc/c-family/c-opts.cc:1266
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/109042] [13 Regression] ICE in emit_support_tinfo_1, at cp/rtti.cc:1584
2023-03-06 16:00 [Bug c++/109042] New: [13 Regression] ICE in emit_support_tinfo_1, at cp/rtti.cc:1584 asolokha at gmx dot com
@ 2023-03-06 16:03 ` mpolacek at gcc dot gnu.org
2023-03-06 16:19 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2023-03-06 16:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109042
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2023-03-06
Target Milestone|--- |13.0
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Priority|P3 |P1
CC| |jakub at gcc dot gnu.org,
| |mpolacek at gcc dot gnu.org
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed. Must be a side effect of r13-6426-g6978df2c04df16.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/109042] [13 Regression] ICE in emit_support_tinfo_1, at cp/rtti.cc:1584
2023-03-06 16:00 [Bug c++/109042] New: [13 Regression] ICE in emit_support_tinfo_1, at cp/rtti.cc:1584 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
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-03-06 16:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109042
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/109042] [13 Regression] ICE in emit_support_tinfo_1, at cp/rtti.cc:1584
2023-03-06 16:00 [Bug c++/109042] New: [13 Regression] ICE in emit_support_tinfo_1, at cp/rtti.cc:1584 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
2023-03-07 15:31 ` jakub at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-03-06 18:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109042
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 54595
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54595&action=edit
gcc13-pr109042.patch
Untested fix.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/109042] [13 Regression] ICE in emit_support_tinfo_1, at cp/rtti.cc:1584
2023-03-06 16:00 [Bug c++/109042] New: [13 Regression] ICE in emit_support_tinfo_1, at cp/rtti.cc:1584 asolokha at gmx dot com
` (2 preceding siblings ...)
2023-03-06 18:54 ` jakub at gcc dot gnu.org
@ 2023-03-07 15:29 ` cvs-commit at gcc dot gnu.org
2023-03-07 15:31 ` jakub at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-07 15:29 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/109042] [13 Regression] ICE in emit_support_tinfo_1, at cp/rtti.cc:1584
2023-03-06 16:00 [Bug c++/109042] New: [13 Regression] ICE in emit_support_tinfo_1, at cp/rtti.cc:1584 asolokha at gmx dot com
` (3 preceding siblings ...)
2023-03-07 15:29 ` cvs-commit at gcc dot gnu.org
@ 2023-03-07 15:31 ` jakub at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-03-07 15:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109042
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-03-07 15:31 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-06 16:00 [Bug c++/109042] New: [13 Regression] ICE in emit_support_tinfo_1, at cp/rtti.cc:1584 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
2023-03-07 15:31 ` jakub at gcc dot gnu.org
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).