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 END this typo leads to 9 error messages.
Yeah, this has always bothered me. I typically use -fmax-errors=1 when developing new code because of the run-on errors for simple mistakes. This fixes the excessive errors in this case. Index: symbol.c =================================================================== --- symbol.c (revision 142481) +++ symbol.c (working copy) @@ -1559,7 +1559,8 @@ gfc_add_type (gfc_symbol *sym, gfc_types || gfc_notification_std (GFC_STD_GNU) == ERROR || pedantic) { - 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)); return FAILURE; } if (gfc_notify_std (GFC_STD_GNU, msg, sym->name, where,
(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.
(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.
No activity for seven years. How many decades this PR will remain opened before being closed as WONTFIX?
> No activity for seven years. How many decades this PR will remain > opened before being closed as WONTFIX? No feedback, closing as WONTFIX.