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

            Bug ID: 100600
           Summary: ICE: in verify_hash_value, at fold-const.c:3929
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: cnsun at uwaterloo dot ca
  Target Milestone: ---

$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/scratch/software/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /tmp/tmp.eZIsobWkq2-gcc-builder/gcc/configure
--enable-languages=c,c++,lto --enable-checking-yes --enable-multiarch
--prefix=/scratch/software/gcc-trunk --disable-bootstrap
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.0 20210514 (experimental) [master revision
:e5c3c8afa:f3b1516d9dfd969d7cc1ca6f26dec13478a1c458] (GCC)

$ cat mutant.c
a, b, c;
long d(long, long e, long f, long g) {
  long h, i;
  for (; h < e; h++) {
    i = f;
    for (; i < g; i++)
      c = b + a;
  }
  return h + i;
}
long j(long, long e, long, long g) {
  long h, i;
  for (; h < e; h++)
    for (; i < g; i++)
      c = b + a;
  return h + i;
}

$ gcc-trunk -O3 mutant.c
mutant.c:1:1: warning: data definition has no type or storage class
    1 | a, b, c;
      | ^
mutant.c:1:1: warning: type defaults to ‘int’ in declaration of ‘a’
[-Wimplicit-int]
mutant.c:1:4: warning: type defaults to ‘int’ in declaration of ‘b’
[-Wimplicit-int]
    1 | a, b, c;
      |    ^
mutant.c:1:7: warning: type defaults to ‘int’ in declaration of ‘c’
[-Wimplicit-int]
    1 | a, b, c;
      |       ^
during IPA pass: icf
mutant.c:17:1: internal compiler error: in verify_hash_value, at
fold-const.c:3929
   17 | }
      | ^
0x6b4fe9 operand_compare::verify_hash_value(tree_node const*, tree_node const*,
unsigned int, bool*)
        /tmp/tmp.eZIsobWkq2-gcc-builder/gcc/gcc/fold-const.c:3929
0x19e8d35 ipa_icf_gimple::func_checker::operand_equal_p(tree_node const*,
tree_node const*, unsigned int)
        /tmp/tmp.eZIsobWkq2-gcc-builder/gcc/gcc/ipa-icf-gimple.c:312
0x19e606b ipa_icf_gimple::func_checker::compare_operand(tree_node*, tree_node*,
ipa_icf_gimple::func_checker::operand_access_type)
        /tmp/tmp.eZIsobWkq2-gcc-builder/gcc/gcc/ipa-icf-gimple.c:397
0x19d642a ipa_icf::sem_function::compare_phi_node(basic_block_def*,
basic_block_def*)
        /tmp/tmp.eZIsobWkq2-gcc-builder/gcc/gcc/ipa-icf.c:1584
0x19dccf1 ipa_icf::sem_function::equals_private(ipa_icf::sem_item*)
        /tmp/tmp.eZIsobWkq2-gcc-builder/gcc/gcc/ipa-icf.c:925
0x19dcdf3 ipa_icf::sem_function::equals_private(ipa_icf::sem_item*)
        /tmp/tmp.eZIsobWkq2-gcc-builder/gcc/gcc/ipa-icf.c:836
0x19dcdf3 ipa_icf::sem_function::equals(ipa_icf::sem_item*,
hash_map<symtab_node*, ipa_icf::sem_item*,
simple_hashmap_traits<default_hash_traits<symtab_node*>, ipa_icf::sem_item*>
>&)
        /tmp/tmp.eZIsobWkq2-gcc-builder/gcc/gcc/ipa-icf.c:813
0x19d7457 ipa_icf::sem_item_optimizer::subdivide_classes_by_equality(bool)
        /tmp/tmp.eZIsobWkq2-gcc-builder/gcc/gcc/ipa-icf.c:2732
0x19e34ac ipa_icf::sem_item_optimizer::execute()
        /tmp/tmp.eZIsobWkq2-gcc-builder/gcc/gcc/ipa-icf.c:2464
0x19e51aa ipa_icf_driver
        /tmp/tmp.eZIsobWkq2-gcc-builder/gcc/gcc/ipa-icf.c:3600
0x19e51aa ipa_icf::pass_ipa_icf::execute(function*)
        /tmp/tmp.eZIsobWkq2-gcc-builder/gcc/gcc/ipa-icf.c:3647
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.

Reply via email to