Skip to content
Snippets Groups Projects
Commit f263f2d5 authored by Jakub Jelinek's avatar Jakub Jelinek Committed by Jakub Jelinek
Browse files

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.
parent 40ad10f7
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment