On 07/19/15 08:37, Nathan Sidwell wrote:
this trunk patch refactors libgomp's goacc_wait, which is used for two different
purposes.

1) when openacc pragmas specify a (non-zero) waits.

2) when the wait pragma itself specifies a zero number of waits.

this leads to #2 calling goacc_wait with num_waits=0, and forces #1 to never do
that.

Fixed by breaking out the num_waits == 0 handling from goacc_wait into
GOACC_wait, the wait pragma handler.  I have kept the num_wait=0 checks
elsewhere, but they are now for efficiency rather than correctness.

I committed to trunk & gomp with following ChangeLog:


2015-07-20  Nathan Sidwell  <nat...@codesourcery.com>

        * oacc-parallel.c (GOACC_parallel): Move variadic handling into
        wait=-specific if.
        (GOACC_enter_exit_data, GOACC_update): Use consistent num_waits
        !=0 condition.
        (goacc_waits): Move !num_waits handling to ...
        (GOACC_wait): ... here, the only caller that might have zero waits.

Reply via email to