This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Not initialising without :: Bug?
- From: Eugene Bakin <zxlmm at yandex dot ru>
- To: fortran at gcc dot gnu dot org
- Date: Wed, 11 Jan 2012 01:45:11 +0600
- Subject: Re: Not initialising without :: Bug?
- References: <4F0C8E72.8030402@yandex.ru>
On 01/11/2012 01:02 AM, Steve Kargl wrote:
On Wed, Jan 11, 2012 at 12:51:13AM +0600, Eugene Bakin wrote:
Hello.
I'm uncertain, if it is a bug, or not.
This test program:
PROGRAM test
INTEGER i,j
END PROGRAM test
causes error:
gfortran--free-form -std="f2003" for.for
INTEGER i,j
1
Error: Unexpected data declaration statement at(1)
Works for me with 4.7.0 and 4.6.3 on x86_64-*-freebsd.
Are there any odd characters in the source code (ie.,
tabs, carrier returns, etc)?
No. Spaces only. Tried it one more time.
PROGRAM test
IMPLICIT NONE
INTEGER c = 0
PRINT *,c
END PROGRAM test
And got this:
gfortran --free-form for.for
for.for:3.12:
INTEGER c = 0
1
Error: Syntax error in data declaration at (1)
for.for:4.12:
PRINT *,c
1
Error: Symbol 'c' at (1) has no IMPLICIT type
Add IMPLICIT NONE to your code.
troutmask:sgk[222] gfc46 -o z -std=f2003 -Wall foo.for
foo.for:4.16:
print *, c
1
Error: Symbol 'c' at (1) has no IMPLICIT type
foo.for:3.16:
INTEGER c=0
1
Error: Symbol 'integerc' at (1) has no IMPLICIT type
Ok.
--
Eugene Bakin
zxlmm@ya.ru