(expand_call): Don't warn about not being able to inline if -O0.
authorRichard Kenner <kenner@gcc.gnu.org>
Sun, 31 Dec 1995 20:00:12 +0000 (15:00 -0500)
committerRichard Kenner <kenner@gcc.gnu.org>
Sun, 31 Dec 1995 20:00:12 +0000 (15:00 -0500)
From-SVN: r10913

gcc/calls.c

index ad05be4f7c0383ffce8ceccf8378b100dd2d43c7..b98f73016b03743be770feb59f211a78fbdd251e 100644 (file)
@@ -618,7 +618,8 @@ expand_call (exp, target, ignore)
 
                 Use abstraction instead of setting TREE_ADDRESSABLE
                 directly.  */
-             if (DECL_INLINE (fndecl) && warn_inline && !flag_no_inline)
+             if (DECL_INLINE (fndecl) && warn_inline && !flag_no_inline
+                 && optimize > 0)
                {
                  warning_with_decl (fndecl, "can't inline call to `%s'");
                  warning ("called from here");
@@ -798,7 +799,7 @@ expand_call (exp, target, ignore)
         separately after all.  If function was declared inline,
         give a warning.  */
       if (DECL_INLINE (fndecl) && warn_inline && !flag_no_inline
-         && ! TREE_ADDRESSABLE (fndecl))
+         && optimize > 0 && ! TREE_ADDRESSABLE (fndecl))
        {
          warning_with_decl (fndecl, "inlining failed in call to `%s'");
          warning ("called from here");