[patch, fortran] PR 46659 - extend conversion warnings to assignments
Thomas Koenig
tkoenig@netcologne.de
Sun Aug 14 15:36:00 GMT 2011
Hello world,
the attached patch extends conversion warnings to assignments.
OK for trunk?
Thomas
011-08-14 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/46659
* expr.c (gfc_check_assign): Check for type conversions when the
right-hand side is a constant REAL cor COMPLEX contstant the
left-hand side is also REAL or COMPLEX. Don't warn when a
narrowing conversion does not change the value of the constant.
2011-08-14 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/46659
* gfortran.dg/warn_conversion_2.f90: Also warn about conversion
of a constant resulting from simplification.
* gfortran.dg/warn_conversion_3.f90: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p2.diff
Type: text/x-patch
Size: 2565 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20110814/a53c2a29/attachment.bin>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: warn_conversion_3.f90
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20110814/a53c2a29/attachment.f90>
More information about the Fortran
mailing list