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

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

Harald Anlauf-3
On 11/11/19 23:37, Janne Blomqvist wrote:

> On Mon, Nov 11, 2019 at 11:54 PM Harald Anlauf <[hidden email]> 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  <[hidden email]>
>>
>>         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.
>

Committed as svn rev. 278105.

Thanks for the review!

Harald