public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/35802]  New: MIPS64: Unable to find a register to spill in class ‘V1_REG’
@ 2008-04-02 14:11 aurelien at aurel32 dot net
  2008-04-02 14:13 ` [Bug c/35802] " aurelien at aurel32 dot net
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: aurelien at aurel32 dot net @ 2008-04-02 14:11 UTC (permalink / raw)
  To: gcc-bugs

I am getting a very strange ICE on a mips system when building with -mabi=n32
or -mabi=64:

testcase.i: In function ‘_IO_vfscanf_internal’:
testcase.i:2857: error: unable to find a register to spill in class
‘V1_REG’
testcase.i:2857: error: this is the insn:
(insn 1286 1241 1243 106 testcase.i:577 (set (reg:SI 19 $19 [3464])
        (unspec:SI [
                (const_int 0 [0x0])
            ] 28)) 460 {tls_get_tp_si} (expr_list:REG_EQUIV (unspec:SI [
                (const_int 0 [0x0])
            ] 28)
        (nil)))
testcase.i:2857: confused by earlier errors, bailing out

This is when trying to build glibc 2.7, file vfscanf.c. The strange part appear
when trying to reduce the testcase. I noticed that removing struct declarations
that are not use elsewhere in the file make the problem disappear. That's why
the reduced testcase is still big.

I'll attach two testcase, one unreduced, and one reduced.

With the unreduced testcase, it is possible to trigger the bug with -mabi=n32
or -mabi=64 with -O2 or -O3.

On reduce testcase, the bug is triggered exclusively with -mabi=n32 and -O2.

This is the command I used to build the file:
/usr/bin/gcc-4.3 -c -O2 -fgnu89-inline -std=gnu99 -mabi=n32 testcase-min.i


-- 
           Summary: MIPS64: Unable to find a register to spill in class
                    ‘V1_REG’
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: aurelien at aurel32 dot net
 GCC build triplet: mips64el-unknown-linux-gnu
  GCC host triplet: mips64el-unknown-linux-gnu
GCC target triplet: mips64el-unknown-linux-gnu


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


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

* [Bug c/35802] MIPS64: Unable to find a register to spill in class ‘V1_REG’
  2008-04-02 14:11 [Bug c/35802] New: MIPS64: Unable to find a register to spill in class ‘V1_REG’ aurelien at aurel32 dot net
@ 2008-04-02 14:13 ` aurelien at aurel32 dot net
  2008-04-02 14:14 ` aurelien at aurel32 dot net
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: aurelien at aurel32 dot net @ 2008-04-02 14:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from aurelien at aurel32 dot net  2008-04-02 14:13 -------
Created an attachment (id=15411)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15411&action=view)
unreduced testcase


-- 


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


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

* [Bug c/35802] MIPS64: Unable to find a register to spill in class ‘V1_REG’
  2008-04-02 14:11 [Bug c/35802] New: MIPS64: Unable to find a register to spill in class ‘V1_REG’ aurelien at aurel32 dot net
  2008-04-02 14:13 ` [Bug c/35802] " aurelien at aurel32 dot net
@ 2008-04-02 14:14 ` aurelien at aurel32 dot net
  2008-04-02 14:16 ` aurelien at aurel32 dot net
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: aurelien at aurel32 dot net @ 2008-04-02 14:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from aurelien at aurel32 dot net  2008-04-02 14:13 -------
Created an attachment (id=15412)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15412&action=view)
reduced testcase


-- 


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


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

* [Bug c/35802] MIPS64: Unable to find a register to spill in class ‘V1_REG’
  2008-04-02 14:11 [Bug c/35802] New: MIPS64: Unable to find a register to spill in class ‘V1_REG’ aurelien at aurel32 dot net
  2008-04-02 14:13 ` [Bug c/35802] " aurelien at aurel32 dot net
  2008-04-02 14:14 ` aurelien at aurel32 dot net
@ 2008-04-02 14:16 ` aurelien at aurel32 dot net
  2008-04-21  2:14 ` [Bug target/35802] " kumba at gentoo dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: aurelien at aurel32 dot net @ 2008-04-02 14:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from aurelien at aurel32 dot net  2008-04-02 14:15 -------
Also please note that the same problem exists on mips
(mips64-unknown-linux-gnu).


-- 

