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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190528
138bc75d-0d04-0410-961f-
82ee72b054a4
+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
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
--- /dev/null
+/* { 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 ();
+ }
+}