Commit dc569621 by Roger Sayle Committed by Roger Sayle

call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with TREE_OVERFLOW.


	* call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
	TREE_OVERFLOW.
	* typeck.c (ignore_overflows): Remove the remaining uses of
	TREE_CONSTANT_OVERFLOW.

From-SVN: r121084
parent 6acae78f
2007-01-23 Roger Sayle <roger@eyesopen.com>
* call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
TREE_OVERFLOW.
* typeck.c (ignore_overflows): Remove the remaining uses of
TREE_CONSTANT_OVERFLOW.
2007-01-20 Jan Hubicka <jh@suse.cz> 2007-01-20 Jan Hubicka <jh@suse.cz>
* decl2.c (start_objects, start_static_storage_duration_function): * decl2.c (start_objects, start_static_storage_duration_function):
......
/* Functions related to invoking methods and overloaded functions. /* Functions related to invoking methods and overloaded functions.
Copyright (C) 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998, Copyright (C) 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com) and Contributed by Michael Tiemann (tiemann@cygnus.com) and
modified by Brendan Kehoe (brendan@cygnus.com). modified by Brendan Kehoe (brendan@cygnus.com).
...@@ -432,7 +433,7 @@ null_ptr_cst_p (tree t) ...@@ -432,7 +433,7 @@ null_ptr_cst_p (tree t)
if (CP_INTEGRAL_TYPE_P (TREE_TYPE (t)) && integer_zerop (t)) if (CP_INTEGRAL_TYPE_P (TREE_TYPE (t)) && integer_zerop (t))
{ {
STRIP_NOPS (t); STRIP_NOPS (t);
if (!TREE_CONSTANT_OVERFLOW (t)) if (!TREE_OVERFLOW (t))
return true; return true;
} }
return false; return false;
......
...@@ -4898,8 +4898,8 @@ convert_ptrmem (tree type, tree expr, bool allow_inverse_p, ...@@ -4898,8 +4898,8 @@ convert_ptrmem (tree type, tree expr, bool allow_inverse_p,
} }
/* If EXPR is an INTEGER_CST and ORIG is an arithmetic constant, return /* If EXPR is an INTEGER_CST and ORIG is an arithmetic constant, return
a version of EXPR that has TREE_OVERFLOW and/or TREE_CONSTANT_OVERFLOW a version of EXPR that has TREE_OVERFLOW set if it is set in ORIG.
set iff they are set in ORIG. Otherwise, return EXPR unchanged. */ Otherwise, return EXPR unchanged. */
static tree static tree
ignore_overflows (tree expr, tree orig) ignore_overflows (tree expr, tree orig)
...@@ -4907,11 +4907,9 @@ ignore_overflows (tree expr, tree orig) ...@@ -4907,11 +4907,9 @@ ignore_overflows (tree expr, tree orig)
if (TREE_CODE (expr) == INTEGER_CST if (TREE_CODE (expr) == INTEGER_CST
&& CONSTANT_CLASS_P (orig) && CONSTANT_CLASS_P (orig)
&& TREE_CODE (orig) != STRING_CST && TREE_CODE (orig) != STRING_CST
&& (TREE_OVERFLOW (expr) != TREE_OVERFLOW (orig) && TREE_OVERFLOW (expr) != TREE_OVERFLOW (orig))
|| TREE_CONSTANT_OVERFLOW (expr)
!= TREE_CONSTANT_OVERFLOW (orig)))
{ {
if (!TREE_OVERFLOW (orig) && !TREE_CONSTANT_OVERFLOW (orig)) if (!TREE_OVERFLOW (orig))
/* Ensure constant sharing. */ /* Ensure constant sharing. */
expr = build_int_cst_wide (TREE_TYPE (expr), expr = build_int_cst_wide (TREE_TYPE (expr),
TREE_INT_CST_LOW (expr), TREE_INT_CST_LOW (expr),
...@@ -4921,8 +4919,6 @@ ignore_overflows (tree expr, tree orig) ...@@ -4921,8 +4919,6 @@ ignore_overflows (tree expr, tree orig)
/* Avoid clobbering a shared constant. */ /* Avoid clobbering a shared constant. */
expr = copy_node (expr); expr = copy_node (expr);
TREE_OVERFLOW (expr) = TREE_OVERFLOW (orig); TREE_OVERFLOW (expr) = TREE_OVERFLOW (orig);
TREE_CONSTANT_OVERFLOW (expr)
= TREE_CONSTANT_OVERFLOW (orig);
} }
} }
return expr; return expr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment