From 740cf7d6ab266cf4249fc5c247187622cb6a2c8f Mon Sep 17 00:00:00 2001
From: Martin Liska <mliska@suse.cz>
Date: Thu, 10 Nov 2022 18:00:33 +0100
Subject: [PATCH] docs: move label directly before title

Otherwise Sphinx can compare if Intersphinx is unavailable:

gcc/fortran/doc/gfortran/intrinsic-procedures/atand.rst:50: WARNING: Failed to create a cross reference. A title or caption not found: 'atan'
gcc/fortran/doc/gfortran/intrinsic-procedures/atan2.rst:55: WARNING: Failed to create a cross reference. A title or caption not found: 'atan'
...

gcc/fortran/ChangeLog:

	* doc/gfortran/intrinsic-procedures/abs.rst: Move label directly before title.
	* doc/gfortran/intrinsic-procedures/acos.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/acosd.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/acosh.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/aimag.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/aint.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/anint.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/asin.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/asind.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/asinh.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/atan.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/atan2.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/atan2d.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/atand.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/atanh.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/besselj0.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/besselj1.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/besseljn.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/bessely0.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/bessely1.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/besselyn.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/btest.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/char.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/conjg.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/cos.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/cosd.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/cosh.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/cotan.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/cotand.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/dim.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/dprod.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/erf.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/erfc.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/exp.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/gamma.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/iand.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/ibclr.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/ibits.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/ibset.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/ichar.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/ieor.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/index.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/int.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/ior.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/ishft.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/ishftc.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/len.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/lge.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/lgt.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/lle.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/llt.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/log.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/log10.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/loggamma.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/max.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/min.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/mod.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/mvbits.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/nint.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/not.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/real.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/sign.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/sin.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/sind.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/sinh.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/sqrt.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/tan.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/tand.rst: Likewise.
	* doc/gfortran/intrinsic-procedures/tanh.rst: Likewise.
---
 gcc/fortran/doc/gfortran/intrinsic-procedures/abs.rst      | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/acos.rst     | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/acosd.rst    | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/acosh.rst    | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/aimag.rst    | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/aint.rst     | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/anint.rst    | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/asin.rst     | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/asind.rst    | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/asinh.rst    | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/atan.rst     | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/atan2.rst    | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/atan2d.rst   | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/atand.rst    | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/atanh.rst    | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/besselj0.rst | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/besselj1.rst | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/besseljn.rst | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/bessely0.rst | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/bessely1.rst | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/besselyn.rst | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/btest.rst    | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/char.rst     | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/conjg.rst    | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/cos.rst      | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/cosd.rst     | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/cosh.rst     | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/cotan.rst    | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/cotand.rst   | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/dim.rst      | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/dprod.rst    | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/erf.rst      | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/erfc.rst     | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/exp.rst      | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/gamma.rst    | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/iand.rst     | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/ibclr.rst    | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/ibits.rst    | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/ibset.rst    | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/ichar.rst    | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/ieor.rst     | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/index.rst    | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/int.rst      | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/ior.rst      | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/ishft.rst    | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/ishftc.rst   | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/len.rst      | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/lge.rst      | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/lgt.rst      | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/lle.rst      | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/llt.rst      | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/log.rst      | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/log10.rst    | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/loggamma.rst | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/max.rst      | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/min.rst      | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/mod.rst      | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/mvbits.rst   | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/nint.rst     | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/not.rst      | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/real.rst     | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/sign.rst     | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/sin.rst      | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/sind.rst     | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/sinh.rst     | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/sqrt.rst     | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/tan.rst      | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/tand.rst     | 4 ++--
 gcc/fortran/doc/gfortran/intrinsic-procedures/tanh.rst     | 4 ++--
 69 files changed, 138 insertions(+), 138 deletions(-)

diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/abs.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/abs.rst
index 7ae5b6bb5dd8..6be0d784173d 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/abs.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/abs.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _abs:
-
 .. index:: ABS
 
 .. index:: CABS
@@ -27,6 +25,8 @@
 
 .. index:: absolute value
 
+.. _abs:
+
 ABS --- Absolute value
 **********************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/acos.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/acos.rst
