summaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2011-01-28 19:36:44 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2011-01-28 19:36:44 +0000
commit722c0f6ebd1f6e138c468af2ba2d9f6250cc734f (patch)
tree738974e0dfcd7dab87ec93691e86e2079883ce31 /gcc/varasm.c
parent5be9590a469612eedab37680484e772755fe2d8d (diff)
downloadgcc-722c0f6ebd1f6e138c468af2ba2d9f6250cc734f.tar.gz
PR target/42894
* varasm.c (force_const_mem): Store copy of x in desc->constant instead of x itself. * expr.c (emit_move_insn): Add a copy of y_cst instead of y_cst itself into REG_EQUAL note. * gcc.dg/tls/pr42894.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169370 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index afd9942c295..a1cddac16c1 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -1,7 +1,7 @@
/* Output variables, constants and external declarations, for GNU compiler.
Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997,
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
- 2010 Free Software Foundation, Inc.
+ 2010, 2011 Free Software Foundation, Inc.
This file is part of GCC.
@@ -3518,7 +3518,7 @@ force_const_mem (enum machine_mode mode, rtx x)
pool->offset &= ~ ((align / BITS_PER_UNIT) - 1);
desc->next = NULL;
- desc->constant = tmp.constant;
+ desc->constant = copy_rtx (tmp.constant);
desc->offset = pool->offset;
desc->hash = hash;
desc->mode = mode;