This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/50067] [4.7 Regression] Wrong code with -fpredictive-commoning
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 18 Aug 2011 11:22:54 +0000
- Subject: [Bug tree-optimization/50067] [4.7 Regression] Wrong code with -fpredictive-commoning
- Auto-submitted: auto-generated
- References: <bug-50067-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50067
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-08-18 11:22:54 UTC ---
Smaller testcase:
extern void abort (void);
int a[6] = { 0, 0, 0, 0, 7, 0 };
static int *p = &a[4];
int
main ()
{
int i;
for (i = 0; i < 4; ++i)
{
a[i + 1] = a[i + 2] > i;
*p &= ~1;
}
if (a[4] != 0)
abort ();
return 0;
}