pr32601.f03

来自「用于进行gcc测试」· F03 代码 · 共 29 行

F03
29
字号
! { dg-do compile }! { dg-options "-std=f2003" }! PR fortran/32601module pr32601use, intrinsic :: iso_c_binding, only: c_intcontains  function get_ptr()    integer(c_int), pointer :: get_ptr    integer(c_int), target :: x    get_ptr = x  end function get_ptrend module pr32601USE ISO_C_BINDING, only: c_null_ptr, c_ptr, c_locuse pr32601implicit nonetype(c_ptr) :: tt = c_null_ptr! Next two lines should be errors if -pedantic or -std=f2003print *, c_null_ptr, t  ! { dg-error "has PRIVATE components" }print *, t ! { dg-error "has PRIVATE components" }print *, c_loc(get_ptr()) ! { dg-error "has PRIVATE components" }end! { dg-final { cleanup-modules "pr32601" } }  

⌨️ 快捷键说明

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