OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [where_3.f90] - Diff between revs 303 and 384

Only display areas with differences | Details | Blame | View Log

Rev 303 Rev 384
! Program to test WHERE on unknown size arrays
! Program to test WHERE on unknown size arrays
program where_3
program where_3
   integer A(10, 2)
   integer A(10, 2)
   A = 0
   A = 0
   call sub(A)
   call sub(A)
contains
contains
subroutine sub(B)
subroutine sub(B)
   integer, dimension(:, :) :: B
   integer, dimension(:, :) :: B
   B(1:5, 1) = 0
   B(1:5, 1) = 0
   B(6:10, 1) = 5
   B(6:10, 1) = 5
   where (B(:,1)>0)
   where (B(:,1)>0)
      B(:,1) = B(:,1) + 10
      B(:,1) = B(:,1) + 10
   endwhere
   endwhere
   if (any (B .ne. reshape ((/0, 0, 0, 0, 0, 15, 15, 15, 15, 15, &
   if (any (B .ne. reshape ((/0, 0, 0, 0, 0, 15, 15, 15, 15, 15, &
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0/), (/10, 2/)))) call abort
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0/), (/10, 2/)))) call abort
end subroutine
end subroutine
end program
end program
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.