http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50392

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
                 CC|                            |burnus at gcc dot gnu.org

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-09-14 
10:42:55 UTC ---
The code looks valid (Fortran 90) to me. Except that "kf" needs to be
re-defined before returning from the function.


>From Fortran 95's deleted section:

"B.1.4 ASSIGN, assigned GO TO, and assigned FORMAT"
"The definitions of the ASSIGN and assigned GO TO statements are:
   assign-stmt is ASSIGN label TO scalar-int-variable
 Constraint: The label shall be the statement label of a branch target
   statement or format-stmt that appears in the same scoping unit as the
   assign-stmt.
 Constraint: scalar-int-variable shall be named and of type default integer.
[...]
"Execution of an ASSIGN statement causes a statement label to be assigned to an
integer variable. While defined with a statement label value, the integer
variable may be referenced only in the context of an assigned GO TO statement
or as a format specifier in an input/output statement. An integer variable
defined with a statement label value may be redefined with a statement label
value or an integer value."

Reply via email to