diff options
Diffstat (limited to 'gcc/fortran/interface.c')
-rw-r--r-- | gcc/fortran/interface.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c index 3f91f6b..f971586 100644 --- a/gcc/fortran/interface.c +++ b/gcc/fortran/interface.c @@ -4274,6 +4274,12 @@ gfc_extend_assign (gfc_code *c, gfc_namespace *ns) lhs = c->expr1; rhs = c->expr2; + /* Don't allow an intrinsic assignment with a BOZ rhs to be replaced. */ + if (c->op == EXEC_ASSIGN + && c->expr1->expr_type == EXPR_VARIABLE + && c->expr2->expr_type == EXPR_CONSTANT && c->expr2->ts.type == BT_BOZ) + return false; + /* Don't allow an intrinsic assignment to be replaced. */ if (lhs->ts.type != BT_DERIVED && lhs->ts.type != BT_CLASS && (rhs->rank == 0 || rhs->rank == lhs->rank) |