From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20088 invoked by alias); 22 Sep 2004 03:52:04 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 20080 invoked by uid 48); 22 Sep 2004 03:52:03 -0000 Date: Wed, 22 Sep 2004 03:52:00 -0000 From: "pinskia at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org Message-ID: <20040922035202.17598.pinskia@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug tree-optimization/17598] New: an extra addition when comparing address of &a->b and &c->b. X-Bugzilla-Reason: CC X-SW-Source: 2004-09/txt/msg02486.txt.bz2 List-Id: Function g and g1 should produce the same code, this is not a regression, I noticed this when looking into PR 8361. struct f { int i; int j; }; int g(struct f *x, struct f *y) { return &x->j == &y->j; } int g1(struct f *x, struct f *y) { return x == y; } -- Summary: an extra addition when comparing address of &a->b and &c->b. Product: gcc Version: 4.0.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: enhancement Priority: P2 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pinskia at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17598