This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/29335] transcendental functions with constant arguments should be resolved at compile-time
- From: "ghazi at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Oct 2006 20:44:22 -0000
- Subject: [Bug middle-end/29335] transcendental functions with constant arguments should be resolved at compile-time
- References: <bug-29335-578@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #15 from ghazi at gcc dot gnu dot org 2006-10-25 20:44 -------
Subject: Bug 29335
Author: ghazi
Date: Wed Oct 25 20:44:09 2006
New Revision: 118042
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=118042
Log:
PR middle-end/29335
* builtins.c (fold_builtin_cbrt, fold_builtin_logarithm):
Calculate compile-time constants using MPFR.
(fold_builtin_1): Likewise handle BUILT_IN_ERF, BUILT_IN_ERFC,
BUILT_IN_EXPM1 and BUILT_IN_LOG1P.
testsuite:
* gcc.dg/torture/builtin-math-2.c (TESTIT): Use new helper macro.
Add checks for log, log2, log10 and log1p.
* gcc.dg/torture/builtin-math-3.c: Add checks for -0.0 everywhere
we already test 0.0. Add checks for expm1, log, log2, log10,
log1p, cbrt, erf and erfc.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/builtins.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/torture/builtin-math-2.c
trunk/gcc/testsuite/gcc.dg/torture/builtin-math-3.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29335