bolt/deps/llvm-18.1.8/flang/test/Semantics/call16.f90
2025-02-14 19:21:04 +01:00

13 lines
338 B
Fortran

! RUN: %python %S/test_errors.py %s %flang_fc1
! Test that intrinsic functions used as subroutines and vice versa are caught.
subroutine test(x, t)
intrinsic :: sin, cpu_time
!ERROR: Cannot call function 'sin' like a subroutine
call sin(x)
!ERROR: Cannot call subroutine 'cpu_time' like a function
x = cpu_time(t)
end subroutine