]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* tree-inline.c (tree_function_versioning): Output debug info.
authorJan Hubicka <jh@suse.cz>
Sun, 1 Mar 2009 11:05:00 +0000 (12:05 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sun, 1 Mar 2009 11:05:00 +0000 (11:05 +0000)
From-SVN: r144516

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/debug/dwarf2/ipa-cp1.c [new file with mode: 0644]
gcc/tree-inline.c

index dba3b12a0241ee1ea35bf399eb26ee349d3f746d..15618084f2a0dec16bf39558ed44191a47639000 100644 (file)
@@ -1,3 +1,7 @@
+2009-02-28  Jan Hubicka  <jh@suse.cz>
+
+       * tree-inline.c (tree_function_versioning): Output debug info.
+
 2009-02-28  Jan Hubicka  <jh@suse.cz>
 
        PR debug/39267
index c6b8017d6c3c8a797e2931098fc6b9883fcfa9f6..b1afa603960b9dfde9610306c3d14dc45dc6d9e4 100644 (file)
@@ -1,3 +1,7 @@
+2009-03-01  Jan Hubicka  <jh@suse.cz>
+
+       * gcc.dg/debug/dwarf2/ipa-cp1.c: New testcase.
+
 2009-03-01  Jan Hubicka  <jh@suse.cz>
 
        PR debug/39267
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/ipa-cp1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/ipa-cp1.c
new file mode 100644 (file)
index 0000000..7442dab
--- /dev/null
@@ -0,0 +1,30 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -gdwarf-2 -dA" } */
+void q(int p);
+static void
+t(int constant_propagated_par)
+{
+  int local_var = constant_propagated_par + 1;
+  q(local_var);
+  q(local_var);
+  q(local_var);
+  q(local_var);
+  q(local_var);
+  q(local_var);
+  q(local_var);
+  q(local_var);
+  q(local_var);
+  q(local_var);
+  q(local_var);
+}
+main()
+{
+  t(5);
+  t(5);
+  t(5);
+  t(5);
+  t(5);
+  t(5);
+  t(5);
+}
+/* { dg-final { scan-assembler "local_var" } } */
index 65d5b88a9ce8eb2beb51ab195e6986f4db74fedc..8ff784abd484879667d2e5a40ec916695e7cde88 100644 (file)
@@ -4226,6 +4226,12 @@ tree_function_versioning (tree old_decl, tree new_decl, varray_type tree_map,
   old_version_node = cgraph_node (old_decl);
   new_version_node = cgraph_node (new_decl);
 
+  /* Output the inlining info for this abstract function, since it has been
+     inlined.  If we don't do this now, we can lose the information about the
+     variables in the function when the blocks get blown away as soon as we
+     remove the cgraph node.  */
+  (*debug_hooks->outlining_inline_function) (old_decl);
+
   DECL_ARTIFICIAL (new_decl) = 1;
   DECL_ABSTRACT_ORIGIN (new_decl) = DECL_ORIGIN (old_decl);