This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/63371] New: kind() with function name (not call) as argument
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 25 Sep 2014 15:18:31 +0000
- Subject: [Bug fortran/63371] New: kind() with function name (not call) as argument
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63371
Bug ID: 63371
Summary: kind() with function name (not call) as argument
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Keywords: accepts-invalid
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: burnus at gcc dot gnu.org
>From https://groups.google.com/forum/#!topic/comp.lang.fortran/lbaOSWKSmhQ
That's either a wrong-code or accepts-invalid issue, it requires some digging.
But the output "0" is surely wrong and if it is valid, it makes only sense for
functions and one has to be careful with generics.
Example, which prints "0" instead of "2". Using a subroutine, it is even
accepted instead of plainly rejected (hence accepts-invalid):
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