[flang-commits] [PATCH] D123747: Test conforming & non-conforming lcobound intrinsic function semantics
Damian Rouson via Phabricator via flang-commits
flang-commits at lists.llvm.org
Thu Apr 14 10:22:44 PDT 2022
rouson updated this revision to Diff 422905.
rouson added a comment.
Remove unimplemented "!ERROR: ..." directives.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123747/new/
https://reviews.llvm.org/D123747
Files:
flang/test/Semantics/lcobound.f90
Index: flang/test/Semantics/lcobound.f90
===================================================================
--- /dev/null
+++ flang/test/Semantics/lcobound.f90
@@ -0,0 +1,72 @@
+! RUN: %python %S/test_errors.py %s %flang_fc1
+! Check for semantic errors in lcobound() function references
+
+program lcobound_tests
+ use iso_c_binding, only : c_int32_t
+ implicit none
+
+ integer n, i, array(1), non_coarray(1), scalar_coarray[*], array_coarray(1)[*]
+ logical non_integer
+
+ !___ standard-conforming statement with no optional arguments present ___
+ !ERROR: No explicit type declared for 'lcobound'
+ n = lcobound(scalar_coarray)
+ n = lcobound(array_coarray)
+ n = lcobound(coarray=scalar_coarray)
+
+ !___ standard-conforming statements with optional dim argument present ___
+ n = lcobound(scalar_coarray, 1)
+ n = lcobound(scalar_coarray, dim=1)
+ n = lcobound(coarray=scalar_coarray, dim=1)
+ n = lcobound( dim=1, coarray=scalar_coarray)
+
+ !___ standard-conforming statements with optional kind argument present ___
+ n = lcobound(scalar_coarray, 1, c_int32_t)
+
+ n = lcobound(scalar_coarray, 1, kind=c_int32_t)
+
+ n = lcobound(scalar_coarray, dim=1, kind=c_int32_t)
+ n = lcobound(scalar_coarray, kind=c_int32_t, dim=1)
+
+ n = lcobound(scalar_coarray, kind=c_int32_t)
+
+ n = lcobound(coarray=scalar_coarray, kind=c_int32_t)
+ n = lcobound(kind=c_int32_t, coarray=scalar_coarray)
+
+ n = lcobound(coarray=scalar_coarray, dim=1, kind=c_int32_t)
+ n = lcobound(dim=1, coarray=scalar_coarray, kind=c_int32_t)
+ n = lcobound(kind=c_int32_t, coarray=scalar_coarray, dim=1)
+ n = lcobound(dim=1, kind=c_int32_t, coarray=scalar_coarray)
+ n = lcobound(kind=c_int32_t, dim=1, coarray=scalar_coarray)
+
+ !___ non-conforming statements ___
+
+ n = lcobound(dim=i)
+
+ n = lcobound(scalar_coarray, non_integer)
+
+ n = lcobound(scalar_coarray, dim=non_integer)
+
+ n = lcobound(scalar_coarray, kind=non_integer)
+
+ n = lcobound(dim=i, kind=c_int32_t)
+
+ n = lcobound(coarray=scalar_coarray, i)
+
+ n = lcobound(3.4)
+
+ n = lcobound(scalar_coarray, i, c_int32_t, 0)
+
+ n = lcobound(coarray=non_coarray)
+
+ n = lcobound(scalar_coarray, i, kind=non_integer)
+
+ n = lcobound(scalar_coarray, array )
+
+ n = lcobound(c=scalar_coarray)
+
+ n = lcobound(scalar_coarray, dims=i)
+
+ n = lcobound(scalar_coarray, i, kinds=c_int32_t)
+
+end program lcobound_tests
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123747.422905.patch
Type: text/x-patch
Size: 2407 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220414/d1900c21/attachment.bin>
More information about the flang-commits
mailing list