index 6696a8bd443c..21356949282d 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/acos.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/acos.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _acos:
-
 .. index:: ACOS
 
 .. index:: DACOS
@@ -13,6 +11,8 @@
 
 .. index:: cosine, inverse
 
+.. _acos:
+
 ACOS --- Arccosine function
 ****************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/acosd.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/acosd.rst
index a5ba2c250a8d..aa12616f9493 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/acosd.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/acosd.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _acosd:
-
 .. index:: ACOSD
 
 .. index:: DACOSD
@@ -13,6 +11,8 @@
 
 .. index:: cosine, inverse, degrees
 
+.. _acosd:
+
 ACOSD --- Arccosine function, degrees
 *************************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/acosh.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/acosh.rst
index 1435c6ca2780..ae0e580abfb9 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/acosh.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/acosh.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _acosh:
-
 .. index:: ACOSH
 
 .. index:: DACOSH
@@ -17,6 +15,8 @@
 
 .. index:: cosine, hyperbolic, inverse
 
+.. _acosh:
+
 ACOSH --- Inverse hyperbolic cosine function
 ********************************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/aimag.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/aimag.rst
index df8d9cb5aa18..40d8e46802d9 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/aimag.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/aimag.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _aimag:
-
 .. index:: AIMAG
 
 .. index:: DIMAG
@@ -15,6 +13,8 @@
 
 .. index:: complex numbers, imaginary part
 
+.. _aimag:
+
 AIMAG --- Imaginary part of complex number
 ********************************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/aint.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/aint.rst
index f95a60121aa4..d3c59678c564 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/aint.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/aint.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _aint:
-
 .. index:: AINT
 
 .. index:: DINT
@@ -13,6 +11,8 @@
 
 .. index:: rounding, floor
 
+.. _aint:
+
 AINT --- Truncate to a whole number
 ***********************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/anint.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/anint.rst
index 7c1d324cfc78..e98fe00233e2 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/anint.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/anint.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _anint:
-
 .. index:: ANINT
 
 .. index:: DNINT
@@ -13,6 +11,8 @@
 
 .. index:: rounding, ceiling
 
+.. _anint:
+
 ANINT --- Nearest whole number
 ******************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/asin.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/asin.rst
index 44925bfb4e2a..98ce55563afa 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/asin.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/asin.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _asin:
-
 .. index:: ASIN
 
 .. index:: DASIN
@@ -13,6 +11,8 @@
 
 .. index:: sine, inverse
 
+.. _asin:
+
 ASIN --- Arcsine function
 **************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/asind.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/asind.rst
index 09cf64a03189..7167f3cbaff0 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/asind.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/asind.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _asind:
-
 .. index:: ASIND
 
 .. index:: DASIND
@@ -13,6 +11,8 @@
 
 .. index:: sine, inverse, degrees
 
+.. _asind:
+
 ASIND --- Arcsine function, degrees
 ***********************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/asinh.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/asinh.rst
index 34454dd5f22b..e3c8cf20a00e 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/asinh.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/asinh.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _asinh:
-
 .. index:: ASINH
 
 .. index:: DASINH
@@ -17,6 +15,8 @@
 
 .. index:: sine, hyperbolic, inverse
 
+.. _asinh:
+
 ASINH --- Inverse hyperbolic sine function
 ******************************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/atan.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/atan.rst
index 23d570823deb..cc7ac0b3a64f 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/atan.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/atan.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _atan:
-
 .. index:: ATAN
 
 .. index:: DATAN
@@ -13,6 +11,8 @@
 
 .. index:: tangent, inverse
 
+.. _atan:
+
 ATAN --- Arctangent function
 *****************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/atan2.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/atan2.rst
index d947862ac9d2..5bdd50900565 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/atan2.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/atan2.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _atan2:
-
 .. index:: ATAN2
 
 .. index:: DATAN2
@@ -13,6 +11,8 @@
 
 .. index:: tangent, inverse
 
+.. _atan2:
+
 ATAN2 --- Arctangent function
 ******************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/atan2d.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/atan2d.rst
index 03c77a27ba29..f5ee96bdcb90 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/atan2d.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/atan2d.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _atan2d:
-
 .. index:: ATAN2D
 
 .. index:: DATAN2D
