This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/40196] New: F2003: Type parameter inquiry: str%len, a%kind
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 May 2009 11:26:49 -0000
- Subject: [Bug fortran/40196] New: F2003: Type parameter inquiry: str%len, a%kind
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Type parameter inquiry:
str%len is equivalent to len(str)
a%kind is equivalent to kind(a)
The real fun part starts with user-defined kinds, e.g.
type tp(dim)
integer, KIND :: dim
real :: dist(dim)
end type tp
type(tp) :: t(5)
print *, t%dist%dim
Quote from F2008 but F2003 should be the same:
"A type parameter inquiry is used to inquire about a type parameter of a data
object. It applies to both intrinsic and derived types.
R616 type-param-inquiry is designator % type-param-name
C622 (R616) The type-param-name shall be the name of a type parameter of the
declared type of the object designated by the designator.
A deferred type parameter of a pointer that is not associated or of an
unallocated allocatable variable shall not be inquired about."
--
Summary: F2003: Type parameter inquiry: str%len, a%kind
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: enhancement
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=40196