⛏️ index : buildtools.git

author Oliver Tappe <zooey@hirschkaefer.de> 2009-06-14 21:07:41.0 +00:00:00
committer Oliver Tappe <zooey@hirschkaefer.de> 2009-06-14 21:07:41.0 +00:00:00
commit
3126d774bf1bad25855fe3c5eeca3dc5f4c134f4 [patch]
tree
bef3362435b9756ea83baa8ce553b9a6fd48d208
parent
40ef888cfd92dbf8242f1a5009f4140e18b937d4
download
3126d774bf1bad25855fe3c5eeca3dc5f4c134f4.tar.gz

* applied fix for optimization of wchar_t constants which is mentioned in the ICU configuration for BeOS, since otherwise we could not use optimization for ICU at all. [see http://gcc.gnu.org/ml/gcc-patches/2000-09/msg00454.html]


git-svn-id: file:///srv/svn/repos/haiku/buildtools/trunk@31054 a95241bf-73f2-0310-859d-f6bbb57e9c96

Diff

 legacy/gcc/gcc/expr.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/legacy/gcc/gcc/expr.c b/legacy/gcc/gcc/expr.c
index 5eebc01..ab8a82c 100644
--- a/legacy/gcc/gcc/expr.c
+++ b/legacy/gcc/gcc/expr.c
@@ -6448,9 +6448,16 @@
			 && TREE_INT_CST_HIGH (index) == 0
			 && (TREE_INT_CST_LOW (index)
			     < TREE_STRING_LENGTH (init)))
		  return (GEN_INT
			  (TREE_STRING_POINTER
			   (init)[TREE_INT_CST_LOW (index)]));
                  {
                    tree type = TREE_TYPE (TREE_TYPE (init));
                    enum machine_mode mode = TYPE_MODE (type);

                    if (GET_MODE_CLASS (mode) == MODE_INT
                        && GET_MODE_SIZE (mode) == 1)
                      return (GEN_INT
                              (TREE_STRING_POINTER
                               (init)[TREE_INT_CST_LOW (index)]));
                  }
	      }
	  }
      }