diff mbox

rename DECL_ABSTRACT to DECL_ABSTRACT_P

Message ID 541B042C.2000906@redhat.com
State New
Headers show

Commit Message

Aldy Hernandez Sept. 18, 2014, 4:11 p.m. UTC
Similarly named DECL_ABSTRACT, DECL_ABSTRACT_ORIGIN, and DECL_ORIGIN are 
somewhat confusing to my poor brain.  Particularly annoying is 
DECL_ABSTRACT which is actually a boolean, unlike the other two.

Would it be OK to rename it something more sensible like 
DECL_ABSTRACT_P?  I know this is a longstanding name, but the proposed 
is clearer and virtually the same.

OK for mainline?
commit 2705197662689e354fe397abe907ebf3763eae2d
Author: Aldy Hernandez <aldyh@redhat.com>
Date:   Thu Sep 18 10:06:43 2014 -0600

    	* cgraph.h, dbxout.c, dwarfout2.c, gimple-fold.c,
    	lto-streamer-out.c, print-tree.c, symtab.c, tree-inline.c,
    	tree-streamer-in.c, tree-streamer-out.c, tree.c, tree.h,
    	varpool.c: Rename all instances of DECL_ABSTRACT to
    	DECL_ABSTRACT_P.
    
    cp/
    	* class.c, decl.c, optimize.c: Rename all instances of
    	DECL_ABSTRACT to DECL_ABSTRACT_P.
    
    lto/
    	* lto-symtab.c, lto.c: Rename all instances of DECL_ABSTRACT to
    	DECL_ABSTRACT_P.

Comments

Marek Polacek Sept. 18, 2014, 4:21 p.m. UTC | #1
On Thu, Sep 18, 2014 at 10:11:24AM -0600, Aldy Hernandez wrote:
> Similarly named DECL_ABSTRACT, DECL_ABSTRACT_ORIGIN, and DECL_ORIGIN are
> somewhat confusing to my poor brain.  Particularly annoying is DECL_ABSTRACT
> which is actually a boolean, unlike the other two.
> 
> Would it be OK to rename it something more sensible like DECL_ABSTRACT_P?  I
> know this is a longstanding name, but the proposed is clearer and virtually
> the same.
> 
> OK for mainline?

IMHO a good idea.

> --- a/gcc/cp/class.c
> +++ b/gcc/cp/class.c
> @@ -4580,7 +4580,7 @@ clone_function_decl (tree fn, int update_method_vec_p)
>      }
>  
>    /* Note that this is an abstract function that is never emitted.  */
> -  DECL_ABSTRACT (fn) = 1;
> +  DECL_ABSTRACT_P (fn) = 1;

It'd probably make sense to use 'true' now.

> @@ -10272,7 +10272,7 @@ grokdeclarator (const cp_declarator *declarator,
>  	       clones.  The decloning optimization (for space) may
>                 revert this subsequently if it determines that
>                 the clones should share a common implementation.  */
> -	    DECL_ABSTRACT (decl) = 1;
> +	    DECL_ABSTRACT_P (decl) = 1;

Likewise.

> --- a/gcc/tree-inline.c
> +++ b/gcc/tree-inline.c
> @@ -5095,7 +5095,7 @@ copy_decl_no_change (tree decl, copy_body_data *id)
>    copy = copy_node (decl);
>  
>    /* The COPY is not abstract; it will be generated in DST_FN.  */
> -  DECL_ABSTRACT (copy) = 0;
> +  DECL_ABSTRACT_P (copy) = 0;
>    lang_hooks.dup_lang_specific_decl (copy);

And false here.

> --- a/gcc/varpool.c
> +++ b/gcc/varpool.c
> @@ -704,7 +704,7 @@ add_new_static_var (tree type)
>    TREE_STATIC (new_decl) = 1;
>    TREE_USED (new_decl) = 1;
>    DECL_CONTEXT (new_decl) = NULL_TREE;
> -  DECL_ABSTRACT (new_decl) = 0;
> +  DECL_ABSTRACT_P (new_decl) = 0;

And here.

	Marek
Aldy Hernandez Sept. 18, 2014, 4:30 p.m. UTC | #2
>> -  DECL_ABSTRACT (fn) = 1;
>> +  DECL_ABSTRACT_P (fn) = 1;
>
> It'd probably make sense to use 'true' now.

I thought about it, but I wanted to change as little as possible, plus I 
wanted to follow the same style as what we've been doing for a lot of 
the _P macros:

DECL_HAS_VALUE_EXPR_P (t) = 1;
DECL_HAS_DEBUG_ARGS_P (from) = 1;
DECL_IGNORED_P (lab) = 1;
TREE_PUBLIC (decl) = 1;
CONSTANT_POOL_ADDRESS_P (symbol) = 1;

etc, etc.

But I am happy to change it, if people feel strongly about it.  (Though 
I'm not volunteering to change the other umteenhundred _P macros that 
currently use 0/1 ;-)).