@@ -13,6 +11,8 @@
 
 .. index:: tangent, inverse, degrees
 
+.. _atan2d:
+
 ATAN2D --- Arctangent function, degrees
 ***************************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/atand.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/atand.rst
index 1ad299c63faa..8316682e669c 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/atand.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/atand.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _atand:
-
 .. index:: ATAND
 
 .. index:: DATAND
@@ -13,6 +11,8 @@
 
 .. index:: tangent, inverse, degrees
 
+.. _atand:
+
 ATAND --- Arctangent function, degrees
 **************************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/atanh.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/atanh.rst
index d272e7fbe40a..62da7c046bbd 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/atanh.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/atanh.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _atanh:
-
 .. index:: ATANH
 
 .. index:: DATANH
@@ -17,6 +15,8 @@
 
 .. index:: tangent, hyperbolic, inverse
 
+.. _atanh:
+
 ATANH --- Inverse hyperbolic tangent function
 *********************************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/besselj0.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/besselj0.rst
index 564280c3be6d..d606853f1607 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/besselj0.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/besselj0.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _bessel_j0:
-
 .. index:: BESSEL_J0
 
 .. index:: BESJ0
@@ -13,6 +11,8 @@
 
 .. index:: Bessel function, first kind
 
+.. _bessel_j0:
+
 BESSEL_J0 --- Bessel function of the first kind of order 0
 **********************************************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/besselj1.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/besselj1.rst
index b97aa7d9c661..d6e54781c5eb 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/besselj1.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/besselj1.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _bessel_j1:
-
 .. index:: BESSEL_J1
 
 .. index:: BESJ1
@@ -13,6 +11,8 @@
 
 .. index:: Bessel function, first kind
 
+.. _bessel_j1:
+
 BESSEL_J1 --- Bessel function of the first kind of order 1
 **********************************************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/besseljn.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/besseljn.rst
index da8a06e56fbb..5ca796388b1a 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/besseljn.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/besseljn.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _bessel_jn:
-
 .. index:: BESSEL_JN
 
 .. index:: BESJN
@@ -13,6 +11,8 @@
 
 .. index:: Bessel function, first kind
 
+.. _bessel_jn:
+
 BESSEL_JN --- Bessel function of the first kind
 ***********************************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/bessely0.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/bessely0.rst
index a6aea18957f1..9912e721a450 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/bessely0.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/bessely0.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _bessel_y0:
-
 .. index:: BESSEL_Y0
 
 .. index:: BESY0
@@ -13,6 +11,8 @@
 
 .. index:: Bessel function, second kind
 
+.. _bessel_y0:
+
 BESSEL_Y0 --- Bessel function of the second kind of order 0
 ***********************************************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/bessely1.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/bessely1.rst
index a6f76608105b..53174127777f 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/bessely1.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/bessely1.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _bessel_y1:
-
 .. index:: BESSEL_Y1
 
 .. index:: BESY1
@@ -13,6 +11,8 @@
 
 .. index:: Bessel function, second kind
 
+.. _bessel_y1:
+
 BESSEL_Y1 --- Bessel function of the second kind of order 1
 ***********************************************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/besselyn.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/besselyn.rst
index 86b2c15baa12..ff877bc0e525 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/besselyn.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/besselyn.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _bessel_yn:
-
 .. index:: BESSEL_YN
 
 .. index:: BESYN
@@ -13,6 +11,8 @@
 
 .. index:: Bessel function, second kind
 
+.. _bessel_yn:
+
 BESSEL_YN --- Bessel function of the second kind
 ************************************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/btest.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/btest.rst
index 62ce79090e90..9c18e204a113 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/btest.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/btest.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _btest:
-
 .. index:: BTEST
 
 .. index:: BBTEST
@@ -17,6 +15,8 @@
 
 .. index:: bits, testing
 
+.. _btest:
+
 BTEST --- Bit test function
 ***************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/char.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/char.rst
index a51b927d0b34..730f705b9ead 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/char.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/char.rst
@@ -3,12 +3,12 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _char:
-
 .. index:: CHAR
 
 .. index:: conversion, to character
 
