[patch, fortran] Fix PR 88298

Thomas Koenig tkoenig@netcologne.de
Sat Feb 2 14:41:00 GMT 2019


Hi,

the attached patch fixes a 7/8/9 regression where a conversion warning
was emitted for DIM.  The problem was that the no-warn flag had not been
passed down to the arithmetic conversion routines, which is solved here
by adding and using a flag in gfc_expr.

Regression-tested.  OK for affected branches?

Regards

	Thomas

2019-02-02  Thomas Koenig  <tkoenig@gcc.gnu.org>

         PR fortran/88298
         * arith.c (gfc_int2int): Do not warn if src->do_not_warn is set.
         * gfortran.h (gfc_expr): Add flag do_not_warn.
         * intrinsic.c (gfc_convert_type_warn): Set expr->do_not_warn if
         no warning is desired.

2019-02-02  Thomas Koenig  <tkoenig@gcc.gnu.org>

         PR fortran/88298
         * gfortran.dg/warn_conversion_10.f90: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p1.diff
Type: text/x-patch
Size: 1584 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190202/780cc2d8/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: warn_conversion_10.f90
Type: text/x-fortran
Size: 269 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190202/780cc2d8/attachment-0001.bin>


More information about the Gcc-patches mailing list