gawk-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] gawk branch, master, updated. gawk-4.1.0-4751-g19a1e70b


From: Arnold Robbins
Subject: [SCM] gawk branch, master, updated. gawk-4.1.0-4751-g19a1e70b
Date: Tue, 28 Jun 2022 23:14:29 -0400 (EDT)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, master has been updated
       via  19a1e70b81d91acc396ba5e34e5e681759cf7d54 (commit)
      from  6bbdfdc24df4a4ff46dee47aeb27bd9fd22acd14 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=19a1e70b81d91acc396ba5e34e5e681759cf7d54

commit 19a1e70b81d91acc396ba5e34e5e681759cf7d54
Author: Arnold D. Robbins <arnold@skeeve.com>
Date:   Wed Jun 29 06:12:14 2022 +0300

    Revert "Squashed commit of the following:"
    
    This reverts commit 6bbdfdc24df4a4ff46dee47aeb27bd9fd22acd14.

diff --git a/ChangeLog b/ChangeLog
index 28bb59ef..31d95383 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -64,46 +64,17 @@
        an array.
        (api_impl): Add hook for api_destroy_array.
 
-2022-06-03         Arnold D. Robbins     <arnold@skeeve.com>
-
-       * awk.h (elem_new_to_scalar): Add declaration.
-       * eval.c (elem_new_to_scalar): No longer static. Make it handle
-       things when valref is > 1. Returns a NODE * instead of being void.
-       (cmp_scalars): Change usage of elem_new_to_scalar().
-       * interpret.h (r_interpret): Op_push*: Make Node_elem_new into
-       a separate case, using elem_new_to_scalar().
-       * array.c (force_array): For Node_elem_new, clear symbol->stptr.
-       * eval.r (r_get_lhs): Use efree() intstead of free() in Node_elem_new
-       case.
-
 2022-06-02         Arnold D. Robbins     <arnold@skeeve.com>
 
        * builtin.c (do_sub): Fix memory corruption when substituting
        into a value that is a typed regex. Thanks to valgrind.
 
-2022-06-02         Arnold D. Robbins     <arnold@skeeve.com>
-
-       Fix a nasty memory corruption problem. Thanks to
-       Andrew Schorr for the report.
-
-       * eval.c (r_get_lhs): Handle Node_elem_new separately
-       to free the string value. This was not the problem.
-       * interpret.h (r_interpret): For Op_assign, when turning
-       Node_elem_new into the null string, DEREF the old value
-       and dupnode the new one. THIS was the problem.
-
 2022-05-24         Adam Van Scyoc        <avanscy@g.clemson.edu>
 
        * awkgram.y (make_assignable): Handle Op_field_assign.
        Avoids a core dump upon a certain kind of syntax error;
        see test/getlnfa.awk.
 
-2022-05-22         Arnold D. Robbins     <arnold@skeeve.com>
-
-       * array.c (force_array): When converting Node_elem_new to an array,
-       release the string storage. Thanks to valgrind, by way of Andrew
-       Schorr, for the report.
-
 2022-05-11         Arnold D. Robbins     <arnold@skeeve.com>
 
        * profile.c (pp_list): Typo fix in a comment.
@@ -140,86 +111,16 @@
        merged.
        * profile.c (pprint): Improve code for Op_K_switch, Op_K_case.
 
-2022-04-20         Arnold D. Robbins     <arnold@skeeve.com>
-
-       * mpfr.c (mpg_force_number): Small whitespace fix.
-       * node.c (r_force_number): Ditto.
-
 2022-04-18         Arnold D. Robbins     <arnold@skeeve.com>
 
        * gawkbug.in: Small changes.
 
-2022-04-06         Arnold D. Robbins     <arnold@skeeve.com>
-
-       Further cleanups.
-
-       * array.c (new_array_element): Set s->stfmt to STFMT_UNUSED.
-       * awk.h (force_string_fmt): No need to set s->stfmt anymore.
-       * builtin.c (do_typeof): Collapse Node_var_new and Node_elem_new
-       cases.
-       * symbol.c (print_vars): Node_elem_new can't be in a top level
-       variable. Remove check and add a call to cant_happen if some
-       other node type is received.
-       * NEWS: Updated.
-
 2022-04-01         Arnold D. Robbins     <arnold@skeeve.com>
 
        Small fix from the persistent-gawk guys.
 
        * profile.c (pprint): Use estrdup instead of strdup.
 
-2022-03-31         Arnold D. Robbins     <arnold@skeeve.com>
-
-       * array.c (new_array_element): Make a full null string instead of
-       an empty node; it can be more easily converted to scalar that way.
-       * awk.h (force_string_fmt): Change the node type, remove NUMBER flag,
-       set STFMT_UNUSED.
-       * cint_array.c (lear_clear): Remove check for not equal Node_elem_new.
-       * int_array.c (int_clear): Ditto.
-       * str_array.c (str_clear): Ditto.
-       * eval.c (elem_new_to_scalar): Now only needs to change the node type.
-       * interpret.h (r_interpret): Treat Node_elem_new like Node_val, and
-       UPREF it when pushed. Remove test before DEREFing when popping.
-       * mpfr.c (mpg_force_number): Simplify converting Node_elem_new to
-       Node_val. Fix the string value.
-       * node.c (r_force_number): Ditto.
-
-2022-03-28         Arnold D. Robbins     <arnold@skeeve.com>
-
-       Allow unreferenced array elements to turn into subarrays.
-
-       * awk.h (Node_elem_new): New node type.
-       (new_array_element): Add declaration.
-       (POP_ARRAY): Handle Node_elem_new.
-       (force_string_fmt): Ditto. Make sure valref has the right value.
-       * array.c (force_array): Handle Node_elem_new.
-       (do_sort_up_value_type): Ditto.
-       (new_array_element): New function, creates Node_elem_new node.
-       * builtin.c (do_length): Handle Node_elem_new.
-       (do_typeof): Ditto.
-       * cint_array.c (leaf_lookup): Use new_array_element() when creating
-       a new element.
-       (left_clear): Don't unref Node_elem_new.
-       * debug.c (print_symbol, do_set_var,watchpont_triggered,
-       initialize_watch_item, print_memory, do_print_f): Handle Node_elem_new.
-       * eval.c (nodetypes): Add Node_elem_new.
-       (r_get_lhs, setup_frame): Handle Node_elem_new.
-       (elem_new_to_scalar): New function.
-       (cmp_scalars): Use elem_new_to_scalar.
-       * ext.c (get_actual_argument): Handle Node_elem_new.
-       * gawkapi.c (api_get_argument, api_set_argument, node_to_awk_value,
-       api_sym_update): Handle Node_elem_new.
-       * int_array.c (int_clear): Don't unref Node_elem_new.
-       (int_insert): Use new_array_element() when creating a new element.
-       * interpret.h (r_interpret): Handle Node_elem_new as appropriate.
-       * mpfr.c (mpg_force_number): Handle Node_elem_new.Make sure valref has
-       the right value.
-       * node.c (r_force_number): Ditto.
-       * str_array.c (str_lookup): Use new_array_element() when creating a
-       new element.
-       (str_clear): Don't unref Node_elem_new.
-       * symbol.c (print_vars): Handle Node_elem_new.
-
 2022-03-27         Arnold D. Robbins     <arnold@skeeve.com>
 
        Allow nested indirect function calls. Thanks to
