brintos

brintos / llvm-project-archived public Read only

0
0
Text · 642 B · c356c07 Raw
32 lines · plain
1!RUN: %flang -fc1 -fsyntax-only %s 2>&1 | FileCheck --allow-empty %s2module foo_mod3  use, intrinsic :: iso_fortran_env4  use, intrinsic :: iso_c_binding5  implicit none6 7  interface new_foo8    procedure :: foo_ctor9  end interface10 11contains12 13function foo_ctor(options) result(retval)14  implicit none15  integer, intent(in) :: options16  integer :: retval17 18  interface19!CHECK-NOT: error:20    subroutine new_foo(f, opt) bind(c, name='new_foo')21      import22      implicit none23      integer, intent(inout) :: f24      integer(c_int), intent(in) :: opt25    end subroutine26  end interface27 28  call new_foo(retval, options)29end function30 31end module32