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

            Bug ID: 98603
           Summary: aarch64: ICE in extract_insn (ira) on asm goto with
                    bad constraint
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: acoplan at gcc dot gnu.org
  Target Milestone: ---

$ cat test.c
int a() {
  int b, c;
  asm goto("" : "=R"(b), "=r"(c) : : : d);
d:
}
$ aarch64-elf-gcc -c test.c
test.c: In function 'a':
test.c:3:3: error: impossible constraint in 'asm'
    3 |   asm goto("" : "=R"(b), "=r"(c) : : : d);
      |   ^~~
test.c:5:1: error: unrecognizable insn:
    5 | }
      | ^
(jump_insn 7 2 8 2 (parallel [
            (set (reg:SI 93 [ b ])
                (asm_operands:SI ("") ("=R") 0 []
                     []
                     [
                        (label_ref:DI 8)
                    ] test.c:3))
            (set (reg:SI 94 [ c ])
                (asm_operands:SI ("") ("=r") 1 []
                     []
                     [
                        (label_ref:DI 8)
                    ] test.c:3))
        ]) "test.c":3:3 -1
     (nil)
 -> 8)
during RTL pass: ira
test.c:5:1: internal compiler error: in extract_insn, at recog.c:2760
0xd574db _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
        /home/alecop01/toolchain/src/gcc/gcc/rtl-error.c:108
0xd574fa _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
        /home/alecop01/toolchain/src/gcc/gcc/rtl-error.c:116
0xd27455 extract_insn(rtx_insn*)
        /home/alecop01/toolchain/src/gcc/gcc/recog.c:2760
0xbb4266 ira
        /home/alecop01/toolchain/src/gcc/gcc/ira.c:5423
0xbb4266 execute
        /home/alecop01/toolchain/src/gcc/gcc/ira.c:5945
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.

Reply via email to