Bug#131890: gcc-2.95: Internal compiler error at compiling sample code.
Package: gcc-2.95
Version: 1:2.95.4-1
Severity: normal
This version of the C compiler generates an Internal Compiler Error
with the following input:
--------------------- bug.c ---------------------
enum tipo { tc_int, tc_float, tc_nulo };
struct dato_vm
{
enum tipo t;
union
{
int val;
float fval;
} u;
};
int do_bug;
int fn_do_bug( struct dato_vm d )
{
if(d.t == tc_float)
{
d.u.val = (int)d.u.fval;
d.t = tc_int;
}
return d.u.val;
}
--------------------------------------------------
The output is:
--------------------------------------------------
$ gcc -O2 -Wall bug.c -c
bug.c: In function `fn_do_bug':
bug.c:23: Internal compiler error:
bug.c:23: Unable to generate reloads for:
(insn 16 14 19 (parallel[
(set (subreg:SI (reg/v:DI 0 %eax) 1)
(fix:SI (fix:SF (subreg:SF (reg/v:DI 0 %eax) 1))))
(clobber (mem:HI (plus:SI (reg:SI 6 %ebp)
(const_int -2 [0xfffffffe])) 0))
(clobber (mem:HI (plus:SI (reg:SI 6 %ebp)
(const_int -4 [0xfffffffc])) 0))
(clobber (mem:SI (plus:SI (reg:SI 6 %ebp)
(const_int -8 [0xfffffff8])) 0))
(clobber (scratch:HI))
] ) 145 {fix_truncsfsi2+1} (nil)
(expr_list:REG_UNUSED (scratch:HI)
(nil)))
--------------------------------------------------
Other gcc versions don't produce this.
-- System Information
Debian Release: 3.0
Kernel Version: Linux pc2 2.4.18-pre7 #1 Thu Jan 24 12:38:39 CLST 2002 i686 unknown
Versions of the packages gcc-2.95 depends on:
ii binutils 2.11.92.0.12.3 The GNU assembler, linker and binary utiliti
ii cpp-2.95 2.95.4-1 The GNU C preprocessor.
ii gcc 2.95.4-9 The GNU C compiler.
ii libc6 2.2.4-7 GNU C Library: Shared libraries and Timezone
Reply to: