This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/35627] [4.3, 4.4 regression] namelist read error
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Mar 2008 15:54:34 -0000
- Subject: [Bug fortran/35627] [4.3, 4.4 regression] namelist read error
- References: <bug-35627-15934@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from burnus at gcc dot gnu dot org 2008-03-19 15:54 -------
(In reply to comment #5)
> I believe the problem is actual;y in read_logical and occurs on a short read.
> By short, I mean the case where we provide fewer data items in the namelist
> file then there are in the logical array. I am curious what has triggered
> this.
I think it has something to do with read_real, though different from what I
thought. In any case, we end up in read_real, trying to match "NaN" and go to
unwind. However, afterwards it shows an error for "xlbtna" (for which read_real
is called) and not for the item that comes next and is not NaN, namely
"nbshapa".
Just before the return, line_buffer contains in "unwind:" of read_real:
line_buffer[0] == '\0'
line_buffer[1] == 'n'
line_buffer[2] == 'b'
The problem is that the first element is '\0' and thus the rewinding does not
happen. If one changes "nbshapa" into "nnnbshapa" it works. Thus the question
is : Where does the "\0" come from?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35627