diff --git a/gcc/cobol/parse_ante.h b/gcc/cobol/parse_ante.h index 931748d7e0fcab01175aaed105c2f346e954a1bf..223fb08f966d6163b7853c75bd0434cec21053c5 100644 --- a/gcc/cobol/parse_ante.h +++ b/gcc/cobol/parse_ante.h @@ -1841,6 +1841,18 @@ static inline cbl_field_t * new_temporary_clone( const cbl_field_t *orig) { cbl_field_type_t type = is_literal(orig)? FldAlphanumeric : orig->type; auto f = new_temporary_imply(type); + + // Dubner kludge + if( orig->type == FldGroup ) + { + cbl_name_t tname; + memcpy(tname, f->name, sizeof(cbl_name_t)); + memcpy(f, orig, sizeof(cbl_field_t)); + memcpy(f->name, tname, sizeof(cbl_name_t)); + f->attr = temporary_e; + f->var_decl_node = NULL; + f->data_decl_node = NULL; + } f->data = orig->data; parser_symbol_add(f); return f;