[Bug fortran/38444] poor error message
kargl at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Dec 8 19:33:00 GMT 2008
------- Comment #3 from kargl at gcc dot gnu dot org 2008-12-08 19:31 -------
(In reply to comment #2)
> (In reply to comment #1)
> > - gfc_error (msg, sym->name, where, gfc_basic_typename (sym->ts.type));
> > + gfc_fatal_error (msg, sym->name, where,
> > + gfc_basic_typename (sym->ts.type));
>
> That produces too few error messages. I.e.
>
> IMPLICIT NONE
> INTEGER :: a,b,c,d,e,f,g,h,a
> a=0 ; b=0 ; c=0 ; d=0 ; e=0 ; f=0 ; g=0 ; h=0; i=0
> END
>
> should produce (like NAG f95, ifort) two errors only.
>
Unfortunately, the first error causes the entire line to
be rejected. Thus, all your variables are implicitly typed
when gfortran tries to continue with processing the file.
AFAIK, gfortran cannot accept a partially correct specification
statement.
If you fix the fatal error, you'll then see the second error.
So, you can view my patch as an all-or-nothing solution.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38444
More information about the Gcc-bugs
mailing list