summaryrefslogtreecommitdiff
path: root/gcc/lto-streamer-out.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2011-01-12 15:01:09 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2011-01-12 15:01:09 +0000
commit30eff8736e5ac48629886b334a4821fddd13e1d6 (patch)
treead5c376095525a5ec7e80f68d14a2edf3f97b33a /gcc/lto-streamer-out.c
parentdeb14f24f54a7cdc7025362667ed3a3821ddc7d0 (diff)
downloadgcc-30eff8736e5ac48629886b334a4821fddd13e1d6.tar.gz
2011-01-12 Richard Guenther <rguenther@suse.de>
PR lto/47259 * lto-streamer-out.c (output_gimple_stmt): Do not wrap register variables in a MEM_REF. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168713 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto-streamer-out.c')
-rw-r--r--gcc/lto-streamer-out.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c
index 7c0029334fd..e471d70bbcd 100644
--- a/gcc/lto-streamer-out.c
+++ b/gcc/lto-streamer-out.c
@@ -1769,7 +1769,8 @@ output_gimple_stmt (struct output_block *ob, gimple stmt)
while (handled_component_p (*basep))
basep = &TREE_OPERAND (*basep, 0);
if (TREE_CODE (*basep) == VAR_DECL
- && !auto_var_in_fn_p (*basep, current_function_decl))
+ && !auto_var_in_fn_p (*basep, current_function_decl)
+ && !DECL_REGISTER (*basep))
{
bool volatilep = TREE_THIS_VOLATILE (*basep);
*basep = build2 (MEM_REF, TREE_TYPE (*basep),