https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119377
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Last reconfirmed| |2025-03-21
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed. We have
Breakpoint 5, psa_FldBlob (var=0x7ffff7dd01f8)
at ../../src/gcc/gcc/cobol/genapi.cc:4078
4078 TREE_CONSTANT(array_constructor) = 1;
(gdb) p *var
$1 = {offset = 0, type = FldBlob, usage = FldInvalid, attr = 128, parent = 0,
our_index = 81, level = 0, occurs = {bounds = {lower = 0, upper = 0},
depending_on = 0, nkey = 0, keys = 0x0, indexes = {nfield = 0,
fields = 0x0}}, line = 0,
name = "_DECLARATIVE_BLOB1_", '\000' <repeats 44 times>, file = 0,
linkage = {optional = false, crv = by_default_e}, data = {memsize = 352,
capacity = 352, digits = 0, rdigits = 0, initial = 0x54e6990 "\003",
picture = 0x54e6990 "\003", etc_type = cbl_field_data_t::value_e, etc = {
val88 = {false_value = 0x7ffff6853030, domain = 0x0},
upsi_mask = 0x7ffff6853030, value = <real_cst 0x7ffff6853030>},
time_func = 0x0}, var_decl_node = <tree 0x0>, data_decl_node = <tree 0x0>,
literal_decl_node = <tree 0x0>}
so var->data.capacity == 352 but var->data.initial[] appears short.
Whether that's supposed to be longer (zero-filled?) is unclear. I'd expect
that FldBlob might include '\0'.