From 4daecdb62396a1571f3cba861a0068ab539f8e28 Mon Sep 17 00:00:00 2001
From: Janne Blomqvist <jb@gcc.gnu.org>
Date: Mon, 19 Dec 2016 18:20:09 +0200
Subject: [PATCH] Remove unused functions, take 2.

2016-12-19  Janne Blomqvist  <jb@gcc.gnu.org>

      * Actually remove files that should have been removed by r243799.
This line, and those below, will be ignored--

M    libgfortran/ChangeLog
D    libgfortran/generated/exponent_r10.c
D    libgfortran/generated/exponent_r16.c
D    libgfortran/generated/exponent_r4.c
D    libgfortran/generated/exponent_r8.c
D    libgfortran/generated/fraction_r10.c
D    libgfortran/generated/fraction_r16.c
D    libgfortran/generated/fraction_r4.c
D    libgfortran/generated/fraction_r8.c
D    libgfortran/generated/nearest_r10.c
D    libgfortran/generated/nearest_r16.c
D    libgfortran/generated/nearest_r4.c
D    libgfortran/generated/nearest_r8.c
D    libgfortran/generated/rrspacing_r10.c
D    libgfortran/generated/rrspacing_r16.c
D    libgfortran/generated/rrspacing_r4.c
D    libgfortran/generated/rrspacing_r8.c
D    libgfortran/generated/set_exponent_r10.c
D    libgfortran/generated/set_exponent_r16.c
D    libgfortran/generated/set_exponent_r4.c
D    libgfortran/generated/set_exponent_r8.c
D    libgfortran/generated/spacing_r10.c
D    libgfortran/generated/spacing_r16.c
D    libgfortran/generated/spacing_r4.c
D    libgfortran/generated/spacing_r8.c
D    libgfortran/generated/transpose_c10.c
D    libgfortran/generated/transpose_c16.c
D    libgfortran/generated/transpose_c4.c
D    libgfortran/generated/transpose_c8.c
D    libgfortran/generated/transpose_i16.c
D    libgfortran/generated/transpose_i4.c
D    libgfortran/generated/transpose_i8.c
D    libgfortran/generated/transpose_r10.c
D    libgfortran/generated/transpose_r16.c
D    libgfortran/generated/transpose_r4.c
D    libgfortran/generated/transpose_r8.c
D    libgfortran/intrinsics/malloc.c
D    libgfortran/intrinsics/transpose_generic.c
D    libgfortran/m4/exponent.m4
D    libgfortran/m4/fraction.m4
D    libgfortran/m4/nearest.m4
D    libgfortran/m4/rrspacing.m4
D    libgfortran/m4/set_exponent.m4
D    libgfortran/m4/spacing.m4
D    libgfortran/m4/transpose.m4

From-SVN: r243804
---
 libgfortran/ChangeLog                      |   4 +
 libgfortran/generated/exponent_r10.c       |  45 ------
 libgfortran/generated/exponent_r16.c       |  49 -------
 libgfortran/generated/exponent_r4.c        |  45 ------
 libgfortran/generated/exponent_r8.c        |  45 ------
 libgfortran/generated/fraction_r10.c       |  44 ------
 libgfortran/generated/fraction_r16.c       |  48 -------
 libgfortran/generated/fraction_r4.c        |  44 ------
 libgfortran/generated/fraction_r8.c        |  44 ------
 libgfortran/generated/nearest_r10.c        |  51 -------
 libgfortran/generated/nearest_r16.c        |  55 --------
 libgfortran/generated/nearest_r4.c         |  51 -------
 libgfortran/generated/nearest_r8.c         |  51 -------
 libgfortran/generated/rrspacing_r10.c      |  54 --------
 libgfortran/generated/rrspacing_r16.c      |  58 --------
 libgfortran/generated/rrspacing_r4.c       |  54 --------
 libgfortran/generated/rrspacing_r8.c       |  54 --------
 libgfortran/generated/set_exponent_r10.c   |  44 ------
 libgfortran/generated/set_exponent_r16.c   |  48 -------
 libgfortran/generated/set_exponent_r4.c    |  44 ------
 libgfortran/generated/set_exponent_r8.c    |  44 ------
 libgfortran/generated/spacing_r10.c        |  53 --------
 libgfortran/generated/spacing_r16.c        |  57 --------
 libgfortran/generated/spacing_r4.c         |  53 --------
 libgfortran/generated/spacing_r8.c         |  53 --------
 libgfortran/generated/transpose_c10.c      | 115 ----------------
 libgfortran/generated/transpose_c16.c      | 115 ----------------
 libgfortran/generated/transpose_c4.c       | 115 ----------------
 libgfortran/generated/transpose_c8.c       | 115 ----------------
 libgfortran/generated/transpose_i16.c      | 115 ----------------
 libgfortran/generated/transpose_i4.c       | 115 ----------------
 libgfortran/generated/transpose_i8.c       | 115 ----------------
 libgfortran/generated/transpose_r10.c      | 115 ----------------
 libgfortran/generated/transpose_r16.c      | 115 ----------------
 libgfortran/generated/transpose_r4.c       | 115 ----------------
 libgfortran/generated/transpose_r8.c       | 115 ----------------
 libgfortran/intrinsics/malloc.c            |  51 -------
 libgfortran/intrinsics/transpose_generic.c | 151 ---------------------
 libgfortran/m4/exponent.m4                 |  45 ------
 libgfortran/m4/fraction.m4                 |  44 ------
 libgfortran/m4/nearest.m4                  |  51 -------
 libgfortran/m4/rrspacing.m4                |  54 --------
 libgfortran/m4/set_exponent.m4             |  44 ------
 libgfortran/m4/spacing.m4                  |  53 --------
 libgfortran/m4/transpose.m4                | 116 ----------------
 45 files changed, 4 insertions(+), 3062 deletions(-)
 delete mode 100644 libgfortran/generated/exponent_r10.c
 delete mode 100644 libgfortran/generated/exponent_r16.c
 delete mode 100644 libgfortran/generated/exponent_r4.c
 delete mode 100644 libgfortran/generated/exponent_r8.c
 delete mode 100644 libgfortran/generated/fraction_r10.c
 delete mode 100644 libgfortran/generated/fraction_r16.c
 delete mode 100644 libgfortran/generated/fraction_r4.c
 delete mode 100644 libgfortran/generated/fraction_r8.c
 delete mode 100644 libgfortran/generated/nearest_r10.c
 delete mode 100644 libgfortran/generated/nearest_r16.c
 delete mode 100644 libgfortran/generated/nearest_r4.c
 delete mode 100644 libgfortran/generated/nearest_r8.c
 delete mode 100644 libgfortran/generated/rrspacing_r10.c
 delete mode 100644 libgfortran/generated/rrspacing_r16.c
 delete mode 100644 libgfortran/generated/rrspacing_r4.c
 delete mode 100644 libgfortran/generated/rrspacing_r8.c
 delete mode 100644 libgfortran/generated/set_exponent_r10.c
 delete mode 100644 libgfortran/generated/set_exponent_r16.c
 delete mode 100644 libgfortran/generated/set_exponent_r4.c
 delete mode 100644 libgfortran/generated/set_exponent_r8.c
 delete mode 100644 libgfortran/generated/spacing_r10.c
 delete mode 100644 libgfortran/generated/spacing_r16.c
 delete mode 100644 libgfortran/generated/spacing_r4.c
 delete mode 100644 libgfortran/generated/spacing_r8.c
 delete mode 100644 libgfortran/generated/transpose_c10.c
 delete mode 100644 libgfortran/generated/transpose_c16.c
 delete mode 100644 libgfortran/generated/transpose_c4.c
 delete mode 100644 libgfortran/generated/transpose_c8.c
 delete mode 100644 libgfortran/generated/transpose_i16.c
 delete mode 100644 libgfortran/generated/transpose_i4.c
 delete mode 100644 libgfortran/generated/transpose_i8.c
 delete mode 100644 libgfortran/generated/transpose_r10.c
 delete mode 100644 libgfortran/generated/transpose_r16.c
 delete mode 100644 libgfortran/generated/transpose_r4.c
 delete mode 100644 libgfortran/generated/transpose_r8.c
 delete mode 100644 libgfortran/intrinsics/malloc.c
 delete mode 100644 libgfortran/intrinsics/transpose_generic.c
 delete mode 100644 libgfortran/m4/exponent.m4
 delete mode 100644 libgfortran/m4/fraction.m4
 delete mode 100644 libgfortran/m4/nearest.m4
 delete mode 100644 libgfortran/m4/rrspacing.m4
 delete mode 100644 libgfortran/m4/set_exponent.m4
 delete mode 100644 libgfortran/m4/spacing.m4
 delete mode 100644 libgfortran/m4/transpose.m4

diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 36c994ae4173..f64dae2ddee5 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,7 @@
+2016-12-19  Janne Blomqvist  <jb@gcc.gnu.org>
+
+	* Actually remove files that should have been removed by r243799.
+
 2016-12-19  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
 
 	* gfortran.map: Remove _gfortran_stop_numeric_f08.
