summaryrefslogtreecommitdiff
path: root/gcc/fold-const.h
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2014-07-25 07:44:57 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2014-07-25 07:44:57 +0000
commitb2505143369334866ed98d69f08033068b24de34 (patch)
treec7fe34fd006f2ff66fbe4a743da4b4b825b9c156 /gcc/fold-const.h
parent1ed85d52ef443e528bfccc64d81a7b263e9defa3 (diff)
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.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fold-const.h b/gcc/fold-const.h
index 3b5fd8476d6..b440ca11881 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.