+2004-06-08 Andrew Pinski <pinskia@physics.uc.edu>
+
+ * fold-const.c (fold_convert): Treat OFFSET_TYPE like
+ POINTER_TYPE and INTEGER_TYPE.
+
2004-06-08 Bernardo Innocenti <bernie@develer.com>
* modulo-sched.c: Compile only when INSN_SCHEDULING is
if (TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (orig))
return fold (build1 (NOP_EXPR, type, arg));
- if (INTEGRAL_TYPE_P (type) || POINTER_TYPE_P (type))
+ if (INTEGRAL_TYPE_P (type) || POINTER_TYPE_P (type)
+ || TREE_CODE (type) == OFFSET_TYPE)
{
if (TREE_CODE (arg) == INTEGER_CST)
{
if (tem != NULL_TREE)
return tem;
}
- if (INTEGRAL_TYPE_P (orig) || POINTER_TYPE_P (orig))
+ if (INTEGRAL_TYPE_P (orig) || POINTER_TYPE_P (orig)
+ || TREE_CODE (orig) == OFFSET_TYPE)
return fold (build1 (NOP_EXPR, type, arg));
if (TREE_CODE (orig) == COMPLEX_TYPE)
{