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
* [Bug tree-optimization/55883] with -fwrapv, (x < 0 && -x < 0) is assumed to be false
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 ` mikpe at it dot uu.se
2013-01-07 10:07 ` rguenth at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: mikpe at it dot uu.se @ 2013-01-05 20:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55883
Mikael Pettersson <mikpe at it dot uu.se> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mikpe at it dot uu.se
--- Comment #1 from Mikael Pettersson <mikpe at it dot uu.se> 2013-01-05 20:06:29 UTC ---
Fails all the way back to gcc-3.4.6, older releases don't have -fwrapv. Fixed
for 4.8 by r193591 == PR55236 fix:
http://gcc.gnu.org/ml/gcc-cvs/2012-11/msg00538.html
http://gcc.gnu.org/ml/gcc-patches/2012-11/msg00707.html
The test cases are very very similar so I'd say this is a duplicate of PR55236.
Applying r193591 to 4.7 and 4.6 fixes this test case there too.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug tree-optimization/55883] with -fwrapv, (x < 0 && -x < 0) is assumed to be false
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
1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-01-07 10:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55883
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> 2013-01-07 10:06:31 UTC ---
Yeah, looks like a dup.
*** This bug has been marked as a duplicate of bug 55236 ***
^ 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).