+.. _char:
+
 CHAR --- Character conversion function
 **************************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/conjg.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/conjg.rst
index 0c3ad2c98f34..f9d204a73326 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/conjg.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/conjg.rst
@@ -3,14 +3,14 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _conjg:
-
 .. index:: CONJG
 
 .. index:: DCONJG
 
 .. index:: complex conjugate
 
+.. _conjg:
+
 CONJG --- Complex conjugate function
 ************************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/cos.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/cos.rst
index 334ce7a63047..143bdf4e00ae 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/cos.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/cos.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _cos:
-
 .. index:: COS
 
 .. index:: DCOS
@@ -19,6 +17,8 @@
 
 .. index:: cosine
 
+.. _cos:
+
 COS --- Cosine function
 ***********************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/cosd.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/cosd.rst
index acfc16685894..d11263812130 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/cosd.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/cosd.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _cosd:
-
 .. index:: COSD
 
 .. index:: DCOSD
@@ -19,6 +17,8 @@
 
 .. index:: cosine, degrees
 
+.. _cosd:
+
 COSD --- Cosine function, degrees
 *********************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/cosh.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/cosh.rst
index 5e60f2fc3476..0c79caba7782 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/cosh.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/cosh.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _cosh:
-
 .. index:: COSH
 
 .. index:: DCOSH
@@ -15,6 +13,8 @@
 
 .. index:: cosine, hyperbolic
 
+.. _cosh:
+
 COSH --- Hyperbolic cosine function
 ***********************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/cotan.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/cotan.rst
index 1d2a04d6d614..ceb435a7ec78 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/cotan.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/cotan.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _cotan:
-
 .. index:: COTAN
 
 .. index:: DCOTAN
@@ -13,6 +11,8 @@
 
 .. index:: cotangent
 
+.. _cotan:
+
 COTAN --- Cotangent function
 ****************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/cotand.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/cotand.rst
index 88b51873a3c8..f4f5e440115f 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/cotand.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/cotand.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _cotand:
-
 .. index:: COTAND
 
 .. index:: DCOTAND
@@ -13,6 +11,8 @@
 
 .. index:: cotangent, degrees
 
+.. _cotand:
+
 COTAND --- Cotangent function, degrees
 **************************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/dim.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/dim.rst
index 9a72c37aaa27..1bbe6f0f4dfc 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/dim.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/dim.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _dim:
-
 .. index:: DIM
 
 .. index:: IDIM
@@ -13,6 +11,8 @@
 
 .. index:: positive difference
 
+.. _dim:
+
 DIM --- Positive difference
 ***************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/dprod.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/dprod.rst
index 531a1b9e4228..f36c154fd23d 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/dprod.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/dprod.rst
@@ -3,12 +3,12 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _dprod:
-
 .. index:: DPROD
 
 .. index:: product, double-precision
 
+.. _dprod:
+
 DPROD --- Double product function
 *********************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/erf.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/erf.rst
index 2ad749061638..620ca0f00ba3 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/erf.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/erf.rst
@@ -3,12 +3,12 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _erf:
-
 .. index:: ERF
 
 .. index:: error function
 
+.. _erf:
+
 ERF --- Error function
 ***********************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/erfc.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/erfc.rst
index a0f2680b825e..4b3b26e9e100 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/erfc.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/erfc.rst
@@ -3,12 +3,12 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _erfc:
-
 .. index:: ERFC
 
 .. index:: error function, complementary
 
+.. _erfc:
+
 ERFC --- Error function
 ************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/exp.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/exp.rst
index 4ba0c54b9e21..54234572d09f 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/exp.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/exp.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _exp:
-
 .. index:: EXP
 
 .. index:: DEXP
@@ -19,6 +17,8 @@
 
 .. index:: logarithm function, inverse
 
+.. _exp:
+
 EXP --- Exponential function
 *****************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/gamma.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/gamma.rst
index b831746f4053..75fe73d6b93c 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/gamma.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/gamma.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _gamma:
-
 .. index:: GAMMA
 
 .. index:: DGAMMA
@@ -13,6 +11,8 @@
 
 .. index:: Factorial function
 
