public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/55883] New: with -fwrapv, (x < 0 && -x < 0) is assumed to be false
@ 2013-01-05  3:57 xi.wang at gmail dot com
  2013-01-05 20:06 ` [Bug tree-optimization/55883] " mikpe at it dot uu.se
  2013-01-07 10:07 ` rguenth at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: xi.wang at gmail dot com @ 2013-01-05  3:57 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 55883
           Summary: with -fwrapv, (x < 0 && -x < 0) is assumed to be false
    Classification: Unclassified
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: xi.wang@gmail.com


This is slightly different from Bug 22493.

#include <limits.h>
void abort ();
void f(int i)
{
  if (i<0 && -i<0)
    return;
  abort ();
}

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

The program should not abort if compiled with -fwrapv.  4.7.2 and 4.6.3 seem to
miscompile it.  4.8 is good.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-01-07 10:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-05  3:57 [Bug tree-optimization/55883] New: with -fwrapv, (x < 0 && -x < 0) is assumed to be false xi.wang at gmail dot com
2013-01-05 20:06 ` [Bug tree-optimization/55883] " mikpe at it dot uu.se
2013-01-07 10:07 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).