This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/34960] Statement starting in wrong column causes Unclassifiable Statement error in the preceding executable line
- From: "kargl at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Jan 2008 04:04:02 -0000
- Subject: [Bug fortran/34960] Statement starting in wrong column causes Unclassifiable Statement error in the preceding executable line
- References: <bug-34960-15688@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from kargl at gcc dot gnu dot org 2008-01-25 04:04 -------
(In reply to comment #2)
> The example program was just to show a few variations. The program I was
> debugging only contained the second variant ("Unclassifiable statement error",
> followed by a lot of comment lines, followed by the actual line that contained
> the error). In other words, there were no cascading errors in the original
> code, since there was only one error.
>
> If you edit the example to only contain one of the variations,
> you'll still get
> the associated error. If I were to do this to reflect my original error, I'd
> come up with this:
>
> FUNCTION TEST()
> INTEGER IVAR1, IVAR2
>
> IVAR1=1 ! "Unclassifiable statement" on this line
> C
> C Many comment lines in between.
> C
> IVAR2=0
>
> END
'Garbage in, garbage out'
FUNCTION TEST()
INTEGER IVAR1, IVAR2
IVAR1=1
IVAR2=0
test=1.
END
The comment lines are a red herring. You're asking the compiler to append
VAR2=0 to the preceding line. The compiler can't classify 'ivar1=1var2=0'.
So, the compiler is giving up and tell you exact where you made your mistake.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34960