This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/19579] [3.3/3.4 regression] -march=i686 generates a bogus program


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]