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

--- Comment #10 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> Sorry, I can not reproduce it on gcc-11, gcc-12, and master using -O1
> -mcpu=niagara4 -fpic -c a-sha512.i.

You need a properly configured cross-compiler, which means that you need to
build and install binutils first.  Then the most reduced testcase is the one
I'm going to attach:

eric@fomalhaut:~/build/gcc/sparc64-linux> gcc/xgcc -Bgcc -S a-sha512.c -O
-mcpu=niagara4 -fpic
a-sha512.c: In function 'rhash_sha512_process_block':
a-sha512.c:15:9: warning: cast from pointer to integer of different size
[-Wpointer-to-int-cast]
   15 |     F = (unsigned) &G;
      |         ^
a-sha512.c:16:10: warning: cast from pointer to integer of different size
[-Wpointer-to-int-cast]
   16 |     T1 = (unsigned) (&T1 + (W_3 += rhash_sha512_process_block_block > 9
> W_4));
      |          ^
a-sha512.c:17:9: warning: cast from pointer to integer of different size
[-Wpointer-to-int-cast]
   17 |     C = (unsigned) (T1 + &E);
      |         ^
a-sha512.c:20:1: error: insn does not satisfy its constraints:
   20 | }
      | ^
(insn 8 107 9 2 (set (reg/f:DI 3 %g3 [165])
        (mem/u/c:DI (plus:DI (reg:DI 3 %g3 [109])
                (symbol_ref:DI ("rhash_sha512_process_block_i") <var_decl
0x7f9e0ed6d2d0 rhash_sha512_process_block_i>)) [0  S8 A64])) "a-sha512.c":10:10
discrim 1 125 {*movdi_insn_sp64}
     (expr_list:REG_EQUIV (symbol_ref:DI ("rhash_sha512_process_block_i")
<var_decl 0x7f9e0ed6d2d0 rhash_sha512_process_block_i>)
        (nil)))
during RTL pass: reload
a-sha512.c:20:1: internal compiler error: in extract_constrain_insn, at
recog.cc:2692
0x620dd7 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
        /home/eric/cvs/gcc/gcc/rtl-error.cc:108
0x620e63 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
        /home/eric/cvs/gcc/gcc/rtl-error.cc:118
0xd3dadd extract_constrain_insn(rtx_insn*)
        /home/eric/cvs/gcc/gcc/recog.cc:2692
0xbb9c37 check_rtl
        /home/eric/cvs/gcc/gcc/lra.cc:2126
0xbc08db lra(_IO_FILE*)
        /home/eric/cvs/gcc/gcc/lra.cc:2544
0xb5d889 do_reload
        /home/eric/cvs/gcc/gcc/ira.cc:5967
0xb5d889 execute
        /home/eric/cvs/gcc/gcc/ira.cc:6153

> Fortunately, I can reproduce
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108703.  So I'll start on
> PR108703 first.

This one is pathological though, so of a lower priority IMO.

Reply via email to