From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29967 invoked by alias); 6 Jun 2011 14:04:23 -0000 Received: (qmail 29958 invoked by uid 22791); 6 Jun 2011 14:04:22 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 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; Mon, 06 Jun 2011 14:04:09 +0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/49279] [4.5/4.6/4.7 Regression] Optimization incorrectly presuming constant variable inside loop in g++ 4.5 and 4.6 with -O2 and -O3 for x86_64 targets X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: major X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.5.4 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 Date: Mon, 06 Jun 2011 14:04:00 -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 X-SW-Source: 2011-06/txt/msg00444.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49279 --- Comment #4 from Richard Guenther 2011-06-06 14:03:27 UTC --- # PT = nonlocal escaped D.7613_101 = MEM[(struct ei_matrix_storage *)this_30(D)]; # PT = nonlocal escaped D.7616_104 = D.7613_101 + D.7582_90; # PT = nonlocal escaped { D.7934 } (restr) SR.167_105 = (const Scalar * restrict) D.7616_104; # PT = nonlocal escaped D.7671_127 = MEM[(struct ei_matrix_storage *)this_30(D)]; D.7672_129 = D.7554_68 * 8; # PT = nonlocal escaped D.7674_130 = D.7671_127 + D.7672_129; # PT = nonlocal escaped { D.7936 } (restr) SR.169_131 = (const Scalar * restrict) D.7674_130; so while the fix for PR48764 makes this_30 point to a single tag that would make derived pointers derived it doesn't seem to work for this case. I have a variant that does.