This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/68769] [fortran] annotate omp data pointers with restrict for -fno-cray-pointers
- From: "vries at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 21 Jan 2016 14:07:58 +0000
- Subject: [Bug fortran/68769] [fortran] annotate omp data pointers with restrict for -fno-cray-pointers
- Auto-submitted: auto-generated
- References: <bug-68769-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68769
vries at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution|--- |INVALID
--- Comment #2 from vries at gcc dot gnu.org ---
(In reply to Dominique d'Humieres from comment #1)
> > Without pointers, there's no way to introduce an alias for a and b.
>
> Indeed! but I don't understand what cray pointers have to do with that. They
> are an extension to f77 which is rejected by gfortran unless -fcray-pointer
> is used
I was looking around for something 'pointery' in fortran, and fcray-pointer is
what I found.
> Note that in post f90 standards, POINTERs are part of the Fortran syntax and
> can alias.
I see, that's good to know.
Indeed, with this program, I can introduce aliasing:
...
program main
implicit none
integer, parameter :: n = 1024
integer :: i
integer, target :: a(n)
integer, pointer :: b(:)
b => a
i = 0
do i = 0, n - 1
a(i) = i * 2
end do
!$omp parallel do
do i = 1, n
a(i) = b(i) + b(i)
end do
do i = 0, n - 1
if (a(i) .ne. i * 4) call abort
end do
end program main
...
Marking resolved-invalid.