https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88484

            Bug ID: 88484
           Summary: OpenACC wait directive without wait argument but with
                    async clause
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Keywords: openacc
          Severity: normal
          Priority: P3
         Component: libgomp
          Assignee: tschwinge at gcc dot gnu.org
          Reporter: tschwinge at gcc dot gnu.org
                CC: cltang at gcc dot gnu.org, jakub at gcc dot gnu.org
  Target Milestone: ---

As made evident by this small patch:

    --- libgomp/oacc-parallel.c
    +++ libgomp/oacc-parallel.c
    @@ -632,6 +632,8 @@ GOACC_wait (int async, int num_waits, ...)
         acc_wait_all ();
       else if (async == acc_async_noval)
         goacc_thread ()->dev->openacc.async_wait_all_async_func
(acc_async_noval);
    +  else
    +    gomp_fatal ("GOACC_wait: unhandled async: %d", async);
     }

     int

..., we don't correctly handle "#pragma acc wait async (a)" for "a >= 0",
handling as a no-op whereas it should enqueue the appropriate wait operations
on "async (a)".

The fix might be as simple as calling "acc_wait_all_async (async)" generally,
not just for "async == acc_async_noval".  I'll verify.

Reply via email to