aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraph.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2006-04-26 10:26:06 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2006-04-26 10:26:06 +0200
commit91b6c26dd2ca4426cb9dfa6faa83a984cd76bfe9 (patch)
tree26149ec9ebe19726864e8d6f097d26e4391d7e77 /gcc/cgraph.c
parent07ed51c9cee029feb2ad2f8431cbdc60ed395fe3 (diff)
downloadgcc-91b6c26dd2ca4426cb9dfa6faa83a984cd76bfe9.zip
gcc-91b6c26dd2ca4426cb9dfa6faa83a984cd76bfe9.tar.gz
gcc-91b6c26dd2ca4426cb9dfa6faa83a984cd76bfe9.tar.bz2
re PR c/26171 (#pragma omp threadprivate requires -funit-at-a-time)
PR c/26171 * cgraph.c (cgraph_varpool_finalize_decl): Don't call cgraph_varpool_assemble_pending_decls if -fopenmp, unless cgraph_global_info_ready. * testsuite/libgomp.c/pr26171.c: New test. From-SVN: r113271
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r--gcc/cgraph.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index 6a8ac08..301de31 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -886,7 +886,7 @@ cgraph_varpool_finalize_decl (tree decl)
if this function has already run. */
if (node->finalized)
{
- if (cgraph_global_info_ready || !flag_unit_at_a_time)
+ if (cgraph_global_info_ready || (!flag_unit_at_a_time && !flag_openmp))
cgraph_varpool_assemble_pending_decls ();
return;
}
@@ -901,7 +901,7 @@ cgraph_varpool_finalize_decl (tree decl)
there. */
else if (TREE_PUBLIC (decl) && !DECL_COMDAT (decl) && !DECL_EXTERNAL (decl))
cgraph_varpool_mark_needed_node (node);
- if (cgraph_global_info_ready || !flag_unit_at_a_time)
+ if (cgraph_global_info_ready || (!flag_unit_at_a_time && !flag_openmp))
cgraph_varpool_assemble_pending_decls ();
}