re PR go/64238 (ICE in get_partitioning_class, at symtab.c:1775)

PR go/64238
	* go-gcc.cc (Gcc_backend::implicit_variable_reference): Set
	DECL_EXTERNAL, clear TREE_STATIC.

From-SVN: r247938
This commit is contained in:
Ian Lance Taylor 2017-05-11 23:53:13 +00:00 committed by Ian Lance Taylor
parent d6a47f47f0
commit f6a7a2a27b
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2017-05-11 Ian Lance Taylor <iant@google.com>
PR go/64238
* go-gcc.cc (Gcc_backend::implicit_variable_reference): Set
DECL_EXTERNAL, clear TREE_STATIC.
2017-05-02 Release Manager
* GCC 7.1.0 released.

View File

@ -2811,9 +2811,9 @@ Gcc_backend::implicit_variable_reference(const std::string& name,
tree decl = build_decl(BUILTINS_LOCATION, VAR_DECL,
get_identifier_from_string(name), type_tree);
DECL_EXTERNAL(decl) = 0;
DECL_EXTERNAL(decl) = 1;
TREE_PUBLIC(decl) = 1;
TREE_STATIC(decl) = 1;
TREE_STATIC(decl) = 0;
DECL_ARTIFICIAL(decl) = 1;
if (! asm_name.empty())
SET_DECL_ASSEMBLER_NAME(decl, get_identifier_from_string(asm_name));