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

--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Jakub Jelinek
<ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:048a90fcc029f876437e6176d7dec7c3efaf951d

commit r13-9592-g048a90fcc029f876437e6176d7dec7c3efaf951d
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Tue Feb 25 09:33:21 2025 +0100

    openmp: Mark OpenMP atomic write expression as read [PR119000]

    The following testcase was emitting false positive warning that
    the rhs of #pragma omp atomic write was stored but not read,
    when the atomic actually does read it.  The following patch
    fixes that by calling default_function_array_read_conversion
    on it, so that it is marked as read as well as converted from
    lvalue to rvalue.
    Furthermore, the code had
    if (code == NOP_EXPR) ... else ... if (code == NOP_EXPR) ...
    with none of ... parts changing code, so I've merged the two ifs.

    2025-02-25  Jakub Jelinek  <ja...@redhat.com>

            PR c/119000
            * c-parser.cc (c_parser_omp_atomic): For omp write call
            default_function_array_read_conversion on the rhs expression.
            Merge the two adjacent if (code == NOP_EXPR) blocks.

            * c-c++-common/gomp/pr119000.c: New test.

    (cherry picked from commit cdffc76393488a73671b70481cf8a4b7c289029d)
  • [Bug c/119000] [OpenMP] Functio... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to