From owner-freebsd-current@freebsd.org Sun Mar 13 21:48:54 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0BE2DACEA9E for ; Sun, 13 Mar 2016 21:48:54 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E740C3D8; Sun, 13 Mar 2016 21:48:53 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.15.2/8.15.2) with ESMTPS id u2DLmqhB027210 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 13 Mar 2016 14:48:52 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.15.2/8.15.2/Submit) id u2DLmqnC027209; Sun, 13 Mar 2016 14:48:52 -0700 (PDT) (envelope-from sgk) Date: Sun, 13 Mar 2016 14:48:52 -0700 From: Steve Kargl To: Ed Maste Cc: FreeBSD Current Subject: Re: clang is mostlikely miscompling libm Message-ID: <20160313214852.GA27156@troutmask.apl.washington.edu> References: <20160313191637.GA25928@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Mailman-Approved-At: Sun, 13 Mar 2016 23:30:56 +0000 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.21 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: Sun, 13 Mar 2016 21:48:54 -0000 On Sun, Mar 13, 2016 at 09:08:56PM +0000, Ed Maste wrote: > On 13 March 2016 at 19:16, Steve Kargl wrote: > > JFYI, > > > > It appears that clang on up-to-date current may be > > miscompiling libm on at i686 class hardware. > > Do you have an example of the suspected miscompilation? See freebsd-toolchain@ #include #include int main(void) { int i; // float x = 1.f; double x = 1.; i = 0; feclearexcept(FE_ALL_EXCEPT); do { x *= 2; i++; } while(!fetestexcept(FE_OVERFLOW)); if (fetestexcept(FE_OVERFLOW)) printf("FE_UNDERFLOW: "); printf("x = %e after %d iterations\n", x, i); return 0; } -- Steve