public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/37159]  New: RANDOM_SEED:  PUT=  check array size at compile time
@ 2008-08-19  6:29 burnus at gcc dot gnu dot org
  2008-08-24  6:38 ` [Bug fortran/37159] " burnus at gcc dot gnu dot org
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-08-19  6:29 UTC (permalink / raw)
  To: gcc-bugs

The run-time library has:

  static const GFC_INTEGER_4 kiss_size =
sizeof(kiss_seed)/sizeof(kiss_seed[0]);
      if (((put->dim[0].ubound + 1 - put->dim[0].lbound)) < kiss_size)
        runtime_error ("Array size of PUT is too small.");

It would be great if the size could already be checked at compile time:

  integer size(6)
  CALL RANDOM_SEED(size=size(1))
  print *, size(1)
  CALL RANDOM_SEED(put=size)
end

$ ./a.out
           8
Fortran runtime error: Array size of PUT is too small.

Note: If HAVE_GFC_REAL_16 is set, size is larger than 8.
Vector too small for argument PUT (no. 2) of intrinsic RANDOM_SEED

NAG f95 checks things at compile time:
  Error: Vector too small for argument PUT (no. 2) of intrinsic RANDOM_SEED


-- 
           Summary: RANDOM_SEED:  PUT=  check array size at compile time
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


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


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

end of thread, other threads:[~2009-05-01 15:21 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-19  6:29 [Bug fortran/37159] New: RANDOM_SEED: PUT= check array size at compile time burnus at gcc dot gnu dot org
2008-08-24  6:38 ` [Bug fortran/37159] " burnus at gcc dot gnu dot org
2008-08-24 18:35 ` tkoenig at gcc dot gnu dot org
2008-09-18 21:01 ` dennis dot wassel at googlemail dot com
2008-11-01 10:27 ` tkoenig at gcc dot gnu dot org
2008-11-01 10:30 ` tkoenig at gcc dot gnu dot org
2008-11-02 14:19 ` burnus at gcc dot gnu dot org
2008-11-10  0:11 ` michael dot a dot richmond at nasa dot gov
2008-11-10  3:18 ` jvdelisle at gcc dot gnu dot org
2008-11-10 13:01 ` michael dot a dot richmond at nasa dot gov
2008-11-10 13:33 ` dennis dot wassel at googlemail dot com
2008-11-10 13:51 ` michael dot a dot richmond at nasa dot gov
2008-11-10 15:02 ` kargl at gcc dot gnu dot org
2008-12-09 22:38 ` [Bug fortran/37159] RANDOM_SEED: GET= check array size at compile time and respect -fdefault-integer-* dfranke at gcc dot gnu dot org
2009-01-05 19:34 ` dfranke at gcc dot gnu dot org
2009-05-01 15:10 ` fxcoudert at gcc dot gnu dot org
2009-05-01 15:21 ` dfranke at gcc dot gnu dot 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).