gcc-8.0.0-alpha20171015 snapshot (r253772) ICEs when compiling the following snippet w/ -O2 (-O3, -Ofast) -funroll-loops: int pb; void ch (unsigned char np, char fc) { unsigned char *y6 = &np; if (fc != 0) { unsigned char *z1 = &np; for (;;) if (*y6 != 0) for (fc = 0; fc < 12; ++fc) { int hh; int tp; if (fc != 0) hh = (*z1 != 0) ? fc : 0; else hh = pb; tp = fc > 0; if (hh == tp) *y6 = 1; } } if (np != 0) y6 = (unsigned char *)&fc; if (pb != 0 && *y6 != 0) for (;;) { } } % x86_64-unknown-linux-gnu-gcc-8.0.0-alpha20171015 -O2 -funroll-loops -c id5cyx54.c id5cyx54.c: In function 'ch': id5cyx54.c:36:1: error: insn does not satisfy its constraints: } ^ (insn 565 340 357 42 (parallel [ (set (reg:CCZ 17 flags) (compare:CCZ (plus:SI (reg:SI 2 cx [120]) (const_int 2 [0x2])) (const_int 0 [0]))) (set (reg:SI 1 dx [orig:91 ivtmp.14 ] [91]) (plus:SI (reg:SI 2 cx [120]) (const_int 2 [0x2]))) ]) 225 {*addsi_2} (nil)) during RTL pass: rnreg id5cyx54.c:36:1: internal compiler error: in extract_constrain_insn, at recog.c:2207
PR82597 is confirmed and got some analysis already. *** This bug has been marked as a duplicate of bug 82597 ***