mirror of
https://github.com/gcc-mirror/gcc.git
synced 2024-11-21 13:40:47 +00:00
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
This commit is contained in:
parent
e68a4ef6ea
commit
7cbda5184c
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
13
gcc/testsuite/gcc.dg/lto/pr56297_0.c
Normal file
13
gcc/testsuite/gcc.dg/lto/pr56297_0.c
Normal file
@ -0,0 +1,13 @@
|
||||
/* { 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;
|
||||
}
|
5
gcc/testsuite/gcc.dg/lto/pr56297_1.c
Normal file
5
gcc/testsuite/gcc.dg/lto/pr56297_1.c
Normal file
@ -0,0 +1,5 @@
|
||||
#if __x86_64__ || __i386__
|
||||
register int i asm("esp");
|
||||
#else
|
||||
int i;
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user