PR c++/6352
* toplev.c (rest_of_compilation): Do not defer functions for which
TREE_SYMBOL_REFERENCED has already been set.
* PR6352
* g++.dg/opt/inline2.C: New test.
From-SVN: r52521
+2002-04-19 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/6352
+ * toplev.c (rest_of_compilation): Do not defer functions for which
+ TREE_SYMBOL_REFERENCED has already been set.
+
Fri Apr 19 15:53:03 CEST 2002 Jan Hubicka <jh@suse.cz>
* i386.md (movsi_1, movhi_1): Force reload to use more flexible
+2002-04-19 Mark Mitchell <mark@codesourcery.com>
+
+ * PR6352
+ * g++.dg/opt/inline2.C: New test.
+
2002-04-18 Richard Henderson <rth@redhat.com>
* gcc.dg/20000906-1.c: Enable for all targets.
--- /dev/null
+// { dg-do link }
+// { dg-options "-O1 -finline-functions" }
+
+static void g ();
+
+void f()
+{
+ void g();
+ g();
+}
+
+void g()
+{
+}
+
+int main () {
+ f ();
+}
if (inlinable
|| (DECL_INLINE (decl)
&& ((! TREE_PUBLIC (decl) && ! TREE_ADDRESSABLE (decl)
+ && ! TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl))
&& ! flag_keep_inline_functions)
|| DECL_EXTERNAL (decl))))
DECL_DEFER_OUTPUT (decl) = 1;