]> gcc.gnu.org Git - gcc.git/blob - gcc/fortran/ChangeLog
intrinsic.texi: New file.
[gcc.git] / gcc / fortran / ChangeLog
1 2005-03-34 Steven G. Kargl <kargls@comcast.net>
2
3 * intrinsic.texi: New file.
4 * gfortran.texi: Include it; white space change; fix typo.
5
6 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
7
8 * f95-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
9
10 2005-03-23 Steven Bosscher <stevenb@suse.de>
11
12 * convert.c (convert): Replace fold (buildN (...)) with fold_buildN.
13 * trans-array.c (gfc_trans_allocate_array_storage,
14 gfc_trans_allocate_temp_array gfc_trans_array_constructor_value,
15 gfc_conv_array_index_ref, gfc_trans_array_bound_check,
16 gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
17 gfc_conv_array_ref, gfc_trans_preloop_setup, gfc_conv_ss_startstride,
18 gfc_conv_loop_setup, gfc_array_init_size, gfc_trans_array_bounds,
19 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
20 gfc_conv_expr_descriptor): Likewise.
21 * trans-expr.c (gfc_conv_powi, gfc_conv_string_tmp,
22 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
23 * trans-intrinsic.c (build_round_expr, gfc_conv_intrinsic_bound,
24 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_sign,
25 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
26 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_bitop,
27 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits,
28 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_ishftc,
29 gfc_conv_intrinsic_merge, prepare_arg_info,
30 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_repeat): Likewise.
31 * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do, gfc_trans_do_while,
32 gfc_trans_forall_loop, gfc_do_allocate, generate_loop_for_temp_to_lhs,
33 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
34 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
35 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_assign):
36 Likewise.
37 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Likewise.
38 * trans.c (gfc_add_modify_expr): Likewise.
39
40 2005-03-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
41
42 * check.c (gfc_check_chdir, gfc_check_chdir_sub, gfc_check_kill,
43 gfc_check_kill_sub, gfc_check_link, gfc_check_link_sub,
44 gfc_check_symlnk, gfc_check_symlnk_sub, gfc_check_rename,
45 gfc_check_rename_sub, gfc_check_sleep_sub, gfc_check_gerror,
46 gfc_check_getlog, gfc_check_hostnm, gfc_check_hostnm_sub,
47 gfc_check_perror): new functions to check newly implemented
48 g77 intrinsics.
49 * gfortran.h: adding symbols for new intrinsics.
50 * intrinsic.c (add_functions): adding new intrinsics.
51 (add_subroutines): adding new intrinsics.
52 * intrinsic.h: prototype for all checking and resolving
53 functions.
54 * iresolve.c (gfc_resolve_chdir, gfc_resolve_chdir_sub,
55 gfc_resolve_hostnm, gfc_resolve_ierrno, gfc_resolve_kill,
56 gfc_resolve_link, gfc_resolve_rename, gfc_resolve_symlnk,
57 gfc_resolve_time, gfc_resolve_time8, gfc_resolve_rename_sub,
58 gfc_resolve_kill_sub, gfc_resolve_link_sub,
59 gfc_resolve_symlnk_sub, gfc_resolve_sleep_sub,
60 gfc_resolve_gerror, gfc_resolve_getlog, gfc_resolve_hostnm_sub,
61 gfc_resolve_perror): new functions to resolve intrinsics.
62 * trans-intrinsic.c (gfc_conv_intrinsic_function): add case
63 for new symbols.
64
65 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
66
67 * dump-parse-tree.c (gfc_show_expr): Dump name of namespace
68 in which the variable is declared.
69
70 PR fortran/18525
71 * resolve.c (was_declared): Also check for dummy attribute.
72
73 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
74
75 * gfortran.h (arith): Remove ARITH_0TO0.
76 * arith.c (gfc_arith_error): Remove handling of ARITH_0TO0.
77 (gfc_arith_power): Remove special casing of zero to integral
78 power zero.
79
80 2005-03-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
81
82 * Make-lang.in (fortran-warn): Remove -Wno-error.
83 (expr.o-warn, resolve.o-warn, simplify.o-warn,
84 trans-common.o-warn): Specify -Wno-error.
85
86 2005-03-17 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
87
88 * trans-array.c (gfc_trans_static_array_pointer,
89 get_array_ctor_var_strlen, gfc_conv_array_index_offset): Fix
90 comment and formatting typos.
91
92 2005-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
93
94 * invoke.texi: Fix typos.
95
96 2005-03-15 Zack Weinberg <zack@codesourcery.com>
97
98 * Make-lang.in (GFORTRAN_TEXI): Add gcc-vers.texi.
99
100 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
101
102 * trans-stmt.c (gfc_trans_label_assign): Don't set DECL_ARTIFICIAL flag
103 to zero on label_tree.
104
105 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
106
107 PR fortran/18827
108 * io.c (resolve_tag): Add checking on assigned label.
109 (match_dt_format): Does not set symbol assign attribute.
110 * match.c (gfc_match_goto):Does not set symbol assign attribute.
111 * resolve.c (resolve_code): Add checking on assigned label.
112 * trans-common.c (build_field): Deals with common variable assigned
113 a label.
114 * trans-stmt.c (gfc_conv_label_variable): New function.
115 (gfc_trans_label_assign): Use it.
116 (gfc_trans_goto): Ditto.
117 * trans-io.c (set_string): Ditto.
118 * trans.h (gfc_conv_label_variable): Add prototype.
119
120 2005-03-14 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
121
122 PR fortran/20467
123 * symbol.c (check_conflict): A dummy argument can't be a statement
124 function.
125
126 2005-03-14 Zdenek Dvorak <dvorakz@suse.cz>
127
128 * fortran/trans-intrinsic.c (gfc_conv_intrinsic_ishft): Convert
129 the argument of the shift to the unsigned type.
130
131 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
132
133 PR fortran/16907
134 * resolve.c (gfc_resolve_index): Allow REAL indices as an extension.
135
136 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
137
138 PR fortran/20323
139 * resolve.c (gfc_resolve): Check if character lengths are
140 specification expressions.
141
142 2005-03-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
143
144 PR fortran/20361
145 * trans-array.c (gfc_stack_space_left): Remove unused variable.
146 (gfc_can_put_var_on_stack): Move to trans-decl.c, remove #if 0'ed
147 code.
148 * trans-array.h (gfc_stack_space_left, gfc_can_put_var_on_stack):
149 Remove declaration / prototype.
150 * trans-common.c (build_equiv_decl): Give union a name. Check if
151 it can be put on the stack.
152 * trans-decl.c (gfc_stack_space_left): Move function here.
153 (gfc_build_qualified_array): Fix comment typo.
154 * trans.h (gfc_put_var_on_stack): Add prototype.
155
156 2005-03-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
157
158 * Make-lang.in (fortran-warn): Set to $(STRICT_WARN) -Wno-error.
159 * decl.c, trans.c: Don't use C++ style comments.
160 * gfortran.h (sym_flavor, procedure_type, sym_intent, gfc_access,
161 ifsrc): Give names to enums and use ENUM_BITFIELD.
162 (gfc_access): Remove trailing comma.
163
164 2005-03-05 Steven G. Kargl <kargls@comcast.net>
165
166 PR 19936
167 * primary.c (match_complex_constant): Mangled complex constant may
168 be an implied do-loop. Give implied do-loop matcher a chance.
169
170 2005-03-05 Steven G. Kargl <kargls@comcast.net>
171
172 PR fortran/19754
173 * resolve.c (compare_shapes): New function.
174 (resolve_operator): Use it.
175
176 2005-03-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
177
178 * trans-const.c (gfc_conv_constant_to_tree): Use correct tree
179 type for COMPLEX constants.
180
181 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
182
183 PR fortran/19673
184 * trans-expr.c (gfc_conv_function_call): Correctly dereference
185 argument from a pointer function also if it has a result clause.
186
187 2005-03-04 Steven G. Kargl <kargls@comcast.net>
188
189 * expr.c (gfc_copy_shape_excluding): Change && to ||.
190
191 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
192
193 * trans-intrinsic.c (gfc_get_symbol_for_expr): Fix comment typo,
194 clarify comment.
195
196 2005-02-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
197 (port from g95)
198
199 PR fortran/19479
200 * simplify.c (gfc_simplify_bound): Rename to ...
201 (simplify_bound): ... this and overhaul.
202
203 2005-02-28 Steven G. Kargl <kargl@gcc.gnu.org>
204
205 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): remove boolean argument.
206 (gfc_conv_intrinsic_function): update function calls
207
208 2005-02-27 Steven G. Kargl <kargl@gcc.gnu.org>
209
210 PR fortran/20058
211 * trans-types.c (gfc_max_integer_kind): Declare
212 (gfc_init_kinds): Initialize it.
213 * gfortran.h (gfc_max_integer_kind): extern it.
214 * primary.c (match_boz_constant): Use it; remove gfortran extension
215 of kind suffixes on BOZ literal constants
216
217
218 2005-02-27 Steven G. Kargl <kargls@comcast.net>
219
220 * arith.c (gfc_check_real_range): Remove multiple returns
221 (check_result): New function.
222 (gfc_arith_uminus,gfc_arith_plus,gfc_arith_times,
223 gfc_arith_divide,gfc_arith_power,gfc_arith_minus): Use it.
224
225
226 2005-02-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
227
228 * decl.c, resolve.c, trans-array.c, trans.h: Fix comment typo(s).
229
230
231 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-meunchen.de>
232
233 Unrevert previously reverted patch. Adding this fix:
234 * module.c (find_true_name): Deal with NULL module.
235
236 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
237
238 Revert yesterday's patch:
239 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
240
241 * gfortran.h (gfc_component, gfc_actual_arglist, ...
242 ... argument. Copy string instead of pointing to it.
243
244 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
245
246 * gfortran.h (gfc_get_namespace): Add second argument to prototype.
247 * intrinsic.c (gfc_intrinsic_init_1): Pass second argument to
248 gfc_get_namespace.
249 * module.c (mio_namespace_ref, load_needed): Likewise.
250 * parse.c (parse_interface, parse_contained): Likewise. Here the
251 correct second argument matters.
252 * symbol.c (gfc_get_namespace): Add parent_types argument, only copy
253 parent's implicit types if this is set.
254 (gfc_symbol_init_2): Pass second argument to gfc_get_namespace.
255 * trans-common.c (build_common_decl): Likewise.
256
257 * gfortran.h (symbol_attribute): New 'untyped' field, fix comment
258 formatting.
259 * symbol.c (gfc_set_default_type): Issue error only once, by setting
260 and checking 'untyped' attribute.
261
262 * gfortran.h (gfc_expr): Move 'operator', 'op1', 'op2', and 'uop'
263 fields into new struct 'op' inside the 'value' union.
264 * arith.c (eval_intrinsic): Adapt all users.
265 * dependency.c (gfc_check_dependency): Likewise.
266 * dump-parse-tree.c (gfc_show_expr): Likewise.
267 * expr.c (gfc_get_expr): Don't clear removed fields.
268 (free_expr0, gfc_copy_expr, gfc_type_convert_binary,
269 gfc_is_constant_expr, simplify_intrinsic_op, check_init_expr,
270 check_intrinsic_op): Adapt to new field names.
271 * interface.c (gfc_extend_expr): Likewise. Also explicitly
272 nullify 'esym' and 'isym' fields of new function call.
273 * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
274 Adapt to renamed structure fields.
275 * matchexp.c (build_node, match_level_1, match_expr): Likewise.
276 * module.c (mio_expr): Likewise.
277 * resolve.c (resolve_operator): Likewise.
278 (gfc_find_forall_index): Likewise. Only look through operands
279 if dealing with EXPR_OP
280 * trans-array.c (gfc_walk_op_expr): Adapt to renamed fields.
281 * trans-expr.c (gfc_conv_unary_op, gfc_conv_power_op,
282 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
283
284 [ Reverted ]
285 * gfortran.h (gfc_component, gfc_actual_arglist, gfc_user_op): Make
286 'name' a 'const char *'.
287 (gfc_symbol): Likewise, also for 'module'.
288 (gfc_symtree): Make 'name' a 'const char *'.
289 (gfc_intrinsic_sym): Likewise, also for 'lib_name'.
290 (gfc_get_gsymbol, gfc_find_gsymbol): Add 'const' qualifier to
291 'char *' argument.
292 (gfc_intrinsic_symbol): Use 'gfc_get_string' instead of 'strcpy' to
293 initialize 'SYM->module'.
294 * check.c (gfc_check_minloc_maxloc, check_reduction): Check for NULL
295 pointer instead of empty string.
296 * dump-parse-tree.c (gfc_show_actual_arglist): Likewise.
297 * interface.c (gfc_compare_types): Adapt check to account for possible
298 NULL pointer.
299 (compare_actual_formal): Check for NULL pointer instead of empty
300 string.
301 * intrinsic.c (gfc_current_intrinsic, gfc_current_intrinsic_arg):
302 Add 'const' qualifier.
303 (conv_name): Return a heap allocated string.
304 (find_conv): Add 'const' qualifier to 'target'.
305 (add_sym): Use 'gfc_get_string' instead of 'strcpy'.
306 (make_generic): Check for NULL pointer instead of empty string.
307 (make_alias): Use 'gfc_get_string' instead of 'strcpy'.
308 (add_conv): No need to strcpy result from 'conv_name'.
309 (sort_actual): Check for NULL pointer instead of empty string.
310 * intrinsic.h (gfc_current_intrinsic, gfc_current_intrinsic_arg):
311 Adapt prototype.
312 * module.c (compare_true_names): Compare pointers instead of strings
313 for 'module' member.
314 (find_true_name): Initialize string fields with gfc_get_string.
315 (mio_pool_string): New function.
316 (mio_internal_string): Adapt comment.
317 (mio_component_ref, mio_component, mio_actual_arg): Use
318 'mio_pool_string' instead of 'mio_internal_string'.
319 (mio_symbol_interface): Add 'const' qualifier to string arguments.
320 Add level of indirection. Use 'mio_pool_string' instead of
321 'mio_internal_string'.
322 (load_needed, read_module): Use 'gfc_get_string' instead of 'strcpy'.
323 (write_common, write_symbol): Use 'mio_pool_string' instead of
324 'mio_internal_string'.
325 (write_symbol0, write_symbol1): Likewise, also check for NULL pointer
326 instead of empty string.
327 (write_operator, write_generic): Pass correct type variable to
328 'mio_symbol_interface'.
329 (write_symtree): Use 'mio_pool_string' instead of
330 'mio_internal_string'.
331 * primary.c (match_keyword_arg): Adapt check to possible
332 case of NULL pointer. Use 'gfc_get_string' instead of 'strcpy'.
333 * symbol.c (gfc_add_component, gfc_new_symtree, delete_symtree,
334 gfc_get_uop, gfc_new_symbol): Use 'gfc_get_string' instead of
335 'strcpy'.
336 (ambiguous_symbol): Check for NULL pointer instead of empty string.
337 (gfc_find_gsymbol, gfc_get_gsymbol): Add 'const' qualifier on string
338 arguments.
339 * trans-array.c (gfc_trans_auto_array_allocation): Check for NULL
340 pointer instead of empty string.
341 * trans-decl.c (gfc_sym_mangled_identifier,
342 gfc_sym_mangled_function_id, gfc_finish_var_decl, gfc_get_symbol_decl,
343 gfc_get_symbol_decl): Likewise.
344 * trans-io.c (gfc_new_nml_name_expr): Add 'const' qualifier to
345 argument. Copy string instead of pointing to it.
346
347 2005-02-23 Kazu Hirata <kazu@cs.umass.edu>
348
349 * intrinsic.h, st.c: Update copyright.
350
351 2005-02-20 Steven G. Kargl <kargls@comcast.net>
352
353 * symbol.c: Typos in comments.
354
355 2005-02-20 Steven G. Kargl <kargls@comcast.net>
356
357 * expr.c (gfc_type_convert_binary): Typo in comment.
358
359 2005-02-19 Steven G. Kargl <kargls@comcast.net>
360
361 * check.c (gfc_check_selected_int_kind): New function.
362 * intrinsic.h: Prototype it.
363 * intrinsic.c (add_function): Use it.
364 * simplify (gfc_simplify_ceiling,gfc_simplify_floor): Change
365 BT_REAL to BT_INTEGER and use gfc_default_integer_kind.
366
367 2005-02-19 Steven G. Kargl <kargls@comcast.net>
368
369 * check.c (gfc_check_int): improve checking of optional kind
370 * simplify.c (gfc_simplify_int): Change BT_REAL to BT_INTEGER
371
372 2005-02-19 Steven G. Kargl <kargls@comcast.net>
373
374 * check.c (gfc_check_achar): New function
375 * intrinsic.h: Prototype it.
376 * intrinsic.c (add_function): Use it.
377
378 2005-02-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
379
380 * trans-stmt.c (generate_loop_for_temp_to_lhs,
381 generate_loop_for_rhs_to_temp): Remove if whose condition is
382 always true.
383
384 2005-02-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
385
386 * symbol.c (gfc_use_ha_derived): Remove, fold functionality into ...
387 (gfc_use_derived): ... this function.
388
389 2005-02-09 Richard Henderson <rth@redhat.com>
390
391 * f95-lang.c (gfc_init_builtin_functions): Call
392 build_common_builtin_nodes; do not define any functions handled
393 by it.
394
395 2005-02-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
396
397 * expr.c (gfc_copy_expr): Don't copy 'op1' and 'op2' for
398 EXPR_SUBSTRING.
399 (gfc_is_constant_expr): Check 'ref' to determine if substring
400 reference is constant.
401 (gfc_simplify_expr): Simplify 'ref' instead of 'op1' and 'op2'.
402 (check_init_expr, check_restricted): Check 'ref' instead of 'op1'
403 and 'op2'.
404 * module.c (mio_expr): Read / write 'ref' instead of 'op1' and 'op2'.
405
406 2005-02-07 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
407
408 * gfortran.h (gfc_add_dimension, gfc_add_result, gfc_add_save,
409 gfc_add_dummy, gfc_add_generic, gfc_add_in_common, gfc_add_data,
410 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
411 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
412 gfc_add_procedure): Add argument.
413 * array.c (gfc_set_array_spec), decl.c (var_element, get_proc_name,
414 gfc_match_null, match_type_spec, match_attr_spec,
415 gfc_match_formal_arglist, match_result, gfc_match_function_decl):
416 Update callers to match.
417 (gfc_match_entry) : Likewise, fix comment typo.
418 (gfc_match_subroutine, attr_decl1, gfc_add_dimension,
419 access_attr_decl, do_parm, gfc_match_save, gfc_match_modproc,
420 gfc_match_derived_decl): Update callers.
421 * interface.c (gfc_match_interface): Likewise.
422 * match.c (gfc_match_label, gfc_add_flavor,
423 gfc_match_call, gfc_match_common, gfc_match_block_data,
424 gfc_match_namelist, gfc_match_module, gfc_match_st_function):
425 Likewise.
426 * parse.c (parse_derived, parse_interface, parse_contained),
427 primary.c (gfc_match_rvalue, gfc_match_variable): Likewise.
428 * resolve.c (resolve_formal_arglist, resolve_entries): Update callers.
429 * symbol.c (check_conflict, check_used): Add new 'name' argument,
430 use when printing error message.
431 (gfc_add_dimension, gfc_add_result, gfc_add_save, gfc_add_dummy,
432 gfc_add_generic, gfc_add_in_common, gfc_add_data,
433 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
434 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
435 gfc_add_procedure): Add new 'name' argument. Pass along to
436 check_conflict and check_used.
437 (gfc_add_allocatable, gfc_add_external, gfc_add_intrinsic,
438 gfc_add_optional, gfc_add_pointer, gfc_add_target, gfc_add_elemental,
439 gfc_add_pure, gfc_add_recursive, gfc_add_intent,
440 gfc_add_explicit_interface, gfc_copy_attr): Pass NULL for new
441 argument in calls to any of the modified functions.
442
443 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
444
445 * gfortran.texi: Don't give last update date.
446
447 2006-01-30 Richard Henderson <rth@redhat.com>
448
449 * options.c (gfc_init_options): Zero flag_errno_math.
450
451 2005-01-29 Paul Brook <paul@codesourcery.com>
452
453 PR fortran/18565
454 * check.c (real_or_complex_check): New function.
455 (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc): New functions.
456 * intrinsic.c (add_functions): Use new check functions.
457 * intrinsic.h (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc):
458 Add prototypes.
459
460 2005-01-29 Steven G. Kargl <kargls@comcast.net>
461
462 PR fortran/19589
463 * expr.c (gfc_check_assign): Check for conformance of logical operands
464
465 2004-01-27 Steven Bosscher <stevenb@suse.de>
466
467 * trans-decl.c (gfc_build_label_decl): Set DECL_ARTIFICAL and
468 TREE_USED for all labels.
469 (gfc_trans_entry_master_switch): Use it instead of building a
470 label by hand.
471 * trans-io.c (add_case): Likewise.
472 * trans-stmt.c (gfc_trans_integer_select): Likewise.
473
474 2004-01-23 Paul Brook <paul@codesourcery.com>
475 Steven G. Kargl <kargls@comcast.net>
476
477 PR fortran/17941
478 * arith.c (gfc_convert_real): Remove sign handling.
479 * primary.c (match_digits): Allow whitespace after initial sign.
480 (match_real_const): Handle signs here. Allow whitespace after
481 initial sign. Remove dead code.
482 (match_const_complex_part): Remove.
483 (match_complex_part): Use match_{real,integer}_const.
484 (match_complex_constant): Cross-promote integer types.
485
486 2005-01-23 James A. Morrison <phython@gcc.gnu.org>
487
488 PR fortran/19294
489 * iresolve.c (gfc_resolve_transpose): Resolve to transpose_c4 or
490 transpose_c8 for complex types.
491
492 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
493
494 * data.c, dependency.c, f95-lang.c, io.c, trans-array.c,
495 trans-decl.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
496 trans-stmt.c, trans-types.c, trans.h: Fix comment typos.
497 Follow spelling conventions.
498
499 2005-01-22 Bud Davis <bdavis9659@comcast.net>
500
501 PR fortran/19313
502 * trans-io.c (gfc_trans_inquire): Added code to support
503 pad.
504
505 2005-01-22 Steven G. Kargl <kargls@comcast.net>
506
507 * intrinsic.c (make_alias): Add standard argument.
508 (add_functions): Update make_alias calls.
509
510 2005-01-22 Paul Brook <paul@codesourcery.com>
511
512 * trans-expr.c (gfc_conv_function_call): Remove bogus TODO.
513
514 2005-01-22 Paul Brook <paul@codesourcery.com>
515
516 * gfortran.h (gfc_check_access): Add prototype.
517 * match.c (gfc_match_namelist): Remove TODO.
518 * module.c (check_access): Rename ...
519 (gfc_check_access): ... to this. Boolify. Update callers.
520 * resolve.c (resolve_symbol): Check for private objects in public
521 namelists.
522
523 2005-01-22 Paul Brook <paul@codesourcery.com>
524
525 * primary.c (gfc_match_rvalue): Only apply implicit type if variable
526 does not have an explicit type.
527 (gfc_match_variable): Resolve implicit derived types in all cases.
528 Resolve contained function types from their own namespace, not the
529 parent.
530 * resolve.c (resolve_contained_fntype): Remove duplicate sym->result
531 checking. Resolve from the contained namespace, not the parent.
532
533 2005-01-22 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
534
535 PR fortran/19543
536 * trans-const.c (gfc_conv_constant_to_tree): Give logical
537 constants the correct type.
538
539 PR fortran/19194
540 * trans-io.c (ADD_STRING): Use gfc_charlen_type_node for string
541 length parameters.
542 (gfc_build_io_library_fndecls): 'rec' and 'recl_in' are not
543 pointer fields.
544
545 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
546
547 * arith.c, array.c, check.c, decl.c, expr.c, f95-lang.c,
548 gfortran.h, interface.c, intrinsic.c, io.c, iresolve.c,
549 match.c, matchexp.c, misc.c, module.c, options.c, parse.c,
550 scanner.c, simplify.c, symbol.c, trans-array.c, trans-expr.c,
551 trans-io.c, trans-stmt.c, trans.c: Update copyright.
552
553 2005-01-17 Ira Rosen <irar@il.ibm.com>
554
555 * f95-lang.c (gfc_init_builtin_functions): Call targetm.init_builtins.
556
557 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
558
559 PR fortran/19182
560 * error.c (error_char): Line-buffer errors / warnings.
561
562 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
563
564 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Fix signed /
565 unsigned issue. Use build_int_cst instead of converting
566 integer_zero_node. Remove unnecessary conversion.
567
568 * trans-types.c (gfc_get_character_type_len): : Use
569 gfc_charlen_type_node as basic type for the range field.
570
571 * trans-intrinsic.c (build_fixbound_expr,
572 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_anyall,
573 gfc_conv_intrinsic_count, gfc_conv_intrinsic_btest,
574 gfc_conv_intrinsic_singlebitop): Use 'build_int_cst' instead
575 of converting 'integer_zero_node' or 'integer_one_node'
576 respectively.
577 (gfc_conv_intrinsic_ishftc): Same, but store in local variable to
578 evade re-building.
579 (gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_rrspacing,
580 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_iargc): Use
581 'build_int_cst' instead of converting 'integer_zero_node' or
582 'integer_one_node' respectively.
583
584 * trans-intrinsic.c (gfc_conv_intrinsic_index,
585 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove
586 'gfc'-prefix from local variable, remove dead code, use correct
587 type when inserting argument.
588
589 * trans-intrinsic.c, trans-types.c: Update copyright years.
590
591 2005-01-16 Steven G. Kargl <kargls@comcast.net>
592
593 PR 19168
594 * resolve.c (check_case_overlap): Typo in comment.
595 (validate_case_label_expr): Fix up kinds of case values
596 (resolve_select): Properly handle kind mismatches.
597
598 2004-01-16 Paul Brook <paul@codesourcery.com>
599
600 PR fortran/17675
601 * trans-common.c (translate_common): Remove duplicate function call.
602 (finish_equivalences): Preserve alignment when biasing offsets.
603
604 2005-01-15 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de
605
606 * primary.c (check_digit): Call 'ISXDIGIT' instead of assuming
607 ASCII-like character encoding.
608
609 2005-01-14 Steven G. Kargl <kargls@comcast.net>
610
611 * resolve.c (compare_case): Cleanup.
612
613 2005-01-14 Steven G. Kargl <kargls@comcast.net>
614
615 * resolve.c (compare_case): Give arguments correct type.
616
617 2005-01-13 Kazu Hirata <kazu@cs.umass.edu>
618
619 * iresolve.c, trans-common.c, trans-types.c: Fix comment
620 typos.
621
622 2005-01-09 Paul Brook <paul@codesourcery.com>
623
624 PR fortran/17675
625 * trans-common.c (current_common, current_offset): Remove.
626 (create_common): Add head argument.
627 (align_segment): New function.
628 (apply_segment_offset): New function.
629 (translate_common): Merge code from new_segment. Handle alignment.
630 (new_segment): Remove.
631 (finish_equivalences): Ensure proper alignment.
632
633 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
634
635 * trans-const.c: Don't include unused math.h.
636
637 * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl,
638 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_minmaxloc,
639 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_len): Remove
640 trailing whitespace.
641 (prepare_arg_info): Fix formatting, indenting and remove trailing
642 whitespace.
643 (gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_trim): Remove
644 trailing whitespace.
645
646 * arith.c (arctangent2, gfc_arith_init_1, gfc_arith_done_1,
647 gfc_constant_result, gfc_range_check, gfc_arith_power,
648 eval_type_intrinsic0, eval_intrinsic_f2, gfc_real2real,
649 gfc_real2complex, gfc_complex2int, gfc_complex2real,
650 gfc_complex2complex): Fix whitespace issues.
651 * check.c (must_be, type_check, numeric_check, int_or_real_check,
652 logical_array_check, array_check, scalar_check, nonoptional_check,
653 variable_check, dim_check, check_a_kind, gfc_check_a_ikind,
654 gfc_check_a_xkind, gfc_check_abs, gfc_check_all_any,
655 gfc_check_allocated, gfc_check_a_p, gfc_check_besn,
656 gfc_check_btest, gfc_check_char, gfc_check_cmplx, gfc_check_count,
657 gfc_check_cshift, gfc_check_dcmplx, gfc_check_dble,
658 gfc_check_digits, gfc_check_dot_product, gfc_check_eoshift,
659 gfc_check_fnum, gfc_check_g77_math1, gfc_check_huge, gfc_check_i,
660 gfc_check_iand, gfc_check_ibclr, gfc_check_ibits, gfc_check_ibset,
661 gfc_check_idnint, gfc_check_ieor, gfc_check_index, gfc_check_int,
662 gfc_check_ior, gfc_check_ishft, gfc_check_ishftc, gfc_check_kind,
663 gfc_check_lbound, gfc_check_logical, min_max_args,
664 gfc_check_min_max_integer, gfc_check_min_max_real,
665 gfc_check_min_max_double, gfc_check_matmul,
666 gfc_check_minval_maxval, gfc_check_merge, gfc_check_nearest,
667 gfc_check_pack, gfc_check_precision, gfc_check_radix,
668 gfc_check_range, gfc_check_real, gfc_check_repeat,
669 gfc_check_scale, gfc_check_scan, gfc_check_selected_real_kind,
670 gfc_check_set_exponent): Fix formatting issues.
671 (gfc_check_size, gfc_check_sign): Alphabetize function order,
672 remove whitespace-only line.
673 (gfc_check_fstat, gfc_check_fstat_sub, gfc_check_stat,
674 gfc_check_stat_sub, gfc_check_transfer, gfc_check_transpose,
675 gfc_check_ubound, gfc_check_unpack, gfc_check_verify, gfc_check_x,
676 gfc_check_cpu_time, gfc_check_date_and_time, gfc_check_mvbits,
677 gfc_check_random_number, gfc_check_random_seed,
678 gfc_check_second_sub, gfc_check_system_clock,
679 gfc_check_getcwd_sub, gfc_check_exit, gfc_check_flush,
680 gfc_check_umask, gfc_check_umask_sub, gfc_check_unlink,
681 gfc_check_unlink_sub): Fix formatting issues.
682
683 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
684
685 * gfortran.h: Remove outdated comment. Don't include stdio.h
686 explicitly.
687
688 2005-01-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
689
690 * gfortranspec.c (lang_specific_driver): Change year to 2005 in
691 output of 'gfortran --version'.
692
693 2005-01-03 Steven G. Kargl <kargls@comcast.net>
694
695 * arith.c: Add system.h; remove string.h
696 * decl.c: Ditto
697 * matchexp.c: Ditto
698 * parse.c: Ditto
699 * resolve.c: Ditto
700 * st.c: Ditto
701 * check.c: Remove stdlib.h and stdarg.h
702 * error.c: Remove stdlib.h, stdarg.h, stdio.h, string.h
703 * expr.c: Add system.h; remove stdarg.h, stdio.h, and string.h
704 * f95-lang.c: Add system.h; remove stdio.h
705 * interface.c: Add system.h; remove stdlib.h and string.h
706 * intrinsic.c: Remove stdarg.h, stdio.h, and string.h
707 * io.c: Remove string.h
708 * simplify.c: Ditto
709 * match.c: Remove stdarg.h and string.h
710 * misc.c: Update copyright; add system.h; remove stdlib.h,
711 string.h, and sys/stat.h
712 * module.c: Add system.h; remove string.h, stdio.h, errno.h,
713 unistd.h, and time.h
714 * option.c: Remove string.h and stdlib.h
715 * primary.c: Ditto
716 * scanner.c: Update copyright; add system.h; remove stdlib.h,
717 stdio.h, string.h, and strings.h
718 * symbol.c: Add system.h; remove stdlib.h, stdio.h, and string.h
719 * trans-array.c: Remove stdio.h and gmp.h
720 * trans-const.c: Ditto
721 * trans-expr.c: Ditto
722 * trans-io.c: Ditto
723 * trans-stmt.c: Ditto
724 * trans.c: Ditto
725 * trans-intrinsic.c: Remove stdio.h and string.h
726
727 2004-12-29 Steven G. Kargl <kargls@comcast.net>
728
729 * gfortran.h (gfc_case): fix typo in comment.
730
731 2004-12-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
732
733 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Change to
734 logical shift. Call fold. Remove 0-bit shift shortcut.
735 (gfc_conv_intrinsic_ishftc): Convert first argument to at least
736 4 bytes bits. Convert 2nd and 3rd argument to 4 bytes. Convert
737 result if width(arg 1) < 4 bytes. Call fold.
738
739 PR fortran/19032
740 * trans-intrinsic.c (gfc_conv_intrinsic_mod): Update comment
741 in front of function to match the standard. Correct handling
742 of MODULO.
743
744 2004-12-27 Andrew Pinski <pinskia@physics.uc.edu>
745
746 * trans-expr.c (gfc_conv_cst_int_power): Only check for
747 flag_unsafe_math_optimizations if we have a float type.
748
749 2004-12-23 Steven G. Kargl <kargls@comcast.net>
750
751 * gfortran.texi: Fix typo.
752
753 2004-12-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
754
755 * trans-intrinsic.c (build_fixbound_expr): Clarify comment, fix
756 comment typo.
757
758 2004-12-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
759
760 PR fortran/18993
761 * match.c (gfc_match_if): Don't explicitly skip optional whitespace.
762 (gfc_match_nullify): Make sure that ')' is in front of the end of
763 statement.
764
765 * scanner.c (skip_fixed_comments): Fix typo in comment preceding
766 function.
767
768 2004-12-14 Richard Henderson <rth@redhat.com>
769
770 * gfortran.h (gfc_expr.function.name): Make const.
771 (gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
772 (gfc_get_string): Update prototype.
773 * iresolve.c: Include tree.h.
774 (string_node, HASH_SIZE, string_head, hash): Remove.
775 (gfc_get_string): Use vsnprintf, get_identifier.
776 (free_strings, gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
777 * misc.c (gfc_init_1): Don't call gfc_iresolve_init_1.
778 (gfc_done_1): Don't call gfc_iresolve_done_1.
779 * module.c (mio_allocated_string): Take and return const char *,
780 instead of modifying char**.
781 (mio_expr): Update to match.
782 * resolve.c (pure_function): Constify name argument.
783 (resolve_function): Constify name.
784 * trans-intrinsic.c (gfc_conv_intrinsic_function): Likewise.
785
786 2004-12-12 Richard Henderson <rth@redhat.com>
787
788 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
789 gfc_resolve_cshift, gfc_resolve_dot_product, gfc_resolve_eoshift,
790 gfc_resolve_matmul, gfc_resolve_maxloc, gfc_resolve_maxval,
791 gfc_resolve_minloc, gfc_resolve_minval, gfc_resolve_pack,
792 gfc_resolve_product, gfc_resolve_reshape, gfc_resolve_shape,
793 gfc_resolve_spread, gfc_resolve_sum, gfc_resolve_transpose,
794 gfc_resolve_unpack: Use PREFIX.
795
796 2004-12-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
797
798 PR fortran/18869
799 * match.c (gfc_match_common): Skip whitespace.
800
801 2004-12-12 Steven G. Kargl <kargls@comcast.net>
802
803 PR fortran/16581
804 * check.c (gfc_check_iand, gfc_check_ibclr, gfc_check_ibits,
805 gfc_check_ibset, gfc_check_ieor, gfc_check_ior): Remove default
806 integer kind check; Issue error for -std=f95 when needed.
807 * intrinsic.c (add_functions): Change ieor from GFC_STD_GNU to
808 GFC_STD_F95.
809 * iresolve.c (gfc_resolve_iand, gfc_resolve_ieor, gfc_resolve_ior):
810 Promote arguments to same kind.
811
812 2004-12-12 Steven G. Kargl <kargls@comcast.net>
813 Paul Brook <paul@codesourcery.com>
814
815 PR fortran/16222
816 * resolve.c (gfc_resolve_iterator_expr): New function.
817 (gfc_resolve_iterator): Use it. Add real_ok argument. Convert
818 start, end and stride to correct type.
819 (resolve_code): Pass extra argument.
820 * array.c (resolve_array_list): Pass extra argument.
821 * gfortran.h (gfc_resolve): Add prototype.
822 * trans-stmt.c (gfc_trans_do): Remove redundant type conversions.
823 Handle real type iterators.
824
825 2004-12-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
826
827 PR fortran/17175
828 * iresolve.c (gfc_resolve_scale): Convert 'I' argument if not of
829 same kind as C's 'int'.
830 (gfc_resolve_set_exponent): Convert 'I' argument if not of kind 4.
831
832 2004-12-08 Richard Henderson <rth@redhat.com>
833
834 * intrinsic.c (gfc_convert_type_warn): Propagate the input shape
835 to the output expression.
836 * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift): Suppress
837 warning conversion.
838 (gfc_resolve_reshape): Force convert SHAPE and ORDER parameters
839 to index kind.
840
841 2004-12-08 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
842
843 PR fortran/18826
844 * resolve.c (resolve_code): Impose correct restrictions on
845 assigned variable.
846
847 * decl.c (gfc_match_end): Use locus of END when eos is an error.
848
849 2004-12-02 Steven G. Kargl <kargls@comcast.net>
850 Paul Brook <paul@codesourcery.com>
851
852 * check.c (gfc_check_flush, gfc_check_fnum): New functions.
853 (gfc_check_fstat, gfc_check_fstat_sub): New functions.
854 (gfc_check_stat, gfc_check_stat_sub): New functions.
855 * gfortran.h (GFC_ISYM_FNUM,GFC_ISYM_FSTAT,GFC_ISYM_STAT): New symbols
856 * intrinsic.c (add_functions,add_subroutines): Add flush, fnum,
857 fstat, and stat to intrinsics symbol tables.
858 * intrinsic.h (gfc_check_flush, gfc_resolve_stat_sub): Add prototypes.
859 (gfc_resolve_fstat_sub, gfc_resolve_stat): Ditto.
860 * iresolve.c (gfc_resolve_fnum, gfc_resolve_fstat): New functions.
861 (gfc_resolve_stat, gfc_resolve_flush): New functions.
862 (gfc_resolve_stat_sub,gfc_resolve_fstat_sub): New functions
863 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add new intrinsics.
864
865 2004-12-02 Steven G. Kargl <kargls@comcast.net>
866
867 * intrinsic.c: Fix and add comments, fix function declarations
868 (OPTIONAL,REQUIRED): New symbols
869 (add_functions,add_subroutines): Use symbols
870 (gmp.h): Remove unused include
871
872 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
873
874 * f95-lang.c, gfortranspec.c, trans-decl.c: Avoid ` as left quote
875 in diagnostics.
876
877 2004-11-24 Steven Bosscher <stevenb@suse.de>
878
879 * options.c (gfc_post_options): Don't clear flag_inline_functions.
880
881 2004-11-20 Steven G. Kargl <kargls@comcast.net>
882
883 * check.c (gfc_check_getcwd_sub): Fix seg fault.
884
885 * check.c (gfc_check_exit,gfc_check_umask,gfc_check_umask_sub,
886 gfc_check_unlink,gfc_check_unlink_sub): New functions
887 * gfortran.h (GFC_ISYM_UMASK,GFC_ISYM_UNLINK): New symbols
888 * intrinsic.c (add_functions,add_subroutines): Add umask, unlink,
889 exit to intrinsics symbol tables.
890 * intrinsic.h (gfc_check_umask,gfc_check_unlink,gfc_check_exit,
891 gfc_check_umask_sub,gfc_check_unlink_sub,gfc_resolve_umask,
892 gfc_resolve_unlink,gfc_resolve_exit,gfc_resolve_umask_sub,
893 gfc_resolve_unlink_sub): Add and sort prototypes.
894 * iresolve.c (gfc_resolve_umask,gfc_resolve_unlink,gfc_resolve_exit,
895 gfc_resolve_umask_sub,gfc_resolve_unlink_sub): New functions
896 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbols
897
898 2004-11-16 Paul Brook <paul@codesourcery.com>
899
900 PR fortran/13010
901 * trans-array.c (gfc_trans_allocate_temp_array): Use gfc_get_dtype.
902 (gfc_array_init_size, gfc_conv_expr_descriptor): Ditto.
903 * trans-types.c (gfc_get_dtype): Accept array type rather than element
904 type.
905 (gfc_get_nodesc_array_type): Don't set GFC_TYPE_ARRAY_DTYPE.
906 (gfc_get_array_type_bounds): Ditto.
907 (gfc_get_derived_type): Recurse into derived type pointers.
908 * trans-types.h (gfc_get_dtype): Add prototype.
909 * trans.h (GFC_TYPE_ARRAY_DTYPE): Add comment.
910
911 2004-11-15 Paul Brook <paul@codesourcery.com>
912
913 * trans-types.c (gfc_get_dtype): Remove obsolete TODO.
914
915 2004-11-10 Paul Brook <paul@codesourcery.com>
916
917 PR fortran/18375
918 * trans-expr.c (gfc_trans_subarray_assign): Free shape before ss.
919 * trans-io.c (transfer_array_component): Ditto.
920
921 2004-11-10 Paul Brook <paul@codesourcery.com>
922
923 * invoke.texi: Fix typo.
924
925 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
926
927 * arith.c, array.c, decl.c, expr.c, f95-lang.c, gfortran.h,
928 gfortranspec.c, interface.c, intrinsic.c, iresolve.c, match.c,
929 module.c, parse.c, parse.h, primary.c, resolve.c, scanner.c,
930 trans-array.c, trans-array.h, trans-expr.c, trans-intrinsic.c,
931 trans-io.c, trans-stmt.c, trans.h: Fix comment formatting.
932
933 2004-11-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
934
935 PR fortran/18023
936 * io.c (resolve_tag): Tighten up exception for assigned FORMAT.
937
938 2004-11-06 Kazu Hirata <kazu@cs.umass.edu>
939
940 * gfortranspec.c: Replace GNU CC with GCC.
941
942 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
943
944 * gfortranspec.c (lang_specific_driver): Change year to 2004.
945
946 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
947
948 PR fortran/18111
949 * trans-decl.c (create_function_arglist): Set DECL_ARTIFICIAL for
950 hidden parameters.
951
952 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
953
954 PR fortran/15164
955 * trans-decl.c (gfc_finish_var_decl): Don't declare arguments to
956 module procedures as if they were module variables.
957
958 2004-11-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
959
960 PR fortran/17535
961 PR fortran/17583
962 PR fortran/17713
963 * module.c (write_symbol1): Set module_name for dummy arguments.
964
965 2004-11-02 Paul Brook <paul@codesourcery.com>
966
967 * intrinsic.c (check_intrinsic_standard): Include error locus.
968 Remove VLA.
969 (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Pass
970 locus to check_intrinsic_standard.
971
972 2004-10-31 Janne Blomqvist <jblomqvi@cc.hut.fi>
973
974 PR fortran/17590
975 * gfortran.h: Change GFC_STD_* flags to more appropriate
976 ones. (struct gfc_intrinsic_isym): Add field for standard. (struct
977 gfc_option_t): Add field for warning about use of nonstandard
978 intrinsics.
979 * intrinsic.c (add_sym): Add parameter for standard version, check
980 this against current standard.
981 (add_sym_0): Pass standard parameter to add_sym.
982 (add_sym_1, add_sym_0s, add_sym_1s, add_sym_1m, add_sym_2): Ditto.
983 (add_sym_2s, add_sym_3, add_sym_3ml, add_sym_3red, add_sym_3s): Ditto.
984 (add_sym_4, add_sym_4s, add_sym_5, add_sym_5s): Ditto.
985 (make_generic): Add parameter for standard, check this
986 against currently selected standard.
987 (add_functions, add_subroutines): Add parameter to tell which
988 standard an intrinsic belongs to.
989 (check_intrinsic_standard): New function.
990 (gfc_intrinsic_func_interface): Add call to check_intrinsic_standard.
991 (gfc_intrinsic_sub_interface): Ditto.
992 * lang.opt: Add Wnonstd-intrinsics option.
993 * options.c (gfc_init_options): Change to use new GFC_STD_* flags,
994 init new warning.
995 (set_Wall): Add warning about nonstd intrinsics.
996 (gfc_handle_option): Change to use new GFC_STD_* flags,
997 handle new warning.
998 * invoke.texi: Update manual to include -Wnonstd-intrinsics.
999
1000 2004-10-30 Andrew Pinski <pinskia@physics.uc.edu>
1001
1002 * f95-lang.c (lang_tree_node): Add chain_next to be the TREE_CHAIN.
1003
1004 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1005
1006 * simplify.c (twos_complement): Calculate mask in GMP arithmetic.
1007
1008 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1009
1010 * trans.c (gfc_trans_code): Set global locus after recursing. Fix
1011 comment typo.
1012
1013 2004-10-30 Canqun Yang <canqun@nudt.edu.cn>
1014
1015 * check.c (gfc_check_rand): Allow missing optional argument.
1016 (gfc_check_irand): Ditto.
1017 * intrinsic.c (add_functions): Set arg optional flag for {i,}rand.
1018
1019 2004-10-28 Scott Robert Ladd <scott.ladd@coyotegulch.com>
1020
1021 PR fortran/13490, PR fortran/17912
1022 * gcc/fortran/gfortran.h: Added pedantic_min_int to gfc_integer_info
1023 * gcc/fortran/gfortran.h: Added ARITH_ASYMMETRIC to arith
1024 * gcc/fortran/arith.c: Added support for an "asymmetric integer"
1025 warning when compiling with pedantic.
1026 * gcc/fortran/arith.c: Set minimum integer values to reflect
1027 realities of two's complement signed integers. Added
1028 pedantic minimum.
1029
1030 2004-10-17 Andrew Pinski <pinskia@physics.uc.edu>
1031
1032 * Make-lang.in (F95_ADDITIONAL_OBJS): Kill.
1033 (f951): Do not depend on F95_ADDITIONAL_OBJS and don't
1034 link it in.
1035
1036 2004-10-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1037
1038 * trans-decl.c (generate_local_decl): Simplify logic, fix comment
1039 typo.
1040 (gfc_generate_function_code): Fix formatting issue.
1041
1042 2004-10-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1043
1044 * module.c: Fix formatting issues.
1045
1046 2004-10-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1047
1048 * module.c (mio_interface_rest): Set where member of interface
1049 while loading.
1050
1051 2004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
1052
1053 PR fortran/17901
1054 * options.c (gfc_handle_option): Add break after handing the
1055 J/M option.
1056
1057 2004-10-08 Tobias Schlueter <tobias.shclueter@physik.uni-muenchen.de>
1058
1059 * arith.c: Fix formatting issues.
1060
1061 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1062
1063 PR fortran/17676
1064 * resolve.c (resolve_operator): Use correct operator name in message.
1065
1066 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1067
1068 * primary.c (match_boz_constant): Allow kind parameter suffixes.
1069 Move standard warning further to the front.
1070
1071 2004-10-07 Kazu Hirata <kazu@cs.umass.edu>
1072
1073 * trans-stmt.c: Fix a comment typo.
1074
1075 2004-10-07 Paul Brook <paul@codesourcery.com>
1076
1077 PR fortran/17678
1078 * trans-array.c (gfc_trans_deferred_array): Leave use associated
1079 variables alone.
1080
1081 2004-10-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1082
1083 PR fortran/17568
1084 * simplify.c (twos_complement): New function.
1085 (gfc_simplify_ishft, gfc_simplify_ishftc): Revise.
1086
1087 * simplify.c (gfc_simplify_abs): Use mpfr_hypot for CABS.
1088
1089 2004-10-06 Paul Brook <paul@codesourcery.com>
1090
1091 * trans-stmt.c (gfc_trans_simple_do): New function.
1092 (gfc_trans_do): Use it. Evaluate iteration bounds before entering
1093 loop. Update comments.
1094
1095 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1096
1097 PR fortran/17283
1098 * iresolve.c (gfc_resolve_pack): Choose function depending if mask
1099 is scalar.
1100
1101 PR fortran/17631
1102 * intrinsic.c (add_sym_5): Remove.
1103 (add_subroutines): Add resolution function for MVBITS.
1104 * intrinsic.h (gfc_resolve_mvbits): Declare resolution function for
1105 MVBITS
1106 * iresolve.c (gfc_resolve_mvbits): New function.
1107 (gfc_resolve_random_number): Remove empty line at end of function.
1108
1109 * trans-const.c (gfc_build_cstring_const): New function.
1110 (gfc_init_cst): Use new function.
1111 * trans-const.h (gfc_build_cstring_const): Add prototype.
1112 * trans-io.c (set_string, set_error_locus): Use new function.
1113 * trans-stmt.c (gfc_trans_goto): Use new function.
1114
1115 PR fortran/17708
1116 * parse.c (accept_statement): Don't treat END DO like END IF and
1117 END SELECT.
1118 (parse_do_block): Generate possible END DO label inside END DO
1119 block.
1120
1121 PR fortran/17776
1122 * check.c (gfc_check_system_sub): New function.
1123 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SYSTEM.
1124 * intrinsic.c (add_functions): Add 'system'.
1125 (add_subroutines): Add 'system'.
1126 * intrinsic.h (gfc_check_etime_sub, gfc_check_getcwd_sub):
1127 Move prototypes to other suborutines.
1128 (gfc_check_system_sub, gfc_resolve_system, gfc_resolve_system_sub):
1129 Add prototype.
1130 (gfc_resolve_system_clock): Fix formatting of prototype.
1131 * iresolve.c (gfc_resolve_system, gfc_resolve_system_sub): New
1132 functions.
1133 * trans-intrinsic.c (gfc_conv_intrinsic_function): Deal with
1134 GFC_ISYM_SYSTEM.
1135
1136 2004-10-04 Erik Schnetter <schnetter@aei.mpg.de>
1137
1138 * scanner.c (preprocessor_line): Accept preprocessor lines without
1139 file names. Check file names for closing quotes. Handle escaped
1140 quotes in file names.
1141
1142 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1143 Paul Brook <paul@codesourcery.com>
1144
1145 * trans-array.c (gfc_conv_expr_descriptor): Check for substriungs.
1146 Use gfc_get_expr_charlen.
1147 * trans-expr.c (gfc_get_expr_charlen): New function.
1148 * trans.h (gfc_get_expr_charlen): Add prototype.
1149
1150 2004-10-04 Kazu Hirata <kazu@cs.umass.edu>
1151
1152 * trans-intrinsic.c: Fix a comment typo.
1153
1154 2004-10-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1155
1156 * simplify.c (range_check): Remove blank line at beginning of function.
1157 (gfc_simplify_dint): Same at end of function.
1158 (gfc_simplify_exponent, gfc_simplify_fraction): Simplify calculations.
1159 (gfc_simplify_bound): Fix indentation.
1160 (gfc_simplify_log10): Simplify calculation.
1161 (gfc_simplify_min, gfc_simplify_max): Remove blank line at beginning
1162 of function.
1163 (gfc_simplify_nearest): Same at end of function.
1164 (gfc_simplify_nint, gfc_simplify_idnint): Same at beginning of
1165 function.
1166 (gfc_simplify_rrspacing, gfc_simplify_set_exponent,
1167 gfc_simplify_spacing): Simplify calulations.
1168
1169 2004-10-03 Feng Wang <fengwang@nudt.edu.cn>
1170
1171 * trans-intrinsic.c: Fix comments on spacing and rrspacing
1172 (gfc_conv_intrinsic_rrspacing): Add fold on constant trees.
1173
1174 2004-10-01 Jan Hubicka <jh@suse.cz>
1175
1176 * f95-lang.c (gfc_expand_function): Update call of
1177 tree_rest_of_compilation.
1178 * trans-decl.c (gfc_generate_constructors): Likewise.
1179
1180 2004-09-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1181
1182 * trans-intrinsic.c: Comment fixes.
1183
1184 2004-09-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1185
1186 * decl.c (add_init_expr_to_sym, variable_decl): Comment fixes.
1187
1188 2004-09-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1189
1190 * trans-types.c (gfc_return_by_reference): Remove superfluous
1191 assertion.
1192
1193 * intrinsic.h (gfc_resolve_getcwd): Update prototype.
1194 * iresolve.c (gfc_resolve_getcwd): Add second argument to function.
1195
1196 PR fortran/17615
1197 * trans-expr.c (gfc_trans_arrayfunc_assign): Look at resolved
1198 function to determine return type.
1199
1200 2004-09-20 Jan Hubicka <jh@suse.cz>
1201
1202 * trans-decl.c (build_entry_thunks): Finalize the function; do not lower
1203 tree.
1204 (gfc_generate_function_code): Likewise.
1205
1206 2004-09-20 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1207
1208 PR fortran/15957
1209 * simplify.c (gfc_simplify_reshape): Set shape of return value
1210 correctly.
1211
1212 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
1213 Zack Weinberg <zack@codesourcery.com>
1214
1215 * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class
1216 enumeration constants.
1217
1218 2004-09-17 Paul Brook <paul@codesourcery.com>
1219
1220 * gfortran.h (struct gfc_linebuf): Don't use C99 empty arrays.
1221 (gfc_linebuf_header_size): Define.
1222 * scanner.c (load_file): Use it.
1223
1224 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
1225
1226 * array.c, data.c, decl.c, dependency.c, error.c, f95-lang.c,
1227 interface.c, intrinsic.c, io.c, misc.c, module.c, parse.h,
1228 resolve.c, scanner.c, trans-array.c, trans-array.h,
1229 trans-common.c, trans-const.h, trans-decl.c, trans-expr.c,
1230 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
1231 trans.h: Fix comment typos. Follow spelling conventions.
1232
1233 2004-09-16 Victor Leikehman <lei@il.ibm.com>
1234
1235 PR/15364
1236 * trans-io.c (transfer_array_component): New function.
1237 (transfer_expr): For array fields, call transfer_array_component.
1238
1239 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
1240
1241 * gfortran.texi: Fix a typo.
1242
1243 2004-09-15 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
1244
1245 * parse.c (eof_buf): Rename eof to eof_buf.
1246 (unexpected_eof): Same.
1247 (gfc_parse_file): Same.
1248
1249 2004-09-15 Steven G. Kargl <kargls@comcast.net>
1250
1251 * check.c (gfc_check_getcwd_sub): New function.
1252 * gfortran.h (GFC_ISYM_GETCWD): New symbol.
1253 * intrinsic.c (add_functions): Add function definition;
1254 Use symbol.
1255 * intrinsic.c (add_subroutines): Add subroutine definitions.
1256 * intrinsic.h: Add prototypes.
1257 * iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub):
1258 New functions.
1259 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol.
1260
1261 2004-09-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1262
1263 PR fortran/16485
1264 * module.c (write_symbol): Don't fill in module name here.
1265 (write_symbol0): Fill in here instead.
1266
1267 2004-09-14 Kazu Hirata <kazu@cs.umass.edu>
1268
1269 * data.c, decl.c, f95-lang.c, gfortran.h, match.c,
1270 trans-array.c, trans-common.c, trans-expr.c,
1271 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.h: Fix
1272 comment typos. Follow spelling conventions.
1273
1274 2004-09-09 Paul Brook <paul@codesourcery.com>
1275
1276 * scanner.c (get_file): Add ATTRIBUTE_UNUSED.
1277
1278 2004-09-08 Paul Brook <paul@codesourcery.com>
1279
1280 * array.c: Don't include assert.h.
1281 * data.c: Don't include assert.h. Replace assert and abort with
1282 gcc_assert and gcc_unreachable.
1283 * dependency.c: Ditto.
1284 * f95-lang.c: Ditto.
1285 * iresolve.c: Ditto.
1286 * resolve.c: Ditto.
1287 * simplify.c: Ditto.
1288 * symbol.c: Ditto.
1289 * trans-array.c: Ditto.
1290 * trans-common.c: Ditto.
1291 * trans-const.c: Ditto.
1292 * trans-decl.c: Ditto.
1293 * trans-expr.c: Ditto.
1294 * trans-intrinsic.c: Ditto.
1295 * trans-io.c: Ditto.
1296 * trans-stmt.c: Ditto.
1297 * trans-types.c: Ditto.
1298 * trans.c: Ditto.
1299
1300 2004-09-07 Per Bothner <per@bothner.com>
1301 Paul Brook <paul@codesourcery.com>
1302
1303 * error.c (show_locus): Handle mapped locations.
1304 * f95-lang.c (gfc_be_parse_file): Initialize mapped locations.
1305 * gfortran.h: Include input.h.
1306 (struct gfc_linebuf): Use source_location.
1307 * scanner.c (get_file): Initialize linemap.
1308 (preprocessor_line): Pass extra argument to get_file.
1309 (load_file): Ditto. Setup linemap.
1310 (gfc_new_file): Handle mapped locations.
1311 * trans-common.c (build_field, build_equiv_decl, build_common_decl):
1312 Set decl source locations.
1313 (gfc_trans_common): Set blank common block location.
1314 * trans-decl.c (gfc_set_decl_location): New function.
1315 (gfc_get_label_decl, gfc_get_symbol_decl): Use it.
1316 (trans_function_start): Move call to gfc_set_backend_locus..
1317 (build_function_decl): ... to here.
1318 (build_entry_thunks): Set and restore the backend locus.
1319 (gfc_generate_constructors): Remove excess arguments to
1320 init_function_start.
1321 (gfc_generate_block_data): Add comments. Set the decl locus.
1322 * trans-io.c (set_error_locus): Handle mapped locations.
1323 * trans.c (gfc_get_backend_locus, gfc_get_backend_locus): Ditto.
1324 (gfc_trans_code): Use SET_EXPR_LOCATION.
1325 (gfc_generate_code): Override the location of the new symbol.
1326 * trans.h (gfc_set_decl_location): Add prototype.
1327
1328 2004-08-31 Paul Brook <paul@codesourcery.com>
1329
1330 * trans-types.c (gfc_type_for_mode): Return NULL for unknown modes.
1331
1332 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1333
1334 PR fortran/15327
1335 * trans-intrinsic.c (gfc_conv_intrinsic_merge): Do the right thing for
1336 strings.
1337
1338 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1339
1340 PR fortran/16400
1341 PR fortran/16404
1342 (port from g95)
1343 * resolve.c (resolve_transfer): New function.
1344 (resolve_code): Call resolve_transfer in case of EXEC_TRANSFER.
1345
1346 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1347
1348 PR fortran/16579
1349 * trans-types.c (gfc_init_types): Make gfc_character1_type_node an
1350 unsigned char.
1351
1352 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1353
1354 * CONTRIB, NEWS, README, TODO: Remove obsolete files.
1355
1356 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1357
1358 PR fortran/17244
1359 * trans-types.c (gfc_return_by_reference): Remove TODO error,
1360 add comment pointing out possible issue WRT compatibility with g77.
1361
1362 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1363
1364 * trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace
1365 all occurences of 'gfc_strlen_type_node' by
1366 'gfc_charlen_type_node'.
1367 * trans-types.h: Same. Also update comment accordingly.
1368
1369 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1370
1371 * primary.c: Update copyright boilerplate to say GCC.
1372 * f95-lang.c: Change initial comment to say gfortran.
1373
1374 2004-08-31 Paul Brook <paul@codesourcery.com>
1375
1376 * trans-types.h: Add comments.
1377 (intmax_type_node, string_type_node, const_string_type_node): Remove.
1378
1379 2004-08-30 Richard Henderson <rth@redhat.com>
1380
1381 * Make-lang.in (fortran/f95-lang.o): Update dependencies.
1382 (fortran/trans-decl.o, fortran/trans-types.o): Likewise.
1383 * gfortran.h (gfc_integer_info): Add c_char, c_short, c_int,
1384 c_long, c_long_long.
1385 (gfc_logical_info): Add c_bool.
1386 (gfc_real_info): Add mode_precision, c_float, c_double, c_long_double.
1387 * trans-array.c (gfc_array_allocate): Use TYPE_PRECISION
1388 rather than gfc_int[48]_type_node for allocate choice.
1389 * trans-decl.c (gfc_build_intrinsic_function_decls): Cache
1390 local copies of some kind type nodes.
1391 (gfc_build_builtin_function_decls): Likewise.
1392 * trans-expr.c (gfc_conv_power_op): Likewise.
1393 * trans-intrinsic.c (gfc_conv_intrinsic_index,
1394 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify,
1395 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Likewise.
1396 * trans-stmt.c (gfc_trans_pause, gfc_trans_stop,
1397 gfc_trans_character_select, gfc_trans_allocate): Likewise.
1398 * trans-io.c (gfc_pint4_type_node): Move into ...
1399 (gfc_build_io_library_fndecls): ... here. Cache local copies of
1400 some kind type nodes.
1401 * trans-types.c (gfc_type_nodes): Remove.
1402 (gfc_character1_type_node, gfc_strlen_type_node): New.
1403 (gfc_integer_types, gfc_logical_types): New.
1404 (gfc_real_types, gfc_complex_types): New.
1405 (gfc_init_kinds): Fill in real mode_precision.
1406 (gfc_build_int_type, gfc_build_real_type): New.
1407 (gfc_build_complex_type, gfc_build_logical_type): New.
1408 (c_size_t_size): New.
1409 (gfc_init_types): Loop over kinds.
1410 (gfc_get_int_type, gfc_get_real_type): Use gfc_validate_kind.
1411 (gfc_get_complex_type, gfc_get_logical_type): Likewise.
1412 (gfc_get_character_type_len): Likewise.
1413 (gfc_type_for_size): Loop over kinds; use a reduced set of
1414 unsigned type nodes.
1415 (gfc_type_for_mode): Loop over kinds.
1416 (gfc_signed_or_unsigned_type): Use gfc_type_for_size.
1417 (gfc_unsigned_type, gfc_signed_type): Use gfc_signed_or_unsigned_type.
1418 * trans-types.h (F95_INT1_TYPE, F95_INT2_TYPE, F95_INT4_TYPE,
1419 F95_INT8_TYPE, F95_INT16_TYPE, F95_REAL4_TYPE, F95_REAL8_TYPE,
1420 F95_REAl16_TYPE, F95_COMPLEX4_TYPE, F95_COMPLEX8_TYPE,
1421 F95_COMPLEX16_TYPE, F95_LOGICAL1_TYPE, F95_LOGICAL2_TYPE,
1422 F95_LOGICAL4_TYPE, F95_LOGICAL8_TYPE, F95_LOGICAL16_TYPE,
1423 F95_CHARACTER1_TYPE, NUM_F95_TYPES, gfc_type_nodes,
1424 gfc_int1_type_node, gfc_int2_type_node, gfc_int4_type_node,
1425 gfc_int8_type_node, gfc_int16_type_node, gfc_real4_type_node,
1426 gfc_real8_type_node, gfc_real16_type_node, gfc_complex4_type_node,
1427 gfc_complex8_type_node, gfc_complex16_type_node,
1428 gfc_logical1_type_node, gfc_logical2_type_node,
1429 gfc_logical4_type_node, gfc_logical8_type_node,
1430 gfc_logical16_type_node, gfc_strlen_kind): Remove.
1431 (gfc_character1_type_node): Turn in to a variable.
1432 (gfc_strlen_type_node): Likewise.
1433
1434 2004-08-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1435
1436 * gfortran.h (gfc_namespace): Add new field is_block_data.
1437 * parse.c (accept_statement): Remove special handling for BLOCK DATA.
1438 (parse_block_data): Record BLOCK DATA name, set is_block_data field.
1439 * trans.c (gfc_generate_code): Handle BLOCK DATA units.
1440 * trans.h (gfc_generate_block_data): Add prototype.
1441 * trans-decl.c (gfc_generate_block_data): New function.
1442
1443 2004-08-29 Richard Henderson <rth@redhat.com>
1444
1445 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_export.
1446 * trans-types.c (gfc_init_kinds): Reject integer kinds larger
1447 than two HOST_WIDE_INT.
1448
1449 2004-08-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1450
1451 PR fortran/13910
1452 * decl.c (free_variable, free_value, gfc_free_data, var_list,
1453 var_element, top_var_list, match_data_constant, top_val_list,
1454 gfc_match_data): Move here from match.c.
1455 (match_old_style_init): New function.
1456 (variable_decl): Match old-style initialization.
1457 * expr.c (gfc_get_variable_expr): New function.
1458 * gfortran.h (gfc_get_variable_expr): Add prototype.
1459 * gfortran.texi: Start documentation for supported extensions.
1460 * match.c: Remove the functions moved to decl.c.
1461 * match.h (gfc_match_data): Move prototype to under decl.c.
1462 * symbol.c (gfc_find_sym_tree, gfc_find_symbol): Add/correct
1463 comments.
1464
1465 2004-08-29 Steven G. Kargl <kargls@comcast.net>
1466 Paul Brook <paul@codesourcery.com>
1467
1468 * check.c (gfc_check_besn, gfc_check_g77_math1): New functions.
1469 * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Define.
1470 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
1471 (build_builtin_fntypes): New function.
1472 (gfc_init_builtin_functions): Use it.
1473 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_{J,Y}{0,1,N}
1474 and GFC_ISYM_ERF{,C}.
1475 (gfc_c_int_kind): Declare.
1476 * intrinsic.c (add_functions): Add [d]bes* and [d]erf*.
1477 * intrinsic.h (gfc_check_besn, gfc_check_g77_math1, gfc_resolve_besn,
1478 gfc_resolve_g77_math1): Add prototypes.
1479 * resolve.c (gfc_resolve_besn, gfc_resolve_g77_math1): New functions.
1480 * mathbuiltins.def: Add comment. Change third argument. Use
1481 DEFINE_MATH_BUILTIN_C. Add bessel and error functions.
1482 * trans-intrinsic.c (BUILT_IN_FUNCTION): Define.
1483 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
1484 * trans-types.c (gfc_c_int_kind): Declare.
1485 (gfc_init_kinds): Set it.
1486
1487 2004-08-29 Steven G. Kargl <kargls@comcast.net>
1488 Paul Brook <paul@codesourcery.com>
1489
1490 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
1491 (gfc_check_f, gfc_simplify_f): Add f0.
1492 * intrinsic.c (do_check): Call f0. Flatten.
1493 (add_sym_0): Fix prototype. Set f0.
1494 (add_functions): Add getgid, getgid and getuid.
1495 (resolve_intrinsic): Remove obsolete comment.
1496 (do_simplify): Call f0.
1497 * intrinsic.h (gfc_resolve_getgid, gfc_resolve_getpid,
1498 gfc_resolve_getuid): Add prototypes.
1499 * iresolve.c (gfc_resolve_getgid, gfc_resolve_getpid,
1500 gfc_resolve_getuid): New functions.
1501 * trans-intrinsic.c (gfc_conv_intrinsic_function): Handle
1502 GFC_ISYM_GET?ID.
1503
1504 2004-08-28 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1505
1506 * error.c (gfc_error_init_1): Remove blank line in front of
1507 function body. Add missing blank.
1508 (gfc_buffer_error, error_char, error_string): Remove blank line in
1509 front of function body.
1510 (show_locus): Add comma in comment.
1511 (gfc_clear_warning, gfc_warning_check, gfc_clear_error,
1512 gfc_push_error, gfc_pop_error): Remove blank line in front of
1513 function body.
1514 (gfc_get_errors): Typo fix in comment in front of function. Remove
1515 blank line in front of function body.
1516
1517 2004-08-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1518
1519 * gfortran.h (gfc_default_*_kind): Remove prototypes, add extern
1520 variable declaration of same name.
1521 * arith.c, check.c, decl.c, dump_parse_tree.c, expr.c,
1522 intrinsic.c, io.c, iresolve.c, match.c, options.c, primary.c,
1523 resolve.c, simplify.c, symbol.c, trans-const.c, trans-io.c:
1524 Replace all calls to gfc_default_*_kind with variable accesses.
1525 * trans-types.c: Same as above.
1526 (gfc_default_*_kind_1): Rename to gfc_default_*_kind, remove
1527 static qualifier. Replace all occurences.
1528 (gfc_default_*_kind): Remove functions.
1529
1530 2004-08-26 Richard Henderson <rth@redhat.com>
1531
1532 * arith.c: Include system.h, not real system headers.
1533 (MPZ_NULL, MPF_NULL, DEF_GFC_INTEGER_KIND, DEF_GFC_LOGICAL_KIND,
1534 DEF_GFC_REAL_KIND, GFC_SP_KIND, GFC_SP_PREC, GFC_SP_EMIN, GFC_SP_EMAX,
1535 GFC_DP_KIND, GFC_DP_PREC, GFC_DP_EMIN, GFC_DP_EMAX, GFC_QP_KIND,
1536 GFC_QP_PREC, GFC_QP_EMIN, GFC_QP_EMAX): Remove.
1537 (gfc_integer_kinds, gfc_logical_kinds, gfc_real_kinds,
1538 gfc_index_integer_kind, gfc_default_integer_kind,
1539 gfc_default_real_kind,gfc_default_double_kind,
1540 gfc_default_character_kind, gfc_default_logical_kind,
1541 gfc_default_complex_kind, validate_integer, validate_real,
1542 validate_logical, validate_character,
1543 gfc_validate_kind): Move to trans-types.c.
1544 (gfc_set_model_kind): Use gfc_validate_kind.
1545 (gfc_set_model): Just copy the current precision to default.
1546 (gfc_arith_init_1): Use mpfr precision 128 for integer setup.
1547 * f95-lang.c (gfc_init_decl_processing): Invoke gfc_init_kinds.
1548 * gfortran.h: Update file commentary.
1549 * trans-types.c (MAX_INT_KINDS, MAX_REAL_KINDS): New.
1550 (gfc_default_integer_kind_1, gfc_default_real_kind_1,
1551 gfc_default_double_kind_1, gfc_default_character_kind_1,
1552 gfc_default_logical_kind_1, gfc_default_complex_kind_1): New.
1553 (gfc_init_kinds): New.
1554 (gfc_init_types): Don't set gfc_index_integer_kind here.
1555 * trans-types.h (gfc_init_kinds): Declare.
1556 * doc/invoke.texi: Clarify DOUBLE PRECISION behaviour wrt -r8.
1557
1558 2004-08-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1559
1560 * check.c (gfc_check_atan2): New function.
1561 * intrinsic.c (add_functions): Use gfc_check_atan2 for ATAN2
1562 * intrinsic.h (gfc_check_atan2): Add prototype.
1563
1564 2004-08-25 Richard Henderson <rth@redhat.com>
1565
1566 * arith.c (gfc_validate_kind): Add may_fail argument; abort if
1567 false and we don't validate the kind.
1568 (gfc_check_integer_range, gfc_check_real_range): Update to match.
1569 * check.c (kind_check): Likewise.
1570 * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Likewise.
1571 (match_char_spec, match_logical_spec): Likewise.
1572 * gfortran.h (gfc_validate_kind): Likewise.
1573 * options.c (gfc_handle_option): Likewise.
1574 * primary.c (match_integer_constant, match_real_constant,
1575 match_string_constant, match_logical_constant,
1576 match_const_complex_part): Likewise.
1577 * simplify.c (get_kind, gfc_simplify_bit_size, gfc_simplify_digits,
1578 gfc_simplify_epsilon, gfc_simplify_huge, gfc_simplify_ibclr,
1579 gfc_simplify_ibset, gfc_simplify_ishft, gfc_simplify_ishftc,
1580 gfc_simplify_maxexponent, gfc_simplify_minexponent,
1581 gfc_simplify_nearest, gfc_simplify_not, gfc_simplify_precision,
1582 gfc_simplify_radix, gfc_simplify_range, gfc_simplify_rrspacing,
1583 gfc_simplify_scale, gfc_simplify_spacing, gfc_simplify_tan,
1584 gfc_simplify_tiny): Likewise.
1585 * trans-intrinsic.c (gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod,
1586 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
1587 prepare_arg_info): Likewise.
1588
1589 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1590
1591 * expr.c (gfc_check_assign): Add comment. Add new warning.
1592 * trans-expr.c (gfc_conv_function_call): Correctly dereference
1593 result of pointer valued function when not in pointer assignment.
1594
1595 2004-08-25 Paul Brook <paul@codesourcery.com>
1596
1597 * config-lang.in: Remove dead commented line.
1598 * module.c: Replace g95 with gfortran in comment.
1599
1600 2004-08-25 Paul Brook <paul@codesourcery.com>
1601
1602 PR fortran/17190
1603 * arith.c (gfc_mpfr_to_mpz): Workaround mpfr bug.
1604
1605 2004-08-25 Paul Brook <paul@codesourcery.com>
1606
1607 PR fortran/17144
1608 * trans-array.c (gfc_trans_allocate_temp_array): Remove
1609 string_length argument.
1610 (gfc_trans_array_ctor_element): New function.
1611 (gfc_trans_array_constructor_subarray): Use it.
1612 (gfc_trans_array_constructor_value): Ditto. Handle constant
1613 character arrays.
1614 (get_array_ctor_var_strlen, get_array_ctor_strlen): New functions.
1615 (gfc_trans_array_constructor): Use them.
1616 (gfc_add_loop_ss_code): Update to new gfc_ss layout.
1617 (gfc_conv_ss_descriptor): Remember section string length.
1618 (gfc_conv_scalarized_array_ref): Ditto. Remove dead code.
1619 (gfc_conv_resolve_dependencies): Update to new gfc_ss layout.
1620 (gfc_conv_expr_descriptor): Ditto.
1621 (gfc_conv_loop_setup): Ditto. Spelling fixes.
1622 * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
1623 * trans-const.c (gfc_conv_constant): Update to new gfc_ss layout.
1624 * trans-expr.c (gfc_conv_component_ref): Turn error into ICE.
1625 (gfc_conv_variable): Set string_length from section.
1626 (gfc_conv_function_call): Remove extra argument.
1627 (gfc_conv_expr, gfc_conv_expr_reference): Update to new gfc_ss layout.
1628 * trans-types.c (gfc_get_character_type_len): New function.
1629 (gfc_get_character_type): Use it.
1630 (gfc_get_dtype): Return zero for internal types.
1631 * trans-types.h (gfc_get_character_type_len): Add prototype.
1632 * trans.h (struct gfc_ss): Move string_length out of union.
1633
1634 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1635
1636 * trans.h (build2_v, build3_v): New macros.
1637 (build_v): Remove.
1638 * f95-lang.c (gfc_truthvalue_conversion): Use build2 instead of
1639 build.
1640 * trans-array.c (gfc_conv_descriptor_data,
1641 gfc_conv_descriptor_offset, gfc_conv_descriptor_dimension,
1642 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
1643 gfc_conv_descriptor_ubound, gfc_trans_allocate_array_storage,
1644 gfc_trans_allocate_temp_array,
1645 gfc_trans_array_constructor_subarray,
1646 gfc_trans_array_constructor_value, gfc_conv_array_index_ref,
1647 gfc_trans_array_bound_check, gfc_conv_array_index_offset,
1648 gfc_conv_scalarized_array_ref, gfc_conv_array_ref,
1649 gfc_conv_array_ref, gfc_trans_preloop_setup,
1650 gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
1651 gfc_conv_loop_setup, gfc_array_init_size,
1652 gfc_conv_array_initializer, gfc_trans_array_bounds,
1653 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
1654 gfc_conv_expr_descriptor, gfc_conv_array_parameter,
1655 gfc_trans_deferred_array): Use buildN and buildN_v macros instead
1656 of build and build_v as appropriate.
1657 * trans-common.c (create_common): Same.
1658 * trans-decl.c (gfc_trans_auto_character_variable,
1659 gfc_trans_entry_master_switch, gfc_generate_function_code): Same.
1660 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
1661 gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
1662 gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
1663 gfc_conv_expr_op, gfc_conv_function_call,
1664 gfc_trans_structure_assign): Same.
1665 * trans-intrinsic.c (build_fixbound_expr, build_round_expr,
1666 gfc_conv_intrinsic_aint, gfc_conv_intrinsic_bound,
1667 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
1668 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
1669 gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_minmax,
1670 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
1671 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_minmaxloc,
1672 gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
1673 gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_singlebitop,
1674 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
1675 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_strcmp,
1676 gfc_conv_allocated, gfc_conv_associated, prepare_arg_info,
1677 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
1678 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat,
1679 gfc_conv_intrinsic_iargc): Same.
1680 * trans-io.c (set_parameter_value, set_parameter_ref, set_string,
1681 set_flag, add_case, io_result, transfer_namelist_element,
1682 transfer_expr): Same.
1683 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_if_1,
1684 gfc_trans_arithmetic_if, gfc_trans_do, gfc_trans_do_while,
1685 gfc_trans_integer_select, gfc_trans_logical_select,
1686 gfc_trans_character_select, gfc_trans_forall_loop,
1687 gfc_trans_nested_forall_loop, gfc_do_allocate,
1688 generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
1689 compute_inner_temp_size, compute_overall_iter_number,
1690 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
1691 gfc_trans_forall_1, gfc_evaluate_where_mask,
1692 gfc_trans_where_assign, gfc_trans_allocate): Same.
1693 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Same.
1694 * trans.c (gfc_add_modify_expr, gfc_finish_block,
1695 gfc_build_array_ref, gfc_build_function_call,
1696 gfc_trans_runtime_check): Same.
1697
1698 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1699
1700 * trans-const.c (gfc_conv_mpz_to_tree): Change call to
1701 build_int_cst to build_int_cst_wide in accordance to Nathan's
1702 previous patch.
1703
1704 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
1705
1706 * trans-array.c (gfc_trans_array_constructor_value): Adjust
1707 build_int_cst calls.
1708 * trans-const.c (gfc_build_string_const, gfc_init_constants,
1709 gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise.
1710 * trans-decl.c (gfc_get_symbol_decl, build_entry_thunks,
1711 gfc_trans_entry_master_switch): Likewise.
1712 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
1713 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
1714 * trans-io.c (add_case, set_error_locus,
1715 transfer_namelist_element, transfer_expr): Likewise.
1716 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
1717 gfc_trans_stop, gfc_trans_character_select): Likewise.
1718 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
1719 * trans.c (gfc_trans_runtime_check): Likewise.
1720
1721 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1722
1723 * trans-decl.c, trans-types.c: Add and remove blank lines as
1724 required.
1725
1726 2004-08-24 Richard Henderson <rth@redhat.com>
1727
1728 * trans-const.c (gfc_conv_mpz_to_tree): Fix 64-bit shift warning.
1729
1730 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1731
1732 * resolve.c (merge_argument_lists): Revert unintentionally
1733 committed change.
1734
1735 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1736
1737 * trans-decl.c (build_function_decl): Fix spelling in comment.
1738 (build_entry_thunks): Remove code with no function.
1739 (gfc_build_intrinsic_function_decls): Remove empty line.
1740
1741 * resolve.c (resolve_entries): Fix a bunch of comment typos.
1742
1743 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
1744
1745 * f95-lang.c (gfc_init_decl_processing): Adjust
1746 build_common_tree_nodes call.
1747
1748 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1749
1750 * trans-types.c: Spelling and formatting fixes.
1751
1752 2004-08-23 Richard Henderson <rth@redhat.com>
1753
1754 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_getlimbn instead
1755 of going through an intermediate string. Fix 32/64 int/long bug.
1756
1757 2004-08-23 Eric Christopher <echristo@redhat.com>
1758
1759 * trans-types.c (gfc_type_for_mode): Remove VECTOR_TYPE_SUPPORTED_P
1760 usage. Use build_vector_type_for_mode for vector types.
1761
1762 2004-08-22 Richard Henderson <rth@redhat.com>
1763
1764 PR 13465
1765 * data.c (find_con_by_offset): Search ordered list; handle
1766 elements with repeat counts.
1767 (gfc_assign_data_value_range): New.
1768 * gfortran.h (struct gfc_data_value): Make repeat unsigned.
1769 (gfc_assign_data_value_range): Declare.
1770 * match.c (top_val_list): Extract repeat count into a temporary.
1771 * resolve.c (values): Make left unsigned.
1772 (next_data_value): Don't decrement left.
1773 (check_data_variable): Use gfc_assign_data_value_range.
1774
1775 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1776
1777 * trans-const.c, trans-decl.c, trans-expr.c: Spelling fixes.
1778
1779 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1780
1781 * check.c (gfc_check_reduction): Rename to ...
1782 (check_reduction): ... this. Make static. Don't check type of
1783 first argument.
1784 (gfc_check_minval_maxval, gfc_check_prodcut_sum): New functions.
1785 * intrinsic.c (add_functions): Change MAXVAL, MINVAL, PRODUCT and
1786 SUM to use new check functions.
1787 (check_specific): Change logic to call new functions.
1788 * intrinsic.h (gfc_check_minval_maxval, gfc_check_product_sum):
1789 Add prototypes.
1790 (gfc_check_reduction): Remove prototype.
1791
1792 2004-08-20 Paul Brook <paul@codesourcery.com>
1793 Canqun Yang <canqun@nudt.edu.cn>
1794
1795 PR fortran/17077
1796 * trans-array.c (gfc_conv_array_parameter): Pass correct pointer
1797 for automatic arrays.
1798 * trans-types.c (gfc_get_nodesc_array_type): Add comment.
1799
1800 2004-08-19 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1801 (Port from g95)
1802
1803 PR fortran/17074
1804 * match.c (match_simple_forall, match_simple_where): Forward-declare.
1805 (gfc_match_if): Order statement list alphabetically, add WHERE and
1806 FORALL, remove double PAUSE.
1807 (gfc_match_simple_where, match_forall_header,
1808 gfc_match_simple_forall): New functions.
1809 (gfc_match_forall): Use match_forall_header.
1810
1811 2004-08-19 Paul Brook <paul@codesourcery.com>
1812
1813 PR fortran/17091
1814 * gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0.
1815 * symbol.c (gfc_clear_attr): Use memset.
1816
1817 2004-08-19 Paul Brook <paul@codesourcery.com>
1818
1819 PR fortran/14976
1820 PR fortran/16228
1821 * data.c (assign_substring_data_value): Remove.
1822 (create_character_intializer): New function.
1823 (gfc_assign_data_value): Track the typespec for the current
1824 subobject. Use create_character_intializer.
1825
1826 2004-08-19 Erik Schnetter <schnetter@aei.mpg.de>
1827
1828 PR fortran/16946
1829 * check.c (gfc_check_reduction): New function.
1830 (gfc_check_minval_maxval): Removed.
1831 (gfc_check_product): Removed.
1832 (gfc_check_sum): Removed.
1833 * intrinsic.h: Add/remove declarations for these.
1834 * gfortran.h: Add field f3red to union gfc_check_f.
1835 * intrinsic.c (add_sym_3red): New function.
1836 (add_functions): Register maxval, minval, product, and sum intrinsics
1837 through add_sym_3red.
1838 (check_specific): Handle f3red union field.
1839 * iresolve.c: Whitespace change.
1840
1841 2004-08-18 Paul Brook <paul@codesourcery.com>
1842
1843 * trans-types.c (gfc_sym_type): Use pointer types for optional args.
1844
1845 2004-08-18 Victor Leikehman <lei@il.ibm.com>
1846
1847 PR fortran/13278
1848 * trans-io.c (transfer_namelist_element): New. Recursively handle
1849 derived-type variables. Pass string lengths.
1850 (build_dt): Code moved to build_namelist, with some
1851 changes and additions.
1852 (gfc_build_io_library_fndecls): Declare the fifth
1853 argument in st_set_nml_var_char -- string_length.
1854
1855 2004-08-17 Paul Brook <paul@codesourcery.com>
1856 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1857
1858 PR fortran/13082
1859 * decl.c (get_proc_name): Update mystery comment.
1860 (gfc_match_entry): Check for errors earlier. Add entry point to list.
1861 * dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes.
1862 * gfortran.h (symbol_attribute): Add entry_master. Document entry.
1863 (struct gfc_entry_list): Define.
1864 (gfc_get_entry_list): Define.
1865 (struct gfc_namespace): Add refs and entries.
1866 (enum gfc_exec_op): Add EXEC_ENTRY.
1867 (struct gfc_code): Add ext.entry.
1868 * module.c (ab_attribute, attr_bits): Remove AB_ENTRY.
1869 (mio_symbol_attribute): Don't save/reture addr->entry.
1870 (mio_namespace_ref): Refcount namespaces.
1871 * parse.c (accept_statement): Handle ST_ENTRY.
1872 (gfc_fixup_sibling_symbols): Mark symbol as referenced.
1873 (parse_contained): Fixup sibling references to entry points
1874 after parsing the procedure body.
1875 * resolve.c (resolve_contained_fntype): New function.
1876 (merge_argument_lists, resolve_entries): New functions.
1877 (resolve_contained_functions): Use them.
1878 (resolve_code): Handle EXEC_ENTRY.
1879 (gfc_resolve): Call resolve_entries.
1880 * st.c (gfc_free_statement): Handle EXEC_ENTRY.
1881 * symbol.c (gfc_get_namespace): Refcount namespaces.
1882 (gfc_free_namespace): Ditto.
1883 * trans-array.c (gfc_trans_dummy_array_bias): Treat all args as
1884 optional when multiple entry points are present.
1885 * trans-decl.c (gfc_get_symbol_decl): Remove incorrect check.
1886 (gfc_get_extern_function_decl): Add assertion. Fix coment.
1887 (create_function_arglist, trans_function_start, build_entry_thunks):
1888 New functions.
1889 (gfc_build_function_decl): Rename ...
1890 (build_function_decl): ... to this.
1891 (gfc_create_function_decl): New function.
1892 (gfc_generate_contained_functions): Use it.
1893 (gfc_trans_entry_master_switch): New function.
1894 (gfc_generate_function_code): Use new functions.
1895 * trans-stmt.c (gfc_trans_entry): New function.
1896 * trans-stmt.h (gfc_trans_entry): Add prototype.
1897 * trans-types.c (gfc_get_function_type): Add entry point argument.
1898 * trans.c (gfc_trans_code): Handle EXEC_ENTRY.
1899 (gfc_generate_module_code): Call gfc_create_function_decl.
1900 * trans.h (gfc_build_function_decl): Remove.
1901 (gfc_create_function_decl): Add prototype.
1902
1903 2004-08-15 Andrew Pinski <apinski@apple.com>
1904
1905 PR fortran/17030
1906 * f95-lang.c (gfc_init_builtin_functions): Initialize the builtins
1907 for cabs{,f} and copysign{,f}.
1908 * trans-decl.c (gfor_fndecl_math_cabsf): Delete.
1909 (gfor_fndecl_math_cabs): Delete.
1910 (gfor_fndecl_math_sign4): Delete.
1911 (gfor_fndecl_math_sign8): Delete.
1912 (gfc_build_intrinsic_function_decls): Remove the
1913 initializing of cabs{,f} and copysign{,f} functions.
1914 * trans-intrinsic.c (gfc_conv_intrinsic_abs): Use the builtins
1915 instead of the functions definitions.
1916 (gfc_conv_intrinsic_sign): Likewise.
1917 * trans.h (gfor_fndecl_math_cabsf): Delete.
1918 (gfor_fndecl_math_cabs): Delete.
1919 (gfor_fndecl_math_sign4): Delete.
1920 (gfor_fndecl_math_sign8): Delete.
1921
1922 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
1923
1924 * trans-array.c (gfc_trans_array_constructor_value): Use
1925 build_int_cst.
1926 * trans-const.c (gfc_build_string_const,
1927 gfc_init_constants, gfc_conv_mpz_to_tree,
1928 gfc_conv_constant_to_tree): Likewise.
1929 * trans-decl.c (gfc_get_symbol_decl): Likewise.
1930 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
1931 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
1932 * trans-io.c (add_case, set_error_locus, build_dt,
1933 transfer_expr): Likewise.
1934 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
1935 gfc_trans_stop, gfc_trans_character_select): Likewise.
1936 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
1937 * trans.c (gfc_trans_runtime_check): Likewise.
1938
1939 2004-08-14 Paul Brook <paul@codesourcery.com>
1940
1941 * trans-decl.c (gfc_build_function_decl): Remove dead code.
1942
1943 2004-08-14 Paul Brook <paul@codesourcery.com>
1944
1945 * trans-arry.c (gfc_trans_auto_array_allocation): Remove unused var.
1946
1947 2004-08-13 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1948
1949 * gfortran.h: Add comments.
1950 * parse.c (parse_contained): Fix comment typo.
1951 * resolve.c (was_declared): Ditto.
1952 * symbol.c: Ditto.
1953
1954 2004-08-11 Paul Brook <paul@codeourcery.com>
1955
1956 PR fortran/16917
1957 * intrinsic.c (add_functions): Add dfloat as an alias for dble.
1958
1959 2004-08-10 Richard Henderson <rth@redhat.com>
1960
1961 * f95-lang.c (gfc_init_builtin_functions): Remove
1962 __builtin_stack_alloc, add __builtin_alloca.
1963 * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR.
1964 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
1965
1966 2004-08-10 Paul Brook <paul@codesourcery.com>
1967
1968 * trans-io.c (transfer_expr): Handle pointters.
1969
1970 2004-08-10 Paul Brook <paul@codesourcery.com>
1971
1972 PR fortran/16919
1973 * trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT.
1974 (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta.
1975 (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary):
1976 Handle GFC_SS_COMPONENT.
1977 (gfc_conv_ss_startstride): Ditto. Set ss->shape.
1978 (gfc_conv_loop_setup): Tweak commends. Remove dead code.
1979 Use ss->shape.
1980 (gfc_conv_array_initializer): Call specific initializer routines.
1981 * trans-expr.c (gfc_trans_structure_assign): New function.
1982 (gfc_trans_subarray_assign): New function.
1983 (gfc_trans_subcomponent_assign): New fucntion
1984 (gfc_conv_structure): Use them.
1985 * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT.
1986 (gfc_ss): Add shape.
1987
1988 2004-08-08 Victor Leikehman <lei@il.ibm.com>
1989
1990 * simplify.c (gfc_simplify_shape): Bugfix.
1991 * expr.c (gfc_copy_shape_excluding): New function.
1992 * gfortran.h (gfc_get_shape): Bugfix.
1993 (gfc_copy_shape_excluding): Added declaration.
1994 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
1995 gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound,
1996 gfc_resolve_ubound, gfc_resolve_transpose): Added compile
1997 time resolution of shape.
1998
1999 2004-08-06 Janne Blomqvist <jblomqvi@cc.hut.fi>
2000
2001 * intrinsic.c (add_subroutines): Add getenv and
2002 get_environment_variable. (add_sym_5s): New function.
2003 * intrinsic.h (gfc_resolve_get_environment_variable): Add
2004 prototype.
2005 * iresolve.c (gfc_resolve_get_environment_variable): New
2006 function.
2007
2008 2004-08-06 Feng Wang <fengwang@nudt.edu.cn>
2009
2010 * f95-lang.c (gfc_init_builtin_functions): Fix the number of
2011 __builtin_pow[f] arguments.
2012
2013 2004-08-06 Steven G. Kargl <kargls@comcast.net>
2014
2015 * arith.c: Add #define for model numbers. Remove global GMP variables.
2016 (natural_logarithm,common_logarithm,exponential,sine,
2017 cosine,arctangent,hypercos,hypersine ): Remove.
2018 (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions.
2019 (arctangent2,gfc_arith_init_1,gfc_arith_done_1
2020 gfc_check_real_range, gfc_constant_result, gfc_range_check,
2021 gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times,
2022 gfc_arith_divide,complex_reciprocal,complex_pow_ui,
2023 gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real,
2024 gfc_convert_complex,gfc_int2real,gfc_int2complex,
2025 gfc_real2int,gfc_real2real,gfc_real2complex,
2026 gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP
2027 to MPFR, use new functions.
2028 * arith.h: Remove extern global variables.
2029 (natural_logarithm,common_logarithm,exponential, sine, cosine,
2030 arctangent,hypercos,hypersine): Remove prototypes.
2031 (arctangent2): Update prototype from GMP to MPFR.
2032 (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes.
2033 * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR.
2034 * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR.
2035 * gfortran.h (GFC_REAL_BITS): Remove.
2036 (arith): Add ARITH_NAN.
2037 Include mpfr.h. Define GFC_RND_MODE.
2038 Rename GCC_GFORTRAN_H GFC_GFC_H.
2039 (gfc_expr): Convert GMP to MPFR.
2040 * module.c: Add arith.h, correct type in comment.
2041 (mio_gmp_real): Convert GMP to MPFR.
2042 (mio_expr): Use gfc_set_model_kind().
2043 * primary.c: Update copyright date with 2004.
2044 (match_real_constant,match_const_complex_part): Convert GMP to MPFR.
2045 * simplify.c: Remove global GMP variables
2046 (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag,
2047 gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint,
2048 gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan,
2049 gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx,
2050 gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh,
2051 gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon,
2052 gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor,
2053 gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int,
2054 gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log,
2055 gfc_simplify_log10,simplify_min_max,gfc_simplify_mod,
2056 gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint,
2057 gfc_simplify_rrspacing,gfc_simplify_scale,
2058 gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin,
2059 gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt,
2060 gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny,
2061 gfc_simplify_init_1,gfc_simplify_done_1): Convert GMP to MPFR.
2062 Use new functions.
2063 * trans-const.c (gfc_conv_mpfr_to_tree): Rename from
2064 gfc_conv_mpf_to_tree. Convert it to use MPFR
2065 (gfc_conv_constant_to_tree): Use it.
2066 * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree().
2067 * trans-intrinsic.c: Add arith.h, remove gmp.h
2068 (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR.
2069
2070 2004-08-06 Victor Leikehman <lei@il.ibm.com>
2071 Paul Brook <paul@codesourcery.com>
2072
2073 * trans-array.c (gfc_trans_allocate_array_storage,
2074 gfc_trans_allocate_temp_array, gfc_add_loop_ss_code,
2075 gfc_conv_loop_setup): For functions, if the shape of the result
2076 is not known in compile-time, generate an empty array descriptor for
2077 the result and let the callee to allocate the memory.
2078 (gfc_trans_dummy_array_bias): Do nothing for pointers.
2079 (gfc_conv_expr_descriptor): Use function return values directly.
2080 * trans-expr.c (gfc_conv_function_call): Always add byref call
2081 insn to pre chain.
2082 (gfc_trans_pointer_assignment): Add comments.
2083 (gfc_trans_arrayfunc_assign): Don't chain on expression.
2084
2085 2004-08-01 Roger Sayle <roger@eyesopen.com>
2086
2087 * options.c (gfc_init_options): Don't warn about the use GNU
2088 extensions by default.
2089 (gfc_post_options): Warn about GNU extensions with -pedantic.
2090 (gfc_handle_option): Don't warn about GNU extensions with -std=gnu.
2091
2092 2004-07-30 Richard Henderson <rth@redhat.com>
2093
2094 * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL
2095 for TREE_CONSTANTs.
2096
2097 2004-07-25 Richard Henderson <rth@redhat.com>
2098
2099 * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL
2100 and DECL_IGNORED_P on RESULT_DECL.
2101 (gfc_generate_constructors): Likewise.
2102
2103 2004-07-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2104
2105 PR fortran/16465
2106 * lang.opt (ffixed-line-length-none, ffixed-line-length-): New
2107 options.
2108 (ffixed-line-length-80, ffixed-line-length-132): Remove.
2109 * options.c (gfc_handle_options): Deal with changed options.
2110 * scanner.c (load_line): Change second arg to 'char **',
2111 allocate if pointing to NULL. Keep track of buffer's length.
2112 Adapt buffer size to overlong lines. Pad lines to full length
2113 in fixed form.
2114 (load_file): Adapt to new interface of load_line.
2115
2116 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
2117
2118 * trans.h (builtin_function): Declare.
2119
2120 2004-07-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2121
2122 PR fortran/16404
2123 (parts ported from g95)
2124 * parse.h (gfc_state_data): New field do_variable.
2125 (gfc_check_do_variable): Add prototype.
2126 * parse.c (push_state): Initialize field 'do_variable'.
2127 (gfc_check_do_variable): New function.
2128 (parse_do_block): Remember do iterator variable.
2129 (parse_file): Initialize field 'do_variable'.
2130 * match.c (gfc_match_assignment, gfc_match_do,
2131 gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate):
2132 Add previously missing checks.
2133 (gfc_match_return): Reformat error message.
2134 * io.c (match_out_tag): New function.
2135 (match_open_element, match_close_element,
2136 match_file_element, match_dt_element): Call match_out_tag
2137 instead of match_vtag where appropriate.
2138 (match_io_iterator, match_io_element): Add missing check.
2139 (match_io): Reformat error message.
2140 (match_inquire_element): Call match_out_tag where appropriate.
2141
2142 * parse.c (gfc_check_do_variable): Fix error locus.
2143
2144 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2145
2146 PR fortran/15129
2147 * trans-decl.c (gfc_build_function_decl): Create a new chardecl
2148 for every assumed length character dummy argument.
2149
2150 PR fortran/15140
2151 * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion.
2152
2153 PR fortran/13792
2154 * simplify.c (gfc_simplify_bound): Copy the bound expression.
2155
2156 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2157
2158 PR fortran/15324
2159 * trans-array.c gfc_trans_g77_array,
2160 gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init
2161 for assumed length characters.
2162 (gfc_conv_expr_descriptor): Set se->string_length if dealing
2163 with a character expression.
2164 (gfc_cvonv_array_parameter): Pass string length when passing
2165 character array according to g77 conventions.
2166
2167 2004-07-12 Paul Brook <paul@codesourcery.com>
2168
2169 * expr.c (gfc_check_assign_symbol): Handle pointer assignments.
2170 * trans-array.c (gfc_trans_auto_array_allocation): Remove
2171 initialization code.
2172 * trans-common.c (create_common): Use gfc_conv_initializer.
2173 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer.
2174 * trans-expr.c (gfc_conv_initializer): New function.
2175 (gfc_conv_structure): Use it.
2176 * trans.h (gfc_conv_initializer): Add prototype.
2177
2178 2004-07-11 Paul Brook <paul@codesourcery.com>
2179
2180 PR fortran/15986
2181 * parse.c (gfc_fixup_sibling_symbols): Also look for untyped
2182 variables.
2183 (parse_contained): Mark contained symbols as referenced.
2184
2185 2004-07-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2186
2187 PR fortran/16455
2188 * module.c (gfc_dump_module, gfc_use_module): Print locus
2189 when opening of module file fails.
2190
2191 PR fortran/16404
2192 * io.c (match_io): Flag 'WRITE(...), ...' as extension.
2193
2194 PR fortran/16404
2195 * match.c (gfc_match_program): A program name is obligatory.
2196 (gfc_match_return): RETURN in main program is an extension.
2197 (gfc_match_block_data): A space is required before a block data
2198 name.
2199
2200 PR fortran/16433
2201 * primary.c (match_boz_constant): Call gfc_notify_std only if
2202 we actually have a non-standard boz-literal-constant.
2203
2204 PR fortran/15754
2205 * expr.c (gfc_check_assign): Print ranks if incompatible. Issue
2206 warning if assigning NULL().
2207
2208 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
2209
2210 * f95-lang.c (set_block): Remove.
2211 (gfc_clear_binding_stack): New.
2212 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
2213 (struct binding_level): Remove block_created_by_back_end.
2214 (clear_binding_level): Likewise.
2215 (poplevel): Don't handle block_created_by_back_end.
2216
2217 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2218
2219 * trans-decl.c (gfc_create_module_variable): Nothing to do if
2220 symbol is in common, because we ...
2221 (gfc_generate_module_vars): Call gfc_trans_common.
2222
2223 2004-07-10 Paul Brook <paul@codesourcery.com>
2224
2225 * trans-array.c (gfc_build_null_descriptor): New function.
2226 (gfc_trans_static_array_pointer): Use it.
2227 * trans-array.h (gfc_build_null_descriptor): Add prototype.
2228 * trans-expr.c (gfc_conv_structure): Handle array pointers.
2229
2230 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2231
2232 PR fortran/16336
2233 * decl.c (gfc_match_save): Use-associated common block
2234 doesn't collide.
2235 * gfortran.h (gfc_common_head): Add new field 'name'.
2236 Fix typo in comment after #endif.
2237 * match.c (gfc_get_common): Add new argument from_common,
2238 mangle name if flag is set, fill in new field in structure
2239 gfc_common_head.
2240 (match_common): Set new arg in call to gfc_get_common,
2241 use-associated common block doesn't collide.
2242 * match.h (gfc_get_common): Adapt prototype.
2243 * module.c (load_commons): Set new arg in call to
2244 gfc_get_common.
2245 * symbol.c (free_common_tree): New function.
2246 (gfc_free_namespace): Call new function.
2247 * trans-common.c (several functions): Remove argument
2248 'name', use name from gfc_common_head instead.
2249
2250 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2251
2252 * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
2253 and RHS match. Return early if the RHS is NULL().
2254
2255 PR fortran/16336
2256 * match.c (match_common): Fix error reporting for used common.
2257
2258 PR fortran/15969
2259 * trans-expr.c (gfc_conv_structure): Handle initialization
2260 of scalar pointer components.
2261
2262 * parse.c (decode_statement): Fix matching of BLOCK DATA.
2263
2264 * trans-decl.c (generate_local_decl): Remove workaround obsoleted
2265 by fix for PR 15481.
2266
2267 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2268
2269 * trans-common.c: Fix whitespace issues, make variable names
2270 more readable.
2271 (create_common): Additionally, make loop logic more obvious.
2272
2273 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2274 Paul Brook <paul@codesourcery.com>
2275
2276 PR fortran/13415
2277 * trans-common.c (calculate_length): Remove ...
2278 (get_segment_info): Merge into here. Save field type.
2279 (build_field): Use saved type.
2280 (create_common, new_condition, new_segment, finish_equivalences):
2281 Use new get_segment_info.
2282 * trans-types.c: Update comment.
2283
2284 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2285
2286 PR fortran/14077
2287 * moduele.c (mio_symbol): Don't I/O initial values unless
2288 symbol is a parameter.
2289
2290 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2291
2292 PR fortran/13201
2293 * resolve.c (resolve_symbol): Verify that the shape of a
2294 parameter array is not only explicit, but also constant.
2295 * array.c (gfc_is_compile_time_shape): New function.
2296 * gfortran.h (gfc_is_compile_time_shape): Add prototype.
2297
2298 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2299
2300 PR fortran/15481
2301 PR fortran/13372
2302 PR fortran/13575
2303 PR fortran/15978
2304 * module.c (write_symbol, write_symtree): Remove workaround.
2305 * primary.c (match_actual_arglist): Enhance comment.
2306 (gfc_match_rvalue): Handle function call with first argument
2307 a keyword argument correctly.
2308 * resolve.c (resolve_symbol): Change call to
2309 gfc_set_default_type to issue error if no implicit type
2310 can be found.
2311 * trans-decl.c (gfc_create_module_variable): Remove workaround.
2312
2313 2004-07-08 Paul Brook <paul@codesourcery.com>
2314
2315 * intrinsic.c (add_sym_4s): New function.
2316 (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
2317
2318 2004-07-04 Janne Blomqvist <jblomqvi@cc.hut.fi>
2319 Paul Brook <paul@codesourcery.com>
2320
2321 PR fortran/15280
2322 PR fortran/15665
2323 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
2324 GFC_ISYM_COMMAND_ARGUMENT_COUNT.
2325 * intrinsic.c (add_functions): Identify iargc. Add
2326 command_argument_count.
2327 (add_subroutines): Resolve getarg. Add get_command and
2328 get_command_argument.
2329 * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
2330 gfc_resolve_get_command_argument): Add prototypes.
2331 * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
2332 gfc_resolve_get_command_argument): New functions.
2333 * trans-decl.c (gfor_fndecl_iargc): New variable.
2334 (gfc_build_intrinsic_function_decls): Set it.
2335 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
2336 (gfc_conv_intrinsic_function): Use it.
2337 * trans.h (gfor_fndecl_iargc): Declare.
2338
2339 2004-07-04 Matthias Klose <doko@debian.org>
2340
2341 * Make-lang.in: Generate and install gfortran man page.
2342 * invoke.texi: Remove extra '@c man end'.
2343
2344 2004-07-04 Richard Henderson <rth@redhat.com>
2345
2346 * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
2347
2348 2004-07-04 Paul Brook <paul@codesourcery.com>
2349
2350 * decl.c (gfc_match_implicit_range): Don't use typespec.
2351 (gfc_match_implicit): Handle character selectors.
2352 * gfortran.h (gfc_set_implicit): Remove prototype.
2353 (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
2354 * parse.c (accept_statement): Don't call gfc_set_implicit.
2355 * symbol.c (new_ts): Remove.
2356 (gfc_set_implicit_none): Use same loop bounds as other functions.
2357 (gfc_set_implicit): Remove.
2358 (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
2359 (gfc_merge_new_implicit): Combine with gfc_set_implicit.
2360
2361 2004-06-30 Richard Henderson <rth@redhat.com>
2362
2363 * match.c (var_element): Remove unused variable.
2364
2365 * trans-decl.c (gfc_generate_function_code): Don't set
2366 x_whole_function_mode_p.
2367 (gfc_generate_constructors): Likewise.
2368
2369 2004-06-30 Richard Henderson <rth@redhat.com>
2370
2371 * trans-decl.c (gfc_generate_function_code): Don't set
2372 immediate_size_expand.
2373 (gfc_generate_constructors): Likewise.
2374
2375 2004-06-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2376
2377 PR fortran/16161
2378 * decl.c (gfc_match_type_spec): Rename second argument to
2379 'implicit_flag', reverse meaning. Don't match_char_spec if
2380 'implicit_flag' is set. Rename to ...
2381 (match_type_spec): ... this.
2382 (gfc_match_implicit_none, match_implicit_range): Move here
2383 from match.c.
2384 (gfc_match_implicit): Move here from match.c, try to
2385 match_char_len if match_implicit_range doesn't succeed for
2386 CHARACTER implicits. Call renamed fucntion match_type_spec.
2387 (gfc_match_data_decl, match_prefix): Call renamed function
2388 match_type_spec.
2389 * match.c (gfc_match_implicit_none, match_implicit_range,
2390 gfc_match_implicit): Move to decl.c.
2391 * match.h (gfc_match_implicit_none, gfc_match_implicit):
2392 Move protoypes to section 'decl.c'.
2393 (gfc_match_type_spec): Remove prototype.
2394
2395 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2396
2397 * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
2398 copyright years.
2399
2400 2004-06-29 Steven Bosscher <stevenb@suse.de>
2401
2402 Make sure types in assignments are compatible. Mostly mechanical.
2403 * trans-const.h (gfc_index_one_node): New define.
2404 * trans-array.c (gfc_trans_allocate_array_storage,
2405 gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
2406 gfc_trans_array_constructor_value, gfc_trans_array_constructor,
2407 gfc_conv_array_ubound, gfc_conv_array_ref,
2408 gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
2409 gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
2410 gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
2411 gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
2412 types in assignments, conversions and conditionals for expressions.
2413 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
2414 gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
2415 gfc_conv_function_call, gfc_trans_pointer_assignment,
2416 gfc_trans_scalar_assign): Likewise.
2417 * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
2418 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
2419 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
2420 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
2421 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
2422 gfc_conv_allocated, gfc_conv_associated,
2423 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
2424 * trans-io.c (set_string): Likewise.
2425 * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
2426 gfc_do_allocate, generate_loop_for_temp_to_lhs,
2427 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
2428 compute_overall_iter_number, gfc_trans_assign_need_temp,
2429 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
2430 gfc_evaluate_where_mask, gfc_trans_where_assign,
2431 gfc_trans_where_2): Likewise.
2432 * trans-types.c (gfc_get_character_type, gfc_build_array_type,
2433 gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
2434
2435 * trans.c (gfc_add_modify_expr): Add sanity check that types
2436 for the lhs and rhs are the same for scalar assignments.
2437
2438 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2439
2440 * dump-parse-tree.c (show_common): New function.
2441 (gfc_show_namespace): Show commons.
2442
2443 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2444 Andrew Vaught <andyv@firstinter.net>
2445
2446 PR fortran/13249
2447 PR fortran/15481
2448 * decl.c (gfc_match_save): Adapt to new common structures,
2449 don't allow saving USE-associated common.
2450 * dump-parse-tree (gfc_show_attr): (saved_)common are not
2451 symbol attributes any longer.
2452 (gfc_show_symbol): Don't show old-style commons any longer.
2453 (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
2454 interface.
2455 * gfortran.h (symbol_attribute): Remove common and saved_common
2456 attributes.
2457 (gfc_symbol): Remove common_head element.
2458 (gfc_common_head): New struct.
2459 (gfc_get_common_head): New macro.
2460 (gfc_symtree): Add field 'common' to union.
2461 (gfc_namespace): Add field 'common_root'; change type of field
2462 'blank_common' to blank_common.
2463 (gfc_add_data): New prototype.
2464 (gfc_traverse_symtree): Expect a symtree as first argument
2465 instead of namespace.
2466 * match.c (gfc_get_common): New function.
2467 (match_common_name): Change to take char * as argument, adapt,
2468 fix bug with empty name.
2469 (gfc_match_common): Adapt to new data structures. Disallow
2470 redeclaration of USE-associated COMMON-block. Fix bug with
2471 empty common.
2472 (var_element): Adapt to new common structures.
2473 * match.h (gfc_get_common): Declare.
2474 * module.c: Add 2004 to copyright years, add commons to module
2475 file layout description.
2476 (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
2477 for removed attributes.
2478 (mio_symbol): Adapt to new way of storing common relations.
2479 (load_commons): New function.
2480 (read_module): Skip common list on first pass, load_commons at
2481 second.
2482 (write_commons): New function.
2483 (write_module): Call write_commons().
2484 * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
2485 functions related to removed attributes.
2486 (gfc_add_data): New function.
2487 (gfc_clear_attr): Don't set removed attributes.
2488 (gfc_copy_attr): Don't copy removed attributes.
2489 (traverse_symtree): Remove.
2490 (gfc_traverse_symtree): Don't traverse symbol
2491 tree of the passed namespace, but require a symtree to be passed
2492 instead. Unify with traverse_symtree.
2493 (gfc_traverse_ns): Call gfc_traverse_symtree according to new
2494 interface.
2495 (save_symbol): Remove setting of removed attribute.
2496 * trans-common.c (gfc_sym_mangled_common_id): Change to
2497 take 'char *' argument instead of 'gfc_symbol'.
2498 (build_common_decl, new_segment, translate_common): Adapt to new
2499 data structures, add new
2500 argument name.
2501 (create_common): Adapt to new data structures, add new
2502 argument name. Fix typo in intialization of derived types.
2503 (finish_equivalences): Add second argument in call to
2504 create_common.
2505 (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
2506 (gfc_trans_common): Adapt to new data structures.
2507 * trans-decl.c (gfc_create_module_variables): Remove test for
2508 removed attribute.
2509
2510 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2511
2512 * io.c: Add 2004 to copyright years.
2513
2514 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2515 Andrew Vaught <andyv@firstinter.net>
2516
2517 * gfortran.h (gfc_gsymbol): New typedef.
2518 (gfc_gsym_root): New variable.
2519 (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
2520 * parse.c (global_used): New function.
2521 (parse_block_data): Check for double empty BLOCK DATA,
2522 use global symbol table.
2523 (parse_module): Use global symbol table.
2524 (add_global_procedure, add_global_program): New functions.
2525 (gfc_parse_file): Use global symbol table.
2526 * symbol.c (gfc_gsym_root): New variable.
2527 (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
2528 functions.
2529
2530 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2531
2532 * module.c (mio_gmp_real): Correct writing of negative numbers.
2533
2534 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2535
2536 PR fortran/15963
2537 * expr.c (check_intrinsic_op): Allow comparison of characters.
2538 Make logic easier.
2539
2540 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2541 Andrew Vaught <andyv@firstinter.net>
2542
2543 * decl.c (contained_procedure): New function.
2544 (match_end): Verify correctness of END STATEMENT in
2545 all cases.
2546
2547 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2548 Andrew Vaught <andyv@firstinter.net>
2549
2550 PR fortran/15190
2551 * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
2552 (decode_statement): Enforce required space in free-form.
2553
2554 2004-06-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2555
2556 * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
2557 * trans-array.c (gfc_conv_descriptor_data): Add operand
2558 for COMPONENT_REF.
2559 (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
2560 (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
2561 (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
2562 * trans-common.c (create_common): Likewise.
2563 * trans-expr.c (gfc_conv_component_ref): Likewise.
2564 * trans-io.c (set_parameter_value): Likewise.
2565 (set_parameter_ref, set_string, set_flag, io_result): Likewise.
2566 (transfer_expr): Likewise.
2567 * trans-decl.c (gfc_trans_auto_character_variable):
2568 Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
2569 (gfc_gimplify_function): New function.
2570 (gfc_generate_function-code): Properly handle nested functions.
2571 * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
2572
2573 2004-06-22 Janne Blomqvist <jblomqvi@cc.hut.fi>
2574
2575 PR fortran/15750
2576 * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
2577 (gfc_resolve_inquire): Resolve the iolength tag. Return
2578 SUCCESS at end of function if no failure has occured.
2579 * resolve.c (resolve_code): Resolve if iolength is encountered.
2580 * trans-io.c: (ioparm_iolength, iocall_iolength,
2581 iocall_iolength_done): New variables.
2582 (last_dt): Add IOLENGTH.
2583 (gfc_build_io_library_fndecls ): Set iolength related variables.
2584 (gfc_trans_iolength): Implement.
2585 (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
2586
2587 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de
2588
2589 PR fortran/15511
2590 * scanner.c (load_line): Don't truncate preprocessor lines.
2591 Reformat error message.
2592 (preprocessor_line): Issue warning in case of malformed
2593 preprocessor line.
2594
2595 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2596
2597 * resolve.c (resolve_symbol): Add comment in function body.
2598 (check_data_variable): Change type of mark to ar_type, adapt code
2599 accordingly.
2600
2601 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2602
2603 * array.c (gfc_insert_constructor): Avoid redundant call to
2604 mpz_comp. Add 2004 to copyright years.
2605
2606 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
2607
2608 * trans.h (stmtblock_t): Change has_scope to unsigned int.
2609
2610 2004-06-20 Steven G. Kargl <kargls@comcast.net>
2611
2612 * arith.c (gfc_range_check): correct complex underflow.
2613
2614 2004-06-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2615
2616 PR fortran/15962
2617 * match.c (match_case_selector): Call gfc_match_init_expr
2618 instead of gfc_match_expr.
2619 * resolve.c (validate_case_label_expr): No need to check for
2620 constant, since it wouldn't have been matched with the fix to
2621 match.c.
2622
2623 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2624
2625 PR fortran/15211
2626 * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
2627 of strings.
2628
2629 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2630
2631 PR fortran/15510
2632 * trans-deecl.c (generate_local_decl): Do not issue warning for
2633 unused variables if they're use associated.
2634
2635 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2636 Andrew Vaught <andyv@firstinter.net>
2637
2638 PR fortran/14928
2639 * gfortran.h (gfc_check_f): Add new field f3ml.
2640 * check.c (gfc_check_minloc_maxloc): Take argument list instead
2641 of individual arguments, reorder if necessary.
2642 * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
2643 * intrinsic.c (add_sym_3ml): New function.
2644 (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
2645 (check_specific): Catch special case MINLOC, MAXLOC.
2646
2647 2004-06-14 Paul Brook <paul@codesourcery.com>
2648
2649 * intrinsic.c (add_sym_2s): Use correct function types.
2650
2651 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2652
2653 * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize. Move data.c
2654 * data.c (gfc_get_section_index): Remove dependency on trans.h.
2655
2656 2004-06-12 Steven G. Kargl <kargls@comcast.net>
2657
2658 * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
2659 gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
2660 * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
2661 GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
2662 * trans-intrinsic.c: Use symbols.
2663 * intrinsic.c (add_sym_2s): New function.
2664 * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
2665 * intrinsic.h: Function prototypes.
2666 * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
2667 gfc_resolve_srand): New functions.
2668
2669 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2670
2671 PR fortran/14957
2672 * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
2673 contained procedure.
2674
2675 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2676
2677 PR fortran/12841
2678 * interface.c (compare_parameter, compare_actual_formal): Don't
2679 check types and array shapes for NULL()
2680 * trans-expr.c (conv_function_call): No double indirection for
2681 NULL()
2682
2683 2004-06-09 Toon Moene <toon@moene.indiv.nluug.nl>
2684
2685 * trans-expr.c (gfc_conv_cst_int_power): Compute
2686 x**(-n) by converting it to (1/x)**n instead of
2687 1/x**n.
2688
2689 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2690
2691 PR fortran/13372
2692 * module.c (write_symbol, write_symtree): Don't write symbols
2693 wrongly added to namespace.
2694 * trans-decl.c (gfc_create_module_variable): Don't create a
2695 backend decl for a symbol incorrectly added to namespace.
2696
2697 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2698
2699 PR fortran/13201
2700 * resolve.c (resolve_symbol): Verify that parameter array has an
2701 explicit shape. Fix typos and coding style issues in surrounding
2702 lines.
2703
2704 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2705
2706 PR fortran/15478
2707 * gfortran.texi: The documentation doesn't contain infomration on
2708 how to report bugs, and shouldn't, so remove the line which
2709 says it does.
2710
2711 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2712
2713 * intrinsic.c (sort_actual): Keep track of type of missing
2714 arguments. (Missing from previous commit.)
2715
2716 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2717
2718 * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
2719 * interface.c (compare_actual_formal): Keep type of omitted
2720 optional arguments.
2721 * trans-expr.c (gfc_conv_function_call): Add string length
2722 argument for omitted string argument.
2723
2724 2004-06-03 Paul Brook <paul@codesourcery.com>
2725
2726 * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
2727 lists instead of compound expr chains.
2728 (gfc_trans_code): Annotate statement lists.
2729
2730 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2731
2732 * trans-array.c: Fix spelling in comments.
2733
2734 2004-06-02 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2735
2736 PR fortran/15557
2737 * data.c (assign_substring_data_value): New function.
2738 (gfc_assign_data_value): Call the new function if we're dealing
2739 with a substring LHS.
2740
2741 2004-06-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2742
2743 PR fortran/15477
2744 * gfortran.h (GFC_VERSION): Remove.
2745 * gfortran.texi (version-gfortran): Remove, replace by version-GCC
2746 where used.
2747
2748 2004-05-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2749
2750 * trans-types.c: Fix spelling & layout in comments.
2751
2752 2004-05-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2753
2754 PR fortran/14067
2755 * trans-const.c (gfc_conv_string_init): Allow variable string
2756 length lower than initialization string length.
2757
2758 2004-05-30 Paul Brook <paul@codesourcery.com>
2759
2760 PR fortran/15620
2761 * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
2762 * trans-expr.c (gfc_trans_string_copy): New function.
2763 (gfc_conv_statement_function): Use them. Create temp vars. Enforce
2764 character lengths.
2765 (gfc_conv_string_parameter): Use gfc_trans_string_copy.
2766 * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
2767 * trans.h (struct gfc_saved_var): Define.
2768 (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
2769
2770 2004-05-30 Steven G. Kargl <kargls@comcast.net>
2771
2772 * iresolve.c (gfc_resolve_random_number): Clean up conditional.
2773
2774 2004-05-29 Steven G. Kargl <kargls@comcast.net>
2775
2776 * simplify.c (gfc_simplify_log): Remove useless line of code.
2777
2778 2004-05-29 Paul Brook <paul@codesourcery.com>
2779
2780 * trans-common.c (find_equivalence): Find multiple rules.
2781
2782 2004-05-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2783
2784 * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
2785 (gfc_current_locus): Declare new global variable.
2786 * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
2787 (gfc_current_locus1): Rename ...
2788 (gfc_current_locus): ... to this.
2789 (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
2790 skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
2791 gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
2792 gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
2793 and gfc_current_locus(), respectively.
2794 * array.c (match_subscript, gfc_match_array_ref, match_array_list,
2795 match_array_cons_element, gfc_match_array_constructor):
2796 Read/modify gfc_current_locus instead of calling gfc_set_locus()
2797 and gfc_current_locus().
2798 * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
2799 match_attr_spec, gfc_match_function_decl, gfc_match_end,
2800 attr_decl1, gfc_match_save): Likewise.
2801 * error.c (error_print, gfc_internal_error): Likewise.
2802 * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
2803 * interface.c (gfc_add_interface): Likewise.
2804 * io.c (gfc_match_format, match_dt_format, match_dt_element,
2805 match_io_iterator, match_io): Likewise.
2806 * match.c (gfc_match_space, gfc_match_eos,
2807 gfc_match_small_literal_int, gfc_match_st_label,
2808 gfc_match_strings, gfc_match_name, gfc_match_iterator,
2809 gfc_match_char, gfc_match, gfc_match_assignment,
2810 gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
2811 gfc_match_nullify, gfc_match_call, match_implicit_range,
2812 gfc_match_implicit, gfc_match_data, match_case_selector,
2813 gfc_match_case, match_forall_iterator): Likewise.
2814 * matchexp.c (gfc_match_defined_op_name, next_operator,
2815 match_level_1, match_mult_operand, match_ext_mult_operand,
2816 match_add_operand, match_ext_add_operand, match_level_2,
2817 match_level_3, match_level_4, match_and_operand, match_or_operand,
2818 match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
2819 * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
2820 * parse.c (match_word, decode_statement, next_free, next_fixed,
2821 add_statement, verify_st_order, parse_if_block, gfc_parse_file):
2822 Likewise.
2823 * primary.c (match_digits, match_integer_constant,
2824 match_boz_constant, match_real_constant, match_substring,
2825 next_string_char, match_charkind_name, match_string_constant,
2826 match_logical_constant, match_const_complex_part,
2827 match_complex_constant, match_actual_arg, match_keyword_arg,
2828 gfc_match_actual_arglist, gfc_match_structure_constructor,
2829 gfc_match_rvalue, gfc_match_variable): Likewise.
2830 * st.c (gfc_get_code): Likewise.
2831 * symbol.c (check_conflict, check_used, check_done,
2832 duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
2833 gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
2834 gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
2835
2836 2004-05-26 Roger Sayle <roger@eyesopen.com>
2837
2838 * io.c (format_asterisk): Silence compiler warnings by correcting
2839 the number of elements of a "locus" initializer.
2840
2841 2004-05-25 Roger Sayle <roger@eyesopen.com>
2842
2843 PR fortran/13912
2844 * matchexp.c: Allow unary operators after arithmetic operators
2845 as a GNU extension.
2846 (match_ext_mult_operand, match_ext_add_operand): New functions.
2847 (match_mult_operand): Tweak to call match_ext_mult_operand.
2848 (match_add_operand): Tweak to call match_ext_mult_operand.
2849 (match_level_2): Rearrange to call match_ext_add_operand.
2850
2851 2004-05-25 Paul Brook <paul@codesourcery.com>
2852
2853 * expr.c (check_inquiry): Remove bogus tests.
2854
2855 2004-05-23 Paul Brook <paul@codesourcery.com>
2856
2857 PR fortran/13773
2858 * expr.c (restricted_args): Remove redundant checks/argument.
2859 (external_spec_function): Update to match.
2860 (restricted_intrinsic): Rewrite.
2861
2862 2004-05-23 Paul Brook <paul@codesourcery.com>
2863 Victor Leikehman <lei@haifasphere.co.il>
2864
2865 * gfortran.h (struct gfc_symbol): Add equiv_built.
2866 * trans-common.c: Change int to HOST_WIDE_INT. Capitalize error
2867 messages.
2868 (current_length): Remove.
2869 (add_segments): New function.
2870 (build_equiv_decl): Create initialized common blocks.
2871 (build_common_decl): Always add decl to bindings.
2872 (create_common): Create initializers.
2873 (find_segment_info): Reformat to match coding conventions.
2874 (new_condition): Use add_segments.
2875 (add_condition, find_equivalence, add_equivalences): Move iteration
2876 inside functions. Only process each segment once.
2877 (new_segment, finish_equivalences, translate_common): Simplify.
2878
2879 2004-05-23 Steven G. Kargl <kargls@comcast.net>
2880
2881 * check.c (gfc_check_random_seed): Issue for too many arguments.
2882
2883 2004-05-22 Steven G. Kargl <kargls@comcast.net>
2884
2885 * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
2886
2887 2004-05-22 Paul Brook <paul@codesourcery.com>
2888
2889 * dump-parse-tree.c (gfc_show_equiv): New function.
2890 (gfc_show_namespace): Use it.
2891
2892 2004-05-22 Victor Leikehman <lei@haifasphere.co.il>
2893
2894 PR fortran/13249
2895 * symbol.c (gfc_add_common): Disable checks to work around other more
2896 fundamental inadequacies.
2897
2898 2004-05-22 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
2899
2900 * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
2901 only for functions.
2902 (gfc_build_function_decl): Likewise.
2903
2904 2004-05-22 Steven G. Kargl <kargls@comcast.net>
2905
2906 * check.c (gfc_check_system_clock): New function.
2907 * intrinsic.c (add_sym_3s): New function.
2908 (add_subroutines): Use it.
2909 * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
2910 Add prototypes.
2911 * iresolve.c (gfc_resolve_system_clock): New function.
2912
2913 2004-05-22 Steven G. Kargl <kargls@comcast.net>
2914
2915 * invoke.texi: Document -Wunderflow and spell check.
2916 * lang.opt: Add Wunderflow.
2917 * gfortran.h (gfc_option_t): Add warn_underflow option.
2918 * options.c (gfc_init_options, set_Wall): Use it.
2919 * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
2920 * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
2921 gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
2922 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
2923 * arith.c (common_logarithm): Fix typo in comment.
2924
2925 2004-05-21 Roger Sayle <roger@eyesopen.com>
2926
2927 * io.c (check_format): As a GNU extension, allow the comma after a
2928 string literal to be optional in a format. Use gfc_notify_std to
2929 issue an error/warning as appropriate.
2930
2931 2004-05-21 Roger Sayle <roger@eyesopen.com>
2932
2933 * io.c (check_format): Use gfc_notify_std to determine whether to
2934 issue an error/warning for omitting the digits from the X format.
2935
2936 2004-05-20 Roger Sayle <roger@eyesopen.com>
2937
2938 * io.c (check_format): Allow the number before the X format to
2939 be optional when not -pedantic.
2940
2941 2004-05-18 Feng Wang <fengwang@nudt.edu.cn>
2942 Paul Brook <paul@codesourcery.com>
2943
2944 * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
2945 Create decls for __builtin_pow{,f}.
2946 * gfortran.h (PREFIX_LEN): Define.
2947 * trans-decl.c (gfor_fndecl_math_powi): Add.
2948 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
2949 (gfc_build_intrinsic_function_decls): Create decls for powi.
2950 * trans-expr.c (powi_table): Add.
2951 (gfc_conv_integer_power): Remove.
2952 (gfc_conv_powi): New function.
2953 (gfc_conv_cst_int_power): New function.
2954 (gfc_conv_power_op): Use new powi routines.
2955 * trans.h (struct gfc_powdecl_list): Add.
2956 (gfor_fndecl_math_powi): Add.
2957 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
2958
2959 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2960
2961 * trans.c, trans-decl.c: Fix comment typos.
2962
2963 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2964
2965 * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
2966
2967 2004-05-18 Steve Kargl <kargls@comcast.net>
2968
2969 * arith.c (gfc_int2complex): Fix incorrect range checking.
2970
2971 2004-05-18 Paul Brook <paul@codesourcery.com>
2972
2973 PR fortran/13930
2974 * decl.c (add_init_expr_to_sym): Remove incorrect check.
2975 (default_initializer): Move to expr.c.
2976 (variable_decl): Don't assign default initializer to variables.
2977 * expr.c (gfc_default_initializer): Move to here.
2978 * gfortran.h (gfc_default_initializer): Add prototype.
2979 * resolve.c (resolve_symbol): Check for illegal initializers.
2980 Assign default initializer.
2981
2982 2004-05-17 Steve Kargl <kargls@comcast.net>
2983
2984 * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
2985
2986 2004-05-17 Steve Kargl <kargls@comcast.net>
2987
2988 * arith.c (gfc_real2complex): Range checking wrong part of complex
2989 number.
2990
2991 2004-05-16 Paul Brook <paul@codesourcery.com>
2992
2993 * options.c (gfc_handle_module_path_options): Fix buffer overrun.
2994
2995 2004-05-16 Paul Brook <paul@codesourcery.com>
2996
2997 * arith.c (gfc_range_check): Fix logic error.
2998
2999 2004-05-16 Steve Kargl <sgk@troutmask.apl.washington.edu>
3000
3001 * arith.c: Fix comment typos.
3002
3003 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3004
3005 PR fortran/13742
3006 * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
3007 not initialized in a disallowed fashion.
3008 * match.c (gfc_match_common): Likewise.
3009 (var_element): Verify that variable is not in the blank COMMON,
3010 if it is in a common.
3011
3012 2004-05-15 Joseph S. Myers <jsm@polyomino.org.uk>
3013
3014 * Make-lang.in (f95.generated-manpages): Remove.
3015 (f95.srcextra): New.
3016 (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
3017 f95.maintainer-clean): Generate info and dvi files in objdir/doc.
3018 (f95.dvi): Remove.
3019 (dvi): New.
3020 (f95.install-info): Remove.
3021 (install-info): New.
3022
3023 2004-05-15 Victor Leikehman <lei@haifasphere.co.il>
3024
3025 * decl.c (add_init_expr_to_sym): Check for variable size arrays.
3026
3027 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3028
3029 * primary.c (match_boz_constant): Use gfc_notify_std() for
3030 issuing a warning or an error.
3031
3032 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3033
3034 PR fortran/13826
3035 * primary.c (match_structure_constructor): Rename ...
3036 (gfc_match_structure_constructor): ... to this. Make non-static.
3037 (gfc_match_rvalue): Call renamed function.
3038 * match.h (gfc_match_structure_constructor): Declare.
3039 * match.c (gfc_match_data_constant): Handle structure
3040 constructor.
3041
3042 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3043
3044 PR fortran/13702
3045 (Port from g95)
3046 * gfortran.h (gfc_linebuf): New typedef.
3047 (linebuf): Remove.
3048 (gfc_file): Revamped, use new gfc_linebuf.
3049 (locus): Revamped, use new types.
3050 (gfc_current_file): Remove.
3051 (gfc_current_form, gfc_source_file): New global variables.
3052 * match.c (gfc_match_space, gfc_match_strings): Use
3053 gfc_current_form to find source form.
3054 * module.c (gfc_dump_module): Use gfc_source_file when printing
3055 module header.
3056 * error.c (show_locus, show_loci) Use new data structures to print
3057 locus.
3058 * scanner.c (first_file, first_duplicated_file, gfc_current_file):
3059 Remove.
3060 (file_head, current_file, gfc_current_form, line_head, line_tail,
3061 gfc_current_locus1, gfc_source_file): New global variables.
3062 (gfc_scanner_init1): Set new global variables.
3063 (gfc_scanner_done1): Free new data structures.
3064 (gfc_current_locus): Return pointer to gfc_current_locus1.
3065 (gfc_set_locus): Set gfc_current_locus1.
3066 (gfc_at_eof): Set new variables.
3067 (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
3068 to new locus structure.
3069 (gfc_check_include): Remove.
3070 (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
3071 (gfc_skip_comments): Use gfc_current_form, find locus with
3072 gfc_current_locus1.
3073 (gfc_next_char): Use gfc_current_form.
3074 (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
3075 (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
3076 comment formatting.
3077 (get_file): New function.
3078 (preprocessor_line, include_line): New functions.
3079 (load_file): Move down, rewrite to match new data structures.
3080 (gfc_new_file): Rewrite to match new data structures.
3081 * parse.c (next_statement): Remove code which is now useless. Use
3082 gfc_source_form and gfc_source_file where appropriate.
3083 * trans-decl.c (gfc_get_label_decl): adapt to new data structures
3084 when determining locus of frontend code.
3085 * trans-io.c (set_error_locus): Same.
3086 * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
3087 * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
3088 preprocessor flags.
3089 (all): Add missing initializers.
3090
3091 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3092
3093 * Make-lang.in (trans-common.o): Remove redundant dependency.
3094 (data.c): Replace object file name ...
3095 (data.o): ... by the correct one.
3096
3097 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3098
3099 * dump-parse-tree.c (gfc_show_array_ref): Print colon only
3100 for ranges when dumping array references.
3101
3102 2004-05-14 Victor Leikehman <lei@haifasphere.co.il>
3103
3104 * decl.c (variable_decl): Always apply default initializer.
3105
3106 2004-05-08 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3107
3108 PR fortran/15206
3109 * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
3110 handle zero correctly.
3111
3112 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3113
3114 * match.c (gfc_match): Eliminate dead code.
3115
3116 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3117
3118 * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
3119 Detect bad continuation line in fixed form sources.
3120
3121 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3122
3123 PR fortran/15205
3124 * iresolve.c (gfc_resolve_nearest): Add new function.
3125 * intrinsic.h: ... declare it here.
3126 * intrinsic.c (add_functions): ... add it as resolving function
3127 for NEAREST.
3128
3129 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3130
3131 PR fortran/14066
3132 * match.c (gfc_match_do): Allow infinite loops with
3133 label-do-stmt. Do not enforce space after comma.
3134
3135 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3136
3137 PR fortran/15051
3138 * parse.c (parse_interface): Allow empty INTERFACE, remove
3139 seen_body.
3140
3141 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3142
3143 * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
3144 decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
3145 expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
3146 intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
3147 matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
3148 primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
3149 trans-array.c, trans-array.h, trans-common.c, trans-const.c,
3150 trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
3151 trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
3152 trans-types.h, trans.c, trans.h: Update copyright years and
3153 boilerplate.
3154 * data.c: Likewise, also removed two whitespace-only lines.
3155 * gfortranspec.c, lang.opt: Update copyright years.
3156
3157 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3158
3159 PR fortran/14568
3160 * trans-decl.c (generate_local_decl): Don't warn for unused
3161 variables which are in common blocks.
3162
3163 2004-05-13 Diego Novillo <dnovillo@redhat.com>
3164
3165 * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
3166 trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
3167 trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
3168
3169 2004-05-13 Victor Leikehman <lei@haifasphere.co.il>
3170
3171 PR fortran/15314
3172 * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
3173
3174 2004-05-13 Joseph S. Myers <jsm@polyomino.org.uk>
3175
3176 * gfortran.texi: Use @table @emph instead of @itemize @emph.
3177 Remove "set DEVELOPMENT".
3178 (Compiling GFORTRAN): Remove.
3179
3180 2004-05-09 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3181
3182 * array.c (match_subscript, match_array_ref): Add comments
3183 explaining argument 'init'.
3184 * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
3185 trans-expr.c, trans.c: Fix some typos in comments.
3186 * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
3187 * primary.c (match_digits, match_integer_constant): Add comment
3188 explaining signflag.
3189
3190 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3191
3192 PR fortran/13940
3193 * primary.c: Include system.h and flags.h, needed for pedantic.
3194 (match_boz_constant): Allow "x" for hexadecimal constants, warn if
3195 pedantic is set.
3196
3197 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3198
3199 PR fortran/13940
3200 * match.c (match_data_constant): Handle case where
3201 gfc_find_symbol sets sym to NULL
3202
3203 2004-04-28 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3204
3205 * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
3206 dependency on mathbuiltins.def
3207
3208 2004-04-24 Victor Leikehman <lei@il.ibm.com>
3209
3210 * trans-io.c (transfer_expr): Implemented recursive printing
3211 of derived types.
3212
3213 2004-04-24 Andrew Pinski <pinskia@physics.uc.edu>
3214
3215 * gfortranspec.c: Do not include multilib.h.
3216
3217 2004-04-24 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3218
3219 * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
3220 2004 to copyright years.
3221 * trans-expr.c, trans-decl.c: Comment update, we now generate
3222 GENERIC, not SIMPLE. Add 2004 to copyright years.
3223
3224 2004-04-24 Paul Brook <paul@codesourcery.com>
3225
3226 * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
3227
3228 2004-04-24 Feng Wang <fengwang@nudt.edu.cn>
3229
3230 PR 14817
3231 * arith.c (gfc_arith_divide): Fix complex divide.
3232
3233 2004-04-23 Andrew Pinski <pinskia@physics.uc.edu>
3234
3235 * gfortranspec.c: Include the target headers.
3236
3237 2004-04-18 Feng Wang <fengwang@nudt.edu.cn>
3238
3239 PR fortran/14921
3240 PR fortran/14540
3241 * arith.c (arctangent2): New function.
3242 * arith.h (arctangent2): Add function prototype.
3243 * simplify.c (gfc_simplify_atan2): Use it.
3244 (gfc_simplify_log): Use it.
3245
3246 2004-04-12 Diego Novillo <dnovillo@redhat.com>
3247
3248 * fortran/f95-lang.c (gfc_expand_stmt): Remove.
3249 (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
3250
3251 2004-04-11 Bud Davis <bdavis9659@comcast.net>
3252
3253 PR fortran/14872
3254 * trans-io.c (build_dt): Change REC to value.
3255
3256 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
3257
3258 PR 14394
3259 * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
3260 the real value when converting mpf to string.
3261
3262 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
3263
3264 PR 14395
3265 * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
3266 the result.
3267
3268 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
3269
3270 PR fortran/14377
3271 * simplify.c (simplify_min_max): Convert the type of the result.
3272
3273 2004-04-11 Paul Brook <paul@codesourcery.com>
3274
3275 * gfortran.texi: Use full target triplet.
3276
3277 2004-04-11 Paul Brook <paul@codesourcery.com>
3278
3279 * Make-lang.in (GFORTRAN_TEXI): Set it.
3280 (fortran/dfortran.dvi): Use it. Add fortran to include paths.
3281 (fortran/gfortran.info): Ditto.
3282 * gfortran.texi: Major update.
3283 * invoke.texi: New file.
3284
3285 2004-04-10 Paul Brook <paul@codesourcery.com>
3286
3287 * trans-array.c (gfc_trans_allocate_temp_array,
3288 gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
3289 * trans-decl.c (gfc_build_dummy_array_decl,
3290 gfc_get_symbol_decl, gfc_build_function_decl,
3291 gfc_create_module_variable): Ditto.
3292 * trans-expr.c (gfc_conv_variable): Ditto.
3293 * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
3294 * trans.h (GFC_DECL_STRING): Remove.
3295 (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
3296 GFC_DECL_ASSIGN): Renumber flags.
3297
3298 2004-04-05 Paul Brook <paul@codesourcery.com>
3299
3300 PR 13252
3301 PR 14081
3302 * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
3303 and stack_restore.
3304 * gfortran.h (struct gfc_charlen): Add backend_decl.
3305 * trans-array.c (gfc_trans_allocate_temp_array,
3306 gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
3307 (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
3308 Remove old, broken string handling.
3309 (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
3310 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
3311 gfc_trans_deferred_array): Handle character arrays.
3312 * trans-const.c (gfc_conv_const_charlen): New function.
3313 * trans-const.h (gfc_conv_const_charlen): Add prototype.
3314 * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
3315 as static.
3316 (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
3317 (gfc_create_string_length): New function.
3318 (gfc_get_symbol_decl): Create lengths for character variables.
3319 (gfc_get_fake_result_decl): Ditto.
3320 (gfc_build_function_decl): Only set length for assumed length
3321 character arguments.
3322 (gfc_trans_dummy_character): New function.
3323 (gfc_trans_auto_character_variable): Rewrite.
3324 (gfc_trans_deferred_vars): Handle more types of character variable.
3325 (gfc_create_module_variable): String lengths have moved.
3326 (gfc_generate_function_code): Initialize deferred var chain earlier.
3327 * trans-expr.c (gfc_conv_init_string_length): Rename ...
3328 (gfc_trans_init_string_length): ... to this.
3329 (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
3330 gfc_conv_function_call): Update to new format for character variables.
3331 (gfc_conv_string_length): Remove.
3332 (gfc_conv_string_parameter): Update assertion.
3333 * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
3334 * trans-io.c (set_string): Use new macro names.
3335 * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
3336 * trans-types.c (gfc_get_character_type): Use existing length expr.
3337 (gfc_is_nodesc_array): Make public.
3338 (gfc_get_dtype_cst): Rename ...
3339 (gfc_get_dtype): ... to this. Handle unknown size arrays.
3340 (gfc_get_nodesc_array_type): Use new name.
3341 (gfc_sym_type): New character variable code.
3342 (gfc_get_derived_type): Ditto.
3343 (gfc_get_function_type): Evaluate character variable lengths.
3344 * trans-types.h (gfc_strlen_kind): Define.
3345 (gfc_is_nodesc_array): Add prototype.
3346 * trans.h: Update prototypes.
3347 (struct lang_type): Update comments.
3348 (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
3349 (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
3350
3351 2004-04-04 Paul Brook <paul@codesourcery.com>
3352
3353 * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
3354 * options.c (gfc_init.options, gfc_handle_option): Ditto.
3355 * trans-expr.c (gfc_conv_function_call): Ditto.
3356 * trans-types.c (gfc_is_nodesc_array): Ditto
3357 * lang.opt (fg77-calls): Remove.
3358
3359 2004-04-04 Paul Brook <paul@codesourcery.com>
3360
3361 * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
3362 (gfc_conv_descriptor_base): Rename ...
3363 (gfc_conv_descriptor_offset): ... to this.
3364 (gfc_trans_allocate_array_storage): Set offset to zero.
3365 (gfc_conv_array_base): Rename ...
3366 (gfc_conv_array_offset): ... to this.
3367 (gfc_conv_array_index_ref): Add offset parameter.
3368 (gfc_conv_array_ref): Include offset.
3369 (gfc_trans_preloop_setup): Use existing offset.
3370 (gfc_trans_allocate_temp_array, gfc_array_allocate,
3371 gfc_trans_auto_array_allocation, gfc_trans_g77_array,
3372 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
3373 gfc_conf_ss_descriptor): Set offset.
3374 * trans-array.h: Rename prototypes.
3375 * trans-const.h (gfc_index_zero_node): Define.
3376 * trans-decl.c (gfc_build_qualified_array): Change base to offset.
3377 * trans-types.c (gfc_get_array_type_bounds): Ditto.
3378 (gfc_get_nodesc_array_type): Calculate offset before upper bound.
3379
3380 2004-03-25 Diego Novillo <dnovillo@redhat.com>
3381
3382 * convert.c (convert): Don't handle WITH_RECORD_EXPR.
3383
3384 2004-03-24 Bud Davis <bdavis9659@comcast.net>
3385
3386 PR 14055
3387 * arith.c (gfc_convert_integer,gfc_convert_real): Removed leading '+'
3388 before conversion by gmp library call.
3389
3390 2004-03-24 Bud Davis <bdavis9659@comcast.net>
3391
3392 PR 12921
3393 * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
3394
3395 2004-02-24 Richard Henderson <rth@redhat.com>
3396
3397 * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
3398
3399 2004-02-19 Loren J. Rittle <ljrittle@acm.org>
3400
3401 * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
3402 (fortran/gfortran.info): ... to here.
3403 (f95.srcinfo): New.
3404
3405 2004-02-16 Richard Henderson <rth@redhat.com>
3406
3407 * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
3408 * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
3409 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
3410 (gfc_expand_function): Rename from expand_function_body, make static,
3411 don't do anything except invoke tree_rest_of_compilation.
3412 (gfc_be_parse_file): Invoke cgraph.
3413 (gfc_expand_decl): Remove.
3414 (gfc_init_builtin_functions): Add __builtin_init_trampoline and
3415 __builtin_adjust_trampoline.
3416 * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
3417 (gfc_finalize): New.
3418 (gfc_generate_function_code): Use it. Lower nested functions.
3419 * trans-expr.c (gfc_conv_function_call): Add static chain operand
3420 to call_expr.
3421 * trans.c (gfc_build_function_call): Likewise.
3422 * trans.h (expand_function_body): Remove.
3423
3424 2004-02-15 Victor Leikehman <lei@il.ibm.com>
3425
3426 PR gfortran/13433
3427 * trans-decl.c (gfc_build_function_decl) For functions
3428 returning CHARACTER pass an extra length argument,
3429 following g77 calling conventions.
3430 * trans-types.c (gfc_get_function_type) Ditto.
3431 * trans-expr.c (gfc_conv_function_call) Ditto.
3432
3433 2004-02-14 Paul Brook <paul@codesourcery.com>
3434
3435 * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
3436
3437 2004-02-12 Paul Brook <paul@nowt.org>
3438
3439 * BUGS: Remove.
3440
3441 2004-02-08 Steve Kargl <sgk@troutmask.apl.washington.edu>
3442
3443 * gfortran.texi: Fix typos.
3444
3445 2004-02-07 Bud Davis <bdavis9659@comcast.net>
3446
3447 PR gfortran/13909
3448 * intrinsic.c (add_conversions) Use logical conversion instead
3449 of real.
3450 * trans-types.c (gfc_get_logical_type) implemented logical*1
3451 and logical*2.
3452
3453 2004-01-17 Paul Brook <paul@codesourcery.com>
3454
3455 * lang-specs.h: Remove %<fixed-form.
3456
3457 2004-01-15 Toon Moene <toon@moene.indiv.nluug.nl>
3458
3459 * lang-specs.h: Enable preprocessing of source files
3460 ending in .F, .fpp, .FPP, .F90 and .F95.
3461
3462 2004-01-13 Toon Moene <toon@moene.indiv.nluug.nl>
3463
3464 PR fortran/12912
3465 * lang-specs.h: Enable compilation of files ending
3466 in .f, .for and .FOR.
3467
3468 2004-01-11 Paul Brook <paul@codesourcery.com>
3469
3470 * trans-stmt.c (gfc_trans_if_1): New function.
3471 (gfc_trans_if): Use it.
3472
3473 2004-01-11 Erik Schnetter <schnetter@uni-tuebingen.de>
3474
3475 * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
3476 (gfc_option_t): Add max_identifier_length.
3477 * lang.opt: Add fmax-identifier-length.
3478 * match.c (parse_name): Use limit.
3479 * options.c (gfc_init_options): Set max_identifier_length.
3480 (gfc_handle_option): Ditto.
3481
3482 2004-01-11 Feng Wang <fengwang@nudt.edu.cn>
3483
3484 * intrinsic.c (add_functions): Add resolve function to dcmplx.
3485 * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
3486 * iresolve.c (gfc_resolve_dcmplx): New function.
3487
3488 2004-01-10 Paul Brook <paul@codesourcery.com>
3489
3490 * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
3491 * trans-types.c (gfc_sym_type): Handle external dummy procedures.
3492 (gfc_return_by_reference): Correct condition.
3493 (gfc_get_function_type): Ditto.
3494
3495 2004-01-10 Paul Brook <paul@codesourcery.com>
3496
3497 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
3498 types.
3499
3500 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
3501
3502 * iresolve.c: Use correct kind.
3503
3504 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
3505
3506 PR fortran/13467
3507 * trans-decl.c (gfc_create_module_variable): Output array valued
3508 parameters.
3509
3510 2004-01-10 Paul Brook <paul@codesourcery.com>
3511
3512 * resolve.c (resolve_branch): Get error message right way round.
3513
3514 2004-01-10 Canqun Yang <canqun@nudt.edu.cn>
3515
3516 * trans-array (gfc_conv_loop_setup): Adjust comment to track
3517 reality.
3518 (gfc_array_allocate): Don't count size of element twice.
3519
3520 2004-01-04 Paul Brook <paul@codesourcery.com>
3521
3522 * lang.opt (i8, r8, std=*): Remove RejectNegative.
3523
3524 2004-01-04 Paul Brook <paul@codesourcery.com>
3525
3526 * error.c (gfc_notify_std): New function.
3527 * gfortran.h (gfc_notify_std): Declare.
3528 (GFC_STD_*): Define.
3529 (gfc_option_t): Add warn_std and allow_std.
3530 * intrinsic.c (gfc_init_expr_extensions): Fix logic.
3531 (gfc_intrinsic_func_interface): Use gfc_notify_std.
3532 * check.c (check_rest): Use gfc_notify_std.
3533 * match.c (gfc_match_pause): Ditto.
3534 (gfc_match_assign): Ditto.
3535 (gfc_match_goto): Ditto.
3536 * resolve.c (resolve_branch): Ditto.
3537 * lang.opt: Add std=<foo> and w.
3538 * options.c (gfc_init_options): Set allow_std and warn_std.
3539 (gfc_handle_option): Handle OPT_std_* and OPT_w.
3540
3541 2004-01-01 Paul Brook <paul@codesourcery.com>
3542
3543 * array.c (gfc_append_constructor): Take constructor, not expression.
3544 * data.c (struct gfc_expr_stack): Remove.
3545 (expr_stack): Remove.
3546 (find_con_by_offset): Rename from find_expr_in_con.
3547 (find_con_by_component): Rename from find_component_in_con.
3548 (gfc_get_expr_stack): Remove.
3549 (gfc_assign_data_value): Rewrite.
3550 (gfc_expr_push): Remove.
3551 (gfc_expr_pop): Remove.
3552 (gfc_advance_section): Rename from
3553 gfc_modify_index_and_calculate_offset. Handle unbounded sections.
3554 (gfc_get_section_index): Handle unbounded sections.
3555 * gfortran.h: Update prototypes.
3556 * resolve.c (check_data_variable): Array section maight not be the
3557 last ref.
3558
3559 2004-01-01 Paul Brook <paul@codesourcery.com>
3560
3561 PR fortran/13432
3562 * resolve.c (resolve_symbol): Allow assumed length function results.
3563
3564 2004-01-01 Steve Kargl <sgk@troutmask.apl.washington.edu>
3565
3566 * match.c (gfc_match_pause): Fix spelling.
3567
3568 2004-01-01 Steven Bosscher <stevenb@suse.de>
3569
3570 PR fortran/13251
3571 * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
3572 reference from the expression.
3573
3574 2003-12-26 Feng Wang <fengwang@nudt.edu.cn>
3575
3576 * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
3577 dumping.
3578 * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
3579 (gfc_exec_op): New EXEC_LABEL_ASSIGN.
3580 (symbol_attribute):New variable attribute: assign.
3581 * io.c (resolve_tag):Integer variable is allowed.
3582 (match_dt_format): Add ASSIGN statement. Set assign flag.
3583 * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
3584 (gfc_match_assign): Add ASSIGN statement. Set assign flag.
3585 (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
3586 * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
3587 (next_statement): Add ST_LABEL_ASSIGNMENT.
3588 (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
3589 * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
3590 (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
3591 * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
3592 * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
3593 assign. Put them into the stuct lang_decl.
3594 * trans-io.c (set_string): Add the assign statement.
3595 * trans-stmt.c (gfc_trans_label_assign): New function.
3596 (gfc_trans_goto): Translate ASSIGNED GOTO statement.
3597 * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
3598 * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
3599 * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
3600 (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
3601 (GFC_DECL_ASSIGN(node)): New macro to access flag.
3602
3603 2003-12-31 Huang Chun <chunhuang73@hotmail.com>
3604
3605 PR fortran/13434
3606 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
3607 minval/maxval.
3608
3609 2003-12-22 Toon Moene <toon@moene.indiv.nluug.nl>
3610
3611 * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
3612 that arguments to subroutines/functions can't alias themselves, nor global
3613 memory.
3614
3615 2003-12-20 Steven Bosscher <stevenb@suse.de>
3616
3617 * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
3618 * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
3619
3620 2003-12-12 Huang Chun <chunhuang73@hotmail.com>
3621
3622 * primary.c (match_substring): Fix substring bug for start point
3623 or end point is NULL.
3624 * trans-expr.c (gfc_conv_substring): Ditto
3625 * trans-types.c (gfc_sym_type): Get correct type of scalar
3626 character variables.
3627 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
3628 derived type.
3629
3630 2003-12-10 Richard Henderson <rth@redhat.com>
3631
3632 * options.c (gfc_post_options): Don't ever use rtl inlining.
3633
3634 2003-12-05 Canqun Yang <canqun@nudt.edu.cn>
3635
3636 * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
3637 * trans-equivalence.c: Remove.
3638 * trans-decl.c (gfc_get_symbol_decl): Update to match.
3639 (gfc_generate_function_code): Ditto.
3640 * trans-array.c (gfc_conv_array_parameter): Ditto.
3641 * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
3642 (F95_ADDITIONAL_OBJS): Add stor-layout.o
3643 * trans.h (gfc_trans_equivalence): Remove.
3644 * gfortran.h (struct gfc_equiv): Add used field.
3645 (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
3646 equiv_offset fields.
3647
3648 2003-12-05 Richard Henderson <rth@redhat.com>
3649
3650 * trans.c (gfc_build_addr_expr): New.
3651 (gfc_build_indirect_ref, gfc_build_array_ref): New.
3652 * trans.h: Declare them.
3653 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
3654 trans-stmt.c, trans.c (*): Use them.
3655
3656 * f95-lang.c (gfc_post_options): Remove dead prototype.
3657 * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
3658 * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
3659 allocation size.
3660
3661 2003-12-01 Feng Wang <fengwang@nudt.edu.cn>
3662
3663 * io.c (gfc_match_format): Check for missing format label.
3664
3665 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
3666
3667 PR fortran/13155
3668 * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
3669 from interfaces in modules.
3670
3671 2003-11-30 Paul Brook <paul@nowt.org>
3672
3673 * trans-array.c (gfc_trans_g77_array): Make non-static.
3674 (gfc_trans_assumed_size): Remove.
3675 (gfc_trans_dummy_array_bias): Explicitly free temporary.
3676 * trans-array.h (gfc_trans_g77_array): Add prototype.
3677 (gfc_trans_assumed_size): Remove.
3678 * trans-decls.c (gfor_fndecl_push_context): Remove.
3679 (gfor_fndecl_pop_context): Remove.
3680 (gfc_build_function)decls): Don't create them.
3681 (gfc_trans_deferred_vars): Update to match. Remove dead code.
3682 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
3683
3684 2003-11-30 Kejia Zhao <kejia_zh@nudt.edu.cn>
3685
3686 * trans-array.c (gfc_conv_array_parameter): Simplify
3687 array argument passing for array name actual argument.
3688 * trans-expr.c (gfc_conv_function_call): Ditto
3689 * trans-types.c (gfc_is_nodesc_array):Ditto.
3690
3691 2003-11-30 Paul Brook <paul@nowt.org>
3692
3693 * f95-lang.c (gfc_post_options): Move ...
3694 * options.c (gfc_post_options): .. to here. Handle inlining options.
3695 * gfortran.h (gfc_post_options): Add prototype.
3696
3697 2003-11-28 Richard Henderson <rth@redhat.com>
3698
3699 * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
3700
3701 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
3702
3703 * trans.h (has_alternate_specifier): New global variable.
3704 * match.c (gfc_match_call): Handle actual arguments associated with
3705 alternate return indicators.
3706 * trans-expr.c (gfc_conv_function_call): Ditto
3707 * trans-stmt.c (gfc_trans_call): Ditto
3708 (gfc_trans_return): Handle return statement with value.
3709 * trans-decl.c (gfc_generate_function_code): Handle functions with
3710 asterisk dummy.
3711 (gfc_get_fake_result_decl): Ditto
3712 * trans-types.c (gfc_get_function_type): Ditto
3713 * resolve.c (resolve_actual_arglist): Check alternate return indicators.
3714 (resolve_formal_arglist): Check asterisk dummy.
3715
3716 2003-11-27 Paul Brook <paul@nowt.org>
3717
3718 * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
3719 allocation interface.
3720 (gfc_conv_ array_parameter): Ditto.
3721 (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
3722 * trans-array.c: Update prototype.
3723 * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
3724 (gfc_trans_auto_character_variable): Use new memory alloc interface.
3725 * trans-expr.c (gfc_conv_string_tmp): Ditto.
3726 (gfc_conv_function_call): Use gfc_conv_string_tmp.
3727 * trans-stmt.c (gfc_do_allocate): Use new memory alloc interface.
3728 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
3729 * trans.h (gfc_ss_info): Remove unused pdata field.
3730 * trans.c (gfc_create_var_np): Change T to V.
3731
3732 2003-11-26 Richard Henderson <rth@redhat.com>
3733
3734 * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
3735 * trans-intrinsic.c (gfc_intrinsic_map): ... here. Add SCALE,
3736 FRACTION, NEAREST, SET_EXPONENT.
3737 (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
3738 Fix GTY marking. Remove unnecessary const's.
3739 (LIBM_FUNCTION): Rename from I_LIB.
3740 (LIBF_FUNCTION): New.
3741 (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
3742 conventions. Assume the expr signature is correct. Mark const.
3743 (gfc_conv_intrinsic_exponent): Use library functions.
3744 (gfc_conv_intrinsic_set_exponent): Remove.
3745 (gfc_conv_intrinsic_scale): Remove.
3746 (gfc_conv_intrinsic_nearest): Remove.
3747 (gfc_conv_intrinsic_fraction): Remove.
3748 (gfc_conv_intrinsic_function): Update.
3749 * trans-decl.c (gfor_fndecl_math_exponent4): New.
3750 (gfor_fndecl_math_exponent8): New.
3751 (gfc_build_intrinsic_function_decls): Set them.
3752 * trans.h: Declare them.
3753
3754 2003-11-25 Canqun Yang <canqun@nudt.edu.cn>
3755
3756 * trans-common.c (gfc_layout_global_equiv): Locate the error for
3757 underflow COMMON block.
3758 (gfc_trans_one_common): Fix bug for size of COMMON block containing
3759 EQUIVALENCE object. Also fix typo in an error message.
3760
3761 2003-11-25 Diego Novillo <dnovillo@redhat.com>
3762
3763 * Make-lang.in: Add check-gfortran to lang_checks.
3764 (check-f95): Alias for check-gfortran.
3765
3766 2003-11-25 Jason Merrill <jason@redhat.com>
3767
3768 * Make-lang.in (f95.tags): Create TAGS.sub files in each
3769 directory and TAGS files that include them for each front end.
3770
3771 2003-11-24 Paul Brook <paul@nowt.org>
3772
3773 PR fortran/13154
3774 * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
3775
3776 2003-11-24 Paul Brook <paul@nowt.org>
3777
3778 * expr.c (simplify_const_ref): Return SUCCESS for things we don't
3779 handle.
3780 * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
3781
3782 2003-11-24 Paul Brook <paul@nowt.org>
3783
3784 PR fortran/13105
3785 * array.c (gfc_array_ref_shape): Handle elemental dimensions.
3786 * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
3787
3788 2003-11-20 Richard Henderson <rth@redhat.com>
3789
3790 * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
3791 (gfc_conv_array_base): Likewise.
3792 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
3793 * trans-expr.c (gfc_conv_string_tmp): Likewise.
3794 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
3795 * trans-stmt.c (gfc_trans_character_select): Likewise.
3796
3797 2003-11-13 Paul Brook <paul@nowt.org>
3798
3799 * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
3800
3801 2003-11-13 Canqun Yang <canqun@nudt.edu.cn>
3802
3803 * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
3804 (resolve_equivalence): New function.
3805 (resolve_equivalence_derived): New function.
3806
3807 2003-11-12 Richard Henderson <rth@redhat.com>
3808
3809 * trans.c (gfc_trans_code): Use annotate_with_locus instead of
3810 annotate_all_with_locus.
3811
3812 2003-11-11 Canqun Yang <canqun@nudt.edu.cn>
3813
3814 * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
3815 * trans-decl.c (gfc_finish_var_decl): Modified.
3816
3817 2003-11-08 Paul Brook <paul@nowt.org>
3818
3819 PR fortran/12704
3820 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
3821 arrays.
3822
3823 2003-11-06 Paul Brook <paul@nowt.org>
3824
3825 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
3826
3827 2003-11-02 Canqun Yang <canqun@nudt.edu.cn>
3828
3829 * match.c (gfc_match_stopcode): Assign '0' to stop_code.
3830
3831 2003-10-27 Anthony Green <green@redhat.com>
3832
3833 * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
3834 (f95.stagefeedback): Ditto.
3835
3836 2003-10-27 Andrew Pinski <pinskia@physics.uc.edu>
3837
3838 PR fortran/12682
3839 * Make-lang.in (f95.stageprofile): Add.
3840 (f95.stagefeedback): Add.
3841
3842 2003-10-23 Richard Henderson <rth@redhat.com>
3843
3844 * f96-lang.c (gfc_gimplify_expr): Remove.
3845 (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
3846 (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
3847
3848 2003-10-23 Richard Henderson <rth@redhat.com>
3849
3850 * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
3851
3852 2003-10-20 Paul Brook <paul@nowt.org>
3853
3854 * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
3855 * trans-stmt.c (gfc_trans_do_while): Ditto.
3856
3857 2003-10-17 Paul Brook <paul@nowt.org>
3858
3859 * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
3860
3861 2003-10-17 Paul Brook <paul@nowt.org>
3862
3863 * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
3864
3865 2003-10-17 Feng Wang <wf_cs@yahoo.com>
3866
3867 * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
3868 (gfc_resolve_minloc): Ditto.
3869 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
3870 Return the value after subtracting the lower bound.
3871
3872 2003-10-16 Richard Henderson <rth@redhat.com>
3873
3874 * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
3875
3876 2003-10-16 Steven Bosscher <steven@gcc.gnu.org>
3877
3878 * lang.c: Remove -M option for now, it's in the way for C.
3879
3880 2003-10-14 Jason Merrill <jason@redhat.com>
3881
3882 * Make-lang.in (f95.tags): New rule.
3883
3884 2003-10-13 Richard Henderson <rth@redhat.com>
3885
3886 * trans.c (gfc_trans_code): Use annotate_all_with_locus.
3887
3888 2003-10-13 Paul Brook <paul@nowt.org>
3889
3890 * trans-decl.c (generate_local_decl): Don't create junk variables.
3891
3892 2003-10-13 Paul Brook <paul@nowt.org>
3893
3894 * resolve.c (resolve_formal_arglist): Use function result decl in
3895 preference to function decl.
3896
3897 2003-10-12 Richard Henderson <rth@redhat.com>
3898
3899 * f95-lang.c (gfc_define_builtin): New const_p argument. Set
3900 TREE_READONLY. Update all callers.
3901
3902 2003-10-12 Feng Wang <wf_cs@yahoo.com>
3903
3904 * iresolve.c (gfc_resolve_cshift): Change to match implementation.
3905 * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
3906 (gfc_is_intrinsic_libcall): Add CSHIFT.
3907
3908 2003-10-12 Richard Henderson <rth@redhat.com>
3909
3910 * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
3911 (gfc_trans_array_constructor_value): Likewise.
3912 (gfc_conv_array_initializer): Likewise.
3913 * trans-stmt.c (gfc_trans_character_select): Likewise.
3914
3915 2003-11-12 Kejia Zhao <kejia_zh@yahoo.com.cn>
3916
3917 * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
3918
3919 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
3920
3921 * check.c (gfc_check_repeat): Check arguments are scalar.
3922 (gfc_check_trim): New function.
3923 * intrinsic.h (gfc_check_trim): Add prototype.
3924 * intrinsic.c (add_functions): Use it.
3925 * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
3926 Decalare.
3927 * trans-decl.c: Ditto.
3928 (gfc_build_intrinsic_fucntion_decls): Set them.
3929 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
3930 (gfc_conv_intrinsic_trim): New function.
3931 (gfc_conv_intrinsic_repeat): New function.
3932 (gfc_conv_intrinsic_function): Use them.
3933
3934 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
3935
3936 * trans-types.c (gfc_sym_type): Handle result variables.
3937
3938 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
3939
3940 * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
3941 gfc_get_character_type.
3942
3943 2003-10-11 Feng Wang <wf_cs@yahoo.com>
3944
3945 * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
3946
3947 2003-10-11 Paul Brook <paul@nowt.org>
3948
3949 * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
3950 (gfc_resolve_dprod): New function.
3951 (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
3952 * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
3953 (gfc_resolve_dprod): Declare.
3954 * intrinsic.c (add_functions): Use them.
3955 * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
3956
3957 2003-10-06 Richard Henderson <rth@redhat.com>
3958
3959 * f95-lang.c (gfc_init_builtin_functions): Add clzll.
3960 * trans-intrinsic.c (call_builtin_clz): Use it.
3961
3962 2003-10-05 Paul Brook <paul@nowt.org>
3963
3964 * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
3965 * trans-decl.c (gfc_generate_function_code): Set
3966 cfun->function_end_locus.
3967
3968 2003-09-24 Jason Merrill <jason@redhat.com>
3969
3970 * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
3971 TREE_LOCUS.
3972
3973 2003-09-21 Lifang Zeng <zlf605@hotmail.com>
3974 Paul Brook <paul@nowt.org>
3975
3976 * Make-lang.in (F95_OBJS): Add fortran/data.o.
3977 * array.c (gfc_inser_constructor): New function.
3978 (gfc_get_constructor): New function.
3979 (gfc_free_constructor): Initialize offset and repeat.
3980 (iterator_stack): Remove.
3981 (expand_info): Add offset, component and repeat fields.
3982 (expand_constructor): Set them.
3983 (expand): Set new fields.
3984 (gfc_copy_constructor): Ditto. Avoid recursion.
3985 * gfortran.h: Add prototypes for new functions.
3986 (gfc_constructor): Add offset, component and repeat.
3987 (iteratio_stack): Move to here.
3988 * resolve.c (check_data_variable): Convert data values into variable
3989 initializers.
3990 (traverse_data_list): Build implicit loop chain.
3991 (gfc_resolve): Ditto.
3992 * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
3993 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
3994 * trans-expr.c (gfc_conv_structure): Handle array initializers.
3995 (gfc_conv_expr): Update to match.
3996 * trans.h (gfc_conv_structure): Declare.
3997 * data.c: New file.
3998
3999 2003-09-20 Kejia Zhao <kejia_zh@yahoo.com.cn>
4000
4001 * trans.h: Add declarations for gfor_fndecl_si_kind and
4002 gfor_fndecl_sr_kind.
4003 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
4004 * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
4005 (g95_conv_intrinsic_sr_kind): New function.
4006 (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
4007 SELECTED_REAL_KIND.
4008
4009 2003-09-17 Lars Segerlund <Lars.Segerlund@comsys.se>
4010
4011 * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
4012 instead of _4 and _8 as postfix for libgfortran calls.
4013
4014 2003-09-16 Paul Brook <paul@nowt.org>
4015
4016 * array.c (compare_bounds): New function.
4017 (gfc_compare_array_spec): Use it.
4018
4019 2003-09-14 Paul Brook <paul@nowt.org>
4020
4021 * primary.c (gfc_match_rvalue): Make sure sym->result is set.
4022 * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
4023
4024 2003-09-14 Paul Brook <paul@nowt.org>
4025
4026 * check.c (dim_rank_check): Allow assumed bounds if requested.
4027 (gfc_check_lbound): Call it.
4028 (gfc_check_ubound): Ditto.
4029 (gfc_check_size): Change to match.
4030 * simplify.c (gfc_simplify_bound): New function.
4031 (gfc_simplify_lbound): New function.
4032 (gfc_simplify_ubound): New function.
4033 * intrinsic.h: Declare them.
4034 * intrinsic.c (add_functions): Use them.
4035
4036 2003-09-14 Paul Brook <paul@nowt.org>
4037
4038 * io.c (format_lex): Initialize negative_flag.
4039 (check_format): Intialize repeat.
4040 * trans-io.c (gfc_new_nml_name_expr): Declare static.
4041 (gfc_new_var_expr): Ditto.
4042
4043 2003-09-14 Paul Brook <paul@nowt.org>
4044
4045 * trans-array.c (gfc_conv_array_initializer): Handle derived types.
4046 * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
4047
4048 2003-09-12 Paul Brook <paul@nowt.org>
4049
4050 * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
4051
4052 2003-09-12 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
4053
4054 * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
4055 for a correct expression.
4056
4057 2003-09-10 Kejia Zhao <kejia_zh@yahoo.com.cn>
4058
4059 * trans-intrinsic.c (real_compnt_info): New struct.
4060 (prepare_arg_info): New function.
4061 (gfc_conv_intrinsic_set_exponent): New function.
4062 (gfc_conv_intrinsic_scale): New function.
4063 (gfc_conv_intrinsic_nearest): New function.
4064 (gfc_conv_intrinsic_fraction): New function.
4065 (gfc_conv_intrinsic_exponent): New function.
4066 (gfc_conv_intrinsic_spacing): New function.
4067 (gfc_conv_intrinsic_rrspacing): New function.
4068 (gfc_conv_intrinsic_function): Use them.
4069
4070 2003-08-24 XiaoQiang Zhang (zhangapache@yahoo.com>
4071
4072 * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
4073 build_int_2 changed from (high, low) to (low, high).
4074 * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
4075 ioparm_namelist_read_mode, iocall_set_nml_val_int,
4076 iocall_set_nml_val_float, iocall_set_nml_val_char,
4077 iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
4078 (gfc_build_io_library_fndecls): Add variable initialization.
4079 (gfc_new_nml_name_expr, get_new_var_expr): New function.
4080 (build_dt): Add namelist support.
4081 * io.c (value): New variable.
4082 (check_format): Support FMT_H now.
4083
4084 2003-09-07 Paul Brook <paul@nowt.org>
4085
4086 * io.c (gfc_resolve_dt): Error if format label is not defined.
4087
4088 2003-09-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
4089
4090 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
4091 about case_switch's break. The other is about building the condition
4092 statement tree, which judges the argument in the range of the
4093 corresponding integer type.
4094 * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
4095 for the large values.
4096
4097 2003-09-05 Paul Brook <paul@nowt.org>
4098
4099 * f95-lang.c (expand_function_body): Gimplify the function.
4100
4101 2003-09-04 Jeff Law <law@redhat.com>
4102
4103 * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
4104 index zero!
4105
4106 2003-09-04 Paul Brook <paul@nowt.org>
4107
4108 * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
4109 (gfc_expand_stmt): New function.
4110 (LANG_HOOKS_RTL_EXPAND_STMT): Define.
4111 (expand_function_body): Use tree_rest_of_compilation.
4112 * trans-decl.c (gfc_generate_function_code): Don't free cfun.
4113
4114 2003-09-03 Jeff Law <law@redhat.com>
4115
4116 * f95-lang.c (gfc_init_builtin_functions): C arrays start at
4117 index zero!
4118
4119 2003-08-30 Paul Brook <paul@nowt.org>
4120
4121 * f95-lang.c (builtin_function): Remove #if 0 code.
4122 (gfc_define_builtin): New function.
4123 (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
4124 * mathbuiltins.def: New file.
4125 * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
4126 (gfc_intrinsic_map): Use mathbuiltins.def.
4127 (gfc_intrinsic_builtin_t): Remove.
4128 (gfc_build_intrinsic_lib_fndecls): Update.
4129 * trans-types.c (gfc_init_types): Remove redundant initilaization of
4130 signed_size_type_node.
4131
4132 2003-08-29 Paul Brook <paul@nowt.org>
4133
4134 * arith.c (gfc_real_kinds): Use correct minimum exponents.
4135
4136 2003-08-22 Kejia Zhao <kejia_zh@yahoo.com.cn>
4137
4138 * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
4139 (gfc_conv_intrinsic_function): Add MODULO.
4140
4141 2003-08-22 Jason Merrill <jason@redhat.com>
4142
4143 * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
4144
4145 2003-08-22 Andreas Jaeger <aj@suse.de>
4146
4147 * Make-lang.in (f95.install-common): Add DESTDIR support.
4148 * (f95.install-info): Likewise.
4149 (f95.uninstall): Likewise.
4150
4151 2003-08-19 Diego Novillo <dnovillo@redhat.com>
4152
4153 * trans-types.c (gfc_init_types): Initialize
4154 signed_size_type_node with size_type_node.
4155
4156 2003-08-18 Paul Brook <paul@nowt.org>
4157
4158 * dependency.c (gfc_dependency): New enum.
4159 (check_another_array_ref): Remove.
4160 (gfc_get_array_from_component): Remove.
4161 (get_x): Remove.
4162 (get_range): Remove.
4163 (get_no_of_elements): Use mpz_t, not mpf_t.
4164 (transform_sections): New function.
4165 (gfc_check_range_range): Rename ...
4166 (gfc_check_section_vs_section): ... to this. Use new function.
4167 (gfc_is_inside_range): Rewrite to match.
4168 (gfc_check_element_vs_section): Ditto.
4169 (gfc_check_element_vs_element): Ditto.
4170 (get_deps): Ditto.
4171 (gfc_dep_resolver): Ditto. Remove unused parameter.
4172 * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
4173 gfc_check_element_vs_element, gfc_is_inside_range,
4174 gfc_get_array_from_component): Remove prototypes for static functions.
4175 (gfc_dep_resolver): Update prototype.
4176 * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
4177
4178 2003-08-15 Paul Brook <paul@nowt.org>
4179
4180 * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
4181 return values to parent scope.
4182 (gfc_build_dummy_array_decl): Ditto.
4183
4184 2003-08-14 Paul Brook <paul@nowt.org>
4185
4186 * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
4187 size of the type, not the pointer.
4188 * resolve.c (resolve_symbol): Give more accurate error message.
4189
4190 2003-08-10 Paul Brook <paul@nowt.org>
4191
4192 * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
4193
4194 2003-08-10 Paul Brook <paul@nowt.org>
4195
4196 * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
4197 type components.
4198
4199 2003-08-10 Chun Huang <compiler@sohu.com>
4200
4201 * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
4202 (resolve_symbol): Ditto.
4203 * trans-expr.c (gfc_conv_statement_function): New function.
4204 (gfc_conv_function_expr): Use it.
4205
4206 2003-08-10 Paul Brook <paul@nowt.org>
4207
4208 * trans-array.c (gfc_conv_ss_startstride): Handle functions.
4209 (walk_function_expr): Set section rank.
4210 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
4211
4212 2003-08-10 Paul Brook <paul@nowt.org>
4213
4214 * intrinsic.c (add_sym): Prefix names with correct string.
4215 (add_sym_0s): New function.
4216 (add_subroutines): Register abort.
4217
4218 2003-08-10 Erik Schnetter <schnetter@uni-tuebingen.de>
4219
4220 * gfortran.h: Introduce options to control the mangling.
4221 * lang.opt: Likewise.
4222 * options.c (gfc_init_options): Handle the options.
4223 * trans-common.c (gfc_sym_mangled_common_id): New function.
4224 (gfc_build_common_decl): Call it.
4225 * trans-decl.c (gfc_sym_mangled_function_id): New function.
4226 (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
4227
4228 2003-08-09 Paul Brook <paul@nowt.org>
4229
4230 * module.c (mio_symbol): Always ouput a namespace for formal args.
4231 (load_needed): Namespace now belong to their proper symbol.
4232 (gfc_dump_module): Change G95=>GFORTRAN.
4233
4234 2003-08-05 Paul Brook <paul@nowt.org>
4235
4236 * options.c: Force -fg77-calls.
4237
4238 2003-08-02 Paul Brook <paul@nowt.org>
4239
4240 * Makelang.in: Rename G95_* to GFORTRAN_*.
4241 * All sources: Rename G95_* to GFC_*.
4242
4243 2003-08-01 Paul Brook <paul@nowt.org>
4244
4245 * fortran/Make-lang.in: Use GMPLIBS.
4246 * fortran/config-lang.in: Set need_gmp.
4247 * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
4248
4249 2003-07-27 Andreas Jaeger <aj@suse.de>
4250
4251 * trans-decl.c (gfc_generate_constructors): Convert prototype to
4252 ISO C90.
4253 * trans-const.c (gfc_init_constants): Likewise.
4254 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
4255
4256 * gfortranspec.c: Convert to ISO C90.
4257 (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
4258
4259 2003-07-26 Paul Brook <paul@nowt.org>
4260
4261 * lang.opt: Add -fdump-parse-tree.
4262 * options.c (gfc_handle_option): Ditto.
4263 * resolve.c (resolve_forall_iterators): Convert to proper type.
4264 * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
4265
4266 2003-07-26 Paul Brook <paul@nowt.org>
4267
4268 * Makefile.in: Add build dependencies on files common with rest of gcc.
4269
4270 2003-07-26 Lifang Zeng <zlf605@hotmail.com>
4271
4272 * trans.h: Declare g95_trans_pointer_assignment.
4273 * trans-expr.c (g95_trans_pointer_assignment): New function.
4274 (g95_trans_pointer_assign): Use it.
4275 * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
4276 (g95_trans_pointer_assign_need_temp): New function.
4277
4278 2003-07-26 Paul Brook <paul@nowt.org>
4279
4280 * gfortran.texi: Replace references to g95.
4281
4282 2003-07-26 Paul Brook <paul@nowt.org>
4283
4284 Rename g95_* to gfc_*.
4285
4286 2003-07-25 Paul Brook <paul@nowt.org>
4287
4288 * gfortran.h: Rename from g95.h.
4289 * trans-types.c (boolean_type_node, booelan_true_node,
4290 boolean_false_node): Remove.
4291 * trans-types.h: Ditto.
4292
4293 2003-07-25 Chun Huang <compiler@sohu.com>
4294
4295 * parse.c (accept_statement): Implement BLOCK DATA statement.
4296 * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
4297 variables.
4298
4299 2003-07-24 Lifang Zeng <zlf605@hotmail.com>
4300
4301 * trans-stmt.c (temporary_list): Define.
4302 (g95_trans_assign_need_temp): New function.
4303 (g95_trans_forall_1): Modified for WHERE.
4304 (g95_trans_where_assign): Modified.
4305 (g95_trans_where_2): Modified.
4306 (g95_evaluate_where_mask): Modified.
4307 (g95_trans_where): Modified.
4308 (g95_get_temp_expr): Removed.
4309 (g95_add_to_where_stmt_list): Removed.
4310 (compute_overall_iter_number): Modified for WHERE.
4311 * trans.h: Remove where_stmt_list.
4312
4313 2003-07-24 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4314
4315 * lang.opt: Correct description of options -J and -M.
4316
4317 2003-07-23 Steven Bosscher <steven@gcc.gnu.org>
4318
4319 * lang.opt: Move help text to here.
4320 * lang-options.h: Remove.
4321
4322 2003-07-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4323 * iresolve.c (g95_resolve_transpose): Proper variable in switch.
4324 * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
4325 on kind.
4326
4327 2003-07-22 Steven Bosscher <steven@gcc.gnu.org>
4328 Paul Brook <paul@nowt.org>
4329
4330 * check.c (check_rest): Use global pedantic flag.
4331 * io.c (data_desc): Ditto.
4332 * error.c (g95_warning, g95_warning_now): Use global flag.
4333 * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
4334 (expand_function_body): Update to new prototypes.
4335 (g95_init): Use new option names.
4336 * g95.h (g95_option_t): Standardize names.
4337 (g95_init_options, g95_handle_option): Update prototypes.
4338 * interface.c: Use new option names.
4339 * match.c: Ditto.
4340 * module.c: Ditto.
4341 * parse.c: Ditto.
4342 * primary.c: Ditto.
4343 * resolve.c: Ditto.
4344 * scanner.c: Ditto.
4345 * simplify.c: Ditto.
4346 * symbol.c: Ditto.
4347 * trans-array.c: Ditto.
4348 * trans-expr.c: Ditto.
4349 * trans-types.c: Ditto.
4350 * trans-decl.c: Ditto.
4351 (g95_build_library_function_decl): Remove obsolete VPARAMS.
4352 * trans.h: Ditto.
4353 * options.c (g95_display_help): Remove.
4354 (g95_init_options): Convert to new scheme.
4355 (set_Wall): Ditto
4356 (g95module_option): Ditto, rename from g95_parse_arg.
4357 (g95_handle_module_path_options): New function.
4358 * trans-equivalence.c: Fix error message.
4359 * lang.opt: Corrections.
4360
4361 2003-07-21 Steven Bosscher <steven@gcc.gnu.org>
4362
4363 * lang.opt: New file.
4364
4365 2003-07-21 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4366
4367 * decl.c (match_attr_spec): Set colon_seen.
4368
4369 2003-07-14 Paul Brook <paul@nowt.org>
4370
4371 * trans-array.c: Update comment.
4372 (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
4373 * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
4374 minmaxloc,minmaxval): Ditto.
4375 * trans-io.c (g95_trans_transfer): Ditto.
4376 * trans-stmt.c: Remove unneeded prototypes.
4377 (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
4378 (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
4379 (compute_inner_temp_size): Remove bits of dead code. Add comments.
4380 Don't share loopinfo.
4381 (compute_overall_iter_number): Declare as static.
4382 (allocate_temp_for_forall_nest): Ditto.
4383 (g95_trans_forall_1): Don't pass shared loopinfo.
4384 * trans.c (g95_start_block): Expand comment.
4385
4386 2003-07-12 Paul Brook <paul@nowt.org>
4387
4388 * arith.c (g95_index_integer_kind): Remove unused initializer.
4389 * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
4390 index by size of element.
4391 (generate_loop_for_rhs_to_temp): Ditto.
4392 (allocate_temp_for_forall_nest): Use element size, not index size.
4393
4394 2003-07-11 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4395
4396 * arith.c (g95_index_integer_kind): Add a TODO.
4397 * simplify.c (g95_simplify_nearest): Add a TODO.
4398
4399 2003-07-09 Chun Huang <compiler@sohu.com>
4400
4401 * trans.h: Add declarations for gfor_fndecl_string_scan and
4402 gfor_fndecl_string_verify.
4403 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
4404 * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
4405 (g95_conv_intrinsic_verify): New function.
4406 (g95_conv_intrinsic_function): Add SCAN and VERIFY.
4407 * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
4408 of parameter 'BACK=.TRUE.'
4409
4410 2003-07-05 Lifang Zeng <zlf605@hotmail.com>
4411
4412 * trans-stmt.c (iter_info, forall_info): Define.
4413 (g95_trans_forall_block): Remove.
4414 (g95_trans_forall_loop): Use forall info blocks.
4415 (g95_trans_nested_forall_loop): New function.
4416 (g95_do_allocate): Handle things other than logical masks.
4417 (generate_loop_for_temp_to_lhs): New function.
4418 (generate_loop_for_rsh_to_temp): New function.
4419 (compute_inner_temp_size): New function.
4420 (compute_overall_iter_number): New function.
4421 (allocate_temp_for_forall_nest): New function.
4422 (g95_trans_forall): Move body ...
4423 (g95_trans_forall_1): ... to here. Handle loops with temporaries.
4424
4425 2003-07-02 Paul Brook <paul@nowt.org>
4426
4427 * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
4428 in correct scope. Change callers to match.
4429 * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
4430 * iresolve.c (g95_resolve_reshape): Only use constant shapes.
4431
4432 2003-07-02 Paul Brook <paul@nowt.org>
4433
4434 * trans-array.c (g95_conv_loop_setup): Remove dead var. Use
4435 expression shape for all expressions.
4436 * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
4437
4438 2003-07-03 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4439
4440 * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
4441 g95_parse_arg), intrinsic.c (g95_convert_type): support of
4442 -Wconversion.
4443 * intrinsic.c, g95.h: Add g95_convert_type_warn,
4444 * resolve.c (g95_resolve_index): Call it.
4445
4446 2003-07-02 Paul Brook <paul@nowt.org>
4447
4448 * iresolve.c (g95_resolve_reshape): Set expression shape.
4449 (g95_resolve_shape): Ditto.
4450 * simplify.c (g95_simplify_shape): Move common code outside condition.
4451 * trans-array.c (g95_conv_array_initializer): Teach it how to count.
4452
4453 2003-07-01 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4454
4455 * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
4456 conformance checks.
4457
4458 2003-06-29 Paul Brook <paul@nowt.org>
4459
4460 * array.c (g95_simplify_iterator_var): Don't bother with return value.
4461 * expr.c (find_array_element, find_component_ref): New functions.
4462 (remove_subobject_ref): New function.
4463 (simplify_const_ref): Use them. Rename from simplify_component_ref.
4464 (simplify_ref_chain): New function.
4465 (g95_simplify_expr): Use it. Simplify parameter variable subobjects.
4466 (g95_specification_expr): Simplify the expression.
4467 * resolve.c (resolve_operator): Check simplifications return code.
4468 (g95_resolve_expr): Ditto.
4469
4470 2003-06-26 Paul Brook <paul@nowt.org>
4471
4472 * expr.c (simplify_component_ref): New function.
4473 (g95_simplify_expr): Use it.
4474 * resolve.c (resolve_structure_cons): Handle references.
4475
4476 2003-06-25 Paul Brook <paul@nowt.org>
4477
4478 * trans-io.c (build_dt): Handle internal units.
4479
4480 2003-06-25 Canqun Yang <canqun@yahoo.com.cn>
4481
4482 * trans-common.c (g95_build_common_decl): Array index range starts at 0.
4483 (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
4484 Use g95_array_index_type instead of integer_type_node.
4485 (g95_build_common_decl, g95_set_common_master_type): Use
4486 g95_character1_type_node instead of char_type_node.
4487 * trans-equivalence.c (g95_layout_local_equiv): As above.
4488
4489 2003-06-24 Steven G. Kargl <kargls@attbi.com>
4490
4491 * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
4492 remove last remains of -fquiet.
4493
4494 2003-06-22 Paul Brook <paul@nowt.org>
4495
4496 * resolve.c (resolve_operator): Don't fail if we can't simplify.
4497 (g95_resolve_expr): Ditto.
4498 (resolce_code): Mark as static.
4499 * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
4500 gimplifer doesn't (yet).
4501
4502 2003-06-20 Paul Brook <paul@nowt.org>
4503
4504 * g95.h: Add ST_PAUSE and EXEC_PAUSE.
4505 * match.c (g95_match_if): Add ST_PAUSE.
4506 (g95_match_stopcode): New function.
4507 (g95_match_pause, g95_match_stop): Use it.
4508 * parse.c (g95_ascii_statement): Handle ST_PAUSE.
4509 (decode_stmt, next_statement, parse_executable): Ditto.
4510 * resolve.c (resolve_code): Ditto.
4511 * st.c (g95_free_statement): Ditto.
4512 * trans-stmt.c (g95_trans_pause): New function.
4513 * trans-stmt.h: Declare it.
4514 * trans.c (g95_trans_code): Use it.
4515 * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
4516 Declare.
4517 (g95_build_builtin_function_decls): Initialize them.
4518 * trans.h: Ditto.
4519 * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
4520
4521 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4522
4523 * io.c (g95_match_open , g95_match_close, g95_match_inquire,
4524 match_filepos): Fix error handling.
4525
4526 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4527
4528 * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
4529 Add assertions on arguments.
4530 * resolve.c (expression_shape): Remove useless &.
4531 * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
4532 g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
4533 g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
4534 g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
4535 g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
4536 g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
4537 (g95_simplify_not, g95_simplify_scale): Add assertions.
4538
4539 2003-06-15 Paul Brook <paul@nowt.org>
4540
4541 Clean up stuff to work with the ssa optimizers.
4542 * convert.c (convert): Handle BOOLEAN_TYPEs.
4543 * f95-lang.c (g95_truthvalue_conversion): Implement.
4544 * trans-array.c (g95_trans_array_constructor_value): Group multiple
4545 scalar values.
4546 * trans.h (g95_truthvalue_conversion): Declare.
4547 * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
4548 * trans-stmt.c (g95_trans_character_select): Don't create array
4549 assignments. Mark labels as indirect jump targets.
4550 * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
4551 (g95_get_dtype_cst): Handle LOGICAL types.
4552
4553 2003-06-14 Paul Brook <paul@nowt.org>
4554
4555 * f95-lang.c (g95_gimplify_expr): New function.
4556 * trans-array.c (g95_trans_array_constructor_value): Don't create
4557 array assignments.
4558 (g95_conv_expr_descriptor): Rename simple->gimple.
4559 * trans-expr.c (conv_expr_op): Use proper logical operators.
4560 * trans-intrinsic.c (build_fixbound_expr): New function.
4561 (build_fix_expr): Ditto.
4562 (g95_conv_intinsic_aint): Use them. Use builtin functions.
4563 (g95_conv_intrinsic_function): Add FLOOR and CEILING.
4564
4565 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4566
4567 * array.c (g95_compare_array_spec): Remove unreachable code.
4568 * expr.c (g95_copy_expr): Likewise.
4569 * intrinsic.c (g95_convert_type): Likewise.
4570 * misc.c (g95_code2string): Likewise.
4571 * simplify.c (g95_simplify_ishft, g95_simplify_real,
4572 g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
4573 * trans-stmt.c (g95_trans_select): Likewise.
4574 * primary.c (extend_ref): Add an assertion.
4575 * simplify.c (g95_convert_constant): Add const.
4576 * intrinsic.h: Remove g95_check_x_ni.
4577 * f95-lang.c (g95_finish): Call g95_release_include_path.
4578
4579 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4580
4581 * resolve.c (resolve_contained_functions): Fix typo introduced on
4582 2003-01-13.
4583
4584 2003-06-09 Paul Brook <paul@nowt.org>
4585
4586 * g95.h: Include system.h not hwint.h.
4587 * many: use safe-ctype.h not ctype.h. Change isalpha -> ISALPHA, etc.
4588 * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
4589
4590 2003-06-09 Paul Brook <paul@nowt.org>
4591
4592 * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
4593 * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
4594 * trans-decl.c (g95_add_decl_to_functions): Make non-static.
4595 (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
4596 (g95_generate_function_code): Translate COMMON and EQUIVALENCE
4597 objects.
4598 * trans.h (g95_trans_equivalence, g95_trans_common,
4599 g95_add_decl_to_function): Declare.
4600 * trans-common.c, trans-equivalence.c: New files.
4601
4602 2003-06-08 Steven Bosscher <steven@gcc.gnu.org>
4603
4604 * intrinsic.c (g95_intrinsic_extension): Remove.
4605 (add_functions): Substitute g95_check_x for g95_check_x_ni
4606 everywhere.
4607 (g95_init_expr_extensions): New function.
4608 (g95_intrinsic_func_interface): Use it.
4609 * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
4610 * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
4611 g95_check_precision, g95_check_present, g95_check_radix,
4612 g95_check_range, g95_check_selected_real_kind): Do not set
4613 g95_intrinsic_extension.
4614 (g95_check_x_ni): Remove now duplicate of g95_check_x.
4615
4616 * expr.c (check_inquiry): Add FIXME, fixup some code style.
4617
4618 2003-06-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4619
4620 * g95.h (ref_type): Name this type explicitly.
4621 * module.c (MIO_NAME): Add specialisations of mio_name.
4622 (mio_symbol_attribute, mio_typespec, mio_array_ref,
4623 mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
4624 (ab_attribute): Name this type explicitly.
4625 (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
4626
4627 2003-06-05 Kejia Zhao <kejia_zh@yahoo.com.cn>
4628
4629 * trans-intrinsic.c (g95_conv_allocated): New function.
4630 (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
4631
4632 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
4633
4634 * f95-lang.c: Don't include g95-support.h
4635 (g95_mark_addressable): Add prototype.
4636 (g95_init_decl_processing): Remove C front end hack.
4637 * f95-tree.c: Remove file.
4638 * support.c: Remove file.
4639 * g95-support.h: Remove file.
4640 * trans-types.c (g95_init_types): Set up boolean
4641 type related tree nodes.
4642 * Make-lang.in: Remove rules for dead files and
4643 dependencies on them.
4644
4645 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
4646
4647 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
4648 C front end dependency. Also, convert.c does not depend on
4649 g95-support.h anymore.
4650 * convert.c: Don't include c-common.h and g95-support.h
4651 * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
4652 (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
4653 stmts_are_full_exprs_p, current_stmt_tree,
4654 current_scope_stmt_stack): Remove.
4655 * g95-support.h (unsigned_conversion_warning): Kill proto.
4656 (boolean_type_node, boolean_true_node, boolean_false_node):
4657 Don't define here. Instead, make then true tree nodes in
4658 trans-types.
4659 * support.c (c_global_trees): Die, C front end, die!!!
4660 (g95_init_c_decl_hacks): Don't touch intmax_type_node,
4661 uintmax_type_node, string_type_node and const_string_type_node.
4662 (decl_constant_value, overflow_warning): Make static functions.
4663 They are in death row too, though.
4664 (default_conversion, c_expand_asm_operands): Remove.
4665 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
4666 trans.c: Don't include c-common.h.
4667 * trans-types.c (boolean_type_node, boolean_true_node,
4668 boolean_false_node): Make them real tree nodes.
4669 * trans-types.h (intmax_type_node, string_type_node,
4670 const_string_type_node): Hack to work around C dependencies
4671 in builtin-types.def.
4672
4673 2003-06-04 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4674
4675 * decl.c (decl_types): Add some iterators-like sentinels.
4676 * decl.c (match_attr_spec): Use them.
4677 Use "decl_types" instead of "int".
4678 Add cast in call to g95_match_strings.
4679 * dump-parse-tree.c (g95_show_namespace): Use "g95_intrinsic_op"
4680 instead of "int".
4681 * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
4682 (g95_interface_info): Use "g95_intrinsic_op".
4683 * dump-parse-tree.c (g95_show_namespace): Use them.
4684 * interface.c (g95_check_interfaces): Use them.
4685 * module.c (read_module, write_module): Use them.
4686 * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
4687 Use "g95_intrinsic_op".
4688 * interface.c (check_operator_interface): Use "g95_intrinsic_op".
4689 Add a default case in switch statement.
4690 * intrinsic.h (g95_generic_isym_id): Moved to...
4691 * g95.h (g95_generic_isym_id): here.
4692 (g95_intrinsic_sym): Use "g95_generic_isym_id".
4693 * intrinsic.c (make_generic): Use "g95_generice_isym_id".
4694 * trans-intrinsic.c (g95_intrinsic_map_t,
4695 g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
4696 * match.c (g95_match_intrinsic_op): Add cast in call to
4697 g95_match_strings.
4698
4699 2003-06-03 Steven Bosscher <steven@gcc.gnu.org>
4700
4701 * support.c (skip_evaluation, warn_conversion, lvalue_p,
4702 lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
4703 constant_fits_type_p, convert_and_check,
4704 unsigned_conversion_warning): Remove these ugly remnants
4705 we inherited from the C front end.
4706 (function_types_compatible): Remove '#if 0'-edcode.
4707 (build_modify_expr): Likewise.
4708 (convert_for_assignment): Don't use the deceased functions.
4709 The parameter fundecl is now unused.
4710 (decl_constant_value): Always just return decl. In fact
4711 this function is not used at present, but it might be in
4712 the future, when we start using the tree inliner.
4713 (overflow_warning, default_conversion, c_expand_asm_operands):
4714 Abort when these are called, they are part of the C type
4715 checking implementation and therefore poison to Fortran.
4716
4717 2003-06-04 Steven Bosscher <steven@gcc.gnu.org>
4718
4719 * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
4720 c-pretty-print.o and c-dump.o. Add a comment on why we
4721 depend on c-semantics.c.
4722 * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
4723 Don't use the C front end tree dumper hook to dump the
4724 language specific tree representation -- we don't have
4725 one. So instead, inherit the default langhook.
4726
4727 2003-06-02 Paul Brook <paul@nowt.org>
4728
4729 * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
4730
4731 2003-06-02 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4732
4733 * check.c (g95_check_associated): Use proper types. Remove
4734 extraneous argument in call to g95_error().
4735
4736 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
4737
4738 * resolve.c (resolve_operator): Make logical operands convert to the
4739 type with higher kind.
4740
4741 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
4742
4743 * check.c (g95_check_associated): Make sure both pointer and target has
4744 the same type and rank. Null pointer or array section with vector
4745 subscript as target are not allowed.
4746 * trans.h: Declare gfor_fndecl_associated.
4747 * trans-decl.c: (g95_build_builtin_function_decls): Initialize
4748 gfor_fndecl_associated.
4749 * trans-intrinsic.c (g95_conv_associated): New function.
4750 (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
4751
4752 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
4753
4754 * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
4755 according to POINTER itself rather than TARGET.
4756 (g95_conv_expr_descriptor): Make lbound start at 1.
4757 * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
4758
4759 2003-06-01 Paul Brook <paul@nowt.org>
4760
4761 * expr.c (g95_type_convert_binary): Make it match the standard.
4762 * g95.texi: Remove dead link.
4763
4764 2003-06-01 Steven Bosscher <steven@gcc.gnu.org>
4765
4766 * g95.texi: Cleanup somewhat in preparation for inclusion
4767 in GCC CVS.
4768
4769 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4770 Canqun Yang <canqun@yahoo.com.cn>
4771
4772 * resolve.c (compare_bound_int, resolve_where_shape): Proper return
4773 type.
4774 (g95_find_forall_index): Return proper value.
4775 (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
4776 compare the return value from g95_find_forall_index.
4777
4778 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4779 * g95.h, io.c (g95_st_label): Remove "length".
4780 (g95_symtree): Remove "link".
4781 (g95_case): Remove "code".
4782 * arith.c, arith.h (g95_compare_string, g95_convert_integer,
4783 g95_convert_real): Make an argument pointer to const.
4784 * decl.c (colon_seen): Add a TODO.
4785 * interface.c (g95_compare_types): Fix typo.
4786 * interface.c (compare_interfaces): Preserve value of "p".
4787 * intrinsic.c (sort_actual): Remove "i".
4788 * match.c (g95_match_assign): Proper type in call to g95_match().
4789 * parse.c (next_free): Avoid duplicate call due to macro.
4790 * parse.c (check_statement_label): wrong type in call to g95_error.
4791 * primary.c (match_real_constant): Add a TODO.
4792 * resolve.c (resolve_select): Remove useless conditional.
4793 * simplify.c (g95_simplify_repeat): Proper assignment to
4794 "value.character.string".
4795 * simplify.c (g95_simplify_reshape): Wrong variable in call to
4796 g95_error.
4797
4798 2003-05-20 Canqun Yang <canqun@yahoo.com.cn>
4799
4800 * trans-stmt.c: Remove unnecessary include file defaults.h.
4801
4802 2003-05-19 Lifang Zeng <zlf605@hotmail.com>
4803
4804 * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
4805 stride.
4806 (g95_trans_forall): Allow arbitrary number of FORALL indexes and
4807 actual variables used as FORALL indexes.
4808
4809 2003-05-15 Paul Brook <paul@nowt.org>
4810
4811 * trans-array.c (g95_trans_static_array_pointer): Use
4812 null_pointer_node.
4813 (g95_trans_deferred_array): Initialize static array pointers.
4814 * trans-expr.c (g95_conv_function_call): Use formal arglist to
4815 correctly pass POINTER and absent CHARACTER arguments.
4816
4817 2003-05-14 Lifang Zeng <zlf605@hotmail.com>
4818
4819 * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
4820 (g95_resolve_forall_body): Resolve FORALL body.
4821 (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
4822 (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
4823 (g95_find_forall_index): Check whether the FORALL index appears in
4824 the expression or not.
4825 (resolve_code): Modified.
4826
4827 2003-05-14 Paul Brook <paul@nowt.org>
4828
4829 * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
4830
4831 2003-05-13 Paul Brook <paul@nowt.org>
4832
4833 * trans-types.c (g95_max_array_element_size): Now a tree node.
4834 (g95_init_types): Work out max size properly.
4835 (g95_get_dtype_cst): Modify to match.
4836
4837 2003-05-11 Paul Brook <paul@nowt.org>
4838
4839 * trans-io.c (add_case): Create a label decl for case labels.
4840
4841 2003-05-11 Paul Brook <paul@nowt.org>
4842
4843 * arith.c (g95_integer_index_kind): New variable.
4844 * f95-lang.c (g95_init): Move frontend initialization here ...
4845 (g95_post_options): ... from here.
4846 * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
4847 * intrinsic.c (add_functions): Use index kinds.
4848 * iresolve.c: Convert to index_kind where needed.
4849 * resolve.c (g95_resolve_index): Make public, use index_kind.
4850 (resolve_array_ref): Adjust to match.
4851 * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
4852 * trans-stmt.c: Ditto.
4853 * trans-types.c: Ditto.
4854 * trans-types.h (g95_array_index_kind): Remove declaration.
4855 * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
4856
4857 2003-05-07 Paul Brook <paul@nowt.org>
4858
4859 * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
4860 * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
4861 of bound indices.
4862
4863 2003-05-07 Paul Brook <paul@nowt.org>
4864
4865 * trans-array.c (trans_static_array_pointer,
4866 g95_trans_array_constructor_value, g95_conv_array_initializer,
4867 g95_conv_structure): CONSTRUCTOR nodes only have one operand.
4868 (g95_add_loop_ss_code): Convert subscripts to the correct type.
4869 * trans-stmt.c (g95_trans_character_select): Ditto.
4870 * trans-types.c (g95_init_types): Ditto.
4871
4872 2003-05-07 Steven Bosscher <steven@gcc.gnu.org>
4873
4874 * f95-lang.c (expand_function_body): Use input_line, not lineno.
4875 * trans-decl.c (g95_generate_function_code,
4876 g95_generate_constructors): Likewise.
4877 * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
4878 g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
4879 Likewise.
4880
4881 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
4882 * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
4883 with components point to the DERIVED type itself, and two DERIVED
4884 type with components point to each other.
4885 * trans-expr.c (g95_conv_componet_ref): Modified
4886
4887 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
4888 * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
4889 null_pointer_node.
4890 (g95_trans_pointer_assign): Implement Nullify.
4891
4892 2003-05-01 Paul Brook <paul@nowt.org>
4893
4894 * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
4895 * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
4896
4897 2003-05-01 Paul Brook <paul@nowr.org>
4898
4899 * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
4900 trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
4901 IS_EMPTY_STMT.
4902
4903 2003-05-01 Canqun Yang <canqun@yahoo.com.cn>
4904
4905 * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
4906 CASE_LABEL_EXPR.
4907
4908 2003-04-28 Paul Brook <paul@nowt.org>
4909
4910 * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
4911 as their kind suggests.
4912 (g95_resolve_reshape): Ditto.
4913
4914 2003-04-28 Chun Huang <compiler@sohu.com>
4915
4916 * trans-expr.c (g95_conv_substring_expr): New function.
4917 (g95_conv_expr): Use it.
4918
4919 2003-04-28 Paul Brook <paul@nowt.org>
4920
4921 * iresolve.c (g95_resolve_transpose): Make it match the
4922 implementation.
4923 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
4924
4925 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
4926
4927 * trans-types.c (g95_add_field_to_struct): New function to
4928 add a field to a UNION_TYPE or RECORD_TYPE.
4929 * trans-types.h (g95_add_field_to_struct): Prototype.
4930 (g95_get_derived_type): Use g95_add_field_to_struct to add
4931 components.
4932 * trans-io.c (g95_add_field): Remove.
4933 (ADD_FIELD): Use new g95_add_field_to_struct function.
4934 (ADD_STRING): Likewise.
4935 * trans-stmt.c (g95_trans_select): Likewise.
4936 (g95_add_field): Remove duplicated function.
4937
4938 2003-04-18 Canqun Yang <canqun@yahoo.com.cn>
4939
4940 Port implementation for CHARACTER SELECT from Andy's tree.
4941 * trans-stmt.c (g95_trans_character_select): Implement character
4942 select. (g95_add_field): New function.
4943 * trans-decl.c: Declare 'gfor_gndecl_select_string'.
4944 (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
4945 * g95.h (struct g95_case): Add field 'int n'.
4946 * trans.h: Declare 'gfor_fndecl_select_string'.
4947
4948 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
4949
4950 * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
4951 (g95_insert_bbd): Die on duplicates.
4952 * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
4953
4954 2003-04-14 Steven Bosscher <steven@gcc.gnu.org>
4955
4956 * g95.texi: Require GMP 4.0 -- like we actually
4957 do. Explain the testsuite and what-goes-where.
4958 Don't use undefined texinfo symbol. Break very
4959 long line. Remove finished item from the list
4960 of open projects.
4961
4962 2003-04-11 Canqun Yang <canqun@yahoo.com.cn>
4963
4964 * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
4965 LOGICAL type.
4966
4967 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
4968
4969 * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
4970 (g95_trans_forall_body): New function.
4971
4972 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
4973
4974 * resolve.c (resove_where): New function.
4975 (resolve_where_shape): New function.
4976 (resolve_code): Add call to 'resolve_where'
4977 * trans-stmt.c (g95_trans_where): Modified.
4978 (g95_trans_where_2): New function.
4979 (g95_trans_where_assign): New function.
4980 (g95_evaluate_where_mask): New function.
4981 (g95_add_to_stmt_list): New function.
4982 (g95_get_temp_expr): New function.
4983 * trans.h (where_stmt_list): New structure.
4984
4985 2003-04-10 Paul Brook <paul@nowt.org>
4986
4987 * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
4988 (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
4989
4990 2003-04-10 Steven Bosscher <steven@gcc.gnu.org>
4991
4992 Update after mainline -> tree-ssa-branch merge.
4993 * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
4994 call.
4995 (g95_init): Update for new lang_hooks definition.
4996 (g95_post_options): New langhook.
4997 (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
4998 * scanner.c (g95_new_file): Comment update.
4999
5000 2003-04-09 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5001
5002 * g95.h, lang-options.h: Add -Wimplicit-interface.
5003 * options.c (g95_init_options, g95_parse_arg): Set it.
5004 * interface.c (check_intents): Warn about call with implicit
5005 interface.
5006 * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
5007 g95_procedure_use.
5008
5009 2003-04-05 Paul Brook <paul@nowt.org>
5010
5011 * iresolve.c (g95_resolve_spread): Don't resole based on type.
5012 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
5013
5014 2003-03-29 Paul Brook <paul@nowt.org>
5015
5016 * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
5017 (g95_resolve_unpack): Ditto.
5018 * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
5019 (g95_conv_intrinsic_function): Use it. Remove PACK and UNPACK.
5020 (g95_is_intrinsic_libcall): Add PACK and UNPACK.
5021
5022 2003-03-25 Paul Brook <paul@nowt.org>
5023
5024 * arith.c (g95_unary_user, g95_user): Remove dead functions.
5025 * arith.h: Ditto.
5026 * array.c (g95_free_array_ref): Ditto.
5027 * g95.h: Ditto.
5028 * symbol.c (g95_use_derived_tree): Ditto.
5029 * intrinsic.c (add_functions): Use simplification for SCALE.
5030 * primary.c (g95_match_rvalue): Test sym, not symtree.
5031
5032 2003-03-25 Paul Brook <paul@nowt.org>
5033
5034 * trans-decl.c (build_function_decl): Add parameter before it gets
5035 turned into a constant.
5036 * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
5037 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
5038 * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
5039
5040 2003-03-22 Paul Brook <paul@nowt.org>
5041
5042 * trans-array.c (g95_conv_array_initializer): Allow scalar
5043 expressions.
5044 * trans-decl.c (g95_finish_var_decl): Result variables are not
5045 module variables.
5046 * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
5047 (g95_conv_intrinsic_function): Use it.
5048 * trans-types.h (g95_type_spec): Remove dead declaration.
5049
5050 2003-03-21 Paul Brook <paul@nowt.org>
5051
5052 * trans-decl.c (g95_build_function_decl): Mark string parameters.
5053
5054 2003-03-20 Paul Brook <paul@nowt.org>
5055
5056 * trans-decl.c (g95_build_function_decl): Put character length
5057 parameters at the end of the function declaration.
5058 * trans-expr.c (g95_conv_function_call): Ditto.
5059 * trans-types.c (g95_get_function_type): Ditto.
5060
5061 2003-03-20 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5062
5063 * resolve.c (resolve_formal_arglist): Don't impose intent for
5064 procedure arguments of pure functions.
5065 (resolve_select): Remove redundant assignment.
5066
5067 2003-03-19 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5068
5069 * arith.c (validate_logical), g95.h, options.c (g95_init_options):
5070 Remove option l1.
5071 * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
5072 * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
5073 const.
5074 * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
5075 Order list.
5076 * symbol.c (g95_add_type): Fix typo in comment.
5077
5078
5079 2003-03-16 Paul Brook <paul@nowt.org>
5080
5081 * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
5082 * expr.c (g95_build_call): Remove.
5083 * f95-lang.c (puchdecl_top_level): New function.
5084 * g95.h (g95_code): Store resolved symbol, not just the name.
5085 * intrinsic.c (g95_intrinsic_namespace): New global namespace.
5086 (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
5087 (g95_get_intrinsic_sub_symbol): New function.
5088 * iresolve.c (g95_resolve_cpu_time): Use it.
5089 (g95_resolve_random_number): Ditto.
5090 * resolve.c: Set code->resolved_sym instead of code->sub_name.
5091 * trans-decl.c (g95_get_extern_function_decl): Give external decls
5092 the correct DECL_CONTEXT. Add global symbold to the global scope.
5093 * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
5094 fixed.
5095
5096 2003-03-16 Paul Brook <paul@nowt.org>
5097
5098 * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
5099 * options.c (g95_parse_arg): Ditto.
5100 * module.c (mio_symbol_attribute): Handle the always_explicit bit.
5101 * resolve.c (resolve_formal_arglist): The always_explicit sould be set
5102 for the procedure, not the parameter.
5103 * trans-array.c (g95_trans_g77_array): New function.
5104 (g95_trans_assumed_size): Use it.
5105 (g95_trans_dummy_array_bias): Ditto.
5106 (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
5107 (g95_conv_expr_descriptor): ... to here. Update callers.
5108 * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
5109 (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
5110 * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
5111 * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
5112 * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
5113 (g95_sym_type): Ditto.
5114
5115 2003-03-15 Paul Brook <paul@nowt.org>
5116
5117 * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
5118 first chain.
5119 * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
5120
5121 2003-03-14 Paul Brook <paul@nowt.org>
5122
5123 * trans-array.c (g95_array_is_packed): Remove.
5124 (g95_conv_array_base): Correctly handle all descriptorless cases.
5125 (g95_conv_array_stride): Use descriptorless strides.
5126 (g95_trans_dummy_array_bias): Don't always repack the array.
5127 (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
5128 packed.
5129 * trans-types.c (g95_get_nodesc_array_type): Differentiate between
5130 dummy and non-dummy arrays...
5131 (g95_sym_type, g95_get_derived_type): ... like these.
5132 (g95_get_array_type_bounds): Allow discontiguous arrays.
5133
5134 2003-03-12 Paul Brook <paul@nowt.org>
5135
5136 * array.c (g95_resolve_array_spec): Fix comment.
5137 * g95.h (symbol_attributes): New flag always_explicit.
5138 * resolve.c (resolve_formal_arglist): Set it always_explicit.
5139 * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
5140 * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
5141 (g95_trans_array_bounds): Allow assumed shape arrays.
5142 (g95_trans_repack_array): Remove.
5143 (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
5144 * trans-decl.c (g95_build_qualified_array): Only ignore absent
5145 bounds for assumed size arrays.
5146 (g95_build_dummy_array_decl): Use descriptorless arrays.
5147 * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
5148 (g95_trans_pointer_assign): Fix typo.
5149 * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
5150 code.
5151 (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
5152 * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
5153 Also modify callers.
5154 * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
5155
5156 2003-03-08 Paul Brook <paul@nowt.org>
5157
5158 * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
5159 (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
5160 * resolve.c (compare_spec_to_ref): Allow full array sections.
5161
5162 2003-03-08 Paul Brook <paul@nowt.org>
5163
5164 * expr.c (g95_simplify_expr): Also simplify array index and
5165 substring expressions.
5166 * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
5167 * trans-array.c (g95_trans_array_bounds): New function.
5168 (g95_trans_auto_array_allocation): Use it.
5169 (g95_trans_assumed_size): Rewrite.
5170 * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
5171 (gfor_fndecl_repack): Remove.
5172 (g95_build_qualified_array): Handle absent upper bounds.
5173 (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
5174 (g95_get_symbol_decl): Update.
5175 (g95_build_intrinsic_function_decls): Initialize new decls.
5176 * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
5177 (gfor_fndecl_repack): Remove.
5178 * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
5179 * trans-types.c: (g95_build_array_type): Merge duplicated code..
5180 (g95_get_nodesc_array_type): Handle absent bounds.
5181 * trans-types.h (g95_get_nodesc_array_type): Declare.
5182
5183 2003-03-04 Paul Brook <paul@nowt.org>
5184
5185 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
5186 builtin-types.def.
5187
5188 2003-03-02 Paul Brook <paul@nowt.org>
5189
5190 * options.c (g95_init_options): Drfault to 1.
5191 (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
5192 * trans-array.c (g95_conv_array_data, g95_conv_array_base,
5193 g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
5194 Handle non-constant size automatic arrays.
5195 (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
5196 generic bound functions.
5197 (g95_trans_auto_array_allocation): Don't create a descriptor.
5198 (g95_trans_assumed_size): New function (broken).
5199 (g95_trans_dummy_array_bias): Remove unused var.
5200 * trans-array.h (g95_trans_assumed_size): Declare.
5201 * trans-decl.c (create_index_var): New fuction.
5202 (g95_build_qualified_array): New function.
5203 (g95_get_symbol_decl): Use it.
5204 (g95_trans_deferred_vars): Handle assumed shape seperately.
5205 * trans-types.c (get_element_type): Handle heap allocated arrays.
5206 (g95_is_nodesc_array): Include non-const size arrays.
5207 (g95_get_nodesc_array_type): Ditto.
5208
5209 2003-02-23 Paul Brook <paul@nowt.org>
5210
5211 * trans-array.c (g95_array_init_size): Should use stride, not size of
5212 last dimension.
5213
5214 2003-02-18 Paul Brook <paul@nowt.org>
5215
5216 * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
5217 after intrinsic function check.
5218
5219 2003-02-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5220
5221 * io.c (match_io): Fix missing return value and remove useless
5222 assignment.
5223 * match.c (g95_match): Remove useless assignment.
5224 * module.c (parse_string): Remove useless post increment.
5225 * simplify.c (g95_simplify_verify): Remove useless assignment.
5226
5227 2003-02-15 Paul Brook <paul@nowt.org>
5228
5229 * expr.c (restricted_intrinsic): Handle bad values gracefully.
5230 * g95.h (symbol_attribute): Add referenced member.
5231 (g95_symbol): Add dummy_order member.
5232 (g95_set_sym_referenced): Declare.
5233 * match.c (g95_match_assignment, g95_match_call): Use it
5234 * primary.c (match_actual_arg, g95_match_rvalue,
5235 g95_match_variable): Ditto.
5236 * symbol.c (next_dummy_order): New variable.
5237 (g95_set_sym_referenced): New function.
5238 (check_done): New function.
5239 (g95_add_*): Use it.
5240 * trans-decl.c: Make formatting conform to GCC standards.
5241 (g95_defer_symbol_init): Add dummy variables in the right order.
5242 (g95_get_symbol_decl): Only accept referenced variables.
5243 (g95_create_module_variable): Module variables are always required.
5244 (generatr_local_decls): New function.
5245 (generate_local_vars): New function.
5246 (g95_generate_function_code): Use it.
5247
5248 2003-02-13 Paul Brook <paul@nowt.org>
5249
5250 * trans-decl.c (g95_conv_struct_cons): Remove.
5251 (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
5252 * trans-expr.c (g95_conv_structure): New function.
5253 (g95_conv_expr): Use it.
5254
5255 2003-02-09 Paul Brook <paul@nowt.org>
5256
5257 * trans-array.c (g95_array_init_size): Don't evaluate the linit
5258 expressions multiple times.
5259 (g95_trans_auto_arry_allocation): Use pointer not tmp.
5260
5261 2003-02-08 Paul Brook <paul@nowt.org>
5262
5263 * module.c (mio_symtree_ref): Declare as static.
5264 (mio_expr): Remove dead code.
5265 (read_module): Set the symtree link for fixups.
5266 * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
5267 (build_round_expr): ... to this.
5268 (g95_conv_intrinsic_aint): New function.
5269 (g95_conv_intrinsic_function): Use it.
5270
5271 2003-02-08 Paul Brook <paul@nowt.org>
5272
5273 * trans-array.c (g95_trans_array_constructor_value): Use the acutal
5274 offset after modificaton, not the increment expression.
5275 * dependency.c: Kill excess whitespace.
5276
5277 2003-02-07 Sanjiv Gupta <sanjivg@noida.hcltech.com>
5278
5279 * dependency.h: Remove some function declarations.
5280 * dependency.c (get_no_of_elements): Change this function not to
5281 return int.
5282 * other: Add comments for all modified functions.
5283
5284 2003-02-06 Paul Brook <paul@nowt.org>
5285
5286 * g95spec.c (lang_specific_functions): Fix initializer warning.
5287 * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
5288 for structure type names.
5289 * trans-decl.c (g95_cons_structure_cons): New function.
5290 (g95_get_symbol_decl): Use it.
5291 * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
5292 referencing code.
5293
5294 2003-02-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5295
5296 * resolve.c (compare_cases): Add const to casts.
5297
5298 2003-01-30 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5299
5300 * g95.h (g95_check_f): Change a1 to f1m.
5301 * intrinsic.c (add_sym_1m, check_specific,
5302 g95_intrinsic_func_interface): Use it.
5303
5304 * module.c (init_pi_tree): Remove useless cast.
5305 (fp2): Fix argument type.
5306
5307 * parse.c (parse_select_block): Add comment.
5308
5309 2003-02-05 Toon Moene <toon@moene.indiv.nluug.nl>
5310
5311 * lang-options.h: Fix warning involving C90 concatenated
5312 strings.
5313
5314 2003-02-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
5315 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5316
5317 * io.c (format_asterisk): Complete initializer to kill warning.
5318 * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
5319 DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
5320 (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
5321 new defines to complete initializers. Kills all warnings.
5322
5323 * Make-lang.in: Comment cleanup.
5324
5325 2003-02-05 Paul Brook <paul@nowt.org>
5326
5327 * array.c (g95_free_constructor): Handle NULL expressions.
5328 * resolve.c (resolve_structure_cons): Ditto.
5329 * decl.c (g95_match_null): New Function.
5330 (variable_decl): Use it.
5331 * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
5332 * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
5333 * trans-types.c (g95_set_decl_attributes): Remove empty function.
5334
5335 2003-02-05 Paul Brook <paul@nowt.org>
5336
5337 * trans.h (build1_v): New macro.
5338 (build_v): Remove pointless and incorrect prototype.
5339 * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
5340 * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
5341
5342 2003-02-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
5343
5344 * Make-lang.in (F95_OBJS): Remove one more dead file.
5345
5346 2003-02-01 Paul Brook <paul@nowt.org>
5347
5348 * lang-specs.h: Don't pass -ffixed-form to the linker.
5349 * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
5350
5351 2003-02-01 Paul Brook <paul@nowt.org>
5352
5353 * Make-lang.in (F95_OBJS): Remove dead files.
5354 * trans-array.c (g95_array_init_size): Do the right thing when
5355 ubound=NULL.
5356 * trans-decl.c (g95_generate_function_code): Initialize deffered
5357 symbol list before translating contained subroutines.
5358 * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
5359 scalar invariant values here...
5360 (g95_conv_variable, g95_conv_function_call): ... instead of here ...
5361 * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
5362
5363 2003-01-29 Paul Brook <paul@nowt.org>
5364
5365 * trans-array.c (g95_add_loop_code): Put pre code in the right block.
5366 (g95_walk_elemental_function_args): Reverse chains before adding.
5367 (g95_reverse_ss): Move about a bit.
5368 * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
5369 function arguments.
5370
5371 2003-01-28 Paul Brook <paul@nowt.org>
5372
5373 * intrinsic.c (resolve_intrinsic): Use correct union member.
5374 * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
5375 parameters.
5376 * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
5377 use associated variables.
5378 * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
5379 * trans-expr.c (g95_conv_expr_present): ... to here.
5380 * trans.h: Declare it.
5381 * trans-types.c (g95_sym_type): Assume subroutine if not specified.
5382
5383 2003-01-28 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5384
5385 * array.c (expand_iterator): Suppress useless assignment.
5386 * decl.c (match_char_spec): Ditto.
5387 * io.c (match_io_iterator): Ditto.
5388 * primary.c (match_real_constant): Ditto.
5389 * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
5390 Ditto. Also, use g95_intrinsic_op not int for intrinsic operators.
5391 * matchexp.c (match_add_operand, match_level_5): Likewise.
5392 * module.c (parse_atom, find_enum): Likewise.
5393 * resolve.c: move #include <string.h>
5394 (resolve_select): Fix serious typo.
5395
5396 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.n>
5397
5398 * Make-lang.in: Don't build with broken tree-ssa-pre.
5399
5400 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.nl>
5401
5402 * resolve.c (resolve_index): Add a TODO.
5403 * symbol.c: Remove useless "#include <ctype.h>".
5404
5405 2003-01-27 Paul Brook <paul@nowt.org>
5406
5407 * check.c (check_rest): Allow different type kinds as an extension.
5408 * g95.h (g95_resolve_f): Add f1m.
5409 * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
5410 * intrinsic.h: Chenge prototypes for MIN and MAX.
5411 * iresolve.c (g95_resolve_minmax): New function.
5412 (g95_resolve_min, g95_resolve_max): Use it.
5413 * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
5414 arguments once.
5415 (g95_conv_intrinsic_present): Fix logic.
5416
5417 2003-01-27 Steven Bossche <s.bosscher@student.tudelft.nl>
5418
5419 * g95.h (g95_case): Don't be a tree, be a double linked list.
5420 * match.c (match_case_selector): Remove redundant semantics check.
5421 Clean up a few goto's to make it a tiny little bit faster.
5422 * resolve.c (case_tree): Die.
5423 (compare_cases): Accept and compare unbounded cases too.
5424 (check_case_overlap): Don't build a tree. Instead, merge-sort the
5425 whole list of g95_cases passed from resolve_select.
5426 (sane_logical_select): Die.
5427 (check_case_expr): Return FAILURE if a CASE label is of the wrong
5428 type kind.
5429 (resolve_select): Fixup case expression for computed GOTOs, put it
5430 in expr, not expr2, for easier handing in the parse tree dumper and
5431 the code generator. Rewrite the rest of the function: Kill
5432 unreachable case labels and unreachable case blocks.
5433 * dump-parse-tree.c (g95_show_code_node): Always dump expr for
5434 an EXEC_SELECT, not case2 anymore.
5435 * trans-const.c (g95_conv_constant_to_tree): New function.
5436 (g95_conv_constant): Use it.
5437 * trans-const.h: Declare prototype for the new function.
5438 * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
5439 g95_trans_character_select): New static functions.
5440 (g95_trans_select): Rewrite.
5441
5442 2003-01-26 Paul Brook <paul@nowt.org>
5443
5444 * intrinsic.c (add_fnctions): Properly add dreal.
5445 * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
5446 (g95_conv_intrinsic_function): Use it.
5447 * trans-io.c (build_dt): Abort on internal files (unimplemented).
5448
5449 2003-01-26 Paul Brook <paul@nowt.org>
5450
5451 Widespread changes to the handling of symbols in expressions. These
5452 are now linked via g95_symtree nodes.
5453 * parse.c (g95_fixup_sibling symbols): New function.
5454 (parse_contained): Use it.
5455 * g95.h (symbol_attribute): Add contained. Indicates a symbol is a
5456 contained procedure that has bee correctly fixed up.
5457 (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
5458
5459 2003-01-24 Paul Brook <paul@nowt.org>
5460
5461 * trans-array.c (g95_walk_expr): Function result attributes are in
5462 sym->result.
5463 * trans-expr.c (g95_conv_function_call,
5464 g95_trans_arrayfunc_assign): Ditto.
5465 * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
5466
5467 2003-01-23 Steven Bosscher <s.bosscher@student.tudelft.nl>
5468
5469 * expr.c (check_restricted): Fix error message.
5470 * symbol.c (free_st_labels): Plug memleak.
5471
5472 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
5473
5474 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
5475 reduce_binary_aa, reduce_binary, eval_intrinsic,
5476 eval_intrinsic_f2): Use typesafe prototypes for eval functions.
5477 * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
5478 for typesafe intrinsics helper functions.
5479 (g95_intrinsic_sym): Use them.
5480 * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
5481 add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
5482 add_sym_5, add_conv, resolve_intrinsic, do_simplify,
5483 check_specific, g95_intrinsic_func_interface,
5484 g95_intrinsic_sub_interface): Adjust all calls to intrinsics
5485 helper functions.
5486 * trans-decl.c (g95_get_extern_function_decl): Likewise.
5487 * Make-lang.in: Don't disable warnings for strict prototypes
5488 any longer, everything is typesafe now.
5489
5490 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
5491
5492 * bbt.c (duplicate_node): Make static.
5493 * module.c (module_name): Make static.
5494 * scanner.c (include_dirs): Make static.
5495
5496 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
5497
5498 Hard coded _gfor_'s should not show up anymore.
5499 * g95.h (PREFIX): New macro.
5500 * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
5501 hard-coded "_gfor".
5502 (g95_resolve_random_number): Likewise.
5503 * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
5504 * trans-io.c: Remove 'prefix' macro. Replace all uses with
5505 the new PREFIX macro from g95.h.
5506
5507 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
5508
5509 The troubles of forking... Andy implemented this just now too.
5510 Let's stick to that and keep the trees close.
5511 * g95.h (g95_st_label): 'format' member is now a g95_expr.
5512 * io.c: Revert previous changes.
5513 (g95_match_format): Match the format string as a character
5514 literal expression.
5515 * match.h (g95_statement_label): Declare external.
5516 * parse.c: Revert previous changes.
5517 * symbol.c (g95_free_st_label): Free a g95_expr instead
5518 if a 'char *'.
5519 * trans-io.c: Revert previous changes.
5520 (build_dt): Use set_string to set the format string.
5521
5522 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
5523
5524 * io.c (format_string): Make non-static.
5525 (g95_match_format): Remember the format string.
5526 (terminate_io): Add I/O termination for empty I/O lists.
5527 * match.h: Declare external format_string.
5528 * parse.c (check_statement_label): Attack the format string
5529 to a format label for FORMAT statements.
5530 * trans-io.c (g95_add_field): Define prefix macro. Replace
5531 all uses of PREFIX define with a use of this macro.
5532 (build_dt): Implement formatted I/O for format labels.
5533
5534 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
5535
5536 * lang-options.h: Kill "-std=F".
5537 * options.c: Remove unimplemented "-std=F". Modify
5538 web address.
5539 * misc.c (g95_terminal_width): New function.
5540 * error.c (g95_error_init_1): Use g95_terminal_width.
5541 * g95.h: Add prototype for g95_terminal_width, remove
5542 fmode flag.
5543
5544 2003-01-19 Steven Bosscher <s.bosscher@student.tudelft.nl>
5545
5546 * Make-lang.in: Fix typo.
5547
5548 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
5549
5550 * g95.h (struct g95_case): Remove unused cruft, new member
5551 'where' to keep track of the locus of the default case.
5552 * match.c (g95_match_case): Add locus to the current case.
5553 (match_case_selector): Likewise.
5554 * parse.c (parse_select_block): Move semantics check for
5555 multiple DEFAULT cases out of here to...
5556 * resolve.c (check_case_overlap): ...here. Return sooner
5557 when possible.
5558 (check_case_expr): Take two g95_cases now, use to sure the
5559 expression kinds are the same.
5560 (resolve_select): Cleanup.
5561
5562 2003-01-18 Paul Brook <paul@nowt.org>
5563
5564 * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
5565 * trans-decl.c (g95_set_symbol_decl): Handle non-array result
5566 variables.
5567 (g95_get_extern_function_decl): Put decls in the correct context.
5568
5569 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
5570
5571 * trans-io.c: Port changes from Andy to set ERR flag.
5572
5573 2003-01-17 Paul Brook <paul@nowt.org>
5574
5575 * trans-array.c: Add various comments.
5576 (g95_ss_terminator): Declare as const.
5577 (g95_walk_expr): Remove first parameter and update all callers.
5578 (g95_walk_op_expr): Initialize scalar SS properly.
5579 * trans-array.h (g95_walk_expr): Update prototype.
5580 * trans-expr.c: Update for new g95_walk_expr.
5581 * trans-intrinsic.c: Ditto.
5582 * trans-io.c: Ditto.
5583 * trans.h: Various comments for SS chains.
5584
5585 2003-01-17 Paul Brook <paul@nowt.org>
5586
5587 * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
5588 and RRSPACING.
5589 * intrinsic.c (add_functions): Use them.
5590 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
5591 * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
5592
5593 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
5594
5595 Fallout of a small merge conflict:
5596 * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
5597
5598 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
5599
5600 * initrinsic.c: New add_sym_* functions for strong typing.
5601 (add_conv): Make prototype strict.
5602 * dump-parse-tree.c, dependency.c: Include config.h
5603 * resolve.c, trans-io.c: Fix typos.
5604
5605 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
5606
5607 * dump-parse-tree.c (g95_show_code_node): Show the
5608 condition for a computed GOTO that was transformed
5609 to a SELECT CASE construct.
5610 * resolve.c (check_case_overlap): Revert previous switch
5611 to treaps, it was too slow and didn't catch all trouble.
5612 (resolve_symbol): Be more flexible about module procedures.
5613 * symbol.c (check_conflict): Point to relevant section in
5614 the standard for dubious conflict. Allow procedure
5615 dummy arguments to be optional again.
5616 * trans-io (add_field): Rename to g95_add_field. Change
5617 all callers.
5618 * trans-stmt (trans_select): Handle unbounded cases for
5619 integer SELECT CASE constructs. Fix/add more comment.
5620
5621 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
5622
5623 * g95.h: Uses GCC's function attribute macros.
5624 * error.c, module.c, parse.c, g95.h: More function attributes.
5625
5626 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
5627 Forgot a file...
5628 * trans-decl.c (get_label_decl): Use TREE_LINENO instead
5629 of DECL_SOURCE_LINE, and TREE_FILENAME instead of
5630 DECL_SOURCE_FILE.
5631
5632 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
5633
5634 * f95-lang.c (pushdecl): Use TREE_LINENO instead of
5635 DECL_SOURCE_LINE.
5636 * trans.c (g95_trans_code): Use annotate_all_with_file_line
5637 instead of nowdead wrap_all_with_wfl.
5638
5639 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
5640
5641 * parse.c (g95_parse_file): In verbose mode, dump the parse tree
5642 before generating code, so we can still see it even if the code
5643 generation phase dies.
5644
5645 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
5646
5647 * decl.c (build_sym): Split out initialization expression parts...
5648 (add_init_expr_to_sym): ...to here.
5649 (variable_decl): Add the symbol following an attribute list to the
5650 symbol tree before parsing the optional initialization expression
5651 if the symbol is not of a derived type.
5652 * primary.c (g95_match_rvalue): Don't assume a symbol always has
5653 a value if it is a PARAMETER.
5654
5655 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
5656
5657 * misc.c: Don't #include <mcheck.h>
5658 * module.c: Ditto. Kill uses of mtrace, muntrace. If there
5659 ever was a glibc bug, then either this was never reported to
5660 glibc people, or it has been fixed for so long that there's
5661 no information you can find about it, anywhere.
5662
5663 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
5664
5665 Fix warnings:
5666 * module.c (attr_bits, bt_types, array_spec_types):
5667 Switch 'const' and 'static'.
5668 * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
5669
5670 GNU'ify source code:
5671 * trans-io.c: Numerous fixes, one fixed warning and a few
5672 TODO markers so that we don't forget about them.
5673
5674 2003-01-13 Paul Brook <paul@nowt.org>
5675
5676 * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
5677 * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
5678 Add G95_ISYM_SCALE.
5679 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
5680 * match.c (g95_match_stop): Fix dumb == -> != error.
5681
5682 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
5683
5684 * dump-parse-tree.c (show_indent): Add line breaks. This
5685 whole dumping process needs cleanups.
5686 * f95-lang.c (g95_mark_addressable): Fix prototype to match
5687 the langhook. Fix 'return's accordingly.
5688 * g95-support.h: Adjust prototype.
5689 * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
5690 * lang-options.h: Add '-fsyntax-only'.
5691 * options.c (g95_init_options): Init 'no_backend'.
5692 (g95_parse_arg): Deal with '-fsyntax-only'.
5693 * parse.c (g95_parse_file): Do not generate code if 'no_backend'
5694 is set.
5695
5696 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
5697 Patch from Arnaud
5698 * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
5699 arguments. Also make sure that if a symbol is marked INTRINSIC,
5700 an intrinsic with the symbol's name actually exists.
5701 (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
5702 Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
5703 ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
5704
5705 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
5706
5707 * resolve.c (resolve_contained_functions): Fix condition, don't
5708 throw internal_error if a child namespace has no name. Apparently
5709 this can be the case?
5710
5711 2003-01-11 Paul Brook <paul@nowt.org>
5712
5713 Port changes from Andy's tree:
5714 * g95.h (g95_code): Add stop_code.
5715 * match.c (g95_match_stop): Detter syntax checking.
5716 * resolve.c (resolve_generic_f0): Return match type.
5717 (resolve_generic_f): Remove dead/duplicated code.
5718 (resolve_specific_f): Ditto.
5719 * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
5720 * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
5721 * trans-stmt.c (g95_trans_stop): Handle new STOP format.
5722
5723 2003-01-11 Paul Brook <paul@nowt.org>
5724
5725 * trans-array.c: Various documentation/comment changes.
5726 * trans-stmt.c: Ditto.
5727
5728
5729 2003-01-10 Paul Brook <paul@nowt.org>
5730
5731 * options.c/h: Add -fdump-parse-tree as alias of -v.
5732
5733 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
5734
5735 * dump-parse-tree.c (g95_show_namespace): Fixed another
5736 typo. Sorry, it's Friday...
5737
5738 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
5739
5740 Spotted by Tobi:
5741 * trans-array.c, trans-array.h, trans.c, trans-const.c,
5742 trans-const.h, trans-decl.c, trans-expr.c, trans.h
5743 trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
5744 trans-types.c: Fix bogus copyright years, add 2003.
5745 * trans-types.h: Give copyright header.
5746
5747 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
5748
5749 * dump-parse-tree.c (g95_show_namespace): Fixed typo.
5750 * expr.c, options.c, scanner.c: Add some more 'const' markers.
5751 * intrinsic.c: Some constant strings moved to read-only memory.
5752 * io.c (format_asterisk): Move to...
5753 * g95.h: ...here.
5754
5755 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
5756
5757 * dump-parse-tree.c (g95_show_namespace): Dump implicit
5758 types for ranges instead of per-letter. Indent the
5759 'CONTAINS' just like everything else.
5760 * resolve.c (resolve_contained_functions): Clarify comment.
5761 Explain non-obvious conditional expression. Improve
5762 diagnostics if tyoe cannot be resolved.
5763 Port semi-fix from Andy's tree:
5764 (was_declared): Move up before first use.
5765 (generic_sym, specific_sym): New functions. Code moved
5766 out if procedure_kind.
5767 (procedure_kind): Simplify using new functions.
5768 (resolve_generic_f): Make sure the functions we find in
5769 a parent namespace is generic.
5770 (resolve_specific_f): Ditto for specific functions.
5771
5772 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
5773
5774 * trans-stmt.c, trans.c: Fix some code style issues. Add
5775 some more comment (but still not enough!).
5776
5777 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
5778
5779 * symbol.c (flavors, procedures, intents, acces_types,
5780 access_types, ifsrc_types): Make const.
5781 * misc.c (g95_string2code): Make 'm' param 'const'.
5782 * module.c (find_enum, write_atom, mio_name): Make
5783 'm' param 'const'.
5784 (attr_bits, bt_types, array_spec_types, array_ref_types,
5785 ref_types, expr_types): Make const.
5786 * g95.h: Adjust external decls.
5787
5788 2003-01-09 Paul Brook <paul@nowt.org>
5789
5790 * Testsuite: Add a load of new cases.
5791
5792 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
5793
5794 * Make-file.in: Add dependency on back end header files;
5795 a parallel build should work now.
5796 * f95-lang-c (lang_identifier): Remove bogus comment.
5797 (g95_be_parse_file): Fix prototype.
5798 (g95_init): Make static.
5799 (g95_finish): Make static.
5800 * error.c (g95_syntax_error): Kill. Make define in...
5801 * g95.h (g95_syntax_error): Define.
5802 (g95.options): Make 'source' member 'const'.
5803 * interface.c (g95_match_interface): Explain
5804 hard-to-read condition.
5805 (g95_match_end_interface): Ditto.
5806 * trans_const.c (g95_build_string_const): Make 's' parameter
5807 'const'.
5808 * trans_const.h: Adjust protoype accordingly.
5809 * trans-decl.c: Include tree-dump.h
5810 (g95_generate_function_code): Build fixes for recent changes
5811 in the tree-ssa branch.
5812
5813 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
5814
5815 * format.c: Kill, move code from here...
5816 * io.c: ...to here.
5817 * Make-lang.in: Adjust.
5818 * MANIFEST: Ditto.
5819 * match.h: Ditto.
5820 * BUGS: Mention where to submit bugs. Move old content...
5821 * TODO: ...to here. New file.
5822
5823 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
5824 Fix most warnings, and suppress the ones we can't fix for now.
5825 * Make-lang.in: Suppress warnings about bad proto's in g95.h,
5826 these warnings just clutter the screen and there's not much
5827 we can do about them for now anyway.
5828 * check.c, iresolve.c: Mark unused function parameters.
5829 * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
5830 they should be resolved before they get here.
5831 * error.c: Remove unused FILE *status_out.
5832 * f95-lang.c (g95_init): Remove bogus cast.
5833 * Many files: Make things 'const' where required.
5834 * g95.h: Fix prototypes for all modified functions above.
5835 (g95_options): Remove 'object' member.
5836
5837 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
5838
5839 * Make-file.in: Cleanup bogus targets. Add more comment.
5840 * lang-options.h: New option '-w'.
5841 * g95.h: add no_options field to struct g95_options.
5842 * options.c (g95_init_options): Default no_warnings to off.
5843 (g95_parse_arg): Recognise the '-w' switch and its alias,
5844 '-fno-warnings'.
5845 * error.c (g95_warning, g95_warning_now): Don't emit warning if
5846 no_warning option is set.
5847 * iresolve.c (g95_resolve_shape): Fix warning.
5848
5849 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
5850
5851 * primary.c (g95_next_string_char): Rename next_string_char, and
5852 make static. Adjust callers accordingly.
5853 * resolve.c (resolve_generic_f0): Return try, not match. Adjust
5854 callers accordingly.
5855 * g95.h: Split out all g95_match* functions to...
5856 * match.h: ...here. New file.
5857 * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
5858 matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
5859
5860 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
5861
5862 * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
5863 g95_merge_new_implicit): New functions.
5864 (g95_match_implicit_none, g95_match_implicit): Move from here...
5865 * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
5866 Modify to use the new functions in symbol.c.
5867 * g95.h: Add and move prototypes.
5868
5869 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
5870
5871 * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
5872 node compare function.
5873 (g95_insert_bbt): Likewise.
5874 (g95_insert_bbt_with_overlap): Likewise.
5875 (g95_delete_bbt): Likewise.
5876 (delete_treap): Likewise. Also fix a potential bug when calling it.
5877 * module.c (compare_pointers): Change proto to compare_fn.
5878 (compare_integers): Likewise.
5879 (compare_true_names): Likewise.
5880 (find_true_name): Adjust call to compare_true_names to match proto.
5881 (require_atom, write_atom, mio_name): Fix 'const' warnings.
5882 (init_pi_tree): Make compare a compare_fn instead of (int *).
5883 * resolve.c (compare_cases): Change proto to compare_fn.
5884 * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
5885 it static, and rename to compare_symtree.
5886 (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
5887 function.
5888 * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
5889 of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
5890
5891 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
5892 * Make-lang.in: Fix spaces/tabs issues from previous patch.
5893 * patch.options: Blow away Paul's checkin mistake :-)
5894 * io.c (terminate_io): Fix memory leak (Arnaud).
5895
5896 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
5897
5898 * Make-lang.in: Teach about building DVI, info manual.
5899 * g95.texi: New file.
5900
5901 2003-01-02 Paul Brook <paul@nowt.org>
5902
5903 * trans-array.c (g95_reverse_ss): Make static and don't use.
5904 (g95_conv_ss_descriptor): Don't use g95_loopinfo
5905 (g95_conv_array_parameters): Modify for pointer assignments.
5906 (g95_walk_subexpr): New function.
5907 (g95_walk_expr*): Use it.
5908 * trans-array.h (g95_reverse_ss): Remove prototype.
5909 * trans-expr.c (g95_trans_pointer_assign): Implement.
5910 (Many): Set se.want_pointer before calling g95_conv_array_parameter.
5911 * trans-intrinsic.c: Sync with scalarizer changes.
5912 * trans-io.c: Ditto.
5913
5914 2002-12-29 Paul Brook <paul@nowt.org>
5915
5916 * trans-array.c: Document calling convention for arrays.
5917
5918 2002-12-19 Paul Brook <paul@nowt.org>
5919
5920 * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
5921 assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
5922 optional parameters for some intrinsics.
5923 (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
5924 * trans-expr.c (g95_conv_function_call): Pass NULL for absent
5925 optional parameters.
5926 * trans.h (g95_se): Add ignore_optional flag.
5927
5928 2002-12-15 Paul Brook <paul@nowt.org>
5929
5930 * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
5931 * trans-decl.c (g95_generate_function_code): Use TDI_original.
5932
5933 2002-12-14 Paul Brook <paul@nowt.org>
5934
5935 * trans-stmt.c (g95_trans_call): Use resolved symbol name.
5936
5937 2002-12-12 Paul Brook <paul@nowt.org>
5938
5939 * trans-array.c (g95_trans_array_constructor_subarray): Fully
5940 initialize the scalarizer.
5941 (various): Update to new format of g95_expr->value.constructor.
5942
5943 2002-12-08 Paul Brook <paul@nowt.org>
5944
5945 * trans-array.c (g95_put_offset_into_var): New function.
5946 (g95_trans_array_constructor_subarray): New function.
5947 (g95_trans_array_constructor_value): Use it.
5948 (g95_array_cons_size): Don't abort() on array components.
5949
5950 2002-12-08 Paul Brook <paul@nowt.org>
5951
5952 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
5953 * support.c: Update #includes.
5954 (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
5955 * trans-array.c: Update #includes.
5956 * trans.c: Ditto.
5957 * trans-const.c: Ditto.
5958 * trans-io.c: Ditto.
5959 * trans-types.c: Ditto.
5960 (g95_init_types): Set size_type_node.
5961 * trans-decl.c: Update #includes.
5962 (gfor_fndecl_adjust{l,r}): Declare and initialize.
5963 * trans-stmt.c: Update #includes.
5964 (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
5965 (g95_trans_select): Fix check for unbounded ranges.
5966 * trans-expr.c: Update #includes.
5967 (g95_conv_string_tmp): New function.
5968 (g95_conv_concat_op): Use it.
5969 * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
5970 * Trans-intrisic.c: Update #includes.
5971 (g95_conv_intrinsic_strcmp): New function.
5972 (g95_conv_intrinsic_adjust): Ditto.
5973 (g95_conv_intrinsic_function: Use them.
5974
5975 2002-11-30 Paul Brook <paul@nowt.org>
5976
5977 * trans-array.c (g95_walk_function_expr): Handle non-array return by
5978 reference.
5979 * trans-dec.c (g95_build_function_decl): Handle character return
5980 parammeters.
5981 (g95_get_fake_result_decl): Ditto.
5982 (g95_trans_deferred_vars): Ditto.
5983 * trans-expr.c (g95_conv_function_call): Ditto.
5984 (g95_trans_arrayfunc_assign) Limit to array valued functions.
5985 * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
5986 (g95_conv_intrinsic_function): Use it.
5987 * trans-types.c (g95_sym_type): Handle functions returning strings.
5988 (g95_return_by_reference): Ditto.
5989 (g95_get_function_type): Ditto.
5990
5991 2002-11-18 Paul Brook <paul@nowt.org>
5992
5993 * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
5994 requires a temporary.
5995 (g95_trans_select): Handle computed gotos.
5996 * trans-types.c (g95_build_array_type): Warn about non-functional
5997 assumed shape arrays.
5998 * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
5999 blocks.
6000 * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
6001 (g95_conv_intrinsic_int): New function.
6002 (g95_conv_intrinsic_mod): New function.
6003 (g95_conv_intrinsic_ichar): New function.
6004 (g95_conv_intrinsic_function): Use them.
6005 (g95_conv_intrinsic_dim): Use g95_evaluate_now.
6006
6007 2002-11-17 Toon Moene <toon@moene.indiv.nluug.nl>
6008
6009 * trans-types.c (g95_build_array_type): Assumed
6010 sized arrays can have rank > 1.
6011 * trans.c (g95_trans_code): Remove erroneous
6012 warning about CONTINUE.
6013 * trans-expr.c (g95_conv_variable): Remove
6014 erroneous assert.
6015
6016 2002-11-15 Paul Brook <paul@nowt.org>
6017
6018 * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
6019
6020 2002-10-31 Paul Brook <paul@nowt.org>
6021
6022 * f95-tree.c: Remove tree copying stuff that's now in gimple.c
6023 * trans-expr.c (g95_conv_component_ref): Handle character string
6024 components.
6025 (g95_conv_string_parameter): Ditto.
6026 * trans-types.c (g95_get_derived_type): Add length decl to caracter
6027 string components.
6028
6029 2002-10-10 Paul Brook <paul@nowt.org>
6030
6031 * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
6032 * trans-expr.c (g95_conv_function_call): Remove unreliable return value
6033 check.
6034 * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
6035 (g95_conv_intrinsic_function): Handle size and shape intrinsics.
6036 (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
6037 * trans-types.c (pvoid_type_node): Declare and initialize.
6038 * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
6039 (g95_array_allocate): Fix when base==data.
6040 (g95_conv_array_parameter): Correctly handle reduced rank sections.
6041 * trans-io.c (g95_trans_write): Correctly handle string modifiers.
6042
6043 2002-10-09 Paul Brook <paul@nowt.org>
6044
6045 * (g95_conv_expr_reference): Handle character strings correctly.
6046
6047 2002-10-07 Paul Brook <paul@nowt.org>
6048
6049 (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
6050 langhook.
6051 * trans-array.c (g95_build_array_initializer): Remove.
6052 (g95_conv_array_initializer): New Function.
6053 (g95_trans_auto_arry_allocation): Cleanup.
6054 (g95_trans_init_character_array): Remove.
6055 * g95spec.c: Link in libgforbegin.
6056 * trans.c (g95_generate_code): Rename main function to MAIN__.
6057 (g95_create_var): New function.
6058 (g95_create_var_np): New function.
6059 (g95_evaluate_now): New function.
6060 (g95_start_block): New function.
6061 (g95_finish_block): New function.
6062 (g95_add_expr_to_block): New function.
6063 (g95_add_block_to_block): New function.
6064 * trans-expr.c (g95_conv_componen_ref): New function.
6065 * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
6066 (F95_OBJS): Add dependency.o.
6067 * f95-lang.c (g95_is_simple_stmt): Remove.
6068 * f95-tree.c (mark_not_simple): New function.
6069 (unshare_all_trees): New function.
6070 (create_tmp_var, create_tmp_alias_var): Remove.
6071 * support.c (declare_tmp_vars, tree_last_decl): Remove.
6072 * trans*: Convert to new IR using GENERIC trees. Don't bother about
6073 SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
6074
6075 2002-10-01 Paul Brook <paul@nowt.org>
6076
6077 * trans-array.c: Add support for descriptorless arrays.
6078 (g95_conv_array_data): New function.
6079 (g95_conv_array_base): New function.
6080 * trans-array.h: Declare these here.
6081 * trans-decl.c(g95_create_mopdule_variable): Perform variable
6082 initialization and creation here.
6083 (g95_create_module_vars): Instead of here.
6084 * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
6085 * trans-intrinsic.c: Ditto.
6086 * trans-types.c (g95_is_nodesc_array): New function.
6087 (g95_get_nodesc_array_type): New function.
6088 (g95_sym_type, g95_get_derived_type): Use them.
6089 * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
6090
6091 2002-09-28 Paul Brook <paul@nowt.org>
6092
6093 * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
6094 * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
6095 parameters.
6096
6097 2002-09-24 Paul Brook <paul@nowt.org>
6098
6099 * f95-lang.c (listify): Remove declaration.
6100 (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
6101 (listify)
6102 * f95-tree.c (get_name): New function.
6103 * trans.c (module_namespace): Remove.
6104 * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
6105 * trans-types.c: Ditto.
6106
6107 2002-09-19 Paul Brook <paul@nowt.org>
6108
6109 * trans-array.c (g95_get_array_cons_size): New Function.
6110 (g95_con_ss_startstride): Handle Array constructors.
6111 (g95_conv_loop_setup): Ditto.
6112 (g95_conv_array_parameter): Ditto.
6113 * tras-decl.c (g95_finish_var_decl): Make initializes variables
6114 static.
6115
6116 2002-09-19 Paul Brook <paul@nowt.org>
6117
6118 * trans.c (g95_simple_fold_tmp): Detect variables inside
6119 NON_LVALUE_EXPR.
6120 * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
6121
6122 2002-09-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
6123
6124 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
6125
6126 2002-09-14 Paul Brook <paul@nowt.org>
6127
6128 * trans.c (g95_create_module_variable): Move to trans-decl.c.
6129 * trans-const.c (g95_conv_string_init): New Function.
6130 * trans-const.h: Declare it.
6131 * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
6132 variables. Don't bail on intrinsic symbols.
6133 (get_extern_function_decl): Handle specific intrinsic functions.
6134 * trans-types.c (g95_sym_type): Dummy functions don't return
6135 reference types.
6136 * trans-array.c (g95_build_array_initializer): New Function.
6137 (g95_trans_auto_array_allocation): Build initializer for static decls.
6138 Don't use mpz_addmul, it's GMP4 only.
6139
6140 2002-09-12 Paul Brook <paul@nowt.org>
6141
6142 * trans-decl.c (g95_generate_code): Fix thinko with return variable.
6143 (g95_get_extern_function_decl, g95_build_function_decl): Mangle
6144 assembler names for module procedures.
6145
6146 2002-09-11 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
6147
6148 * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
6149 dependency/
6150
6151 2002-09-10 Paul Brook <paul@nowt.org>
6152
6153 * trans-array.c: Change format of G95_SS_TEMP strictures.
6154 (g95_check_fncall_dependancy): New function.
6155 (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
6156 offsets.
6157 * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
6158 result variables.
6159 (g95_build_function_decl): Don't assume result arrays are packed.
6160 (g95_trans-deferred-vars): Handle array result variables.
6161 (g95_generate_fuction_code): Clear saved_function_decls.
6162 * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
6163 reference.
6164 (g95_trans_arrayfunc_assign): New function.
6165 (g95_trans_assignment): Use it.
6166 * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
6167 (g95_se): Add direct_byref.
6168 * trans-types.c: Use sym->result rather than sym where appropriate.
6169 * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
6170 Update other functions to use this.
6171 (g95_is_intrinsic_libcall): New function.
6172 (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
6173 (g95_walk_intrinsic_function): Ditto.
6174
6175 2002-09-08 Paul Brook <paul@nowt.org>
6176
6177 * trans-types.c: Change rank field to dtype field in array descriptor.
6178 * trans-array.c: Implement filling of dtype array descriptor field.
6179 * trans-intrinsic.c: Fix broken LEN intrinsic.
6180
6181 2002-09-07 Paul Brook <paul@nowt.org>
6182
6183 * trans-intrinsic.c: Remove outdated todo intrinsic list.
6184 (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
6185 (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
6186
6187 2002-09-06 Paul Brook <paul@nowt.org>
6188
6189 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
6190 (gt-f95-trans-types.h): Add dependancy information.
6191 * config-lang.in (gtfiles): Add trans-types.c
6192 * f95-lang.c (g95_be_parse_file): Pass error and warning counts
6193 back to top-level code.
6194 * trans-array.c, trans-types.c: Change format of array descriptor.
6195 (g95_conv_descriptor_dimension): New function.
6196 * trans-types.h (g95_conv_descriptor_rank): define.
6197 * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
6198 intrinsics.
6199
6200 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
6201
6202 * trans-array.c, trans-types.c: Add rank information to descriptor.
6203
6204 2002-09-06 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
6205
6206 * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
6207
6208 2002-09-04 Paul Brook <paul@nowt.org>
6209
6210 * f95-lang.c (g95_create_decls): New function.
6211 (g95_init): Move initialization of external decls to above, and call
6212 from g95_be_parse_file.
6213 * trans.c (g95_finish_stmt): Don't amputate the decl chain.
6214 * trans-types.c (g95_init_types): Always name integer and char types.
6215 (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
6216
6217 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
6218
6219 * Make-lang.in: Add options.c to F95_PARSER_OBJS
6220
6221 2002-09-02 Paul Brook <paul@nowt.org>
6222
6223 * g95_generate_code: Clear the attr for __fortran_main.
6224 * trans-types.c (g95_finish_type): New function.
6225 * g95_init_io_state_type: Use g95_finish_type.
6226 * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
6227
6228 2002-09-01 Paul Brook <paul@nowt.org>
6229
6230 * README.backend: Warn about the dangers of extra config.h files.
6231 Remove obsolete libgfor stuff.
6232 * config-lang.in: Add target-libgfor dependancy.
6233 * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
6234
6235 2002-09-01 Toon Moene <toon@moene.indiv.nluug.nl>
6236
6237 * g95_conv_mpz_to_tree: Free storage pointed to by q,
6238 not by buff.
6239
6240 2002-08-30 Paul Brook <paul@nowt.org>
6241
6242 * trans-intrinsic.c (g95_conv_intrinsic_function,
6243 g95_walk_intrinsic_function): Added ANY and ALL.
6244 (g95_conv_intrinsic_anyall): New function.
6245 * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in
6246 mangled name
This page took 0.290886 seconds and 6 git commands to generate.