]> git.ipfire.org Git - thirdparty/gcc.git/commit
cobol: Repair some exception processing logic.
authorRobert Dubner <rdubner@symas.com>
Thu, 24 Apr 2025 20:26:58 +0000 (16:26 -0400)
committerRobert Dubner <rdubner@symas.com>
Thu, 24 Apr 2025 21:04:34 +0000 (17:04 -0400)
commit05b6fc1eb55f30d28c3a23d8a6c2ef0a10856f46
tree2012355f1e953b2e0b2b3ca8c8dfc4344b40c806
parent2056d52d74070f50c5f8a22e4a600fcc3974fd88
cobol: Repair some exception processing logic.

This patch changes the exception processing logic for the calculation of
reference modifications and table subscripts to be more in accordance with
ISO specifications.

It also adjusts the processing of RETURN-CODE when calling routines that
have no CALL ... RETURNING phrase.

gcc/cobol

* genapi.cc: (initialize_variable_internal): Change TRACE1 formatting.
(create_and_call): Repair RETURN-CODE processing.
(mh_source_is_group): Repair run-time IF type comparison.
(psa_FldLiteralA): Change TRACE1 formatting.
(parser_symbol_add): Eliminate unnecessary code.
* genutil.cc: Eliminate SET_EXCEPTION_CODE macro.
(get_data_offset_dest): Repair set_exception_code logic.
(get_data_offset_source): Likewise.
(get_binary_value): Likewise.
(refer_refmod_length): Likewise.
(refer_fill_depends): Likewise.
(refer_offset_dest): Likewise.
(refer_size_dest): Likewise.
(refer_offset_source): Likewise.

gcc/testsuite

* cobol.dg/group1/declarative_1.cob: Adjust for repaired exception logic.
gcc/cobol/genapi.cc
gcc/cobol/genutil.cc
gcc/testsuite/cobol.dg/group1/declarative_1.cob