diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-11-01 12:47:38 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-11-01 12:47:38 +0000 |
commit | 39761420af933f54919835afd7acdc46c2588984 (patch) | |
tree | 4ad324688f65dd4385b0bf31bf9f7e9fe3ddd83c /gcc/builtins.c | |
parent | 3b7d65ecc1abc60f89d616940b97148c6385c034 (diff) | |
download | gcc-39761420af933f54919835afd7acdc46c2588984.tar.gz |
2008-11-01 Richard Guenther <rguenther@suse.de>
PR middle-end/37976
* builtins.c (fold_builtin_strspn): Return a size_t.
(fold_builtin_strcspn): Likewise.
* gcc.c-torture/compile/pr37976.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@141514 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r-- | gcc/builtins.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c index 85d61b5681c..a1bba0d7160 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -11398,7 +11398,7 @@ fold_builtin_strspn (tree s1, tree s2) if ((p1 && *p1 == '\0') || (p2 && *p2 == '\0')) /* Evaluate and ignore both arguments in case either one has side-effects. */ - return omit_two_operands (integer_type_node, integer_zero_node, + return omit_two_operands (size_type_node, size_zero_node, s1, s2); return NULL_TREE; } @@ -11444,8 +11444,8 @@ fold_builtin_strcspn (tree s1, tree s2) { /* Evaluate and ignore argument s2 in case it has side-effects. */ - return omit_one_operand (integer_type_node, - integer_zero_node, s2); + return omit_one_operand (size_type_node, + size_zero_node, s2); } /* If the second argument is "", return __builtin_strlen(s1). */ |