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/4.0 regression] -march=i686 generates a bogus program
- From: "belyshev at depni dot sinp dot msu dot ru" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Jan 2005 21:32:11 -0000
- Subject: [Bug target/19579] [3.3/3.4/4.0 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 belyshev at depni dot sinp dot msu dot ru 2005-01-23 21:32 -------
I can confirm this bug on mainline with this testcase:
------------------------------------------------------------------------------
void abort (void);
int f ()
{
return 0;
}
void __attribute__((noinline)) g (int k, int l)
{
int j;
if (f ())
{
j = k + l;
}
else
{
j = k + l + 1;
if (j > 0)
j++;
else
if (j < 0)
j--;
}
if (j % 2 != 0)
abort ();
}
int main ()
{
g (-2, 0);
return 0;
}
------------------------------------------------------------------------------
--
What |Removed |Added
----------------------------------------------------------------------------
Known to fail|3.3.4 3.3.5 3.4.0 3.4.3 |3.3.4 3.3.5 3.4.0 3.4.3
| |4.0.0
Known to work|3.3.3 4.0.0 |3.3.3
Summary|[3.3/3.4 regression] - |[3.3/3.4/4.0 regression] -
|march=i686 generates a bogus|march=i686 generates a bogus
|program |program
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19579