aboutsummaryrefslogtreecommitdiff
path: root/gcc/builtins.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/builtins.cc')
-rw-r--r--gcc/builtins.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/builtins.cc b/gcc/builtins.cc
index c21c468..8400ada 100644
--- a/gcc/builtins.cc
+++ b/gcc/builtins.cc
@@ -8937,7 +8937,7 @@ static tree
fold_builtin_carg (location_t loc, tree arg, tree type)
{
if (validate_arg (arg, COMPLEX_TYPE)
- && TREE_CODE (TREE_TYPE (TREE_TYPE (arg))) == REAL_TYPE)
+ && SCALAR_FLOAT_TYPE_P (TREE_TYPE (TREE_TYPE (arg))))
{
tree atan2_fn = mathfn_built_in (type, BUILT_IN_ATAN2);
@@ -10445,7 +10445,7 @@ fold_builtin_next_arg (tree exp, bool va_start_p)
We must also strip off INDIRECT_EXPR for C++ reference
parameters. */
while (CONVERT_EXPR_P (arg)
- || TREE_CODE (arg) == INDIRECT_REF)
+ || INDIRECT_REF_P (arg))
arg = TREE_OPERAND (arg, 0);
if (arg != last_parm)
{
@@ -11133,9 +11133,9 @@ do_mpc_arg2 (tree arg0, tree arg1, tree type, int do_nonfinite,
/* To proceed, MPFR must exactly represent the target floating point
format, which only happens when the target base equals two. */
if (TREE_CODE (arg0) == COMPLEX_CST && !TREE_OVERFLOW (arg0)
- && TREE_CODE (TREE_TYPE (TREE_TYPE (arg0))) == REAL_TYPE
+ && SCALAR_FLOAT_TYPE_P (TREE_TYPE (TREE_TYPE (arg0)))
&& TREE_CODE (arg1) == COMPLEX_CST && !TREE_OVERFLOW (arg1)
- && TREE_CODE (TREE_TYPE (TREE_TYPE (arg1))) == REAL_TYPE
+ && SCALAR_FLOAT_TYPE_P (TREE_TYPE (TREE_TYPE (arg1)))
&& REAL_MODE_FORMAT (TYPE_MODE (TREE_TYPE (TREE_TYPE (arg0))))->b == 2)
{
const REAL_VALUE_TYPE *const re0 = TREE_REAL_CST_PTR (TREE_REALPART (arg0));