This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][RFC] Fix alias-set generation for array types
> in component_uses_parent_alias_set we check
>
> case ARRAY_REF:
> case ARRAY_RANGE_REF:
> if (TYPE_NONALIASED_COMPONENT (TREE_TYPE (TREE_OPERAND (t, 0))))
> return true;
>
> while in alias.c we do
>
> switch (TREE_CODE (type))
> {
> - case ARRAY_TYPE:
> - if (!TYPE_NONALIASED_COMPONENT (type))
> - record_alias_subset (superset, get_alias_set (TREE_TYPE (type)));
> - break;
>
> thus, one time we check TYPE_NONALIASED_COMPONENT on the element type
> and one time on the array type. What is the correct check?
I may be missing something, but both look like on the array type to
me. Operand 0 of an ARRAY_REF is the array.