URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [cmplx.f90] - Rev 695
Compare with Previous | Blame | View Log
! Test complex munbersprogram testcmplximplicit nonecomplex(kind=4) c, dcomplex(kind=8) zreal(kind=4) x, yreal(kind=8) q! cmplx intrinsicx = 3y = 4c = cmplx(x,y)if (c .ne. (3.0, 4.0)) call abortx = 4y = 3z = cmplx(x, y, 8)if (z .ne. (4.0, 3.0)) call abortz = cif (z .ne. (3.0, 4.0)) call abort! dcmplx intrinsicx = 3y = 4z = dcmplx (x, y)if (z .ne. (3.0, 4.0)) call abort! conjucates and aimagc = (1.0, 2.0)c = conjg (c)x = aimag (c)if (abs (c - (1.0, -2.0)) .gt. 0.001) call abortif (x .ne. -2.0) call abortz = (2.0, 1.0)z = conjg (z)q = aimag (z)if (z .ne. (2.0, -1.0)) call abortif (q .ne. -1.0) call abort! addition, subtraction and multiplicationc = (1, 3)d = (5, 2)if (c + d .ne. ( 6, 5)) call abortif (c - d .ne. (-4, 1)) call abortif (c * d .ne. (-1, 17)) call abort! test for constant foldingif ((35.,-10.)**0.NE.(1.,0.)) call abortend program
