diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e712c821949..95106b1cae1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2007-08-02 Nathan Froyd + + PR middle-end/25446 + * c-objc-common.c (c_cannot_inline_tree_fn): Check for an + always_inline attribute on the function decl. + 2007-08-02 Nathan Froyd PR middle-end/25445 diff --git a/gcc/c-objc-common.c b/gcc/c-objc-common.c index 226872e897e..9999840800a 100644 --- a/gcc/c-objc-common.c +++ b/gcc/c-objc-common.c @@ -72,9 +72,9 @@ c_cannot_inline_tree_fn (tree *fnp) && DECL_INLINE (fn) && DECL_DECLARED_INLINE_P (fn) && !DECL_IN_SYSTEM_HEADER (fn)); + tree always_inline = lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn)); - if (flag_really_no_inline - && lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn)) == NULL) + if (flag_really_no_inline && always_inline == NULL) { if (do_warning) warning (OPT_Winline, "function %q+F can never be inlined because it " @@ -84,7 +84,9 @@ c_cannot_inline_tree_fn (tree *fnp) /* Don't auto-inline anything that might not be bound within this unit of translation. */ - if (!DECL_DECLARED_INLINE_P (fn) && !targetm.binds_local_p (fn)) + if (always_inline == NULL + && !DECL_DECLARED_INLINE_P (fn) + && !targetm.binds_local_p (fn)) { if (do_warning) warning (OPT_Winline, "function %q+F can never be inlined because it "