This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [patch][gomp4] openacc loops
- From: Janne Blomqvist <blomqvist dot janne at gmail dot com>
- To: Cesar Philippidis <cesar at codesourcery dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Fortran List <fortran at gcc dot gnu dot org>, Jakub Jelinek <jakub at redhat dot com>, Tobias Burnus <burnus at net-b dot de>, i dot usmanov at samsung dot com, thomas at codesourcery dot com
- Date: Thu, 5 Jun 2014 09:34:01 +0300
- Subject: Re: [patch][gomp4] openacc loops
- Authentication-results: sourceware.org; auth=none
- References: <538E538E dot 9010304 at codesourcery dot com>
On Wed, Jun 4, 2014 at 2:00 AM, Cesar Philippidis
<cesar@codesourcery.com> wrote:
> One item on my to do list is adding support for subarrays in openacc in
> fortran. So far I've got Ilmir's patch
> <https://gcc.gnu.org/ml/gcc-patches/2014-05/msg01832.html> to work with
> some local arrays, but not with allocatable arrays. I saw some chatter
> on IRC this morning regarding array pointers and allocatable arrays. I'm
> curious about how aliasing is going to be detected. Is that going to be
> handled inside libgomp or by the compiler? Eg, consider a subroutine
> which takes in to allocatable arrays as parameters, a and b. What
> happens when a == b? We don't want to have two different copies of
> whatever a and b point to on the target.
Fortran does not allow aliasing of dummy arguments, so a compiler is
allowed to optimize assuming aliasing does not occur. The exception is
dummy arguments with the POINTER attribute, those can alias with other
variables having the POINTER or TARGET attributes. So an ALLOCATABLE
variable can not alias with any other variable, unless it has the
TARGET attribute.
>
> Thanks,
> Cesar
--
Janne Blomqvist