Commit 58203599 by Jakub Jelinek Committed by Jakub Jelinek

re PR tree-optimization/18947 ([non-UAAT] external inline and normal function of the same name)

	PR tree-optimization/18947
	* cgraphunit.c (cgraph_finalize_function): When redefining an extern
	inline, remove all nodes that are inlined into the extern inline
	being redefined.

	* gcc.c-torture/compile/20050215-1.c: New test.
	* gcc.c-torture/compile/20050215-2.c: New test.
	* gcc.c-torture/compile/20050215-3.c: New test.

From-SVN: r95207
parent c8d3e15a
2005-02-18 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/18947
* cgraphunit.c (cgraph_finalize_function): When redefining an extern
inline, remove all nodes that are inlined into the extern inline
being redefined.
2005-02-17 Kazu Hirata <kazu@cs.umass.edu>
* bt-load.c, cfgloop.c, convert.c, dominance.c, global.c,
......
......@@ -346,6 +346,16 @@ cgraph_finalize_function (tree decl, bool nested)
memset (&node->rtl, 0, sizeof (node->rtl));
node->analyzed = false;
node->local.redefined_extern_inline = true;
if (!flag_unit_at_a_time)
{
struct cgraph_node *n;
for (n = cgraph_nodes; n; n = n->next)
if (n->global.inlined_to == node)
cgraph_remove_node (n);
}
while (node->callees)
cgraph_remove_edge (node->callees);
......
2005-02-18 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/18947
* gcc.c-torture/compile/20050215-1.c: New test.
* gcc.c-torture/compile/20050215-2.c: New test.
* gcc.c-torture/compile/20050215-3.c: New test.
2005-02-17 Alexandre Oliva <aoliva@redhat.com>
PR c++/20028
......
/* PR tree-optimization/18947 */
extern __inline void f1 (void) { }
extern __inline void f2 (void) { f1 (); }
void f2 (void) {}
/* PR tree-optimization/18947 */
int v;
extern __inline void f1 (void) { v++; }
void f4 (void) { f1 (); }
extern __inline void f2 (void) { f1 (); }
void f3 (void) { f2 (); }
void f2 (void) { f1 (); }
/* PR tree-optimization/18947 */
int v;
extern __inline void f0 (void) { v++; }
extern __inline void f1 (void) { f0 (); }
void f4 (void) { f1 (); }
extern __inline void f2 (void) { f1 (); }
void f3 (void) { f2 (); }
void f2 (void) { f1 (); }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment