This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/33285] New: integer too big compile error in gfortran
- From: "jlaw at uoguelph dot ca" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Sep 2007 18:11:21 -0000
- Subject: [Bug fortran/33285] New: integer too big compile error in gfortran
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
On Mandriva 2008 beta 2
[jlaw@localhost Ftest]$ gcc -v
Using built-in specs.
Target: x86_64-mandriva-linux-gnu
Configured with: ../configure --prefix=/usr --libexecdir=/usr/lib
--with-slibdir=/lib64 --mandir=/usr/share/man --infodir=/usr/share/info
--enable-checking=release
--enable-languages=c,c++,ada,fortran,objc,obj-c++,java
--host=x86_64-mandriva-linux-gnu --with-cpu=generic --with-system-zlib
--enable-threads=posix --enable-shared --enable-long-long --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-clocale=gnu --enable-java-awt=gtk
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --enable-gtk-cairo
--disable-libjava-multilib --enable-ssp --disable-libssp
Thread model: posix
gcc version 4.2.1 20070828 (prerelease) (4.2.1-6mdv2008.0)
Test Program:
program testint
integer(4) i,j,k,ii
parameter (ii=-2147483648)
k = -2147483648
print *," k,ii= ",k,ii
do i=20,32
j=2**i
print *,"i= ",i, "2^i= ",j
j=-2**i
print *,"i= ",i, "-2^i= ",j
enddo
end
Compilation:
[jlaw@localhost Ftest]$ gfortran -c testint.for
testint.for:3.33:
parameter (ii=-2147483648)
1
Error: Integer too big for its kind at (1)
testint.for:4.24:
k = -2147483648
1
Error: Integer too big for its kind at (1)
[jlaw@localhost Ftest]$
~
Integer (4) can have range : -2^31 to + ((2^31)-1)
OK to compile on gcc-4.1.2
--
Summary: integer too big compile error in gfortran
Product: gcc
Version: 4.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jlaw at uoguelph dot ca
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33285