------- Comment #22 from fxcoudert at gcc dot gnu dot org  2005-12-22 14:24 
-------
(In reply to comment #21)
>    new = file_position (u->s) - m - 2*sizeof (gfc_offset);
> 
> as "2*sizeof (gfc_offset)" is the size of the green words before and after the
> data and m is the size of the data. (m+2*sizeof (gfc_offset)) is the total 
> size
> of the binary record that is being skipped backwards over.

Did you test that patch? Does it work? I would be very surprised if it did. You
need to consider that the previous read (or salloc_r_at, to be exact) might or
might not read all length bytes. So, after that call, length might be
sizeof(gfc_offset), or it might be 0, or it might be something in between.

You need to do something that takes into account all these cases, and that's
what I thought my patch did. I don't have time now to make all the reasonning
again, but I just wanted to underline that issue so that you're aware of it.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25139

Reply via email to