PR middle-end/49139 PR other/43564 make sure the inline function is inlined
authorChristian Bruel <christian.bruel@st.com>
Tue, 21 Jun 2011 06:45:05 +0000 (08:45 +0200)
committerChristian Bruel <chrbr@gcc.gnu.org>
Tue, 21 Jun 2011 06:45:05 +0000 (08:45 +0200)
From-SVN: r175241

gcc/ChangeLog
gcc/ipa-inline.c

index 1c9dced03ca99f7297be582b5cabc9a30661aed0..235d40959ea22890d55c8a84cbbb72c975e246a0 100644 (file)
@@ -1,3 +1,8 @@
+2011-06-21  Christian Bruel  <christian.bruel@st.com>
+       
+       PR other/43564
+       * ipa-inline.c (can_inline_edge_p): Check !DECL_DISREGARD_INLINE_LIMITS.
+       
 2011-06-21  Christian Bruel  <christian.bruel@st.com>
        
        PR middle-end/49139
index ff1041ba493bc182914267de9202638dd5afecf7..90053e4ceceda8c8a3aec7b9dbae5a3ab959688f 100644 (file)
@@ -318,8 +318,10 @@ can_inline_edge_p (struct cgraph_edge *e, bool report)
                             ? callee_tree
                             : optimization_default_node);
 
-      if ((caller_opt->x_optimize > callee_opt->x_optimize)
-         || (caller_opt->x_optimize_size != callee_opt->x_optimize_size))
+      if (((caller_opt->x_optimize > callee_opt->x_optimize)
+          || (caller_opt->x_optimize_size != callee_opt->x_optimize_size))
+         /* gcc.dg/pr43564.c.  Look at forced inline even in -O0.  */
+         && !DECL_DISREGARD_INLINE_LIMITS (e->callee->decl))
        {
           e->inline_failed = CIF_TARGET_OPTIMIZATION_MISMATCH;
          inlinable = false;