diff options
author | Jason Merrill <jason@redhat.com> | 2011-07-06 22:58:33 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2011-07-06 22:58:33 -0400 |
commit | ffca9d534c9e8cca5aa1eee5ce28d9960b6d1179 (patch) | |
tree | 1cdb92a5ea5f72d14eda486174d45c6d6b09b58b | |
parent | 33319c275fd61b173a594d63ddb82c466512053a (diff) | |
download | gcc-ffca9d534c9e8cca5aa1eee5ce28d9960b6d1179.zip gcc-ffca9d534c9e8cca5aa1eee5ce28d9960b6d1179.tar.gz gcc-ffca9d534c9e8cca5aa1eee5ce28d9960b6d1179.tar.bz2 |
re PR c++/49353 (C++ frontend should not declare function EXTERN when it forces them to stay)
PR c++/49353
* semantics.c (expand_or_defer_fn_1): Clear DECL_EXTERNAL
on kept inlines.
From-SVN: r175954
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/semantics.c | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 8a25c89..3957d5a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,9 @@ 2011-07-06 Jason Merrill <jason@redhat.com> + PR c++/49353 + * semantics.c (expand_or_defer_fn_1): Clear DECL_EXTERNAL + on kept inlines. + PR c++/49568 * method.c (make_thunk, use_thunk): Copy DECL_COMDAT. diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index fa22bc9..5c53a18 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -3633,7 +3633,10 @@ expand_or_defer_fn_1 (tree fn) && !DECL_REALLY_EXTERN (fn)) || (flag_keep_inline_dllexport && lookup_attribute ("dllexport", DECL_ATTRIBUTES (fn)))) - mark_needed (fn); + { + mark_needed (fn); + DECL_EXTERNAL (fn) = 0; + } } /* There's no reason to do any of the work here if we're only doing |