iso_c_binding_rename_2.f03
来自「用于进行gcc测试」· F03 代码 · 共 43 行
F03
43 行
! { dg-do run }! { dg-additional-sources iso_c_binding_rename_2_driver.c }module mod0 use, intrinsic :: iso_c_binding, only: c_ptr, c_associatedend module mod0module mod1 use mod0, my_c_ptr => c_ptr, my_c_associated => c_associatedend module mod1module mod2contains subroutine sub2(my_ptr1) bind(c) use mod1, my_c_ptr_2 => my_c_ptr, my_c_associated_2 => my_c_associated implicit none type(my_c_ptr_2) :: my_ptr1 if( .not. my_c_associated_2(my_ptr1)) then call abort() end if end subroutine sub2 subroutine sub3(my_ptr1) bind(c) use mod1, my_c_ptr_2 => my_c_ptr implicit none type(my_c_ptr_2) :: my_ptr1 if( .not. my_c_associated(my_ptr1)) then call abort() end if end subroutine sub3 subroutine sub4(my_ptr1) bind(c) use mod1, my_c_associated_3 => my_c_associated implicit none type(my_c_ptr) :: my_ptr1 if( .not. my_c_associated_3(my_ptr1)) then call abort() end if end subroutine sub4end module mod2! { dg-final { cleanup-modules "mod0 mod1 mod2" } }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?