[patch, fortran] Fix PR 86119, spurios warning for len(classtype) with -Wconversion
Thomas Koenig
tkoenig@netcologne.de
Tue Feb 19 21:49:00 GMT 2019
Hello world,
the attached patch fixes the 8/9 regression by inserting the conversion
at the right place. Regression-tested. OK for trunk, and for 8 when it
re-opens?
Regards
Thomas
2019-02-19 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/86110
* class.c (gfc_get_len_component): Add argument k for kind.
If the kind of the resulting expression is not equal to k,
convert it.
* gfortran.h (gfc_len_component): Adjust prototype.
* simplify.c (gfc_simplify_len): Pass kind to
gfc_get_len_component.
2019-02-19 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/86110
* gfortran.dg/warn_conversion_11.f90: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p1.diff
Type: text/x-patch
Size: 1967 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20190219/6b01d458/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: warn_conversion_11.f90
Type: text/x-fortran
Size: 299 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20190219/6b01d458/attachment-0001.bin>
More information about the Fortran
mailing list