Commit ce641308 by Tobias Burnus

lto/lto.c – used $ or . in generated linkptr name

	* lto.c (offload_handle_link_vars): Reduce chance of
	naming clashes of generated linkptr variable.
parent a3586eeb
2020-01-29 Tobias Burnus <tobias@codesourcery.com> 2020-01-29 Tobias Burnus <tobias@codesourcery.com>
* lto.c (offload_handle_link_vars): Reduce chance of
naming clashes of generated linkptr variable.
2020-01-29 Tobias Burnus <tobias@codesourcery.com>
PR middle-end/94233 PR middle-end/94233
* lto.c (offload_handle_link_vars): Cleanup; call * lto.c (offload_handle_link_vars): Cleanup; call
build_decl to ensure alignment is set. build_decl to ensure alignment is set.
......
...@@ -561,11 +561,9 @@ offload_handle_link_vars (void) ...@@ -561,11 +561,9 @@ offload_handle_link_vars (void)
DECL_ATTRIBUTES (var->decl))) DECL_ATTRIBUTES (var->decl)))
{ {
tree type = build_pointer_type (TREE_TYPE (var->decl)); tree type = build_pointer_type (TREE_TYPE (var->decl));
tree var_name = DECL_ASSEMBLER_NAME (var->decl);
char *new_name
= ACONCAT ((IDENTIFIER_POINTER (var_name), "_linkptr", NULL));
tree link_ptr_var = build_decl (UNKNOWN_LOCATION, VAR_DECL, tree link_ptr_var = build_decl (UNKNOWN_LOCATION, VAR_DECL,
get_identifier (new_name), type); clone_function_name (var->decl,
"linkptr"), type);
TREE_USED (link_ptr_var) = 1; TREE_USED (link_ptr_var) = 1;
TREE_STATIC (link_ptr_var) = 1; TREE_STATIC (link_ptr_var) = 1;
DECL_ARTIFICIAL (link_ptr_var) = 1; DECL_ARTIFICIAL (link_ptr_var) = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment