public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/21331] New: Incorrect folding of comparison
@ 2005-05-02 10:06 tege-gcc at swox dot com
  2005-05-02 11:41 ` [Bug middle-end/21331] [4.0 Regression] " pinskia at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: tege-gcc at swox dot com @ 2005-05-02 10:06 UTC (permalink / raw)
  To: gcc-bugs

On ia64:    gcc -O ~/bug.c
On powerpc: gcc -O -m64 ~/bug.c

The test case hits abort.

(This case came up when trying to compile GNU MP with gcc 4.
I have yet to find a platform where gcc 4 works properly.)

This is bug.c:

#include <stdlib.h>

int bar (void)
{  return -1;  }

unsigned long
foo ()
{ unsigned long retval;
  retval = bar ();
  if (retval == -1)  return 0;
  return 3;  }

main ()
{ if (foo () != 0)  abort ();
  return 0;  }

-- 
           Summary: Incorrect folding of comparison
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tege-gcc at swox dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: ia64-redhat-linux, powerpc-apple-darwin8
  GCC host triplet: ia64-redhat-linux, powerpc-apple-darwin8
GCC target triplet: ia64-redhat-linux, powerpc-apple-darwin8


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


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

* [Bug middle-end/21331] [4.0 Regression] Incorrect folding of comparison
  2005-05-02 10:06 [Bug c/21331] New: Incorrect folding of comparison tege-gcc at swox dot com
@ 2005-05-02 11:41 ` pinskia at gcc dot gnu dot org
  2005-05-16  0:28 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-02 11:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-05-02 11:40 -------
Confirmed, another bug (PR 21293 is the other) fixed on the mainline by:
2005-03-14  Zdenek Dvorak  <dvorakz@suse.cz>

        * tree-cfg.c (find_taken_edge_cond_expr): Use zero_p instead of
        integer_zerop.
        * tree-gimple.c (is_gimple_min_invariant): Consider overflowed
        constants invariant.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
  BugsThisDependsOn|                            |21293
             Status|UNCONFIRMED                 |NEW
          Component|c                           |middle-end
     Ever Confirmed|                            |1
  GCC build triplet|ia64-redhat-linux, powerpc- |
                   |apple-darwin8               |
   GCC host triplet|ia64-redhat-linux, powerpc- |
                   |apple-darwin8               |
 GCC target triplet|ia64-redhat-linux, powerpc- |any 64bit target
                   |apple-darwin8               |
           Keywords|                            |wrong-code
      Known to fail|                            |4.0.0
      Known to work|                            |3.4.3 4.1.0
   Last reconfirmed|0000-00-00 00:00:00         |2005-05-02 11:40:53
               date|                            |
            Summary|Incorrect folding of        |[4.0 Regression] Incorrect
                   |comparison                  |folding of comparison
   Target Milestone|---                         |4.0.1


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


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

* [Bug middle-end/21331] [4.0 Regression] Incorrect folding of comparison
  2005-05-02 10:06 [Bug c/21331] New: Incorrect folding of comparison tege-gcc at swox dot com
  2005-05-02 11:41 ` [Bug middle-end/21331] [4.0 Regression] " pinskia at gcc dot gnu dot org
@ 2005-05-16  0:28 ` pinskia at gcc dot gnu dot org
  2005-05-21 16:57 ` cvs-commit at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-16  0:28 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-05-16 00:28 -------
Mine, patch posted.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pinskia at gcc dot gnu dot
                   |dot org                     |org
                URL|                            |http://gcc.gnu.org/ml/gcc-
                   |                            |patches/2005-
                   |                            |05/msg01485.html
             Status|NEW                         |ASSIGNED
           Keywords|                            |patch


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


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

* [Bug middle-end/21331] [4.0 Regression] Incorrect folding of comparison
  2005-05-02 10:06 [Bug c/21331] New: Incorrect folding of comparison tege-gcc at swox dot com
  2005-05-02 11:41 ` [Bug middle-end/21331] [4.0 Regression] " pinskia at gcc dot gnu dot org
  2005-05-16  0:28 ` pinskia at gcc dot gnu dot org
@ 2005-05-21 16:57 ` cvs-commit at gcc dot gnu dot org
  2005-05-21 16:58 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-05-21 16:57 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-05-21 16:57 -------
Subject: Bug 21331

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	pinskia@gcc.gnu.org	2005-05-21 16:57:25

Modified files:
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.c-torture/compile: pr21293.c 
	gcc/testsuite/gcc.c-torture/execute: pr21331.c 

