This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gfortran] Testsuite fix


Following patch fixes illegal code in testsuite.

Applied to tree-ssa branch

Paul


2003-08-12  Paul Brook  <paul@nowt.org>

	* gfortran.fortran-torture/execute/forall_4.f90: Fix illegal code.

diff -crpxCVS 
tree-ssa/gcc/testsuite/gfortran.fortran-torture/execute/forall_4.f90 
gcc/gcc/testsuite/gfortran.fortran-torture/execute/forall_4.f90
*** tree-ssa/gcc/testsuite/gfortran.fortran-torture/execute/forall_4.f90
--- gcc/gcc/testsuite/gfortran.fortran-torture/execute/forall_4.f90	
***************
*** 1,24 ****
! !program to test nested forall
  program forall2
    implicit none
!   integer a(4,4,4)
!   integer i, j, k, m, n
!   do i=1,4
!     do j=1,4
!       do k=1,4
!         a(k,j,i) = i+j+k
!       enddo
!     enddo
!   enddo
!   m=2
    n=4
    k=1
!   forall (i=k+1:n)
!    forall (j=k:i+1)
!      a(i,j,1:4) = a(i-1,j,1:4)+2
     end forall
    end forall
!   if (any (a.ne.reshape ((/3,5,6,7,4,6,7,8,5,7,8,9,6,7,9,10,4,6,7,8,&
!      5,7,8,9,6,8,9,10,7,8,10,11,5,7,8,9,6,8,9,10,7,9,10,11,8,9,11,12,&
!      6,8,9,10,7,9,10,11,8,10,11,12,9,10,12,13/),(/4,4,4/)))) call abort
  end
--- 1,27 ----
! ! Program to test nested forall
  program forall2
    implicit none
!   integer a(4,4,2)
!   integer i, j, k, n
! 
!   a(:,:,1) = reshape((/ 1, 2, 3, 4,&
!                         5, 6, 7, 8,&
!                         9,10,11,12,&
!                        13,14,15,16/), (/4,4/))
!   a(:,:,2) = a(:,:,1) + 16
    n=4
    k=1
!   ! Mirror half the matrix
!   forall (i=k:n)
!    forall (j=1:5-i)
!      a(i,j,:) = a(j,i,:)
     end forall
    end forall
! 
!   if (any (a(:,:,1) & 
!       .ne. reshape((/ 1, 5, 9,13,&
!                       2, 6,10, 8,&
!                       3, 7,11,12,&
!                       4,14,15,16/),(/4,4/)))) call abort
!   if (any (a(:,:,2) .ne. a(:,:,1) + 16)) call abort
  end


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]