https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95038

--- Comment #9 from Bill Long <longb at cray dot com> ---
The original test is not conforming due to the missing IMPORT statement. 
However, the error message , which I assume is for the second non-blank line in
the listing, seems odd.   The standard says

"If RESULT does not appear, the name of the function result is function-name
and all occurrences of the function name in execution-part statements in its
scope are references to the function result. On completion of execution of the
function, the value returned is that of its function result. "

Technically, the reference to x in kind(x) is not in the execution part of the
function, but rather in the specification part. However, the quote above from
15.6.2.2 para 4, does not really say anything about appearances in the
specification part of the code. 

However, it appears that the line flagged with the message is the one
containing the kind(x) reference in the the interface block.  That is valid due
to the missing IMPORT statement.

Reply via email to