diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-01-03 09:45:18 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-01-03 09:45:18 +0000 |
commit | 5b777cea3aba0269975fdcc8816b07494d5b9f63 (patch) | |
tree | c1f88d0ad74b9b4a4944189528e7f53b4bc11bd0 /gcc/lto-symtab.c | |
parent | 1f3894c9e015df0b00d053f47b142dd411969d35 (diff) | |
download | gcc-5b777cea3aba0269975fdcc8816b07494d5b9f63.tar.gz |
2013-01-03 Richard Biener <rguenther@suse.de>
PR lto/55848
* lto-symtab.c (lto_symtab_merge_decls_1): As last resort, always
prefer a built-in decl.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194839 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto-symtab.c')
-rw-r--r-- | gcc/lto-symtab.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/lto-symtab.c b/gcc/lto-symtab.c index 295fd37aa38..b6ff02807de 100644 --- a/gcc/lto-symtab.c +++ b/gcc/lto-symtab.c @@ -439,6 +439,16 @@ lto_symtab_merge_decls_1 (symtab_node first) && COMPLETE_TYPE_P (TREE_TYPE (e->symbol.decl))) prevailing = e; } + /* For variables prefer the builtin if one is available. */ + else if (TREE_CODE (prevailing->symbol.decl) == FUNCTION_DECL) + { + for (e = first; e; e = e->symbol.next_sharing_asm_name) + if (DECL_BUILT_IN (e->symbol.decl)) + { + prevailing = e; + break; + } + } } symtab_prevail_in_asm_name_hash (prevailing); |