summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_15.f90
blob: d3096c87e39e853710428fa131dbc082e73bb297 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
! { dg-do run { target c99_runtime } }
! { dg-additional-sources ISO_Fortran_binding_15.c }
!
! Test the fix for PR921233. The additional source is the main program.
!
! Contributed by Vipul Parekh  <parekhvs@gmail.com>
!
module m
  use, intrinsic :: iso_c_binding, only : c_int
contains
  subroutine Fsub( dat ) bind(C, name="Fsub")
    integer(c_int), allocatable, intent(out) :: dat(..)
    select rank (dat)
      rank (0)
      allocate( dat )
      dat = 42
    end select
    return
  end subroutine
end module m