OSDN Git Service

2008-07-07 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 7 Jul 2008 15:48:23 +0000 (15:48 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 7 Jul 2008 15:48:23 +0000 (15:48 +0000)
commit57e6b870d2d4d7c73a7cdfe3c3d7e7fabc6d300a
treee593ea89c560060af1cb0a96659d392dc5ae6d94
parent1d46178967b7e56689612fbc4090944a08a5f9f0
2008-07-07  Richard Guenther  <rguenther@suse.de>

* tree-ssa-structalias.c (struct variable_info): Add is_full_var flag.
(new_var_info): Set it to false.
(solution_set_add): Correctly handle pointers outside a var and
inside a field.
(type_safe): Treat variables with is_full_var properly.
(do_sd_constraint): Likewise.
(do_ds_constraint): Likewise.
(process_constraint): Remove zeroing offset for !use_field_sensitive.
(get_constraint_for_ptr_offset): New function.
(get_constraint_for_component_ref): For addresses at least include
the last field of the variable.  Handle is_full_vars properly.
(get_constraint_for_1): Factor common code, handle POINTER_PLUS_EXPR.
(handle_ptr_arith): Remove.
(find_func_aliases): Simplify assignment handling.
(create_function_info_for): For parameter and result varinfos set
is_full_var flag.
(create_variable_info_for): Set is_full_var flag whenever we
just created a single varinfo for a decl.
(init_alias_vars): Initialize use_field_sensitive from
max-fields-for-field-sensitive parameter.

* gcc.dg/torture/pta-ptrarith-1.c: New testcase.
* gcc.dg/torture/pta-ptrarith-2.c: Likewise.
* gcc.dg/torture/ipa-pta-1.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@137573 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/ipa-pta-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/torture/pta-ptrarith-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/torture/pta-ptrarith-2.c [new file with mode: 0644]
gcc/tree-ssa-structalias.c