diff options
author | Richard Biener <rguenther@suse.de> | 2014-07-25 07:44:57 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2014-07-25 07:44:57 +0000 |
commit | b2505143369334866ed98d69f08033068b24de34 (patch) | |
tree | c7fe34fd006f2ff66fbe4a743da4b4b825b9c156 /gcc/fold-const.h | |
parent | 1ed85d52ef443e528bfccc64d81a7b263e9defa3 (diff) | |
download | gcc-b2505143369334866ed98d69f08033068b24de34.zip gcc-b2505143369334866ed98d69f08033068b24de34.tar.gz gcc-b2505143369334866ed98d69f08033068b24de34.tar.bz2 |
re PR middle-end/61762 (failure to optimize memcpy from constant string)
2014-07-25 Richard Biener <rguenther@suse.de>
PR middle-end/61762
PR middle-end/61894
* fold-const.c (native_encode_int): Add and handle offset
parameter to do partial encodings of expr.
(native_encode_fixed): Likewise.
(native_encode_real): Likewise.
(native_encode_complex): Likewise.
(native_encode_vector): Likewise.
(native_encode_string): Likewise.
(native_encode_expr): Likewise.
* fold-const.c (native_encode_expr): Add offset parameter
defaulting to -1.
* gimple-fold.c (fold_string_cst_ctor_reference): Remove.
(fold_ctor_reference): Handle all reads from tcc_constant
ctors.
* gcc.dg/pr61762.c: New testcase.
* gcc.dg/fold-cstring.c: Likewise.
* gcc.dg/fold-cvect.c: Likewise.
From-SVN: r213045
Diffstat (limited to 'gcc/fold-const.h')
-rw-r--r-- | gcc/fold-const.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fold-const.h b/gcc/fold-const.h index 3b5fd84..b440ca1 100644 --- a/gcc/fold-const.h +++ b/gcc/fold-const.h @@ -25,7 +25,7 @@ along with GCC; see the file COPYING3. If not see extern int folding_initializer; /* Convert between trees and native memory representation. */ -extern int native_encode_expr (const_tree, unsigned char *, int); +extern int native_encode_expr (const_tree, unsigned char *, int, int off = -1); extern tree native_interpret_expr (tree, const unsigned char *, int); /* Fold constants as much as possible in an expression. |