2 Free Software Foundation, Inc.
4 This file is part of the GNU Fortran runtime library (libgfortran).
6 Libgfortran is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3, or (at your option)
11 Libgfortran is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 Under Section 7 of GPL version 3, you are granted additional
17 permissions described in the GCC Runtime Library Exception, version
18 3.1, as published by the Free Software Foundation.
20 You should have received a copy of the GNU General Public License and
21 a copy of the GCC Runtime Library Exception along with this program;
22 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
23 <http://www.gnu.org/licenses/>. */
25 /* Note: This file needs to be a separate translation unit (.o file)
26 to make sure that for static linkage, the libquad dependence only
32 #if defined(GFC_REAL_16_IS_FLOAT128)
34 /* The prototypes for the called procedures in transfer.c. */
36 extern void transfer_real (st_parameter_dt *, void *, int);
37 export_proto(transfer_real);
39 extern void transfer_real_write (st_parameter_dt *, void *, int);
40 export_proto(transfer_real_write);
42 extern void transfer_complex (st_parameter_dt *, void *, int);
43 export_proto(transfer_complex);
45 extern void transfer_complex_write (st_parameter_dt *, void *, int);
46 export_proto(transfer_complex_write);
49 /* The prototypes for the procedures in this file. */
51 extern void transfer_real128 (st_parameter_dt *, void *, int);
52 export_proto(transfer_real128);
54 extern void transfer_real128_write (st_parameter_dt *, void *, int);
55 export_proto(transfer_real128_write);
57 extern void transfer_complex128 (st_parameter_dt *, void *, int);
58 export_proto(transfer_complex128);
60 extern void transfer_complex128_write (st_parameter_dt *, void *, int);
61 export_proto(transfer_complex128_write);
64 /* Make sure that libquadmath is pulled in. The functions quadmath_strtopQ
65 and quadmath_dtoaq are weakly referrenced in convert_real and write_float;
66 the pointer assignment with USED attribute make sure that there is a
67 non-weakref dependence if the quadmath functions are used. That avoids
68 segfault when libquad is statically linked. */
71 transfer_real128 (st_parameter_dt *dtp, void *p, int kind)
73 static void __attribute__((used)) *tmp1 = quadmath_strtopQ;
74 static void __attribute__((used)) *tmp2 = quadmath_dtoaq;
76 transfer_real (dtp, p, kind);
81 transfer_real128_write (st_parameter_dt *dtp, void *p, int kind)
83 static void __attribute__((used)) *tmp1 = quadmath_strtopQ;
84 static void __attribute__((used)) *tmp2 = quadmath_dtoaq;
86 transfer_real (dtp, p, kind);
91 transfer_complex128 (st_parameter_dt *dtp, void *p, int kind)
93 static void __attribute__((used)) *tmp1 = quadmath_strtopQ;
94 static void __attribute__((used)) *tmp2 = quadmath_dtoaq;
96 transfer_complex (dtp, p, kind);
101 transfer_complex128_write (st_parameter_dt *dtp, void *p, int kind)
103 /* static void __attribute__((used)) *tmp1 = quadmath_strtopQ;
104 static void __attribute__((used)) *tmp2 = quadmath_dtoaq;*/
106 transfer_complex_write (dtp, p, kind);