------- Comment #4 from anlauf at gmx dot de 2010-01-21 21:11 ------- Created an attachment (id=19684) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19684&action=view) Slightly improved version of the previous patch
I have improved the patch so that now the following assignments do not throw a warning: e.g. real(4) <- integer(1,2) real(8) <- integer(1,2,4) dto. for complex on the l.h.s. This assumes the standard IEEE representations of reals which have a sufficiently large number of mantissa bits to accomodate the converted value from the integer of smaller kind. It works for me, up to the cases where the converted value is known to be an integer exactly representable as a real with the desired kind, see my comment above. The patch works apparently correctly with -fdefault-real-8 and -fdefault-integer-8 (ugh!). I have regtested the patch and found a probably unrelated failure: FAIL: gfortran.dg/vect/fast-math-mgrid-resid.f scan-tree-dump-times optimized "vect_var[^\n]*\+ " 13 The patch is just at the limit of 10 lines, so whoever wants to take it feel free to do so. I have left only the work to provide a testcase for the testsuite. ;-) Enjoy. -- anlauf at gmx dot de changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #19669|0 |1 is obsolete| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42809