[Patch, fortran] PR26787 - Standard references

Paul Thomas paulthomas2@wanadoo.fr
Thu Apr 13 22:08:00 GMT 2006


>Can you add the section number from the standard to above?  For example,
>/* From 12.2.3, a procedure symbol cannot ... */
My draft copy of the F95 standard does not have a 12.2.3.

I have:

R735  assignment-stmt     is    variable  =  expr
R601  variable            is    scalar-variable-name
                          or    array-variable-name
                          or    subobject

After that, the closest that I find to a usable definition is, Note 12.26:

The result variable is very similar to any other variable local to a 
function subprogram.  Its existence begins when execution of the 
function is initiated and ends when execution of the function is 
terminated.  However, because the final value of this variable is used 
subsequently in the evaluation of the expression that invoked the 
function, an implementation may wish to defer releasing the storage 
occupied by that variable until after its value has been used in the 
expression evaluation.

What I have tried to implement is consistent with this, so this seems 
like the correct reference.  Perhaps I should repeat the terser message 
that comees from primary.c (match_variable), "Expected VARIABLE at %C", 
rather than "'%s' in the assignment at %L cannot be an l-value since it 
is a procedure"?


More information about the Gcc-patches mailing list