public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "billingd at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/16511] Test 19990905-0.f fails with gfortran
Date: Thu, 15 Jul 2004 23:22:00 -0000	[thread overview]
Message-ID: <20040715232242.1323.qmail@sourceware.org> (raw)
In-Reply-To: <20040713055437.16511.billingd@gcc.gnu.org>


------- Additional Comments From billingd at gcc dot gnu dot org  2004-07-15 23:22 -------
After following the discussion on c.l.f (thanks Steve) it seems the
code in question "clearly" (?) conforms to F90 standard.

Richard Maine wrote:
Date: 14 Jul 2004 08:16:06 -0700

Klaus Wacker <wacker@physik.uni-dortmund.de> writes: 

> I think it could have already been legal in Fortran 77. As the array 
> is passed in as an argument, no dynamic memory allocation is 
> necessary. However, the standard says: 
> 
> | A variable name that appears in a dimension bound expression of an 
> | array must also appear as a name either in every dummy argument list 
> | that contains the array name or in a common block in that subprogram. 
> 
> The phrase "as a name" seems to exclude the association to a common 
> via equivalence. 

I find that phrase a little strange in general. After all, a name 
isn't in a common block. A name is in a common statement, but not 
a common block. I'd be tempted to interpret that as the variable 
being in the common block. But I guess I don't find it definitive. 

The f90 standard is a little more clear here. The corresponding 
requirement for a specification expression is 

  "A variable that is in a common block or a variable that is the subobject 
   of a variable in a common block." 

No funniness about names being in common blocks. I'd say that the 
equivalenced variable is probably alsso "in" the common block, 
though the precise definition of common blocks is tricky indeed 
(I'm occasionally amazed at the people who mention how simple 
common is - I think they mostly don't understand its real definition, 
but only how simple it can be if you restrict yourself to simple 
use of it...which isn't a bad idea). Hmm... Ah. I'm slighly surprised, 
but I do manage to find the words to cover this pretty much in exactly 
the form needed. F90 5.5.2.1(2) 

  "Data objects associated with an entity in a common block are considered 
   to be in that common block." 

So I think I'll go with "clearly" legal in f90, but subject to debate 
in f77. Since you aren't going to get a formal f77 interp any more, 
that's probably how it will have to stand


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2004-07-14 01:13:07         |2004-07-15 23:22:42
               date|                            |


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


  parent reply	other threads:[~2004-07-15 23:22 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-13  5:54 [Bug fortran/16511] New: " billingd at gcc dot gnu dot org
2004-07-13  5:56 ` [Bug fortran/16511] " billingd at gcc dot gnu dot org
2004-07-13  7:09 ` cvs-commit at gcc dot gnu dot org
2004-07-13 13:48 ` pinskia at gcc dot gnu dot org
2004-07-13 20:37 ` toon at moene dot indiv dot nluug dot nl
2004-07-13 20:37 ` [Bug fortran/16511] New: " Toon Moene
2004-07-14  1:13 ` [Bug fortran/16511] " billingd at gcc dot gnu dot org
2004-07-14  3:26 ` billingd at gcc dot gnu dot org
2004-07-14 12:03 ` tobi at gcc dot gnu dot org
2004-07-15  0:32 ` david dot billinghurst at comalco dot riotinto dot com dot au
2004-07-15 23:22 ` billingd at gcc dot gnu dot org [this message]
2004-12-10  8:56 ` paulthomas2 at wanadoo dot fr
2005-01-06 14:42 ` tobi at gcc dot gnu dot org
2005-01-06 15:56 ` coudert at clipper dot ens dot fr
2005-01-06 16:11 ` tobi at gcc dot gnu dot org
2005-03-10 14:38 ` pinskia at gcc dot gnu dot org
2005-03-10 14:39 ` pinskia at gcc dot gnu dot org
2005-09-09  0:25 ` cvs-commit at gcc dot gnu dot org
2005-09-09  9:07 ` cvs-commit at gcc dot gnu dot org
2005-09-09 22:15 ` pinskia at gcc dot gnu dot org

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=20040715232242.1323.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).