Aliasing violation generated by fold_builtin_memcmp?

Olivier Hainque hainque@adacore.com
Fri Sep 30 14:30:00 GMT 2005


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 ?





 



More information about the Gcc mailing list