+2011-03-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/48063
+ * ipa-inline.c (cgraph_decide_inlining): Don't try to
+ inline functions called once if !tree_can_inline_p (node->callers).
+
2011-03-11 Chen Liqin <liqin.gcc@gmail.com>
* config.gcc (score-*-elf): Add extra_parts .., update tmake_file and
/* Inlining decision heuristics.
- Copyright (C) 2003, 2004, 2007, 2008, 2009, 2010
+ Copyright (C) 2003, 2004, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
Contributed by Jan Hubicka
&& node->callers->caller != node
&& node->callers->caller->global.inlined_to != node
&& !node->callers->call_stmt_cannot_inline_p
+ && tree_can_inline_p (node->callers)
&& !DECL_EXTERNAL (node->decl))
{
cgraph_inline_failed_t reason;
+2011-03-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/48063
+ * gcc.dg/torture/pr48063.c: New test.
+
2011-03-10 Jason Merrill <jason@redhat.com>
* g++.dg/template/array22.C: New.
--- /dev/null
+/* PR tree-optimization/48063 */
+/* { dg-do compile } */
+/* { dg-options "-fno-early-inlining" } */
+
+extern void abort (void);
+static void bar ();
+
+void
+foo ()
+{
+ bar (1);
+}
+
+static void
+bar (double i)
+{
+ if (i)
+ abort ();
+}