From c0febbd3cdaff455175eddc99bb4adef5f4a4383 Mon Sep 17 00:00:00 2001 From: Mikael Morin Date: Thu, 2 Aug 2012 19:38:58 +0000 Subject: trans-array.c (set_loop_bounds): Allow non-array-section to be chosen using the stride and lower bound criteria. * trans-array.c (set_loop_bounds): Allow non-array-section to be chosen using the stride and lower bound criteria. From-SVN: r190097 --- gcc/fortran/ChangeLog | 5 +++++ gcc/fortran/trans-array.c | 11 ----------- 2 files changed, 5 insertions(+), 11 deletions(-) (limited to 'gcc/fortran') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 5f3038a..ce97f68 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,5 +1,10 @@ 2012-08-02 Mikael Morin + * trans-array.c (set_loop_bounds): Allow non-array-section to be + chosen using the stride and lower bound criteria. + +2012-08-02 Mikael Morin + * trans-array.c (set_loop_bounds): Remove useless dimension check. Don't update loopspec if it would loose the wanted stride criterion. diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index feb35df..b799e24 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -4444,22 +4444,11 @@ set_loop_bounds (gfc_loopinfo *loop) continue; } - /* TODO: Pick the best bound if we have a choice between a - function and something else. */ - if (ss_type == GFC_SS_FUNCTION) - { - loopspec[n] = ss; - continue; - } - /* Avoid using an allocatable lhs in an assignment, since there might be a reallocation coming. */ if (loopspec[n] && ss->is_alloc_lhs) continue; - if (ss_type != GFC_SS_SECTION) - continue; - if (!loopspec[n]) loopspec[n] = ss; /* Criteria for choosing a loop specifier (most important first): -- cgit v1.1