diff --git a/NEWS b/NEWS
index 3e8f5673..1f7f66e6 100644
--- a/NEWS
+++ b/NEWS
@@ -49,9 +49,6 @@ allowing gawk to preserve the contents of its variables and 
arrays
 between runs. THIS IS AN EXPERIMENTAL FEATURE!  For more information,
 see the manual.
 
-10. Some subtle issues with untyped array elements being passed to
-functions have been fixed.
-
 Changes from 5.1.1 to 5.1.2
 ---------------------------
 
diff --git a/array.c b/array.c
index 4361b51c..cbed1254 100644
--- a/array.c
+++ b/array.c
@@ -315,7 +315,7 @@ array_vname(const NODE *symbol)
 
 /*
  *  force_array --- proceed to the actual Node_var_array,
- *     change Node_var_new or Node_elem_new to an array.
+ *     change Node_var_new to an array.
  *     If canfatal and type isn't good, die fatally,
  *     otherwise return the final actual value.
  */
@@ -334,11 +334,6 @@ force_array(NODE *symbol, bool canfatal)
        }
 
        switch (symbol->type) {
-       case Node_elem_new:
-               efree(symbol->stptr);
-               symbol->stptr = NULL;
-               symbol->stlen = 0;
-               /* fall through */
        case Node_var_new:
                symbol->xarray = NULL;  /* make sure union is as it should be */
                null_array(symbol);
@@ -1171,7 +1166,6 @@ do_sort_up_value_type(const void *p1, const void *p2)
                Node_func,
                Node_ext_func,
                Node_var_new,
-               Node_elem_new,
                Node_var,
                Node_var_array,
                Node_val,
@@ -1435,26 +1429,3 @@ assoc_list(NODE *symbol, const char *sort_str, 
sort_context_t sort_ctxt)
 
        return list;
 }