Log message:
	2004-05-21  Andrew Pinski  <pinskia@physics.uc.edu>
	
	PR middle-end/21331
	PR tree-opt/21293
	* gcc.c-torture/compile/pr21293.c: New test.
	* gcc.c-torture/execute/pr21331.c: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5504&r2=1.5505
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/compile/pr21293.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/pr21331.c.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug middle-end/21331] [4.0 Regression] Incorrect folding of comparison
  2005-05-02 10:06 [Bug c/21331] New: Incorrect folding of comparison tege-gcc at swox dot com
                   ` (2 preceding siblings ...)
  2005-05-21 16:57 ` cvs-commit at gcc dot gnu dot org
@ 2005-05-21 16:58 ` pinskia at gcc dot gnu dot org
  2005-05-21 16:59 ` cvs-commit at gcc dot gnu dot org
  2005-05-21 16:59 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-21 16:58 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-05-21 16:58 -------
Fixed.

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


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


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

* [Bug middle-end/21331] [4.0 Regression] Incorrect folding of comparison
  2005-05-02 10:06 [Bug c/21331] New: Incorrect folding of comparison tege-gcc at swox dot com
                   ` (4 preceding siblings ...)
  2005-05-21 16:59 ` cvs-commit at gcc dot gnu dot org
@ 2005-05-21 16:59 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-21 16:59 UTC (permalink / raw)
  To: gcc-bugs



-- 
Bug 21331 depends on bug 21293, which changed state.

Bug 21293 Summary: [4.0 Regression] ICE in set_value_handle
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21293

           What    |Old Value                   |New Value
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

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


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

* [Bug middle-end/21331] [4.0 Regression] Incorrect folding of comparison
  2005-05-02 10:06 [Bug c/21331] New: Incorrect folding of comparison tege-gcc at swox dot com
                   ` (3 preceding siblings ...)
  2005-05-21 16:58 ` pinskia at gcc dot gnu dot org
@ 2005-05-21 16:59 ` cvs-commit at gcc dot gnu dot org
  2005-05-21 16:59 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-05-21 16:59 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-05-21 16:59 -------
Subject: Bug 21331

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	pinskia@gcc.gnu.org	2005-05-21 16:58:46

Modified files:
	gcc            : ChangeLog tree-cfg.c tree-gimple.c 
	gcc/fortran    : ChangeLog trans-intrinsic.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.c-torture/compile: pr21293.c 
	gcc/testsuite/gcc.c-torture/execute: pr21331.c 

Log message:
	2005-05-21  Andrew Pinski
	
	Backport from the mainline:
	2005-03-14  Zdenek Dvorak  <dvorakz@suse.cz>
	* fortran/trans-intrinsic.c (gfc_conv_intrinsic_ishft): Convert
	the argument of the shift to the unsigned type.
	
	2005-05-21  Andrew Pinski  <pinskia@physics.uc.edu>
	
	PR middle-end/21331
	PR tree-opt/21293
	Backport from the mainline:
	2005-03-14  Zdenek Dvorak  <dvorakz@suse.cz>
	* tree-cfg.c (find_taken_edge_cond_expr): Use zero_p instead of
	integer_zerop.
	* tree-gimple.c (is_gimple_min_invariant): Consider overflowed
	constants invariant.
	2004-05-21  Andrew Pinski  <pinskia@physics.uc.edu>
	
	PR middle-end/21331
	PR tree-opt/21293
	* gcc.c-torture/compile/pr21293.c: New test.
	* gcc.c-torture/execute/pr21331.c: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.7592.2.256&r2=2.7592.2.257
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-cfg.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.151&r2=2.151.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-gimple.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.35&r2=2.35.12.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.335.2.53&r2=1.335.2.54
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans-intrinsic.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.43.10.4&r2=1.43.10.5
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.191&r2=1.5084.2.192
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/compile/pr21293.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/pr21331.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1



-- 


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


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

end of thread, other threads:[~2005-05-21 16:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-02 10:06 [Bug c/21331] New: Incorrect folding of comparison tege-gcc at swox dot com
2005-05-02 11:41 ` [Bug middle-end/21331] [4.0 Regression] " pinskia at gcc dot gnu dot org
2005-05-16  0:28 ` pinskia at gcc dot gnu dot org
2005-05-21 16:57 ` cvs-commit at gcc dot gnu dot org
2005-05-21 16:58 ` pinskia at gcc dot gnu dot org
2005-05-21 16:59 ` cvs-commit at gcc dot gnu dot org
2005-05-21 16:59 ` 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).