public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug analyzer/109015] New: Analyzer doesn't know about atomic builtins
@ 2023-03-03 19:06 dmalcolm at gcc dot gnu.org
2023-06-02 13:29 ` [Bug analyzer/109015] " cvs-commit at gcc dot gnu.org
2023-06-02 13:36 ` dmalcolm at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2023-03-03 19:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109015
Bug ID: 109015
Summary: Analyzer doesn't know about atomic builtins
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: analyzer
Assignee: dmalcolm at gcc dot gnu.org
Reporter: dmalcolm at gcc dot gnu.org
Target Milestone: ---
Created attachment 54580
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54580&action=edit
Work in progress patch
Currently the analyzer doesn't recognize atomic builtins, and falls back to the
"anything could happen" handler when it sees them.
Am attaching a work-in-progress patch which implements most of them
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug analyzer/109015] Analyzer doesn't know about atomic builtins
2023-03-03 19:06 [Bug analyzer/109015] New: Analyzer doesn't know about atomic builtins dmalcolm at gcc dot gnu.org
@ 2023-06-02 13:29 ` cvs-commit at gcc dot gnu.org
2023-06-02 13:36 ` dmalcolm at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-06-02 13:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109015
--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by David Malcolm <dmalcolm@gcc.gnu.org>:
https://gcc.gnu.org/g:ef768035ae8090ecbe5726111a5fae4d5c86dd74
commit r14-1497-gef768035ae8090ecbe5726111a5fae4d5c86dd74
Author: David Malcolm <dmalcolm@redhat.com>
Date: Fri Jun 2 09:28:30 2023 -0400
analyzer: implement various atomic builtins [PR109015]
This patch implements many of the __atomic_* builtins from
sync-builtins.def as known_function subclasses within the analyzer.
gcc/analyzer/ChangeLog:
PR analyzer/109015
* kf.cc (class kf_atomic_exchange): New.
(class kf_atomic_exchange_n): New.
(class kf_atomic_fetch_op): New.
(class kf_atomic_op_fetch): New.
(class kf_atomic_load): New.
(class kf_atomic_load_n): New.
(class kf_atomic_store_n): New.
(register_atomic_builtins): New function.
(register_known_functions): Call register_atomic_builtins.
gcc/testsuite/ChangeLog:
PR analyzer/109015
* gcc.dg/analyzer/atomic-builtins-1.c: New test.
* gcc.dg/analyzer/atomic-builtins-haproxy-proxy.c: New test.
* gcc.dg/analyzer/atomic-builtins-qemu-sockets.c: New test.
* gcc.dg/analyzer/atomic-types-1.c: New test.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug analyzer/109015] Analyzer doesn't know about atomic builtins
2023-03-03 19:06 [Bug analyzer/109015] New: Analyzer doesn't know about atomic builtins dmalcolm at gcc dot gnu.org
2023-06-02 13:29 ` [Bug analyzer/109015] " cvs-commit at gcc dot gnu.org
@ 2023-06-02 13:36 ` dmalcolm at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2023-06-02 13:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109015
David Malcolm <dmalcolm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #2 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Should be fixed for GCC 14 by the above patch.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-06-02 13:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-03 19:06 [Bug analyzer/109015] New: Analyzer doesn't know about atomic builtins dmalcolm at gcc dot gnu.org
2023-06-02 13:29 ` [Bug analyzer/109015] " cvs-commit at gcc dot gnu.org
2023-06-02 13:36 ` dmalcolm at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).