Commit 409b6ac1 by Richard Biener Committed by Richard Biener

re PR tree-optimization/59860 (ICE in compute_may_aliases, at tree-ssa-structalias.c:6843)

2014-01-20  Richard Biener  <rguenther@suse.de>

	PR middle-end/59860
	* builtins.c (fold_builtin_strcat): Remove case better handled
	by tree-ssa-strlen.c.

	* gcc.dg/pr59860.c: New testcase.

From-SVN: r206799
parent fd6e497e
2014-01-20 Richard Biener <rguenther@suse.de>
PR middle-end/59860
* builtins.c (fold_builtin_strcat): Remove case better handled
by tree-ssa-strlen.c.
2014-01-20 Alan Lawrence <alan.lawrence@arm.com>
* config/aarch64/aarch64.opt
......
......@@ -11760,17 +11760,11 @@ fold_builtin_strcat (location_t loc ATTRIBUTE_UNUSED, tree dst, tree src)
if (!strlen_fn || !strcpy_fn)
return NULL_TREE;
/* If we don't have a movstr we don't want to emit an strcpy
call. We have to do that if the length of the source string
isn't computable (in that case we can use memcpy probably
later expanding to a sequence of mov instructions). If we
have movstr instructions we can emit strcpy calls. */
if (!HAVE_movstr)
{
tree len = c_strlen (src, 1);
if (! len || TREE_SIDE_EFFECTS (len))
return NULL_TREE;
}
/* If the length of the source string isn't computable don't
split strcat into strlen and strcpy. */
tree len = c_strlen (src, 1);
if (! len || TREE_SIDE_EFFECTS (len))
return NULL_TREE;
/* Stabilize the argument list. */
dst = builtin_save_expr (dst);
......
2014-01-20 Richard Biener <rguenther@suse.de>
PR middle-end/59860
* gcc.dg/pr59860.c: New testcase.
2014-01-20 Jakub Jelinek <jakub@redhat.com>
PR target/59880
......
/* { dg-do compile } */
/* { dg-options "-O" } */
extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char * __attribute__ ((__nothrow__ , __leaf__))
strcat (char *__restrict __dest, const char *__restrict __src)
{
return __builtin___strcat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1));
}
static char raw_decode;
void foo (char **argv, char *outfilename)
{
if (**argv == 'r')
raw_decode = 1;
strcat (outfilename, raw_decode ? ".raw" : ".wav");
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment