+ if ((curr == p) && IS_STRUCT(curr) && SPEC_STRUCT(curr)->type == STRUCT)
+ {
+ /* if this is a struct specifier which ends */
+ /* with an array of unspecified length then */
+ /* copy the struct and it's fields */
+ struct symbol *field = SPEC_STRUCT(curr)->fields;
+ while (field && field->next)
+ field = field->next; /* find last one */
+ if (field && IS_ARRAY(field->type) && !DCL_ELEM(field->type))
+ SPEC_STRUCT(loop) = copyStruct(SPEC_STRUCT(curr));
+ }