49 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12! This test checks for errors in sync memory statements based on the3! statement specification in section 11.6.5 of the Fortran 2018 standard.4 5program test_sync_memory6 implicit none7 8 integer sync_status9 character(len=128) error_message10 11 !___ standard-conforming statements ___12 13 sync memory14 sync memory()15 sync memory(stat=sync_status)16 sync memory( errmsg=error_message)17 sync memory(stat=sync_status, errmsg=error_message)18 19 !___ non-standard-conforming statements ___20 21 !______ invalid sync-stat-lists: invalid stat= ____________22 23 !ERROR: expected end of statement24 sync memory(status=sync_status)25 26 ! Invalid sync-stat-list: missing stat-variable27 !ERROR: expected end of statement28 sync memory(stat)29 30 ! Invalid sync-stat-list: missing 'stat='31 !ERROR: expected end of statement32 sync memory(sync_status)33 34 !______ invalid sync-stat-lists: invalid errmsg= ____________35 36 ! Invalid errmsg-variable keyword37 !ERROR: expected end of statement38 sync memory(errormsg=error_message)39 40 ! Invalid sync-stat-list: missing 'errmsg='41 !ERROR: expected end of statement42 sync memory(error_message)43 44 ! Invalid sync-stat-list: missing errmsg-variable45 !ERROR: expected end of statement46 sync memory(errmsg)47 48end program test_sync_memory49