[patch, libgfortram] PR32456 IO error message should show Unit/Filename

Andreas Tobler toa@pop.agri.ch
Wed Jun 27 21:57:00 GMT 2007


Jerry DeLisle wrote:

> 2007-06-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
> 
>     PR libgfortran/32456
>     * runtime/error.c (show_locus): Update to emit the unit number
>     and file name involved with the error.  Use new function
>     filename_from_unit.
>     * libgfortran.h (filename_from_unit): Declare new function.
>     * io/unit.c (init_units): Set the unit file name for stdin, stdout,
>     and stderr for use later in error reporting.
>     (filename_from_unit): Add this new function.
> 

Fyi, this one causes several timeouts on darwin {ppc|x86} in the 
gfortran testsuite.

FAIL: gfortran.dg/error_format.f90  -O0  output pattern test, is , 
should match .*(unit = 99, file = .*)Fortran runtime error: End of file
WARNING: program timed out.

[imac-catherine:gcc/testsuite/gfortran] andreast% gdb 
error_format.exeGNU gdb 6.3.50-20050815 (Apple version gdb-573) (Fri Oct 
20 15:50:43 GMT 2006)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain 
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-apple-darwin"...Reading symbols for 
shared libraries .... done

(gdb) r
Starting program: 
/Volumes/development/devel/gcc/head/objdir-single/gcc/testsuite/gfortran/error_format.exe 

Reading symbols for shared libraries .+ done
^C
Program received signal SIGINT, Interrupt.
0x900248c7 in semaphore_wait_signal_trap ()
(gdb) bt
#0  0x900248c7 in semaphore_wait_signal_trap ()
#1  0x90001582 in pthread_mutex_lock ()
#2  0x00277cda in __gthread_mutex_lock ()
#3  0x00277fee in get_external_unit ()
#4  0x0027814b in _gfortrani_find_unit ()
#5  0x00278b83 in _gfortrani_filename_from_unit ()
#6  0x00207527 in *__gfortrani_show_locus (cmp=0xbffff3d8) at 
/Volumes/development/devel/gcc/head/gcc/libgfortran/runtime/error.c:258
#7  0x00207b46 in *__gfortran_generate_error (cmp=0xbffff3d8, family=-1, 
message=0x28a12c "End of file") at 
/Volumes/development/devel/gcc/head/gcc/libgfortran/runtime/error.c:502
#8  0x00277981 in *__gfortran_st_read (dtp=0xbffff3d8) at 
/Volumes/development/devel/gcc/head/gcc/libgfortran/io/transfer.c:2758
#9  0x00001d56 in MAIN__ ()
#10 0x000017a2 in _start ()
#11 0x000016c9 in start ()

I did not have any success so far to track it further down.

As said, fyi.

Andreas



More information about the Gcc-patches mailing list