public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/42295]  New: ICE: 'error: unable to find a register to spill in class "AREG"' with -fschedule-insns
@ 2009-12-05  1:55 zsojka at seznam dot cz
  2009-12-05  1:56 ` [Bug rtl-optimization/42295] " zsojka at seznam dot cz
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: zsojka at seznam dot cz @ 2009-12-05  1:55 UTC (permalink / raw)
  To: gcc-bugs

Command line:
for 4.5/trunk:
g++-4.5 -O1 -fschedule-insns -fselective-scheduling -o tmp.o testcase-manual.ii
-c
for 4.4 can be used as well:
g++-4.4 -O1 -fschedule-insns -o tmp.o testcase-manual.ii -c

Gives (trunk r154953):
testcase-manual.ii: In function ‘void testsum(ms*)’:
testcase-manual.ii:20:1: error: unable to find a register to spill in class
‘AREG’
testcase-manual.ii:20:1: error: this is the insn:
(insn 26 24 27 2 testcase-manual.ii:16 (parallel [
            (set (reg:SI 5 di [83])
                (div:SI (reg:SI 5 di [orig:82 a_2(D)->n ] [82])
                    (reg:SI 2 cx [85])))
            (set (reg:SI 1 dx [84])
                (mod:SI (reg:SI 5 di [orig:82 a_2(D)->n ] [82])
                    (reg:SI 2 cx [85])))
            (clobber (reg:CC 17 flags))
        ]) 352 {*divmodsi4} (expr_list:REG_DEAD (reg:SI 2 cx [85])
        (expr_list:REG_DEAD (reg:SI 5 di [orig:82 a_2(D)->n ] [82])
            (expr_list:REG_UNUSED (reg:SI 1 dx [84])
                (expr_list:REG_UNUSED (reg:CC 17 flags)
                    (nil))))))
testcase-manual.ii:20:1: internal compiler error: in spill_failure, at
reload1.c:2141
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Tested versions:
trunk r154953 crash
trunk r154886 crash
trunk r154830 crash
trunk r153685 crash
4.4 r154975 crash
4.4 r154724 crash
4.4 r154216 crash
4.4.2 (gentoo) crash
4.3.4 4.2.4 4.1.2 3.4.6 3.3.6 (all gentoo) OK


Full output:
$ /mnt/svn/gcc-trunk/binary-154953-lto/bin/g++ -O1 -fschedule-insns
-fselective-scheduling -o tmp.o testcase-manual.ii -c -v
Using built-in specs.
COLLECT_GCC=/mnt/svn/gcc-trunk/binary-154953-lto/bin/g++
COLLECT_LTO_WRAPPER=/mnt/svn/gcc-trunk/binary-154953-lto/libexec/gcc/x86_64-unknown-linux-gnu/4.5.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --enable-languages=c,c++,lto
--prefix=/mnt/svn/gcc-trunk/binary-154953-lto
Thread model: posix
gcc version 4.5.0 20091203 (experimental) (GCC)
COLLECT_GCC_OPTIONS='-O1' '-fschedule-insns' '-fselective-scheduling' '-o'
'tmp.o' '-c' '-v' '-shared-libgcc' '-mtune=generic'

/mnt/svn/gcc-trunk/binary-154953-lto/libexec/gcc/x86_64-unknown-linux-gnu/4.5.0/cc1plus
-fpreprocessed testcase-manual.ii -quiet -dumpbase testcase-manual.ii
-mtune=generic -auxbase-strip tmp.o -O1 -version -fschedule-insns
-fselective-scheduling -o /tmp/ccpvVv5N.s
GNU C++ (GCC) version 4.5.0 20091203 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.5.0 20091203 (experimental), GMP version
4.3.1, MPFR version 2.4.1-p5, MPC version 0.8
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C++ (GCC) version 4.5.0 20091203 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.5.0 20091203 (experimental), GMP version
4.3.1, MPFR version 2.4.1-p5, MPC version 0.8
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 4b09d9924550b4f9676aafda3b16134c
testcase-manual.ii: In function &#8216;void testsum(ms*)&#8217;:
testcase-manual.ii:20:1: error: unable to find a register to spill in class
&#8216;AREG&#8217;
testcase-manual.ii:20:1: error: this is the insn:
(insn 26 24 27 2 testcase-manual.ii:16 (parallel [
            (set (reg:SI 5 di [83])
                (div:SI (reg:SI 5 di [orig:82 a_2(D)->n ] [82])
                    (reg:SI 2 cx [85])))
            (set (reg:SI 1 dx [84])
                (mod:SI (reg:SI 5 di [orig:82 a_2(D)->n ] [82])
                    (reg:SI 2 cx [85])))
            (clobber (reg:CC 17 flags))
        ]) 352 {*divmodsi4} (expr_list:REG_DEAD (reg:SI 2 cx [85])
        (expr_list:REG_DEAD (reg:SI 5 di [orig:82 a_2(D)->n ] [82])
            (expr_list:REG_UNUSED (reg:SI 1 dx [84])
                (expr_list:REG_UNUSED (reg:CC 17 flags)
                    (nil))))))
testcase-manual.ii:20:1: internal compiler error: in spill_failure, at
reload1.c:2141
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


-- 
           Summary: ICE: 'error: unable to find a register to spill in class
                    "AREG"' with -fschedule-insns
           Product: gcc
           Version: 4.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: zsojka at seznam dot cz
  GCC host triplet: x86_64-pc-linux-gnu


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


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

* [Bug rtl-optimization/42295] ICE: 'error: unable to find a register to spill in class "AREG"' with -fschedule-insns
  2009-12-05  1:55 [Bug rtl-optimization/42295] New: ICE: 'error: unable to find a register to spill in class "AREG"' with -fschedule-insns zsojka at seznam dot cz
@ 2009-12-05  1:56 ` zsojka at seznam dot cz
  2009-12-07 11:17 ` [Bug target/42295] " rguenth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: zsojka at seznam dot cz @ 2009-12-05  1:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from zsojka at seznam dot cz  2009-12-05 01:55 -------
Created an attachment (id=19234)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19234&action=view)
somehow reduced testcase


-- 


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


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

* [Bug target/42295] ICE: 'error: unable to find a register to spill in class "AREG"' with -fschedule-insns
  2009-12-05  1:55 [Bug rtl-optimization/42295] New: ICE: 'error: unable to find a register to spill in class "AREG"' with -fschedule-insns zsojka at seznam dot cz
  2009-12-05  1:56 ` [Bug rtl-optimization/42295] " zsojka at seznam dot cz
