------- Comment #3 from ian at airs dot com  2007-04-27 04:52 -------
Created an attachment (id=13453)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13453&action=view)
Proposed patch

This is an interesting test case.  It turns out that VRP has always
consistently assumed that TREE_TYPE (TYPE_MIN_VALUE (t)) == t.  The assumption
turns up in == comparisons against TYPE_MIN_VALUE (and TYPE_MAX_VALUE).  Those
== comparisons are normally valid because we hash integer constants so that
they are all the same.  The hash includes the type.  So when TREE_TYPE
(TYPE_MIN_VALUE (t)) != t, the equality will actually never hold, and VRP will
do the wrong thing.

This patch simply ensures that the equality holds.  I'm testing it now.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31710

Reply via email to