PR tree-optimization/78886
* gcc.dg/tree-ssa/pr78886.c: New test.
PR tree-optimization/78886
* tree-ssa-strlen.c (handle_builtin_malloc): Return when LHS
is equal to NULL.
From-SVN: r243886
+2016-12-22 Martin Liska <mliska@suse.cz>
+
+ PR tree-optimization/78886
+ * tree-ssa-strlen.c (handle_builtin_malloc): Return when LHS
+ is equal to NULL.
+
2016-12-22 Jakub Jelinek <jakub@redhat.com>
PR bootstrap/78817
+2016-12-22 Martin Liska <mliska@suse.cz>
+
+ PR tree-optimization/78886
+ * gcc.dg/tree-ssa/pr78886.c: New test.
+
2016-12-22 Georg-Johann Lay <avr@gjlay.de>
PR testsuite/52641
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+void *malloc(unsigned long x);
+
+void foo(void)
+{
+ volatile int i;
+ malloc(1);
+ i;
+}
{
gimple *stmt = gsi_stmt (*gsi);
tree lhs = gimple_call_lhs (stmt);
+ if (lhs == NULL_TREE)
+ return;
+
gcc_assert (get_stridx (lhs) == 0);
int idx = new_stridx (lhs);
tree length = NULL_TREE;