]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* gfortran.h (new): Remove macro.
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 19 Jul 2008 16:23:52 +0000 (16:23 +0000)
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 19 Jul 2008 16:23:52 +0000 (16:23 +0000)
* array.c (gfc_append_constructor, match_array_list,
gfc_match_array_constructor): Likewise.
* bbt.c (insert, gfc_insert_bbt): Likewise.
* decl.c (var_element, top_var_list, top_val_list, gfc_match_data,
get_proc_name): Likewise.
* expr.c (gfc_copy_actual_arglist): Likewise.
* interface.c (compare_actual_formal, check_new_interface,
gfc_add_interface): Likewise.
* intrinsic.c gfc_convert_type_warn, gfc_convert_chartype):
Likewise.
* io.c (match_io_iterator, match_io_list): Likewise.
* match.c (match_forall_header): Likewise.
* matchexp.c (build_node): Likewise.
* module.c (gfc_match_use): Likewise.
* scanner.c (load_file): Likewise.
* st.c (gfc_append_code): Likewise.
* symbol.c (save_symbol_data, gfc_get_sym_tree, gfc_undo_symbols,
gfc_commit_symbols): Likewise.
* trans-common.c (build_field): Likewise.
* trans-decl.c (gfc_finish_var_decl): Likewise.
* trans-expr.c (gfc_free_interface_mapping,
gfc_get_interface_mapping_charlen, gfc_add_interface_mapping,
gfc_finish_interface_mapping,
gfc_apply_interface_mapping_to_expr): Likewise.
* trans.h (gfc_interface_sym_mapping): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@137982 138bc75d-0d04-0410-961f-82ee72b054a4

19 files changed:
gcc/fortran/ChangeLog
gcc/fortran/array.c
gcc/fortran/bbt.c
gcc/fortran/decl.c
gcc/fortran/expr.c
gcc/fortran/gfortran.h
gcc/fortran/interface.c
gcc/fortran/intrinsic.c
gcc/fortran/io.c
gcc/fortran/match.c
gcc/fortran/matchexp.c
gcc/fortran/module.c
gcc/fortran/scanner.c
gcc/fortran/st.c
gcc/fortran/symbol.c
gcc/fortran/trans-common.c
gcc/fortran/trans-decl.c
gcc/fortran/trans-expr.c
gcc/fortran/trans.h

index 1435ea3e56e63d604a266c6a106a44a0c673e1dd..87279c4131edb9d69d6794eb2ba4b92800d07298 100644 (file)
@@ -1,3 +1,32 @@
+2008-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * gfortran.h (new): Remove macro.
+       * array.c (gfc_append_constructor, match_array_list,
+       gfc_match_array_constructor): Likewise.
+       * bbt.c (insert, gfc_insert_bbt): Likewise.
+       * decl.c (var_element, top_var_list, top_val_list, gfc_match_data,
+       get_proc_name): Likewise.
+       * expr.c (gfc_copy_actual_arglist): Likewise.
+       * interface.c (compare_actual_formal, check_new_interface,
+       gfc_add_interface): Likewise.
+       * intrinsic.c gfc_convert_type_warn, gfc_convert_chartype):
+       Likewise.
+       * io.c (match_io_iterator, match_io_list): Likewise.
+       * match.c (match_forall_header): Likewise.
+       * matchexp.c (build_node): Likewise.
+       * module.c (gfc_match_use): Likewise.
+       * scanner.c (load_file): Likewise.
+       * st.c (gfc_append_code): Likewise.
+       * symbol.c (save_symbol_data, gfc_get_sym_tree, gfc_undo_symbols,
+       gfc_commit_symbols): Likewise.
+       * trans-common.c (build_field): Likewise.
+       * trans-decl.c (gfc_finish_var_decl): Likewise.
+       * trans-expr.c (gfc_free_interface_mapping,
+       gfc_get_interface_mapping_charlen, gfc_add_interface_mapping,
+       gfc_finish_interface_mapping,
+       gfc_apply_interface_mapping_to_expr): Likewise.
+       * trans.h (gfc_interface_sym_mapping): Likewise.
+
 2008-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * gfortran.h (operator): Remove macro.
index 1f41701ca966f8cf479a6cbe4d80c24127562cac..ab9e42842fd52d7502f40f12185c2819560ef9e1 100644 (file)
@@ -592,7 +592,7 @@ gfc_start_constructor (bt type, int kind, locus *where)
    node onto the constructor.  */
 
 void
-gfc_append_constructor (gfc_expr *base, gfc_expr *new)
+gfc_append_constructor (gfc_expr *base, gfc_expr *new_expr)
 {
   gfc_constructor *c;
 
@@ -608,9 +608,9 @@ gfc_append_constructor (gfc_expr *base, gfc_expr *new)
       c = c->next;
     }
 
-  c->expr = new;
+  c->expr = new_expr;
 
-  if (new->ts.type != base->ts.type || new->ts.kind != base->ts.kind)
+  if (new_expr->ts.type != base->ts.type || new_expr->ts.kind != base->ts.kind)
     gfc_internal_error ("gfc_append_constructor(): New node has wrong kind");
 }
 
@@ -755,7 +755,7 @@ static match match_array_cons_element (gfc_constructor **);
 static match
 match_array_list (gfc_constructor **result)
 {
-  gfc_constructor *p, *head, *tail, *new;
+  gfc_constructor *p, *head, *tail, *new_cons;
   gfc_iterator iter;
   locus old_loc;
   gfc_expr *e;
@@ -790,7 +790,7 @@ match_array_list (gfc_constructor **result)
       if (m == MATCH_ERROR)
        goto cleanup;
 
-      m = match_array_cons_element (&new);
+      m = match_array_cons_element (&new_cons);
       if (m == MATCH_ERROR)
        goto cleanup;
       if (m == MATCH_NO)
@@ -801,8 +801,8 @@ match_array_list (gfc_constructor **result)
          goto cleanup;         /* Could be a complex constant */
        }
 
