[Bug fortran/29147] Bad overflow check in DATA statements
--- Comment #4 from kargl at gcc dot gnu dot org 2006-09-29 04:55 --- Fixed on trunk. Although the patch would work on 4.1, it isn't needed because I never fixed range checking on 4.1. Use -fno-range-check option. -- kargl at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED Target Milestone|--- |4.2.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29147
[Bug fortran/29147] Bad overflow check in DATA statements
--- Comment #3 from kargl at gcc dot gnu dot org 2006-09-29 04:30 --- I failed to not that your assertion that the error message is misleading is incorrect. The error message is actually quite concise and accurate. See section 5.2.10 of the F95 standard. I submitted a patch that will allow you to do gfortran -fno-range-check nonportable_code.f90 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29147
[Bug fortran/29147] Bad overflow check in DATA statements
-- kargl at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |kargl at gcc dot gnu dot org |dot org | Status|UNCONFIRMED |ASSIGNED Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2006-09-29 03:26:51 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29147
[Bug fortran/29147] Bad overflow check in DATA statements
--- Comment #2 from kargl at gcc dot gnu dot org 2006-09-29 00:25 --- (In reply to comment #1) > Created an attachment (id=12299) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12299&action=view) [edit] > Legacy code example > > Compiles fine with every other compiler out there. > That's because every other compiler out there is broken :-) The standard is quite clear that the BOZ is converted to an integer with the kind type with the largest decimal range. In your case that integer is kind=8, and Z'' = 4294967295 which over flows the range of an integer(kind=4) constant. -- kargl at gcc dot gnu dot org changed: What|Removed |Added CC||kargl at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29147