summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/fortran/ChangeLog4
-rw-r--r--gcc/fortran/trans-array.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index d669f5aedf6..4ee062c23e7 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,5 +1,9 @@
2011-11-25 Mikael Morin <mikael@gcc.gnu.org>
+ * trans-array.c (set_loop_bounds): Remove dead conditions.
+
+2011-11-25 Mikael Morin <mikael@gcc.gnu.org>
+
PR fortran/51250
PR fortran/43829
* trans-array.c (gfc_trans_create_temp_array): Get dimension from
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c
index 943503a4274..ee8f89693b4 100644
--- a/gcc/fortran/trans-array.c
+++ b/gcc/fortran/trans-array.c
@@ -4341,9 +4341,9 @@ set_loop_bounds (gfc_loopinfo *loop)
}
/* Transform everything so we have a simple incrementing variable. */
- if (n < loop->dimen && integer_onep (info->stride[dim]))
+ if (integer_onep (info->stride[dim]))
info->delta[dim] = gfc_index_zero_node;
- else if (n < loop->dimen)
+ else
{
/* Set the delta for this section. */
info->delta[dim] = gfc_evaluate_now (loop->from[n], &loop->pre);