+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
/* 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. */
else if (avail <= AVAIL_OVERWRITABLE)
{
e->inline_failed = CIF_OVERWRITABLE;
- return false;
+ inlinable = false;
}
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>
PR c++/56895
--- /dev/null
+/* { 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" } } */