[PATCH] Remove redundant checking from may_propagate_copy, allow copyprop through (void *) conversion

Richard Guenther rguenther@suse.de
Wed Sep 5 20:04:00 GMT 2007

On Tue, 4 Sep 2007, Daniel Berlin wrote:

> On 9/4/07, Richard Guenther <rguenther@suse.de> wrote:
> > On Tue, 4 Sep 2007, Daniel Berlin wrote:
> >
> > Changing the prototype of ggc_set_mark to take a (struct typeinfo *)
> > would have fixed the ICE.  But I fail to see how the formal parameter
> > type (if pointer) makes a difference at all (for the alias solution).
> >
> > We still somehow try to match *a__.1_1 to *(void *) for call parameters.
> > Why?
> You mean the derefaddr constraint?
> That's necessary in this case as well, because it may get casted later
> to some other type that, when dereferenced, contains pointers (IE a
> struct).

Maybe what I wrote was just confusing ;)  The essence is that
the gcc_assert

  /* Make sure that the symbol tag has the same alias set as the
     pointed-to type.  */
  gcc_assert (tag_set == get_alias_set (tag));

doesn't make sense if you ask for the alias set of 'void'.  That is,
'void' doesn't have an alias set as - err - 'void' isn't anything ;)

Of course get_alias_set happily returns a random number it choses
the first time you feed it 'void'.

So, I was trying to avoid generating a tag for 'void' as well, but
failed or did need to touch too many places.


More information about the Gcc-patches mailing list