{
struct value *vsize;
mpz_t q;
- if (!type->array.vsize || type->array.static_size)
- return;
+ if (type->array.static_size)
+ return; // NOTEST
+ if (type->array.unspec && parse_time)
+ return; // NOTEST
- vsize = var_value(c, type->array.vsize);
- mpz_init(q);
- mpz_tdiv_q(q, mpq_numref(vsize->num), mpq_denref(vsize->num));
- type->array.size = mpz_get_si(q);
- mpz_clear(q);
+ if (type->array.vsize) {
+ vsize = var_value(c, type->array.vsize);
+ if (!vsize)
+ return; // NOTEST
+ mpz_init(q);
+ mpz_tdiv_q(q, mpq_numref(vsize->num), mpq_denref(vsize->num));
+ type->array.size = mpz_get_si(q);
+ mpz_clear(q);
+ }
- if (parse_time) {
+ if (parse_time && type->array.member->size) {
type->array.static_size = 1;
type->size = type->array.size * type->array.member->size;
type->align = type->array.member->align;
t->array.size = elements;
t->array.member = $<4;
t->array.vsize = NULL;
- t->array.static_size = 1;
- t->size = t->array.size * t->array.member->size;
- t->align = t->array.member->align;
} }$
| [ IDENTIFIER ] Type ${ {