From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C4084385782E; Wed, 26 May 2021 21:38:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C4084385782E From: "slyfox at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/100782] New: [11 Regression] sh4 ICEs on -O2 -fPIE -fstack-protector: internal compiler error: in curr_insn_transform, at lra-constraints.c:4132 Date: Wed, 26 May 2021 21:38:26 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 11.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: slyfox at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone cf_gcchost cf_gcctarget cf_gccbuild Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 May 2021 21:38:26 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100782 Bug ID: 100782 Summary: [11 Regression] sh4 ICEs on -O2 -fPIE -fstack-protector: internal compiler error: in curr_insn_transform, at lra-constraints.c:4132 Product: gcc Version: 11.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: slyfox at gcc dot gnu.org Target Milestone: --- Host: x86_64-pc-linux-gnu Target: sh4-unknown-linux-gnu Build: x86_64-pc-linux-gnu Not sure if it's a dupe of bug #100241. Filing just in case. Observed when built libffi for sh4 target. Minimal example: // cat raw_api.c.c void ffi_raw_to_ptrarray(void); int ffi_call(void (*)(void *, void *), void*, void*, void*); void ffi_raw_call_cif(void *fn, void *rvalue) { void *avalue =3D __builtin_alloca(sizeof 0); ffi_raw_to_ptrarray(); ffi_call(ffi_raw_call_cif, fn, rvalue, avalue); } $ ./xgcc -B. -O2 -mlra -fexceptions -fPIE -fstack-protector -c raw_api.c.c = -o raw_api.o raw_api.c.c: In function 'ffi_raw_call_cif': raw_api.c.c:8:1: error: unable to generate reloads for: 8 | } | ^ (call_insn 18 16 20 2 (parallel [ (call (mem:SI (symbol_ref:SI ("ffi_raw_to_ptrarray") [flags 0x4= 1] ) [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)) ]) "raw_api.c.c":6:3 228 {call_pcrel} (expr_list:REG_CALL_DECL (symbol_ref:SI ("ffi_raw_to_ptrarray") [flags 0x41] ) (nil)) (nil)) during RTL pass: reload raw_api.c.c:8:1: internal compiler error: in curr_insn_transform, at lra-constraints.c:4132 0x7fc7aea9287c __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 for instructions. Using built-in specs. COLLECT_GCC=3D./xgcc Target: sh4-unknown-linux-gnu Configured with: ../gcc/configure --build=3Dx86_64-pc-linux-gnu --host=3Dx86_64-pc-linux-gnu --target=3Dsh4-unknown-linux-gnu --prefix=3D/home/slyfox/dev/git/gcc-sh4-ice/../gcc-sh4-installed --with-sysroot=3D/usr/sh4-unknown-linux-gnu --disable-bootstrap --enable-languages=3Dc --disable-nls CFLAGS=3D-O0 CXXFLAGS=3D-O0 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 12.0.0 20210526 (experimental) (GCC)=