This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]