From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13897 invoked by alias); 18 Aug 2005 22:36:47 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 13886 invoked by uid 48); 18 Aug 2005 22:36:43 -0000 Date: Thu, 18 Aug 2005 22:41:00 -0000 From: "pinskia at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org Message-ID: <20050818223642.23470.pinskia@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug middle-end/23470] New: a*a (for floats) is not considered always postive X-Bugzilla-Reason: CC X-SW-Source: 2005-08/txt/msg02156.txt.bz2 List-Id: 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