This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/24021] New: VRP does not work with floating points
- 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 2005 20:59:21 -0000
- Subject: [Bug tree-optimization/24021] New: VRP does not work with floating points
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Take the following example:
double BG_SplineLength ()
{
double lastPoint;
double i;
for (i = 0.01;i<=1;i+=0.1f)
if (!(i != 0.0))
{
lastPoint = i;
}
else
{
lastPoint = 2;
}
return lastPoint;
}
The loop is useless and we should remove the loop and make the function just return 2.0;
--
Summary: VRP does not work with floating points
Product: gcc
Version: 4.1.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=24021