URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [bind_c_dts.f90] - Rev 694
Compare with Previous | Blame | View Log
! { dg-do run }! { dg-additional-sources bind_c_dts_driver.c }module bind_c_dtsuse, intrinsic :: iso_c_bindingimplicit nonetype, bind(c) :: MYFTYPE_1integer(c_int) :: i, jreal(c_float) :: send type MYFTYPE_1TYPE, BIND(C) :: particleREAL(C_DOUBLE) :: x,vxREAL(C_DOUBLE) :: y,vyREAL(C_DOUBLE) :: z,vzREAL(C_DOUBLE) :: mEND TYPE particletype(myftype_1), bind(c, name="myDerived") :: myDerivedcontainssubroutine types_test(my_particles, num_particles) bind(c)integer(c_int), value :: num_particlestype(particle), dimension(num_particles) :: my_particlesinteger :: i! going to set the particle in the middle of the listi = num_particles / 2;my_particles(i)%x = my_particles(i)%x + .2d0my_particles(i)%vx = my_particles(i)%vx + .2d0my_particles(i)%y = my_particles(i)%y + .2d0my_particles(i)%vy = my_particles(i)%vy + .2d0my_particles(i)%z = my_particles(i)%z + .2d0my_particles(i)%vz = my_particles(i)%vz + .2d0my_particles(i)%m = my_particles(i)%m + .2d0myDerived%i = myDerived%i + 1myDerived%j = myDerived%j + 1myDerived%s = myDerived%s + 1.0;end subroutine types_testend module bind_c_dts! { dg-final { cleanup-modules "bind_c_dts" } }
