[wide-int] Handle zero-precision INTEGER_CSTs again
Richard Sandiford
rdsandiford@googlemail.com
Mon May 5 10:54:00 GMT 2014
Richard Biener <richard.guenther@gmail.com> writes:
> On Fri, May 2, 2014 at 9:19 PM, Richard Sandiford
> <rdsandiford@googlemail.com> wrote:
>> I'd hoped the days of zero-precision INTEGER_CSTs were behind us after
>> Richard's patch to remove min amd max values from zero-width bitfields,
>> but a boostrap-ubsan showed otherwise. One source is in:
>>
>> null_pointer_node = build_int_cst (build_pointer_type (void_type_node), 0);
>>
>> if no_target, since the precision of the type comes from ptr_mode,
>> which remains the default VOIDmode. Maybe that's a bug, but setting
>> it to an arbitrary nonzero value would also be dangerous.
>
> Can you explain what 'no_target' should be? ptr_mode should never be
> VOIDmode.
Sorry, meant "no_backend" rather than "no_target". See do_compile.
> So I don't think we want this patch. Instead stor-layout should
> ICE on zero-precision integer/pointer types.
What should happen for void_zero_node?
Thanks,
Richard
More information about the Gcc-patches
mailing list