if (TREE_CODE (expr) == INTEGER_CST)
return integer_zerop (expr) ? boolean_false_node : boolean_true_node;
else
- return build (NE_EXPR, boolean_type_node, expr, integer_zero_node);
+ return build2 (NE_EXPR, boolean_type_node, expr, integer_zero_node);
default:
internal_error ("Unexpected type in truthvalue_conversion");
/* Build common tree nodes. char_type_node is unsigned because we
only use it for actual characters, not for INTEGER(1). Also, we
want double_type_node to actually have double precision. */
- build_common_tree_nodes (0);
+ build_common_tree_nodes (false, false);
set_sizetype (long_unsigned_type_node);
build_common_tree_nodes_2 (0);
{
tree mfunc_float[2];
tree mfunc_double[2];
+ tree func_cfloat_float;
+ tree func_cdouble_double;
tree ftype;
tree tmp;
mfunc_float[0] = build_function_type (float_type_node, tmp);
tmp = tree_cons (NULL_TREE, float_type_node, tmp);
mfunc_float[1] = build_function_type (float_type_node, tmp);
+
+ tmp = tree_cons (NULL_TREE, complex_float_type_node, void_list_node);
+ func_cfloat_float = build_function_type (float_type_node, tmp);
+
tmp = tree_cons (NULL_TREE, double_type_node, void_list_node);
mfunc_double[0] = build_function_type (double_type_node, tmp);
tmp = tree_cons (NULL_TREE, double_type_node, tmp);
mfunc_double[1] = build_function_type (double_type_node, tmp);
+
+
+ tmp = tree_cons (NULL_TREE, complex_double_type_node, void_list_node);
+ func_cdouble_double = build_function_type (double_type_node, tmp);
#include "mathbuiltins.def"
BUILT_IN_ROUND, "round", true);
gfc_define_builtin ("__builtin_roundf", mfunc_float[0],
BUILT_IN_ROUNDF, "roundf", true);
+
+ gfc_define_builtin ("__builtin_cabs", func_cdouble_double,
+ BUILT_IN_CABS, "cabs", true);
+ gfc_define_builtin ("__builtin_cabsf", func_cfloat_float,
+ BUILT_IN_CABSF, "cabsf", true);
+
+
+ gfc_define_builtin ("__builtin_copysign", mfunc_double[1],
+ BUILT_IN_COPYSIGN, "copysign", true);
+ gfc_define_builtin ("__builtin_copysignf", mfunc_float[1],
+ BUILT_IN_COPYSIGNF, "copysignf", true);
/* These are used to implement the ** operator. */
gfc_define_builtin ("__builtin_pow", mfunc_double[1],