[PATCH] Make sizetypes no longer sign-extending

Richard Guenther rguenther@suse.de
Mon May 7 09:06:00 GMT 2012


On Mon, 7 May 2012, Eric Botcazou wrote:

> > > Sure, no opposition by me to applying the whole set of patches.
> >
> > Done now.
> 
> This has introduced a couple of ACATS failures on x86:
> 
> FAIL:   c52102a
> FAIL:   c52102c
> 
> The problem is that a builtin_memmove is wrongly folded into an assignment 
> between MEM_EXPRs, although source and destination are slices which overlap.
> 
> In fold_builtin_memory_op:
> 
> (gdb) p debug_generic_expr(destvar)
> a[0 ...]{lb: 4294967292 sz: 4}
> $14 = void
> (gdb) p debug_generic_expr(dest_base)
> a
> $15 = void
> (gdb) p dest_offset
> $16 = -137438953344
> 
> get_ref_base_and_extent (unlike get_inner_reference) doesn't correctly compute 
> the offset for ARRAY_REF/ARRAY_RANGE_REF.  The code is also duplicated in 
> fold_const_aggregate_ref_1.  Fixing this yields another ACATS failure:
> 
> FAIL:   cd2a31a
> 
> because fold_array_ctor_reference needs to be adjusted backwards for the now 
> correct offset computed by get_ref_base_and_extent.
> 
> Tentative fix attached.  Tested on x86_64-suse-linux and i586-suse-linux.

Yeah, this kind of fallout is expected.

The patch is ok.

Thanks,
Richard.



More information about the Gcc-patches mailing list