https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70416

--- Comment #12 from Kazumoto Kojima <kkojima at gcc dot gnu.org> ---
Created attachment 38105
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38105&action=edit
reduced test case for -O2 -fpic

reload1.c:reload_as_needed function generates the error message with
error_for_asm when checking if reload insns are valid.  The problematic
reload insn is:

(gdb) fr 1
#1  0x08636702 in reload_as_needed (live_known=live_known@entry=1)
    at ../../ORIG/trunk/gcc/reload1.c:4698
4698                                         "impossible reload");
(gdb) call debug_rtx(p) 
(insn 516 508 510 18 (set (reg:SI 0 r0)
        (plus:SI (reg:SI 2 r2)
            (const_int 4 [0x4]))) xxx.i:100 67 {*addsi3}
     (nil))

which is invalid.  Looks that that complex asm expression requires
an invalid add insn on SH to reload its operand of that asm insn.
Unfortunately I have no idea to fix this issue.

Reply via email to