[PATCH] Fortran: fix documentation of intrinsic SPLIT [PR123941]

Harald Anlauf <[email protected]>
Newsgroups gmane.comp.gcc.patches,gmane.comp.gcc.fortran
Message-ID <[email protected]>
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
0001-Fortran-fix-documentation-of-intrinsic-SPLIT-PR12394.patch (text/x-patch, 1.6 KB)
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.