c_loc_test.f90
来自「用于进行gcc测试」· F90 代码 · 共 25 行
F90
25 行
! { dg-do run }! { dg-additional-sources c_loc_driver.c }module c_loc_testimplicit nonecontains subroutine test0() bind(c) use, intrinsic :: iso_c_binding implicit none integer, target :: x type(c_ptr) :: my_c_ptr interface subroutine test_address(x, expected_value) bind(c) use, intrinsic :: iso_c_binding type(c_ptr), value :: x integer(c_int), value :: expected_value end subroutine test_address end interface x = 100 my_c_ptr = c_loc(x) call test_address(my_c_ptr, 100) end subroutine test0end module c_loc_test! { dg-final { cleanup-modules "c_loc_test" } }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?