This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
TYPE_MIN_VALUE and pointer types
- From: Richard Guenther <rguenth at tat dot physik dot uni-tuebingen dot de>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 17 Feb 2005 14:18:07 +0100 (CET)
- Subject: TYPE_MIN_VALUE and pointer types
Hi!
I'm getting an ICE in
/net/pherkad/scratch/rguenth/gcc/gcc/testsuite/gcc.dg/pr18241-2.c: In
function 'radix_tree_tag_clear':
/net/pherkad/scratch/rguenth/gcc/gcc/testsuite/gcc.dg/pr18241-2.c:24:
internal compiler error: tree check: expected integer_type or
enumeral_type or boolean_type or char_type or real_type, have pointer_type
in int_fits_type_p, at tree.c:4903
this is because I'm feeding int_fits_type_p a (constant) pointer type:
<integer_cst 0x2a95a63510 type <integer_type 0x2a95a628f0> constant
invariant 1>
i.e. I'm calling
if ((TREE_CODE (delta) == INTEGER_CST
&& ! int_fits_type_p (delta, itype))
am I supposed not to do this if delta is a pointer type ever? Who
is wrong here? TYPE_MIN_VALUE does
#define TYPE_MIN_VALUE(NODE) (NUMERICAL_TYPE_CHECK (NODE)->type.minval)
and NUMERICAL_TYPE_CHECK
#define NUMERICAL_TYPE_CHECK(T) \
TREE_CHECK5 (T, INTEGER_TYPE, ENUMERAL_TYPE, BOOLEAN_TYPE, \
CHAR_TYPE, REAL_TYPE)
Any ideas, other than converting delta to the equivalent integer type?
Thanks,
Richard.
--
Richard Guenther <richard dot guenther at uni-tuebingen dot de>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/