Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 384276 Details for
Bug 516692
media-tv/mythtv-0.27.1_p20140527 - .../work/mythtv-0.27.1/mythtv/programs/mythavtest/../../libs/libmythtv/videooutbase.h:199: undefined reference to `VideoBuffers::StartDisplayingFrame()'
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
gcc patch
61659-49.patch (text/plain), 6.49 KB, created by
octoploid
on 2014-09-06 06:44:27 UTC
(
hide
)
Description:
gcc patch
Filename:
MIME Type:
Creator:
octoploid
Created:
2014-09-06 06:44:27 UTC
Size:
6.49 KB
patch
obsolete
>commit 9046cef9abb67e8b5c39079d565752fb59c3abf1 >Author: Jason Merrill <jason@redhat.com> >Date: Tue Jul 29 17:28:44 2014 -0400 > > PR lto/53808 > PR c++/61659 > * pt.c (push_template_decl_real): Set DECL_COMDAT on templates. > (check_explicit_specialization): Clear it on specializations. > * decl.c (duplicate_decls, start_decl): Likewise. > (grokmethod, grokfndecl): Set DECL_COMDAT on inlines. > * method.c (implicitly_declare_fn): Set DECL_COMDAT. Determine > linkage after setting the appropriate flags. > * tree.c (decl_linkage): Don't check DECL_COMDAT. > * decl2.c (mark_needed): Mark clones. > (import_export_decl): Not here. > >diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c >index 1f3a552..cfdb08d 100644 >--- a/gcc/cp/decl.c >+++ b/gcc/cp/decl.c >@@ -2185,6 +2185,7 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) > olddecl); > > SET_DECL_TEMPLATE_SPECIALIZATION (olddecl); >+ DECL_COMDAT (newdecl) = DECL_DECLARED_INLINE_P (newdecl); > > /* Don't propagate visibility from the template to the > specialization here. We'll do that in determine_visibility if >@@ -4638,6 +4639,8 @@ start_decl (const cp_declarator *declarator, > if (DECL_LANG_SPECIFIC (decl) && DECL_USE_TEMPLATE (decl)) > { > SET_DECL_TEMPLATE_SPECIALIZATION (decl); >+ if (TREE_CODE (decl) == FUNCTION_DECL) >+ DECL_COMDAT (decl) = DECL_DECLARED_INLINE_P (decl); > > /* [temp.expl.spec] An explicit specialization of a static data > member of a template is a definition if the declaration >@@ -7602,7 +7605,10 @@ grokfndecl (tree ctype, > > /* If the declaration was declared inline, mark it as such. */ > if (inlinep) >- DECL_DECLARED_INLINE_P (decl) = 1; >+ { >+ DECL_DECLARED_INLINE_P (decl) = 1; >+ DECL_COMDAT (decl) = 1; >+ } > if (inlinep & 2) > DECL_DECLARED_CONSTEXPR_P (decl) = true; > >@@ -14147,6 +14153,7 @@ grokmethod (cp_decl_specifier_seq *declspecs, > > check_template_shadow (fndecl); > >+ DECL_COMDAT (fndecl) = 1; > DECL_DECLARED_INLINE_P (fndecl) = 1; > DECL_NO_INLINE_WARNING_P (fndecl) = 1; > >diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c >index 77ab5fb..944b5ee 100644 >--- a/gcc/cp/decl2.c >+++ b/gcc/cp/decl2.c >@@ -1896,6 +1896,12 @@ mark_needed (tree decl) > definition. */ > struct cgraph_node *node = cgraph_get_create_node (decl); > node->forced_by_abi = true; >+ >+ /* #pragma interface and -frepo code can call mark_needed for >+ maybe-in-charge 'tors; mark the clones as well. */ >+ tree clone; >+ FOR_EACH_CLONE (clone, decl) >+ mark_needed (clone); > } > else if (TREE_CODE (decl) == VAR_DECL) > { >@@ -2683,17 +2689,7 @@ import_export_decl (tree decl) > { > /* The repository indicates that this entity should be defined > here. Make sure the back end honors that request. */ >- if (VAR_P (decl)) >- mark_needed (decl); >- else if (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P (decl) >- || DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P (decl)) >- { >- tree clone; >- FOR_EACH_CLONE (clone, decl) >- mark_needed (clone); >- } >- else >- mark_needed (decl); >+ mark_needed (decl); > /* Output the definition as an ordinary strong definition. */ > DECL_EXTERNAL (decl) = 0; > DECL_INTERFACE_KNOWN (decl) = 1; >diff --git a/gcc/cp/method.c b/gcc/cp/method.c >index 11bff7f..ebecaea 100644 >--- a/gcc/cp/method.c >+++ b/gcc/cp/method.c >@@ -1760,8 +1760,6 @@ implicitly_declare_fn (special_function_kind kind, tree type, > DECL_ARGUMENTS (fn) = this_parm; > > grokclassfn (type, fn, kind == sfk_destructor ? DTOR_FLAG : NO_SPECIAL); >- set_linkage_according_to_type (type, fn); >- rest_of_decl_compilation (fn, toplevel_bindings_p (), at_eof); > DECL_IN_AGGR_P (fn) = 1; > DECL_ARTIFICIAL (fn) = 1; > DECL_DEFAULTED_FN (fn) = 1; >@@ -1773,6 +1771,9 @@ implicitly_declare_fn (special_function_kind kind, tree type, > DECL_EXTERNAL (fn) = true; > DECL_NOT_REALLY_EXTERN (fn) = 1; > DECL_DECLARED_INLINE_P (fn) = 1; >+ DECL_COMDAT (fn) = 1; >+ set_linkage_according_to_type (type, fn); >+ rest_of_decl_compilation (fn, toplevel_bindings_p (), at_eof); > gcc_assert (!TREE_USED (fn)); > > /* Restore PROCESSING_TEMPLATE_DECL. */ >diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c >index 3296fda..8821d5d 100644 >--- a/gcc/cp/pt.c >+++ b/gcc/cp/pt.c >@@ -2783,6 +2783,9 @@ check_explicit_specialization (tree declarator, > It's just the name of an instantiation. But, it's not > a request for an instantiation, either. */ > SET_DECL_IMPLICIT_INSTANTIATION (decl); >+ else >+ /* A specialization is not necessarily COMDAT. */ >+ DECL_COMDAT (decl) = DECL_DECLARED_INLINE_P (decl); > > /* Register this specialization so that we can find it > again. */ >@@ -5025,6 +5028,14 @@ template arguments to %qD do not match original template %qD", > DECL_TEMPLATE_INFO (decl) = info; > } > >+ if (flag_implicit_templates >+ && !is_friend >+ && TREE_CODE (decl) == FUNCTION_DECL) >+ /* Set DECL_COMDAT on template instantiations; if we force >+ them to be emitted by explicit instantiation or -frepo, >+ mark_needed will tell cgraph to do the right thing. */ >+ DECL_COMDAT (decl) = true; >+ > return DECL_TEMPLATE_RESULT (tmpl); > } > >diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c >index 2820ba0..7763e8a 100644 >--- a/gcc/cp/tree.c >+++ b/gcc/cp/tree.c >@@ -3716,23 +3716,15 @@ decl_linkage (tree decl) > if (TREE_CODE (decl) == CONST_DECL) > return decl_linkage (TYPE_NAME (DECL_CONTEXT (decl))); > >- /* Some things that are not TREE_PUBLIC have external linkage, too. >- For example, on targets that don't have weak symbols, we make all >- template instantiations have internal linkage (in the object >- file), but the symbols should still be treated as having external >- linkage from the point of view of the language. */ >- if (VAR_OR_FUNCTION_DECL_P (decl) >- && DECL_COMDAT (decl)) >- return lk_external; >- > /* Things in local scope do not have linkage, if they don't have > TREE_PUBLIC set. */ > if (decl_function_context (decl)) > return lk_none; > > /* Members of the anonymous namespace also have TREE_PUBLIC unset, but >- are considered to have external linkage for language purposes. DECLs >- really meant to have internal linkage have DECL_THIS_STATIC set. */ >+ are considered to have external linkage for language purposes, as do >+ template instantiations on targets without weak symbols. DECLs really >+ meant to have internal linkage have DECL_THIS_STATIC set. */ > if (TREE_CODE (decl) == TYPE_DECL) > return lk_external; > if (VAR_OR_FUNCTION_DECL_P (decl))
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 516692
:
380444
|
380446
| 384276 |
388430
|
388546