From 2b813b90d639d9072233cd039f3d9b92d4070cfb Mon Sep 17 00:00:00 2001 From: "coadde [Márcio Alexandre Silva Delgado]" Date: Sat, 15 Mar 2014 06:53:44 -0300 Subject: add [cross-gcc] to [cross] repo --- cross/cross-gcc/gcc-4.8-lambda-ICE.patch | 35 ++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 cross/cross-gcc/gcc-4.8-lambda-ICE.patch (limited to 'cross/cross-gcc/gcc-4.8-lambda-ICE.patch') diff --git a/cross/cross-gcc/gcc-4.8-lambda-ICE.patch b/cross/cross-gcc/gcc-4.8-lambda-ICE.patch new file mode 100644 index 000000000..cf77a9b35 --- /dev/null +++ b/cross/cross-gcc/gcc-4.8-lambda-ICE.patch @@ -0,0 +1,35 @@ +diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c +index 0b8e2f7..ad1c209 100644 +--- a/gcc/cp/semantics.c ++++ b/gcc/cp/semantics.c +@@ -2719,8 +2719,10 @@ finish_member_declaration (tree decl) + /*friend_p=*/0); + } + } +- /* Enter the DECL into the scope of the class. */ +- else if (pushdecl_class_level (decl)) ++ /* Enter the DECL into the scope of the class, if the class ++ isn't a closure (whose fields are supposed to be unnamed). */ ++ else if (CLASSTYPE_LAMBDA_EXPR (current_class_type) ++ || pushdecl_class_level (decl)) + { + if (TREE_CODE (decl) == USING_DECL) + { +diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C +new file mode 100644 +index 0000000..df2b037 +--- /dev/null ++++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C +@@ -0,0 +1,9 @@ ++// PR c++/56710 ++// { dg-options "-std=c++11 -Wall" } ++ ++int main() ++{ ++ int t = 0; ++ return [&]() -> int {int __t; __t = t; return __t; }(); ++ return [&t]() -> int {int __t; __t = t; return __t; }(); ++} +-- +1.8.4.2 + -- cgit v1.2.3