URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 154 |
Rev 816 |
! Tests WHERE satement with non-integer array in the mask expression
|
! Tests WHERE satement with non-integer array in the mask expression
|
program where_5
|
program where_5
|
integer, dimension(5) :: a
|
integer, dimension(5) :: a
|
real(kind=8), dimension(5) :: b
|
real(kind=8), dimension(5) :: b
|
|
|
a = (/1, 2, 3, 4, 5/)
|
a = (/1, 2, 3, 4, 5/)
|
b = (/1d0, 0d0, 1d0, 0d0, 1d0/)
|
b = (/1d0, 0d0, 1d0, 0d0, 1d0/)
|
|
|
where (b .ne. 0d0)
|
where (b .ne. 0d0)
|
a(:) = a(:) + 10
|
a(:) = a(:) + 10
|
endwhere
|
endwhere
|
if (any (a .ne. (/11, 2, 13, 4, 15/))) call abort
|
if (any (a .ne. (/11, 2, 13, 4, 15/))) call abort
|
end program
|
end program
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.