mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-19 05:10:25 +08:00
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
This commit is contained in:
parent
c8d3e15a95
commit
5820359990
@ -1,3 +1,10 @@
|
||||
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);
|
||||
|
||||
|
@ -1,3 +1,10 @@
|
||||
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
|
||||
|
4
gcc/testsuite/gcc.c-torture/compile/20050215-1.c
Normal file
4
gcc/testsuite/gcc.c-torture/compile/20050215-1.c
Normal file
@ -0,0 +1,4 @@
|
||||
/* PR tree-optimization/18947 */
|
||||
extern __inline void f1 (void) { }
|
||||
extern __inline void f2 (void) { f1 (); }
|
||||
void f2 (void) {}
|
7
gcc/testsuite/gcc.c-torture/compile/20050215-2.c
Normal file
7
gcc/testsuite/gcc.c-torture/compile/20050215-2.c
Normal file
@ -0,0 +1,7 @@
|
||||
/* 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 (); }
|
8
gcc/testsuite/gcc.c-torture/compile/20050215-3.c
Normal file
8
gcc/testsuite/gcc.c-torture/compile/20050215-3.c
Normal file
@ -0,0 +1,8 @@
|
||||
/* 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 (); }
|
Loading…
x
Reference in New Issue
Block a user