This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/68278] New: internal compiler error with C++14 polymorphic lambda and type alias
- From: "pkeir at outlook dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 10 Nov 2015 19:59:35 +0000
- Subject: [Bug c++/68278] New: internal compiler error with C++14 polymorphic lambda and type alias
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68278
Bug ID: 68278
Summary: internal compiler error with C++14 polymorphic lambda
and type alias
Product: gcc
Version: 5.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: pkeir at outlook dot com
Target Milestone: ---
Created attachment 36682
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36682&action=edit
C++14 file which produces the internal compiler error
The C++14 code below produces an internal compiler error in tsubst_decl, at
cp/pt.c:10836 when compiled using:
g++ -std=c++14 poly_type_lambda_bug.cpp
with GCC 5.2.0. I'm using Ubuntu 15.04 (vivid). It compilers and runs with
clang version 3.8.0 (trunk 252425).
int main(int argc, char *argv[])
{
auto f = []() { return 1; };
auto q = [=](auto g) {
using type = decltype(g(f()));
};
q([](int x){ return x; });
return 0;
}