re PR fortran/35756 (incorrect WHERE for functions in ELSEWHERE and overlaps)
authorPaul Thomas <pault@gcc.gnu.org>
Fri, 16 May 2008 21:12:04 +0000 (21:12 +0000)
committerPaul Thomas <pault@gcc.gnu.org>
Fri, 16 May 2008 21:12:04 +0000 (21:12 +0000)
commitae772c2de32aad49c4142f82af3596d70f2ce3a3
tree1093b61ac07227cf4b57472af9c0dc65b46ec8a1
parenta4cd1610eacd66049c22244a1d38e024d57af989
re PR fortran/35756 (incorrect WHERE for functions in ELSEWHERE and overlaps)

2008-05-16  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/35756
PR fortran/35759
* trans-stmt.c (gfc_trans_where): Tighten up the dependency
check for calling gfc_trans_where_3.

PR fortran/35743
* trans-stmt.c (gfc_trans_where_2): Set the mask size to zero
if it is calculated to be negative.

PR fortran/35745
* trans-stmt.c (gfc_trans_where_3, gfc_trans_where_assign): Set
ss->where for scalar right hand sides.
* trans-array.c (gfc_add_loop_ss_code): If ss->where is set do
not evaluate scalars outside the loop.  Clean up whitespace.
* trans.h : Add a bitfield 'where' to gfc_ss.

2008-05-16  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/35756
PR fortran/35759
* gfortran.dg/where_1.f90: New test.

PR fortran/35743
PR fortran/35745
* gfortran.dg/where_2.f90: New test.

From-SVN: r135443
gcc/fortran/ChangeLog
gcc/fortran/trans-array.c
gcc/fortran/trans-stmt.c
gcc/fortran/trans.h
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/where_1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/where_2.f90 [new file with mode: 0644]