bootstrap/10229: [IA-64 HP-UX 11.22] Internal compiler error in emit_move_insn

Dara Hazeghi dhazeghi@yahoo.com
Wed May 7 17:12:00 GMT 2003


http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit- 
trail&database=gcc&pr=10229

Hello all,

I can confirm this bug on gcc 3.2.3 compiler. Removing the flag -milp32  
allows the testcase to compile successfully. Attached is a distilled  
testcase from unwind-ia64.c which crashes the compilers (taken from a  
cross build). With 3.3 cvs we crash at a different point, no matter  
what flags are used, and with mainline at a still different point also  
independent of flag. Yuck. Testcases follow.

Dara

3.2 crash.c
xtern int __sync_val_compare_and_swap_si (int *, int, int);
extern long __sync_val_compare_and_swap_di (long *, long, long);

static __inline__ int
atomic_alloc (unsigned int *mask)
{
   unsigned int old = *mask, ret, new;

   while (1)
     {
       if (old == 0)
         return -1;
       ret = old & -old;
       new = old & ~ret;
       new = ((sizeof (*(mask)) == sizeof(int)) ? (__typeof__(*(mask)))  
__sync_va
l_compare_and_swap_si((int *)(mask),(int)(old),(int)(new)) :  
(__typeof__(*(mask)
)) __sync_val_compare_and_swap_di((long  
*)(mask),(long)(old),(long)(new)));
       if (old == new)
         break;
       old = new;
     }

   return __builtin_ffs (ret) - 1;
}

crash.c: In function `atomic_alloc':
crash.c:15: Internal compiler error in emit_move_insn, at expr.c:2771

3.3 crash.c
struct _Unwind_Context
{

   unsigned long eh_data[4];

};

extern void uw_init_context_1();

void
_Unwind_RaiseException(void)
{
   struct _Unwind_Context this_context;


   uw_init_context_1 (&this_context, __builtin_ia64_bsp ());

}

crash.c: In function `_Unwind_RaiseException':
crash.ci:16: internal compiler error: in emit_move_insn, at expr.c:3144
Please submit a full bug report,
with preprocessed source if appropriate.

3.4 crash.c:
static int emergency_reg_state_free = 14;


int alloc_reg_state (void)
{
       int n = atomic_alloc (&emergency_reg_state_free);

}

crash.c:8: error: unrecognizable insn:
(insn 38 29 9 0 0x1005300 (set (reg:SI 120 r36)
         (plus:DI (reg:DI 1 r1)
             (symbol_ref:SI ("emergency_reg_state_free") [flags 0x6]  
<var_decl 0x1002e0c emergency_reg_state_free>))) -1 (nil)
     (nil))
crash.c:8: internal compiler error: in extract_insn, at recog.c:2188



More information about the Gcc-bugs mailing list