[Bug tree-optimization/30911] VRP fails to eliminate range checks in Ada code
baldrick at free dot fr
gcc-bugzilla@gcc.gnu.org
Fri Feb 23 12:36:00 GMT 2007
------- Comment #18 from baldrick at free dot fr 2007-02-23 12:36 -------
Subject: Re: VRP fails to eliminate range checks in Ada code
> The attached patch removes all checks (from the first half of the testcase).
Thanks for the patch!
> + Make sure to preserve ~[a, a] (FIXME: why?) and ~[-INF, +INF] though.
Some parts of VRP punt on anti-ranges unless it is of the form ~[a,a], however
turning this into [a+1,TYPE_MAX] should cause no problems, since this is a
range
not an anti-range.
> + && (tree_int_cst_equal (min,TYPE_MIN_VALUE (TREE_TYPE (min)))
Missing space after "min,".
> + fprintf (dump_file, "Canonicalized anit-range to [");
anit-range! :)
Unfortunately bootstrap dies instantly with
In file included from ../../gcc.fsf.master/gcc/fold-const.c:56:
../../gcc.fsf.master/gcc/tree.h: In function âÂÂVEC_tree_base_lengthâÂÂ:
../../gcc.fsf.master/gcc/tree.h:208: internal compiler error: tree check:
expected integer_type or enumeral_type or boolean_type or real_type, have
pointer_type in fold_comparison, at fold-const.c:8768
Most likely it was a pointer type. By the way, I guess you're also doing
the folding for floating point types, is that wise?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30911
More information about the Gcc-bugs
mailing list