This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: old-style variable initialization with g95
- From: Tobias Schlüter <tobias dot schlueter at physik dot uni-muenchen dot de>
- To: Hans Horn <hannes at 2horns dot com>
- Cc: fortran at gcc dot gnu dot org
- Date: Sun, 29 Aug 2004 15:25:33 +0200
- Subject: Re: old-style variable initialization with g95
- References: <cgqd9m$p11$1@sea.gmane.org>
Hans Horn wrote:
> I'm doing my first baby-steps using g95 and am running into compilation
> problems due to old-style variable
> initializations such as
> Integer I /0/, J /1/
> Real*8 R(6) /6*0/
> Logical L /.false./
>
> This is an f77 extension that is widely supported by commercial compilers -
> including g77.
> Does anyone happen to know the gfortran option that enables these
> constructs? (I sure hope there is such an option)
I've implemented it, your question was enough motivation for me to finally
investigate into the detailed semantics of this extension (I didn't find any
documentation for it anywhere). I will post a patch once I've finished some
more testing, as I'm not yet sure if there are any possible bad interactions
that I've missed. Suggestions for testcases are welcome.
Also, gfortran is different from g95. gfortran is a fork from g95 that
happened when the original author of g95 decided that he'd rather violate
copyright law than work in a cooperative environment or allow a community
project to build on his work. If you look at his blog entry for yesterday, you
can see that he complains about bugs in gcc, but so far he has not contributed
a single bug report to the gcc people (at least, I couldn't find one).
Binaries for gfortran can be found at gfortran.org, and we'd be happy if you
tried them with your code and told us how it works out for you.
- Tobi