[Bug fortran/30664] New: -pedantic: "Integer outside symmetric range" for integer(1) and (2) does not work
burnus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Feb 1 09:26:00 GMT 2007
The following program produces no
Warning: Integer outside symmetric range implied by Standard Fortran at (1)
For integer(4) and integer(8) it does (uncomment the '!' lines and see).
(Test case is part of PR 30512.)
-----------------------
program main
implicit none
integer(1) :: i1(3), a1(3:2)
integer(2) :: i2(3), a2(3:2)
!integer(4) :: i4(3), a4(3:2)
logical :: msk(3)
msk = .false.
i1 = 1
i2 = 1
!i4 = 1
if(-huge(i1)-1 /= maxval(i1, msk)) call abort()
if(-huge(a1)-1 /= maxval(a1)) call abort()
if(-huge(i2)-1 /= maxval(i2, msk)) call abort()
if(-huge(a2)-1 /= maxval(a2)) call abort()
!if(-huge(i4)-1 /= maxval(i4, msk)) call abort()
!if(-huge(a4)-1 /= maxval(a4)) call abort()
end program main
--
Summary: -pedantic: "Integer outside symmetric range" for
integer(1) and (2) does not work
Product: gcc
Version: 4.3.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=30664
More information about the Gcc-bugs
mailing list