Hey Guys,
I'm working on a gcode interpreter for the arduino and also making a library so it can be a controller for a 3axis cnc machine. I have some code and am getting an odd error that I've never seen. Here's the error message I'm getting.
CNC3AXIS.cpp: In member function 'void CNC3AXIS::moveToPosUnits(float, float, float)':
CNC3AXIS.cpp:276: error: unable to find a register to spill in class 'POINTER_REGS'
CNC3AXIS.cpp:276: error: this is the insn:
(insn 29 27 30 0 CNC3AXIS.cpp:268 (set (mem/s:SF (post_inc:HI (reg/f:HI 10 r10 [orig:41 this ] [41])) [4 <variable>.y_move_to_pos_units+0 S4 A8])
(reg/v:SF 43 [ ypos ])) 15 {*movsf} (insn_list:REG_DEP_TRUE 5 (insn_list:REG_DEP_TRUE 28 (nil)))
(expr_list:REG_INC (reg/f:HI 10 r10 [orig:41 this ] [41])
(nil)))
CNC3AXIS.cpp:276: confused by earlier errors, bailing out
Now I've found a line that if I comment i won't get that error anymore but it's not making sense to me why its happening.
I wonder if you have a control character in your file, or there is a problem in code you have not included. The code below compiled ok for me ( I had to guess at some of the types)
Its really quite odd because I have another function that is almost identical same variables and everything. The only difference is instead of multiplication its division and it has no problems.
You must have been right about the special character thing. I just rearranged the code and I'm not have any error messages now. Is there a way to see those special characters?
Sometimes a weird error message like “unable to find a register to spill in class 'POINTER_REGS'
Is a good indication that the compiler has gotten particularly confused
I have resorted to a hex editor once or twice when I have had a similar problem that I couldn't track down.
Speaking of weird error messages, my favorite error message of all time was:
“The world is coming to an end on device number 3” when I was programming a Datapoint 2200 back in the 70's. That was the only time I ever started laughing when discovering a bug in my code.