This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/19579] [3.3/3.4 regression] -march=i686 generates a bogus program
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Jan 2005 21:14:58 -0000
- Subject: [Bug target/19579] [3.3/3.4 regression] -march=i686 generates a bogus program
- References: <20050123002852.19579.abulmo@club-internet.fr>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From reichelt at gcc dot gnu dot org 2005-01-23 21:14 -------
Confirmed.
Here's a condensed testcase (compile with "-O2 -march=i686" on
i686-pc-linux-gnu):
================================================
int foo(int i, int j)
{
int k = i+1;
if (j)
{
if (k>0)
k++;
else
if (k<0) k--;
}
return k;
}
int main()
{
return foo(-2,1)+2;
}
================================================
The program should return 0, but returns 1 instead
The bug was introduced in gcc 3.3.4 and affects the 3.3 branch and the
3.4 branch. Mainline does not seem to be affected, but maybe the bug
is latent.
Ian, it looks like your patch for PR 1532 introduced the regression:
http://gcc.gnu.org/ml/gcc-cvs/2004-03/msg00264.html
Could you please have a look?
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |ian at airs dot com,
| |reichelt at gcc dot gnu dot
| |org
Severity|normal |critical
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
GCC host triplet|gcc-3.4.3/gentoo- |i686-pc-linux-gnu
|linux/athlon-xp 2500+ |
GCC target triplet| |i686-pc-linux-gnu
Keywords| |monitored
Known to fail| |3.3.4 3.3.5 3.4.0 3.4.3
Known to work| |3.3.3 4.0.0
Last reconfirmed|0000-00-00 00:00:00 |2005-01-23 21:14:58
date| |
Summary|-march=i686 generates a |[3.3/3.4 regression] -
|bogus program |march=i686 generates a bogus
| |program
Target Milestone|--- |3.4.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19579