This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/38049] points-to results imprecise
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Feb 2009 10:20:33 -0000
- Subject: [Bug tree-optimization/38049] points-to results imprecise
- References: <bug-38049-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from rguenth at gcc dot gnu dot org 2009-02-03 10:20 -------
Subject: Bug 38049
Author: rguenth
Date: Tue Feb 3 10:20:20 2009
New Revision: 143890
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143890
Log:
2009-02-03 Richard Guenther <rguenther@suse.de>
PR tree-optimization/38049
* tree-ssa-structalias.c (struct constraint_expr): Make offset signed.
(UNKNOWN_OFFSET): Define special value.
(dump_constraint): Dump UNKNOWN_OFFSET as UNKNOWN.
(solution_set_expand): New helper function split out from ...
(do_sd_constraint): ... here.
(solution_set_add): Handle UNKNOWN_OFFSET. Handle negative offsets.
(do_ds_constraint): Likewise.
(do_sd_constraint): Likewise. Do not special-case ESCAPED = *ESCAPED
and CALLUSED = *CALLUSED.
(set_union_with_increment): Make inc argument signed.
(type_safe): Remove.
(get_constraint_for_ptr_offset): Handle unknown and negative
constant offsets.
(first_vi_for_offset): Handle offsets before start. Bail
out early for offsets beyond the variable extent.
(first_or_preceding_vi_for_offset): New function.
(init_base_vars): Add ESCAPED = ESCAPED + UNKNOWN_OFFSET constraint.
Together with ESCAPED = *ESCAPED this properly computes reachability.
* gcc.dg/torture/pta-ptrarith-3.c: New testcase.
* gcc.dg/tree-ssa/pta-ptrarith-1.c: Likewise.
* gcc.dg/tree-ssa/pta-ptrarith-2.c: Likewise.
* gcc.dg/vect/no-vfa-vect-43.c: Adjust.
Added:
branches/alias-improvements/gcc/testsuite/gcc.dg/torture/pta-ptrarith-3.c
branches/alias-improvements/gcc/testsuite/gcc.dg/tree-ssa/pta-ptrarith-1.c
branches/alias-improvements/gcc/testsuite/gcc.dg/tree-ssa/pta-ptrarith-2.c
Modified:
branches/alias-improvements/gcc/ChangeLog.alias
branches/alias-improvements/gcc/testsuite/gcc.dg/vect/no-vfa-vect-43.c
branches/alias-improvements/gcc/tree-ssa-structalias.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38049