This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/34065] New: Inconsistency in test
- From: "sam at rfc1149 dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Nov 2007 12:28:41 -0000
- Subject: [Bug tree-optimization/34065] New: Inconsistency in test
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following program prints "foobar" 10 times:
#include <stdio.h>
unsigned int x = -10;
int main()
{
for (;;)
if (x == -1)
break;
else {
printf("foobar\n");
x++;
}
return 0;
}
However, when replacing "unsigned int x" by "unsigned char x" or "unsigned
short x", it prints "foobar" indefinitely. When using a bigger type (such as
"long long"), it prints it 10 times again.
--
Summary: Inconsistency in test
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sam at rfc1149 dot net
GCC host triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34065