crtc-demos / gcc-ia16

GNU General Public License v2.0
14 stars 2 forks source link

Short __asm(...) command causes "Max. number of generated reload insns per insn is achieved (90)" #1

Closed tkchia closed 5 years ago

tkchia commented 7 years ago

Under gcc-ia16 2016.11-64, the program

int main(void)
{
  unsigned char v;
  __asm __volatile("" : "=g" (v) : "0" ((unsigned char)0));
  return (int)v;
}

gives the error

foo.c: In function 'main':
foo.c:6:1: internal compiler error: Max. number of generated reload insns per insn is achieved (90)

 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://sourcery.mentor.com/GNUToolchain/> for instructions.

This happens even if I compile with optimizations off (ia16-elf-gcc -S -O0 foo.c).

If I use "=rm" rather than "=g", the compilation succeeds.