This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/41428] New: CCP doesn't fold all comparisons it could
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Sep 2009 14:05:44 -0000
- Subject: [Bug tree-optimization/41428] New: CCP doesn't fold all comparisons it could
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
extern "C" void abort (void);
inline void *operator new (__SIZE_TYPE__, void *__p) throw () { return __p; }
int __attribute__((noinline))
foo(void)
{
float f = 0;
int *i = new (&f) int (1);
return *(int *)&f;
}
CCP produces
<bb 2>:
f = 0.0;
D.2121_3 = &f;
D.2107_4 = (int *) &f;
if (D.2107_4 != 0B)
goto <bb 3>;
else
goto <bb 4>;
and while it knows during propagation that D.2107_4 != 0B is true this
doesn't have any effect during substitute_and_fold.
--
Summary: CCP doesn't fold all comparisons it could
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rguenth at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41428