diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-08 20:04:45 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-08 20:04:45 +0000 |
commit | e1a7ccb9f5caeb23dbe6e7c124a8d4213e98328f (patch) | |
tree | 1f9294de165086bb00dcf11817a395d75138daaa /gcc/omp-low.c | |
parent | 7ca4e853ae1e881881bcce36edf100a37dba4691 (diff) | |
download | gcc-e1a7ccb9f5caeb23dbe6e7c124a8d4213e98328f.tar.gz |
PR middle-end/39573
* omp-low.c (expand_omp_taskreg): Finalize taskreg static local_decls
variables.
* libgomp.c++/pr39573.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145772 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r-- | gcc/omp-low.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c index 551af4024b0..b0066ed1890 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -3412,6 +3412,14 @@ expand_omp_taskreg (struct omp_region *region) /* Declare local variables needed in CHILD_CFUN. */ block = DECL_INITIAL (child_fn); BLOCK_VARS (block) = list2chain (child_cfun->local_decls); + /* The gimplifier could record temporaries in parallel/task block + rather than in containing function's local_decls chain, + which would mean cgraph missed finalizing them. Do it now. */ + for (t = BLOCK_VARS (block); t; t = TREE_CHAIN (t)) + if (TREE_CODE (t) == VAR_DECL + && TREE_STATIC (t) + && !DECL_EXTERNAL (t)) + varpool_finalize_decl (t); DECL_SAVED_TREE (child_fn) = NULL; gimple_set_body (child_fn, bb_seq (single_succ (entry_bb))); TREE_USED (block) = 1; |