+.. _gamma:
+
 GAMMA --- Gamma function
 ************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/iand.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/iand.rst
index ae340e93f049..23cbfbe4dad3 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/iand.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/iand.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _iand:
-
 .. index:: IAND
 
 .. index:: BIAND
@@ -19,6 +17,8 @@
 
 .. index:: logical and, bitwise
 
+.. _iand:
+
 IAND --- Bitwise logical and
 ****************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/ibclr.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/ibclr.rst
index da2061369ee8..764feac2b796 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/ibclr.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/ibclr.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _ibclr:
-
 .. index:: IBCLR
 
 .. index:: BBCLR
@@ -19,6 +17,8 @@
 
 .. index:: bits, clear
 
+.. _ibclr:
+
 IBCLR --- Clear bit
 *******************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/ibits.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/ibits.rst
index e381b979d573..214eb6f479ed 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/ibits.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/ibits.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _ibits:
-
 .. index:: IBITS
 
 .. index:: BBITS
@@ -19,6 +17,8 @@
 
 .. index:: bits, extract
 
+.. _ibits:
+
 IBITS --- Bit extraction
 ************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/ibset.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/ibset.rst
index 11a548d07876..d722b34f5914 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/ibset.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/ibset.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _ibset:
-
 .. index:: IBSET
 
 .. index:: BBSET
@@ -17,6 +15,8 @@
 
 .. index:: bits, set
 
+.. _ibset:
+
 IBSET --- Set bit
 *****************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/ichar.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/ichar.rst
index 847854d30951..1c8b9981bce8 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/ichar.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/ichar.rst
@@ -3,12 +3,12 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _ichar:
-
 .. index:: ICHAR
 
 .. index:: conversion, to integer
 
+.. _ichar:
+
 ICHAR --- Character-to-integer conversion function
 **************************************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/ieor.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/ieor.rst
index 604cd654454a..b7edebcfbd2c 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/ieor.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/ieor.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _ieor:
-
 .. index:: IEOR
 
 .. index:: BIEOR
@@ -19,6 +17,8 @@
 
 .. index:: logical exclusive or, bitwise
 
+.. _ieor:
+
 IEOR --- Bitwise logical exclusive or
 *************************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/index.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/index.rst
index 4ef9ead94b01..595527ac53c1 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/index.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/index.rst
@@ -3,14 +3,14 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _index-intrinsic:
-
 .. index:: INDEX
 
 .. index:: substring position
 
 .. index:: string, find substring
 
+.. _index-intrinsic:
+
 INDEX --- Position of a substring within a string
 *************************************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/int.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/int.rst
index 83a35aef5298..4524746f9754 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/int.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/int.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _int:
-
 .. index:: INT
 
 .. index:: IFIX
@@ -13,6 +11,8 @@
 
 .. index:: conversion, to integer
 
+.. _int:
+
 INT --- Convert to integer type
 *******************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/ior.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/ior.rst
index cd00b9623ccc..f7fd861118a0 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/ior.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/ior.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _ior:
-
 .. index:: IOR
 
 .. index:: BIOR
@@ -19,6 +17,8 @@
 
 .. index:: logical or, bitwise
 
+.. _ior:
+
 IOR --- Bitwise logical or
 **************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/ishft.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/ishft.rst
index ef1dc699cfe2..f9ebc041c70a 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/ishft.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/ishft.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _ishft:
-
 .. index:: ISHFT
 
 .. index:: BSHFT
@@ -17,6 +15,8 @@
 
 .. index:: bits, shift
 
+.. _ishft:
+
 ISHFT --- Shift bits
 ********************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/ishftc.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/ishftc.rst
index ceabef3afbd1..c16050214c9b 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/ishftc.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/ishftc.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _ishftc:
-
 .. index:: ISHFTC
 
 .. index:: BSHFTC
@@ -17,6 +15,8 @@
 
 .. index:: bits, shift circular
 
+.. _ishftc:
+
 ISHFTC --- Shift bits circularly
 ********************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/len.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/len.rst
index 966ff554d46a..de17692de9de 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/len.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/len.rst
@@ -3,12 +3,12 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _len:
-
 .. index:: LEN
 
 .. index:: string, length
 
