Commit 6957a6f6 by Zhouyi Zhou Committed by Richard Biener

cif-code.def (OVERWRITABLE): Correct the comment for overwritable function.

2013-04-10  Zhouyi Zhou <yizhouzhou@ict.ac.cn>

	* cif-code.def (OVERWRITABLE): Correct the comment for overwritable
	function.
	* ipa-inline.c (can_inline_edge_p): Let dump mechanism report the
	inline fail caused by overwritable functions.

	* gcc.dg/tree-ssa/inline-11.c: New test

From-SVN: r197667
parent 34ab4a5b
2013-04-10 Zhouyi Zhou <yizhouzhou@ict.ac.cn>
* cif-code.def (OVERWRITABLE): Correct the comment for overwritable
function.
* ipa-inline.c (can_inline_edge_p): Let dump mechanism report the
inline fail caused by overwritable functions.
2013-04-10 Chung-Ju Wu <jasonwucj@gmail.com> 2013-04-10 Chung-Ju Wu <jasonwucj@gmail.com>
* combine.c (simplify_compare_const): Use GET_MODE_MASK to filter out * combine.c (simplify_compare_const): Use GET_MODE_MASK to filter out
......
...@@ -48,7 +48,7 @@ DEFCIFCODE(REDEFINED_EXTERN_INLINE, ...@@ -48,7 +48,7 @@ DEFCIFCODE(REDEFINED_EXTERN_INLINE,
/* Function is not inlinable. */ /* Function is not inlinable. */
DEFCIFCODE(FUNCTION_NOT_INLINABLE, N_("function not inlinable")) DEFCIFCODE(FUNCTION_NOT_INLINABLE, N_("function not inlinable"))
/* Function is not overwritable. */ /* Function is overwritable. */
DEFCIFCODE(OVERWRITABLE, N_("function body can be overwritten at link time")) DEFCIFCODE(OVERWRITABLE, N_("function body can be overwritten at link time"))
/* Function is not an inlining candidate. */ /* Function is not an inlining candidate. */
......
...@@ -266,7 +266,7 @@ can_inline_edge_p (struct cgraph_edge *e, bool report) ...@@ -266,7 +266,7 @@ can_inline_edge_p (struct cgraph_edge *e, bool report)
else if (avail <= AVAIL_OVERWRITABLE) else if (avail <= AVAIL_OVERWRITABLE)
{ {
e->inline_failed = CIF_OVERWRITABLE; e->inline_failed = CIF_OVERWRITABLE;
return false; inlinable = false;
} }
else if (e->call_stmt_cannot_inline_p) else if (e->call_stmt_cannot_inline_p)
{ {
......
2013-04-10 Zhouyi Zhou <yizhouzhou@ict.ac.cn>
* gcc.dg/tree-ssa/inline-11.c: New test
2013-04-10 Jakub Jelinek <jakub@redhat.com> 2013-04-10 Jakub Jelinek <jakub@redhat.com>
PR c++/56895 PR c++/56895
......
/* { dg-do compile } */
/* { dg-require-weak "" } */
/* { dg-options "-O2 -fdump-tree-einline" } */
int w;
int bar (void) __attribute__ ((weak));
int bar (){
w++;
}
void foo()
{
bar();
}
/* { dg-final { scan-tree-dump-times "function body can be overwritten at link time" 1 "einline" } } */
/* { dg-final { cleanup-tree-dump "einline" } } */
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