diff --git a/gcc/cobol/symbols.cc b/gcc/cobol/symbols.cc index 43383171ae4b0a62045a6fdf74fa812f67d72063..ff5c0b507ed100a9324f4fe4e75bb83991a65a40 100644 --- a/gcc/cobol/symbols.cc +++ b/gcc/cobol/symbols.cc @@ -1168,7 +1168,12 @@ grow_redefined_group( cbl_field_t *redefined, const cbl_field_t *field ) { assert(field); assert(redefined == symbol_redefines(field)); - + /* + * When this function is called, redefined elementary items are + * already resized, if eligible. + */ + if( redefined->type != FldGroup ) return false; + /* * 8) The storage area required for the subject of the entry * shall not be larger than the storage area required for the @@ -1176,7 +1181,6 @@ grow_redefined_group( cbl_field_t *redefined, const cbl_field_t *field ) { * referenced by data- name-2 has been specified with level * number 1 and without the EXTERNAL clause. */ - if( 1 < redefined->level ) { if( field_memsize(redefined) < field_memsize(field) ) { yyerrorv("error: line %d: %s (size %u) larger than REDEFINES %s (size %u)",