+.. _len:
+
 LEN --- Length of a character entity
 ************************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/lge.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/lge.rst
index 6ffb4a7af0c7..93667b0130f6 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/lge.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/lge.rst
@@ -3,14 +3,14 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _lge:
-
 .. index:: LGE
 
 .. index:: lexical comparison of strings
 
 .. index:: string, comparison
 
+.. _lge:
+
 LGE --- Lexical greater than or equal
 *************************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/lgt.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/lgt.rst
index 0654ee5bc31b..3eae0b0765a0 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/lgt.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/lgt.rst
@@ -3,14 +3,14 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _lgt:
-
 .. index:: LGT
 
 .. index:: lexical comparison of strings
 
 .. index:: string, comparison
 
+.. _lgt:
+
 LGT --- Lexical greater than
 ****************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/lle.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/lle.rst
index 9edce0fec64f..5c3c6c98c08b 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/lle.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/lle.rst
@@ -3,14 +3,14 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _lle:
-
 .. index:: LLE
 
 .. index:: lexical comparison of strings
 
 .. index:: string, comparison
 
+.. _lle:
+
 LLE --- Lexical less than or equal
 **********************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/llt.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/llt.rst
index e2f567c28909..e01000d87bc6 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/llt.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/llt.rst
@@ -3,14 +3,14 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _llt:
-
 .. index:: LLT
 
 .. index:: lexical comparison of strings
 
 .. index:: string, comparison
 
+.. _llt:
+
 LLT --- Lexical less than
 *************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/log.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/log.rst
index b7bb67b9fc9f..58ec46e9b45c 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/log.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/log.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _log:
-
 .. index:: LOG
 
 .. index:: ALOG
@@ -23,6 +21,8 @@
 
 .. index:: natural logarithm function
 
+.. _log:
+
 LOG --- Natural logarithm function
 **********************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/log10.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/log10.rst
index 80f8b7d89a41..ce9374db20e4 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/log10.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/log10.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _log10:
-
 .. index:: LOG10
 
 .. index:: ALOG10
@@ -17,6 +15,8 @@
 
 .. index:: base 10 logarithm function
 
+.. _log10:
+
 LOG10 --- Base 10 logarithm function
 ************************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/loggamma.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/loggamma.rst
index 1818975123d9..65e7e4d65685 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/loggamma.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/loggamma.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _log_gamma:
-
 .. index:: LOG_GAMMA
 
 .. index:: LGAMMA
@@ -15,6 +13,8 @@
 
 .. index:: Gamma function, logarithm of
 
+.. _log_gamma:
+
 LOG_GAMMA --- Logarithm of the Gamma function
 *********************************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/max.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/max.rst
index 688e6931df66..807e42ab0352 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/max.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/max.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _max:
-
 .. index:: MAX
 
 .. index:: MAX0
@@ -19,6 +17,8 @@
 
 .. index:: maximum value
 
+.. _max:
+
 MAX --- Maximum value of an argument list
 *****************************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/min.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/min.rst
index 8fc6c6892056..b902bfd432a5 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/min.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/min.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _min:
-
 .. index:: MIN
 
 .. index:: MIN0
@@ -19,6 +17,8 @@
 
 .. index:: minimum value
 
+.. _min:
+
 MIN --- Minimum value of an argument list
 *****************************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/mod.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/mod.rst
index 2e674e90bd46..21e0794ffdae 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/mod.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/mod.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _mod:
-
 .. index:: MOD
 
 .. index:: AMOD
@@ -23,6 +21,8 @@
 
 .. index:: division, remainder
 
+.. _mod:
+
 MOD --- Remainder function
 **************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/mvbits.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/mvbits.rst
index b60a197fbe37..5859bbb294b4 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/mvbits.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/mvbits.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _mvbits:
-
 .. index:: MVBITS
 
 .. index:: BMVBITS
@@ -17,6 +15,8 @@
 
 .. index:: bits, move
 
+.. _mvbits:
+
 MVBITS --- Move bits from one integer to another
 ************************************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/nint.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/nint.rst
