[PATCH] Fix SRA crash on array slice
Eric Botcazou
ebotcazou@adacore.com
Tue Sep 18 06:54:00 GMT 2007
> This doesn't look right to me. elt->groups will only be set for a
> slice. But decide_block_copy is called for things other than slices.
> For those things, elt->groups will be NULL.
elt->groups is not set for a slice (when elt is a slice), it is set for the
parent of a slice (elt is the whole array). It's elt->is_group
/* True if this element is a group of members of its parent. */
bool is_group;
that is set for a slice.
Moreover, decide_block_copy is never called for slices
/* We shouldn't be invoked on groups of sub-elements as they must
behave like their parent as far as block copy is concerned. */
gcc_assert (!elt->is_group);
but only for the parent of a slice. Therefore the decision must be made for
such a parent, even though it is not mentioned as a whole in the code.
--
Eric Botcazou
More information about the Gcc-patches
mailing list