This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/21559] New: [4.1 Regression] missed jump threading
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 May 2005 22:42:32 -0000
- Subject: [Bug tree-optimization/21559] New: [4.1 Regression] missed jump threading
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following code should have no check for bytes == 0 but does on the mainline:
static int blocksize = 4096;
int bar (int);
void foo (void)
{
int toread;
int bytes;
static char eof_reached = 0;
toread = blocksize;
bytes = 1;
while (toread != 0)
{
bytes = bar (toread);
if (bytes <= 0)
{
if (bytes < 0)
continue;
break;
}
toread -= bytes;
}
if (bytes == 0)
eof_reached = 1;
}
This started to happen before 20050420 so it was ___not___ the jump threading changes.
--
Summary: [4.1 Regression] missed jump threading
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P2
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21559