This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/36369] [4.3/4.4 Regression] may_alias broken with previous uses of non attributed type in some cases
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 May 2008 13:58:16 -0000
- Subject: [Bug middle-end/36369] [4.3/4.4 Regression] may_alias broken with previous uses of non attributed type in some cases
- References: <bug-36369-87@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from pinskia at gcc dot gnu dot org 2008-05-29 13:58 -------
I was wrong about being C++ specific as here is a testcase which fails with
both front-ends:
struct g{long a;};
unsigned long f(struct g *a) { return *(unsigned long *)&a->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
----------------------------------------------------------------------------
Component|c++ |middle-end
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36369