I noticed two things about the error messages for the attached code: 1) The error for line 6 is shown before the error for line 4. This strikes me as odd, and it doesn't lend itself to easier error squashing. 2) The description for both errors are not very descriptive. Could something like the line 6 error be changed to "Error: Syntax error ALLOCATE variable must have dimensions", and the line 4 error should indicate that it needs dimensions. In file baderrors.f90:6 allocate(b(5)) 1 Error: Syntax error in ALLOCATE statement at (1) In file baderrors.f90:4 integer*4, allocatable :: b 1 Error: Object at (1) may not be ALLOCATABLE
Created attachment 10006 [details] test case that generates the errors
The ordering of errors is hard to tackle, the bad error description is easily fixed on the other hand.
Subject: Bug 24404 Author: tobi Date: Tue Nov 1 20:05:54 2005 New Revision: 106346 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106346 Log: PR fortran/24404 * resolve.c (resolve_symbol): Output symbol names in more error messages, clarify error message. Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/resolve.c
It remains the ordering of the error messages which in this case is hard to tackle, I'm tempted to say WONTFIX.
Closing as WONTFIX. Workaround: use -fmax-errors=1 to get only one message at a time. See http://gcc.gnu.org/ml/fortran/2009-04/msg00149.html for discussion.
Closing, see comment #5.