This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/17133] New: [3.5 Regression] wrong code with -ftree-loop-optimize
- From: "belyshev at lubercy dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Aug 2004 20:58:09 -0000
- Subject: [Bug tree-optimization/17133] New: [3.5 Regression] wrong code with -ftree-loop-optimize
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
use '-O1' to repeat:
------------------------------------------------------------------------------
extern void abort (void);
int foo = 0;
void *bar = 0;
unsigned int baz = 100;
void *pure_alloc ()
{
void *res;
while (1)
{
res = (void *) ((((unsigned int) (foo + bar))) & ~1);
foo += 2;
if (foo < baz)
return res;
foo = 0;
}
}
int main ()
{
pure_alloc ();
if (!foo)
abort ();
return 0;
}
------------------------------------------------------------------------------
--
Summary: [3.5 Regression] wrong code with -ftree-loop-optimize
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P2
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: belyshev at lubercy dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17133