------- Comment #3 from dfranke at gcc dot gnu dot org 2010-06-12 14:43 ------- This goes off at a tangent, but still related to this PR ...
I think this is valid as the RESULT f is in the scope of g only and shadows the FUNCTION f (Lahey accepts it): FUNCTION f() contains FUNCTION g() RESULT(f) END FUNCTION END FUNCTION But what's going on here? FUNCTION f() RESULT(g) contains FUNCTION g() END FUNCTION END FUNCTION $ gfortran-svn pr44348.f90 pr44348.f90: In function 'f': pr44348.f90:4:0: error: aggregate value used where a float was expected Lahey says: 1723-S: "SOURCE.F90", line 3, column 12: 'g' already used as a variable name. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44348