aboutsummaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2011-01-28 20:36:44 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2011-01-28 20:36:44 +0100
commit591e29d9da4cb934419efab7e73468df42af9186 (patch)
tree738974e0dfcd7dab87ec93691e86e2079883ce31 /gcc/varasm.c
parent62dcc44a4bbe224aaac5d5dccb4703382b3a84e5 (diff)
downloadgcc-591e29d9da4cb934419efab7e73468df42af9186.zip
gcc-591e29d9da4cb934419efab7e73468df42af9186.tar.gz
gcc-591e29d9da4cb934419efab7e73468df42af9186.tar.bz2
re PR target/42894 (Invalid rtl sharing in Thumb1.)
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. From-SVN: r169370
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 afd9942..a1cddac 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;