44 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12! This test checks for semantic errors in sync all statements.3! Some of the errors in this test would be hidden by the errors in4! the test synchronization01a.f90 if they were included in that file,5! and are thus tested here.6 7program test_sync_all8 implicit none9 10 integer sync_status, co_indexed_integer[*], superfluous_stat, non_scalar(1)11 character(len=128) error_message, co_indexed_character[*], superfluous_errmsg12 logical invalid_type13 14 !___ non-standard-conforming statements ___15 16 !ERROR: Must have INTEGER type, but is LOGICAL(4)17 sync all(stat=invalid_type)18 19 !ERROR: Must be a scalar value, but is a rank-1 array20 sync all(stat=non_scalar)21 22 !ERROR: Must have CHARACTER type, but is LOGICAL(4)23 sync all(errmsg=invalid_type)24 25 !ERROR: The stat-variable in a sync-stat-list may not be repeated26 sync all(stat=sync_status, stat=superfluous_stat)27 28 !ERROR: The errmsg-variable in a sync-stat-list may not be repeated29 sync all(errmsg=error_message, errmsg=superfluous_errmsg)30 31 !ERROR: The stat-variable in a sync-stat-list may not be repeated32 sync all(stat=sync_status, errmsg=error_message, stat=superfluous_stat)33 34 !ERROR: The errmsg-variable in a sync-stat-list may not be repeated35 sync all(stat=sync_status, errmsg=error_message, errmsg=superfluous_errmsg)36 37 !ERROR: The stat-variable or errmsg-variable in a sync-stat-list may not be a coindexed object38 sync all(stat=co_indexed_integer[1])39 40 !ERROR: The stat-variable or errmsg-variable in a sync-stat-list may not be a coindexed object41 sync all(errmsg=co_indexed_character[1])42 43end program test_sync_all44