summaryrefslogtreecommitdiff
path: root/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0293-semantics.c-register_constexpr_fundef-Add-to-hash-ta.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2011-06-12 20:56:57 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-06-14 14:37:31 +0100
commit3968f33b6542cf20cf63cf49bfbc033bd2486295 (patch)
tree2bdb5e2f692a3bd3ecadbf2b4c7dc9f54485c737 /meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0293-semantics.c-register_constexpr_fundef-Add-to-hash-ta.patch
parent022ca1d1357caafdfe23aa9ab82f90ba89b6942b (diff)
downloadopenembedded-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/0293-semantics.c-register_constexpr_fundef-Add-to-hash-ta.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0293-semantics.c-register_constexpr_fundef-Add-to-hash-ta.patch81
1 files changed, 81 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0293-semantics.c-register_constexpr_fundef-Add-to-hash-ta.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0293-semantics.c-register_constexpr_fundef-Add-to-hash-ta.patch
new file mode 100644
index 000000000..f9562dd09
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0293-semantics.c-register_constexpr_fundef-Add-to-hash-ta.patch
@@ -0,0 +1,81 @@
+From cde341fe28d4f20956c917ac3f63f5be8d41a246 Mon Sep 17 00:00:00 2001
+From: jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Fri, 20 May 2011 19:02:26 +0000
+Subject: [PATCH] * semantics.c (register_constexpr_fundef): Add to hash table here.
+ (validate_constexpr_fundecl): Not here.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@173973 138bc75d-0d04-0410-961f-82ee72b054a4
+
+index 48b37cf..d019728 100644
+--- a/gcc/cp/semantics.c
++++ b/gcc/cp/semantics.c
+@@ -5459,9 +5459,6 @@ is_valid_constexpr_fn (tree fun, bool complain)
+ tree
+ validate_constexpr_fundecl (tree fun)
+ {
+- constexpr_fundef entry;
+- constexpr_fundef **slot;
+-
+ if (processing_template_decl || !DECL_DECLARED_CONSTEXPR_P (fun))
+ return NULL;
+ else if (DECL_CLONED_FUNCTION_P (fun))
+@@ -5474,21 +5471,6 @@ validate_constexpr_fundecl (tree fun)
+ return NULL;
+ }
+
+- /* Create the constexpr function table if necessary. */
+- if (constexpr_fundef_table == NULL)
+- constexpr_fundef_table = htab_create_ggc (101,
+- constexpr_fundef_hash,
+- constexpr_fundef_equal,
+- ggc_free);
+- entry.decl = fun;
+- entry.body = NULL;
+- slot = (constexpr_fundef **)
+- htab_find_slot (constexpr_fundef_table, &entry, INSERT);
+- if (*slot == NULL)
+- {
+- *slot = ggc_alloc_constexpr_fundef ();
+- **slot = entry;
+- }
+ return fun;
+ }
+
+@@ -5679,8 +5661,8 @@ build_constexpr_constructor_member_initializers (tree type, tree body)
+ tree
+ register_constexpr_fundef (tree fun, tree body)
+ {
+- constexpr_fundef *fundef = retrieve_constexpr_fundef (fun);
+- gcc_assert (fundef != NULL && fundef->body == NULL);
++ constexpr_fundef entry;
++ constexpr_fundef **slot;
+
+ if (DECL_CONSTRUCTOR_P (fun))
+ body = build_constexpr_constructor_member_initializers
+@@ -5711,7 +5693,22 @@ register_constexpr_fundef (tree fun, tree body)
+ require_potential_rvalue_constant_expression (body);
+ return NULL;
+ }
+- fundef->body = body;
++
++ /* Create the constexpr function table if necessary. */
++ if (constexpr_fundef_table == NULL)
++ constexpr_fundef_table = htab_create_ggc (101,
++ constexpr_fundef_hash,
++ constexpr_fundef_equal,
++ ggc_free);
++ entry.decl = fun;
++ entry.body = body;
++ slot = (constexpr_fundef **)
++ htab_find_slot (constexpr_fundef_table, &entry, INSERT);
++
++ gcc_assert (*slot == NULL);
++ *slot = ggc_alloc_constexpr_fundef ();
++ **slot = entry;
++
+ return fun;
+ }
+
+--
+1.7.0.4
+