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

            Bug ID: 86946
           Summary: ice: canonical types differ for identical types
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

This C++ source code 

template <typename a, typename c> auto d(a, c);
template <long> class e;
template <unsigned long f, unsigned b, typename> e<d(f, b)> d();
template <unsigned long f, unsigned b, typename> e<d(f, b)> d();

causes this ice:

bug456.cc:4:63: internal compiler error: canonical types differ for identical
ty
pes ‘e<d(f, b)>’ and ‘e<d(f, b)>’
4 | template <unsigned long f, unsigned b, typename> e<d(f, b)> d();
  |                                                               ^
0xa0a331 comptypes(tree_node*, tree_node*, int)
        ../../trunk/gcc/cp/typeck.c:1477
0x87ce6a decls_match(tree_node*, tree_node*, bool)
        ../../trunk/gcc/cp/decl.c:968
0x87d24f decls_match(tree_node*, tree_node*, bool)
        ../../trunk/gcc/cp/decl.c:1036
0x87d416 duplicate_decls(tree_node*, tree_node*, bool)
        ../../trunk/gcc/cp/decl.c:1363

The bug seems to be present since sometime before revision 262519

Reply via email to