This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Patch, fortran] PR fortran/54166 ICE on array section (4.8 regression)
- From: Mikael Morin <mikael dot morin at sfr dot fr>
- To: gfortran <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 03 Aug 2012 16:18:37 +0200
- Subject: [Patch, fortran] PR fortran/54166 ICE on array section (4.8 regression)
Hello,
here is the fix for the regression I have introduced with my assumed
rank bounds patch.
Will test and commit as obvious.
Mikael
2012-08-02 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/54166
* gfortran.dg/array_5.f90: New test.
Index: trans-array.c
===================================================================
--- trans-array.c (révision 190099)
+++ trans-array.c (copie de travail)
@@ -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])
! { 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