Commit 7b901ac4 by Kaveh R. Ghazi Committed by Kaveh Ghazi

gfortran.h (new): Remove macro.

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