[PATCH] PR fortran/91942 -- Inquiry parameter cannot be IO tag

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] PR fortran/91942 -- Inquiry parameter cannot be IO tag

Steve Kargl
The attached patch has been tested on x86_64-*-freebsd.
OK to commit?

If an inquiry parameter cannot appear in a file IO statement
as a tag (see new testcase).  The patch re-arranges the code
to prevent an ICE due to 'result->symtree = NULL;', checks
for a constant in a variable definition context, and takes
a different exit route to get better error messages.

2019-10-01  Steven G. Kargl  <[hidden email]>

        PR fortran/91942
        * io.c (match_vtag): Check for non-NULL result->symtree.
        (match_out_tag): Check for invalid constant due to inquiry parameter.
        (match_filepos): Instead of a syntax error, go to cleanup to get better
        error messages.


2019-10-01  Steven G. Kargl  <[hidden email]>

        PR fortran/91942
        * gfortran.dg/pr91587.f90: Update dg-error regex.
        * gfortran.dg/pr91942.f90: New test.
--
Steve

pr91942.diff (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] PR fortran/91942 -- Inquiry parameter cannot be IO tag

jerry DeLisle-3
On 10/1/19 4:10 PM, Steve Kargl wrote:
> The attached patch has been tested on x86_64-*-freebsd.
> OK to commit?
>

OK Steve, thanks,

Jerry