Debian Codegraph @

gcc/testsuite/gfortran.dg/unsigned_12.f90

raw
1 ! { dg-do run }
2 ! { dg-options "-funsigned" }
3 ! Test some
4 program main
5 unsigned :: u_a
6 u_a = 1u
7 if (ishft(1u,31) /= 2147483648u) error stop 1
8 if (ishft(u_a,31) /= 2147483648u) error stop 2
9
10 u_a = 3u
11 if (ishft(3u,2) /= 12u) error stop 3
12 if (ishft(u_a,2) /= 12u) error stop 4
13
14 u_a = huge(u_a)
15 if (ishftc(huge(u_a),1) /= huge(u_a)) error stop 5
16 if (ishftc(u_a,1) /= u_a) error stop 6
17
18 end program