aboutsummaryrefslogtreecommitdiff
path: root/gcc/builtins.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2009-05-29 17:38:20 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2009-05-29 17:38:20 +0200
commit616f21dfdebc8f32cc5502d19eb248002911e42c (patch)
tree9f03717fa8823eb6b42bf6ada0d75f1c19ec49a6 /gcc/builtins.c
parentda7ba240d63c597e65eb0b5ba4074969b89606e9 (diff)
downloadgcc-616f21dfdebc8f32cc5502d19eb248002911e42c.zip
gcc-616f21dfdebc8f32cc5502d19eb248002911e42c.tar.gz
gcc-616f21dfdebc8f32cc5502d19eb248002911e42c.tar.bz2
re PR middle-end/40291 (ICE on unprototyped memcmp with long long last argument)
PR middle-end/40291 * builtins.c (expand_builtin_memcmp): Convert len to sizetype before expansion. * gcc.c-torture/compile/pr40291.c: New test. From-SVN: r147978
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r--gcc/builtins.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c
index 783fce4..6d9f282 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -4189,7 +4189,7 @@ expand_builtin_memcmp (tree exp, rtx target, enum machine_mode mode)
arg1_rtx = get_memory_rtx (arg1, len);
arg2_rtx = get_memory_rtx (arg2, len);
- arg3_rtx = expand_normal (len);
+ arg3_rtx = expand_normal (fold_convert (sizetype, len));
/* Set MEM_SIZE as appropriate. */
if (GET_CODE (arg3_rtx) == CONST_INT)