* 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(-)
@@ -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)]));
}
}
}
}