re PR middle-end/35509 (builtin isinf() mismatch to compile-time substitution)
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Sun, 18 May 2008 23:19:38 +0000 (23:19 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Sun, 18 May 2008 23:19:38 +0000 (23:19 +0000)
commit05f41289d88658c05f34f713aed66054e12ff316
tree90c75e8f2433a04ac95315cbba4166b8f7f7b3d2
parentd393bbd73754dfe54fac24d350c789316f17428f
re PR middle-end/35509 (builtin isinf() mismatch to compile-time substitution)

PR middle-end/35509

* builtins.c (mathfn_built_in_1): Renamed from mathfn_built_in.
Add `implicit' parameter.  Handle BUILT_IN_SIGNBIT.
(mathfn_built_in): Rewrite in terms of mathfn_built_in_1.
(fold_builtin_classify): Handle BUILT_IN_ISINF_SIGN.
(fold_builtin_1): Likewise.
* builtins.def (BUILT_IN_ISINF_SIGN): New.
c-common.c (check_builtin_function_arguments): Handle
BUILT_IN_ISINF_SIGN.
* doc/extend.texi: Document __builtin_isinf_sign.
* fold-const.c (operand_equal_p): Handle COND_EXPR.

testsuite:
* gcc.dg/builtins-error.c: Test __builtin_isinf_sign.
* gcc.dg/tg-tests.h: Likewise.  Mark variables volatile.
* gcc.dg/torture/builtin-isinf_sign-1.c: New test.

From-SVN: r135517
gcc/ChangeLog
gcc/builtins.c
gcc/builtins.def
gcc/c-common.c
gcc/doc/extend.texi
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/builtins-error.c
gcc/testsuite/gcc.dg/tg-tests.h