public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/23047] New: Combine ignores flag_wrapv
@ 2005-07-24 13:57 phython at gcc dot gnu dot org
  2005-07-24 14:01 ` [Bug rtl-optimization/23047] " pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: phython at gcc dot gnu dot org @ 2005-07-24 13:57 UTC (permalink / raw)
  To: gcc-bugs

The following testcase aborts with gcc 3.4, 4.0 and 4.1 when optimizing.  It
looks like combine is removing the condition here.
#include <limits.h>

void abort ();
void exit (int);

void f (int a) {
        if (abs(a) < 0)
          return;
        abort ();
}

int main (int argc, char *argv[]) {
        f (INT_MIN);
        exit (0);
}

-- 
           Summary: Combine ignores flag_wrapv
           Product: gcc
           Version: 3.4.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: rtl-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: phython at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug rtl-optimization/23047] Combine ignores flag_wrapv
  2005-07-24 13:57 [Bug rtl-optimization/23047] New: Combine ignores flag_wrapv phython at gcc dot gnu dot org
@ 2005-07-24 14:01 ` pinskia at gcc dot gnu dot org
  2005-07-24 14:06 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-24 14:01 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-24 13:57 -------
Confirmed.  Note this is does not effect i686 because on i686 we expand abs right away.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |wrong-code
   Last reconfirmed|0000-00-00 00:00:00         |2005-07-24 13:57:36
               date|                            |


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


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

* [Bug rtl-optimization/23047] Combine ignores flag_wrapv
  2005-07-24 13:57 [Bug rtl-optimization/23047] New: Combine ignores flag_wrapv phython at gcc dot gnu dot org
  2005-07-24 14:01 ` [Bug rtl-optimization/23047] " pinskia at gcc dot gnu dot org
@ 2005-07-24 14:06 ` pinskia at gcc dot gnu dot org
  2005-07-24 22:47 ` phython at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-24 14:06 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-24 14:01 -------
Caused by:

2002-07-20  Roger Sayle  <roger@eyesopen.com>

        * simplify-rtx.c (simplify_relational_operation): Optimize
        abs(x) < 0.0 (and abs(x) >= 0.0 when using -ffast-math).
This was introduced before -fwrapv was introduced.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |roger at eyesopen dot com


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


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

* [Bug rtl-optimization/23047] Combine ignores flag_wrapv
  2005-07-24 13:57 [Bug rtl-optimization/23047] New: Combine ignores flag_wrapv phython at gcc dot gnu dot org
  2005-07-24 14:01 ` [Bug rtl-optimization/23047] " pinskia at gcc dot gnu dot org
  2005-07-24 14:06 ` pinskia at gcc dot gnu dot org
@ 2005-07-24 22:47 ` phython at gcc dot gnu dot org
  2005-07-27 23:20 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: phython at gcc dot gnu dot org @ 2005-07-24 22:47 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From phython at gcc dot gnu dot org  2005-07-24 22:38 -------
Created an attachment (id=9353)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9353&action=view)
Honour flag_wrapv


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |phython at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED


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


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

* [Bug rtl-optimization/23047] Combine ignores flag_wrapv
  2005-07-24 13:57 [Bug rtl-optimization/23047] New: Combine ignores flag_wrapv phython at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2005-07-24 22:47 ` phython at gcc dot gnu dot org
@ 2005-07-27 23:20 ` pinskia at gcc dot gnu dot org
  2005-07-28  4:45 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-27 23:20 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-27 23:09 -------
*** Bug 23105 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |danglin at gcc dot gnu dot
                   |                            |org


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


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

* [Bug rtl-optimization/23047] Combine ignores flag_wrapv
  2005-07-24 13:57 [Bug rtl-optimization/23047] New: Combine ignores flag_wrapv phython at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2005-07-27 23:20 ` pinskia at gcc dot gnu dot org
@ 2005-07-28  4:45 ` cvs-commit at gcc dot gnu dot org
  2005-07-28  5:26 ` phython at gcc dot gnu dot org
  2005-07-29  6:03 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-07-28  4:45 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-07-28 04:40 -------
Subject: Bug 23047

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	phython@gcc.gnu.org	2005-07-28 04:40:06

Modified files:
	gcc            : ChangeLog simplify-rtx.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.c-torture/execute: pr23047.c pr23047.x 

Log message:
	2005-07-27  James A. Morrison  <phython@gcc.gnu.org>
	
	PR rtl-optimization/23047
	* simplify-rtx.c (simplify_const_relational_operation): Respect
	flag_wrapv for comparisons with ABS.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9576&r2=2.9577
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/simplify-rtx.c.diff?cvsroot=gcc&r1=1.241&r2=1.242
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5833&r2=1.5834
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/pr23047.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/pr23047.x.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug rtl-optimization/23047] Combine ignores flag_wrapv
  2005-07-24 13:57 [Bug rtl-optimization/23047] New: Combine ignores flag_wrapv phython at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2005-07-28  4:45 ` cvs-commit at gcc dot gnu dot org
@ 2005-07-28  5:26 ` phython at gcc dot gnu dot org
  2005-07-29  6:03 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: phython at gcc dot gnu dot org @ 2005-07-28  5:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From phython at gcc dot gnu dot org  2005-07-28 04:52 -------
 Fixed in the commit above.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

* [Bug rtl-optimization/23047] Combine ignores flag_wrapv
  2005-07-24 13:57 [Bug rtl-optimization/23047] New: Combine ignores flag_wrapv phython at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2005-07-28  5:26 ` phython at gcc dot gnu dot org
@ 2005-07-29  6:03 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-29  6:03 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.1.0


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


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

end of thread, other threads:[~2005-07-29  5:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-24 13:57 [Bug rtl-optimization/23047] New: Combine ignores flag_wrapv phython at gcc dot gnu dot org
2005-07-24 14:01 ` [Bug rtl-optimization/23047] " pinskia at gcc dot gnu dot org
2005-07-24 14:06 ` pinskia at gcc dot gnu dot org
2005-07-24 22:47 ` phython at gcc dot gnu dot org
2005-07-27 23:20 ` pinskia at gcc dot gnu dot org
2005-07-28  4:45 ` cvs-commit at gcc dot gnu dot org
2005-07-28  5:26 ` phython at gcc dot gnu dot org
2005-07-29  6:03 ` pinskia at gcc dot gnu dot 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).