This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ICE in bitmap routines with LRA and inline assembly language

I was wondering if anyone has seen this bug involving LRA and inline
assembly code.  On MIPS, I am getting the attached ICE.  Somehow
the 'first' pointer in the live_reload_and_inheritance_pseudos bitmap
structure is either getting clobbered or is not being correctly
initialized to begin with.  I am not sure which yet.

Steve Ellcey

% cat x.c
int NoBarrier_AtomicIncrement(volatile int* ptr, int increment) {
  int temp, temp2;
  __asm__ __volatile__(".set push\n"
                       ".set noreorder\n"
                       "ll %0, 0(%3)\n"
                       "addu %1, %0, %2\n"
                       "sc %1, 0(%3)\n"
                       "beqz %1, 1b\n"
                       "addu %1, %0, %2\n"
                       ".set pop\n"
                       : "=&r" (temp), "=&r" (temp2)
                       : "Ir" (increment), "r" (ptr)
                       : "memory");
  return temp2;

% mips-mti-linux-gnu-gcc -O1 -c x.c
x.c: In function 'NoBarrier_AtomicIncrement':
x.c:16:1: internal compiler error: Segmentation fault
0x9b199f crash_signal
0x5d3950 bitmap_element_link
0x5d3950 bitmap_set_bit(bitmap_head*, int)
0x87c370 init_live_reload_and_inheritance_pseudos
0x87c370 lra_assign()
0x877966 lra(_IO_FILE*)
0x8337de do_reload
0x8337de execute
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <> for instructions.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]