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().

Reply via email to