public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/21144] New: [4.0/4.1 regression] Apparent infinite loop in reload
@ 2005-04-21  9:41 schwab at suse dot de
  2005-04-21  9:42 ` [Bug rtl-optimization/21144] " schwab at suse dot de
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: schwab at suse dot de @ 2005-04-21  9:41 UTC (permalink / raw)
  To: gcc-bugs

The testcase appears to hang inside reload_cse_regs when compiled with -O2.

-- 
           Summary: [4.0/4.1 regression] Apparent infinite loop in reload
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: compile-time-hog
          Severity: normal
          Priority: P2
         Component: rtl-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: schwab at suse dot de
                CC: gcc-bugs at gcc dot gnu dot org,matz at suse dot de
GCC target triplet: ia64-*-linux


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


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

* [Bug rtl-optimization/21144] [4.0/4.1 regression] Apparent infinite loop in reload
  2005-04-21  9:41 [Bug rtl-optimization/21144] New: [4.0/4.1 regression] Apparent infinite loop in reload schwab at suse dot de
@ 2005-04-21  9:42 ` schwab at suse dot de
  2005-04-21 12:52 ` pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: schwab at suse dot de @ 2005-04-21  9:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From schwab at suse dot de  2005-04-21 09:42 -------
Created an attachment (id=8698)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8698&action=view)
Testcase


-- 


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


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

* [Bug rtl-optimization/21144] [4.0/4.1 regression] Apparent infinite loop in reload
  2005-04-21  9:41 [Bug rtl-optimization/21144] New: [4.0/4.1 regression] Apparent infinite loop in reload schwab at suse dot de
  2005-04-21  9:42 ` [Bug rtl-optimization/21144] " schwab at suse dot de
@ 2005-04-21 12:52 ` pinskia at gcc dot gnu dot org
  2005-04-25 13:20 ` matz at suse dot de
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-21 12:52 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.0.1


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


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

* [Bug rtl-optimization/21144] [4.0/4.1 regression] Apparent infinite loop in reload
  2005-04-21  9:41 [Bug rtl-optimization/21144] New: [4.0/4.1 regression] Apparent infinite loop in reload schwab at suse dot de
  2005-04-21  9:42 ` [Bug rtl-optimization/21144] " schwab at suse dot de
  2005-04-21 12:52 ` pinskia at gcc dot gnu dot org
@ 2005-04-25 13:20 ` matz at suse dot de
  2005-04-25 13:26 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: matz at suse dot de @ 2005-04-25 13:20 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From matz at suse dot de  2005-04-25 13:20 -------
The problem is in reload_cse_move2add.  It has such a loop: 
                      for (narrow_mode = GET_CLASS_NARROWEST_MODE (MODE_INT); 
                           narrow_mode != GET_MODE (reg); 
                           narrow_mode = GET_MODE_WIDER_MODE (narrow_mode)) 
                        { 
 
where 'reg' comes from a simple SET insn.  In this testcase the insn is: 
  (set (reg:BI r15) (const_int 1)) 
note the mode of reg being BImode.  Now, BImode is in fact a 
FRACTIONAL_INT_MODE, not an INT_MODE (although GET_MODE_CLASS would 
return INT_MODE, so using this instead of hard-coded INT_MODE wouldn't help). 
And GET_CLASS_NARROWEST_MODE(INT_MODE) is QImode, as it will ignore modes 
with precision 1 bit in genmodes.c (I think because the rest of the compiler 
is not prepared to really see an BImode here, but I may be wrong, there 
are not that many instance of GET_CLASS_NARROWEST_MODE and most look safe, 
but will iterate one more time uselessly if started from BImode). 
 
So, this loop starts with QImode, widens the mode each time, and waits for 
it to become equal to the mode of 'reg', i.e. BImode.  This of course 
never happens, so somewhen it is VOIDmode, and that's the fixed point 
of GET_CLASS_NARROWEST_MODE.  So we are endlessly looping. 
 
I've attached the obvious change, which I'm going to regtest now.  It fixes 
this testcase. 

-- 


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


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

* [Bug rtl-optimization/21144] [4.0/4.1 regression] Apparent infinite loop in reload
  2005-04-21  9:41 [Bug rtl-optimization/21144] New: [4.0/4.1 regression] Apparent infinite loop in reload schwab at suse dot de
                   ` (2 preceding siblings ...)
  2005-04-25 13:20 ` matz at suse dot de
@ 2005-04-25 13:26 ` pinskia at gcc dot gnu dot org
  2005-04-25 13:29 ` matz at suse dot de
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-25 13:26 UTC (permalink / raw)
  To: gcc-bugs



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


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


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

* [Bug rtl-optimization/21144] [4.0/4.1 regression] Apparent infinite loop in reload
  2005-04-21  9:41 [Bug rtl-optimization/21144] New: [4.0/4.1 regression] Apparent infinite loop in reload schwab at suse dot de
                   ` (3 preceding siblings ...)
  2005-04-25 13:26 ` pinskia at gcc dot gnu dot org
@ 2005-04-25 13:29 ` matz at suse dot de
  2005-04-28  1:15 ` wilson at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: matz at suse dot de @ 2005-04-25 13:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From matz at suse dot de  2005-04-25 13:26 -------
Created an attachment (id=8734)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8734&action=view)
Patch for above problem


-- 


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


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

* [Bug rtl-optimization/21144] [4.0/4.1 regression] Apparent infinite loop in reload
  2005-04-21  9:41 [Bug rtl-optimization/21144] New: [4.0/4.1 regression] Apparent infinite loop in reload schwab at suse dot de
                   ` (4 preceding siblings ...)
  2005-04-25 13:29 ` matz at suse dot de
@ 2005-04-28  1:15 ` wilson at gcc dot gnu dot org
  2005-04-29 18:39 ` cvs-commit at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: wilson at gcc dot gnu dot org @ 2005-04-28  1:15 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From wilson at gcc dot gnu dot org  2005-04-28 01:15 -------
Confirmed.

The patch is OK for both mainline and the gcc-4.0 branch, assuming it passes the
regtest, in case anyone was waiting for approval.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-04-28 01:15:34
               date|                            |


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


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

* [Bug rtl-optimization/21144] [4.0/4.1 regression] Apparent infinite loop in reload
  2005-04-21  9:41 [Bug rtl-optimization/21144] New: [4.0/4.1 regression] Apparent infinite loop in reload schwab at suse dot de
                   ` (6 preceding siblings ...)
  2005-04-29 18:39 ` cvs-commit at gcc dot gnu dot org
@ 2005-04-29 18:39 ` cvs-commit at gcc dot gnu dot org
  2005-04-29 19:03 ` matz at suse dot de
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-04-29 18:39 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-04-29 18:39 -------
Subject: Bug 21144

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	matz@gcc.gnu.org	2005-04-29 18:39:23

Modified files:
	gcc            : ChangeLog postreload.c 

Log message:
	PR rtl-optimization/21144
	* postreload.c (reload_cse_move2add): Check for VOIDmode.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.8532&r2=2.8533
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/postreload.c.diff?cvsroot=gcc&r1=2.29&r2=2.30



-- 


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


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

* [Bug rtl-optimization/21144] [4.0/4.1 regression] Apparent infinite loop in reload
  2005-04-21  9:41 [Bug rtl-optimization/21144] New: [4.0/4.1 regression] Apparent infinite loop in reload schwab at suse dot de
                   ` (5 preceding siblings ...)
  2005-04-28  1:15 ` wilson at gcc dot gnu dot org
@ 2005-04-29 18:39 ` cvs-commit at gcc dot gnu dot org
  2005-04-29 18:39 ` cvs-commit at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-04-29 18:39 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-04-29 18:38 -------
Subject: Bug 21144

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	matz@gcc.gnu.org	2005-04-29 18:38:44

Modified files:
	gcc            : ChangeLog postreload.c 

Log message:
	PR rtl-optimization/21144
	* postreload.c (reload_cse_move2add): Check for VOIDmode.

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.204&r2=2.7592.2.205
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/postreload.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.27&r2=2.27.8.1



-- 


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


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

* [Bug rtl-optimization/21144] [4.0/4.1 regression] Apparent infinite loop in reload
  2005-04-21  9:41 [Bug rtl-optimization/21144] New: [4.0/4.1 regression] Apparent infinite loop in reload schwab at suse dot de
                   ` (7 preceding siblings ...)
  2005-04-29 18:39 ` cvs-commit at gcc dot gnu dot org
@ 2005-04-29 19:03 ` matz at suse dot de
  2005-04-29 19:08 ` pinskia at gcc dot gnu dot org
  2005-06-25  9:56 ` cvs-commit at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: matz at suse dot de @ 2005-04-29 19:03 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From matz at suse dot de  2005-04-29 19:03 -------
This is now fixed, but it seems, even though I'm logged in, I can't change the state 
of this report. 

-- 


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


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

* [Bug rtl-optimization/21144] [4.0/4.1 regression] Apparent infinite loop in reload
  2005-04-21  9:41 [Bug rtl-optimization/21144] New: [4.0/4.1 regression] Apparent infinite loop in reload schwab at suse dot de
                   ` (8 preceding siblings ...)
  2005-04-29 19:03 ` matz at suse dot de
@ 2005-04-29 19:08 ` pinskia at gcc dot gnu dot org
  2005-06-25  9:56 ` cvs-commit at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-29 19:08 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-04-29 19:08 -------
Fixed.

(In reply to comment #7)
> This is now fixed, but it seems, even though I'm logged in, I can't change the state 
> of this report. 

I will get you admin. access.


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


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


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

* [Bug rtl-optimization/21144] [4.0/4.1 regression] Apparent infinite loop in reload
  2005-04-21  9:41 [Bug rtl-optimization/21144] New: [4.0/4.1 regression] Apparent infinite loop in reload schwab at suse dot de
                   ` (9 preceding siblings ...)
  2005-04-29 19:08 ` pinskia at gcc dot gnu dot org
@ 2005-06-25  9:56 ` cvs-commit at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-06-25  9:56 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-06-25 09:56 -------
Subject: Bug 21144

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	tkoenig@gcc.gnu.org	2005-06-25 09:56:38

Modified files:
	libgfortran    : ChangeLog 
	libgfortran/m4 : cshift1.m4 eoshift1.m4 eoshift3.m4 
	libgfortran/generated: cshift1_4.c cshift1_8.c eoshift1_4.c 
	                       eoshift1_8.c eoshift3_4.c eoshift3_8.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gfortran.dg: shift-alloc.f90 

Log message:
	2005-06-25  Thomas Koenig  <Thomas.Koenig@online.de>
	
	PR libfortran/22144
	* m4/cshift1.m4: Remove const from argument ret.
	Populate return array descriptor if ret->data is NULL.
	* m4/eoshift1.m4: Likewise.
	* m4/eoshift3.m4: Likewise.
	* generated/cshift1_4.c:  Regenerated.
	* generated/cshift1_8.c:  Regenerated.
	* generated/eoshift1_4.c:  Regenerated.
	* generated/eoshift1_8.c:  Regenerated.
	* generated/eoshift3_4.c:  Regenerated.
	* generated/eoshift3_8.c:  Regenerated.
	
	2005-06-25  Thomas Koenig <Thomas.Koenig@online.de>
	
	PR libfortran/21144
	* gfortran.dg/shift-alloc.f90:  New testcase.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/ChangeLog.diff?cvsroot=gcc&r1=1.249&r2=1.250
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/m4/cshift1.m4.diff?cvsroot=gcc&r1=1.7&r2=1.8
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/m4/eoshift1.m4.diff?cvsroot=gcc&r1=1.8&r2=1.9
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/m4/eoshift3.m4.diff?cvsroot=gcc&r1=1.8&r2=1.9
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/generated/cshift1_4.c.diff?cvsroot=gcc&r1=1.6&r2=1.7
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/generated/cshift1_8.c.diff?cvsroot=gcc&r1=1.6&r2=1.7
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/generated/eoshift1_4.c.diff?cvsroot=gcc&r1=1.7&r2=1.8
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/generated/eoshift1_8.c.diff?cvsroot=gcc&r1=1.7&r2=1.8
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/generated/eoshift3_4.c.diff?cvsroot=gcc&r1=1.7&r2=1.8
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/generated/eoshift3_8.c.diff?cvsroot=gcc&r1=1.7&r2=1.8
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5684&r2=1.5685
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/shift-alloc.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

end of thread, other threads:[~2005-06-25  9:56 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-21  9:41 [Bug rtl-optimization/21144] New: [4.0/4.1 regression] Apparent infinite loop in reload schwab at suse dot de
2005-04-21  9:42 ` [Bug rtl-optimization/21144] " schwab at suse dot de
2005-04-21 12:52 ` pinskia at gcc dot gnu dot org
2005-04-25 13:20 ` matz at suse dot de
2005-04-25 13:26 ` pinskia at gcc dot gnu dot org
2005-04-25 13:29 ` matz at suse dot de
2005-04-28  1:15 ` wilson at gcc dot gnu dot org
2005-04-29 18:39 ` cvs-commit at gcc dot gnu dot org
2005-04-29 18:39 ` cvs-commit at gcc dot gnu dot org
2005-04-29 19:03 ` matz at suse dot de
2005-04-29 19:08 ` pinskia at gcc dot gnu dot org
2005-06-25  9:56 ` cvs-commit 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).