aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorBob Dubner <rdubner@symas.com>2025-04-04 18:33:42 -0400
committerRobert Dubner <rdubner@symas.com>2025-04-04 18:42:39 -0400
commit6602fc076a883cf0cd20a37655a6bd9c146a2770 (patch)
tree6096143c84ccf6bbcef1801252fe31b8c4a42533 /gcc
parentdb92d9e8249008f2fd928772ac27654ad5c0fbfe (diff)
downloadgcc-6602fc076a883cf0cd20a37655a6bd9c146a2770.zip
gcc-6602fc076a883cf0cd20a37655a6bd9c146a2770.tar.gz
gcc-6602fc076a883cf0cd20a37655a6bd9c146a2770.tar.bz2
cobol: Set compile-time and run-time signable_e bits the same for RETURN-CODE.
This fix reverts the recent cobol_langhook_post_options change setting flag_strict_aliasing = 0. It isn't necessary. gcc/cobol * cobol1.cc: Eliminate cobol_langhook_post_options. * symbols.cc: Definition of RETURN-CODE special register sets ::attr member to signable_e.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cobol/cobol1.cc19
-rw-r--r--gcc/cobol/symbols.cc2
2 files changed, 1 insertions, 20 deletions
diff --git a/gcc/cobol/cobol1.cc b/gcc/cobol/cobol1.cc
index d175ab1..0d07c46 100644
--- a/gcc/cobol/cobol1.cc
+++ b/gcc/cobol/cobol1.cc
@@ -646,22 +646,6 @@ cobol_get_sarif_source_language(const char *)
return "cobol";
}
-bool
-cobol_langhook_post_options(const char**)
- {
- // This flag, when set to 0, results in calls to gg_exit working properly.
- // I don't know why it is necessary. There is something going on with the
- // definition of __gg__data_return_code in constants.cc, and with how it
- // is used through var_decl_return_code in genapi.cc. Without it, the value
- // delivered to exit@PLT is zero, and not __gg__data_return_code
- // Dubner, 2025-04-04.
- flag_strict_aliasing = 0;
-
- /* Returning false means that the backend should be used. */
- return false;
- }
-
-
#undef LANG_HOOKS_BUILTIN_FUNCTION
#undef LANG_HOOKS_GETDECLS
#undef LANG_HOOKS_GLOBAL_BINDINGS_P
@@ -676,7 +660,6 @@ cobol_langhook_post_options(const char**)
////#undef LANG_HOOKS_TYPE_FOR_SIZE
#undef LANG_HOOKS_SET_DECL_ASSEMBLER_NAME
#undef LANG_HOOKS_GET_SARIF_SOURCE_LANGUAGE
-#undef LANG_HOOKS_POST_OPTIONS
// We use GCC in the name, not GNU, as others do,
// because "GnuCOBOL" refers to a different GNU project.
@@ -702,8 +685,6 @@ cobol_langhook_post_options(const char**)
#define LANG_HOOKS_GET_SARIF_SOURCE_LANGUAGE cobol_get_sarif_source_language
-#define LANG_HOOKS_POST_OPTIONS cobol_langhook_post_options
-
struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
#include "gt-cobol-cobol1.h"
diff --git a/gcc/cobol/symbols.cc b/gcc/cobol/symbols.cc
index 2373bfe..5043125 100644
--- a/gcc/cobol/symbols.cc
+++ b/gcc/cobol/symbols.cc
@@ -2350,7 +2350,7 @@ symbol_table_init(void) {
0, {}, {2,2,2,0, NULL}, NULL },
{ 0, FldNumericBin5, FldInvalid, 0, 0, 0, 0, nonarray, 0, "UPSI-0",
0, {}, {2,2,4,0, NULL}, NULL },
- { 0, FldNumericBin5, FldInvalid, 0, 0, 0, 0, nonarray, 0, "RETURN-CODE",
+ { 0, FldNumericBin5, FldInvalid, signable_e, 0, 0, 0, nonarray, 0, "RETURN-CODE",
0, {}, {2,2,4,0, NULL}, NULL },
{ 0, FldNumericBin5, FldInvalid, 0, 0, 0, 0, nonarray, 0, "LINAGE-COUNTER",
0, {}, {2,2,4,0, NULL}, NULL },