https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97765
Bug ID: 97765 Summary: ICE at -Os: in clear_slot, at hash-table.h:891 Product: gcc Version: 11.0 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: --- The test is hard to reduce and is still quite hairy. [534] % 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/11.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-trunk/configure --disable-bootstrap --prefix=/local/suz-local/software/local/gcc-trunk --enable-languages=c,c++ --disable-werror --enable-multilib --with-system-zlib Thread model: posix Supported LTO compression algorithms: zlib gcc version 11.0.0 20201109 (experimental) [master revision 946b73c1132:a700e491347:dc7e8839c92c4bc3c3741cf27b0af81edb803fe7] (GCC) [535] % [535] % [535] % gcctk -O1 -c -w small.c [536] % [536] % gcctk -Os -c -w small.c during GIMPLE pass: pre small.c: In function ‘ae’: small.c:69:6: internal compiler error: in clear_slot, at hash-table.h:891 69 | void ae() { | ^~ 0xed6b05 hash_table<expr_pred_trans_d, false, xcallocator>::clear_slot(expr_pred_trans_d*) ../../gcc-trunk/gcc/hash-table.h:890 0xed6b05 phi_translate ../../gcc-trunk/gcc/tree-ssa-pre.c:1745 0xed6b6c phi_translate_set ../../gcc-trunk/gcc/tree-ssa-pre.c:1773 0xed6fea compute_antic_aux ../../gcc-trunk/gcc/tree-ssa-pre.c:2112 0xed6fea compute_antic ../../gcc-trunk/gcc/tree-ssa-pre.c:2458 0xedaf3a execute ../../gcc-trunk/gcc/tree-ssa-pre.c:4295 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. [537] % [537] % cat small.c static short a, c; char b, d; static char e; int f, h; long g; short *i; unsigned j; extern void ad (); static unsigned aa() { int l, m = l & e, n; char o, p, r = j; long q; short s; if (!d) goto L2; q = s = h; L1: b = -(e >> (h / ~0 & m + g) & ~s); char v = ~(f % c); unsigned short w = b | j < h | c; char x = -c & b | h % l ^ e + g; int y = ~(x | b > ((l | j) & g & h % f) ^ e); unsigned long z = -(j & (l & a)) | ~f | ~(y % b) ^ g & (h ^ ~0) ^ v; unsigned char k = ~(j | v + d | (b | ~(y % h)) + (-(x % g & ~c) ^ e ^ a) & z); short t = ~f & l ^ (g ^ -z & ~b & d >> ~0) + (v | h) & j ^ k ^ e & c ^ y; int u = ~(~x & (f | h ^ -j & y >> e >> g % (l + c + b))); int ab = ~(~(l ^ f ^ v & x) % (-k | z & y | b + a) % ((g & h) + u + -e) - (d & w) & j); if (b && j) { w = a; e = -((-(w ^ -k & l) ^ x ^ ~g + h & y | (a ^ ab) + f) + (-e | v + j) & ~t); a = -((a ^ y ^ (a ^ ~h ^ j % e ^ w + l) ^ g + t + ~(x ^ v)) % (c ^ (b ^ ~0) | d)); d = -(-(k | j & ~(h << d)) << ~(e | v | (l | g ^ y) % -c ^ j) | ab); f = l % d + ~a | x % h | -f ^ y & b ^ w | -v - j + (c | b < 0); b = ~(~(a + ~e + ~v & b) % ~((b & g | j % w) + (-~j ^ h + d & -y % h ^ f & c + d))); c = -((j ^ a + f ^ g + ~(h ^ x) % ~d | h & c) % d | e & b + j ^ (k | ~l)); h = -(b | a + (~t | d & (~(j > h) ^ v | j ^ f | x) % ~k) ^ h + c % l | y & ~(-g % -d)); l = ~(~(g | e) % a ^ ~(-l & j) % ~b & c % d % ab & (~k ^ h & f) + (b + j)); if (a) goto L1; goto L3; } L2: c = -(a && o & (b & d)) & ~(e && q) > ~g ^ p; if (j || ab) ad(); if (!(e || h || ab && c && (l = n) && n - 1 && s)) { ad(); goto L1; } if (n || a >= d) { ad((long)e); goto L1; } p = h && r; if (p) o = ~(j | (d && c | e) | o); *i += 1; goto L1; L3:; } void ae() { aa(); for (;;) ; }