diff --git a/libgfortran/generated/exponent_r10.c b/libgfortran/generated/exponent_r10.c
deleted file mode 100644
index b11f12f74ee3..000000000000
--- a/libgfortran/generated/exponent_r10.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Implementation of the EXPONENT intrinsic
-   Copyright (C) 2003-2016 Free Software Foundation, Inc.
-   Contributed by Richard Henderson <rth@redhat.com>.
-
-This file is part of the GNU Fortran 95 runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"
-
-
-
-#define MATHFUNC(funcname) funcname ## l
-
-#if defined (HAVE_GFC_REAL_10) && defined (HAVE_FREXPL)
-
-extern GFC_INTEGER_4 exponent_r10 (GFC_REAL_10 s);
-export_proto(exponent_r10);
-
-GFC_INTEGER_4
-exponent_r10 (GFC_REAL_10 s)
-{
-  int ret;
-  MATHFUNC(frexp) (s, &ret);
-  return ret;
-}
-
-#endif
diff --git a/libgfortran/generated/exponent_r16.c b/libgfortran/generated/exponent_r16.c
deleted file mode 100644
index 163b6fd0337c..000000000000
--- a/libgfortran/generated/exponent_r16.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/* Implementation of the EXPONENT intrinsic
-   Copyright (C) 2003-2016 Free Software Foundation, Inc.
-   Contributed by Richard Henderson <rth@redhat.com>.
-
-This file is part of the GNU Fortran 95 runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"
-
-
-
-#if defined(GFC_REAL_16_IS_FLOAT128)
-#define MATHFUNC(funcname) funcname ## q
-#else
-#define MATHFUNC(funcname) funcname ## l
-#endif
-
-#if defined (HAVE_GFC_REAL_16) && (defined(GFC_REAL_16_IS_FLOAT128) || defined(HAVE_FREXPL))
-
-extern GFC_INTEGER_4 exponent_r16 (GFC_REAL_16 s);
-export_proto(exponent_r16);
-
-GFC_INTEGER_4
-exponent_r16 (GFC_REAL_16 s)
-{
-  int ret;
-  MATHFUNC(frexp) (s, &ret);
-  return ret;
-}
-
-#endif
diff --git a/libgfortran/generated/exponent_r4.c b/libgfortran/generated/exponent_r4.c
deleted file mode 100644
index 15d7cbadbd43..000000000000
--- a/libgfortran/generated/exponent_r4.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Implementation of the EXPONENT intrinsic
-   Copyright (C) 2003-2016 Free Software Foundation, Inc.
-   Contributed by Richard Henderson <rth@redhat.com>.
-
-This file is part of the GNU Fortran 95 runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"
-
-
-
-#define MATHFUNC(funcname) funcname ## f
-
-#if defined (HAVE_GFC_REAL_4) && defined (HAVE_FREXPF)
-
-extern GFC_INTEGER_4 exponent_r4 (GFC_REAL_4 s);
-export_proto(exponent_r4);
-
-GFC_INTEGER_4
-exponent_r4 (GFC_REAL_4 s)
-{
-  int ret;
-  MATHFUNC(frexp) (s, &ret);
-  return ret;
-}
-
-#endif
diff --git a/libgfortran/generated/exponent_r8.c b/libgfortran/generated/exponent_r8.c
deleted file mode 100644
index 6972cc6642fb..000000000000
--- a/libgfortran/generated/exponent_r8.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Implementation of the EXPONENT intrinsic
-   Copyright (C) 2003-2016 Free Software Foundation, Inc.
-   Contributed by Richard Henderson <rth@redhat.com>.
-
-This file is part of the GNU Fortran 95 runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"
-
-
-
-#define MATHFUNC(funcname) funcname
-
-#if defined (HAVE_GFC_REAL_8) && defined (HAVE_FREXP)
-
-extern GFC_INTEGER_4 exponent_r8 (GFC_REAL_8 s);
-export_proto(exponent_r8);
-
-GFC_INTEGER_4
-exponent_r8 (GFC_REAL_8 s)
-{
-  int ret;
-  MATHFUNC(frexp) (s, &ret);
-  return ret;
-}
-
-#endif
diff --git a/libgfortran/generated/fraction_r10.c b/libgfortran/generated/fraction_r10.c
deleted file mode 100644
index 0d96c3125c1d..000000000000
--- a/libgfortran/generated/fraction_r10.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Implementation of the FRACTION intrinsic
-   Copyright (C) 2003-2016 Free Software Foundation, Inc.
-   Contributed by Richard Henderson <rth@redhat.com>.
-
-This file is part of the GNU Fortran 95 runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"
-
-
-
-#define MATHFUNC(funcname) funcname ## l
-
-#if defined (HAVE_GFC_REAL_10) && defined (HAVE_FREXPL)
-
-extern GFC_REAL_10 fraction_r10 (GFC_REAL_10 s);
-export_proto(fraction_r10);
-
-GFC_REAL_10
-fraction_r10 (GFC_REAL_10 s)
-{
-  int dummy_exp;
-  return MATHFUNC(frexp) (s, &dummy_exp);
-}
-
-#endif
diff --git a/libgfortran/generated/fraction_r16.c b/libgfortran/generated/fraction_r16.c
deleted file mode 100644
index 6ec0f8074b28..000000000000
--- a/libgfortran/generated/fraction_r16.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Implementation of the FRACTION intrinsic
-   Copyright (C) 2003-2016 Free Software Foundation, Inc.
-   Contributed by Richard Henderson <rth@redhat.com>.
-
-This file is part of the GNU Fortran 95 runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"
-
-
-
-#if defined(GFC_REAL_16_IS_FLOAT128)
-#define MATHFUNC(funcname) funcname ## q
-#else
-#define MATHFUNC(funcname) funcname ## l
-#endif
-
-#if defined (HAVE_GFC_REAL_16) && (defined(GFC_REAL_16_IS_FLOAT128) || defined(HAVE_FREXPL))
-
-extern GFC_REAL_16 fraction_r16 (GFC_REAL_16 s);
-export_proto(fraction_r16);
-
-GFC_REAL_16
-fraction_r16 (GFC_REAL_16 s)
-{
-  int dummy_exp;
-  return MATHFUNC(frexp) (s, &dummy_exp);
-}
-
-#endif
diff --git a/libgfortran/generated/fraction_r4.c b/libgfortran/generated/fraction_r4.c
deleted file mode 100644
index 817da4ea04c4..000000000000
--- a/libgfortran/generated/fraction_r4.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Implementation of the FRACTION intrinsic
-   Copyright (C) 2003-2016 Free Software Foundation, Inc.
-   Contributed by Richard Henderson <rth@redhat.com>.
-
-This file is part of the GNU Fortran 95 runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"
-
-
-
-#define MATHFUNC(funcname) funcname ## f
-
-#if defined (HAVE_GFC_REAL_4) && defined (HAVE_FREXPF)
-
-extern GFC_REAL_4 fraction_r4 (GFC_REAL_4 s);
-export_proto(fraction_r4);
-
-GFC_REAL_4
-fraction_r4 (GFC_REAL_4 s)
-{
-  int dummy_exp;
-  return MATHFUNC(frexp) (s, &dummy_exp);
-}
-
-#endif
diff --git a/libgfortran/generated/fraction_r8.c b/libgfortran/generated/fraction_r8.c
deleted file mode 100644
index 4081d261e8b5..000000000000
--- a/libgfortran/generated/fraction_r8.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Implementation of the FRACTION intrinsic
-   Copyright (C) 2003-2016 Free Software Foundation, Inc.
-   Contributed by Richard Henderson <rth@redhat.com>.
-
-This file is part of the GNU Fortran 95 runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"
-
-
-
-#define MATHFUNC(funcname) funcname
-
-#if defined (HAVE_GFC_REAL_8) && defined (HAVE_FREXP)
-
-extern GFC_REAL_8 fraction_r8 (GFC_REAL_8 s);
-export_proto(fraction_r8);
-
-GFC_REAL_8
-fraction_r8 (GFC_REAL_8 s)
-{
-  int dummy_exp;
-  return MATHFUNC(frexp) (s, &dummy_exp);
-}
-
-#endif
diff --git a/libgfortran/generated/nearest_r10.c b/libgfortran/generated/nearest_r10.c
deleted file mode 100644
index aa5ff8b7699b..000000000000
--- a/libgfortran/generated/nearest_r10.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Implementation of the NEAREST intrinsic
-   Copyright (C) 2003-2016 Free Software Foundation, Inc.
-   Contributed by Richard Henderson <rth@redhat.com>.
-
-This file is part of the GNU Fortran 95 runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"
-
-
-
-#define MATHFUNC(funcname) funcname ## l
-
-#if defined (HAVE_GFC_REAL_10) && defined (HAVE_COPYSIGNL) && defined (HAVE_NEXTAFTERL)
-
-extern GFC_REAL_10 nearest_r10 (GFC_REAL_10 s, GFC_REAL_10 dir);
-export_proto(nearest_r10);
-
-GFC_REAL_10
-nearest_r10 (GFC_REAL_10 s, GFC_REAL_10 dir)
-{
-  dir = MATHFUNC(copysign) (MATHFUNC(__builtin_inf) (), dir);
-  if (FLT_EVAL_METHOD != 0)
-    {
-      /* ??? Work around glibc bug on x86.  */
-      volatile GFC_REAL_10 r = MATHFUNC(nextafter) (s, dir);
-      return r;
-    }
-  else
-    return MATHFUNC(nextafter) (s, dir);
-}
-
-#endif
diff --git a/libgfortran/generated/nearest_r16.c b/libgfortran/generated/nearest_r16.c
deleted file mode 100644
index e690151331b0..000000000000
--- a/libgfortran/generated/nearest_r16.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/* Implementation of the NEAREST intrinsic
-   Copyright (C) 2003-2016 Free Software Foundation, Inc.
-   Contributed by Richard Henderson <rth@redhat.com>.
-
-This file is part of the GNU Fortran 95 runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"
-
-
-
-#if defined(GFC_REAL_16_IS_FLOAT128)
-#define MATHFUNC(funcname) funcname ## q
-#else
-#define MATHFUNC(funcname) funcname ## l
-#endif
-
-#if defined (HAVE_GFC_REAL_16) && (defined(GFC_REAL_16_IS_FLOAT128) || defined(HAVE_COPYSIGNL)) && (defined(GFC_REAL_16_IS_FLOAT128) || defined(HAVE_NEXTAFTERL))
-
-extern GFC_REAL_16 nearest_r16 (GFC_REAL_16 s, GFC_REAL_16 dir);
-export_proto(nearest_r16);
-
-GFC_REAL_16
-nearest_r16 (GFC_REAL_16 s, GFC_REAL_16 dir)
-{
-  dir = MATHFUNC(copysign) (MATHFUNC(__builtin_inf) (), dir);
-  if (FLT_EVAL_METHOD != 0)
-    {
-      /* ??? Work around glibc bug on x86.  */
-      volatile GFC_REAL_16 r = MATHFUNC(nextafter) (s, dir);
-      return r;
-    }
-  else
-    return MATHFUNC(nextafter) (s, dir);
-}
-
-#endif
diff --git a/libgfortran/generated/nearest_r4.c b/libgfortran/generated/nearest_r4.c
deleted file mode 100644
index 3ca83ecbf9b6..000000000000
--- a/libgfortran/generated/nearest_r4.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Implementation of the NEAREST intrinsic
-   Copyright (C) 2003-2016 Free Software Foundation, Inc.
-   Contributed by Richard Henderson <rth@redhat.com>.
-
-This file is part of the GNU Fortran 95 runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"
-
-
-
-#define MATHFUNC(funcname) funcname ## f
-
-#if defined (HAVE_GFC_REAL_4) && defined (HAVE_COPYSIGNF) && defined (HAVE_NEXTAFTERF)
-
-extern GFC_REAL_4 nearest_r4 (GFC_REAL_4 s, GFC_REAL_4 dir);
-export_proto(nearest_r4);
-
-GFC_REAL_4
-nearest_r4 (GFC_REAL_4 s, GFC_REAL_4 dir)
-{
-  dir = MATHFUNC(copysign) (MATHFUNC(__builtin_inf) (), dir);
-  if (FLT_EVAL_METHOD != 0)
-    {
-      /* ??? Work around glibc bug on x86.  */
-      volatile GFC_REAL_4 r = MATHFUNC(nextafter) (s, dir);
-      return r;
-    }
-  else
-    return MATHFUNC(nextafter) (s, dir);
-}
-
-#endif
diff --git a/libgfortran/generated/nearest_r8.c b/libgfortran/generated/nearest_r8.c
deleted file mode 100644
index 861da2ec2d37..000000000000
--- a/libgfortran/generated/nearest_r8.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Implementation of the NEAREST intrinsic
-   Copyright (C) 2003-2016 Free Software Foundation, Inc.
-   Contributed by Richard Henderson <rth@redhat.com>.
-
-This file is part of the GNU Fortran 95 runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"
-
-
-
-#define MATHFUNC(funcname) funcname
-
-#if defined (HAVE_GFC_REAL_8) && defined (HAVE_COPYSIGN) && defined (HAVE_NEXTAFTER)
-
-extern GFC_REAL_8 nearest_r8 (GFC_REAL_8 s, GFC_REAL_8 dir);
-export_proto(nearest_r8);
-
-GFC_REAL_8
-nearest_r8 (GFC_REAL_8 s, GFC_REAL_8 dir)
-{
-  dir = MATHFUNC(copysign) (MATHFUNC(__builtin_inf) (), dir);
-  if (FLT_EVAL_METHOD != 0)
-    {
-      /* ??? Work around glibc bug on x86.  */
-      volatile GFC_REAL_8 r = MATHFUNC(nextafter) (s, dir);
-      return r;
-    }
-  else
-    return MATHFUNC(nextafter) (s, dir);
-}
-
-#endif
diff --git a/libgfortran/generated/rrspacing_r10.c b/libgfortran/generated/rrspacing_r10.c
deleted file mode 100644
index d0c6852d0a4b..000000000000
--- a/libgfortran/generated/rrspacing_r10.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/* Implementation of the RRSPACING intrinsic
-   Copyright (C) 2006-2016 Free Software Foundation, Inc.
-   Contributed by Steven G. Kargl <kargl@gcc.gnu.org>
-
-This file is part of the GNU Fortran 95 runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"
-
-
-
-#define MATHFUNC(funcname) funcname ## l
-
-#if defined (HAVE_GFC_REAL_10) && defined (HAVE_FABSL) && defined (HAVE_FREXPL)
-
-extern GFC_REAL_10 rrspacing_r10 (GFC_REAL_10 s, int p);
-export_proto(rrspacing_r10);
-
-GFC_REAL_10
-rrspacing_r10 (GFC_REAL_10 s, int p)
-{
-  int e;
-  GFC_REAL_10 x;
-  x = MATHFUNC(fabs) (s);
-  if (x == 0.)
-    return 0.;
-  MATHFUNC(frexp) (s, &e);
-#if defined (HAVE_LDEXPL)
-  return MATHFUNC(ldexp) (x, p - e);
-#else
-  return MATHFUNC(scalbn) (x, p - e);
-#endif
-
-}
-
-#endif
diff --git a/libgfortran/generated/rrspacing_r16.c b/libgfortran/generated/rrspacing_r16.c
deleted file mode 100644
index ed0c0053805d..000000000000
--- a/libgfortran/generated/rrspacing_r16.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/* Implementation of the RRSPACING intrinsic
-   Copyright (C) 2006-2016 Free Software Foundation, Inc.
-   Contributed by Steven G. Kargl <kargl@gcc.gnu.org>
-
-This file is part of the GNU Fortran 95 runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"
-
-
-
-#if defined(GFC_REAL_16_IS_FLOAT128)
-#define MATHFUNC(funcname) funcname ## q
-#else
-#define MATHFUNC(funcname) funcname ## l
-#endif
-
-#if defined (HAVE_GFC_REAL_16) && (defined(GFC_REAL_16_IS_FLOAT128) || defined(HAVE_FABSL)) && (defined(GFC_REAL_16_IS_FLOAT128) || defined(HAVE_FREXPL))
-
-extern GFC_REAL_16 rrspacing_r16 (GFC_REAL_16 s, int p);
-export_proto(rrspacing_r16);
-
-GFC_REAL_16
-rrspacing_r16 (GFC_REAL_16 s, int p)
-{
-  int e;
-  GFC_REAL_16 x;
-  x = MATHFUNC(fabs) (s);
-  if (x == 0.)
-    return 0.;
-  MATHFUNC(frexp) (s, &e);
-#if (defined(GFC_REAL_16_IS_FLOAT128) || defined(HAVE_LDEXPL))
-  return MATHFUNC(ldexp) (x, p - e);
-#else
-  return MATHFUNC(scalbn) (x, p - e);
-#endif
-
-}
-
-#endif
diff --git a/libgfortran/generated/rrspacing_r4.c b/libgfortran/generated/rrspacing_r4.c
deleted file mode 100644
index 23c5b86e9e81..000000000000
--- a/libgfortran/generated/rrspacing_r4.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/* Implementation of the RRSPACING intrinsic
-   Copyright (C) 2006-2016 Free Software Foundation, Inc.
-   Contributed by Steven G. Kargl <kargl@gcc.gnu.org>
-
-This file is part of the GNU Fortran 95 runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"
-
-
-
-#define MATHFUNC(funcname) funcname ## f
-
-#if defined (HAVE_GFC_REAL_4) && defined (HAVE_FABSF) && defined (HAVE_FREXPF)
-
-extern GFC_REAL_4 rrspacing_r4 (GFC_REAL_4 s, int p);
-export_proto(rrspacing_r4);
-
-GFC_REAL_4
-rrspacing_r4 (GFC_REAL_4 s, int p)
-{
-  int e;
-  GFC_REAL_4 x;
-  x = MATHFUNC(fabs) (s);
-  if (x == 0.)
-    return 0.;
-  MATHFUNC(frexp) (s, &e);
-#if defined (HAVE_LDEXPF)
-  return MATHFUNC(ldexp) (x, p - e);
-#else
-  return MATHFUNC(scalbn) (x, p - e);
-#endif
-
-}
-
-#endif
diff --git a/libgfortran/generated/rrspacing_r8.c b/libgfortran/generated/rrspacing_r8.c
deleted file mode 100644
index 0a8cfef637d7..000000000000
--- a/libgfortran/generated/rrspacing_r8.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/* Implementation of the RRSPACING intrinsic
-   Copyright (C) 2006-2016 Free Software Foundation, Inc.
-   Contributed by Steven G. Kargl <kargl@gcc.gnu.org>
-
-This file is part of the GNU Fortran 95 runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"
-
-
-
-#define MATHFUNC(funcname) funcname
-
-#if defined (HAVE_GFC_REAL_8) && defined (HAVE_FABS) && defined (HAVE_FREXP)
-
-extern GFC_REAL_8 rrspacing_r8 (GFC_REAL_8 s, int p);
-export_proto(rrspacing_r8);
-
-GFC_REAL_8
-rrspacing_r8 (GFC_REAL_8 s, int p)
-{
-  int e;
-  GFC_REAL_8 x;
-  x = MATHFUNC(fabs) (s);
-  if (x == 0.)
-    return 0.;
-  MATHFUNC(frexp) (s, &e);
-#if defined (HAVE_LDEXP)
-  return MATHFUNC(ldexp) (x, p - e);
-#else
-  return MATHFUNC(scalbn) (x, p - e);
-#endif
-
-}
-
-#endif
diff --git a/libgfortran/generated/set_exponent_r10.c b/libgfortran/generated/set_exponent_r10.c
deleted file mode 100644
index de8f59dc5b0b..000000000000
--- a/libgfortran/generated/set_exponent_r10.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Implementation of the SET_EXPONENT intrinsic
-   Copyright (C) 2003-2016 Free Software Foundation, Inc.
-   Contributed by Richard Henderson <rth@redhat.com>.
-
-This file is part of the GNU Fortran 95 runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"
-
-
-
-#define MATHFUNC(funcname) funcname ## l
-
-#if defined (HAVE_GFC_REAL_10) && defined (HAVE_SCALBNL) && defined (HAVE_FREXPL)
-
-extern GFC_REAL_10 set_exponent_r10 (GFC_REAL_10 s, GFC_INTEGER_4 i);
-export_proto(set_exponent_r10);
-
-GFC_REAL_10
-set_exponent_r10 (GFC_REAL_10 s, GFC_INTEGER_4 i)
-{
-  int dummy_exp;
-  return MATHFUNC(scalbn) (MATHFUNC(frexp) (s, &dummy_exp), i);
-}
-
-#endif
diff --git a/libgfortran/generated/set_exponent_r16.c b/libgfortran/generated/set_exponent_r16.c
deleted file mode 100644
index 1f7c8c79cdb6..000000000000
--- a/libgfortran/generated/set_exponent_r16.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Implementation of the SET_EXPONENT intrinsic
-   Copyright (C) 2003-2016 Free Software Foundation, Inc.
-   Contributed by Richard Henderson <rth@redhat.com>.
-
-This file is part of the GNU Fortran 95 runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"
-
-
-
-#if defined(GFC_REAL_16_IS_FLOAT128)
-#define MATHFUNC(funcname) funcname ## q
-#else
-#define MATHFUNC(funcname) funcname ## l
-#endif
-
-#if defined (HAVE_GFC_REAL_16) && (defined(GFC_REAL_16_IS_FLOAT128) || defined(HAVE_SCALBNL)) && (defined(GFC_REAL_16_IS_FLOAT128) || defined(HAVE_FREXPL))
-
-extern GFC_REAL_16 set_exponent_r16 (GFC_REAL_16 s, GFC_INTEGER_4 i);
-export_proto(set_exponent_r16);
-
-GFC_REAL_16
-set_exponent_r16 (GFC_REAL_16 s, GFC_INTEGER_4 i)
-{
-  int dummy_exp;
-  return MATHFUNC(scalbn) (MATHFUNC(frexp) (s, &dummy_exp), i);
-}
-
-#endif
diff --git a/libgfortran/generated/set_exponent_r4.c b/libgfortran/generated/set_exponent_r4.c
deleted file mode 100644
index 2c1708b12b09..000000000000
--- a/libgfortran/generated/set_exponent_r4.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Implementation of the SET_EXPONENT intrinsic
-   Copyright (C) 2003-2016 Free Software Foundation, Inc.
-   Contributed by Richard Henderson <rth@redhat.com>.
-
-This file is part of the GNU Fortran 95 runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"
-
-
-
-#define MATHFUNC(funcname) funcname ## f
-
-#if defined (HAVE_GFC_REAL_4) && defined (HAVE_SCALBNF) && defined (HAVE_FREXPF)
-
-extern GFC_REAL_4 set_exponent_r4 (GFC_REAL_4 s, GFC_INTEGER_4 i);
-export_proto(set_exponent_r4);
-
-GFC_REAL_4
-set_exponent_r4 (GFC_REAL_4 s, GFC_INTEGER_4 i)
-{
-  int dummy_exp;
-  return MATHFUNC(scalbn) (MATHFUNC(frexp) (s, &dummy_exp), i);
-}
-
-#endif
diff --git a/libgfortran/generated/set_exponent_r8.c b/libgfortran/generated/set_exponent_r8.c
deleted file mode 100644
index 5b64909058d6..000000000000
--- a/libgfortran/generated/set_exponent_r8.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Implementation of the SET_EXPONENT intrinsic
-   Copyright (C) 2003-2016 Free Software Foundation, Inc.
-   Contributed by Richard Henderson <rth@redhat.com>.
-
-This file is part of the GNU Fortran 95 runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"
-
-
-
-#define MATHFUNC(funcname) funcname
-
-#if defined (HAVE_GFC_REAL_8) && defined (HAVE_SCALBN) && defined (HAVE_FREXP)
-
-extern GFC_REAL_8 set_exponent_r8 (GFC_REAL_8 s, GFC_INTEGER_4 i);
-export_proto(set_exponent_r8);
-
-GFC_REAL_8
-set_exponent_r8 (GFC_REAL_8 s, GFC_INTEGER_4 i)
-{
-  int dummy_exp;
-  return MATHFUNC(scalbn) (MATHFUNC(frexp) (s, &dummy_exp), i);
-}
-
-#endif
diff --git a/libgfortran/generated/spacing_r10.c b/libgfortran/generated/spacing_r10.c
deleted file mode 100644
index 75a7b2626ec7..000000000000
--- a/libgfortran/generated/spacing_r10.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Implementation of the SPACING intrinsic
-   Copyright (C) 2006-2016 Free Software Foundation, Inc.
-   Contributed by Steven G. Kargl <kargl@gcc.gnu.org>
-
-This file is part of the GNU Fortran 95 runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"
-
-
-
-#define MATHFUNC(funcname) funcname ## l
-
-#if defined (HAVE_GFC_REAL_10) && defined (HAVE_FREXPL)
-
-extern GFC_REAL_10 spacing_r10 (GFC_REAL_10 s, int p, int emin, GFC_REAL_10 tiny);
-export_proto(spacing_r10);
-
-GFC_REAL_10
-spacing_r10 (GFC_REAL_10 s, int p, int emin, GFC_REAL_10 tiny)
-{
-  int e;
-  if (s == 0.)
-    return tiny;
-  MATHFUNC(frexp) (s, &e);
-  e = e - p;
-  e = e > emin ? e : emin;
-#if defined (HAVE_LDEXPL)
-  return MATHFUNC(ldexp) (1., e);
-#else
-  return MATHFUNC(scalbn) (1., e);
-#endif
-}
-
-#endif
diff --git a/libgfortran/generated/spacing_r16.c b/libgfortran/generated/spacing_r16.c
deleted file mode 100644
index acff212f7e3e..000000000000
--- a/libgfortran/generated/spacing_r16.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/* Implementation of the SPACING intrinsic
-   Copyright (C) 2006-2016 Free Software Foundation, Inc.
-   Contributed by Steven G. Kargl <kargl@gcc.gnu.org>
-
-This file is part of the GNU Fortran 95 runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"
-
-
-
-#if defined(GFC_REAL_16_IS_FLOAT128)
-#define MATHFUNC(funcname) funcname ## q
-#else
-#define MATHFUNC(funcname) funcname ## l
-#endif
-
-#if defined (HAVE_GFC_REAL_16) && (defined(GFC_REAL_16_IS_FLOAT128) || defined(HAVE_FREXPL))
-
-extern GFC_REAL_16 spacing_r16 (GFC_REAL_16 s, int p, int emin, GFC_REAL_16 tiny);
-export_proto(spacing_r16);
-
-GFC_REAL_16
-spacing_r16 (GFC_REAL_16 s, int p, int emin, GFC_REAL_16 tiny)
-{
-  int e;
-  if (s == 0.)
-    return tiny;
-  MATHFUNC(frexp) (s, &e);
-  e = e - p;
-  e = e > emin ? e : emin;
-#if (defined(GFC_REAL_16_IS_FLOAT128) || defined(HAVE_LDEXPL))
-  return MATHFUNC(ldexp) (1., e);
-#else
-  return MATHFUNC(scalbn) (1., e);
-#endif
-}
-
-#endif
diff --git a/libgfortran/generated/spacing_r4.c b/libgfortran/generated/spacing_r4.c
deleted file mode 100644
index 383713f10436..000000000000
--- a/libgfortran/generated/spacing_r4.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Implementation of the SPACING intrinsic
-   Copyright (C) 2006-2016 Free Software Foundation, Inc.
-   Contributed by Steven G. Kargl <kargl@gcc.gnu.org>
-
-This file is part of the GNU Fortran 95 runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"
-
-
-
-#define MATHFUNC(funcname) funcname ## f
-
-#if defined (HAVE_GFC_REAL_4) && defined (HAVE_FREXPF)
-
-extern GFC_REAL_4 spacing_r4 (GFC_REAL_4 s, int p, int emin, GFC_REAL_4 tiny);
-export_proto(spacing_r4);
-
-GFC_REAL_4
-spacing_r4 (GFC_REAL_4 s, int p, int emin, GFC_REAL_4 tiny)
-{
-  int e;
-  if (s == 0.)
-    return tiny;
-  MATHFUNC(frexp) (s, &e);
-  e = e - p;
-  e = e > emin ? e : emin;
-#if defined (HAVE_LDEXPF)
-  return MATHFUNC(ldexp) (1., e);
-#else
-  return MATHFUNC(scalbn) (1., e);
-#endif
-}
-
-#endif
diff --git a/libgfortran/generated/spacing_r8.c b/libgfortran/generated/spacing_r8.c
deleted file mode 100644
index 26419106ad9a..000000000000
--- a/libgfortran/generated/spacing_r8.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Implementation of the SPACING intrinsic
-   Copyright (C) 2006-2016 Free Software Foundation, Inc.
-   Contributed by Steven G. Kargl <kargl@gcc.gnu.org>
-
-This file is part of the GNU Fortran 95 runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"
-
-
-
-#define MATHFUNC(funcname) funcname
-
-#if defined (HAVE_GFC_REAL_8) && defined (HAVE_FREXP)
-
-extern GFC_REAL_8 spacing_r8 (GFC_REAL_8 s, int p, int emin, GFC_REAL_8 tiny);
-export_proto(spacing_r8);
-
-GFC_REAL_8
-spacing_r8 (GFC_REAL_8 s, int p, int emin, GFC_REAL_8 tiny)
-{
-  int e;
-  if (s == 0.)
-    return tiny;
-  MATHFUNC(frexp) (s, &e);
-  e = e - p;
-  e = e > emin ? e : emin;
-#if defined (HAVE_LDEXP)
-  return MATHFUNC(ldexp) (1., e);
-#else
-  return MATHFUNC(scalbn) (1., e);
-#endif
-}
-
-#endif
diff --git a/libgfortran/generated/transpose_c10.c b/libgfortran/generated/transpose_c10.c
deleted file mode 100644
index 67f82f863fc2..000000000000
--- a/libgfortran/generated/transpose_c10.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/* Implementation of the TRANSPOSE intrinsic
-   Copyright (C) 2003-2016 Free Software Foundation, Inc.
-   Contributed by Tobias Schlüter
-
-This file is part of the GNU Fortran runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"
-#include <assert.h>
-
-
-#if defined (HAVE_GFC_COMPLEX_10)
-
-extern void transpose_c10 (gfc_array_c10 * const restrict ret, 
-	gfc_array_c10 * const restrict source);
-export_proto(transpose_c10);
-
-void
-transpose_c10 (gfc_array_c10 * const restrict ret, 
-	gfc_array_c10 * const restrict source)
-{
-  /* r.* indicates the return array.  */
-  index_type rxstride, rystride;
-  GFC_COMPLEX_10 * restrict rptr;
-  /* s.* indicates the source array.  */
-  index_type sxstride, systride;
-  const GFC_COMPLEX_10 *sptr;
-
-  index_type xcount, ycount;
-  index_type x, y;
-
-  assert (GFC_DESCRIPTOR_RANK (source) == 2);
-
-  if (ret->base_addr == NULL)
-    {
-      assert (GFC_DESCRIPTOR_RANK (ret) == 2);
-      assert (ret->dtype == source->dtype);
-
-      GFC_DIMENSION_SET(ret->dim[0], 0, GFC_DESCRIPTOR_EXTENT(source,1) - 1,
-			1);
-
-      GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
-			GFC_DESCRIPTOR_EXTENT(source, 1));
-
-      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
-                                     sizeof (GFC_COMPLEX_10));
-      ret->offset = 0;
-    } else if (unlikely (compile_options.bounds_check))
-    {
-      index_type ret_extent, src_extent;
-
-      ret_extent = GFC_DESCRIPTOR_EXTENT(ret,0);
-      src_extent = GFC_DESCRIPTOR_EXTENT(source,1);
-
-      if (src_extent != ret_extent)
-	runtime_error ("Incorrect extent in return value of TRANSPOSE"
-		       " intrinsic in dimension 1: is %ld,"
-		       " should be %ld", (long int) src_extent,
-		       (long int) ret_extent);
-
-      ret_extent = GFC_DESCRIPTOR_EXTENT(ret,1);
-      src_extent = GFC_DESCRIPTOR_EXTENT(source,0);
-
-      if (src_extent != ret_extent)
-	runtime_error ("Incorrect extent in return value of TRANSPOSE"
-		       " intrinsic in dimension 2: is %ld,"
-		       " should be %ld", (long int) src_extent,
-		       (long int) ret_extent);
-
-    }
-
-  sxstride = GFC_DESCRIPTOR_STRIDE(source,0);
-  systride = GFC_DESCRIPTOR_STRIDE(source,1);
-  xcount = GFC_DESCRIPTOR_EXTENT(source,0);
-  ycount = GFC_DESCRIPTOR_EXTENT(source,1);
-
-  rxstride = GFC_DESCRIPTOR_STRIDE(ret,0);
-  rystride = GFC_DESCRIPTOR_STRIDE(ret,1);
-
-  rptr = ret->base_addr;
-  sptr = source->base_addr;
-
-  for (y=0; y < ycount; y++)
-    {
-      for (x=0; x < xcount; x++)
-        {
-          *rptr = *sptr;
-
-          sptr += sxstride;
-          rptr += rystride;
-        }
-        sptr += systride - (sxstride * xcount);
-        rptr += rxstride - (rystride * xcount);
-    }
-}
-
-#endif
diff --git a/libgfortran/generated/transpose_c16.c b/libgfortran/generated/transpose_c16.c
deleted file mode 100644
index 927fa270dfc0..000000000000
--- a/libgfortran/generated/transpose_c16.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/* Implementation of the TRANSPOSE intrinsic
-   Copyright (C) 2003-2016 Free Software Foundation, Inc.
-   Contributed by Tobias Schlüter
-
-This file is part of the GNU Fortran runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"
-#include <assert.h>
-
-
-#if defined (HAVE_GFC_COMPLEX_16)
-
-extern void transpose_c16 (gfc_array_c16 * const restrict ret, 
-	gfc_array_c16 * const restrict source);
-export_proto(transpose_c16);
-
-void
-transpose_c16 (gfc_array_c16 * const restrict ret, 
-	gfc_array_c16 * const restrict source)
-{
-  /* r.* indicates the return array.  */
-  index_type rxstride, rystride;
-  GFC_COMPLEX_16 * restrict rptr;
-  /* s.* indicates the source array.  */
-  index_type sxstride, systride;
-  const GFC_COMPLEX_16 *sptr;
-
-  index_type xcount, ycount;
-  index_type x, y;
-
-  assert (GFC_DESCRIPTOR_RANK (source) == 2);
-
-  if (ret->base_addr == NULL)
-    {
-      assert (GFC_DESCRIPTOR_RANK (ret) == 2);
-      assert (ret->dtype == source->dtype);
-
-      GFC_DIMENSION_SET(ret->dim[0], 0, GFC_DESCRIPTOR_EXTENT(source,1) - 1,
-			1);
-
-      GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
-			GFC_DESCRIPTOR_EXTENT(source, 1));
-
-      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
-                                     sizeof (GFC_COMPLEX_16));
-      ret->offset = 0;
-    } else if (unlikely (compile_options.bounds_check))
-    {
-      index_type ret_extent, src_extent;
-
-      ret_extent = GFC_DESCRIPTOR_EXTENT(ret,0);
-      src_extent = GFC_DESCRIPTOR_EXTENT(source,1);
-
-      if (src_extent != ret_extent)
-	runtime_error ("Incorrect extent in return value of TRANSPOSE"
-		       " intrinsic in dimension 1: is %ld,"
-		       " should be %ld", (long int) src_extent,
-		       (long int) ret_extent);
-
-      ret_extent = GFC_DESCRIPTOR_EXTENT(ret,1);
-      src_extent = GFC_DESCRIPTOR_EXTENT(source,0);
-
-      if (src_extent != ret_extent)
-	runtime_error ("Incorrect extent in return value of TRANSPOSE"
-		       " intrinsic in dimension 2: is %ld,"
-		       " should be %ld", (long int) src_extent,
-		       (long int) ret_extent);
-
-    }
-
-  sxstride = GFC_DESCRIPTOR_STRIDE(source,0);
-  systride = GFC_DESCRIPTOR_STRIDE(source,1);
-  xcount = GFC_DESCRIPTOR_EXTENT(source,0);
-  ycount = GFC_DESCRIPTOR_EXTENT(source,1);
-
-  rxstride = GFC_DESCRIPTOR_STRIDE(ret,0);
-  rystride = GFC_DESCRIPTOR_STRIDE(ret,1);
-
-  rptr = ret->base_addr;
-  sptr = source->base_addr;
-
-  for (y=0; y < ycount; y++)
-    {
-      for (x=0; x < xcount; x++)
-        {
-          *rptr = *sptr;
-
-          sptr += sxstride;
-          rptr += rystride;
-        }
-        sptr += systride - (sxstride * xcount);
-        rptr += rxstride - (rystride * xcount);
-    }
-}
-
-#endif
diff --git a/libgfortran/generated/transpose_c4.c b/libgfortran/generated/transpose_c4.c
deleted file mode 100644
index d8811d0ebc23..000000000000
--- a/libgfortran/generated/transpose_c4.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/* Implementation of the TRANSPOSE intrinsic
-   Copyright (C) 2003-2016 Free Software Foundation, Inc.
-   Contributed by Tobias Schlüter
-
-This file is part of the GNU Fortran runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"
-#include <assert.h>
-
-
-#if defined (HAVE_GFC_COMPLEX_4)
-
-extern void transpose_c4 (gfc_array_c4 * const restrict ret, 
-	gfc_array_c4 * const restrict source);
-export_proto(transpose_c4);
-
-void
-transpose_c4 (gfc_array_c4 * const restrict ret, 
-	gfc_array_c4 * const restrict source)
-{
-  /* r.* indicates the return array.  */
-  index_type rxstride, rystride;
-  GFC_COMPLEX_4 * restrict rptr;
-  /* s.* indicates the source array.  */
-  index_type sxstride, systride;
-  const GFC_COMPLEX_4 *sptr;
-
-  index_type xcount, ycount;
-  index_type x, y;
-
-  assert (GFC_DESCRIPTOR_RANK (source) == 2);
-
-  if (ret->base_addr == NULL)
-    {
-      assert (GFC_DESCRIPTOR_RANK (ret) == 2);
-      assert (ret->dtype == source->dtype);
-
-      GFC_DIMENSION_SET(ret->dim[0], 0, GFC_DESCRIPTOR_EXTENT(source,1) - 1,
-			1);
-
-      GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
-			GFC_DESCRIPTOR_EXTENT(source, 1));
-
-      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
-                                     sizeof (GFC_COMPLEX_4));
-      ret->offset = 0;
-    } else if (unlikely (compile_options.bounds_check))
-    {
-      index_type ret_extent, src_extent;
-
-      ret_extent = GFC_DESCRIPTOR_EXTENT(ret,0);
-      src_extent = GFC_DESCRIPTOR_EXTENT(source,1);
-
-      if (src_extent != ret_extent)
-	runtime_error ("Incorrect extent in return value of TRANSPOSE"
-		       " intrinsic in dimension 1: is %ld,"
-		       " should be %ld", (long int) src_extent,
-		       (long int) ret_extent);
-
-      ret_extent = GFC_DESCRIPTOR_EXTENT(ret,1);
-      src_extent = GFC_DESCRIPTOR_EXTENT(source,0);
-
-      if (src_extent != ret_extent)
-	runtime_error ("Incorrect extent in return value of TRANSPOSE"
-		       " intrinsic in dimension 2: is %ld,"
-		       " should be %ld", (long int) src_extent,
-		       (long int) ret_extent);
-
-    }
-
-  sxstride = GFC_DESCRIPTOR_STRIDE(source,0);
-  systride = GFC_DESCRIPTOR_STRIDE(source,1);
-  xcount = GFC_DESCRIPTOR_EXTENT(source,0);
-  ycount = GFC_DESCRIPTOR_EXTENT(source,1);
-
-  rxstride = GFC_DESCRIPTOR_STRIDE(ret,0);
-  rystride = GFC_DESCRIPTOR_STRIDE(ret,1);
-
-  rptr = ret->base_addr;
-  sptr = source->base_addr;
-
-  for (y=0; y < ycount; y++)
-    {
-      for (x=0; x < xcount; x++)
-        {
-          *rptr = *sptr;
-
-          sptr += sxstride;
-          rptr += rystride;
-        }
-        sptr += systride - (sxstride * xcount);
-        rptr += rxstride - (rystride * xcount);
-    }
-}
-
-#endif
diff --git a/libgfortran/generated/transpose_c8.c b/libgfortran/generated/transpose_c8.c
deleted file mode 100644
index 40a73e62bb2b..000000000000
--- a/libgfortran/generated/transpose_c8.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/* Implementation of the TRANSPOSE intrinsic
-   Copyright (C) 2003-2016 Free Software Foundation, Inc.
-   Contributed by Tobias Schlüter
-
-This file is part of the GNU Fortran runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"
-#include <assert.h>
-
-
-#if defined (HAVE_GFC_COMPLEX_8)
-
-extern void transpose_c8 (gfc_array_c8 * const restrict ret, 
-	gfc_array_c8 * const restrict source);
-export_proto(transpose_c8);
-
-void
-transpose_c8 (gfc_array_c8 * const restrict ret, 
-	gfc_array_c8 * const restrict source)
-{
-  /* r.* indicates the return array.  */
-  index_type rxstride, rystride;
-  GFC_COMPLEX_8 * restrict rptr;
-  /* s.* indicates the source array.  */
-  index_type sxstride, systride;
-  const GFC_COMPLEX_8 *sptr;
-
-  index_type xcount, ycount;
-  index_type x, y;
-
-  assert (GFC_DESCRIPTOR_RANK (source) == 2);
-
-  if (ret->base_addr == NULL)
-    {
-      assert (GFC_DESCRIPTOR_RANK (ret) == 2);
-      assert (ret->dtype == source->dtype);
-
-      GFC_DIMENSION_SET(ret->dim[0], 0, GFC_DESCRIPTOR_EXTENT(source,1) - 1,
-			1);
-
-      GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
-			GFC_DESCRIPTOR_EXTENT(source, 1));
-
-      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
-                                     sizeof (GFC_COMPLEX_8));
-      ret->offset = 0;
-    } else if (unlikely (compile_options.bounds_check))
-    {
-      index_type ret_extent, src_extent;
-
-      ret_extent = GFC_DESCRIPTOR_EXTENT(ret,0);
-      src_extent = GFC_DESCRIPTOR_EXTENT(source,1);
-
-      if (src_extent != ret_extent)
-	runtime_error ("Incorrect extent in return value of TRANSPOSE"
-		       " intrinsic in dimension 1: is %ld,"
-		       " should be %ld", (long int) src_extent,
-		       (long int) ret_extent);
-
-      ret_extent = GFC_DESCRIPTOR_EXTENT(ret,1);
-      src_extent = GFC_DESCRIPTOR_EXTENT(source,0);
-
-      if (src_extent != ret_extent)
-	runtime_error ("Incorrect extent in return value of TRANSPOSE"
-		       " intrinsic in dimension 2: is %ld,"
-		       " should be %ld", (long int) src_extent,
-		       (long int) ret_extent);
-
-    }
-
-  sxstride = GFC_DESCRIPTOR_STRIDE(source,0);
-  systride = GFC_DESCRIPTOR_STRIDE(source,1);
-  xcount = GFC_DESCRIPTOR_EXTENT(source,0);
-  ycount = GFC_DESCRIPTOR_EXTENT(source,1);
-
-  rxstride = GFC_DESCRIPTOR_STRIDE(ret,0);
-  rystride = GFC_DESCRIPTOR_STRIDE(ret,1);
-
-  rptr = ret->base_addr;
-  sptr = source->base_addr;
-
-  for (y=0; y < ycount; y++)
-    {
-      for (x=0; x < xcount; x++)
-        {
-          *rptr = *sptr;
-
-          sptr += sxstride;
-          rptr += rystride;
-        }
-        sptr += systride - (sxstride * xcount);
-        rptr += rxstride - (rystride * xcount);
-    }
-}
-
-#endif
diff --git a/libgfortran/generated/transpose_i16.c b/libgfortran/generated/transpose_i16.c
deleted file mode 100644
index 6812003cce0f..000000000000
--- a/libgfortran/generated/transpose_i16.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/* Implementation of the TRANSPOSE intrinsic
-   Copyright (C) 2003-2016 Free Software Foundation, Inc.
-   Contributed by Tobias Schlüter
-
-This file is part of the GNU Fortran runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"
-#include <assert.h>
-
-
-#if defined (HAVE_GFC_INTEGER_16)
-
-extern void transpose_i16 (gfc_array_i16 * const restrict ret, 
-	gfc_array_i16 * const restrict source);
-export_proto(transpose_i16);
-
-void
-transpose_i16 (gfc_array_i16 * const restrict ret, 
-	gfc_array_i16 * const restrict source)
-{
-  /* r.* indicates the return array.  */
-  index_type rxstride, rystride;
-  GFC_INTEGER_16 * restrict rptr;
-  /* s.* indicates the source array.  */
-  index_type sxstride, systride;
-  const GFC_INTEGER_16 *sptr;
-
-  index_type xcount, ycount;
-  index_type x, y;
-
-  assert (GFC_DESCRIPTOR_RANK (source) == 2);
-
-  if (ret->base_addr == NULL)
-    {
-      assert (GFC_DESCRIPTOR_RANK (ret) == 2);
-      assert (ret->dtype == source->dtype);
-
-      GFC_DIMENSION_SET(ret->dim[0], 0, GFC_DESCRIPTOR_EXTENT(source,1) - 1,
-			1);
-
-      GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
-			GFC_DESCRIPTOR_EXTENT(source, 1));
-
-      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
-                                     sizeof (GFC_INTEGER_16));
-      ret->offset = 0;
-    } else if (unlikely (compile_options.bounds_check))
-    {
-      index_type ret_extent, src_extent;
-
-      ret_extent = GFC_DESCRIPTOR_EXTENT(ret,0);
-      src_extent = GFC_DESCRIPTOR_EXTENT(source,1);
-
-      if (src_extent != ret_extent)
-	runtime_error ("Incorrect extent in return value of TRANSPOSE"
-		       " intrinsic in dimension 1: is %ld,"
-		       " should be %ld", (long int) src_extent,
-		       (long int) ret_extent);
-
-      ret_extent = GFC_DESCRIPTOR_EXTENT(ret,1);
-      src_extent = GFC_DESCRIPTOR_EXTENT(source,0);
-
-      if (src_extent != ret_extent)
-	runtime_error ("Incorrect extent in return value of TRANSPOSE"
-		       " intrinsic in dimension 2: is %ld,"
-		       " should be %ld", (long int) src_extent,
-		       (long int) ret_extent);
-
-    }
-
-  sxstride = GFC_DESCRIPTOR_STRIDE(source,0);
-  systride = GFC_DESCRIPTOR_STRIDE(source,1);
-  xcount = GFC_DESCRIPTOR_EXTENT(source,0);
-  ycount = GFC_DESCRIPTOR_EXTENT(source,1);
-
-  rxstride = GFC_DESCRIPTOR_STRIDE(ret,0);
-  rystride = GFC_DESCRIPTOR_STRIDE(ret,1);
-
-  rptr = ret->base_addr;
-  sptr = source->base_addr;
-
-  for (y=0; y < ycount; y++)
-    {
-      for (x=0; x < xcount; x++)
-        {
-          *rptr = *sptr;
-
-          sptr += sxstride;
-          rptr += rystride;
-        }
-        sptr += systride - (sxstride * xcount);
-        rptr += rxstride - (rystride * xcount);
-    }
-}
-
-#endif
diff --git a/libgfortran/generated/transpose_i4.c b/libgfortran/generated/transpose_i4.c
deleted file mode 100644
index dbc5d43c2a82..000000000000
--- a/libgfortran/generated/transpose_i4.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/* Implementation of the TRANSPOSE intrinsic
-   Copyright (C) 2003-2016 Free Software Foundation, Inc.
-   Contributed by Tobias Schlüter
-
-This file is part of the GNU Fortran runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"
-#include <assert.h>
-
-
-#if defined (HAVE_GFC_INTEGER_4)
-
-extern void transpose_i4 (gfc_array_i4 * const restrict ret, 
-	gfc_array_i4 * const restrict source);
-export_proto(transpose_i4);
-
-void
-transpose_i4 (gfc_array_i4 * const restrict ret, 
-	gfc_array_i4 * const restrict source)
-{
-  /* r.* indicates the return array.  */
-  index_type rxstride, rystride;
-  GFC_INTEGER_4 * restrict rptr;
-  /* s.* indicates the source array.  */
-  index_type sxstride, systride;
-  const GFC_INTEGER_4 *sptr;
-
-  index_type xcount, ycount;
-  index_type x, y;
-
-  assert (GFC_DESCRIPTOR_RANK (source) == 2);
-
-  if (ret->base_addr == NULL)
-    {
-      assert (GFC_DESCRIPTOR_RANK (ret) == 2);
-      assert (ret->dtype == source->dtype);
-
-      GFC_DIMENSION_SET(ret->dim[0], 0, GFC_DESCRIPTOR_EXTENT(source,1) - 1,
-			1);
-
-      GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
-			GFC_DESCRIPTOR_EXTENT(source, 1));
-
-      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
-                                     sizeof (GFC_INTEGER_4));
-      ret->offset = 0;
-    } else if (unlikely (compile_options.bounds_check))
-    {
-      index_type ret_extent, src_extent;
-
-      ret_extent = GFC_DESCRIPTOR_EXTENT(ret,0);
-      src_extent = GFC_DESCRIPTOR_EXTENT(source,1);
-
-      if (src_extent != ret_extent)
-	runtime_error ("Incorrect extent in return value of TRANSPOSE"
-		       " intrinsic in dimension 1: is %ld,"
-		       " should be %ld", (long int) src_extent,
-		       (long int) ret_extent);
-
-      ret_extent = GFC_DESCRIPTOR_EXTENT(ret,1);
-      src_extent = GFC_DESCRIPTOR_EXTENT(source,0);
-
-      if (src_extent != ret_extent)
-	runtime_error ("Incorrect extent in return value of TRANSPOSE"
-		       " intrinsic in dimension 2: is %ld,"
-		       " should be %ld", (long int) src_extent,
-		       (long int) ret_extent);
-
-    }
-
-  sxstride = GFC_DESCRIPTOR_STRIDE(source,0);
-  systride = GFC_DESCRIPTOR_STRIDE(source,1);
-  xcount = GFC_DESCRIPTOR_EXTENT(source,0);
-  ycount = GFC_DESCRIPTOR_EXTENT(source,1);
-
-  rxstride = GFC_DESCRIPTOR_STRIDE(ret,0);
-  rystride = GFC_DESCRIPTOR_STRIDE(ret,1);
-
-  rptr = ret->base_addr;
-  sptr = source->base_addr;
-
-  for (y=0; y < ycount; y++)
-    {
-      for (x=0; x < xcount; x++)
-        {
-          *rptr = *sptr;
-
-          sptr += sxstride;
-          rptr += rystride;
-        }
-        sptr += systride - (sxstride * xcount);
-        rptr += rxstride - (rystride * xcount);
-    }
-}
-
-#endif
diff --git a/libgfortran/generated/transpose_i8.c b/libgfortran/generated/transpose_i8.c
deleted file mode 100644
index 631eef341264..000000000000
--- a/libgfortran/generated/transpose_i8.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/* Implementation of the TRANSPOSE intrinsic
-   Copyright (C) 2003-2016 Free Software Foundation, Inc.
-   Contributed by Tobias Schlüter
-
-This file is part of the GNU Fortran runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"
-#include <assert.h>
-
-
-#if defined (HAVE_GFC_INTEGER_8)
-
-extern void transpose_i8 (gfc_array_i8 * const restrict ret, 
-	gfc_array_i8 * const restrict source);
-export_proto(transpose_i8);
-
-void
-transpose_i8 (gfc_array_i8 * const restrict ret, 
-	gfc_array_i8 * const restrict source)
-{
-  /* r.* indicates the return array.  */
-  index_type rxstride, rystride;
-  GFC_INTEGER_8 * restrict rptr;
-  /* s.* indicates the source array.  */
-  index_type sxstride, systride;
-  const GFC_INTEGER_8 *sptr;
-
-  index_type xcount, ycount;
-  index_type x, y;
-
-  assert (GFC_DESCRIPTOR_RANK (source) == 2);
-
-  if (ret->base_addr == NULL)
-    {
-      assert (GFC_DESCRIPTOR_RANK (ret) == 2);
-      assert (ret->dtype == source->dtype);
-
-      GFC_DIMENSION_SET(ret->dim[0], 0, GFC_DESCRIPTOR_EXTENT(source,1) - 1,
-			1);
-
-      GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
-			GFC_DESCRIPTOR_EXTENT(source, 1));
-
-      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
-                                     sizeof (GFC_INTEGER_8));
-      ret->offset = 0;
-    } else if (unlikely (compile_options.bounds_check))
-    {
-      index_type ret_extent, src_extent;
-
-      ret_extent = GFC_DESCRIPTOR_EXTENT(ret,0);
-      src_extent = GFC_DESCRIPTOR_EXTENT(source,1);
-
-      if (src_extent != ret_extent)
-	runtime_error ("Incorrect extent in return value of TRANSPOSE"
-		       " intrinsic in dimension 1: is %ld,"
-		       " should be %ld", (long int) src_extent,
-		       (long int) ret_extent);
-
-      ret_extent = GFC_DESCRIPTOR_EXTENT(ret,1);
-      src_extent = GFC_DESCRIPTOR_EXTENT(source,0);
-
-      if (src_extent != ret_extent)
-	runtime_error ("Incorrect extent in return value of TRANSPOSE"
-		       " intrinsic in dimension 2: is %ld,"
-		       " should be %ld", (long int) src_extent,
-		       (long int) ret_extent);
-
-    }
-
-  sxstride = GFC_DESCRIPTOR_STRIDE(source,0);
-  systride = GFC_DESCRIPTOR_STRIDE(source,1);
-  xcount = GFC_DESCRIPTOR_EXTENT(source,0);
-  ycount = GFC_DESCRIPTOR_EXTENT(source,1);
-
-  rxstride = GFC_DESCRIPTOR_STRIDE(ret,0);
-  rystride = GFC_DESCRIPTOR_STRIDE(ret,1);
-
-  rptr = ret->base_addr;
-  sptr = source->base_addr;
-
-  for (y=0; y < ycount; y++)
-    {
-      for (x=0; x < xcount; x++)
-        {
-          *rptr = *sptr;
-
-          sptr += sxstride;
-          rptr += rystride;
-        }
-        sptr += systride - (sxstride * xcount);
-        rptr += rxstride - (rystride * xcount);
-    }
-}
-
-#endif
diff --git a/libgfortran/generated/transpose_r10.c b/libgfortran/generated/transpose_r10.c
deleted file mode 100644
index 8c276133bcc5..000000000000
--- a/libgfortran/generated/transpose_r10.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/* Implementation of the TRANSPOSE intrinsic
-   Copyright (C) 2003-2016 Free Software Foundation, Inc.
-   Contributed by Tobias Schlüter
-
-This file is part of the GNU Fortran runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"
-#include <assert.h>
-
-
-#if defined (HAVE_GFC_REAL_10)
-
-extern void transpose_r10 (gfc_array_r10 * const restrict ret, 
-	gfc_array_r10 * const restrict source);
-export_proto(transpose_r10);
-
-void
-transpose_r10 (gfc_array_r10 * const restrict ret, 
-	gfc_array_r10 * const restrict source)
-{
-  /* r.* indicates the return array.  */
-  index_type rxstride, rystride;
-  GFC_REAL_10 * restrict rptr;
-  /* s.* indicates the source array.  */
-  index_type sxstride, systride;
-  const GFC_REAL_10 *sptr;
-
-  index_type xcount, ycount;
-  index_type x, y;
-
-  assert (GFC_DESCRIPTOR_RANK (source) == 2);
-
-  if (ret->base_addr == NULL)
-    {
-      assert (GFC_DESCRIPTOR_RANK (ret) == 2);
-      assert (ret->dtype == source->dtype);
-
-      GFC_DIMENSION_SET(ret->dim[0], 0, GFC_DESCRIPTOR_EXTENT(source,1) - 1,
-			1);
-
-      GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
-			GFC_DESCRIPTOR_EXTENT(source, 1));
-
-      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
-                                     sizeof (GFC_REAL_10));
-      ret->offset = 0;
-    } else if (unlikely (compile_options.bounds_check))
-    {
-      index_type ret_extent, src_extent;
-
-      ret_extent = GFC_DESCRIPTOR_EXTENT(ret,0);
-      src_extent = GFC_DESCRIPTOR_EXTENT(source,1);
-
-      if (src_extent != ret_extent)
-	runtime_error ("Incorrect extent in return value of TRANSPOSE"
-		       " intrinsic in dimension 1: is %ld,"
-		       " should be %ld", (long int) src_extent,
-		       (long int) ret_extent);
-
-      ret_extent = GFC_DESCRIPTOR_EXTENT(ret,1);
-      src_extent = GFC_DESCRIPTOR_EXTENT(source,0);
-
-      if (src_extent != ret_extent)
-	runtime_error ("Incorrect extent in return value of TRANSPOSE"
-		       " intrinsic in dimension 2: is %ld,"
-		       " should be %ld", (long int) src_extent,
-		       (long int) ret_extent);
-
-    }
-
-  sxstride = GFC_DESCRIPTOR_STRIDE(source,0);
-  systride = GFC_DESCRIPTOR_STRIDE(source,1);
-  xcount = GFC_DESCRIPTOR_EXTENT(source,0);
-  ycount = GFC_DESCRIPTOR_EXTENT(source,1);
-
-  rxstride = GFC_DESCRIPTOR_STRIDE(ret,0);
-  rystride = GFC_DESCRIPTOR_STRIDE(ret,1);
-
-  rptr = ret->base_addr;
-  sptr = source->base_addr;
-
-  for (y=0; y < ycount; y++)
-    {
-      for (x=0; x < xcount; x++)
-        {
-          *rptr = *sptr;
-
-          sptr += sxstride;
-          rptr += rystride;
-        }
-        sptr += systride - (sxstride * xcount);
-        rptr += rxstride - (rystride * xcount);
-    }
-}
-
-#endif
diff --git a/libgfortran/generated/transpose_r16.c b/libgfortran/generated/transpose_r16.c
deleted file mode 100644
index 2e4fd24bfc20..000000000000
--- a/libgfortran/generated/transpose_r16.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/* Implementation of the TRANSPOSE intrinsic
-   Copyright (C) 2003-2016 Free Software Foundation, Inc.
-   Contributed by Tobias Schlüter
-
-This file is part of the GNU Fortran runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"
-#include <assert.h>
-
-
-#if defined (HAVE_GFC_REAL_16)
-
-extern void transpose_r16 (gfc_array_r16 * const restrict ret, 
-	gfc_array_r16 * const restrict source);
-export_proto(transpose_r16);
-
-void
-transpose_r16 (gfc_array_r16 * const restrict ret, 
-	gfc_array_r16 * const restrict source)
-{
-  /* r.* indicates the return array.  */
-  index_type rxstride, rystride;
-  GFC_REAL_16 * restrict rptr;
-  /* s.* indicates the source array.  */
-  index_type sxstride, systride;
-  const GFC_REAL_16 *sptr;
-
-  index_type xcount, ycount;
-  index_type x, y;
-
-  assert (GFC_DESCRIPTOR_RANK (source) == 2);
-
-  if (ret->base_addr == NULL)
-    {
-      assert (GFC_DESCRIPTOR_RANK (ret) == 2);
-      assert (ret->dtype == source->dtype);
-
-      GFC_DIMENSION_SET(ret->dim[0], 0, GFC_DESCRIPTOR_EXTENT(source,1) - 1,
-			1);
-
-      GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
-			GFC_DESCRIPTOR_EXTENT(source, 1));
-
-      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
-                                     sizeof (GFC_REAL_16));
-      ret->offset = 0;
-    } else if (unlikely (compile_options.bounds_check))
-    {
-      index_type ret_extent, src_extent;
-
-      ret_extent = GFC_DESCRIPTOR_EXTENT(ret,0);
-      src_extent = GFC_DESCRIPTOR_EXTENT(source,1);
-
-      if (src_extent != ret_extent)
-	runtime_error ("Incorrect extent in return value of TRANSPOSE"
-		       " intrinsic in dimension 1: is %ld,"
-		       " should be %ld", (long int) src_extent,
-		       (long int) ret_extent);
-
-      ret_extent = GFC_DESCRIPTOR_EXTENT(ret,1);
-      src_extent = GFC_DESCRIPTOR_EXTENT(source,0);
-
-      if (src_extent != ret_extent)
-	runtime_error ("Incorrect extent in return value of TRANSPOSE"
-		       " intrinsic in dimension 2: is %ld,"
-		       " should be %ld", (long int) src_extent,
-		       (long int) ret_extent);
-
-    }
-
-  sxstride = GFC_DESCRIPTOR_STRIDE(source,0);
-  systride = GFC_DESCRIPTOR_STRIDE(source,1);
-  xcount = GFC_DESCRIPTOR_EXTENT(source,0);
-  ycount = GFC_DESCRIPTOR_EXTENT(source,1);
-
-  rxstride = GFC_DESCRIPTOR_STRIDE(ret,0);
-  rystride = GFC_DESCRIPTOR_STRIDE(ret,1);
-
-  rptr = ret->base_addr;
-  sptr = source->base_addr;
-
-  for (y=0; y < ycount; y++)
-    {
-      for (x=0; x < xcount; x++)
-        {
-          *rptr = *sptr;
-
-          sptr += sxstride;
-          rptr += rystride;
-        }
-        sptr += systride - (sxstride * xcount);
-        rptr += rxstride - (rystride * xcount);
-    }
-}
-
-#endif
diff --git a/libgfortran/generated/transpose_r4.c b/libgfortran/generated/transpose_r4.c
deleted file mode 100644
index d24fa9bb94a2..000000000000
--- a/libgfortran/generated/transpose_r4.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/* Implementation of the TRANSPOSE intrinsic
-   Copyright (C) 2003-2016 Free Software Foundation, Inc.
-   Contributed by Tobias Schlüter
-
-This file is part of the GNU Fortran runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"
-#include <assert.h>
-
-
-#if defined (HAVE_GFC_REAL_4)
-
-extern void transpose_r4 (gfc_array_r4 * const restrict ret, 
-	gfc_array_r4 * const restrict source);
-export_proto(transpose_r4);
-
-void
-transpose_r4 (gfc_array_r4 * const restrict ret, 
-	gfc_array_r4 * const restrict source)
-{
-  /* r.* indicates the return array.  */
-  index_type rxstride, rystride;
-  GFC_REAL_4 * restrict rptr;
-  /* s.* indicates the source array.  */
-  index_type sxstride, systride;
-  const GFC_REAL_4 *sptr;
-
-  index_type xcount, ycount;
-  index_type x, y;
-
-  assert (GFC_DESCRIPTOR_RANK (source) == 2);
-
-  if (ret->base_addr == NULL)
-    {
-      assert (GFC_DESCRIPTOR_RANK (ret) == 2);
-      assert (ret->dtype == source->dtype);
-
-      GFC_DIMENSION_SET(ret->dim[0], 0, GFC_DESCRIPTOR_EXTENT(source,1) - 1,
-			1);
-
-      GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
-			GFC_DESCRIPTOR_EXTENT(source, 1));
-
-      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
-                                     sizeof (GFC_REAL_4));
-      ret->offset = 0;
-    } else if (unlikely (compile_options.bounds_check))
-    {
-      index_type ret_extent, src_extent;
-
-      ret_extent = GFC_DESCRIPTOR_EXTENT(ret,0);
-      src_extent = GFC_DESCRIPTOR_EXTENT(source,1);
-
-      if (src_extent != ret_extent)
-	runtime_error ("Incorrect extent in return value of TRANSPOSE"
-		       " intrinsic in dimension 1: is %ld,"
-		       " should be %ld", (long int) src_extent,
-		       (long int) ret_extent);
-
-      ret_extent = GFC_DESCRIPTOR_EXTENT(ret,1);
-      src_extent = GFC_DESCRIPTOR_EXTENT(source,0);
-
-      if (src_extent != ret_extent)
-	runtime_error ("Incorrect extent in return value of TRANSPOSE"
-		       " intrinsic in dimension 2: is %ld,"
-		       " should be %ld", (long int) src_extent,
-		       (long int) ret_extent);
-
-    }
-
-  sxstride = GFC_DESCRIPTOR_STRIDE(source,0);
-  systride = GFC_DESCRIPTOR_STRIDE(source,1);
-  xcount = GFC_DESCRIPTOR_EXTENT(source,0);
-  ycount = GFC_DESCRIPTOR_EXTENT(source,1);
-
-  rxstride = GFC_DESCRIPTOR_STRIDE(ret,0);
-  rystride = GFC_DESCRIPTOR_STRIDE(ret,1);
-
-  rptr = ret->base_addr;
-  sptr = source->base_addr;
-
-  for (y=0; y < ycount; y++)
-    {
-      for (x=0; x < xcount; x++)
-        {
-          *rptr = *sptr;
-
-          sptr += sxstride;
-          rptr += rystride;
-        }
-        sptr += systride - (sxstride * xcount);
-        rptr += rxstride - (rystride * xcount);
-    }
-}
-
-#endif
diff --git a/libgfortran/generated/transpose_r8.c b/libgfortran/generated/transpose_r8.c
deleted file mode 100644
index 7834aa22f04c..000000000000
--- a/libgfortran/generated/transpose_r8.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/* Implementation of the TRANSPOSE intrinsic
-   Copyright (C) 2003-2016 Free Software Foundation, Inc.
-   Contributed by Tobias Schlüter
-
-This file is part of the GNU Fortran runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"
-#include <assert.h>
-
-
-#if defined (HAVE_GFC_REAL_8)
-
-extern void transpose_r8 (gfc_array_r8 * const restrict ret, 
-	gfc_array_r8 * const restrict source);
-export_proto(transpose_r8);
-
-void
-transpose_r8 (gfc_array_r8 * const restrict ret, 
-	gfc_array_r8 * const restrict source)
-{
-  /* r.* indicates the return array.  */
-  index_type rxstride, rystride;
-  GFC_REAL_8 * restrict rptr;
-  /* s.* indicates the source array.  */
-  index_type sxstride, systride;
-  const GFC_REAL_8 *sptr;
-
-  index_type xcount, ycount;
-  index_type x, y;
-
-  assert (GFC_DESCRIPTOR_RANK (source) == 2);
-
-  if (ret->base_addr == NULL)
-    {
-      assert (GFC_DESCRIPTOR_RANK (ret) == 2);
-      assert (ret->dtype == source->dtype);
-
-      GFC_DIMENSION_SET(ret->dim[0], 0, GFC_DESCRIPTOR_EXTENT(source,1) - 1,
-			1);
-
-      GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
-			GFC_DESCRIPTOR_EXTENT(source, 1));
-
-      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
-                                     sizeof (GFC_REAL_8));
-      ret->offset = 0;
-    } else if (unlikely (compile_options.bounds_check))
-    {
-      index_type ret_extent, src_extent;
-
-      ret_extent = GFC_DESCRIPTOR_EXTENT(ret,0);
-      src_extent = GFC_DESCRIPTOR_EXTENT(source,1);
-
-      if (src_extent != ret_extent)
-	runtime_error ("Incorrect extent in return value of TRANSPOSE"
-		       " intrinsic in dimension 1: is %ld,"
-		       " should be %ld", (long int) src_extent,
-		       (long int) ret_extent);
-
-      ret_extent = GFC_DESCRIPTOR_EXTENT(ret,1);
-      src_extent = GFC_DESCRIPTOR_EXTENT(source,0);
-
-      if (src_extent != ret_extent)
-	runtime_error ("Incorrect extent in return value of TRANSPOSE"
-		       " intrinsic in dimension 2: is %ld,"
-		       " should be %ld", (long int) src_extent,
-		       (long int) ret_extent);
-
-    }
-
-  sxstride = GFC_DESCRIPTOR_STRIDE(source,0);
-  systride = GFC_DESCRIPTOR_STRIDE(source,1);
-  xcount = GFC_DESCRIPTOR_EXTENT(source,0);
-  ycount = GFC_DESCRIPTOR_EXTENT(source,1);
-
-  rxstride = GFC_DESCRIPTOR_STRIDE(ret,0);
-  rystride = GFC_DESCRIPTOR_STRIDE(ret,1);
-
-  rptr = ret->base_addr;
-  sptr = source->base_addr;
-
-  for (y=0; y < ycount; y++)
-    {
-      for (x=0; x < xcount; x++)
-        {
-          *rptr = *sptr;
-
-          sptr += sxstride;
-          rptr += rystride;
-        }
-        sptr += systride - (sxstride * xcount);
-        rptr += rxstride - (rystride * xcount);
-    }
-}
-
-#endif
diff --git a/libgfortran/intrinsics/malloc.c b/libgfortran/intrinsics/malloc.c
deleted file mode 100644
index 2d22c8dc4066..000000000000
--- a/libgfortran/intrinsics/malloc.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Implementation of the MALLOC and FREE intrinsics
-   Copyright (C) 2005-2016 Free Software Foundation, Inc.
-   Contributed by François-Xavier Coudert <coudert@clipper.ens.fr>
-
-This file is part of the GNU Fortran runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"
-#include <stdlib.h>
-
-
-/* The runtime MALLOC and FREE are kept here until the libgfortran ABI
-   is broken.  The front-end now emits direct calls to the GCC's malloc()
-   and free() built-ins.  */
-
-extern void PREFIX(free) (void **);
-export_proto_np(PREFIX(free));
-
-void
-PREFIX(free) (void ** ptr)
-{
-  free (*ptr);
-}
-
-
-extern void * PREFIX(malloc) (size_t *);
-export_proto_np(PREFIX(malloc));
-
-void *
-PREFIX(malloc) (size_t * size)
-{
-  return malloc (*size);
-}
diff --git a/libgfortran/intrinsics/transpose_generic.c b/libgfortran/intrinsics/transpose_generic.c
deleted file mode 100644
index 5c623cc1112a..000000000000
--- a/libgfortran/intrinsics/transpose_generic.c
+++ /dev/null
@@ -1,151 +0,0 @@
-/* Implementation of the TRANSPOSE intrinsic
-   Copyright (C) 2003-2016 Free Software Foundation, Inc.
-   Contributed by Tobias Schlüter
-
-This file is part of the GNU Fortran runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-extern void transpose (gfc_array_char *, gfc_array_char *);
-export_proto(transpose);
-
-static void
-transpose_internal (gfc_array_char *ret, gfc_array_char *source)
-{
-  /* r.* indicates the return array.  */
-  index_type rxstride, rystride;
-  char *rptr;
-  /* s.* indicates the source array.  */
-  index_type sxstride, systride;
-  const char *sptr;
-
-  index_type xcount, ycount;
-  index_type x, y;
-  index_type size;
-
-  assert (GFC_DESCRIPTOR_RANK (source) == 2
-          && GFC_DESCRIPTOR_RANK (ret) == 2);
-
-  size = GFC_DESCRIPTOR_SIZE(ret);
-
-  if (ret->base_addr == NULL)
-    {
-      assert (ret->dtype == source->dtype);
-
-      GFC_DIMENSION_SET(ret->dim[0], 0, GFC_DESCRIPTOR_EXTENT(source,1) - 1,
-			1);
-
-      GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
-			GFC_DESCRIPTOR_EXTENT(source, 1));
-
-      ret->base_addr = xmallocarray (size0 ((array_t*)ret), size);
-      ret->offset = 0;
-    }
-  else if (unlikely (compile_options.bounds_check))
-    {
-      index_type ret_extent, src_extent;
-
-      ret_extent = GFC_DESCRIPTOR_EXTENT(ret,0);
-      src_extent = GFC_DESCRIPTOR_EXTENT(source,1);
-
-      if (src_extent != ret_extent)
-	runtime_error ("Incorrect extent in return value of TRANSPOSE"
-		       " intrinsic in dimension 1: is %ld,"
-		       " should be %ld", (long int) src_extent,
-		       (long int) ret_extent);
-
-      ret_extent = GFC_DESCRIPTOR_EXTENT(ret,1);
-      src_extent = GFC_DESCRIPTOR_EXTENT(source,0);
-
-      if (src_extent != ret_extent)
-	runtime_error ("Incorrect extent in return value of TRANSPOSE"
-		       " intrinsic in dimension 2: is %ld,"
-		       " should be %ld", (long int) src_extent,
-		       (long int) ret_extent);
-
-    }
-
-  sxstride = GFC_DESCRIPTOR_STRIDE_BYTES(source,0);
-  systride = GFC_DESCRIPTOR_STRIDE_BYTES(source,1);
-  xcount = GFC_DESCRIPTOR_EXTENT(source,0);
-  ycount = GFC_DESCRIPTOR_EXTENT(source,1);
-
-  rxstride = GFC_DESCRIPTOR_STRIDE_BYTES(ret,0);
-  rystride = GFC_DESCRIPTOR_STRIDE_BYTES(ret,1);
-
-  rptr = ret->base_addr;
-  sptr = source->base_addr;
-
-  for (y = 0; y < ycount; y++)
-    {
-      for (x = 0; x < xcount; x++)
-        {
-          memcpy (rptr, sptr, size);
-
-          sptr += sxstride;
-          rptr += rystride;
-        }
-      sptr += systride - (sxstride * xcount);
-      rptr += rxstride - (rystride * xcount);
-    }
-}
-
-
-extern void transpose (gfc_array_char *, gfc_array_char *);
-export_proto(transpose);
-
-void
-transpose (gfc_array_char *ret, gfc_array_char *source)
-{
-  transpose_internal (ret, source);
-}
-
-
-extern void transpose_char (gfc_array_char *, GFC_INTEGER_4,
-			    gfc_array_char *, GFC_INTEGER_4);
-export_proto(transpose_char);
-
-void
-transpose_char (gfc_array_char *ret,
-		GFC_INTEGER_4 ret_length __attribute__((unused)),
-		gfc_array_char *source,
-		GFC_INTEGER_4 source_length __attribute__((unused)))
-{
-  transpose_internal (ret, source);
-}
-
-
-extern void transpose_char4 (gfc_array_char *, GFC_INTEGER_4,
-			     gfc_array_char *, GFC_INTEGER_4);
-export_proto(transpose_char4);
-
-void
-transpose_char4 (gfc_array_char *ret,
-		 GFC_INTEGER_4 ret_length __attribute__((unused)),
-		 gfc_array_char *source,
-		 GFC_INTEGER_4 source_length __attribute__((unused)))
-{
-  transpose_internal (ret, source);
-}
diff --git a/libgfortran/m4/exponent.m4 b/libgfortran/m4/exponent.m4
deleted file mode 100644
index ebadf2114d02..000000000000
--- a/libgfortran/m4/exponent.m4
+++ /dev/null
@@ -1,45 +0,0 @@
-`/* Implementation of the EXPONENT intrinsic
-   Copyright (C) 2003-2016 Free Software Foundation, Inc.
-   Contributed by Richard Henderson <rth@redhat.com>.
-
-This file is part of the GNU Fortran 95 runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"'
-
-include(`mtype.m4')dnl
-
-mathfunc_macro
-
-`#if defined (HAVE_'real_type`) && 'hasmathfunc(frexp)`
-
-extern GFC_INTEGER_4 exponent_r'kind` ('real_type` s);
-export_proto(exponent_r'kind`);
-
-GFC_INTEGER_4
-exponent_r'kind` ('real_type` s)
-{
-  int ret;
-  MATHFUNC(frexp) (s, &ret);
-  return ret;
-}
-
-#endif'
diff --git a/libgfortran/m4/fraction.m4 b/libgfortran/m4/fraction.m4
deleted file mode 100644
index a228ca040eed..000000000000
--- a/libgfortran/m4/fraction.m4
+++ /dev/null
@@ -1,44 +0,0 @@
-`/* Implementation of the FRACTION intrinsic
-   Copyright (C) 2003-2016 Free Software Foundation, Inc.
-   Contributed by Richard Henderson <rth@redhat.com>.
-
-This file is part of the GNU Fortran 95 runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"'
-
-include(`mtype.m4')dnl
-
-mathfunc_macro
-
-`#if defined (HAVE_'real_type`) && 'hasmathfunc(frexp)`
-
-extern 'real_type` fraction_r'kind` ('real_type` s);
-export_proto(fraction_r'kind`);
-
-'real_type`
-fraction_r'kind` ('real_type` s)
-{
-  int dummy_exp;
-  return MATHFUNC(frexp) (s, &dummy_exp);
-}
-
-#endif'
diff --git a/libgfortran/m4/nearest.m4 b/libgfortran/m4/nearest.m4
deleted file mode 100644
index e4ab9f3d1aea..000000000000
--- a/libgfortran/m4/nearest.m4
+++ /dev/null
@@ -1,51 +0,0 @@
-`/* Implementation of the NEAREST intrinsic
-   Copyright (C) 2003-2016 Free Software Foundation, Inc.
-   Contributed by Richard Henderson <rth@redhat.com>.
-
-This file is part of the GNU Fortran 95 runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"'
-
-include(`mtype.m4')dnl
-
-mathfunc_macro
-
-`#if defined (HAVE_'real_type`) && 'hasmathfunc(copysign) && hasmathfunc(nextafter)`
-
-extern 'real_type` nearest_r'kind` ('real_type` s, 'real_type` dir);
-export_proto(nearest_r'kind`);
-
-'real_type`
-nearest_r'kind` ('real_type` s, 'real_type` dir)
-{
-  dir = MATHFUNC(copysign) (MATHFUNC(__builtin_inf) (), dir);
-  if (FLT_EVAL_METHOD != 0)
-    {
-      /* ??? Work around glibc bug on x86.  */
-      volatile 'real_type` r = MATHFUNC(nextafter) (s, dir);
-      return r;
-    }
-  else
-    return MATHFUNC(nextafter) (s, dir);
-}
-
-#endif'
diff --git a/libgfortran/m4/rrspacing.m4 b/libgfortran/m4/rrspacing.m4
deleted file mode 100644
index 7d1232796043..000000000000
--- a/libgfortran/m4/rrspacing.m4
+++ /dev/null
@@ -1,54 +0,0 @@
-`/* Implementation of the RRSPACING intrinsic
-   Copyright (C) 2006-2016 Free Software Foundation, Inc.
-   Contributed by Steven G. Kargl <kargl@gcc.gnu.org>
-
-This file is part of the GNU Fortran 95 runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"'
-
-include(`mtype.m4')dnl
-
-mathfunc_macro
-
-`#if defined (HAVE_'real_type`) && 'hasmathfunc(fabs) && hasmathfunc(frexp)`
-
-extern 'real_type` rrspacing_r'kind` ('real_type` s, int p);
-export_proto(rrspacing_r'kind`);
-
-'real_type`
-rrspacing_r'kind` ('real_type` s, int p)
-{
-  int e;
-  'real_type` x;
-  x = MATHFUNC(fabs) (s);
-  if (x == 0.)
-    return 0.;
-  MATHFUNC(frexp) (s, &e);
-#if 'hasmathfunc(ldexp)`
-  return MATHFUNC(ldexp) (x, p - e);
-#else
-  return MATHFUNC(scalbn) (x, p - e);
-#endif
-
-}
-
-#endif'
diff --git a/libgfortran/m4/set_exponent.m4 b/libgfortran/m4/set_exponent.m4
deleted file mode 100644
index e21b8b7246a6..000000000000
--- a/libgfortran/m4/set_exponent.m4
+++ /dev/null
@@ -1,44 +0,0 @@
-`/* Implementation of the SET_EXPONENT intrinsic
-   Copyright (C) 2003-2016 Free Software Foundation, Inc.
-   Contributed by Richard Henderson <rth@redhat.com>.
-
-This file is part of the GNU Fortran 95 runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"'
-
-include(`mtype.m4')dnl
-
-mathfunc_macro
-
-`#if defined (HAVE_'real_type`) && 'hasmathfunc(scalbn) && hasmathfunc(frexp)`
-
-extern 'real_type` set_exponent_r'kind` ('real_type` s, GFC_INTEGER_4 i);
-export_proto(set_exponent_r'kind`);
-
-'real_type`
-set_exponent_r'kind` ('real_type` s, GFC_INTEGER_4 i)
-{
-  int dummy_exp;
-  return MATHFUNC(scalbn) (MATHFUNC(frexp) (s, &dummy_exp), i);
-}
-
-#endif'
diff --git a/libgfortran/m4/spacing.m4 b/libgfortran/m4/spacing.m4
deleted file mode 100644
index 6c2aa6f2d7d8..000000000000
--- a/libgfortran/m4/spacing.m4
+++ /dev/null
@@ -1,53 +0,0 @@
-`/* Implementation of the SPACING intrinsic
-   Copyright (C) 2006-2016 Free Software Foundation, Inc.
-   Contributed by Steven G. Kargl <kargl@gcc.gnu.org>
-
-This file is part of the GNU Fortran 95 runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"'
-
-include(`mtype.m4')dnl
-
-mathfunc_macro
-
-`#if defined (HAVE_'real_type`) && 'hasmathfunc(frexp)`
-
-extern 'real_type` spacing_r'kind` ('real_type` s, int p, int emin, 'real_type` tiny);
-export_proto(spacing_r'kind`);
-
-'real_type`
-spacing_r'kind` ('real_type` s, int p, int emin, 'real_type` tiny)
-{
-  int e;
-  if (s == 0.)
-    return tiny;
-  MATHFUNC(frexp) (s, &e);
-  e = e - p;
-  e = e > emin ? e : emin;
-#if 'hasmathfunc(ldexp)`
-  return MATHFUNC(ldexp) (1., e);
-#else
-  return MATHFUNC(scalbn) (1., e);
-#endif
-}
-
-#endif'
diff --git a/libgfortran/m4/transpose.m4 b/libgfortran/m4/transpose.m4
deleted file mode 100644
index 04a7ca482c12..000000000000
--- a/libgfortran/m4/transpose.m4
+++ /dev/null
@@ -1,116 +0,0 @@
-`/* Implementation of the TRANSPOSE intrinsic
-   Copyright (C) 2003-2016 Free Software Foundation, Inc.
-   Contributed by Tobias Schlüter
-
-This file is part of the GNU Fortran runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-<http://www.gnu.org/licenses/>.  */
-
-#include "libgfortran.h"
-#include <assert.h>'
-
-include(iparm.m4)dnl
-
-`#if defined (HAVE_'rtype_name`)
-
-extern void transpose_'rtype_code` ('rtype` * const restrict ret, 
-	'rtype` * const restrict source);
-export_proto(transpose_'rtype_code`);
-
-void
-transpose_'rtype_code` ('rtype` * const restrict ret, 
-	'rtype` * const restrict source)
-{
-  /* r.* indicates the return array.  */
-  index_type rxstride, rystride;
-  'rtype_name` * restrict rptr;
-  /* s.* indicates the source array.  */
-  index_type sxstride, systride;
-  const 'rtype_name` *sptr;
-
-  index_type xcount, ycount;
-  index_type x, y;
-
-  assert (GFC_DESCRIPTOR_RANK (source) == 2);
-
-  if (ret->base_addr == NULL)
-    {
-      assert (GFC_DESCRIPTOR_RANK (ret) == 2);
-      assert (ret->dtype == source->dtype);
-
-      GFC_DIMENSION_SET(ret->dim[0], 0, GFC_DESCRIPTOR_EXTENT(source,1) - 1,
-			1);
-
-      GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
-			GFC_DESCRIPTOR_EXTENT(source, 1));
-
-      ret->base_addr = xmallocarray (size0 ((array_t *) ret), 
-                                     sizeof ('rtype_name`));
-      ret->offset = 0;
-    } else if (unlikely (compile_options.bounds_check))
-    {
-      index_type ret_extent, src_extent;
-
-      ret_extent = GFC_DESCRIPTOR_EXTENT(ret,0);
-      src_extent = GFC_DESCRIPTOR_EXTENT(source,1);
-
-      if (src_extent != ret_extent)
-	runtime_error ("Incorrect extent in return value of TRANSPOSE"
-		       " intrinsic in dimension 1: is %ld,"
-		       " should be %ld", (long int) src_extent,
-		       (long int) ret_extent);
-
-      ret_extent = GFC_DESCRIPTOR_EXTENT(ret,1);
-      src_extent = GFC_DESCRIPTOR_EXTENT(source,0);
-
-      if (src_extent != ret_extent)
-	runtime_error ("Incorrect extent in return value of TRANSPOSE"
-		       " intrinsic in dimension 2: is %ld,"
-		       " should be %ld", (long int) src_extent,
-		       (long int) ret_extent);
-
-    }
-
-  sxstride = GFC_DESCRIPTOR_STRIDE(source,0);
-  systride = GFC_DESCRIPTOR_STRIDE(source,1);
-  xcount = GFC_DESCRIPTOR_EXTENT(source,0);
-  ycount = GFC_DESCRIPTOR_EXTENT(source,1);
-
-  rxstride = GFC_DESCRIPTOR_STRIDE(ret,0);
-  rystride = GFC_DESCRIPTOR_STRIDE(ret,1);
-
-  rptr = ret->base_addr;
-  sptr = source->base_addr;
-
-  for (y=0; y < ycount; y++)
-    {
-      for (x=0; x < xcount; x++)
-        {
-          *rptr = *sptr;
-
-          sptr += sxstride;
-          rptr += rystride;
-        }
-        sptr += systride - (sxstride * xcount);
-        rptr += rxstride - (rystride * xcount);
-    }
-}
-
-#endif'
-- 
GitLab