This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
integer*8 parsing problem
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: fortran at gcc dot gnu dot org
- Date: Mon, 23 Aug 2004 10:25:53 -0700
- Subject: integer*8 parsing problem
I could be wrong, but it looks like that frontend
is not parsing or reducing integer*8 correctly.
Consider,
integer(8) i
i=2_8**31
print *, i
end
dhcp-78-96:sgk[249] gfc -o a -fdump-tree-original a.f90
dhcp-78-96:sgk[250] more a.f90.t03.original
MAIN__ ()
{
int8 i;
i = -2147483648;
_gfortran_filename = "a.f90";
_gfortran_line = 4;
_gfortran_ioparm.unit = 6;
_gfortran_ioparm.list_format = 1;
_gfortran_st_write ();
_gfortran_transfer_integer (&i, 8);
_gfortran_st_write_done ();
}
dhcp-78-96:sgk[253] ./a
-2147483648
An even worse problem is
integer(8) i
i=2_8**32
print *, i
end
dhcp-78-96:sgk[255] gfc -o a -fdump-tree-original a.f90
dhcp-78-96:sgk[256] more a.f90.t03.original
MAIN__ ()
{
int8 i;
i = 0;
_gfortran_filename = "a.f90";
_gfortran_line = 4;
_gfortran_ioparm.unit = 6;
_gfortran_ioparm.list_format = 1;
_gfortran_st_write ();
_gfortran_transfer_integer (&i, 8);
_gfortran_st_write_done ();
}
--
Steve