The following compile-time error is uneecessary: $ cat overflow.f90 program main real :: a a = exp(1000.) print *,a end program main $ gfortran overflow.f90 In file overflow.f90:3
a = exp(1000.) 1 Error: Result of EXP overflows its kind at (1) Assigning infinity would work just fine: $ cat overflow2.f90 program main real :: a a = 1000. a = exp(a) print *,a end program main $ gfortran overflow2.f90 $ ./a.out +Infinity $ gfortran -v Using built-in specs. Configured with: ../gcc-4.0-20050102/configure --prefix=/home/zfkts --enable-languages=c,c++,f95 Thread model: posix gcc version 4.0.0 20050102 (experimental) $ gfortran -dumpmachine ia64-unknown-linux-gnu -- Summary: unnecessary error for overflowing results Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: Thomas dot Koenig at online dot de CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19310