Tells the compiler that Cray* pointers do not alias other variables.
Windows: Data > Assume Cray Pointers
Do Not Share Memory Locations
Linux: None
IA-32, IntelŪ EM64T, IntelŪ ItaniumŪ architecture
Linux: | -safe-cray-ptr |
Windows: | /Qsafe-cray-ptr |
None
OFF | The compiler assumes that Cray pointers alias other variables. |
This option tells the compiler that Cray pointers do not alias (that is, do not specify sharing memory with) other variables.
Linux: -safe_cray_ptr
Windows: /Qsafe_cray_ptr
Consider the following:
pointer (pb, b)
pb = getstorage()
do i = 1, n
b(i) = a(i) + 1
enddo
By default, the compiler assumes that b and a are aliased. To prevent such an assumption, specify the -safe-cray-ptr option, and the compiler will treat b(i) and a(i) as independent of each other.
However, if the variables are intended to be aliased with Cray pointers, using the -safe-cray-ptr option produces incorrect results. In the following example, -safe-cray-ptr should not be used:
pointer (pb, b)
pb = loc(a(2))
do i=1, n
b(i) = a(i) +1
enddo