aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/resolve.c
diff options
context:
space:
mode:
authorJanus Weil <janus@gcc.gnu.org>2018-09-20 21:33:05 +0200
committerJanus Weil <janus@gcc.gnu.org>2018-09-20 21:33:05 +0200
commit2eb3745a7bcd7f326b44f784d2f0ca6a2fd4080d (patch)
tree230e5d690dc909163e13b97662b3920ae08ffa7b /gcc/fortran/resolve.c
parent5596651acde99a5826a6ebf63afaf1a9fabc36e7 (diff)
downloadgcc-2eb3745a7bcd7f326b44f784d2f0ca6a2fd4080d.zip
gcc-2eb3745a7bcd7f326b44f784d2f0ca6a2fd4080d.tar.gz
gcc-2eb3745a7bcd7f326b44f784d2f0ca6a2fd4080d.tar.bz2
gfortran.h (gfc_str_startswith): New macro.
2018-09-20 Janus Weil <janus@gcc.gnu.org> * gfortran.h (gfc_str_startswith): New macro. * decl.c (variable_decl, gfc_match_end): Use it. * iresolve.c (is_trig_resolved): Ditto. * module.c (load_omp_udrs, read_module): Ditto. * options.c (gfc_handle_runtime_check_option): Ditto. * primary.c (match_arg_list_function): Ditto. * trans-decl.c (gfc_get_symbol_decl): Ditto. * trans-expr.c (gfc_conv_procedure_call): Ditto. * interface.c (dtio_op): Replace strncmp by strcmp. * resolve.c (resolve_actual_arglist, resolve_function): Ditto. * trans-expr.c (conv_arglist_function): Ditto. * trans-intrinsic.c (gfc_conv_ieee_arithmetic_function): Replace macro STARTS_WITH by gfc_str_startswith. From-SVN: r264448
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r--gcc/fortran/resolve.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index e6180b8..a2beb7f 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -2061,7 +2061,7 @@ resolve_actual_arglist (gfc_actual_arglist *arg, procedure_type ptype,
nothing to do for %REF. */
if (arg->name && arg->name[0] == '%')
{
- if (strncmp ("%VAL", arg->name, 4) == 0)
+ if (strcmp ("%VAL", arg->name) == 0)
{
if (e->ts.type == BT_CHARACTER || e->ts.type == BT_DERIVED)
{
@@ -2093,7 +2093,7 @@ resolve_actual_arglist (gfc_actual_arglist *arg, procedure_type ptype,
}
/* Statement functions have already been excluded above. */
- else if (strncmp ("%LOC", arg->name, 4) == 0
+ else if (strcmp ("%LOC", arg->name) == 0
&& e->ts.type == BT_PROCEDURE)
{
if (e->symtree->n.sym->attr.proc == PROC_INTERNAL)
@@ -3265,7 +3265,7 @@ resolve_function (gfc_expr *expr)
if (arg->next->expr->expr_type != EXPR_CONSTANT)
break;
- if (arg->next->name && strncmp (arg->next->name, "kind", 4) == 0)
+ if (arg->next->name && strcmp (arg->next->name, "kind") == 0)
break;
if ((int)mpz_get_si (arg->next->expr->value.integer)