summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/bind_c_procs_4.f90
blob: 407d8bb9afc82ab2166e7806cd9a76d36583477f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
! { dg-do compile }
! PR fortran/95375 - ICE in add_use_op
! Contributed by G.Steinmetz

function f() result(n) bind(c)      ! { dg-error "not C interoperable" }
  class(*), allocatable :: n
end
program p
  interface
     function f() result(n) bind(c)
       integer :: n
     end
  end interface
  if ( f() /= 0 ) stop
end

! { dg-prune-output "Type mismatch" }