diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2008-05-16 21:12:04 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2008-05-16 21:12:04 +0000 |
commit | ae772c2de32aad49c4142f82af3596d70f2ce3a3 (patch) | |
tree | 1093b61ac07227cf4b57472af9c0dc65b46ec8a1 /gcc/fortran/trans.h | |
parent | a4cd1610eacd66049c22244a1d38e024d57af989 (diff) | |
download | gcc-ae772c2de32aad49c4142f82af3596d70f2ce3a3.zip gcc-ae772c2de32aad49c4142f82af3596d70f2ce3a3.tar.gz gcc-ae772c2de32aad49c4142f82af3596d70f2ce3a3.tar.bz2 |
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
Diffstat (limited to 'gcc/fortran/trans.h')
-rw-r--r-- | gcc/fortran/trans.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/fortran/trans.h b/gcc/fortran/trans.h index 0b431a5..ffd1b84 100644 --- a/gcc/fortran/trans.h +++ b/gcc/fortran/trans.h @@ -201,8 +201,9 @@ typedef struct gfc_ss /* This is used by assignments requiring temporaries. The bits specify which loops the terms appear in. This will be 1 for the RHS expressions, - 2 for the LHS expressions, and 3(=1|2) for the temporary. */ - unsigned useflags:2; + 2 for the LHS expressions, and 3(=1|2) for the temporary. The bit + 'where' suppresses precalculation of scalars in WHERE assignments. */ + unsigned useflags:2, where:1; } gfc_ss; #define gfc_get_ss() gfc_getmem(sizeof(gfc_ss)) |