Aldy
Marek Polacek Sept. 18, 2014, 4:33 p.m. UTC | #3
On Thu, Sep 18, 2014 at 10:30:30AM -0600, Aldy Hernandez wrote:
> 
> >>-  DECL_ABSTRACT (fn) = 1;
> >>+  DECL_ABSTRACT_P (fn) = 1;
> >
> >It'd probably make sense to use 'true' now.
> 
> I thought about it, but I wanted to change as little as possible, plus I
> wanted to follow the same style as what we've been doing for a lot of the _P
> macros:
> 
> DECL_HAS_VALUE_EXPR_P (t) = 1;
> DECL_HAS_DEBUG_ARGS_P (from) = 1;
> DECL_IGNORED_P (lab) = 1;
> TREE_PUBLIC (decl) = 1;
> CONSTANT_POOL_ADDRESS_P (symbol) = 1;
> 
> etc, etc.
> 
> But I am happy to change it, if people feel strongly about it.  (Though I'm
> not volunteering to change the other umteenhundred _P macros that currently
> use 0/1 ;-)).

Yeah, sure, either way it's a good cleanup ;).

	Marek
Jeff Law Sept. 18, 2014, 7:19 p.m. UTC | #4
On 09/18/14 10:33, Marek Polacek wrote:
> On Thu, Sep 18, 2014 at 10:30:30AM -0600, Aldy Hernandez wrote:
>>
>>>> -  DECL_ABSTRACT (fn) = 1;
>>>> +  DECL_ABSTRACT_P (fn) = 1;
>>>
>>> It'd probably make sense to use 'true' now.
>>
>> I thought about it, but I wanted to change as little as possible, plus I
>> wanted to follow the same style as what we've been doing for a lot of the _P
>> macros:
>>
>> DECL_HAS_VALUE_EXPR_P (t) = 1;
>> DECL_HAS_DEBUG_ARGS_P (from) = 1;
>> DECL_IGNORED_P (lab) = 1;
>> TREE_PUBLIC (decl) = 1;
>> CONSTANT_POOL_ADDRESS_P (symbol) = 1;
>>
>> etc, etc.
>>
>> But I am happy to change it, if people feel strongly about it.  (Though I'm
>> not volunteering to change the other umteenhundred _P macros that currently
>> use 0/1 ;-)).
>
> Yeah, sure, either way it's a good cleanup ;).
No strong opinions.  Though I think true/false are the way we want folks 
to write new code.  Given that's the long term direction, might as well 
fix that nit for DECL_ABSTRACT_P.

jeff
diff mbox

