From owner-svn-src-all@FreeBSD.ORG Sat Aug 30 17:14:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C904E8E5; Sat, 30 Aug 2014 17:14:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B4F33105C; Sat, 30 Aug 2014 17:14:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7UHEllr043672; Sat, 30 Aug 2014 17:14:47 GMT (envelope-from kargl@FreeBSD.org) Received: (from kargl@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7UHEl0R043670; Sat, 30 Aug 2014 17:14:47 GMT (envelope-from kargl@FreeBSD.org) Message-Id: <201408301714.s7UHEl0R043670@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kargl set sender to kargl@FreeBSD.org using -f From: Steve Kargl Date: Sat, 30 Aug 2014 17:14:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270845 - head/lib/msun/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Aug 2014 17:14:47 -0000 Author: kargl Date: Sat Aug 30 17:14:47 2014 New Revision: 270845 URL: http://svnweb.freebsd.org/changeset/base/270845 Log: Make tiny volatile to prevent the compiler(s) from constant folding expressions of the form "1 - tiny", which are used to raise FE_INEXACT. Modified: head/lib/msun/src/s_tanh.c head/lib/msun/src/s_tanhf.c Modified: head/lib/msun/src/s_tanh.c ============================================================================== --- head/lib/msun/src/s_tanh.c Sat Aug 30 15:41:07 2014 (r270844) +++ head/lib/msun/src/s_tanh.c Sat Aug 30 17:14:47 2014 (r270845) @@ -42,7 +42,8 @@ __FBSDID("$FreeBSD$"); #include "math.h" #include "math_private.h" -static const double one = 1.0, two = 2.0, tiny = 1.0e-300, huge = 1.0e300; +static volatile const double tiny = 1.0e-300; +static const double one = 1.0, two = 2.0, huge = 1.0e300; double tanh(double x) Modified: head/lib/msun/src/s_tanhf.c ============================================================================== --- head/lib/msun/src/s_tanhf.c Sat Aug 30 15:41:07 2014 (r270844) +++ head/lib/msun/src/s_tanhf.c Sat Aug 30 17:14:47 2014 (r270845) @@ -19,7 +19,9 @@ __FBSDID("$FreeBSD$"); #include "math.h" #include "math_private.h" -static const float one=1.0, two=2.0, tiny = 1.0e-30, huge = 1.0e30; +static volatile const float tiny = 1.0e-30; +static const float one=1.0, two=2.0, huge = 1.0e30; + float tanhf(float x) {