diff --git a/.github/workflows/ibm.yml b/.github/workflows/ibm.yml index 7861c81a4..dec86e09c 100644 --- a/.github/workflows/ibm.yml +++ b/.github/workflows/ibm.yml @@ -71,15 +71,6 @@ jobs: run: | sed -i '/AT_SETUP(\[runtime check: write to internal storage (1)\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/run_misc.at - sed -i '/AT_SETUP(\[CALL C with callback, PROCEDURE DIVISION EXTERN\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/run_misc.at - sed -i '/AT_SETUP(\[CALL C with callback, ENTRY-CONVENTION EXTERN\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/run_misc.at - sed -i '/AT_SETUP(\[System routines for files\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/run_file.at - sed -i '/AT_SETUP(\[INDEXED file numeric keys ordering\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/run_file.at - sed -i '/AT_SETUP(\[CALL BY VALUE numeric literal with SIZE IS\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/run_extensions.at - sed -i '/AT_SETUP(\[CALL BY VALUE to C\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/run_extensions.at - sed -i '/AT_SETUP(\[EXHIBIT statement\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/run_extensions.at - sed -i '/AT_SETUP(\[EXAMINE TALLYING\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/run_extensions.at - - name: Run testsuite run: | make -C _build check TESTSUITEFLAGS="--jobs=$(($(nproc)+1))" || \ diff --git a/cobc/tree.c b/cobc/tree.c index e1c1db131..56b7ae9c1 100644 --- a/cobc/tree.c +++ b/cobc/tree.c @@ -6597,7 +6597,12 @@ cb_build_assign (const cb_tree var, const cb_tree val) p = make_tree (CB_TAG_ASSIGN, CB_CATEGORY_UNKNOWN, sizeof (struct cb_assign)); - p->var = var; + if (CB_FIELD_P (var)) { + struct cb_field *f = CB_FIELD (var); + p->var = cb_build_reference (f->name); + } else { + p->var = var; + } p->val = val; return CB_TREE (p); } diff --git a/libcob/fileio.c b/libcob/fileio.c index bc26eea21..a2ddcc846 100644 --- a/libcob/fileio.c +++ b/libcob/fileio.c @@ -7351,6 +7351,14 @@ cob_sys_read_file (unsigned char *file_handle, unsigned char *file_offset, COB_CHK_PARMS (CBL_READ_FILE, 5); +#ifdef WORDS_BIGENDIAN + /* if value is passed as numeric literal, it becomes an 'int' so value is in 4th byte */ + if (flags[0] == 0 + && flags[1] == 0 + && flags[2] == 0) + flags += 3; +#endif + memcpy (&fd, file_handle, 4); if ((*flags & 0x80) != 0) { struct stat st; @@ -7402,6 +7410,14 @@ cob_sys_write_file (unsigned char *file_handle, unsigned char *file_offset, COB_CHK_PARMS (CBL_WRITE_FILE, 5); +#ifdef WORDS_BIGENDIAN + /* if value is passed as numeric literal, it becomes an 'int' so value is in 4th byte */ + if (flags[0] == 0 + && flags[1] == 0 + && flags[2] == 0) + flags += 3; +#endif + memcpy (&fd, file_handle, 4); memcpy (&off, file_offset, 8); memcpy (&len, file_len, 4);