Commit 7cbda518 by Richard Biener Committed by Richard Biener

re PR lto/56297 (LTO: multiple definition error with global register variables)

2013-02-12  Richard Biener  <rguenther@suse.de>

	PR lto/56297
	* lto-streamer-out.c (write_symbol): Do not output symbols
	for hard register variables.

	* gcc.dg/lto/pr56297_0.c: New testcase.
	* gcc.dg/lto/pr56297_0.c: Likewise.

From-SVN: r195979
parent e68a4ef6
2013-02-12 Richard Biener <rguenther@suse.de>
PR lto/56297
* lto-streamer-out.c (write_symbol): Do not output symbols
for hard register variables.
2013-02-12 Georg-Johann Lay <avr@gjlay.de>
PR target/54222
......
......@@ -1166,7 +1166,8 @@ write_symbol (struct streamer_tree_cache_d *cache,
if (!TREE_PUBLIC (t)
|| is_builtin_fn (t)
|| DECL_ABSTRACT (t)
|| TREE_CODE (t) == RESULT_DECL)
|| TREE_CODE (t) == RESULT_DECL
|| (TREE_CODE (t) == VAR_DECL && DECL_HARD_REGISTER (t)))
return;
gcc_assert (TREE_CODE (t) == VAR_DECL
......
2013-02-12 Richard Biener <rguenther@suse.de>
PR lto/56297
* gcc.dg/lto/pr56297_0.c: New testcase.
* gcc.dg/lto/pr56297_0.c: Likewise.
2013-02-12 Janus Weil <janus@gcc.gnu.org>
PR fortran/46952
......
/* { dg-lto-do link } */
/* { dg-lto-options { { -flto -fno-common } } } */
#if __x86_64__ || __i386__
register int i asm("esp");
#else
extern int i;
#endif
int main(void)
{
return i;
}
#if __x86_64__ || __i386__
register int i asm("esp");
#else
int i;
#endif
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