[Bug ada/102450] GCC error: in set_min_and_max_values_for_integral_type, at stor-layout.c:2851
ebotcazou at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Sep 27 11:03:03 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102450
--- Comment #13 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> OTOH the gimple folding code doing
>
> tree type = lang_hooks.types.type_for_size (ilen * 8, 1);
>
> could eventually instead use mode_for_size (and check that size == precision)
> and then type_for_mode. The code already looks at the mode for verification
> and it would avoid the Ada issue at least (I still think the Ada FE shouldn't
> ICE when being passed not supported precisions):
>
> if (type
> && is_a <scalar_int_mode> (TYPE_MODE (type), &mode)
> && GET_MODE_SIZE (mode) * BITS_PER_UNIT == ilen * 8
> && have_insn_for (SET, mode)
Yes, I'd agree, the int_mode_for_size interface has exists().
More information about the Gcc-bugs
mailing list