@ 2009-12-07 11:17 ` rguenth at gcc dot gnu dot org
  2009-12-07 15:33 ` zsojka at seznam dot cz
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-12-07 11:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2009-12-07 11:17 -------
-fschedule-insns is quite tricky for x86 targets, if it doesn't work do not use
it.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|rtl-optimization            |target
 GCC target triplet|                            |x86_64-*-*


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


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

* [Bug target/42295] ICE: 'error: unable to find a register to spill in class "AREG"' with -fschedule-insns
  2009-12-05  1:55 [Bug rtl-optimization/42295] New: ICE: 'error: unable to find a register to spill in class "AREG"' with -fschedule-insns zsojka at seznam dot cz
  2009-12-05  1:56 ` [Bug rtl-optimization/42295] " zsojka at seznam dot cz
  2009-12-07 11:17 ` [Bug target/42295] " rguenth at gcc dot gnu dot org
@ 2009-12-07 15:33 ` zsojka at seznam dot cz
  2009-12-16 22:01 ` zsojka at seznam dot cz
  2010-01-14 11:32 ` abel at gcc dot gnu dot org
  4 siblings, 0 replies; 10+ messages in thread
From: zsojka at seznam dot cz @ 2009-12-07 15:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from zsojka at seznam dot cz  2009-12-07 15:33 -------
This testcase (the call to f() isn't needed in this case) crashes with 4.4 with
these flags as well:
-O3 -fselective-scheduling2 -fsel-sched-pipelining
-fsel-sched-pipelining-outer-loops
(-O2 is enough for trunk)

The crash message is:
testcase-manual.ii: In function &#8216;void testsum(ms*)&#8217;:
testcase-manual.ii:20: internal compiler error: in init_seqno, at
sel-sched.c:6433 (sel-sched.c:6722 for trunk)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Is this the same issue, or should I open separate bug report? (eg.
-fselective-scheduling2 is not expected to always work on x86_64 as well)


-- 


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


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

* [Bug target/42295] ICE: 'error: unable to find a register to spill in class "AREG"' with -fschedule-insns
  2009-12-05  1:55 [Bug rtl-optimization/42295] New: ICE: 'error: unable to find a register to spill in class "AREG"' with -fschedule-insns zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2009-12-07 15:33 ` zsojka at seznam dot cz
@ 2009-12-16 22:01 ` zsojka at seznam dot cz
  2010-01-14 11:32 ` abel at gcc dot gnu dot org
  4 siblings, 0 replies; 10+ messages in thread
From: zsojka at seznam dot cz @ 2009-12-16 22:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from zsojka at seznam dot cz  2009-12-16 22:01 -------
Created an attachment (id=19330)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19330&action=view)
simplified testcase

