Bug 99461 - [11 Regression] ICE in extract_constrain_insn, at recog.c:2670 since r11-7526-g9105757a59b89019
Summary: [11 Regression] ICE in extract_constrain_insn, at recog.c:2670 since r11-7526...
Status: RESOLVED DUPLICATE of bug 99422
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 11.0
: P1 normal
Target Milestone: 11.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks: 99467
  Show dependency treegraph
 
Reported: 2021-03-08 10:49 UTC by Martin Liška
Modified: 2021-03-08 18:58 UTC (History)
2 users (show)

See Also:
Host: x86_64-linux-gnu
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2021-03-08 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Liška 2021-03-08 10:49:20 UTC
The following fails, it's reduced from qemu package:

$ cat qemu.i
struct saveBDAstate {
  short vbe_mode;
};

void __set_seg_ES();

struct saveBDAstate bda_save_restore(struct saveBDAstate *data) {
  struct saveBDAstate *info = data;
  __set_seg_ES();
  __asm__("" : "=m"(info->vbe_mode));
  __asm__("" : : ""(info));
}

$ gcc qemu.i -Os -m16 -S
qemu.i: In function ‘bda_save_restore’:
qemu.i:12:1: error: unrecognizable insn:
   12 | }
      | ^
(insn 8 7 9 2 (parallel [
            (set (mem:HI (mem/f/c:SI (plus:SI (reg/f:SI 6 bp)
                            (const_int 12 [0xc])) [3 data+0 S4 A32]) [2 data_1(D)->vbe_mode+0 S2 A16])
                (asm_operands:HI ("") ("=m") 0 []
                     []
                     [] qemu.i:10))
            (clobber (reg:CC 17 flags))
        ]) "qemu.i":10:3 -1
     (nil))
during RTL pass: reload
qemu.i:12:1: internal compiler error: in extract_constrain_insn, at recog.c:2670
0x6ff1e1 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*)
	/home/marxin/Programming/gcc/gcc/rtl-error.c:108
0x6ff203 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
	/home/marxin/Programming/gcc/gcc/rtl-error.c:116
0x6fd485 extract_constrain_insn(rtx_insn*)
	/home/marxin/Programming/gcc/gcc/recog.c:2670
0xcca32f check_rtl
	/home/marxin/Programming/gcc/gcc/lra.c:2087
0xcceb1e lra(_IO_FILE*)
	/home/marxin/Programming/gcc/gcc/lra.c:2505
0xc85934 do_reload
	/home/marxin/Programming/gcc/gcc/ira.c:5827
0xc85934 execute
	/home/marxin/Programming/gcc/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 <https://gcc.gnu.org/bugs/> for instructions.
Comment 1 Richard Biener 2021-03-08 11:05:55 UTC
Looks like a dup.
Comment 2 Martin Liška 2021-03-08 11:10:44 UTC
(In reply to Richard Biener from comment #1)
> Looks like a dup.

I haven't found a PR that would start with the revision..
Comment 3 Vladimir Makarov 2021-03-08 18:58:58 UTC
It is a duplicate of PR99422.  With patch for PR99422, the crash is gone.

*** This bug has been marked as a duplicate of bug 99422 ***