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

            Bug ID: 89313
           Summary: [9 Regression] ICE in process_alt_operands, at
                    lra-constraints.c:2962
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

Changed between 20180930 and 20181007 :


$ cat z1.c
long f (long a);
long g (void)
{
  register long z asm ("rax");
  asm ("foo %0, %1, %1" : "=&r" (z) : "r" (f), "0" (f));
  return z;
}


$ gcc-9-20190210 -c z1.c -O0
z1.c: Assembler messages:
z1.c:5: Error: no such instruction: `foo %rax,%rdx,%rdx'


$ gcc-9-20190210 -c z1.c -O2
z1.c: In function 'g':
z1.c:7:1: error: unable to generate reloads for impossible constraints:
    7 | }
      | ^
(insn 7 16 15 2 (parallel [
            (set (reg/v:DI 0 ax [ z ])
                (asm_operands:DI ("foo %0, %1, %1") ("=&r") 0 [
                        (reg/v:DI 0 ax [ z ]) repeated x2
                    ]
                     [
                        (asm_input:DI ("r") z1.c:5)
                        (asm_input:DI ("0") z1.c:5)
                    ]
                     [] z1.c:5))
            (clobber (reg:CC 17 flags))
        ]) "z1.c":5:3 -1
     (expr_list:REG_UNUSED (reg:CC 17 flags)
        (nil)))
during RTL pass: reload
z1.c:7:1: internal compiler error: in process_alt_operands, at
lra-constraints.c:2962
0x5aa7c0 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
        ../../gcc/rtl-error.c:108
0x93ac40 process_alt_operands
        ../../gcc/lra-constraints.c:2961
0x93d4bb curr_insn_transform
        ../../gcc/lra-constraints.c:3922
0x93fe8e lra_constraints(bool)
        ../../gcc/lra-constraints.c:4942
0x92e454 lra(_IO_FILE*)
        ../../gcc/lra.c:2461
0x8e9ff1 do_reload
        ../../gcc/ira.c:5516
0x8e9ff1 execute
        ../../gcc/ira.c:5700

Reply via email to