aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/unsigned_2.f90
blob: 499fd164786b36071bc450bc0d4a1ae782be57a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
! { dg-do run }
! { dg-options "-funsigned" }
! Test some list-directed I/O
program main
  implicit none
  unsigned :: uw, ur, vr
  unsigned(kind=8) :: u8
  uw = 10u
  open (10, status="scratch")
  write (10,*) uw,-1
  rewind 10
  read (10,*) ur,vr
  if (ur /= 10u .or. vr /= 4294967295u) error stop 1
  rewind 10
  write (10,*) 17179869184u_8
  rewind 10
  read (10,*) u8
  if (u8 /= 17179869184u_8) error stop 2
end program main