diff options
author | Jakub Jelinek <jakub@redhat.com> | 2012-11-19 14:44:15 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2012-11-19 14:44:15 +0100 |
commit | abcc192bdb161171f2871a85de739b58f346548a (patch) | |
tree | a1b14e3bc152e0e0a1fbcddd45bfd1528f6ff4ce | |
parent | c293d490e44732b94dd2815586e9ccf84be4b715 (diff) | |
download | gcc-abcc192bdb161171f2871a85de739b58f346548a.zip gcc-abcc192bdb161171f2871a85de739b58f346548a.tar.gz gcc-abcc192bdb161171f2871a85de739b58f346548a.tar.bz2 |
re PR middle-end/54630 (GCC 4.8 --enable-languages=c build fails: Undefined symbols: ___cxa_guard_acquire and ___cxa_guard_release)
PR middle-end/54630
* tree-ssa-coalesce.c (coalesce_ssa_name): Remove static
keyword from ssa_name_hash var.
* class.c (fixed_type_or_null_ref_ht): New variable.
(fixed_type_or_null): Use it instead of local static ht.
From-SVN: r193620
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/class.c | 14 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 1 | ||||
-rw-r--r-- | gcc/tree-ssa-coalesce.c | 5 |
5 files changed, 23 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4109264..f181109 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2012-11-19 Jakub Jelinek <jakub@redhat.com> + + PR middle-end/54630 + * tree-ssa-coalesce.c (coalesce_ssa_name): Remove static + keyword from ssa_name_hash var. + 2012-11-19 Maxim Kuznetsov <maxim.kuznetsov@intel.com> Kirill Yukhin <kirill.yukhin@intel.com> Michael Zolotukhin <michael.v.zolotukhin@intel.com> diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 110cdc4..a4e76a6 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2012-11-19 Jakub Jelinek <jakub@redhat.com> + + PR middle-end/54630 + * class.c (fixed_type_or_null_ref_ht): New variable. + (fixed_type_or_null): Use it instead of local static ht. + 2012-11-17 Diego Novillo <dnovillo@google.com> Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec) diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 56fe1d1..2737cbc 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -6568,6 +6568,9 @@ finish_struct (tree t, tree attributes) return t; } +/* Hash table to avoid endless recursion when handling references. */ +static hash_table <pointer_hash <tree_node> > fixed_type_or_null_ref_ht; + /* Return the dynamic type of INSTANCE, if known. Used to determine whether the virtual function table is needed or not. @@ -6683,9 +6686,8 @@ fixed_type_or_null (tree instance, int *nonnull, int *cdtorp) else if (TREE_CODE (TREE_TYPE (instance)) == REFERENCE_TYPE) { /* We only need one hash table because it is always left empty. */ - static hash_table <pointer_hash <tree_node> > ht; - if (!ht.is_created ()) - ht.create (37); + if (!fixed_type_or_null_ref_ht.is_created ()) + fixed_type_or_null_ref_ht.create (37); /* Reference variables should be references to objects. */ if (nonnull) @@ -6697,15 +6699,15 @@ fixed_type_or_null (tree instance, int *nonnull, int *cdtorp) if (TREE_CODE (instance) == VAR_DECL && DECL_INITIAL (instance) && !type_dependent_expression_p_push (DECL_INITIAL (instance)) - && !ht.find (instance)) + && !fixed_type_or_null_ref_ht.find (instance)) { tree type; tree_node **slot; - slot = ht.find_slot (instance, INSERT); + slot = fixed_type_or_null_ref_ht.find_slot (instance, INSERT); *slot = instance; type = RECUR (DECL_INITIAL (instance)); - ht.remove_elt (instance); + fixed_type_or_null_ref_ht.remove_elt (instance); return type; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index dd5e69c..636de23 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,7 +1,6 @@ 2012-11-19 Tom de Vries <tom@codesourcery.com> PR rtl-optimization/55315 - * gcc.target/mips/pr55315.c: New test. 2012-11-17 Jakub Jelinek <jakub@redhat.com> diff --git a/gcc/tree-ssa-coalesce.c b/gcc/tree-ssa-coalesce.c index 35774a7..ce04fdf 100644 --- a/gcc/tree-ssa-coalesce.c +++ b/gcc/tree-ssa-coalesce.c @@ -1,5 +1,5 @@ /* Coalesce SSA_NAMES together for the out-of-ssa pass. - Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 + Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. Contributed by Andrew MacLeod <amacleod@redhat.com> @@ -1292,7 +1292,6 @@ coalesce_ssa_name (void) bitmap used_in_copies = BITMAP_ALLOC (NULL); var_map map; unsigned int i; - static hash_table <ssa_name_var_hash> ssa_name_hash; cl = create_coalesce_list (); map = create_outofssa_var_map (cl, used_in_copies); @@ -1301,6 +1300,8 @@ coalesce_ssa_name (void) so debug info remains undisturbed. */ if (!optimize) { + hash_table <ssa_name_var_hash> ssa_name_hash; + ssa_name_hash.create (10); for (i = 1; i < num_ssa_names; i++) { |