⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 c_f_pointer_shape_test.f90

📁 用于进行gcc测试
💻 F90
字号:
! { dg-do compile }! verify that the compiler catches the error in the call to c_f_pointer ! because it is missing the required SHAPE parameter.  the SHAPE parameter ! is optional, in general, but must exist if given a fortran pointer ! to a non-zero rank object.  --Rickett, 09.26.06module c_f_pointer_shape_testcontains  subroutine test_0(myAssumedArray, cPtr)    use, intrinsic :: iso_c_binding    integer, dimension(*) :: myAssumedArray    integer, dimension(:), pointer :: myArrayPtr    integer, dimension(1:2), target :: myArray    type(c_ptr), value :: cPtr        myArrayPtr => myArray    call c_f_pointer(cPtr, myArrayPtr) ! { dg-error "Missing SHAPE parameter" }  end subroutine test_0end module c_f_pointer_shape_test

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -