Debian Codegraph @

gcc/testsuite/gfortran.dg/unsigned_39.f90

raw
1 ! { dg-do run }
2 ! { dg-options "-funsigned" }
3 program memain
4 use iso_fortran_env, only : uint8, uint32
5 implicit none
6 call test1
7 call test2
8 contains
9 subroutine test1
10 unsigned(uint32) :: u1, u2
11 unsigned(uint8), dimension(3,3) :: v1, v2
12 u1 = umaskr(3)
13 if (u1 /= 7u) error stop 1
14 u2 = umaskl(2)
15 if (u2 /= 3221225472u) error stop 2
16 v1 = umaskr(5,uint8)
17 if (any(v1 /= 31u)) error stop 3
18 v2 = umaskl(5,uint8)
19 if (any(v2 /= 248u_uint8)) error stop 4
20 end subroutine test1
21 subroutine test2
22 unsigned(uint32), parameter :: u1 = umaskr(3), u2=umaskl(2)
23 unsigned(uint8), dimension(3,3) :: v1 = umaskr(5,uint8), v2 = umaskl(5,uint8)
24 if (u1 /= 7u) error stop 11
25 if (u2 /= 3221225472u) error stop 12
26 if (any(v1 /= 31u)) error stop 13
27 if (any(v2 /= 248u_uint8)) error stop 14
28 end subroutine test2
29 end program memain