public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "slyfox at gcc dot gnu.org" <gcc-bugzilla@gcc.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	[thread overview]
Message-ID: <bug-100782-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            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 = __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 0x41]
<function_decl 0x7fc7ae93bb00 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))
        ]) "raw_api.c.c":6:3 228 {call_pcrel}
     (expr_list:REG_CALL_DECL (symbol_ref:SI ("ffi_raw_to_ptrarray") [flags
0x41] <function_decl 0x7fc7ae93bb00 ffi_raw_to_ptrarray>)
        (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 <https://gcc.gnu.org/bugs/> for instructions.

Using built-in specs.
COLLECT_GCC=./xgcc
Target: sh4-unknown-linux-gnu
Configured with: ../gcc/configure --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=sh4-unknown-linux-gnu
--prefix=/home/slyfox/dev/git/gcc-sh4-ice/../gcc-sh4-installed
--with-sysroot=/usr/sh4-unknown-linux-gnu --disable-bootstrap
--enable-languages=c --disable-nls CFLAGS=-O0 CXXFLAGS=-O0
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.0.0 20210526 (experimental) (GCC)

             reply	other threads:[~2021-05-26 21:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-26 21:38 slyfox at gcc dot gnu.org [this message]
2021-05-28 10:32 ` [Bug target/100782] " rguenth at gcc dot gnu.org
2021-06-21 22:25 ` slyfox at gcc dot gnu.org
2021-07-06  6:52 ` rguenth at gcc dot gnu.org
2021-07-06  7:34 ` slyfox at gcc dot gnu.org
2021-07-06 21:29 ` slyfox at gcc dot gnu.org
2021-07-28  7:07 ` rguenth at gcc dot gnu.org
2021-08-09  6:51 ` slyfox at gcc dot gnu.org
2022-04-21  7:49 ` rguenth at gcc dot gnu.org
2023-05-29 10:05 ` [Bug target/100782] [11 Regression] sh4 ICEs on -O2 -fPIE -fstack-protector: internal compiler error: in curr_insn_transform, at lra-constraints.c jakub at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-100782-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).