https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119364
--- Comment #24 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:c77d04506e6abdc45969d0ff146204be7485244a commit r16-362-gc77d04506e6abdc45969d0ff146204be7485244a Author: Jakub Jelinek <ja...@redhat.com> Date: Fri May 2 19:10:59 2025 +0200 cobol: Fix up exception handling [PR119364] The following patch on top of the https://gcc.gnu.org/pipermail/gcc-patches/2025-May/682500.html fixes most of the remaining make check-cobol FAILs in the i686-linux -> x86_64-linux cross-compiler. Using the testing environment detailed in https://gcc.gnu.org/pipermail/gcc-patches/2025-April/680403.html with this patch I get just cobol.dg/group1/declarative_1.cob FAILs in i686-linux -> x86_64-linux cross and no FAILs in x86_64-linux native one. The patch isn't needed just for cross-compilation with different hosts, but also on x86_64-linux/aarch64-linux native, because without it the FE is hashing padding bits which contain random garbage and making code generation decisions based on that. That is very much against the reproduceability requirements. 2025-05-02 Jakub Jelinek <ja...@redhat.com> PR cobol/119364 * structs.h (cbl_enabled_exception_type_node): New variable declaration. * structs.cc (cbl_enabled_exception_type_node): New variable. (create_cbl_enabled_exception_t): New function. (create_our_type_nodes): Initialize cbl_enabled_exception_type_node using it. * genapi.cc (stash_exceptions): Don't compare padding bits to determine if the exceptions are the same as last time. Use cbl_enabled_exception_type_node for target size and field offsets and native_encode_expr to write each field into byte sequence.