1 /* Header file for intrinsics check, resolve and simplify function
3 Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
4 Free Software Foundation, Inc.
5 Contributed by Andy Vaught & Katherine Holcomb
7 This file is part of GCC.
9 GCC is free software; you can redistribute it and/or modify it under
10 the terms of the GNU General Public License as published by the Free
11 Software Foundation; either version 3, or (at your option) any later
14 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
15 WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19 You should have received a copy of the GNU General Public License
20 along with GCC; see the file COPYING3. If not see
21 <http://www.gnu.org/licenses/>. */
23 /* Expression returned when simplification fails. */
25 extern gfc_expr gfc_bad_expr
;
28 /* Check functions. */
29 gfc_try
gfc_check_a_ikind (gfc_expr
*, gfc_expr
*);
30 gfc_try
gfc_check_a_xkind (gfc_expr
*, gfc_expr
*);
31 gfc_try
gfc_check_a_p (gfc_expr
*, gfc_expr
*);
32 gfc_try
gfc_check_x_yd (gfc_expr
*, gfc_expr
*);
34 gfc_try
gfc_check_abs (gfc_expr
*);
35 gfc_try
gfc_check_access_func (gfc_expr
*, gfc_expr
*);
36 gfc_try
gfc_check_achar (gfc_expr
*, gfc_expr
*);
37 gfc_try
gfc_check_all_any (gfc_expr
*, gfc_expr
*);
38 gfc_try
gfc_check_allocated (gfc_expr
*);
39 gfc_try
gfc_check_associated (gfc_expr
*, gfc_expr
*);
40 gfc_try
gfc_check_atan_2 (gfc_expr
*, gfc_expr
*);
41 gfc_try
gfc_check_atan2 (gfc_expr
*, gfc_expr
*);
42 gfc_try
gfc_check_besn (gfc_expr
*, gfc_expr
*);
43 gfc_try
gfc_check_btest (gfc_expr
*, gfc_expr
*);
44 gfc_try
gfc_check_char (gfc_expr
*, gfc_expr
*);
45 gfc_try
gfc_check_chdir (gfc_expr
*);
46 gfc_try
gfc_check_chmod (gfc_expr
*, gfc_expr
*);
47 gfc_try
gfc_check_cmplx (gfc_expr
*, gfc_expr
*, gfc_expr
*);
48 gfc_try
gfc_check_complex (gfc_expr
*, gfc_expr
*);
49 gfc_try
gfc_check_count (gfc_expr
*, gfc_expr
*, gfc_expr
*);
50 gfc_try
gfc_check_cshift (gfc_expr
*, gfc_expr
*, gfc_expr
*);
51 gfc_try
gfc_check_ctime (gfc_expr
*);
52 gfc_try
gfc_check_datan2 (gfc_expr
*, gfc_expr
*);
53 gfc_try
gfc_check_dcmplx (gfc_expr
*, gfc_expr
*);
54 gfc_try
gfc_check_dble (gfc_expr
*);
55 gfc_try
gfc_check_digits (gfc_expr
*);
56 gfc_try
gfc_check_dot_product (gfc_expr
*, gfc_expr
*);
57 gfc_try
gfc_check_dprod (gfc_expr
*, gfc_expr
*);
58 gfc_try
gfc_check_eoshift (gfc_expr
*, gfc_expr
*, gfc_expr
*, gfc_expr
*);
59 gfc_try
gfc_check_dtime_etime (gfc_expr
*);
60 gfc_try
gfc_check_fgetputc (gfc_expr
*, gfc_expr
*);
61 gfc_try
gfc_check_fgetput (gfc_expr
*);
62 gfc_try
gfc_check_fstat (gfc_expr
*, gfc_expr
*);
63 gfc_try
gfc_check_ftell (gfc_expr
*);
64 gfc_try
gfc_check_fn_c (gfc_expr
*);
65 gfc_try
gfc_check_fn_d (gfc_expr
*);
66 gfc_try
gfc_check_fn_r (gfc_expr
*);
67 gfc_try
gfc_check_fn_rc (gfc_expr
*);
68 gfc_try
gfc_check_fn_rc2008 (gfc_expr
*);
69 gfc_try
gfc_check_fnum (gfc_expr
*);
70 gfc_try
gfc_check_hostnm (gfc_expr
*);
71 gfc_try
gfc_check_huge (gfc_expr
*);
72 gfc_try
gfc_check_hypot (gfc_expr
*, gfc_expr
*);
73 gfc_try
gfc_check_i (gfc_expr
*);
74 gfc_try
gfc_check_iand (gfc_expr
*, gfc_expr
*);
75 gfc_try
gfc_check_and (gfc_expr
*, gfc_expr
*);
76 gfc_try
gfc_check_ibclr (gfc_expr
*, gfc_expr
*);
77 gfc_try
gfc_check_ibits (gfc_expr
*, gfc_expr
*, gfc_expr
*);
78 gfc_try
gfc_check_ibset (gfc_expr
*, gfc_expr
*);
79 gfc_try
gfc_check_ichar_iachar (gfc_expr
*, gfc_expr
*);
80 gfc_try
gfc_check_idnint (gfc_expr
*);
81 gfc_try
gfc_check_ieor (gfc_expr
*, gfc_expr
*);
82 gfc_try
gfc_check_index (gfc_expr
*, gfc_expr
*, gfc_expr
*, gfc_expr
*);
83 gfc_try
gfc_check_int (gfc_expr
*, gfc_expr
*);
84 gfc_try
gfc_check_intconv (gfc_expr
*);
85 gfc_try
gfc_check_ior (gfc_expr
*, gfc_expr
*);
86 gfc_try
gfc_check_irand (gfc_expr
*);
87 gfc_try
gfc_check_isatty (gfc_expr
*);
88 gfc_try
gfc_check_isnan (gfc_expr
*);
89 gfc_try
gfc_check_ishft (gfc_expr
*, gfc_expr
*);
90 gfc_try
gfc_check_ishftc (gfc_expr
*, gfc_expr
*, gfc_expr
*);
91 gfc_try
gfc_check_kill (gfc_expr
*, gfc_expr
*);
92 gfc_try
gfc_check_kind (gfc_expr
*);
93 gfc_try
gfc_check_lbound (gfc_expr
*, gfc_expr
*, gfc_expr
*);
94 gfc_try
gfc_check_len_lentrim (gfc_expr
*, gfc_expr
*);
95 gfc_try
gfc_check_link (gfc_expr
*, gfc_expr
*);
96 gfc_try
gfc_check_lge_lgt_lle_llt (gfc_expr
*, gfc_expr
*);
97 gfc_try
gfc_check_loc (gfc_expr
*);
98 gfc_try
gfc_check_logical (gfc_expr
*, gfc_expr
*);
99 gfc_try
gfc_check_min_max (gfc_actual_arglist
*);
100 gfc_try
gfc_check_min_max_integer (gfc_actual_arglist
*);
101 gfc_try
gfc_check_min_max_real (gfc_actual_arglist
*);
102 gfc_try
gfc_check_min_max_double (gfc_actual_arglist
*);
103 gfc_try
gfc_check_malloc (gfc_expr
*);
104 gfc_try
gfc_check_matmul (gfc_expr
*, gfc_expr
*);
105 gfc_try
gfc_check_merge (gfc_expr
*, gfc_expr
*, gfc_expr
*);
106 gfc_try
gfc_check_minloc_maxloc (gfc_actual_arglist
*);
107 gfc_try
gfc_check_minval_maxval (gfc_actual_arglist
*);
108 gfc_try
gfc_check_nearest (gfc_expr
*, gfc_expr
*);
109 gfc_try
gfc_check_new_line (gfc_expr
*);
110 gfc_try
gfc_check_null (gfc_expr
*);
111 gfc_try
gfc_check_pack (gfc_expr
*, gfc_expr
*, gfc_expr
*);
112 gfc_try
gfc_check_precision (gfc_expr
*);
113 gfc_try
gfc_check_present (gfc_expr
*);
114 gfc_try
gfc_check_product_sum (gfc_actual_arglist
*);
115 gfc_try
gfc_check_radix (gfc_expr
*);
116 gfc_try
gfc_check_rand (gfc_expr
*);
117 gfc_try
gfc_check_range (gfc_expr
*);
118 gfc_try
gfc_check_real (gfc_expr
*, gfc_expr
*);
119 gfc_try
gfc_check_rename (gfc_expr
*, gfc_expr
*);
120 gfc_try
gfc_check_repeat (gfc_expr
*, gfc_expr
*);
121 gfc_try
gfc_check_reshape (gfc_expr
*, gfc_expr
*, gfc_expr
*, gfc_expr
*);
122 gfc_try
gfc_check_scale (gfc_expr
*, gfc_expr
*);
123 gfc_try
gfc_check_scan (gfc_expr
*, gfc_expr
*, gfc_expr
*, gfc_expr
*);
124 gfc_try
gfc_check_second_sub (gfc_expr
*);
125 gfc_try
gfc_check_secnds (gfc_expr
*);
126 gfc_try
gfc_check_selected_char_kind (gfc_expr
*);
127 gfc_try
gfc_check_selected_int_kind (gfc_expr
*);
128 gfc_try
gfc_check_selected_real_kind (gfc_expr
*, gfc_expr
*);
129 gfc_try
gfc_check_set_exponent (gfc_expr
*, gfc_expr
*);
130 gfc_try
gfc_check_shape (gfc_expr
*);
131 gfc_try
gfc_check_size (gfc_expr
*, gfc_expr
*, gfc_expr
*);
132 gfc_try
gfc_check_sign (gfc_expr
*, gfc_expr
*);
133 gfc_try
gfc_check_signal (gfc_expr
*, gfc_expr
*);
134 gfc_try
gfc_check_sizeof (gfc_expr
*);
135 gfc_try
gfc_check_spread (gfc_expr
*, gfc_expr
*, gfc_expr
*);
136 gfc_try
gfc_check_srand (gfc_expr
*);
137 gfc_try
gfc_check_stat (gfc_expr
*, gfc_expr
*);
138 gfc_try
gfc_check_sum (gfc_expr
*, gfc_expr
*, gfc_expr
*);
139 gfc_try
gfc_check_symlnk (gfc_expr
*, gfc_expr
*);
140 gfc_try
gfc_check_transfer (gfc_expr
*, gfc_expr
*, gfc_expr
*);
141 gfc_try
gfc_check_transpose (gfc_expr
*);
142 gfc_try
gfc_check_trim (gfc_expr
*);
143 gfc_try
gfc_check_ttynam (gfc_expr
*);
144 gfc_try
gfc_check_ubound (gfc_expr
*, gfc_expr
*, gfc_expr
*);
145 gfc_try
gfc_check_umask (gfc_expr
*);
146 gfc_try
gfc_check_unlink (gfc_expr
*);
147 gfc_try
gfc_check_unpack (gfc_expr
*, gfc_expr
*, gfc_expr
*);
148 gfc_try
gfc_check_verify (gfc_expr
*, gfc_expr
*, gfc_expr
*, gfc_expr
*);
149 gfc_try
gfc_check_x (gfc_expr
*);
152 /* Intrinsic subroutines. */
153 gfc_try
gfc_check_alarm_sub (gfc_expr
*, gfc_expr
*, gfc_expr
*);
154 gfc_try
gfc_check_chdir_sub (gfc_expr
*, gfc_expr
*);
155 gfc_try
gfc_check_chmod_sub (gfc_expr
*, gfc_expr
*, gfc_expr
*);
156 gfc_try
gfc_check_cpu_time (gfc_expr
*);
157 gfc_try
gfc_check_ctime_sub (gfc_expr
*, gfc_expr
*);
158 gfc_try
gfc_check_system_clock (gfc_expr
*, gfc_expr
*, gfc_expr
*);
159 gfc_try
gfc_check_date_and_time (gfc_expr
*, gfc_expr
*, gfc_expr
*, gfc_expr
*);
160 gfc_try
gfc_check_exit (gfc_expr
*);
161 gfc_try
gfc_check_fdate_sub (gfc_expr
*);
162 gfc_try
gfc_check_flush (gfc_expr
*);
163 gfc_try
gfc_check_free (gfc_expr
*);
164 gfc_try
gfc_check_fstat_sub (gfc_expr
*, gfc_expr
*, gfc_expr
*);
165 gfc_try
gfc_check_gerror (gfc_expr
*);
166 gfc_try
gfc_check_getarg (gfc_expr
*, gfc_expr
*);
167 gfc_try
gfc_check_getlog (gfc_expr
*);
168 gfc_try
gfc_check_move_alloc (gfc_expr
*, gfc_expr
*);
169 gfc_try
gfc_check_mvbits (gfc_expr
*, gfc_expr
*, gfc_expr
*, gfc_expr
*,
171 gfc_try
gfc_check_random_number (gfc_expr
*);
172 gfc_try
gfc_check_random_seed (gfc_expr
*, gfc_expr
*, gfc_expr
*);
173 gfc_try
gfc_check_dtime_etime_sub (gfc_expr
*, gfc_expr
*);
174 gfc_try
gfc_check_fgetputc_sub (gfc_expr
*, gfc_expr
*, gfc_expr
*);
175 gfc_try
gfc_check_fgetput_sub (gfc_expr
*, gfc_expr
*);
176 gfc_try
gfc_check_fseek_sub (gfc_expr
*, gfc_expr
*, gfc_expr
*, gfc_expr
*);
177 gfc_try
gfc_check_ftell_sub (gfc_expr
*, gfc_expr
*);
178 gfc_try
gfc_check_getcwd_sub (gfc_expr
*, gfc_expr
*);
179 gfc_try
gfc_check_hostnm_sub (gfc_expr
*, gfc_expr
*);
180 gfc_try
gfc_check_itime_idate (gfc_expr
*);
181 gfc_try
gfc_check_kill_sub (gfc_expr
*, gfc_expr
*, gfc_expr
*);
182 gfc_try
gfc_check_ltime_gmtime (gfc_expr
*, gfc_expr
*);
183 gfc_try
gfc_check_perror (gfc_expr
*);
184 gfc_try
gfc_check_rename_sub (gfc_expr
*, gfc_expr
*, gfc_expr
*);
185 gfc_try
gfc_check_link_sub (gfc_expr
*, gfc_expr
*, gfc_expr
*);
186 gfc_try
gfc_check_symlnk_sub (gfc_expr
*, gfc_expr
*, gfc_expr
*);
187 gfc_try
gfc_check_signal_sub (gfc_expr
*, gfc_expr
*, gfc_expr
*);
188 gfc_try
gfc_check_sleep_sub (gfc_expr
*);
189 gfc_try
gfc_check_stat_sub (gfc_expr
*, gfc_expr
*, gfc_expr
*);
190 gfc_try
gfc_check_system_sub (gfc_expr
*, gfc_expr
*);
191 gfc_try
gfc_check_ttynam_sub (gfc_expr
*, gfc_expr
*);
192 gfc_try
gfc_check_umask_sub (gfc_expr
*, gfc_expr
*);
193 gfc_try
gfc_check_unlink_sub (gfc_expr
*, gfc_expr
*);
196 /* Simplification functions. */
197 gfc_expr
*gfc_simplify_abs (gfc_expr
*);
198 gfc_expr
*gfc_simplify_achar (gfc_expr
*, gfc_expr
*);
199 gfc_expr
*gfc_simplify_acos (gfc_expr
*);
200 gfc_expr
*gfc_simplify_acosh (gfc_expr
*);
201 gfc_expr
*gfc_simplify_adjustl (gfc_expr
*);
202 gfc_expr
*gfc_simplify_adjustr (gfc_expr
*);
203 gfc_expr
*gfc_simplify_aimag (gfc_expr
*);
204 gfc_expr
*gfc_simplify_aint (gfc_expr
*, gfc_expr
*);
205 gfc_expr
*gfc_simplify_all (gfc_expr
*, gfc_expr
*);
206 gfc_expr
*gfc_simplify_dint (gfc_expr
*);
207 gfc_expr
*gfc_simplify_anint (gfc_expr
*, gfc_expr
*);
208 gfc_expr
*gfc_simplify_dnint (gfc_expr
*);
209 gfc_expr
*gfc_simplify_and (gfc_expr
*, gfc_expr
*);
210 gfc_expr
*gfc_simplify_any (gfc_expr
*, gfc_expr
*);
211 gfc_expr
*gfc_simplify_asin (gfc_expr
*);
212 gfc_expr
*gfc_simplify_asinh (gfc_expr
*);
213 gfc_expr
*gfc_simplify_atan (gfc_expr
*);
214 gfc_expr
*gfc_simplify_atanh (gfc_expr
*);
215 gfc_expr
*gfc_simplify_atan2 (gfc_expr
*, gfc_expr
*);
216 gfc_expr
*gfc_simplify_bessel_j0 (gfc_expr
*);
217 gfc_expr
*gfc_simplify_bessel_j1 (gfc_expr
*);
218 gfc_expr
*gfc_simplify_bessel_jn (gfc_expr
*, gfc_expr
*);
219 gfc_expr
*gfc_simplify_bessel_y0 (gfc_expr
*);
220 gfc_expr
*gfc_simplify_bessel_y1 (gfc_expr
*);
221 gfc_expr
*gfc_simplify_bessel_yn (gfc_expr
*, gfc_expr
*);
222 gfc_expr
*gfc_simplify_bit_size (gfc_expr
*);
223 gfc_expr
*gfc_simplify_btest (gfc_expr
*, gfc_expr
*);
224 gfc_expr
*gfc_simplify_ceiling (gfc_expr
*, gfc_expr
*);
225 gfc_expr
*gfc_simplify_char (gfc_expr
*, gfc_expr
*);
226 gfc_expr
*gfc_simplify_cmplx (gfc_expr
*, gfc_expr
*, gfc_expr
*);
227 gfc_expr
*gfc_simplify_complex (gfc_expr
*, gfc_expr
*);
228 gfc_expr
*gfc_simplify_conjg (gfc_expr
*);
229 gfc_expr
*gfc_simplify_cos (gfc_expr
*);
230 gfc_expr
*gfc_simplify_cosh (gfc_expr
*);
231 gfc_expr
*gfc_simplify_count (gfc_expr
*, gfc_expr
*, gfc_expr
*);
232 gfc_expr
*gfc_simplify_dcmplx (gfc_expr
*, gfc_expr
*);
233 gfc_expr
*gfc_simplify_dble (gfc_expr
*);
234 gfc_expr
*gfc_simplify_digits (gfc_expr
*);
235 gfc_expr
*gfc_simplify_dim (gfc_expr
*, gfc_expr
*);
236 gfc_expr
*gfc_simplify_dprod (gfc_expr
*, gfc_expr
*);
237 gfc_expr
*gfc_simplify_dot_product (gfc_expr
*, gfc_expr
*);
238 gfc_expr
*gfc_simplify_epsilon (gfc_expr
*);
239 gfc_expr
*gfc_simplify_erf (gfc_expr
*);
240 gfc_expr
*gfc_simplify_erfc (gfc_expr
*);
241 gfc_expr
*gfc_simplify_erfc_scaled (gfc_expr
*);
242 gfc_expr
*gfc_simplify_exp (gfc_expr
*);
243 gfc_expr
*gfc_simplify_exponent (gfc_expr
*);
244 gfc_expr
*gfc_simplify_float (gfc_expr
*);
245 gfc_expr
*gfc_simplify_floor (gfc_expr
*, gfc_expr
*);
246 gfc_expr
*gfc_simplify_fraction (gfc_expr
*);
247 gfc_expr
*gfc_simplify_gamma (gfc_expr
*);
248 gfc_expr
*gfc_simplify_huge (gfc_expr
*);
249 gfc_expr
*gfc_simplify_hypot (gfc_expr
*, gfc_expr
*);
250 gfc_expr
*gfc_simplify_iachar (gfc_expr
*, gfc_expr
*);
251 gfc_expr
*gfc_simplify_iand (gfc_expr
*, gfc_expr
*);
252 gfc_expr
*gfc_simplify_ibclr (gfc_expr
*, gfc_expr
*);
253 gfc_expr
*gfc_simplify_ibits (gfc_expr
*, gfc_expr
*, gfc_expr
*);
254 gfc_expr
*gfc_simplify_ibset (gfc_expr
*, gfc_expr
*);
255 gfc_expr
*gfc_simplify_ichar (gfc_expr
*, gfc_expr
*);
256 gfc_expr
*gfc_simplify_ieor (gfc_expr
*, gfc_expr
*);
257 gfc_expr
*gfc_simplify_index (gfc_expr
*, gfc_expr
*, gfc_expr
*, gfc_expr
*);
258 gfc_expr
*gfc_simplify_int (gfc_expr
*, gfc_expr
*);
259 gfc_expr
*gfc_simplify_int2 (gfc_expr
*);
260 gfc_expr
*gfc_simplify_int8 (gfc_expr
*);
261 gfc_expr
*gfc_simplify_long (gfc_expr
*);
262 gfc_expr
*gfc_simplify_ifix (gfc_expr
*);
263 gfc_expr
*gfc_simplify_idint (gfc_expr
*);
264 gfc_expr
*gfc_simplify_ior (gfc_expr
*, gfc_expr
*);
265 gfc_expr
*gfc_simplify_is_iostat_end (gfc_expr
*);
266 gfc_expr
*gfc_simplify_is_iostat_eor (gfc_expr
*);
267 gfc_expr
*gfc_simplify_isnan (gfc_expr
*);
268 gfc_expr
*gfc_simplify_ishft (gfc_expr
*, gfc_expr
*);
269 gfc_expr
*gfc_simplify_ishftc (gfc_expr
*, gfc_expr
*, gfc_expr
*);
270 gfc_expr
*gfc_simplify_kind (gfc_expr
*);
271 gfc_expr
*gfc_simplify_lbound (gfc_expr
*, gfc_expr
*, gfc_expr
*);
272 gfc_expr
*gfc_simplify_leadz (gfc_expr
*);
273 gfc_expr
*gfc_simplify_len (gfc_expr
*, gfc_expr
*);
274 gfc_expr
*gfc_simplify_len_trim (gfc_expr
*, gfc_expr
*);
275 gfc_expr
*gfc_simplify_lgamma (gfc_expr
*);
276 gfc_expr
*gfc_simplify_lge (gfc_expr
*, gfc_expr
*);
277 gfc_expr
*gfc_simplify_lgt (gfc_expr
*, gfc_expr
*);
278 gfc_expr
*gfc_simplify_lle (gfc_expr
*, gfc_expr
*);
279 gfc_expr
*gfc_simplify_llt (gfc_expr
*, gfc_expr
*);
280 gfc_expr
*gfc_simplify_log (gfc_expr
*);
281 gfc_expr
*gfc_simplify_log10 (gfc_expr
*);
282 gfc_expr
*gfc_simplify_logical (gfc_expr
*, gfc_expr
*);
283 gfc_expr
*gfc_simplify_matmul (gfc_expr
*, gfc_expr
*);
284 gfc_expr
*gfc_simplify_merge (gfc_expr
*, gfc_expr
*, gfc_expr
*);
285 gfc_expr
*gfc_simplify_min (gfc_expr
*);
286 gfc_expr
*gfc_simplify_minval (gfc_expr
*, gfc_expr
*, gfc_expr
*);
287 gfc_expr
*gfc_simplify_max (gfc_expr
*);
288 gfc_expr
*gfc_simplify_maxval (gfc_expr
*, gfc_expr
*, gfc_expr
*);
289 gfc_expr
*gfc_simplify_maxexponent (gfc_expr
*);
290 gfc_expr
*gfc_simplify_minexponent (gfc_expr
*);
291 gfc_expr
*gfc_simplify_mod (gfc_expr
*, gfc_expr
*);
292 gfc_expr
*gfc_simplify_modulo (gfc_expr
*, gfc_expr
*);
293 gfc_expr
*gfc_simplify_mvbits (gfc_expr
*, gfc_expr
*, gfc_expr
*, gfc_expr
*,
295 gfc_expr
*gfc_simplify_nearest (gfc_expr
*, gfc_expr
*);
296 gfc_expr
*gfc_simplify_new_line (gfc_expr
*);
297 gfc_expr
*gfc_simplify_nint (gfc_expr
*, gfc_expr
*);
298 gfc_expr
*gfc_simplify_null (gfc_expr
*);
299 gfc_expr
*gfc_simplify_idnint (gfc_expr
*);
300 gfc_expr
*gfc_simplify_not (gfc_expr
*);
301 gfc_expr
*gfc_simplify_or (gfc_expr
*, gfc_expr
*);
302 gfc_expr
*gfc_simplify_pack (gfc_expr
*, gfc_expr
*, gfc_expr
*);
303 gfc_expr
*gfc_simplify_precision (gfc_expr
*);
304 gfc_expr
*gfc_simplify_product (gfc_expr
*, gfc_expr
*, gfc_expr
*);
305 gfc_expr
*gfc_simplify_radix (gfc_expr
*);
306 gfc_expr
*gfc_simplify_range (gfc_expr
*);
307 gfc_expr
*gfc_simplify_real (gfc_expr
*, gfc_expr
*);
308 gfc_expr
*gfc_simplify_realpart (gfc_expr
*);
309 gfc_expr
*gfc_simplify_repeat (gfc_expr
*, gfc_expr
*);
310 gfc_expr
*gfc_simplify_reshape (gfc_expr
*, gfc_expr
*, gfc_expr
*,
312 gfc_expr
*gfc_simplify_rrspacing (gfc_expr
*);
313 gfc_expr
*gfc_simplify_scale (gfc_expr
*, gfc_expr
*);
314 gfc_expr
*gfc_simplify_scan (gfc_expr
*, gfc_expr
*, gfc_expr
*, gfc_expr
*);
315 gfc_expr
*gfc_simplify_selected_char_kind (gfc_expr
*);
316 gfc_expr
*gfc_simplify_selected_int_kind (gfc_expr
*);
317 gfc_expr
*gfc_simplify_selected_real_kind (gfc_expr
*, gfc_expr
*);
318 gfc_expr
*gfc_simplify_set_exponent (gfc_expr
*, gfc_expr
*);
319 gfc_expr
*gfc_simplify_sign (gfc_expr
*, gfc_expr
*);
320 gfc_expr
*gfc_simplify_shape (gfc_expr
*);
321 gfc_expr
*gfc_simplify_sin (gfc_expr
*);
322 gfc_expr
*gfc_simplify_sinh (gfc_expr
*);
323 gfc_expr
*gfc_simplify_size (gfc_expr
*, gfc_expr
*, gfc_expr
*);
324 gfc_expr
*gfc_simplify_sngl (gfc_expr
*);
325 gfc_expr
*gfc_simplify_spacing (gfc_expr
*);
326 gfc_expr
*gfc_simplify_spread (gfc_expr
*, gfc_expr
*, gfc_expr
*);
327 gfc_expr
*gfc_simplify_sqrt (gfc_expr
*);
328 gfc_expr
*gfc_simplify_sum (gfc_expr
*, gfc_expr
*, gfc_expr
*);
329 gfc_expr
*gfc_simplify_tan (gfc_expr
*);
330 gfc_expr
*gfc_simplify_tanh (gfc_expr
*);
331 gfc_expr
*gfc_simplify_tiny (gfc_expr
*);
332 gfc_expr
*gfc_simplify_trailz (gfc_expr
*);
333 gfc_expr
*gfc_simplify_transfer (gfc_expr
*, gfc_expr
*, gfc_expr
*);
334 gfc_expr
*gfc_simplify_transpose (gfc_expr
*);
335 gfc_expr
*gfc_simplify_trim (gfc_expr
*);
336 gfc_expr
*gfc_simplify_ubound (gfc_expr
*, gfc_expr
*, gfc_expr
*);
337 gfc_expr
*gfc_simplify_unpack (gfc_expr
*, gfc_expr
*, gfc_expr
*);
338 gfc_expr
*gfc_simplify_verify (gfc_expr
*, gfc_expr
*, gfc_expr
*, gfc_expr
*);
339 gfc_expr
*gfc_simplify_xor (gfc_expr
*, gfc_expr
*);
341 /* Constant conversion simplification. */
342 gfc_expr
*gfc_convert_constant (gfc_expr
*, bt
, int);
343 gfc_expr
*gfc_convert_char_constant (gfc_expr
*, bt
, int);
346 /* Resolution functions. */
347 void gfc_resolve_abs (gfc_expr
*, gfc_expr
*);
348 void gfc_resolve_access (gfc_expr
*, gfc_expr
*, gfc_expr
*);
349 void gfc_resolve_adjustl (gfc_expr
*, gfc_expr
*);
350 void gfc_resolve_adjustr (gfc_expr
*, gfc_expr
*);
351 void gfc_resolve_achar (gfc_expr
*, gfc_expr
*, gfc_expr
*);
352 void gfc_resolve_acos (gfc_expr
*, gfc_expr
*);
353 void gfc_resolve_acosh (gfc_expr
*, gfc_expr
*);
354 void gfc_resolve_aimag (gfc_expr
*, gfc_expr
*);
355 void gfc_resolve_aint (gfc_expr
*, gfc_expr
*, gfc_expr
*);
356 void gfc_resolve_dint (gfc_expr
*, gfc_expr
*);
357 void gfc_resolve_all (gfc_expr
*, gfc_expr
*, gfc_expr
*);
358 void gfc_resolve_anint (gfc_expr
*, gfc_expr
*, gfc_expr
*);
359 void gfc_resolve_dnint (gfc_expr
*, gfc_expr
*);
360 void gfc_resolve_and (gfc_expr
*, gfc_expr
*, gfc_expr
*);
361 void gfc_resolve_any (gfc_expr
*, gfc_expr
*, gfc_expr
*);
362 void gfc_resolve_asin (gfc_expr
*, gfc_expr
*);
363 void gfc_resolve_asinh (gfc_expr
*, gfc_expr
*);
364 void gfc_resolve_atan (gfc_expr
*, gfc_expr
*);
365 void gfc_resolve_atanh (gfc_expr
*, gfc_expr
*);
366 void gfc_resolve_atan2 (gfc_expr
*, gfc_expr
*, gfc_expr
*);
367 void gfc_resolve_besn (gfc_expr
*, gfc_expr
*, gfc_expr
*);
368 void gfc_resolve_btest (gfc_expr
*, gfc_expr
*, gfc_expr
*);
369 void gfc_resolve_ceiling (gfc_expr
*, gfc_expr
*, gfc_expr
*);
370 void gfc_resolve_char (gfc_expr
*, gfc_expr
*, gfc_expr
*);
371 void gfc_resolve_chdir (gfc_expr
*, gfc_expr
*);
372 void gfc_resolve_chmod (gfc_expr
*, gfc_expr
*, gfc_expr
*);
373 void gfc_resolve_cmplx (gfc_expr
*, gfc_expr
*, gfc_expr
*, gfc_expr
*);
374 void gfc_resolve_dcmplx (gfc_expr
*, gfc_expr
*, gfc_expr
*);
375 void gfc_resolve_complex (gfc_expr
*, gfc_expr
*, gfc_expr
*);
376 void gfc_resolve_conjg (gfc_expr
*, gfc_expr
*);
377 void gfc_resolve_cos (gfc_expr
*, gfc_expr
*);
378 void gfc_resolve_cosh (gfc_expr
*, gfc_expr
*);
379 void gfc_resolve_count (gfc_expr
*, gfc_expr
*, gfc_expr
*, gfc_expr
*);
380 void gfc_resolve_cshift (gfc_expr
*, gfc_expr
*, gfc_expr
*, gfc_expr
*);
381 void gfc_resolve_ctime (gfc_expr
*, gfc_expr
*);
382 void gfc_resolve_dble (gfc_expr
*, gfc_expr
*);
383 void gfc_resolve_dim (gfc_expr
*, gfc_expr
*, gfc_expr
*);
384 void gfc_resolve_dot_product (gfc_expr
*, gfc_expr
*, gfc_expr
*);
385 void gfc_resolve_dprod (gfc_expr
*, gfc_expr
*, gfc_expr
*);
386 void gfc_resolve_dtime_sub (gfc_code
*);
387 void gfc_resolve_eoshift (gfc_expr
*, gfc_expr
*, gfc_expr
*, gfc_expr
*,
389 void gfc_resolve_etime_sub (gfc_code
*);
390 void gfc_resolve_exp (gfc_expr
*, gfc_expr
*);
391 void gfc_resolve_exponent (gfc_expr
*, gfc_expr
*);
392 void gfc_resolve_fdate (gfc_expr
*);
393 void gfc_resolve_floor (gfc_expr
*, gfc_expr
*, gfc_expr
*);
394 void gfc_resolve_fnum (gfc_expr
*, gfc_expr
*);
395 void gfc_resolve_fraction (gfc_expr
*, gfc_expr
*);
396 void gfc_resolve_fstat (gfc_expr
*, gfc_expr
*, gfc_expr
*);
397 void gfc_resolve_ftell (gfc_expr
*, gfc_expr
*);
398 void gfc_resolve_fgetc (gfc_expr
*, gfc_expr
*, gfc_expr
*);
399 void gfc_resolve_fget (gfc_expr
*, gfc_expr
*);
400 void gfc_resolve_fputc (gfc_expr
*, gfc_expr
*, gfc_expr
*);
401 void gfc_resolve_fput (gfc_expr
*, gfc_expr
*);
402 void gfc_resolve_g77_math1 (gfc_expr
*, gfc_expr
*);
403 void gfc_resolve_gamma (gfc_expr
*, gfc_expr
*);
404 void gfc_resolve_getcwd (gfc_expr
*, gfc_expr
*);
405 void gfc_resolve_getgid (gfc_expr
*);
406 void gfc_resolve_getpid (gfc_expr
*);
407 void gfc_resolve_getuid (gfc_expr
*);
408 void gfc_resolve_hostnm (gfc_expr
*, gfc_expr
*);
409 void gfc_resolve_hypot (gfc_expr
*, gfc_expr
*, gfc_expr
*);
410 void gfc_resolve_iand (gfc_expr
*, gfc_expr
*, gfc_expr
*);
411 void gfc_resolve_ibclr (gfc_expr
*, gfc_expr
*, gfc_expr
*);
412 void gfc_resolve_ibits (gfc_expr
*, gfc_expr
*, gfc_expr
*, gfc_expr
*);
413 void gfc_resolve_ibset (gfc_expr
*, gfc_expr
*, gfc_expr
*);
414 void gfc_resolve_index_func (gfc_expr
*, gfc_expr
*, gfc_expr
*, gfc_expr
*,
416 void gfc_resolve_ierrno (gfc_expr
*);
417 void gfc_resolve_ieor (gfc_expr
*, gfc_expr
*, gfc_expr
*);
418 void gfc_resolve_ichar (gfc_expr
*, gfc_expr
*, gfc_expr
*);
419 void gfc_resolve_iachar (gfc_expr
*, gfc_expr
*, gfc_expr
*);
420 void gfc_resolve_idnint (gfc_expr
*, gfc_expr
*);
421 void gfc_resolve_int (gfc_expr
*, gfc_expr
*, gfc_expr
*);
422 void gfc_resolve_int2 (gfc_expr
*, gfc_expr
*);
423 void gfc_resolve_int8 (gfc_expr
*, gfc_expr
*);
424 void gfc_resolve_long (gfc_expr
*, gfc_expr
*);
425 void gfc_resolve_ior (gfc_expr
*, gfc_expr
*, gfc_expr
*);
426 void gfc_resolve_isatty (gfc_expr
*, gfc_expr
*);
427 void gfc_resolve_rshift (gfc_expr
*, gfc_expr
*, gfc_expr
*);
428 void gfc_resolve_lshift (gfc_expr
*, gfc_expr
*, gfc_expr
*);
429 void gfc_resolve_ishft (gfc_expr
*, gfc_expr
*, gfc_expr
*);
430 void gfc_resolve_ishftc (gfc_expr
*, gfc_expr
*, gfc_expr
*, gfc_expr
*);
431 void gfc_resolve_kill (gfc_expr
*, gfc_expr
*, gfc_expr
*);
432 void gfc_resolve_lbound (gfc_expr
*, gfc_expr
*, gfc_expr
*, gfc_expr
*);
433 void gfc_resolve_len (gfc_expr
*, gfc_expr
*, gfc_expr
*);
434 void gfc_resolve_len_trim (gfc_expr
*, gfc_expr
*, gfc_expr
*);
435 void gfc_resolve_lgamma (gfc_expr
*, gfc_expr
*);
436 void gfc_resolve_link (gfc_expr
*, gfc_expr
*, gfc_expr
*);
437 void gfc_resolve_loc (gfc_expr
*, gfc_expr
*);
438 void gfc_resolve_log (gfc_expr
*, gfc_expr
*);
439 void gfc_resolve_log10 (gfc_expr
*, gfc_expr
*);
440 void gfc_resolve_logical (gfc_expr
*, gfc_expr
*, gfc_expr
*);
441 void gfc_resolve_lstat (gfc_expr
*, gfc_expr
*, gfc_expr
*);
442 void gfc_resolve_malloc (gfc_expr
*, gfc_expr
*);
443 void gfc_resolve_matmul (gfc_expr
*, gfc_expr
*, gfc_expr
*);
444 void gfc_resolve_max (gfc_expr
*, gfc_actual_arglist
*);
445 void gfc_resolve_maxloc (gfc_expr
*, gfc_expr
*, gfc_expr
*, gfc_expr
*);
446 void gfc_resolve_maxval (gfc_expr
*, gfc_expr
*, gfc_expr
*, gfc_expr
*);
447 void gfc_resolve_mclock (gfc_expr
*);
448 void gfc_resolve_mclock8 (gfc_expr
*);
449 void gfc_resolve_merge (gfc_expr
*, gfc_expr
*, gfc_expr
*, gfc_expr
*);
450 void gfc_resolve_min (gfc_expr
*, gfc_actual_arglist
*);
451 void gfc_resolve_minloc (gfc_expr
*, gfc_expr
*, gfc_expr
*, gfc_expr
*);
452 void gfc_resolve_minval (gfc_expr
*, gfc_expr
*, gfc_expr
*, gfc_expr
*);
453 void gfc_resolve_mod (gfc_expr
*, gfc_expr
*, gfc_expr
*);
454 void gfc_resolve_modulo (gfc_expr
*, gfc_expr
*, gfc_expr
*);
455 void gfc_resolve_nearest (gfc_expr
*, gfc_expr
*, gfc_expr
*);
456 void gfc_resolve_nint (gfc_expr
*, gfc_expr
*, gfc_expr
*);
457 void gfc_resolve_not (gfc_expr
*, gfc_expr
*);
458 void gfc_resolve_or (gfc_expr
*, gfc_expr
*, gfc_expr
*);
459 void gfc_resolve_pack (gfc_expr
*, gfc_expr
*, gfc_expr
*, gfc_expr
*);
460 void gfc_resolve_product (gfc_expr
*, gfc_expr
*, gfc_expr
*, gfc_expr
*);
461 void gfc_resolve_real (gfc_expr
*, gfc_expr
*, gfc_expr
*);
462 void gfc_resolve_realpart (gfc_expr
*, gfc_expr
*);
463 void gfc_resolve_rename (gfc_expr
*, gfc_expr
*, gfc_expr
*);
464 void gfc_resolve_repeat (gfc_expr
*, gfc_expr
*, gfc_expr
*);
465 void gfc_resolve_reshape (gfc_expr
*, gfc_expr
*, gfc_expr
*, gfc_expr
*,
467 void gfc_resolve_rrspacing (gfc_expr
*, gfc_expr
*);
468 void gfc_resolve_scale (gfc_expr
*, gfc_expr
*, gfc_expr
*);
469 void gfc_resolve_scan (gfc_expr
*, gfc_expr
*, gfc_expr
*, gfc_expr
*,
471 void gfc_resolve_second_sub (gfc_code
*);
472 void gfc_resolve_secnds (gfc_expr
*, gfc_expr
*);
473 void gfc_resolve_set_exponent (gfc_expr
*, gfc_expr
*, gfc_expr
*);
474 void gfc_resolve_shape (gfc_expr
*, gfc_expr
*);
475 void gfc_resolve_sign (gfc_expr
*, gfc_expr
*, gfc_expr
*);
476 void gfc_resolve_signal (gfc_expr
*, gfc_expr
*, gfc_expr
*);
477 void gfc_resolve_sin (gfc_expr
*, gfc_expr
*);
478 void gfc_resolve_sinh (gfc_expr
*, gfc_expr
*);
479 void gfc_resolve_size (gfc_expr
*, gfc_expr
*, gfc_expr
*, gfc_expr
*);
480 void gfc_resolve_spacing (gfc_expr
*, gfc_expr
*);
481 void gfc_resolve_spread (gfc_expr
*, gfc_expr
*, gfc_expr
*, gfc_expr
*);
482 void gfc_resolve_sqrt (gfc_expr
*, gfc_expr
*);
483 void gfc_resolve_stat (gfc_expr
*, gfc_expr
*, gfc_expr
*);
484 void gfc_resolve_srand (gfc_code
*);
485 void gfc_resolve_sum (gfc_expr
*, gfc_expr
*, gfc_expr
*, gfc_expr
*);
486 void gfc_resolve_symlnk (gfc_expr
*, gfc_expr
*, gfc_expr
*);
487 void gfc_resolve_system (gfc_expr
*, gfc_expr
*);
488 void gfc_resolve_tan (gfc_expr
*, gfc_expr
*);
489 void gfc_resolve_tanh (gfc_expr
*, gfc_expr
*);
490 void gfc_resolve_time (gfc_expr
*);
491 void gfc_resolve_time8 (gfc_expr
*);
492 void gfc_resolve_transfer (gfc_expr
*, gfc_expr
*, gfc_expr
*, gfc_expr
*);
493 void gfc_resolve_transpose (gfc_expr
*, gfc_expr
*);
494 void gfc_resolve_trim (gfc_expr
*, gfc_expr
*);
495 void gfc_resolve_ttynam (gfc_expr
*, gfc_expr
*);
496 void gfc_resolve_ubound (gfc_expr
*, gfc_expr
*, gfc_expr
*, gfc_expr
*);
497 void gfc_resolve_umask (gfc_expr
*, gfc_expr
*);
498 void gfc_resolve_unlink (gfc_expr
*, gfc_expr
*);
499 void gfc_resolve_unpack (gfc_expr
*, gfc_expr
*, gfc_expr
*, gfc_expr
*);
500 void gfc_resolve_verify (gfc_expr
*, gfc_expr
*, gfc_expr
*, gfc_expr
*,
502 void gfc_resolve_xor (gfc_expr
*, gfc_expr
*, gfc_expr
*);
505 /* Intrinsic subroutine resolution. */
506 void gfc_resolve_alarm_sub (gfc_code
*);
507 void gfc_resolve_chdir_sub (gfc_code
*);
508 void gfc_resolve_chmod_sub (gfc_code
*);
509 void gfc_resolve_cpu_time (gfc_code
*);
510 void gfc_resolve_ctime_sub (gfc_code
*);
511 void gfc_resolve_exit (gfc_code
*);
512 void gfc_resolve_fdate_sub (gfc_code
*);
513 void gfc_resolve_flush (gfc_code
*);
514 void gfc_resolve_free (gfc_code
*);
515 void gfc_resolve_fseek_sub (gfc_code
*);
516 void gfc_resolve_fstat_sub (gfc_code
*);
517 void gfc_resolve_ftell_sub (gfc_code
*);
518 void gfc_resolve_fgetc_sub (gfc_code
*);
519 void gfc_resolve_fget_sub (gfc_code
*);
520 void gfc_resolve_fputc_sub (gfc_code
*);
521 void gfc_resolve_fput_sub (gfc_code
*);
522 void gfc_resolve_gerror (gfc_code
*);
523 void gfc_resolve_getarg (gfc_code
*);
524 void gfc_resolve_getcwd_sub (gfc_code
*);
525 void gfc_resolve_getlog (gfc_code
*);
526 void gfc_resolve_get_command (gfc_code
*);
527 void gfc_resolve_get_command_argument (gfc_code
*);
528 void gfc_resolve_get_environment_variable (gfc_code
*);
529 void gfc_resolve_gmtime (gfc_code
*);
530 void gfc_resolve_hostnm_sub (gfc_code
*);
531 void gfc_resolve_idate (gfc_code
*);
532 void gfc_resolve_itime (gfc_code
*);
533 void gfc_resolve_kill_sub (gfc_code
*);
534 void gfc_resolve_lstat_sub (gfc_code
*);
535 void gfc_resolve_ltime (gfc_code
*);
536 void gfc_resolve_mvbits (gfc_code
*);
537 void gfc_resolve_perror (gfc_code
*);
538 void gfc_resolve_random_number (gfc_code
*);
539 void gfc_resolve_random_seed (gfc_code
*);
540 void gfc_resolve_rename_sub (gfc_code
*);
541 void gfc_resolve_link_sub (gfc_code
*);
542 void gfc_resolve_symlnk_sub (gfc_code
*);
543 void gfc_resolve_signal_sub (gfc_code
*);
544 void gfc_resolve_sleep_sub (gfc_code
*);
545 void gfc_resolve_stat_sub (gfc_code
*);
546 void gfc_resolve_system_clock (gfc_code
*);
547 void gfc_resolve_system_sub (gfc_code
*);
548 void gfc_resolve_ttynam_sub (gfc_code
*);
549 void gfc_resolve_umask_sub (gfc_code
*);
550 void gfc_resolve_unlink_sub (gfc_code
*);
553 /* The mvbits() subroutine requires the most arguments: five. */
555 #define MAX_INTRINSIC_ARGS 5
557 extern const char *gfc_current_intrinsic
;
558 extern const char *gfc_current_intrinsic_arg
[MAX_INTRINSIC_ARGS
];
559 extern locus
*gfc_current_intrinsic_where
;