diff options
author | pault <pault@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-27 18:23:14 +0000 |
---|---|---|
committer | pault <pault@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-27 18:23:14 +0000 |
commit | 74f588f2e509200e376dc02f2b7f96f67e634202 (patch) | |
tree | 5980c7b71db5312698ab4c49a4066d1da8d30e6b /gcc/fortran/resolve.c | |
parent | d6da74188fefd57b5ece013f625783f408163a9e (diff) | |
download | ppe42-gcc-74f588f2e509200e376dc02f2b7f96f67e634202.tar.gz ppe42-gcc-74f588f2e509200e376dc02f2b7f96f67e634202.zip |
2007-01-27 Paul Thomas <pault@gcc.gnu.org>
PR fortran/30407
* trans-expr.c (gfc_conv_operator_assign): New function.
* trans.h : Add prototype for gfc_conv_operator_assign.
* trans-stmt.c (gfc_trans_where_assign): Add a gfc_symbol for
a potential operator assignment subroutine. If it is non-NULL
call gfc_conv_operator_assign instead of the first assignment.
( gfc_trans_where_2): In the case of an operator assignment,
extract the argument expressions from the code for the
subroutine call and pass the symbol to gfc_trans_where_assign.
resolve.c (resolve_where, gfc_resolve_where_code_in_forall,
gfc_resolve_forall_body): Resolve the subroutine call for
operator assignments.
2007-01-27 Paul Thomas <pault@gcc.gnu.org>
PR fortran/30407
* gfortran.dg/where_operator_assign_1.f90: New test.
* gfortran.dg/where_operator_assign_2.f90: New test.
* gfortran.dg/where_operator_assign_3.f90: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121235 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r-- | gcc/fortran/resolve.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 526be48aa05..9a06a9820a3 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -4550,6 +4550,11 @@ resolve_where (gfc_code *code, gfc_expr *mask) "inconsistent shape", &cnext->expr->where); break; + + case EXEC_ASSIGN_CALL: + resolve_call (cnext); + break; + /* WHERE or WHERE construct is part of a where-body-construct */ case EXEC_WHERE: resolve_where (cnext, e); @@ -4750,6 +4755,11 @@ gfc_resolve_where_code_in_forall (gfc_code *code, int nvar, case EXEC_ASSIGN: gfc_resolve_assign_in_forall (cnext, nvar, var_expr); break; + + /* WHERE operator assignment statement */ + case EXEC_ASSIGN_CALL: + resolve_call (cnext); + break; /* WHERE or WHERE construct is part of a where-body-construct */ case EXEC_WHERE: @@ -4789,6 +4799,10 @@ gfc_resolve_forall_body (gfc_code *code, int nvar, gfc_expr **var_expr) gfc_resolve_assign_in_forall (c, nvar, var_expr); break; + case EXEC_ASSIGN_CALL: + resolve_call (c); + break; + /* Because the gfc_resolve_blocks() will handle the nested FORALL, there is no need to handle it here. */ case EXEC_FORALL: |