Hi, I'm adding the below testcases for bugs already fixed in mainline and 4.8.x.
Thanks, Paolo. //////////////////
2014-03-18 Paolo Carlini <paolo.carl...@oracle.com> PR c++/54250 * g++.dg/cpp0x/lambda/lambda-ice12.C: New.
Index: g++.dg/cpp0x/constexpr-ice14.C =================================================================== --- g++.dg/cpp0x/constexpr-ice14.C (revision 0) +++ g++.dg/cpp0x/constexpr-ice14.C (working copy) @@ -0,0 +1,11 @@ +// PR c++/60305 +// { dg-do compile { target c++11 } } + +template<int I> int foo() { return I; } + +template<int... I> void bar() +{ + constexpr int (*X[])() = { foo<I>... }; +} + +template void bar<1,3,5>(); Index: g++.dg/cpp0x/lambda/lambda-ice12.C =================================================================== --- g++.dg/cpp0x/lambda/lambda-ice12.C (revision 0) +++ g++.dg/cpp0x/lambda/lambda-ice12.C (working copy) @@ -0,0 +1,15 @@ +// PR c++/54250 +// { dg-do compile { target c++11 } } + +struct T +{ + int a; + int foo() + { + return [&]()->int { + return [&](decltype(/*this->*/a) _)->int { + return 1; + }(a); + }(); + } +};
2014-03-18 Paolo Carlini <paolo.carl...@oracle.com> PR c++/60305 * g++.dg/cpp0x/constexpr-ice14.C: New.
Index: g++.dg/cpp0x/constexpr-ice14.C =================================================================== --- g++.dg/cpp0x/constexpr-ice14.C (revision 0) +++ g++.dg/cpp0x/constexpr-ice14.C (working copy) @@ -0,0 +1,11 @@ +// PR c++/60305 +// { dg-do compile { target c++11 } } + +template<int I> int foo() { return I; } + +template<int... I> void bar() +{ + constexpr int (*X[])() = { foo<I>... }; +} + +template void bar<1,3,5>();