c_loc_tests_4.f03
来自「用于进行gcc测试」· F03 代码 · 共 16 行
F03
16 行
! { dg-do compile }module c_loc_tests_4 use, intrinsic :: iso_c_binding implicit nonecontains subroutine sub0() bind(c) integer(c_int), target, dimension(10) :: my_array integer(c_int), pointer, dimension(:) :: my_array_ptr type(c_ptr) :: my_c_ptr my_array_ptr => my_array my_c_ptr = c_loc(my_array_ptr) ! { dg-error "must be an associated scalar POINTER" } end subroutine sub0end module c_loc_tests_4
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?