From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21958 invoked by alias); 13 Oct 2015 15:34:03 -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 20494 invoked by uid 48); 13 Oct 2015 15:33:59 -0000 From: "vries at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/67955] tree-dse does not use pointer info Date: Tue, 13 Oct 2015 15:34: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-Version: 6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-10/txt/msg01036.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67955 --- Comment #2 from vries at gcc dot gnu.org --- (In reply to Richard Biener from comment #1) > The same points-to set results from > > int *p = (int *)((char *)&a + 2); > > or even > > int *p = &a + 1; > I see, I didn't realize that. But AFAICT, in both these cases, storing to *p is illegal (if 'a' is a scalar int). > so you can't use points-to info that way (to derive a must-alias). I see your point related to an array object, there pointers to different array elements would have identical points-to sets. I wonder though: if we have a store '*p = 0', and the size of the store is the same as the size of the pointed-to object of pointer p, can't we conclude that pointer p points to the start of the object?