public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/57142] New: SIZE/SHAPE overflow despite kind=8
@ 2013-05-02 11:44 burnus at gcc dot gnu.org
  2013-05-02 11:53 ` [Bug fortran/57142] [4.7/4.8/4.9 Regression] " dominiq at lps dot ens.fr
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-05-02 11:44 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57142

             Bug #: 57142
           Summary: SIZE/SHAPE overflow despite kind=8
    Classification: Unclassified
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Keywords: diagnostic, wrong-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org


The following program should print:
  1 k=8 / 4294967300 k=8
  1 k=8 / 2147483650 k=8

However, it prints:
  1 k=8 / 4 k=8
  1 k=8 / -2147483646 k=8

Expected:
* kind=8 is properly handled
* With kind=4, a warning/error is printed that the value exceeds huge(1_4)

NOTE: shape has the same issue; ubound/lbound are okay (in both regards). The
run-time version is fine.


!integer :: A(huge(1)+2_8), B(2,3)
integer :: A(1), B(huge(1)+3_8,2_8)
print '(4(i0,a))', size(A,kind=8),' k=', kind(size(A,kind=8)),' / ', &
                   size(B,kind=8),' k=', kind(size(B,kind=8))
print '(4(i0,a))', size(A,dim=1,kind=8),' k=', kind(size(A,dim=1,kind=8)), &
      ' / ',       size(B,dim=1,kind=8),' k=', kind(size(B,dim=1,kind=8))
end


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-05-07 17:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-02 11:44 [Bug fortran/57142] New: SIZE/SHAPE overflow despite kind=8 burnus at gcc dot gnu.org
2013-05-02 11:53 ` [Bug fortran/57142] [4.7/4.8/4.9 Regression] " dominiq at lps dot ens.fr
2013-05-02 12:58 ` dominiq at lps dot ens.fr
2013-05-02 16:30 ` burnus at gcc dot gnu.org
2013-05-07 17:26 ` burnus at gcc dot gnu.org
2013-05-07 17:28 ` burnus at gcc dot gnu.org
2013-05-07 17:29 ` burnus at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).