Debian Codegraph @

gcc/testsuite/gfortran.dg/unsigned_6.f90

raw
1 ! { dg-do run }
2 ! { dg-options "-funsigned" }
3 ! Test the uint intrinsic.
4 program main
5 implicit none
6 integer :: i
7 real :: r
8 complex :: c
9 if (1u /= uint(1)) error stop 1
10 if (2u /= uint(2.0)) error stop 2
11 if (3u /= uint((3.2,0.))) error stop 3
12
13 i = 4
14 if (uint(i) /= 4u) error stop 4
15 r = 5.2
16 if (uint(r) /= 5u) error stop 5
17 c = (6.2,-1.2)
18 if (uint(c) /= 6u) error stop 6
19
20 if (uint(z'ff') /= 255u) error stop 7
21 end program main