mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-24 13:11:44 +08:00
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
This commit is contained in:
parent
081db96050
commit
491e0b9b0c
gcc
@ -1,3 +1,9 @@
|
||||
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;
|
||||
|
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
15
gcc/testsuite/gcc.dg/torture/pr54327.c
Normal file
15
gcc/testsuite/gcc.dg/torture/pr54327.c
Normal file
@ -0,0 +1,15 @@
|
||||
/* { 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 ();
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user