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

--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tobias Burnus <bur...@gcc.gnu.org>:

https://gcc.gnu.org/g:97c1d2fa97afc59b02d2894b88069136145603e2

commit r16-3946-g97c1d2fa97afc59b02d2894b88069136145603e2
Author: Tobias Burnus <tbur...@baylibre.com>
Date:   Thu Sep 18 11:07:50 2025 +0200

    OpenMP: Unshare expr in context-selector condition [PR121922]

    As the testcase shows, a missing unshare_expr caused that the condition
    was only evaluated once instead of every time when a 'declare variant'
    was resolved.

            PR middle-end/121922

    gcc/ChangeLog:

            * omp-general.cc (omp_dynamic_cond): Use 'unshare_expr' for
            the user condition.

    libgomp/ChangeLog:

            * testsuite/libgomp.c-c++-common/declare-variant-1.c: New test.

    Co-authored-by: Sandra Loosemore <sloosem...@baylibre.com>

Reply via email to