Hi all,

I got no direct objections therefore committed as r254197 to trunk and r254198
to gcc-7. 

@Steve, I will take a look at what you pointed. 

- Andre

On Fri, 27 Oct 2017 12:19:02 +0200
Andre Vehreschild <ve...@gmx.de> wrote:

> Hi all,
> 
> as noted on IRC is one of the error message in check.c co_reduce misleading.
> The attached patch fixes this. The intention of the error message is to tell
> that the type of the argument bound to parameter A is of wrong type and not
> that an unspecific argument has a wrong type.
> 
> If no one objects within 24 h I am planning to commit this patch as obvious to
> trunk gcc-7. Bootstrapped and regtested on x86_64-linux-gnu/f25.
> 
> Regards,
>       Andre


-- 
Andre Vehreschild * Email: vehre ad gmx dot de 
Index: gcc/fortran/ChangeLog
===================================================================
--- gcc/fortran/ChangeLog	(Revision 254196)
+++ gcc/fortran/ChangeLog	(Arbeitskopie)
@@ -1,3 +1,7 @@
+2017-10-28  Andre Vehreschild  <ve...@gcc.gnu.org>
+
+	* check.c (gfc_check_co_reduce): Clarify error message.
+
 2017-10-28  Paul Thomas  <pa...@gcc.gnu.org>
 
 	PR fortran/81758
Index: gcc/fortran/check.c
===================================================================
--- gcc/fortran/check.c	(Revision 254196)
+++ gcc/fortran/check.c	(Arbeitskopie)
@@ -1731,7 +1731,7 @@
 
   if (!gfc_compare_types (&a->ts, &sym->result->ts))
     {
-      gfc_error ("A argument at %L has type %s but the function passed as "
+      gfc_error ("The A argument at %L has type %s but the function passed as "
 		 "OPERATOR at %L returns %s",
 		 &a->where, gfc_typename (&a->ts), &op->where,
 		 gfc_typename (&sym->result->ts));
Index: gcc/fortran/ChangeLog
===================================================================
--- gcc/fortran/ChangeLog	(Revision 254197)
+++ gcc/fortran/ChangeLog	(Arbeitskopie)
@@ -1,3 +1,7 @@
+2017-10-28  Andre Vehreschild  <ve...@gcc.gnu.org>
+
+	* check.c (gfc_check_co_reduce): Clarify error message.
+
 2017-10-28  Paul Thomas  <pa...@gcc.gnu.org>
 
 	Backported from trunk
Index: gcc/fortran/check.c
===================================================================
--- gcc/fortran/check.c	(Revision 254197)
+++ gcc/fortran/check.c	(Arbeitskopie)
@@ -1731,7 +1731,7 @@
 
   if (!gfc_compare_types (&a->ts, &sym->result->ts))
     {
-      gfc_error ("A argument at %L has type %s but the function passed as "
+      gfc_error ("The A argument at %L has type %s but the function passed as "
 		 "OPERATOR at %L returns %s",
 		 &a->where, gfc_typename (&a->ts), &op->where,
 		 gfc_typename (&sym->result->ts));

Reply via email to