From d168c883c5794b57adfb272e9fec9ee8df974832 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 24 Oct 2016 18:05:09 +0200 Subject: trans-intrinsic.c (gfc_conv_intrinsic_minmax): Use VAR_P (x) instead of TREE_CODE (x) == VAR_DECL. * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Use VAR_P (x) instead of TREE_CODE (x) == VAR_DECL. * trans-expr.c (gfc_class_vptr_get, gfc_class_len_get, gfc_class_len_or_zero_get, gfc_get_vptr_from_expr, gfc_conv_string_length, conv_base_obj_fcn_val, gfc_conv_procedure_call, gfc_trans_assignment_1): Likewise. * trans-openmp.c (gfc_omp_predetermined_sharing, gfc_omp_disregard_value_expr, gfc_omp_private_debug_clause, gfc_trans_omp_atomic, gfc_trans_omp_do): Likewise. * trans-io.c (nml_get_addr_expr): Likewise. * trans-decl.c (gfc_finish_decl, gfc_build_qualified_array, gfc_get_symbol_decl, gfc_get_fake_result_decl, gfc_trans_deferred_vars, gfc_trans_use_stmts, generate_local_decl): Likewise. * trans-array.c (trans_array_constructor, trans_array_bound_check, build_class_array_ref, gfc_array_init_size, gfc_trans_auto_array_allocation, gfc_trans_g77_array, gfc_trans_dummy_array_bias, gfc_alloc_allocatable_for_assignment, gfc_trans_deferred_array): Likewise. * trans.c (gfc_build_array_ref): Likewise. Use VAR_OR_FUNCTION_DECL_P (x) instead of TREE_CODE (x) == VAR_DECL || TREE_CODE (x) == FUNCTION_DECL. From-SVN: r241482 --- gcc/fortran/trans-intrinsic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/fortran/trans-intrinsic.c') diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c index a9825ea..2911d64 100644 --- a/gcc/fortran/trans-intrinsic.c +++ b/gcc/fortran/trans-intrinsic.c @@ -3653,7 +3653,7 @@ gfc_conv_intrinsic_minmax (gfc_se * se, gfc_expr * expr, enum tree_code op) if (TREE_TYPE (args[0]) != type) args[0] = convert (type, args[0]); /* Only evaluate the argument once. */ - if (TREE_CODE (args[0]) != VAR_DECL && !TREE_CONSTANT (args[0])) + if (!VAR_P (args[0]) && !TREE_CONSTANT (args[0])) args[0] = gfc_evaluate_now (args[0], &se->pre); mvar = gfc_create_var (type, "M"); @@ -3677,7 +3677,7 @@ gfc_conv_intrinsic_minmax (gfc_se * se, gfc_expr * expr, enum tree_code op) cond = NULL_TREE; /* Only evaluate the argument once. */ - if (TREE_CODE (val) != VAR_DECL && !TREE_CONSTANT (val)) + if (!VAR_P (val) && !TREE_CONSTANT (val)) val = gfc_evaluate_now (val, &se->pre); } -- cgit v1.1