| 1 |
! { dg-do compile } |
| 2 |
! { dg-options "-std=f2023" } |
| 3 |
! PR fortran/112609 - F2023 restrictions on integer arguments to SYSTEM_CLOCK |
| 4 |
|
| 5 |
program p |
| 6 |
implicit none |
| 7 |
integer :: i, j, k |
| 8 |
integer(2) :: i2, j2, k2 |
| 9 |
integer(8) :: i8, j8, k8 |
| 10 |
real :: x |
| 11 |
|
| 12 |
call system_clock(count=i2) ! { dg-error "kind smaller than default integer" } |
| 13 |
call system_clock(count_rate=j2) ! { dg-error "kind smaller than default integer" } |
| 14 |
call system_clock(count_max=k2) ! { dg-error "kind smaller than default integer" } |
| 15 |
|
| 16 |
call system_clock(count=i8,count_rate=x,count_max=k8) |
| 17 |
call system_clock(count=i, count_rate=j8) ! { dg-error "different kind" } |
| 18 |
call system_clock(count=i8,count_rate=j) ! { dg-error "different kind" } |
| 19 |
call system_clock(count=i, count_max=k8) ! { dg-error "different kind" } |
| 20 |
call system_clock(count=i8,count_max=k) ! { dg-error "different kind" } |
| 21 |
call system_clock(count_rate=j, count_max=k8) ! { dg-error "different kind" } |
| 22 |
call system_clock(count_rate=j8,count_max=k) ! { dg-error "different kind" } |
| 23 |
call system_clock(i,x,k8) ! { dg-error "different kind" } |
| 24 |
end |