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]

Mainline regression - ICE c99-complit-2.c


c99-complit-2.c ICEs on mainline since last afternoon, with this error
message:

gcc.dg/c99-complit-2.c:25: internal compiler error: tree check: 
  expected integer_type, enumeral_type, boolean_type, char_type or
  real_type; have array_type in safe_from_p, at expr.c:5751

(gdb) frame 5 
#5  0x08160897 in safe_from_p (x=0x401f42a0, exp=0x401f0af0, top_p=1)
    at ../../gcc/expr.c:5751
5751                  || TYPE_ARRAY_MAX_SIZE (TREE_TYPE (exp)) == NULL_TREE

exp here is a CONSTRUCTOR whose type is an ARRAY_TYPE.  The problem is
in the definition of TYPE_ARRAY_MAX_SIZE:

#define TYPE_ARRAY_MAX_SIZE(ARRAY_TYPE) \
  TYPE_MAX_VALUE (ARRAY_TYPE_CHECK (ARRAY_TYPE))

TYPE_MAX_VALUE applies NUMERICAL_TYPE_CHECK, which is mutually
exclusive with ARRAY_TYPE_CHECK.  This ought to be 

#define TYPE_ARRAY_MAX_SIZE(ARRAY_TYPE) \
  (ARRAY_TYPE_CHECK (ARRAY_TYPE)->type.maxval)

I have far too many unrelated changes in my tree right now to fix
this myself, nor do I have the time to dig through tree.h for similar
errors.  Please clean up your mess.

zw


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