gimple-fold.c (fold_const_aggregate_ref_1): Use DECL_P.
authorMarek Polacek <polacek@redhat.com>
Wed, 20 May 2015 11:45:07 +0000 (11:45 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Wed, 20 May 2015 11:45:07 +0000 (11:45 +0000)
* 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
gcc/c-family/ChangeLog
gcc/c-family/c-ada-spec.c
gcc/gimple-fold.c
gcc/gimplify.c

index af353faa875405f95e48656482c08754afdca833..b78857c55dc21b8bd901300deb9a95e206ce47fa 100644 (file)
@@ -1,3 +1,8 @@
+2015-05-20  Marek Polacek  <polacek@redhat.com>
+
+       * gimple-fold.c (fold_const_aggregate_ref_1): Use DECL_P.
+       * gimplify.c (gimplify_modify_expr_rhs): Likewise.
+
 2015-05-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
        * config/aarch64/aarch64.c (aarch64_class_max_nregs):
index fba79aabdaee359a6ab538b19496d9459606ad1e..30e615627297f2b5fb7d8359fdd5589c8a541885 100644 (file)
@@ -1,3 +1,7 @@
+2015-05-20  Marek Polacek  <polacek@redhat.com>
+
+       * c-ada-spec.c (dump_sloc): Use DECL_P.
+
 2015-05-20  Marek Polacek  <polacek@redhat.com>
 
        * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
index 8d6e01421cd781b58b73ac2676f3c50fb2dc3183..b4e159e1eea07ec7de6309f0f05644911aa8a9e0 100644 (file)
@@ -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));
index 2cc5628608497eb2832fc3abb6d46235233298ce..4bef3502dfd97bec98528f72598fb381d22f3beb 100644 (file)
@@ -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);
index c5eccf0628015a32fcf9b619117ecf1184f12014..2720d02f47aa1457080a471a46367a82afd52269 100644 (file)
@@ -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))