This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/23470] New: a*a (for floats) is not considered always postive
- 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: 18 Aug 2005 22:36:43 -0000
- Subject: [Bug middle-end/23470] New: a*a (for floats) is not considered always postive
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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