This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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'FFFFFFFF' = 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]