index 035beb041e20..2cb9c47140e1 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/nint.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/nint.rst
@@ -3,14 +3,14 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _nint:
-
 .. index:: NINT
 
 .. index:: IDNINT
 
 .. index:: rounding, nearest whole number
 
+.. _nint:
+
 NINT --- Nearest whole number
 *****************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/not.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/not.rst
index 57670323450a..9c00a22d7e5d 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/not.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/not.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _not:
-
 .. index:: NOT
 
 .. index:: BNOT
@@ -21,6 +19,8 @@
 
 .. index:: logical not, bitwise
 
+.. _not:
+
 NOT --- Logical negation
 ************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/real.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/real.rst
index be19a01723dc..03c91f29ced5 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/real.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/real.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _real:
-
 .. index:: REAL
 
 .. index:: REALPART
@@ -25,6 +23,8 @@
 
 .. index:: complex numbers, real part
 
+.. _real:
+
 REAL --- Convert to real type
 ******************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/sign.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/sign.rst
index 0739490763e5..67b6de91346f 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/sign.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/sign.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _sign:
-
 .. index:: SIGN
 
 .. index:: ISIGN
@@ -13,6 +11,8 @@
 
 .. index:: sign copying
 
+.. _sign:
+
 SIGN --- Sign copying function
 ******************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/sin.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/sin.rst
index 902144f30625..bc50dcf169c1 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/sin.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/sin.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _sin:
-
 .. index:: SIN
 
 .. index:: DSIN
@@ -19,6 +17,8 @@
 
 .. index:: sine
 
+.. _sin:
+
 SIN --- Sine function
 **********************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/sind.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/sind.rst
index 89aa7e16bdf0..bb49bef1db7a 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/sind.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/sind.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _sind:
-
 .. index:: SIND
 
 .. index:: DSIND
@@ -19,6 +17,8 @@
 
 .. index:: sine, degrees
 
+.. _sind:
+
 SIND --- Sine function, degrees
 *******************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/sinh.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/sinh.rst
index e63deff9beee..3d5ae7381b53 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/sinh.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/sinh.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _sinh:
-
 .. index:: SINH
 
 .. index:: DSINH
@@ -15,6 +13,8 @@
 
 .. index:: sine, hyperbolic
 
+.. _sinh:
+
 SINH --- Hyperbolic sine function
 **********************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/sqrt.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/sqrt.rst
index e4831b6f089c..a2ec6bad7d82 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/sqrt.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/sqrt.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _sqrt:
-
 .. index:: SQRT
 
 .. index:: DSQRT
@@ -19,6 +17,8 @@
 
 .. index:: square-root
 
+.. _sqrt:
+
 SQRT --- Square-root function
 *****************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/tan.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/tan.rst
index e8a77eccdb5e..b31fb7b2fc3d 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/tan.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/tan.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _tan:
-
 .. index:: TAN
 
 .. index:: DTAN
@@ -13,6 +11,8 @@
 
 .. index:: tangent
 
+.. _tan:
+
 TAN --- Tangent function
 ************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/tand.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/tand.rst
index 3d7e7c186bf6..248472bfd136 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/tand.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/tand.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _tand:
-
 .. index:: TAND
 
 .. index:: DTAND
@@ -13,6 +11,8 @@
 
 .. index:: tangent, degrees
 
+.. _tand:
+
 TAND --- Tangent function, degrees
 **********************************
 
diff --git a/gcc/fortran/doc/gfortran/intrinsic-procedures/tanh.rst b/gcc/fortran/doc/gfortran/intrinsic-procedures/tanh.rst
index 1a3468abd3a2..73d1963caee3 100644
--- a/gcc/fortran/doc/gfortran/intrinsic-procedures/tanh.rst
+++ b/gcc/fortran/doc/gfortran/intrinsic-procedures/tanh.rst
@@ -3,8 +3,6 @@
   This is part of the GCC manual.
   For copying conditions, see the copyright.rst file.
 
-.. _tanh:
-
 .. index:: TANH
 
 .. index:: DTANH
@@ -15,6 +13,8 @@
 
 .. index:: tangent, hyperbolic
 
+.. _tanh:
+
 TANH --- Hyperbolic tangent function
 *************************************
 
-- 
GitLab