This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/14478] New: rs6000 geu patterns generate incorrect code
- From: "amodra at bigpond dot net dot au" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Mar 2004 10:00:05 -0000
- Subject: [Bug target/14478] New: rs6000 geu patterns generate incorrect code
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Compiling the following with -O results in a function that always returns zero,
instead of one that always returns 1.
int foo (int a, unsigned int x)
{
unsigned int n = 0;
while (a)
x = x + 1, a = a << 1;
return x >= n;
}
--
Summary: rs6000 geu patterns generate incorrect code
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P2
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: amodra at bigpond dot net dot au
CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: powerpc-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14478