public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/45859] New: [Coarray, F2008, IR] Rejects valid actuals to coarray dummies
@ 2010-10-01 15:55 burnus at gcc dot gnu.org
  2011-03-27 17:32 ` [Bug fortran/45859] " burnus at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: burnus at gcc dot gnu.org @ 2010-10-01 15:55 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [Coarray, F2008, IR] Rejects valid actuals to coarray
                    dummies
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org
            Blocks: 18918,39627


The discussion has started at
   http://j3-fortran.org/pipermail/j3/2010-September/003862.html
and lead to the following interpretation request (no link as the mail archive
lags behind).

The program
   interface
      subroutine sub (x)
         real x(10)[*]
      end subroutine
   end interface
   real :: x(100)[*]
   call sub (x(10))
   end

is supposed to be valid according the following IR. A modified program which
uses
   call sub (x(10:))
is unambiguously valid. However, both programs are rejected by:

   call sub (x(10))
              1
Error: Actual argument to 'x' at (1) must be a coarray and thus shall not have
an array designator

------------------------------------------------------
To: J3                                                     10-xxx
From: John Reid
Subject: F2008 interp re sequence association for coarrays
Date: 2010 October 1

NUMBER: F08/xxxx
TITLE:  Sequence association for coarrays
KEYWORDS: sequence association, coarrays
DEFECT TYPE: Erratum
STATUS: J3 consideration in progress

QUESTION:

Was the text in 12.5.2.8:
"If the dummy argument is an array coarray that has the CONTIGUOUS 
attribute or is not of assumed shape, the corresponding actual argument 
shall be simply contiguous." 
intended to disallow sequence association for coarrays, as 
illustrated by the example

   interface
      subroutine sub (x)
         real x(10)[*]
      end subroutine
   end interface
   ...
   real :: x(100)[*]
   ...
   call sub (x(10)) 

ANSWER:

No. This restriction contradicts 12.5.2.4 paragraph 13, which allows 
the example program. An edit is supplied to correct this.

EDIT:

In 12.5.2.8 Coarray dummy variables, at the end of paragraph 2, 
add "or an element of a simply contiguous array".

SUBMITTED BY: John Reid


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

* [Bug fortran/45859] [Coarray, F2008, IR] Rejects valid actuals to coarray dummies
  2010-10-01 15:55 [Bug fortran/45859] New: [Coarray, F2008, IR] Rejects valid actuals to coarray dummies burnus at gcc dot gnu.org
@ 2011-03-27 17:32 ` burnus at gcc dot gnu.org
  2011-07-18 20:16 ` burnus at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-03-27 17:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-03-27 16:03:41 UTC ---
See "F08/0040" at http://j3-fortran.org/doc/year/11/11-006A.txt
"STATUS: Passed by J3 letter ballot"


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

* [Bug fortran/45859] [Coarray, F2008, IR] Rejects valid actuals to coarray dummies
  2010-10-01 15:55 [Bug fortran/45859] New: [Coarray, F2008, IR] Rejects valid actuals to coarray dummies burnus at gcc dot gnu.org
  2011-03-27 17:32 ` [Bug fortran/45859] " burnus at gcc dot gnu.org
@ 2011-07-18 20:16 ` burnus at gcc dot gnu.org
  2011-07-18 20:21 ` burnus at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-07-18 20:16 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-07-18 20:16:08 UTC ---