-
-/* new_array_element --- return a new empty element node */
-
-NODE *
-new_array_element(void)
-{
-       NODE *n = make_number(0.0);
-       char *sp;
-
-       emalloc(sp, char *, 2, "new_array_element");
-       sp[0] = sp[1] = '\0';
-
-       n->stptr = sp;
-       n->stlen = 0;
-       n->stfmt = STFMT_UNUSED;
-
-       n->flags |= (MALLOC|STRING|STRCUR);
-
-       n->type = Node_elem_new;
-       n->valref = 1;
-
-       return n;
-}
diff --git a/awk.h b/awk.h
index 6ff88677..f89b0866 100644
--- a/awk.h
+++ b/awk.h
@@ -258,7 +258,6 @@ typedef enum nodevals {
        Node_var,               /* scalar variable, lnode is value */
        Node_var_array,         /* array is ptr to elements, table_size num of 
eles */
        Node_var_new,           /* newly created variable, may become an array 
*/
-       Node_elem_new,          /* newly created array element, may become a 
subarray */
        Node_param_list,        /* lnode is a variable, rnode is more list */
        Node_func,              /* lnode is param. list, rnode is body */
        Node_ext_func,          /* extension function, code_ptr is builtin code 
*/
@@ -1446,7 +1445,6 @@ extern NODE *do_asorti(int nargs);
 extern unsigned long (*hash)(const char *s, size_t len, unsigned long hsize, 
size_t *code);
 extern void init_env_array(NODE *env_node);
 extern void init_argv_array(NODE *argv_node, NODE *shadow_node);
-extern NODE *new_array_element(void);
 /* awkgram.c */
 extern NODE *variable(int location, char *name, NODETYPE type);
 extern int parse_program(INSTRUCTION **pcode, bool from_eval);
@@ -1561,7 +1559,6 @@ extern STACK_ITEM *grow_stack(void);
 extern void dump_fcall_stack(FILE *fp);
 extern int register_exec_hook(Func_pre_exec preh, Func_post_exec posth);
 extern NODE **r_get_field(NODE *n, Func_ptr *assign, bool reference);
-extern NODE *elem_new_to_scalar(NODE *n);
 /* ext.c */
 extern NODE *do_ext(int nargs);
 void load_ext(const char *lib_name);   /* temporary */
@@ -1852,8 +1849,7 @@ POP_ARRAY(bool check_for_untyped)
        NODE *t = POP();
        static bool warned = false;
 
-       if (do_lint && ! warned && check_for_untyped
-           && (t->type == Node_var_new || t->type == Node_elem_new)) {
+       if (do_lint && ! warned && check_for_untyped && t->type == 
Node_var_new) {
                warned = true;
                lintwarn(_("behavior of `for' loop on untyped variable is not 
defined by POSIX"));
        }
@@ -1946,13 +1942,6 @@ dupnode(NODE *n)
 static inline NODE *
 force_string_fmt(NODE *s, const char *fmtstr, int fmtidx)
 {
-       if (s->type == Node_elem_new) {
-               s->type = Node_val;
-               s->flags &= ~NUMBER;
-
-               return s;
-       }
-
        if ((s->flags & STRCUR) != 0
                && (s->stfmt == STFMT_UNUSED || (s->stfmt == fmtidx
 #ifdef HAVE_MPFR
diff --git a/builtin.c b/builtin.c
index 75825742..3a38a478 100644
--- a/builtin.c
+++ b/builtin.c
@@ -591,7 +591,7 @@ do_length(int nargs)
 
                size = assoc_length(tmp);
                return make_number(size);
-       } else if (tmp->type == Node_var_new || tmp->type == Node_elem_new) {
+       } else if (tmp->type == Node_var_new) {
                // this can happen from an indirect call
                DEREF(tmp);
                tmp = dupnode(Nnull_string);
@@ -4342,7 +4342,6 @@ do_typeof(int nargs)
                }
                break;
        case Node_var_new:
-       case Node_elem_new:
                res = "untyped";
                deref = false;
                break;
diff --git a/cint_array.c b/cint_array.c
index 3e0393c9..91947766 100644
--- a/cint_array.c
+++ b/cint_array.c
@@ -1068,7 +1068,7 @@ leaf_lookup(NODE *symbol, NODE *array, long k, long size, 
long base)
        lhs = array->nodes + (k - base); /* leaf element */
        if (*lhs == NULL) {
                array->table_size++;    /* one more element in leaf array */
-               *lhs = new_array_element();
+               *lhs = dupnode(Nnull_string);
        }
        return lhs;
 }
diff --git a/debug.c b/debug.c
index f602a199..2849a4c1 100644
--- a/debug.c
+++ b/debug.c
@@ -967,9 +967,6 @@ print_symbol(NODE *r, bool isparam)
        case Node_var_new:
                fprintf(out_fp, "untyped variable\n");
                break;
-       case Node_elem_new:
-               fprintf(out_fp, "untyped element\n");
-               break;
        case Node_var:
                if (! isparam && r->var_update)
                        r->var_update();
@@ -1244,7 +1241,6 @@ do_set_var(CMDARG *arg, int cmd ATTRIBUTE_UNUSED)
 
                switch (r->type) {
                case Node_var_new:
-               case Node_elem_new:
                        r->type = Node_var;
                        r->var_value = dupnode(Nnull_string);
                        /* fall through */
@@ -1734,7 +1730,6 @@ watchpoint_triggered(struct list_item *w)
                        t2 = symbol;
                        break;
                case Node_var_new:
-               case Node_elem_new:
                        break;
                default:
                        cant_happen("unexpected symbol type %s", 
nodetype2str(symbol->type));
@@ -1811,7 +1806,7 @@ initialize_watch_item(struct list_item *w)
                r = *get_field(field_num, NULL);
                w->cur_value = dupnode(r);
        } else {
-               if (symbol->type == Node_var_new || symbol->type == 
Node_elem_new)
+               if (symbol->type == Node_var_new)
                        w->cur_value = (NODE *) 0;
                else if (symbol->type == Node_var) {
                        r = symbol->var_value;
@@ -3758,10 +3753,6 @@ print_memory(NODE *m, NODE *func, Func_print print_func, 
FILE *fp)
                print_func(fp, "%s", m->vname);
                break;
 
-       case Node_elem_new:
-               print_func(fp, "element - %p", m);
-               break;
-
        default:
                print_func(fp, "?");  /* can't happen */
        }
@@ -5118,7 +5109,7 @@ do_print_f(CMDARG *arg, int cmd ATTRIBUTE_UNUSED)
                        r = find_symbol(name, NULL);
                        if (r == NULL)
                                goto done;
-                       if (r->type == Node_var_new || r->type == Node_elem_new)
+                       if (r->type == Node_var_new)
                                tmp[i] = Nnull_string;
                        else if (r->type != Node_var) {
                                d_error(_("`%s' is not a scalar variable"), 
name);
diff --git a/eval.c b/eval.c
index e292cab6..c6f8bcb9 100644
--- a/eval.c
+++ b/eval.c
@@ -238,7 +238,6 @@ static const char *const nodetypes[] = {
        "Node_var",
        "Node_var_array",
        "Node_var_new",
-       "Node_elem_new",
        "Node_param_list",
        "Node_func",
        "Node_ext_func",
@@ -1168,14 +1167,6 @@ r_get_lhs(NODE *n, bool reference)
                n->var_value = dupnode(Nnull_string);
                break;
 
-       case Node_elem_new:
-               efree(n->stptr);
-               n->stptr = NULL;
-               n->stlen = 0;
-               n->type = Node_var;
-               n->var_value = dupnode(Nnull_string);
-               break;
-
        case Node_var:
                break;
 
@@ -1322,7 +1313,6 @@ setup_frame(INSTRUCTION *pc)
                switch (m->type) {
                case Node_var_new:
                case Node_var_array:
-               case Node_elem_new:
                        r->type = Node_array_ref;
                        r->orig_array = r->prev_array = m;
                        break;
@@ -1544,10 +1534,6 @@ cmp_scalars(scalar_cmp_t comparison_type)
 
        t2 = POP_SCALAR();
        t1 = TOP();
-
-       t1 = elem_new_to_scalar(t1);
-       t2 = elem_new_to_scalar(t2);
-
        if (t1->type == Node_var_array) {
                DEREF(t2);
                fatal(_("attempt to use array `%s' in a scalar context"), 
array_vname(t1));
@@ -1886,20 +1872,3 @@ init_interpret()
                interpret = r_interpret;
 }
 
-/* elem_new_to_scalar --- convert Node_elem_new to untyped scalar */
-
-NODE *
-elem_new_to_scalar(NODE *n)
-{
-       if (n->type != Node_elem_new)
-               return n;
-
-       if (n->valref > 1) {
-               unref(n);
-               return dupnode(Nnull_string);
-       }
-
-       n->type = Node_val;
-
-       return n;
-}
diff --git a/ext.c b/ext.c
index 3d643c01..30e52aae 100644
--- a/ext.c
+++ b/ext.c
@@ -200,7 +200,7 @@ get_actual_argument(NODE *t, int i, bool want_array)
        pc = TOP()->code_ptr;   /* Op_ext_builtin instruction */
        fname = (pc + 1)->func_name;
 
-       if (t->type == Node_var_new || t->type == Node_elem_new) {
+       if (t->type == Node_var_new) {
                if (want_array)
                        return force_array(t, false);
                else {
diff --git a/gawkapi.c b/gawkapi.c
index 93cd9b15..01157d52 100644
--- a/gawkapi.c
+++ b/gawkapi.c
@@ -69,7 +69,7 @@ api_get_argument(awk_ext_id_t id, size_t count,
                return awk_false;
 
        /* if type is undefined */
-       if (arg->type == Node_var_new || arg->type == Node_elem_new) {
+       if (arg->type == Node_var_new) {
                if (wanted == AWK_UNDEFINED)
                        return awk_true;
                else if (wanted == AWK_ARRAY) {
@@ -124,7 +124,7 @@ api_set_argument(awk_ext_id_t id,
                return awk_false;
 
        if (   (arg = get_argument(count)) == NULL
-           || (arg->type != Node_var_new && arg->type != Node_elem_new))
+           || arg->type != Node_var_new)
                return awk_false;
 
        arg = get_array_argument(arg, count);
@@ -564,7 +564,6 @@ node_to_awk_value(NODE *node, awk_value_t *val, 
awk_valtype_t wanted)
 
        switch (node->type) {
        case Node_var_new:      /* undefined variable */
-       case Node_elem_new:     /* undefined element */
                val->val_type = AWK_UNDEFINED;
                if (wanted == AWK_UNDEFINED) {
                        ret = awk_true;
@@ -897,13 +896,10 @@ api_sym_update(awk_ext_id_t id,
 
        efree((void *) full_name);
 
-       if ((node->type == Node_var && value->val_type != AWK_ARRAY)
-           || node->type == Node_var_new
-           || node->type == Node_elem_new) {
+       if ((node->type == Node_var && value->val_type != AWK_ARRAY) || 
node->type == Node_var_new) {
                unref(node->var_value);
                node->var_value = awk_value_to_node(value);
-               if ((node->type == Node_var_new || node->type == Node_elem_new)
-                   && value->val_type != AWK_UNDEFINED)
+               if (node->type == Node_var_new && value->val_type != 
AWK_UNDEFINED)
                        node->type = Node_var;
 
                return awk_true;
diff --git a/int_array.c b/int_array.c
index 8752413e..382aa799 100644
--- a/int_array.c
+++ b/int_array.c
@@ -792,7 +792,7 @@ int_insert(NODE *symbol, long k, uint32_t hash1)
        }
 
        b->ainum[i] = k;
-       b->aivalue[i] = new_array_element();
+       b->aivalue[i] = dupnode(Nnull_string);
        b->aicount++;
        return & b->aivalue[i];
 }
diff --git a/interpret.h b/interpret.h
index 29fc7fce..bed2dfe8 100644
--- a/interpret.h
+++ b/interpret.h
@@ -224,20 +224,6 @@ uninitialized_scalar:
                                                                
save_symbol->vname);
                                if (op != Op_push_arg_untyped)
                                        m = dupnode(Nnull_string);
-                               UPREF(m);
-                               PUSH(m);
-                               break;
-
-                       case Node_elem_new:
-                               if (op != Op_push_arg_untyped) {
-                                       /* convert untyped to scalar */
-                                       m = elem_new_to_scalar(m);
-                               }
-                               if (do_lint)
-                                       lintwarn(isparam ?
-                                               _("reference to uninitialized 
argument `%s'") :
-                                               _("reference to uninitialized 
variable `%s'"),
-                                                               
save_symbol->vname);
                                PUSH(m);
                                break;
 
@@ -334,7 +320,7 @@ uninitialized_scalar:
                                }
                        }
 
-                       if (r->type == Node_val || r->type == Node_elem_new)
+                       if (r->type == Node_val)
                                UPREF(r);
                        PUSH(r);
                        break;
@@ -367,11 +353,6 @@ uninitialized_scalar:
                                t2 = force_string(t2);
                                r->vname = estrdup(t2->stptr, t2->stlen);       
/* the subscript in parent array */
                                assoc_set(t1, t2, r);
-                       } else if (r->type == Node_elem_new) {
-                               r = force_array(r, false);
-                               r->parent_array = t1;
-                               t2 = force_string(t2);
-                               r->vname = estrdup(t2->stptr, t2->stlen);       
/* the subscript in parent array */
                        } else if (r->type != Node_var_array) {
                                t2 = force_string(t2);
                                fatal(_("attempt to use scalar `%s[\"%.*s\"]' 
as an array"),
@@ -408,7 +389,7 @@ uninitialized_scalar:
                         * be stored in SYMTAB:
                         *      1. Variables that don"t yet have a value 
(Node_var_new)
                         *      2. Variables that have a value (Node_var)
-                        *      3. Values that awk code stuck into SYMTAB not 
related to variables (Node_val)
+                        *      3. Values that awk code stuck into SYMTAB not 
related to variables (Node_value)
                         * For 1, since we are giving it a value, we have to 
change the type to Node_var.
                         * For 1 and 2, we have to step through the Node_var to 
get to the value.
                         * For 3, we fatal out. This avoids confusion on things 
like
@@ -732,7 +713,7 @@ mod:
                         * SYMTAB is a little more messy.  Three possibilities 
for SYMTAB:
                         *      1. Variables that don"t yet have a value 
(Node_var_new)
                         *      2. Variables that have a value (Node_var)
-                        *      3. Values that awk code stuck into SYMTAB not 
related to variables (Node_val)
+                        *      3. Values that awk code stuck into SYMTAB not 
related to variables (Node_value)
                         * For 1, since we are giving it a value, we have to 
change the type to Node_var.
                         * For 1 and 2, we have to step through the Node_var to 
get to the value.
                         * For 3, we fatal out. This avoids confusion on things 
like
@@ -863,10 +844,6 @@ mod:
                        lhs = POP_ADDRESS();
                        r = TOP_SCALAR();
                        unref(*lhs);
-                       if (r->type == Node_elem_new) {
-                               DEREF(r);
-                               r = dupnode(Nnull_string);
-                       }
                        UPREF(r);
                        UNFIELD(*lhs, r);
                        REPLACE(r);
@@ -1097,7 +1074,7 @@ arrayfor:
                        (void) POP_CODE();
                        while (arg_count-- > 0) {
                                t1 = POP();
-                               if (t1->type == Node_val || t1->type == 
Node_elem_new)
+                               if (t1->type == Node_val)
                                        DEREF(t1);
                        }
                        free_api_string_copies();
diff --git a/mpfr.c b/mpfr.c
index a8834c39..7f61b692 100644
--- a/mpfr.c
+++ b/mpfr.c
@@ -349,15 +349,6 @@ mpg_force_number(NODE *n)
 {
        char *cp, *cpend;
 
-       if (n->type == Node_elem_new) {
-               n->type = Node_val;
-               n->flags &= ~STRING;
-               n->stptr[0] = '0';      // STRCUR is still set
-               n->stlen = 1;
-
-               return n;
-       }
-
        if ((n->flags & NUMCUR) != 0)
                return n;
        n->flags |= NUMCUR;
diff --git a/node.c b/node.c
index 904e3d08..cbf5c56e 100644
--- a/node.c
+++ b/node.c
@@ -61,15 +61,6 @@ r_force_number(NODE *n)
        char save;
        char *ptr;
 
-       if (n->type == Node_elem_new) {
-               n->type = Node_val;
-               n->flags &= ~STRING;
-               n->stptr[0] = '0';      // STRCUR is still set
-               n->stlen = 1;
-
-               return n;
-       }
-
        if ((n->flags & NUMCUR) != 0)
                return n;
 
diff --git a/pc/ChangeLog b/pc/ChangeLog
index 15287b22..e012e4b3 100644
--- a/pc/ChangeLog
+++ b/pc/ChangeLog
@@ -1,7 +1,3 @@
-2022-06-02         Arnold D. Robbins     <arnold@skeeve.com>
-
-       * Makefile.tst: Regenerated.
-
 2022-05-24         Adam Van Scyoc        <avanscy@g.clemson.edu>
 
        * Makefile.tst: Regenerated.
@@ -22,10 +18,6 @@
 
        * Makefile.tst: Regenerated.
 
-2022-03-28         Arnold D. Robbins     <arnold@skeeve.com>
-
-       * Makefile.tst: Regenerated.
-
 2022-03-27         Arnold D. Robbins     <arnold@skeeve.com>
 
        * Makefile.tst: Regenerated.
diff --git a/pc/Makefile.tst b/pc/Makefile.tst
index 54d86dca..e07a22ed 100644
--- a/pc/Makefile.tst
+++ b/pc/Makefile.tst
@@ -202,7 +202,6 @@ GAWK_EXT_TESTS = \
        indirectcall3 indirectbuiltin2 \
        inf-nan-torture intarray iolint isarrayunset lint lintexp \
        lintindex lintint lintlength lintold lintplus lintset lintwarn \
-       mdim1 mdim2 mdim3 \
        manyfiles match1 match2 match3 mbstr1 mbstr2 mixed1 mktime \
        modifiers muldimposix nastyparm negtime next nondec nondec2 \
        nonfatal1 nonfatal2 nonfatal3 nsawk1a nsawk1b nsawk1c nsawk2a \
@@ -3008,21 +3007,6 @@ lintwarn:
        @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  --lint >_$@ 2>&1 || echo EXIT 
CODE: $$? >>_$@
        @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
 
-mdim1:
-       @echo $@
-       @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
-       @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-
-mdim2:
-       @echo $@
-       @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
-       @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-
-mdim3:
-       @echo $@
-       @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
-       @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-
 match1:
        @echo $@
        @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
diff --git a/str_array.c b/str_array.c
index 101ad0b9..08704312 100644
--- a/str_array.c
+++ b/str_array.c
@@ -217,7 +217,7 @@ str_lookup(NODE *symbol, NODE *subs)
        b->ahname = subs;
        b->ahname_str = subs->stptr;
        b->ahname_len = subs->stlen;
-       b->ahvalue = new_array_element();
+       b->ahvalue = dupnode(Nnull_string);
        b->ahcode = code1;
        return & (b->ahvalue);
 }
diff --git a/symbol.c b/symbol.c
index d8a8b49f..5ac5656d 100644
--- a/symbol.c
+++ b/symbol.c
@@ -497,8 +497,6 @@ print_vars(NODE **table, int (*print_func)(FILE *, const 
char *, ...), FILE *fp)
                        print_func(fp, "untyped variable\n");
                else if (r->type == Node_var)
                        valinfo(r->var_value, print_func, fp);
-               else
-                       cant_happen("unexpected node type: %s", 
nodetype2str(r->type));
        }
 }
 
diff --git a/test/ChangeLog b/test/ChangeLog
index 7bd6b3c8..3f263224 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,8 +1,3 @@
-2022-06-02         Arnold D. Robbins     <arnold@skeeve.com>
-
-       * Makefile.am (EXTRA_DIST): mdim3: new test.
-       * mdim3.awk, mdim3.ok: New files.
-
 2022-05-24         Adam Van Scyoc        <avanscy@g.clemson.edu>
 
        * Makefile.am (EXTRA_DIST): getlnfa, new test.
@@ -33,19 +28,10 @@
        * profile5.ok, profile10.ok, profile11.ok: Updated after code changes.
        * profile17.awk, profile17.ok: New files.
 
-2022-03-31         Arnold D. Robbins     <arnold@skeeve.com>
-
-       * aadelete1.awk, aadelete1.ok: Changed to sync with code changes.
-
 2022-03-30         Arnold D. Robbins     <arnold@skeeve.com>
 
        * delarprm2.awk, delarprm2.ok: Changes to make test more helpful.
 
-2022-03-27         Arnold D. Robbins     <arnold@skeeve.com>
-
-       * Makefile.am (EXTRA_DIST): mdim1, mdim2: new tests.
-       * mdim1.awk, mdim1.ok, mdim2.awk, mdim2.ok: New files.
-
 2022-03-27         Arnold D. Robbins     <arnold@skeeve.com>
 
        * Makefile.am (EXTRA_DIST): indirectcall3, new test.
diff --git a/test/Makefile.am b/test/Makefile.am
index fe4872f9..fd73e646 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -678,12 +678,6 @@ EXTRA_DIST = \
        manglprm.ok \
        manyfiles.awk \
        manyfiles.ok \
-       mdim1.awk \
-       mdim1.ok \
-       mdim2.awk \
-       mdim2.ok \
-       mdim3.awk \
-       mdim3.ok \
        modifiers.sh \
        modifiers.ok \
        muldimposix.awk \
@@ -1482,7 +1476,6 @@ GAWK_EXT_TESTS = \
        indirectcall3 indirectbuiltin2 \
        inf-nan-torture intarray iolint isarrayunset lint lintexp \
        lintindex lintint lintlength lintold lintplus lintset lintwarn \
-       mdim1 mdim2 mdim3 \
        manyfiles match1 match2 match3 mbstr1 mbstr2 mixed1 mktime \
        modifiers muldimposix nastyparm negtime next nondec nondec2 \
        nonfatal1 nonfatal2 nonfatal3 nsawk1a nsawk1b nsawk1c nsawk2a \
diff --git a/test/Makefile.in b/test/Makefile.in
index f838d388..2673a17b 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -945,12 +945,6 @@ EXTRA_DIST = \
        manglprm.ok \
        manyfiles.awk \
        manyfiles.ok \
-       mdim1.awk \
-       mdim1.ok \
-       mdim2.awk \
-       mdim2.ok \
-       mdim3.awk \
-       mdim3.ok \
        modifiers.sh \
        modifiers.ok \
        muldimposix.awk \
@@ -1749,7 +1743,6 @@ GAWK_EXT_TESTS = \
        indirectcall3 indirectbuiltin2 \
        inf-nan-torture intarray iolint isarrayunset lint lintexp \
        lintindex lintint lintlength lintold lintplus lintset lintwarn \
-       mdim1 mdim2 mdim3 \
        manyfiles match1 match2 match3 mbstr1 mbstr2 mixed1 mktime \
        modifiers muldimposix nastyparm negtime next nondec nondec2 \
        nonfatal1 nonfatal2 nonfatal3 nsawk1a nsawk1b nsawk1c nsawk2a \
@@ -4718,21 +4711,6 @@ lintwarn:
        @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  --lint >_$@ 2>&1 || echo EXIT 
CODE: $$? >>_$@
        @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
 
-mdim1:
-       @echo $@
-       @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
-       @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-
-mdim2:
-       @echo $@
-       @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
-       @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-
-mdim3:
-       @echo $@
-       @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
-       @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-
 match1:
        @echo $@
        @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
diff --git a/test/Maketests b/test/Maketests
index 3015eb34..899b4ec7 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -1728,21 +1728,6 @@ lintwarn:
        @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  --lint >_$@ 2>&1 || echo EXIT 
CODE: $$? >>_$@
        @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
 
-mdim1:
-       @echo $@
-       @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
-       @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-
-mdim2:
-       @echo $@
-       @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
-       @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-
-mdim3:
-       @echo $@
-       @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
-       @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-
 match1:
        @echo $@
        @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
diff --git a/test/aadelete1.awk b/test/aadelete1.awk
index 158d2aa3..2484a057 100644
--- a/test/aadelete1.awk
+++ b/test/aadelete1.awk
@@ -8,7 +8,7 @@ BEGIN {
        print length(a), length(a[1])
        delete a
        print length(a), length(a[1]), length(a)
-       a[1][1] = 11    # this used to fatal, now it no longer does.
+       a[1][1] = 11
 }
 
 function f(c, b) {
diff --git a/test/aadelete1.ok b/test/aadelete1.ok
index c3e29d26..d4b678b5 100644
--- a/test/aadelete1.ok
+++ b/test/aadelete1.ok
@@ -2,3 +2,5 @@
 1
 1 1
 0 0 1
+gawk: aadelete1.awk:11: fatal: attempt to use scalar `a["1"]' as an array
+EXIT CODE: 2
diff --git a/test/mdim1.awk b/test/mdim1.awk
deleted file mode 100644
index c1f398d6..00000000
--- a/test/mdim1.awk
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN {
-       print "typeof(x[0]) is", typeof(x[0])
-       x[1] = x[0]
-       print "typeof(x[1]) is", typeof(x[1])
-       x[0][1] = "xx"
-       print "typeof(x[0]) is", typeof(x[0])
-       print "typeof(x[0][1]) is", typeof(x[0][1])
-       print "typeof(y) is", typeof(y)
-       z = y
-       print "typeof(y) is", typeof(y)
-       print "typeof(z) is", typeof(z)
-
-       x[1][0] = "xx"  # this will fatal
-       print x[1][0]
-}
diff --git a/test/mdim1.ok b/test/mdim1.ok
deleted file mode 100644
index 1247fab1..00000000
--- a/test/mdim1.ok
+++ /dev/null
@@ -1,9 +0,0 @@
-typeof(x[0]) is untyped
-typeof(x[1]) is unassigned
-typeof(x[0]) is array
-typeof(x[0][1]) is string
-typeof(y) is untyped
-typeof(y) is unassigned
-typeof(z) is unassigned
-gawk: mdim1.awk:13: fatal: attempt to use scalar `x["1"]' as an array
-EXIT CODE: 2
diff --git a/test/mdim2.awk b/test/mdim2.awk
deleted file mode 100644
index 7bc0c127..00000000
--- a/test/mdim2.awk
+++ /dev/null
@@ -1,9 +0,0 @@
-BEGIN {
-       p(a[0])
-       print a[0][0]
-}
-
-function p(f)
-{
-       f[0] = 1
-}
diff --git a/test/mdim2.ok b/test/mdim2.ok
deleted file mode 100644
index d00491fd..00000000
--- a/test/mdim2.ok
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/test/mdim3.awk b/test/mdim3.awk
deleted file mode 100644
index 3cd56b61..00000000
--- a/test/mdim3.awk
+++ /dev/null
@@ -1,29 +0,0 @@
-BEGIN {
-   inp[0] = "blah"
-   inp[1] = "blah"
-   inp[2] = ""
-   inp[3] = "Summary Statistics"
-   inp[4] = "temperature,0"
-   inp[5] = "rain,1"
-
-   for (i = 1; i <= 40; i++) {
-      print "i =", i
-      mode = 0
-      nr = 0
-      delete val
-      for (j = 0; j < 6; j++) {
-        x = inp[j]
-        print "\tj =", j
-#       if (i == 27 && j == 3)
-#              stopme()
-        nf = split(x,f,",")
-        print "\tnf =", nf
-        if (++nr > 1) {
-           if (!nf)
-              mode = 1
-           else if (mode == 1)
-              val[f[1]] = f[2]
-        }
-      }
-   }
-}
diff --git a/test/mdim3.ok b/test/mdim3.ok
deleted file mode 100644
index a8f05990..00000000
--- a/test/mdim3.ok
+++ /dev/null
@@ -1,520 +0,0 @@
-i = 1
-       j = 0
-       nf = 1
-       j = 1
-       nf = 1
-       j = 2
-       nf = 0
-       j = 3
-       nf = 1
-       j = 4
-       nf = 2
-       j = 5
-       nf = 2
-i = 2
-       j = 0
-       nf = 1
-       j = 1
-       nf = 1
-       j = 2
-       nf = 0
-       j = 3
-       nf = 1
-       j = 4
-       nf = 2
-       j = 5
-       nf = 2
-i = 3
-       j = 0
-       nf = 1
-       j = 1
-       nf = 1
-       j = 2
-       nf = 0
-       j = 3
-       nf = 1
-       j = 4
-       nf = 2
-       j = 5
-       nf = 2
-i = 4
-       j = 0
-       nf = 1
-       j = 1
-       nf = 1
-       j = 2
-       nf = 0
-       j = 3
-       nf = 1
-       j = 4
-       nf = 2
-       j = 5
-       nf = 2
-i = 5
-       j = 0
-       nf = 1
-       j = 1
-       nf = 1
-       j = 2
-       nf = 0
-       j = 3
-       nf = 1
-       j = 4
-       nf = 2
-       j = 5
-       nf = 2
-i = 6
-       j = 0
-       nf = 1
-       j = 1
-       nf = 1
-       j = 2
-       nf = 0
-       j = 3
-       nf = 1
-       j = 4
-       nf = 2
-       j = 5
-       nf = 2
-i = 7
-       j = 0
-       nf = 1
-       j = 1
-       nf = 1
-       j = 2
-       nf = 0
-       j = 3
-       nf = 1
-       j = 4
-       nf = 2
-       j = 5
-       nf = 2
-i = 8
-       j = 0
-       nf = 1
-       j = 1
-       nf = 1
-       j = 2
-       nf = 0
-       j = 3
-       nf = 1
-       j = 4
-       nf = 2
-       j = 5
-       nf = 2
-i = 9
-       j = 0
-       nf = 1
-       j = 1
-       nf = 1
-       j = 2
-       nf = 0
-       j = 3
-       nf = 1
-       j = 4
-       nf = 2
-       j = 5
-       nf = 2
-i = 10
-       j = 0
-       nf = 1
-       j = 1
-       nf = 1
-       j = 2
-       nf = 0
-       j = 3
-       nf = 1
-       j = 4
-       nf = 2
-       j = 5
-       nf = 2
-i = 11
-       j = 0
-       nf = 1
-       j = 1
-       nf = 1
-       j = 2
-       nf = 0
-       j = 3
-       nf = 1
-       j = 4
-       nf = 2
-       j = 5
-       nf = 2
-i = 12
-       j = 0
-       nf = 1
-       j = 1
-       nf = 1
-       j = 2
-       nf = 0
-       j = 3
-       nf = 1
-       j = 4
-       nf = 2
-       j = 5
-       nf = 2
-i = 13
-       j = 0
-       nf = 1
-       j = 1
-       nf = 1
-       j = 2
-       nf = 0
-       j = 3
-       nf = 1
-       j = 4
-       nf = 2
-       j = 5
-       nf = 2
-i = 14
-       j = 0
-       nf = 1
-       j = 1
-       nf = 1
-       j = 2
-       nf = 0
-       j = 3
-       nf = 1
-       j = 4
-       nf = 2
-       j = 5
-       nf = 2
-i = 15
-       j = 0
-       nf = 1
-       j = 1
-       nf = 1
-       j = 2
-       nf = 0
-       j = 3
-       nf = 1
-       j = 4
-       nf = 2
-       j = 5
-       nf = 2
-i = 16
-       j = 0
-       nf = 1
-       j = 1
-       nf = 1
-       j = 2
-       nf = 0
-       j = 3
-       nf = 1
-       j = 4
-       nf = 2
-       j = 5
-       nf = 2
-i = 17
-       j = 0
-       nf = 1
-       j = 1
-       nf = 1
-       j = 2
-       nf = 0
-       j = 3
-       nf = 1
-       j = 4
-       nf = 2
-       j = 5
-       nf = 2
-i = 18
-       j = 0
-       nf = 1
-       j = 1
-       nf = 1
-       j = 2
-       nf = 0
-       j = 3
-       nf = 1
-       j = 4
-       nf = 2
-       j = 5
-       nf = 2
-i = 19
-       j = 0
-       nf = 1
-       j = 1
-       nf = 1
-       j = 2
-       nf = 0
-       j = 3
-       nf = 1
-       j = 4
-       nf = 2
-       j = 5
-       nf = 2
-i = 20
-       j = 0
-       nf = 1
-       j = 1
-       nf = 1
-       j = 2
-       nf = 0
-       j = 3
-       nf = 1
-       j = 4
-       nf = 2
-       j = 5
-       nf = 2
-i = 21
-       j = 0
-       nf = 1
-       j = 1
-       nf = 1
-       j = 2
-       nf = 0
-       j = 3
-       nf = 1
-       j = 4
-       nf = 2
-       j = 5
-       nf = 2
-i = 22
-       j = 0
-       nf = 1
-       j = 1
-       nf = 1
-       j = 2
-       nf = 0
-       j = 3
-       nf = 1
-       j = 4
-       nf = 2
-       j = 5
-       nf = 2
-i = 23
-       j = 0
-       nf = 1
-       j = 1
-       nf = 1
-       j = 2
-       nf = 0
-       j = 3
-       nf = 1
-       j = 4
-       nf = 2
-       j = 5
-       nf = 2
-i = 24
-       j = 0
-       nf = 1
-       j = 1
-       nf = 1
-       j = 2
-       nf = 0
-       j = 3
-       nf = 1
-       j = 4
-       nf = 2
-       j = 5
-       nf = 2
-i = 25
-       j = 0
-       nf = 1
-       j = 1
-       nf = 1
-       j = 2
-       nf = 0
-       j = 3
-       nf = 1
-       j = 4
-       nf = 2
-       j = 5
-       nf = 2
-i = 26
-       j = 0
-       nf = 1
-       j = 1
-       nf = 1
-       j = 2
-       nf = 0
-       j = 3
-       nf = 1
-       j = 4
-       nf = 2
-       j = 5
-       nf = 2
-i = 27
-       j = 0
-       nf = 1
-       j = 1
-       nf = 1
-       j = 2
-       nf = 0
-       j = 3
-       nf = 1
-       j = 4
-       nf = 2
-       j = 5
-       nf = 2
-i = 28
-       j = 0
-       nf = 1
-       j = 1
-       nf = 1
-       j = 2
-       nf = 0
-       j = 3
-       nf = 1
-       j = 4
-       nf = 2
-       j = 5
-       nf = 2
-i = 29
-       j = 0
-       nf = 1
-       j = 1
-       nf = 1
-       j = 2
-       nf = 0
-       j = 3
-       nf = 1
-       j = 4
-       nf = 2
-       j = 5
-       nf = 2
-i = 30
-       j = 0
-       nf = 1
-       j = 1
-       nf = 1
-       j = 2
-       nf = 0
-       j = 3
-       nf = 1
-       j = 4
-       nf = 2
-       j = 5
-       nf = 2
-i = 31
-       j = 0
-       nf = 1
-       j = 1
-       nf = 1
-       j = 2
-       nf = 0
-       j = 3
-       nf = 1
-       j = 4
-       nf = 2
-       j = 5
-       nf = 2
-i = 32
-       j = 0
-       nf = 1
-       j = 1
-       nf = 1
-       j = 2
-       nf = 0
-       j = 3
-       nf = 1
-       j = 4
-       nf = 2
-       j = 5
-       nf = 2
-i = 33
-       j = 0
-       nf = 1
-       j = 1
-       nf = 1
-       j = 2
-       nf = 0
-       j = 3
-       nf = 1
-       j = 4
-       nf = 2
-       j = 5
-       nf = 2
-i = 34
-       j = 0
-       nf = 1
-       j = 1
-       nf = 1
-       j = 2
-       nf = 0
-       j = 3
-       nf = 1
-       j = 4
-       nf = 2
-       j = 5
-       nf = 2
-i = 35
-       j = 0
-       nf = 1
-       j = 1
-       nf = 1
-       j = 2
-       nf = 0
-       j = 3
-       nf = 1
-       j = 4
-       nf = 2
-       j = 5
-       nf = 2
-i = 36
-       j = 0
-       nf = 1
-       j = 1
-       nf = 1
-       j = 2
-       nf = 0
-       j = 3
-       nf = 1
-       j = 4
-       nf = 2
-       j = 5
-       nf = 2
-i = 37
-       j = 0
-       nf = 1
-       j = 1
-       nf = 1
-       j = 2
-       nf = 0
-       j = 3
-       nf = 1
-       j = 4
-       nf = 2
-       j = 5
-       nf = 2
-i = 38
-       j = 0
-       nf = 1
-       j = 1
-       nf = 1
-       j = 2
-       nf = 0
-       j = 3
-       nf = 1
-       j = 4
-       nf = 2
-       j = 5
-       nf = 2
-i = 39
-       j = 0
-       nf = 1
-       j = 1
-       nf = 1
-       j = 2
-       nf = 0
-       j = 3
-       nf = 1
-       j = 4
-       nf = 2
-       j = 5
-       nf = 2
-i = 40
-       j = 0
-       nf = 1
-       j = 1
-       nf = 1
-       j = 2
-       nf = 0
-       j = 3
-       nf = 1
-       j = 4
-       nf = 2
-       j = 5
-       nf = 2
diff --git a/test/typeof3.awk b/test/typeof3.awk
index 2f864f45..d148f373 100644
--- a/test/typeof3.awk
+++ b/test/typeof3.awk
@@ -15,5 +15,5 @@ BEGIN {
 BEGIN {
        print typeof(x)
        print typeof(a[1])
-       a[1][2] # this used to fatal, it no longer does
+       a[1][2] # fatals on this
 }
diff --git a/test/typeof3.ok b/test/typeof3.ok
index f9026b08..a6cd6c4a 100644
--- a/test/typeof3.ok
+++ b/test/typeof3.ok
@@ -4,4 +4,6 @@ regexp
 number
 4
 number
-untyped
+unassigned
+gawk: typeof3.awk:18: fatal: attempt to use scalar `a["1"]' as an array
+EXIT CODE: 2

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog          |  99 ----------
 NEWS               |   3 -
 array.c            |  31 +---
 awk.h              |  13 +-
 builtin.c          |   3 +-
 cint_array.c       |   2 +-
 debug.c            |  13 +-
 eval.c             |  31 ----
 ext.c              |   2 +-
 gawkapi.c          |  12 +-
 int_array.c        |   2 +-
 interpret.h        |  31 +---
 mpfr.c             |   9 -
 node.c             |   9 -
 pc/ChangeLog       |   8 -
 pc/Makefile.tst    |  16 --
 str_array.c        |   2 +-
 symbol.c           |   2 -
 test/ChangeLog     |  14 --
 test/Makefile.am   |   7 -
 test/Makefile.in   |  22 ---
 test/Maketests     |  15 --
 test/aadelete1.awk |   2 +-
 test/aadelete1.ok  |   2 +
 test/mdim1.awk     |  15 --
 test/mdim1.ok      |   9 -
 test/mdim2.awk     |   9 -
 test/mdim2.ok      |   1 -
 test/mdim3.awk     |  29 ---
 test/mdim3.ok      | 520 -----------------------------------------------------
 test/typeof3.awk   |   2 +-
 test/typeof3.ok    |   4 +-
 32 files changed, 24 insertions(+), 915 deletions(-)
 delete mode 100644 test/mdim1.awk
 delete mode 100644 test/mdim1.ok
 delete mode 100644 test/mdim2.awk
 delete mode 100644 test/mdim2.ok
 delete mode 100644 test/mdim3.awk
 delete mode 100644 test/mdim3.ok


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]