]> 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>
Tue, 29 Jul 2025 16:06:37 +0000 (12:06 -0400)
commit5915b1a3538dd1dc92863b2e1e6d9817c04a9291
tree94ab300dcb6fcee3b01aafdd7e377c87998daaa3
parent636c0d50988472fa5a5bee2b22ed413ea39d842a
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.

(cherry picked from commit 05b6fc1eb55f30d28c3a23d8a6c2ef0a10856f46)
gcc/cobol/genapi.cc
gcc/cobol/genutil.cc
gcc/testsuite/cobol.dg/group1/declarative_1.cob