| 1 |
! { dg-do compile } |
| 2 |
! { dg-options "-std=f2008" } |
| 3 |
! |
| 4 |
! Contributed by Reinhold Bader |
| 5 |
! |
| 6 |
use iso_c_binding |
| 7 |
type, bind(C) :: cstruct |
| 8 |
integer :: i |
| 9 |
end type |
| 10 |
interface |
| 11 |
subroutine psub(this) bind(c, name='Psub') ! { dg-error "Fortran 2018: Variable 'this' at .1. with POINTER attribute in procedure 'psub' with BIND.C." } |
| 12 |
import :: c_float, cstruct |
| 13 |
real(c_float), pointer :: this(:) |
| 14 |
end subroutine psub |
| 15 |
subroutine psub2(that) bind(c, name='Psub2') ! { dg-error "Fortran 2018: Variable 'that' at .1. with ALLOCATABLE attribute in procedure 'psub2' with BIND.C." } |
| 16 |
import :: c_float, cstruct |
| 17 |
type(cstruct), allocatable :: that(:) |
| 18 |
end subroutine psub2 |
| 19 |
end interface |
| 20 |
end |