* tree.c (build_string): Mark tree CONSTANT and INVARIANT.

From-SVN: r103141
This commit is contained in:
Ian Lance Taylor 2005-08-16 00:35:50 +00:00 committed by Ian Lance Taylor
parent eb5f0c07fc
commit 1595ec20a0
2 changed files with 6 additions and 1 deletions

View File

@ -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.

View File

@ -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';