c/4495: GCC fails with an ICE compiling a mixed C/asm function which uses the FPU on an x86
alex-sly@mtu-net.ru
alex-sly@mtu-net.ru
Sun Oct 7 04:56:00 GMT 2001
>Number: 4495
>Category: c
>Synopsis: GCC fails with an ICE compiling a mixed C/asm function which uses the FPU on an x86
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: ice-on-legal-code
>Submitter-Id: net
>Arrival-Date: Sun Oct 07 04:56:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Alexander Svadkovsky
>Release: gcc version 3.0.1
>Organization:
>Environment:
Linux 2.4.10 on an i686(Pentium II), Glibc 2.2.4, GCC 3.0.1
is installed as a main compiler
>Description:
I've tried to build asmutils 0.15 ( http://linuxassembly.org/asmutils.html )
GCC died with an ICE compiling lib/libm.c.
I've extracted a snippet of code which triggers the bug from that file.
Gcc dies compiling it with the following error:
test3.c: In function `test':
test3.c:22: Internal compiler error in replace_reg, at reg-stack.c:816
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL: http://www.gnu.org/software/gcc/bugs.html > for instructions.
>How-To-Repeat:
# 12 "test3.c"
float test(float x, float y)
{
register float ret;
asm("1:\n"
" fprem\n"
" fstsw %%ax\n"
" sahf\n"
" jp 1b\n"
: "=t"(ret): "u"(y), "0"(x): "eax","st");
return ret;
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list