(In reply to comment #1)
> See "F08/0040" at http://j3-fortran.org/doc/year/11/11-006A.txt
> "STATUS: Passed by J3 letter ballot"

My comment is odd. First, the number is wrong. It's F08/0048. Secondly, the
proposal was rejected at the voting.

It gets muddier if one looks at the details:
Meeting 193 ( http://j3-fortran.org/doc/meeting/193/ ):
- 10-229 has an edit which allows the program (cf. quote in comment 0)
- 10-229r1 and 10-229r2 has an edit which makes the program invalid
- The letter ballot (cf. 11-129 of meeting m194 and link of comment 1) rejected
  the 10-229r2 version - and suggested in comment the wording of 10-229.

The IR has seemingly not been picked up again for later meetings. I have now
asked at J3 for an update.


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

* [Bug fortran/45859] [Coarray, F2008, IR] Rejects valid actuals to coarray dummies
  2010-10-01 15:55 [Bug fortran/45859] New: [Coarray, F2008, IR] Rejects valid actuals to coarray dummies burnus at gcc dot gnu.org
  2011-03-27 17:32 ` [Bug fortran/45859] " burnus at gcc dot gnu.org
  2011-07-18 20:16 ` burnus at gcc dot gnu.org
@ 2011-07-18 20:21 ` burnus at gcc dot gnu.org
  2011-08-25 15:01 ` burnus at gcc dot gnu.org
  2015-10-20 16:45 ` dominiq at lps dot ens.fr
  4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-07-18 20:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-07-18 20:21:20 UTC ---
(In reply to comment #2)
> Meeting 193 ( http://j3-fortran.org/doc/meeting/193/ ):
> - 10-229 has an edit which allows the program (cf. quote in comment 0)
> - 10-229r1 and 10-229r2

Make those 10-226, 10-226r1 and 226r2.


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

* [Bug fortran/45859] [Coarray, F2008, IR] Rejects valid actuals to coarray dummies
  2010-10-01 15:55 [Bug fortran/45859] New: [Coarray, F2008, IR] Rejects valid actuals to coarray dummies burnus at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2011-07-18 20:21 ` burnus at gcc dot gnu.org
@ 2011-08-25 15:01 ` burnus at gcc dot gnu.org
  2015-10-20 16:45 ` dominiq at lps dot ens.fr
  4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-08-25 15:01 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-08-25 14:28:03 UTC ---
(In reply to comment #0)
> is supposed to be valid according the following IR. A modified program which
> uses
>    call sub (x(10:))
> is unambiguously valid. However, both programs are rejected by:

With current gfortran 4.7, the "x(10:)" program is accepted and the other one
is rejected for "x(10)" with "must be simply contiguous" (which is true). Thus,
the result is OK and only depends on what J3/WG5 regard as correct.

TODO: Wait for the result of the IR.


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

* [Bug fortran/45859] [Coarray, F2008, IR] Rejects valid actuals to coarray dummies
  2010-10-01 15:55 [Bug fortran/45859] New: [Coarray, F2008, IR] Rejects valid actuals to coarray dummies burnus at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2011-08-25 15:01 ` burnus at gcc dot gnu.org
@ 2015-10-20 16:45 ` dominiq at lps dot ens.fr
  4 siblings, 0 replies; 6+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-10-20 16:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45859

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2015-10-20
     Ever confirmed|0                           |1

--- Comment #5 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> With current gfortran 4.7, the "x(10:)" program is accepted and the other
> one is rejected for "x(10)" with "must be simply contiguous" (which is true).
> Thus, the result is OK and only depends on what J3/WG5 regard as correct.

Confirmed from 4.8 up to trunk (6.0).

> TODO: Wait for the result of the IR.

>From my version of the Fortran 2015 draft

12.5.2.8 Coarray dummy variables

...

2 If the dummy argument is an array coarray that has the CONTIGUOUS attribute
  or is not of assumed shape, the corresponding actual argument shall be simply
  contiguous or an element of a simply contiguous array.

Does it means that gfortran is correct?


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

end of thread, other threads:[~2015-10-20 16:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-01 15:55 [Bug fortran/45859] New: [Coarray, F2008, IR] Rejects valid actuals to coarray dummies burnus at gcc dot gnu.org
2011-03-27 17:32 ` [Bug fortran/45859] " burnus at gcc dot gnu.org
2011-07-18 20:16 ` burnus at gcc dot gnu.org
2011-07-18 20:21 ` burnus at gcc dot gnu.org
2011-08-25 15:01 ` burnus at gcc dot gnu.org
2015-10-20 16:45 ` 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).