* 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.
From-SVN: r137982
+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.
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;
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");
}
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;
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)
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)
{
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;
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;
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);
}
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);
}
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)
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;
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;
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;
static match
top_val_list (gfc_data *data)
{
- gfc_data_value *new, *tail;
+ gfc_data_value *new_val, *tail;
gfc_expr *expr;
match m;
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)
{
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;
cleanup:
set_in_match_data (false);
- gfc_free_data (new);
+ gfc_free_data (new_data);
return MATCH_ERROR;
}
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
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;
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. */
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;
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;
return 0;
}
- if (new[i] != NULL)
+ if (new_arg[i] != NULL)
{
if (where)
gfc_error ("Keyword argument '%s' at %L is already associated "
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)
{
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)
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;
}
}
/* 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;
{
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;
}
if (sym == NULL)
continue;
- if (check_new_interface (sym->generic, new) == FAILURE)
+ if (check_new_interface (sym->generic, new_sym) == FAILURE)
return FAILURE;
}
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;
}
intr = gfc_get_interface ();
- intr->sym = new;
+ intr->sym = new_sym;
intr->where = gfc_current_locus;
intr->next = *head;
gfc_intrinsic_sym *sym;
gfc_typespec from_ts;
locus old_where;
- gfc_expr *new;
+ gfc_expr *new_expr;
int rank;
mpz_t *shape;
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)
gfc_intrinsic_sym *sym;
gfc_typespec from_ts;
locus old_where;
- gfc_expr *new;
+ gfc_expr *new_expr;
int rank;
mpz_t *shape;
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)
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;
break;
}
- m = match_io_element (k, &new);
+ m = match_io_element (k, &new_code);
if (m == MATCH_ERROR)
goto cleanup;
if (m == MATCH_NO)
goto cleanup;
}
- tail = gfc_append_code (tail, new);
+ tail = gfc_append_code (tail, new_code);
if (gfc_match_char (',') != MATCH_YES)
{
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:
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;
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;
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;
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;
}
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;
}
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;
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;
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)
{
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)
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);
break;
case INTERFACE_INTRINSIC_OP:
- new->op = op;
+ new_use->op = op;
break;
default:
&& 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;
}
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;
}
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);
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);
{
q = p->tlink;
- if (p->new)
+ if (p->gfc_new)
{
/* Symbol was new. */
if (p->attr.in_common && p->common_block->head)
q = p->tlink;
p->tlink = NULL;
p->mark = 0;
- p->new = 0;
+ p->gfc_new = 0;
free_old_symbol (p);
}
changed_syms = NULL;
sym->tlink = NULL;
sym->mark = 0;
- sym->new = 0;
+ sym->gfc_new = 0;
free_old_symbol (sym);
}
/* 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;
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
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. */
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)
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;
}
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;
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);
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;
}
}
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));
}
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;
{
struct gfc_interface_sym_mapping *next;
gfc_symbol *old;
- gfc_symtree *new;
+ gfc_symtree *new_sym;
gfc_expr *expr;
}
gfc_interface_sym_mapping;