https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115521
Bug ID: 115521 Summary: ICE at -O1 with "-fno-tree-ccp -fno-tree-dominator-opts" on x86_64-linux-gnu: in extract_constrain_insn, at recog.cc:2713 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: zhendong.su at inf dot ethz.ch Target Milestone: --- It appears to be a recent regression as it doesn't reproduce with 13.* and earlier. Compiler Explorer: https://godbolt.org/z/qEb7fcaf1 The reduced test is still quite big, but it seems difficult to get it to be much smaller. [524] % gcctk -v Using built-in specs. COLLECT_GCC=gcctk COLLECT_LTO_WRAPPER=/local/suz-local/software/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/15.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-trunk/configure --disable-bootstrap --enable-checking=yes --prefix=/local/suz-local/software/local/gcc-trunk --enable-sanitizers --enable-languages=c,c++ --disable-werror --enable-multilib Thread model: posix Supported LTO compression algorithms: zlib gcc version 15.0.0 20240617 (experimental) (GCC) [525] % [525] % gcctk -O1 -fno-tree-ccp -fno-tree-dominator-opts -c -w small.c small.c: In function ‘bi’: small.c:188:1: error: insn does not satisfy its constraints: 188 | } | ^ (insn 19 968 967 2 (parallel [ (set (strict_low_part (reg:QI 2 cx [orig:415 bj ] [415])) (ior:QI (subreg:QI (zero_extract:HI (reg/v:HI 2 cx [orig:415 bj ] [415]) (const_int 8 [0x8]) (const_int 8 [0x8])) 0) (reg:QI 0 ax [orig:99 c.3_4 ] [99]))) (clobber (reg:CC 17 flags)) ]) "small.c":21:7 656 {*iorqi_exthi_1_slp} (nil)) during RTL pass: reload small.c:188:1: internal compiler error: in extract_constrain_insn, at recog.cc:2713 0x84dde4 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) ../../gcc-trunk/gcc/rtl-error.cc:108 0x84de10 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*) ../../gcc-trunk/gcc/rtl-error.cc:118 0x84c04a extract_constrain_insn(rtx_insn*) ../../gcc-trunk/gcc/recog.cc:2713 0xf6aca7 check_rtl ../../gcc-trunk/gcc/lra.cc:2189 0xf70131 lra(_IO_FILE*, int) ../../gcc-trunk/gcc/lra.cc:2610 0xf2044f do_reload ../../gcc-trunk/gcc/ira.cc:5973 0xf2044f execute ../../gcc-trunk/gcc/ira.cc:6161 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. [526] % [526] % cat small.c typedef int a; long b, c, ab, d, e, g, h, j, k, l, m, n, at; a o, p, **q, r, aa, s, t, ac, ad, u, v, w, x, f; unsigned ae, z, af; short ag, ah, ai, aj, ak, al, am, an, ao, ap, aq, y, ar, as; static char au, av; static volatile short aw; a *ax, *ay, *az, *ba; a **bb, **bc; int bd(); char be(); void bf(); short bg(); long bh(); a *bi() { char bj[2]; char *bk = &bj[0]; int i = 0; for (; i < 2; i++) bj[i] = 0; *bk = c | bj[1]; l = e = af = ac = 0; short bl[16] = {c, an, c, ao, an, ai, ag, c, ag, c, f, f, ag}; char bm[] = {f, f, d, f, f, d, f}, bn = 0, bo = m && au; aw; if (b) { int bp = 0, bq = 0, bs = o, bw = aj = an; while (aw) br: v = aa = --am; while (au) ai = b = r = p = av; as = s = c = 0; az = bi(); b = f = be(); t = bd(); b = bg(); d = bg(); for (; b; ++at) { a *d = &bq; for (; i; i++) for (; c; ad++) c = e = b = bd(); f = bg(); ar = c = bg(); f = be(); *q = ba = bi(); } an = c = av; h = bh(); z = be(); d = bg(); e = i = be(); j = bh(); k = bh(++k); v = be(); a *bt = &i, *bu = &bp; b = bd(); e = bg(); d = bg(); f = be(); *bc = *bb = bi(&bs); bv: f = av; f = bh(); y = bg(); n = bh(); { short f = aw, bz = au; aw; --ab; p = aw - av; bx: ag = aw - ag; if (an || c && av) { ag = aw ^ av; goto by; } aw; aw; am = ai = au > &bz; c = av; bd(); if (av) bd(); am = av; bd(); } an = aa = ag = e = bd(); char ca = b; by: c = bg(); d = bh(); e = bh(); e = bh(); g = bh(); x = bg(); an = al > &ca; if (av) i = 0; for (; i; i++) bd(); b = v = be(); *ba = b = bg(); c = p && bw; if (bw) an = p = bg(); d = bd(); e = bg(); ay = bi(); b = be(); c = bd(); b = be(); f = bg(); while (au) d = bd(); e = bd(); bf(); long cb = am && au & av; { short cc = b = aw, cd = aw || au, ce = au ^ aw, cf = c, cg = --ag; long ch = e = c < &cf; ap = aw < &ch; am = c = ai = f; if (av) { am = 0; goto bx; } c = ai = (ai > &cg) << aw; ag = aw; aj = aw || ce; e = ah = aw; aw || cd || aw; aw; ak = cb; e = b = d = f = ae = r = bh(); if (b) goto br; if (av) d = e = c = f = bh(); x = bg(); bd(); bd(); bd(); } aw; bd(); bd(); c = u = r = aa = aw; bd(); f = aw; if (aw) ag = aw ^ av; if (av) am++; be(); p = bd(); bg(); b = f = bd(); b = bg(); ax = bi(aw); f = be(); e = bd(); c = bg(); be(); d = bg(); w = bd(); aw &aw; ah = aw; av = av + aw; ao = c = aw; bd(aw); ag = aw; aa = 0; bd(); c = aq = f = b = n = aa = i = aw; e = 0 < f + &bn; } r = v = c = u = bd(); if (u) goto bv; int ci = e || au | av; if (bo && av) if (au) bd(); au = av < au ^ ci; bg(bj[1]); }