Interpretation request tracking bug

 * * *

Found at
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/c05874d85748d9e6

The problem is
  function f() result(res)
    res = f(something)

where "f" is both a specific and a generic function and "f(something)" matches
a the different generic function.

However, Section 12.5.2.1 of Fortran 2003 has:
"If RESULT is specified, [...] all occurrences of the
 function name in execution-part statements in the
 scoping unit refer to the function itself."

This somehow clashes with other parts of the standard and it is currently
unclear whether the program is valid. Some compilers accept it (e.g. gfortran),
others reject it.

  * * *

Submitted as interpretation request for
J3 MEETING 189 LAS VEGAS, NEVADA, August 10 - 14, 2009
http://www.j3-fortran.org/doc/year/09/paper189.txt

Presumably will be:
http://www.j3-fortran.org/doc/year/09/09-237.txt


-- 
           Summary: Recursive constraint for specific calling same-named
                    generic procedure
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


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

Reply via email to