From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0867F38582B1; Fri, 15 Mar 2024 12:35:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0867F38582B1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1710506131; bh=S7YyWBMDaUZqm+ZzEpp/RJ+aVVU1pxra3WpuLnQTA2c=; h=From:To:Subject:Date:In-Reply-To:References:From; b=jFSwNuRoSBr2HoBdYmNhqkjnrVtyM1W1DjASskE9MI8taohGxbKXiV10of2APhFgE sUSHUe2fRPMxZ5rBIkMr2oW9+H2SWwESvk5LwntsTAE5DxUSpefdTUIqe93Y/6zEfu w48O4Hci8/mDAMfYj7OYoGwIuSHTfOwbO70u5GFg= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug analyzer/114286] ICE: in deref_rvalue, at analyzer/region-model.cc:2762 with _Atomic _BitInt() and -fanalyzer Date: Fri, 15 Mar 2024 12:35:29 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: analyzer X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: dmalcolm at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: everconfirmed cf_reconfirmed_on bug_status Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114286 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Last reconfirmed| |2024-03-15 Status|UNCONFIRMED |NEW --- Comment #1 from Jakub Jelinek --- Doesn't seem to be _BitInt related, struct S { long long a[16]; } s; struct S foo (void) { struct S r; __atomic_load (&s, &r, __ATOMIC_RELAXED); return r; } ICEs the same way. Guess analyzer doesn't handle properly atomic_load which can't be optimized into the 1/2/4/8/16 byte variants and is handled by libatomic. Makes me wonder about other __atomic operations on such types, __atomic_sto= re, __atomic_exchange and __atomic_compare_exchange on such types. And to answer my question, void bar (struct S x) { __atomic_store (&s, &x, __ATOMIC_RELAXED); } doesn't ICE, struct S baz (struct S x) { struct S r; __atomic_exchange (&s, &x, &r, __ATOMIC_RELAXED); } does and int qux (struct S *e, struct S *d) { return __atomic_compare_exchange (&s, e, d, 0, __ATOMIC_RELAXED, __ATOMIC_RELAXED); } doesn't.=