re PR c/8518 (ICE when compiling mplayer)
authorEric Botcazou <ebotcazou@libertysurf.fr>
Wed, 20 Nov 2002 10:37:08 +0000 (10:37 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Wed, 20 Nov 2002 10:37:08 +0000 (10:37 +0000)
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
gcc/c-decl.c

index b644383075916a58cc2951e3aae5a39d0a55f222..189c310efd093f3708c15b234ede6fd506fcdf37 100644 (file)
@@ -1,3 +1,9 @@
+2002-11-20  Eric Botcazou  <ebotcazou@libertysurf.fr>
+
+       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  <rsandifo@redhat.com>
 
        * stor-layout.c (place_field): Update rli->offset as well as
index 9c3b58fc78fa48e674950ceb93c0cd8095377ce2..5b078c0cde526ec2d52680418a2af7b85c9fe948 100644 (file)
@@ -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;