https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119364
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Second bug is what I see on FUNCTION_BIGGER-POINTER__2_.cob,
if( gcobol_feature_embiggen() && redefined &&
is_numeric(redefined->type) && redefined->size() == 4) {
// For now, we allow POINTER to expand a 32-bit item to 64
bits.
field->data.capacity = sizeof(void *);
dbgmsg("%s: expanding #" HOST_SIZE_T_PRINT_UNSIGNED
" %s capacity %u => %u", __func__,
(fmt_size_t)field_index(redefined), redefined->name,
redefined->data.capacity, field->data.capacity);
redefined->embiggen();
if( redefined->data.initial ) {
auto s = xasprintf( "%s ", redefined->data.initial);
std::replace(s, s + strlen(s), '!', char(0x20));
redefined->data.initial = s;
}
}
The field->data.capacity = sizeof(void *); part is definitely wrong, I think it
needs to decide based on target's pointer size, which would be
POINTER_SIZE_UNITS (or could
TREE_INT_CST_LOW (TYPE_SIZE_UNIT (ptr_type_node))).