[patch, fortran] Fix PR 67219, erroneous warning

Thomas Koenig tkoenig@netcologne.de
Sun Oct 30 17:34:00 GMT 2016


Hello world,

the regression in question was caused by issuing a conversion
warning for a complex constant too early, when the statement would be
rejected later.

The solution is to throw away the warning if we do not find that
comma.

Regression-tested.  OK for trunk and 6-branch?

Regards

	Thomas

2016-10-30  Thomas Koenig  <tkoenig@gcc.gnu.org>

         PR fortran/67219
         * arith.c (gfc_int2real):  Change gfc_warning_now
         to gfc_warning.
         * primary.c (match_complex_constant):  If there
         is no comma, throw away any warning which might have
         been issued by gfc_int2real.

2016-10-30  Thomas Koenig  <tkoenig@gcc.gnu.org>

         PR fortran/67219
         * gfortran.dg/pr67219.f90:  New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p1.diff
Type: text/x-patch
Size: 1191 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20161030/bc2e87bf/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr67219.f90
Type: text/x-fortran
Size: 251 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20161030/bc2e87bf/attachment-0001.bin>


More information about the Fortran mailing list