diff options
Diffstat (limited to 'gcc/fortran/trans-expr.c')
-rw-r--r-- | gcc/fortran/trans-expr.c | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index 131927c..ca0523f 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -1124,22 +1124,22 @@ gfc_conv_power_op (gfc_se * se, gfc_expr * expr) switch (kind) { case 0: - fndecl = built_in_decls[BUILT_IN_POWIF]; + fndecl = builtin_decl_explicit (BUILT_IN_POWIF); break; case 1: - fndecl = built_in_decls[BUILT_IN_POWI]; + fndecl = builtin_decl_explicit (BUILT_IN_POWI); break; case 2: - fndecl = built_in_decls[BUILT_IN_POWIL]; + fndecl = builtin_decl_explicit (BUILT_IN_POWIL); break; case 3: /* Use the __builtin_powil() only if real(kind=16) is actually the C long double type. */ if (!gfc_real16_is_float128) - fndecl = built_in_decls[BUILT_IN_POWIL]; + fndecl = builtin_decl_explicit (BUILT_IN_POWIL); break; default: @@ -3855,7 +3855,8 @@ fill_with_spaces (tree start, tree type, tree size) /* For a simple char type, we can call memset(). */ if (compare_tree_int (TYPE_SIZE_UNIT (type), 1) == 0) return build_call_expr_loc (input_location, - built_in_decls[BUILT_IN_MEMSET], 3, start, + builtin_decl_explicit (BUILT_IN_MEMSET), + 3, start, build_int_cst (gfc_get_int_type (gfc_c_int_kind), lang_hooks.to_target_charset (' ')), size); @@ -4015,13 +4016,13 @@ gfc_trans_string_copy (stmtblock_t * block, tree dlength, tree dest, cond2 = fold_build2_loc (input_location, GE_EXPR, boolean_type_node, slen, dlen); tmp2 = build_call_expr_loc (input_location, - built_in_decls[BUILT_IN_MEMMOVE], - 3, dest, src, dlen); + builtin_decl_explicit (BUILT_IN_MEMMOVE), + 3, dest, src, dlen); /* Else copy and pad with spaces. */ tmp3 = build_call_expr_loc (input_location, - built_in_decls[BUILT_IN_MEMMOVE], - 3, dest, src, slen); + builtin_decl_explicit (BUILT_IN_MEMMOVE), + 3, dest, src, slen); tmp4 = fold_build_pointer_plus_loc (input_location, dest, slen); tmp4 = fill_with_spaces (tmp4, chartype, @@ -5816,8 +5817,8 @@ gfc_trans_zero_assign (gfc_expr * expr) /* Construct call to __builtin_memset. */ tmp = build_call_expr_loc (input_location, - built_in_decls[BUILT_IN_MEMSET], - 3, dest, integer_zero_node, len); + builtin_decl_explicit (BUILT_IN_MEMSET), + 3, dest, integer_zero_node, len); return fold_convert (void_type_node, tmp); } @@ -5845,7 +5846,8 @@ gfc_build_memcpy_call (tree dst, tree src, tree len) /* Construct call to __builtin_memcpy. */ tmp = build_call_expr_loc (input_location, - built_in_decls[BUILT_IN_MEMCPY], 3, dst, src, len); + builtin_decl_explicit (BUILT_IN_MEMCPY), + 3, dst, src, len); return fold_convert (void_type_node, tmp); } @@ -6056,8 +6058,8 @@ alloc_scalar_allocatable_for_assignment (stmtblock_t *block, } tmp = build_call_expr_loc (input_location, - built_in_decls[BUILT_IN_MALLOC], 1, - size_in_bytes); + builtin_decl_explicit (BUILT_IN_MALLOC), + 1, size_in_bytes); tmp = fold_convert (TREE_TYPE (lse.expr), tmp); gfc_add_modify (block, lse.expr, tmp); if (expr1->ts.type == BT_CHARACTER && expr1->ts.deferred) @@ -6083,8 +6085,8 @@ alloc_scalar_allocatable_for_assignment (stmtblock_t *block, build_empty_stmt (input_location)); gfc_add_expr_to_block (block, tmp); tmp = build_call_expr_loc (input_location, - built_in_decls[BUILT_IN_REALLOC], 2, - fold_convert (pvoid_type_node, lse.expr), + builtin_decl_explicit (BUILT_IN_REALLOC), + 2, fold_convert (pvoid_type_node, lse.expr), size_in_bytes); tmp = fold_convert (TREE_TYPE (lse.expr), tmp); gfc_add_modify (block, lse.expr, tmp); |