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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

! Data values between r8 and x16 are preserved.<br />

! Data values between i8 and b are preserved.<br />

! x16 = (1.123456789123456789q0,2.123456789123456789q0)<br />

! ! promotion occurred<br />

! x8 = upper 8 bytes of r8(1) ! padding occurred<br />

! r8(1) = real(x16) ! promotion occurred<br />

! r8(2) = imag(x16) ! promotion occurred<br />

! i8(1) = upper 8 bytes of real(x16) ! padding occurred<br />

! i8(2) = upper 8 bytes of imag(x16) ! padding occurred<br />

! b(1:8)= i8(1) ! padding occurred<br />

! b(9:16)= i8(2) ! padding occurred<br />

end<br />

0 4 8 16 32<br />

64<br />

COMPLEX (16 ) (padded)<br />

COMPLEX (8) (promoted)<br />

COMPLEX (4) (promoted)<br />

REAL (16) (padded)<br />

REAL (8) (promoted)<br />

REAL (4) (promoted)<br />

INTEGER (8) (padded)<br />

INTEGER (4) (padded)<br />

CHARACTER (16)<br />

Figure 12. Storage Relationships with -qautodbl=dblpad<br />

In the figure above, the dashed lines represent the padding.<br />

@process autodbl(dblpad)<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(8) x8<br />

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

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

character*5 c(2)<br />

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

! x8 = (1.123456789d0,2.123456789d0) ! promotion occurred<br />

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

! r16(3) = 2.123q0 ! padding occurred<br />

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

! i8(3) = 2000 ! padding occurred<br />

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

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

end subroutine s<br />

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