[Committed,Fortran] errmsg is intent(inout)
diff mbox series

Message ID 20190822235253.GA6113@troutmask.apl.washington.edu
State New
Headers show
Series
  • [Committed,Fortran] errmsg is intent(inout)
Related show

Commit Message

Steve Kargl Aug. 22, 2019, 11:52 p.m. UTC
F2018 states that ERRMSG in co_broadcast, co_max, co_min, co_reduce,
and co_sum is INTENT(INOUT).  The committed patch makes this so.

2019-08-22  Steven G. Kargl  <kargl@gcc.gnu.org>

	* intrinsic.c (add_subroutines): ERRMSG is INTENT(INOUT) in
	co_broadcast, co_max, co_min, co_reduce, and  co_sum.

Patch
diff mbox series

Index: gcc/fortran/intrinsic.c
===================================================================
--- gcc/fortran/intrinsic.c	(revision 274827)
+++ gcc/fortran/intrinsic.c	(working copy)
@@ -3691,7 +3691,7 @@  add_subroutines (void)
 	      a, BT_REAL, dr, REQUIRED, INTENT_INOUT,
 	      "source_image", BT_INTEGER, di, REQUIRED, INTENT_IN,
 	      stat, BT_INTEGER, di, OPTIONAL, INTENT_OUT,
-	      errmsg, BT_CHARACTER, dc, OPTIONAL, INTENT_OUT);
+	      errmsg, BT_CHARACTER, dc, OPTIONAL, INTENT_INOUT);
 
   add_sym_4s ("co_max", GFC_ISYM_CO_MAX, CLASS_IMPURE,
 	      BT_UNKNOWN, 0, GFC_STD_F2018,
@@ -3699,7 +3699,7 @@  add_subroutines (void)
 	      a, BT_REAL, dr, REQUIRED, INTENT_INOUT,
 	      result_image, BT_INTEGER, di, OPTIONAL, INTENT_IN,
 	      stat, BT_INTEGER, di, OPTIONAL, INTENT_OUT,
-	      errmsg, BT_CHARACTER, dc, OPTIONAL, INTENT_OUT);
+	      errmsg, BT_CHARACTER, dc, OPTIONAL, INTENT_INOUT);
 
   add_sym_4s ("co_min", GFC_ISYM_CO_MIN, CLASS_IMPURE,
 	      BT_UNKNOWN, 0, GFC_STD_F2018,
@@ -3707,7 +3707,7 @@  add_subroutines (void)
 	      a, BT_REAL, dr, REQUIRED, INTENT_INOUT,
 	      result_image, BT_INTEGER, di, OPTIONAL, INTENT_IN,
 	      stat, BT_INTEGER, di, OPTIONAL, INTENT_OUT,
-	      errmsg, BT_CHARACTER, dc, OPTIONAL, INTENT_OUT);
+	      errmsg, BT_CHARACTER, dc, OPTIONAL, INTENT_INOUT);
 
   add_sym_4s ("co_sum", GFC_ISYM_CO_SUM, CLASS_IMPURE,
 	      BT_UNKNOWN, 0, GFC_STD_F2018,
@@ -3715,7 +3715,7 @@  add_subroutines (void)
 	      a, BT_REAL, dr, REQUIRED, INTENT_INOUT,
 	      result_image, BT_INTEGER, di, OPTIONAL, INTENT_IN,
 	      stat, BT_INTEGER, di, OPTIONAL, INTENT_OUT,
-	      errmsg, BT_CHARACTER, dc, OPTIONAL, INTENT_OUT);
+	      errmsg, BT_CHARACTER, dc, OPTIONAL, INTENT_INOUT);
 
   add_sym_5s ("co_reduce", GFC_ISYM_CO_REDUCE, CLASS_IMPURE,
 	      BT_UNKNOWN, 0, GFC_STD_F2018,
@@ -3724,7 +3724,7 @@  add_subroutines (void)
 	      "operator", BT_INTEGER, di, REQUIRED, INTENT_IN,
 	      result_image, BT_INTEGER, di, OPTIONAL, INTENT_IN,
 	      stat, BT_INTEGER, di, OPTIONAL, INTENT_OUT,
-	      errmsg, BT_CHARACTER, dc, OPTIONAL, INTENT_OUT);
+	      errmsg, BT_CHARACTER, dc, OPTIONAL, INTENT_INOUT);
 
 
   /* The following subroutine is internally used for coarray libray functions.