Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cobc/codegen.c
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ real_field_founder (const struct cb_field *f)
return (struct cb_field *)f;
}

static struct cb_field *
struct cb_field *
chk_field_variable_size (struct cb_field *f)
{
if (!f->flag_vsize_done) {
Expand Down
2 changes: 2 additions & 0 deletions cobc/tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -2372,6 +2372,7 @@ extern cb_tree cb_check_numeric_value (cb_tree);
extern size_t cb_check_index_or_handle_p (cb_tree x);
extern void cb_set_dmax (int scale);

extern int cb_is_field_unbounded (struct cb_field *);
extern void cb_set_intr_when_compiled (void);
extern void cb_build_registers (void);
extern void cb_add_external_defined_registers (void);
Expand Down Expand Up @@ -2630,6 +2631,7 @@ extern void cob_gen_optim (const enum cb_optim);
/* codegen.c */
extern void codegen (struct cb_program *, const char *);
extern void clear_local_codegen_vars (void);
extern struct cb_field *chk_field_variable_size (struct cb_field *f);
extern int cb_wants_dump_comments; /* likely to be removed later */


Expand Down
22 changes: 21 additions & 1 deletion cobc/typeck.c
Original file line number Diff line number Diff line change
Expand Up @@ -874,6 +874,22 @@ cb_check_numeric_edited_name (cb_tree x)
return cb_error_node;
}

int
cb_is_field_unbounded (struct cb_field *fld)
{
struct cb_field *f;

if (fld->flag_unbounded) {
return 1;
}
for (f = fld->children; f; f = f->sister) {
if (cb_is_field_unbounded (f)) {
return 1;
}
}
return 0;
}

cb_tree
cb_check_sum_field (cb_tree x)
{
Expand Down Expand Up @@ -12927,8 +12943,12 @@ cb_emit_move (cb_tree src, cb_tree dsts)
cb_tree l;
cb_tree x;
cb_tree m;
cb_tree svoff;
struct cb_literal *lt;
struct cb_field *f, *p;
unsigned int tempval;
struct cb_reference *r;
int bgnpos;

if (cb_check_move (src, dsts, 1)) {
return;
Expand Down Expand Up @@ -12971,7 +12991,7 @@ cb_emit_move (cb_tree src, cb_tree dsts)
continue;
}
if (!tempval) {
#if 0 /* not yet merged revs 2603+2612 */
#if 1 /* not yet merged revs 2603+2612 */
if (CB_REFERENCE_P (x)
&& CB_REFERENCE (x)->length == NULL
&& (cb_odoslide || cb_complex_odo)) {
Expand Down
Loading
Loading