Skip to content

Commit

Permalink
Merge SVN 4490
Browse files Browse the repository at this point in the history
  • Loading branch information
ddeclerck committed Jun 18, 2024
1 parent 8d65081 commit e220702
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
6 changes: 6 additions & 0 deletions cobc/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,12 @@
* scanner.l: Check for typedef variable and return TYPEDEF_NAME
* parser.y: Changes to look for TYPEDEF_NAME

2021-12-14 Simon Sobisch <[email protected]>

* cobc.c (print_fields), codegen.c (output_field_display): only check for
EXTERNAL/BASED GLOBAL on level 01/77
* codegen.c (output_param): don't set external attribute for sub-fields

2021-12-08 Ron Norman <[email protected]>

* codegen.c: When setting value into COMP-X field use cob_set_compx
Expand Down
10 changes: 6 additions & 4 deletions cobc/cobc.c
Original file line number Diff line number Diff line change
Expand Up @@ -5505,10 +5505,12 @@ print_fields (struct cb_field *top, int *found)
}
}

pd_off += sprintf (print_data + pd_off, "%s%s%s",
top->flag_external ? " EXTERNAL" : "",
top->flag_is_global ? " GLOBAL" : "",
top->flag_item_based ? " BASED" : "");
if (top->level == 1 || top->level == 77) {
pd_off += sprintf (print_data + pd_off, "%s%s%s",
top->flag_external ? " EXTERNAL" : "",
top->flag_is_global ? " GLOBAL" : "",
top->flag_item_based ? " BASED" : "");
}

if (top->redefines && !top->file) {
pd_off += sprintf (print_data + pd_off, ", REDEFINES %s", top->redefines->name);
Expand Down
14 changes: 6 additions & 8 deletions cobc/codegen.c
Original file line number Diff line number Diff line change
Expand Up @@ -4202,7 +4202,6 @@ output_param (cb_tree x, int id)
{
struct cb_reference *r;
struct cb_field *f;
struct cb_field *ff;
struct cb_cast *cp;
struct cb_binary_op *bp;
struct field_list *fl;
Expand Down Expand Up @@ -4439,13 +4438,12 @@ output_param (cb_tree x, int id)

f = CB_FIELD (r->value);

ff = real_field_founder (f);

if (ff->flag_external) {
f->flag_external = 1;
f->flag_local = 1;
} else if (ff->flag_item_based) {
f->flag_local = 1;
{
struct cb_field *ff = real_field_founder (f);
if (ff->flag_external
|| ff->flag_item_based) {
f->flag_local = 1;
}
}
if (!r->subs
&& !r->offset
Expand Down

0 comments on commit e220702

Please sign in to comment.