2 ! { dg-additional-options "-std=f2018" }
4 ! PR fortran/96580 - constraints on VALUES argument of DATE_AND_TIME intrinsic
6 program test_time_and_date
8 integer(1), dimension(8) :: values1
9 integer(2), dimension(8) :: values2
10 integer(4), dimension(8) :: values
11 integer(4), dimension(9) :: values4
12 integer(8), dimension(8) :: values8
13 integer , dimension(7) :: values7
15 call date_and_time(VALUES
=values1
) ! { dg-error "decimal exponent range" }
16 call date_and_time(VALUES
=values2
)
17 call date_and_time(VALUES
=values
)
18 call date_and_time(VALUES
=values4
)
19 call date_and_time(VALUES
=values8
)
20 call date_and_time(VALUES
=values7
) ! { dg-error "at .1. too small \\(7/8\\)" }
21 end program test_time_and_date