(testcase from comment#3 turned out to be a dup of pr39453)


-- 

zsojka at seznam dot cz changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #19234|0                           |1
        is obsolete|                            |


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


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

* [Bug target/42295] ICE: 'error: unable to find a register to spill in class "AREG"' with -fschedule-insns
  2009-12-05  1:55 [Bug rtl-optimization/42295] New: ICE: 'error: unable to find a register to spill in class "AREG"' with -fschedule-insns zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2009-12-16 22:01 ` zsojka at seznam dot cz
@ 2010-01-14 11:32 ` abel at gcc dot gnu dot org
  4 siblings, 0 replies; 10+ messages in thread
From: abel at gcc dot gnu dot org @ 2010-01-14 11:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from abel at gcc dot gnu dot org  2010-01-14 11:32 -------
With the recent patches to sel-sched, testcases from comments #3 and #4 do not
longer fail for me.  I'm still seeing the spill failure of the original report
though.


-- 

abel at gcc dot gnu dot org changed:

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


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


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

* [Bug target/42295] ICE: 'error: unable to find a register to spill in class "AREG"' with -fschedule-insns
       [not found] <bug-42295-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2012-09-02  7:08 ` uros at gcc dot gnu.org
@ 2012-09-02  7:14 ` ubizjak at gmail dot com
  3 siblings, 0 replies; 10+ messages in thread
From: ubizjak at gmail dot com @ 2012-09-02  7:14 UTC (permalink / raw)
  To: gcc-bugs

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

Uros Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
      Known to work|                            |4.6.3, 4.7.1
         Resolution|                            |FIXED
   Target Milestone|---                         |4.8.0

--- Comment #9 from Uros Bizjak <ubizjak at gmail dot com> 2012-09-02 07:13:53 UTC ---
Closed as fixed in 4.8.0.


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

* [Bug target/42295] ICE: 'error: unable to find a register to spill in class "AREG"' with -fschedule-insns
       [not found] <bug-42295-4@http.gcc.gnu.org/bugzilla/>
  2012-09-01 21:25 ` ubizjak at gmail dot com
  2012-09-01 22:19 ` dominiq at lps dot ens.fr
@ 2012-09-02  7:08 ` uros at gcc dot gnu.org
  2012-09-02  7:14 ` ubizjak at gmail dot com
  3 siblings, 0 replies; 10+ messages in thread
From: uros at gcc dot gnu.org @ 2012-09-02  7:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from uros at gcc dot gnu.org 2012-09-02 07:07:50 UTC ---
Author: uros
Date: Sun Sep  2 07:07:45 2012
New Revision: 190854

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190854
Log:
    PR target/42295
    * g++.dg/opt/pr42295.C: New test.


Added:
    trunk/gcc/testsuite/g++.dg/opt/pr42295.C
Modified:
    trunk/gcc/testsuite/ChangeLog


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

* [Bug target/42295] ICE: 'error: unable to find a register to spill in class "AREG"' with -fschedule-insns
       [not found] <bug-42295-4@http.gcc.gnu.org/bugzilla/>
  2012-09-01 21:25 ` ubizjak at gmail dot com
@ 2012-09-01 22:19 ` dominiq at lps dot ens.fr
  2012-09-02  7:08 ` uros at gcc dot gnu.org
  2012-09-02  7:14 ` ubizjak at gmail dot com
  3 siblings, 0 replies; 10+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-09-01 22:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-09-01 22:19:09 UTC ---
> All testcases compile OK for me with recent mainline.

For me too with 4.6.3, 4.7.1, and trunk. I get the ICE with 4.4.6 and 4.5.3.


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

* [Bug target/42295] ICE: 'error: unable to find a register to spill in class "AREG"' with -fschedule-insns
       [not found] <bug-42295-4@http.gcc.gnu.org/bugzilla/>
@ 2012-09-01 21:25 ` ubizjak at gmail dot com
  2012-09-01 22:19 ` dominiq at lps dot ens.fr
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: ubizjak at gmail dot com @ 2012-09-01 21:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Uros Bizjak <ubizjak at gmail dot com> 2012-09-01 21:25:35 UTC ---
All testcases compile OK for me with recent mainline.


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

end of thread, other threads:[~2012-09-02  7:14 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-05  1:55 [Bug rtl-optimization/42295] New: ICE: 'error: unable to find a register to spill in class "AREG"' with -fschedule-insns zsojka at seznam dot cz
2009-12-05  1:56 ` [Bug rtl-optimization/42295] " zsojka at seznam dot cz
2009-12-07 11:17 ` [Bug target/42295] " rguenth at gcc dot gnu dot org
2009-12-07 15:33 ` zsojka at seznam dot cz
2009-12-16 22:01 ` zsojka at seznam dot cz
2010-01-14 11:32 ` abel at gcc dot gnu dot org
     [not found] <bug-42295-4@http.gcc.gnu.org/bugzilla/>
2012-09-01 21:25 ` ubizjak at gmail dot com
2012-09-01 22:19 ` dominiq at lps dot ens.fr
2012-09-02  7:08 ` uros at gcc dot gnu.org
2012-09-02  7:14 ` ubizjak at gmail dot com

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