This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/68278] New: internal compiler error with C++14 polymorphic lambda and type alias


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;
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]