aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.h
diff options
context:
space:
mode:
authorMartin Sebor <msebor@redhat.com>2018-08-29 17:17:08 +0000
committerJeff Law <law@gcc.gnu.org>2018-08-29 11:17:08 -0600
commite84bf0ef66aa72228299dd92d342c4de3a37c55c (patch)
treefa06d2fdd65f07a2e2f5dc933d8166e57ae93a5e /gcc/expr.h
parentb9a0baa9f941537de5ea2c431830a8da33692d88 (diff)
downloadgcc-e84bf0ef66aa72228299dd92d342c4de3a37c55c.zip
gcc-e84bf0ef66aa72228299dd92d342c4de3a37c55c.tar.gz
gcc-e84bf0ef66aa72228299dd92d342c4de3a37c55c.tar.bz2
re PR middle-end/86714 (tree-ssa-forwprop.c confused by too long initializer)
PR tree-optimization/86714 PR tree-optimization/86711 * builtins.c (c_strlen): Add arguments to call to string_constant. * expr.c (string_constant): Add argument. Detect missing nul terminator and outermost declaration it's missing in. * expr.h (string_constant): Add argument. * fold-const.c (read_from_constant_string): Add arguments to call to string_constant. (c_getstr): Likewise. * tree-ssa-forwprop.c (simplify_builtin_call): Likewise. to string_constant. * tree-ssa-strlen.c (get_stridx): Likewise. PR tree-optimization/86714 PR tree-optimization/86711 * gcc.c-torture/execute/memchr-1.c: New test. * gcc.c-torture/execute/pr86714.c: New test. * gcc.c-torture/execute/widechar-3.c: New test. * gcc.dg/strlenopt-58.c: New test. Co-Authored-By: Bernd Edlinger <bernd.edlinger@hotmail.de> Co-Authored-By: Jeff Law <law@redhat.com> From-SVN: r263963
Diffstat (limited to 'gcc/expr.h')
-rw-r--r--gcc/expr.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/expr.h b/gcc/expr.h
index d4d2564..4177de8 100644
--- a/gcc/expr.h
+++ b/gcc/expr.h
@@ -288,7 +288,7 @@ expand_normal (tree exp)
/* Return the tree node and offset if a given argument corresponds to
a string constant. */
-extern tree string_constant (tree, tree *, tree * = NULL);
+extern tree string_constant (tree, tree *, tree *, tree *);
/* Two different ways of generating switch statements. */
extern int try_casesi (tree, tree, tree, tree, rtx, rtx, rtx, profile_probability);