PR ipa/83051
[official-gcc.git] / gcc / testsuite / gfortran.dg / bind_c_usage_28.f90
blobbb9b5e85f7d85c530d622ade88185983a51d90cf
1 ! { dg-do compile }
2 ! { dg-options "-std=f2008" }
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 "TS 29113/TS 18508: 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 "TS 29113/TS 18508: 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