diff options
author | Khem Raj <raj.khem@gmail.com> | 2011-06-12 20:56:57 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-06-14 14:37:31 +0100 |
commit | 3968f33b6542cf20cf63cf49bfbc033bd2486295 (patch) | |
tree | 2bdb5e2f692a3bd3ecadbf2b4c7dc9f54485c737 /meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0362-PR-c-47049.patch | |
parent | 022ca1d1357caafdfe23aa9ab82f90ba89b6942b (diff) | |
download | openembedded-core-3968f33b6542cf20cf63cf49bfbc033bd2486295.tar.gz openembedded-core-3968f33b6542cf20cf63cf49bfbc033bd2486295.tar.bz2 openembedded-core-3968f33b6542cf20cf63cf49bfbc033bd2486295.tar.xz openembedded-core-3968f33b6542cf20cf63cf49bfbc033bd2486295.zip |
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 <raj.khem@gmail.com>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0362-PR-c-47049.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0362-PR-c-47049.patch | 62 |
1 files changed, 62 insertions, 0 deletions
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 <jason@138bc75d-0d04-0410-961f-82ee72b054a4> +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 <int N, int M = ((N == 1) ? F : E)> class S {}; ++template <int N> ++struct T ++{ ++ static void ++ foo (S<N> *p) ++ { ++ S<N> u; ++ [&u] ()->bool {} (); ++ } ++}; ++ ++int main() ++{ ++ T<0>().foo(0); ++} +-- +1.7.0.4 + |