hades [TEST] cat bug-ibits.f90
program main
write (*, *) ibits (-1, 0, bit_size (0))
end program main
hades [TEST] gfortran bug-ibits.f90
bug-ibits.f90:2.22:
write (*, *) ibits (-1, 0, bit_size (0))
1
Error: Result of IBITS overflows its kind at (1)
hades [TEST] gfortran --version
GNU Fortran (GCC) 4.2.1 (Ubuntu 4.2.1-5ubuntu4)
Copyright (C) 2007 Free Software Foundation, Inc.
Of course, compiling with my mac-version of gfortran
gives the same result:
epsilon [TEST] gfortran bug-ibits.f90
bug-ibits.f90:2.22:
write (*, *) ibits (-1, 0, bit_size (0))
1
Error: Result of IBITS overflows its kind at (1)
epsilon [TEST] gfortran --version
GNU Fortran (GCC) 4.3.0 20071017 (experimental) [trunk revision 129405]
Copyright (C) 2007 Free Software Foundation, Inc.
Compiling with g95 works fine though.
Sincerely
PHL
--
Summary: IBITS gives compiler error
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: phl at kth dot se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35223