Dear all,

as reported, the Fortran standard intrinsic SPLIT was erroneously
documented as a function, but it is a subroutine.  The attached
patch corrects this and also specifies that its arguments are scalars.

Will commit as obvious unless there are comments.

Thanks,
Harald

From 6c98e7ec81712d476fc19b1b1c9cf87353afeb98 Mon Sep 17 00:00:00 2001
From: Harald Anlauf <[email protected]>
Date: Wed, 4 Feb 2026 20:45:50 +0100
Subject: [PATCH] Fortran: fix documentation of intrinsic SPLIT [PR123941]

	PR fortran/123941

gcc/fortran/ChangeLog:

	* intrinsic.texi: SPLIT is a subroutine, not a function.
	Improve documentation of its arguments.
---
 gcc/fortran/intrinsic.texi | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/gcc/fortran/intrinsic.texi b/gcc/fortran/intrinsic.texi
index 7f3b95edffe..cf81791b8b3 100644
--- a/gcc/fortran/intrinsic.texi
+++ b/gcc/fortran/intrinsic.texi
@@ -14215,7 +14215,7 @@ Fortran 90 and later
 
 @table @asis
 @item @emph{Synopsis}:
-@code{RESULT = SPLIT(STRING, SET, POS [, BACK])}
+@code{CALL SPLIT(STRING, SET, POS [, BACK])}
 
 @item @emph{Description}:
 Updates the integer @var{POS} to the position of the next (or previous)
@@ -14240,10 +14240,10 @@ Subroutine
 
 @item @emph{Arguments}:
 @multitable @columnfractions .15 .70
-@item @var{STRING} @tab Shall be of type @code{CHARACTER}.
-@item @var{SET}    @tab Shall be of type @code{CHARACTER}.
-@item @var{POS}    @tab Shall be of type @code{INTEGER}.
-@item @var{BACK}   @tab (Optional) Shall be of type @code{LOGICAL}.
+@item @var{STRING} @tab Shall be a scalar of type @code{CHARACTER}.
+@item @var{SET}    @tab Shall be a scalar of type @code{CHARACTER}.
+@item @var{POS}    @tab Shall be a scalar of type @code{INTEGER}.
+@item @var{BACK}   @tab (Optional) Shall be a scalar of type @code{LOGICAL}.
 @end multitable
 
 @item @emph{Example}:
-- 
2.51.0

Reply via email to