[Bug fortran/59700] [4.8/4.9 Regression] Misleading/buggy runtime error message: Bad integer for item 0 in list input
jvdelisle at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jan 10 17:09:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59700
--- Comment #14 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
The item_count variable serves two purposes. This was done because we were
trying to preserve dtp space and ABI compatibility. I dont remember all the
details of why. At any rate, when reading logicals we have to scan ahead to
confirm a valid read, so we created the infamous line_buffer. The variable
item_count related to the line_buffer is just a pointer into the line_buffer,
it contains the current position in that scan ahead process. The error
messages just need to change and not refer to the item in the read list.
Instead, they should refer to the location in the line where the error
occurred.
642 dtp->u.p.line_buffer[dtp->u.p.item_count++] = c;
is simply getting the next character in the line. We probably could have used
some sort of substructure union like u.p.uu.place and u.p.uu.item_count to
avoid the confusion. Unrelated to this PR.
More information about the Gcc-bugs
mailing list