This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/17598] New: an extra addition when comparing address of &a->b and &c->b.
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Sep 2004 03:52:03 -0000
- Subject: [Bug tree-optimization/17598] New: an extra addition when comparing address of &a->b and &c->b.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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