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 tree-optimization/22493] New: [4.1 Regression] with -fwrapv -INT_MIN is still not postive


Take the following code:
#include <limits.h>
void abort ();
void f(int i)
{
  if (i>0)
    abort();
  i = -i;
  if (i<0)
    return;
  abort ();
}

int main(void)
{
  f(INT_MIN);
  return 0;
}

This should not abort but does at -O2 -fwrapv and above because VRP is folding the conditional which 
is not true as -INT_MIN = INT_MIN still.  This causes us to mis compile Long.toString in libjava.

-- 
           Summary: [4.1 Regression] with -fwrapv -INT_MIN is still not
                    postive
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22493


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