From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11517 invoked by alias); 26 Feb 2007 08:21:57 -0000 Received: (qmail 11494 invoked by uid 48); 26 Feb 2007 08:21:48 -0000 Date: Mon, 26 Feb 2007 08:21:00 -0000 Message-ID: <20070226082148.11493.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/30936] const attribute in nanf prototype causes gcc not producing correct code. In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pinskia at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-02/txt/msg02858.txt.bz2 ------- Comment #4 from pinskia at gcc dot gnu dot org 2007-02-26 08:21 ------- No, the const attribute does not cause to produce wrong code. On powerpc-darwin with your testcase, I get: mflr r0 lis r3,ha16(LC0) la r3,lo16(LC0)(r3) stw r0,8(r1) stwu r1,-64(r1) bl _nanf li r3,0 fcmpu cr7,f1,f1 bne- cr7,L5 You can see the floating point compare happens but only one call to nanf. -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Component|c |target http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30936