You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[flang] Enforce array conformance in actual arguments to ELEMENTALs
When the shapes of actual arguments to ELEMENTAL procedures are
sufficiently well known during semantics, require them to conform.
Differential Revision: https://reviews.llvm.org/D109909
! Enforce array conformance across actual arguments to ELEMENTAL
3
+
module m
4
+
contains
5
+
real elemental function f(a, b)
6
+
real, intent(in) :: a, b
7
+
f = a + b
8
+
end function
9
+
realfunctiong(n)
10
+
integer, value :: n
11
+
g =sqrt(real(n))
12
+
endfunction
13
+
subroutinetest
14
+
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 2
0 commit comments