Patch

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index dd76758..9c4ec45 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@ 
+2014-09-18  Aldy Hernandez  <aldyh@redhat.com>
+
+	* cgraph.h, dbxout.c, dwarfout2.c, gimple-fold.c,
+	lto-streamer-out.c, print-tree.c, symtab.c, tree-inline.c,
+	tree-streamer-in.c, tree-streamer-out.c, tree.c, tree.h,
+	varpool.c: Rename all instances of DECL_ABSTRACT to
+	DECL_ABSTRACT_P.
+
 2014-09-05  David Malcolm  <dmalcolm@redhat.com>
 
 	* config/arc/arc.c (arc_print_operand): Use insn method of
diff --git a/gcc/cgraph.h b/gcc/cgraph.h
index 030a1c7..0902fe9 100644
--- a/gcc/cgraph.h
+++ b/gcc/cgraph.h
@@ -1970,7 +1970,7 @@  symtab_node::real_symbol_p (void)
 {
   cgraph_node *cnode;
 
-  if (DECL_ABSTRACT (decl))
+  if (DECL_ABSTRACT_P (decl))
     return false;
   if (!is_a <cgraph_node *> (this))
     return true;
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 3d87231..a236569 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@ 
+2014-09-18  Aldy Hernandez  <aldyh@redhat.com>
+
+	* class.c, decl.c, optimize.c: Rename all instances of
+	DECL_ABSTRACT to DECL_ABSTRACT_P.
+
 2014-09-05  Jason Merrill  <jason@redhat.com>
 
 	PR c++/62659
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 09f946f..1c802b4 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -4580,7 +4580,7 @@  clone_function_decl (tree fn, int update_method_vec_p)
     }
 
   /* Note that this is an abstract function that is never emitted.  */
-  DECL_ABSTRACT (fn) = 1;
+  DECL_ABSTRACT_P (fn) = 1;
 }
 
 /* DECL is an in charge constructor, which is being defined. This will
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index d8fb35e..775e057 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -2262,7 +2262,7 @@  duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
 	}
 
       /* Preserve abstractness on cloned [cd]tors.  */
