Commit 50926624 by Nathan Froyd Committed by Nathan Froyd

re PR middle-end/25446 (-fpic/-fPIC failure in gcc.dg/vect/vect-ifcvt-9.c)

	PR middle-end/25446
	* c-objc-common.c (c_cannot_inline_tree_fn): Check for an
	always_inline attribute on the function decl.

From-SVN: r127163
parent d236f595
2007-08-02 Nathan Froyd <froydnj@codesourcery.com> 2007-08-02 Nathan Froyd <froydnj@codesourcery.com>
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 <froydnj@codesourcery.com>
PR middle-end/25445 PR middle-end/25445
* varasm.c (default_binds_local_p_1): Consult flag_whole_program * varasm.c (default_binds_local_p_1): Consult flag_whole_program
if we are compiling with -fPIC. if we are compiling with -fPIC.
......
...@@ -72,9 +72,9 @@ c_cannot_inline_tree_fn (tree *fnp) ...@@ -72,9 +72,9 @@ c_cannot_inline_tree_fn (tree *fnp)
&& DECL_INLINE (fn) && DECL_INLINE (fn)
&& DECL_DECLARED_INLINE_P (fn) && DECL_DECLARED_INLINE_P (fn)
&& !DECL_IN_SYSTEM_HEADER (fn)); && !DECL_IN_SYSTEM_HEADER (fn));
tree always_inline = lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn));
if (flag_really_no_inline if (flag_really_no_inline && always_inline == NULL)
&& lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn)) == NULL)
{ {
if (do_warning) if (do_warning)
warning (OPT_Winline, "function %q+F can never be inlined because it " warning (OPT_Winline, "function %q+F can never be inlined because it "
...@@ -84,7 +84,9 @@ c_cannot_inline_tree_fn (tree *fnp) ...@@ -84,7 +84,9 @@ c_cannot_inline_tree_fn (tree *fnp)
/* Don't auto-inline anything that might not be bound within /* Don't auto-inline anything that might not be bound within
this unit of translation. */ 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) if (do_warning)
warning (OPT_Winline, "function %q+F can never be inlined because it " warning (OPT_Winline, "function %q+F can never be inlined because it "
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment