public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/38621]  New: [4.3 Regression] sh gcc unable to spill register when building ghostscript-gpl
@ 2008-12-24 14:59 vapier at gentoo dot org
  2008-12-24 15:00 ` [Bug target/38621] " vapier at gentoo dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: vapier at gentoo dot org @ 2008-12-24 14:59 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1860 bytes --]

when building ghostscript-gpl-8.63, gcc-4.3.2 fails:

sh4-unknown-linux-gnu-gcc  -DHAVE_MKSTEMP -DHAVE_HYPOT -DHAVE_FILE64
-DHAVE_MKSTEMP64 -DHAVE_FONTCONFIG -O2 -Wall -Wstrict-prototypes -Wundef
-Wmissing-declarations -Wmissing-prototypes -Wwrite-strings
-Wno-strict-aliasing -fno-builtin -fno-common -DHAVE_STDINT_H
-DGX_COLOR_INDEX_TYPE="unsigned long long" -O2 -m4 -pipe -DGS_DEVS_SHARED
-DGS_DEVS_SHARED_DIR=\"/usr/lib/ghostscript/8.63\" -I./obj -I./src  -o
./obj/gdevifno.o -c ./src/gdevifno.c
./src/gdevifno.c:195: warning: no previous prototype for ‘init_p9color’
./src/gdevifno.c:56: warning: ‘cmap2rgb’ declared ‘static’ but never defined
./src/gdevifno.c: In function ‘inferno_rgb2cmap’:
./src/gdevifno.c:150: error: unable to find a register to spill in class
‘R0_REGS’
./src/gdevifno.c:150: error: this is the insn:
(insn:HI 132 192 154 17 ./src/gdevifno.c:148 (set (mem/s:SI (plus:SI
(reg/v/f:SI 8 r8 [orig:183 dev ] [183])
                (reg/f:SI 2 r2 [225])) [3 S4 A32])
        (reg:SI 3 r3 [227])) 172 {movsi_ie} (expr_list:REG_DEAD (reg:SI 3 r3
[227])
        (expr_list:REG_DEAD (reg/f:SI 2 r2 [225])
            (expr_list:REG_DEAD (reg/v/f:SI 8 r8 [orig:183 dev ] [183])
                (expr_list:REG_EQUAL (const_int 1 [0x1])
                    (nil))))))
./src/gdevifno.c:150: confused by earlier errors, bailing out
make: *** [obj/gdevifno.o] Error 1


-- 
           Summary: [4.3 Regression] sh gcc unable to spill register when
                    building ghostscript-gpl
           Product: gcc
           Version: 4.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: vapier at gentoo dot org
GCC target triplet: sh4-linux-gnu


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


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

* [Bug target/38621] [4.3 Regression] sh gcc unable to spill register when building ghostscript-gpl
  2008-12-24 14:59 [Bug target/38621] New: [4.3 Regression] sh gcc unable to spill register when building ghostscript-gpl vapier at gentoo dot org
@ 2008-12-24 15:00 ` vapier at gentoo dot org
  2008-12-24 15:03 ` [Bug target/38621] [4.3 Regression] sh gcc unable to spill register when building ghostscript-gpl with -O2 vapier at gentoo dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: vapier at gentoo dot org @ 2008-12-24 15:00 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 962 bytes --]



------- Comment #1 from vapier at gentoo dot org  2008-12-24 14:59 -------
Created an attachment (id=16980)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16980&action=view)
gdevifno.i

$ sh4-unknown-linux-gnu-gcc -c gdevifno.i -O2
gdevifno.i: In function ‘inferno_rgb2cmap’:
gdevifno.i:41: error: unable to find a register to spill in class ‘R0_REGS’
gdevifno.i:41: error: this is the insn:
(insn:HI 19 61 46 2 gdevifno.i:39 (set (mem/s:SI (plus:SI (reg/v/f:SI 4 r4
[orig:161 bdev ] [161])
                (reg/f:SI 1 r1 [167])) [3 S4 A32])
        (reg:SI 2 r2 [169])) 172 {movsi_ie} (expr_list:REG_DEAD (reg:SI 2 r2
[169])
        (expr_list:REG_DEAD (reg/f:SI 1 r1 [167])
            (expr_list:REG_DEAD (reg/v/f:SI 4 r4 [orig:161 bdev ] [161])
                (expr_list:REG_EQUAL (const_int 1 [0x1])
                    (nil))))))
gdevifno.i:41: confused by earlier errors, bailing out


-- 


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


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

* [Bug target/38621] [4.3 Regression] sh gcc unable to spill register when building ghostscript-gpl with -O2
  2008-12-24 14:59 [Bug target/38621] New: [4.3 Regression] sh gcc unable to spill register when building ghostscript-gpl vapier at gentoo dot org
  2008-12-24 15:00 ` [Bug target/38621] " vapier at gentoo dot org
