diff --git a/src/defs.h b/src/defs.h index ed28f3f0..cb82c684 100644 --- a/src/defs.h +++ b/src/defs.h @@ -19,7 +19,7 @@ #define MAX_PARAMS 8 #define MAX_LOCALS 1600 #define MAX_FIELDS 64 -#define MAX_TYPES 64 +#define MAX_TYPES 128 #define MAX_IR_INSTR 60000 #define MAX_BB_PRED 128 #define MAX_BB_DOM_SUCC 64 diff --git a/src/globals.c b/src/globals.c index 1c5efa9f..878ed9a4 100644 --- a/src/globals.c +++ b/src/globals.c @@ -721,6 +721,10 @@ int find_macro_param_src_idx(char *name, block_t *parent) type_t *add_type(void) { + if (types_idx >= MAX_TYPES) { + printf("Error: Maximum number of types (%d) exceeded\n", MAX_TYPES); + abort(); + } return &TYPES[types_idx++]; }