This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/16674] Invalid code in specification expression accepted
- From: "sgk at troutmask dot apl dot washington dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Jul 2004 18:09:05 -0000
- Subject: [Bug fortran/16674] Invalid code in specification expression accepted
- References: <20040722172659.16674.Mart.Rentmeester@nn-online.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From sgk at troutmask dot apl dot washington dot edu 2004-07-23 18:09 -------
I believe you're seeing one of the differences between Fortran 90
and Fortran 95. Lahey's source code checker (http://www.lahey.com)
shows that your code snippet is legal Fortran 95 and illegal
Fortran 90. I do not have my copy of draft Fortran 2003 standard
handy, so I can't check when/if COUNT() is permitted. I'll also
note that NAG's compiler compiles your code without a warning.
In section 11.2.7, "Specification Functions," of my old copy of
Metcalf and Reid states "Any of the intrinsic functions defined
by the standard may be used in a specification expression."
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16674