aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/expr.c')
-rw-r--r--gcc/fortran/expr.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c
index c71c4a1..87ce3e5 100644
--- a/gcc/fortran/expr.c
+++ b/gcc/fortran/expr.c
@@ -1820,6 +1820,9 @@ gfc_check_assign (gfc_expr * lvalue, gfc_expr * rvalue, int conform)
if (gfc_numeric_ts (&lvalue->ts) && gfc_numeric_ts (&rvalue->ts))
return SUCCESS;
+ if (lvalue->ts.type == BT_LOGICAL && rvalue->ts.type == BT_LOGICAL)
+ return SUCCESS;
+
gfc_error ("Incompatible types in assignment at %L, %s to %s",
&rvalue->where, gfc_typename (&rvalue->ts),
gfc_typename (&lvalue->ts));