OSDN Git Service

2010-04-12 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 12 Apr 2010 09:52:50 +0000 (09:52 +0000)
committerMasaki Muranaka <monaka@monami-software.com>
Sun, 23 May 2010 00:56:04 +0000 (09:56 +0900)
PR c++/43611
* semantics.c (expand_or_defer_fn_1): Do not keep extern
template inline functions.

* g++.dg/torture/pr43611.C: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158218 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/semantics.c
gcc/testsuite/ChangeLog

index c40e368..e56c77c 100644 (file)
@@ -1,3 +1,9 @@
+2010-04-12  Richard Guenther  <rguenther@suse.de>
+
+       PR c++/43611
+       * semantics.c (expand_or_defer_fn_1): Do not keep extern
+       template inline functions.
+
 2010-04-09  Manuel López-Ibáñez  <manu@gcc.gnu.org>
 
        PR c++/28584
index d425402..66d152d 100644 (file)
@@ -3446,7 +3446,9 @@ expand_or_defer_fn_1 (tree fn)
         this function as needed so that finish_file will make sure to
         output it later.  Similarly, all dllexport'd functions must
         be emitted; there may be callers in other DLLs.  */
-      if ((flag_keep_inline_functions && DECL_DECLARED_INLINE_P (fn))
+      if ((flag_keep_inline_functions
+          && DECL_DECLARED_INLINE_P (fn)
+          && !DECL_REALLY_EXTERN (fn))
          || lookup_attribute ("dllexport", DECL_ATTRIBUTES (fn)))
        mark_needed (fn);
     }
index d5cddd4..547ea32 100644 (file)
@@ -1,3 +1,8 @@
+2010-04-12  Richard Guenther  <rguenther@suse.de>
+
+       PR c++/43611
+       * g++.dg/torture/pr43611.C: New testcase.
+
 2010-04-12  Shujing Zhao  <pearly.zhao@oracle.com>
 
        PR c/36774