From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12662 invoked by alias); 10 Apr 2012 17:08:09 -0000 Received: (qmail 12651 invoked by uid 22791); 10 Apr 2012 17:08:08 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 10 Apr 2012 17:07:41 +0000 From: "aldyh at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/52558] write introduction incorrect wrt the C++11 memory model Date: Tue, 10 Apr 2012 17:08:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: aldyh at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: aldyh at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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 X-SW-Source: 2012-04/txt/msg00659.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52558 --- Comment #14 from Aldy Hernandez 2012-04-10 17:07:22 UTC --- Richard G., or perhaps another aliasing expert. I am working on a patch for this problem. Could you pontificate as to why no optimization pass has been able to figure out that g_2_lsm.6_12 == g_2 below? # VUSE <.MEM_9(D)> g_2_lsm.6_12 = g_2; <-- g_2_lsm set to g_2 if (pretmp.4_1 != 0) goto ; else goto ; : # VUSE <.MEM_9(D)> D.1883_17 = g_2; if (g_2_lsm.6_12 != D.1883_17) <-- g_2_lsm compared with g_2 goto ; Why can't anyone figure out that g_2_lsm is g_2? Am I building the conditions and stores incorrectly, is there a missing annotation, or is something else amok here? Thanks.