public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/17598] New: an extra addition when comparing address of &a->b and &c->b.
@ 2004-09-22 3:52 pinskia at gcc dot gnu dot org
2004-09-26 14:26 ` [Bug tree-optimization/17598] " pinskia at gcc dot gnu dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-22 3:52 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/17598] an extra addition when comparing address of &a->b and &c->b.
2004-09-22 3:52 [Bug tree-optimization/17598] New: an extra addition when comparing address of &a->b and &c->b pinskia at gcc dot gnu dot org
@ 2004-09-26 14:26 ` pinskia at gcc dot gnu dot org
2005-04-25 13:42 ` rguenth at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-26 14:26 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-09-26 14:26 -------
Fold should be able to deal with this.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-09-26 14:26:01
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17598
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/17598] an extra addition when comparing address of &a->b and &c->b.
2004-09-22 3:52 [Bug tree-optimization/17598] New: an extra addition when comparing address of &a->b and &c->b pinskia at gcc dot gnu dot org
2004-09-26 14:26 ` [Bug tree-optimization/17598] " pinskia at gcc dot gnu dot org
@ 2005-04-25 13:42 ` rguenth at gcc dot gnu dot org
2005-04-26 9:13 ` rguenth at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-04-25 13:42 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rguenth at gcc dot gnu dot org 2005-04-25 13:38 -------
Patch in testing.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2005-03-13 05:39:26 |2005-04-25 13:38:23
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17598
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/17598] an extra addition when comparing address of &a->b and &c->b.
2004-09-22 3:52 [Bug tree-optimization/17598] New: an extra addition when comparing address of &a->b and &c->b pinskia at gcc dot gnu dot org
2004-09-26 14:26 ` [Bug tree-optimization/17598] " pinskia at gcc dot gnu dot org
2005-04-25 13:42 ` rguenth at gcc dot gnu dot org
@ 2005-04-26 9:13 ` rguenth at gcc dot gnu dot org
2005-04-26 16:36 ` cvs-commit at gcc dot gnu dot org
2005-04-26 16:37 ` rguenth at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-04-26 9:13 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rguenth at gcc dot gnu dot org 2005-04-26 09:13 -------
Patch posted:
http://gcc.gnu.org/ml/gcc-patches/2005-04/msg02658.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17598
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/17598] an extra addition when comparing address of &a->b and &c->b.
2004-09-22 3:52 [Bug tree-optimization/17598] New: an extra addition when comparing address of &a->b and &c->b pinskia at gcc dot gnu dot org
` (2 preceding siblings ...)
2005-04-26 9:13 ` rguenth at gcc dot gnu dot org
@ 2005-04-26 16:36 ` cvs-commit at gcc dot gnu dot org
2005-04-26 16:37 ` rguenth at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-04-26 16:36 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-04-26 16:35 -------
Subject: Bug 17598
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: rguenth@gcc.gnu.org 2005-04-26 16:35:32
Modified files:
gcc : ChangeLog fold-const.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gcc.dg/tree-ssa: pr17598.c
Log message:
2004-04-26 Richard Guenther <rguenth@gcc.gnu.org>
PR tree-optimization/17598
* fold-const.c (fold_binary): Fold comparisons of addresses
of COMPONENT_REFs which reference the same field to
comparisons of the addresses of the base objects.
* gcc.dg/tree-ssa/pr17598.c: New testcase.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.8465&r2=2.8466
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fold-const.c.diff?cvsroot=gcc&r1=1.571&r2=1.572
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5399&r2=1.5400
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/tree-ssa/pr17598.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17598
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/17598] an extra addition when comparing address of &a->b and &c->b.
2004-09-22 3:52 [Bug tree-optimization/17598] New: an extra addition when comparing address of &a->b and &c->b pinskia at gcc dot gnu dot org
` (3 preceding siblings ...)
2005-04-26 16:36 ` cvs-commit at gcc dot gnu dot org
@ 2005-04-26 16:37 ` rguenth at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-04-26 16:37 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rguenth at gcc dot gnu dot org 2005-04-26 16:37 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17598
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-04-26 16:37 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-22 3:52 [Bug tree-optimization/17598] New: an extra addition when comparing address of &a->b and &c->b pinskia at gcc dot gnu dot org
2004-09-26 14:26 ` [Bug tree-optimization/17598] " pinskia at gcc dot gnu dot org
2005-04-25 13:42 ` rguenth at gcc dot gnu dot org
2005-04-26 9:13 ` rguenth at gcc dot gnu dot org
2005-04-26 16:36 ` cvs-commit at gcc dot gnu dot org
2005-04-26 16:37 ` rguenth at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).