Commit a71dcca8 by Martin Liska Committed by Martin Liska

Fix tree-optimization/78886.

	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
parent 7fbb9b18
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
......
/* { dg-do compile } */
/* { dg-options "-O2" } */
void *malloc(unsigned long x);
void foo(void)
{
volatile int i;
malloc(1);
i;
}
......@@ -1869,6 +1869,9 @@ handle_builtin_malloc (enum built_in_function bcode, gimple_stmt_iterator *gsi)
{
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;
......
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