"Tomas Svensson" <[EMAIL PROTECTED]> writes: > I am still porting gcc v4.1.2 to a new risc architecture, and this > time my problem is that when compiling with -O2 turned on, every insn > with a (use ..) side effect expression, eg. > > (define_expand "sibcall" > [(parallel [(call (match_operand 0 "" "") > (match_operand 1 "" "")) > (use (match_operand 2 "" "")) > (use (match_operand 3 "" ""))])] > "TARGET_SIBCALL" > { > if (operands[3] == NULL_RTX) > operands[3] = const0_rtx; > > internal_expand_sibcall (0, XEXP (operands[0], 0), operands[1]); > DONE; > }) > > causes the compiler to fail with an internal compiler error in add_clobbers. > > I have looked at it in gdb and it fails on reaching the > gcc_unreachable() in add_clobbers, which happens because add_clobbers > is called (at combine.c:9576) with an insn_code_number that it does > not recognize. > > Everything works fine when optimization is turned off. What is it that > gcc does differently when optimizing, that might cause this to happen?
Sounds like your insn is not recognized. That means that there is no define_insn in your MD file which matches the insn you are generating. Note that the pattern you show for the define_expand is documentation only; because your code inclues DONE, the pattern is not actually used. You didn't show which insn was actually generated. Most likely there is no define_insn for that insn. Ian