[taken from gcc-2.96]

2001-03-29  Jakub Jelinek  <jakub@redhat.com>
	* fold-const.c (fold): Before optimizing unsigned comparison with
	0x7fffffffU, make sure arg0 is integral type.
	* gcc.c-torture/execute/20010329-1.c: New test.


git-svn-id: file:///srv/svn/repos/haiku/trunk/buildtools@9608 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Oliver Tappe 2004-10-28 18:28:48 +00:00
parent f3bec763ba
commit dee09b4ab3

View File

@ -5940,8 +5940,7 @@ fold (expr)
&& width <= HOST_BITS_PER_WIDE_INT
&& TREE_INT_CST_LOW (arg1) == ((HOST_WIDE_INT) 1 << (width - 1)) - 1
&& TREE_INT_CST_HIGH (arg1) == 0
&& (INTEGRAL_TYPE_P (TREE_TYPE (arg1))
|| POINTER_TYPE_P (TREE_TYPE (arg1)))
&& INTEGRAL_TYPE_P (TREE_TYPE (arg1))
&& TREE_UNSIGNED (TREE_TYPE (arg1)))
{
switch (TREE_CODE (t))