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

            Bug ID: 95455
           Summary: ICE in capture with initializer in requires block
           Product: gcc
           Version: 10.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bhalevy at gmail dot com
  Target Milestone: ---

Created attachment 48650
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48650&action=edit
Preprocessed source

Compiling the following code hits ICE, as follows:

testcase.cc:
void f() {
    int foo;
    requires () {
        [bar = foo] {};
    };
}

$ g++ --std=gnu++20 testcase.cc
testcase.cc: In function ‘void f()’:
testcase.cc:4:16: internal compiler error: Segmentation fault
    4 |         [bar = foo] {};
      |                ^~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/ccVYMnnA.out file, please attach this to
your bugreport.

Reply via email to