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

--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Hongyu Wang <hong...@gcc.gnu.org>:

https://gcc.gnu.org/g:288bc7b5d17511d1791899e4b2e3bf3489eb06dd

commit r13-6548-g288bc7b5d17511d1791899e4b2e3bf3489eb06dd
Author: Hongyu Wang <hongyu.w...@intel.com>
Date:   Wed Mar 8 11:29:46 2023 +0800

    libgomp: Fix default value of GOMP_SPINCOUNT [PR 109062]

    When OMP_WAIT_POLICY is not specified, current implementation will cause
    icv flag GOMP_ICV_WAIT_POLICY unset, so global variable wait_policy
    will remain its uninitialized value. Initialize it to -1 to make
    GOMP_SPINCOUNT behavior consistent with its description.

    libgomp/ChangeLog:

            PR libgomp/109062
            * env.c (wait_policy): Initialize to -1.
            (initialize_icvs): Initialize icvs->wait_policy to -1.
            * testsuite/libgomp.c-c++-common/pr109062.c: New test.

Reply via email to