aboutsummaryrefslogtreecommitdiff
path: root/gcc/builtins.c
diff options
context:
space:
mode:
authorKazu Hirata <kazu@cs.umass.edu>2004-05-31 17:39:14 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2004-05-31 17:39:14 +0000
commit09d98c720ee469390f8114878cfd4f46650cec6e (patch)
treeccd4d6f1f6a26904501f33a96147b4b39bdb871c /gcc/builtins.c
parent1f7a8dccd4056be197e8f79fe7bbf2b8bd89c53b (diff)
downloadgcc-09d98c720ee469390f8114878cfd4f46650cec6e.zip
gcc-09d98c720ee469390f8114878cfd4f46650cec6e.tar.gz
gcc-09d98c720ee469390f8114878cfd4f46650cec6e.tar.bz2
re PR tree-optimization/15743 (Fold index() at tree level.)
PR tree-optimization/15743. * builtins.c (fold_builtin_1): Fold index() and rindex(). From-SVN: r82491
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r--gcc/builtins.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c
index 3fb8a0f..e44ad61 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -7838,9 +7838,11 @@ fold_builtin_1 (tree exp)
case BUILT_IN_STRNCPY:
return fold_builtin_strncpy (exp);
+ case BUILT_IN_INDEX:
case BUILT_IN_STRCHR:
return fold_builtin_strchr (exp, false);
+ case BUILT_IN_RINDEX:
case BUILT_IN_STRRCHR:
return fold_builtin_strchr (exp, true);