-      tail->next = new;
-      tail = new;
+      tail->next = new_cons;
+      tail = new_cons;
 
       if (gfc_match_char (',') != MATCH_YES)
        {
@@ -881,7 +881,7 @@ match_array_cons_element (gfc_constructor **result)
 match
 gfc_match_array_constructor (gfc_expr **result)
 {
-  gfc_constructor *head, *tail, *new;
+  gfc_constructor *head, *tail, *new_cons;
   gfc_expr *expr;
   gfc_typespec ts;
   locus where;
@@ -937,18 +937,18 @@ gfc_match_array_constructor (gfc_expr **result)
 
   for (;;)
     {
-      m = match_array_cons_element (&new);
+      m = match_array_cons_element (&new_cons);
       if (m == MATCH_ERROR)
        goto cleanup;
       if (m == MATCH_NO)
        goto syntax;
 
       if (head == NULL)
-       head = new;
+       head = new_cons;
       else
-       tail->next = new;
+       tail->next = new_cons;
 
-      tail = new;
+      tail = new_cons;
 
       if (gfc_match_char (',') == MATCH_NO)
        break;
index e89eb57fd8d6dee2210ff92d1596dc254434fa82..fa60e4fee22250f7a61f1743f1975cb79f6f40c0 100644 (file)
@@ -93,24 +93,24 @@ rotate_right (gfc_bbt *t)
    aborts if we find a duplicate key.  */
 
 static gfc_bbt *
-insert (gfc_bbt *new, gfc_bbt *t, compare_fn compare)
+insert (gfc_bbt *new_bbt, gfc_bbt *t, compare_fn compare)
 {
   int c;
 
   if (t == NULL)
-    return new;
+    return new_bbt;
 
-  c = (*compare) (new, t);
+  c = (*compare) (new_bbt, t);
 
   if (c < 0)
     {
-      t->left = insert (new, t->left, compare);
+      t->left = insert (new_bbt, t->left, compare);
       if (t->priority < t->left->priority)
        t = rotate_right (t);
     }
   else if (c > 0)
     {
-      t->right = insert (new, t->right, compare);
+      t->right = insert (new_bbt, t->right, compare);
       if (t->priority < t->right->priority)
        t = rotate_left (t);
     }
@@ -126,12 +126,12 @@ insert (gfc_bbt *new, gfc_bbt *t, compare_fn compare)
    already exists.  */
 
 void
-gfc_insert_bbt (void *root, void *new, compare_fn compare)
+gfc_insert_bbt (void *root, void *new_node, compare_fn compare)
 {
   gfc_bbt **r, *n;
 
   r = (gfc_bbt **) root;
-  n = (gfc_bbt *) new;
+  n = (gfc_bbt *) new_node;
   n->priority = pseudo_random ();
   *r = insert (n, *r, compare);
 }
index 9fd54c56cc48ed34e721848c50ae563bfebaeade..b7b98d544b3650b0899861e0e3affed348886074 100644 (file)
@@ -231,21 +231,21 @@ syntax:
    variable-iterator list.  */
 
 static match
-var_element (gfc_data_variable *new)
+var_element (gfc_data_variable *new_var)
 {
   match m;
   gfc_symbol *sym;
 
-  memset (new, 0, sizeof (gfc_data_variable));
+  memset (new_var, 0, sizeof (gfc_data_variable));
 
   if (gfc_match_char ('(') == MATCH_YES)
-    return var_list (new);
+    return var_list (new_var);
 
-  m = gfc_match_variable (&new->expr, 0);
+  m = gfc_match_variable (&new_var->expr, 0);
   if (m != MATCH_YES)
     return m;
 
-  sym = new->expr->symtree->n.sym;
+  sym = new_var->expr->symtree->n.sym;
 
   if (!sym->attr.function && gfc_current_ns->parent
       && gfc_current_ns->parent == sym->ns)
@@ -262,7 +262,7 @@ var_element (gfc_data_variable *new)
                         sym->name) == FAILURE)
     return MATCH_ERROR;
 
-  if (gfc_add_data (&sym->attr, sym->name, &new->expr->where) == FAILURE)
+  if (gfc_add_data (&sym->attr, sym->name, &new_var->expr->where) == FAILURE)
     return MATCH_ERROR;
 
   return MATCH_YES;
@@ -274,7 +274,7 @@ var_element (gfc_data_variable *new)
 static match
 top_var_list (gfc_data *d)
 {
-  gfc_data_variable var, *tail, *new;
+  gfc_data_variable var, *tail, *new_var;
   match m;
 
   tail = NULL;
@@ -287,15 +287,15 @@ top_var_list (gfc_data *d)
       if (m == MATCH_ERROR)
        return MATCH_ERROR;
 
-      new = gfc_get_data_variable ();
-      *new = var;
+      new_var = gfc_get_data_variable ();
+      *new_var = var;
 
       if (tail == NULL)
-       d->var = new;
+       d->var = new_var;
       else
-       tail->next = new;
+       tail->next = new_var;
 
-      tail = new;
+      tail = new_var;
 
       if (gfc_match_char ('/') == MATCH_YES)
        break;
@@ -404,7 +404,7 @@ match_data_constant (gfc_expr **result)
 static match
 top_val_list (gfc_data *data)
 {
-  gfc_data_value *new, *tail;
+  gfc_data_value *new_val, *tail;
   gfc_expr *expr;
   match m;
 
@@ -418,15 +418,15 @@ top_val_list (gfc_data *data)
       if (m == MATCH_ERROR)
        return MATCH_ERROR;
 
-      new = gfc_get_data_value ();
-      mpz_init (new->repeat);
+      new_val = gfc_get_data_value ();
+      mpz_init (new_val->repeat);
 
       if (tail == NULL)
-       data->value = new;
+       data->value = new_val;
       else
-       tail->next = new;
+       tail->next = new_val;
 
-      tail = new;
+      tail = new_val;
 
       if (expr->ts.type != BT_INTEGER || gfc_match_char ('*') != MATCH_YES)
        {
@@ -518,26 +518,26 @@ match_old_style_init (const char *name)
 match
 gfc_match_data (void)
 {
-  gfc_data *new;
+  gfc_data *new_data;
   match m;
 
   set_in_match_data (true);
 
   for (;;)
     {
-      new = gfc_get_data ();
-      new->where = gfc_current_locus;
+      new_data = gfc_get_data ();
+      new_data->where = gfc_current_locus;
 
-      m = top_var_list (new);
+      m = top_var_list (new_data);
       if (m != MATCH_YES)
        goto cleanup;
 
-      m = top_val_list (new);
+      m = top_val_list (new_data);
       if (m != MATCH_YES)
        goto cleanup;
 
-      new->next = gfc_current_ns->data;
-      gfc_current_ns->data = new;
+      new_data->next = gfc_current_ns->data;
+      gfc_current_ns->data = new_data;
 
       if (gfc_match_eos () == MATCH_YES)
        break;
@@ -557,7 +557,7 @@ gfc_match_data (void)
 
 cleanup:
   set_in_match_data (false);
-  gfc_free_data (new);
+  gfc_free_data (new_data);
   return MATCH_ERROR;
 }
 
@@ -781,7 +781,7 @@ get_proc_name (const char *name, gfc_symbol **result, bool module_fcn_entry)
   sym = *result;
   gfc_current_ns->refs++;
 
-  if (sym && !sym->new && gfc_current_state () != COMP_INTERFACE)
+  if (sym && !sym->gfc_new && gfc_current_state () != COMP_INTERFACE)
     {
       /* Trap another encompassed procedure with the same name.  All
         these conditions are necessary to avoid picking up an entry
index c0c4fdd0d688e91fad4ce5c5e6911133f9267b97..aabcb4f7fb13c98eebdc404b725aedf9a4fb1c39 100644 (file)
@@ -65,24 +65,24 @@ gfc_free_actual_arglist (gfc_actual_arglist *a1)
 gfc_actual_arglist *
 gfc_copy_actual_arglist (gfc_actual_arglist *p)
 {
-  gfc_actual_arglist *head, *tail, *new;
+  gfc_actual_arglist *head, *tail, *new_arg;
 
   head = tail = NULL;
 
   for (; p; p = p->next)
     {
-      new = gfc_get_actual_arglist ();
-      *new = *p;
+      new_arg = gfc_get_actual_arglist ();
+      *new_arg = *p;
 
-      new->expr = gfc_copy_expr (p->expr);
-      new->next = NULL;
+      new_arg->expr = gfc_copy_expr (p->expr);
+      new_arg->next = NULL;
 
       if (head == NULL)
-       head = new;
+       head = new_arg;
       else
-       tail->next = new;
+       tail->next = new_arg;
 
-      tail = new;
+      tail = new_arg;
     }
 
   return head;
index e8a4cf29c1e5355aa573cd9057a28cee61d23276..5a3b4c87f264aed247f93e627f442d5c031a8272 100644 (file)
@@ -1053,8 +1053,6 @@ typedef struct gfc_symbol
      the old symbol.  */
 
   struct gfc_symbol *old_symbol, *tlink;
-  /* FIXME: This macro is temporary until we convert everything.  */
-#define new gfc_new
   unsigned mark:1, gfc_new:1;
   /* Nonzero if all equivalences associated with this symbol have been
      processed.  */
index 0fa5b57af85b435904786f1ca535a8c522204204..d4809f0d5fbf5e25366f10ab529ee9a57d454a49 100644 (file)
@@ -1823,7 +1823,7 @@ static int
 compare_actual_formal (gfc_actual_arglist **ap, gfc_formal_arglist *formal,
                       int ranks_must_agree, int is_elemental, locus *where)
 {
-  gfc_actual_arglist **new, *a, *actual, temp;
+  gfc_actual_arglist **new_arg, *a, *actual, temp;
   gfc_formal_arglist *f;
   int i, n, na;
   unsigned long actual_size, formal_size;
@@ -1837,10 +1837,10 @@ compare_actual_formal (gfc_actual_arglist **ap, gfc_formal_arglist *formal,
   for (f = formal; f; f = f->next)
     n++;
 
-  new = (gfc_actual_arglist **) alloca (n * sizeof (gfc_actual_arglist *));
+  new_arg = (gfc_actual_arglist **) alloca (n * sizeof (gfc_actual_arglist *));
 
   for (i = 0; i < n; i++)
-    new[i] = NULL;
+    new_arg[i] = NULL;
 
   na = 0;
   f = formal;
@@ -1868,7 +1868,7 @@ compare_actual_formal (gfc_actual_arglist **ap, gfc_formal_arglist *formal,
              return 0;
            }
 
-         if (new[i] != NULL)
+         if (new_arg[i] != NULL)
            {
              if (where)
                gfc_error ("Keyword argument '%s' at %L is already associated "
@@ -2113,14 +2113,14 @@ compare_actual_formal (gfc_actual_arglist **ap, gfc_formal_arglist *formal,
       if (a == actual)
        na = i;
 
-      new[i++] = a;
+      new_arg[i++] = a;
     }
 
   /* Make sure missing actual arguments are optional.  */
   i = 0;
   for (f = formal; f; f = f->next, i++)
     {
-      if (new[i] != NULL)
+      if (new_arg[i] != NULL)
        continue;
       if (f->sym == NULL)
        {
@@ -2142,27 +2142,27 @@ compare_actual_formal (gfc_actual_arglist **ap, gfc_formal_arglist *formal,
      argument list with null arguments in the right places.  The head
      of the list remains the head.  */
   for (i = 0; i < n; i++)
-    if (new[i] == NULL)
-      new[i] = gfc_get_actual_arglist ();
+    if (new_arg[i] == NULL)
+      new_arg[i] = gfc_get_actual_arglist ();
 
   if (na != 0)
     {
-      temp = *new[0];
-      *new[0] = *actual;
+      temp = *new_arg[0];
+      *new_arg[0] = *actual;
       *actual = temp;
 
-      a = new[0];
-      new[0] = new[na];
-      new[na] = a;
+      a = new_arg[0];
+      new_arg[0] = new_arg[na];
+      new_arg[na] = a;
     }
 
   for (i = 0; i < n - 1; i++)
-    new[i]->next = new[i + 1];
+    new_arg[i]->next = new_arg[i + 1];
 
-  new[i]->next = NULL;
+  new_arg[i]->next = NULL;
 
   if (*ap == NULL && n > 0)
-    *ap = new[0];
+    *ap = new_arg[0];
 
   /* Note the types of omitted optional arguments.  */
   for (a = *ap, f = formal; a; a = a->next, f = f->next)
@@ -2732,16 +2732,16 @@ gfc_extend_assign (gfc_code *c, gfc_namespace *ns)
    procedures can be present without interfaces.  */
 
 static try
-check_new_interface (gfc_interface *base, gfc_symbol *new)
+check_new_interface (gfc_interface *base, gfc_symbol *new_sym)
 {
   gfc_interface *ip;
 
   for (ip = base; ip; ip = ip->next)
     {
-      if (ip->sym == new)
+      if (ip->sym == new_sym)
        {
          gfc_error ("Entity '%s' at %C is already present in the interface",
-                    new->name);
+                    new_sym->name);
          return FAILURE;
        }
     }
@@ -2753,7 +2753,7 @@ check_new_interface (gfc_interface *base, gfc_symbol *new)
 /* Add a symbol to the current interface.  */
 
 try
-gfc_add_interface (gfc_symbol *new)
+gfc_add_interface (gfc_symbol *new_sym)
 {
   gfc_interface **head, *intr;
   gfc_namespace *ns;
@@ -2771,48 +2771,48 @@ gfc_add_interface (gfc_symbol *new)
          {
            case INTRINSIC_EQ:
            case INTRINSIC_EQ_OS:
-             if (check_new_interface (ns->op[INTRINSIC_EQ], new) == FAILURE ||
-                 check_new_interface (ns->op[INTRINSIC_EQ_OS], new) == FAILURE)
+             if (check_new_interface (ns->op[INTRINSIC_EQ], new_sym) == FAILURE ||
+                 check_new_interface (ns->op[INTRINSIC_EQ_OS], new_sym) == FAILURE)
                return FAILURE;
              break;
 
            case INTRINSIC_NE:
            case INTRINSIC_NE_OS:
-             if (check_new_interface (ns->op[INTRINSIC_NE], new) == FAILURE ||
-                 check_new_interface (ns->op[INTRINSIC_NE_OS], new) == FAILURE)
+             if (check_new_interface (ns->op[INTRINSIC_NE], new_sym) == FAILURE ||
+                 check_new_interface (ns->op[INTRINSIC_NE_OS], new_sym) == FAILURE)
                return FAILURE;
              break;
 
            case INTRINSIC_GT:
            case INTRINSIC_GT_OS:
-             if (check_new_interface (ns->op[INTRINSIC_GT], new) == FAILURE ||
-                 check_new_interface (ns->op[INTRINSIC_GT_OS], new) == FAILURE)
+             if (check_new_interface (ns->op[INTRINSIC_GT], new_sym) == FAILURE ||
+                 check_new_interface (ns->op[INTRINSIC_GT_OS], new_sym) == FAILURE)
                return FAILURE;
              break;
 
            case INTRINSIC_GE:
            case INTRINSIC_GE_OS:
-             if (check_new_interface (ns->op[INTRINSIC_GE], new) == FAILURE ||
-                 check_new_interface (ns->op[INTRINSIC_GE_OS], new) == FAILURE)
+             if (check_new_interface (ns->op[INTRINSIC_GE], new_sym) == FAILURE ||
+                 check_new_interface (ns->op[INTRINSIC_GE_OS], new_sym) == FAILURE)
                return FAILURE;
              break;
 
            case INTRINSIC_LT:
            case INTRINSIC_LT_OS:
-             if (check_new_interface (ns->op[INTRINSIC_LT], new) == FAILURE ||
-                 check_new_interface (ns->op[INTRINSIC_LT_OS], new) == FAILURE)
+             if (check_new_interface (ns->op[INTRINSIC_LT], new_sym) == FAILURE ||
+                 check_new_interface (ns->op[INTRINSIC_LT_OS], new_sym) == FAILURE)
                return FAILURE;
              break;
 
            case INTRINSIC_LE:
            case INTRINSIC_LE_OS:
-             if (check_new_interface (ns->op[INTRINSIC_LE], new) == FAILURE ||
-                 check_new_interface (ns->op[INTRINSIC_LE_OS], new) == FAILURE)
+             if (check_new_interface (ns->op[INTRINSIC_LE], new_sym) == FAILURE ||
+                 check_new_interface (ns->op[INTRINSIC_LE_OS], new_sym) == FAILURE)
                return FAILURE;
              break;
 
            default:
-             if (check_new_interface (ns->op[current_interface.op], new) == FAILURE)
+             if (check_new_interface (ns->op[current_interface.op], new_sym) == FAILURE)
                return FAILURE;
          }
 
@@ -2826,7 +2826,7 @@ gfc_add_interface (gfc_symbol *new)
          if (sym == NULL)
            continue;
 
-         if (check_new_interface (sym->generic, new) == FAILURE)
+         if (check_new_interface (sym->generic, new_sym) == FAILURE)
            return FAILURE;
        }
 
@@ -2834,7 +2834,7 @@ gfc_add_interface (gfc_symbol *new)
       break;
 
     case INTERFACE_USER_OP:
-      if (check_new_interface (current_interface.uop->op, new)
+      if (check_new_interface (current_interface.uop->op, new_sym)
          == FAILURE)
        return FAILURE;
 
@@ -2846,7 +2846,7 @@ gfc_add_interface (gfc_symbol *new)
     }
 
   intr = gfc_get_interface ();
-  intr->sym = new;
+  intr->sym = new_sym;
   intr->where = gfc_current_locus;
 
   intr->next = *head;
index db3237ebe367e1942a1461588be77205a0ab0daa..4c55a2c99baffce6cc318bc9a70aa762097c82a0 100644 (file)
@@ -3680,7 +3680,7 @@ gfc_convert_type_warn (gfc_expr *expr, gfc_typespec *ts, int eflag, int wflag)
   gfc_intrinsic_sym *sym;
   gfc_typespec from_ts;
   locus old_where;
-  gfc_expr *new;
+  gfc_expr *new_expr;
   int rank;
   mpz_t *shape;
 
@@ -3722,29 +3722,29 @@ gfc_convert_type_warn (gfc_expr *expr, gfc_typespec *ts, int eflag, int wflag)
   rank = expr->rank;
   shape = expr->shape;
 
-  new = gfc_get_expr ();
-  *new = *expr;
-
-  new = gfc_build_conversion (new);
-  new->value.function.name = sym->lib_name;
-  new->value.function.isym = sym;
-  new->where = old_where;
-  new->rank = rank;
-  new->shape = gfc_copy_shape (shape, rank);
-
-  gfc_get_ha_sym_tree (sym->name, &new->symtree);
-  new->symtree->n.sym->ts = *ts;
-  new->symtree->n.sym->attr.flavor = FL_PROCEDURE;
-  new->symtree->n.sym->attr.function = 1;
-  new->symtree->n.sym->attr.elemental = 1;
-  new->symtree->n.sym->attr.pure = 1;
-  new->symtree->n.sym->attr.referenced = 1;
-  gfc_intrinsic_symbol(new->symtree->n.sym);
-  gfc_commit_symbol (new->symtree->n.sym);
-
-  *expr = *new;
-
-  gfc_free (new);
+  new_expr = gfc_get_expr ();
+  *new_expr = *expr;
+
+  new_expr = gfc_build_conversion (new_expr);
+  new_expr->value.function.name = sym->lib_name;
+  new_expr->value.function.isym = sym;
+  new_expr->where = old_where;
+  new_expr->rank = rank;
+  new_expr->shape = gfc_copy_shape (shape, rank);
+
+  gfc_get_ha_sym_tree (sym->name, &new_expr->symtree);
+  new_expr->symtree->n.sym->ts = *ts;
+  new_expr->symtree->n.sym->attr.flavor = FL_PROCEDURE;
+  new_expr->symtree->n.sym->attr.function = 1;
+  new_expr->symtree->n.sym->attr.elemental = 1;
+  new_expr->symtree->n.sym->attr.pure = 1;
+  new_expr->symtree->n.sym->attr.referenced = 1;
+  gfc_intrinsic_symbol(new_expr->symtree->n.sym);
+  gfc_commit_symbol (new_expr->symtree->n.sym);
+
+  *expr = *new_expr;
+
+  gfc_free (new_expr);
   expr->ts = *ts;
 
   if (gfc_is_constant_expr (expr->value.function.actual->expr)
@@ -3779,7 +3779,7 @@ gfc_convert_chartype (gfc_expr *expr, gfc_typespec *ts)
   gfc_intrinsic_sym *sym;
   gfc_typespec from_ts;
   locus old_where;
-  gfc_expr *new;
+  gfc_expr *new_expr;
   int rank;
   mpz_t *shape;
 
@@ -3794,28 +3794,28 @@ gfc_convert_chartype (gfc_expr *expr, gfc_typespec *ts)
   rank = expr->rank;
   shape = expr->shape;
 
-  new = gfc_get_expr ();
-  *new = *expr;
+  new_expr = gfc_get_expr ();
+  *new_expr = *expr;
 
-  new = gfc_build_conversion (new);
-  new->value.function.name = sym->lib_name;
-  new->value.function.isym = sym;
-  new->where = old_where;
-  new->rank = rank;
-  new->shape = gfc_copy_shape (shape, rank);
+  new_expr = gfc_build_conversion (new_expr);
+  new_expr->value.function.name = sym->lib_name;
+  new_expr->value.function.isym = sym;
+  new_expr->where = old_where;
+  new_expr->rank = rank;
+  new_expr->shape = gfc_copy_shape (shape, rank);
 
-  gfc_get_ha_sym_tree (sym->name, &new->symtree);
-  new->symtree->n.sym->ts = *ts;
-  new->symtree->n.sym->attr.flavor = FL_PROCEDURE;
-  new->symtree->n.sym->attr.function = 1;
-  new->symtree->n.sym->attr.elemental = 1;
-  new->symtree->n.sym->attr.referenced = 1;
-  gfc_intrinsic_symbol(new->symtree->n.sym);
-  gfc_commit_symbol (new->symtree->n.sym);
+  gfc_get_ha_sym_tree (sym->name, &new_expr->symtree);
+  new_expr->symtree->n.sym->ts = *ts;
+  new_expr->symtree->n.sym->attr.flavor = FL_PROCEDURE;
+  new_expr->symtree->n.sym->attr.function = 1;
+  new_expr->symtree->n.sym->attr.elemental = 1;
+  new_expr->symtree->n.sym->attr.referenced = 1;
+  gfc_intrinsic_symbol(new_expr->symtree->n.sym);
+  gfc_commit_symbol (new_expr->symtree->n.sym);
 
-  *expr = *new;
+  *expr = *new_expr;
 
-  gfc_free (new);
+  gfc_free (new_expr);
   expr->ts = *ts;
 
   if (gfc_is_constant_expr (expr->value.function.actual->expr)
index 23bf5f9221677fb1e1f696a523f92ca651763d04..4af097108837331757bb26f211ff421dafe1ab3e 100644 (file)
@@ -2623,7 +2623,7 @@ static match match_io_element (io_kind, gfc_code **);
 static match
 match_io_iterator (io_kind k, gfc_code **result)
 {
-  gfc_code *head, *tail, *new;
+  gfc_code *head, *tail, *new_code;
   gfc_iterator *iter;
   locus old_loc;
   match m;
@@ -2659,7 +2659,7 @@ match_io_iterator (io_kind k, gfc_code **result)
          break;
        }
 
-      m = match_io_element (k, &new);
+      m = match_io_element (k, &new_code);
       if (m == MATCH_ERROR)
        goto cleanup;
       if (m == MATCH_NO)
@@ -2669,7 +2669,7 @@ match_io_iterator (io_kind k, gfc_code **result)
          goto cleanup;
        }
 
-      tail = gfc_append_code (tail, new);
+      tail = gfc_append_code (tail, new_code);
 
       if (gfc_match_char (',') != MATCH_YES)
        {
@@ -2683,15 +2683,15 @@ match_io_iterator (io_kind k, gfc_code **result)
   if (gfc_match_char (')') != MATCH_YES)
     goto syntax;
 
-  new = gfc_get_code ();
-  new->op = EXEC_DO;
-  new->ext.iterator = iter;
+  new_code = gfc_get_code ();
+  new_code->op = EXEC_DO;
+  new_code->ext.iterator = iter;
 
-  new->block = gfc_get_code ();
-  new->block->op = EXEC_DO;
-  new->block->next = head;
+  new_code->block = gfc_get_code ();
+  new_code->block->op = EXEC_DO;
+  new_code->block->next = head;
 
-  *result = new;
+  *result = new_code;
   return MATCH_YES;
 
 syntax:
@@ -2799,7 +2799,7 @@ match_io_element (io_kind k, gfc_code **cpp)
 static match
 match_io_list (io_kind k, gfc_code **head_p)
 {
-  gfc_code *head, *tail, *new;
+  gfc_code *head, *tail, *new_code;
   match m;
 
   *head_p = head = tail = NULL;
@@ -2808,15 +2808,15 @@ match_io_list (io_kind k, gfc_code **head_p)
 
   for (;;)
     {
-      m = match_io_element (k, &new);
+      m = match_io_element (k, &new_code);
       if (m == MATCH_ERROR)
        goto cleanup;
       if (m == MATCH_NO)
        goto syntax;
 
-      tail = gfc_append_code (tail, new);
+      tail = gfc_append_code (tail, new_code);
       if (head == NULL)
-       head = new;
+       head = new_code;
 
       if (gfc_match_eos () == MATCH_YES)
        break;
index feaa2683f27d55229e11bb11050245bad7c8cd2b..19a97e930e940f68e21db3bb2508b6d9c3e0111e 100644 (file)
@@ -3836,7 +3836,7 @@ cleanup:
 static match
 match_forall_header (gfc_forall_iterator **phead, gfc_expr **mask)
 {
-  gfc_forall_iterator *head, *tail, *new;
+  gfc_forall_iterator *head, *tail, *new_iter;
   gfc_expr *msk;
   match m;
 
@@ -3848,27 +3848,27 @@ match_forall_header (gfc_forall_iterator **phead, gfc_expr **mask)
   if (gfc_match_char ('(') != MATCH_YES)
     return MATCH_NO;
 
-  m = match_forall_iterator (&new);
+  m = match_forall_iterator (&new_iter);
   if (m == MATCH_ERROR)
     goto cleanup;
   if (m == MATCH_NO)
     goto syntax;
 
-  head = tail = new;
+  head = tail = new_iter;
 
   for (;;)
     {
       if (gfc_match_char (',') != MATCH_YES)
        break;
 
-      m = match_forall_iterator (&new);
+      m = match_forall_iterator (&new_iter);
       if (m == MATCH_ERROR)
        goto cleanup;
 
       if (m == MATCH_YES)
        {
-         tail->next = new;
-         tail = new;
+         tail->next = new_iter;
+         tail = new_iter;
          continue;
        }
 
index 433f4d21784558025ba9ac7219b655df6091d519..a53c69bc71b88bdaa6cc5577fb6397e4ab58f5bd 100644 (file)
@@ -211,17 +211,17 @@ static gfc_expr *
 build_node (gfc_intrinsic_op op, locus *where,
            gfc_expr *op1, gfc_expr *op2)
 {
-  gfc_expr *new;
+  gfc_expr *new_expr;
 
-  new = gfc_get_expr ();
-  new->expr_type = EXPR_OP;
-  new->value.op.op = op;
-  new->where = *where;
+  new_expr = gfc_get_expr ();
+  new_expr->expr_type = EXPR_OP;
+  new_expr->value.op.op = op;
+  new_expr->where = *where;
 
-  new->value.op.op1 = op1;
-  new->value.op.op2 = op2;
+  new_expr->value.op.op1 = op1;
+  new_expr->value.op.op2 = op2;
 
-  return new;
+  return new_expr;
 }
 
 
index 3f27fda26d4ab5af7e845526aa4b68750002fd3e..365dd98a60fb3b13cc9f1f279d0b1dd992e3fc54 100644 (file)
@@ -502,7 +502,7 @@ match
 gfc_match_use (void)
 {
   char name[GFC_MAX_SYMBOL_LEN + 1], module_nature[GFC_MAX_SYMBOL_LEN + 1];
-  gfc_use_rename *tail = NULL, *new;
+  gfc_use_rename *tail = NULL, *new_use;
   interface_type type, type2;
   gfc_intrinsic_op op;
   match m;
@@ -581,19 +581,19 @@ gfc_match_use (void)
   for (;;)
     {
       /* Get a new rename struct and add it to the rename list.  */
-      new = gfc_get_use_rename ();
-      new->where = gfc_current_locus;
-      new->found = 0;
+      new_use = gfc_get_use_rename ();
+      new_use->where = gfc_current_locus;
+      new_use->found = 0;
 
       if (gfc_rename_list == NULL)
-       gfc_rename_list = new;
+       gfc_rename_list = new_use;
       else
-       tail->next = new;
-      tail = new;
+       tail->next = new_use;
+      tail = new_use;
 
       /* See what kind of interface we're dealing with.  Assume it is
         not an operator.  */
-      new->op = INTRINSIC_NONE;
+      new_use->op = INTRINSIC_NONE;
       if (gfc_match_generic_spec (&type, name, &op) == MATCH_ERROR)
        goto cleanup;
 
@@ -614,16 +614,16 @@ gfc_match_use (void)
            goto cleanup;
 
          if (type == INTERFACE_USER_OP)
-           new->op = INTRINSIC_USER;
+           new_use->op = INTRINSIC_USER;
 
          if (only_flag)
            {
              if (m != MATCH_YES)
-               strcpy (new->use_name, name);
+               strcpy (new_use->use_name, name);
              else
                {
-                 strcpy (new->local_name, name);
-                 m = gfc_match_generic_spec (&type2, new->use_name, &op);
+                 strcpy (new_use->local_name, name);
+                 m = gfc_match_generic_spec (&type2, new_use->use_name, &op);
                  if (type != type2)
                    goto syntax;
                  if (m == MATCH_NO)
@@ -636,9 +636,9 @@ gfc_match_use (void)
            {
              if (m != MATCH_YES)
                goto syntax;
-             strcpy (new->local_name, name);
+             strcpy (new_use->local_name, name);
 
-             m = gfc_match_generic_spec (&type2, new->use_name, &op);
+             m = gfc_match_generic_spec (&type2, new_use->use_name, &op);
              if (type != type2)
                goto syntax;
              if (m == MATCH_NO)
@@ -647,8 +647,8 @@ gfc_match_use (void)
                goto cleanup;
            }
 
-         if (strcmp (new->use_name, module_name) == 0
-             || strcmp (new->local_name, module_name) == 0)
+         if (strcmp (new_use->use_name, module_name) == 0
+             || strcmp (new_use->local_name, module_name) == 0)
            {
              gfc_error ("The name '%s' at %C has already been used as "
                         "an external module name.", module_name);
@@ -657,7 +657,7 @@ gfc_match_use (void)
          break;
 
        case INTERFACE_INTRINSIC_OP:
-         new->op = op;
+         new_use->op = op;
          break;
 
        default:
index 48f148d300ab3d16b2b7197019c650a96524b5ec..6e6017a9004e53186265d218391839cc192e8b0c 100644 (file)
@@ -1840,11 +1840,11 @@ load_file (const char *filename, bool initial)
                                && line[2] == (unsigned char) '\xBF')))
        {
          int n = line[1] == (unsigned char) '\xBB' ? 3 : 2;
-         gfc_char_t *new = gfc_get_wide_string (line_len);
+         gfc_char_t *new_char = gfc_get_wide_string (line_len);
 
-         wide_strcpy (new, &line[n]);
+         wide_strcpy (new_char, &line[n]);
          gfc_free (line);
-         line = new;
+         line = new_char;
          len -= n;
        }
 
index ba5656b24d553475b23a09c01ed43cffe98230f6..790dec6cf58fce97aae5f1d5a9997d249b6ae952 100644 (file)
@@ -58,20 +58,20 @@ gfc_get_code (void)
    its tail, returning a pointer to the new tail.  */
 
 gfc_code *
-gfc_append_code (gfc_code *tail, gfc_code *new)
+gfc_append_code (gfc_code *tail, gfc_code *new_code)
 {
   if (tail != NULL)
     {
       while (tail->next != NULL)
        tail = tail->next;
 
-      tail->next = new;
+      tail->next = new_code;
     }
 
-  while (new->next != NULL)
-    new = new->next;
+  while (new_code->next != NULL)
+    new_code = new_code->next;
 
-  return new;
+  return new_code;
 }
 
 
index 57870c0d63ec40201fe7d3855b9701adc6be818e..ca1237e78d914585656b019d74ac1a3a72546910 100644 (file)
@@ -2451,7 +2451,7 @@ static void
 save_symbol_data (gfc_symbol *sym)
 {
 
-  if (sym->new || sym->old_symbol != NULL)
+  if (sym->gfc_new || sym->old_symbol != NULL)
     return;
 
   sym->old_symbol = XCNEW (gfc_symbol);
@@ -2495,7 +2495,7 @@ gfc_get_sym_tree (const char *name, gfc_namespace *ns, gfc_symtree **result)
       p->old_symbol = NULL;
       p->tlink = changed_syms;
       p->mark = 1;
-      p->new = 1;
+      p->gfc_new = 1;
       changed_syms = p;
 
       st = gfc_new_symtree (&ns->sym_root, name);
@@ -2643,7 +2643,7 @@ gfc_undo_symbols (void)
     {
       q = p->tlink;
 
-      if (p->new)
+      if (p->gfc_new)
        {
          /* Symbol was new.  */
          if (p->attr.in_common && p->common_block->head)
@@ -2779,7 +2779,7 @@ gfc_commit_symbols (void)
       q = p->tlink;
       p->tlink = NULL;
       p->mark = 0;
-      p->new = 0;
+      p->gfc_new = 0;
       free_old_symbol (p);
     }
   changed_syms = NULL;
@@ -2808,7 +2808,7 @@ gfc_commit_symbol (gfc_symbol *sym)
 
   sym->tlink = NULL;
   sym->mark = 0;
-  sym->new = 0;
+  sym->gfc_new = 0;
 
   free_old_symbol (sym);
 }
index 5c91bf57946deade368b3f9297e074841790a4c7..4b95f5fbe7817d9168598ba1967ab42539a3853a 100644 (file)
@@ -321,10 +321,10 @@ build_field (segment_info *h, tree union_type, record_layout_info rli)
   /* If this field is volatile, mark it.  */
   if (h->sym->attr.volatile_)
     {
-      tree new;
+      tree new_type;
       TREE_THIS_VOLATILE (field) = 1;
-      new = build_qualified_type (TREE_TYPE (field), TYPE_QUAL_VOLATILE);
-      TREE_TYPE (field) = new;
+      new_type = build_qualified_type (TREE_TYPE (field), TYPE_QUAL_VOLATILE);
+      TREE_TYPE (field) = new_type;
     }
 
   h->field = field;
index e960fa026b1fc00d9b81a1fc48b911c8f724e26b..5fe460e91e215bf42635bf556444d01d68a73928 100644 (file)
@@ -461,7 +461,7 @@ gfc_finish_decl (tree decl)
 static void
 gfc_finish_var_decl (tree decl, gfc_symbol * sym)
 {
-  tree new;
+  tree new_type;
   /* TREE_ADDRESSABLE means the address of this variable is actually needed.
      This is the equivalent of the TARGET variables.
      We also need to set this if the variable is passed by reference in a
@@ -535,8 +535,8 @@ gfc_finish_var_decl (tree decl, gfc_symbol * sym)
   if (sym->attr.volatile_)
     {
       TREE_THIS_VOLATILE (decl) = 1;
-      new = build_qualified_type (TREE_TYPE (decl), TYPE_QUAL_VOLATILE);
-      TREE_TYPE (decl) = new;
+      new_type = build_qualified_type (TREE_TYPE (decl), TYPE_QUAL_VOLATILE);
+      TREE_TYPE (decl) = new_type;
     } 
 
   /* Keep variables larger than max-stack-var-size off stack.  */
index d4f5c59559c01cd01bdb737816e5b88a7ba8b161..568febc956e53b8c80a3238dd60853b695cd952e 100644 (file)
@@ -1460,9 +1460,9 @@ gfc_free_interface_mapping (gfc_interface_mapping * mapping)
   for (sym = mapping->syms; sym; sym = nextsym)
     {
       nextsym = sym->next;
-      gfc_free_symbol (sym->new->n.sym);
+      gfc_free_symbol (sym->new_sym->n.sym);
       gfc_free_expr (sym->expr);
-      gfc_free (sym->new);
+      gfc_free (sym->new_sym);
       gfc_free (sym);
     }
   for (cl = mapping->charlens; cl; cl = nextcl)
@@ -1481,14 +1481,14 @@ static gfc_charlen *
 gfc_get_interface_mapping_charlen (gfc_interface_mapping * mapping,
                                   gfc_charlen * cl)
 {
-  gfc_charlen *new;
+  gfc_charlen *new_charlen;
 
-  new = gfc_get_charlen ();
-  new->next = mapping->charlens;
-  new->length = gfc_copy_expr (cl->length);
+  new_charlen = gfc_get_charlen ();
+  new_charlen->next = mapping->charlens;
+  new_charlen->length = gfc_copy_expr (cl->length);
 
-  mapping->charlens = new;
-  return new;
+  mapping->charlens = new_charlen;
+  return new_charlen;
 }
 
 
@@ -1597,7 +1597,7 @@ gfc_add_interface_mapping (gfc_interface_mapping * mapping,
   sm = XCNEW (gfc_interface_sym_mapping);
   sm->next = mapping->syms;
   sm->old = sym;
-  sm->new = new_symtree;
+  sm->new_sym = new_symtree;
   sm->expr = gfc_copy_expr (expr);
   mapping->syms = sm;
 
@@ -1689,10 +1689,10 @@ gfc_finish_interface_mapping (gfc_interface_mapping * mapping,
   gfc_se se;
 
   for (sym = mapping->syms; sym; sym = sym->next)
-    if (sym->new->n.sym->ts.type == BT_CHARACTER
-       && !sym->new->n.sym->ts.cl->backend_decl)
+    if (sym->new_sym->n.sym->ts.type == BT_CHARACTER
+       && !sym->new_sym->n.sym->ts.cl->backend_decl)
       {
-       expr = sym->new->n.sym->ts.cl->length;
+       expr = sym->new_sym->n.sym->ts.cl->length;
        gfc_apply_interface_mapping_to_expr (mapping, expr);
        gfc_init_se (&se, NULL);
        gfc_conv_expr (&se, expr);
@@ -1701,7 +1701,7 @@ gfc_finish_interface_mapping (gfc_interface_mapping * mapping,
        gfc_add_block_to_block (pre, &se.pre);
        gfc_add_block_to_block (post, &se.post);
 
-       sym->new->n.sym->ts.cl->backend_decl = se.expr;
+       sym->new_sym->n.sym->ts.cl->backend_decl = se.expr;
       }
 }
 
@@ -1931,8 +1931,8 @@ gfc_apply_interface_mapping_to_expr (gfc_interface_mapping * mapping,
   for (sym = mapping->syms; sym; sym = sym->next)
     if (expr->symtree && sym->old == expr->symtree->n.sym)
       {
-       if (sym->new->n.sym->backend_decl)
-         expr->symtree = sym->new;
+       if (sym->new_sym->n.sym->backend_decl)
+         expr->symtree = sym->new_sym;
        else if (sym->expr)
          gfc_replace_expr (expr, gfc_copy_expr (sym->expr));
       }
@@ -1964,9 +1964,9 @@ gfc_apply_interface_mapping_to_expr (gfc_interface_mapping * mapping,
       for (sym = mapping->syms; sym; sym = sym->next)
        if (sym->old == expr->value.function.esym)
          {
-           expr->value.function.esym = sym->new->n.sym;
+           expr->value.function.esym = sym->new_sym->n.sym;
            gfc_map_fcn_formal_to_actual (expr, sym->expr, mapping);
-           expr->value.function.esym->result = sym->new->n.sym;
+           expr->value.function.esym->result = sym->new_sym->n.sym;
          }
       break;
 
index 81c449e91a556ebc0e970e598279fcff07b8368f..d19c6794a305030b152e53bd6d51f6304ea1af3e 100644 (file)
@@ -710,7 +710,7 @@ typedef struct gfc_interface_sym_mapping
 {
   struct gfc_interface_sym_mapping *next;
   gfc_symbol *old;
-  gfc_symtree *new;
+  gfc_symtree *new_sym;
   gfc_expr *expr;
 }
 gfc_interface_sym_mapping;