[Bug fortran/44489] Transfer with boz constant can confuse - add documentation

burnus at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu Jun 10 07:26:00 GMT 2010



------- Comment #5 from burnus at gcc dot gnu dot org  2010-06-10 07:25 -------
I think there is another problem. Assuming the following program:

integer(4) :: i4
integer(8) :: i8
i4 = 1
i8 = transfer(i4, mold=i8)
end

The TRANSFER (as the one in comment 0) is partially undefined, but there is no
warning. By contrast, NAG f95 warns:

  Warning: test.f90, line 4: Intrinsic TRANSFER has partly undefined result


Expected: A similar warning; we already have a check in simplify.c, but it
seemingly does not work for this case:

  if (gfc_option.warn_surprising && source_size < result_size)
    gfc_warning("Intrinsic TRANSFER at %L has partly undefined result: "
                "source size %ld < result size %ld", &source->where,
                (long) source_size, (long) result_size);


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic, documentation


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44489



More information about the Gcc-bugs mailing list