diff options
author | Jakub Jelinek <jakub@redhat.com> | 2016-10-24 18:05:09 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2016-10-24 18:05:09 +0200 |
commit | d168c883c5794b57adfb272e9fec9ee8df974832 (patch) | |
tree | 68e4a8ee8e9689454c1003d8db8354c74f86e610 /gcc/fortran/trans-openmp.c | |
parent | 4467029544b6d28433b81e91309d3b67c7cc4a7b (diff) | |
download | gcc-d168c883c5794b57adfb272e9fec9ee8df974832.zip gcc-d168c883c5794b57adfb272e9fec9ee8df974832.tar.gz gcc-d168c883c5794b57adfb272e9fec9ee8df974832.tar.bz2 |
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
Diffstat (limited to 'gcc/fortran/trans-openmp.c')
-rw-r--r-- | gcc/fortran/trans-openmp.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/gcc/fortran/trans-openmp.c b/gcc/fortran/trans-openmp.c index b8b8576..febff25 100644 --- a/gcc/fortran/trans-openmp.c +++ b/gcc/fortran/trans-openmp.c @@ -143,9 +143,7 @@ gfc_omp_predetermined_sharing (tree decl) variables at all (they can't be redefined), but they can nevertheless appear in parallel/task regions and for default(none) purposes treat them as shared. For vtables likely the same handling is desirable. */ - if (TREE_CODE (decl) == VAR_DECL - && TREE_READONLY (decl) - && TREE_STATIC (decl)) + if (VAR_P (decl) && TREE_READONLY (decl) && TREE_STATIC (decl)) return OMP_CLAUSE_DEFAULT_SHARED; return OMP_CLAUSE_DEFAULT_UNSPECIFIED; @@ -1156,7 +1154,7 @@ gfc_omp_disregard_value_expr (tree decl, bool shared) tree value = DECL_VALUE_EXPR (decl); if (TREE_CODE (value) == COMPONENT_REF - && TREE_CODE (TREE_OPERAND (value, 0)) == VAR_DECL + && VAR_P (TREE_OPERAND (value, 0)) && GFC_DECL_COMMON_OR_EQUIV (TREE_OPERAND (value, 0))) { /* If variable in COMMON or EQUIVALENCE is privatized, return @@ -1192,7 +1190,7 @@ gfc_omp_private_debug_clause (tree decl, bool shared) tree value = DECL_VALUE_EXPR (decl); if (TREE_CODE (value) == COMPONENT_REF - && TREE_CODE (TREE_OPERAND (value, 0)) == VAR_DECL + && VAR_P (TREE_OPERAND (value, 0)) && GFC_DECL_COMMON_OR_EQUIV (TREE_OPERAND (value, 0))) return shared; } @@ -3001,7 +2999,7 @@ gfc_trans_omp_atomic (gfc_code *code) lhsaddr = save_expr (lhsaddr); if (TREE_CODE (lhsaddr) != SAVE_EXPR && (TREE_CODE (lhsaddr) != ADDR_EXPR - || TREE_CODE (TREE_OPERAND (lhsaddr, 0)) != VAR_DECL)) + || !VAR_P (TREE_OPERAND (lhsaddr, 0)))) { /* Make sure LHS is simple enough so that goa_lhs_expr_p can recognize it even after unsharing function body. */ @@ -3233,7 +3231,7 @@ gfc_trans_omp_do (gfc_code *code, gfc_exec_op op, stmtblock_t *pblock, dovar_decl = dovar; /* Special case simple loops. */ - if (TREE_CODE (dovar) == VAR_DECL) + if (VAR_P (dovar)) { if (integer_onep (step)) simple = 1; |