public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/113518] ICE: in gimplify_expr, at gimplify.cc:18596 with atomic_fetch_or_explicit() on _BitInt() Date: Tue, 23 Jan 2024 18:59:42 +0000 [thread overview] Message-ID: <bug-113518-4-OAHTulqXbH@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-113518-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113518 --- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:dbc5f1f523b3cfa539d72fdd60b9479b3cd5a45d commit r14-8373-gdbc5f1f523b3cfa539d72fdd60b9479b3cd5a45d Author: Jakub Jelinek <jakub@redhat.com> Date: Tue Jan 23 19:59:00 2024 +0100 c: Call c_fully_fold on __atomic_* operands in atomic_bitint_fetch_using_cas_loop [PR113518] As the following testcase shows, I forgot to call c_fully_fold on the __atomic_*/__sync_* operands called on _BitInt address, the expressions are then used inside of TARGET_EXPR initializers etc. and are never fully folded later, which means we can ICE e.g. on C_MAYBE_CONST_EXPR trees inside of those. The following patch fixes it, while the function currently is only called in the C FE because C++ doesn't support BITINT_TYPE, I think guarding the calls on !c_dialect_cxx () is safer. 2024-01-23 Jakub Jelinek <jakub@redhat.com> PR c/113518 * c-common.cc (atomic_bitint_fetch_using_cas_loop): Call c_fully_fold on lhs_addr, val and model for C. * gcc.dg/bitint-77.c: New test.
next prev parent reply other threads:[~2024-01-23 18:59 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-01-20 6:05 [Bug tree-optimization/113518] New: " zsojka at seznam dot cz 2024-01-20 8:07 ` [Bug c/113518] " pinskia at gcc dot gnu.org 2024-01-22 14:01 ` jakub at gcc dot gnu.org 2024-01-23 18:59 ` cvs-commit at gcc dot gnu.org [this message] 2024-01-23 19:26 ` jakub at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-113518-4-OAHTulqXbH@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).