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

varasm: Fix up RAW_DATA_CST handling in array_size_for_constructor [PR117190]

CONSTRUCTOR indices for arrays have bitsize type, and the r15-4375
patch actually got it right in 6 other spots, but not in this function,
where it used size_int rather than bitsize_int and so size_binop can ICE
on type mismatch.

This is covered by the init-5.c testcase I've just posted, though the ICE
goes away when the C FE is fixed (and when it is not, there is another
ICE).

2024-10-22  Jakub Jelinek  <jakub@redhat.com>

	PR c/117190
	* varasm.cc (array_size_for_constructor): For RAW_DATA_CST,
	use bitsize_int rather than size_int.
parent 1bdeebe6
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