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
This commit is contained in:
Zhouyi Zhou 2013-04-10 09:22:04 +00:00 committed by Richard Biener
parent 34ab4a5b70
commit 6957a6f6f9
5 changed files with 27 additions and 2 deletions

View File

@ -1,3 +1,10 @@
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>
* combine.c (simplify_compare_const): Use GET_MODE_MASK to filter out

View File

@ -48,7 +48,7 @@ DEFCIFCODE(REDEFINED_EXTERN_INLINE,
/* Function is 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"))
/* Function is not an inlining candidate. */

View File

@ -266,7 +266,7 @@ can_inline_edge_p (struct cgraph_edge *e, bool report)
else if (avail <= AVAIL_OVERWRITABLE)
{
e->inline_failed = CIF_OVERWRITABLE;
return false;
inlinable = false;
}
else if (e->call_stmt_cannot_inline_p)
{

View File

@ -1,3 +1,7 @@
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>
PR c++/56895

View File

@ -0,0 +1,14 @@
/* { 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" } } */