URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [f2c_1.f90] - Rev 816
Compare with Previous | Blame | View Log
! Make sure the f2c calling conventions work! { dg-do run }! { dg-options "-ff2c" }function f(x)f = xend function fcomplex function c(a,b)c = cmplx (a,b)end function cdouble complex function d(e,f)double precision e, fd = cmplx (e, f, kind(d))end function dsubroutine test_with_interface()interfacereal function f(x)real::xend function fend interfaceinterfacecomplex function c(a,b)real::a,bend function cend interfaceinterfacedouble complex function d(e,f)double precision::e,fend function dend interfacedouble precision z, wx = 8.625if (x /= f(x)) call abort ()y = f(x)if (x /= y) call abort ()a = 1.b = -1.if (c(a,b) /= cmplx(a,b)) call abort ()z = 1.w = -1.if (d(z,w) /= cmplx(z,w, kind(z))) call abort ()end subroutine test_with_interfaceexternal f, c, dreal fcomplex cdouble complex ddouble precision z, wx = 8.625if (x /= f(x)) call abort ()y = f(x)if (x /= y) call abort ()a = 1.b = -1.if (c(a,b) /= cmplx(a,b)) call abort ()z = 1.w = -1.if (d(z,w) /= cmplx(z,w, kind(z))) call abort ()call test_with_interface ()end
