Commit 491e0b9b by Richard Guenther Committed by Richard Biener

re PR middle-end/54327 (Segmentation fault in init_ggc)

2012-08-20  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/54327
	* gimple-fold.c (get_maxval_strlen): Do not walk use-def chains
	if the use is registered for SSA update.

	* gcc.dg/torture/pr54327.c: New testcase.

From-SVN: r190528
parent 081db960
2012-08-20 Richard Guenther <rguenther@suse.de>
PR tree-optimization/54327
* gimple-fold.c (get_maxval_strlen): Do not walk use-def chains
if the use is registered for SSA update.
2012-08-20 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/54321
......
......@@ -736,6 +736,11 @@ get_maxval_strlen (tree arg, tree *length, bitmap visited, int type)
return true;
}
/* If ARG is registered for SSA update we cannot look at its defining
statement. */
if (name_registered_for_update_p (arg))
return false;
/* If we were already here, break the infinite cycle. */
if (!bitmap_set_bit (visited, SSA_NAME_VERSION (arg)))
return true;
......
2012-08-20 Richard Guenther <rguenther@suse.de>
PR tree-optimization/54327
* gcc.dg/torture/pr54327.c: New testcase.
2012-08-20 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/54321
......
/* { dg-do compile } */
#include <string.h>
#include <stdlib.h>
void treathead ()
{
char *a = ';' == '\0' ? : 0;
if (*a == '=')
{
while (*a == (*a == 0) || *a == '\'')
a++;
if (strlen (a) < 2)
abort ();
}
}
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