This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug math/19211] lgamma functions do not set signgam for -ffinite-math-only for C99-based standards
- From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Thu, 05 Nov 2015 21:24:02 +0000
- Subject: [Bug math/19211] lgamma functions do not set signgam for -ffinite-math-only for C99-based standards
- Auto-submitted: auto-generated
- References: <bug-19211-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=19211
--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 939fdd1c36dde8884543bc9c3b8506e76c9ff0e4 (commit)
from f248238cf43bd751db29e6f151d6da7645337ff5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=939fdd1c36dde8884543bc9c3b8506e76c9ff0e4
commit 939fdd1c36dde8884543bc9c3b8506e76c9ff0e4
Author: Joseph Myers <joseph@codesourcery.com>
Date: Thu Nov 5 21:23:07 2015 +0000
Fix finite-math-only lgamma functions signgam setting (bug 19211).
The lgamma inline functions in bits/math-finite.h do not set signgam
if __USE_ISOC99, even when other feature test macros mean a standard
such as XSI POSIX is selected for which it should be set. (This is
essentially the opposite issue to bug 15421, the out-of-line versions
setting signgam even when they shouldn't.)
This patch fixes those functions to use __USE_MISC || __USE_XOPEN as
the condition for when to set signgam, since it's the condition for
when math.h declares signgam. The legacy gamma* names are only
declared at all if __USE_MISC || __USE_XOPEN, so they just set signgam
unconditionally.
Tests for certain standards or not using _GNU_SOURCE cannot use
test-skeleton.c (this is a known issue noted on the wiki todo list).
Thus, the new tests that signgam remains not set in ISO C modes do not
use test-skeleton.c. They also define _ISOMAC to avoid running into
declarations in the internal include/ headers that only work in
_GNU_SOURCE mode.
Tested for x86_64 and x86.
[BZ #19211]
* math/bits/math-finite.h (lgamma): Set signgam if [__USE_MISC ||
__USE_XOPEN], not if [!__USE_ISOC99].
(lgammaf): Likewise.
(lgammal): Likewise.
(gamma): Set signgam unconditionally, not if [!__USE_ISOC99].
(gammaf): Likewise.
(gammal): Likewise.
* math/test-signgam-finite-c11.c: New file.
* math/test-signgam-finite-c99.c: Likewise.
* math/test-signgam-finite.c: Likewise.
* math/Makefile (tests): Add test-signgam-finite,
test-signgam-finite-c99 and test-signgam-finite-c11.
(CFLAGS-test-signgam-finite.c): New variable.
(CFLAGS-test-signgam-finite-c99.c): Likewise.
(CFLAGS-test-signgam-finite-c11.c): Likewise.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 17 ++++++++++
NEWS | 2 +-
math/Makefile | 7 ++++-
math/bits/math-finite.h | 33 +++++---------------
math/test-signgam-finite-c11.c | 1 +
math/test-signgam-finite-c99.c | 65 ++++++++++++++++++++++++++++++++++++++++
math/test-signgam-finite.c | 65 ++++++++++++++++++++++++++++++++++++++++
7 files changed, 164 insertions(+), 26 deletions(-)
create mode 100644 math/test-signgam-finite-c11.c
create mode 100644 math/test-signgam-finite-c99.c
create mode 100644 math/test-signgam-finite.c
--
You are receiving this mail because:
You are on the CC list for the bug.