On Mon, Jul 14, 2014 at 12:39 AM, Jerry DeLisle <jvdeli...@charter.net> wrote: > Hi all, > > This bug was caused by an access to an invalid pointer offset to the format > string. This was only a problem on the second error using the same format > string. I suspect it has to do with caching the format strings. Regardless, > the patch fixes this by using the fortran style string lengths to calculate > the > position in the string where the error occurs. > > Test case attached. > > Regression tested on x86-64. > > OK for trunk?
Ok, thanks. > > 2014-07-12 Jerry DeLisle <jvdeli...@gcc.gnu.org> > > PR libgfortran/61632 > * io/format.c (format_error): Avoid invalid string pointer by > using the fortran string length values to generate error string. -- Janne Blomqvist