From 137456439a3e92879acdda2a7e8fdff7c0c23142 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Wed, 10 Oct 2012 10:15:51 +0000 Subject: [PATCH] re PR c++/53741 (ICE on lambda calling static template member function with explicit template argument specification) 2012-10-10 Paolo Carlini PR c++/53741 * g++.dg/cpp0x/lambda/lambda-ice9.C: New. From-SVN: r192298 --- gcc/testsuite/ChangeLog | 5 +++++ .../g++.dg/cpp0x/lambda/lambda-ice9.C | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice9.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f72f59743914..fabb749561e4 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-10-10 Paolo Carlini + + PR c++/53741 + * g++.dg/cpp0x/lambda/lambda-ice9.C: New. + 2012-10-10 Paolo Carlini PR c++/50478 diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice9.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice9.C new file mode 100644 index 000000000000..0a88bc8752b6 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice9.C @@ -0,0 +1,18 @@ +// PR c++/53741 +// { dg-do compile { target c++11 } } + +struct X +{ + template static void bar() {} + + template void foo(T p) + { + [&] { bar(); }; + } +}; + +int main() +{ + X x; + x.foo(3); +} -- 2.47.2