aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2005-08-16 00:35:50 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2005-08-16 00:35:50 +0000
commit1595ec20a0651860017624f62d8fea2578b57ad6 (patch)
tree34c3ce14296e3b85e395ce780f210e5fe7f3b687 /gcc
parenteb5f0c07fccb756cbafb0ceaffa8e0527e20d674 (diff)
downloadgcc-1595ec20a0651860017624f62d8fea2578b57ad6.zip
gcc-1595ec20a0651860017624f62d8fea2578b57ad6.tar.gz
gcc-1595ec20a0651860017624f62d8fea2578b57ad6.tar.bz2
* tree.c (build_string): Mark tree CONSTANT and INVARIANT.
From-SVN: r103141
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/tree.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index aff19ef..50148e2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2005-08-15 Ian Lance Taylor <ian@airs.com>
+
+ * tree.c (build_string): Mark tree CONSTANT and INVARIANT.
+
2005-08-15 DJ Delorie <dj@redhat.com>
* config/m32c/mov.md (movqi_op): Immediates can't be moved to
@@ -18,7 +22,6 @@
* configure, config.in: Regenerate.
-
2005-08-15 David Edelsohn <edelsohn@gnu.org>
* config/rs6000/rs6000.md (QHSI): New mode macro.
diff --git a/gcc/tree.c b/gcc/tree.c
index 849482d3..4ee70bf 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -1053,6 +1053,8 @@ build_string (int len, const char *str)
memset (s, 0, sizeof (struct tree_common));
TREE_SET_CODE (s, STRING_CST);
+ TREE_CONSTANT (s) = 1;
+ TREE_INVARIANT (s) = 1;
TREE_STRING_LENGTH (s) = len;
memcpy ((char *) TREE_STRING_POINTER (s), str, len);
((char *) TREE_STRING_POINTER (s))[len] = '\0';