aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>2004-09-29 16:18:49 -0400
committerJason Merrill <jason@gcc.gnu.org>2004-09-29 16:18:49 -0400
commit08272b85285330a9b36c2766ea91468d609aff35 (patch)
tree07c73627ceb28a617532526516355f252dba34ac /gcc
parent26aed92305eabb36c383c9178e01a3e0a7d1e830 (diff)
downloadgcc-08272b85285330a9b36c2766ea91468d609aff35.zip
gcc-08272b85285330a9b36c2766ea91468d609aff35.tar.gz
gcc-08272b85285330a9b36c2766ea91468d609aff35.tar.bz2
revert accidental checkin
From-SVN: r88302
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/decl.c25
1 files changed, 8 insertions, 17 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 0b05467..3e394ab 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -5239,7 +5239,7 @@ expand_static_init (tree decl, tree init)
if (DECL_FUNCTION_SCOPE_P (decl))
{
/* Emit code to perform this initialization but once. */
- tree if_stmt = NULL_TREE, inner_if_stmt = NULL_TREE;
+ tree if_stmt, inner_if_stmt = NULL_TREE;
tree then_clause, inner_then_clause = NULL_TREE;
tree guard, guard_addr, guard_addr_list;
tree acquire_fn, release_fn, abort_fn;
@@ -5279,16 +5279,10 @@ expand_static_init (tree decl, tree init)
/* Create the guard variable. */
guard = get_guard (decl);
- /* This optimization isn't safe on targets which can reorder loads,
- via speculative execution, caching behavior or whatever. In that
- case we force synchronization in __cxa_guard_acquire. */
- if (!targetm.reorders_loads || !flag_threadsafe_statics)
- {
- /* Begin the conditional initialization. */
- if_stmt = begin_if_stmt ();
- finish_if_stmt_cond (get_guard_cond (guard), if_stmt);
- then_clause = begin_compound_stmt (BCS_NO_SCOPE);
- }
+ /* Begin the conditional initialization. */
+ if_stmt = begin_if_stmt ();
+ finish_if_stmt_cond (get_guard_cond (guard), if_stmt);
+ then_clause = begin_compound_stmt (BCS_NO_SCOPE);
if (flag_threadsafe_statics)
{
@@ -5351,12 +5345,9 @@ expand_static_init (tree decl, tree init)
finish_if_stmt (inner_if_stmt);
}
- if (!targetm.reorders_loads || !flag_threadsafe_statics)
- {
- finish_compound_stmt (then_clause);
- finish_then_clause (if_stmt);
- finish_if_stmt (if_stmt);
- }
+ finish_compound_stmt (then_clause);
+ finish_then_clause (if_stmt);
+ finish_if_stmt (if_stmt);
}
else
static_aggregates = tree_cons (init, decl, static_aggregates);