While looking into PR 23452, I noticed this:
double pow(double, double);
int f(double a, double b)
{
if (((a*a) + (b*b))<0)
link_error();
}
There should be no reference to link_error as a*a is always postive. Note
really
__builtin_pow (a, 2.0e+0) is what is folded to first.
--
Summary: a*a (for floats) is not considered always postive
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P2
Component: middle-end
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=23470