From owner-sc22wg5@open-std.org  Mon Mar 30 19:10:09 2009
Return-Path: <owner-sc22wg5@open-std.org>
X-Original-To: sc22wg5-dom7
Delivered-To: sc22wg5-dom7@www2.open-std.org
Received: by www2.open-std.org (Postfix, from userid 521)
	id 772F8C178DA; Mon, 30 Mar 2009 19:10:09 +0200 (CET DST)
X-Original-To: sc22wg5@open-std.org
Delivered-To: sc22wg5@open-std.org
Received: from smtp.llnl.gov (nspiron-3.llnl.gov [128.115.41.83])
	by www2.open-std.org (Postfix) with ESMTP id A2A21C178D9
	for <sc22wg5@open-std.org>; Mon, 30 Mar 2009 19:09:55 +0200 (CET DST)
X-Attachments: None
Received: from cyrus2.llnl.gov ([128.15.97.105])
  by smtp.llnl.gov with ESMTP; 30 Mar 2009 10:09:49 -0700
From: Aleksandar Donev <donev1@llnl.gov>
Organization: LLNL
To: WG5 <sc22wg5@open-std.org>
Subject: Re: (j3.2006) (SC22WG5.3968)  question about deallocation
Date: Mon, 30 Mar 2009 10:09:49 -0700
User-Agent: KMail/1.9.4
References: <49CACA36.5070104@nag-j.co.jp> <49CDEC08.8040403@sun.com> <20090330003058.7CF82C178D9@www2.open-std.org>
In-Reply-To: <20090330003058.7CF82C178D9@www2.open-std.org>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Message-Id: <200903301009.49818.donev1@llnl.gov>
Sender: owner-sc22wg5@open-std.org
Precedence: bulk

On Sunday 29 March 2009 17:30, Malcolm Cohen wrote:

> > =A0 =A0 =A0 ALLOCATE(P(1))
> > =A0 =A0 =A0 Q =3D> P(1)
> > =A0 =A0 =A0 DEALLOCATE(Q)
>
> Did we *really* say that in an official interpretation? =A0Which one? =A0
Yes, we did (I think you were there too). I know I submitted the interp,=20
so perhaps grepping that would find it (is there a collected list of=20
all the interps somewhere?). It was also decided that

allocate(p(1:2))
q=3D>p(2:1:-1) ! Reverse order
deallocate(q)

is not allowed.

That said, no doubt that in this particular example things are=20
different. A part of an object is never the whole, by definition. For=20
arrays, "whole array" is a much trickier issue, because as Malcolm said=20
they often treated as sequencies of elements, especially in the "old"=20
=4677-style rules. Perhaps that is why we decided it was too much work,=20
and impossible for an implementation, to distinguish between

q=3D>p(1)

and

q=3D>p

and make semantic differences based on that.

Aleks
