]> git.ipfire.org Git - thirdparty/gcc.git/blame - libgfortran/io/transfer128.c
Update copyright years.
[thirdparty/gcc.git] / libgfortran / io / transfer128.c
CommitLineData
83ffe9cd 1/* Copyright (C) 2010-2023 Free Software Foundation, Inc.
1ec601bf
FXC
2
3This file is part of the GNU Fortran runtime library (libgfortran).
4
5Libgfortran is free software; you can redistribute it and/or modify
6it under the terms of the GNU General Public License as published by
7the Free Software Foundation; either version 3, or (at your option)
8any later version.
9
10Libgfortran is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15Under Section 7 of GPL version 3, you are granted additional
16permissions described in the GCC Runtime Library Exception, version
173.1, as published by the Free Software Foundation.
18
19You should have received a copy of the GNU General Public License and
20a copy of the GCC Runtime Library Exception along with this program;
21see 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
07c60b8e 31#if defined(GFC_REAL_16_IS_FLOAT128) || defined(HAVE_GFC_REAL_17)
1ec601bf
FXC
32
33/* The prototypes for the called procedures in transfer.c. */
34
35extern void transfer_real (st_parameter_dt *, void *, int);
36export_proto(transfer_real);
37
38extern void transfer_real_write (st_parameter_dt *, void *, int);
39export_proto(transfer_real_write);
40
41extern void transfer_complex (st_parameter_dt *, void *, int);
42export_proto(transfer_complex);
43
44extern void transfer_complex_write (st_parameter_dt *, void *, int);
45export_proto(transfer_complex_write);
46
47
48/* The prototypes for the procedures in this file. */
49
50extern void transfer_real128 (st_parameter_dt *, void *, int);
51export_proto(transfer_real128);
52
53extern void transfer_real128_write (st_parameter_dt *, void *, int);
54export_proto(transfer_real128_write);
55
56extern void transfer_complex128 (st_parameter_dt *, void *, int);
57export_proto(transfer_complex128);
58
59extern void transfer_complex128_write (st_parameter_dt *, void *, int);
60export_proto(transfer_complex128_write);
61
62
e313241f 63/* Make sure that libquadmath is pulled in. The functions strtoflt128
1d92226b 64 and quadmath_snprintf are weakly referrenced in convert_real and
e313241f
JJ
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. */
133d0d42
JJ
68# if (defined(HAVE_GFC_REAL_17) && !defined(POWER_IEEE128) \
69 && !defined(GFC_REAL_17_USE_IEC_60559)) \
70 || (!defined(HAVE_GFC_REAL_17) && !defined(GFC_REAL_16_USE_IEC_60559))
e313241f 71static void __attribute__((used)) *tmp1 = strtoflt128;
1d92226b 72static void __attribute__((used)) *tmp2 = quadmath_snprintf;
07c60b8e 73# endif
1ec601bf
FXC
74
75void
76transfer_real128 (st_parameter_dt *dtp, void *p, int kind)
77{
1ec601bf
FXC
78 transfer_real (dtp, p, kind);
79}
80
81
82void
83transfer_real128_write (st_parameter_dt *dtp, void *p, int kind)
84{
1ec601bf
FXC
85 transfer_real (dtp, p, kind);
86}
87
88
89void
90transfer_complex128 (st_parameter_dt *dtp, void *p, int kind)
91{
1ec601bf
FXC
92 transfer_complex (dtp, p, kind);
93}
94
95
96void
97transfer_complex128_write (st_parameter_dt *dtp, void *p, int kind)
98{
1ec601bf
FXC
99 transfer_complex_write (dtp, p, kind);
100}
101#endif