* integrate.c (copy_decl_for_inlining): Fix copying of copies.
authorJan Hubicka <jh@suse.cz>
Sat, 18 Oct 2003 18:36:05 +0000 (20:36 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sat, 18 Oct 2003 18:36:05 +0000 (18:36 +0000)
From-SVN: r72646

gcc/ChangeLog
gcc/integrate.c

index 5f20a90ee870c371d91a0b2fc8977e2b1e44c8eb..0b17a587d7ff64e30ea47cc0912c11296d0b9452 100644 (file)
@@ -1,3 +1,7 @@
+2003-10-18  Jan Hubicka  <jh@suse.cz>
+
+       * integrate.c (copy_decl_for_inlining): Fix copying of copies.
+
 2003-10-18  Roger Sayle  <roger@eyesopen.com>
 
        * libgcc.texi: Group multi-word types, such as "long double" and
index 21a738ea237bc0beb89fe5e75f5903d37e267ade..ec1c7de0b1eae13c2900a891e78cf5674c5b04e0 100644 (file)
@@ -381,7 +381,10 @@ copy_decl_for_inlining (tree decl, tree from_fn, tree to_fn)
 
   /* Set the DECL_ABSTRACT_ORIGIN so the debugging routines know what
      declaration inspired this copy.  */
-  DECL_ABSTRACT_ORIGIN (copy) = DECL_ORIGIN (decl);
+  if (DECL_ABSTRACT_ORIGIN (decl))
+    DECL_ABSTRACT_ORIGIN (copy) = DECL_ABSTRACT_ORIGIN (decl);
+  else
+    DECL_ABSTRACT_ORIGIN (copy) = DECL_ORIGIN (decl);
 
   /* The new variable/label has no RTL, yet.  */
   if (!TREE_STATIC (copy) && !DECL_EXTERNAL (copy))