2 ! { dg-options "-std=f2008" }
7 ! OPTIONAL + BIND(C) is allowed since TS 29113
11 subroutine sub(z
) bind(C
)
13 integer(c_int
), value
:: z
17 subroutine sub2(z
) bind(C
) ! { dg-error "with OPTIONAL attribute in procedure" }
19 integer(c_int
), optional
:: z
23 subroutine sub2a(z
) bind(C
) ! { dg-error "with OPTIONAL attribute in procedure" }
30 subroutine sub2b(z
) bind(C
) ! { dg-error "with OPTIONAL attribute in procedure" }
37 subroutine sub3(z
) bind(C
) ! { dg-error "cannot have both the OPTIONAL and the VALUE attribute" }
39 integer(c_int
), value
, optional
:: z
43 subroutine sub3a(z
) bind(C
) ! { dg-error "cannot have both the OPTIONAL and the VALUE attribute" }
51 subroutine sub3b(z
) bind(C
) ! { dg-error "cannot have both the OPTIONAL and the VALUE attribute" }
59 subroutine sub3c(z
) bind(C
) ! { dg-error "cannot have both the OPTIONAL and the VALUE attribute" }