aurelien at aurel32 dot net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |4.3.0
      Known to work|                            |4.2.3


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


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

* [Bug target/35802] MIPS64: Unable to find a register to spill in class ‘V1_REG’
  2008-04-02 14:11 [Bug c/35802] New: MIPS64: Unable to find a register to spill in class ‘V1_REG’ aurelien at aurel32 dot net
                   ` (2 preceding siblings ...)
  2008-04-02 14:16 ` aurelien at aurel32 dot net
@ 2008-04-21  2:14 ` kumba at gentoo dot org
  2008-04-30 21:15 ` rsandifo at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: kumba at gentoo dot org @ 2008-04-21  2:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from kumba at gentoo dot org  2008-04-21 02:13 -------
Just ran into this myself, with the following error on glibc-2.7, building with
gcc-4.3.0, but on a different file:

plural-exp.c: In function '__gettext_extract_plural':
plural-exp.c:157: error: unable to find a register to spill in class 'V1_REG'
plural-exp.c:157: error: this is the insn:
(insn 80 151 161 6 ../include/ctype.h:33 (set (reg:SI 5 $5 [272])
        (unspec:SI [
                (const_int 0 [0x0])
            ] 28)) 460 {tls_get_tp_si} (expr_list:REG_EQUIV (unspec:SI [
                (const_int 0 [0x0])
            ] 28)
        (nil)))
plural-exp.c:157: confused by earlier errors, bailing out
make[2]: ***
[/usr/obj/portage/sys-libs/glibc-2.7-r2/work/build-default-mips-unknown-linux-gnu-nptl/intl/plural-exp.o]
Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory
`/usr/obj/portage/sys-libs/glibc-2.7-r2/work/glibc-2.7/intl'
make[1]: *** [intl/subdir_lib] Error 2
make[1]: Leaving directory
`/usr/obj/portage/sys-libs/glibc-2.7-r2/work/glibc-2.7'
make: *** [all] Error 2

Ideas to try?  Maybe a patch already in trunk to test?


-- 

kumba at gentoo dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kumba at gentoo dot org


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


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

* [Bug target/35802] MIPS64: Unable to find a register to spill in class ‘V1_REG’
  2008-04-02 14:11 [Bug c/35802] New: MIPS64: Unable to find a register to spill in class ‘V1_REG’ aurelien at aurel32 dot net
                   ` (3 preceding siblings ...)
  2008-04-21  2:14 ` [Bug target/35802] " kumba at gentoo dot org
@ 2008-04-30 21:15 ` rsandifo at gcc dot gnu dot org
  2008-07-09 20:04 ` rsandifo at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rsandifo at gcc dot gnu dot org @ 2008-04-30 21:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from rsandifo at gcc dot gnu dot org  2008-04-30 21:14 -------
Thanks for the report.  I'll try to take a look soon.


-- 

rsandifo at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rsandifo at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-04-30 21:14:42
               date|                            |


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


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

* [Bug target/35802] MIPS64: Unable to find a register to spill in class ‘V1_REG’
  2008-04-02 14:11 [Bug c/35802] New: MIPS64: Unable to find a register to spill in class ‘V1_REG’ aurelien at aurel32 dot net
                   ` (4 preceding siblings ...)
  2008-04-30 21:15 ` rsandifo at gcc dot gnu dot org
