Debian Codegraph @

gcc/testsuite/gfortran.dg/c-interop/c524a.f90

raw
1 ! { dg-do compile }
2 ! { dg-additional-options "-fcoarray=single" }
3 !
4 ! TS 29113
5 ! C524a A coarray shall not be a dummy argument of a procedure that has
6 ! a proc-language-binding-spec.
7 !
8 ! This file contains code that is expected to produce errors.
9
10 module m
11
12 interface
13
14 ! No C binding, this should be OK.
15 subroutine s1 (x)
16 use ISO_C_BINDING
17 implicit none
18 integer(C_INT), codimension[*] :: x(:,:)
19 end subroutine
20
21 ! This one is bad.
22 subroutine s2 (x) bind (c) ! { dg-error "BIND\\(C\\)" }
23 use ISO_C_BINDING
24 implicit none
25 integer(C_INT), codimension[*] :: x(:,:)
26 end subroutine
27
28 end interface
29 end module
30