This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/34363] [4.2 Regression] Aliasing failure during tree fre
- From: "sandra at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Apr 2008 20:17:56 -0000
- Subject: [Bug tree-optimization/34363] [4.2 Regression] Aliasing failure during tree fre
- References: <bug-34363-7146@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from sandra at codesourcery dot com 2008-04-30 20:17 -------
Here's another testcase for the same bug, or one closely related to it:
#include <stdio.h>
unsigned x = 8;
unsigned *addr()
{
return &x;
}
int main()
{
x = 4;
*addr() = *addr() / 2;
printf ("*addr() = %d, x = %d\n", *addr(), x);
return 0;
}
I've determined that both this test case and the original one reported with
this issue were fixed on mainline by the commit r119502, this patch:
http://gcc.gnu.org/ml/gcc-patches/2006-12/msg00225.html
I'm not familiar enough with this code (yet!) to be able to tell whether this
was a lurking bug fixed by that patch, or whether it is a lurking bug that was
merely obscured by that patch and is still present on mainline.
--
sandra at codesourcery dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sandra at codesourcery dot
| |com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34363