-      DECL_ABSTRACT (newdecl) = DECL_ABSTRACT (olddecl);
+      DECL_ABSTRACT_P (newdecl) = DECL_ABSTRACT_P (olddecl);
 
       /* Update newdecl's parms to point at olddecl.  */
       for (parm = DECL_ARGUMENTS (newdecl); parm;
@@ -10272,7 +10272,7 @@  grokdeclarator (const cp_declarator *declarator,
 	       clones.  The decloning optimization (for space) may
                revert this subsequently if it determines that
                the clones should share a common implementation.  */
-	    DECL_ABSTRACT (decl) = 1;
+	    DECL_ABSTRACT_P (decl) = 1;
 	}
       else if (current_class_type
 	       && constructor_name_p (unqualified_id, current_class_type))
diff --git a/gcc/cp/optimize.c b/gcc/cp/optimize.c
index 31acb07..f37515ec2 100644
--- a/gcc/cp/optimize.c
+++ b/gcc/cp/optimize.c
@@ -270,7 +270,7 @@  maybe_thunk_body (tree fn, bool force)
      (for non-vague linkage ctors) or the COMDAT group (otherwise).  */
 
   populate_clone_array (fn, fns);
-  DECL_ABSTRACT (fn) = false;
+  DECL_ABSTRACT_P (fn) = false;
   if (!DECL_WEAK (fn))
     {
       TREE_PUBLIC (fn) = false;
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index d856bdd..91cedf7 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -1618,7 +1618,7 @@  dbxout_type_methods (tree type)
 
 	  /* Also ignore abstract methods; those are only interesting to
 	     the DWARF backends.  */
-	  if (DECL_IGNORED_P (fndecl) || DECL_ABSTRACT (fndecl))
+	  if (DECL_IGNORED_P (fndecl) || DECL_ABSTRACT_P (fndecl))
 	    continue;
 
 	  /* Redundantly output the plain name, since that's what gdb
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 23a80d8..e3c4f98 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -3679,7 +3679,7 @@  decl_ultimate_origin (const_tree decl)
   /* output_inline_function sets DECL_ABSTRACT_ORIGIN for all the
      nodes in the function to point to themselves; ignore that if
      we're trying to output the abstract instance of this function.  */
-  if (DECL_ABSTRACT (decl) && DECL_ABSTRACT_ORIGIN (decl) == decl)
+  if (DECL_ABSTRACT_P (decl) && DECL_ABSTRACT_ORIGIN (decl) == decl)
     return NULL_TREE;
 
   /* Since the DECL_ABSTRACT_ORIGIN for a DECL is supposed to be the
@@ -17435,7 +17435,7 @@  gen_entry_point_die (tree decl, dw_die_ref context_die)
 			  TYPE_UNQUALIFIED, context_die);
     }
 
-  if (DECL_ABSTRACT (decl))
+  if (DECL_ABSTRACT_P (decl))
     equate_decl_number_to_die (decl, decl_die);
   else
     add_AT_lbl_id (decl_die, DW_AT_low_pc, decl_start_label (decl));
@@ -17617,7 +17617,7 @@  gen_formal_parameter_die (tree node, tree origin, bool emit_name_p,
       else if (emit_name_p)
 	add_name_and_src_coords_attributes (parm_die, node);
       if (origin == NULL
-	  || (! DECL_ABSTRACT (node_or_origin)
+	  || (! DECL_ABSTRACT_P (node_or_origin)
 	      && variably_modified_type_p (TREE_TYPE (node_or_origin),
 					   decl_function_context
 							    (node_or_origin))))
@@ -17636,7 +17636,7 @@  gen_formal_parameter_die (tree node, tree origin, bool emit_name_p,
 
       if (node && node != origin)
         equate_decl_number_to_die (node, parm_die);
-      if (! DECL_ABSTRACT (node_or_origin))
+      if (! DECL_ABSTRACT_P (node_or_origin))
 	add_location_or_const_value_attribute (parm_die, node_or_origin,
 					       node == NULL, DW_AT_location);
 
@@ -17921,7 +17921,7 @@  set_block_abstract_flags (tree stmt, int setting)
 }
 
 /* Given a pointer to some ..._DECL node, and a boolean value to set the
-   "abstract" flags to, set that value into the DECL_ABSTRACT flag for the
+   "abstract" flags to, set that value into the DECL_ABSTRACT_P flag for the
    given decl, and (in the case where the decl is a FUNCTION_DECL) also
    set the abstract flags for all of the parameters, local vars, local
    blocks and sub-blocks (recursively) to the same setting.  */
@@ -17929,13 +17929,13 @@  set_block_abstract_flags (tree stmt, int setting)
 static void
 set_decl_abstract_flags (tree decl, int setting)
 {
-  DECL_ABSTRACT (decl) = setting;
+  DECL_ABSTRACT_P (decl) = setting;
   if (TREE_CODE (decl) == FUNCTION_DECL)
     {
       tree arg;
 
       for (arg = DECL_ARGUMENTS (decl); arg; arg = DECL_CHAIN (arg))
-	DECL_ABSTRACT (arg) = setting;
+	DECL_ABSTRACT_P (arg) = setting;
       if (DECL_INITIAL (decl) != NULL_TREE
 	  && DECL_INITIAL (decl) != error_mark_node)
 	set_block_abstract_flags (DECL_INITIAL (decl), setting);
@@ -17980,7 +17980,7 @@  dwarf2out_abstract_function (tree decl)
   tail_call_site_count = -1;
 
   /* Be sure we've emitted the in-class declaration DIE (if any) first, so
-     we don't get confused by DECL_ABSTRACT.  */
+     we don't get confused by DECL_ABSTRACT_P.  */
   if (debug_info_level > DINFO_LEVEL_TERSE)
     {
       context = decl_class_context (decl);
@@ -17993,7 +17993,7 @@  dwarf2out_abstract_function (tree decl)
   save_fn = current_function_decl;
   current_function_decl = decl;
 
-  was_abstract = DECL_ABSTRACT (decl);
+  was_abstract = DECL_ABSTRACT_P (decl);
   set_decl_abstract_flags (decl, 1);
   dwarf2out_decl (decl);
   if (! was_abstract)
@@ -18129,7 +18129,7 @@  gen_subprogram_die (tree decl, dw_die_ref context_die)
 
   premark_used_types (DECL_STRUCT_FUNCTION (decl));
 
-  /* It is possible to have both DECL_ABSTRACT and DECLARATION be true if we
+  /* It is possible to have both DECL_ABSTRACT_P and DECLARATION be true if we
      started to generate the abstract instance of an inline, decided to output
      its containing class, and proceeded to emit the declaration of the inline
      from the member list for the class.  If so, DECLARATION takes priority;
@@ -18274,7 +18274,7 @@  gen_subprogram_die (tree decl, dw_die_ref context_die)
 	  equate_decl_number_to_die (decl, subr_die);
 	}
     }
-  else if (DECL_ABSTRACT (decl))
+  else if (DECL_ABSTRACT_P (decl))
     {
       if (DECL_DECLARED_INLINE_P (decl))
 	{
@@ -18908,7 +18908,7 @@  gen_variable_die (tree decl, tree origin, dw_die_ref context_die)
      static variable, so we must test for the DW_AT_declaration flag.
 
      ??? Loop unrolling/reorder_blocks should perhaps be rewritten to
-     copy decls and set the DECL_ABSTRACT flag on them instead of
+     copy decls and set the DECL_ABSTRACT_P flag on them instead of
      sharing them.
 
      ??? Duplicated blocks have been rewritten to use .debug_ranges.
@@ -18943,7 +18943,7 @@  gen_variable_die (tree decl, tree origin, dw_die_ref context_die)
 
   if ((origin == NULL && !specialization_p)
       || (origin != NULL
-	  && !DECL_ABSTRACT (decl_or_origin)
+	  && !DECL_ABSTRACT_P (decl_or_origin)
 	  && variably_modified_type_p (TREE_TYPE (decl_or_origin),
 				       decl_function_context
 							(decl_or_origin))))
@@ -18972,11 +18972,11 @@  gen_variable_die (tree decl, tree origin, dw_die_ref context_die)
   if (declaration)
     add_AT_flag (var_die, DW_AT_declaration, 1);
 
-  if (decl && (DECL_ABSTRACT (decl) || declaration || old_die == NULL))
+  if (decl && (DECL_ABSTRACT_P (decl) || declaration || old_die == NULL))
     equate_decl_number_to_die (decl, var_die);
 
   if (! declaration
-      && (! DECL_ABSTRACT (decl_or_origin)
+      && (! DECL_ABSTRACT_P (decl_or_origin)
 	  /* Local static vars are shared between all clones/inlines,
 	     so emit DW_AT_location on the abstract DIE if DECL_RTL is
 	     already set.  */
@@ -19032,7 +19032,7 @@  gen_label_die (tree decl, dw_die_ref context_die)
   else
     add_name_and_src_coords_attributes (lbl_die, decl);
 
-  if (DECL_ABSTRACT (decl))
+  if (DECL_ABSTRACT_P (decl))
     equate_decl_number_to_die (decl, lbl_die);
   else
     {
@@ -19807,7 +19807,7 @@  gen_typedef_die (tree decl, dw_die_ref context_die)
       add_accessibility_attribute (type_die, decl);
     }
 
-  if (DECL_ABSTRACT (decl))
+  if (DECL_ABSTRACT_P (decl))
     equate_decl_number_to_die (decl, type_die);
 
   if (get_AT (type_die, DW_AT_name))
@@ -20539,7 +20539,7 @@  gen_decl_die (tree decl, tree origin, dw_die_ref context_die)
       /* If we're emitting an out-of-line copy of an inline function,
 	 emit info for the abstract instance and set up to refer to it.  */
       else if (cgraph_function_possibly_inlined_p (decl)
-	       && ! DECL_ABSTRACT (decl)
+	       && ! DECL_ABSTRACT_P (decl)
 	       && ! class_or_namespace_scope_p (context_die)
 	       /* dwarf2out_abstract_function won't emit a die if this is just
 		  a declaration.  We must avoid setting DECL_ABSTRACT_ORIGIN in
@@ -20928,7 +20928,7 @@  dwarf2out_decl (tree decl)
 	 where the inlined function is output in a different LTRANS unit
 	 or not at all.  */
       if (DECL_INITIAL (decl) == NULL_TREE
-	  && ! DECL_ABSTRACT (decl))
+	  && ! DECL_ABSTRACT_P (decl))
 	return;
 
       /* If we're a nested function, initially use a parent of NULL; if we're
diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c
index 4aa1f4c..641e5ce 100644
--- a/gcc/gimple-fold.c
+++ b/gcc/gimple-fold.c
@@ -85,7 +85,7 @@  can_refer_decl_in_current_unit_p (tree decl, tree from_decl)
   struct cgraph_node *node;
   symtab_node *snode;
 
-  if (DECL_ABSTRACT (decl))
+  if (DECL_ABSTRACT_P (decl))
     return false;
 
   /* We are concerned only about static/external vars and functions.  */
diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c
index b516c7b..54f4e40 100644
--- a/gcc/lto-streamer-out.c
+++ b/gcc/lto-streamer-out.c
@@ -817,7 +817,7 @@  hash_tree (struct streamer_tree_cache_d *cache, hash_map<tree, hashval_t> *map,
       hstate.add_flag (DECL_NONLOCAL (t));
       hstate.add_flag (DECL_VIRTUAL_P (t));
       hstate.add_flag (DECL_IGNORED_P (t));
-      hstate.add_flag (DECL_ABSTRACT (t));
+      hstate.add_flag (DECL_ABSTRACT_P (t));
       hstate.add_flag (DECL_ARTIFICIAL (t));
       hstate.add_flag (DECL_USER_ALIGN (t));
       hstate.add_flag (DECL_PRESERVE_P (t));
@@ -2432,7 +2432,7 @@  write_symbol (struct streamer_tree_cache_d *cache,
      symbol table.  */
   if (!TREE_PUBLIC (t)
       || is_builtin_fn (t)
-      || DECL_ABSTRACT (t)
+      || DECL_ABSTRACT_P (t)
       || (TREE_CODE (t) == VAR_DECL && DECL_HARD_REGISTER (t)))
     return;
   gcc_assert (TREE_CODE (t) != RESULT_DECL);
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog
index f41992a..1e2b8cc 100644
--- a/gcc/lto/ChangeLog
+++ b/gcc/lto/ChangeLog
@@ -1,3 +1,8 @@ 
+2014-09-18  Aldy Hernandez  <aldyh@redhat.com>
+
+	* lto-symtab.c, lto.c: Rename all instances of DECL_ABSTRACT to
+	DECL_ABSTRACT_P.
+
 2014-08-20  Jan Hubicka  <hubicka@ucw.cz>
 
 	* lto.c (read_cgraph_and_symbols): Fix symtab_remove_unreachable_nodes
diff --git a/gcc/lto/lto-symtab.c b/gcc/lto/lto-symtab.c
index cf00076..4ec1a73 100644
--- a/gcc/lto/lto-symtab.c
+++ b/gcc/lto/lto-symtab.c
@@ -653,7 +653,7 @@  lto_symtab_merge_symbols (void)
 
 	      /* Abstract functions may have duplicated cgraph nodes attached;
 		 remove them.  */
-	      else if (cnode && DECL_ABSTRACT (cnode->decl)
+	      else if (cnode && DECL_ABSTRACT_P (cnode->decl)
 		       && (cnode2 = cgraph_node::get (node->decl))
 		       && cnode2 != cnode)
 		cnode2->remove ();
@@ -675,8 +675,8 @@  lto_symtab_prevailing_decl (tree decl)
   if ((!TREE_PUBLIC (decl) && !DECL_EXTERNAL (decl)) || is_builtin_fn (decl))
     return decl;
 
-  /* DECL_ABSTRACTs are their own prevailng decl.  */
-  if (TREE_CODE (decl) == FUNCTION_DECL && DECL_ABSTRACT (decl))
+  /* DECL_ABSTRACT_Ps are their own prevailing decl.  */
+  if (TREE_CODE (decl) == FUNCTION_DECL && DECL_ABSTRACT_P (decl))
     return decl;
 
   /* Likewise builtins are their own prevailing decl.  This preserves
diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c
index 1ecbbce..c2549ee 100644
--- a/gcc/lto/lto.c
+++ b/gcc/lto/lto.c
@@ -1047,7 +1047,7 @@  lto_register_function_decl_in_symtab (struct data_in *data_in, tree decl,
 {
   /* If this variable has already been declared, queue the
      declaration for merging.  */
-  if (TREE_PUBLIC (decl) && !DECL_ABSTRACT (decl))
+  if (TREE_PUBLIC (decl) && !DECL_ABSTRACT_P (decl))
     register_resolution (data_in->file_data,
 			 decl, get_resolution (data_in, ix));
 }
@@ -1248,7 +1248,7 @@  compare_tree_sccs_1 (tree t1, tree t2, tree **map)
       compare_values (DECL_NONLOCAL);
       compare_values (DECL_VIRTUAL_P);
       compare_values (DECL_IGNORED_P);
-      compare_values (DECL_ABSTRACT);
+      compare_values (DECL_ABSTRACT_P);
       compare_values (DECL_ARTIFICIAL);
       compare_values (DECL_USER_ALIGN);
       compare_values (DECL_PRESERVE_P);
diff --git a/gcc/print-tree.c b/gcc/print-tree.c
index eee0df9..9563e4d 100644
--- a/gcc/print-tree.c
+++ b/gcc/print-tree.c
@@ -362,7 +362,7 @@  print_node (FILE *file, const char *prefix, tree node, int indent)
 	    fputs (" unsigned", file);
 	  if (DECL_IGNORED_P (node))
 	    fputs (" ignored", file);
-	  if (DECL_ABSTRACT (node))
+	  if (DECL_ABSTRACT_P (node))
 	    fputs (" abstract", file);
 	  if (DECL_EXTERNAL (node))
 	    fputs (" external", file);
diff --git a/gcc/symtab.c b/gcc/symtab.c
index 792b3b5..c85cbc1 100644
--- a/gcc/symtab.c
+++ b/gcc/symtab.c
@@ -1764,7 +1764,7 @@  symtab_node::get_partitioning_class (void)
      This include external delcarations.   */
   cgraph_node *cnode = dyn_cast <cgraph_node *> (this);
 
-  if (DECL_ABSTRACT (decl))
+  if (DECL_ABSTRACT_P (decl))
     return SYMBOL_EXTERNAL;
 
   if (cnode && cnode->global.inlined_to)
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index b82a147..d0e4a9e 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -5095,7 +5095,7 @@  copy_decl_no_change (tree decl, copy_body_data *id)
   copy = copy_node (decl);
 
   /* The COPY is not abstract; it will be generated in DST_FN.  */
-  DECL_ABSTRACT (copy) = 0;
+  DECL_ABSTRACT_P (copy) = 0;
   lang_hooks.dup_lang_specific_decl (copy);
 
   /* TREE_ADDRESSABLE isn't used to indicate that a label's address has
diff --git a/gcc/tree-streamer-in.c b/gcc/tree-streamer-in.c
index ee1c955..01a55bf 100644
--- a/gcc/tree-streamer-in.c
+++ b/gcc/tree-streamer-in.c
@@ -210,7 +210,7 @@  unpack_ts_decl_common_value_fields (struct bitpack_d *bp, tree expr)
   DECL_NONLOCAL (expr) = (unsigned) bp_unpack_value (bp, 1);
   DECL_VIRTUAL_P (expr) = (unsigned) bp_unpack_value (bp, 1);
   DECL_IGNORED_P (expr) = (unsigned) bp_unpack_value (bp, 1);
-  DECL_ABSTRACT (expr) = (unsigned) bp_unpack_value (bp, 1);
+  DECL_ABSTRACT_P (expr) = (unsigned) bp_unpack_value (bp, 1);
   DECL_ARTIFICIAL (expr) = (unsigned) bp_unpack_value (bp, 1);
   DECL_USER_ALIGN (expr) = (unsigned) bp_unpack_value (bp, 1);
   DECL_PRESERVE_P (expr) = (unsigned) bp_unpack_value (bp, 1);
diff --git a/gcc/tree-streamer-out.c b/gcc/tree-streamer-out.c
index 15ad8f8..2124d54 100644
--- a/gcc/tree-streamer-out.c
+++ b/gcc/tree-streamer-out.c
@@ -178,7 +178,7 @@  pack_ts_decl_common_value_fields (struct bitpack_d *bp, tree expr)
   bp_pack_value (bp, DECL_NONLOCAL (expr), 1);
   bp_pack_value (bp, DECL_VIRTUAL_P (expr), 1);
   bp_pack_value (bp, DECL_IGNORED_P (expr), 1);
-  bp_pack_value (bp, DECL_ABSTRACT (expr), 1);
+  bp_pack_value (bp, DECL_ABSTRACT_P (expr), 1);
   bp_pack_value (bp, DECL_ARTIFICIAL (expr), 1);
   bp_pack_value (bp, DECL_USER_ALIGN (expr), 1);
   bp_pack_value (bp, DECL_PRESERVE_P (expr), 1);
diff --git a/gcc/tree.c b/gcc/tree.c
index d1d67ef..f2a6a72 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -4992,7 +4992,7 @@  need_assembler_name_p (tree decl)
     return false;
 
   /* Abstract decls do not need an assembler name.  */
-  if (DECL_ABSTRACT (decl))
+  if (DECL_ABSTRACT_P (decl))
     return false;
 
   /* For VAR_DECLs, only static, public and external symbols need an
diff --git a/gcc/tree.h b/gcc/tree.h
index e000e4e..7dbb519 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -2062,7 +2062,7 @@  extern void protected_set_expr_location (tree, location_t);
    information, we mustn't try to generate any address information for nodes
    marked as "abstract instances" because we don't actually generate
    any code or allocate any data space for such instances.  */
-#define DECL_ABSTRACT(NODE) \
+#define DECL_ABSTRACT_P(NODE) \
   (DECL_COMMON_CHECK (NODE)->decl_common.abstract_flag)
 
 /* Language-specific decl information.  */
diff --git a/gcc/varpool.c b/gcc/varpool.c
index 72971d6..e588e2d 100644
--- a/gcc/varpool.c
+++ b/gcc/varpool.c
@@ -704,7 +704,7 @@  add_new_static_var (tree type)
   TREE_STATIC (new_decl) = 1;
   TREE_USED (new_decl) = 1;
   DECL_CONTEXT (new_decl) = NULL_TREE;
-  DECL_ABSTRACT (new_decl) = 0;
+  DECL_ABSTRACT_P (new_decl) = 0;
   lang_hooks.dup_lang_specific_decl (new_decl);
   new_node = varpool_node::get_create (new_decl);
   varpool_node::finalize_decl (new_decl);