From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E180E3858D20; Thu, 10 Nov 2022 17:13:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E180E3858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668100409; bh=rdagRt4+UolCj7PSd3S6TK5JhbBsnFdlnPJCqUmkM7U=; h=From:To:Subject:Date:In-Reply-To:References:From; b=o1YsqwTzNVD6oY75gnUPa31s9eKnZArsfJAjfqCOp68T9JyZyNNyk/u2xK0leA8ET Qc8NP9GVx36/YCtsKfndSc7aS+28HoRp7gGmeBMd1Yj/DHWIsM6BL6VIs33xiXlKHE aRblC+GJtx4GBiX17nFMrZKqlg9h1ntWsGJE3jpg= From: "pdimov at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/107590] __atomic_test_and_set broken on PowerPC Date: Thu, 10 Nov 2022 17:13:28 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 11.3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pdimov at gmail dot com X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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=3D107590 --- Comment #9 from Peter Dimov --- The easiest way to reproduce the issue is with the following test: https://github.com/boostorg/smart_ptr/blob/c577d68b0272fd0bddc88ea60a8db072= 19391589/test/spinlock_test.cpp This crashes because - presumably - sp2 is on an odd address. The definition of the spinlock class is here: https://github.com/boostorg/smart_ptr/blob/c577d68b0272fd0bddc88ea60a8db072= 19391589/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp=