2000-12-29 Alexandre Oliva <aoliva@redhat.com>
+ * c-decl.c (grokdeclarator): Prevent crash in case of overflow in
+ array size.
+
* calls.c (emit_library_call_value_1): Add to call_fusage the
stack slot assigned to argument passed by reference.
if (TREE_CODE (type) == ARRAY_TYPE
&& COMPLETE_TYPE_P (type)
&& TREE_OVERFLOW (TYPE_SIZE (type)))
- error ("size of array `%s' is too large", name);
+ {
+ error ("size of array `%s' is too large", name);
+ /* If we proceed with the array type as it is, we'll eventully
+ crash in tree_low_cst(). */
+ type = error_mark_node;
+ }
/* If this is declaring a typedef name, return a TYPE_DECL. */