------- Comment #47 from ian at airs dot com  2007-05-04 16:54 -------
Unfortunately there is no obvious way to avoid creating the asm if the types
are the same.  The reason is that the dynamic types are different, and we don't
know the dynamic type.

Look at your original test case:

      Bar *b = new (f) Bar;
      b->p = 0;
      f = new (f) Foo;

Here f has type Foo*.  So if we test whether the types are the same, we
conclude that we don't need any blockage in the last statement quoted above. 
But that misses the fact that although the static type of *f is Foo, the
dynamic type of *f is Bar.

Any ideas?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29286

Reply via email to