https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90450

            Bug ID: 90450
           Summary: Hash function in gather_mem_refs_stmt does not match
                    with mem_ref_hasher::equal
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
  Target Milestone: ---

As mentioned in following sub-thread:
https://gcc.gnu.org/ml/gcc-patches/2018-10/msg01885.html

Using the sanitization patch I see:

$ ./xgcc -B.
/home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/torture/pr63941.c -O2 -c
hash table checking failed: equal operator returns true for a pair of values
with a different hash value
during GIMPLE pass: lim
/home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/torture/pr63941.c: In
function ‘fn1’:
/home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/torture/pr63941.c:6:1:
internal compiler error: in hashtab_chk_error, at hash-table.h:1015
    6 | fn1 ()
      | ^~~
0x1372cfd hashtab_chk_error
        /home/marxin/Programming/gcc/gcc/hash-table.h:1015
0x137e501 hash_table<mem_ref_hasher, false, xcallocator>::verify(ao_ref*
const&, unsigned int)
        /home/marxin/Programming/gcc/gcc/hash-table.h:1036
0x137d5d5 hash_table<mem_ref_hasher, false,
xcallocator>::find_slot_with_hash(ao_ref* const&, unsigned int, insert_option)
        /home/marxin/Programming/gcc/gcc/hash-table.h:953
0x137874a gather_mem_refs_stmt
        /home/marxin/Programming/gcc/gcc/tree-ssa-loop-im.c:1501
0x1378e4d analyze_memory_references
        /home/marxin/Programming/gcc/gcc/tree-ssa-loop-im.c:1625
0x137b334 tree_ssa_lim
        /home/marxin/Programming/gcc/gcc/tree-ssa-loop-im.c:2646
0x137b460 execute
        /home/marxin/Programming/gcc/gcc/tree-ssa-loop-im.c:2708

Reply via email to