[Patch, Fortran] PR90374 Support d0.d, e0.d, es0.d, en0.d, g0.d

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

[Patch, Fortran] PR90374 Support d0.d, e0.d, es0.d, en0.d, g0.d

jerry DeLisle-3
Hi all,

The attached patch provides frontend and runtime modifications to allow the
subject format specifiers. These are allowed as default behavior and under
-std=f2018.

It does not implement the ew.de0 specifier. I decided to do that part
separarately since it involves different places in the code.

I will to a Changlog for the testsuite changes. In summary:

modified: fmt_error_10.f to allow it to pass.
modified: fmt_error_7.f likewise.
modified: fmt_error_9.f likewise.
new file: fmt_zero_width.f90 to test the new features.

Regression tested on x86_64-pc-linux-gnu.

OK for trunk?

Jerry

2019-11-01  Jerry DeLisle  <[hidden email]>

        PR fortran/90374
        * io.c (check_format): Allow zero width for D, E, EN, and ES
        specifiers as default and when -std=F2018 is given. Retain
        existing errors when using the -fdec family of flags.


2019-11-01  Jerry DeLisle  <[hidden email]>

        PR fortran/90374
        io/format.c (parse_format_list): Relax format checking for
        zero width as default and when -std=f2018.
        io/format.h (format_token): Move definition to io.h.
        io/io.h (format_token): Add definition here to allow access to
        this definition at higher levels. Rename the declaration of
        write_real_g0 to write_real_w0 and add a new format_token
        argumanet so that higher level functions can pass to it the
        token so that handling of g0 vs the other zero width specifiers
        can be differentiated.
        io/transfer.c (formatted_transfer_scalar_write): Add checks for
        zero width and call write_real_w0 to handle it.
        io/write.c (write_real_g0): Remove.
        (write_real_w0): Add new, same as previous write_real_g0 except
        check format token to handle the g0 case.


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

Re: [Patch, Fortran] PR90374 Support d0.d, e0.d, es0.d, en0.d, g0.d

Steve Kargl
On Fri, Nov 01, 2019 at 03:48:04PM -0700, Jerry DeLisle wrote:

>
> The attached patch provides frontend and runtime modifications to allow the
> subject format specifiers. These are allowed as default behavior and under
> -std=f2018.
>
> It does not implement the ew.de0 specifier. I decided to do that part
> separarately since it involves different places in the code.
>
> I will to a Changlog for the testsuite changes. In summary:
>
> modified: fmt_error_10.f to allow it to pass.
> modified: fmt_error_7.f likewise.
> modified: fmt_error_9.f likewise.
> new file: fmt_zero_width.f90 to test the new features.
>
> Regression tested on x86_64-pc-linux-gnu.
>
> OK for trunk?
>

OK.

--