24.05.2014 Views

XL Fortran Enterprise Edition for AIX : User's Guide - IBM

XL Fortran Enterprise Edition for AIX : User's Guide - IBM

XL Fortran Enterprise Edition for AIX : User's Guide - IBM

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

equivalence (a, b(3))<br />

t = b; a = t<br />

t = a(10:1:-1); a = t<br />

end subroutine<br />

When SUB1 is called, an alias exists between J and K. J and K refer to the same<br />

item in storage.<br />

CALL SUB1(I,I)<br />

...<br />

SUBROUTINE SUB1(J,K)<br />

In the following example, the program might store 5 instead of 6 into J unless<br />

-qalias=nostd indicates that an alias might exist.<br />

INTEGER BIG(1000)<br />

INTEGER SMALL(10)<br />

COMMON // BIG<br />

EQUIVALENCE(BIG,SMALL)<br />

...<br />

BIG(500) = 5<br />

SMALL (I) = 6 ! Where I has the value 500<br />

J = BIG(500)<br />

Restrictions<br />

Because this option inhibits some optimizations of some variables, using it can<br />

lower per<strong>for</strong>mance.<br />

Programs that contain nonstandard or integer POINTER aliasing may produce<br />

incorrect results if you do not compile them with the correct -qalias settings. The<br />

xlf90, xlf90_r, xlf90_r7, xlf95, xlf95_r, xlf95_r7, f90, and f95 commands assume that<br />

a program contains only standard aliasing (-qalias=aryovrlp:pteovrlp:std:nointptr),<br />

while the xlf_r, xlf_r7, xlf, and f77/<strong>for</strong>t77 commands, <strong>for</strong> compatibility with <strong>XL</strong><br />

<strong>Fortran</strong> Version 2, assume that integer POINTERs may be present<br />

(-qalias=aryovrlp:pteovrlp:std:intptr).<br />

124 <strong>XL</strong> <strong>Fortran</strong> <strong>Enterprise</strong> <strong>Edition</strong> <strong>for</strong> <strong>AIX</strong> : User’s <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!