From 02a362d9826f4ea8868e7e56ac145a523823022e Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Wed, 20 Nov 2002 10:37:08 +0000 Subject: [PATCH] re PR c/8518 (ICE when compiling mplayer) PR c/8518 * c-decl.c (duplicate_decls): Outline the second definition of an extern inline function in all cases. From-SVN: r59302 --- gcc/ChangeLog | 6 ++++++ gcc/c-decl.c | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b6443830759..189c310efd0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2002-11-20  Eric Botcazou   + + PR c/8518 + * c-decl.c (duplicate_decls): Outline the second definition + of an extern inline function in all cases. + 2002-11-20 Richard Sandiford * stor-layout.c (place_field): Update rli->offset as well as diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 9c3b58fc78f..5b078c0cde5 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -1474,9 +1474,10 @@ duplicate_decls (newdecl, olddecl, different_binding_level) inline, make sure we emit debug info for the inline before we throw it away, in case it was inlined into a function that hasn't been written out yet. */ - if (new_is_definition && DECL_INITIAL (olddecl) && TREE_USED (olddecl)) + if (new_is_definition && DECL_INITIAL (olddecl)) { - (*debug_hooks->outlining_inline_function) (olddecl); + if (TREE_USED (olddecl)) + (*debug_hooks->outlining_inline_function) (olddecl); /* The new defn must not be inline. */ DECL_INLINE (newdecl) = 0; -- 2.30.2