https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91190
Bug ID: 91190 Summary: ICE on valid code: in hashtab_chk_error, at hash-table.c:137 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: su at cs dot ucdavis.edu Target Milestone: --- It appears to be a recent regression. $ gcctk -v Using built-in specs. COLLECT_GCC=gcctk COLLECT_LTO_WRAPPER=/home/suz/software/gcctk/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/10.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-source-trunk/configure --disable-multilib --enable-languages=c,c++,lto --prefix=/home/suz/software/gcctk/gcc-trunk --disable-bootstrap Thread model: posix Supported LTO compression algorithms: zlib gcc version 10.0.0 20190717 (experimental) [trunk revision 273554] (GCC) $ $ gcctk -O2 small. gcctk: error: small.: No such file or directory gcctk: fatal error: no input files compilation terminated. $ gcctk -O2 small.c $ gcc-9.1.0 -O3 small.c $ $ gcctk -O3 small.c hash table checking failed: equal operator returns true for a pair of values with a different hash value during RTL pass: expand small.c: In function ‘main’: small.c:8:5: internal compiler error: in hashtab_chk_error, at hash-table.c:137 8 | int main () | ^~~~ 0x60d20c hashtab_chk_error() ../../gcc-source-trunk/gcc/hash-table.c:137 0x94d34b hash_table<temp_address_hasher, false, xcallocator>::verify(temp_slot_address_entry* const&, unsigned int) ../../gcc-source-trunk/gcc/hash-table.h:1036 0x94d4a4 hash_table<temp_address_hasher, false, xcallocator>::find_with_hash(temp_slot_address_entry* const&, unsigned int) ../../gcc-source-trunk/gcc/hash-table.h:937 0x949b41 find_temp_slot_from_address ../../gcc-source-trunk/gcc/function.c:749 0x94abd2 update_temp_slot_address(rtx_def*, rtx_def*) ../../gcc-source-trunk/gcc/function.c:1103 0x8b92a5 memory_address_addr_space(machine_mode, rtx_def*, unsigned char) ../../gcc-source-trunk/gcc/explow.c:510 0x89dbd4 change_address_1 ../../gcc-source-trunk/gcc/emit-rtl.c:2312 0x8a1cd5 offset_address(rtx_def*, rtx_def*, unsigned long) ../../gcc-source-trunk/gcc/emit-rtl.c:2550 0x8db417 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) ../../gcc-source-trunk/gcc/expr.c:10778 0x8dde48 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) ../../gcc-source-trunk/gcc/expr.c:9952 0x82976b expand_normal ../../gcc-source-trunk/gcc/expr.h:287 0x82976b do_jump ../../gcc-source-trunk/gcc/dojump.c:610 0x7a6cf3 expand_gimple_cond ../../gcc-source-trunk/gcc/cfgexpand.c:2548 0x7a6cf3 expand_gimple_basic_block ../../gcc-source-trunk/gcc/cfgexpand.c:5770 0x7a893e execute ../../gcc-source-trunk/gcc/cfgexpand.c:6538 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. $ ------------------------------------- int printf (const char *, ...); unsigned a[1], c; long d, h; int e[2], f, g; char i; int main () { char k = 0; int l; while (i || d) { if (g) while (1) ; e[1] = 0; long m[2], n = ~(3 & (5 | (h | 9) * 2237420170)); g = 90 * n; char b = m[300000000], j = 0; c = 5 ^ a[c ^ (b & 5)]; int o = d; k = o ? : j; if (k) for (l = 0; l < 3; l++) if (m[200000000000000000]) printf ("%d", f); } return 0; }