public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "reichelt at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/101886] New: [11/12 Regression][concepts] ICE with auto as template parameter
Date: Thu, 12 Aug 2021 17:12:28 +0000	[thread overview]
Message-ID: <bug-101886-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 101886
           Summary: [11/12 Regression][concepts] ICE with auto as template
                    parameter
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: reichelt at gcc dot gnu.org
  Target Milestone: ---

The following valid code snippet (compiled with "-fconcepts")
triggers an ICE since GCC 11.1.0:

========================================
template<typename...> struct A { };

A<int, int> a;
A<auto, auto> b1 = a;
A<auto, auto> b2 = a;
========================================

bug.cc:5:13: internal compiler error: same canonical type node for different
types 'auto' and 'auto'
    5 | A<auto, auto> b2 = a;
      |             ^
0xb4eb9d comptypes(tree_node*, tree_node*, int)
        ../../gcc-11.1.0/gcc/cp/typeck.c:1565
0xab322f template_args_equal(tree_node*, tree_node*, bool)
        ../../gcc-11.1.0/gcc/cp/pt.c:9231
0xb42e41 cp_tree_equal(tree_node*, tree_node*)
        ../../gcc-11.1.0/gcc/cp/tree.c:4079
0xab305a template_args_equal(tree_node*, tree_node*, bool)
        ../../gcc-11.1.0/gcc/cp/pt.c:9249
0xab2d88 template_args_equal(tree_node*, tree_node*, bool)
        ../../gcc-11.1.0/gcc/cp/pt.c:9194
0xab2d88 comp_template_args(tree_node*, tree_node*, tree_node**, tree_node**,
bool)
        ../../gcc-11.1.0/gcc/cp/pt.c:9278
0xab2d88 comp_template_args(tree_node*, tree_node*, tree_node**, tree_node**,
bool)
        ../../gcc-11.1.0/gcc/cp/pt.c:9258
0xabc9f3 spec_hasher::equal(spec_entry*, spec_entry*)
        ../../gcc-11.1.0/gcc/cp/pt.c:1727
0xb02944 hash_table<spec_hasher, false,
xcallocator>::find_with_hash(spec_entry* const&, unsigned int)
        ../../gcc-11.1.0/gcc/hash-table.h:923
0xaeef47 lookup_template_class_1
        ../../gcc-11.1.0/gcc/cp/pt.c:9889
0xaf0bfc lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
        ../../gcc-11.1.0/gcc/cp/pt.c:10244
0xb1914b finish_template_type(tree_node*, tree_node*, int)
        ../../gcc-11.1.0/gcc/cp/semantics.c:3581
0xa8a8eb cp_parser_template_id
        ../../gcc-11.1.0/gcc/cp/parser.c:17486
0xa8aadb cp_parser_class_name
        ../../gcc-11.1.0/gcc/cp/parser.c:24722
0xa81fda cp_parser_qualifying_entity
        ../../gcc-11.1.0/gcc/cp/parser.c:7002
0xa81fda cp_parser_nested_name_specifier_opt
        ../../gcc-11.1.0/gcc/cp/parser.c:6684
0xaa2e18 cp_parser_template_introduction
        ../../gcc-11.1.0/gcc/cp/parser.c:30254
0xaa50c3 cp_parser_declaration
        ../../gcc-11.1.0/gcc/cp/parser.c:14149
0xaa5e4c cp_parser_toplevel_declaration
        ../../gcc-11.1.0/gcc/cp/parser.c:14183
0xaa5e4c cp_parser_translation_unit
        ../../gcc-11.1.0/gcc/cp/parser.c:4942
Please submit a full bug report, [etc.]

             reply	other threads:[~2021-08-12 17:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-12 17:12 reichelt at gcc dot gnu.org [this message]
2021-08-12 20:28 ` [Bug c++/101886] " pinskia at gcc dot gnu.org
2021-08-13  7:49 ` [Bug c++/101886] [11/12 Regression][concepts] ICE with auto as template parameter since r11-7011-g6e0a231a4aa2407b marxin at gcc dot gnu.org
2022-01-17 13:54 ` rguenth at gcc dot gnu.org
2022-03-27 17:53 ` [Bug c++/101886] [11/12 Regression][concepts] ICE with auto as template argument " jason at gcc dot gnu.org
2022-04-21  7:50 ` [Bug c++/101886] [11/12 Regression][concepts TS] " rguenth at gcc dot gnu.org
2022-12-19 20:39 ` [Bug c++/101886] [11/12/13 " cvs-commit at gcc dot gnu.org
2022-12-19 20:40 ` [Bug c++/101886] [11/12 " ppalka at gcc dot gnu.org
2022-12-20 22:02 ` cvs-commit at gcc dot gnu.org
2023-02-25 16:34 ` ppalka at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-101886-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).