This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug regression/37824] funroll-loops miscompiles php
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Oct 2008 13:20:40 -0000
- Subject: [Bug regression/37824] funroll-loops miscompiles php
- References: <bug-37824-8090@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from rguenth at gcc dot gnu dot org 2008-10-14 13:20 -------
It is indeed an aliasing violation, you store a long and read a long*.
Fix it like
int main()
{
int i;
long a;
long **b = malloc(8 * sizeof(long));
for (i = 0; i < 8; i++)
*b++ = &a;
b--;
foo(6, (void **)b);
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37824