https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66358
--- Comment #17 from David Binderman <dcb314 at hotmail dot com> --- I had a go at cross compiling Linux kernel for sh, and got something similar with gcc 5.1.1 dated 20150618 $ sh-linux-gnu-gcc -c -O2 bug224.c drivers/hwmon/w83627ehf.c: In function ‘show_caseopen’: drivers/hwmon/w83627ehf.c:1774:1: error: insn does not satisfy its constraints: (insn 135 111 136 2 (set:SI (reg:SI 1 r1) (sign_extend:SI (mem:QI (plus:SI (reg/f:SI 8 r8 [175]) (const_int 12 [0xc])) [0 MEM[(struct sensor_device_attribute_2 *)attr_6(D)].index+0 S1 A32]))) drivers/hwmon/w83627ehf.c:1772 231 {*extendqisi2_compact_mem_disp} (nil)) drivers/hwmon/w83627ehf.c:1774:1: internal compiler error: in extract_constrain_insn, at recog.c:2246 Problem seems to go away when I add flag -mlra, so I have a workaround. Test case attached.