OSDN Git Service

2009-12-12 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 12 Dec 2009 01:12:55 +0000 (01:12 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 12 Dec 2009 01:12:55 +0000 (01:12 +0000)
* tree.c (need_assembler_name_p): Abstract decls do not need
an assembler name.
* dwarf2out.c (dwarf2out_abstract_function): Preserve
DECL_ABSTRACT properly.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155189 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/dwarf2out.c
gcc/tree.c

index a555f3f..daad249 100644 (file)
@@ -1,3 +1,10 @@
+2009-12-12  Richard Guenther  <rguenther@suse.de>
+
+       * tree.c (need_assembler_name_p): Abstract decls do not need
+       an assembler name.
+       * dwarf2out.c (dwarf2out_abstract_function): Preserve
+       DECL_ABSTRACT properly.
+
 2009-12-11  Richard Guenther  <rguenther@suse.de>
 
        * lto-streamer-in.c (lto_input_tree_ref): Do not register
index 3e3cf31..ec5298c 100644 (file)
@@ -17434,7 +17434,7 @@ dwarf2out_abstract_function (tree decl)
   dw_die_ref old_die;
   tree save_fn;
   tree context;
-  int was_abstract = DECL_ABSTRACT (decl);
+  int was_abstract;
   htab_t old_decl_loc_table;
 
   /* Make sure we have the actual abstract inline, not a clone.  */
@@ -17466,6 +17466,7 @@ dwarf2out_abstract_function (tree decl)
   current_function_decl = decl;
   push_cfun (DECL_STRUCT_FUNCTION (decl));
 
+  was_abstract = DECL_ABSTRACT (decl);
   set_decl_abstract_flags (decl, 1);
   dwarf2out_decl (decl);
   if (! was_abstract)
index 35bfd68..769b332 100644 (file)
@@ -4273,6 +4273,10 @@ need_assembler_name_p (tree decl)
       || DECL_ASSEMBLER_NAME_SET_P (decl))
     return false;
 
+  /* Abstract decls do not need an assembler name.  */
+  if (DECL_ABSTRACT (decl))
+    return false;
+
   /* For VAR_DECLs, only static, public and external symbols need an
      assembler name.  */
   if (TREE_CODE (decl) == VAR_DECL