public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/27989]  New: -fbounds-check should check for too small arrays on subroutine calls
@ 2006-06-11 13:10 tobias dot burnus at physik dot fu-berlin dot de
  2006-06-11 20:28 ` [Bug fortran/27989] " tobias dot burnus at physik dot fu-berlin dot de
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: tobias dot burnus at physik dot fu-berlin dot de @ 2006-06-11 13:10 UTC (permalink / raw)
  To: gcc-bugs

This is with GNU Fortran 95 (GCC) 4.2.0 20060608 (experimental) and 4.1.0 (SUSE
Linux).

The following program has a problem as the passed array is shorter than the
array expected by the subroutine. Currently, gfortran does not detect this
problem.

Expected: Something like
  Actual argument for dummy array A too small - 3 elements instead of 5
(this is the NAG -C=all output)

----------<cut>-----------
program test
  implicit none
  real :: b(3)
  b = 42.0
  call sub(5,b)
end program test

subroutine sub(n,a)
  implicit none
  integer, intent(in) :: n
  real, intent(in) :: a(n)
  print *,a
end subroutine sub
-------<cut>----------------


-- 
           Summary: -fbounds-check should check for too small arrays on
                    subroutine calls
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tobias dot burnus at physik dot fu-berlin dot de


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


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

end of thread, other threads:[~2010-05-19 17:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-11 13:10 [Bug fortran/27989] New: -fbounds-check should check for too small arrays on subroutine calls tobias dot burnus at physik dot fu-berlin dot de
2006-06-11 20:28 ` [Bug fortran/27989] " tobias dot burnus at physik dot fu-berlin dot de
2006-09-10 19:23 ` tobias dot burnus at physik dot fu-berlin dot de
2007-02-16 16:08 ` fxcoudert at gcc dot gnu dot org
2010-05-19 17:53 ` 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).