URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [bind_c_usage_24.f90] - Rev 705
Go to most recent revision | Compare with Previous | Blame | View Log
! { dg-do run }! { dg-additional-sources bind_c_usage_24_c.c }!! PR fortran/48858! PR fortran/48820!! TS 29113: BIND(C) with OPTIONAL!module muse iso_c_bindinginterfacesubroutine c_proc (is_present, var) bind(C)importlogical(c_bool), value :: is_presentinteger(c_int), optional :: varend subroutineend interfacecontainssubroutine subtest (is_present, var) bind(C)logical(c_bool), intent(in), value :: is_presentinteger(c_int), intent(inout), optional :: varif (is_present) thenif (.not. present (var)) call abort ()if (var /= 43) call abort ()var = -45elseif (present (var)) call abort ()end ifend subroutine subtestend module mprogram testuse mimplicit noneinteger :: valval = 4call c_proc (.false._c_bool)call c_proc (.true._c_bool, val)if (val /= 7) call abort ()end program test! { dg-final { cleanup-modules "m" } }
Go to most recent revision | Compare with Previous | Blame | View Log