@ 2008-12-24 15:03 ` vapier at gentoo dot org
  2008-12-25  3:40 ` [Bug target/38621] [4.3/4.4 " kkojima at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: vapier at gentoo dot org @ 2008-12-24 15:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from vapier at gentoo dot org  2008-12-24 15:02 -------
Created an attachment (id=16981)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16981&action=view)
gdevifno.orig.i

here's the original file in case the reduced test case is troublesome


-- 


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


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

* [Bug target/38621] [4.3/4.4 Regression] sh gcc unable to spill register when building ghostscript-gpl with -O2
  2008-12-24 14:59 [Bug target/38621] New: [4.3 Regression] sh gcc unable to spill register when building ghostscript-gpl vapier at gentoo dot org
  2008-12-24 15:00 ` [Bug target/38621] " vapier at gentoo dot org
  2008-12-24 15:03 ` [Bug target/38621] [4.3 Regression] sh gcc unable to spill register when building ghostscript-gpl with -O2 vapier at gentoo dot org
@ 2008-12-25  3:40 ` kkojima at gcc dot gnu dot org
  2009-01-01  5:14 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: kkojima at gcc dot gnu dot org @ 2008-12-25  3:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from kkojima at gcc dot gnu dot org  2008-12-25 03:38 -------
Here is an another reduced testcase.

struct s
{
  char a[512];
  int b;
  int c;
};

long long
foo (struct s *p, int m, int r)
{
  if (r == m)
    p->b = 3;
  p->c = 1;
  return m;
}

I've confirmed that this fails with the trunk compiler too.

The insn scheduling before reload permutes the insns of
the exit basic block like as:

;;   ======================================================
;;   -- basic block 5 from 18 to 38 -- before reload
;;   ======================================================

;;        0-->    18 r166=0x204                       
:(issue+load_store),nothing,memory
changing bb of uid 55
;;        0-->    55 {r170=r161<<0x1;t=r161<0x0;}      :issue,int
changing bb of uid 56
;;        1-->    56 r170=-t                           :issue,int
changing bb of uid 46
;;        1-->    46 r0=r161                           :issue
;;        2-->    19 r168=0x1                          :issue,int
changing bb of uid 47
;;        2-->    47 r1=r170                           :issue
;;        3-->    20 [r160+r166]=r168                 
:(issue+load_store),nothing,memory
;;        3-->    38 use r0                            :nothing

i.e. insn 46 r0=r161 is placed before insn 20.
Unfortunately insn 20 [r160+r166]=r168 requires r0 because
sh has r0 + reg addressing only.  -fno-schedule-insns gets
rid of the error, though I have no idea for the right solution
ATM.


-- 

kkojima at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
      Known to fail|4.3.2                       |4.3.2 4.4.0
           Priority|P3                          |P4
   Last reconfirmed|0000-00-00 00:00:00         |2008-12-25 03:38:20
               date|                            |
            Summary|[4.3 Regression] sh gcc     |[4.3/4.4 Regression] sh gcc
                   |unable to spill register    |unable to spill register
                   |when building ghostscript-  |when building ghostscript-
                   |gpl with -O2                |gpl with -O2


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


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

* [Bug target/38621] [4.3/4.4 Regression] sh gcc unable to spill register when building ghostscript-gpl with -O2
  2008-12-24 14:59 [Bug target/38621] New: [4.3 Regression] sh gcc unable to spill register when building ghostscript-gpl vapier at gentoo dot org
                   ` (2 preceding siblings ...)
  2008-12-25  3:40 ` [Bug target/38621] [4.3/4.4 " kkojima at gcc dot gnu dot org
@ 2009-01-01  5:14 ` pinskia at gcc dot gnu dot org
  2009-01-11  1:29 ` kkojima at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-01-01  5:14 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.3.3


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


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

* [Bug target/38621] [4.3/4.4 Regression] sh gcc unable to spill register when building ghostscript-gpl with -O2
  2008-12-24 14:59 [Bug target/38621] New: [4.3 Regression] sh gcc unable to spill register when building ghostscript-gpl vapier at gentoo dot org
                   ` (3 preceding siblings ...)
  2009-01-01  5:14 ` pinskia at gcc dot gnu dot org
@ 2009-01-11  1:29 ` kkojima at gcc dot gnu dot org
  2009-01-24 10:40 ` rguenth at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: kkojima at gcc dot gnu dot org @ 2009-01-11  1:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from kkojima at gcc dot gnu dot org  2009-01-11 01:29 -------
*** Bug 38793 has been marked as a duplicate of this bug. ***


-- 

kkojima at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |masaki dot chikama at gmail
                   |                            |dot com


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


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

* [Bug target/38621] [4.3/4.4 Regression] sh gcc unable to spill register when building ghostscript-gpl with -O2
  2008-12-24 14:59 [Bug target/38621] New: [4.3 Regression] sh gcc unable to spill register when building ghostscript-gpl vapier at gentoo dot org
                   ` (4 preceding siblings ...)
  2009-01-11  1:29 ` kkojima at gcc dot gnu dot org
@ 2009-01-24 10:40 ` rguenth at gcc dot gnu dot org
  2009-08-04 12:45 ` [Bug target/38621] [4.3/4.4/4.5 " rguenth at gcc dot gnu dot org
  2010-05-22 18:31 ` [Bug target/38621] [4.3/4.4/4.5/4.6 " rguenth at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-01-24 10:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from rguenth at gcc dot gnu dot org  2009-01-24 10:21 -------
GCC 4.3.3 is being released, adjusting target milestone.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.3.3                       |4.3.4


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


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

* [Bug target/38621] [4.3/4.4/4.5 Regression] sh gcc unable to spill register when building ghostscript-gpl with -O2
  2008-12-24 14:59 [Bug target/38621] New: [4.3 Regression] sh gcc unable to spill register when building ghostscript-gpl vapier at gentoo dot org
                   ` (5 preceding siblings ...)
  2009-01-24 10:40 ` rguenth at gcc dot gnu dot org
@ 2009-08-04 12:45 ` rguenth at gcc dot gnu dot org
  2010-05-22 18:31 ` [Bug target/38621] [4.3/4.4/4.5/4.6 " rguenth at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-08-04 12:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from rguenth at gcc dot gnu dot org  2009-08-04 12:29 -------
GCC 4.3.4 is being released, adjusting target milestone.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.3.4                       |4.3.5


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


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

* [Bug target/38621] [4.3/4.4/4.5/4.6 Regression] sh gcc unable to spill register when building ghostscript-gpl with -O2
  2008-12-24 14:59 [Bug target/38621] New: [4.3 Regression] sh gcc unable to spill register when building ghostscript-gpl vapier at gentoo dot org
                   ` (6 preceding siblings ...)
  2009-08-04 12:45 ` [Bug target/38621] [4.3/4.4/4.5 " rguenth at gcc dot gnu dot org
@ 2010-05-22 18:31 ` rguenth at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-05-22 18:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from rguenth at gcc dot gnu dot org  2010-05-22 18:13 -------
GCC 4.3.5 is being released, adjusting target milestone.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.3.5                       |4.3.6


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


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

end of thread, other threads:[~2010-05-22 18:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-24 14:59 [Bug target/38621] New: [4.3 Regression] sh gcc unable to spill register when building ghostscript-gpl vapier at gentoo dot org
2008-12-24 15:00 ` [Bug target/38621] " vapier at gentoo dot org
2008-12-24 15:03 ` [Bug target/38621] [4.3 Regression] sh gcc unable to spill register when building ghostscript-gpl with -O2 vapier at gentoo dot org
2008-12-25  3:40 ` [Bug target/38621] [4.3/4.4 " kkojima at gcc dot gnu dot org
2009-01-01  5:14 ` pinskia at gcc dot gnu dot org
2009-01-11  1:29 ` kkojima at gcc dot gnu dot org
2009-01-24 10:40 ` rguenth at gcc dot gnu dot org
2009-08-04 12:45 ` [Bug target/38621] [4.3/4.4/4.5 " rguenth at gcc dot gnu dot org
2010-05-22 18:31 ` [Bug target/38621] [4.3/4.4/4.5/4.6 " rguenth 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).