URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [intrinsic_dotprod.f90] - Rev 762
Go to most recent revision | Compare with Previous | Blame | View Log
! Program to test the DOT_PRODUCT intrinsic
program testforall
implicit none
integer, dimension (3) :: a
integer, dimension (3) :: b
real, dimension(3) :: c
real r
complex, dimension (2) :: z1
complex, dimension (2) :: z2
complex z
a = (/1, 2, 3/);
b = (/4, 5, 6/);
c = (/4, 5, 6/);
if (dot_product(a, b) .ne. 32) call abort
r = dot_product(a, c)
if (abs(r - 32.0) .gt. 0.001) call abort
z1 = (/(1.0, 2.0), (2.0, 3.0)/)
z2 = (/(3.0, 4.0), (4.0, 5.0)/)
z = dot_product (z1, z2)
if (abs (z - (34.0, -4.0)) .gt. 0.001) call abort
end program
Go to most recent revision | Compare with Previous | Blame | View Log