This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/36765] [4.4 Regression] Revision 137573 miscompiles 464.h264ref in SPEC CPU 2006
- 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: 11 Jul 2008 10:42:21 -0000
- Subject: [Bug tree-optimization/36765] [4.4 Regression] Revision 137573 miscompiles 464.h264ref in SPEC CPU 2006
- References: <bug-36765-682@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from rguenth at gcc dot gnu dot org 2008-07-11 10:42 -------
Turns out this is a problem I already have a patch in my queue. Reduced
testcase:
int __attribute__((noinline))
foo(int i)
{
int *p = __builtin_malloc (4 * sizeof(int));
*p = 0;
p[i] = 1;
return *p;
}
extern void abort (void);
int main()
{
if (foo(0) != 1)
abort ();
return 0;
}
The bug is latent since forever.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36765