public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gwangi.kali at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/107522] New: ICE in parameter_mapping_equivalent_p on trunk
Date: Fri, 04 Nov 2022 04:33:45 +0000	[thread overview]
Message-ID: <bug-107522-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 107522
           Summary: ICE in parameter_mapping_equivalent_p on trunk
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gwangi.kali at gmail dot com
  Target Milestone: ---

Live Example: https://godbolt.org/z/sqTaMnYva
Command Line Args: -std=c++20
Version: Trunk

```cpp
enum class Enum { A, B };

template<Enum E>
class Class
{
public:
    template<enum Enum E2 = E>
    Class() requires (E2 == Enum::A);
};

template<>
template<enum Enum E2>
Class<Enum::A>::Class() requires (E2 == Enum::A)
{}

int main()
{
    Class<Enum::A>{};
    return 0;
}
```

```bash
Could not execute the program
Compiler returned: 1
Compiler stderr
<source>: In instantiation of 'Class<E>::Class() requires  E2 == Enum::A [with
Enum E2 = Enum::A; Enum E = Enum::A]':
<source>:18:20:   required from here
<source>:18:20: internal compiler error: in parameter_mapping_equivalent_p, at
cp/constraint.cc:615
   18 |     Class<Enum::A>{};
      |                    ^
0x236fd8e internal_error(char const*, ...)
        ???:0
0xaa5338 fancy_abort(char const*, int, char const*)
        ???:0
0xb21e30 sat_hasher::equal(sat_entry*, sat_entry*)
        ???:0
0xb22b7c hash_table<sat_hasher, false,
xcallocator>::find_slot_with_hash(sat_entry* const&, unsigned int,
insert_option)
        ???:0
0xb1c8b3 satisfaction_cache::satisfaction_cache(tree_node*, tree_node*,
sat_info)
        ???:0
0xb21202 constraints_satisfied_p(tree_node*, tree_node*)
        ???:0
0xad1f2a build_new_method_call(tree_node*, tree_node*, vec<tree_node*, va_gc,
vl_embed>**, tree_node*, int, tree_node**, int)
        ???:0
0xad23d7 build_special_member_call(tree_node*, tree_node*, vec<tree_node*,
va_gc, vl_embed>**, tree_node*, int, int)
        ???:0
0xad9d70 perform_direct_initialization_if_possible(tree_node*, tree_node*,
bool, int)
        ???:0
0xd4c672 cp_build_c_cast(unsigned int, tree_node*, tree_node*, int)
        ???:0
0xd554b6 build_functional_cast(unsigned int, tree_node*, tree_node*, int)
        ???:0
0xcf72ef finish_compound_literal(tree_node*, tree_node*, int, fcl_t)
        ???:0
0xc80597 c_parse_file()
        ???:0
0xdbdde9 c_common_parse_file()
        ???:0
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
```

                 reply	other threads:[~2022-11-04  4:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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-107522-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).