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?
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));
I've relaxed the assert expression for experimentation purposes, but
this is probably not the best thing to do.
How would you prefer to see this addressed ?