(j3.2006) BIND(C) on entry statement

Jim Xia jimxia
Wed Jul 6 13:47:17 EDT 2011


Is the following program legal?

function fexfun_char(n1) result(n2)
use iso_c_binding
character(kind=C_CHAR), value :: n1
character(kind=C_CHAR) n2
n2 = 'g'
return
entry exfun_char(n1) result(n2) bind(c)
n2 = n1
end function fexfun_char

There aren't any rules forbidding this in the standard.  But the storage 
association between function return result and entry result in this case 
seems to suggest fexfun_char should have a binding label as well.

Cheers,

Jim Xia

Compiler Testing
IBM Toronto Lab at 8200 Warden Ave,
Markham, On, L6G 1C7
905-413-3444
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://j3-fortran.org/pipermail/j3/attachments/20110706/2706f263/attachment.html>



More information about the J3 mailing list