show_locus is failing to show the error locus because for some reason filename_from_unit is returning a NULL string for this test case. character(len=10) :: cc = 'bad' open(99,file="dd",encoding=cc) write(*,*) 'HELLO' end
The unit has not been opened yet when this error occurs so it does not exist in the unit list yet. In this case we should just show the unit number.
Subject: Bug 36094 Author: jvdelisle Date: Fri May 2 01:33:16 2008 New Revision: 134876 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=134876 Log: 2008-05-01 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libfortran/36094 * runtime/error.c (show_locus): Provide modified error message when filename has not yet been associated with a unit number. * io/open.c (encoding_opt[]): Comment out "utf-8" option and add TODO. Modified: trunk/libgfortran/ChangeLog trunk/libgfortran/io/open.c trunk/libgfortran/runtime/error.c
Fixed