From dcb1b019e865f2ed8c7161b54dcf438477ab6e6b Mon Sep 17 00:00:00 2001 From: ghazi Date: Sat, 19 Jul 2008 16:22:12 +0000 Subject: [PATCH] * gfortran.h (operator): Remove macro. (gfc_namespace, gfc_expr): Avoid C++ keywords. * arith.c (eval_intrinsic, eval_intrinsic_f2, eval_intrinsic_f3): Likewise. * decl.c (access_attr_decl): Likewise. * dependency.c (gfc_dep_compare_expr): Likewise. * dump-parse-tree.c (show_expr, show_uop, show_namespace): Likewise. * expr.c (gfc_copy_expr, gfc_type_convert_binary, simplify_intrinsic_op, check_intrinsic_op): Likewise. * interface.c (fold_unary, gfc_match_generic_spec, gfc_match_interface, gfc_match_end_interface, check_operator_interface, check_uop_interfaces, gfc_check_interfaces, gfc_extend_expr, gfc_extend_assign, gfc_add_interface, gfc_current_interface_head, gfc_set_current_interface_head): Likewise. * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul): Likewise. * matchexp.c (gfc_get_parentheses, build_node): Likewise. * module.c (gfc_use_rename, gfc_match_use, find_use_name_n, number_use_names, mio_expr, load_operator_interfaces, read_module, write_operator, write_module): Likewise. * openmp.c (resolve_omp_atomic): Likewise. * resolve.c (resolve_operator, gfc_resolve_character_operator, gfc_resolve_uops): Likewise. * symbol.c (free_uop_tree, gfc_free_namespace): Likewise. * trans-expr.c (gfc_conv_expr_op): Likewise. * trans-openmp.c (gfc_trans_omp_atomic): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@137981 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/ChangeLog | 31 +++++++++ gcc/fortran/arith.c | 36 +++++----- gcc/fortran/decl.c | 10 +-- gcc/fortran/dependency.c | 22 +++--- gcc/fortran/dump-parse-tree.c | 6 +- gcc/fortran/expr.c | 12 ++-- gcc/fortran/gfortran.h | 6 +- gcc/fortran/interface.c | 156 +++++++++++++++++++++--------------------- gcc/fortran/iresolve.c | 4 +- gcc/fortran/matchexp.c | 6 +- gcc/fortran/module.c | 52 +++++++------- gcc/fortran/openmp.c | 8 +-- gcc/fortran/resolve.c | 26 +++---- gcc/fortran/symbol.c | 4 +- gcc/fortran/trans-expr.c | 2 +- gcc/fortran/trans-openmp.c | 2 +- 16 files changed, 206 insertions(+), 177 deletions(-) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 3f57c87..1435ea3 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,5 +1,36 @@ 2008-07-19 Kaveh R. Ghazi + * gfortran.h (operator): Remove macro. + (gfc_namespace, gfc_expr): Avoid C++ keywords. + * arith.c (eval_intrinsic, eval_intrinsic_f2, eval_intrinsic_f3): + Likewise. + * decl.c (access_attr_decl): Likewise. + * dependency.c (gfc_dep_compare_expr): Likewise. + * dump-parse-tree.c (show_expr, show_uop, show_namespace): + Likewise. + * expr.c (gfc_copy_expr, gfc_type_convert_binary, + simplify_intrinsic_op, check_intrinsic_op): Likewise. + * interface.c (fold_unary, gfc_match_generic_spec, + gfc_match_interface, gfc_match_end_interface, + check_operator_interface, check_uop_interfaces, + gfc_check_interfaces, gfc_extend_expr, gfc_extend_assign, + gfc_add_interface, gfc_current_interface_head, + gfc_set_current_interface_head): Likewise. + * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul): + Likewise. + * matchexp.c (gfc_get_parentheses, build_node): Likewise. + * module.c (gfc_use_rename, gfc_match_use, find_use_name_n, + number_use_names, mio_expr, load_operator_interfaces, read_module, + write_operator, write_module): Likewise. + * openmp.c (resolve_omp_atomic): Likewise. + * resolve.c (resolve_operator, gfc_resolve_character_operator, + gfc_resolve_uops): Likewise. + * symbol.c (free_uop_tree, gfc_free_namespace): Likewise. + * trans-expr.c (gfc_conv_expr_op): Likewise. + * trans-openmp.c (gfc_trans_omp_atomic): Likewise. + +2008-07-19 Kaveh R. Ghazi + * gfortran.h (protected): Remove macro. * dump-parse-tree.c (show_attr): Avoid C++ keywords. * expr.c (gfc_check_pointer_assign): Likewise. diff --git a/gcc/fortran/arith.c b/gcc/fortran/arith.c index ca6de63..38b7162 100644 --- a/gcc/fortran/arith.c +++ b/gcc/fortran/arith.c @@ -1552,7 +1552,7 @@ eval_f; operands are array constructors. */ static gfc_expr * -eval_intrinsic (gfc_intrinsic_op operator, +eval_intrinsic (gfc_intrinsic_op op, eval_f eval, gfc_expr *op1, gfc_expr *op2) { gfc_expr temp, *result; @@ -1561,7 +1561,7 @@ eval_intrinsic (gfc_intrinsic_op operator, gfc_clear_ts (&temp.ts); - switch (operator) + switch (op) { /* Logical unary */ case INTRINSIC_NOT: @@ -1650,19 +1650,19 @@ eval_intrinsic (gfc_intrinsic_op operator, temp.expr_type = EXPR_OP; gfc_clear_ts (&temp.ts); - temp.value.op.operator = operator; + temp.value.op.op = op; temp.value.op.op1 = op1; temp.value.op.op2 = op2; gfc_type_convert_binary (&temp); - if (operator == INTRINSIC_EQ || operator == INTRINSIC_NE - || operator == INTRINSIC_GE || operator == INTRINSIC_GT - || operator == INTRINSIC_LE || operator == INTRINSIC_LT - || operator == INTRINSIC_EQ_OS || operator == INTRINSIC_NE_OS - || operator == INTRINSIC_GE_OS || operator == INTRINSIC_GT_OS - || operator == INTRINSIC_LE_OS || operator == INTRINSIC_LT_OS) + if (op == INTRINSIC_EQ || op == INTRINSIC_NE + || op == INTRINSIC_GE || op == INTRINSIC_GT + || op == INTRINSIC_LE || op == INTRINSIC_LT + || op == INTRINSIC_EQ_OS || op == INTRINSIC_NE_OS + || op == INTRINSIC_GE_OS || op == INTRINSIC_GT_OS + || op == INTRINSIC_LE_OS || op == INTRINSIC_LT_OS) { temp.ts.type = BT_LOGICAL; temp.ts.kind = gfc_default_logical_kind; @@ -1690,7 +1690,7 @@ eval_intrinsic (gfc_intrinsic_op operator, } /* Try to combine the operators. */ - if (operator == INTRINSIC_POWER && op2->ts.type != BT_INTEGER) + if (op == INTRINSIC_POWER && op2->ts.type != BT_INTEGER) goto runtime; if (op1->expr_type != EXPR_CONSTANT @@ -1725,7 +1725,7 @@ runtime: result->ts = temp.ts; result->expr_type = EXPR_OP; - result->value.op.operator = operator; + result->value.op.op = op; result->value.op.op1 = op1; result->value.op.op2 = op2; @@ -1806,7 +1806,7 @@ reduce_binary0 (gfc_expr *op1, gfc_expr *op2) static gfc_expr * -eval_intrinsic_f2 (gfc_intrinsic_op operator, +eval_intrinsic_f2 (gfc_intrinsic_op op, arith (*eval) (gfc_expr *, gfc_expr **), gfc_expr *op1, gfc_expr *op2) { @@ -1816,22 +1816,22 @@ eval_intrinsic_f2 (gfc_intrinsic_op operator, if (op2 == NULL) { if (gfc_zero_size_array (op1)) - return eval_type_intrinsic0 (operator, op1); + return eval_type_intrinsic0 (op, op1); } else { result = reduce_binary0 (op1, op2); if (result != NULL) - return eval_type_intrinsic0 (operator, result); + return eval_type_intrinsic0 (op, result); } f.f2 = eval; - return eval_intrinsic (operator, f, op1, op2); + return eval_intrinsic (op, f, op1, op2); } static gfc_expr * -eval_intrinsic_f3 (gfc_intrinsic_op operator, +eval_intrinsic_f3 (gfc_intrinsic_op op, arith (*eval) (gfc_expr *, gfc_expr *, gfc_expr **), gfc_expr *op1, gfc_expr *op2) { @@ -1840,10 +1840,10 @@ eval_intrinsic_f3 (gfc_intrinsic_op operator, result = reduce_binary0 (op1, op2); if (result != NULL) - return eval_type_intrinsic0(operator, result); + return eval_type_intrinsic0(op, result); f.f3 = eval; - return eval_intrinsic (operator, f, op1, op2); + return eval_intrinsic (op, f, op1, op2); } diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index d23a329..9fd54c5 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -5630,7 +5630,7 @@ access_attr_decl (gfc_statement st) interface_type type; gfc_user_op *uop; gfc_symbol *sym; - gfc_intrinsic_op operator; + gfc_intrinsic_op op; match m; if (gfc_match (" ::") == MATCH_NO && gfc_match_space () == MATCH_NO) @@ -5638,7 +5638,7 @@ access_attr_decl (gfc_statement st) for (;;) { - m = gfc_match_generic_spec (&type, name, &operator); + m = gfc_match_generic_spec (&type, name, &op); if (m == MATCH_NO) goto syntax; if (m == MATCH_ERROR) @@ -5662,15 +5662,15 @@ access_attr_decl (gfc_statement st) break; case INTERFACE_INTRINSIC_OP: - if (gfc_current_ns->operator_access[operator] == ACCESS_UNKNOWN) + if (gfc_current_ns->operator_access[op] == ACCESS_UNKNOWN) { - gfc_current_ns->operator_access[operator] = + gfc_current_ns->operator_access[op] = (st == ST_PUBLIC) ? ACCESS_PUBLIC : ACCESS_PRIVATE; } else { gfc_error ("Access specification of the %s operator at %C has " - "already been specified", gfc_op2string (operator)); + "already been specified", gfc_op2string (op)); goto done; } diff --git a/gcc/fortran/dependency.c b/gcc/fortran/dependency.c index 8e7e343..3d98cac 100644 --- a/gcc/fortran/dependency.c +++ b/gcc/fortran/dependency.c @@ -76,15 +76,15 @@ gfc_dep_compare_expr (gfc_expr *e1, gfc_expr *e2) int i; if (e1->expr_type == EXPR_OP - && (e1->value.op.operator == INTRINSIC_UPLUS - || e1->value.op.operator == INTRINSIC_PARENTHESES)) + && (e1->value.op.op == INTRINSIC_UPLUS + || e1->value.op.op == INTRINSIC_PARENTHESES)) return gfc_dep_compare_expr (e1->value.op.op1, e2); if (e2->expr_type == EXPR_OP - && (e2->value.op.operator == INTRINSIC_UPLUS - || e2->value.op.operator == INTRINSIC_PARENTHESES)) + && (e2->value.op.op == INTRINSIC_UPLUS + || e2->value.op.op == INTRINSIC_PARENTHESES)) return gfc_dep_compare_expr (e1, e2->value.op.op1); - if (e1->expr_type == EXPR_OP && e1->value.op.operator == INTRINSIC_PLUS) + if (e1->expr_type == EXPR_OP && e1->value.op.op == INTRINSIC_PLUS) { /* Compare X+C vs. X. */ if (e1->value.op.op2->expr_type == EXPR_CONSTANT @@ -93,7 +93,7 @@ gfc_dep_compare_expr (gfc_expr *e1, gfc_expr *e2) return mpz_sgn (e1->value.op.op2->value.integer); /* Compare P+Q vs. R+S. */ - if (e2->expr_type == EXPR_OP && e2->value.op.operator == INTRINSIC_PLUS) + if (e2->expr_type == EXPR_OP && e2->value.op.op == INTRINSIC_PLUS) { int l, r; @@ -126,7 +126,7 @@ gfc_dep_compare_expr (gfc_expr *e1, gfc_expr *e2) } /* Compare X vs. X+C. */ - if (e2->expr_type == EXPR_OP && e2->value.op.operator == INTRINSIC_PLUS) + if (e2->expr_type == EXPR_OP && e2->value.op.op == INTRINSIC_PLUS) { if (e2->value.op.op2->expr_type == EXPR_CONSTANT && e2->value.op.op2->ts.type == BT_INTEGER @@ -135,7 +135,7 @@ gfc_dep_compare_expr (gfc_expr *e1, gfc_expr *e2) } /* Compare X-C vs. X. */ - if (e1->expr_type == EXPR_OP && e1->value.op.operator == INTRINSIC_MINUS) + if (e1->expr_type == EXPR_OP && e1->value.op.op == INTRINSIC_MINUS) { if (e1->value.op.op2->expr_type == EXPR_CONSTANT && e1->value.op.op2->ts.type == BT_INTEGER @@ -143,7 +143,7 @@ gfc_dep_compare_expr (gfc_expr *e1, gfc_expr *e2) return -mpz_sgn (e1->value.op.op2->value.integer); /* Compare P-Q vs. R-S. */ - if (e2->expr_type == EXPR_OP && e2->value.op.operator == INTRINSIC_MINUS) + if (e2->expr_type == EXPR_OP && e2->value.op.op == INTRINSIC_MINUS) { int l, r; @@ -163,7 +163,7 @@ gfc_dep_compare_expr (gfc_expr *e1, gfc_expr *e2) } /* Compare X vs. X-C. */ - if (e2->expr_type == EXPR_OP && e2->value.op.operator == INTRINSIC_MINUS) + if (e2->expr_type == EXPR_OP && e2->value.op.op == INTRINSIC_MINUS) { if (e2->value.op.op2->expr_type == EXPR_CONSTANT && e2->value.op.op2->ts.type == BT_INTEGER @@ -196,7 +196,7 @@ gfc_dep_compare_expr (gfc_expr *e1, gfc_expr *e2) case EXPR_OP: /* Intrinsic operators are the same if their operands are the same. */ - if (e1->value.op.operator != e2->value.op.operator) + if (e1->value.op.op != e2->value.op.op) return -2; if (e1->value.op.op2 == 0) { diff --git a/gcc/fortran/dump-parse-tree.c b/gcc/fortran/dump-parse-tree.c index 4ae61c6..80ddda2 100644 --- a/gcc/fortran/dump-parse-tree.c +++ b/gcc/fortran/dump-parse-tree.c @@ -437,7 +437,7 @@ show_expr (gfc_expr *p) case EXPR_OP: fputc ('(', dumpfile); - switch (p->value.op.operator) + switch (p->value.op.op) { case INTRINSIC_UPLUS: fputs ("U+ ", dumpfile); @@ -737,7 +737,7 @@ show_uop (gfc_user_op *uop) show_indent (); fprintf (dumpfile, "%s:", uop->name); - for (intr = uop->operator; intr; intr = intr->next) + for (intr = uop->op; intr; intr = intr->next) fprintf (dumpfile, " %s", intr->sym->name); } @@ -1897,7 +1897,7 @@ show_namespace (gfc_namespace *ns) for (op = GFC_INTRINSIC_BEGIN; op != GFC_INTRINSIC_END; op++) { /* User operator interfaces */ - intr = ns->operator[op]; + intr = ns->op[op]; if (intr == NULL) continue; diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index d379500..c0c4fdd 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -480,7 +480,7 @@ gfc_copy_expr (gfc_expr *p) break; case EXPR_OP: - switch (q->value.op.operator) + switch (q->value.op.op) { case INTRINSIC_NOT: case INTRINSIC_PARENTHESES: @@ -659,7 +659,7 @@ gfc_type_convert_binary (gfc_expr *e) e->ts = op1->ts; /* Special case for ** operator. */ - if (e->value.op.operator == INTRINSIC_POWER) + if (e->value.op.op == INTRINSIC_POWER) goto done; gfc_convert_type (e->value.op.op2, &e->ts, 2); @@ -830,12 +830,12 @@ simplify_intrinsic_op (gfc_expr *p, int type) gfc_intrinsic_op op; gfc_expr *op1, *op2, *result; - if (p->value.op.operator == INTRINSIC_USER) + if (p->value.op.op == INTRINSIC_USER) return SUCCESS; op1 = p->value.op.op1; op2 = p->value.op.op2; - op = p->value.op.operator; + op = p->value.op.op; if (gfc_simplify_expr (op1, type) == FAILURE) return FAILURE; @@ -1840,7 +1840,7 @@ check_intrinsic_op (gfc_expr *e, try (*check_function) (gfc_expr *)) if ((*check_function) (op1) == FAILURE) return FAILURE; - switch (e->value.op.operator) + switch (e->value.op.op) { case INTRINSIC_UPLUS: case INTRINSIC_UMINUS: @@ -1883,7 +1883,7 @@ check_intrinsic_op (gfc_expr *e, try (*check_function) (gfc_expr *)) if (!numeric_type (et0 (op1)) || !numeric_type (et0 (op2))) goto not_numeric; - if (e->value.op.operator == INTRINSIC_POWER + if (e->value.op.op == INTRINSIC_POWER && check_function == check_init_expr && et0 (op2) != BT_INTEGER) { if (gfc_notify_std (GFC_STD_F2003,"Fortran 2003: Noninteger " diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h index 4cc8be2..e8a4cf2 100644 --- a/gcc/fortran/gfortran.h +++ b/gcc/fortran/gfortran.h @@ -982,8 +982,6 @@ gfc_interface; #define gfc_get_interface() XCNEW (gfc_interface) -/* FIXME: This macro is temporary until we convert everything. */ -#define operator op /* User operator nodes. These are like stripped down symbols. */ typedef struct { @@ -1184,7 +1182,7 @@ typedef struct gfc_namespace /* Points to the equivalence groups produced by trans_common. */ struct gfc_equiv_list *equiv_lists; - gfc_interface *operator[GFC_INTRINSIC_OPS]; + gfc_interface *op[GFC_INTRINSIC_OPS]; /* Points to the parent namespace, i.e. the namespace of a module or procedure in which the procedure belonging to this namespace is @@ -1495,7 +1493,7 @@ typedef struct gfc_expr struct { - gfc_intrinsic_op operator; + gfc_intrinsic_op op; gfc_user_op *uop; struct gfc_expr *op1, *op2; } diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c index 147ded0..0fa5b57 100644 --- a/gcc/fortran/interface.c +++ b/gcc/fortran/interface.c @@ -95,32 +95,32 @@ gfc_free_interface (gfc_interface *intr) minus respectively, leaving the rest unchanged. */ static gfc_intrinsic_op -fold_unary (gfc_intrinsic_op operator) +fold_unary (gfc_intrinsic_op op) { - switch (operator) + switch (op) { case INTRINSIC_UPLUS: - operator = INTRINSIC_PLUS; + op = INTRINSIC_PLUS; break; case INTRINSIC_UMINUS: - operator = INTRINSIC_MINUS; + op = INTRINSIC_MINUS; break; default: break; } - return operator; + return op; } /* Match a generic specification. Depending on which type of - interface is found, the 'name' or 'operator' pointers may be set. + interface is found, the 'name' or 'op' pointers may be set. This subroutine doesn't return MATCH_NO. */ match gfc_match_generic_spec (interface_type *type, char *name, - gfc_intrinsic_op *operator) + gfc_intrinsic_op *op) { char buffer[GFC_MAX_SYMBOL_LEN + 1]; match m; @@ -129,14 +129,14 @@ gfc_match_generic_spec (interface_type *type, if (gfc_match (" assignment ( = )") == MATCH_YES) { *type = INTERFACE_INTRINSIC_OP; - *operator = INTRINSIC_ASSIGN; + *op = INTRINSIC_ASSIGN; return MATCH_YES; } if (gfc_match (" operator ( %o )", &i) == MATCH_YES) { /* Operator i/f */ *type = INTERFACE_INTRINSIC_OP; - *operator = fold_unary (i); + *op = fold_unary (i); return MATCH_YES; } @@ -184,12 +184,12 @@ gfc_match_interface (void) char name[GFC_MAX_SYMBOL_LEN + 1]; interface_type type; gfc_symbol *sym; - gfc_intrinsic_op operator; + gfc_intrinsic_op op; match m; m = gfc_match_space (); - if (gfc_match_generic_spec (&type, name, &operator) == MATCH_ERROR) + if (gfc_match_generic_spec (&type, name, &op) == MATCH_ERROR) return MATCH_ERROR; /* If we're not looking at the end of the statement now, or if this @@ -229,7 +229,7 @@ gfc_match_interface (void) break; case INTERFACE_INTRINSIC_OP: - current_interface.op = operator; + current_interface.op = op; break; case INTERFACE_NAMELESS: @@ -275,12 +275,12 @@ gfc_match_end_interface (void) { char name[GFC_MAX_SYMBOL_LEN + 1]; interface_type type; - gfc_intrinsic_op operator; + gfc_intrinsic_op op; match m; m = gfc_match_space (); - if (gfc_match_generic_spec (&type, name, &operator) == MATCH_ERROR) + if (gfc_match_generic_spec (&type, name, &op) == MATCH_ERROR) return MATCH_ERROR; /* If we're not looking at the end of the statement now, or if this @@ -308,7 +308,7 @@ gfc_match_end_interface (void) break; case INTERFACE_INTRINSIC_OP: - if (type != current_interface.type || operator != current_interface.op) + if (type != current_interface.type || op != current_interface.op) { if (current_interface.op == INTRINSIC_ASSIGN) @@ -538,7 +538,7 @@ find_keyword_arg (const char *name, gfc_formal_arglist *f) interfaces for that operator are legal. */ static void -check_operator_interface (gfc_interface *intr, gfc_intrinsic_op operator) +check_operator_interface (gfc_interface *intr, gfc_intrinsic_op op) { gfc_formal_arglist *formal; sym_intent i1, i2; @@ -585,10 +585,10 @@ check_operator_interface (gfc_interface *intr, gfc_intrinsic_op operator) /* Only +, - and .not. can be unary operators. .not. cannot be a binary operator. */ - if (args == 0 || args > 2 || (args == 1 && operator != INTRINSIC_PLUS - && operator != INTRINSIC_MINUS - && operator != INTRINSIC_NOT) - || (args == 2 && operator == INTRINSIC_NOT)) + if (args == 0 || args > 2 || (args == 1 && op != INTRINSIC_PLUS + && op != INTRINSIC_MINUS + && op != INTRINSIC_NOT) + || (args == 2 && op == INTRINSIC_NOT)) { gfc_error ("Operator interface at %L has the wrong number of arguments", &intr->sym->declared_at); @@ -597,7 +597,7 @@ check_operator_interface (gfc_interface *intr, gfc_intrinsic_op operator) /* Check that intrinsics are mapped to functions, except INTRINSIC_ASSIGN which should map to a subroutine. */ - if (operator == INTRINSIC_ASSIGN) + if (op == INTRINSIC_ASSIGN) { if (!sym->attr.subroutine) { @@ -638,7 +638,7 @@ check_operator_interface (gfc_interface *intr, gfc_intrinsic_op operator) } /* Check intents on operator interfaces. */ - if (operator == INTRINSIC_ASSIGN) + if (op == INTRINSIC_ASSIGN) { if (i1 != INTENT_OUT && i1 != INTENT_INOUT) gfc_error ("First argument of defined assignment at %L must be " @@ -674,7 +674,7 @@ check_operator_interface (gfc_interface *intr, gfc_intrinsic_op operator) ((t) == BT_INTEGER || (t) == BT_REAL || (t) == BT_COMPLEX) /* Unary ops are easy, do them first. */ - if (operator == INTRINSIC_NOT) + if (op == INTRINSIC_NOT) { if (t1 == BT_LOGICAL) goto bad_repl; @@ -682,7 +682,7 @@ check_operator_interface (gfc_interface *intr, gfc_intrinsic_op operator) return; } - if (args == 1 && (operator == INTRINSIC_PLUS || operator == INTRINSIC_MINUS)) + if (args == 1 && (op == INTRINSIC_PLUS || op == INTRINSIC_MINUS)) { if (IS_NUMERIC_TYPE (t1)) goto bad_repl; @@ -702,7 +702,7 @@ check_operator_interface (gfc_interface *intr, gfc_intrinsic_op operator) if (r1 != r2 && r1 != 0 && r2 != 0) return; - switch (operator) + switch (op) { case INTRINSIC_EQ: case INTRINSIC_EQ_OS: @@ -1243,7 +1243,7 @@ check_uop_interfaces (gfc_user_op *uop) gfc_namespace *ns; sprintf (interface_name, "operator interface '%s'", uop->name); - if (check_interface0 (uop->operator, interface_name)) + if (check_interface0 (uop->op, interface_name)) return; for (ns = gfc_current_ns; ns; ns = ns->parent) @@ -1252,7 +1252,7 @@ check_uop_interfaces (gfc_user_op *uop) if (uop2 == NULL) continue; - check_interface1 (uop->operator, uop2->operator, 0, + check_interface1 (uop->op, uop2->op, 0, interface_name, true); } } @@ -1288,76 +1288,76 @@ gfc_check_interfaces (gfc_namespace *ns) sprintf (interface_name, "intrinsic '%s' operator", gfc_op2string (i)); - if (check_interface0 (ns->operator[i], interface_name)) + if (check_interface0 (ns->op[i], interface_name)) continue; - check_operator_interface (ns->operator[i], i); + check_operator_interface (ns->op[i], i); for (ns2 = ns; ns2; ns2 = ns2->parent) { - if (check_interface1 (ns->operator[i], ns2->operator[i], 0, + if (check_interface1 (ns->op[i], ns2->op[i], 0, interface_name, true)) goto done; switch (i) { case INTRINSIC_EQ: - if (check_interface1 (ns->operator[i], ns2->operator[INTRINSIC_EQ_OS], + if (check_interface1 (ns->op[i], ns2->op[INTRINSIC_EQ_OS], 0, interface_name, true)) goto done; break; case INTRINSIC_EQ_OS: - if (check_interface1 (ns->operator[i], ns2->operator[INTRINSIC_EQ], + if (check_interface1 (ns->op[i], ns2->op[INTRINSIC_EQ], 0, interface_name, true)) goto done; break; case INTRINSIC_NE: - if (check_interface1 (ns->operator[i], ns2->operator[INTRINSIC_NE_OS], + if (check_interface1 (ns->op[i], ns2->op[INTRINSIC_NE_OS], 0, interface_name, true)) goto done; break; case INTRINSIC_NE_OS: - if (check_interface1 (ns->operator[i], ns2->operator[INTRINSIC_NE], + if (check_interface1 (ns->op[i], ns2->op[INTRINSIC_NE], 0, interface_name, true)) goto done; break; case INTRINSIC_GT: - if (check_interface1 (ns->operator[i], ns2->operator[INTRINSIC_GT_OS], + if (check_interface1 (ns->op[i], ns2->op[INTRINSIC_GT_OS], 0, interface_name, true)) goto done; break; case INTRINSIC_GT_OS: - if (check_interface1 (ns->operator[i], ns2->operator[INTRINSIC_GT], + if (check_interface1 (ns->op[i], ns2->op[INTRINSIC_GT], 0, interface_name, true)) goto done; break; case INTRINSIC_GE: - if (check_interface1 (ns->operator[i], ns2->operator[INTRINSIC_GE_OS], + if (check_interface1 (ns->op[i], ns2->op[INTRINSIC_GE_OS], 0, interface_name, true)) goto done; break; case INTRINSIC_GE_OS: - if (check_interface1 (ns->operator[i], ns2->operator[INTRINSIC_GE], + if (check_interface1 (ns->op[i], ns2->op[INTRINSIC_GE], 0, interface_name, true)) goto done; break; case INTRINSIC_LT: - if (check_interface1 (ns->operator[i], ns2->operator[INTRINSIC_LT_OS], + if (check_interface1 (ns->op[i], ns2->op[INTRINSIC_LT_OS], 0, interface_name, true)) goto done; break; case INTRINSIC_LT_OS: - if (check_interface1 (ns->operator[i], ns2->operator[INTRINSIC_LT], + if (check_interface1 (ns->op[i], ns2->op[INTRINSIC_LT], 0, interface_name, true)) goto done; break; case INTRINSIC_LE: - if (check_interface1 (ns->operator[i], ns2->operator[INTRINSIC_LE_OS], + if (check_interface1 (ns->op[i], ns2->op[INTRINSIC_LE_OS], 0, interface_name, true)) goto done; break; case INTRINSIC_LE_OS: - if (check_interface1 (ns->operator[i], ns2->operator[INTRINSIC_LE], + if (check_interface1 (ns->op[i], ns2->op[INTRINSIC_LE], 0, interface_name, true)) goto done; break; @@ -2566,7 +2566,7 @@ gfc_extend_expr (gfc_expr *e) actual->next->expr = e->value.op.op2; } - i = fold_unary (e->value.op.operator); + i = fold_unary (e->value.op.op); if (i == INTRINSIC_USER) { @@ -2576,7 +2576,7 @@ gfc_extend_expr (gfc_expr *e) if (uop == NULL) continue; - sym = gfc_search_interface (uop->operator, 0, &actual); + sym = gfc_search_interface (uop->op, 0, &actual); if (sym != NULL) break; } @@ -2591,48 +2591,48 @@ gfc_extend_expr (gfc_expr *e) { case INTRINSIC_EQ: case INTRINSIC_EQ_OS: - sym = gfc_search_interface (ns->operator[INTRINSIC_EQ], 0, &actual); + sym = gfc_search_interface (ns->op[INTRINSIC_EQ], 0, &actual); if (sym == NULL) - sym = gfc_search_interface (ns->operator[INTRINSIC_EQ_OS], 0, &actual); + sym = gfc_search_interface (ns->op[INTRINSIC_EQ_OS], 0, &actual); break; case INTRINSIC_NE: case INTRINSIC_NE_OS: - sym = gfc_search_interface (ns->operator[INTRINSIC_NE], 0, &actual); + sym = gfc_search_interface (ns->op[INTRINSIC_NE], 0, &actual); if (sym == NULL) - sym = gfc_search_interface (ns->operator[INTRINSIC_NE_OS], 0, &actual); + sym = gfc_search_interface (ns->op[INTRINSIC_NE_OS], 0, &actual); break; case INTRINSIC_GT: case INTRINSIC_GT_OS: - sym = gfc_search_interface (ns->operator[INTRINSIC_GT], 0, &actual); + sym = gfc_search_interface (ns->op[INTRINSIC_GT], 0, &actual); if (sym == NULL) - sym = gfc_search_interface (ns->operator[INTRINSIC_GT_OS], 0, &actual); + sym = gfc_search_interface (ns->op[INTRINSIC_GT_OS], 0, &actual); break; case INTRINSIC_GE: case INTRINSIC_GE_OS: - sym = gfc_search_interface (ns->operator[INTRINSIC_GE], 0, &actual); + sym = gfc_search_interface (ns->op[INTRINSIC_GE], 0, &actual); if (sym == NULL) - sym = gfc_search_interface (ns->operator[INTRINSIC_GE_OS], 0, &actual); + sym = gfc_search_interface (ns->op[INTRINSIC_GE_OS], 0, &actual); break; case INTRINSIC_LT: case INTRINSIC_LT_OS: - sym = gfc_search_interface (ns->operator[INTRINSIC_LT], 0, &actual); + sym = gfc_search_interface (ns->op[INTRINSIC_LT], 0, &actual); if (sym == NULL) - sym = gfc_search_interface (ns->operator[INTRINSIC_LT_OS], 0, &actual); + sym = gfc_search_interface (ns->op[INTRINSIC_LT_OS], 0, &actual); break; case INTRINSIC_LE: case INTRINSIC_LE_OS: - sym = gfc_search_interface (ns->operator[INTRINSIC_LE], 0, &actual); + sym = gfc_search_interface (ns->op[INTRINSIC_LE], 0, &actual); if (sym == NULL) - sym = gfc_search_interface (ns->operator[INTRINSIC_LE_OS], 0, &actual); + sym = gfc_search_interface (ns->op[INTRINSIC_LE_OS], 0, &actual); break; default: - sym = gfc_search_interface (ns->operator[i], 0, &actual); + sym = gfc_search_interface (ns->op[i], 0, &actual); } if (sym != NULL) @@ -2704,7 +2704,7 @@ gfc_extend_assign (gfc_code *c, gfc_namespace *ns) for (; ns; ns = ns->parent) { - sym = gfc_search_interface (ns->operator[INTRINSIC_ASSIGN], 1, &actual); + sym = gfc_search_interface (ns->op[INTRINSIC_ASSIGN], 1, &actual); if (sym != NULL) break; } @@ -2771,52 +2771,52 @@ gfc_add_interface (gfc_symbol *new) { case INTRINSIC_EQ: case INTRINSIC_EQ_OS: - if (check_new_interface (ns->operator[INTRINSIC_EQ], new) == FAILURE || - check_new_interface (ns->operator[INTRINSIC_EQ_OS], new) == FAILURE) + if (check_new_interface (ns->op[INTRINSIC_EQ], new) == FAILURE || + check_new_interface (ns->op[INTRINSIC_EQ_OS], new) == FAILURE) return FAILURE; break; case INTRINSIC_NE: case INTRINSIC_NE_OS: - if (check_new_interface (ns->operator[INTRINSIC_NE], new) == FAILURE || - check_new_interface (ns->operator[INTRINSIC_NE_OS], new) == FAILURE) + if (check_new_interface (ns->op[INTRINSIC_NE], new) == FAILURE || + check_new_interface (ns->op[INTRINSIC_NE_OS], new) == FAILURE) return FAILURE; break; case INTRINSIC_GT: case INTRINSIC_GT_OS: - if (check_new_interface (ns->operator[INTRINSIC_GT], new) == FAILURE || - check_new_interface (ns->operator[INTRINSIC_GT_OS], new) == FAILURE) + if (check_new_interface (ns->op[INTRINSIC_GT], new) == FAILURE || + check_new_interface (ns->op[INTRINSIC_GT_OS], new) == FAILURE) return FAILURE; break; case INTRINSIC_GE: case INTRINSIC_GE_OS: - if (check_new_interface (ns->operator[INTRINSIC_GE], new) == FAILURE || - check_new_interface (ns->operator[INTRINSIC_GE_OS], new) == FAILURE) + if (check_new_interface (ns->op[INTRINSIC_GE], new) == FAILURE || + check_new_interface (ns->op[INTRINSIC_GE_OS], new) == FAILURE) return FAILURE; break; case INTRINSIC_LT: case INTRINSIC_LT_OS: - if (check_new_interface (ns->operator[INTRINSIC_LT], new) == FAILURE || - check_new_interface (ns->operator[INTRINSIC_LT_OS], new) == FAILURE) + if (check_new_interface (ns->op[INTRINSIC_LT], new) == FAILURE || + check_new_interface (ns->op[INTRINSIC_LT_OS], new) == FAILURE) return FAILURE; break; case INTRINSIC_LE: case INTRINSIC_LE_OS: - if (check_new_interface (ns->operator[INTRINSIC_LE], new) == FAILURE || - check_new_interface (ns->operator[INTRINSIC_LE_OS], new) == FAILURE) + if (check_new_interface (ns->op[INTRINSIC_LE], new) == FAILURE || + check_new_interface (ns->op[INTRINSIC_LE_OS], new) == FAILURE) return FAILURE; break; default: - if (check_new_interface (ns->operator[current_interface.op], new) == FAILURE) + if (check_new_interface (ns->op[current_interface.op], new) == FAILURE) return FAILURE; } - head = ¤t_interface.ns->operator[current_interface.op]; + head = ¤t_interface.ns->op[current_interface.op]; break; case INTERFACE_GENERIC: @@ -2834,11 +2834,11 @@ gfc_add_interface (gfc_symbol *new) break; case INTERFACE_USER_OP: - if (check_new_interface (current_interface.uop->operator, new) + if (check_new_interface (current_interface.uop->op, new) == FAILURE) return FAILURE; - head = ¤t_interface.uop->operator; + head = ¤t_interface.uop->op; break; default: @@ -2862,7 +2862,7 @@ gfc_current_interface_head (void) switch (current_interface.type) { case INTERFACE_INTRINSIC_OP: - return current_interface.ns->operator[current_interface.op]; + return current_interface.ns->op[current_interface.op]; break; case INTERFACE_GENERIC: @@ -2870,7 +2870,7 @@ gfc_current_interface_head (void) break; case INTERFACE_USER_OP: - return current_interface.uop->operator; + return current_interface.uop->op; break; default: @@ -2885,7 +2885,7 @@ gfc_set_current_interface_head (gfc_interface *i) switch (current_interface.type) { case INTERFACE_INTRINSIC_OP: - current_interface.ns->operator[current_interface.op] = i; + current_interface.ns->op[current_interface.op] = i; break; case INTERFACE_GENERIC: @@ -2893,7 +2893,7 @@ gfc_set_current_interface_head (gfc_interface *i) break; case INTERFACE_USER_OP: - current_interface.uop->operator = i; + current_interface.uop->op = i; break; default: diff --git a/gcc/fortran/iresolve.c b/gcc/fortran/iresolve.c index 2c80414..f447ba2 100644 --- a/gcc/fortran/iresolve.c +++ b/gcc/fortran/iresolve.c @@ -705,7 +705,7 @@ gfc_resolve_dot_product (gfc_expr *f, gfc_expr *a, gfc_expr *b) temp.expr_type = EXPR_OP; gfc_clear_ts (&temp.ts); - temp.value.op.operator = INTRINSIC_NONE; + temp.value.op.op = INTRINSIC_NONE; temp.value.op.op1 = a; temp.value.op.op2 = b; gfc_type_convert_binary (&temp); @@ -1332,7 +1332,7 @@ gfc_resolve_matmul (gfc_expr *f, gfc_expr *a, gfc_expr *b) { temp.expr_type = EXPR_OP; gfc_clear_ts (&temp.ts); - temp.value.op.operator = INTRINSIC_NONE; + temp.value.op.op = INTRINSIC_NONE; temp.value.op.op1 = a; temp.value.op.op2 = b; gfc_type_convert_binary (&temp); diff --git a/gcc/fortran/matchexp.c b/gcc/fortran/matchexp.c index a9e90c9..433f4d2 100644 --- a/gcc/fortran/matchexp.c +++ b/gcc/fortran/matchexp.c @@ -142,7 +142,7 @@ gfc_get_parentheses (gfc_expr *e) e2->ts = e->ts; e2->rank = e->rank; e2->where = e->where; - e2->value.op.operator = INTRINSIC_PARENTHESES; + e2->value.op.op = INTRINSIC_PARENTHESES; e2->value.op.op1 = e; e2->value.op.op2 = NULL; return e2; @@ -208,14 +208,14 @@ syntax: /* Build an operator expression node. */ static gfc_expr * -build_node (gfc_intrinsic_op operator, locus *where, +build_node (gfc_intrinsic_op op, locus *where, gfc_expr *op1, gfc_expr *op2) { gfc_expr *new; new = gfc_get_expr (); new->expr_type = EXPR_OP; - new->value.op.operator = operator; + new->value.op.op = op; new->where = *where; new->value.op.op1 = op1; diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c index 9e9e768..3f27fda 100644 --- a/gcc/fortran/module.c +++ b/gcc/fortran/module.c @@ -169,7 +169,7 @@ typedef struct gfc_use_rename char local_name[GFC_MAX_SYMBOL_LEN + 1], use_name[GFC_MAX_SYMBOL_LEN + 1]; struct gfc_use_rename *next; int found; - gfc_intrinsic_op operator; + gfc_intrinsic_op op; locus where; } gfc_use_rename; @@ -504,7 +504,7 @@ gfc_match_use (void) char name[GFC_MAX_SYMBOL_LEN + 1], module_nature[GFC_MAX_SYMBOL_LEN + 1]; gfc_use_rename *tail = NULL, *new; interface_type type, type2; - gfc_intrinsic_op operator; + gfc_intrinsic_op op; match m; specified_int = false; @@ -593,8 +593,8 @@ gfc_match_use (void) /* See what kind of interface we're dealing with. Assume it is not an operator. */ - new->operator = INTRINSIC_NONE; - if (gfc_match_generic_spec (&type, name, &operator) == MATCH_ERROR) + new->op = INTRINSIC_NONE; + if (gfc_match_generic_spec (&type, name, &op) == MATCH_ERROR) goto cleanup; switch (type) @@ -614,7 +614,7 @@ gfc_match_use (void) goto cleanup; if (type == INTERFACE_USER_OP) - new->operator = INTRINSIC_USER; + new->op = INTRINSIC_USER; if (only_flag) { @@ -623,7 +623,7 @@ gfc_match_use (void) else { strcpy (new->local_name, name); - m = gfc_match_generic_spec (&type2, new->use_name, &operator); + m = gfc_match_generic_spec (&type2, new->use_name, &op); if (type != type2) goto syntax; if (m == MATCH_NO) @@ -638,7 +638,7 @@ gfc_match_use (void) goto syntax; strcpy (new->local_name, name); - m = gfc_match_generic_spec (&type2, new->use_name, &operator); + m = gfc_match_generic_spec (&type2, new->use_name, &op); if (type != type2) goto syntax; if (m == MATCH_NO) @@ -657,7 +657,7 @@ gfc_match_use (void) break; case INTERFACE_INTRINSIC_OP: - new->operator = operator; + new->op = op; break; default: @@ -698,8 +698,8 @@ find_use_name_n (const char *name, int *inst, bool interface) for (u = gfc_rename_list; u; u = u->next) { if (strcmp (u->use_name, name) != 0 - || (u->operator == INTRINSIC_USER && !interface) - || (u->operator != INTRINSIC_USER && interface)) + || (u->op == INTRINSIC_USER && !interface) + || (u->op != INTRINSIC_USER && interface)) continue; if (++i == *inst) break; @@ -746,12 +746,12 @@ number_use_names (const char *name, bool interface) /* Try to find the operator in the current list. */ static gfc_use_rename * -find_use_operator (gfc_intrinsic_op operator) +find_use_operator (gfc_intrinsic_op op) { gfc_use_rename *u; for (u = gfc_rename_list; u; u = u->next) - if (u->operator == operator) + if (u->op == op) return u; return NULL; @@ -2873,10 +2873,10 @@ mio_expr (gfc_expr **ep) switch (e->expr_type) { case EXPR_OP: - e->value.op.operator - = MIO_NAME (gfc_intrinsic_op) (e->value.op.operator, intrinsics); + e->value.op.op + = MIO_NAME (gfc_intrinsic_op) (e->value.op.op, intrinsics); - switch (e->value.op.operator) + switch (e->value.op.op) { case INTRINSIC_UPLUS: case INTRINSIC_UMINUS: @@ -3383,16 +3383,16 @@ load_operator_interfaces (void) if (i == 1) { uop = gfc_get_uop (p); - pi = mio_interface_rest (&uop->operator); + pi = mio_interface_rest (&uop->op); } else { if (gfc_find_uop (p, NULL)) continue; uop = gfc_get_uop (p); - uop->operator = gfc_get_interface (); - uop->operator->where = gfc_current_locus; - add_fixup (pi->integer, &uop->operator->sym); + uop->op = gfc_get_interface (); + uop->op->where = gfc_current_locus; + add_fixup (pi->integer, &uop->op->sym); } } } @@ -3954,7 +3954,7 @@ read_module (void) u->found = 1; } - mio_interface (&gfc_current_ns->operator[i]); + mio_interface (&gfc_current_ns->op[i]); } mio_rparen (); @@ -3984,14 +3984,14 @@ read_module (void) if (u->found) continue; - if (u->operator == INTRINSIC_NONE) + if (u->op == INTRINSIC_NONE) { gfc_error ("Symbol '%s' referenced at %L not found in module '%s'", u->use_name, &u->where, module_name); continue; } - if (u->operator == INTRINSIC_USER) + if (u->op == INTRINSIC_USER) { gfc_error ("User operator '%s' referenced at %L not found " "in module '%s'", u->use_name, &u->where, module_name); @@ -3999,7 +3999,7 @@ read_module (void) } gfc_error ("Intrinsic operator '%s' referenced at %L not found " - "in module '%s'", gfc_op2string (u->operator), &u->where, + "in module '%s'", gfc_op2string (u->op), &u->where, module_name); } @@ -4319,11 +4319,11 @@ write_operator (gfc_user_op *uop) static char nullstring[] = ""; const char *p = nullstring; - if (uop->operator == NULL + if (uop->op == NULL || !gfc_check_access (uop->access, uop->ns->default_access)) return; - mio_symbol_interface (&uop->name, &p, &uop->operator); + mio_symbol_interface (&uop->name, &p, &uop->op); } @@ -4395,7 +4395,7 @@ write_module (void) mio_interface (gfc_check_access (gfc_current_ns->operator_access[i], gfc_current_ns->default_access) - ? &gfc_current_ns->operator[i] : NULL); + ? &gfc_current_ns->op[i] : NULL); } mio_rparen (); diff --git a/gcc/fortran/openmp.c b/gcc/fortran/openmp.c index 28f1cc2..9ac9a4a 100644 --- a/gcc/fortran/openmp.c +++ b/gcc/fortran/openmp.c @@ -1093,7 +1093,7 @@ resolve_omp_atomic (gfc_code *code) if (expr2->expr_type == EXPR_OP) { gfc_expr *v = NULL, *e, *c; - gfc_intrinsic_op op = expr2->value.op.operator; + gfc_intrinsic_op op = expr2->value.op.op; gfc_intrinsic_op alt_op = INTRINSIC_NONE; switch (op) @@ -1156,8 +1156,8 @@ resolve_omp_atomic (gfc_code *code) else if ((c = is_conversion (e, true)) != NULL) q = &e->value.function.actual->expr; else if (e->expr_type != EXPR_OP - || (e->value.op.operator != op - && e->value.op.operator != alt_op) + || (e->value.op.op != op + && e->value.op.op != alt_op) || e->rank != 0) break; else @@ -1176,7 +1176,7 @@ resolve_omp_atomic (gfc_code *code) if (p != NULL) { e = *p; - switch (e->value.op.operator) + switch (e->value.op.op) { case INTRINSIC_MINUS: case INTRINSIC_DIVIDE: diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 0eb78bd..758f86f 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -2903,7 +2903,7 @@ resolve_operator (gfc_expr *e) /* Resolve all subnodes-- give them types. */ - switch (e->value.op.operator) + switch (e->value.op.op) { default: if (gfc_resolve_expr (e->value.op.op2) == FAILURE) @@ -2933,7 +2933,7 @@ resolve_operator (gfc_expr *e) goto bad_op; } - switch (e->value.op.operator) + switch (e->value.op.op) { case INTRINSIC_UPLUS: case INTRINSIC_UMINUS: @@ -2946,7 +2946,7 @@ resolve_operator (gfc_expr *e) } sprintf (msg, _("Operand of unary numeric operator '%s' at %%L is %s"), - gfc_op2string (e->value.op.operator), gfc_typename (&e->ts)); + gfc_op2string (e->value.op.op), gfc_typename (&e->ts)); goto bad_op; case INTRINSIC_PLUS: @@ -2962,7 +2962,7 @@ resolve_operator (gfc_expr *e) sprintf (msg, _("Operands of binary numeric operator '%s' at %%L are %s/%s"), - gfc_op2string (e->value.op.operator), gfc_typename (&op1->ts), + gfc_op2string (e->value.op.op), gfc_typename (&op1->ts), gfc_typename (&op2->ts)); goto bad_op; @@ -2996,7 +2996,7 @@ resolve_operator (gfc_expr *e) } sprintf (msg, _("Operands of logical operator '%s' at %%L are %s/%s"), - gfc_op2string (e->value.op.operator), gfc_typename (&op1->ts), + gfc_op2string (e->value.op.op), gfc_typename (&op1->ts), gfc_typename (&op2->ts)); goto bad_op; @@ -3053,19 +3053,19 @@ resolve_operator (gfc_expr *e) if (op1->ts.type == BT_LOGICAL && op2->ts.type == BT_LOGICAL) sprintf (msg, _("Logicals at %%L must be compared with %s instead of %s"), - (e->value.op.operator == INTRINSIC_EQ - || e->value.op.operator == INTRINSIC_EQ_OS) - ? ".eqv." : ".neqv.", gfc_op2string (e->value.op.operator)); + (e->value.op.op == INTRINSIC_EQ + || e->value.op.op == INTRINSIC_EQ_OS) + ? ".eqv." : ".neqv.", gfc_op2string (e->value.op.op)); else sprintf (msg, _("Operands of comparison operator '%s' at %%L are %s/%s"), - gfc_op2string (e->value.op.operator), gfc_typename (&op1->ts), + gfc_op2string (e->value.op.op), gfc_typename (&op1->ts), gfc_typename (&op2->ts)); goto bad_op; case INTRINSIC_USER: - if (e->value.op.uop->operator == NULL) + if (e->value.op.uop->op == NULL) sprintf (msg, _("Unknown operator '%s' at %%L"), e->value.op.uop->name); else if (op2 == NULL) sprintf (msg, _("Operand of user operator '%s' at %%L is %s"), @@ -3091,7 +3091,7 @@ resolve_operator (gfc_expr *e) t = SUCCESS; - switch (e->value.op.operator) + switch (e->value.op.op) { case INTRINSIC_PLUS: case INTRINSIC_MINUS: @@ -4217,7 +4217,7 @@ gfc_resolve_character_operator (gfc_expr *e) gfc_expr *e1 = NULL; gfc_expr *e2 = NULL; - gcc_assert (e->value.op.operator == INTRINSIC_CONCAT); + gcc_assert (e->value.op.op == INTRINSIC_CONCAT); if (op1->ts.cl && op1->ts.cl->length) e1 = gfc_copy_expr (op1->ts.cl->length); @@ -9165,7 +9165,7 @@ gfc_resolve_uops (gfc_symtree *symtree) gfc_resolve_uops (symtree->left); gfc_resolve_uops (symtree->right); - for (itr = symtree->n.uop->operator; itr; itr = itr->next) + for (itr = symtree->n.uop->op; itr; itr = itr->next) { sym = itr->sym; if (!sym->attr.function) diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c index c5d56c7..57870c0 100644 --- a/gcc/fortran/symbol.c +++ b/gcc/fortran/symbol.c @@ -2843,7 +2843,7 @@ free_uop_tree (gfc_symtree *uop_tree) free_uop_tree (uop_tree->left); free_uop_tree (uop_tree->right); - gfc_free_interface (uop_tree->n.uop->operator); + gfc_free_interface (uop_tree->n.uop->op); gfc_free (uop_tree->n.uop); gfc_free (uop_tree); @@ -2997,7 +2997,7 @@ gfc_free_namespace (gfc_namespace *ns) gfc_free_equiv_lists (ns->equiv_lists); for (i = GFC_INTRINSIC_BEGIN; i != GFC_INTRINSIC_END; i++) - gfc_free_interface (ns->operator[i]); + gfc_free_interface (ns->op[i]); gfc_free_data (ns->data); p = ns->contained; diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index 570e07b..d4f5c59 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -1079,7 +1079,7 @@ gfc_conv_expr_op (gfc_se * se, gfc_expr * expr) checkstring = 0; lop = 0; - switch (expr->value.op.operator) + switch (expr->value.op.op) { case INTRINSIC_PARENTHESES: if (expr->ts.type == BT_REAL diff --git a/gcc/fortran/trans-openmp.c b/gcc/fortran/trans-openmp.c index 6f99800..06329a9 100644 --- a/gcc/fortran/trans-openmp.c +++ b/gcc/fortran/trans-openmp.c @@ -969,7 +969,7 @@ gfc_trans_omp_atomic (gfc_code *code) if (expr2->expr_type == EXPR_OP) { gfc_expr *e; - switch (expr2->value.op.operator) + switch (expr2->value.op.op) { case INTRINSIC_PLUS: op = PLUS_EXPR; -- 2.7.4