diff options
author | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-02-05 16:59:48 +0000 |
---|---|---|
committer | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-02-05 16:59:48 +0000 |
commit | 8aea4f8685ac33029e707942e749aa3b9354d2ac (patch) | |
tree | 4d7681b4fef9f6aba6de19a89d61d4016e5ae202 /gcc/fortran | |
parent | 0119c7f2645e23ea7bc941636e7df39a06494a98 (diff) | |
download | gcc-8aea4f8685ac33029e707942e749aa3b9354d2ac.tar.gz |
* trans-stmt.c (gfc_evaluate_where_mask): Use LOGICAL*1 for WHERE
masks instead of LOGICAL*4.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110617 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/fortran/trans-stmt.c | 12 |
2 files changed, 13 insertions, 4 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 971a3699290..34f1cb2180f 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2006-02-05 Roger Sayle <roger@eyesopen.com> + + * trans-stmt.c (gfc_evaluate_where_mask): Use LOGICAL*1 for WHERE + masks instead of LOGICAL*4. + 2006-02-05 Jakub Jelinek <jakub@redhat.com> * resolve.c (resolve_symbol): Initialize constructor_expr to NULL. diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c index 5f431303275..eec00e62040 100644 --- a/gcc/fortran/trans-stmt.c +++ b/gcc/fortran/trans-stmt.c @@ -2639,6 +2639,7 @@ gfc_evaluate_where_mask (gfc_expr * me, forall_info * nested_forall_info, tree inner_size, size; stmtblock_t body, body1, inner_size_body; gfc_se lse, rse; + tree mask_type; tree count; tree tmpexpr; @@ -2652,9 +2653,12 @@ gfc_evaluate_where_mask (gfc_expr * me, forall_info * nested_forall_info, size = compute_overall_iter_number (nested_forall_info, inner_size, &inner_size_body, block); + /* As the mask array can be very big, prefer compact boolean types. */ + mask_type = gfc_get_logical_type (gfc_logical_kinds[0].kind); + /* Allocate temporary for where mask. */ - tmp = allocate_temp_for_forall_nest_1 (boolean_type_node, size, block, - &ptemp1); + tmp = allocate_temp_for_forall_nest_1 (mask_type, size, block, &ptemp1); + /* Record the temporary address in order to free it later. */ if (ptemp1) { @@ -2666,8 +2670,8 @@ gfc_evaluate_where_mask (gfc_expr * me, forall_info * nested_forall_info, } /* Allocate temporary for !mask. */ - ntmp = allocate_temp_for_forall_nest_1 (boolean_type_node, size, block, - &ptemp2); + ntmp = allocate_temp_for_forall_nest_1 (mask_type, size, block, &ptemp2); + /* Record the temporary in order to free it later. */ if (ptemp2) { |