From owner-sc22wg5@open-std.org  Wed Jul  7 12:55:55 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 F1B8CC3BA0E; Wed,  7 Jul 2010 12:55:54 +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 6739CC3BA0A
	for <sc22wg5@open-std.org>; Wed,  7 Jul 2010 12:55:52 +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 o67AtV5E025157;
	Wed, 7 Jul 2010 11:55:33 +0100
Received: from jkr.cse.rl.ac.uk (localhost.localdomain [127.0.0.1])
	by jkr.cse.rl.ac.uk (Postfix) with ESMTP id 393B356255;
	Wed,  7 Jul 2010 11:55:31 +0100 (BST)
Message-ID: <4C345D22.3040800@stfc.ac.uk>
Date: Wed, 07 Jul 2010 11:55:30 +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 pango-text SeaMonkey/1.1.18
MIME-Version: 1.0
To: sc22wg5@open-std.org
Subject: Re: [ukfortran] (SC22WG5.4281) certain intrinsics and coindexed objects
References: <20100706200940.62F22C3BA05@www2.open-std.org>
In-Reply-To: <20100706200940.62F22C3BA05@www2.open-std.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-CCLRC-SPAM-report: -2.599 : BAYES_00
X-Scanned-By: MIMEDefang 2.61 on 130.246.135.223
Sender: owner-sc22wg5@open-std.org
Precedence: bulk

Reinhold.Bader@lrz.de wrote:
> Hello all,
> 
> Imagine the program
> 
> program p
>   integer, allocatable :: x[:]
> 
>   allocate(x)
>   sync all
>   if (this_image() == 2) write(*,*) allocated(x[1])
> end program
> 
> Is this program standard-conforming?

No, but this program is:

program p
   integer, allocatable :: x[:]

   allocate(x[*]) ! You forgot [*]
   sync all
   if (this_image() == 2) write(*,*) allocated(x)
        ! x[1] is an expression, not an allocatable array
end program

> If yes, would it still be conforming if the "sync all" statement is dropped?

For the corrected program the "sync all" statement may be dropped.

Cheers,

John.
