aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-openmp.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/trans-openmp.cc')
-rw-r--r--gcc/fortran/trans-openmp.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/fortran/trans-openmp.cc b/gcc/fortran/trans-openmp.cc
index eb5870c..7633aee 100644
--- a/gcc/fortran/trans-openmp.cc
+++ b/gcc/fortran/trans-openmp.cc
@@ -2880,14 +2880,16 @@ gfc_trans_omp_clauses (stmtblock_t *block, gfc_omp_clauses *clauses,
continue;
}
- if (!n->sym->attr.referenced)
+ if (n->sym && !n->sym->attr.referenced)
continue;
tree node = build_omp_clause (input_location,
list == OMP_LIST_DEPEND
? OMP_CLAUSE_DEPEND
: OMP_CLAUSE_AFFINITY);
- if (n->expr == NULL || n->expr->ref->u.ar.type == AR_FULL)
+ if (n->sym == NULL) /* omp_all_memory */
+ OMP_CLAUSE_DECL (node) = null_pointer_node;
+ else if (n->expr == NULL || n->expr->ref->u.ar.type == AR_FULL)
{
tree decl = gfc_trans_omp_variable (n->sym, false);
if (gfc_omp_privatize_by_reference (decl))
@@ -5531,7 +5533,9 @@ gfc_trans_omp_depobj (gfc_code *code)
if (n)
{
tree var;
- if (n->expr && n->expr->ref->u.ar.type != AR_FULL)
+ if (!n->sym) /* omp_all_memory. */
+ var = null_pointer_node;
+ else if (n->expr && n->expr->ref->u.ar.type != AR_FULL)
{
gfc_init_se (&se, NULL);
if (n->expr->ref->u.ar.type == AR_ELEMENT)