This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, RFC] PR81651/Fortran - Enhancement request: have f951 print out fully qualified module file name
- From: Janne Blomqvist <blomqvist dot janne at gmail dot com>
- To: Harald Anlauf <anlauf at gmx dot de>
- Cc: gfortran <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 12 Nov 2019 00:37:28 +0200
- Subject: Re: [Patch, RFC] PR81651/Fortran - Enhancement request: have f951 print out fully qualified module file name
- References: <5DC9D884.4070004@gmx.de>
On Mon, Nov 11, 2019 at 11:54 PM Harald Anlauf <anlauf@gmx.de> wrote:
>
> Dear all,
>
> the attached patch prints the fully qualified path if an error occurs
> during module read. E.g., instead of a less helpful error message,
>
> pr81651.f90:2:6:
>
> 2 | use netcdf
> | 1
> Fatal Error: File 'netcdf.mod' opened at (1) is not a GNU Fortran module
> file
>
> gfortran will print
>
> pr81651.f90:2:7:
>
> 2 | use netcdf
> | 1
> Fatal Error: File '/opt/pgi/pkg/netcdf/include/netcdf.mod' opened at (1)
> is not a GNU Fortran module file
>
> Regtested on x86_64-pc-linux-gnu.
>
> I couldn't think of a sensible test for the testsuite, thus no testcase
> provided.
>
> OK for trunk?
>
> Thanks,
> Harald
>
> 2019-11-11 Harald Anlauf <anlauf@gmx.de>
>
> PR fortran/81651
> * module.c (gzopen_included_file, gzopen_included_file_1)
> (gzopen_intrinsic_module, bad_module, gfc_use_module): Use fully
> qualified module path for error reporting.
Ok.
--
Janne Blomqvist