Hi, I have found another bug for the m6812 front end, the error is: -> SNS.cpp: In member function `void a::d()': -> SNS.cpp:15: error: unable to find a register to spill in class `A_OR_SP_REGS' -> SNS.cpp:15: error: this is the insn: -> (insn 14 13 15 0 0xb7dca6b4 (parallel [ -> (set (reg:SI 56) -> (ashift:SI (reg:SI 56) -> (subreg:HI (mem/s/j:QI (mem/s/j:HI (plus:HI (reg/v/u/f:HI 53) -> (const_int 1 [0x1])) [0 <variable>.e+0 S2 A8]) [0 <variable>.b+0 S1 A8]) 0))) -> (clobber (scratch:HI)) -> ]) 115 {*ashlsi3} (insn_list 3 (insn_list 13 (nil))) -> (expr_list:REG_DEAD (reg/v/u/f:HI 53) -> (expr_list:REG_UNUSED (scratch:HI) -> (nil)))) -> SNS.cpp:15: confused by earlier errors, bailing out
the source for SNS.cpp is: -> class a -> { -> public: -> char b; -> void d(); -> a *e; -> }; -> -> static short f; -> -> void -> a::d() -> { -> f &= 0x1UL << e->b; -> } I know this test program doesn't make sense but it does cause the same error as a real (complicated) program. The '&=' operator in "f &= 0x1UL << e->b;" can be replaced, the following operators cause the error: |= &= ^= -= the file compiles fine with these operators: += *= /= %= If I change 0x1UL to 0x1U, there is not a problem. If I don't use -mshort (makes ints 2 bytes) there isn't a problem either, this doesn't make much sense because I have no ints. I find it very curious that '+=' works but '-=' does not, the only difference in the rtl dump is "plus" is replaced with "minus". Also if I replace: -> f -= 0x1UL << e->b; with: -> long g = e->b; // must be long -> f -= 0x1UL << g; the error goes away also. I have looked in the machine description language, but I am looking for more hints. Thanks, Sean