bind_c_usage_11.f03

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

F03
51
字号
! { dg-do compile }! { dg-options "-std=gnu" }! PR fortran/34133!! The compiler should accept internal procedures with BIND(c) attribute! for STD GNU / Fortran 2008.!subroutine foo() bind(c)contains  subroutine bar() bind (c)  end subroutine barend subroutine foosubroutine foo2() bind(c)  use iso_c_bindingcontains  integer(c_int) function barbar() bind (c)    barbar = 1  end function barbarend subroutine foo2function one() bind(c)  use iso_c_binding  integer(c_int) :: one  one = 1contains  integer(c_int) function two() bind (c)    two = 1  end function twoend function onefunction one2() bind(c)  use iso_c_binding  integer(c_int) :: one2  one2 = 1contains  subroutine three() bind (c)  end subroutine threeend function one2program main  use iso_c_binding  implicit nonecontains  subroutine test() bind(c)  end subroutine test  integer(c_int) function test2() bind (c)    test2 = 1  end function test2end program main

⌨️ 快捷键说明

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