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.

Examples of Storage Relationships <strong>for</strong> -qautodbl Suboptions<br />

The examples in this section illustrate storage-sharing relationships between the<br />

following types of entities:<br />

v<br />

v<br />

v<br />

v<br />

v<br />

v<br />

v<br />

v<br />

v<br />

REAL(4)<br />

REAL(8)<br />

REAL(16)<br />

COMPLEX(4)<br />

COMPLEX(8)<br />

COMPLEX(16)<br />

INTEGER(8)<br />

INTEGER(4)<br />

CHARACTER(16).<br />

Note: In the diagrams, solid lines represent the actual data, and dashed lines<br />

represent padding.<br />

0 4 8 16 32<br />

64<br />

COMPLEX (16)<br />

COMPLEX (8)<br />

COMPLEX (4)<br />

REAL (16)<br />

REAL (8)<br />

REAL (4)<br />

INTEGER (8)<br />

INTEGER (4)<br />

CHARACTER (16)<br />

Figure 6. Storage Relationships without the -qautodbl Option<br />

The figure above illustrates the default storage-sharing relationship of the compiler.<br />

@process autodbl(none)<br />

block data<br />

complex(4) x8 /(1.123456789e0,2.123456789e0)/<br />

real(16) r16(2) /1.123q0,2.123q0/<br />

integer(8) i8(2) /1000,2000/<br />

character*5 c(2) /"abcde","12345"/<br />

common /named/ x8,r16,i8,c<br />

end<br />

subroutine s()<br />

complex(4) x8<br />

real(16) r16(2)<br />

integer(8) i8(2)<br />

character*5 c(2)<br />

common /named/ x8,r16,i8,c<br />

! x8 = (1.123456e0,2.123456e0) ! promotion did not occur<br />

! r16(1) = 1.123q0 ! no padding<br />

! r16(2) = 2.123q0 ! no padding<br />

! i8(1) = 1000 ! no padding<br />

! i8(2) = 2000 ! no padding<br />

! c(1) = "abcde" ! no padding<br />

! c(2) = "12345" ! no padding<br />

end subroutine s<br />

414 <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!