c++: Fix ICEs with large initializer lists or ones including #embed [PR118124]
The following testcases ICE due to RAW_DATA_CST not being handled where it should be during ck_list conversions. The last 2 testcases started ICEing with r15-6339 committed yesterday (speedup of large initializers), the first two already with r15-5958 (#embed optimization for C++). For conversion to initializer_list<unsigned char> or char/signed char we can optimize and keep RAW_DATA_CST with adjusted type if we report narrowing errors if needed, for others this converts each element separately. 2025-01-15 Jakub Jelinek <jakub@redhat.com> PR c++/118124 * call.cc (convert_like_internal): Handle RAW_DATA_CST in ck_list handling. Formatting fixes. * g++.dg/cpp/embed-15.C: New test. * g++.dg/cpp/embed-16.C: New test. * g++.dg/cpp0x/initlist-opt3.C: New test. * g++.dg/cpp0x/initlist-opt4.C: New test.
Showing
- gcc/cp/call.cc 89 additions, 6 deletionsgcc/cp/call.cc
- gcc/testsuite/g++.dg/cpp/embed-15.C 35 additions, 0 deletionsgcc/testsuite/g++.dg/cpp/embed-15.C
- gcc/testsuite/g++.dg/cpp/embed-16.C 18 additions, 0 deletionsgcc/testsuite/g++.dg/cpp/embed-16.C
- gcc/testsuite/g++.dg/cpp0x/initlist-opt3.C 47 additions, 0 deletionsgcc/testsuite/g++.dg/cpp0x/initlist-opt3.C
- gcc/testsuite/g++.dg/cpp0x/initlist-opt4.C 20 additions, 0 deletionsgcc/testsuite/g++.dg/cpp0x/initlist-opt4.C
Loading
Please register or sign in to comment