summaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-openmp.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2007-11-28 19:43:03 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2007-11-28 19:43:03 +0000
commitceeda7344ece7ee673d89cf7f899c99aaa528d0e (patch)
tree983d51c5ea1343eb0959c7bdd9ac398b2bed5efa /gcc/fortran/trans-openmp.c
parentcfbfdd6655bcd8bd315dd2aae9006812701c4fab (diff)
* trans-expr.c (gfc_trans_string_copy): Convert both dest and
src to void *. PR fortran/34247 * trans-openmp.c (gfc_omp_privatize_by_reference): For REFERENCE_TYPE pass by reference only PARM_DECLs or non-artificial decls. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130492 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/trans-openmp.c')
-rw-r--r--gcc/fortran/trans-openmp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/fortran/trans-openmp.c b/gcc/fortran/trans-openmp.c
index 047c2b82ca52..ea595a0f70f2 100644
--- a/gcc/fortran/trans-openmp.c
+++ b/gcc/fortran/trans-openmp.c
@@ -44,7 +44,8 @@ gfc_omp_privatize_by_reference (const_tree decl)
{
tree type = TREE_TYPE (decl);
- if (TREE_CODE (type) == REFERENCE_TYPE)
+ if (TREE_CODE (type) == REFERENCE_TYPE
+ && (!DECL_ARTIFICIAL (decl) || TREE_CODE (decl) == PARM_DECL))
return true;
if (TREE_CODE (type) == POINTER_TYPE)