This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix PR47259
- From: Richard Guenther <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 12 Jan 2011 15:57:14 +0100 (CET)
- Subject: [PATCH] Fix PR47259
This fixes PR47259 - we shouldn't wrap global register vars inside
MEM_REFs.
Bootstrapped and tested on x86_64-unkown-linux-gnu, applied to trunk.
Richard.
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.
Index: gcc/lto-streamer-out.c
===================================================================
*** gcc/lto-streamer-out.c (revision 168707)
--- gcc/lto-streamer-out.c (working copy)
*************** output_gimple_stmt (struct output_block
*** 1769,1775 ****
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))
{
bool volatilep = TREE_THIS_VOLATILE (*basep);
*basep = build2 (MEM_REF, TREE_TYPE (*basep),
--- 1793,1800 ----
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)
! && !DECL_REGISTER (*basep))
{
bool volatilep = TREE_THIS_VOLATILE (*basep);
*basep = build2 (MEM_REF, TREE_TYPE (*basep),