aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/expr.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/expr.cc')
-rw-r--r--gcc/fortran/expr.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/fortran/expr.cc b/gcc/fortran/expr.cc
index 0753667..07e9bac 100644
--- a/gcc/fortran/expr.cc
+++ b/gcc/fortran/expr.cc
@@ -3836,7 +3836,13 @@ gfc_check_assign (gfc_expr *lvalue, gfc_expr *rvalue, int conform,
if (has_pointer && (ref == NULL || ref->next == NULL)
&& lvalue->symtree->n.sym->attr.data)
return true;
- else
+ /* Prevent the following error message for caf-single mode, because there
+ are no teams in single mode and the simplify returns a null then. */
+ else if (!(flag_coarray == GFC_FCOARRAY_SINGLE
+ && rvalue->ts.type == BT_DERIVED
+ && rvalue->ts.u.derived->from_intmod == INTMOD_ISO_FORTRAN_ENV
+ && rvalue->ts.u.derived->intmod_sym_id
+ == ISOFORTRAN_TEAM_TYPE))
{
gfc_error ("NULL appears on right-hand side in assignment at %L",
&rvalue->where);