blob: 80a7a54e3802d6bd6aa268da86e4b3b279bd0bd1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
! { dg-do compile }
! { dg-options "-funsigned" }
! Test different prohibited conversions.
program main
integer :: i
unsigned :: u
print *,1 + 2u ! { dg-error "Operands of binary numeric operator" }
print *,2u + 1 ! { dg-error "Operands of binary numeric operator" }
print *,2u ** 1 ! { dg-error "Operands of binary numeric operator" }
print *,2u ** 1u
print *,1u < 2 ! { dg-error "Inconsistent types" }
print *,int(1u) < 2
end program main
|