Bug 41164 - Unable to find spill register with -fschedule-insns
Summary: Unable to find spill register with -fschedule-insns
Status: RESOLVED DUPLICATE of bug 24319
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-25 14:38 UTC by lucier
Modified: 2009-08-27 17:33 UTC (History)
6 users (show)

See Also:
Host: x86_64-unknown-linux-gnu
Target: x86_64-unknown-linux-gnu
Build: x86_64-unknown-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments
test file that illustrates failure (1.42 KB, text/plain)
2009-08-25 14:57 UTC, lucier
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lucier 2009-08-25 14:38:30 UTC
With this compiler:

heine:~/programs/gambc-v4_5_1-devel> /pkgs/gcc-mainline/bin/gcc -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../../mainline/configure --enable-checking=release --prefix=/pkgs/gcc-mainline --enable-languages=c,c++ -enable-stage1-languages=c,c++
Thread model: posix
gcc version 4.5.0 20090803 (experimental) [trunk revision 150373] (GCC) 

with this command:

heine:~/programs/gambc-v4_5_1-devel/lib> /pkgs/gcc-mainline/bin/gcc -fschedule-insns -Wno-unused -O1 -fno-math-errno -fschedule-insns2 -fno-trapping-math -fno-strict-aliasing -fwrapv -fomit-frame-pointer -fPIC -fno-common -mieee-fp -save-temps -c os_test.i


fails with this error:

os_base.c: In function ‘___os_err_code_to_string’:
os_base.c:1247:1: error: unable to find a register to spill in class ‘DREG’
os_base.c:1247:1: error: this is the insn:
(insn 264 280 266 41 os_test.i:158 (parallel [
            (set (reg:SI 37 r8 [133])
                (truncate:SI (lshiftrt:DI (mult:DI (sign_extend:DI (reg:SI 2 cx [130]))
                            (sign_extend:DI (reg:SI 6 bp [185])))
                        (const_int 32 [0x20]))))
            (clobber (scratch:SI))
            (clobber (reg:CC 17 flags))
        ]) 347 {*smulsi3_highpart_insn} (expr_list:REG_UNUSED (reg:CC 17 flags)
        (expr_list:REG_EQUAL (truncate:SI (lshiftrt:DI (mult:DI (sign_extend:DI (reg:SI 2 cx [130]))
                        (const_int 1717986919 [0x66666667]))
                    (const_int 32 [0x20])))
            (nil))))
os_base.c:1247: confused by earlier errors, bailing out

I'll add the .i file next.

What's interesting is that I get similar errors with

heine:~/programs/gambc-v4_5_1-devel/lib> gcc -v                                 Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.3.3-5ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) 

heine:~/programs/gambc-v4_5_1-devel/lib> /pkgs/gcc-4.4-branch/bin/gcc -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../../gcc-4.4-branch/configure --prefix=/pkgs/gcc-4.4-branch --enable-languages=c --enable-checking=release --disable-multilib
Thread model: posix
gcc version 4.4.1 20090522 (prerelease) (GCC) 

and

heine:~/programs/gambc-v4_5_1-devel/lib> /pkgs/gcc-4.2.4/bin/gcc -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../../gcc-4.2.4/configure --prefix=/pkgs/gcc-4.2.4 --enable-languages=c --enable-checking=release --disable-multilib
Thread model: posix
gcc version 4.2.4
Comment 1 lucier 2009-08-25 14:57:45 UTC
Created attachment 18423 [details]
test file that illustrates failure
Comment 2 Uroš Bizjak 2009-08-27 17:33:26 UTC
Duplicate of PR24319.

*** This bug has been marked as a duplicate of 24319 ***