re PR fortran/30407 ([4.1 only] Elemental functions in WHERE assignments wrongly...
authorPaul Thomas <pault@gcc.gnu.org>
Sat, 27 Jan 2007 18:23:14 +0000 (18:23 +0000)
committerPaul Thomas <pault@gcc.gnu.org>
Sat, 27 Jan 2007 18:23:14 +0000 (18:23 +0000)
commita00b8d1a38973eb176d7932bb2bd6cf7e59c5495
tree5980c7b71db5312698ab4c49a4066d1da8d30e6b
parentea6244280b016b12843432c1381a2a9064f60d00
re PR fortran/30407 ([4.1 only] Elemental functions in WHERE assignments wrongly rejected)

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.

From-SVN: r121235
gcc/fortran/ChangeLog
gcc/fortran/resolve.c
gcc/fortran/trans-expr.c
gcc/fortran/trans-stmt.c
gcc/fortran/trans.h
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/where_operator_assign_1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/where_operator_assign_2.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/where_operator_assign_3.f90 [new file with mode: 0644]