Commit 9a06c1cb by Diego Novillo

re PR tree-optimization/19853 (incorrect vops after exposing a new global variable)


	PR tree-optimization/19853
	* tree-dfa.c (add_referenced_var): Always examine DECL_INITIAL.


testsuite/ChangeLog

	PR tree-optimization/19853
	* gcc.c-torture/compile/pr19853.c: New test.

From-SVN: r95040
parent f769035f
2005-02-14 Diego Novillo <dnovillo@redhat.com>
PR tree-optimization/19853
* tree-dfa.c (add_referenced_var): Always examine DECL_INITIAL.
2005-02-14 Kazu Hirata <kazu@cs.umass.edu> 2005-02-14 Kazu Hirata <kazu@cs.umass.edu>
* passes.c (rest_of_handle_loop_optimize): Remove calls to * passes.c (rest_of_handle_loop_optimize): Remove calls to
...@@ -9,7 +14,7 @@ ...@@ -9,7 +14,7 @@
swapping commutative operands. swapping commutative operands.
2005-02-14 Sebastian Pop <pop@cri.ensmp.fr> 2005-02-14 Sebastian Pop <pop@cri.ensmp.fr>
* lambda-code.c (lambda_loopnest_to_gcc_loopnest, perfect_nestify): * lambda-code.c (lambda_loopnest_to_gcc_loopnest, perfect_nestify):
Use standard_iv_increment_position for computing the bsi position Use standard_iv_increment_position for computing the bsi position
for create_iv. for create_iv.
...@@ -19,9 +24,10 @@ ...@@ -19,9 +24,10 @@
2005-02-13 Zdenek Dvorak <dvorakz@suse.cz> 2005-02-13 Zdenek Dvorak <dvorakz@suse.cz>
PR target/17428 PR target/17428
* cfgrtl.c (safe_insert_insn_on_edge): Avoid extending life range of hard * cfgrtl.c (safe_insert_insn_on_edge): Avoid extending
registers. life range of hard registers.
* value-prof.c (insn_prefetch_values_to_profile): Only scan normal insns. * value-prof.c (insn_prefetch_values_to_profile): Only
scan normal insns.
* value-prof.c (rtl_find_values_to_profile): Do not look for values to * value-prof.c (rtl_find_values_to_profile): Do not look for values to
profile in libcalls. profile in libcalls.
......
2005-02-14 Diego Novillo <dnovillo@redhat.com>
PR tree-optimization/19853
* gcc.c-torture/compile/pr19853.c: New test.
2005-02-14 Nathan Sidwell <nathan@codesourcery.com> 2005-02-14 Nathan Sidwell <nathan@codesourcery.com>
PR c++/19608 PR c++/19608
......
struct test { int *x; } global_test;
int global_int;
int flag;
void test (char *dummy)
{
static const struct test const_test = { &global_int };
struct test local_test;
int i;
for (i = 0; i < 1; i++)
*dummy = 0;
if (flag)
__builtin_memset (dummy, 0, 16);
local_test = const_test;
global_test = local_test;
}
...@@ -901,8 +901,7 @@ add_referenced_var (tree var, struct walk_state *walk_state) ...@@ -901,8 +901,7 @@ add_referenced_var (tree var, struct walk_state *walk_state)
/* Scan DECL_INITIAL for pointer variables as they may contain /* Scan DECL_INITIAL for pointer variables as they may contain
address arithmetic referencing the address of other address arithmetic referencing the address of other
variables. */ variables. */
if (DECL_INITIAL (var) if (DECL_INITIAL (var))
&& POINTER_TYPE_P (TREE_TYPE (var)))
walk_tree (&DECL_INITIAL (var), find_vars_r, walk_state, 0); walk_tree (&DECL_INITIAL (var), find_vars_r, walk_state, 0);
} }
} }
......
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