]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gimplify.c (gimplify_call_expr): Don't set CALL_CANNOT_INLINE_P for functions for...
authorAdam Nemet <anemet@caviumnetworks.com>
Thu, 12 Mar 2009 01:02:16 +0000 (01:02 +0000)
committerAdam Nemet <nemet@gcc.gnu.org>
Thu, 12 Mar 2009 01:02:16 +0000 (01:02 +0000)
* gimplify.c (gimplify_call_expr): Don't set CALL_CANNOT_INLINE_P
for functions for which the parameter types are unknown.

testsuite/
* gcc.dg/inline-33.c: New test.

From-SVN: r144801

gcc/ChangeLog
gcc/gimplify.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/inline-33.c [new file with mode: 0644]

index c4cccf25b44ccc92c2f4da2901b9c6fc4c390ea1..45380b9acb48e6d7d0b70c1315babe0a37aa4b5d 100644 (file)
@@ -1,3 +1,8 @@
+2009-03-11  Adam Nemet  <anemet@caviumnetworks.com>
+
+       * gimplify.c (gimplify_call_expr): Don't set CALL_CANNOT_INLINE_P
+       for functions for which the parameter types are unknown.
+
 2009-03-11  Jakub Jelinek  <jakub@redhat.com>
 
        PR target/39137
index b0c65920d814d190f75ea908daec82d0b6627bbf..8ed4263664228b8a410ee67ac9b3f78bf1fe212b 100644 (file)
@@ -2355,11 +2355,7 @@ gimplify_call_expr (tree *expr_p, gimple_seq *pre_p, bool want_value)
   else if (parms)
     p = parms;
   else
-    {
-      if (nargs != 0)
-       CALL_CANNOT_INLINE_P (*expr_p) = 1;
-      p = NULL_TREE;
-    }
+    p = NULL_TREE;
   for (i = 0; i < nargs && p; i++, p = TREE_CHAIN (p))
     ;
 
index 66e0fe318964ec17a870ad22daf3d5074dd90840..75f76d8a157e4478eb82a5060114ac85b986825f 100644 (file)
@@ -1,3 +1,7 @@
+2009-03-11  Adam Nemet  <anemet@caviumnetworks.com>
+
+       * gcc.dg/inline-33.c: New test.
+
 2009-03-11  Nathan Froyd  <froydnj@codesourcery.com>
 
        * gcc.dg/vect/vect-82.c: Combine dg-do and
diff --git a/gcc/testsuite/gcc.dg/inline-33.c b/gcc/testsuite/gcc.dg/inline-33.c
new file mode 100644 (file)
index 0000000..c830c7d
--- /dev/null
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-optimized"  } */
+
+int i;
+
+int foo ();
+
+main ()
+{
+  return foo (i);
+}
+
+int foo (i)
+     int i;
+{
+  return bar(i);
+}
+
+/* { dg-final { scan-tree-dump-times "bar"  2 "optimized"  } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */