2 ! { dg-options "-std=f2003" }
6 ! (Gave a bogus warning before.)
16 function strerror(errno
) bind(C
, NAME
= 'strerror')
18 type(C_PTR
) :: strerror
19 integer(C_INT
), value
:: errno
25 character(KIND
=C_CHAR
), pointer :: str(:)
27 cptr
= strerror(INT(42, KIND
= C_INT
))
28 call C_F_POINTER(cptr
, str
, [255])
31 if (str(i
) == C_NULL_CHAR
) exit
32 write (ERROR_UNIT
, '(A1)', ADVANCE
= 'NO') str(i
:i
)
35 write (ERROR_UNIT
, '(1X)')