This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/68769] New: [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: Mon, 07 Dec 2015 14:42:27 +0000
- Subject: [Bug fortran/68769] New: [fortran] annotate omp data pointers with restrict for -fno-cray-pointers
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68769
Bug ID: 68769
Summary: [fortran] annotate omp data pointers with restrict for
-fno-cray-pointers
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: vries at gcc dot gnu.org
Target Milestone: ---
Consider the following program:
...
program main
implicit none
integer, parameter :: n = 1024
integer, dimension (0:n-1) :: a, b
integer :: i
do i = 0, n - 1
a(i) = i * 2
end do
do i = 0, n -1
b(i) = i * 4
end do
!$omp parallel do
do i = 0, n - 1
a(i) = b(i) + b(i)
end do
do i = 0, n - 1
if (a(i) .ne. b(i) + b(i)) call abort
end do
end program main
...
when compiling with -fno-cray-pointers, I think we can annotate the pointers to
a and b in omp_data_i (the argument to the resulting thread function) as
restrict. Without pointers, there's no way to introduce an alias for a and b.