]>
Commit | Line | Data |
---|---|---|
f1717362 | 1 | /* Copyright (C) 2010-2016 Free Software Foundation, Inc. |
87969c8c | 2 | |
3 | This file is part of the GNU Fortran runtime library (libgfortran). | |
4 | ||
5 | Libgfortran is free software; you can redistribute it and/or modify | |
6 | it under the terms of the GNU General Public License as published by | |
7 | the Free Software Foundation; either version 3, or (at your option) | |
8 | any later version. | |
9 | ||
10 | Libgfortran is distributed in the hope that it will be useful, | |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | GNU General Public License for more details. | |
14 | ||
15 | Under Section 7 of GPL version 3, you are granted additional | |
16 | permissions described in the GCC Runtime Library Exception, version | |
17 | 3.1, as published by the Free Software Foundation. | |
18 | ||
19 | You should have received a copy of the GNU General Public License and | |
20 | a copy of the GCC Runtime Library Exception along with this program; | |
21 | see the files COPYING3 and COPYING.RUNTIME respectively. If not, see | |
22 | <http://www.gnu.org/licenses/>. */ | |
23 | ||
24 | /* Note: This file needs to be a separate translation unit (.o file) | |
25 | to make sure that for static linkage, the libquad dependence only | |
26 | occurs if needed. */ | |
27 | ||
28 | #include "io.h" | |
29 | ||
30 | ||
31 | #if defined(GFC_REAL_16_IS_FLOAT128) | |
32 | ||
33 | /* The prototypes for the called procedures in transfer.c. */ | |
34 | ||
35 | extern void transfer_real (st_parameter_dt *, void *, int); | |
36 | export_proto(transfer_real); | |
37 | ||
38 | extern void transfer_real_write (st_parameter_dt *, void *, int); | |
39 | export_proto(transfer_real_write); | |
40 | ||
41 | extern void transfer_complex (st_parameter_dt *, void *, int); | |
42 | export_proto(transfer_complex); | |
43 | ||
44 | extern void transfer_complex_write (st_parameter_dt *, void *, int); | |
45 | export_proto(transfer_complex_write); | |
46 | ||
47 | ||
48 | /* The prototypes for the procedures in this file. */ | |
49 | ||
50 | extern void transfer_real128 (st_parameter_dt *, void *, int); | |
51 | export_proto(transfer_real128); | |
52 | ||
53 | extern void transfer_real128_write (st_parameter_dt *, void *, int); | |
54 | export_proto(transfer_real128_write); | |
55 | ||
56 | extern void transfer_complex128 (st_parameter_dt *, void *, int); | |
57 | export_proto(transfer_complex128); | |
58 | ||
59 | extern void transfer_complex128_write (st_parameter_dt *, void *, int); | |
60 | export_proto(transfer_complex128_write); | |
61 | ||
62 | ||
ff44adf2 | 63 | /* Make sure that libquadmath is pulled in. The functions strtoflt128 |
0c0fb0a6 | 64 | and quadmath_snprintf are weakly referrenced in convert_real and |
ff44adf2 | 65 | write_float; the pointer assignment with USED attribute make sure |
66 | that there is a non-weakref dependence if the quadmath functions | |
67 | are used. That avoids segfault when libquadmath is statically linked. */ | |
68 | static void __attribute__((used)) *tmp1 = strtoflt128; | |
0c0fb0a6 | 69 | static void __attribute__((used)) *tmp2 = quadmath_snprintf; |
87969c8c | 70 | |
71 | void | |
72 | transfer_real128 (st_parameter_dt *dtp, void *p, int kind) | |
73 | { | |
87969c8c | 74 | transfer_real (dtp, p, kind); |
75 | } | |
76 | ||
77 | ||
78 | void | |
79 | transfer_real128_write (st_parameter_dt *dtp, void *p, int kind) | |
80 | { | |
87969c8c | 81 | transfer_real (dtp, p, kind); |
82 | } | |
83 | ||
84 | ||
85 | void | |
86 | transfer_complex128 (st_parameter_dt *dtp, void *p, int kind) | |
87 | { | |
87969c8c | 88 | transfer_complex (dtp, p, kind); |
89 | } | |
90 | ||
91 | ||
92 | void | |
93 | transfer_complex128_write (st_parameter_dt *dtp, void *p, int kind) | |
94 | { | |
87969c8c | 95 | transfer_complex_write (dtp, p, kind); |
96 | } | |
97 | #endif |