integrate.c (function_cannot_inline_p): Do inline functions that return `void'.
authorMark Mitchell <mark@codesourcery.com>
Sun, 26 Mar 2000 19:09:36 +0000 (19:09 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Sun, 26 Mar 2000 19:09:36 +0000 (19:09 +0000)
* integrate.c (function_cannot_inline_p): Do inline functions that
return `void'.

From-SVN: r32752

gcc/ChangeLog
gcc/integrate.c

index 83ddf360c1fce74e0e197b4fd586fff475167343..99368f25c611b13948cd70d24876f9c14f148b39 100644 (file)
@@ -1,3 +1,8 @@
+2000-03-26  Mark Mitchell  <mark@codesourcery.com>
+
+       * integrate.c (function_cannot_inline_p): Do inline functions that
+       return `void'.
+
 Sun Mar 26 11:37:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
 
        * stor-layout.c (layout_type, set_sizetype): early_type_list is
index 5b8c8dc7b25c02272b91823c3f4768783cc78675..163f59bd473efbfba1b7e49395dcfbc8c7f8e963 100644 (file)
@@ -186,7 +186,8 @@ function_cannot_inline_p (fndecl)
     return N_("inline functions not supported for this return value type");
 
   /* We can't inline functions that return structures of varying size.  */
-  if (int_size_in_bytes (TREE_TYPE (TREE_TYPE (fndecl))) < 0)
+  if (TREE_CODE (TREE_TYPE (TREE_TYPE (fndecl))) != VOID_TYPE
+      && int_size_in_bytes (TREE_TYPE (TREE_TYPE (fndecl))) < 0)
     return N_("function with varying-size return value cannot be inline");
 
   /* Cannot inline a function with a varying size argument or one that