From 3a65ee74e89fb6bc423e32be8aca2bdbedefc98b Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Wed, 20 May 2015 11:45:07 +0000 Subject: [PATCH] gimple-fold.c (fold_const_aggregate_ref_1): Use DECL_P. * gimple-fold.c (fold_const_aggregate_ref_1): Use DECL_P. * gimplify.c (gimplify_modify_expr_rhs): Likewise. * c-ada-spec.c (dump_sloc): Use DECL_P. From-SVN: r223440 --- gcc/ChangeLog | 5 +++++ gcc/c-family/ChangeLog | 4 ++++ gcc/c-family/c-ada-spec.c | 2 +- gcc/gimple-fold.c | 2 +- gcc/gimplify.c | 2 +- 5 files changed, 12 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index af353faa875..b78857c55dc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-05-20 Marek Polacek + + * gimple-fold.c (fold_const_aggregate_ref_1): Use DECL_P. + * gimplify.c (gimplify_modify_expr_rhs): Likewise. + 2015-05-20 Kyrylo Tkachov * config/aarch64/aarch64.c (aarch64_class_max_nregs): diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index fba79aabdae..30e61562729 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,7 @@ +2015-05-20 Marek Polacek + + * c-ada-spec.c (dump_sloc): Use DECL_P. + 2015-05-20 Marek Polacek * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout. diff --git a/gcc/c-family/c-ada-spec.c b/gcc/c-family/c-ada-spec.c index 8d6e01421cd..b4e159e1eea 100644 --- a/gcc/c-family/c-ada-spec.c +++ b/gcc/c-family/c-ada-spec.c @@ -1629,7 +1629,7 @@ dump_sloc (pretty_printer *buffer, tree node) xloc.file = NULL; - if (TREE_CODE_CLASS (TREE_CODE (node)) == tcc_declaration) + if (DECL_P (node)) xloc = expand_location (DECL_SOURCE_LOCATION (node)); else if (EXPR_HAS_LOCATION (node)) xloc = expand_location (EXPR_LOCATION (node)); diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c index 2cc56286084..4bef3502dfd 100644 --- a/gcc/gimple-fold.c +++ b/gcc/gimple-fold.c @@ -5518,7 +5518,7 @@ fold_const_aggregate_ref_1 (tree t, tree (*valueize) (tree)) if (TREE_THIS_VOLATILE (t)) return NULL_TREE; - if (TREE_CODE_CLASS (TREE_CODE (t)) == tcc_declaration) + if (DECL_P (t)) return get_symbol_constant_value (t); tem = fold_read_from_constant_string (t); diff --git a/gcc/gimplify.c b/gcc/gimplify.c index c5eccf06280..2720d02f47a 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -4222,7 +4222,7 @@ gimplify_modify_expr_rhs (tree *expr_p, tree *from_p, tree *to_p, { if (TREE_THIS_VOLATILE (t) != volatile_p) { - if (TREE_CODE_CLASS (TREE_CODE (t)) == tcc_declaration) + if (DECL_P (t)) t = build_simple_mem_ref_loc (EXPR_LOCATION (*from_p), build_fold_addr_expr (t)); if (REFERENCE_CLASS_P (t)) -- 2.30.2