aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-array-bounds.cc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2023-03-07 16:28:20 +0100
committerJakub Jelinek <jakub@redhat.com>2023-03-07 16:28:20 +0100
commit0d573c1f002fa77a4483aa9ebe310746a313082e (patch)
treef4ba156eb343dfe00aa0ad0a04ec2e41279942a4 /gcc/gimple-array-bounds.cc
parente4692319fd5fc7d740436e8bb338f44cb8df6c58 (diff)
downloadgcc-0d573c1f002fa77a4483aa9ebe310746a313082e.zip
gcc-0d573c1f002fa77a4483aa9ebe310746a313082e.tar.gz
gcc-0d573c1f002fa77a4483aa9ebe310746a313082e.tar.bz2
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.
Diffstat (limited to 'gcc/gimple-array-bounds.cc')
0 files changed, 0 insertions, 0 deletions