Created attachment 28461 [details] Test case m32c-elf-gcc (GCC) 4.7.2 hosted on Windows XP. If I compile and run the attached program with: m32c-elf-gcc -msim -mcpu=m32c -O1 -DDATASIZE=126 stack.c m32c-elf-run a.out it works well. But if I increase DATASIZE to 127: m32c-elf-gcc -msim -mcpu=m32c -O1 -DDATASIZE=127 stack.c m32c-elf-run a.out the program crashes.
FYI this looks like an assembler bug, not a gcc bug... The "add.l #128,sp" opcode is being assembled as "add.l #-128,sp" instead.
(In reply to comment #1) > FYI this looks like an assembler bug, not a gcc bug... The "add.l #128,sp" > opcode is being assembled as "add.l #-128,sp" instead. Thank you very much. I just submitted the bug to the binutils Bugzilla (bug 14739).
Not a GCC bug -> INVALID