🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #5997

unable to find a reg to spill -> internal compiler error

#5997
From: Heiko Eissfeldt
Date: Wed, 25 Dec 1996 00:00
65 lines
2720 bytes


On Sun, 22 Dec 1996, Heiko Eissfeldt wrote:

At first more info on my last report (float deviations).

> Description:
> I am generating a series of floating point numbers (doubles)
> from a set of three distinct values (0, 1/3, 2/3).
> The doubles each can only have one of these three exact
> values. They are generated from one function get_real_root().
> 
> When I use -O1 and -fcaller-saves for the routine which
> _calls_ get_real_root, there are slight deviations
> (lower mantisse bits) in one of the values (2/3).

I found the reason of this in different precisions (80 bit
in the FPU and 64 bit when a double is retrieved from memory).
Thus comparisons are not exact.

It seems to be too expensive to reduce 80 bit to 64 bit when
doing mixed comparisons (FPU reg versus a double from memory)?
A warning would be nice, then :-)

Don't you think this behavior may violate ANSI-C?

Workarounds can be

 use long double instead of double (avoid 64 bit)
 use volatile for doubles otherwise kept in the FPU
 don't use -fcaller-saves

===== Now for another gcc bug report =====

I get this for gcc 2.7.2 and gcc 2.7.2.1 on GNU/Linux-Intel.
Since I do not use assembly, I think you might be interested in
this report.

gcc -O6 -Wall "-DDBL=long double" -c test_solver.c -o test_solver.o
test_solver.c: In function `check_solver':
test_solver.c:239: Unable to find a register to spill.
(insn/i:QI 112 109 113 (parallel[
            (set (mem:XF (pre_dec:SI (reg:SI 7 %esp)))
                (mem/s:XF (plus:SI (reg:SI 294)
                        (reg/v:SI 26))))
            (clobber (reg:SI 0 %eax))
            (clobber (reg:SI 1 %edx))
        ] ) 79 {movxf_push} (nil)
    (expr_list:REG_UNUSED (reg:SI 0 %eax)
        (expr_list:REG_UNUSED (reg:SI 1 %edx)
            (nil))))
gcc: Internal compiler error: program cc1 got fatal signal 6
make: *** [test_solver] Error 1


The sources follow.

Best regards, Heiko Eissfeldt
-------------------------cut here---------------------------
begin 644 gcc_int_err.tar.gz
<uuencoded_portion_removed>
1:W?MKOW'M'\!V_;.?`!0``#O
`
end
Technical Details
Message-ID: <Pine.LNX.3.91.961225013428.261B-100000@colossus.escape.de>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 113d02,1b5ee78f3b830e12,start
X-Google-Attributes: gid113d02,public
From: heiko@colossus.escape.de (Heiko Eissfeldt)
Subject: unable to find a reg to spill -> internal compiler error
Date: 1996/12/25
Message-ID: <Pine.LNX.3.91.961225013428.261B-100000@colossus.escape.de>
X-Deja-AN: 205855542
sender: bug-gcc-request@prep.ai.mit.edu
x-gateway: relay6.UU.NET from bug-gcc to gnu.gcc.bug; Tue, 24 Dec 1996 20:40:58 EST
content-type: TEXT/PLAIN; charset=US-ASCII
mime-version: 1.0
newsgroups: gnu.gcc.bug