[Bug fortran/63363] New: No diagnostic for passing function as actual argument to KIND
ian_harvey at bigpond dot com
gcc-bugzilla@gcc.gnu.org
Thu Sep 25 02:55:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63363
Bug ID: 63363
Summary: No diagnostic for passing function as actual argument
to KIND
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: ian_harvey at bigpond dot com
The following (from recent c.l.f discussion) compiles without error with trunk
r215574, despite the actual argument not meeting the requirements for the
argument of the KIND intrinsic (the argument must be a data entity).
INTERFACE
FUNCTION f()
INTEGER(SELECTED_INT_KIND(4)) :: f
END FUNCTION f
END INTERFACE
PRINT *, KIND(f)
END
! (just to provide a definition)
FUNCTION f()
INTEGER(SELECTED_INT_KIND(4)) :: f
END FUNCTION f
After compiling (supplying no options) the resulting program, when executed,
prints zero.
More information about the Gcc-bugs
mailing list