public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/28771]  New: gfortran accepts invalid variable definition
@ 2006-08-18 11:39 martin at mpa-garching dot mpg dot de
  2006-08-18 18:20 ` [Bug fortran/28771] " patchapp at dberlin dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: martin at mpa-garching dot mpg dot de @ 2006-08-18 11:39 UTC (permalink / raw)
  To: gcc-bugs

As far as I know, the following code snippet is not valid Fortran:

program test
  character(len=*) :: foo = 'test'
end

To make the code correct, the variable definition either needs the "parameter"
attribute or an explicit length.
Other compilers (Intel, Fujitsu and NAG) reject this code, but all current
versions of gfortran accept it without warning.


-- 
           Summary: gfortran accepts invalid variable definition
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: martin at mpa-garching dot mpg dot de
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28771


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-08-24  4:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-18 11:39 [Bug fortran/28771] New: gfortran accepts invalid variable definition martin at mpa-garching dot mpg dot de
2006-08-18 18:20 ` [Bug fortran/28771] " patchapp at dberlin dot org
2006-08-18 18:29 ` pault at gcc dot gnu dot org
2006-08-20  5:47 ` pault at gcc dot gnu dot org
2006-08-20  8:21 ` pault at gcc dot gnu dot org
2006-08-20 18:09 ` pault at gcc dot gnu dot org
2006-08-24  4:47 ` pault at gcc dot gnu dot org
2006-08-24  4:54 ` pault at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).