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

            Bug ID: 99574
           Summary: gcc-11 unrecognizable insn in extract_constrain_insn,
                    at recog.c:2670
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: arnd at linaro dot org
  Target Milestone: ---

Another internal compiler error from building a linux kernel, this time on
x86-32, reduced to:

$ cat sem.c
struct {
  short a;
} * b;
struct {
  int c;
} * d;
int e;
short f;
void g(void) {
  for (;;) {
    asm("" : "=r"(e) : "g"(d->c));
    int h = f - b->a;
    if (h > 7)
      f = h;
  }
}

$ x86_64-linux-gnu-gcc-11 --version
x86_64-linux-gnu-gcc-11 (Ubuntu 11-20210306-1ubuntu1) 11.0.1 20210306
(experimental) [master revision
574e7601829:6b84c9062bc:84185598dc7470bad4e7f8c22b64e3c944efb670]

$ x86_64-linux-gnu-gcc-11  -m32 -fno-omit-frame-pointer -fno-strict-overflow
-O2 -c sem.c -Wall
sem.c: In function ā€˜gā€™:
sem.c:16:1: error: unrecognizable insn:
   16 | }
      | ^
(insn 9 6 7 4 (parallel [
            (set (reg:SI 1 dx [92])
                (asm_operands:SI ("") ("=r") 0 [
                        (mem:SI (mem/c:SI (plus:SI (reg/f:SI 6 bp)
                                    (const_int -20 [0xffffffffffffffec])) [7
%sfp+-8 S4 A32]) [1 d.0_1->c+0 S4 A32])
                    ]
                     [
                        (asm_input:SI ("g") sem.c:11)
                    ]
                     [] sem.c:11))
            (clobber (reg:CC 17 flags))
        ]) "sem.c":11:5 -1
     (expr_list:REG_EQUIV (mem/c:SI (plus:SI (reg:SI 2 cx [82])
                (const:SI (unspec:SI [
                            (symbol_ref:SI ("e") [flags 0x2] <var_decl
0x7fc291759c60 e>)
                        ] UNSPEC_GOTOFF))) [1 e+0 S4 A32])
        (nil)))
during RTL pass: reload
sem.c:16:1: internal compiler error: in extract_constrain_insn, at recog.c:2670
0xce2eb1 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
        ../../src/gcc/rtl-error.c:108
0xce3057 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
        ../../src/gcc/rtl-error.c:116
0x95f537 extract_constrain_insn(rtx_insn*)
        ../../src/gcc/recog.c:2670
0x95f537 extract_constrain_insn(rtx_insn*)
        ../../src/gcc/recog.c:2666
0x95f537 check_rtl
        ../../src/gcc/lra.c:2087
0x17962bc lra(_IO_FILE*)
        ../../src/gcc/lra.c:2505
0x1794579 do_reload
        ../../src/gcc/ira.c:5827
0x1794579 execute
        ../../src/gcc/ira.c:6013
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-11/README.Bugs> for instructions.

Reply via email to