This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/18918] Eventually support Fortran 2008's coarrays [co-arrays]
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 21 Jun 2011 07:34:57 +0000
- Subject: [Bug fortran/18918] Eventually support Fortran 2008's coarrays [co-arrays]
- Auto-submitted: auto-generated
- References: <bug-18918-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18918
--- Comment #62 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-06-21 07:34:52 UTC ---
(In reply to comment #61)
> > FAIL: gfortran.dg/coarray_lock_3.f90 -O (test for errors, line 72)
> The following reduced code does not give the expected error:
> lock(lock[1]) ! { dg-error "must be a scalar coarray of type LOCK_TYPE" } !
Thanks for the report. There are three bugs:
a) The code is valid and there should be no dg-error. Seemingly, I forget to
apply the update patch for that file.
b) The wording of the error message is wrong. As the error message correctly
states, "lock[1]" is *not* a coarray - but no coarray is required. Being
coindexed or being the component of a coarray is also sufficient.
c) "LOCK(a%lock)" in the following example is valid, but it is rejected:
use iso_fortran_env
implicit none
type t
type(lock_type) :: lock
end type t
type t2
type(lock_type), allocatable :: lock(:)[:]
end type t2
type(t) :: a[*]
type(t2) :: b
allocate(b%lock(1)[*])
LOCK(a%lock) ! FAILS
LOCK(a[1]%lock)
LOCK(b%lock(1))
LOCK(b%lock(1)[1])
end