[Bug tree-optimization/37005] [4.4 Regression] GNAT Bug Box for cd2a24e.adb:37 at tree-vrp.c:392
rguenth at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Aug 27 15:29:00 GMT 2008
------- Comment #4 from rguenth at gcc dot gnu dot org 2008-08-27 15:27 -------
The FE generates
if ((SAVE_EXPR <cd2a24e__ident ((integer) c1)> < c1 || SAVE_EXPR
<cd2a24e__ident ((integer) c1)> > c2) || cd2a24e__ident (4) <= 3 && c2 > 2)
{
where c2 is of type cd2a24e__check_type (an enum with the range [3, 5]).
As you can see the comparison is against a value of different type (actually
it's of the same type, but it is out-of-range).
VRP generates a fallback range using TYPE_MIN_VALUE producing [3, 2] which
leads to the ICE.
This out-of-range comparison is generated by fold from 3 <= c2 during
canonicalization.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37005
More information about the Gcc-bugs
mailing list