cgraphunit.c (decide_is_function_needed): Don't force always_inline to be output...
authorJan Hubicka <jh@suse.cz>
Thu, 11 May 2006 16:11:37 +0000 (18:11 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Thu, 11 May 2006 16:11:37 +0000 (16:11 +0000)
* cgraphunit.c (decide_is_function_needed): Don't force always_inline
to be output at -O0.

From-SVN: r113704

gcc/ChangeLog
gcc/cgraphunit.c

index 1ab773289afcb4357a42c4e76424908fbce87b8a..fff21913b9efa91eb0ecb62f21f4a480fc5140c9 100644 (file)
@@ -1,3 +1,8 @@
+2006-05-11  Jan Hubicka  <jh@suse.cz>
+
+       * cgraphunit.c (decide_is_function_needed): Don't force always_inline
+       to be output at -O0.
+
 2006-05-11  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
 
        PR middle-end/27384
index 351f5f0caedc10898cc69acd24df122c29bc9145..bfa7bff8c34cc92ac30d3f2686b3843816cc85c4 100644 (file)
@@ -219,9 +219,11 @@ decide_is_function_needed (struct cgraph_node *node, tree decl)
      COMDAT functions that must be output only when they are needed. 
 
      When not optimizing, also output the static functions. (see
-     PR25962)
+     PR25962), but don't do so for always_inline functions.
      */
-  if (((TREE_PUBLIC (decl) || !optimize) && !flag_whole_program)
+  if (((TREE_PUBLIC (decl)
+       || (!optimize && !node->local.disregard_inline_limits))
+      && !flag_whole_program)
       && !DECL_COMDAT (decl) && !DECL_EXTERNAL (decl))
     return true;