As reported at http://gcc.gnu.org/ml/fortran/2010-05/msg00320.html

For the following program, one gets the warning:
  DATA  a  /  Z'F'  /,  b  /  Z'3'  /
                                  1
Warning: Conversion from INTEGER(16) to INTEGER(4) at (1)


While this is formally correct, the warning is a bit verbose. The warning
itself is not new (-Wconversion) but it is new for -Wall. (Since GCC 4.6, -Wall
implies a less-noisy -Wconversion while -Wconversion-extra is still noisy.)

Expected: Only warn if an overflow occurs.

PROGRAM  test_iand
  INTEGER  ::  a,  b
  DATA  a  /  Z'F'  /,  b  /  Z'3'  /
  WRITE  (*,*)  IAND(a,  b)
END PROGRAM test_iand


-- 
           Summary: -Wall / -Wconversion: Too verbose warning for DATA BOZ
                    conversions
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


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

Reply via email to