PR middle-end/20635
* varasm.c (mark_decl_referenced): Do not mark extern inline functions
as needed.
* compile/gcc.c-torture/compile/
20050328-1.c: New testcase made
by Jakub Jelinek.
From-SVN: r97133
2005-03-28 Jan Hubicka <jh@suse.cz>
+ PR middle-end/20635
+ * varasm.c (mark_decl_referenced): Do not mark extern inline functions
+ as needed.
+
* tree-inline.c (estimate_num_insns_1): Use declaration to discover argument
types where possible.
+2005-03-28 Jan Hubicka <jh@suse.cz>
+
+ PR middle-end/20635
+ * compile/gcc.c-torture/compile/20050328-1.c: New testcase made
+ by Jakub Jelinek.
+
2005-03-27 Dorit Naishlos <dorit@il.ibm.com>
PR tree-optimization/20626
--- /dev/null
+void fn1 (void *);
+void fn2 (void *);
+void foo (void);
+void bar (void);
+
+extern inline void *
+baz (void)
+{
+ return 0;
+}
+
+void
+foo (void)
+{
+ fn1 (baz ());
+ fn2 (baz ());
+}
+
+void
+bar (void)
+{
+ fn1 (baz ());
+ fn2 (baz);
+}
mark_decl_referenced (tree decl)
{
if (TREE_CODE (decl) == FUNCTION_DECL)
- cgraph_mark_needed_node (cgraph_node (decl));
+ {
+ /* Extern inline functions don't become needed when referenced. */
+ if (!DECL_EXTERNAL (decl))
+ cgraph_mark_needed_node (cgraph_node (decl));
+ }
else if (TREE_CODE (decl) == VAR_DECL)
cgraph_varpool_mark_needed_node (cgraph_varpool_node (decl));
/* else do nothing - we can get various sorts of CST nodes here,