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

            Bug ID: 79461
           Summary: [C++1z] ICE when capturing a variable in a lambda in a
                    constexpr constructor
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hafnermorris at gmail dot com
  Target Milestone: ---

Created attachment 40717
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40717&action=edit
Minimal example code

The following example causes a segmentation fault in gcc 5, 6 and the current
trunk:

struct S {
  constexpr S(int i) {
    auto f = [i]{};
  }
};
int main() {}

on Compiler Explorer: https://godbolt.org/g/wlhJ5O

Compiled both with -std=c++14 and -std=c++1z, on a x86-64 Linux machine.

Reply via email to