From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7990 invoked by alias); 10 Mar 2014 13:18:40 -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 7934 invoked by uid 48); 10 Mar 2014 13:18:35 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/60429] [4.7/4.8/4.9 Regression] Miscompilation (aliasing) with -finline-functions Date: Mon, 10 Mar 2014 13:18: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: 4.8.2 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal 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.7.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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-03/txt/msg00776.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60429 --- Comment #21 from Richard Biener --- AFAIK I can understand the reduced testcase AET is never written to anything but the initial NULL pointers. Neither CerateETandAET nor loadAET do anything to the PolygonRegion local AET. I have a fix (bah, this function needs a LOT of TLC!) Index: gcc/tree-ssa-structalias.c =================================================================== --- gcc/tree-ssa-structalias.c (revision 208448) +++ gcc/tree-ssa-structalias.c (working copy) @@ -3218,7 +3218,12 @@ get_constraint_for_component_ref (tree t { cexpr.var = curr->id; results->safe_push (cexpr); - if (address_p) + /* If we take the address and the field starts exactly + at the desired position that was all we need to add. */ + if (address_p + && curr->offset == (unsigned HOST_WIDE_INT) bitpos + && bitmaxsize != -1 + && bitsize == bitmaxsize) break; } }