OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [io_real_boz.f90] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! Test reading/writing of integer, real and character BOZ
3
! non-integer BOZ are not valid in standard Fortran, however.
4
! PR fortran/29625
5
program real_boz
6
  implicit none
7
  integer(4)        :: i,i2
8
  real(4)           :: r,r2
9
  complex(4)        :: z,z2
10
  character         :: c,c2
11
  character(len=100) :: str,fmt
12
 
13
  i = 43
14
  r = 325.56
15
  z = cmplx(14.456, 345342.456)
16
  c ='g'
17
 
18
  write(str,'(b0)') i
19
  write(fmt,'(a,i0,a)') '(b',len_trim(str),')'
20
  read(str,fmt) i2
21
  if(i /= i2) call abort()
22
 
23
  write(str,'(o0)') i
24
  write(fmt,'(a,i0,a)') '(o',len_trim(str),')'
25
  read(str,fmt) i2
26
  if(i /= i2) call abort()
27
 
28
  write(str,'(z0)') i
29
  write(fmt,'(a,i0,a)') '(z',len_trim(str),')'
30
  read(str,fmt) i2
31
  if(i /= i2) call abort()
32
 
33
 
34
  write(str,'(b0)') r
35
  write(fmt,'(a,i0,a)') '(b',len_trim(str),')'
36
  read(str,fmt) r2
37
  if(r /= r2) call abort()
38
 
39
  write(str,'(o0)') r
40
  write(fmt,'(a,i0,a)') '(o',len_trim(str),')'
41
  read(str,fmt) r2
42
  if(r /= r2) call abort()
43
 
44
  write(str,'(z0)') r
45
  write(fmt,'(a,i0,a)') '(z',len_trim(str),')'
46
  read(str,fmt) r2
47
  if(r /= r2) call abort()
48
 
49
 
50
  write(str,'(b0)') c
51
  write(fmt,'(a,i0,a)') '(b',len_trim(str),')'
52
  read(str,fmt) c2
53
  if(c /= c2) call abort()
54
 
55
  write(str,'(o0)') c
56
  write(fmt,'(a,i0,a)') '(o',len_trim(str),')'
57
  read(str,fmt) c2
58
  if(c /= c2) call abort()
59
 
60
  write(str,'(z0)') c
61
  write(fmt,'(a,i0,a)') '(z',len_trim(str),')'
62
  read(str,fmt) c2
63
  if(c /= c2) call abort()
64
 
65
end program real_boz
66
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.