mirror of git://gcc.gnu.org/git/gcc.git
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
This commit is contained in:
parent
07ed51c9ce
commit
91b6c26dd2
|
|
@ -1,5 +1,10 @@
|
||||||
2006-04-26 Jakub Jelinek <jakub@redhat.com>
|
2006-04-26 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR c/26171
|
||||||
|
* cgraph.c (cgraph_varpool_finalize_decl): Don't call
|
||||||
|
cgraph_varpool_assemble_pending_decls if -fopenmp, unless
|
||||||
|
cgraph_global_info_ready.
|
||||||
|
|
||||||
PR middle-end/26913
|
PR middle-end/26913
|
||||||
* tree-cfg.c (find_outermost_region_in_block): Handle RESX_EXPR.
|
* tree-cfg.c (find_outermost_region_in_block): Handle RESX_EXPR.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -886,7 +886,7 @@ cgraph_varpool_finalize_decl (tree decl)
|
||||||
if this function has already run. */
|
if this function has already run. */
|
||||||
if (node->finalized)
|
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 ();
|
cgraph_varpool_assemble_pending_decls ();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -901,7 +901,7 @@ cgraph_varpool_finalize_decl (tree decl)
|
||||||
there. */
|
there. */
|
||||||
else if (TREE_PUBLIC (decl) && !DECL_COMDAT (decl) && !DECL_EXTERNAL (decl))
|
else if (TREE_PUBLIC (decl) && !DECL_COMDAT (decl) && !DECL_EXTERNAL (decl))
|
||||||
cgraph_varpool_mark_needed_node (node);
|
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 ();
|
cgraph_varpool_assemble_pending_decls ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
2006-04-26 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR c/26171
|
||||||
|
* testsuite/libgomp.c/pr26171.c: New test.
|
||||||
|
|
||||||
2006-04-25 Richard Henderson <rth@redhat.com>
|
2006-04-25 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
PR libgomp/25865
|
PR libgomp/25865
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
/* PR c/26171 */
|
||||||
|
/* { dg-do run } */
|
||||||
|
/* { dg-options "-fopenmp" } */
|
||||||
|
/* { dg-require-effective-target tls_runtime } */
|
||||||
|
|
||||||
|
int thrv = 0;
|
||||||
|
#pragma omp threadprivate (thrv)
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
thrv = 1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue