| 1 |
! { dg-do run } |
| 2 |
! { dg-options "-funsigned" } |
| 3 |
program memain |
| 4 |
use iso_fortran_env, only : uint8 |
| 5 |
call test1 |
| 6 |
call test2 |
| 7 |
contains |
| 8 |
subroutine test1 |
| 9 |
unsigned(uint8) :: nface, nmax |
| 10 |
nface = 12u_1 |
| 11 |
nmax = - mod(-nface+1u,nface) |
| 12 |
if (nmax /= 251u_1) error stop 1 |
| 13 |
end subroutine test1 |
| 14 |
subroutine test2 |
| 15 |
unsigned(uint8), parameter :: nface = 12u_1 |
| 16 |
unsigned(uint8), parameter :: nmax = - mod(-nface+1u,nface) |
| 17 |
if (nmax /= 251u_1) error stop 11 |
| 18 |
end subroutine test2 |
| 19 |
end program memain |