This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/79461] New: [C++1z] ICE when capturing a variable in a lambda in a constexpr constructor
- From: "hafnermorris at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 10 Feb 2017 22:55:21 +0000
- Subject: [Bug c++/79461] New: [C++1z] ICE when capturing a variable in a lambda in a constexpr constructor
- Auto-submitted: auto-generated
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.