diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2007-02-02 12:35:57 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2007-02-02 12:35:57 +0000 |
commit | d4feb3d31ab828db75f8d9848cd833de964a75a6 (patch) | |
tree | 0569867556e0d5a7bd437b89e86d54632a6fbed1 /libgfortran/io | |
parent | 47742ccdded540d6e157ce49f89ec4148cd27154 (diff) | |
download | gcc-d4feb3d31ab828db75f8d9848cd833de964a75a6.zip gcc-d4feb3d31ab828db75f8d9848cd833de964a75a6.tar.gz gcc-d4feb3d31ab828db75f8d9848cd833de964a75a6.tar.bz2 |
re PR fortran/30284 ([4.1 only] ICE in gfc_add_modify with internal reads)
2007-02-02 Paul Thomas <pault@gcc.gnu.org>
PR fortran/30284
PR fortran/30626
* trans-expr.c (gfc_conv_aliased_arg): Remove static attribute
from function and make sure that substring lengths are
translated.
(is_aliased_array): Remove static attribute.
* trans.c : Add prototypes for gfc_conv_aliased_arg and
is_aliased_array.
* trans-io.c (set_internal_unit): Add the post block to the
arguments of the function. Use is_aliased_array to check if
temporary is needed; if so call gfc_conv_aliased_arg.
(build_dt): Pass the post block to set_internal_unit and
add to the block after all io activiy is done.
2007-02-02 Paul Thomas <pault@gcc.gnu.org>
PR fortran/30284
PR fortran/30626
* io/transfer.c (init_loop_spec, next_array_record): Change to
lbound rather than unity base.
2007-02-02 Paul Thomas <pault@gcc.gnu.org>
PR fortran/30284
* gfortran.dg/arrayio_11.f90.f90: New test.
PR fortran/30626
* gfortran.dg/arrayio_12.f90.f90: New test.
From-SVN: r121500
Diffstat (limited to 'libgfortran/io')
-rw-r--r-- | libgfortran/io/transfer.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c index ddf5d00..a7632da 100644 --- a/libgfortran/io/transfer.c +++ b/libgfortran/io/transfer.c @@ -2013,7 +2013,7 @@ init_loop_spec (gfc_array_char *desc, array_loop_spec *ls) index = 1; for (i=0; i<rank; i++) { - ls[i].idx = 1; + ls[i].idx = desc->dim[i].lbound; ls[i].start = desc->dim[i].lbound; ls[i].end = desc->dim[i].ubound; ls[i].step = desc->dim[i].stride; @@ -2050,8 +2050,9 @@ next_array_record (st_parameter_dt *dtp, array_loop_spec *ls) else carry = 0; } - index = index + (ls[i].idx - 1) * ls[i].step; + index = index + (ls[i].idx - ls[i].start) * ls[i].step; } + return index; } |