[PATCH] Improve alias information for arrays
Eric Botcazou
ebotcazou@adacore.com
Sat Jan 7 21:02:00 GMT 2006
> Sort of, I have reduced the failure to
>
> procedure CA11C01 is
>
> subtype Data_String is String (1 .. 7);
> type Data_Base_Type is array (1 .. 1) of Data_String;
>
> Zoo_Data_Base : Data_Base_Type;
>
> begin
>
> declare
>
> -- Remove the routine and the test passes
> procedure Enter_Animal_Data (I : Integer) is
> begin
> Zoo_Data_Base (I) := "Animal ";
> end Enter_Animal_Data;
>
> begin
> Zoo_Data_Base (1) := "Animal ";
>
> if Zoo_Data_Base(1)(1 .. 6) /= "Animal"
> then
> raise Program_Error;
> end if;
> end;
>
> end CA11C01;
>
>
> where we miss a VUSE of the Zoo_Data_Base on the memcmp generated,
> so we dce the initialization.
It looks like quite the same problem as the original one: Zoo_Data_Base is put
in the FRAME object which is not flagged as call-clobbered because
ARRAY_RANGE_REF is mis-handled by the aliasing code.
--
Eric Botcazou
More information about the Gcc-patches
mailing list