From owner-freebsd-current@FreeBSD.ORG Sat May 26 22:57:32 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 61A0016A41F for ; Sat, 26 May 2007 22:57:32 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 501FD13C46A for ; Sat, 26 May 2007 22:57:32 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id 3DE151A3C19; Sat, 26 May 2007 15:58:37 -0700 (PDT) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 7E2D1514AA; Sat, 26 May 2007 18:57:31 -0400 (EDT) Date: Sat, 26 May 2007 18:57:31 -0400 From: Kris Kennaway To: Steve Kargl Message-ID: <20070526225731.GA56181@xor.obsecurity.org> References: <20070526193128.GB54875@troutmask.apl.washington.edu> <20070526214835.GS23313@hoeg.nl> <20070526224040.GA55701@troutmask.apl.washington.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070526224040.GA55701@troutmask.apl.washington.edu> User-Agent: Mutt/1.4.2.2i Cc: freebsd-current@freebsd.org, Ed Schouten Subject: Re: HEADS-UP: gcc-4.2 import appears to miscompile libm. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2007 22:57:32 -0000 On Sat, May 26, 2007 at 03:40:40PM -0700, Steve Kargl wrote: > On Sat, May 26, 2007 at 11:48:35PM +0200, Ed Schouten wrote: > > Hello Steve, > > > > * Steve Kargl wrote: > > > mobile:kargl[234] cat a.c > > > #include > > > #include > > > > > > int main (void) { > > > int n; > > > float a; > > > a = 1.f; > > > printf("%f\n", frexpf(a,&n)); > > > return 0; > > > } > > > mobile:kargl[235] cc -o z a.c -lm > > > mobile:kargl[236] ./z > > > 1.000000 > > > mobile:kargl[237] cc --version > > > cc (GCC) 4.2.0 20070514 [FreeBSD] > > > Copyright (C) 2007 Free Software Foundation, Inc. > > > This is free software; see the source for copying conditions. There is NO > > > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > > > > > frexpf() should return a value in [1/2,1). > > > > In a different thread (about snd_emu10k1) a user noticed that -ftree-vrp > > (part of -O2) may cause miscompilations. Could you try installing a libm > > (src/lib/msun) that is compiled with -O1? > > > > (cc'd -current list) > > Using -O instead of -O2 indeed appears to fix the problem. How about -O2 -fno-tree-vrp? Kris