This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/34228] -std=f* should diagnose used but later typed variables
- 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: 27 Nov 2007 22:16:35 -0000
- Subject: [Bug fortran/34228] -std=f* should diagnose used but later typed variables
- References: <bug-34228-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from burnus at gcc dot gnu dot org 2007-11-27 22:16 -------
(In reply to comment #1)
> But a character string is not an array. The len parameter is a type parameter.
> That part of the standard does not apply. It's legal.
I don't worry about "len=3", I'm worrying about the type:
data emname/'bar'/
is implicitly types REAL and then one line later comes:
character(len=3) :: emname
I still think that this violates: "A variable that appears in a DATA statement
and has not been typed previously may appear in a subsequent type declaration
only if that declaration confirms the implicit typing."
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34228