re PR fortran/38863 (WHERE with multiple elemental defined assignments gives wrong...
authorPaul Thomas <pault@gcc.gnu.org>
Sun, 10 May 2009 07:23:30 +0000 (07:23 +0000)
committerPaul Thomas <pault@gcc.gnu.org>
Sun, 10 May 2009 07:23:30 +0000 (07:23 +0000)
commiteb74e79b1b2bc2d2d244c8c84a7c7ef293686546
tree515858a20177d34953f913624da9d1ef39065fb7
parenta34dda5b51c5242cf014e0fa47e6a230c98aff06
re PR fortran/38863 (WHERE with multiple elemental defined assignments gives wrong answer)

2009-05-10  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/38863
* trans-expr.c (gfc_conv_operator_assign): Remove function.
* trans.h : Remove prototype for gfc_conv_operator_assign.
* trans-stmt.c (gfc_conv_elemental_dependencies): Initialize
derivde types with intent(out).
(gfc_trans_call): Add mask, count1 and invert arguments. Add
code to use mask for WHERE assignments.
(gfc_trans_forall_1): Use new arguments for gfc_trans_call.
(gfc_trans_where_assign): The gfc_symbol argument is replaced
by the corresponding code. If this has a resolved_sym, then
gfc_trans_call is called. The call to gfc_conv_operator_assign
is removed.
(gfc_trans_where_2): Change the last argument in the call to
gfc_trans_where_assign.
* trans-stmt.h : Modify prototype for gfc_trans_call.
* trans.c (gfc_trans_code): Use new args for gfc_trans_call.

2009-05-10  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/38863
* gfortran.dg/dependency_24.f90: New test.
* gfortran.dg/dependency_23.f90: Clean up module files.

From-SVN: r147329
gcc/fortran/ChangeLog
gcc/fortran/trans-expr.c
gcc/fortran/trans-stmt.c
gcc/fortran/trans-stmt.h
gcc/fortran/trans.c
gcc/fortran/trans.h
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/dependency_23.f90
gcc/testsuite/gfortran.dg/dependency_23.f90.rej [new file with mode: 0644]
gcc/testsuite/gfortran.dg/dependency_24.f90 [new file with mode: 0644]