This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[gfortran] Fix PR 16455: Print locus when module file can't be opened
- From: Tobias Schlüter <tobias dot schlueter at physik dot uni-muenchen dot de>
- To: GCC Fortran mailing list <fortran at gcc dot gnu dot org>,patch <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 11 Jul 2004 14:38:57 +0200
- Subject: [gfortran] Fix PR 16455: Print locus when module file can't be opened
Another trivial patch. This simply adds locus information to the error
messages issued when module files can't be opened.
Built & verified the error message.
- Tobi
2004-07-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/15455
* module.c (gfc_dump_module, gfc_use_module): Print locus
when opening of module file fails.
Index: module.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fortran/module.c,v
retrieving revision 1.11
diff -u -p -r1.11 module.c
--- module.c 10 Jul 2004 22:37:15 -0000 1.11
+++ module.c 11 Jul 2004 12:33:14 -0000
@@ -3415,7 +3415,7 @@ gfc_dump_module (const char *name, int d
module_fp = fopen (filename, "w");
if (module_fp == NULL)
- gfc_fatal_error ("Can't open module file '%s' for writing: %s",
+ gfc_fatal_error ("Can't open module file '%s' for writing at %C: %s",
filename, strerror (errno));
now = time (NULL);
@@ -3459,7 +3459,7 @@ gfc_use_module (void)
module_fp = gfc_open_included_file (filename);
if (module_fp == NULL)
- gfc_fatal_error ("Can't open module file '%s' for reading: %s",
+ gfc_fatal_error ("Can't open module file '%s' for reading at %C: %s",
filename, strerror (errno));
iomode = IO_INPUT;