From: Richard Biener Date: Fri, 29 Aug 2014 08:11:57 +0000 (+0000) Subject: re PR middle-end/62292 (FAIL: (geterrorname|getmethodname) run) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1579e1f8adfe2ee83d3fe957f1832423184fdbf1;p=gcc.git re PR middle-end/62292 (FAIL: (geterrorname|getmethodname) run) 2014-08-29 Richard Biener PR middle-end/62292 * gimple-fold.c (gimple_fold_builtin_strcpy): Fix error from previous refactoring. (gimple_fold_builtin_strncpy): Likewise. From-SVN: r214716 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ac5dc7c9c72..dcec1f41462 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2014-08-29 Richard Biener + + PR middle-end/62292 + * gimple-fold.c (gimple_fold_builtin_strcpy): Fix error + from previous refactoring. + (gimple_fold_builtin_strncpy): Likewise. + 2014-08-29 David Malcolm PR bootstrap/62300 diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c index 1a2ed6d8958..4aa1f4c1eda 100644 --- a/gcc/gimple-fold.c +++ b/gcc/gimple-fold.c @@ -1440,7 +1440,7 @@ gimple_fold_builtin_strcpy (gimple_stmt_iterator *gsi, if (!fn) return false; - tree len = get_maxval_strlen (src, 1); + tree len = get_maxval_strlen (src, 0); if (!len) return false; @@ -1477,7 +1477,7 @@ gimple_fold_builtin_strncpy (gimple_stmt_iterator *gsi, return false; /* Now, we must be passed a constant src ptr parameter. */ - tree slen = get_maxval_strlen (src, 1); + tree slen = get_maxval_strlen (src, 0); if (!slen || TREE_CODE (slen) != INTEGER_CST) return false;