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: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Hans Horn <hannes at 2horns dot com>
- Cc: fortran at gcc dot gnu dot org
- Date: Sat, 28 Aug 2004 10:22:00 -0700
- Subject: Re: old-style variable initialization with g95
- References: <cgqd9m$p11$1@sea.gmane.org>
On Sat, Aug 28, 2004 at 09:53:04AM -0700, 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)
>
This is PR 13910 in the bugs database. In the meanwhile,
you could actually try writing portable, standard conforming
code.
program rr
integer :: I=0, J=1
real(kind(1d0)) :: R(6)=0.D0
logical :: L =.false.
print *, i, j
print *, r
print *, l
end program rr
--
Steve