aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/check.c
diff options
context:
space:
mode:
authorThomas Koenig <tkoenig@gcc.gnu.org>2021-11-07 15:38:35 +0100
committerThomas Koenig <tkoenig@gcc.gnu.org>2021-11-07 23:06:46 +0100
commit962ff7d2849e1fa6a1fe0535aa2dec5c2b9a32a6 (patch)
tree3c3dcbabe1b94a3b0c19d7617190e457afa7451c /gcc/fortran/check.c
parent87e57378ba554212a32a0743fee03481d1289318 (diff)
downloadgcc-962ff7d2849e1fa6a1fe0535aa2dec5c2b9a32a6.zip
gcc-962ff7d2849e1fa6a1fe0535aa2dec5c2b9a32a6.tar.gz
gcc-962ff7d2849e1fa6a1fe0535aa2dec5c2b9a32a6.tar.bz2
Fix keyword name for co_reduce.
gcc/fortran/ChangeLog: * intrinsic.c (add_subroutines): Change keyword "operator" to the correct one, "operation". * check.c (gfc_check_co_reduce): Change OPERATOR to OPERATION in error messages. * intrinsic.texi: Change OPERATOR to OPERATION in documentation. gcc/testsuite/ChangeLog: * gfortran.dg/co_reduce_2.f90: New test. * gfortran.dg/coarray_collectives_14.f90: Change OPERATOR to OPERATION. * gfortran.dg/coarray_collectives_16.f90: Likewise. * gfortran.dg/coarray_collectives_9.f90: Likewise. Co-authored by: Steve Kargl <steve@gcc.gnu.org>
Diffstat (limited to 'gcc/fortran/check.c')
-rw-r--r--gcc/fortran/check.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c
index 6ea6e13..1577200 100644
--- a/gcc/fortran/check.c
+++ b/gcc/fortran/check.c
@@ -2265,7 +2265,7 @@ gfc_check_co_reduce (gfc_expr *a, gfc_expr *op, gfc_expr *result_image,
attr = gfc_expr_attr (op);
if (!attr.pure || !attr.function)
{
- gfc_error ("OPERATOR argument at %L must be a PURE function",
+ gfc_error ("OPERATION argument at %L must be a PURE function",
&op->where);
return false;
}
@@ -2292,7 +2292,7 @@ gfc_check_co_reduce (gfc_expr *a, gfc_expr *op, gfc_expr *result_image,
if (!formal || !formal->next || formal->next->next)
{
- gfc_error ("The function passed as OPERATOR at %L shall have two "
+ gfc_error ("The function passed as OPERATION at %L shall have two "
"arguments", &op->where);
return false;
}
@@ -2303,7 +2303,7 @@ gfc_check_co_reduce (gfc_expr *a, gfc_expr *op, gfc_expr *result_image,
if (!gfc_compare_types (&a->ts, &sym->result->ts))
{
gfc_error ("The A argument at %L has type %s but the function passed as "
- "OPERATOR at %L returns %s",
+ "OPERATION at %L returns %s",
&a->where, gfc_typename (a), &op->where,
gfc_typename (&sym->result->ts));
return false;
@@ -2311,7 +2311,7 @@ gfc_check_co_reduce (gfc_expr *a, gfc_expr *op, gfc_expr *result_image,
if (!gfc_compare_types (&a->ts, &formal->sym->ts)
|| !gfc_compare_types (&a->ts, &formal->next->sym->ts))
{
- gfc_error ("The function passed as OPERATOR at %L has arguments of type "
+ gfc_error ("The function passed as OPERATION at %L has arguments of type "
"%s and %s but shall have type %s", &op->where,
gfc_typename (&formal->sym->ts),
gfc_typename (&formal->next->sym->ts), gfc_typename (a));
@@ -2322,7 +2322,7 @@ gfc_check_co_reduce (gfc_expr *a, gfc_expr *op, gfc_expr *result_image,
|| formal->next->sym->attr.allocatable || formal->sym->attr.pointer
|| formal->next->sym->attr.pointer)
{
- gfc_error ("The function passed as OPERATOR at %L shall have scalar "
+ gfc_error ("The function passed as OPERATION at %L shall have scalar "
"nonallocatable nonpointer arguments and return a "
"nonallocatable nonpointer scalar", &op->where);
return false;
@@ -2330,21 +2330,21 @@ gfc_check_co_reduce (gfc_expr *a, gfc_expr *op, gfc_expr *result_image,
if (formal->sym->attr.value != formal->next->sym->attr.value)
{
- gfc_error ("The function passed as OPERATOR at %L shall have the VALUE "
+ gfc_error ("The function passed as OPERATION at %L shall have the VALUE "
"attribute either for none or both arguments", &op->where);
return false;
}
if (formal->sym->attr.target != formal->next->sym->attr.target)
{
- gfc_error ("The function passed as OPERATOR at %L shall have the TARGET "
+ gfc_error ("The function passed as OPERATION at %L shall have the TARGET "
"attribute either for none or both arguments", &op->where);
return false;
}
if (formal->sym->attr.asynchronous != formal->next->sym->attr.asynchronous)
{
- gfc_error ("The function passed as OPERATOR at %L shall have the "
+ gfc_error ("The function passed as OPERATION at %L shall have the "
"ASYNCHRONOUS attribute either for none or both arguments",
&op->where);
return false;
@@ -2352,7 +2352,7 @@ gfc_check_co_reduce (gfc_expr *a, gfc_expr *op, gfc_expr *result_image,
if (formal->sym->attr.optional || formal->next->sym->attr.optional)
{
- gfc_error ("The function passed as OPERATOR at %L shall not have the "
+ gfc_error ("The function passed as OPERATION at %L shall not have the "
"OPTIONAL attribute for either of the arguments", &op->where);
return false;
}
@@ -2383,14 +2383,14 @@ gfc_check_co_reduce (gfc_expr *a, gfc_expr *op, gfc_expr *result_image,
|| (formal_size2 && actual_size != formal_size2)))
{
gfc_error ("The character length of the A argument at %L and of the "
- "arguments of the OPERATOR at %L shall be the same",
+ "arguments of the OPERATION at %L shall be the same",
&a->where, &op->where);
return false;
}
if (actual_size && result_size && actual_size != result_size)
{
gfc_error ("The character length of the A argument at %L and of the "
- "function result of the OPERATOR at %L shall be the same",
+ "function result of the OPERATION at %L shall be the same",
&a->where, &op->where);
return false;
}