view gcc/testsuite/gfortran.dg/binding_label_tests_23.f90 @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 84e7813d76e9
children
line wrap: on
line source

! { dg-do run }
!
! PR fortran/48858
!
integer function foo(x)
  integer :: x
  STOP 1
  foo = 99
end function foo

integer function other() bind(C, name="bar")
  other = 42
end function other

program test
  interface
    integer function foo() bind(C, name="bar")
    end function foo
  end interface
  if (foo() /= 42) STOP 2  ! Ensure that the binding name is all what counts
end program test