30 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc1 -pedantic2! Tests for the ETIME intrinsics3 4subroutine bad_kind_error(values, time)5 REAL(KIND=8), DIMENSION(2) :: values6 REAL(KIND=8) :: time7 !ERROR: Actual argument for 'values=' has bad type or kind 'REAL(8)'8 call etime(values, time)9end subroutine bad_kind_error10 11subroutine bad_args_error(values)12 REAL(KIND=4), DIMENSION(2) :: values13 !ERROR: missing mandatory 'time=' argument14 call etime(values)15end subroutine bad_args_error16 17subroutine bad_apply_form(values)18 REAL(KIND=4), DIMENSION(2) :: values19 REAL(KIND=4) :: time20 !Declaration of 'etime'21 call etime(values, time)22 !ERROR: Cannot call subroutine 'etime' like a function23 time = etime(values)24end subroutine bad_apply_form25 26subroutine good_kind_equal(values, time)27 REAL(KIND=4), DIMENSION(2) :: values28 REAL(KIND=4) :: time29 call etime(values, time)30end subroutine good_kind_equal