*ping* Re: [PATCH] PR fortran/89100 Default widths for i, f and g format specifiers in format strings

Christophe Lyon christophe.lyon@linaro.org
Thu May 23 15:27:00 GMT 2019


On Thu, 23 May 2019 at 15:54, Mark Eggleston
<mark.eggleston@codethink.co.uk> wrote:
>
> On 23/05/2019 11:38, Christophe Lyon wrote:
> > On Wed, 22 May 2019 at 13:57, Janne Blomqvist <blomqvist.janne@gmail.com> wrote:
> >> On Wed, May 22, 2019 at 10:58 AM Mark Eggleston
> >> <mark.eggleston@codethink.co.uk> wrote:
> >>> On 13/05/2019 10:45, Mark Eggleston wrote:
> >>>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89100 see comment 4
> >>>>
> >>>> Please can someone commit the attached patch as I do not have commit
> >>>> rights.
> >>>>
> >>>> Change logs:
> >>>>
> >>>> For gcc/fortran
> >>>>
> >>>>      Jeff Law  <law@redhat.com>
> >>>>      Mark Eggleston  <mark.eggleston@codethink.com>
> >>>>
> >>>>      PR fortran/89100
> >>>>      * gfortran.texi: Add Default widths for F, G and I format descriptors
> >>>>      to Extensions section.
> >>>>      * invoke.texi: Add -fdec-format-defaults
> >>>>      * io.c (check_format): Use default widths for i, f and g when
> >>>>      flag_dec_format_defaults is enabled.
> >>>>      * lang.opt: Add new option.
> >>>>      * options.c (set_dec_flags): Add SET_BITFLAG for
> >>>>      flag_dec_format_defaults.
> >>>>
> >>>> For gcc/testsuite
> >>>>
> >>>>      Mark Eggleston <mark.eggleston@codethink.com>
> >>>>
> >>>>      PR fortran/89100
> >>>>      * gfortran.dg/fmt_f_default_field_width_1.f90: New test.
> >>>>      * gfortran.dg/fmt_f_default_field_width_2.f90: New test.
> >>>>      * gfortran.dg/fmt_f_default_field_width_3.f90: New test.
> >>>>      * gfortran.dg/fmt_g_default_field_width_1.f90: New test.
> >>>>      * gfortran.dg/fmt_g_default_field_width_2.f90: New test.
> >>>>      * gfortran.dg/fmt_g_default_field_width_3.f90: New test.
> >>>>      * gfortran.dg/fmt_i_default_field_width_1.f90: New test.
> >>>>      * gfortran.dg/fmt_i_default_field_width_2.f90: New test.
> >>>>      * gfortran.dg/fmt_i_default_field_width_3.f90: New test.
> >>>>
> >>>> For libgfortran
> >>>>
> >>>>      Jeff Law  <law@redhat.com>
> >>>>
> >>>>      PR fortran/89100
> >>>>      * io/format.c (parse_format_list): set default width when the
> >>>>      IOPARM_DT_DEC_EXT flag is set for i, f and g.
> >>>>      * io/io.h: add default_width_for_integer, default_width_for_float
> >>>>      and default_precision_for_float.
> >>>>      * io/write.c (write_boz): extra parameter giving length of data
> >>>>      corresponding to the type's kind.
> >>>>      (write_b): pass data length as extra parameter in calls to write_boz.
> >>>>      (write_o): pass data length as extra parameter in calls to write_boz.
> >>>>      (write_z): pass data length as extra parameter in calls to write_boz.
> >>>>      (size_from_kind): also set size is default width is set.
> >>>>      * io/write_float.def (build_float_string): new paramter inserted
> >>>> before
> >>>>      result parameter. If default width use values passed instead of the
> >>>>      values in fnode.
> >>>>      (FORMAT_FLOAT): macro modified to check for default width and
> >>>> calls to
> >>>>      build_float_string to pass in default width.
> >>>>      (get_float_string): set width and precision to defaults when needed.
> >>>>
> >>>>
> >>> ping?
> >>
> >> Committed as r271511.
> >>
> > Hi,
> >
> > I've noticed new failures on arm:
> >      gfortran.dg/fmt_f_default_field_width_1.f90   -O0  (test for excess errors)
> >      gfortran.dg/fmt_f_default_field_width_1.f90   -O1  (test for excess errors)
> >      gfortran.dg/fmt_f_default_field_width_1.f90   -O2  (test for excess errors)
> >      gfortran.dg/fmt_f_default_field_width_1.f90   -O3
> > -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer
> > -finline-functions  (test for excess errors)
> >      gfortran.dg/fmt_f_default_field_width_1.f90   -O3 -g  (test for
> > excess errors)
> >      gfortran.dg/fmt_f_default_field_width_1.f90   -Os  (test for excess errors)
> >      gfortran.dg/fmt_f_default_field_width_2.f90   -O0  (test for excess errors)
> >      gfortran.dg/fmt_f_default_field_width_2.f90   -O1  (test for excess errors)
> >      gfortran.dg/fmt_f_default_field_width_2.f90   -O2  (test for excess errors)
> >      gfortran.dg/fmt_f_default_field_width_2.f90   -O3
> > -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer
> > -finline-functions  (test for excess errors)
> >      gfortran.dg/fmt_f_default_field_width_2.f90   -O3 -g  (test for
> > excess errors)
> >      gfortran.dg/fmt_f_default_field_width_2.f90   -Os  (test for excess errors)
> >      gfortran.dg/fmt_f_default_field_width_3.f90   -O  (test for excess errors)
> >      gfortran.dg/fmt_g_default_field_width_1.f90   -O0  (test for excess errors)
> >      gfortran.dg/fmt_g_default_field_width_1.f90   -O1  (test for excess errors)
> >      gfortran.dg/fmt_g_default_field_width_1.f90   -O2  (test for excess errors)
> >      gfortran.dg/fmt_g_default_field_width_1.f90   -O3
> > -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer
> > -finline-functions  (test for excess errors)
> >      gfortran.dg/fmt_g_default_field_width_1.f90   -O3 -g  (test for
> > excess errors)
> >      gfortran.dg/fmt_g_default_field_width_1.f90   -Os  (test for excess errors)
> >      gfortran.dg/fmt_g_default_field_width_2.f90   -O0  (test for excess errors)
> >      gfortran.dg/fmt_g_default_field_width_2.f90   -O1  (test for excess errors)
> >      gfortran.dg/fmt_g_default_field_width_2.f90   -O2  (test for excess errors)
> >      gfortran.dg/fmt_g_default_field_width_2.f90   -O3
> > -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer
> > -finline-functions  (test for excess errors)
> >      gfortran.dg/fmt_g_default_field_width_2.f90   -O3 -g  (test for
> > excess errors)
> >      gfortran.dg/fmt_g_default_field_width_2.f90   -Os  (test for excess errors)
> >      gfortran.dg/fmt_g_default_field_width_3.f90   -O  (test for excess errors)
> >
> >
> > The logs contain:
> > /gcc/testsuite/gfortran.dg/fmt_f_default_field_width_1.f90:15:11:
> > Error: Kind 16 not supported for type REAL at (1)
> >
> > Christophe
>
> Apologies, I'd forgotten that kind=16 is not always defined. The
> attached patch modifies the test cases to take this into account. I
> currently have no means of verifying this.
>
> Please confirm that this patch solves the problem.
>

I confirm this patch does fix the problem, thanks

Christophe

> Mark
> >> --
> >> Janne Blomqvist
>
> --
> https://www.codethink.co.uk/privacy.html
>



More information about the Gcc-patches mailing list