* [patch]: Fix PR target/64212
@ 2015-02-25 15:42 Kai Tietz
2015-02-25 17:00 ` Kai Tietz
0 siblings, 1 reply; 2+ messages in thread
From: Kai Tietz @ 2015-02-25 15:42 UTC (permalink / raw)
To: GCC Patches; +Cc: Jeff Law, Jan Hubicka
Hi,
The issue here is a pe-coff target specific thing that
dllimported-symbols have an noninterposable, and an interposable part.
The dllimport address itself is not interposable, but its stubbing
function/var is.
So the hook binds_to_local has to return false for dllimport,
nevertheless for clones we want that they getting interposable.
Therefore - as suggested by Honza - we need to make explicit sure that
we set DECL_DLLIMPORT_P() explicit to 0 in symtab.
ChangeLog
2015-02-25 Kai Tietz <ktietz@redhat.com>
PR target/64212
* symtab.c (symtab::make_decl_local): Set DECL_IMPORT_P explicit to 0.
(symtab::noninterposable_alias): Likewise.
Tested for x86_64-w64-mingw32, i686-w64-mingw32, and
x86_64-unknown-linux-gnu. Ok for apply?
Regards,
Kai
Index: symtab.c
===================================================================
--- symtab.c (Revision 220969)
+++ symtab.c (Arbeitskopie)
@@ -1165,6 +1165,7 @@ symtab_node::make_decl_local (void)
DECL_VISIBILITY_SPECIFIED (decl) = 0;
DECL_VISIBILITY (decl) = VISIBILITY_DEFAULT;
TREE_PUBLIC (decl) = 0;
+ DECL_DLLIMPORT_P (decl) = 0;
if (!DECL_RTL_SET_P (decl))
return;
@@ -1534,7 +1535,6 @@ symtab_node::noninterposable_alias (symtab_node *n
!= flags_from_decl_or_type (fn->decl))
|| DECL_ATTRIBUTES (node->decl) != DECL_ATTRIBUTES (fn->decl))
return false;
-
*(symtab_node **)data = node;
return true;
}
@@ -1566,6 +1566,7 @@ symtab_node::noninterposable_alias (void)
/* Otherwise create a new one. */
new_decl = copy_node (node->decl);
+ DECL_DLLIMPORT_P (new_decl) = 0;
DECL_NAME (new_decl) = clone_function_name (node->decl, "localalias");
if (TREE_CODE (new_decl) == FUNCTION_DECL)
DECL_STRUCT_FUNCTION (new_decl) = NULL;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch]: Fix PR target/64212
2015-02-25 15:42 [patch]: Fix PR target/64212 Kai Tietz
@ 2015-02-25 17:00 ` Kai Tietz
0 siblings, 0 replies; 2+ messages in thread
From: Kai Tietz @ 2015-02-25 17:00 UTC (permalink / raw)
To: GCC Patches; +Cc: Jeff Law, Jan Hubicka
Applied at revision 22098 to trunk. Jan approved patch on IRC.
Regards,
Kai
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-02-25 16:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-25 15:42 [patch]: Fix PR target/64212 Kai Tietz
2015-02-25 17:00 ` Kai Tietz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).