diff options
author | pault <pault@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-09-10 17:13:29 +0000 |
---|---|---|
committer | pault <pault@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-09-10 17:13:29 +0000 |
commit | 2d7f294b11b38fefdd26206b3ed2f78795529d73 (patch) | |
tree | 4d0f643177dfce60aa763c608f0b349c0290cdd5 /gcc/fortran | |
parent | 0cd5eaae9b441c7bc73917e21ac76b59885cb7b7 (diff) | |
download | gcc-2d7f294b11b38fefdd26206b3ed2f78795529d73.tar.gz |
2006-09-10 Paul Thomas <pault@gcc.gnu.org>
PR fortran/28923
expr.c (find_array_section): Only use the array lower and upper
bounds for the start and end of the sections, where the expr is
NULL.
2006-09-10 Paul Thomas <pault@gcc.gnu.org>
PR libfortran/28923
gfortran.dg/array_initializer_2.f90: Fill in missing index start value.
gfortran.dg/array_initializer_3.f90: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116815 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/fortran/expr.c | 15 |
2 files changed, 11 insertions, 13 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 6fbec937292..5b622157398 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,4 +1,11 @@ -2006-09-09 Paul Thomas <pault@gcc.gnu.org> +2006-09-10 Paul Thomas <pault@gcc.gnu.org> + + PR fortran/28923 + expr.c (find_array_section): Only use the array lower and upper + bounds for the start and end of the sections, where the expr is + NULL. + +2006-09-10 Paul Thomas <pault@gcc.gnu.org> PR fortran/28914 * trans-array.c (gfc_trans_array_constructor_value): Create a temporary diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index b1f064d0720..5eef93978aa 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -1090,24 +1090,15 @@ find_array_section (gfc_expr *expr, gfc_ref *ref) if (begin) mpz_set (start[d], begin->value.integer); else - { - if (mpz_cmp_si (stride[d], 0) < 0) - mpz_set (start[d], upper->value.integer); - else - mpz_set (start[d], lower->value.integer); - } + mpz_set (start[d], lower->value.integer); + mpz_set (ctr[d], start[d]); /* Obtain the end value for the index. */ if (finish) mpz_set (end[d], finish->value.integer); else - { - if (mpz_cmp_si (stride[d], 0) < 0) - mpz_set (end[d], lower->value.integer); - else - mpz_set (end[d], upper->value.integer); - } + mpz_set (end[d], upper->value.integer); /* Separate 'if' because elements sometimes arrive with non-null end. */ |