diff options
author | mikael <mikael@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-07-05 15:18:26 +0000 |
---|---|---|
committer | mikael <mikael@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-07-05 15:18:26 +0000 |
commit | 76d620d3b2af065fcf22dd73022de0ba200846c0 (patch) | |
tree | 1ca2c1ab5da74b67f394e1aa8407772a8b3c76a0 /gcc/fortran | |
parent | 69435ea2eeeae9f1a5d61035ac411a98ae258eb4 (diff) | |
download | gcc-76d620d3b2af065fcf22dd73022de0ba200846c0.tar.gz |
fortran/
PR fortran/53732
* trans-array.c (gfc_add_loop_ss_code): Disable self recursive calls
handling nested loop(s) if the subscript flag is true.
testsuite/
PR fortran/53732
* gfortran.dg/inline_sum_4.f90: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189292 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/trans-array.c | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 2b0483522a4..3d85f29fd82 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2012-07-05 Mikael Morin <mikael@gcc.gnu.org> + + PR fortran/53732 + * trans-array.c (gfc_add_loop_ss_code): Disable self recursive calls + handling nested loop(s) if the subscript flag is true. + 2012-07-05 Uros Bizjak <ubizjak@gmail.com> PR fortran/53449 diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index f135af1ef30..d289ac30a99 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -2398,7 +2398,6 @@ gfc_add_loop_ss_code (gfc_loopinfo * loop, gfc_ss * ss, bool subscript, gfc_ss_info *ss_info; gfc_array_info *info; gfc_expr *expr; - bool skip_nested = false; int n; /* Don't evaluate the arguments for realloc_lhs_loop_for_fcn_call; otherwise, @@ -2487,12 +2486,7 @@ gfc_add_loop_ss_code (gfc_loopinfo * loop, gfc_ss * ss, bool subscript, /* Add the expressions for scalar and vector subscripts. */ for (n = 0; n < GFC_MAX_DIMENSIONS; n++) if (info->subscript[n]) - { - gfc_add_loop_ss_code (loop, info->subscript[n], true, where); - /* The recursive call will have taken care of the nested loops. - No need to do it twice. */ - skip_nested = true; - } + gfc_add_loop_ss_code (loop, info->subscript[n], true, where); set_vector_loop_bounds (ss); break; @@ -2548,7 +2542,7 @@ gfc_add_loop_ss_code (gfc_loopinfo * loop, gfc_ss * ss, bool subscript, } } - if (!skip_nested) + if (!subscript) for (nested_loop = loop->nested; nested_loop; nested_loop = nested_loop->next) gfc_add_loop_ss_code (nested_loop, nested_loop->ss, subscript, where); |