mirror of
https://gcc.gnu.org/git/gcc.git
synced 2025-01-21 11:54:28 +08:00
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:
parent
34ab4a5b70
commit
6957a6f6f9
@ -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
|
||||
|
@ -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. */
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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
|
||||
|
14
gcc/testsuite/gcc.dg/tree-ssa/inline-11.c
Normal file
14
gcc/testsuite/gcc.dg/tree-ssa/inline-11.c
Normal 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" } } */
|
Loading…
Reference in New Issue
Block a user