https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119461
Bug ID: 119461
Summary: record layout done in odd ways
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: cobol
Assignee: unassigned at gcc dot gnu.org
Reporter: rguenth at gcc dot gnu.org
Target Milestone: ---
For some reason I stumbled across gg_get_filelevel_struct_type_decl,
specifically gg_start_building_a_struct and gg_get_struct_type_decl
and gg_add_field_to_structure.
A lot of fields are manually computed/set instead of calling layout_type
at the end of the build. So possibly the code could be greatly simplified.
This is used for example for building cblc_field_t in the frontend but
the target in libgcobol uses the cblc_field_t as the C/C++ frontend lay
it out.