[Bug target/100782] [11 Regression] sh4 ICEs on -O2 -fPIE -fstack-protector: internal compiler error: in curr_insn_transform, at lra-constraints.c:4132

slyfox at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jul 6 07:34:29 GMT 2021


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

--- Comment #3 from Sergei Trofimovich <slyfox at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #2)
> The description says:
> 
> gcc version 12.0.0 20210526 (experimental) (GCC)
> 
> so is this about GCC 12 or GCC 11?  What version worked fine (why's this
> marked as regression?)

My apologies. It should be a gcc-11 regression. More gcc versions outputs:

$ /tmp:sh4-unknown-linux-gnu-gcc-10.3.0 -O2 -mlra -fexceptions -fPIE
-fstack-protector -c a.c
<ok>

$ sh4-unknown-linux-gnu-gcc-11.1.0 -O2 -mlra -fexceptions -fPIE
-fstack-protector -c a.c
a.c: In function 'ffi_raw_call_cif':
a.c:9:1: error: unable to generate reloads for:
    9 | }
      | ^
(call_insn 18 16 20 2 (parallel [
            (call (mem:SI (symbol_ref:SI ("ffi_raw_to_ptrarray") [flags 0x41]
<function_decl 0x7f3c4e947b00 ffi_raw_to_ptrarray>) [0 ffi_raw_to_ptrarray S4
A32])
                (const_int 0 [0]))
            (use (reg:SI 154 fpscr0))
            (use (reg:SI 12 r12))
            (clobber (reg:SI 146 pr))
            (clobber (reg:SI 183))
        ]) "a.c":7:3 228 {call_pcrel}
     (expr_list:REG_CALL_DECL (symbol_ref:SI ("ffi_raw_to_ptrarray") [flags
0x41] <function_decl 0x7f3c4e947b00 ffi_raw_to_ptrarray>)
        (nil))
    (nil))
during RTL pass: reload
a.c:9:1: internal compiler error: in curr_insn_transform, at
lra-constraints.c:4138
0x7f3c4ea9e7ac __libc_start_main
        ../csu/libc-start.c:332
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.


More information about the Gcc-bugs mailing list