From 3968f33b6542cf20cf63cf49bfbc033bd2486295 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 12 Jun 2011 20:56:57 -0700 Subject: gcc-4.6.0: Bring in patches from FSF 4.6 branch This brings in new patches from 4.6 release branch updates the comment section of existing branch to not contain patch numbers. Tested build on qemu for arm ppc mips x86 and x86_64 Signed-off-by: Khem Raj --- .../gcc-4_6-branch-backports/0362-PR-c-47049.patch | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0362-PR-c-47049.patch (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0362-PR-c-47049.patch') diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0362-PR-c-47049.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0362-PR-c-47049.patch new file mode 100644 index 000000000..83e52a6cb --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0362-PR-c-47049.patch @@ -0,0 +1,62 @@ +From 6d713af63560a2a98ee2e13d52eb339b57387bc7 Mon Sep 17 00:00:00 2001 +From: jason +Date: Sat, 28 May 2011 03:22:31 +0000 +Subject: [PATCH] PR c++/47049 + * semantics.c (maybe_add_lambda_conv_op): Fix COMDAT sharing. + * decl.c (start_preparsed_function): Don't call comdat_linkage for + a template. + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@174377 138bc75d-0d04-0410-961f-82ee72b054a4 + +index 8395b2b..7e20009 100644 +--- a/gcc/cp/decl.c ++++ b/gcc/cp/decl.c +@@ -12425,6 +12425,7 @@ start_preparsed_function (tree decl1, tree attrs, int flags) + DECL_EXTERNAL (decl1) = 0; + + if (ctx != NULL_TREE && DECL_DECLARED_INLINE_P (ctx) ++ && !processing_template_decl + && TREE_PUBLIC (ctx)) + /* This is a function in a local class in an extern inline + function. */ +diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c +index b113626..cfd6cf0 100644 +--- a/gcc/cp/semantics.c ++++ b/gcc/cp/semantics.c +@@ -8518,7 +8518,7 @@ maybe_add_lambda_conv_op (tree type) + { + /* Put the thunk in the same comdat group as the call op. */ + struct cgraph_node *callop_node, *thunk_node; +- DECL_COMDAT_GROUP (statfn) = DECL_COMDAT_GROUP (callop); ++ DECL_COMDAT_GROUP (statfn) = cxx_comdat_group (callop); + callop_node = cgraph_node (callop); + thunk_node = cgraph_node (statfn); + gcc_assert (callop_node->same_comdat_group == NULL); +new file mode 100644 +index 0000000..12ffde7 +--- /dev/null ++++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template2.C +@@ -0,0 +1,20 @@ ++// PR c++/47049 ++// { dg-options -std=c++0x } ++ ++enum { E = 0, F = 1 }; ++template class S {}; ++template ++struct T ++{ ++ static void ++ foo (S *p) ++ { ++ S u; ++ [&u] ()->bool {} (); ++ } ++}; ++ ++int main() ++{ ++ T<0>().foo(0); ++} +-- +1.7.0.4 + -- cgit v1.2.3