libgfortran.h 63 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023
  1. /* Common declarations for all of libgfortran.
  2. Copyright (C) 2002-2022 Free Software Foundation, Inc.
  3. Contributed by Paul Brook <paul@nowt.org>, and
  4. Andy Vaught <andy@xena.eas.asu.edu>
  5. 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)
  9. any later version.
  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. Under Section 7 of GPL version 3, you are granted additional
  15. permissions described in the GCC Runtime Library Exception, version
  16. 3.1, as published by the Free Software Foundation.
  17. You should have received a copy of the GNU General Public License and
  18. a copy of the GCC Runtime Library Exception along with this program;
  19. see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  20. <http://www.gnu.org/licenses/>. */
  21. #ifndef LIBGFOR_H
  22. #define LIBGFOR_H
  23. /* Ensure that ANSI conform stdio is used. This needs to be set before
  24. any system header file is included. */
  25. #if defined __MINGW32__
  26. # define _POSIX 1
  27. # define gfc_printf gnu_printf
  28. #else
  29. # define gfc_printf __printf__
  30. #endif
  31. /* config.h MUST be first because it can affect system headers. */
  32. #include "config.h"
  33. #include <ctype.h>
  34. #include <stdio.h>
  35. #include <stdlib.h>
  36. #include <stddef.h>
  37. #include <float.h>
  38. #include <stdarg.h>
  39. #include <stdbool.h>
  40. #if HAVE_COMPLEX_H
  41. /* Must appear before math.h on VMS systems. */
  42. # include <complex.h>
  43. #else
  44. #define complex __complex__
  45. #endif
  46. #include <math.h>
  47. /* If we're support quad-precision floating-point type, include the
  48. header to our support library. */
  49. #ifdef HAVE_FLOAT128
  50. # include "quadmath_weak.h"
  51. #endif
  52. #ifdef __MINGW32__
  53. extern float __strtof (const char *, char **);
  54. #define gfc_strtof __strtof
  55. extern double __strtod (const char *, char **);
  56. #define gfc_strtod __strtod
  57. extern long double __strtold (const char *, char **);
  58. #define gfc_strtold __strtold
  59. #else
  60. #define gfc_strtof strtof
  61. #define gfc_strtod strtod
  62. #define gfc_strtold strtold
  63. #endif
  64. #include "../gcc/fortran/libgfortran.h"
  65. #include "c99_protos.h"
  66. #if HAVE_IEEEFP_H
  67. #include <ieeefp.h>
  68. #endif
  69. #include "gstdint.h"
  70. #if HAVE_SYS_TYPES_H
  71. #include <sys/types.h>
  72. #endif
  73. #ifdef HAVE_SYS_UIO_H
  74. #include <sys/uio.h>
  75. #endif
  76. #ifdef __MINGW32__
  77. typedef off64_t gfc_offset;
  78. #else
  79. typedef off_t gfc_offset;
  80. #endif
  81. #ifndef NULL
  82. #define NULL (void *) 0
  83. #endif
  84. #if defined(__powerpc64__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ \
  85. && defined __GLIBC_PREREQ
  86. #if __GLIBC_PREREQ (2, 32)
  87. #define POWER_IEEE128 1
  88. #endif
  89. #endif
  90. /* These functions from <ctype.h> should only be used on values that can be
  91. represented as unsigned char, otherwise the behavior is undefined.
  92. Some targets have a char type that is signed, so we cast the argument
  93. to unsigned char. See:
  94. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95177
  95. https://wiki.sei.cmu.edu/confluence/x/BNcxBQ
  96. */
  97. #define safe_isalnum(x) isalnum((unsigned char) (x))
  98. #define safe_isdigit(x) isdigit((unsigned char) (x))
  99. #define safe_tolower(x) tolower((unsigned char) (x))
  100. #define safe_toupper(x) toupper((unsigned char) (x))
  101. /* The following macros can be used to annotate conditions which are likely or
  102. unlikely to be true. Avoid using them when a condition is only slightly
  103. more likely/less unlikely than average to avoid the performance penalties of
  104. branch misprediction. In addition, as __builtin_expect overrides the compiler
  105. heuristic, do not use in conditions where one of the branches ends with a
  106. call to a function with __attribute__((noreturn)): the compiler internal
  107. heuristic will mark this branch as much less likely as unlikely() would
  108. do. */
  109. #define likely(x) __builtin_expect(!!(x), 1)
  110. #define unlikely(x) __builtin_expect(!!(x), 0)
  111. /* This macro can be used to annotate conditions which we know to
  112. be true, so that the compiler can optimize based on the condition. */
  113. #define GFC_ASSERT(EXPR) \
  114. ((void)(__builtin_expect (!(EXPR), 0) ? __builtin_unreachable (), 0 : 0))
  115. /* Make sure we have ptrdiff_t. */
  116. #ifndef HAVE_PTRDIFF_T
  117. typedef intptr_t ptrdiff_t;
  118. #endif
  119. /* On mingw, work around the buggy Windows snprintf() by using the one
  120. mingw provides, __mingw_snprintf(). We also provide a prototype for
  121. __mingw_snprintf(), because the mingw headers currently don't have one. */
  122. #if HAVE_MINGW_SNPRINTF
  123. extern int __mingw_snprintf (char *, size_t, const char *, ...)
  124. __attribute__ ((format (gnu_printf, 3, 4)));
  125. #undef snprintf
  126. #define snprintf __mingw_snprintf
  127. /* Fallback to sprintf if target does not have snprintf. */
  128. #elif !defined(HAVE_SNPRINTF)
  129. #undef snprintf
  130. #define snprintf(str, size, ...) sprintf (str, __VA_ARGS__)
  131. #endif
  132. /* For a library, a standard prefix is a requirement in order to partition
  133. the namespace. IPREFIX is for symbols intended to be internal to the
  134. library. */
  135. #define PREFIX(x) _gfortran_ ## x
  136. #define IPREFIX(x) _gfortrani_ ## x
  137. /* Magic to rename a symbol at the compiler level. You continue to refer
  138. to the symbol as OLD in the source, but it'll be named NEW in the asm. */
  139. #define sym_rename(old, new) sym_rename1(old, __USER_LABEL_PREFIX__, new)
  140. #define sym_rename1(old, ulp, new) sym_rename2(old, ulp, new)
  141. #define sym_rename2(old, ulp, new) extern __typeof(old) old __asm__(#ulp #new)
  142. /* There are several classifications of routines:
  143. (1) Symbols used only within the library,
  144. (2) Symbols to be exported from the library,
  145. (3) Symbols to be exported from the library, but
  146. also used inside the library.
  147. By telling the compiler about these different classifications we can
  148. tightly control the interface seen by the user, and get better code
  149. from the compiler at the same time.
  150. One of the following should be used immediately after the declaration
  151. of each symbol:
  152. internal_proto Marks a symbol used only within the library,
  153. and adds IPREFIX to the assembly-level symbol
  154. name. The later is important for maintaining
  155. the namespace partition for the static library.
  156. export_proto Marks a symbol to be exported, and adds PREFIX
  157. to the assembly-level symbol name.
  158. export_proto_np Marks a symbol to be exported without adding PREFIX.
  159. iexport_proto Marks a function to be exported, but with the
  160. understanding that it can be used inside as well.
  161. iexport_data_proto Similarly, marks a data symbol to be exported.
  162. Unfortunately, some systems can't play the hidden
  163. symbol renaming trick on data symbols, thanks to
  164. the horribleness of COPY relocations.
  165. If iexport_proto or iexport_data_proto is used, you must also use
  166. iexport or iexport_data after the *definition* of the symbol. */
  167. #if defined(HAVE_ATTRIBUTE_VISIBILITY)
  168. # define internal_proto(x) \
  169. sym_rename(x, IPREFIX (x)) __attribute__((__visibility__("hidden")))
  170. #else
  171. # define internal_proto(x) sym_rename(x, IPREFIX(x))
  172. #endif
  173. #if defined(HAVE_ATTRIBUTE_VISIBILITY) && defined(HAVE_ATTRIBUTE_ALIAS)
  174. # define export_proto(x) sym_rename(x, PREFIX(x))
  175. # define export_proto_np(x) extern char swallow_semicolon
  176. # define iexport_proto(x) internal_proto(x)
  177. # define iexport(x) iexport1(x, IPREFIX(x))
  178. # define iexport1(x,y) iexport2(x,y)
  179. # define iexport2(x,y) \
  180. extern __typeof(x) PREFIX(x) __attribute__((__alias__(#y), __copy__ (x)))
  181. #else
  182. # define export_proto(x) sym_rename(x, PREFIX(x))
  183. # define export_proto_np(x) extern char swallow_semicolon
  184. # define iexport_proto(x) export_proto(x)
  185. # define iexport(x) extern char swallow_semicolon
  186. #endif
  187. /* TODO: detect the case when we *can* hide the symbol. */
  188. #define iexport_data_proto(x) export_proto(x)
  189. #define iexport_data(x) extern char swallow_semicolon
  190. /* The only reliable way to get the offset of a field in a struct
  191. in a system independent way is via this macro. */
  192. #ifndef offsetof
  193. #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *) 0)->MEMBER)
  194. #endif
  195. /* The C99 classification macros isfinite, isinf, isnan, isnormal
  196. and signbit are broken or inconsistent on quite a few targets.
  197. So, we use GCC's builtins instead.
  198. Another advantage for GCC's builtins for these type-generic macros
  199. is that it handles floating-point types that the system headers
  200. may not support (like __float128). */
  201. #undef isnan
  202. #define isnan(x) __builtin_isnan(x)
  203. #undef isfinite
  204. #define isfinite(x) __builtin_isfinite(x)
  205. #undef isinf
  206. #define isinf(x) __builtin_isinf(x)
  207. #undef isnormal
  208. #define isnormal(x) __builtin_isnormal(x)
  209. #undef signbit
  210. #define signbit(x) __builtin_signbit(x)
  211. #include "kinds.h"
  212. /* Define the type used for the current record number for large file I/O.
  213. The size must be consistent with the size defined on the compiler side. */
  214. #ifdef HAVE_GFC_INTEGER_8
  215. typedef GFC_INTEGER_8 GFC_IO_INT;
  216. #else
  217. #ifdef HAVE_GFC_INTEGER_4
  218. typedef GFC_INTEGER_4 GFC_IO_INT;
  219. #else
  220. #error "GFC_INTEGER_4 should be available for the library to compile".
  221. #endif
  222. #endif
  223. /* The following two definitions must be consistent with the types used
  224. by the compiler. */
  225. /* The type used of array indices, amongst other things. */
  226. typedef ptrdiff_t index_type;
  227. /* The type used for the lengths of character variables. */
  228. typedef size_t gfc_charlen_type;
  229. /* Definitions of CHARACTER data types:
  230. - CHARACTER(KIND=1) corresponds to the C char type,
  231. - CHARACTER(KIND=4) corresponds to an unsigned 32-bit integer. */
  232. typedef GFC_UINTEGER_4 gfc_char4_t;
  233. /* Byte size of character kinds. For the kinds currently supported, it's
  234. simply equal to the kind parameter itself. */
  235. #define GFC_SIZE_OF_CHAR_KIND(kind) (kind)
  236. #define GFOR_POINTER_TO_L1(p, kind) \
  237. ((__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ ? 1: 0) * (kind - 1) + (GFC_LOGICAL_1 *)(p))
  238. #define GFC_INTEGER_1_HUGE \
  239. (GFC_INTEGER_1)((((GFC_UINTEGER_1)1) << 7) - 1)
  240. #define GFC_INTEGER_2_HUGE \
  241. (GFC_INTEGER_2)((((GFC_UINTEGER_2)1) << 15) - 1)
  242. #define GFC_INTEGER_4_HUGE \
  243. (GFC_INTEGER_4)((((GFC_UINTEGER_4)1) << 31) - 1)
  244. #define GFC_INTEGER_8_HUGE \
  245. (GFC_INTEGER_8)((((GFC_UINTEGER_8)1) << 63) - 1)
  246. #ifdef HAVE_GFC_INTEGER_16
  247. #define GFC_INTEGER_16_HUGE \
  248. (GFC_INTEGER_16)((((GFC_UINTEGER_16)1) << 127) - 1)
  249. #endif
  250. /* M{IN,AX}{LOC,VAL} need also infinities and NaNs if supported. */
  251. #if __FLT_HAS_INFINITY__
  252. # define GFC_REAL_4_INFINITY __builtin_inff ()
  253. #endif
  254. #if __DBL_HAS_INFINITY__
  255. # define GFC_REAL_8_INFINITY __builtin_inf ()
  256. #endif
  257. #if __LDBL_HAS_INFINITY__
  258. # ifdef HAVE_GFC_REAL_10
  259. # define GFC_REAL_10_INFINITY __builtin_infl ()
  260. # endif
  261. # ifdef HAVE_GFC_REAL_16
  262. # ifdef GFC_REAL_16_IS_LONG_DOUBLE
  263. # define GFC_REAL_16_INFINITY __builtin_infl ()
  264. # else
  265. # define GFC_REAL_16_INFINITY __builtin_infq ()
  266. # endif
  267. # endif
  268. # ifdef HAVE_GFC_REAL_17
  269. # define GFC_REAL_17_INFINITY __builtin_inff128 ()
  270. # endif
  271. #endif
  272. #if __FLT_HAS_QUIET_NAN__
  273. # define GFC_REAL_4_QUIET_NAN __builtin_nanf ("")
  274. #endif
  275. #if __DBL_HAS_QUIET_NAN__
  276. # define GFC_REAL_8_QUIET_NAN __builtin_nan ("")
  277. #endif
  278. #if __LDBL_HAS_QUIET_NAN__
  279. # ifdef HAVE_GFC_REAL_10
  280. # define GFC_REAL_10_QUIET_NAN __builtin_nanl ("")
  281. # endif
  282. # ifdef HAVE_GFC_REAL_16
  283. # ifdef GFC_REAL_16_IS_LONG_DOUBLE
  284. # define GFC_REAL_16_QUIET_NAN __builtin_nanl ("")
  285. # else
  286. # define GFC_REAL_16_QUIET_NAN nanq ("")
  287. # endif
  288. # endif
  289. # ifdef HAVE_GFC_REAL_17
  290. # define GFC_REAL_17_QUIET_NAN __builtin_nanf128 ("")
  291. # endif
  292. #endif
  293. typedef struct descriptor_dimension
  294. {
  295. index_type _stride;
  296. index_type lower_bound;
  297. index_type _ubound;
  298. }
  299. descriptor_dimension;
  300. typedef struct dtype_type
  301. {
  302. size_t elem_len;
  303. int version;
  304. signed char rank;
  305. signed char type;
  306. signed short attribute;
  307. }
  308. dtype_type;
  309. #define GFC_ARRAY_DESCRIPTOR(type) \
  310. struct {\
  311. type *base_addr;\
  312. size_t offset;\
  313. dtype_type dtype;\
  314. index_type span;\
  315. descriptor_dimension dim[];\
  316. }
  317. /* Commonly used array descriptor types. */
  318. typedef GFC_ARRAY_DESCRIPTOR (void) gfc_array_void;
  319. typedef GFC_ARRAY_DESCRIPTOR (char) gfc_array_char;
  320. typedef GFC_ARRAY_DESCRIPTOR (GFC_INTEGER_1) gfc_array_i1;
  321. typedef GFC_ARRAY_DESCRIPTOR (GFC_INTEGER_2) gfc_array_i2;
  322. typedef GFC_ARRAY_DESCRIPTOR (GFC_INTEGER_4) gfc_array_i4;
  323. typedef GFC_ARRAY_DESCRIPTOR (GFC_INTEGER_8) gfc_array_i8;
  324. typedef GFC_ARRAY_DESCRIPTOR (index_type) gfc_array_index_type;
  325. #ifdef HAVE_GFC_INTEGER_16
  326. typedef GFC_ARRAY_DESCRIPTOR (GFC_INTEGER_16) gfc_array_i16;
  327. #endif
  328. typedef GFC_ARRAY_DESCRIPTOR (GFC_REAL_4) gfc_array_r4;
  329. typedef GFC_ARRAY_DESCRIPTOR (GFC_REAL_8) gfc_array_r8;
  330. #ifdef HAVE_GFC_REAL_10
  331. typedef GFC_ARRAY_DESCRIPTOR (GFC_REAL_10) gfc_array_r10;
  332. #endif
  333. #ifdef HAVE_GFC_REAL_16
  334. typedef GFC_ARRAY_DESCRIPTOR (GFC_REAL_16) gfc_array_r16;
  335. #endif
  336. #ifdef HAVE_GFC_REAL_17
  337. typedef GFC_ARRAY_DESCRIPTOR (GFC_REAL_17) gfc_array_r17;
  338. #endif
  339. typedef GFC_ARRAY_DESCRIPTOR (GFC_COMPLEX_4) gfc_array_c4;
  340. typedef GFC_ARRAY_DESCRIPTOR (GFC_COMPLEX_8) gfc_array_c8;
  341. #ifdef HAVE_GFC_COMPLEX_10
  342. typedef GFC_ARRAY_DESCRIPTOR (GFC_COMPLEX_10) gfc_array_c10;
  343. #endif
  344. #ifdef HAVE_GFC_COMPLEX_16
  345. typedef GFC_ARRAY_DESCRIPTOR (GFC_COMPLEX_16) gfc_array_c16;
  346. #endif
  347. #ifdef HAVE_GFC_COMPLEX_17
  348. typedef GFC_ARRAY_DESCRIPTOR (GFC_COMPLEX_17) gfc_array_c17;
  349. #endif
  350. typedef GFC_ARRAY_DESCRIPTOR (GFC_LOGICAL_1) gfc_array_l1;
  351. typedef GFC_ARRAY_DESCRIPTOR (GFC_LOGICAL_2) gfc_array_l2;
  352. typedef GFC_ARRAY_DESCRIPTOR (GFC_LOGICAL_4) gfc_array_l4;
  353. typedef GFC_ARRAY_DESCRIPTOR (GFC_LOGICAL_8) gfc_array_l8;
  354. #ifdef HAVE_GFC_LOGICAL_16
  355. typedef GFC_ARRAY_DESCRIPTOR (GFC_LOGICAL_16) gfc_array_l16;
  356. #endif
  357. typedef GFC_ARRAY_DESCRIPTOR (GFC_UINTEGER_1) gfc_array_s1;
  358. typedef GFC_ARRAY_DESCRIPTOR (GFC_UINTEGER_4) gfc_array_s4;
  359. /* These are for when you actually want to declare a descriptor, as
  360. opposed to a pointer to it. */
  361. #define GFC_FULL_ARRAY_DESCRIPTOR(r, type) \
  362. struct {\
  363. type *base_addr;\
  364. size_t offset;\
  365. dtype_type dtype;\
  366. index_type span;\
  367. descriptor_dimension dim[r];\
  368. }
  369. typedef GFC_FULL_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_INTEGER_4) gfc_full_array_i4;
  370. #define GFC_DESCRIPTOR_RANK(desc) ((desc)->dtype.rank)
  371. #define GFC_DESCRIPTOR_TYPE(desc) ((desc)->dtype.type)
  372. #define GFC_DESCRIPTOR_SIZE(desc) ((desc)->dtype.elem_len)
  373. #define GFC_DESCRIPTOR_DATA(desc) ((desc)->base_addr)
  374. #define GFC_DESCRIPTOR_DTYPE(desc) ((desc)->dtype)
  375. #define GFC_DESCRIPTOR_SPAN(desc) ((desc)->span)
  376. #define GFC_DIMENSION_LBOUND(dim) ((dim).lower_bound)
  377. #define GFC_DIMENSION_UBOUND(dim) ((dim)._ubound)
  378. #define GFC_DIMENSION_STRIDE(dim) ((dim)._stride)
  379. #define GFC_DIMENSION_EXTENT(dim) ((dim)._ubound + 1 - (dim).lower_bound)
  380. #define GFC_DIMENSION_SET(dim,lb,ub,str) \
  381. do \
  382. { \
  383. (dim).lower_bound = lb; \
  384. (dim)._ubound = ub; \
  385. (dim)._stride = str; \
  386. } while (0)
  387. #define GFC_DESCRIPTOR_LBOUND(desc,i) ((desc)->dim[i].lower_bound)
  388. #define GFC_DESCRIPTOR_UBOUND(desc,i) ((desc)->dim[i]._ubound)
  389. #define GFC_DESCRIPTOR_EXTENT(desc,i) ((desc)->dim[i]._ubound + 1 \
  390. - (desc)->dim[i].lower_bound)
  391. #define GFC_DESCRIPTOR_EXTENT_BYTES(desc,i) \
  392. (GFC_DESCRIPTOR_EXTENT(desc,i) * GFC_DESCRIPTOR_SIZE(desc))
  393. #define GFC_DESCRIPTOR_STRIDE(desc,i) ((desc)->dim[i]._stride)
  394. #define GFC_DESCRIPTOR_STRIDE_BYTES(desc,i) \
  395. (GFC_DESCRIPTOR_STRIDE(desc,i) * GFC_DESCRIPTOR_SIZE(desc))
  396. /* Macros to get both the size and the type with a single masking operation */
  397. #define GFC_DTYPE_SIZE_MASK (-((index_type) 1 << GFC_DTYPE_SIZE_SHIFT))
  398. #define GFC_DTYPE_TYPE_SIZE_MASK (GFC_DTYPE_SIZE_MASK | GFC_DTYPE_TYPE_MASK)
  399. #define GFC_DTYPE_TYPE_SIZE(desc) (( ((desc)->dtype.type << GFC_DTYPE_TYPE_SHIFT) \
  400. | ((desc)->dtype.elem_len << GFC_DTYPE_SIZE_SHIFT) ) & GFC_DTYPE_TYPE_SIZE_MASK)
  401. /* Macros to set size and type information. */
  402. #define GFC_DTYPE_COPY(a,b) do { (a)->dtype = (b)->dtype; } while(0)
  403. #define GFC_DTYPE_IS_UNSET(a) (unlikely((a)->dtype.elem_len == 0))
  404. #define GFC_DTYPE_CLEAR(a) do { (a)->dtype.elem_len = 0; \
  405. (a)->dtype.version = 0; \
  406. (a)->dtype.rank = 0; \
  407. (a)->dtype.type = 0; \
  408. (a)->dtype.attribute = 0; \
  409. } while(0)
  410. #define GFC_DTYPE_INTEGER_1 ((BT_INTEGER << GFC_DTYPE_TYPE_SHIFT) \
  411. | (sizeof(GFC_INTEGER_1) << GFC_DTYPE_SIZE_SHIFT))
  412. #define GFC_DTYPE_INTEGER_2 ((BT_INTEGER << GFC_DTYPE_TYPE_SHIFT) \
  413. | (sizeof(GFC_INTEGER_2) << GFC_DTYPE_SIZE_SHIFT))
  414. #define GFC_DTYPE_INTEGER_4 ((BT_INTEGER << GFC_DTYPE_TYPE_SHIFT) \
  415. | (sizeof(GFC_INTEGER_4) << GFC_DTYPE_SIZE_SHIFT))
  416. #define GFC_DTYPE_INTEGER_8 ((BT_INTEGER << GFC_DTYPE_TYPE_SHIFT) \
  417. | (sizeof(GFC_INTEGER_8) << GFC_DTYPE_SIZE_SHIFT))
  418. #ifdef HAVE_GFC_INTEGER_16
  419. #define GFC_DTYPE_INTEGER_16 ((BT_INTEGER << GFC_DTYPE_TYPE_SHIFT) \
  420. | (sizeof(GFC_INTEGER_16) << GFC_DTYPE_SIZE_SHIFT))
  421. #endif
  422. #define GFC_DTYPE_LOGICAL_1 ((BT_LOGICAL << GFC_DTYPE_TYPE_SHIFT) \
  423. | (sizeof(GFC_LOGICAL_1) << GFC_DTYPE_SIZE_SHIFT))
  424. #define GFC_DTYPE_LOGICAL_2 ((BT_LOGICAL << GFC_DTYPE_TYPE_SHIFT) \
  425. | (sizeof(GFC_LOGICAL_2) << GFC_DTYPE_SIZE_SHIFT))
  426. #define GFC_DTYPE_LOGICAL_4 ((BT_LOGICAL << GFC_DTYPE_TYPE_SHIFT) \
  427. | (sizeof(GFC_LOGICAL_4) << GFC_DTYPE_SIZE_SHIFT))
  428. #define GFC_DTYPE_LOGICAL_8 ((BT_LOGICAL << GFC_DTYPE_TYPE_SHIFT) \
  429. | (sizeof(GFC_LOGICAL_8) << GFC_DTYPE_SIZE_SHIFT))
  430. #ifdef HAVE_GFC_LOGICAL_16
  431. #define GFC_DTYPE_LOGICAL_16 ((BT_LOGICAL << GFC_DTYPE_TYPE_SHIFT) \
  432. | (sizeof(GFC_LOGICAL_16) << GFC_DTYPE_SIZE_SHIFT))
  433. #endif
  434. #define GFC_DTYPE_REAL_4 ((BT_REAL << GFC_DTYPE_TYPE_SHIFT) \
  435. | (sizeof(GFC_REAL_4) << GFC_DTYPE_SIZE_SHIFT))
  436. #define GFC_DTYPE_REAL_8 ((BT_REAL << GFC_DTYPE_TYPE_SHIFT) \
  437. | (sizeof(GFC_REAL_8) << GFC_DTYPE_SIZE_SHIFT))
  438. #ifdef HAVE_GFC_REAL_10
  439. #define GFC_DTYPE_REAL_10 ((BT_REAL << GFC_DTYPE_TYPE_SHIFT) \
  440. | (sizeof(GFC_REAL_10) << GFC_DTYPE_SIZE_SHIFT))
  441. #endif
  442. #ifdef HAVE_GFC_REAL_16
  443. #define GFC_DTYPE_REAL_16 ((BT_REAL << GFC_DTYPE_TYPE_SHIFT) \
  444. | (sizeof(GFC_REAL_16) << GFC_DTYPE_SIZE_SHIFT))
  445. #endif
  446. #ifdef HAVE_GFC_REAL_17
  447. #define GFC_DTYPE_REAL_17 ((BT_REAL << GFC_DTYPE_TYPE_SHIFT) \
  448. | (sizeof(GFC_REAL_17) << GFC_DTYPE_SIZE_SHIFT))
  449. #endif
  450. #define GFC_DTYPE_COMPLEX_4 ((BT_COMPLEX << GFC_DTYPE_TYPE_SHIFT) \
  451. | (sizeof(GFC_COMPLEX_4) << GFC_DTYPE_SIZE_SHIFT))
  452. #define GFC_DTYPE_COMPLEX_8 ((BT_COMPLEX << GFC_DTYPE_TYPE_SHIFT) \
  453. | (sizeof(GFC_COMPLEX_8) << GFC_DTYPE_SIZE_SHIFT))
  454. #ifdef HAVE_GFC_COMPLEX_10
  455. #define GFC_DTYPE_COMPLEX_10 ((BT_COMPLEX << GFC_DTYPE_TYPE_SHIFT) \
  456. | (sizeof(GFC_COMPLEX_10) << GFC_DTYPE_SIZE_SHIFT))
  457. #endif
  458. #ifdef HAVE_GFC_COMPLEX_16
  459. #define GFC_DTYPE_COMPLEX_16 ((BT_COMPLEX << GFC_DTYPE_TYPE_SHIFT) \
  460. | (sizeof(GFC_COMPLEX_16) << GFC_DTYPE_SIZE_SHIFT))
  461. #endif
  462. #ifdef HAVE_GFC_COMPLEX_17
  463. #define GFC_DTYPE_COMPLEX_17 ((BT_COMPLEX << GFC_DTYPE_TYPE_SHIFT) \
  464. | (sizeof(GFC_COMPLEX_17) << GFC_DTYPE_SIZE_SHIFT))
  465. #endif
  466. /* Macros to determine the alignment of pointers. */
  467. #define GFC_UNALIGNED_2(x) (((uintptr_t)(x)) & \
  468. (__alignof__(GFC_INTEGER_2) - 1))
  469. #define GFC_UNALIGNED_4(x) (((uintptr_t)(x)) & \
  470. (__alignof__(GFC_INTEGER_4) - 1))
  471. #define GFC_UNALIGNED_8(x) (((uintptr_t)(x)) & \
  472. (__alignof__(GFC_INTEGER_8) - 1))
  473. #ifdef HAVE_GFC_INTEGER_16
  474. #define GFC_UNALIGNED_16(x) (((uintptr_t)(x)) & \
  475. (__alignof__(GFC_INTEGER_16) - 1))
  476. #endif
  477. #define GFC_UNALIGNED_C4(x) (((uintptr_t)(x)) & \
  478. (__alignof__(GFC_COMPLEX_4) - 1))
  479. #define GFC_UNALIGNED_C8(x) (((uintptr_t)(x)) & \
  480. (__alignof__(GFC_COMPLEX_8) - 1))
  481. /* Runtime library include. */
  482. #define stringize(x) expand_macro(x)
  483. #define expand_macro(x) # x
  484. /* Runtime options structure. */
  485. typedef struct
  486. {
  487. int stdin_unit, stdout_unit, stderr_unit, optional_plus;
  488. int locus;
  489. int separator_len;
  490. const char *separator;
  491. int all_unbuffered, unbuffered_preconnected;
  492. int fpe, backtrace;
  493. int unformatted_buffer_size, formatted_buffer_size;
  494. }
  495. options_t;
  496. extern options_t options;
  497. internal_proto(options);
  498. extern void backtrace_handler (int);
  499. internal_proto(backtrace_handler);
  500. /* Compile-time options that will influence the library. */
  501. typedef struct
  502. {
  503. int warn_std;
  504. int allow_std;
  505. int pedantic;
  506. int convert;
  507. int backtrace;
  508. int sign_zero;
  509. size_t record_marker;
  510. int max_subrecord_length;
  511. int bounds_check;
  512. int fpe_summary;
  513. }
  514. compile_options_t;
  515. extern compile_options_t compile_options;
  516. internal_proto(compile_options);
  517. extern void init_compile_options (void);
  518. internal_proto(init_compile_options);
  519. #define GFC_MAX_SUBRECORD_LENGTH 2147483639 /* 2**31 - 9 */
  520. /* Structure for statement options. */
  521. typedef struct
  522. {
  523. const char *name;
  524. int value;
  525. }
  526. st_option;
  527. /* This is returned by notification_std to know if, given the flags
  528. that were given (-std=, -pedantic) we should issue an error, a warning
  529. or nothing. */
  530. typedef enum
  531. { NOTIFICATION_SILENT, NOTIFICATION_WARNING, NOTIFICATION_ERROR }
  532. notification;
  533. /* The filename and line number don't go inside the globals structure.
  534. They are set by the rest of the program and must be linked to. */
  535. /* Location of the current library call (optional). */
  536. extern unsigned line;
  537. iexport_data_proto(line);
  538. extern char *filename;
  539. iexport_data_proto(filename);
  540. #define CHARACTER2(name) \
  541. gfc_charlen_type name ## _len; \
  542. char * name
  543. typedef struct st_parameter_common
  544. {
  545. GFC_INTEGER_4 flags;
  546. GFC_INTEGER_4 unit;
  547. const char *filename;
  548. GFC_INTEGER_4 line;
  549. CHARACTER2 (iomsg);
  550. GFC_INTEGER_4 *iostat;
  551. }
  552. st_parameter_common;
  553. #undef CHARACTER2
  554. #define IOPARM_LIBRETURN_MASK (3 << 0)
  555. #define IOPARM_LIBRETURN_OK (0 << 0)
  556. #define IOPARM_LIBRETURN_ERROR (1 << 0)
  557. #define IOPARM_LIBRETURN_END (2 << 0)
  558. #define IOPARM_LIBRETURN_EOR (3 << 0)
  559. #define IOPARM_ERR (1 << 2)
  560. #define IOPARM_END (1 << 3)
  561. #define IOPARM_EOR (1 << 4)
  562. #define IOPARM_HAS_IOSTAT (1 << 5)
  563. #define IOPARM_HAS_IOMSG (1 << 6)
  564. #define IOPARM_COMMON_MASK ((1 << 7) - 1)
  565. /* Make sure to keep in sync with io/io.h (st_parameter_open). */
  566. #define IOPARM_OPEN_HAS_RECL_IN (1 << 7)
  567. #define IOPARM_OPEN_HAS_FILE (1 << 8)
  568. #define IOPARM_OPEN_HAS_STATUS (1 << 9)
  569. #define IOPARM_OPEN_HAS_ACCESS (1 << 10)
  570. #define IOPARM_OPEN_HAS_FORM (1 << 11)
  571. #define IOPARM_OPEN_HAS_BLANK (1 << 12)
  572. #define IOPARM_OPEN_HAS_POSITION (1 << 13)
  573. #define IOPARM_OPEN_HAS_ACTION (1 << 14)
  574. #define IOPARM_OPEN_HAS_DELIM (1 << 15)
  575. #define IOPARM_OPEN_HAS_PAD (1 << 16)
  576. #define IOPARM_OPEN_HAS_CONVERT (1 << 17)
  577. #define IOPARM_OPEN_HAS_DECIMAL (1 << 18)
  578. #define IOPARM_OPEN_HAS_ENCODING (1 << 19)
  579. #define IOPARM_OPEN_HAS_ROUND (1 << 20)
  580. #define IOPARM_OPEN_HAS_SIGN (1 << 21)
  581. #define IOPARM_OPEN_HAS_ASYNCHRONOUS (1 << 22)
  582. #define IOPARM_OPEN_HAS_NEWUNIT (1 << 23)
  583. #define IOPARM_OPEN_HAS_READONLY (1 << 24)
  584. #define IOPARM_OPEN_HAS_CC (1 << 25)
  585. #define IOPARM_OPEN_HAS_SHARE (1 << 26)
  586. /* library start function and end macro. These can be expanded if needed
  587. in the future. cmp is st_parameter_common *cmp */
  588. extern void library_start (st_parameter_common *);
  589. internal_proto(library_start);
  590. #define library_end()
  591. /* main.c */
  592. extern void stupid_function_name_for_static_linking (void);
  593. internal_proto(stupid_function_name_for_static_linking);
  594. extern void set_args (int, char **);
  595. iexport_proto(set_args);
  596. extern void get_args (int *, char ***);
  597. internal_proto(get_args);
  598. /* backtrace.c */
  599. extern void show_backtrace (bool);
  600. internal_proto(show_backtrace);
  601. /* error.c */
  602. #if defined(HAVE_GFC_REAL_16)
  603. #define GFC_LARGEST_BUF (sizeof (GFC_REAL_16))
  604. #elif defined(HAVE_GFC_INTEGER_16)
  605. #define GFC_LARGEST_BUF (sizeof (GFC_INTEGER_LARGEST))
  606. #elif defined(HAVE_GFC_REAL_10)
  607. #define GFC_LARGEST_BUF (sizeof (GFC_REAL_10))
  608. #else
  609. #define GFC_LARGEST_BUF (sizeof (GFC_INTEGER_LARGEST))
  610. #endif
  611. #define GFC_ITOA_BUF_SIZE (sizeof (GFC_INTEGER_LARGEST) * 3 + 1)
  612. #define GFC_XTOA_BUF_SIZE (GFC_LARGEST_BUF * 2 + 1)
  613. #define GFC_OTOA_BUF_SIZE (GFC_LARGEST_BUF * 3 + 1)
  614. #define GFC_BTOA_BUF_SIZE (GFC_LARGEST_BUF * 8 + 1)
  615. extern _Noreturn void sys_abort (void);
  616. internal_proto(sys_abort);
  617. extern _Noreturn void exit_error (int);
  618. internal_proto(exit_error);
  619. extern ssize_t estr_write (const char *);
  620. internal_proto(estr_write);
  621. #if !defined(HAVE_WRITEV) && !defined(HAVE_SYS_UIO_H)
  622. struct iovec {
  623. void *iov_base; /* Starting address */
  624. size_t iov_len; /* Number of bytes to transfer */
  625. };
  626. #endif
  627. extern ssize_t estr_writev (const struct iovec *iov, int iovcnt);
  628. internal_proto(estr_writev);
  629. extern int st_printf (const char *, ...)
  630. __attribute__((format (gfc_printf, 1, 2)));
  631. internal_proto(st_printf);
  632. extern _Noreturn void os_error (const char *);
  633. iexport_proto(os_error);
  634. extern _Noreturn void os_error_at (const char *, const char *, ...)
  635. __attribute__ ((format (gfc_printf, 2, 3)));
  636. iexport_proto(os_error_at);
  637. extern void show_locus (st_parameter_common *);
  638. internal_proto(show_locus);
  639. extern _Noreturn void runtime_error (const char *, ...)
  640. __attribute__ ((format (gfc_printf, 1, 2)));
  641. iexport_proto(runtime_error);
  642. extern _Noreturn void runtime_error_at (const char *, const char *, ...)
  643. __attribute__ ((format (gfc_printf, 2, 3)));
  644. iexport_proto(runtime_error_at);
  645. extern void runtime_warning_at (const char *, const char *, ...)
  646. __attribute__ ((format (gfc_printf, 2, 3)));
  647. iexport_proto(runtime_warning_at);
  648. extern _Noreturn void internal_error (st_parameter_common *, const char *);
  649. internal_proto(internal_error);
  650. extern const char *translate_error (int);
  651. internal_proto(translate_error);
  652. extern void generate_error (st_parameter_common *, int, const char *);
  653. iexport_proto(generate_error);
  654. extern bool generate_error_common (st_parameter_common *, int, const char *);
  655. iexport_proto(generate_error_common);
  656. extern void generate_warning (st_parameter_common *, const char *);
  657. internal_proto(generate_warning);
  658. extern bool notify_std (st_parameter_common *, int, const char *);
  659. internal_proto(notify_std);
  660. extern notification notification_std(int);
  661. internal_proto(notification_std);
  662. extern char *gf_strerror (int, char *, size_t);
  663. internal_proto(gf_strerror);
  664. /* fpu.c */
  665. extern void set_fpu (void);
  666. internal_proto(set_fpu);
  667. extern int get_fpu_trap_exceptions (void);
  668. internal_proto(get_fpu_trap_exceptions);
  669. extern void set_fpu_trap_exceptions (int, int);
  670. internal_proto(set_fpu_trap_exceptions);
  671. extern int support_fpu_trap (int);
  672. internal_proto(support_fpu_trap);
  673. extern int get_fpu_except_flags (void);
  674. internal_proto(get_fpu_except_flags);
  675. extern void set_fpu_except_flags (int, int);
  676. internal_proto(set_fpu_except_flags);
  677. extern int support_fpu_flag (int);
  678. internal_proto(support_fpu_flag);
  679. extern void set_fpu_rounding_mode (int);
  680. internal_proto(set_fpu_rounding_mode);
  681. extern int get_fpu_rounding_mode (void);
  682. internal_proto(get_fpu_rounding_mode);
  683. extern int support_fpu_rounding_mode (int);
  684. internal_proto(support_fpu_rounding_mode);
  685. extern void get_fpu_state (void *);
  686. internal_proto(get_fpu_state);
  687. extern void set_fpu_state (void *);
  688. internal_proto(set_fpu_state);
  689. extern int get_fpu_underflow_mode (void);
  690. internal_proto(get_fpu_underflow_mode);
  691. extern void set_fpu_underflow_mode (int);
  692. internal_proto(set_fpu_underflow_mode);
  693. extern int support_fpu_underflow_control (int);
  694. internal_proto(support_fpu_underflow_control);
  695. /* memory.c */
  696. extern void *xmalloc (size_t) __attribute__ ((malloc));
  697. internal_proto(xmalloc);
  698. extern void *xmallocarray (size_t, size_t) __attribute__ ((malloc));
  699. internal_proto(xmallocarray);
  700. extern void *xcalloc (size_t, size_t) __attribute__ ((malloc));
  701. internal_proto(xcalloc);
  702. extern void *xrealloc (void *, size_t);
  703. internal_proto(xrealloc);
  704. /* environ.c */
  705. extern void init_variables (void);
  706. internal_proto(init_variables);
  707. unit_convert get_unformatted_convert (int);
  708. internal_proto(get_unformatted_convert);
  709. /* Secure getenv() which returns NULL if running as SUID/SGID. */
  710. #ifndef HAVE_SECURE_GETENV
  711. #if defined(HAVE_GETUID) && defined(HAVE_GETEUID) \
  712. && defined(HAVE_GETGID) && defined(HAVE_GETEGID)
  713. #define FALLBACK_SECURE_GETENV
  714. extern char *secure_getenv (const char *);
  715. internal_proto(secure_getenv);
  716. #else
  717. #define secure_getenv getenv
  718. #endif
  719. #endif
  720. /* string.c */
  721. extern int find_option (st_parameter_common *, const char *, gfc_charlen_type,
  722. const st_option *, const char *);
  723. internal_proto(find_option);
  724. extern gfc_charlen_type fstrlen (const char *, gfc_charlen_type);
  725. internal_proto(fstrlen);
  726. extern gfc_charlen_type fstrcpy (char *, gfc_charlen_type, const char *, gfc_charlen_type);
  727. internal_proto(fstrcpy);
  728. extern gfc_charlen_type cf_strcpy (char *, gfc_charlen_type, const char *);
  729. internal_proto(cf_strcpy);
  730. extern gfc_charlen_type string_len_trim (gfc_charlen_type, const char *);
  731. export_proto(string_len_trim);
  732. extern gfc_charlen_type string_len_trim_char4 (gfc_charlen_type,
  733. const gfc_char4_t *);
  734. export_proto(string_len_trim_char4);
  735. extern char *fc_strdup(const char *, gfc_charlen_type);
  736. internal_proto(fc_strdup);
  737. extern char *fc_strdup_notrim(const char *, gfc_charlen_type);
  738. internal_proto(fc_strdup_notrim);
  739. extern const char *gfc_itoa(GFC_UINTEGER_LARGEST, char *, size_t);
  740. internal_proto(gfc_itoa);
  741. /* io/intrinsics.c */
  742. extern void flush_all_units (void);
  743. internal_proto(flush_all_units);
  744. /* io.c */
  745. extern void init_units (void);
  746. internal_proto(init_units);
  747. extern void close_units (void);
  748. internal_proto(close_units);
  749. extern int unit_to_fd (int);
  750. internal_proto(unit_to_fd);
  751. extern char * filename_from_unit (int);
  752. internal_proto(filename_from_unit);
  753. /* stop.c */
  754. extern _Noreturn void stop_string (const char *, size_t, bool);
  755. export_proto(stop_string);
  756. /* reshape_packed.c */
  757. extern void reshape_packed (char *, index_type, const char *, index_type,
  758. const char *, index_type);
  759. internal_proto(reshape_packed);
  760. /* Repacking functions. These are called internally by internal_pack
  761. and internal_unpack. */
  762. GFC_INTEGER_1 *internal_pack_1 (gfc_array_i1 *);
  763. internal_proto(internal_pack_1);
  764. GFC_INTEGER_2 *internal_pack_2 (gfc_array_i2 *);
  765. internal_proto(internal_pack_2);
  766. GFC_INTEGER_4 *internal_pack_4 (gfc_array_i4 *);
  767. internal_proto(internal_pack_4);
  768. GFC_INTEGER_8 *internal_pack_8 (gfc_array_i8 *);
  769. internal_proto(internal_pack_8);
  770. #if defined HAVE_GFC_INTEGER_16
  771. GFC_INTEGER_16 *internal_pack_16 (gfc_array_i16 *);
  772. internal_proto(internal_pack_16);
  773. #endif
  774. GFC_REAL_4 *internal_pack_r4 (gfc_array_r4 *);
  775. internal_proto(internal_pack_r4);
  776. GFC_REAL_8 *internal_pack_r8 (gfc_array_r8 *);
  777. internal_proto(internal_pack_r8);
  778. #if defined HAVE_GFC_REAL_10
  779. GFC_REAL_10 *internal_pack_r10 (gfc_array_r10 *);
  780. internal_proto(internal_pack_r10);
  781. #endif
  782. #if defined HAVE_GFC_REAL_16
  783. GFC_REAL_16 *internal_pack_r16 (gfc_array_r16 *);
  784. internal_proto(internal_pack_r16);
  785. #endif
  786. #if defined HAVE_GFC_REAL_17
  787. GFC_REAL_17 *internal_pack_r17 (gfc_array_r17 *);
  788. internal_proto(internal_pack_r17);
  789. #endif
  790. GFC_COMPLEX_4 *internal_pack_c4 (gfc_array_c4 *);
  791. internal_proto(internal_pack_c4);
  792. GFC_COMPLEX_8 *internal_pack_c8 (gfc_array_c8 *);
  793. internal_proto(internal_pack_c8);
  794. #if defined HAVE_GFC_COMPLEX_10
  795. GFC_COMPLEX_10 *internal_pack_c10 (gfc_array_c10 *);
  796. internal_proto(internal_pack_c10);
  797. #endif
  798. #if defined HAVE_GFC_COMPLEX_16
  799. GFC_COMPLEX_16 *internal_pack_c16 (gfc_array_c16 *);
  800. internal_proto(internal_pack_c16);
  801. #endif
  802. #if defined HAVE_GFC_COMPLEX_17
  803. GFC_COMPLEX_17 *internal_pack_c17 (gfc_array_c17 *);
  804. internal_proto(internal_pack_c17);
  805. #endif
  806. extern void internal_unpack_1 (gfc_array_i1 *, const GFC_INTEGER_1 *);
  807. internal_proto(internal_unpack_1);
  808. extern void internal_unpack_2 (gfc_array_i2 *, const GFC_INTEGER_2 *);
  809. internal_proto(internal_unpack_2);
  810. extern void internal_unpack_4 (gfc_array_i4 *, const GFC_INTEGER_4 *);
  811. internal_proto(internal_unpack_4);
  812. extern void internal_unpack_8 (gfc_array_i8 *, const GFC_INTEGER_8 *);
  813. internal_proto(internal_unpack_8);
  814. #if defined HAVE_GFC_INTEGER_16
  815. extern void internal_unpack_16 (gfc_array_i16 *, const GFC_INTEGER_16 *);
  816. internal_proto(internal_unpack_16);
  817. #endif
  818. extern void internal_unpack_r4 (gfc_array_r4 *, const GFC_REAL_4 *);
  819. internal_proto(internal_unpack_r4);
  820. extern void internal_unpack_r8 (gfc_array_r8 *, const GFC_REAL_8 *);
  821. internal_proto(internal_unpack_r8);
  822. #if defined HAVE_GFC_REAL_10
  823. extern void internal_unpack_r10 (gfc_array_r10 *, const GFC_REAL_10 *);
  824. internal_proto(internal_unpack_r10);
  825. #endif
  826. #if defined HAVE_GFC_REAL_16
  827. extern void internal_unpack_r16 (gfc_array_r16 *, const GFC_REAL_16 *);
  828. internal_proto(internal_unpack_r16);
  829. #endif
  830. #if defined HAVE_GFC_REAL_17
  831. extern void internal_unpack_r17 (gfc_array_r17 *, const GFC_REAL_17 *);
  832. internal_proto(internal_unpack_r17);
  833. #endif
  834. extern void internal_unpack_c4 (gfc_array_c4 *, const GFC_COMPLEX_4 *);
  835. internal_proto(internal_unpack_c4);
  836. extern void internal_unpack_c8 (gfc_array_c8 *, const GFC_COMPLEX_8 *);
  837. internal_proto(internal_unpack_c8);
  838. #if defined HAVE_GFC_COMPLEX_10
  839. extern void internal_unpack_c10 (gfc_array_c10 *, const GFC_COMPLEX_10 *);
  840. internal_proto(internal_unpack_c10);
  841. #endif
  842. #if defined HAVE_GFC_COMPLEX_16
  843. extern void internal_unpack_c16 (gfc_array_c16 *, const GFC_COMPLEX_16 *);
  844. internal_proto(internal_unpack_c16);
  845. #endif
  846. #if defined HAVE_GFC_COMPLEX_17
  847. extern void internal_unpack_c17 (gfc_array_c17 *, const GFC_COMPLEX_17 *);
  848. internal_proto(internal_unpack_c17);
  849. #endif
  850. /* Internal auxiliary functions for the pack intrinsic. */
  851. extern void pack_i1 (gfc_array_i1 *, const gfc_array_i1 *,
  852. const gfc_array_l1 *, const gfc_array_i1 *);
  853. internal_proto(pack_i1);
  854. extern void pack_i2 (gfc_array_i2 *, const gfc_array_i2 *,
  855. const gfc_array_l1 *, const gfc_array_i2 *);
  856. internal_proto(pack_i2);
  857. extern void pack_i4 (gfc_array_i4 *, const gfc_array_i4 *,
  858. const gfc_array_l1 *, const gfc_array_i4 *);
  859. internal_proto(pack_i4);
  860. extern void pack_i8 (gfc_array_i8 *, const gfc_array_i8 *,
  861. const gfc_array_l1 *, const gfc_array_i8 *);
  862. internal_proto(pack_i8);
  863. #ifdef HAVE_GFC_INTEGER_16
  864. extern void pack_i16 (gfc_array_i16 *, const gfc_array_i16 *,
  865. const gfc_array_l1 *, const gfc_array_i16 *);
  866. internal_proto(pack_i16);
  867. #endif
  868. extern void pack_r4 (gfc_array_r4 *, const gfc_array_r4 *,
  869. const gfc_array_l1 *, const gfc_array_r4 *);
  870. internal_proto(pack_r4);
  871. extern void pack_r8 (gfc_array_r8 *, const gfc_array_r8 *,
  872. const gfc_array_l1 *, const gfc_array_r8 *);
  873. internal_proto(pack_r8);
  874. #ifdef HAVE_GFC_REAL_10
  875. extern void pack_r10 (gfc_array_r10 *, const gfc_array_r10 *,
  876. const gfc_array_l1 *, const gfc_array_r10 *);
  877. internal_proto(pack_r10);
  878. #endif
  879. #ifdef HAVE_GFC_REAL_16
  880. extern void pack_r16 (gfc_array_r16 *, const gfc_array_r16 *,
  881. const gfc_array_l1 *, const gfc_array_r16 *);
  882. internal_proto(pack_r16);
  883. #endif
  884. #ifdef HAVE_GFC_REAL_17
  885. extern void pack_r17 (gfc_array_r17 *, const gfc_array_r17 *,
  886. const gfc_array_l1 *, const gfc_array_r17 *);
  887. internal_proto(pack_r17);
  888. #endif
  889. extern void pack_c4 (gfc_array_c4 *, const gfc_array_c4 *,
  890. const gfc_array_l1 *, const gfc_array_c4 *);
  891. internal_proto(pack_c4);
  892. extern void pack_c8 (gfc_array_c8 *, const gfc_array_c8 *,
  893. const gfc_array_l1 *, const gfc_array_c8 *);
  894. internal_proto(pack_c8);
  895. #ifdef HAVE_GFC_REAL_10
  896. extern void pack_c10 (gfc_array_c10 *, const gfc_array_c10 *,
  897. const gfc_array_l1 *, const gfc_array_c10 *);
  898. internal_proto(pack_c10);
  899. #endif
  900. #ifdef HAVE_GFC_REAL_16
  901. extern void pack_c16 (gfc_array_c16 *, const gfc_array_c16 *,
  902. const gfc_array_l1 *, const gfc_array_c16 *);
  903. internal_proto(pack_c16);
  904. #endif
  905. #ifdef HAVE_GFC_REAL_17
  906. extern void pack_c17 (gfc_array_c17 *, const gfc_array_c17 *,
  907. const gfc_array_l1 *, const gfc_array_c17 *);
  908. internal_proto(pack_c17);
  909. #endif
  910. /* Internal auxiliary functions for the unpack intrinsic. */
  911. extern void unpack0_i1 (gfc_array_i1 *, const gfc_array_i1 *,
  912. const gfc_array_l1 *, const GFC_INTEGER_1 *);
  913. internal_proto(unpack0_i1);
  914. extern void unpack0_i2 (gfc_array_i2 *, const gfc_array_i2 *,
  915. const gfc_array_l1 *, const GFC_INTEGER_2 *);
  916. internal_proto(unpack0_i2);
  917. extern void unpack0_i4 (gfc_array_i4 *, const gfc_array_i4 *,
  918. const gfc_array_l1 *, const GFC_INTEGER_4 *);
  919. internal_proto(unpack0_i4);
  920. extern void unpack0_i8 (gfc_array_i8 *, const gfc_array_i8 *,
  921. const gfc_array_l1 *, const GFC_INTEGER_8 *);
  922. internal_proto(unpack0_i8);
  923. #ifdef HAVE_GFC_INTEGER_16
  924. extern void unpack0_i16 (gfc_array_i16 *, const gfc_array_i16 *,
  925. const gfc_array_l1 *, const GFC_INTEGER_16 *);
  926. internal_proto(unpack0_i16);
  927. #endif
  928. extern void unpack0_r4 (gfc_array_r4 *, const gfc_array_r4 *,
  929. const gfc_array_l1 *, const GFC_REAL_4 *);
  930. internal_proto(unpack0_r4);
  931. extern void unpack0_r8 (gfc_array_r8 *, const gfc_array_r8 *,
  932. const gfc_array_l1 *, const GFC_REAL_8 *);
  933. internal_proto(unpack0_r8);
  934. #ifdef HAVE_GFC_REAL_10
  935. extern void unpack0_r10 (gfc_array_r10 *, const gfc_array_r10 *,
  936. const gfc_array_l1 *, const GFC_REAL_10 *);
  937. internal_proto(unpack0_r10);
  938. #endif
  939. #ifdef HAVE_GFC_REAL_16
  940. extern void unpack0_r16 (gfc_array_r16 *, const gfc_array_r16 *,
  941. const gfc_array_l1 *, const GFC_REAL_16 *);
  942. internal_proto(unpack0_r16);
  943. #endif
  944. #ifdef HAVE_GFC_REAL_17
  945. extern void unpack0_r17 (gfc_array_r17 *, const gfc_array_r17 *,
  946. const gfc_array_l1 *, const GFC_REAL_17 *);
  947. internal_proto(unpack0_r17);
  948. #endif
  949. extern void unpack0_c4 (gfc_array_c4 *, const gfc_array_c4 *,
  950. const gfc_array_l1 *, const GFC_COMPLEX_4 *);
  951. internal_proto(unpack0_c4);
  952. extern void unpack0_c8 (gfc_array_c8 *, const gfc_array_c8 *,
  953. const gfc_array_l1 *, const GFC_COMPLEX_8 *);
  954. internal_proto(unpack0_c8);
  955. #ifdef HAVE_GFC_COMPLEX_10
  956. extern void unpack0_c10 (gfc_array_c10 *, const gfc_array_c10 *,
  957. const gfc_array_l1 *mask, const GFC_COMPLEX_10 *);
  958. internal_proto(unpack0_c10);
  959. #endif
  960. #ifdef HAVE_GFC_COMPLEX_16
  961. extern void unpack0_c16 (gfc_array_c16 *, const gfc_array_c16 *,
  962. const gfc_array_l1 *, const GFC_COMPLEX_16 *);
  963. internal_proto(unpack0_c16);
  964. #endif
  965. #ifdef HAVE_GFC_COMPLEX_17
  966. extern void unpack0_c17 (gfc_array_c17 *, const gfc_array_c17 *,
  967. const gfc_array_l1 *, const GFC_COMPLEX_17 *);
  968. internal_proto(unpack0_c17);
  969. #endif
  970. extern void unpack1_i1 (gfc_array_i1 *, const gfc_array_i1 *,
  971. const gfc_array_l1 *, const gfc_array_i1 *);
  972. internal_proto(unpack1_i1);
  973. extern void unpack1_i2 (gfc_array_i2 *, const gfc_array_i2 *,
  974. const gfc_array_l1 *, const gfc_array_i2 *);
  975. internal_proto(unpack1_i2);
  976. extern void unpack1_i4 (gfc_array_i4 *, const gfc_array_i4 *,
  977. const gfc_array_l1 *, const gfc_array_i4 *);
  978. internal_proto(unpack1_i4);
  979. extern void unpack1_i8 (gfc_array_i8 *, const gfc_array_i8 *,
  980. const gfc_array_l1 *, const gfc_array_i8 *);
  981. internal_proto(unpack1_i8);
  982. #ifdef HAVE_GFC_INTEGER_16
  983. extern void unpack1_i16 (gfc_array_i16 *, const gfc_array_i16 *,
  984. const gfc_array_l1 *, const gfc_array_i16 *);
  985. internal_proto(unpack1_i16);
  986. #endif
  987. extern void unpack1_r4 (gfc_array_r4 *, const gfc_array_r4 *,
  988. const gfc_array_l1 *, const gfc_array_r4 *);
  989. internal_proto(unpack1_r4);
  990. extern void unpack1_r8 (gfc_array_r8 *, const gfc_array_r8 *,
  991. const gfc_array_l1 *, const gfc_array_r8 *);
  992. internal_proto(unpack1_r8);
  993. #ifdef HAVE_GFC_REAL_10
  994. extern void unpack1_r10 (gfc_array_r10 *, const gfc_array_r10 *,
  995. const gfc_array_l1 *, const gfc_array_r10 *);
  996. internal_proto(unpack1_r10);
  997. #endif
  998. #ifdef HAVE_GFC_REAL_16
  999. extern void unpack1_r16 (gfc_array_r16 *, const gfc_array_r16 *,
  1000. const gfc_array_l1 *, const gfc_array_r16 *);
  1001. internal_proto(unpack1_r16);
  1002. #endif
  1003. #ifdef HAVE_GFC_REAL_17
  1004. extern void unpack1_r17 (gfc_array_r17 *, const gfc_array_r17 *,
  1005. const gfc_array_l1 *, const gfc_array_r17 *);
  1006. internal_proto(unpack1_r17);
  1007. #endif
  1008. extern void unpack1_c4 (gfc_array_c4 *, const gfc_array_c4 *,
  1009. const gfc_array_l1 *, const gfc_array_c4 *);
  1010. internal_proto(unpack1_c4);
  1011. extern void unpack1_c8 (gfc_array_c8 *, const gfc_array_c8 *,
  1012. const gfc_array_l1 *, const gfc_array_c8 *);
  1013. internal_proto(unpack1_c8);
  1014. #ifdef HAVE_GFC_COMPLEX_10
  1015. extern void unpack1_c10 (gfc_array_c10 *, const gfc_array_c10 *,
  1016. const gfc_array_l1 *, const gfc_array_c10 *);
  1017. internal_proto(unpack1_c10);
  1018. #endif
  1019. #ifdef HAVE_GFC_COMPLEX_16
  1020. extern void unpack1_c16 (gfc_array_c16 *, const gfc_array_c16 *,
  1021. const gfc_array_l1 *, const gfc_array_c16 *);
  1022. internal_proto(unpack1_c16);
  1023. #endif
  1024. #ifdef HAVE_GFC_COMPLEX_17
  1025. extern void unpack1_c17 (gfc_array_c17 *, const gfc_array_c17 *,
  1026. const gfc_array_l1 *, const gfc_array_c17 *);
  1027. internal_proto(unpack1_c17);
  1028. #endif
  1029. /* Helper functions for spread. */
  1030. extern void spread_i1 (gfc_array_i1 *, const gfc_array_i1 *,
  1031. const index_type, const index_type);
  1032. internal_proto(spread_i1);
  1033. extern void spread_i2 (gfc_array_i2 *, const gfc_array_i2 *,
  1034. const index_type, const index_type);
  1035. internal_proto(spread_i2);
  1036. extern void spread_i4 (gfc_array_i4 *, const gfc_array_i4 *,
  1037. const index_type, const index_type);
  1038. internal_proto(spread_i4);
  1039. extern void spread_i8 (gfc_array_i8 *, const gfc_array_i8 *,
  1040. const index_type, const index_type);
  1041. internal_proto(spread_i8);
  1042. #ifdef HAVE_GFC_INTEGER_16
  1043. extern void spread_i16 (gfc_array_i16 *, const gfc_array_i16 *,
  1044. const index_type, const index_type);
  1045. internal_proto(spread_i16);
  1046. #endif
  1047. extern void spread_r4 (gfc_array_r4 *, const gfc_array_r4 *,
  1048. const index_type, const index_type);
  1049. internal_proto(spread_r4);
  1050. extern void spread_r8 (gfc_array_r8 *, const gfc_array_r8 *,
  1051. const index_type, const index_type);
  1052. internal_proto(spread_r8);
  1053. #ifdef HAVE_GFC_REAL_10
  1054. extern void spread_r10 (gfc_array_r10 *, const gfc_array_r10 *,
  1055. const index_type, const index_type);
  1056. internal_proto(spread_r10);
  1057. #endif
  1058. #ifdef HAVE_GFC_REAL_16
  1059. extern void spread_r16 (gfc_array_r16 *, const gfc_array_r16 *,
  1060. const index_type, const index_type);
  1061. internal_proto(spread_r16);
  1062. #endif
  1063. #ifdef HAVE_GFC_REAL_17
  1064. extern void spread_r17 (gfc_array_r17 *, const gfc_array_r17 *,
  1065. const index_type, const index_type);
  1066. internal_proto(spread_r17);
  1067. #endif
  1068. extern void spread_c4 (gfc_array_c4 *, const gfc_array_c4 *,
  1069. const index_type, const index_type);
  1070. internal_proto(spread_c4);
  1071. extern void spread_c8 (gfc_array_c8 *, const gfc_array_c8 *,
  1072. const index_type, const index_type);
  1073. internal_proto(spread_c8);
  1074. #ifdef HAVE_GFC_COMPLEX_10
  1075. extern void spread_c10 (gfc_array_c10 *, const gfc_array_c10 *,
  1076. const index_type, const index_type);
  1077. internal_proto(spread_c10);
  1078. #endif
  1079. #ifdef HAVE_GFC_COMPLEX_16
  1080. extern void spread_c16 (gfc_array_c16 *, const gfc_array_c16 *,
  1081. const index_type, const index_type);
  1082. internal_proto(spread_c16);
  1083. #endif
  1084. #ifdef HAVE_GFC_COMPLEX_17
  1085. extern void spread_c17 (gfc_array_c17 *, const gfc_array_c17 *,
  1086. const index_type, const index_type);
  1087. internal_proto(spread_c17);
  1088. #endif
  1089. extern void spread_scalar_i1 (gfc_array_i1 *, const GFC_INTEGER_1 *,
  1090. const index_type, const index_type);
  1091. internal_proto(spread_scalar_i1);
  1092. extern void spread_scalar_i2 (gfc_array_i2 *, const GFC_INTEGER_2 *,
  1093. const index_type, const index_type);
  1094. internal_proto(spread_scalar_i2);
  1095. extern void spread_scalar_i4 (gfc_array_i4 *, const GFC_INTEGER_4 *,
  1096. const index_type, const index_type);
  1097. internal_proto(spread_scalar_i4);
  1098. extern void spread_scalar_i8 (gfc_array_i8 *, const GFC_INTEGER_8 *,
  1099. const index_type, const index_type);
  1100. internal_proto(spread_scalar_i8);
  1101. #ifdef HAVE_GFC_INTEGER_16
  1102. extern void spread_scalar_i16 (gfc_array_i16 *, const GFC_INTEGER_16 *,
  1103. const index_type, const index_type);
  1104. internal_proto(spread_scalar_i16);
  1105. #endif
  1106. extern void spread_scalar_r4 (gfc_array_r4 *, const GFC_REAL_4 *,
  1107. const index_type, const index_type);
  1108. internal_proto(spread_scalar_r4);
  1109. extern void spread_scalar_r8 (gfc_array_r8 *, const GFC_REAL_8 *,
  1110. const index_type, const index_type);
  1111. internal_proto(spread_scalar_r8);
  1112. #ifdef HAVE_GFC_REAL_10
  1113. extern void spread_scalar_r10 (gfc_array_r10 *, const GFC_REAL_10 *,
  1114. const index_type, const index_type);
  1115. internal_proto(spread_scalar_r10);
  1116. #endif
  1117. #ifdef HAVE_GFC_REAL_16
  1118. extern void spread_scalar_r16 (gfc_array_r16 *, const GFC_REAL_16 *,
  1119. const index_type, const index_type);
  1120. internal_proto(spread_scalar_r16);
  1121. #endif
  1122. #ifdef HAVE_GFC_REAL_17
  1123. extern void spread_scalar_r17 (gfc_array_r17 *, const GFC_REAL_17 *,
  1124. const index_type, const index_type);
  1125. internal_proto(spread_scalar_r17);
  1126. #endif
  1127. extern void spread_scalar_c4 (gfc_array_c4 *, const GFC_COMPLEX_4 *,
  1128. const index_type, const index_type);
  1129. internal_proto(spread_scalar_c4);
  1130. extern void spread_scalar_c8 (gfc_array_c8 *, const GFC_COMPLEX_8 *,
  1131. const index_type, const index_type);
  1132. internal_proto(spread_scalar_c8);
  1133. #ifdef HAVE_GFC_COMPLEX_10
  1134. extern void spread_scalar_c10 (gfc_array_c10 *, const GFC_COMPLEX_10 *,
  1135. const index_type, const index_type);
  1136. internal_proto(spread_scalar_c10);
  1137. #endif
  1138. #ifdef HAVE_GFC_COMPLEX_16
  1139. extern void spread_scalar_c16 (gfc_array_c16 *, const GFC_COMPLEX_16 *,
  1140. const index_type, const index_type);
  1141. internal_proto(spread_scalar_c16);
  1142. #endif
  1143. #ifdef HAVE_GFC_COMPLEX_17
  1144. extern void spread_scalar_c17 (gfc_array_c17 *, const GFC_COMPLEX_17 *,
  1145. const index_type, const index_type);
  1146. internal_proto(spread_scalar_c17);
  1147. #endif
  1148. /* string_intrinsics.c */
  1149. extern int compare_string (gfc_charlen_type, const char *,
  1150. gfc_charlen_type, const char *);
  1151. iexport_proto(compare_string);
  1152. extern int compare_string_char4 (gfc_charlen_type, const gfc_char4_t *,
  1153. gfc_charlen_type, const gfc_char4_t *);
  1154. iexport_proto(compare_string_char4);
  1155. extern int memcmp_char4 (const void *, const void *, size_t);
  1156. internal_proto(memcmp_char4);
  1157. /* random.c */
  1158. extern void random_seed_i4 (GFC_INTEGER_4 * size, gfc_array_i4 * put,
  1159. gfc_array_i4 * get);
  1160. iexport_proto(random_seed_i4);
  1161. extern void random_seed_i8 (GFC_INTEGER_8 * size, gfc_array_i8 * put,
  1162. gfc_array_i8 * get);
  1163. iexport_proto(random_seed_i8);
  1164. /* size.c */
  1165. typedef GFC_ARRAY_DESCRIPTOR (void) array_t;
  1166. extern index_type size0 (const array_t * array);
  1167. iexport_proto(size0);
  1168. /* is_contiguous.c */
  1169. extern GFC_LOGICAL_4 is_contiguous0 (const array_t * const restrict array);
  1170. iexport_proto(is_contiguous0);
  1171. /* bounds.c */
  1172. extern void bounds_equal_extents (array_t *, array_t *, const char *,
  1173. const char *);
  1174. internal_proto(bounds_equal_extents);
  1175. extern void bounds_reduced_extents (array_t *, array_t *, int, const char *,
  1176. const char *intrinsic);
  1177. internal_proto(bounds_reduced_extents);
  1178. extern void bounds_iforeach_return (array_t *, array_t *, const char *);
  1179. internal_proto(bounds_iforeach_return);
  1180. extern void bounds_ifunction_return (array_t *, const index_type *,
  1181. const char *, const char *);
  1182. internal_proto(bounds_ifunction_return);
  1183. extern index_type count_0 (const gfc_array_l1 *);
  1184. internal_proto(count_0);
  1185. /* Internal auxiliary functions for cshift */
  1186. void cshift0_i1 (gfc_array_i1 *, const gfc_array_i1 *, ptrdiff_t, int);
  1187. internal_proto(cshift0_i1);
  1188. void cshift0_i2 (gfc_array_i2 *, const gfc_array_i2 *, ptrdiff_t, int);
  1189. internal_proto(cshift0_i2);
  1190. void cshift0_i4 (gfc_array_i4 *, const gfc_array_i4 *, ptrdiff_t, int);
  1191. internal_proto(cshift0_i4);
  1192. void cshift0_i8 (gfc_array_i8 *, const gfc_array_i8 *, ptrdiff_t, int);
  1193. internal_proto(cshift0_i8);
  1194. #ifdef HAVE_GFC_INTEGER_16
  1195. void cshift0_i16 (gfc_array_i16 *, const gfc_array_i16 *, ptrdiff_t, int);
  1196. internal_proto(cshift0_i16);
  1197. #endif
  1198. void cshift0_r4 (gfc_array_r4 *, const gfc_array_r4 *, ptrdiff_t, int);
  1199. internal_proto(cshift0_r4);
  1200. void cshift0_r8 (gfc_array_r8 *, const gfc_array_r8 *, ptrdiff_t, int);
  1201. internal_proto(cshift0_r8);
  1202. #ifdef HAVE_GFC_REAL_10
  1203. void cshift0_r10 (gfc_array_r10 *, const gfc_array_r10 *, ptrdiff_t, int);
  1204. internal_proto(cshift0_r10);
  1205. #endif
  1206. #ifdef HAVE_GFC_REAL_16
  1207. void cshift0_r16 (gfc_array_r16 *, const gfc_array_r16 *, ptrdiff_t, int);
  1208. internal_proto(cshift0_r16);
  1209. #endif
  1210. #ifdef HAVE_GFC_REAL_17
  1211. void cshift0_r17 (gfc_array_r17 *, const gfc_array_r17 *, ptrdiff_t, int);
  1212. internal_proto(cshift0_r17);
  1213. #endif
  1214. void cshift0_c4 (gfc_array_c4 *, const gfc_array_c4 *, ptrdiff_t, int);
  1215. internal_proto(cshift0_c4);
  1216. void cshift0_c8 (gfc_array_c8 *, const gfc_array_c8 *, ptrdiff_t, int);
  1217. internal_proto(cshift0_c8);
  1218. #ifdef HAVE_GFC_COMPLEX_10
  1219. void cshift0_c10 (gfc_array_c10 *, const gfc_array_c10 *, ptrdiff_t, int);
  1220. internal_proto(cshift0_c10);
  1221. #endif
  1222. #ifdef HAVE_GFC_COMPLEX_16
  1223. void cshift0_c16 (gfc_array_c16 *, const gfc_array_c16 *, ptrdiff_t, int);
  1224. internal_proto(cshift0_c16);
  1225. #endif
  1226. #ifdef HAVE_GFC_COMPLEX_17
  1227. void cshift0_c17 (gfc_array_c17 *, const gfc_array_c17 *, ptrdiff_t, int);
  1228. internal_proto(cshift0_c17);
  1229. #endif
  1230. #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_1)
  1231. void cshift1_4_i1 (gfc_array_i1 * const restrict,
  1232. const gfc_array_i1 * const restrict,
  1233. const gfc_array_i4 * const restrict,
  1234. const GFC_INTEGER_4 * const restrict);
  1235. internal_proto(cshift1_4_i1);
  1236. #endif
  1237. #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_2)
  1238. void cshift1_4_i2 (gfc_array_i2 * const restrict,
  1239. const gfc_array_i2 * const restrict,
  1240. const gfc_array_i4 * const restrict,
  1241. const GFC_INTEGER_4 * const restrict);
  1242. internal_proto(cshift1_4_i2);
  1243. #endif
  1244. #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_4)
  1245. void cshift1_4_i4 (gfc_array_i4 * const restrict,
  1246. const gfc_array_i4 * const restrict,
  1247. const gfc_array_i4 * const restrict,
  1248. const GFC_INTEGER_4 * const restrict);
  1249. internal_proto(cshift1_4_i4);
  1250. #endif
  1251. #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_8)
  1252. void cshift1_4_i8 (gfc_array_i8 * const restrict,
  1253. const gfc_array_i8 * const restrict,
  1254. const gfc_array_i4 * const restrict,
  1255. const GFC_INTEGER_4 * const restrict);
  1256. internal_proto(cshift1_4_i8);
  1257. #endif
  1258. #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_16)
  1259. void cshift1_4_i16 (gfc_array_i16 * const restrict,
  1260. const gfc_array_i16 * const restrict,
  1261. const gfc_array_i4 * const restrict,
  1262. const GFC_INTEGER_4 * const restrict);
  1263. internal_proto(cshift1_4_i16);
  1264. #endif
  1265. #if defined (HAVE_GFC_INTEGER_8) && defined (HAVE_GFC_INTEGER_1)
  1266. void cshift1_8_i1 (gfc_array_i1 * const restrict,
  1267. const gfc_array_i1 * const restrict,
  1268. const gfc_array_i8 * const restrict,
  1269. const GFC_INTEGER_8 * const restrict);
  1270. internal_proto(cshift1_8_i1);
  1271. #endif
  1272. #if defined (HAVE_GFC_INTEGER_8) && defined (HAVE_GFC_INTEGER_2)
  1273. void cshift1_8_i2 (gfc_array_i2 * const restrict,
  1274. const gfc_array_i2 * const restrict,
  1275. const gfc_array_i8 * const restrict,
  1276. const GFC_INTEGER_8 * const restrict);
  1277. internal_proto(cshift1_8_i2);
  1278. #endif
  1279. #if defined (HAVE_GFC_INTEGER_8) && defined (HAVE_GFC_INTEGER_4)
  1280. void cshift1_8_i4 (gfc_array_i4 * const restrict,
  1281. const gfc_array_i4 * const restrict,
  1282. const gfc_array_i8 * const restrict,
  1283. const GFC_INTEGER_8 * const restrict);
  1284. internal_proto(cshift1_8_i4);
  1285. #endif
  1286. #if defined (HAVE_GFC_INTEGER_8) && defined (HAVE_GFC_INTEGER_8)
  1287. void cshift1_8_i8 (gfc_array_i8 * const restrict,
  1288. const gfc_array_i8 * const restrict,
  1289. const gfc_array_i8 * const restrict,
  1290. const GFC_INTEGER_8 * const restrict);
  1291. internal_proto(cshift1_8_i8);
  1292. #endif
  1293. #if defined (HAVE_GFC_INTEGER_8) && defined (HAVE_GFC_INTEGER_16)
  1294. void cshift1_8_i16 (gfc_array_i16 * const restrict,
  1295. const gfc_array_i16 * const restrict,
  1296. const gfc_array_i8 * const restrict,
  1297. const GFC_INTEGER_8 * const restrict);
  1298. internal_proto(cshift1_8_i16);
  1299. #endif
  1300. #if defined (HAVE_GFC_INTEGER_16) && defined (HAVE_GFC_INTEGER_1)
  1301. void cshift1_16_i1 (gfc_array_i1 * const restrict,
  1302. const gfc_array_i1 * const restrict,
  1303. const gfc_array_i16 * const restrict,
  1304. const GFC_INTEGER_16 * const restrict);
  1305. internal_proto(cshift1_16_i1);
  1306. #endif
  1307. #if defined (HAVE_GFC_INTEGER_16) && defined (HAVE_GFC_INTEGER_2)
  1308. void cshift1_16_i2 (gfc_array_i2 * const restrict,
  1309. const gfc_array_i2 * const restrict,
  1310. const gfc_array_i16 * const restrict,
  1311. const GFC_INTEGER_16 * const restrict);
  1312. internal_proto(cshift1_16_i2);
  1313. #endif
  1314. #if defined (HAVE_GFC_INTEGER_16) && defined (HAVE_GFC_INTEGER_4)
  1315. void cshift1_16_i4 (gfc_array_i4 * const restrict,
  1316. const gfc_array_i4 * const restrict,
  1317. const gfc_array_i16 * const restrict,
  1318. const GFC_INTEGER_16 * const restrict);
  1319. internal_proto(cshift1_16_i4);
  1320. #endif
  1321. #if defined (HAVE_GFC_INTEGER_16) && defined (HAVE_GFC_INTEGER_8)
  1322. void cshift1_16_i8 (gfc_array_i8 * const restrict,
  1323. const gfc_array_i8 * const restrict,
  1324. const gfc_array_i16 * const restrict,
  1325. const GFC_INTEGER_16 * const restrict);
  1326. internal_proto(cshift1_16_i8);
  1327. #endif
  1328. #if defined (HAVE_GFC_INTEGER_16) && defined (HAVE_GFC_INTEGER_16)
  1329. void cshift1_16_i16 (gfc_array_i16 * const restrict,
  1330. const gfc_array_i16 * const restrict,
  1331. const gfc_array_i16 * const restrict,
  1332. const GFC_INTEGER_16 * const restrict);
  1333. internal_proto(cshift1_16_i16);
  1334. #endif
  1335. #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_REAL_4)
  1336. void cshift1_4_r4 (gfc_array_r4 * const restrict,
  1337. const gfc_array_r4 * const restrict,
  1338. const gfc_array_i4 * const restrict,
  1339. const GFC_INTEGER_4 * const restrict);
  1340. internal_proto(cshift1_4_r4);
  1341. #endif
  1342. #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_REAL_8)
  1343. void cshift1_4_r8 (gfc_array_r8 * const restrict,
  1344. const gfc_array_r8 * const restrict,
  1345. const gfc_array_i4 * const restrict,
  1346. const GFC_INTEGER_4 * const restrict);
  1347. internal_proto(cshift1_4_r8);
  1348. #endif
  1349. #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_REAL_10)
  1350. void cshift1_4_r10 (gfc_array_r10 * const restrict,
  1351. const gfc_array_r10 * const restrict,
  1352. const gfc_array_i4 * const restrict,
  1353. const GFC_INTEGER_4 * const restrict);
  1354. internal_proto(cshift1_4_r10);
  1355. #endif
  1356. #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_REAL_16)
  1357. void cshift1_4_r16 (gfc_array_r16 * const restrict,
  1358. const gfc_array_r16 * const restrict,
  1359. const gfc_array_i4 * const restrict,
  1360. const GFC_INTEGER_4 * const restrict);
  1361. internal_proto(cshift1_4_r16);
  1362. #endif
  1363. #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_REAL_17)
  1364. void cshift1_4_r17 (gfc_array_r17 * const restrict,
  1365. const gfc_array_r17 * const restrict,
  1366. const gfc_array_i4 * const restrict,
  1367. const GFC_INTEGER_4 * const restrict);
  1368. internal_proto(cshift1_4_r17);
  1369. #endif
  1370. #if defined (HAVE_GFC_INTEGER_8) && defined (HAVE_GFC_REAL_4)
  1371. void cshift1_8_r4 (gfc_array_r4 * const restrict,
  1372. const gfc_array_r4 * const restrict,
  1373. const gfc_array_i8 * const restrict,
  1374. const GFC_INTEGER_8 * const restrict);
  1375. internal_proto(cshift1_8_r4);
  1376. #endif
  1377. #if defined (HAVE_GFC_INTEGER_8) && defined (HAVE_GFC_REAL_8)
  1378. void cshift1_8_r8 (gfc_array_r8 * const restrict,
  1379. const gfc_array_r8 * const restrict,
  1380. const gfc_array_i8 * const restrict,
  1381. const GFC_INTEGER_8 * const restrict);
  1382. internal_proto(cshift1_8_r8);
  1383. #endif
  1384. #if defined (HAVE_GFC_INTEGER_8) && defined (HAVE_GFC_REAL_10)
  1385. void cshift1_8_r10 (gfc_array_r10 * const restrict,
  1386. const gfc_array_r10 * const restrict,
  1387. const gfc_array_i8 * const restrict,
  1388. const GFC_INTEGER_8 * const restrict);
  1389. internal_proto(cshift1_8_r10);
  1390. #endif
  1391. #if defined (HAVE_GFC_INTEGER_8) && defined (HAVE_GFC_REAL_16)
  1392. void cshift1_8_r16 (gfc_array_r16 * const restrict,
  1393. const gfc_array_r16 * const restrict,
  1394. const gfc_array_i8 * const restrict,
  1395. const GFC_INTEGER_8 * const restrict);
  1396. internal_proto(cshift1_8_r16);
  1397. #endif
  1398. #if defined (HAVE_GFC_INTEGER_8) && defined (HAVE_GFC_REAL_17)
  1399. void cshift1_8_r17 (gfc_array_r17 * const restrict,
  1400. const gfc_array_r17 * const restrict,
  1401. const gfc_array_i8 * const restrict,
  1402. const GFC_INTEGER_8 * const restrict);
  1403. internal_proto(cshift1_8_r17);
  1404. #endif
  1405. #if defined (HAVE_GFC_INTEGER_16) && defined (HAVE_GFC_REAL_4)
  1406. void cshift1_16_r4 (gfc_array_r4 * const restrict,
  1407. const gfc_array_r4 * const restrict,
  1408. const gfc_array_i16 * const restrict,
  1409. const GFC_INTEGER_16 * const restrict);
  1410. internal_proto(cshift1_16_r4);
  1411. #endif
  1412. #if defined (HAVE_GFC_INTEGER_16) && defined (HAVE_GFC_REAL_8)
  1413. void cshift1_16_r8 (gfc_array_r8 * const restrict,
  1414. const gfc_array_r8 * const restrict,
  1415. const gfc_array_i16 * const restrict,
  1416. const GFC_INTEGER_16 * const restrict);
  1417. internal_proto(cshift1_16_r8);
  1418. #endif
  1419. #if defined (HAVE_GFC_INTEGER_16) && defined (HAVE_GFC_REAL_10)
  1420. void cshift1_16_r10 (gfc_array_r10 * const restrict,
  1421. const gfc_array_r10 * const restrict,
  1422. const gfc_array_i16 * const restrict,
  1423. const GFC_INTEGER_16 * const restrict);
  1424. internal_proto(cshift1_16_r10);
  1425. #endif
  1426. #if defined (HAVE_GFC_INTEGER_16) && defined (HAVE_GFC_REAL_16)
  1427. void cshift1_16_r16 (gfc_array_r16 * const restrict,
  1428. const gfc_array_r16 * const restrict,
  1429. const gfc_array_i16 * const restrict,
  1430. const GFC_INTEGER_16 * const restrict);
  1431. internal_proto(cshift1_16_r16);
  1432. #endif
  1433. #if defined (HAVE_GFC_INTEGER_16) && defined (HAVE_GFC_REAL_17)
  1434. void cshift1_16_r17 (gfc_array_r17 * const restrict,
  1435. const gfc_array_r17 * const restrict,
  1436. const gfc_array_i16 * const restrict,
  1437. const GFC_INTEGER_16 * const restrict);
  1438. internal_proto(cshift1_16_r17);
  1439. #endif
  1440. #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_COMPLEX_4)
  1441. void cshift1_4_c4 (gfc_array_c4 * const restrict,
  1442. const gfc_array_c4 * const restrict,
  1443. const gfc_array_i4 * const restrict,
  1444. const GFC_INTEGER_4 * const restrict);
  1445. internal_proto(cshift1_4_c4);
  1446. #endif
  1447. #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_COMPLEX_8)
  1448. void cshift1_4_c8 (gfc_array_c8 * const restrict,
  1449. const gfc_array_c8 * const restrict,
  1450. const gfc_array_i4 * const restrict,
  1451. const GFC_INTEGER_4 * const restrict);
  1452. internal_proto(cshift1_4_c8);
  1453. #endif
  1454. #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_COMPLEX_10)
  1455. void cshift1_4_c10 (gfc_array_c10 * const restrict,
  1456. const gfc_array_c10 * const restrict,
  1457. const gfc_array_i4 * const restrict,
  1458. const GFC_INTEGER_4 * const restrict);
  1459. internal_proto(cshift1_4_c10);
  1460. #endif
  1461. #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_COMPLEX_16)
  1462. void cshift1_4_c16 (gfc_array_c16 * const restrict,
  1463. const gfc_array_c16 * const restrict,
  1464. const gfc_array_i4 * const restrict,
  1465. const GFC_INTEGER_4 * const restrict);
  1466. internal_proto(cshift1_4_c16);
  1467. #endif
  1468. #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_COMPLEX_17)
  1469. void cshift1_4_c17 (gfc_array_c17 * const restrict,
  1470. const gfc_array_c17 * const restrict,
  1471. const gfc_array_i4 * const restrict,
  1472. const GFC_INTEGER_4 * const restrict);
  1473. internal_proto(cshift1_4_c17);
  1474. #endif
  1475. #if defined (HAVE_GFC_INTEGER_8) && defined (HAVE_GFC_COMPLEX_4)
  1476. void cshift1_8_c4 (gfc_array_c4 * const restrict,
  1477. const gfc_array_c4 * const restrict,
  1478. const gfc_array_i8 * const restrict,
  1479. const GFC_INTEGER_8 * const restrict);
  1480. internal_proto(cshift1_8_c4);
  1481. #endif
  1482. #if defined (HAVE_GFC_INTEGER_8) && defined (HAVE_GFC_COMPLEX_8)
  1483. void cshift1_8_c8 (gfc_array_c8 * const restrict,
  1484. const gfc_array_c8 * const restrict,
  1485. const gfc_array_i8 * const restrict,
  1486. const GFC_INTEGER_8 * const restrict);
  1487. internal_proto(cshift1_8_c8);
  1488. #endif
  1489. #if defined (HAVE_GFC_INTEGER_8) && defined (HAVE_GFC_COMPLEX_10)
  1490. void cshift1_8_c10 (gfc_array_c10 * const restrict,
  1491. const gfc_array_c10 * const restrict,
  1492. const gfc_array_i8 * const restrict,
  1493. const GFC_INTEGER_8 * const restrict);
  1494. internal_proto(cshift1_8_c10);
  1495. #endif
  1496. #if defined (HAVE_GFC_INTEGER_8) && defined (HAVE_GFC_COMPLEX_16)
  1497. void cshift1_8_c16 (gfc_array_c16 * const restrict,
  1498. const gfc_array_c16 * const restrict,
  1499. const gfc_array_i8 * const restrict,
  1500. const GFC_INTEGER_8 * const restrict);
  1501. internal_proto(cshift1_8_c16);
  1502. #endif
  1503. #if defined (HAVE_GFC_INTEGER_8) && defined (HAVE_GFC_COMPLEX_17)
  1504. void cshift1_8_c17 (gfc_array_c17 * const restrict,
  1505. const gfc_array_c17 * const restrict,
  1506. const gfc_array_i8 * const restrict,
  1507. const GFC_INTEGER_8 * const restrict);
  1508. internal_proto(cshift1_8_c17);
  1509. #endif
  1510. #if defined (HAVE_GFC_INTEGER_16) && defined (HAVE_GFC_COMPLEX_4)
  1511. void cshift1_16_c4 (gfc_array_c4 * const restrict,
  1512. const gfc_array_c4 * const restrict,
  1513. const gfc_array_i16 * const restrict,
  1514. const GFC_INTEGER_16 * const restrict);
  1515. internal_proto(cshift1_16_c4);
  1516. #endif
  1517. #if defined (HAVE_GFC_INTEGER_16) && defined (HAVE_GFC_COMPLEX_8)
  1518. void cshift1_16_c8 (gfc_array_c8 * const restrict,
  1519. const gfc_array_c8 * const restrict,
  1520. const gfc_array_i16 * const restrict,
  1521. const GFC_INTEGER_16 * const restrict);
  1522. internal_proto(cshift1_16_c8);
  1523. #endif
  1524. #if defined (HAVE_GFC_INTEGER_16) && defined (HAVE_GFC_COMPLEX_10)
  1525. void cshift1_16_c10 (gfc_array_c10 * const restrict,
  1526. const gfc_array_c10 * const restrict,
  1527. const gfc_array_i16 * const restrict,
  1528. const GFC_INTEGER_16 * const restrict);
  1529. internal_proto(cshift1_16_c10);
  1530. #endif
  1531. #if defined (HAVE_GFC_INTEGER_16) && defined (HAVE_GFC_COMPLEX_16)
  1532. void cshift1_16_c16 (gfc_array_c16 * const restrict,
  1533. const gfc_array_c16 * const restrict,
  1534. const gfc_array_i16 * const restrict,
  1535. const GFC_INTEGER_16 * const restrict);
  1536. internal_proto(cshift1_16_c16);
  1537. #endif
  1538. #if defined (HAVE_GFC_INTEGER_16) && defined (HAVE_GFC_COMPLEX_17)
  1539. void cshift1_16_c17 (gfc_array_c17 * const restrict,
  1540. const gfc_array_c17 * const restrict,
  1541. const gfc_array_i16 * const restrict,
  1542. const GFC_INTEGER_16 * const restrict);
  1543. internal_proto(cshift1_16_c17);
  1544. #endif
  1545. /* Prototypes for the POWER __ieee128 functions. */
  1546. #ifdef POWER_IEEE128
  1547. extern __float128 __acoshieee128 (__float128)
  1548. __attribute__ ((__nothrow__, __leaf__));
  1549. extern __float128 __acosieee128 (__float128)
  1550. __attribute__ ((__nothrow__, __leaf__));
  1551. extern __float128 __asinhieee128 (__float128)
  1552. __attribute__ ((__nothrow__, __leaf__));
  1553. extern __float128 __asinieee128 (__float128)
  1554. __attribute__ ((__nothrow__, __leaf__));
  1555. extern __float128 __atan2ieee128 (__float128)
  1556. __attribute__ ((__nothrow__, __leaf__));
  1557. extern __float128 __atanhieee128 (__float128)
  1558. __attribute__ ((__nothrow__, __leaf__));
  1559. extern __float128 __atanieee128 (__float128)
  1560. __attribute__ ((__nothrow__, __leaf__));
  1561. extern __float128 __copysignieee128 (__float128, __float128)
  1562. __attribute__ ((__nothrow__, __leaf__));
  1563. extern __float128 __coshieee128 (__float128)
  1564. __attribute__ ((__nothrow__, __leaf__));
  1565. extern __float128 __cosieee128 (__float128)
  1566. __attribute__ ((__nothrow__, __leaf__));
  1567. extern __float128 __erfcieee128 (__float128)
  1568. __attribute__ ((__nothrow__, __leaf__));
  1569. extern __float128 __erfieee128 (__float128)
  1570. __attribute__ ((__nothrow__, __leaf__));
  1571. extern __float128 __expieee128 (__float128)
  1572. __attribute__ ((__nothrow__, __leaf__));
  1573. extern __float128 __fabsieee128 (__float128)
  1574. __attribute__ ((__nothrow__, __leaf__));
  1575. extern __float128 __fmaieee128 (__float128, __float128, __float128)
  1576. __attribute__ ((__nothrow__, __leaf__));
  1577. extern __float128 __fmodieee128 (__float128, __float128)
  1578. __attribute__ ((__nothrow__, __leaf__));
  1579. extern __float128 __jnieee128 (int, __float128)
  1580. __attribute__ ((__nothrow__, __leaf__));
  1581. extern __float128 __log10ieee128 (__float128)
  1582. __attribute__ ((__nothrow__, __leaf__));
  1583. extern __float128 __logieee128 (__float128)
  1584. __attribute__ ((__nothrow__, __leaf__));
  1585. extern __float128 __powieee128 (__float128)
  1586. __attribute__ ((__nothrow__, __leaf__));
  1587. extern __float128 __sinhieee128 (__float128)
  1588. __attribute__ ((__nothrow__, __leaf__));
  1589. extern __float128 __sinieee128 (__float128)
  1590. __attribute__ ((__nothrow__, __leaf__));
  1591. extern __float128 __sqrtieee128 (__float128)
  1592. __attribute__ ((__nothrow__, __leaf__));
  1593. extern __float128 __tanhieee128 (__float128)
  1594. __attribute__ ((__nothrow__, __leaf__));
  1595. extern __float128 __tanieee128 (__float128)
  1596. __attribute__ ((__nothrow__, __leaf__));
  1597. extern __float128 __ynieee128 (int , __float128)
  1598. __attribute__ ((__nothrow__, __leaf__));
  1599. extern __float128 __strtoieee128 (const char *, char **)
  1600. __attribute__ ((__nothrow__, __leaf__));
  1601. extern int __snprintfieee128 (char *, size_t, const char *, ...)
  1602. __attribute__ ((__nothrow__));
  1603. #endif
  1604. /* We always have these. */
  1605. #define HAVE_GFC_UINTEGER_1 1
  1606. #define HAVE_GFC_UINTEGER_4 1
  1607. #endif /* LIBGFOR_H */