Skip to content
Snippets Groups Projects
Commit 116bc3a4 authored by Jakub Jelinek's avatar Jakub Jelinek Committed by Jakub Jelinek
Browse files

re PR tree-optimization/49000 (ICE: verify_ssa failed with -O2 -g)

	PR tree-optimization/49000
	* tree-ssa.c (execute_update_addresses_taken): Call
	maybe_rewrite_mem_ref_base on debug stmt value.  If it couldn't
	be rewritten and decl has been marked for renaming, reset
	the debug stmt.

	* gcc.dg/pr49000.c: New test.

From-SVN: r173849
parent bf6490b5
No related branches found
No related tags found
No related merge requests found
2011-05-18 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/49000
* tree-ssa.c (execute_update_addresses_taken): Call
maybe_rewrite_mem_ref_base on debug stmt value. If it couldn't
be rewritten and decl has been marked for renaming, reset
the debug stmt.
2011-05-17 Joseph Myers <joseph@codesourcery.com> 2011-05-17 Joseph Myers <joseph@codesourcery.com>
   
* config/i386/i386.c (ix86_valid_target_attribute_tree): Use * config/i386/i386.c (ix86_valid_target_attribute_tree): Use
......
2011-05-18 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/49000
* gcc.dg/pr49000.c: New test.
2011-05-17 Eric Botcazou <ebotcazou@adacore.com> 2011-05-17 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/invalid1.adb: New test. * gnat.dg/invalid1.adb: New test.
......
/* PR tree-optimization/49000 */
/* { dg-do compile } */
/* { dg-options "-O2 -g" } */
static
foo (int x, int y)
{
return x * y;
}
static int
bar (int *z)
{
return *z;
}
void
baz (void)
{
int a = 42;
int *b = &a;
foo (bar (&a), 3);
}
void
test (void)
{
baz ();
}
...@@ -2230,6 +2230,17 @@ execute_update_addresses_taken (void) ...@@ -2230,6 +2230,17 @@ execute_update_addresses_taken (void)
} }
} }
else if (gimple_debug_bind_p (stmt)
&& gimple_debug_bind_has_value_p (stmt))
{
tree *valuep = gimple_debug_bind_get_value_ptr (stmt);
tree decl;
maybe_rewrite_mem_ref_base (valuep);
decl = non_rewritable_mem_ref_base (*valuep);
if (decl && symbol_marked_for_renaming (decl))
gimple_debug_bind_reset_value (stmt);
}
if (gimple_references_memory_p (stmt) if (gimple_references_memory_p (stmt)
|| is_gimple_debug (stmt)) || is_gimple_debug (stmt))
update_stmt (stmt); update_stmt (stmt);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment