From 4b583c4361025855c6da28b5366f81b4220b873e Mon Sep 17 00:00:00 2001 From: Christian Bruel Date: Tue, 21 Jun 2011 08:45:05 +0200 Subject: [PATCH] PR middle-end/49139 PR other/43564 make sure the inline function is inlined From-SVN: r175241 --- gcc/ChangeLog | 5 +++++ gcc/ipa-inline.c | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1c9dced03ca..235d40959ea 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-06-21 Christian Bruel + + PR other/43564 + * ipa-inline.c (can_inline_edge_p): Check !DECL_DISREGARD_INLINE_LIMITS. + 2011-06-21 Christian Bruel PR middle-end/49139 diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index ff1041ba493..90053e4cece 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -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; -- 2.30.2