public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [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
@ 2021-05-26 21:38 slyfox at gcc dot gnu.org
  2021-05-28 10:32 ` [Bug target/100782] " rguenth at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: slyfox at gcc dot gnu.org @ 2021-05-26 21:38 UTC (permalink / raw)
  To: gcc-bugs

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)

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-05-29 10:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-26 21:38 [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 slyfox at gcc dot gnu.org
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

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).