This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, fortran] PR31011 - Incorrect error: parameter array sections
- From: "Paul Richard Thomas" <paul dot richard dot thomas at gmail dot com>
- To: fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Thu, 8 Mar 2007 07:25:51 +0100
- Subject: Re: [Patch, fortran] PR31011 - Incorrect error: parameter array sections
- References: <339c37f20703072222o3a3e57dfgbbe60d4e5aff96d@mail.gmail.com>
Sorry, the testcase was omitted
Paul
2007-03-08 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31011
* gfortran.dg/parameter_array_section_2.f90: New test.
! { dg-do run }
! { dg-options "-O" }
! Test the fix for PR31011 in which the length of the array sections
! with stride other than unity were incorrectly calculated.
!
! Contributed by <terry@chem.gu.se>
!
program PotentialMatrix
implicit none
real(kind=8),dimension(2),parameter::v2=(/1,2/)
real(kind=8),dimension(4),parameter::v4=(/1,2,3,4/)
if (any (v2*v4(1:3:2) .ne. (/1,6/))) call abort ()
if (any (v2*v4(3:1:-2) .ne. (/3,2/))) call abort ()
end