2011-01-12 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 12 Jan 2011 15:01:09 +0000 (15:01 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 12 Jan 2011 15:01:09 +0000 (15:01 +0000)
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

gcc/ChangeLog
gcc/lto-streamer-out.c

index 7181f96..4724df2 100644 (file)
@@ -1,3 +1,9 @@
+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.
+
 2011-01-12  Joseph Myers  <joseph@codesourcery.com>
 
        * config.gcc (arm*-*-linux*, bfin*-uclinux*, bfin*-linux-uclibc*,
index 7c00293..e471d70 100644 (file)
@@ -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),