Commit 3b95b65c by Jason Merrill Committed by Jason Merrill

re PR c++/64898 (qtgui-4.8.6 build error)

	PR c++/64898
	* mangle.c (write_mangled_name): Fix test for variable template
	instantiation.

From-SVN: r220666
parent 8ae6ac51
2015-02-12 Jason Merrill <jason@redhat.com> 2015-02-12 Jason Merrill <jason@redhat.com>
PR c++/64898
* mangle.c (write_mangled_name): Fix test for variable template
instantiation.
* decl.c (begin_destructor_body): Condition clobber on * decl.c (begin_destructor_body): Condition clobber on
-flifetime-dse. -flifetime-dse.
......
...@@ -682,7 +682,8 @@ write_mangled_name (const tree decl, bool top_level) ...@@ -682,7 +682,8 @@ write_mangled_name (const tree decl, bool top_level)
} }
else if (VAR_P (decl) else if (VAR_P (decl)
/* Variable template instantiations are mangled. */ /* Variable template instantiations are mangled. */
&& !(DECL_LANG_SPECIFIC (decl) && DECL_TEMPLATE_INFO (decl)) && !(DECL_LANG_SPECIFIC (decl) && DECL_TEMPLATE_INFO (decl)
&& variable_template_p (DECL_TI_TEMPLATE (decl)))
/* The names of non-static global variables aren't mangled. */ /* The names of non-static global variables aren't mangled. */
&& DECL_EXTERNAL_LINKAGE_P (decl) && DECL_EXTERNAL_LINKAGE_P (decl)
&& (CP_DECL_CONTEXT (decl) == global_namespace && (CP_DECL_CONTEXT (decl) == global_namespace
......
// PR c++/64898
// { dg-final { scan-assembler-not "_Z6foovar" } }
template <class> void f()
{
extern int foovar;
foovar = 42;
}
int main()
{
f<int>();
}
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