Skip to content
Snippets Groups Projects
Commit 5fd1cbfd authored by Richard Biener's avatar Richard Biener
Browse files

tree-optimization/113895 - consistency check fails in copy_reference_ops_from_ref

The following addresses consistency check fails in copy_reference_ops_from_ref
when we are handling out-of-bound array accesses (it's almost impossible
to identically mimic the get_ref_base_and_extent behavior).  It also
addresses the case where an out-of-bound constant offset computes to a
-1 off which is the special value for "unknown".  This patch basically
turns off verification in those cases.

	PR tree-optimization/113895
	* tree-ssa-sccvn.cc (copy_reference_ops_from_ref): Disable
	consistency checking when there are out-of-bound array
	accesses.  Allow -1 off when from an array reference with
	constant index.

	* gcc.dg/torture/pr113895-2.c: New testcase.
	* gcc.dg/torture/pr113895-3.c: Likewise.
	* gcc.dg/torture/pr113895-4.c: Likewise.
parent 7f3d9006
Loading
Loading
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