@ 2008-07-09 20:04 ` rsandifo at gcc dot gnu dot org
  2008-07-09 20:07 ` rsandifo at gcc dot gnu dot org
  2008-07-09 20:09 ` rsandifo at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: rsandifo at gcc dot gnu dot org @ 2008-07-09 20:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from rsandifo at gcc dot gnu dot org  2008-07-09 20:04 -------
Subject: Bug 35802

Author: rsandifo
Date: Wed Jul  9 20:03:40 2008
New Revision: 137670

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=137670
Log:
gcc/
        PR target/35802
        * config/mips/mips.h (reg_class): Remove V1_REG.
        (REG_CLASS_NAMES, REG_CLASS_CONTENTS): Update accordingly.
        * config/mips/mips.c (mips_regno_to_class): Map $3 to M16_NA_REGS
        instead of V1_REGS.
        (mips_get_tp): New function.
        (mips_legitimize_tls_address): Use it.
        * config/mips/constraints.md (v): Delete.
        * config/mips/mips.md (TLS_GET_TP_REGNUM): New constant.
        (tls_get_tp_<mode>): Allow any GPR destination and clobber $3.
        After reload, split into a move and ...
        (*tls_get_tp_<mode>_split): ...this new instruction.

gcc/testsuite/
        PR target/35802
        * gcc.target/mips/pr35802.c: New test.

Added:
    trunk/gcc/testsuite/gcc.target/mips/pr35802.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/mips/constraints.md
    trunk/gcc/config/mips/mips.c
    trunk/gcc/config/mips/mips.h
    trunk/gcc/config/mips/mips.md
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug target/35802] MIPS64: Unable to find a register to spill in class &#8216;V1_REG&#8217;
  2008-04-02 14:11 [Bug c/35802] New: MIPS64: Unable to find a register to spill in class &#8216;V1_REG&#8217; aurelien at aurel32 dot net
                   ` (5 preceding siblings ...)
  2008-07-09 20:04 ` rsandifo at gcc dot gnu dot org
@ 2008-07-09 20:07 ` rsandifo at gcc dot gnu dot org
  2008-07-09 20:09 ` rsandifo at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: rsandifo at gcc dot gnu dot org @ 2008-07-09 20:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from rsandifo at gcc dot gnu dot org  2008-07-09 20:06 -------
Subject: Bug 35802

Author: rsandifo
Date: Wed Jul  9 20:06:20 2008
New Revision: 137671

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=137671
Log:
gcc/
        PR target/35802
        * config/mips/mips.h (reg_class): Remove V1_REG.
        (REG_CLASS_NAMES, REG_CLASS_CONTENTS): Update accordingly.
        * config/mips/mips.c (mips_regno_to_class): Map $3 to M16_NA_REGS
        instead of V1_REGS.
        (mips_get_tp): New function.
        (mips_legitimize_tls_address): Use it.
        * config/mips/constraints.md (v): Delete.
        * config/mips/mips.md (TLS_GET_TP_REGNUM): New constant.
        (tls_get_tp_<mode>): Allow any GPR destination and clobber $3.
        After reload, split into a move and ...
        (*tls_get_tp_<mode>_split): ...this new instruction.

gcc/testsuite/
        PR target/35802
        * gcc.target/mips/pr35802.c: New test.

Added:
    branches/gcc-4_3-branch/gcc/testsuite/gcc.target/mips/pr35802.c
Modified:
    branches/gcc-4_3-branch/gcc/ChangeLog
    branches/gcc-4_3-branch/gcc/config/mips/constraints.md
    branches/gcc-4_3-branch/gcc/config/mips/mips.c
    branches/gcc-4_3-branch/gcc/config/mips/mips.h
    branches/gcc-4_3-branch/gcc/config/mips/mips.md
    branches/gcc-4_3-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug target/35802] MIPS64: Unable to find a register to spill in class &#8216;V1_REG&#8217;
  2008-04-02 14:11 [Bug c/35802] New: MIPS64: Unable to find a register to spill in class &#8216;V1_REG&#8217; aurelien at aurel32 dot net
                   ` (6 preceding siblings ...)
  2008-07-09 20:07 ` rsandifo at gcc dot gnu dot org
@ 2008-07-09 20:09 ` rsandifo at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: rsandifo at gcc dot gnu dot org @ 2008-07-09 20:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from rsandifo at gcc dot gnu dot org  2008-07-09 20:08 -------
Patch applied.


-- 

rsandifo at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.3.2


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


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

end of thread, other threads:[~2008-07-09 20:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-02 14:11 [Bug c/35802] New: MIPS64: Unable to find a register to spill in class &#8216;V1_REG&#8217; aurelien at aurel32 dot net
2008-04-02 14:13 ` [Bug c/35802] " aurelien at aurel32 dot net
2008-04-02 14:14 ` aurelien at aurel32 dot net
2008-04-02 14:16 ` aurelien at aurel32 dot net
2008-04-21  2:14 ` [Bug target/35802] " kumba at gentoo dot org
2008-04-30 21:15 ` rsandifo at gcc dot gnu dot org
2008-07-09 20:04 ` rsandifo at gcc dot gnu dot org
2008-07-09 20:07 ` rsandifo at gcc dot gnu dot org
2008-07-09 20:09 ` rsandifo 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).