This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/24828] Z and negative integers
- From: "kargl at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Sep 2006 20:52:44 -0000
- Subject: [Bug fortran/24828] Z and negative integers
- References: <bug-24828-10391@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from kargl at gcc dot gnu dot org 2006-09-29 20:52 -------
Can this PR be closed? How BOZ constants are interpreted is in accordance with
the F95 standard's DATA statement. The extension of BOZs in assignments does
change the intrepretation. With a slightly modified program, I see
troutmask:sgk[455] cat k.f90
program z
integer(4) i
integer(8) j
i = Z'80203040'
j = Z'80203040'
print *, i, j
if (i .ne. Z'80203040') call abort
end
troutmask:sgk[456] gfc -o z k.f90
In file k.f90:4
i = Z'80203040'
1
Error: Arithmetic overflow converting INTEGER(16) to INTEGER(4) at (1)
troutmask:sgk[457] gfc -o z -fno-range-check k.f90
troutmask:sgk[458] ./z
-2145374144 2149593152
Abort (core dumped)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24828