brintos

brintos / llvm-project-archived public Read only

0
0
Text · 643 B · e418b98 Raw
19 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12! Enforce array conformance across actual arguments to ELEMENTAL3module m4 contains5  real elemental function f(a, b)6    real, intent(in) :: a, b7    f = a + b8  end function9  real function g(n)10    integer, value :: n11    g = sqrt(real(n))12  end function13  subroutine test14    real :: a(3) = [1, 2, 3]15    !ERROR: Dimension 1 of actual argument (a) corresponding to dummy argument #1 ('a') has extent 3, but actual argument ([REAL(4)::(g(int(j,kind=4)),INTEGER(8)::j=1_8,2_8,1_8)]) corresponding to dummy argument #2 ('b') has extent 216    print *, f(a, [(g(j), j=1, 2)])17  end subroutine18end19