Commit 32341663 by Jason Merrill Committed by Jason Merrill

* decl.c (declare_global_var): Set DECL_CONTEXT.

From-SVN: r250786
parent 636730ca
2017-07-31 Jason Merrill <jason@redhat.com>
* decl.c (declare_global_var): Set DECL_CONTEXT.
2017-07-31 Jan Hubicka <hubicka@ucw.cz> 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
Martin Liska <mliska@suse.cz> Martin Liska <mliska@suse.cz>
......
...@@ -7583,6 +7583,7 @@ declare_global_var (tree name, tree type) ...@@ -7583,6 +7583,7 @@ declare_global_var (tree name, tree type)
TREE_PUBLIC (decl) = 1; TREE_PUBLIC (decl) = 1;
DECL_EXTERNAL (decl) = 1; DECL_EXTERNAL (decl) = 1;
DECL_ARTIFICIAL (decl) = 1; DECL_ARTIFICIAL (decl) = 1;
DECL_CONTEXT (decl) = FROB_CONTEXT (global_namespace);
/* If the user has explicitly declared this variable (perhaps /* If the user has explicitly declared this variable (perhaps
because the code we are compiling is part of a low-level runtime because the code we are compiling is part of a low-level runtime
library), then it is possible that our declaration will be merged library), then it is possible that our declaration will be merged
......
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