]> git.ipfire.org Git - thirdparty/gcc.git/commit
cobol: Eliminate cobolworx UAT errors when compiling with -Os
authorBob Dubner <rdubner@symas.com>
Fri, 4 Apr 2025 17:48:58 +0000 (13:48 -0400)
committerRobert Dubner <rdubner@symas.com>
Fri, 4 Apr 2025 18:09:09 +0000 (14:09 -0400)
commite70fe5ed46ab129a8b1da961c47d3fb75b11b988
tree13e1a560ee583623df4e0c01d7aa5169abc61727
parent0520ef274762f100c7297efc4f230fcfc6486987
cobol: Eliminate cobolworx UAT errors when compiling with -Os

Testcases compiled with -Os were failing because static functions and static
variables were being optimized away, because of improper data type casts, and
because strict aliasing (whatever that is) was resulting in some loss of data.
These changes eliminate those known problems.

gcc/cobol

* cobol1.cc: (cobol_langhook_post_options): Implemented in order to set
flag_strict_aliasing to zero.
* genapi.cc: (set_user_status): Add comment.
(parser_intrinsic_subst): Expand SHOW_PARSE information.
(psa_global): Change names of return-code and upsi globals,
(psa_FldLiteralA): Set DECL_PRESERVE_P for FldLiteralA.
* gengen.cc: (show_type): Add POINTER type.
(gg_define_function_with_no_parameters): Set DECL_PRESERVE_P for COBOL-
style nested programs.  (gg_array_of_bytes): Fix bad cast.

libgcobol

* charmaps.h: Change __gg__data_return_code to 'short' type.
* constants.cc: Likewise.
gcc/cobol/cobol1.cc
gcc/cobol/genapi.cc
gcc/cobol/gengen.cc
libgcobol/charmaps.h
libgcobol/constants.cc