Now that the libgfortran ABI major version has been bumped, we can remove functions for which the frontend nowadays generates inline code.
This removes the malloc, free, exponent, fraction, nearest, rrspacing, spacing, set_exponent and transpose intrinsics. Also the unused store_exe_path function is removed. Regtested on x86_64-pc-linux-gnu, Ok for trunk? libgfortran/ChangeLog: 2016-12-16 Janne Blomqvist <j...@gcc.gnu.org> * Makefile.am: Remove exponent, fraction, nearest, rrspacing, set_exponent, spacing, transpose, malloc, transpose_generic. * Makefile.in: Regenerated. * generated/exponent_r10.c: Remove. * generated/exponent_r16.c: Remove. * generated/exponent_r4.c: Remove. * generated/exponent_r8.c: Remove. * generated/fraction_r10.c: Remove. * generated/fraction_r16.c: Remove. * generated/fraction_r4.c: Remove. * generated/fraction_r8.c: Remove. * generated/nearest_r10.c: Remove. * generated/nearest_r16.c: Remove. * generated/nearest_r4.c: Remove. * generated/nearest_r8.c: Remove. * generated/rrspacing_r10.c: Remove. * generated/rrspacing_r16.c: Remove. * generated/rrspacing_r4.c: Remove. * generated/rrspacing_r8.c: Remove. * generated/set_exponent_r10.c: Remove. * generated/set_exponent_r16.c: Remove. * generated/set_exponent_r4.c: Remove. * generated/set_exponent_r8.c: Remove. * generated/spacing_r10.c: Remove. * generated/spacing_r16.c: Remove. * generated/spacing_r4.c: Remove. * generated/spacing_r8.c: Remove. * generated/transpose_c10.c: Remove. * generated/transpose_c16.c: Remove. * generated/transpose_c4.c: Remove. * generated/transpose_c8.c: Remove. * generated/transpose_i16.c: Remove. * generated/transpose_i4.c: Remove. * generated/transpose_i8.c: Remove. * generated/transpose_r10.c: Remove. * generated/transpose_r16.c: Remove. * generated/transpose_r4.c: Remove. * generated/transpose_r8.c: Remove. * gfortran.map: Remove exponent, fraction, nearest, rrspacing, set_exponent, spacing, transpose, malloc, free, transpose_generic, store_exe_path. * intrinsics/malloc.c: Remove. * intrinsics/transpose_generic.c: Remove. * libgfortran.h (store_exe_path): Remove. * m4/exponent.m4: Remove. * m4/fraction.m4: Remove. * m4/nearest.m4: Remove. * m4/rrspacing.m4: Remove. * m4/set_exponent.m4: Remove. * m4/spacing.m4: Remove. * m4/transpose.m4: Remove. * runtime/main.c (store_exe_path): Remove. --- libgfortran/Makefile.am | 83 +--------------- 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/gfortran.map | 41 -------- libgfortran/intrinsics/malloc.c | 51 ---------- libgfortran/intrinsics/transpose_generic.c | 151 ----------------------------- libgfortran/libgfortran.h | 3 - 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 ---------------------- libgfortran/runtime/main.c | 9 -- 48 files changed, 5 insertions(+), 3193 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/Makefile.am b/libgfortran/Makefile.am index 4745069..964d698 100644 --- a/libgfortran/Makefile.am +++ b/libgfortran/Makefile.am @@ -125,7 +125,6 @@ intrinsics/ierrno.c \ intrinsics/ishftc.c \ intrinsics/iso_c_generated_procs.c \ intrinsics/iso_c_binding.c \ -intrinsics/malloc.c \ intrinsics/mvbits.c \ intrinsics/move_alloc.c \ intrinsics/pack_generic.c \ @@ -139,7 +138,6 @@ intrinsics/reshape_generic.c \ intrinsics/reshape_packed.c \ intrinsics/selected_int_kind.f90 \ intrinsics/selected_real_kind.f90 \ -intrinsics/transpose_generic.c \ intrinsics/unpack_generic.c \ runtime/in_pack_generic.c \ runtime/in_unpack_generic.c @@ -470,19 +468,6 @@ $(srcdir)/generated/matmul_l4.c \ $(srcdir)/generated/matmul_l8.c \ $(srcdir)/generated/matmul_l16.c -i_transpose_c= \ -$(srcdir)/generated/transpose_i4.c \ -$(srcdir)/generated/transpose_i8.c \ -$(srcdir)/generated/transpose_i16.c \ -$(srcdir)/generated/transpose_r4.c \ -$(srcdir)/generated/transpose_r8.c \ -$(srcdir)/generated/transpose_r10.c \ -$(srcdir)/generated/transpose_r16.c \ -$(srcdir)/generated/transpose_c4.c \ -$(srcdir)/generated/transpose_c8.c \ -$(srcdir)/generated/transpose_c10.c \ -$(srcdir)/generated/transpose_c16.c - i_shape_c= \ $(srcdir)/generated/shape_i1.c \ $(srcdir)/generated/shape_i2.c \ @@ -564,42 +549,6 @@ $(srcdir)/generated/in_unpack_c8.c \ $(srcdir)/generated/in_unpack_c10.c \ $(srcdir)/generated/in_unpack_c16.c -i_exponent_c = \ -$(srcdir)/generated/exponent_r4.c \ -$(srcdir)/generated/exponent_r8.c \ -$(srcdir)/generated/exponent_r10.c \ -$(srcdir)/generated/exponent_r16.c - -i_spacing_c = \ -$(srcdir)/generated/spacing_r4.c \ -$(srcdir)/generated/spacing_r8.c \ -$(srcdir)/generated/spacing_r10.c \ -$(srcdir)/generated/spacing_r16.c - -i_rrspacing_c = \ -$(srcdir)/generated/rrspacing_r4.c \ -$(srcdir)/generated/rrspacing_r8.c \ -$(srcdir)/generated/rrspacing_r10.c \ -$(srcdir)/generated/rrspacing_r16.c - -i_fraction_c = \ -$(srcdir)/generated/fraction_r4.c \ -$(srcdir)/generated/fraction_r8.c \ -$(srcdir)/generated/fraction_r10.c \ -$(srcdir)/generated/fraction_r16.c - -i_nearest_c = \ -$(srcdir)/generated/nearest_r4.c \ -$(srcdir)/generated/nearest_r8.c \ -$(srcdir)/generated/nearest_r10.c \ -$(srcdir)/generated/nearest_r16.c - -i_set_exponent_c = \ -$(srcdir)/generated/set_exponent_r4.c \ -$(srcdir)/generated/set_exponent_r8.c \ -$(srcdir)/generated/set_exponent_r10.c \ -$(srcdir)/generated/set_exponent_r16.c - i_pow_c = \ $(srcdir)/generated/pow_i4_i4.c \ $(srcdir)/generated/pow_i8_i4.c \ @@ -683,9 +632,9 @@ m4_files= m4/iparm.m4 m4/ifunction.m4 m4/iforeach.m4 m4/all.m4 \ m4/matmul.m4 m4/matmull.m4 m4/ifunction_logical.m4 \ m4/ctrig.m4 m4/cexp.m4 m4/chyp.m4 m4/mtype.m4 \ m4/specific.m4 m4/specific2.m4 m4/head.m4 m4/shape.m4 m4/reshape.m4 \ - m4/transpose.m4 m4/eoshift1.m4 m4/eoshift3.m4 m4/exponent.m4 \ - m4/fraction.m4 m4/nearest.m4 m4/set_exponent.m4 m4/pow.m4 \ - m4/misc_specifics.m4 m4/rrspacing.m4 m4/spacing.m4 m4/pack.m4 \ + m4/eoshift1.m4 m4/eoshift3.m4 \ + m4/pow.m4 \ + m4/misc_specifics.m4 m4/pack.m4 \ m4/unpack.m4 m4/spread.m4 m4/bessel.m4 m4/norm2.m4 m4/parity.m4 \ m4/iall.m4 m4/iany.m4 m4/iparity.m4 @@ -693,10 +642,9 @@ gfor_built_src= $(i_all_c) $(i_any_c) $(i_count_c) $(i_maxloc0_c) \ $(i_maxloc1_c) $(i_maxval_c) $(i_minloc0_c) $(i_minloc1_c) $(i_minval_c) \ $(i_product_c) $(i_sum_c) $(i_bessel_c) $(i_iall_c) $(i_iany_c) \ $(i_iparity_c) $(i_norm2_c) $(i_parity_c) \ - $(i_matmul_c) $(i_matmull_c) $(i_transpose_c) $(i_shape_c) $(i_eoshift1_c) \ + $(i_matmul_c) $(i_matmull_c) $(i_shape_c) $(i_eoshift1_c) \ $(i_eoshift3_c) $(i_cshift1_c) $(i_reshape_c) $(in_pack_c) $(in_unpack_c) \ - $(i_exponent_c) $(i_fraction_c) $(i_nearest_c) $(i_set_exponent_c) \ - $(i_pow_c) $(i_rrspacing_c) $(i_spacing_c) $(i_pack_c) $(i_unpack_c) \ + $(i_pow_c) $(i_pack_c) $(i_unpack_c) \ $(i_spread_c) selected_int_kind.inc selected_real_kind.inc kinds.h \ $(i_cshift0_c) kinds.inc c99_protos.inc fpu-target.h fpu-target.inc @@ -1000,9 +948,6 @@ $(i_norm2_c): m4/norm2.m4 $(I_M4_DEPS1) $(i_parity_c): m4/parity.m4 $(I_M4_DEPS1) $(M4) -Dfile=$@ -I$(srcdir)/m4 parity.m4 > $@ -$(i_transpose_c): m4/transpose.m4 $(I_M4_DEPS) - $(M4) -Dfile=$@ -I$(srcdir)/m4 transpose.m4 > $@ - $(i_shape_c): m4/shape.m4 $(I_M4_DEPS) $(M4) -Dfile=$@ -I$(srcdir)/m4 shape.m4 > $@ @@ -1027,24 +972,6 @@ $(in_pack_c): m4/in_pack.m4 $(I_M4_DEPS) $(in_unpack_c): m4/in_unpack.m4 $(I_M4_DEPS) $(M4) -Dfile=$@ -I$(srcdir)/m4 in_unpack.m4 > $@ -$(i_exponent_c): m4/exponent.m4 m4/mtype.m4 - $(M4) -Dfile=$@ -I$(srcdir)/m4 exponent.m4 > $@ - -$(i_rrspacing_c): m4/rrspacing.m4 m4/mtype.m4 - $(M4) -Dfile=$@ -I$(srcdir)/m4 rrspacing.m4 > $@ - -$(i_spacing_c): m4/spacing.m4 m4/mtype.m4 - $(M4) -Dfile=$@ -I$(srcdir)/m4 spacing.m4 > $@ - -$(i_fraction_c): m4/fraction.m4 m4/mtype.m4 - $(M4) -Dfile=$@ -I$(srcdir)/m4 fraction.m4 > $@ - -$(i_nearest_c): m4/nearest.m4 m4/mtype.m4 - $(M4) -Dfile=$@ -I$(srcdir)/m4 nearest.m4 > $@ - -$(i_set_exponent_c): m4/set_exponent.m4 m4/mtype.m4 - $(M4) -Dfile=$@ -I$(srcdir)/m4 set_exponent.m4 > $@ - $(i_pow_c): m4/pow.m4 $(I_M4_DEPS) $(M4) -Dfile=$@ -I$(srcdir)/m4 pow.m4 > $@ diff --git a/libgfortran/generated/exponent_r10.c b/libgfortran/generated/exponent_r10.c deleted file mode 100644 index b11f12f..0000000 --- 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 <r...@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 163b6fd..0000000 --- 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 <r...@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 15d7cba..0000000 --- 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 <r...@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 6972cc6..0000000 --- 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 <r...@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 0d96c31..0000000 --- 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 <r...@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 6ec0f80..0000000 --- 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 <r...@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 817da4e..0000000 --- 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 <r...@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 4081d26..0000000 --- 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 <r...@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 aa5ff8b..0000000 --- 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 <r...@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 e690151..0000000 --- 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 <r...@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 3ca83ec..0000000 --- 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 <r...@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 861da2e..0000000 --- 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 <r...@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 d0c6852..0000000 --- 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 <ka...@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 ed0c005..0000000 --- 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 <ka...@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 23c5b86..0000000 --- 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 <ka...@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 0a8cfef..0000000 --- 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 <ka...@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 de8f59d..0000000 --- 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 <r...@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 1f7c8c7..0000000 --- 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 <r...@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 2c1708b..0000000 --- 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 <r...@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 5b64909..0000000 --- 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 <r...@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 75a7b26..0000000 --- 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 <ka...@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 acff212..0000000 --- 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 <ka...@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 383713f..0000000 --- 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 <ka...@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 2641910..0000000 --- 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 <ka...@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 67f82f8..0000000 --- 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 927fa27..0000000 --- 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 d8811d0..0000000 --- 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 40a73e6..0000000 --- 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 6812003c..0000000 --- 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 dbc5d43..0000000 --- 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 631eef3..0000000 --- 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 8c27613..0000000 --- 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 2e4fd24..0000000 --- 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 d24fa9b..0000000 --- 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 7834aa2..0000000 --- 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/gfortran.map b/libgfortran/gfortran.map index ba01f25..3d540ea 100644 --- a/libgfortran/gfortran.map +++ b/libgfortran/gfortran.map @@ -92,10 +92,6 @@ GFORTRAN_1.0 { _gfortran_etime_sub; _gfortran_exit_i4; _gfortran_exit_i8; - _gfortran_exponent_r10; - _gfortran_exponent_r16; - _gfortran_exponent_r4; - _gfortran_exponent_r8; _gfortran_fdate; _gfortran_fdate_sub; _gfortran_fget; @@ -122,11 +118,6 @@ GFORTRAN_1.0 { _gfortran_fput_i2_sub; _gfortran_fput_i4_sub; _gfortran_fput_i8_sub; - _gfortran_fraction_r10; - _gfortran_fraction_r16; - _gfortran_fraction_r4; - _gfortran_fraction_r8; - _gfortran_free; _gfortran_fseek_sub; _gfortran_fstat_i4; _gfortran_fstat_i4_sub; @@ -189,7 +180,6 @@ GFORTRAN_1.0 { _gfortran_lstat_i8_sub; _gfortran_ltime_i4; _gfortran_ltime_i8; - _gfortran_malloc; _gfortran_matmul_c10; _gfortran_matmul_c16; _gfortran_matmul_c4; @@ -492,10 +482,6 @@ GFORTRAN_1.0 { _gfortran_mvbits_i2; _gfortran_mvbits_i4; _gfortran_mvbits_i8; - _gfortran_nearest_r10; - _gfortran_nearest_r16; - _gfortran_nearest_r4; - _gfortran_nearest_r8; _gfortran_os_error; _gfortran_pack; _gfortran_pack_char; @@ -571,10 +557,6 @@ GFORTRAN_1.0 { _gfortran_reshape_r16; _gfortran_reshape_r4; _gfortran_reshape_r8; - _gfortran_rrspacing_r10; - _gfortran_rrspacing_r16; - _gfortran_rrspacing_r4; - _gfortran_rrspacing_r8; _gfortran_runtime_error; _gfortran_runtime_error_at; _gfortran_secnds; @@ -585,10 +567,6 @@ GFORTRAN_1.0 { _gfortran_select_string; _gfortran_set_args; _gfortran_set_convert; - _gfortran_set_exponent_r10; - _gfortran_set_exponent_r16; - _gfortran_set_exponent_r4; - _gfortran_set_exponent_r8; _gfortran_set_fpe; _gfortran_set_max_subrecord_length; _gfortran_set_record_marker; @@ -730,10 +708,6 @@ GFORTRAN_1.0 { _gfortran_sminval_r16; _gfortran_sminval_r4; _gfortran_sminval_r8; - _gfortran_spacing_r10; - _gfortran_spacing_r16; - _gfortran_spacing_r4; - _gfortran_spacing_r8; _gfortran_specific__abs_c10; _gfortran_specific__abs_c16; _gfortran_specific__abs_c4; @@ -937,7 +911,6 @@ GFORTRAN_1.0 { _gfortran_st_open; _gfortran_stop_numeric; _gfortran_stop_string; - _gfortran_store_exe_path; _gfortran_st_read; _gfortran_st_read_done; _gfortran_st_rewind; @@ -980,19 +953,6 @@ GFORTRAN_1.0 { _gfortran_transfer_integer; _gfortran_transfer_logical; _gfortran_transfer_real; - _gfortran_transpose; - _gfortran_transpose_c10; - _gfortran_transpose_c16; - _gfortran_transpose_c4; - _gfortran_transpose_c8; - _gfortran_transpose_char; - _gfortran_transpose_i16; - _gfortran_transpose_i4; - _gfortran_transpose_i8; - _gfortran_transpose_r10; - _gfortran_transpose_r16; - _gfortran_transpose_r4; - _gfortran_transpose_r8; _gfortran_ttynam; _gfortran_ttynam_sub; _gfortran_umask_i4; @@ -1088,7 +1048,6 @@ GFORTRAN_1.1 { _gfortran_string_verify_char4; _gfortran_st_wait; _gfortran_transfer_character_wide; - _gfortran_transpose_char4; _gfortran_unpack0_char4; _gfortran_unpack1_char4; } GFORTRAN_1.0; diff --git a/libgfortran/intrinsics/malloc.c b/libgfortran/intrinsics/malloc.c deleted file mode 100644 index 2d22c8d..0000000 --- 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 <coud...@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 5c623cc..0000000 --- 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/libgfortran.h b/libgfortran/libgfortran.h index b9f2471..098e4dc 100644 --- a/libgfortran/libgfortran.h +++ b/libgfortran/libgfortran.h @@ -650,9 +650,6 @@ iexport_proto(set_args); extern void get_args (int *, char ***); internal_proto(get_args); -extern void store_exe_path (const char *); -export_proto(store_exe_path); - /* backtrace.c */ extern void show_backtrace (bool); diff --git a/libgfortran/m4/exponent.m4 b/libgfortran/m4/exponent.m4 deleted file mode 100644 index ebadf21..0000000 --- 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 <r...@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 a228ca0..0000000 --- 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 <r...@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 e4ab9f3..0000000 --- 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 <r...@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 7d12327..0000000 --- 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 <ka...@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 e21b8b7..0000000 --- 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 <r...@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 6c2aa6f..0000000 --- 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 <ka...@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 04a7ca4..0000000 --- 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' diff --git a/libgfortran/runtime/main.c b/libgfortran/runtime/main.c index 09b89bc..c27a701 100644 --- a/libgfortran/runtime/main.c +++ b/libgfortran/runtime/main.c @@ -71,15 +71,6 @@ static int argc_save; static char **argv_save; -void -store_exe_path (const char * argv0 __attribute__ ((unused))) -{ - /* This function is now useless, but is retained due to ABI compatibility. - Remove when bumping the library ABI. */ - ; -} - - /* Set the saved values of the command line arguments. */ void -- 2.7.4