When the actual argument associated with the VALUES= dummy argument of the intrinsic subroutine DATE_AND_TIME has fewer than eight elements, we crash with an internal error in the runtime. With this patch, the compiler now checks the size of the vector at compilation time, when it is known, and gracefully copes with a short vector at execution time otherwise, without crashing.
6 lines
174 B
Fortran
6 lines
174 B
Fortran
!RUN: %python %S/test_errors.py %s %flang_fc1
|
|
integer values(7)
|
|
!ERROR: VALUES= argument to DATE_AND_TIME must have at least 8 elements
|
|
call date_and_time(values=values)
|
|
end
|