diff options
author | Mikael Morin <mikael@gcc.gnu.org> | 2012-08-03 16:00:50 +0000 |
---|---|---|
committer | Mikael Morin <mikael@gcc.gnu.org> | 2012-08-03 16:00:50 +0000 |
commit | 936ea7c7436c90aa56f93853268844dcfcf9499a (patch) | |
tree | ceffe7c109c6ef5e814ff6c615d356df62942461 | |
parent | de14bd678ac325906b8e9a9e5740cddfabe6fa0c (diff) |
fortran/
PR fortran/54166
* trans-array.c (set_loop_bounds): Access specinfo using spec_dim.
testsuite/
PR fortran/54166
* gfortran.dg/array_5.f90: New test.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@190130 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/fortran/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/fortran/trans-array.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/array_5.f90 | 24 |
4 files changed, 36 insertions, 2 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 90442800d54..fef8abad3ce 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2012-08-03 Mikael Morin <mikael@gcc.gnu.org> + + PR fortran/54166 + * trans-array.c (set_loop_bounds): Access specinfo using spec_dim. + 2012-08-02 Mikael Morin <mikael@gcc.gnu.org> PR fortran/48820 diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index 187eab01b00..ef25a36f107 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -4503,9 +4503,9 @@ set_loop_bounds (gfc_loopinfo *loop) else if (INTEGER_CST_P (info->start[dim]) && !INTEGER_CST_P (specinfo->start[spec_dim]) && integer_onep (info->stride[dim]) - == integer_onep (specinfo->stride[dim]) + == integer_onep (specinfo->stride[spec_dim]) && INTEGER_CST_P (info->stride[dim]) - == INTEGER_CST_P (specinfo->stride[dim])) + == INTEGER_CST_P (specinfo->stride[spec_dim])) loopspec[n] = ss; /* We don't work out the upper bound. else if (INTEGER_CST_P (info->finish[n]) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b7486f97c28..448dc5dc428 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-08-03 Mikael Morin <mikael@gcc.gnu.org> + + PR fortran/54166 + * gfortran.dg/array_5.f90: New test. + 2012-08-03 Marc Glisse <marc.glisse@inria.fr> PR tree-optimization/30318 diff --git a/gcc/testsuite/gfortran.dg/array_5.f90 b/gcc/testsuite/gfortran.dg/array_5.f90 new file mode 100644 index 00000000000..82ab243a6b1 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/array_5.f90 @@ -0,0 +1,24 @@ +! { dg-do compile } +! +! PR fortran/54166 +! There was an ICE while chosing the bounds to scalarize the FAIL line. +! +! Contributed by Koen Poppe <koen.poppe@cs.kuleuven.be> +! + +module ds_routines +contains + subroutine dsget(vertic,rstore) + real, dimension(:), intent(in out) :: rstore + real, dimension(:,:), intent(out) :: vertic + integer :: nrvert,point + nrvert = 4 + point = 26 + vertic(1,1:nrvert) = rstore(point+1:point+nrvert) ! FAIL + end subroutine dsget +end module ds_routines + +program ds_routines_program + use ds_routines + print *, "ok" +end program ds_routines_program |