This is the mail archive of the
mailing list for the GCC project.
Re: gfortran error: Statement order error: declaration after DATA
- From: Tobias Burnus <burnus at net-b dot de>
- To: "David N. Bradley" <kb9qhd at charter dot net>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 12 Sep 2012 08:30:12 +0200
- Subject: Re: gfortran error: Statement order error: declaration after DATA
- References: <504FDB6A.firstname.lastname@example.org>
David N. Bradley wrote:
I am trying to compile the cactuscode package and can not get past the
Statement order error: declaration after DATA
Somehow the whole is very odd.
a) I tried your program with gfortran 4.1 to 4.8, g95 and g77 - and none
of them prints this error - all compile the program even with -std=f95
without any error.
b) The code looks perfectly valid to me - the Fortran standard doesn't
mandate that after DATA no other declaration comes. (Even having DATA
after the first execution statement is valid, albeit obsolescent.)
Your email lacks important pieces of information, in particular, which
compiler in which version you are using under which operating system.
Note that GCC (gcc.gnu.org) only develops/supports gfortran but no other
compiler. (g77 was the predecessor but is no longer maintained.)
Additionally, gcc@ is the mailing list for GCC development, please send
usage questions to gcc-help@ (or gfortran's fortran@) but not to gcc@.