public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: mark.e.smith@arnold.af.mil
To: gcc-gnats@gcc.gnu.org
Subject: fortran/7662: Dimensions of dummy array in subroutine must agree with arrayed passed from calling program.
Date: Tue, 20 Aug 2002 12:06:00 -0000	[thread overview]
Message-ID: <20020820184446.3564.qmail@sources.redhat.com> (raw)


>Number:         7662
>Category:       fortran
>Synopsis:       Dimensions of dummy array in subroutine must agree with arrayed passed from calling program.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 20 11:46:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     mark.e.smith@arnold.af.mil
>Release:        unknown-1.0
>Organization:
>Environment:
Redhat Linux 7.2
GNU Fortran 0.5.26 20000731 (Red Hat Linux 7.1 2.96-98)
>Description:
A dummy array in a subroutine must be at least as large as the passed array in each of it's dimensions. G77 fails if the dimensions of the dummy array are not exactly the same as the passed array.
>How-To-Repeat:
Here is a sample program that demonstrates the problem

      dimension x(3,4)
      data x/1,2,3,4,5,6,7,8,9,10,11,12/
      
      print *, 'Correct Array'
      do i = 1,3
         print*, (x(i,j), j=1,4)
      enddo
      
      print *
      print *, 'Array in Sub'
      call prarray(3,4,x)
      end
      
      subroutine prarray(m,n,dumx)
      dimension dumx(5,8)
      do i = 1,m
         print*, (dumx(i,j), j=1,n)
      enddo
      return
      end


>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


             reply	other threads:[~2002-08-20 18:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-20 12:06 mark.e.smith [this message]
2002-08-20 21:36 Tim Prince
2002-08-21  2:06 toon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020820184446.3564.qmail@sources.redhat.com \
    --to=mark.e.smith@arnold.af.mil \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).