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

            Bug ID: 94454
           Summary: ICE 'canonical types differ for identical types'
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: iains at gcc dot gnu.org
  Target Milestone: ---

This a bug reported by Eric Niebler when building the ranges-v3 code on
Darwin19, however it's not a Darwin-specific problem.

This is a very slippery bug to pin down (possibly a dup of 90301, but unknown
at present)

The failure on a given platform seems to depend on the compiler build.

I have now seen fails on x86-64-linux-gnu, powerpc64-linux-gnu, *darwin*.

Some compiler builds fail almost consistently on a given platform, but a later
build could easily pass every time.  Often the fail is ≈ 1 time in 5 attempts.

tried:
 --with-checking=yes,gcac
 --param ggc-min-expand=0 --param ggc-min-heapsize=0

Neither altered the repeatability.

Jonathan did a run under valgrind which was also inconclusive.

I've tried (manually) a fairly large number of permutation of options etc.
without any pattern emerging.  At present a hunch is that it's maybe an
uninitialised var, or perhaps something that depends on the order in which
things get initialised.

** Trying to reduce on x86-64-linux-gnu and x86-64-darwin16 (but going very
slowly).

====

/home/iains/range-v3/include/meta/meta.hpp:1216:11: internal compiler error:
canonical types differ for identical types ‘std::integral_constant<bool,
and_v<__is_constructible(Ts)...> >’ and ‘std::integral_constant<bool,
and_v<__is_constructible(Ts)...> >’
 1216 |     using if_c = _t<detail::_if_<bool_<If>, Args...>>;
      |           ^~~~
0x1054ba4b comptypes(tree_node*, tree_node*, int)
        ../../src/gcc/cp/typeck.c:1519
0x1053679f cp_tree_equal(tree_node*, tree_node*)
        ../../src/gcc/cp/tree.c:3940
0x10536523 cp_tree_equal(tree_node*, tree_node*)
        ../../src/gcc/cp/tree.c:3933
0x1043318f template_args_equal(tree_node*, tree_node*, bool)
        ../../src/gcc/cp/pt.c:9043
0x10432e13 template_args_equal(tree_node*, tree_node*, bool)
        ../../src/gcc/cp/pt.c:8985
0x10432e13 comp_template_args(tree_node*, tree_node*, tree_node**, tree_node**,
bool)
        ../../src/gcc/cp/pt.c:9072
0x10432e13 comp_template_args(tree_node*, tree_node*, tree_node**, tree_node**,
bool)
        ../../src/gcc/cp/pt.c:9052
0x104463bf spec_hasher::equal(spec_entry*, spec_entry*)
        ../../src/gcc/cp/pt.c:1703
0x104c577f hash_table<spec_hasher, false,
xcallocator>::find_with_hash(spec_entry* const&, unsigned int)
        ../../src/gcc/hash-table.h:917
0x1049545b lookup_template_class_1
        ../../src/gcc/cp/pt.c:9680
0x10499da3 lookup_template_class(tree_node*, tree_node*, tree_node*,
tree_node*, int, int)
        ../../src/gcc/cp/pt.c:10020
0x10499da3 tsubst_aggr_type
        ../../src/gcc/cp/pt.c:13301
0x1048e023 tsubst_template_args(tree_node*, tree_node*, int, tree_node*)
        ../../src/gcc/cp/pt.c:13092
0x1048e66b tsubst_argument_pack(tree_node*, tree_node*, int, tree_node*)
        ../../src/gcc/cp/pt.c:13040
0x1048e0f3 tsubst_template_args(tree_node*, tree_node*, int, tree_node*)
        ../../src/gcc/cp/pt.c:13090
0x10499d4f tsubst_aggr_type
        ../../src/gcc/cp/pt.c:13295
0x1048e023 tsubst_template_args(tree_node*, tree_node*, int, tree_node*)
        ../../src/gcc/cp/pt.c:13092
0x1048965b tsubst(tree_node*, tree_node*, int, tree_node*)
        ../../src/gcc/cp/pt.c:14946
0x10479c0b tsubst_decl
        ../../src/gcc/cp/pt.c:14377
0x1049a5e3 instantiate_template_1
        ../../src/gcc/cp/pt.c:20588
Please submit a full bug report,

Reply via email to