[flang-commits] [PATCH] D114181: Add semantics unit test for SYNC ALL statement
Damian Rouson via Phabricator via flang-commits
flang-commits at lists.llvm.org
Tue Dec 21 16:37:51 PST 2021
rouson updated this revision to Diff 395771.
rouson added a comment.
Expand coverage of SYNC ALL statement semantics test:
1. Add checks for both constraints in the standard.
2. Check more valid and invalid statement forms.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114181/new/
https://reviews.llvm.org/D114181
Files:
flang/test/Semantics/synchronization01.f90
Index: flang/test/Semantics/synchronization01.f90
===================================================================
--- /dev/null
+++ flang/test/Semantics/synchronization01.f90
@@ -0,0 +1,59 @@
+! RUN: %python %S/test_errors.py %s %flang_fc1
+! XFAIL: *
+! This test checks for semantic errors in sync all statements based on the
+! statement specification in section 11.6.3 of the Fortran 2018 standard.
+
+program test_sync_all
+ implicit none
+
+ integer sync_status, co_indexed_integer[*], superfluous_stat
+ character(len=128) error_message, co_indexed_character[*], superfluous_errmsg
+ logical invalid_stat_variable_type, invalid_errmsg_variable_type
+
+ !___ standard-conforming calls ___
+
+ sync all
+ sync all(stat=sync_status)
+ sync all( errmsg=error_message)
+ sync all(stat=sync_status, errmsg=error_message)
+
+ !___ non-standard-conforming calls ___
+
+ !ERROR: expected execution part construct
+ sync all(invalid_stat_specifier=sync_status)
+
+ !ERROR: expected execution part construct
+ sync all(stat=invalid_stat_variable_type)
+
+ !ERROR: expected execution part construct
+ sync all(errmsg=invalid_errmsg_variable_type)
+
+ !ERROR: expected execution part construct
+ sync all(sync_status)
+
+ !ERROR: expected execution part construct
+ sync all( sync_status, errmsg=error_message)
+
+ !ERROR: expected execution part construct
+ sync all( errmsg)
+
+ !ERROR: expected execution part construct
+ sync all( sync_status, errmsg)
+
+ ! Check constraint C1172 from the Fortran 2018 standard
+ !ERROR: to be determined
+ sync all(stat=sync_status, stat=superfluous_stat)
+
+ ! Check constraint C1172 from the Fortran 2018 standard
+ !ERROR: to be determined
+ sync all(errmsg=error_message, errmsg=superfluous_errmsg)
+
+ ! Check constraint C1173 from the Fortran 2018 standard
+ !ERROR: to be determined
+ sync all(stat=co_indexed_integer[1])
+
+ ! Check constraint C1173 from the Fortran 2018 standard
+ !ERROR: to be determined
+ sync all(errmsg=co_indexed_character[1])
+
+end program test_sync_all
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114181.395771.patch
Type: text/x-patch
Size: 2108 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20211222/78f5a613/attachment-0001.bin>
More information about the flang-commits
mailing list