------- Comment #2 from pinskia at gcc dot gnu dot org  2008-05-29 13:43 -------
I think this is really a C++ front-end rather than a bug in the middle-end.
The follow program shows that we get the wrong aliasing set with the C++
front-end but not the C front-end:
struct g{long a;};
struct g f(struct g *a) { return *a;}

struct A
{
  void *a;
};

int f1(const struct A *x, long *y)
{
  typedef long __attribute__ ((may_alias)) long_a;
  *y = *(const long_a *) (&x->a);
  return 1;
}


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
          Component|middle-end                  |c++
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-05-29 13:43:25
               date|                            |


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

Reply via email to