diff --git a/flang/test/Semantics/synchronization01.f90 b/flang/test/Semantics/synchronization01.f90 new file mode 100644 --- /dev/null +++ b/flang/test/Semantics/synchronization01.f90 @@ -0,0 +1,28 @@ +! RUN: %python %S/test_errors.py %s %flang_fc1 +! Check for semantic errors in sync all statements + +program test_sync_all + implicit none + + integer sync_status + character(len=128) error_message + logical invalid_type + + sync all + sync all(stat=sync_status) + sync all(stat=sync_status, errmsg=error_message) + + !ERROR: expected execution part construct + sync all(invalid_argument_keyword=sync_status) + !ERROR: expected execution part construct + sync all(invalid_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) + +end program test_sync_all