where_10.f90: New test case.
* gfortran.fortran-torture/execute/where_10.f90: New test case. * gfortran.fortran-torture/execute/where_11.f90: Likewise. * gfortran.fortran-torture/execute/where_12.f90: Likewise. * gfortran.fortran-torture/execute/where_13.f90: Likewise. * gfortran.fortran-torture/execute/where_14.f90: Likewise. * gfortran.fortran-torture/execute/where_15.f90: Likewise. * gfortran.fortran-torture/execute/where_16.f90: Likewise. From-SVN: r111204
This commit is contained in:
parent
a3543e3aad
commit
360057959a
8 changed files with 144 additions and 0 deletions
|
@ -1,3 +1,13 @@
|
|||
2006-02-16 Roger Sayle <roger@eyesopen.com>
|
||||
|
||||
* gfortran.fortran-torture/execute/where_10.f90: New test case.
|
||||
* gfortran.fortran-torture/execute/where_11.f90: Likewise.
|
||||
* gfortran.fortran-torture/execute/where_12.f90: Likewise.
|
||||
* gfortran.fortran-torture/execute/where_13.f90: Likewise.
|
||||
* gfortran.fortran-torture/execute/where_14.f90: Likewise.
|
||||
* gfortran.fortran-torture/execute/where_15.f90: Likewise.
|
||||
* gfortran.fortran-torture/execute/where_16.f90: Likewise.
|
||||
|
||||
2006-02-16 Jeff Law <law@redhat.com>
|
||||
|
||||
* gcc.dg/tree-ssa/vrp24.c: Update expected output.
|
||||
|
|
23
gcc/testsuite/gfortran.fortran-torture/execute/where_10.f90
Normal file
23
gcc/testsuite/gfortran.fortran-torture/execute/where_10.f90
Normal file
|
@ -0,0 +1,23 @@
|
|||
! Check whether conditional ELSEWHEREs work
|
||||
! (with final unconditional ELSEWHERE)
|
||||
program where_10
|
||||
integer :: a(5)
|
||||
integer :: b(5)
|
||||
|
||||
a = (/1, 2, 3, 4, 5/)
|
||||
b = (/0, 0, 0, 0, 0/)
|
||||
where (a .eq. 1)
|
||||
b = 3
|
||||
elsewhere (a .eq. 2)
|
||||
b = 1
|
||||
elsewhere (a .eq. 3)
|
||||
b = 4
|
||||
elsewhere (a .eq. 4)
|
||||
b = 1
|
||||
elsewhere
|
||||
b = 5
|
||||
endwhere
|
||||
if (any (b .ne. (/3, 1, 4, 1, 5/))) &
|
||||
call abort
|
||||
end program
|
||||
|
23
gcc/testsuite/gfortran.fortran-torture/execute/where_11.f90
Normal file
23
gcc/testsuite/gfortran.fortran-torture/execute/where_11.f90
Normal file
|
@ -0,0 +1,23 @@
|
|||
! Check whether conditional ELSEWHEREs work
|
||||
! (without unconditional ELSEWHERE)
|
||||
program where_11
|
||||
integer :: a(5)
|
||||
integer :: b(5)
|
||||
|
||||
a = (/1, 2, 3, 4, 5/)
|
||||
b = (/0, 0, 0, 0, 0/)
|
||||
where (a .eq. 1)
|
||||
b = 3
|
||||
elsewhere (a .eq. 2)
|
||||
b = 1
|
||||
elsewhere (a .eq. 3)
|
||||
b = 4
|
||||
elsewhere (a .eq. 4)
|
||||
b = 1
|
||||
elsewhere (a .eq. 5)
|
||||
b = 5
|
||||
endwhere
|
||||
if (any (b .ne. (/3, 1, 4, 1, 5/))) &
|
||||
call abort
|
||||
end program
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
! Check empty WHEREs work
|
||||
program where_12
|
||||
integer :: a(5)
|
||||
|
||||
a = (/1, 2, 3, 4, 5/)
|
||||
where (a .eq. 1)
|
||||
endwhere
|
||||
end program
|
||||
|
10
gcc/testsuite/gfortran.fortran-torture/execute/where_13.f90
Normal file
10
gcc/testsuite/gfortran.fortran-torture/execute/where_13.f90
Normal file
|
@ -0,0 +1,10 @@
|
|||
! Check empty WHERE and empty ELSEWHERE works
|
||||
program where_13
|
||||
integer :: a(5)
|
||||
|
||||
a = (/1, 2, 3, 4, 5/)
|
||||
where (a .eq. 2)
|
||||
elsewhere
|
||||
endwhere
|
||||
end program
|
||||
|
15
gcc/testsuite/gfortran.fortran-torture/execute/where_14.f90
Normal file
15
gcc/testsuite/gfortran.fortran-torture/execute/where_14.f90
Normal file
|
@ -0,0 +1,15 @@
|
|||
! Check whether an empty ELSEWHERE works
|
||||
program where_14
|
||||
integer :: a(5)
|
||||
integer :: b(5)
|
||||
|
||||
a = (/1, 2, 3, 4, 5/)
|
||||
b = (/0, 0, 0, 0, 0/)
|
||||
where (a .eq. 1)
|
||||
b = 3
|
||||
elsewhere
|
||||
endwhere
|
||||
if (any (b .ne. (/3, 0, 0, 0, 0/))) &
|
||||
call abort
|
||||
end program
|
||||
|
15
gcc/testsuite/gfortran.fortran-torture/execute/where_15.f90
Normal file
15
gcc/testsuite/gfortran.fortran-torture/execute/where_15.f90
Normal file
|
@ -0,0 +1,15 @@
|
|||
! Check whether an empty WHERE works
|
||||
program where_15
|
||||
integer :: a(5)
|
||||
integer :: b(5)
|
||||
|
||||
a = (/1, 2, 3, 4, 5/)
|
||||
b = (/0, 0, 0, 0, 0/)
|
||||
where (a .eq. 1)
|
||||
elsewhere
|
||||
b = 2
|
||||
endwhere
|
||||
if (any (b .ne. (/0, 2, 2, 2, 2/))) &
|
||||
call abort
|
||||
end program
|
||||
|
39
gcc/testsuite/gfortran.fortran-torture/execute/where_16.f90
Normal file
39
gcc/testsuite/gfortran.fortran-torture/execute/where_16.f90
Normal file
|
@ -0,0 +1,39 @@
|
|||
! Check whether nested WHEREs work
|
||||
program where_16
|
||||
integer :: a(9)
|
||||
integer :: b(9)
|
||||
integer :: c(9)
|
||||
|
||||
a = (/0, 0, 0, 1, 1, 1, 2, 2, 2/)
|
||||
b = (/0, 1, 2, 0, 1, 2, 0, 1, 2/)
|
||||
c = (/0, 0, 0, 0, 0, 0, 0, 0, 0/)
|
||||
|
||||
where (a .eq. 0)
|
||||
where (b .eq. 0)
|
||||
c = 1
|
||||
else where (b .eq. 1)
|
||||
c = 2
|
||||
else where
|
||||
c = 3
|
||||
endwhere
|
||||
elsewhere (a .eq. 1)
|
||||
where (b .eq. 0)
|
||||
c = 4
|
||||
else where (b .eq. 1)
|
||||
c = 5
|
||||
else where
|
||||
c = 6
|
||||
endwhere
|
||||
elsewhere
|
||||
where (b .eq. 0)
|
||||
c = 7
|
||||
else where (b .eq. 1)
|
||||
c = 8
|
||||
else where
|
||||
c = 9
|
||||
endwhere
|
||||
endwhere
|
||||
if (any (c .ne. (/1, 2, 3, 4, 5, 6, 7, 8, 9/))) &
|
||||
call abort
|
||||
end program
|
||||
|
Loading…
Add table
Reference in a new issue