public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/51637] New: Add compile-time error if array is too large
@ 2011-12-20 13:50 burnus at gcc dot gnu.org
  2014-01-11 11:39 ` [Bug fortran/51637] " dominiq at lps dot ens.fr
  0 siblings, 1 reply; 2+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-12-20 13:50 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51637
           Summary: Add compile-time error if array is too large
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org


The following program compiles and produces the dump on x86-64-linux:
  struct t a[-1];
  a[-9223372036854775808] = t.0;

and with -m32
  struct t a[-1];
  a[0] = t.0;

Expected: An error is printed such as

ftn-951 crayftn: ERROR MAIN, File = rc1.f90, Line = 4, Column = 79
   The extent for dimension 1 is too large for array "A". 

TYPE T
END TYPE T
TYPE(T), DIMENSION(-9223372036854775807_8: 9223372036854775807_8) :: A
a(1) = t()
end

Motivated by the discussion starting at
http://j3-fortran.org/pipermail/interop-tr/2011-December/000942.html / Example
taken from http://j3-fortran.org/pipermail/interop-tr/2011-December/000964.html


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

end of thread, other threads:[~2014-01-11 11:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-20 13:50 [Bug fortran/51637] New: Add compile-time error if array is too large burnus at gcc dot gnu.org
2014-01-11 11:39 ` [Bug fortran/51637] " dominiq at lps dot ens.fr

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).