This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
target/9929: ICE when compiling innocent function
- From: gabor at mac dot com
- To: gcc-gnats at gcc dot gnu dot org
- Date: 4 Mar 2003 00:25:38 -0000
- Subject: target/9929: ICE when compiling innocent function
- Reply-to: gabor at mac dot com
>Number: 9929
>Category: target
>Synopsis: ICE when compiling innocent function
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: ice-on-legal-code
>Submitter-Id: net
>Arrival-Date: Tue Mar 04 00:26:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Gabor Greif
>Release: gcc version 3.4 20030303 (experimental)
>Organization:
>Environment:
Linux cantor 2.2.20 #1 Sat Apr 20 11:45:28 EST 2002 i686 unknown
>Description:
When compiling the below self-contained snippet I get
gabor at cantor:~/gd-184/build$ gcc -O2 -fomit-frame-pointer -fno-strict-aliasing -c ICE3.c -fPIC -DPIC -o .libs/func.lo2
ICE3.c: In function `general_rep_setter_FUN':
ICE3.c:54: error: unable to find a register to spill in class `GENERAL_REGS'
ICE3.c:54: error: this is the insn:
(insn:HI 47 92 49 1 0x4013e318 (set (mem/s:DI (plus:SI (subreg:SI (reg/v:DI 66 [ L_instance ]) 0)
(subreg:SI (reg/v:DI 67 [ L_posn ]) 4)) [0 S8 A32])
(reg/v:DI 65 [ L_new_value ])) 60 {*movdi_2} (nil)
(expr_list:REG_DEAD (reg/v:DI 66 [ L_instance ])
(expr_list:REG_DEAD (reg/v:DI 67 [ L_posn ])
(nil))))
ICE3.c:54: internal compiler error: in spill_failure, at reload1.c:1917
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
The code is coming from a Dylan->C compiler, somewhat simplified here. It is not handwritten code.
------------------------------------------
typedef struct heapobj *heapptr_t;
typedef struct descriptor {
heapptr_t heapptr;
union {
long l;
float f;
void *ptr;
} dataword;
} descriptor_t;
extern descriptor_t find_slot_offset_METH(descriptor_t *orig_sp, heapptr_t A0, heapptr_t A1, heapptr_t A2);
extern void uninitialized_slot_error_FUN(descriptor_t *orig_sp, heapptr_t A0, descriptor_t A1);
extern struct heapobj dylanZempty_list_ROOT;
extern struct heapobj SYM_data_word_HEAP;
extern struct heapobj CLS_integer_HEAP;
extern struct heapobj dylanZstr_ROOT_230;
descriptor_t * general_rep_setter_FUN(descriptor_t *orig_sp, heapptr_t A_self, long A1, heapptr_t A2)
{
descriptor_t *cluster_0_top;
void * L_arg_ptr;
descriptor_t L_new_value;
descriptor_t L_instance;
descriptor_t L_posn;
descriptor_t L_temp;
descriptor_t L_temp_2;
L_arg_ptr = ((void *)(orig_sp - 2));
L_new_value = (((descriptor_t *)L_arg_ptr)[0]);
L_instance = (((descriptor_t *)L_arg_ptr)[1]);
orig_sp = L_arg_ptr;
L_posn = find_slot_offset_METH(orig_sp, (*(heapptr_t *)((char *)L_instance.heapptr + 0)), (*(heapptr_t *)((char *)A_self + 36)), &dylanZempty_list_ROOT);
if ((&CLS_integer_HEAP == (*(heapptr_t *)((char *)L_posn.heapptr + 0)))) {
(*(descriptor_t *)((char *)L_instance.heapptr + L_posn.dataword.l)) = L_new_value;
orig_sp[0] = L_new_value;
return orig_sp + 1;
}
else {
L_temp.heapptr = &SYM_data_word_HEAP;
L_temp.dataword.l = 0;
L_temp_2.heapptr = &dylanZstr_ROOT_230;
L_temp_2.dataword.l = 0;
type_error_with_location_FUN(orig_sp, L_temp, &CLS_integer_HEAP, L_temp_2);
not_reached();
}
}
>How-To-Repeat:
Just compile the snippet.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: