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
"ASYNCHRONOUS or VOLATILE actual argument that is not simply contiguous may not be associated with a contiguous ASYNCHRONOUS or VOLATILE %s"_err_en_US,
786
795
dummyName);
796
+
volatileOrAsyncNeedsTempDiagnosticIssued = true;
787
797
}
788
798
}
789
-
// The vector subscript case is handled by the definability check above.
790
-
// The copy-in/copy-out cases are handled by the previous checks.
791
-
// Nag, GFortran, and NVFortran all error on this case, even though it is
"The actual argument '%s' with %s attribute should not be associated with %s with %s attribute, because a temporary copy is required during the call"_warn_en_US,
Copy file name to clipboardExpand all lines: flang/test/Semantics/call45.f90
+8-3Lines changed: 8 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -7,10 +7,11 @@ program call45
7
7
call sub(v([1,2,2,3,3,3,4,4,4,4]))
8
8
!PORTABILITY: The array section 'v(21_8:30_8:1_8)' should not be associated with dummy argument 'v=' with VOLATILE attribute, unless the dummy is assumed-shape or assumed-rank [-Wportability]
9
9
call sub(v(21:30))
10
-
!PORTABILITY: The array section 'v(21_8:40_8:2_8)' should not be associated with dummy argument 'v=' with VOLATILE attribute, unless the dummy is assumed-shape or assumed-rank [-Wportability]
10
+
!WARNING: The array section 'v(21_8:40_8:2_8)' should not be associated with dummy argument 'v=' with VOLATILE attribute, unless the dummy is assumed-shape or assumed-rank [-Wvolatile-or-asynchronous-temporary]
11
11
call sub(v(21:40:2))
12
12
call sub2(v(21:40:2))
13
13
call sub4(p)
14
+
call sub5(p)
14
15
print*, v
15
16
contains
16
17
subroutinesub(v)
@@ -23,7 +24,7 @@ subroutine sub1(v)
23
24
endsubroutine sub1
24
25
subroutinesub2(v)
25
26
integer:: v(:)
26
-
!TODO: This should either be an portability warning or copy-in-copy-out warning
27
+
!PORTABILITY: The actual argument 'v' should not be associated with dummy argument 'v=' with VOLATILE attribute, because a temporary copy is required during the call [-Wportability]
27
28
call sub(v)
28
29
call sub1(v)
29
30
endsubroutine sub2
@@ -33,9 +34,13 @@ subroutine sub3(v)
33
34
endsubroutine sub3
34
35
subroutinesub4(v)
35
36
integer, pointer:: v(:)
36
-
!TODO: This should either be a portability warning or copy-in-copy-out warning
37
+
!PORTABILITY: The actual argument 'v' should not be associated with dummy argument 'v=' with VOLATILE attribute, because a temporary copy is required during the call [-Wportability]
0 commit comments