brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.1 KiB · 1011315 Raw
74 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12! This test checks for semantic errors in event post statements based on the3! statement specification in section 11.6.7 of the Fortran 2018 standard.4 5program test_event_post6  use iso_fortran_env, only : event_type7  implicit none8 9  ! event_type variables must be coarrays10  type(event_type) non_coarray11 12  type(event_type) concert[*], occurrences(2)[*]13  integer non_event[*], sync_status, co_indexed_integer[*], superfluous_stat, non_scalar(1)14  character(len=128) error_message, co_indexed_character[*], superfluous_errmsg15  logical invalid_type16 17  !___ standard-conforming statements ___18 19  event post(concert)20  event post(concert[1])21  event post(occurrences(1))22  event post(occurrences(1)[1])23  event post(concert, stat=sync_status)24  event post(concert,                   errmsg=error_message)25  event post(concert, stat=sync_status, errmsg=error_message)26 27  !___ non-standard-conforming statements ___28 29  !______ invalid event-variable ____________________________30 31  ! event-variable has an unknown keyword argument32  !ERROR: expected ')'33  event post(event=concert)34 35  !______ invalid sync-stat-lists: invalid stat= ____________36 37  ! Invalid stat-variable keyword38  !ERROR: expected ')'39  event post(concert, status=sync_status)40 41  ! Invalid sync-stat-list: missing stat-variable42  !ERROR: expected ')'43  event post(concert, stat)44 45  ! Invalid sync-stat-list: missing 'stat='46  !ERROR: expected ')'47  event post(concert, sync_status)48 49  !______ invalid sync-stat-lists: invalid errmsg= ____________50 51  ! Invalid errmsg-variable keyword52  !ERROR: expected ')'53  event post(concert, errormsg=error_message)54 55  ! Invalid sync-stat-list: missing 'errmsg='56  !ERROR: expected ')'57  event post(concert, error_message)58 59  ! Invalid sync-stat-list: missing errmsg-variable60  !ERROR: expected ')'61  event post(concert, errmsg)62 63  !______ invalid event-variable: redundant event-variable ____________64 65  ! Too many arguments66  !ERROR: expected ')'67  event post(concert, occurrences(1))68 69  ! Too many arguments70  !ERROR: expected ')'71  event post(concert, occurrences(1), stat=sync_status, errmsg=error_message)72 73end program test_event_post74