Plugins: Add label-text.h to CPPLIB_H so it will be installed [PR115288]
[official-gcc.git] / gcc / testsuite / gfortran.dg / boz_15.f90
blob1045e9ffc70ef03e40f7050e80977ca4926d8e6c
1 ! { dg-do run }
2 ! { dg-require-effective-target fortran_large_real }
3 ! { dg-require-effective-target fortran_large_int }
5 ! PR fortran/41711
7 ! Check reading and writing of real(10/16) BOZ,
8 ! which needs integer(16) support.
10 implicit none
11 character(len=256) :: str
12 integer,parameter :: xp = selected_real_kind (precision (0.0d0)+1)
13 real(xp) :: r1,r2
14 complex(xp) :: z1,z2
16 r2 = 5.0_xp
17 r1 = 2.0_xp
18 ! Real B(OZ)
19 write(str,'(b128)') r1
20 read (str,'(b128)') r2
21 if(r2 /= r1) STOP 1
22 ! Real (B)O(Z)
23 r2 = 5.0_xp
24 write(str,'(o126)') r1
25 read (str,'(o126)') r2
26 if(r2 /= r1) STOP 2
27 ! Real (BO)Z
28 r2 = 5.0_xp
29 write(str,'(z126)') r1
30 read (str,'(z126)') r2
31 if(r2 /= r1) STOP 3
33 z2 = cmplx(5.0_xp,7.0_xp)
34 z1 = cmplx(2.0_xp,3.0_xp)
35 ! Complex B(OZ)
36 write(str,'(2b128)') z1
37 read (str,'(2b128)') z2
38 if(z2 /= z1) STOP 4
39 ! Complex (B)O(Z)
40 z2 = cmplx(5.0_xp,7.0_xp)
41 write(str,'(2o126)') z1
42 read (str,'(2o126)') z2
43 if(z2 /= z1) STOP 5
44 ! Complex (BO)Z
45 z2 = cmplx(5.0_xp,7.0_xp)
46 write(str,'(2z126)') z1
47 read (str,'(2z126)') z2
48 if(z2 /= z1) STOP 6
49 end