From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31657 invoked by alias); 28 Oct 2014 12:44:12 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 31603 invoked by uid 48); 28 Oct 2014 12:44:08 -0000 From: "amacleod at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/59448] Code generation doesn't respect C11 address-dependency Date: Tue, 28 Oct 2014 12:48:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: amacleod at redhat dot com X-Bugzilla-Status: NEW 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: attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-10/txt/msg02168.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59448 --- Comment #15 from Andrew Macleod --- Created attachment 33831 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33831&action=edit promote memory order consume to acquire So have we concluded that we should promote memory_order_consume to memory_order_acquire for now? That change should be fairly trivial. builtins.c::get_memmodel would simply change any consumes to acquire. All consumes would then be promoted to acquire. I don't know if libatomic does much with consume, but once compiled with this patch in the compiler, it will also generate acquire code for consumes. Here's an untested patch provided if someone wants to experiment.