public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: target/9929: [3.3/3.4 regression] Can't find spill register
@ 2003-03-24 23:46 Jan Hubicka
  0 siblings, 0 replies; 4+ messages in thread
From: Jan Hubicka @ 2003-03-24 23:46 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR target/9929; it has been noted by GNATS.

From: Jan Hubicka <jh@suse.cz>
To: Janis Johnson <janis187@us.ibm.com>
Cc: Steven Bosscher <s.bosscher@student.tudelft.nl>, gabor@mac.com,
	gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org,
	gcc-prs@gcc.gnu.org, jh@suse.cz
Subject: Re: target/9929: [3.3/3.4 regression] Can't find spill register
Date: Tue, 25 Mar 2003 00:06:42 +0100

 > On Mon, Mar 24, 2003 at 09:00:40PM +0100, Steven Bosscher wrote:
 > > 
 > > Janis, can you hunt this one?
 > 
 > The regression showed up with this patch:
 > 
 > Sat Mar 30 14:08:55 CET 2002  Jan Hubicka  <jh@suse.cz>
 > 
 > 	* local-alloc.c (local_alloc): Avoid call of update_equiv_regs
 > 	when not optimizing.
 > 
 > 	* toplev.c (rest_of_compilation): Cann mark_constant_function
 > 	only when optimizing.
 > 
 > 	* flow.c (calculate_global_regs_live): Ensure that all AUX fields
 > 	are NULL.
 > 
 > 	* cfgcleanup.c (bb_flags): Add BB_NONTHREADABLE_BLOCK.
 > 	(thread_jump): Set BB_NONTHREADABLE_BLOCK, check it.
 > 	(try_optimize_cfg): clear all AUX fields.
 > 
 > 	* i386.c (aligned_operand): Be prepared for SUBREGed registers.
 > 	(ix86_decompose_address): Use REG_P instead of GET_CODE (...) == REG.
 > 	(ix86_address_cost): Be prepared for SUBREGed registers.
 > 	(legitimate_address_p): Accept SUBREGed registers.
 > 
 > The hunt used Wolfgang's reduced test case with "-O -fPIC" on
 > i686-pc-linux-gnu.
 
 Tue Mar 25 00:05:27 CET 2003  Jan Hubicka  <jh@suse.cz>
 	* i386.c (legitimate_address_p):  Refuse DImore registers in 32bit compilation.
 Index: i386.c
 ===================================================================
 RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.c,v
 retrieving revision 1.552
 diff -c -3 -p -r1.552 i386.c
 *** i386.c	22 Mar 2003 20:02:22 -0000	1.552
 --- i386.c	24 Mar 2003 23:05:11 -0000
 *************** legitimate_address_p (mode, addr, strict
 *** 5936,5941 ****
 --- 5936,5949 ----
   	  goto report_error;
   	}
   
 +       /* We can run out of registers when we do allow subregs
 +          of DImode regsiters.  */
 +       if (GET_MODE (reg) == DImode && !TARGET_64BIT)
 + 	{
 + 	  reason = "base reg is DImore";
 + 	  goto report_error;
 + 	}
 + 
         if ((strict && ! REG_OK_FOR_BASE_STRICT_P (reg))
   	  || (! strict && ! REG_OK_FOR_BASE_NONSTRICT_P (reg)))
   	{
 *************** legitimate_address_p (mode, addr, strict
 *** 5971,5976 ****
 --- 5979,5993 ----
   	  reason = "index is not in Pmode";
   	  goto report_error;
   	}
 + 
 +       /* We can run out of registers when we do allow subregs
 +          of DImode regsiters.  */
 +       if (GET_MODE (reg) == DImode && !TARGET_64BIT)
 + 	{
 + 	  reason = "index reg is DImore";
 + 	  goto report_error;
 + 	}
 + 
   
         if ((strict && ! REG_OK_FOR_INDEX_STRICT_P (reg))
   	  || (! strict && ! REG_OK_FOR_INDEX_NONSTRICT_P (reg)))


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

* Re: target/9929: [3.3/3.4 regression] Can't find spill register
@ 2003-03-24 22:46 Janis Johnson
  0 siblings, 0 replies; 4+ messages in thread
From: Janis Johnson @ 2003-03-24 22:46 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR target/9929; it has been noted by GNATS.

From: Janis Johnson <janis187@us.ibm.com>
To: Steven Bosscher <s.bosscher@student.tudelft.nl>
Cc: gabor@mac.com, gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org,
   nobody@gcc.gnu.org, gcc-prs@gcc.gnu.org, janis187@us.ibm.com, jh@suse.cz
Subject: Re: target/9929: [3.3/3.4 regression] Can't find spill register
Date: Mon, 24 Mar 2003 14:04:19 -0800

 On Mon, Mar 24, 2003 at 09:00:40PM +0100, Steven Bosscher wrote:
 > 
 > Janis, can you hunt this one?
 
 The regression showed up with this patch:
 
 Sat Mar 30 14:08:55 CET 2002  Jan Hubicka  <jh@suse.cz>
 
 	* local-alloc.c (local_alloc): Avoid call of update_equiv_regs
 	when not optimizing.
 
 	* toplev.c (rest_of_compilation): Cann mark_constant_function
 	only when optimizing.
 
 	* flow.c (calculate_global_regs_live): Ensure that all AUX fields
 	are NULL.
 
 	* cfgcleanup.c (bb_flags): Add BB_NONTHREADABLE_BLOCK.
 	(thread_jump): Set BB_NONTHREADABLE_BLOCK, check it.
 	(try_optimize_cfg): clear all AUX fields.
 
 	* i386.c (aligned_operand): Be prepared for SUBREGed registers.
 	(ix86_decompose_address): Use REG_P instead of GET_CODE (...) == REG.
 	(ix86_address_cost): Be prepared for SUBREGed registers.
 	(legitimate_address_p): Accept SUBREGed registers.
 
 The hunt used Wolfgang's reduced test case with "-O -fPIC" on
 i686-pc-linux-gnu.


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

* Re: target/9929: [3.3/3.4 regression] Can't find spill register
@ 2003-03-24 20:16 Steven Bosscher
  0 siblings, 0 replies; 4+ messages in thread
From: Steven Bosscher @ 2003-03-24 20:16 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR target/9929; it has been noted by GNATS.

From: Steven Bosscher <s.bosscher@student.tudelft.nl>
To: gabor@mac.com, gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org,
	nobody@gcc.gnu.org, gcc-prs@gcc.gnu.org, janis187@us.ibm.com
Cc:  
Subject: Re: target/9929: [3.3/3.4 regression] Can't find spill register
Date: Mon, 24 Mar 2003 21:00:40 +0100

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9929
 
 Still there today.
 
 Just -O -fPIC is enough to trigger it on i586.
 
 Janis, can you hunt this one?
 
 Greetz
  Steven
 
     ---------------------------
     typedef struct X {
         char * ptr;
         int    offset;
     } X_t;
     
     X_t foo(X_t *d1, char * A0);
     
     void bar() {
       X_t l1, l2, l3;
       l3 = foo(&l1, l2.ptr);
       (*(X_t *)(l2.ptr + l3.offset)) = l1;
     }
     -----------------------------
 
 
 


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

* Re: target/9929: [3.3/3.4 regression] Can't find spill register
@ 2003-03-04 15:22 bangerth
  0 siblings, 0 replies; 4+ messages in thread
From: bangerth @ 2003-03-04 15:22 UTC (permalink / raw)
  To: gabor, gcc-bugs, gcc-prs, nobody

Old Synopsis: ICE when compiling innocent function
New Synopsis: [3.3/3.4 regression] Can't find spill register

State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Tue Mar  4 15:22:51 2003
State-Changed-Why:
    Confirmed. Here's a reduced example:
    ---------------------------
    typedef struct X {
        char * ptr;
        int    offset;
    } X_t;
    
    X_t foo(X_t *d1, char * A0);
    
    void bar() {
      X_t l1, l2, l3;
      l3 = foo(&l1, l2.ptr);
      (*(X_t *)(l2.ptr + l3.offset)) = l1;
    }
    -----------------------------
    
    It compiles cleanly with 3.2.2, but fails with 3.3 and
    present mainline when using -O2 -fPIC:
    g/x> /home/bangerth/bin/gcc-3.3-pre/bin/gcc -c -O2 -fPIC x.c
    x.c: In function `bar':
    x.c:12: error: unable to find a register to spill in class `GENERAL_REGS'
    x.c:12: error: this is the insn:
    (insn:HI 18 28 20 0 0x4014f2ec (set (mem/s:DI (plus:SI (subreg:SI (reg/v:DI 60) 0)
                    (subreg:SI (reg/v:DI 61) 4)) [2 S8 A32])
            (reg:DI 63)) 59 {*movdi_2} (insn_list 15 (insn_list 17 (nil)))
        (expr_list:REG_DEAD (reg:DI 63)
            (expr_list:REG_DEAD (reg/v:DI 60)
                (expr_list:REG_DEAD (reg/v:DI 61)
                    (nil)))))
    x.c:12: confused by earlier errors, bailing out
    g/x>
    g/x>
    g/x> /home/bangerth/bin/gcc-3.4-pre/bin/gcc -c -O2 -fPIC x.c
    x.c: In function `bar':
    x.c:12: error: unable to find a register to spill in class `GENERAL_REGS'
    x.c:12: error: this is the insn:
    (insn:HI 18 28 20 0 0x401532c0 (set (mem/s:DI (plus:SI (subreg:SI (reg/v:DI 60 [ l2 ]) 0)
                    (subreg:SI (reg/v:DI 61 [ l3 ]) 4)) [2 S8 A32])
            (reg:DI 63 [ l1 ])) 60 {*movdi_2} (insn_list 15 (insn_list 17 (nil)))
        (expr_list:REG_DEAD (reg:DI 63 [ l1 ])
            (expr_list:REG_DEAD (reg/v:DI 60 [ l2 ])
                (expr_list:REG_DEAD (reg/v:DI 61 [ l3 ])
                    (nil)))))
    x.c:12: internal compiler error: in spill_failure, at reload1.c:1919
    Please submit a full bug report,
    with preprocessed source if appropriate.
    See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9929


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

end of thread, other threads:[~2003-03-24 23:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-24 23:46 target/9929: [3.3/3.4 regression] Can't find spill register Jan Hubicka
  -- strict thread matches above, loose matches on Subject: below --
2003-03-24 22:46 Janis Johnson
2003-03-24 20:16 Steven Bosscher
2003-03-04 15:22 bangerth

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).