> The patch probably fixes only part of the issues with SRA and rev-storage.

Well, this issue (coming from a bypass in SRA) is the first issue uncovered 
with rev-storage in SRA for years.

> I see in build_ref_for_model:
> 
>       /* The flag will be set on the record type.  */
>       REF_REVERSE_STORAGE_ORDER (t) = 0;
> 
> for the case there was a COMPONENT_REF, so this is for the case where
> the model did not have that?

No, it's the other way around: model->reverse is true so the flag will be set 
on the MEM out of build_ref_for_offset.  But the type of the MEM is aggregate, 
which means that the flag may not be set on the MEM; instead it should be set 
on the type itself, as indicated in the comment.

> Based on your assertion above can we derive TYPE_REVERSE_STORAGE_ORDER from
> the passed in racc and thus set the flag correctly in build_ref_for_model
> instead?

Well, the code is a bypass that builds an access on the LHS from a model of 
the RHS(!), so things need to be patched up and I'd rather not introduce bugs 
elsewhere if possible...

-- 
Eric Botcazou

Reply via email to