From owner-sc22wg5@open-std.org  Fri Jul  9 18:11:33 2010
Return-Path: <owner-sc22wg5@open-std.org>
X-Original-To: sc22wg5-dom8
Delivered-To: sc22wg5-dom8@www2.open-std.org
Received: by www2.open-std.org (Postfix, from userid 521)
	id 3C51EC3BA16; Fri,  9 Jul 2010 18:11:33 +0200 (CEST)
X-Original-To: sc22wg5@open-std.org
Delivered-To: sc22wg5@open-std.org
Received: from mx1.net.stfc.ac.uk (mx1.net.stfc.ac.uk [130.246.135.223])
	by www2.open-std.org (Postfix) with ESMTP id AF7ABC3BA14
	for <sc22wg5@open-std.org>; Fri,  9 Jul 2010 18:11:31 +0200 (CEST)
X-RAL-MFrom: <John.Reid@stfc.ac.uk>
X-RAL-Connect: <jkr.cse.rl.ac.uk [130.246.9.202]>
Received: from jkr.cse.rl.ac.uk (jkr.cse.rl.ac.uk [130.246.9.202])
	by mx1.net.stfc.ac.uk (8.13.1/8.13.1) with ESMTP id o69GAhr4017319;
	Fri, 9 Jul 2010 17:10:48 +0100
Received: from jkr.cse.rl.ac.uk (localhost.localdomain [127.0.0.1])
	by jkr.cse.rl.ac.uk (Postfix) with ESMTP id 3087456255;
	Fri,  9 Jul 2010 17:10:43 +0100 (BST)
Message-ID: <4C374A02.2000306@stfc.ac.uk>
Date: Fri, 09 Jul 2010 17:10:42 +0100
From: John Reid <John.Reid@stfc.ac.uk>
Reply-To: John.Reid@stfc.ac.uk
Organization: Rutherford Appleton Laboratory
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.23) Gecko/20090908 Fedora/1.1.18-1.fc10 SeaMonkey/1.1.18
MIME-Version: 1.0
To: sc22wg5@open-std.org
Subject: Re: [ukfortran] (SC22WG5.4290) Another MOVE_ALLOC question
References: <20100709105110.EA03AC3BA14@www2.open-std.org>
In-Reply-To: <20100709105110.EA03AC3BA14@www2.open-std.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-CCLRC-SPAM-report: -1.599 : BAYES_00,RAL_REPCAPS5SUB
X-Scanned-By: MIMEDefang 2.61 on 130.246.135.223
Sender: owner-sc22wg5@open-std.org
Precedence: bulk

Reinhold Bader wrote:
>  Hello all,
> 
> Is the program
> 
> program mvall
>   integer, parameter :: n1 = 100, n2 = 2*n1
>   integer, allocatable :: i1(:)[:], i2(:)[:]
> 
>   allocate(i1(n1)[*])
>   i1 = 1
>   allocate(i2(n2)[*])
>   i2 = 2
>   call move_alloc(i2, i1)
>   if (this_image() == num_images()) then
>     if (size(i1) /= n2 .or. allocated(i2)) then
>       write(*,*) 'FAIL'
>     else
>       write(*,*) 'OK'
>     end if
>   end if
> end program
> 
> standard conforming?

It really cannot be, since it would need to be an image control statement and 
involve a sync of all images. However, we should have made this clearer in the 
definition of MOVE_ALLOC. I will prepare an interpretation that nails this down.

John.

> 
> As far as the definition 13.7.118 of MOVE_ALLOC is concerned, it appears
> that allocatable coarray arguments may be used for this intrinsic
> subroutine. However, the subroutine is classified as PURE and C1288
> says that such subprograms may not contain any image control statements.
> 
> Is it worth raising an interp on this?
> (If it was intended that coarray arguments are allowed there appear to be
>  some integration issues).
> 
> Regards
> Reinhold
> 
> _______________________________________________
> ukfortran mailing list
> http://lists.accu.org/mailman/listinfo/ukfortran

