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

            Bug ID: 109541
           Summary: ICE in extract_constrain_insn on
                    sparc64-unknown-linux-gnu when building rhash-1.4.3
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---
              Host: sparc64-unknown-linux-gnu
            Target: sparc64-unknown-linux-gnu
             Build: sparc64-unknown-linux-gnu

Created attachment 54880
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54880&action=edit
a-sha512.i

Hit this when building rhash-1.4.3
```
$ sparc64-unknown-linux-gnu-gcc -DUSE_OPENSSL -DNDEBUG -pipe
-ffunction-sections -fdata-sections -fomit-frame-pointer -Wall -W
-Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith
-Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations
-Wdeclaration-after-statement -O2 -mcpu=niagara4 -pipe -fpic
-DRHASH_XVERSION=0x01040200 librhash/sha512.c
librhash/sha512.c: In function ‘rhash_sha512_process_block’:
librhash/sha512.c:179:1: error: insn does not satisfy its constraints:
  179 | }
      | ^
(insn 5 2048 675 2 (set (reg/f:DI 72 %f40 [2613])
        (mem/u/c:DI (plus:DI (reg:DI 3 %g3 [109])
                (symbol_ref:DI ("rhash_k512") [flags 0x2] <var_decl
0xfff800010eb1eea0 rhash_k512>)) [0  S8 A64])) "librhash/sha512.c":158:17 125
{*movdi_insn_sp64}
     (expr_list:REG_EQUIV (symbol_ref:DI ("rhash_k512") [flags 0x2] <var_decl
0xfff800010eb1eea0 rhash_k512>)
        (nil)))
during RTL pass: reload
librhash/sha512.c:179:1: internal compiler error: in extract_constrain_insn, at
recog.cc:2692
0x18521f7 internal_error(char const*, ...)
        ???:0
0x2cbd17 fancy_abort(char const*, int, char const*)
        ???:0
0x2b2b27 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
        ???:0
0x2b2bdf _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
        ???:0
0xa3b7b7 extract_constrain_insn(rtx_insn*)
        ???:0
0x8c3687 lra(_IO_FILE*)
        ???:0
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.
```

---

With the attached preprocessed source, this is enough:
```
$ sparc64-unknown-linux-gnu-gcc -O1 -mcpu=niagara4 -fpic -c a-sha512.i
librhash/sha512.c: In function ‘rhash_sha512_process_block’:
librhash/sha512.c:179:1: error: insn does not satisfy its constraints:
(insn 5 2048 675 2 (set (reg/f:DI 72 %f40 [2613])
        (mem/u/c:DI (plus:DI (reg:DI 3 %g3 [109])
                (symbol_ref:DI ("rhash_k512") [flags 0x2] <var_decl
0xfff800010ed1e900 rhash_k512>)) [0  S8 A64])) "librhash/sha512.c":158:17 125
{*movdi_insn_sp64}
     (expr_list:REG_EQUIV (symbol_ref:DI ("rhash_k512") [flags 0x2] <var_decl
0xfff800010ed1e900 rhash_k512>)
        (nil)))
during RTL pass: reload
librhash/sha512.c:179:1: internal compiler error: in extract_constrain_insn, at
recog.cc:2692
0x18521f7 internal_error(char const*, ...)
        ???:0
0x2cbd17 fancy_abort(char const*, int, char const*)
        ???:0
0x2b2b27 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
        ???:0
0x2b2bdf _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
        ???:0
0xa3b7b7 extract_constrain_insn(rtx_insn*)
        ???:0
0x8c3687 lra(_IO_FILE*)
        ???:0
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.
```

Reply via email to