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

--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by David Malcolm <dmalc...@gcc.gnu.org>:

https://gcc.gnu.org/g:c7a774edbf802d79b95871ede5b80f6e9adf8e88

commit r14-9544-gc7a774edbf802d79b95871ede5b80f6e9adf8e88
Author: David Malcolm <dmalc...@redhat.com>
Date:   Tue Mar 19 09:06:45 2024 -0400

    analyzer: fixes to __atomic_{exchange,load,store} [PR114286]

    In r14-1497-gef768035ae8090 I added some support to the analyzer for
    __atomic_ builtins (enough to fix false positives I was seeing in
    my integration tests).

    Unfortunately I messed up the implementation of
    __atomic_{exchange,load,store}, leading to ICEs seen in
    PR analyzer/114286.

    Fixed thusly, fixing the ICEs.  Given that we're in stage 4, the patch
    doesn't add support for any of the various __atomic_compare_exchange
    builtins, so that these continue to fall back to the analyzer's
    "anything could happen" handling of unknown functions.

    Signed-off-by: David Malcolm <dmalc...@redhat.com>

    gcc/analyzer/ChangeLog:
            PR analyzer/114286
            * kf.cc (class kf_atomic_exchange): Reimplement based on signature
            seen in gimple, rather than user-facing signature.
            (class kf_atomic_load): Likewise.
            (class kf_atomic_store): New.
            (register_atomic_builtins): Register kf_atomic_store.

    gcc/testsuite/ChangeLog:
            PR analyzer/114286
            * c-c++-common/analyzer/atomic-builtins-pr114286.c: New test.

    Signed-off-by: David Malcolm <dmalc...@redhat.com>

Reply via email to