This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Aliasing violation generated by fold_builtin_memcmp?
On Fri, 2005-09-30 at 16:29 +0200, Olivier Hainque wrote:
> Daniel Berlin wrote:
> > > I am still unclear on one point: is it fine to reuse the same tag for
> > > possibly different designated types ?
> >
> > Yes, as long as they have the same alias set.
>
> OK. A last detail:
>
> On the first tag_set 0 creation, we get into:
>
> if (var_ann (ptr)->type_mem_tag == NULL_TREE)
> tag = create_memory_tag (tag_type, true);
>
> and, if doing nothing special, trip on
>
> /* Make sure that the type tag has the same alias set as the
> pointed-to type. */
> gcc_assert (tag_set == get_alias_set (tag));
Well, doesn't the pointed-to type have set 0 because of
TYPE_REF_CAN_ALIAS_ALL (or whatever it's named :P)?
I'm a bit confused.