This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, RFC] PR81651/Fortran - Enhancement request: have f951 print out fully qualified module file name


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]