1 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
3 * trans-intrinsic.c (gfc_get_symbol_for_expr): Fix comment typo,
6 2005-02-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
10 * simplify.c (gfc_simplify_bound): Rename to ...
11 (simplify_bound): ... this and overhaul.
13 2005-02-28 Steven G. Kargl <kargl@gcc.gnu.org>
15 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): remove boolean argument.
16 (gfc_conv_intrinsic_function): update function calls
18 2005-02-27 Steven G. Kargl <kargl@gcc.gnu.org>
21 * trans-types.c (gfc_max_integer_kind): Declare
22 (gfc_init_kinds): Initialize it.
23 * gfortran.h (gfc_max_integer_kind): extern it.
24 * primary.c (match_boz_constant): Use it; remove gfortran extension
25 of kind suffixes on BOZ literal constants
28 2005-02-27 Steven G. Kargl <kargls@comcast.net>
30 * arith.c (gfc_check_real_range): Remove multiple returns
31 (check_result): New function.
32 (gfc_arith_uminus,gfc_arith_plus,gfc_arith_times,
33 gfc_arith_divide,gfc_arith_power,gfc_arith_minus): Use it.
36 2005-02-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
38 * decl.c, resolve.c, trans-array.c, trans.h: Fix comment typo(s).
41 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-meunchen.de>
43 Unrevert previously reverted patch. Adding this fix:
44 * module.c (find_true_name): Deal with NULL module.
46 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
48 Revert yesterday's patch:
49 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
51 * gfortran.h (gfc_component, gfc_actual_arglist, ...
52 ... argument. Copy string instead of pointing to it.
54 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
56 * gfortran.h (gfc_get_namespace): Add second argument to prototype.
57 * intrinsic.c (gfc_intrinsic_init_1): Pass second argument to
59 * module.c (mio_namespace_ref, load_needed): Likewise.
60 * parse.c (parse_interface, parse_contained): Likewise. Here the
61 correct second argument matters.
62 * symbol.c (gfc_get_namespace): Add parent_types argument, only copy
63 parent's implicit types if this is set.
64 (gfc_symbol_init_2): Pass second argument to gfc_get_namespace.
65 * trans-common.c (build_common_decl): Likewise.
67 * gfortran.h (symbol_attribute): New 'untyped' field, fix comment
69 * symbol.c (gfc_set_default_type): Issue error only once, by setting
70 and checking 'untyped' attribute.
72 * gfortran.h (gfc_expr): Move 'operator', 'op1', 'op2', and 'uop'
73 fields into new struct 'op' inside the 'value' union.
74 * arith.c (eval_intrinsic): Adapt all users.
75 * dependency.c (gfc_check_dependency): Likewise.
76 * dump-parse-tree.c (gfc_show_expr): Likewise.
77 * expr.c (gfc_get_expr): Don't clear removed fields.
78 (free_expr0, gfc_copy_expr, gfc_type_convert_binary,
79 gfc_is_constant_expr, simplify_intrinsic_op, check_init_expr,
80 check_intrinsic_op): Adapt to new field names.
81 * interface.c (gfc_extend_expr): Likewise. Also explicitly
82 nullify 'esym' and 'isym' fields of new function call.
83 * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
84 Adapt to renamed structure fields.
85 * matchexp.c (build_node, match_level_1, match_expr): Likewise.
86 * module.c (mio_expr): Likewise.
87 * resolve.c (resolve_operator): Likewise.
88 (gfc_find_forall_index): Likewise. Only look through operands
89 if dealing with EXPR_OP
90 * trans-array.c (gfc_walk_op_expr): Adapt to renamed fields.
91 * trans-expr.c (gfc_conv_unary_op, gfc_conv_power_op,
92 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
95 * gfortran.h (gfc_component, gfc_actual_arglist, gfc_user_op): Make
96 'name' a 'const char *'.
97 (gfc_symbol): Likewise, also for 'module'.
98 (gfc_symtree): Make 'name' a 'const char *'.
99 (gfc_intrinsic_sym): Likewise, also for 'lib_name'.
100 (gfc_get_gsymbol, gfc_find_gsymbol): Add 'const' qualifier to
102 (gfc_intrinsic_symbol): Use 'gfc_get_string' instead of 'strcpy' to
103 initialize 'SYM->module'.
104 * check.c (gfc_check_minloc_maxloc, check_reduction): Check for NULL
105 pointer instead of empty string.
106 * dump-parse-tree.c (gfc_show_actual_arglist): Likewise.
107 * interface.c (gfc_compare_types): Adapt check to account for possible
109 (compare_actual_formal): Check for NULL pointer instead of empty
111 * intrinsic.c (gfc_current_intrinsic, gfc_current_intrinsic_arg):
112 Add 'const' qualifier.
113 (conv_name): Return a heap allocated string.
114 (find_conv): Add 'const' qualifier to 'target'.
115 (add_sym): Use 'gfc_get_string' instead of 'strcpy'.
116 (make_generic): Check for NULL pointer instead of empty string.
117 (make_alias): Use 'gfc_get_string' instead of 'strcpy'.
118 (add_conv): No need to strcpy result from 'conv_name'.
119 (sort_actual): Check for NULL pointer instead of empty string.
120 * intrinsic.h (gfc_current_intrinsic, gfc_current_intrinsic_arg):
122 * module.c (compare_true_names): Compare pointers instead of strings
124 (find_true_name): Initialize string fields with gfc_get_string.
125 (mio_pool_string): New function.
126 (mio_internal_string): Adapt comment.
127 (mio_component_ref, mio_component, mio_actual_arg): Use
128 'mio_pool_string' instead of 'mio_internal_string'.
129 (mio_symbol_interface): Add 'const' qualifier to string arguments.
130 Add level of indirection. Use 'mio_pool_string' instead of
131 'mio_internal_string'.
132 (load_needed, read_module): Use 'gfc_get_string' instead of 'strcpy'.
133 (write_common, write_symbol): Use 'mio_pool_string' instead of
134 'mio_internal_string'.
135 (write_symbol0, write_symbol1): Likewise, also check for NULL pointer
136 instead of empty string.
137 (write_operator, write_generic): Pass correct type variable to
138 'mio_symbol_interface'.
139 (write_symtree): Use 'mio_pool_string' instead of
140 'mio_internal_string'.
141 * primary.c (match_keyword_arg): Adapt check to possible
142 case of NULL pointer. Use 'gfc_get_string' instead of 'strcpy'.
143 * symbol.c (gfc_add_component, gfc_new_symtree, delete_symtree,
144 gfc_get_uop, gfc_new_symbol): Use 'gfc_get_string' instead of
146 (ambiguous_symbol): Check for NULL pointer instead of empty string.
147 (gfc_find_gsymbol, gfc_get_gsymbol): Add 'const' qualifier on string
149 * trans-array.c (gfc_trans_auto_array_allocation): Check for NULL
150 pointer instead of empty string.
151 * trans-decl.c (gfc_sym_mangled_identifier,
152 gfc_sym_mangled_function_id, gfc_finish_var_decl, gfc_get_symbol_decl,
153 gfc_get_symbol_decl): Likewise.
154 * trans-io.c (gfc_new_nml_name_expr): Add 'const' qualifier to
155 argument. Copy string instead of pointing to it.
157 2005-02-23 Kazu Hirata <kazu@cs.umass.edu>
159 * intrinsic.h, st.c: Update copyright.
161 2005-02-20 Steven G. Kargl <kargls@comcast.net>
163 * symbol.c: Typos in comments.
165 2005-02-20 Steven G. Kargl <kargls@comcast.net>
167 * expr.c (gfc_type_convert_binary): Typo in comment.
169 2005-02-19 Steven G. Kargl <kargls@comcast.net>
171 * check.c (gfc_check_selected_int_kind): New function.
172 * intrinsic.h: Prototype it.
173 * intrinsic.c (add_function): Use it.
174 * simplify (gfc_simplify_ceiling,gfc_simplify_floor): Change
175 BT_REAL to BT_INTEGER and use gfc_default_integer_kind.
177 2005-02-19 Steven G. Kargl <kargls@comcast.net>
179 * check.c (gfc_check_int): improve checking of optional kind
180 * simplify.c (gfc_simplify_int): Change BT_REAL to BT_INTEGER
182 2005-02-19 Steven G. Kargl <kargls@comcast.net>
184 * check.c (gfc_check_achar): New function
185 * intrinsic.h: Prototype it.
186 * intrinsic.c (add_function): Use it.
188 2005-02-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
190 * trans-stmt.c (generate_loop_for_temp_to_lhs,
191 generate_loop_for_rhs_to_temp): Remove if whose condition is
194 2005-02-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
196 * symbol.c (gfc_use_ha_derived): Remove, fold functionality into ...
197 (gfc_use_derived): ... this function.
199 2005-02-09 Richard Henderson <rth@redhat.com>
201 * f95-lang.c (gfc_init_builtin_functions): Call
202 build_common_builtin_nodes; do not define any functions handled
205 2005-02-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
207 * expr.c (gfc_copy_expr): Don't copy 'op1' and 'op2' for
209 (gfc_is_constant_expr): Check 'ref' to determine if substring
210 reference is constant.
211 (gfc_simplify_expr): Simplify 'ref' instead of 'op1' and 'op2'.
212 (check_init_expr, check_restricted): Check 'ref' instead of 'op1'
214 * module.c (mio_expr): Read / write 'ref' instead of 'op1' and 'op2'.
216 2005-02-07 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
218 * gfortran.h (gfc_add_dimension, gfc_add_result, gfc_add_save,
219 gfc_add_dummy, gfc_add_generic, gfc_add_in_common, gfc_add_data,
220 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
221 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
222 gfc_add_procedure): Add argument.
223 * array.c (gfc_set_array_spec), decl.c (var_element, get_proc_name,
224 gfc_match_null, match_type_spec, match_attr_spec,
225 gfc_match_formal_arglist, match_result, gfc_match_function_decl):
226 Update callers to match.
227 (gfc_match_entry) : Likewise, fix comment typo.
228 (gfc_match_subroutine, attr_decl1, gfc_add_dimension,
229 access_attr_decl, do_parm, gfc_match_save, gfc_match_modproc,
230 gfc_match_derived_decl): Update callers.
231 * interface.c (gfc_match_interface): Likewise.
232 * match.c (gfc_match_label, gfc_add_flavor,
233 gfc_match_call, gfc_match_common, gfc_match_block_data,
234 gfc_match_namelist, gfc_match_module, gfc_match_st_function):
236 * parse.c (parse_derived, parse_interface, parse_contained),
237 primary.c (gfc_match_rvalue, gfc_match_variable): Likewise.
238 * resolve.c (resolve_formal_arglist, resolve_entries): Update callers.
239 * symbol.c (check_conflict, check_used): Add new 'name' argument,
240 use when printing error message.
241 (gfc_add_dimension, gfc_add_result, gfc_add_save, gfc_add_dummy,
242 gfc_add_generic, gfc_add_in_common, gfc_add_data,
243 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
244 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
245 gfc_add_procedure): Add new 'name' argument. Pass along to
246 check_conflict and check_used.
247 (gfc_add_allocatable, gfc_add_external, gfc_add_intrinsic,
248 gfc_add_optional, gfc_add_pointer, gfc_add_target, gfc_add_elemental,
249 gfc_add_pure, gfc_add_recursive, gfc_add_intent,
250 gfc_add_explicit_interface, gfc_copy_attr): Pass NULL for new
251 argument in calls to any of the modified functions.
253 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
255 * gfortran.texi: Don't give last update date.
257 2006-01-30 Richard Henderson <rth@redhat.com>
259 * options.c (gfc_init_options): Zero flag_errno_math.
261 2005-01-29 Paul Brook <paul@codesourcery.com>
264 * check.c (real_or_complex_check): New function.
265 (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc): New functions.
266 * intrinsic.c (add_functions): Use new check functions.
267 * intrinsic.h (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc):
270 2005-01-29 Steven G. Kargl <kargls@comcast.net>
273 * expr.c (gfc_check_assign): Check for conformance of logical operands
275 2004-01-27 Steven Bosscher <stevenb@suse.de>
277 * trans-decl.c (gfc_build_label_decl): Set DECL_ARTIFICAL and
278 TREE_USED for all labels.
279 (gfc_trans_entry_master_switch): Use it instead of building a
281 * trans-io.c (add_case): Likewise.
282 * trans-stmt.c (gfc_trans_integer_select): Likewise.
284 2004-01-23 Paul Brook <paul@codesourcery.com>
285 Steven G. Kargl <kargls@comcast.net>
288 * arith.c (gfc_convert_real): Remove sign handling.
289 * primary.c (match_digits): Allow whitespace after initial sign.
290 (match_real_const): Handle signs here. Allow whitespace after
291 initial sign. Remove dead code.
292 (match_const_complex_part): Remove.
293 (match_complex_part): Use match_{real,integer}_const.
294 (match_complex_constant): Cross-promote integer types.
296 2005-01-23 James A. Morrison <phython@gcc.gnu.org>
299 * iresolve.c (gfc_resolve_transpose): Resolve to transpose_c4 or
300 transpose_c8 for complex types.
302 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
304 * data.c, dependency.c, f95-lang.c, io.c, trans-array.c,
305 trans-decl.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
306 trans-stmt.c, trans-types.c, trans.h: Fix comment typos.
307 Follow spelling conventions.
309 2005-01-22 Bud Davis <bdavis9659@comcast.net>
312 * trans-io.c (gfc_trans_inquire): Added code to support
315 2005-01-22 Steven G. Kargl <kargls@comcast.net>
317 * intrinsic.c (make_alias): Add standard argument.
318 (add_functions): Update make_alias calls.
320 2005-01-22 Paul Brook <paul@codesourcery.com>
322 * trans-expr.c (gfc_conv_function_call): Remove bogus TODO.
324 2005-01-22 Paul Brook <paul@codesourcery.com>
326 * gfortran.h (gfc_check_access): Add prototype.
327 * match.c (gfc_match_namelist): Remove TODO.
328 * module.c (check_access): Rename ...
329 (gfc_check_access): ... to this. Boolify. Update callers.
330 * resolve.c (resolve_symbol): Check for private objects in public
333 2005-01-22 Paul Brook <paul@codesourcery.com>
335 * primary.c (gfc_match_rvalue): Only apply implicit type if variable
336 does not have an explicit type.
337 (gfc_match_variable): Resolve implicit derived types in all cases.
338 Resolve contained function types from their own namespace, not the
340 * resolve.c (resolve_contained_fntype): Remove duplicate sym->result
341 checking. Resolve from the contained namespace, not the parent.
343 2005-01-22 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
346 * trans-const.c (gfc_conv_constant_to_tree): Give logical
347 constants the correct type.
350 * trans-io.c (ADD_STRING): Use gfc_charlen_type_node for string
352 (gfc_build_io_library_fndecls): 'rec' and 'recl_in' are not
355 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
357 * arith.c, array.c, check.c, decl.c, expr.c, f95-lang.c,
358 gfortran.h, interface.c, intrinsic.c, io.c, iresolve.c,
359 match.c, matchexp.c, misc.c, module.c, options.c, parse.c,
360 scanner.c, simplify.c, symbol.c, trans-array.c, trans-expr.c,
361 trans-io.c, trans-stmt.c, trans.c: Update copyright.
363 2005-01-17 Ira Rosen <irar@il.ibm.com>
365 * f95-lang.c (gfc_init_builtin_functions): Call targetm.init_builtins.
367 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
370 * error.c (error_char): Line-buffer errors / warnings.
372 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
374 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Fix signed /
375 unsigned issue. Use build_int_cst instead of converting
376 integer_zero_node. Remove unnecessary conversion.
378 * trans-types.c (gfc_get_character_type_len): : Use
379 gfc_charlen_type_node as basic type for the range field.
381 * trans-intrinsic.c (build_fixbound_expr,
382 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_anyall,
383 gfc_conv_intrinsic_count, gfc_conv_intrinsic_btest,
384 gfc_conv_intrinsic_singlebitop): Use 'build_int_cst' instead
385 of converting 'integer_zero_node' or 'integer_one_node'
387 (gfc_conv_intrinsic_ishftc): Same, but store in local variable to
389 (gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_rrspacing,
390 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_iargc): Use
391 'build_int_cst' instead of converting 'integer_zero_node' or
392 'integer_one_node' respectively.
394 * trans-intrinsic.c (gfc_conv_intrinsic_index,
395 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove
396 'gfc'-prefix from local variable, remove dead code, use correct
397 type when inserting argument.
399 * trans-intrinsic.c, trans-types.c: Update copyright years.
401 2005-01-16 Steven G. Kargl <kargls@comcast.net>
404 * resolve.c (check_case_overlap): Typo in comment.
405 (validate_case_label_expr): Fix up kinds of case values
406 (resolve_select): Properly handle kind mismatches.
408 2004-01-16 Paul Brook <paul@codesourcery.com>
411 * trans-common.c (translate_common): Remove duplicate function call.
412 (finish_equivalences): Preserve alignment when biasing offsets.
414 2005-01-15 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de
416 * primary.c (check_digit): Call 'ISXDIGIT' instead of assuming
417 ASCII-like character encoding.
419 2005-01-14 Steven G. Kargl <kargls@comcast.net>
421 * resolve.c (compare_case): Cleanup.
423 2005-01-14 Steven G. Kargl <kargls@comcast.net>
425 * resolve.c (compare_case): Give arguments correct type.
427 2005-01-13 Kazu Hirata <kazu@cs.umass.edu>
429 * iresolve.c, trans-common.c, trans-types.c: Fix comment
432 2005-01-09 Paul Brook <paul@codesourcery.com>
435 * trans-common.c (current_common, current_offset): Remove.
436 (create_common): Add head argument.
437 (align_segment): New function.
438 (apply_segment_offset): New function.
439 (translate_common): Merge code from new_segment. Handle alignment.
440 (new_segment): Remove.
441 (finish_equivalences): Ensure proper alignment.
443 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
445 * trans-const.c: Don't include unused math.h.
447 * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl,
448 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_minmaxloc,
449 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_len): Remove
451 (prepare_arg_info): Fix formatting, indenting and remove trailing
453 (gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_trim): Remove
456 * arith.c (arctangent2, gfc_arith_init_1, gfc_arith_done_1,
457 gfc_constant_result, gfc_range_check, gfc_arith_power,
458 eval_type_intrinsic0, eval_intrinsic_f2, gfc_real2real,
459 gfc_real2complex, gfc_complex2int, gfc_complex2real,
460 gfc_complex2complex): Fix whitespace issues.
461 * check.c (must_be, type_check, numeric_check, int_or_real_check,
462 logical_array_check, array_check, scalar_check, nonoptional_check,
463 variable_check, dim_check, check_a_kind, gfc_check_a_ikind,
464 gfc_check_a_xkind, gfc_check_abs, gfc_check_all_any,
465 gfc_check_allocated, gfc_check_a_p, gfc_check_besn,
466 gfc_check_btest, gfc_check_char, gfc_check_cmplx, gfc_check_count,
467 gfc_check_cshift, gfc_check_dcmplx, gfc_check_dble,
468 gfc_check_digits, gfc_check_dot_product, gfc_check_eoshift,
469 gfc_check_fnum, gfc_check_g77_math1, gfc_check_huge, gfc_check_i,
470 gfc_check_iand, gfc_check_ibclr, gfc_check_ibits, gfc_check_ibset,
471 gfc_check_idnint, gfc_check_ieor, gfc_check_index, gfc_check_int,
472 gfc_check_ior, gfc_check_ishft, gfc_check_ishftc, gfc_check_kind,
473 gfc_check_lbound, gfc_check_logical, min_max_args,
474 gfc_check_min_max_integer, gfc_check_min_max_real,
475 gfc_check_min_max_double, gfc_check_matmul,
476 gfc_check_minval_maxval, gfc_check_merge, gfc_check_nearest,
477 gfc_check_pack, gfc_check_precision, gfc_check_radix,
478 gfc_check_range, gfc_check_real, gfc_check_repeat,
479 gfc_check_scale, gfc_check_scan, gfc_check_selected_real_kind,
480 gfc_check_set_exponent): Fix formatting issues.
481 (gfc_check_size, gfc_check_sign): Alphabetize function order,
482 remove whitespace-only line.
483 (gfc_check_fstat, gfc_check_fstat_sub, gfc_check_stat,
484 gfc_check_stat_sub, gfc_check_transfer, gfc_check_transpose,
485 gfc_check_ubound, gfc_check_unpack, gfc_check_verify, gfc_check_x,
486 gfc_check_cpu_time, gfc_check_date_and_time, gfc_check_mvbits,
487 gfc_check_random_number, gfc_check_random_seed,
488 gfc_check_second_sub, gfc_check_system_clock,
489 gfc_check_getcwd_sub, gfc_check_exit, gfc_check_flush,
490 gfc_check_umask, gfc_check_umask_sub, gfc_check_unlink,
491 gfc_check_unlink_sub): Fix formatting issues.
493 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
495 * gfortran.h: Remove outdated comment. Don't include stdio.h
498 2005-01-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
500 * gfortranspec.c (lang_specific_driver): Change year to 2005 in
501 output of 'gfortran --version'.
503 2005-01-03 Steven G. Kargl <kargls@comcast.net>
505 * arith.c: Add system.h; remove string.h
511 * check.c: Remove stdlib.h and stdarg.h
512 * error.c: Remove stdlib.h, stdarg.h, stdio.h, string.h
513 * expr.c: Add system.h; remove stdarg.h, stdio.h, and string.h
514 * f95-lang.c: Add system.h; remove stdio.h
515 * interface.c: Add system.h; remove stdlib.h and string.h
516 * intrinsic.c: Remove stdarg.h, stdio.h, and string.h
517 * io.c: Remove string.h
519 * match.c: Remove stdarg.h and string.h
520 * misc.c: Update copyright; add system.h; remove stdlib.h,
521 string.h, and sys/stat.h
522 * module.c: Add system.h; remove string.h, stdio.h, errno.h,
524 * option.c: Remove string.h and stdlib.h
526 * scanner.c: Update copyright; add system.h; remove stdlib.h,
527 stdio.h, string.h, and strings.h
528 * symbol.c: Add system.h; remove stdlib.h, stdio.h, and string.h
529 * trans-array.c: Remove stdio.h and gmp.h
530 * trans-const.c: Ditto
531 * trans-expr.c: Ditto
533 * trans-stmt.c: Ditto
535 * trans-intrinsic.c: Remove stdio.h and string.h
537 2004-12-29 Steven G. Kargl <kargls@comcast.net>
539 * gfortran.h (gfc_case): fix typo in comment.
541 2004-12-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
543 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Change to
544 logical shift. Call fold. Remove 0-bit shift shortcut.
545 (gfc_conv_intrinsic_ishftc): Convert first argument to at least
546 4 bytes bits. Convert 2nd and 3rd argument to 4 bytes. Convert
547 result if width(arg 1) < 4 bytes. Call fold.
550 * trans-intrinsic.c (gfc_conv_intrinsic_mod): Update comment
551 in front of function to match the standard. Correct handling
554 2004-12-27 Andrew Pinski <pinskia@physics.uc.edu>
556 * trans-expr.c (gfc_conv_cst_int_power): Only check for
557 flag_unsafe_math_optimizations if we have a float type.
559 2004-12-23 Steven G. Kargl <kargls@comcast.net>
561 * gfortran.texi: Fix typo.
563 2004-12-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
565 * trans-intrinsic.c (build_fixbound_expr): Clarify comment, fix
568 2004-12-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
571 * match.c (gfc_match_if): Don't explicitly skip optional whitespace.
572 (gfc_match_nullify): Make sure that ')' is in front of the end of
575 * scanner.c (skip_fixed_comments): Fix typo in comment preceding
578 2004-12-14 Richard Henderson <rth@redhat.com>
580 * gfortran.h (gfc_expr.function.name): Make const.
581 (gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
582 (gfc_get_string): Update prototype.
583 * iresolve.c: Include tree.h.
584 (string_node, HASH_SIZE, string_head, hash): Remove.
585 (gfc_get_string): Use vsnprintf, get_identifier.
586 (free_strings, gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
587 * misc.c (gfc_init_1): Don't call gfc_iresolve_init_1.
588 (gfc_done_1): Don't call gfc_iresolve_done_1.
589 * module.c (mio_allocated_string): Take and return const char *,
590 instead of modifying char**.
591 (mio_expr): Update to match.
592 * resolve.c (pure_function): Constify name argument.
593 (resolve_function): Constify name.
594 * trans-intrinsic.c (gfc_conv_intrinsic_function): Likewise.
596 2004-12-12 Richard Henderson <rth@redhat.com>
598 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
599 gfc_resolve_cshift, gfc_resolve_dot_product, gfc_resolve_eoshift,
600 gfc_resolve_matmul, gfc_resolve_maxloc, gfc_resolve_maxval,
601 gfc_resolve_minloc, gfc_resolve_minval, gfc_resolve_pack,
602 gfc_resolve_product, gfc_resolve_reshape, gfc_resolve_shape,
603 gfc_resolve_spread, gfc_resolve_sum, gfc_resolve_transpose,
604 gfc_resolve_unpack: Use PREFIX.
606 2004-12-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
609 * match.c (gfc_match_common): Skip whitespace.
611 2004-12-12 Steven G. Kargl <kargls@comcast.net>
614 * check.c (gfc_check_iand, gfc_check_ibclr, gfc_check_ibits,
615 gfc_check_ibset, gfc_check_ieor, gfc_check_ior): Remove default
616 integer kind check; Issue error for -std=f95 when needed.
617 * intrinsic.c (add_functions): Change ieor from GFC_STD_GNU to
619 * iresolve.c (gfc_resolve_iand, gfc_resolve_ieor, gfc_resolve_ior):
620 Promote arguments to same kind.
622 2004-12-12 Steven G. Kargl <kargls@comcast.net>
623 Paul Brook <paul@codesourcery.com>
626 * resolve.c (gfc_resolve_iterator_expr): New function.
627 (gfc_resolve_iterator): Use it. Add real_ok argument. Convert
628 start, end and stride to correct type.
629 (resolve_code): Pass extra argument.
630 * array.c (resolve_array_list): Pass extra argument.
631 * gfortran.h (gfc_resolve): Add prototype.
632 * trans-stmt.c (gfc_trans_do): Remove redundant type conversions.
633 Handle real type iterators.
635 2004-12-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
638 * iresolve.c (gfc_resolve_scale): Convert 'I' argument if not of
639 same kind as C's 'int'.
640 (gfc_resolve_set_exponent): Convert 'I' argument if not of kind 4.
642 2004-12-08 Richard Henderson <rth@redhat.com>
644 * intrinsic.c (gfc_convert_type_warn): Propagate the input shape
645 to the output expression.
646 * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift): Suppress
648 (gfc_resolve_reshape): Force convert SHAPE and ORDER parameters
651 2004-12-08 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
654 * resolve.c (resolve_code): Impose correct restrictions on
657 * decl.c (gfc_match_end): Use locus of END when eos is an error.
659 2004-12-02 Steven G. Kargl <kargls@comcast.net>
660 Paul Brook <paul@codesourcery.com>
662 * check.c (gfc_check_flush, gfc_check_fnum): New functions.
663 (gfc_check_fstat, gfc_check_fstat_sub): New functions.
664 (gfc_check_stat, gfc_check_stat_sub): New functions.
665 * gfortran.h (GFC_ISYM_FNUM,GFC_ISYM_FSTAT,GFC_ISYM_STAT): New symbols
666 * intrinsic.c (add_functions,add_subroutines): Add flush, fnum,
667 fstat, and stat to intrinsics symbol tables.
668 * intrinsic.h (gfc_check_flush, gfc_resolve_stat_sub): Add prototypes.
669 (gfc_resolve_fstat_sub, gfc_resolve_stat): Ditto.
670 * iresolve.c (gfc_resolve_fnum, gfc_resolve_fstat): New functions.
671 (gfc_resolve_stat, gfc_resolve_flush): New functions.
672 (gfc_resolve_stat_sub,gfc_resolve_fstat_sub): New functions
673 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add new intrinsics.
675 2004-12-02 Steven G. Kargl <kargls@comcast.net>
677 * intrinsic.c: Fix and add comments, fix function declarations
678 (OPTIONAL,REQUIRED): New symbols
679 (add_functions,add_subroutines): Use symbols
680 (gmp.h): Remove unused include
682 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
684 * f95-lang.c, gfortranspec.c, trans-decl.c: Avoid ` as left quote
687 2004-11-24 Steven Bosscher <stevenb@suse.de>
689 * options.c (gfc_post_options): Don't clear flag_inline_functions.
691 2004-11-20 Steven G. Kargl <kargls@comcast.net>
693 * check.c (gfc_check_getcwd_sub): Fix seg fault.
695 * check.c (gfc_check_exit,gfc_check_umask,gfc_check_umask_sub,
696 gfc_check_unlink,gfc_check_unlink_sub): New functions
697 * gfortran.h (GFC_ISYM_UMASK,GFC_ISYM_UNLINK): New symbols
698 * intrinsic.c (add_functions,add_subroutines): Add umask, unlink,
699 exit to intrinsics symbol tables.
700 * intrinsic.h (gfc_check_umask,gfc_check_unlink,gfc_check_exit,
701 gfc_check_umask_sub,gfc_check_unlink_sub,gfc_resolve_umask,
702 gfc_resolve_unlink,gfc_resolve_exit,gfc_resolve_umask_sub,
703 gfc_resolve_unlink_sub): Add and sort prototypes.
704 * iresolve.c (gfc_resolve_umask,gfc_resolve_unlink,gfc_resolve_exit,
705 gfc_resolve_umask_sub,gfc_resolve_unlink_sub): New functions
706 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbols
708 2004-11-16 Paul Brook <paul@codesourcery.com>
711 * trans-array.c (gfc_trans_allocate_temp_array): Use gfc_get_dtype.
712 (gfc_array_init_size, gfc_conv_expr_descriptor): Ditto.
713 * trans-types.c (gfc_get_dtype): Accept array type rather than element
715 (gfc_get_nodesc_array_type): Don't set GFC_TYPE_ARRAY_DTYPE.
716 (gfc_get_array_type_bounds): Ditto.
717 (gfc_get_derived_type): Recurse into derived type pointers.
718 * trans-types.h (gfc_get_dtype): Add prototype.
719 * trans.h (GFC_TYPE_ARRAY_DTYPE): Add comment.
721 2004-11-15 Paul Brook <paul@codesourcery.com>
723 * trans-types.c (gfc_get_dtype): Remove obsolete TODO.
725 2004-11-10 Paul Brook <paul@codesourcery.com>
728 * trans-expr.c (gfc_trans_subarray_assign): Free shape before ss.
729 * trans-io.c (transfer_array_component): Ditto.
731 2004-11-10 Paul Brook <paul@codesourcery.com>
733 * invoke.texi: Fix typo.
735 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
737 * arith.c, array.c, decl.c, expr.c, f95-lang.c, gfortran.h,
738 gfortranspec.c, interface.c, intrinsic.c, iresolve.c, match.c,
739 module.c, parse.c, parse.h, primary.c, resolve.c, scanner.c,
740 trans-array.c, trans-array.h, trans-expr.c, trans-intrinsic.c,
741 trans-io.c, trans-stmt.c, trans.h: Fix comment formatting.
743 2004-11-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
746 * io.c (resolve_tag): Tighten up exception for assigned FORMAT.
748 2004-11-06 Kazu Hirata <kazu@cs.umass.edu>
750 * gfortranspec.c: Replace GNU CC with GCC.
752 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
754 * gfortranspec.c (lang_specific_driver): Change year to 2004.
756 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
759 * trans-decl.c (create_function_arglist): Set DECL_ARTIFICIAL for
762 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
765 * trans-decl.c (gfc_finish_var_decl): Don't declare arguments to
766 module procedures as if they were module variables.
768 2004-11-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
773 * module.c (write_symbol1): Set module_name for dummy arguments.
775 2004-11-02 Paul Brook <paul@codesourcery.com>
777 * intrinsic.c (check_intrinsic_standard): Include error locus.
779 (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Pass
780 locus to check_intrinsic_standard.
782 2004-10-31 Janne Blomqvist <jblomqvi@cc.hut.fi>
785 * gfortran.h: Change GFC_STD_* flags to more appropriate
786 ones. (struct gfc_intrinsic_isym): Add field for standard. (struct
787 gfc_option_t): Add field for warning about use of nonstandard
789 * intrinsic.c (add_sym): Add parameter for standard version, check
790 this against current standard.
791 (add_sym_0): Pass standard parameter to add_sym.
792 (add_sym_1, add_sym_0s, add_sym_1s, add_sym_1m, add_sym_2): Ditto.
793 (add_sym_2s, add_sym_3, add_sym_3ml, add_sym_3red, add_sym_3s): Ditto.
794 (add_sym_4, add_sym_4s, add_sym_5, add_sym_5s): Ditto.
795 (make_generic): Add parameter for standard, check this
796 against currently selected standard.
797 (add_functions, add_subroutines): Add parameter to tell which
798 standard an intrinsic belongs to.
799 (check_intrinsic_standard): New function.
800 (gfc_intrinsic_func_interface): Add call to check_intrinsic_standard.
801 (gfc_intrinsic_sub_interface): Ditto.
802 * lang.opt: Add Wnonstd-intrinsics option.
803 * options.c (gfc_init_options): Change to use new GFC_STD_* flags,
805 (set_Wall): Add warning about nonstd intrinsics.
806 (gfc_handle_option): Change to use new GFC_STD_* flags,
808 * invoke.texi: Update manual to include -Wnonstd-intrinsics.
810 2004-10-30 Andrew Pinski <pinskia@physics.uc.edu>
812 * f95-lang.c (lang_tree_node): Add chain_next to be the TREE_CHAIN.
814 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
816 * simplify.c (twos_complement): Calculate mask in GMP arithmetic.
818 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
820 * trans.c (gfc_trans_code): Set global locus after recursing. Fix
823 2004-10-30 Canqun Yang <canqun@nudt.edu.cn>
825 * check.c (gfc_check_rand): Allow missing optional argument.
826 (gfc_check_irand): Ditto.
827 * intrinsic.c (add_functions): Set arg optional flag for {i,}rand.
829 2004-10-28 Scott Robert Ladd <scott.ladd@coyotegulch.com>
831 PR fortran/13490, PR fortran/17912
832 * gcc/fortran/gfortran.h: Added pedantic_min_int to gfc_integer_info
833 * gcc/fortran/gfortran.h: Added ARITH_ASYMMETRIC to arith
834 * gcc/fortran/arith.c: Added support for an "asymmetric integer"
835 warning when compiling with pedantic.
836 * gcc/fortran/arith.c: Set minimum integer values to reflect
837 realities of two's complement signed integers. Added
840 2004-10-17 Andrew Pinski <pinskia@physics.uc.edu>
842 * Make-lang.in (F95_ADDITIONAL_OBJS): Kill.
843 (f951): Do not depend on F95_ADDITIONAL_OBJS and don't
846 2004-10-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
848 * trans-decl.c (generate_local_decl): Simplify logic, fix comment
850 (gfc_generate_function_code): Fix formatting issue.
852 2004-10-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
854 * module.c: Fix formatting issues.
856 2004-10-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
858 * module.c (mio_interface_rest): Set where member of interface
861 2004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
864 * options.c (gfc_handle_option): Add break after handing the
867 2004-10-08 Tobias Schlueter <tobias.shclueter@physik.uni-muenchen.de>
869 * arith.c: Fix formatting issues.
871 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
874 * resolve.c (resolve_operator): Use correct operator name in message.
876 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
878 * primary.c (match_boz_constant): Allow kind parameter suffixes.
879 Move standard warning further to the front.
881 2004-10-07 Kazu Hirata <kazu@cs.umass.edu>
883 * trans-stmt.c: Fix a comment typo.
885 2004-10-07 Paul Brook <paul@codesourcery.com>
888 * trans-array.c (gfc_trans_deferred_array): Leave use associated
891 2004-10-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
894 * simplify.c (twos_complement): New function.
895 (gfc_simplify_ishft, gfc_simplify_ishftc): Revise.
897 * simplify.c (gfc_simplify_abs): Use mpfr_hypot for CABS.
899 2004-10-06 Paul Brook <paul@codesourcery.com>
901 * trans-stmt.c (gfc_trans_simple_do): New function.
902 (gfc_trans_do): Use it. Evaluate iteration bounds before entering
903 loop. Update comments.
905 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
908 * iresolve.c (gfc_resolve_pack): Choose function depending if mask
912 * intrinsic.c (add_sym_5): Remove.
913 (add_subroutines): Add resolution function for MVBITS.
914 * intrinsic.h (gfc_resolve_mvbits): Declare resolution function for
916 * iresolve.c (gfc_resolve_mvbits): New function.
917 (gfc_resolve_random_number): Remove empty line at end of function.
919 * trans-const.c (gfc_build_cstring_const): New function.
920 (gfc_init_cst): Use new function.
921 * trans-const.h (gfc_build_cstring_const): Add prototype.
922 * trans-io.c (set_string, set_error_locus): Use new function.
923 * trans-stmt.c (gfc_trans_goto): Use new function.
926 * parse.c (accept_statement): Don't treat END DO like END IF and
928 (parse_do_block): Generate possible END DO label inside END DO
932 * check.c (gfc_check_system_sub): New function.
933 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SYSTEM.
934 * intrinsic.c (add_functions): Add 'system'.
935 (add_subroutines): Add 'system'.
936 * intrinsic.h (gfc_check_etime_sub, gfc_check_getcwd_sub):
937 Move prototypes to other suborutines.
938 (gfc_check_system_sub, gfc_resolve_system, gfc_resolve_system_sub):
940 (gfc_resolve_system_clock): Fix formatting of prototype.
941 * iresolve.c (gfc_resolve_system, gfc_resolve_system_sub): New
943 * trans-intrinsic.c (gfc_conv_intrinsic_function): Deal with
946 2004-10-04 Erik Schnetter <schnetter@aei.mpg.de>
948 * scanner.c (preprocessor_line): Accept preprocessor lines without
949 file names. Check file names for closing quotes. Handle escaped
950 quotes in file names.
952 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
953 Paul Brook <paul@codesourcery.com>
955 * trans-array.c (gfc_conv_expr_descriptor): Check for substriungs.
956 Use gfc_get_expr_charlen.
957 * trans-expr.c (gfc_get_expr_charlen): New function.
958 * trans.h (gfc_get_expr_charlen): Add prototype.
960 2004-10-04 Kazu Hirata <kazu@cs.umass.edu>
962 * trans-intrinsic.c: Fix a comment typo.
964 2004-10-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
966 * simplify.c (range_check): Remove blank line at beginning of function.
967 (gfc_simplify_dint): Same at end of function.
968 (gfc_simplify_exponent, gfc_simplify_fraction): Simplify calculations.
969 (gfc_simplify_bound): Fix indentation.
970 (gfc_simplify_log10): Simplify calculation.
971 (gfc_simplify_min, gfc_simplify_max): Remove blank line at beginning
973 (gfc_simplify_nearest): Same at end of function.
974 (gfc_simplify_nint, gfc_simplify_idnint): Same at beginning of
976 (gfc_simplify_rrspacing, gfc_simplify_set_exponent,
977 gfc_simplify_spacing): Simplify calulations.
979 2004-10-03 Feng Wang <fengwang@nudt.edu.cn>
981 * trans-intrinsic.c: Fix comments on spacing and rrspacing
982 (gfc_conv_intrinsic_rrspacing): Add fold on constant trees.
984 2004-10-01 Jan Hubicka <jh@suse.cz>
986 * f95-lang.c (gfc_expand_function): Update call of
987 tree_rest_of_compilation.
988 * trans-decl.c (gfc_generate_constructors): Likewise.
990 2004-09-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
992 * trans-intrinsic.c: Comment fixes.
994 2004-09-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
996 * decl.c (add_init_expr_to_sym, variable_decl): Comment fixes.
998 2004-09-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1000 * trans-types.c (gfc_return_by_reference): Remove superfluous
1003 * intrinsic.h (gfc_resolve_getcwd): Update prototype.
1004 * iresolve.c (gfc_resolve_getcwd): Add second argument to function.
1007 * trans-expr.c (gfc_trans_arrayfunc_assign): Look at resolved
1008 function to determine return type.
1010 2004-09-20 Jan Hubicka <jh@suse.cz>
1012 * trans-decl.c (build_entry_thunks): Finalize the function; do not lower
1014 (gfc_generate_function_code): Likewise.
1016 2004-09-20 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1019 * simplify.c (gfc_simplify_reshape): Set shape of return value
1022 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
1023 Zack Weinberg <zack@codesourcery.com>
1025 * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class
1026 enumeration constants.
1028 2004-09-17 Paul Brook <paul@codesourcery.com>
1030 * gfortran.h (struct gfc_linebuf): Don't use C99 empty arrays.
1031 (gfc_linebuf_header_size): Define.
1032 * scanner.c (load_file): Use it.
1034 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
1036 * array.c, data.c, decl.c, dependency.c, error.c, f95-lang.c,
1037 interface.c, intrinsic.c, io.c, misc.c, module.c, parse.h,
1038 resolve.c, scanner.c, trans-array.c, trans-array.h,
1039 trans-common.c, trans-const.h, trans-decl.c, trans-expr.c,
1040 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
1041 trans.h: Fix comment typos. Follow spelling conventions.
1043 2004-09-16 Victor Leikehman <lei@il.ibm.com>
1046 * trans-io.c (transfer_array_component): New function.
1047 (transfer_expr): For array fields, call transfer_array_component.
1049 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
1051 * gfortran.texi: Fix a typo.
1053 2004-09-15 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
1055 * parse.c (eof_buf): Rename eof to eof_buf.
1056 (unexpected_eof): Same.
1057 (gfc_parse_file): Same.
1059 2004-09-15 Steven G. Kargl <kargls@comcast.net>
1061 * check.c (gfc_check_getcwd_sub): New function.
1062 * gfortran.h (GFC_ISYM_GETCWD): New symbol.
1063 * intrinsic.c (add_functions): Add function definition;
1065 * intrinsic.c (add_subroutines): Add subroutine definitions.
1066 * intrinsic.h: Add prototypes.
1067 * iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub):
1069 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol.
1071 2004-09-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1074 * module.c (write_symbol): Don't fill in module name here.
1075 (write_symbol0): Fill in here instead.
1077 2004-09-14 Kazu Hirata <kazu@cs.umass.edu>
1079 * data.c, decl.c, f95-lang.c, gfortran.h, match.c,
1080 trans-array.c, trans-common.c, trans-expr.c,
1081 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.h: Fix
1082 comment typos. Follow spelling conventions.
1084 2004-09-09 Paul Brook <paul@codesourcery.com>
1086 * scanner.c (get_file): Add ATTRIBUTE_UNUSED.
1088 2004-09-08 Paul Brook <paul@codesourcery.com>
1090 * array.c: Don't include assert.h.
1091 * data.c: Don't include assert.h. Replace assert and abort with
1092 gcc_assert and gcc_unreachable.
1093 * dependency.c: Ditto.
1094 * f95-lang.c: Ditto.
1095 * iresolve.c: Ditto.
1097 * simplify.c: Ditto.
1099 * trans-array.c: Ditto.
1100 * trans-common.c: Ditto.
1101 * trans-const.c: Ditto.
1102 * trans-decl.c: Ditto.
1103 * trans-expr.c: Ditto.
1104 * trans-intrinsic.c: Ditto.
1105 * trans-io.c: Ditto.
1106 * trans-stmt.c: Ditto.
1107 * trans-types.c: Ditto.
1110 2004-09-07 Per Bothner <per@bothner.com>
1111 Paul Brook <paul@codesourcery.com>
1113 * error.c (show_locus): Handle mapped locations.
1114 * f95-lang.c (gfc_be_parse_file): Initialize mapped locations.
1115 * gfortran.h: Include input.h.
1116 (struct gfc_linebuf): Use source_location.
1117 * scanner.c (get_file): Initialize linemap.
1118 (preprocessor_line): Pass extra argument to get_file.
1119 (load_file): Ditto. Setup linemap.
1120 (gfc_new_file): Handle mapped locations.
1121 * trans-common.c (build_field, build_equiv_decl, build_common_decl):
1122 Set decl source locations.
1123 (gfc_trans_common): Set blank common block location.
1124 * trans-decl.c (gfc_set_decl_location): New function.
1125 (gfc_get_label_decl, gfc_get_symbol_decl): Use it.
1126 (trans_function_start): Move call to gfc_set_backend_locus..
1127 (build_function_decl): ... to here.
1128 (build_entry_thunks): Set and restore the backend locus.
1129 (gfc_generate_constructors): Remove excess arguments to
1130 init_function_start.
1131 (gfc_generate_block_data): Add comments. Set the decl locus.
1132 * trans-io.c (set_error_locus): Handle mapped locations.
1133 * trans.c (gfc_get_backend_locus, gfc_get_backend_locus): Ditto.
1134 (gfc_trans_code): Use SET_EXPR_LOCATION.
1135 (gfc_generate_code): Override the location of the new symbol.
1136 * trans.h (gfc_set_decl_location): Add prototype.
1138 2004-08-31 Paul Brook <paul@codesourcery.com>
1140 * trans-types.c (gfc_type_for_mode): Return NULL for unknown modes.
1142 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1145 * trans-intrinsic.c (gfc_conv_intrinsic_merge): Do the right thing for
1148 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1153 * resolve.c (resolve_transfer): New function.
1154 (resolve_code): Call resolve_transfer in case of EXEC_TRANSFER.
1156 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1159 * trans-types.c (gfc_init_types): Make gfc_character1_type_node an
1162 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1164 * CONTRIB, NEWS, README, TODO: Remove obsolete files.
1166 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1169 * trans-types.c (gfc_return_by_reference): Remove TODO error,
1170 add comment pointing out possible issue WRT compatibility with g77.
1172 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1174 * trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace
1175 all occurences of 'gfc_strlen_type_node' by
1176 'gfc_charlen_type_node'.
1177 * trans-types.h: Same. Also update comment accordingly.
1179 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1181 * primary.c: Update copyright boilerplate to say GCC.
1182 * f95-lang.c: Change initial comment to say gfortran.
1184 2004-08-31 Paul Brook <paul@codesourcery.com>
1186 * trans-types.h: Add comments.
1187 (intmax_type_node, string_type_node, const_string_type_node): Remove.
1189 2004-08-30 Richard Henderson <rth@redhat.com>
1191 * Make-lang.in (fortran/f95-lang.o): Update dependencies.
1192 (fortran/trans-decl.o, fortran/trans-types.o): Likewise.
1193 * gfortran.h (gfc_integer_info): Add c_char, c_short, c_int,
1194 c_long, c_long_long.
1195 (gfc_logical_info): Add c_bool.
1196 (gfc_real_info): Add mode_precision, c_float, c_double, c_long_double.
1197 * trans-array.c (gfc_array_allocate): Use TYPE_PRECISION
1198 rather than gfc_int[48]_type_node for allocate choice.
1199 * trans-decl.c (gfc_build_intrinsic_function_decls): Cache
1200 local copies of some kind type nodes.
1201 (gfc_build_builtin_function_decls): Likewise.
1202 * trans-expr.c (gfc_conv_power_op): Likewise.
1203 * trans-intrinsic.c (gfc_conv_intrinsic_index,
1204 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify,
1205 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Likewise.
1206 * trans-stmt.c (gfc_trans_pause, gfc_trans_stop,
1207 gfc_trans_character_select, gfc_trans_allocate): Likewise.
1208 * trans-io.c (gfc_pint4_type_node): Move into ...
1209 (gfc_build_io_library_fndecls): ... here. Cache local copies of
1210 some kind type nodes.
1211 * trans-types.c (gfc_type_nodes): Remove.
1212 (gfc_character1_type_node, gfc_strlen_type_node): New.
1213 (gfc_integer_types, gfc_logical_types): New.
1214 (gfc_real_types, gfc_complex_types): New.
1215 (gfc_init_kinds): Fill in real mode_precision.
1216 (gfc_build_int_type, gfc_build_real_type): New.
1217 (gfc_build_complex_type, gfc_build_logical_type): New.
1218 (c_size_t_size): New.
1219 (gfc_init_types): Loop over kinds.
1220 (gfc_get_int_type, gfc_get_real_type): Use gfc_validate_kind.
1221 (gfc_get_complex_type, gfc_get_logical_type): Likewise.
1222 (gfc_get_character_type_len): Likewise.
1223 (gfc_type_for_size): Loop over kinds; use a reduced set of
1224 unsigned type nodes.
1225 (gfc_type_for_mode): Loop over kinds.
1226 (gfc_signed_or_unsigned_type): Use gfc_type_for_size.
1227 (gfc_unsigned_type, gfc_signed_type): Use gfc_signed_or_unsigned_type.
1228 * trans-types.h (F95_INT1_TYPE, F95_INT2_TYPE, F95_INT4_TYPE,
1229 F95_INT8_TYPE, F95_INT16_TYPE, F95_REAL4_TYPE, F95_REAL8_TYPE,
1230 F95_REAl16_TYPE, F95_COMPLEX4_TYPE, F95_COMPLEX8_TYPE,
1231 F95_COMPLEX16_TYPE, F95_LOGICAL1_TYPE, F95_LOGICAL2_TYPE,
1232 F95_LOGICAL4_TYPE, F95_LOGICAL8_TYPE, F95_LOGICAL16_TYPE,
1233 F95_CHARACTER1_TYPE, NUM_F95_TYPES, gfc_type_nodes,
1234 gfc_int1_type_node, gfc_int2_type_node, gfc_int4_type_node,
1235 gfc_int8_type_node, gfc_int16_type_node, gfc_real4_type_node,
1236 gfc_real8_type_node, gfc_real16_type_node, gfc_complex4_type_node,
1237 gfc_complex8_type_node, gfc_complex16_type_node,
1238 gfc_logical1_type_node, gfc_logical2_type_node,
1239 gfc_logical4_type_node, gfc_logical8_type_node,
1240 gfc_logical16_type_node, gfc_strlen_kind): Remove.
1241 (gfc_character1_type_node): Turn in to a variable.
1242 (gfc_strlen_type_node): Likewise.
1244 2004-08-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1246 * gfortran.h (gfc_namespace): Add new field is_block_data.
1247 * parse.c (accept_statement): Remove special handling for BLOCK DATA.
1248 (parse_block_data): Record BLOCK DATA name, set is_block_data field.
1249 * trans.c (gfc_generate_code): Handle BLOCK DATA units.
1250 * trans.h (gfc_generate_block_data): Add prototype.
1251 * trans-decl.c (gfc_generate_block_data): New function.
1253 2004-08-29 Richard Henderson <rth@redhat.com>
1255 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_export.
1256 * trans-types.c (gfc_init_kinds): Reject integer kinds larger
1257 than two HOST_WIDE_INT.
1259 2004-08-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1262 * decl.c (free_variable, free_value, gfc_free_data, var_list,
1263 var_element, top_var_list, match_data_constant, top_val_list,
1264 gfc_match_data): Move here from match.c.
1265 (match_old_style_init): New function.
1266 (variable_decl): Match old-style initialization.
1267 * expr.c (gfc_get_variable_expr): New function.
1268 * gfortran.h (gfc_get_variable_expr): Add prototype.
1269 * gfortran.texi: Start documentation for supported extensions.
1270 * match.c: Remove the functions moved to decl.c.
1271 * match.h (gfc_match_data): Move prototype to under decl.c.
1272 * symbol.c (gfc_find_sym_tree, gfc_find_symbol): Add/correct
1275 2004-08-29 Steven G. Kargl <kargls@comcast.net>
1276 Paul Brook <paul@codesourcery.com>
1278 * check.c (gfc_check_besn, gfc_check_g77_math1): New functions.
1279 * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Define.
1280 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
1281 (build_builtin_fntypes): New function.
1282 (gfc_init_builtin_functions): Use it.
1283 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_{J,Y}{0,1,N}
1284 and GFC_ISYM_ERF{,C}.
1285 (gfc_c_int_kind): Declare.
1286 * intrinsic.c (add_functions): Add [d]bes* and [d]erf*.
1287 * intrinsic.h (gfc_check_besn, gfc_check_g77_math1, gfc_resolve_besn,
1288 gfc_resolve_g77_math1): Add prototypes.
1289 * resolve.c (gfc_resolve_besn, gfc_resolve_g77_math1): New functions.
1290 * mathbuiltins.def: Add comment. Change third argument. Use
1291 DEFINE_MATH_BUILTIN_C. Add bessel and error functions.
1292 * trans-intrinsic.c (BUILT_IN_FUNCTION): Define.
1293 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
1294 * trans-types.c (gfc_c_int_kind): Declare.
1295 (gfc_init_kinds): Set it.
1297 2004-08-29 Steven G. Kargl <kargls@comcast.net>
1298 Paul Brook <paul@codesourcery.com>
1300 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
1301 (gfc_check_f, gfc_simplify_f): Add f0.
1302 * intrinsic.c (do_check): Call f0. Flatten.
1303 (add_sym_0): Fix prototype. Set f0.
1304 (add_functions): Add getgid, getgid and getuid.
1305 (resolve_intrinsic): Remove obsolete comment.
1306 (do_simplify): Call f0.
1307 * intrinsic.h (gfc_resolve_getgid, gfc_resolve_getpid,
1308 gfc_resolve_getuid): Add prototypes.
1309 * iresolve.c (gfc_resolve_getgid, gfc_resolve_getpid,
1310 gfc_resolve_getuid): New functions.
1311 * trans-intrinsic.c (gfc_conv_intrinsic_function): Handle
1314 2004-08-28 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1316 * error.c (gfc_error_init_1): Remove blank line in front of
1317 function body. Add missing blank.
1318 (gfc_buffer_error, error_char, error_string): Remove blank line in
1319 front of function body.
1320 (show_locus): Add comma in comment.
1321 (gfc_clear_warning, gfc_warning_check, gfc_clear_error,
1322 gfc_push_error, gfc_pop_error): Remove blank line in front of
1324 (gfc_get_errors): Typo fix in comment in front of function. Remove
1325 blank line in front of function body.
1327 2004-08-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1329 * gfortran.h (gfc_default_*_kind): Remove prototypes, add extern
1330 variable declaration of same name.
1331 * arith.c, check.c, decl.c, dump_parse_tree.c, expr.c,
1332 intrinsic.c, io.c, iresolve.c, match.c, options.c, primary.c,
1333 resolve.c, simplify.c, symbol.c, trans-const.c, trans-io.c:
1334 Replace all calls to gfc_default_*_kind with variable accesses.
1335 * trans-types.c: Same as above.
1336 (gfc_default_*_kind_1): Rename to gfc_default_*_kind, remove
1337 static qualifier. Replace all occurences.
1338 (gfc_default_*_kind): Remove functions.
1340 2004-08-26 Richard Henderson <rth@redhat.com>
1342 * arith.c: Include system.h, not real system headers.
1343 (MPZ_NULL, MPF_NULL, DEF_GFC_INTEGER_KIND, DEF_GFC_LOGICAL_KIND,
1344 DEF_GFC_REAL_KIND, GFC_SP_KIND, GFC_SP_PREC, GFC_SP_EMIN, GFC_SP_EMAX,
1345 GFC_DP_KIND, GFC_DP_PREC, GFC_DP_EMIN, GFC_DP_EMAX, GFC_QP_KIND,
1346 GFC_QP_PREC, GFC_QP_EMIN, GFC_QP_EMAX): Remove.
1347 (gfc_integer_kinds, gfc_logical_kinds, gfc_real_kinds,
1348 gfc_index_integer_kind, gfc_default_integer_kind,
1349 gfc_default_real_kind,gfc_default_double_kind,
1350 gfc_default_character_kind, gfc_default_logical_kind,
1351 gfc_default_complex_kind, validate_integer, validate_real,
1352 validate_logical, validate_character,
1353 gfc_validate_kind): Move to trans-types.c.
1354 (gfc_set_model_kind): Use gfc_validate_kind.
1355 (gfc_set_model): Just copy the current precision to default.
1356 (gfc_arith_init_1): Use mpfr precision 128 for integer setup.
1357 * f95-lang.c (gfc_init_decl_processing): Invoke gfc_init_kinds.
1358 * gfortran.h: Update file commentary.
1359 * trans-types.c (MAX_INT_KINDS, MAX_REAL_KINDS): New.
1360 (gfc_default_integer_kind_1, gfc_default_real_kind_1,
1361 gfc_default_double_kind_1, gfc_default_character_kind_1,
1362 gfc_default_logical_kind_1, gfc_default_complex_kind_1): New.
1363 (gfc_init_kinds): New.
1364 (gfc_init_types): Don't set gfc_index_integer_kind here.
1365 * trans-types.h (gfc_init_kinds): Declare.
1366 * doc/invoke.texi: Clarify DOUBLE PRECISION behaviour wrt -r8.
1368 2004-08-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1370 * check.c (gfc_check_atan2): New function.
1371 * intrinsic.c (add_functions): Use gfc_check_atan2 for ATAN2
1372 * intrinsic.h (gfc_check_atan2): Add prototype.
1374 2004-08-25 Richard Henderson <rth@redhat.com>
1376 * arith.c (gfc_validate_kind): Add may_fail argument; abort if
1377 false and we don't validate the kind.
1378 (gfc_check_integer_range, gfc_check_real_range): Update to match.
1379 * check.c (kind_check): Likewise.
1380 * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Likewise.
1381 (match_char_spec, match_logical_spec): Likewise.
1382 * gfortran.h (gfc_validate_kind): Likewise.
1383 * options.c (gfc_handle_option): Likewise.
1384 * primary.c (match_integer_constant, match_real_constant,
1385 match_string_constant, match_logical_constant,
1386 match_const_complex_part): Likewise.
1387 * simplify.c (get_kind, gfc_simplify_bit_size, gfc_simplify_digits,
1388 gfc_simplify_epsilon, gfc_simplify_huge, gfc_simplify_ibclr,
1389 gfc_simplify_ibset, gfc_simplify_ishft, gfc_simplify_ishftc,
1390 gfc_simplify_maxexponent, gfc_simplify_minexponent,
1391 gfc_simplify_nearest, gfc_simplify_not, gfc_simplify_precision,
1392 gfc_simplify_radix, gfc_simplify_range, gfc_simplify_rrspacing,
1393 gfc_simplify_scale, gfc_simplify_spacing, gfc_simplify_tan,
1394 gfc_simplify_tiny): Likewise.
1395 * trans-intrinsic.c (gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod,
1396 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
1397 prepare_arg_info): Likewise.
1399 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1401 * expr.c (gfc_check_assign): Add comment. Add new warning.
1402 * trans-expr.c (gfc_conv_function_call): Correctly dereference
1403 result of pointer valued function when not in pointer assignment.
1405 2004-08-25 Paul Brook <paul@codesourcery.com>
1407 * config-lang.in: Remove dead commented line.
1408 * module.c: Replace g95 with gfortran in comment.
1410 2004-08-25 Paul Brook <paul@codesourcery.com>
1413 * arith.c (gfc_mpfr_to_mpz): Workaround mpfr bug.
1415 2004-08-25 Paul Brook <paul@codesourcery.com>
1418 * trans-array.c (gfc_trans_allocate_temp_array): Remove
1419 string_length argument.
1420 (gfc_trans_array_ctor_element): New function.
1421 (gfc_trans_array_constructor_subarray): Use it.
1422 (gfc_trans_array_constructor_value): Ditto. Handle constant
1424 (get_array_ctor_var_strlen, get_array_ctor_strlen): New functions.
1425 (gfc_trans_array_constructor): Use them.
1426 (gfc_add_loop_ss_code): Update to new gfc_ss layout.
1427 (gfc_conv_ss_descriptor): Remember section string length.
1428 (gfc_conv_scalarized_array_ref): Ditto. Remove dead code.
1429 (gfc_conv_resolve_dependencies): Update to new gfc_ss layout.
1430 (gfc_conv_expr_descriptor): Ditto.
1431 (gfc_conv_loop_setup): Ditto. Spelling fixes.
1432 * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
1433 * trans-const.c (gfc_conv_constant): Update to new gfc_ss layout.
1434 * trans-expr.c (gfc_conv_component_ref): Turn error into ICE.
1435 (gfc_conv_variable): Set string_length from section.
1436 (gfc_conv_function_call): Remove extra argument.
1437 (gfc_conv_expr, gfc_conv_expr_reference): Update to new gfc_ss layout.
1438 * trans-types.c (gfc_get_character_type_len): New function.
1439 (gfc_get_character_type): Use it.
1440 (gfc_get_dtype): Return zero for internal types.
1441 * trans-types.h (gfc_get_character_type_len): Add prototype.
1442 * trans.h (struct gfc_ss): Move string_length out of union.
1444 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1446 * trans.h (build2_v, build3_v): New macros.
1448 * f95-lang.c (gfc_truthvalue_conversion): Use build2 instead of
1450 * trans-array.c (gfc_conv_descriptor_data,
1451 gfc_conv_descriptor_offset, gfc_conv_descriptor_dimension,
1452 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
1453 gfc_conv_descriptor_ubound, gfc_trans_allocate_array_storage,
1454 gfc_trans_allocate_temp_array,
1455 gfc_trans_array_constructor_subarray,
1456 gfc_trans_array_constructor_value, gfc_conv_array_index_ref,
1457 gfc_trans_array_bound_check, gfc_conv_array_index_offset,
1458 gfc_conv_scalarized_array_ref, gfc_conv_array_ref,
1459 gfc_conv_array_ref, gfc_trans_preloop_setup,
1460 gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
1461 gfc_conv_loop_setup, gfc_array_init_size,
1462 gfc_conv_array_initializer, gfc_trans_array_bounds,
1463 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
1464 gfc_conv_expr_descriptor, gfc_conv_array_parameter,
1465 gfc_trans_deferred_array): Use buildN and buildN_v macros instead
1466 of build and build_v as appropriate.
1467 * trans-common.c (create_common): Same.
1468 * trans-decl.c (gfc_trans_auto_character_variable,
1469 gfc_trans_entry_master_switch, gfc_generate_function_code): Same.
1470 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
1471 gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
1472 gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
1473 gfc_conv_expr_op, gfc_conv_function_call,
1474 gfc_trans_structure_assign): Same.
1475 * trans-intrinsic.c (build_fixbound_expr, build_round_expr,
1476 gfc_conv_intrinsic_aint, gfc_conv_intrinsic_bound,
1477 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
1478 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
1479 gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_minmax,
1480 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
1481 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_minmaxloc,
1482 gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
1483 gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_singlebitop,
1484 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
1485 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_strcmp,
1486 gfc_conv_allocated, gfc_conv_associated, prepare_arg_info,
1487 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
1488 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat,
1489 gfc_conv_intrinsic_iargc): Same.
1490 * trans-io.c (set_parameter_value, set_parameter_ref, set_string,
1491 set_flag, add_case, io_result, transfer_namelist_element,
1492 transfer_expr): Same.
1493 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_if_1,
1494 gfc_trans_arithmetic_if, gfc_trans_do, gfc_trans_do_while,
1495 gfc_trans_integer_select, gfc_trans_logical_select,
1496 gfc_trans_character_select, gfc_trans_forall_loop,
1497 gfc_trans_nested_forall_loop, gfc_do_allocate,
1498 generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
1499 compute_inner_temp_size, compute_overall_iter_number,
1500 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
1501 gfc_trans_forall_1, gfc_evaluate_where_mask,
1502 gfc_trans_where_assign, gfc_trans_allocate): Same.
1503 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Same.
1504 * trans.c (gfc_add_modify_expr, gfc_finish_block,
1505 gfc_build_array_ref, gfc_build_function_call,
1506 gfc_trans_runtime_check): Same.
1508 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1510 * trans-const.c (gfc_conv_mpz_to_tree): Change call to
1511 build_int_cst to build_int_cst_wide in accordance to Nathan's
1514 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
1516 * trans-array.c (gfc_trans_array_constructor_value): Adjust
1517 build_int_cst calls.
1518 * trans-const.c (gfc_build_string_const, gfc_init_constants,
1519 gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise.
1520 * trans-decl.c (gfc_get_symbol_decl, build_entry_thunks,
1521 gfc_trans_entry_master_switch): Likewise.
1522 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
1523 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
1524 * trans-io.c (add_case, set_error_locus,
1525 transfer_namelist_element, transfer_expr): Likewise.
1526 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
1527 gfc_trans_stop, gfc_trans_character_select): Likewise.
1528 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
1529 * trans.c (gfc_trans_runtime_check): Likewise.
1531 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1533 * trans-decl.c, trans-types.c: Add and remove blank lines as
1536 2004-08-24 Richard Henderson <rth@redhat.com>
1538 * trans-const.c (gfc_conv_mpz_to_tree): Fix 64-bit shift warning.
1540 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1542 * resolve.c (merge_argument_lists): Revert unintentionally
1545 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1547 * trans-decl.c (build_function_decl): Fix spelling in comment.
1548 (build_entry_thunks): Remove code with no function.
1549 (gfc_build_intrinsic_function_decls): Remove empty line.
1551 * resolve.c (resolve_entries): Fix a bunch of comment typos.
1553 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
1555 * f95-lang.c (gfc_init_decl_processing): Adjust
1556 build_common_tree_nodes call.
1558 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1560 * trans-types.c: Spelling and formatting fixes.
1562 2004-08-23 Richard Henderson <rth@redhat.com>
1564 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_getlimbn instead
1565 of going through an intermediate string. Fix 32/64 int/long bug.
1567 2004-08-23 Eric Christopher <echristo@redhat.com>
1569 * trans-types.c (gfc_type_for_mode): Remove VECTOR_TYPE_SUPPORTED_P
1570 usage. Use build_vector_type_for_mode for vector types.
1572 2004-08-22 Richard Henderson <rth@redhat.com>
1575 * data.c (find_con_by_offset): Search ordered list; handle
1576 elements with repeat counts.
1577 (gfc_assign_data_value_range): New.
1578 * gfortran.h (struct gfc_data_value): Make repeat unsigned.
1579 (gfc_assign_data_value_range): Declare.
1580 * match.c (top_val_list): Extract repeat count into a temporary.
1581 * resolve.c (values): Make left unsigned.
1582 (next_data_value): Don't decrement left.
1583 (check_data_variable): Use gfc_assign_data_value_range.
1585 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1587 * trans-const.c, trans-decl.c, trans-expr.c: Spelling fixes.
1589 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1591 * check.c (gfc_check_reduction): Rename to ...
1592 (check_reduction): ... this. Make static. Don't check type of
1594 (gfc_check_minval_maxval, gfc_check_prodcut_sum): New functions.
1595 * intrinsic.c (add_functions): Change MAXVAL, MINVAL, PRODUCT and
1596 SUM to use new check functions.
1597 (check_specific): Change logic to call new functions.
1598 * intrinsic.h (gfc_check_minval_maxval, gfc_check_product_sum):
1600 (gfc_check_reduction): Remove prototype.
1602 2004-08-20 Paul Brook <paul@codesourcery.com>
1603 Canqun Yang <canqun@nudt.edu.cn>
1606 * trans-array.c (gfc_conv_array_parameter): Pass correct pointer
1607 for automatic arrays.
1608 * trans-types.c (gfc_get_nodesc_array_type): Add comment.
1610 2004-08-19 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1614 * match.c (match_simple_forall, match_simple_where): Forward-declare.
1615 (gfc_match_if): Order statement list alphabetically, add WHERE and
1616 FORALL, remove double PAUSE.
1617 (gfc_match_simple_where, match_forall_header,
1618 gfc_match_simple_forall): New functions.
1619 (gfc_match_forall): Use match_forall_header.
1621 2004-08-19 Paul Brook <paul@codesourcery.com>
1624 * gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0.
1625 * symbol.c (gfc_clear_attr): Use memset.
1627 2004-08-19 Paul Brook <paul@codesourcery.com>
1631 * data.c (assign_substring_data_value): Remove.
1632 (create_character_intializer): New function.
1633 (gfc_assign_data_value): Track the typespec for the current
1634 subobject. Use create_character_intializer.
1636 2004-08-19 Erik Schnetter <schnetter@aei.mpg.de>
1639 * check.c (gfc_check_reduction): New function.
1640 (gfc_check_minval_maxval): Removed.
1641 (gfc_check_product): Removed.
1642 (gfc_check_sum): Removed.
1643 * intrinsic.h: Add/remove declarations for these.
1644 * gfortran.h: Add field f3red to union gfc_check_f.
1645 * intrinsic.c (add_sym_3red): New function.
1646 (add_functions): Register maxval, minval, product, and sum intrinsics
1647 through add_sym_3red.
1648 (check_specific): Handle f3red union field.
1649 * iresolve.c: Whitespace change.
1651 2004-08-18 Paul Brook <paul@codesourcery.com>
1653 * trans-types.c (gfc_sym_type): Use pointer types for optional args.
1655 2004-08-18 Victor Leikehman <lei@il.ibm.com>
1658 * trans-io.c (transfer_namelist_element): New. Recursively handle
1659 derived-type variables. Pass string lengths.
1660 (build_dt): Code moved to build_namelist, with some
1661 changes and additions.
1662 (gfc_build_io_library_fndecls): Declare the fifth
1663 argument in st_set_nml_var_char -- string_length.
1665 2004-08-17 Paul Brook <paul@codesourcery.com>
1666 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1669 * decl.c (get_proc_name): Update mystery comment.
1670 (gfc_match_entry): Check for errors earlier. Add entry point to list.
1671 * dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes.
1672 * gfortran.h (symbol_attribute): Add entry_master. Document entry.
1673 (struct gfc_entry_list): Define.
1674 (gfc_get_entry_list): Define.
1675 (struct gfc_namespace): Add refs and entries.
1676 (enum gfc_exec_op): Add EXEC_ENTRY.
1677 (struct gfc_code): Add ext.entry.
1678 * module.c (ab_attribute, attr_bits): Remove AB_ENTRY.
1679 (mio_symbol_attribute): Don't save/reture addr->entry.
1680 (mio_namespace_ref): Refcount namespaces.
1681 * parse.c (accept_statement): Handle ST_ENTRY.
1682 (gfc_fixup_sibling_symbols): Mark symbol as referenced.
1683 (parse_contained): Fixup sibling references to entry points
1684 after parsing the procedure body.
1685 * resolve.c (resolve_contained_fntype): New function.
1686 (merge_argument_lists, resolve_entries): New functions.
1687 (resolve_contained_functions): Use them.
1688 (resolve_code): Handle EXEC_ENTRY.
1689 (gfc_resolve): Call resolve_entries.
1690 * st.c (gfc_free_statement): Handle EXEC_ENTRY.
1691 * symbol.c (gfc_get_namespace): Refcount namespaces.
1692 (gfc_free_namespace): Ditto.
1693 * trans-array.c (gfc_trans_dummy_array_bias): Treat all args as
1694 optional when multiple entry points are present.
1695 * trans-decl.c (gfc_get_symbol_decl): Remove incorrect check.
1696 (gfc_get_extern_function_decl): Add assertion. Fix coment.
1697 (create_function_arglist, trans_function_start, build_entry_thunks):
1699 (gfc_build_function_decl): Rename ...
1700 (build_function_decl): ... to this.
1701 (gfc_create_function_decl): New function.
1702 (gfc_generate_contained_functions): Use it.
1703 (gfc_trans_entry_master_switch): New function.
1704 (gfc_generate_function_code): Use new functions.
1705 * trans-stmt.c (gfc_trans_entry): New function.
1706 * trans-stmt.h (gfc_trans_entry): Add prototype.
1707 * trans-types.c (gfc_get_function_type): Add entry point argument.
1708 * trans.c (gfc_trans_code): Handle EXEC_ENTRY.
1709 (gfc_generate_module_code): Call gfc_create_function_decl.
1710 * trans.h (gfc_build_function_decl): Remove.
1711 (gfc_create_function_decl): Add prototype.
1713 2004-08-15 Andrew Pinski <apinski@apple.com>
1716 * f95-lang.c (gfc_init_builtin_functions): Initialize the builtins
1717 for cabs{,f} and copysign{,f}.
1718 * trans-decl.c (gfor_fndecl_math_cabsf): Delete.
1719 (gfor_fndecl_math_cabs): Delete.
1720 (gfor_fndecl_math_sign4): Delete.
1721 (gfor_fndecl_math_sign8): Delete.
1722 (gfc_build_intrinsic_function_decls): Remove the
1723 initializing of cabs{,f} and copysign{,f} functions.
1724 * trans-intrinsic.c (gfc_conv_intrinsic_abs): Use the builtins
1725 instead of the functions definitions.
1726 (gfc_conv_intrinsic_sign): Likewise.
1727 * trans.h (gfor_fndecl_math_cabsf): Delete.
1728 (gfor_fndecl_math_cabs): Delete.
1729 (gfor_fndecl_math_sign4): Delete.
1730 (gfor_fndecl_math_sign8): Delete.
1732 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
1734 * trans-array.c (gfc_trans_array_constructor_value): Use
1736 * trans-const.c (gfc_build_string_const,
1737 gfc_init_constants, gfc_conv_mpz_to_tree,
1738 gfc_conv_constant_to_tree): Likewise.
1739 * trans-decl.c (gfc_get_symbol_decl): Likewise.
1740 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
1741 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
1742 * trans-io.c (add_case, set_error_locus, build_dt,
1743 transfer_expr): Likewise.
1744 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
1745 gfc_trans_stop, gfc_trans_character_select): Likewise.
1746 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
1747 * trans.c (gfc_trans_runtime_check): Likewise.
1749 2004-08-14 Paul Brook <paul@codesourcery.com>
1751 * trans-decl.c (gfc_build_function_decl): Remove dead code.
1753 2004-08-14 Paul Brook <paul@codesourcery.com>
1755 * trans-arry.c (gfc_trans_auto_array_allocation): Remove unused var.
1757 2004-08-13 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1759 * gfortran.h: Add comments.
1760 * parse.c (parse_contained): Fix comment typo.
1761 * resolve.c (was_declared): Ditto.
1764 2004-08-11 Paul Brook <paul@codeourcery.com>
1767 * intrinsic.c (add_functions): Add dfloat as an alias for dble.
1769 2004-08-10 Richard Henderson <rth@redhat.com>
1771 * f95-lang.c (gfc_init_builtin_functions): Remove
1772 __builtin_stack_alloc, add __builtin_alloca.
1773 * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR.
1774 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
1776 2004-08-10 Paul Brook <paul@codesourcery.com>
1778 * trans-io.c (transfer_expr): Handle pointters.
1780 2004-08-10 Paul Brook <paul@codesourcery.com>
1783 * trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT.
1784 (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta.
1785 (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary):
1786 Handle GFC_SS_COMPONENT.
1787 (gfc_conv_ss_startstride): Ditto. Set ss->shape.
1788 (gfc_conv_loop_setup): Tweak commends. Remove dead code.
1790 (gfc_conv_array_initializer): Call specific initializer routines.
1791 * trans-expr.c (gfc_trans_structure_assign): New function.
1792 (gfc_trans_subarray_assign): New function.
1793 (gfc_trans_subcomponent_assign): New fucntion
1794 (gfc_conv_structure): Use them.
1795 * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT.
1796 (gfc_ss): Add shape.
1798 2004-08-08 Victor Leikehman <lei@il.ibm.com>
1800 * simplify.c (gfc_simplify_shape): Bugfix.
1801 * expr.c (gfc_copy_shape_excluding): New function.
1802 * gfortran.h (gfc_get_shape): Bugfix.
1803 (gfc_copy_shape_excluding): Added declaration.
1804 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
1805 gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound,
1806 gfc_resolve_ubound, gfc_resolve_transpose): Added compile
1807 time resolution of shape.
1809 2004-08-06 Janne Blomqvist <jblomqvi@cc.hut.fi>
1811 * intrinsic.c (add_subroutines): Add getenv and
1812 get_environment_variable. (add_sym_5s): New function.
1813 * intrinsic.h (gfc_resolve_get_environment_variable): Add
1815 * iresolve.c (gfc_resolve_get_environment_variable): New
1818 2004-08-06 Feng Wang <fengwang@nudt.edu.cn>
1820 * f95-lang.c (gfc_init_builtin_functions): Fix the number of
1821 __builtin_pow[f] arguments.
1823 2004-08-06 Steven G. Kargl <kargls@comcast.net>
1825 * arith.c: Add #define for model numbers. Remove global GMP variables.
1826 (natural_logarithm,common_logarithm,exponential,sine,
1827 cosine,arctangent,hypercos,hypersine ): Remove.
1828 (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions.
1829 (arctangent2,gfc_arith_init_1,gfc_arith_done_1
1830 gfc_check_real_range, gfc_constant_result, gfc_range_check,
1831 gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times,
1832 gfc_arith_divide,complex_reciprocal,complex_pow_ui,
1833 gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real,
1834 gfc_convert_complex,gfc_int2real,gfc_int2complex,
1835 gfc_real2int,gfc_real2real,gfc_real2complex,
1836 gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP
1837 to MPFR, use new functions.
1838 * arith.h: Remove extern global variables.
1839 (natural_logarithm,common_logarithm,exponential, sine, cosine,
1840 arctangent,hypercos,hypersine): Remove prototypes.
1841 (arctangent2): Update prototype from GMP to MPFR.
1842 (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes.
1843 * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR.
1844 * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR.
1845 * gfortran.h (GFC_REAL_BITS): Remove.
1846 (arith): Add ARITH_NAN.
1847 Include mpfr.h. Define GFC_RND_MODE.
1848 Rename GCC_GFORTRAN_H GFC_GFC_H.
1849 (gfc_expr): Convert GMP to MPFR.
1850 * module.c: Add arith.h, correct type in comment.
1851 (mio_gmp_real): Convert GMP to MPFR.
1852 (mio_expr): Use gfc_set_model_kind().
1853 * primary.c: Update copyright date with 2004.
1854 (match_real_constant,match_const_complex_part): Convert GMP to MPFR.
1855 * simplify.c: Remove global GMP variables
1856 (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag,
1857 gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint,
1858 gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan,
1859 gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx,
1860 gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh,
1861 gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon,
1862 gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor,
1863 gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int,
1864 gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log,
1865 gfc_simplify_log10,simplify_min_max,gfc_simplify_mod,
1866 gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint,
1867 gfc_simplify_rrspacing,gfc_simplify_scale,
1868 gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin,
1869 gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt,
1870 gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny,
1871 gfc_simplify_init_1,gfc_simplify_done_1): Convert GMP to MPFR.
1873 * trans-const.c (gfc_conv_mpfr_to_tree): Rename from
1874 gfc_conv_mpf_to_tree. Convert it to use MPFR
1875 (gfc_conv_constant_to_tree): Use it.
1876 * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree().
1877 * trans-intrinsic.c: Add arith.h, remove gmp.h
1878 (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR.
1880 2004-08-06 Victor Leikehman <lei@il.ibm.com>
1881 Paul Brook <paul@codesourcery.com>
1883 * trans-array.c (gfc_trans_allocate_array_storage,
1884 gfc_trans_allocate_temp_array, gfc_add_loop_ss_code,
1885 gfc_conv_loop_setup): For functions, if the shape of the result
1886 is not known in compile-time, generate an empty array descriptor for
1887 the result and let the callee to allocate the memory.
1888 (gfc_trans_dummy_array_bias): Do nothing for pointers.
1889 (gfc_conv_expr_descriptor): Use function return values directly.
1890 * trans-expr.c (gfc_conv_function_call): Always add byref call
1892 (gfc_trans_pointer_assignment): Add comments.
1893 (gfc_trans_arrayfunc_assign): Don't chain on expression.
1895 2004-08-01 Roger Sayle <roger@eyesopen.com>
1897 * options.c (gfc_init_options): Don't warn about the use GNU
1898 extensions by default.
1899 (gfc_post_options): Warn about GNU extensions with -pedantic.
1900 (gfc_handle_option): Don't warn about GNU extensions with -std=gnu.
1902 2004-07-30 Richard Henderson <rth@redhat.com>
1904 * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL
1907 2004-07-25 Richard Henderson <rth@redhat.com>
1909 * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL
1910 and DECL_IGNORED_P on RESULT_DECL.
1911 (gfc_generate_constructors): Likewise.
1913 2004-07-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1916 * lang.opt (ffixed-line-length-none, ffixed-line-length-): New
1918 (ffixed-line-length-80, ffixed-line-length-132): Remove.
1919 * options.c (gfc_handle_options): Deal with changed options.
1920 * scanner.c (load_line): Change second arg to 'char **',
1921 allocate if pointing to NULL. Keep track of buffer's length.
1922 Adapt buffer size to overlong lines. Pad lines to full length
1924 (load_file): Adapt to new interface of load_line.
1926 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
1928 * trans.h (builtin_function): Declare.
1930 2004-07-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1933 (parts ported from g95)
1934 * parse.h (gfc_state_data): New field do_variable.
1935 (gfc_check_do_variable): Add prototype.
1936 * parse.c (push_state): Initialize field 'do_variable'.
1937 (gfc_check_do_variable): New function.
1938 (parse_do_block): Remember do iterator variable.
1939 (parse_file): Initialize field 'do_variable'.
1940 * match.c (gfc_match_assignment, gfc_match_do,
1941 gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate):
1942 Add previously missing checks.
1943 (gfc_match_return): Reformat error message.
1944 * io.c (match_out_tag): New function.
1945 (match_open_element, match_close_element,
1946 match_file_element, match_dt_element): Call match_out_tag
1947 instead of match_vtag where appropriate.
1948 (match_io_iterator, match_io_element): Add missing check.
1949 (match_io): Reformat error message.
1950 (match_inquire_element): Call match_out_tag where appropriate.
1952 * parse.c (gfc_check_do_variable): Fix error locus.
1954 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1957 * trans-decl.c (gfc_build_function_decl): Create a new chardecl
1958 for every assumed length character dummy argument.
1961 * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion.
1964 * simplify.c (gfc_simplify_bound): Copy the bound expression.
1966 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1969 * trans-array.c gfc_trans_g77_array,
1970 gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init
1971 for assumed length characters.
1972 (gfc_conv_expr_descriptor): Set se->string_length if dealing
1973 with a character expression.
1974 (gfc_cvonv_array_parameter): Pass string length when passing
1975 character array according to g77 conventions.
1977 2004-07-12 Paul Brook <paul@codesourcery.com>
1979 * expr.c (gfc_check_assign_symbol): Handle pointer assignments.
1980 * trans-array.c (gfc_trans_auto_array_allocation): Remove
1981 initialization code.
1982 * trans-common.c (create_common): Use gfc_conv_initializer.
1983 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer.
1984 * trans-expr.c (gfc_conv_initializer): New function.
1985 (gfc_conv_structure): Use it.
1986 * trans.h (gfc_conv_initializer): Add prototype.
1988 2004-07-11 Paul Brook <paul@codesourcery.com>
1991 * parse.c (gfc_fixup_sibling_symbols): Also look for untyped
1993 (parse_contained): Mark contained symbols as referenced.
1995 2004-07-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1998 * module.c (gfc_dump_module, gfc_use_module): Print locus
1999 when opening of module file fails.
2002 * io.c (match_io): Flag 'WRITE(...), ...' as extension.
2005 * match.c (gfc_match_program): A program name is obligatory.
2006 (gfc_match_return): RETURN in main program is an extension.
2007 (gfc_match_block_data): A space is required before a block data
2011 * primary.c (match_boz_constant): Call gfc_notify_std only if
2012 we actually have a non-standard boz-literal-constant.
2015 * expr.c (gfc_check_assign): Print ranks if incompatible. Issue
2016 warning if assigning NULL().
2018 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
2020 * f95-lang.c (set_block): Remove.
2021 (gfc_clear_binding_stack): New.
2022 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
2023 (struct binding_level): Remove block_created_by_back_end.
2024 (clear_binding_level): Likewise.
2025 (poplevel): Don't handle block_created_by_back_end.
2027 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2029 * trans-decl.c (gfc_create_module_variable): Nothing to do if
2030 symbol is in common, because we ...
2031 (gfc_generate_module_vars): Call gfc_trans_common.
2033 2004-07-10 Paul Brook <paul@codesourcery.com>
2035 * trans-array.c (gfc_build_null_descriptor): New function.
2036 (gfc_trans_static_array_pointer): Use it.
2037 * trans-array.h (gfc_build_null_descriptor): Add prototype.
2038 * trans-expr.c (gfc_conv_structure): Handle array pointers.
2040 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2043 * decl.c (gfc_match_save): Use-associated common block
2045 * gfortran.h (gfc_common_head): Add new field 'name'.
2046 Fix typo in comment after #endif.
2047 * match.c (gfc_get_common): Add new argument from_common,
2048 mangle name if flag is set, fill in new field in structure
2050 (match_common): Set new arg in call to gfc_get_common,
2051 use-associated common block doesn't collide.
2052 * match.h (gfc_get_common): Adapt prototype.
2053 * module.c (load_commons): Set new arg in call to
2055 * symbol.c (free_common_tree): New function.
2056 (gfc_free_namespace): Call new function.
2057 * trans-common.c (several functions): Remove argument
2058 'name', use name from gfc_common_head instead.
2060 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2062 * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
2063 and RHS match. Return early if the RHS is NULL().
2066 * match.c (match_common): Fix error reporting for used common.
2069 * trans-expr.c (gfc_conv_structure): Handle initialization
2070 of scalar pointer components.
2072 * parse.c (decode_statement): Fix matching of BLOCK DATA.
2074 * trans-decl.c (generate_local_decl): Remove workaround obsoleted
2075 by fix for PR 15481.
2077 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2079 * trans-common.c: Fix whitespace issues, make variable names
2081 (create_common): Additionally, make loop logic more obvious.
2083 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2084 Paul Brook <paul@codesourcery.com>
2087 * trans-common.c (calculate_length): Remove ...
2088 (get_segment_info): Merge into here. Save field type.
2089 (build_field): Use saved type.
2090 (create_common, new_condition, new_segment, finish_equivalences):
2091 Use new get_segment_info.
2092 * trans-types.c: Update comment.
2094 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2097 * moduele.c (mio_symbol): Don't I/O initial values unless
2098 symbol is a parameter.
2100 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2103 * resolve.c (resolve_symbol): Verify that the shape of a
2104 parameter array is not only explicit, but also constant.
2105 * array.c (gfc_is_compile_time_shape): New function.
2106 * gfortran.h (gfc_is_compile_time_shape): Add prototype.
2108 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2114 * module.c (write_symbol, write_symtree): Remove workaround.
2115 * primary.c (match_actual_arglist): Enhance comment.
2116 (gfc_match_rvalue): Handle function call with first argument
2117 a keyword argument correctly.
2118 * resolve.c (resolve_symbol): Change call to
2119 gfc_set_default_type to issue error if no implicit type
2121 * trans-decl.c (gfc_create_module_variable): Remove workaround.
2123 2004-07-08 Paul Brook <paul@codesourcery.com>
2125 * intrinsic.c (add_sym_4s): New function.
2126 (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
2128 2004-07-04 Janne Blomqvist <jblomqvi@cc.hut.fi>
2129 Paul Brook <paul@codesourcery.com>
2133 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
2134 GFC_ISYM_COMMAND_ARGUMENT_COUNT.
2135 * intrinsic.c (add_functions): Identify iargc. Add
2136 command_argument_count.
2137 (add_subroutines): Resolve getarg. Add get_command and
2138 get_command_argument.
2139 * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
2140 gfc_resolve_get_command_argument): Add prototypes.
2141 * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
2142 gfc_resolve_get_command_argument): New functions.
2143 * trans-decl.c (gfor_fndecl_iargc): New variable.
2144 (gfc_build_intrinsic_function_decls): Set it.
2145 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
2146 (gfc_conv_intrinsic_function): Use it.
2147 * trans.h (gfor_fndecl_iargc): Declare.
2149 2004-07-04 Matthias Klose <doko@debian.org>
2151 * Make-lang.in: Generate and install gfortran man page.
2152 * invoke.texi: Remove extra '@c man end'.
2154 2004-07-04 Richard Henderson <rth@redhat.com>
2156 * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
2158 2004-07-04 Paul Brook <paul@codesourcery.com>
2160 * decl.c (gfc_match_implicit_range): Don't use typespec.
2161 (gfc_match_implicit): Handle character selectors.
2162 * gfortran.h (gfc_set_implicit): Remove prototype.
2163 (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
2164 * parse.c (accept_statement): Don't call gfc_set_implicit.
2165 * symbol.c (new_ts): Remove.
2166 (gfc_set_implicit_none): Use same loop bounds as other functions.
2167 (gfc_set_implicit): Remove.
2168 (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
2169 (gfc_merge_new_implicit): Combine with gfc_set_implicit.
2171 2004-06-30 Richard Henderson <rth@redhat.com>
2173 * match.c (var_element): Remove unused variable.
2175 * trans-decl.c (gfc_generate_function_code): Don't set
2176 x_whole_function_mode_p.
2177 (gfc_generate_constructors): Likewise.
2179 2004-06-30 Richard Henderson <rth@redhat.com>
2181 * trans-decl.c (gfc_generate_function_code): Don't set
2182 immediate_size_expand.
2183 (gfc_generate_constructors): Likewise.
2185 2004-06-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2188 * decl.c (gfc_match_type_spec): Rename second argument to
2189 'implicit_flag', reverse meaning. Don't match_char_spec if
2190 'implicit_flag' is set. Rename to ...
2191 (match_type_spec): ... this.
2192 (gfc_match_implicit_none, match_implicit_range): Move here
2194 (gfc_match_implicit): Move here from match.c, try to
2195 match_char_len if match_implicit_range doesn't succeed for
2196 CHARACTER implicits. Call renamed fucntion match_type_spec.
2197 (gfc_match_data_decl, match_prefix): Call renamed function
2199 * match.c (gfc_match_implicit_none, match_implicit_range,
2200 gfc_match_implicit): Move to decl.c.
2201 * match.h (gfc_match_implicit_none, gfc_match_implicit):
2202 Move protoypes to section 'decl.c'.
2203 (gfc_match_type_spec): Remove prototype.
2205 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2207 * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
2210 2004-06-29 Steven Bosscher <stevenb@suse.de>
2212 Make sure types in assignments are compatible. Mostly mechanical.
2213 * trans-const.h (gfc_index_one_node): New define.
2214 * trans-array.c (gfc_trans_allocate_array_storage,
2215 gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
2216 gfc_trans_array_constructor_value, gfc_trans_array_constructor,
2217 gfc_conv_array_ubound, gfc_conv_array_ref,
2218 gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
2219 gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
2220 gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
2221 gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
2222 types in assignments, conversions and conditionals for expressions.
2223 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
2224 gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
2225 gfc_conv_function_call, gfc_trans_pointer_assignment,
2226 gfc_trans_scalar_assign): Likewise.
2227 * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
2228 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
2229 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
2230 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
2231 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
2232 gfc_conv_allocated, gfc_conv_associated,
2233 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
2234 * trans-io.c (set_string): Likewise.
2235 * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
2236 gfc_do_allocate, generate_loop_for_temp_to_lhs,
2237 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
2238 compute_overall_iter_number, gfc_trans_assign_need_temp,
2239 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
2240 gfc_evaluate_where_mask, gfc_trans_where_assign,
2241 gfc_trans_where_2): Likewise.
2242 * trans-types.c (gfc_get_character_type, gfc_build_array_type,
2243 gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
2245 * trans.c (gfc_add_modify_expr): Add sanity check that types
2246 for the lhs and rhs are the same for scalar assignments.
2248 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2250 * dump-parse-tree.c (show_common): New function.
2251 (gfc_show_namespace): Show commons.
2253 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2254 Andrew Vaught <andyv@firstinter.net>
2258 * decl.c (gfc_match_save): Adapt to new common structures,
2259 don't allow saving USE-associated common.
2260 * dump-parse-tree (gfc_show_attr): (saved_)common are not
2261 symbol attributes any longer.
2262 (gfc_show_symbol): Don't show old-style commons any longer.
2263 (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
2265 * gfortran.h (symbol_attribute): Remove common and saved_common
2267 (gfc_symbol): Remove common_head element.
2268 (gfc_common_head): New struct.
2269 (gfc_get_common_head): New macro.
2270 (gfc_symtree): Add field 'common' to union.
2271 (gfc_namespace): Add field 'common_root'; change type of field
2272 'blank_common' to blank_common.
2273 (gfc_add_data): New prototype.
2274 (gfc_traverse_symtree): Expect a symtree as first argument
2275 instead of namespace.
2276 * match.c (gfc_get_common): New function.
2277 (match_common_name): Change to take char * as argument, adapt,
2278 fix bug with empty name.
2279 (gfc_match_common): Adapt to new data structures. Disallow
2280 redeclaration of USE-associated COMMON-block. Fix bug with
2282 (var_element): Adapt to new common structures.
2283 * match.h (gfc_get_common): Declare.
2284 * module.c: Add 2004 to copyright years, add commons to module
2285 file layout description.
2286 (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
2287 for removed attributes.
2288 (mio_symbol): Adapt to new way of storing common relations.
2289 (load_commons): New function.
2290 (read_module): Skip common list on first pass, load_commons at
2292 (write_commons): New function.
2293 (write_module): Call write_commons().
2294 * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
2295 functions related to removed attributes.
2296 (gfc_add_data): New function.
2297 (gfc_clear_attr): Don't set removed attributes.
2298 (gfc_copy_attr): Don't copy removed attributes.
2299 (traverse_symtree): Remove.
2300 (gfc_traverse_symtree): Don't traverse symbol
2301 tree of the passed namespace, but require a symtree to be passed
2302 instead. Unify with traverse_symtree.
2303 (gfc_traverse_ns): Call gfc_traverse_symtree according to new
2305 (save_symbol): Remove setting of removed attribute.
2306 * trans-common.c (gfc_sym_mangled_common_id): Change to
2307 take 'char *' argument instead of 'gfc_symbol'.
2308 (build_common_decl, new_segment, translate_common): Adapt to new
2309 data structures, add new
2311 (create_common): Adapt to new data structures, add new
2312 argument name. Fix typo in intialization of derived types.
2313 (finish_equivalences): Add second argument in call to
2315 (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
2316 (gfc_trans_common): Adapt to new data structures.
2317 * trans-decl.c (gfc_create_module_variables): Remove test for
2320 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2322 * io.c: Add 2004 to copyright years.
2324 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2325 Andrew Vaught <andyv@firstinter.net>
2327 * gfortran.h (gfc_gsymbol): New typedef.
2328 (gfc_gsym_root): New variable.
2329 (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
2330 * parse.c (global_used): New function.
2331 (parse_block_data): Check for double empty BLOCK DATA,
2332 use global symbol table.
2333 (parse_module): Use global symbol table.
2334 (add_global_procedure, add_global_program): New functions.
2335 (gfc_parse_file): Use global symbol table.
2336 * symbol.c (gfc_gsym_root): New variable.
2337 (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
2340 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2342 * module.c (mio_gmp_real): Correct writing of negative numbers.
2344 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2347 * expr.c (check_intrinsic_op): Allow comparison of characters.
2350 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2351 Andrew Vaught <andyv@firstinter.net>
2353 * decl.c (contained_procedure): New function.
2354 (match_end): Verify correctness of END STATEMENT in
2357 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2358 Andrew Vaught <andyv@firstinter.net>
2361 * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
2362 (decode_statement): Enforce required space in free-form.
2364 2004-06-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2366 * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
2367 * trans-array.c (gfc_conv_descriptor_data): Add operand
2369 (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
2370 (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
2371 (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
2372 * trans-common.c (create_common): Likewise.
2373 * trans-expr.c (gfc_conv_component_ref): Likewise.
2374 * trans-io.c (set_parameter_value): Likewise.
2375 (set_parameter_ref, set_string, set_flag, io_result): Likewise.
2376 (transfer_expr): Likewise.
2377 * trans-decl.c (gfc_trans_auto_character_variable):
2378 Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
2379 (gfc_gimplify_function): New function.
2380 (gfc_generate_function-code): Properly handle nested functions.
2381 * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
2383 2004-06-22 Janne Blomqvist <jblomqvi@cc.hut.fi>
2386 * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
2387 (gfc_resolve_inquire): Resolve the iolength tag. Return
2388 SUCCESS at end of function if no failure has occured.
2389 * resolve.c (resolve_code): Resolve if iolength is encountered.
2390 * trans-io.c: (ioparm_iolength, iocall_iolength,
2391 iocall_iolength_done): New variables.
2392 (last_dt): Add IOLENGTH.
2393 (gfc_build_io_library_fndecls ): Set iolength related variables.
2394 (gfc_trans_iolength): Implement.
2395 (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
2397 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de
2400 * scanner.c (load_line): Don't truncate preprocessor lines.
2401 Reformat error message.
2402 (preprocessor_line): Issue warning in case of malformed
2405 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2407 * resolve.c (resolve_symbol): Add comment in function body.
2408 (check_data_variable): Change type of mark to ar_type, adapt code
2411 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2413 * array.c (gfc_insert_constructor): Avoid redundant call to
2414 mpz_comp. Add 2004 to copyright years.
2416 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
2418 * trans.h (stmtblock_t): Change has_scope to unsigned int.
2420 2004-06-20 Steven G. Kargl <kargls@comcast.net>
2422 * arith.c (gfc_range_check): correct complex underflow.
2424 2004-06-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2427 * match.c (match_case_selector): Call gfc_match_init_expr
2428 instead of gfc_match_expr.
2429 * resolve.c (validate_case_label_expr): No need to check for
2430 constant, since it wouldn't have been matched with the fix to
2433 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2436 * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
2439 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2442 * trans-deecl.c (generate_local_decl): Do not issue warning for
2443 unused variables if they're use associated.
2445 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2446 Andrew Vaught <andyv@firstinter.net>
2449 * gfortran.h (gfc_check_f): Add new field f3ml.
2450 * check.c (gfc_check_minloc_maxloc): Take argument list instead
2451 of individual arguments, reorder if necessary.
2452 * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
2453 * intrinsic.c (add_sym_3ml): New function.
2454 (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
2455 (check_specific): Catch special case MINLOC, MAXLOC.
2457 2004-06-14 Paul Brook <paul@codesourcery.com>
2459 * intrinsic.c (add_sym_2s): Use correct function types.
2461 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2463 * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize. Move data.c
2464 * data.c (gfc_get_section_index): Remove dependency on trans.h.
2466 2004-06-12 Steven G. Kargl <kargls@comcast.net>
2468 * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
2469 gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
2470 * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
2471 GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
2472 * trans-intrinsic.c: Use symbols.
2473 * intrinsic.c (add_sym_2s): New function.
2474 * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
2475 * intrinsic.h: Function prototypes.
2476 * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
2477 gfc_resolve_srand): New functions.
2479 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2482 * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
2483 contained procedure.
2485 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2488 * interface.c (compare_parameter, compare_actual_formal): Don't
2489 check types and array shapes for NULL()
2490 * trans-expr.c (conv_function_call): No double indirection for
2493 2004-06-09 Toon Moene <toon@moene.indiv.nluug.nl>
2495 * trans-expr.c (gfc_conv_cst_int_power): Compute
2496 x**(-n) by converting it to (1/x)**n instead of
2499 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2502 * module.c (write_symbol, write_symtree): Don't write symbols
2503 wrongly added to namespace.
2504 * trans-decl.c (gfc_create_module_variable): Don't create a
2505 backend decl for a symbol incorrectly added to namespace.
2507 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2510 * resolve.c (resolve_symbol): Verify that parameter array has an
2511 explicit shape. Fix typos and coding style issues in surrounding
2514 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2517 * gfortran.texi: The documentation doesn't contain infomration on
2518 how to report bugs, and shouldn't, so remove the line which
2521 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2523 * intrinsic.c (sort_actual): Keep track of type of missing
2524 arguments. (Missing from previous commit.)
2526 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2528 * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
2529 * interface.c (compare_actual_formal): Keep type of omitted
2531 * trans-expr.c (gfc_conv_function_call): Add string length
2532 argument for omitted string argument.
2534 2004-06-03 Paul Brook <paul@codesourcery.com>
2536 * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
2537 lists instead of compound expr chains.
2538 (gfc_trans_code): Annotate statement lists.
2540 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2542 * trans-array.c: Fix spelling in comments.
2544 2004-06-02 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2547 * data.c (assign_substring_data_value): New function.
2548 (gfc_assign_data_value): Call the new function if we're dealing
2549 with a substring LHS.
2551 2004-06-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2554 * gfortran.h (GFC_VERSION): Remove.
2555 * gfortran.texi (version-gfortran): Remove, replace by version-GCC
2558 2004-05-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2560 * trans-types.c: Fix spelling & layout in comments.
2562 2004-05-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2565 * trans-const.c (gfc_conv_string_init): Allow variable string
2566 length lower than initialization string length.
2568 2004-05-30 Paul Brook <paul@codesourcery.com>
2571 * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
2572 * trans-expr.c (gfc_trans_string_copy): New function.
2573 (gfc_conv_statement_function): Use them. Create temp vars. Enforce
2575 (gfc_conv_string_parameter): Use gfc_trans_string_copy.
2576 * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
2577 * trans.h (struct gfc_saved_var): Define.
2578 (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
2580 2004-05-30 Steven G. Kargl <kargls@comcast.net>
2582 * iresolve.c (gfc_resolve_random_number): Clean up conditional.
2584 2004-05-29 Steven G. Kargl <kargls@comcast.net>
2586 * simplify.c (gfc_simplify_log): Remove useless line of code.
2588 2004-05-29 Paul Brook <paul@codesourcery.com>
2590 * trans-common.c (find_equivalence): Find multiple rules.
2592 2004-05-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2594 * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
2595 (gfc_current_locus): Declare new global variable.
2596 * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
2597 (gfc_current_locus1): Rename ...
2598 (gfc_current_locus): ... to this.
2599 (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
2600 skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
2601 gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
2602 gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
2603 and gfc_current_locus(), respectively.
2604 * array.c (match_subscript, gfc_match_array_ref, match_array_list,
2605 match_array_cons_element, gfc_match_array_constructor):
2606 Read/modify gfc_current_locus instead of calling gfc_set_locus()
2607 and gfc_current_locus().
2608 * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
2609 match_attr_spec, gfc_match_function_decl, gfc_match_end,
2610 attr_decl1, gfc_match_save): Likewise.
2611 * error.c (error_print, gfc_internal_error): Likewise.
2612 * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
2613 * interface.c (gfc_add_interface): Likewise.
2614 * io.c (gfc_match_format, match_dt_format, match_dt_element,
2615 match_io_iterator, match_io): Likewise.
2616 * match.c (gfc_match_space, gfc_match_eos,
2617 gfc_match_small_literal_int, gfc_match_st_label,
2618 gfc_match_strings, gfc_match_name, gfc_match_iterator,
2619 gfc_match_char, gfc_match, gfc_match_assignment,
2620 gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
2621 gfc_match_nullify, gfc_match_call, match_implicit_range,
2622 gfc_match_implicit, gfc_match_data, match_case_selector,
2623 gfc_match_case, match_forall_iterator): Likewise.
2624 * matchexp.c (gfc_match_defined_op_name, next_operator,
2625 match_level_1, match_mult_operand, match_ext_mult_operand,
2626 match_add_operand, match_ext_add_operand, match_level_2,
2627 match_level_3, match_level_4, match_and_operand, match_or_operand,
2628 match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
2629 * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
2630 * parse.c (match_word, decode_statement, next_free, next_fixed,
2631 add_statement, verify_st_order, parse_if_block, gfc_parse_file):
2633 * primary.c (match_digits, match_integer_constant,
2634 match_boz_constant, match_real_constant, match_substring,
2635 next_string_char, match_charkind_name, match_string_constant,
2636 match_logical_constant, match_const_complex_part,
2637 match_complex_constant, match_actual_arg, match_keyword_arg,
2638 gfc_match_actual_arglist, gfc_match_structure_constructor,
2639 gfc_match_rvalue, gfc_match_variable): Likewise.
2640 * st.c (gfc_get_code): Likewise.
2641 * symbol.c (check_conflict, check_used, check_done,
2642 duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
2643 gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
2644 gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
2646 2004-05-26 Roger Sayle <roger@eyesopen.com>
2648 * io.c (format_asterisk): Silence compiler warnings by correcting
2649 the number of elements of a "locus" initializer.
2651 2004-05-25 Roger Sayle <roger@eyesopen.com>
2654 * matchexp.c: Allow unary operators after arithmetic operators
2656 (match_ext_mult_operand, match_ext_add_operand): New functions.
2657 (match_mult_operand): Tweak to call match_ext_mult_operand.
2658 (match_add_operand): Tweak to call match_ext_mult_operand.
2659 (match_level_2): Rearrange to call match_ext_add_operand.
2661 2004-05-25 Paul Brook <paul@codesourcery.com>
2663 * expr.c (check_inquiry): Remove bogus tests.
2665 2004-05-23 Paul Brook <paul@codesourcery.com>
2668 * expr.c (restricted_args): Remove redundant checks/argument.
2669 (external_spec_function): Update to match.
2670 (restricted_intrinsic): Rewrite.
2672 2004-05-23 Paul Brook <paul@codesourcery.com>
2673 Victor Leikehman <lei@haifasphere.co.il>
2675 * gfortran.h (struct gfc_symbol): Add equiv_built.
2676 * trans-common.c: Change int to HOST_WIDE_INT. Capitalize error
2678 (current_length): Remove.
2679 (add_segments): New function.
2680 (build_equiv_decl): Create initialized common blocks.
2681 (build_common_decl): Always add decl to bindings.
2682 (create_common): Create initializers.
2683 (find_segment_info): Reformat to match coding conventions.
2684 (new_condition): Use add_segments.
2685 (add_condition, find_equivalence, add_equivalences): Move iteration
2686 inside functions. Only process each segment once.
2687 (new_segment, finish_equivalences, translate_common): Simplify.
2689 2004-05-23 Steven G. Kargl <kargls@comcast.net>
2691 * check.c (gfc_check_random_seed): Issue for too many arguments.
2693 2004-05-22 Steven G. Kargl <kargls@comcast.net>
2695 * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
2697 2004-05-22 Paul Brook <paul@codesourcery.com>
2699 * dump-parse-tree.c (gfc_show_equiv): New function.
2700 (gfc_show_namespace): Use it.
2702 2004-05-22 Victor Leikehman <lei@haifasphere.co.il>
2705 * symbol.c (gfc_add_common): Disable checks to work around other more
2706 fundamental inadequacies.
2708 2004-05-22 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
2710 * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
2712 (gfc_build_function_decl): Likewise.
2714 2004-05-22 Steven G. Kargl <kargls@comcast.net>
2716 * check.c (gfc_check_system_clock): New function.
2717 * intrinsic.c (add_sym_3s): New function.
2718 (add_subroutines): Use it.
2719 * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
2721 * iresolve.c (gfc_resolve_system_clock): New function.
2723 2004-05-22 Steven G. Kargl <kargls@comcast.net>
2725 * invoke.texi: Document -Wunderflow and spell check.
2726 * lang.opt: Add Wunderflow.
2727 * gfortran.h (gfc_option_t): Add warn_underflow option.
2728 * options.c (gfc_init_options, set_Wall): Use it.
2729 * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
2730 * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
2731 gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
2732 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
2733 * arith.c (common_logarithm): Fix typo in comment.
2735 2004-05-21 Roger Sayle <roger@eyesopen.com>
2737 * io.c (check_format): As a GNU extension, allow the comma after a
2738 string literal to be optional in a format. Use gfc_notify_std to
2739 issue an error/warning as appropriate.
2741 2004-05-21 Roger Sayle <roger@eyesopen.com>
2743 * io.c (check_format): Use gfc_notify_std to determine whether to
2744 issue an error/warning for omitting the digits from the X format.
2746 2004-05-20 Roger Sayle <roger@eyesopen.com>
2748 * io.c (check_format): Allow the number before the X format to
2749 be optional when not -pedantic.
2751 2004-05-18 Feng Wang <fengwang@nudt.edu.cn>
2752 Paul Brook <paul@codesourcery.com>
2754 * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
2755 Create decls for __builtin_pow{,f}.
2756 * gfortran.h (PREFIX_LEN): Define.
2757 * trans-decl.c (gfor_fndecl_math_powi): Add.
2758 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
2759 (gfc_build_intrinsic_function_decls): Create decls for powi.
2760 * trans-expr.c (powi_table): Add.
2761 (gfc_conv_integer_power): Remove.
2762 (gfc_conv_powi): New function.
2763 (gfc_conv_cst_int_power): New function.
2764 (gfc_conv_power_op): Use new powi routines.
2765 * trans.h (struct gfc_powdecl_list): Add.
2766 (gfor_fndecl_math_powi): Add.
2767 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
2769 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2771 * trans.c, trans-decl.c: Fix comment typos.
2773 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2775 * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
2777 2004-05-18 Steve Kargl <kargls@comcast.net>
2779 * arith.c (gfc_int2complex): Fix incorrect range checking.
2781 2004-05-18 Paul Brook <paul@codesourcery.com>
2784 * decl.c (add_init_expr_to_sym): Remove incorrect check.
2785 (default_initializer): Move to expr.c.
2786 (variable_decl): Don't assign default initializer to variables.
2787 * expr.c (gfc_default_initializer): Move to here.
2788 * gfortran.h (gfc_default_initializer): Add prototype.
2789 * resolve.c (resolve_symbol): Check for illegal initializers.
2790 Assign default initializer.
2792 2004-05-17 Steve Kargl <kargls@comcast.net>
2794 * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
2796 2004-05-17 Steve Kargl <kargls@comcast.net>
2798 * arith.c (gfc_real2complex): Range checking wrong part of complex
2801 2004-05-16 Paul Brook <paul@codesourcery.com>
2803 * options.c (gfc_handle_module_path_options): Fix buffer overrun.
2805 2004-05-16 Paul Brook <paul@codesourcery.com>
2807 * arith.c (gfc_range_check): Fix logic error.
2809 2004-05-16 Steve Kargl <sgk@troutmask.apl.washington.edu>
2811 * arith.c: Fix comment typos.
2813 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2816 * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
2817 not initialized in a disallowed fashion.
2818 * match.c (gfc_match_common): Likewise.
2819 (var_element): Verify that variable is not in the blank COMMON,
2820 if it is in a common.
2822 2004-05-15 Joseph S. Myers <jsm@polyomino.org.uk>
2824 * Make-lang.in (f95.generated-manpages): Remove.
2825 (f95.srcextra): New.
2826 (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
2827 f95.maintainer-clean): Generate info and dvi files in objdir/doc.
2830 (f95.install-info): Remove.
2831 (install-info): New.
2833 2004-05-15 Victor Leikehman <lei@haifasphere.co.il>
2835 * decl.c (add_init_expr_to_sym): Check for variable size arrays.
2837 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2839 * primary.c (match_boz_constant): Use gfc_notify_std() for
2840 issuing a warning or an error.
2842 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2845 * primary.c (match_structure_constructor): Rename ...
2846 (gfc_match_structure_constructor): ... to this. Make non-static.
2847 (gfc_match_rvalue): Call renamed function.
2848 * match.h (gfc_match_structure_constructor): Declare.
2849 * match.c (gfc_match_data_constant): Handle structure
2852 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2856 * gfortran.h (gfc_linebuf): New typedef.
2858 (gfc_file): Revamped, use new gfc_linebuf.
2859 (locus): Revamped, use new types.
2860 (gfc_current_file): Remove.
2861 (gfc_current_form, gfc_source_file): New global variables.
2862 * match.c (gfc_match_space, gfc_match_strings): Use
2863 gfc_current_form to find source form.
2864 * module.c (gfc_dump_module): Use gfc_source_file when printing
2866 * error.c (show_locus, show_loci) Use new data structures to print
2868 * scanner.c (first_file, first_duplicated_file, gfc_current_file):
2870 (file_head, current_file, gfc_current_form, line_head, line_tail,
2871 gfc_current_locus1, gfc_source_file): New global variables.
2872 (gfc_scanner_init1): Set new global variables.
2873 (gfc_scanner_done1): Free new data structures.
2874 (gfc_current_locus): Return pointer to gfc_current_locus1.
2875 (gfc_set_locus): Set gfc_current_locus1.
2876 (gfc_at_eof): Set new variables.
2877 (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
2878 to new locus structure.
2879 (gfc_check_include): Remove.
2880 (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
2881 (gfc_skip_comments): Use gfc_current_form, find locus with
2883 (gfc_next_char): Use gfc_current_form.
2884 (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
2885 (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
2887 (get_file): New function.
2888 (preprocessor_line, include_line): New functions.
2889 (load_file): Move down, rewrite to match new data structures.
2890 (gfc_new_file): Rewrite to match new data structures.
2891 * parse.c (next_statement): Remove code which is now useless. Use
2892 gfc_source_form and gfc_source_file where appropriate.
2893 * trans-decl.c (gfc_get_label_decl): adapt to new data structures
2894 when determining locus of frontend code.
2895 * trans-io.c (set_error_locus): Same.
2896 * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
2897 * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
2899 (all): Add missing initializers.
2901 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2903 * Make-lang.in (trans-common.o): Remove redundant dependency.
2904 (data.c): Replace object file name ...
2905 (data.o): ... by the correct one.
2907 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2909 * dump-parse-tree.c (gfc_show_array_ref): Print colon only
2910 for ranges when dumping array references.
2912 2004-05-14 Victor Leikehman <lei@haifasphere.co.il>
2914 * decl.c (variable_decl): Always apply default initializer.
2916 2004-05-08 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
2919 * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
2920 handle zero correctly.
2922 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2924 * match.c (gfc_match): Eliminate dead code.
2926 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2928 * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
2929 Detect bad continuation line in fixed form sources.
2931 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2934 * iresolve.c (gfc_resolve_nearest): Add new function.
2935 * intrinsic.h: ... declare it here.
2936 * intrinsic.c (add_functions): ... add it as resolving function
2939 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2942 * match.c (gfc_match_do): Allow infinite loops with
2943 label-do-stmt. Do not enforce space after comma.
2945 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2948 * parse.c (parse_interface): Allow empty INTERFACE, remove
2951 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2953 * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
2954 decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
2955 expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
2956 intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
2957 matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
2958 primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
2959 trans-array.c, trans-array.h, trans-common.c, trans-const.c,
2960 trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
2961 trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
2962 trans-types.h, trans.c, trans.h: Update copyright years and
2964 * data.c: Likewise, also removed two whitespace-only lines.
2965 * gfortranspec.c, lang.opt: Update copyright years.
2967 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2970 * trans-decl.c (generate_local_decl): Don't warn for unused
2971 variables which are in common blocks.
2973 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2975 * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
2976 trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
2977 trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
2979 2004-05-13 Victor Leikehman <lei@haifasphere.co.il>
2982 * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
2984 2004-05-13 Joseph S. Myers <jsm@polyomino.org.uk>
2986 * gfortran.texi: Use @table @emph instead of @itemize @emph.
2987 Remove "set DEVELOPMENT".
2988 (Compiling GFORTRAN): Remove.
2990 2004-05-09 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
2992 * array.c (match_subscript, match_array_ref): Add comments
2993 explaining argument 'init'.
2994 * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
2995 trans-expr.c, trans.c: Fix some typos in comments.
2996 * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
2997 * primary.c (match_digits, match_integer_constant): Add comment
2998 explaining signflag.
3000 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3003 * primary.c: Include system.h and flags.h, needed for pedantic.
3004 (match_boz_constant): Allow "x" for hexadecimal constants, warn if
3007 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3010 * match.c (match_data_constant): Handle case where
3011 gfc_find_symbol sets sym to NULL
3013 2004-04-28 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3015 * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
3016 dependency on mathbuiltins.def
3018 2004-04-24 Victor Leikehman <lei@il.ibm.com>
3020 * trans-io.c (transfer_expr): Implemented recursive printing
3023 2004-04-24 Andrew Pinski <pinskia@physics.uc.edu>
3025 * gfortranspec.c: Do not include multilib.h.
3027 2004-04-24 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3029 * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
3030 2004 to copyright years.
3031 * trans-expr.c, trans-decl.c: Comment update, we now generate
3032 GENERIC, not SIMPLE. Add 2004 to copyright years.
3034 2004-04-24 Paul Brook <paul@codesourcery.com>
3036 * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
3038 2004-04-24 Feng Wang <fengwang@nudt.edu.cn>
3041 * arith.c (gfc_arith_divide): Fix complex divide.
3043 2004-04-23 Andrew Pinski <pinskia@physics.uc.edu>
3045 * gfortranspec.c: Include the target headers.
3047 2004-04-18 Feng Wang <fengwang@nudt.edu.cn>
3051 * arith.c (arctangent2): New function.
3052 * arith.h (arctangent2): Add function prototype.
3053 * simplify.c (gfc_simplify_atan2): Use it.
3054 (gfc_simplify_log): Use it.
3056 2004-04-12 Diego Novillo <dnovillo@redhat.com>
3058 * fortran/f95-lang.c (gfc_expand_stmt): Remove.
3059 (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
3061 2004-04-11 Bud Davis <bdavis9659@comcast.net>
3064 * trans-io.c (build_dt): Change REC to value.
3066 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
3069 * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
3070 the real value when converting mpf to string.
3072 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
3075 * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
3078 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
3081 * simplify.c (simplify_min_max): Convert the type of the result.
3083 2004-04-11 Paul Brook <paul@codesourcery.com>
3085 * gfortran.texi: Use full target triplet.
3087 2004-04-11 Paul Brook <paul@codesourcery.com>
3089 * Make-lang.in (GFORTRAN_TEXI): Set it.
3090 (fortran/dfortran.dvi): Use it. Add fortran to include paths.
3091 (fortran/gfortran.info): Ditto.
3092 * gfortran.texi: Major update.
3093 * invoke.texi: New file.
3095 2004-04-10 Paul Brook <paul@codesourcery.com>
3097 * trans-array.c (gfc_trans_allocate_temp_array,
3098 gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
3099 * trans-decl.c (gfc_build_dummy_array_decl,
3100 gfc_get_symbol_decl, gfc_build_function_decl,
3101 gfc_create_module_variable): Ditto.
3102 * trans-expr.c (gfc_conv_variable): Ditto.
3103 * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
3104 * trans.h (GFC_DECL_STRING): Remove.
3105 (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
3106 GFC_DECL_ASSIGN): Renumber flags.
3108 2004-04-05 Paul Brook <paul@codesourcery.com>
3112 * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
3114 * gfortran.h (struct gfc_charlen): Add backend_decl.
3115 * trans-array.c (gfc_trans_allocate_temp_array,
3116 gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
3117 (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
3118 Remove old, broken string handling.
3119 (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
3120 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
3121 gfc_trans_deferred_array): Handle character arrays.
3122 * trans-const.c (gfc_conv_const_charlen): New function.
3123 * trans-const.h (gfc_conv_const_charlen): Add prototype.
3124 * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
3126 (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
3127 (gfc_create_string_length): New function.
3128 (gfc_get_symbol_decl): Create lengths for character variables.
3129 (gfc_get_fake_result_decl): Ditto.
3130 (gfc_build_function_decl): Only set length for assumed length
3131 character arguments.
3132 (gfc_trans_dummy_character): New function.
3133 (gfc_trans_auto_character_variable): Rewrite.
3134 (gfc_trans_deferred_vars): Handle more types of character variable.
3135 (gfc_create_module_variable): String lengths have moved.
3136 (gfc_generate_function_code): Initialize deferred var chain earlier.
3137 * trans-expr.c (gfc_conv_init_string_length): Rename ...
3138 (gfc_trans_init_string_length): ... to this.
3139 (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
3140 gfc_conv_function_call): Update to new format for character variables.
3141 (gfc_conv_string_length): Remove.
3142 (gfc_conv_string_parameter): Update assertion.
3143 * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
3144 * trans-io.c (set_string): Use new macro names.
3145 * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
3146 * trans-types.c (gfc_get_character_type): Use existing length expr.
3147 (gfc_is_nodesc_array): Make public.
3148 (gfc_get_dtype_cst): Rename ...
3149 (gfc_get_dtype): ... to this. Handle unknown size arrays.
3150 (gfc_get_nodesc_array_type): Use new name.
3151 (gfc_sym_type): New character variable code.
3152 (gfc_get_derived_type): Ditto.
3153 (gfc_get_function_type): Evaluate character variable lengths.
3154 * trans-types.h (gfc_strlen_kind): Define.
3155 (gfc_is_nodesc_array): Add prototype.
3156 * trans.h: Update prototypes.
3157 (struct lang_type): Update comments.
3158 (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
3159 (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
3161 2004-04-04 Paul Brook <paul@codesourcery.com>
3163 * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
3164 * options.c (gfc_init.options, gfc_handle_option): Ditto.
3165 * trans-expr.c (gfc_conv_function_call): Ditto.
3166 * trans-types.c (gfc_is_nodesc_array): Ditto
3167 * lang.opt (fg77-calls): Remove.
3169 2004-04-04 Paul Brook <paul@codesourcery.com>
3171 * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
3172 (gfc_conv_descriptor_base): Rename ...
3173 (gfc_conv_descriptor_offset): ... to this.
3174 (gfc_trans_allocate_array_storage): Set offset to zero.
3175 (gfc_conv_array_base): Rename ...
3176 (gfc_conv_array_offset): ... to this.
3177 (gfc_conv_array_index_ref): Add offset parameter.
3178 (gfc_conv_array_ref): Include offset.
3179 (gfc_trans_preloop_setup): Use existing offset.
3180 (gfc_trans_allocate_temp_array, gfc_array_allocate,
3181 gfc_trans_auto_array_allocation, gfc_trans_g77_array,
3182 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
3183 gfc_conf_ss_descriptor): Set offset.
3184 * trans-array.h: Rename prototypes.
3185 * trans-const.h (gfc_index_zero_node): Define.
3186 * trans-decl.c (gfc_build_qualified_array): Change base to offset.
3187 * trans-types.c (gfc_get_array_type_bounds): Ditto.
3188 (gfc_get_nodesc_array_type): Calculate offset before upper bound.
3190 2004-03-25 Diego Novillo <dnovillo@redhat.com>
3192 * convert.c (convert): Don't handle WITH_RECORD_EXPR.
3194 2004-03-24 Bud Davis <bdavis9659@comcast.net>
3197 * arith.c (gfc_convert_integer,gfc_convert_real): Removed leading '+'
3198 before conversion by gmp library call.
3200 2004-03-24 Bud Davis <bdavis9659@comcast.net>
3203 * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
3205 2004-02-24 Richard Henderson <rth@redhat.com>
3207 * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
3209 2004-02-19 Loren J. Rittle <ljrittle@acm.org>
3211 * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
3212 (fortran/gfortran.info): ... to here.
3215 2004-02-16 Richard Henderson <rth@redhat.com>
3217 * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
3218 * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
3219 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
3220 (gfc_expand_function): Rename from expand_function_body, make static,
3221 don't do anything except invoke tree_rest_of_compilation.
3222 (gfc_be_parse_file): Invoke cgraph.
3223 (gfc_expand_decl): Remove.
3224 (gfc_init_builtin_functions): Add __builtin_init_trampoline and
3225 __builtin_adjust_trampoline.
3226 * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
3227 (gfc_finalize): New.
3228 (gfc_generate_function_code): Use it. Lower nested functions.
3229 * trans-expr.c (gfc_conv_function_call): Add static chain operand
3231 * trans.c (gfc_build_function_call): Likewise.
3232 * trans.h (expand_function_body): Remove.
3234 2004-02-15 Victor Leikehman <lei@il.ibm.com>
3237 * trans-decl.c (gfc_build_function_decl) For functions
3238 returning CHARACTER pass an extra length argument,
3239 following g77 calling conventions.
3240 * trans-types.c (gfc_get_function_type) Ditto.
3241 * trans-expr.c (gfc_conv_function_call) Ditto.
3243 2004-02-14 Paul Brook <paul@codesourcery.com>
3245 * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
3247 2004-02-12 Paul Brook <paul@nowt.org>
3251 2004-02-08 Steve Kargl <sgk@troutmask.apl.washington.edu>
3253 * gfortran.texi: Fix typos.
3255 2004-02-07 Bud Davis <bdavis9659@comcast.net>
3258 * intrinsic.c (add_conversions) Use logical conversion instead
3260 * trans-types.c (gfc_get_logical_type) implemented logical*1
3263 2004-01-17 Paul Brook <paul@codesourcery.com>
3265 * lang-specs.h: Remove %<fixed-form.
3267 2004-01-15 Toon Moene <toon@moene.indiv.nluug.nl>
3269 * lang-specs.h: Enable preprocessing of source files
3270 ending in .F, .fpp, .FPP, .F90 and .F95.
3272 2004-01-13 Toon Moene <toon@moene.indiv.nluug.nl>
3275 * lang-specs.h: Enable compilation of files ending
3276 in .f, .for and .FOR.
3278 2004-01-11 Paul Brook <paul@codesourcery.com>
3280 * trans-stmt.c (gfc_trans_if_1): New function.
3281 (gfc_trans_if): Use it.
3283 2004-01-11 Erik Schnetter <schnetter@uni-tuebingen.de>
3285 * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
3286 (gfc_option_t): Add max_identifier_length.
3287 * lang.opt: Add fmax-identifier-length.
3288 * match.c (parse_name): Use limit.
3289 * options.c (gfc_init_options): Set max_identifier_length.
3290 (gfc_handle_option): Ditto.
3292 2004-01-11 Feng Wang <fengwang@nudt.edu.cn>
3294 * intrinsic.c (add_functions): Add resolve function to dcmplx.
3295 * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
3296 * iresolve.c (gfc_resolve_dcmplx): New function.
3298 2004-01-10 Paul Brook <paul@codesourcery.com>
3300 * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
3301 * trans-types.c (gfc_sym_type): Handle external dummy procedures.
3302 (gfc_return_by_reference): Correct condition.
3303 (gfc_get_function_type): Ditto.
3305 2004-01-10 Paul Brook <paul@codesourcery.com>
3307 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
3310 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
3312 * iresolve.c: Use correct kind.
3314 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
3317 * trans-decl.c (gfc_create_module_variable): Output array valued
3320 2004-01-10 Paul Brook <paul@codesourcery.com>
3322 * resolve.c (resolve_branch): Get error message right way round.
3324 2004-01-10 Canqun Yang <canqun@nudt.edu.cn>
3326 * trans-array (gfc_conv_loop_setup): Adjust comment to track
3328 (gfc_array_allocate): Don't count size of element twice.
3330 2004-01-04 Paul Brook <paul@codesourcery.com>
3332 * lang.opt (i8, r8, std=*): Remove RejectNegative.
3334 2004-01-04 Paul Brook <paul@codesourcery.com>
3336 * error.c (gfc_notify_std): New function.
3337 * gfortran.h (gfc_notify_std): Declare.
3338 (GFC_STD_*): Define.
3339 (gfc_option_t): Add warn_std and allow_std.
3340 * intrinsic.c (gfc_init_expr_extensions): Fix logic.
3341 (gfc_intrinsic_func_interface): Use gfc_notify_std.
3342 * check.c (check_rest): Use gfc_notify_std.
3343 * match.c (gfc_match_pause): Ditto.
3344 (gfc_match_assign): Ditto.
3345 (gfc_match_goto): Ditto.
3346 * resolve.c (resolve_branch): Ditto.
3347 * lang.opt: Add std=<foo> and w.
3348 * options.c (gfc_init_options): Set allow_std and warn_std.
3349 (gfc_handle_option): Handle OPT_std_* and OPT_w.
3351 2004-01-01 Paul Brook <paul@codesourcery.com>
3353 * array.c (gfc_append_constructor): Take constructor, not expression.
3354 * data.c (struct gfc_expr_stack): Remove.
3355 (expr_stack): Remove.
3356 (find_con_by_offset): Rename from find_expr_in_con.
3357 (find_con_by_component): Rename from find_component_in_con.
3358 (gfc_get_expr_stack): Remove.
3359 (gfc_assign_data_value): Rewrite.
3360 (gfc_expr_push): Remove.
3361 (gfc_expr_pop): Remove.
3362 (gfc_advance_section): Rename from
3363 gfc_modify_index_and_calculate_offset. Handle unbounded sections.
3364 (gfc_get_section_index): Handle unbounded sections.
3365 * gfortran.h: Update prototypes.
3366 * resolve.c (check_data_variable): Array section maight not be the
3369 2004-01-01 Paul Brook <paul@codesourcery.com>
3372 * resolve.c (resolve_symbol): Allow assumed length function results.
3374 2004-01-01 Steve Kargl <sgk@troutmask.apl.washington.edu>
3376 * match.c (gfc_match_pause): Fix spelling.
3378 2004-01-01 Steven Bosscher <stevenb@suse.de>
3381 * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
3382 reference from the expression.
3384 2003-12-26 Feng Wang <fengwang@nudt.edu.cn>
3386 * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
3388 * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
3389 (gfc_exec_op): New EXEC_LABEL_ASSIGN.
3390 (symbol_attribute):New variable attribute: assign.
3391 * io.c (resolve_tag):Integer variable is allowed.
3392 (match_dt_format): Add ASSIGN statement. Set assign flag.
3393 * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
3394 (gfc_match_assign): Add ASSIGN statement. Set assign flag.
3395 (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
3396 * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
3397 (next_statement): Add ST_LABEL_ASSIGNMENT.
3398 (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
3399 * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
3400 (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
3401 * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
3402 * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
3403 assign. Put them into the stuct lang_decl.
3404 * trans-io.c (set_string): Add the assign statement.
3405 * trans-stmt.c (gfc_trans_label_assign): New function.
3406 (gfc_trans_goto): Translate ASSIGNED GOTO statement.
3407 * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
3408 * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
3409 * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
3410 (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
3411 (GFC_DECL_ASSIGN(node)): New macro to access flag.
3413 2003-12-31 Huang Chun <chunhuang73@hotmail.com>
3416 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
3419 2003-12-22 Toon Moene <toon@moene.indiv.nluug.nl>
3421 * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
3422 that arguments to subroutines/functions can't alias themselves, nor global
3425 2003-12-20 Steven Bosscher <stevenb@suse.de>
3427 * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
3428 * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
3430 2003-12-12 Huang Chun <chunhuang73@hotmail.com>
3432 * primary.c (match_substring): Fix substring bug for start point
3433 or end point is NULL.
3434 * trans-expr.c (gfc_conv_substring): Ditto
3435 * trans-types.c (gfc_sym_type): Get correct type of scalar
3436 character variables.
3437 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
3440 2003-12-10 Richard Henderson <rth@redhat.com>
3442 * options.c (gfc_post_options): Don't ever use rtl inlining.
3444 2003-12-05 Canqun Yang <canqun@nudt.edu.cn>
3446 * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
3447 * trans-equivalence.c: Remove.
3448 * trans-decl.c (gfc_get_symbol_decl): Update to match.
3449 (gfc_generate_function_code): Ditto.
3450 * trans-array.c (gfc_conv_array_parameter): Ditto.
3451 * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
3452 (F95_ADDITIONAL_OBJS): Add stor-layout.o
3453 * trans.h (gfc_trans_equivalence): Remove.
3454 * gfortran.h (struct gfc_equiv): Add used field.
3455 (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
3456 equiv_offset fields.
3458 2003-12-05 Richard Henderson <rth@redhat.com>
3460 * trans.c (gfc_build_addr_expr): New.
3461 (gfc_build_indirect_ref, gfc_build_array_ref): New.
3462 * trans.h: Declare them.
3463 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
3464 trans-stmt.c, trans.c (*): Use them.
3466 * f95-lang.c (gfc_post_options): Remove dead prototype.
3467 * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
3468 * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
3471 2003-12-01 Feng Wang <fengwang@nudt.edu.cn>
3473 * io.c (gfc_match_format): Check for missing format label.
3475 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
3478 * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
3479 from interfaces in modules.
3481 2003-11-30 Paul Brook <paul@nowt.org>
3483 * trans-array.c (gfc_trans_g77_array): Make non-static.
3484 (gfc_trans_assumed_size): Remove.
3485 (gfc_trans_dummy_array_bias): Explicitly free temporary.
3486 * trans-array.h (gfc_trans_g77_array): Add prototype.
3487 (gfc_trans_assumed_size): Remove.
3488 * trans-decls.c (gfor_fndecl_push_context): Remove.
3489 (gfor_fndecl_pop_context): Remove.
3490 (gfc_build_function)decls): Don't create them.
3491 (gfc_trans_deferred_vars): Update to match. Remove dead code.
3492 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
3494 2003-11-30 Kejia Zhao <kejia_zh@nudt.edu.cn>
3496 * trans-array.c (gfc_conv_array_parameter): Simplify
3497 array argument passing for array name actual argument.
3498 * trans-expr.c (gfc_conv_function_call): Ditto
3499 * trans-types.c (gfc_is_nodesc_array):Ditto.
3501 2003-11-30 Paul Brook <paul@nowt.org>
3503 * f95-lang.c (gfc_post_options): Move ...
3504 * options.c (gfc_post_options): .. to here. Handle inlining options.
3505 * gfortran.h (gfc_post_options): Add prototype.
3507 2003-11-28 Richard Henderson <rth@redhat.com>
3509 * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
3511 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
3513 * trans.h (has_alternate_specifier): New global variable.
3514 * match.c (gfc_match_call): Handle actual arguments associated with
3515 alternate return indicators.
3516 * trans-expr.c (gfc_conv_function_call): Ditto
3517 * trans-stmt.c (gfc_trans_call): Ditto
3518 (gfc_trans_return): Handle return statement with value.
3519 * trans-decl.c (gfc_generate_function_code): Handle functions with
3521 (gfc_get_fake_result_decl): Ditto
3522 * trans-types.c (gfc_get_function_type): Ditto
3523 * resolve.c (resolve_actual_arglist): Check alternate return indicators.
3524 (resolve_formal_arglist): Check asterisk dummy.
3526 2003-11-27 Paul Brook <paul@nowt.org>
3528 * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
3529 allocation interface.
3530 (gfc_conv_ array_parameter): Ditto.
3531 (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
3532 * trans-array.c: Update prototype.
3533 * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
3534 (gfc_trans_auto_character_variable): Use new memory alloc interface.
3535 * trans-expr.c (gfc_conv_string_tmp): Ditto.
3536 (gfc_conv_function_call): Use gfc_conv_string_tmp.
3537 * trans-stmt.c (gfc_do_allocate): Use new memory alloc interface.
3538 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
3539 * trans.h (gfc_ss_info): Remove unused pdata field.
3540 * trans.c (gfc_create_var_np): Change T to V.
3542 2003-11-26 Richard Henderson <rth@redhat.com>
3544 * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
3545 * trans-intrinsic.c (gfc_intrinsic_map): ... here. Add SCALE,
3546 FRACTION, NEAREST, SET_EXPONENT.
3547 (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
3548 Fix GTY marking. Remove unnecessary const's.
3549 (LIBM_FUNCTION): Rename from I_LIB.
3550 (LIBF_FUNCTION): New.
3551 (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
3552 conventions. Assume the expr signature is correct. Mark const.
3553 (gfc_conv_intrinsic_exponent): Use library functions.
3554 (gfc_conv_intrinsic_set_exponent): Remove.
3555 (gfc_conv_intrinsic_scale): Remove.
3556 (gfc_conv_intrinsic_nearest): Remove.
3557 (gfc_conv_intrinsic_fraction): Remove.
3558 (gfc_conv_intrinsic_function): Update.
3559 * trans-decl.c (gfor_fndecl_math_exponent4): New.
3560 (gfor_fndecl_math_exponent8): New.
3561 (gfc_build_intrinsic_function_decls): Set them.
3562 * trans.h: Declare them.
3564 2003-11-25 Canqun Yang <canqun@nudt.edu.cn>
3566 * trans-common.c (gfc_layout_global_equiv): Locate the error for
3567 underflow COMMON block.
3568 (gfc_trans_one_common): Fix bug for size of COMMON block containing
3569 EQUIVALENCE object. Also fix typo in an error message.
3571 2003-11-25 Diego Novillo <dnovillo@redhat.com>
3573 * Make-lang.in: Add check-gfortran to lang_checks.
3574 (check-f95): Alias for check-gfortran.
3576 2003-11-25 Jason Merrill <jason@redhat.com>
3578 * Make-lang.in (f95.tags): Create TAGS.sub files in each
3579 directory and TAGS files that include them for each front end.
3581 2003-11-24 Paul Brook <paul@nowt.org>
3584 * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
3586 2003-11-24 Paul Brook <paul@nowt.org>
3588 * expr.c (simplify_const_ref): Return SUCCESS for things we don't
3590 * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
3592 2003-11-24 Paul Brook <paul@nowt.org>
3595 * array.c (gfc_array_ref_shape): Handle elemental dimensions.
3596 * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
3598 2003-11-20 Richard Henderson <rth@redhat.com>
3600 * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
3601 (gfc_conv_array_base): Likewise.
3602 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
3603 * trans-expr.c (gfc_conv_string_tmp): Likewise.
3604 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
3605 * trans-stmt.c (gfc_trans_character_select): Likewise.
3607 2003-11-13 Paul Brook <paul@nowt.org>
3609 * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
3611 2003-11-13 Canqun Yang <canqun@nudt.edu.cn>
3613 * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
3614 (resolve_equivalence): New function.
3615 (resolve_equivalence_derived): New function.
3617 2003-11-12 Richard Henderson <rth@redhat.com>
3619 * trans.c (gfc_trans_code): Use annotate_with_locus instead of
3620 annotate_all_with_locus.
3622 2003-11-11 Canqun Yang <canqun@nudt.edu.cn>
3624 * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
3625 * trans-decl.c (gfc_finish_var_decl): Modified.
3627 2003-11-08 Paul Brook <paul@nowt.org>
3630 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
3633 2003-11-06 Paul Brook <paul@nowt.org>
3635 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
3637 2003-11-02 Canqun Yang <canqun@nudt.edu.cn>
3639 * match.c (gfc_match_stopcode): Assign '0' to stop_code.
3641 2003-10-27 Anthony Green <green@redhat.com>
3643 * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
3644 (f95.stagefeedback): Ditto.
3646 2003-10-27 Andrew Pinski <pinskia@physics.uc.edu>
3649 * Make-lang.in (f95.stageprofile): Add.
3650 (f95.stagefeedback): Add.
3652 2003-10-23 Richard Henderson <rth@redhat.com>
3654 * f96-lang.c (gfc_gimplify_expr): Remove.
3655 (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
3656 (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
3658 2003-10-23 Richard Henderson <rth@redhat.com>
3660 * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
3662 2003-10-20 Paul Brook <paul@nowt.org>
3664 * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
3665 * trans-stmt.c (gfc_trans_do_while): Ditto.
3667 2003-10-17 Paul Brook <paul@nowt.org>
3669 * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
3671 2003-10-17 Paul Brook <paul@nowt.org>
3673 * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
3675 2003-10-17 Feng Wang <wf_cs@yahoo.com>
3677 * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
3678 (gfc_resolve_minloc): Ditto.
3679 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
3680 Return the value after subtracting the lower bound.
3682 2003-10-16 Richard Henderson <rth@redhat.com>
3684 * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
3686 2003-10-16 Steven Bosscher <steven@gcc.gnu.org>
3688 * lang.c: Remove -M option for now, it's in the way for C.
3690 2003-10-14 Jason Merrill <jason@redhat.com>
3692 * Make-lang.in (f95.tags): New rule.
3694 2003-10-13 Richard Henderson <rth@redhat.com>
3696 * trans.c (gfc_trans_code): Use annotate_all_with_locus.
3698 2003-10-13 Paul Brook <paul@nowt.org>
3700 * trans-decl.c (generate_local_decl): Don't create junk variables.
3702 2003-10-13 Paul Brook <paul@nowt.org>
3704 * resolve.c (resolve_formal_arglist): Use function result decl in
3705 preference to function decl.
3707 2003-10-12 Richard Henderson <rth@redhat.com>
3709 * f95-lang.c (gfc_define_builtin): New const_p argument. Set
3710 TREE_READONLY. Update all callers.
3712 2003-10-12 Feng Wang <wf_cs@yahoo.com>
3714 * iresolve.c (gfc_resolve_cshift): Change to match implementation.
3715 * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
3716 (gfc_is_intrinsic_libcall): Add CSHIFT.
3718 2003-10-12 Richard Henderson <rth@redhat.com>
3720 * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
3721 (gfc_trans_array_constructor_value): Likewise.
3722 (gfc_conv_array_initializer): Likewise.
3723 * trans-stmt.c (gfc_trans_character_select): Likewise.
3725 2003-11-12 Kejia Zhao <kejia_zh@yahoo.com.cn>
3727 * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
3729 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
3731 * check.c (gfc_check_repeat): Check arguments are scalar.
3732 (gfc_check_trim): New function.
3733 * intrinsic.h (gfc_check_trim): Add prototype.
3734 * intrinsic.c (add_functions): Use it.
3735 * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
3737 * trans-decl.c: Ditto.
3738 (gfc_build_intrinsic_fucntion_decls): Set them.
3739 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
3740 (gfc_conv_intrinsic_trim): New function.
3741 (gfc_conv_intrinsic_repeat): New function.
3742 (gfc_conv_intrinsic_function): Use them.
3744 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
3746 * trans-types.c (gfc_sym_type): Handle result variables.
3748 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
3750 * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
3751 gfc_get_character_type.
3753 2003-10-11 Feng Wang <wf_cs@yahoo.com>
3755 * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
3757 2003-10-11 Paul Brook <paul@nowt.org>
3759 * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
3760 (gfc_resolve_dprod): New function.
3761 (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
3762 * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
3763 (gfc_resolve_dprod): Declare.
3764 * intrinsic.c (add_functions): Use them.
3765 * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
3767 2003-10-06 Richard Henderson <rth@redhat.com>
3769 * f95-lang.c (gfc_init_builtin_functions): Add clzll.
3770 * trans-intrinsic.c (call_builtin_clz): Use it.
3772 2003-10-05 Paul Brook <paul@nowt.org>
3774 * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
3775 * trans-decl.c (gfc_generate_function_code): Set
3776 cfun->function_end_locus.
3778 2003-09-24 Jason Merrill <jason@redhat.com>
3780 * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
3783 2003-09-21 Lifang Zeng <zlf605@hotmail.com>
3784 Paul Brook <paul@nowt.org>
3786 * Make-lang.in (F95_OBJS): Add fortran/data.o.
3787 * array.c (gfc_inser_constructor): New function.
3788 (gfc_get_constructor): New function.
3789 (gfc_free_constructor): Initialize offset and repeat.
3790 (iterator_stack): Remove.
3791 (expand_info): Add offset, component and repeat fields.
3792 (expand_constructor): Set them.
3793 (expand): Set new fields.
3794 (gfc_copy_constructor): Ditto. Avoid recursion.
3795 * gfortran.h: Add prototypes for new functions.
3796 (gfc_constructor): Add offset, component and repeat.
3797 (iteratio_stack): Move to here.
3798 * resolve.c (check_data_variable): Convert data values into variable
3800 (traverse_data_list): Build implicit loop chain.
3801 (gfc_resolve): Ditto.
3802 * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
3803 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
3804 * trans-expr.c (gfc_conv_structure): Handle array initializers.
3805 (gfc_conv_expr): Update to match.
3806 * trans.h (gfc_conv_structure): Declare.
3809 2003-09-20 Kejia Zhao <kejia_zh@yahoo.com.cn>
3811 * trans.h: Add declarations for gfor_fndecl_si_kind and
3812 gfor_fndecl_sr_kind.
3813 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
3814 * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
3815 (g95_conv_intrinsic_sr_kind): New function.
3816 (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
3819 2003-09-17 Lars Segerlund <Lars.Segerlund@comsys.se>
3821 * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
3822 instead of _4 and _8 as postfix for libgfortran calls.
3824 2003-09-16 Paul Brook <paul@nowt.org>
3826 * array.c (compare_bounds): New function.
3827 (gfc_compare_array_spec): Use it.
3829 2003-09-14 Paul Brook <paul@nowt.org>
3831 * primary.c (gfc_match_rvalue): Make sure sym->result is set.
3832 * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
3834 2003-09-14 Paul Brook <paul@nowt.org>
3836 * check.c (dim_rank_check): Allow assumed bounds if requested.
3837 (gfc_check_lbound): Call it.
3838 (gfc_check_ubound): Ditto.
3839 (gfc_check_size): Change to match.
3840 * simplify.c (gfc_simplify_bound): New function.
3841 (gfc_simplify_lbound): New function.
3842 (gfc_simplify_ubound): New function.
3843 * intrinsic.h: Declare them.
3844 * intrinsic.c (add_functions): Use them.
3846 2003-09-14 Paul Brook <paul@nowt.org>
3848 * io.c (format_lex): Initialize negative_flag.
3849 (check_format): Intialize repeat.
3850 * trans-io.c (gfc_new_nml_name_expr): Declare static.
3851 (gfc_new_var_expr): Ditto.
3853 2003-09-14 Paul Brook <paul@nowt.org>
3855 * trans-array.c (gfc_conv_array_initializer): Handle derived types.
3856 * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
3858 2003-09-12 Paul Brook <paul@nowt.org>
3860 * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
3862 2003-09-12 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
3864 * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
3865 for a correct expression.
3867 2003-09-10 Kejia Zhao <kejia_zh@yahoo.com.cn>
3869 * trans-intrinsic.c (real_compnt_info): New struct.
3870 (prepare_arg_info): New function.
3871 (gfc_conv_intrinsic_set_exponent): New function.
3872 (gfc_conv_intrinsic_scale): New function.
3873 (gfc_conv_intrinsic_nearest): New function.
3874 (gfc_conv_intrinsic_fraction): New function.
3875 (gfc_conv_intrinsic_exponent): New function.
3876 (gfc_conv_intrinsic_spacing): New function.
3877 (gfc_conv_intrinsic_rrspacing): New function.
3878 (gfc_conv_intrinsic_function): Use them.
3880 2003-08-24 XiaoQiang Zhang (zhangapache@yahoo.com>
3882 * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
3883 build_int_2 changed from (high, low) to (low, high).
3884 * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
3885 ioparm_namelist_read_mode, iocall_set_nml_val_int,
3886 iocall_set_nml_val_float, iocall_set_nml_val_char,
3887 iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
3888 (gfc_build_io_library_fndecls): Add variable initialization.
3889 (gfc_new_nml_name_expr, get_new_var_expr): New function.
3890 (build_dt): Add namelist support.
3891 * io.c (value): New variable.
3892 (check_format): Support FMT_H now.
3894 2003-09-07 Paul Brook <paul@nowt.org>
3896 * io.c (gfc_resolve_dt): Error if format label is not defined.
3898 2003-09-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
3900 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
3901 about case_switch's break. The other is about building the condition
3902 statement tree, which judges the argument in the range of the
3903 corresponding integer type.
3904 * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
3905 for the large values.
3907 2003-09-05 Paul Brook <paul@nowt.org>
3909 * f95-lang.c (expand_function_body): Gimplify the function.
3911 2003-09-04 Jeff Law <law@redhat.com>
3913 * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
3916 2003-09-04 Paul Brook <paul@nowt.org>
3918 * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
3919 (gfc_expand_stmt): New function.
3920 (LANG_HOOKS_RTL_EXPAND_STMT): Define.
3921 (expand_function_body): Use tree_rest_of_compilation.
3922 * trans-decl.c (gfc_generate_function_code): Don't free cfun.
3924 2003-09-03 Jeff Law <law@redhat.com>
3926 * f95-lang.c (gfc_init_builtin_functions): C arrays start at
3929 2003-08-30 Paul Brook <paul@nowt.org>
3931 * f95-lang.c (builtin_function): Remove #if 0 code.
3932 (gfc_define_builtin): New function.
3933 (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
3934 * mathbuiltins.def: New file.
3935 * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
3936 (gfc_intrinsic_map): Use mathbuiltins.def.
3937 (gfc_intrinsic_builtin_t): Remove.
3938 (gfc_build_intrinsic_lib_fndecls): Update.
3939 * trans-types.c (gfc_init_types): Remove redundant initilaization of
3940 signed_size_type_node.
3942 2003-08-29 Paul Brook <paul@nowt.org>
3944 * arith.c (gfc_real_kinds): Use correct minimum exponents.
3946 2003-08-22 Kejia Zhao <kejia_zh@yahoo.com.cn>
3948 * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
3949 (gfc_conv_intrinsic_function): Add MODULO.
3951 2003-08-22 Jason Merrill <jason@redhat.com>
3953 * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
3955 2003-08-22 Andreas Jaeger <aj@suse.de>
3957 * Make-lang.in (f95.install-common): Add DESTDIR support.
3958 * (f95.install-info): Likewise.
3959 (f95.uninstall): Likewise.
3961 2003-08-19 Diego Novillo <dnovillo@redhat.com>
3963 * trans-types.c (gfc_init_types): Initialize
3964 signed_size_type_node with size_type_node.
3966 2003-08-18 Paul Brook <paul@nowt.org>
3968 * dependency.c (gfc_dependency): New enum.
3969 (check_another_array_ref): Remove.
3970 (gfc_get_array_from_component): Remove.
3972 (get_range): Remove.
3973 (get_no_of_elements): Use mpz_t, not mpf_t.
3974 (transform_sections): New function.
3975 (gfc_check_range_range): Rename ...
3976 (gfc_check_section_vs_section): ... to this. Use new function.
3977 (gfc_is_inside_range): Rewrite to match.
3978 (gfc_check_element_vs_section): Ditto.
3979 (gfc_check_element_vs_element): Ditto.
3981 (gfc_dep_resolver): Ditto. Remove unused parameter.
3982 * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
3983 gfc_check_element_vs_element, gfc_is_inside_range,
3984 gfc_get_array_from_component): Remove prototypes for static functions.
3985 (gfc_dep_resolver): Update prototype.
3986 * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
3988 2003-08-15 Paul Brook <paul@nowt.org>
3990 * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
3991 return values to parent scope.
3992 (gfc_build_dummy_array_decl): Ditto.
3994 2003-08-14 Paul Brook <paul@nowt.org>
3996 * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
3997 size of the type, not the pointer.
3998 * resolve.c (resolve_symbol): Give more accurate error message.
4000 2003-08-10 Paul Brook <paul@nowt.org>
4002 * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
4004 2003-08-10 Paul Brook <paul@nowt.org>
4006 * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
4009 2003-08-10 Chun Huang <compiler@sohu.com>
4011 * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
4012 (resolve_symbol): Ditto.
4013 * trans-expr.c (gfc_conv_statement_function): New function.
4014 (gfc_conv_function_expr): Use it.
4016 2003-08-10 Paul Brook <paul@nowt.org>
4018 * trans-array.c (gfc_conv_ss_startstride): Handle functions.
4019 (walk_function_expr): Set section rank.
4020 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
4022 2003-08-10 Paul Brook <paul@nowt.org>
4024 * intrinsic.c (add_sym): Prefix names with correct string.
4025 (add_sym_0s): New function.
4026 (add_subroutines): Register abort.
4028 2003-08-10 Erik Schnetter <schnetter@uni-tuebingen.de>
4030 * gfortran.h: Introduce options to control the mangling.
4031 * lang.opt: Likewise.
4032 * options.c (gfc_init_options): Handle the options.
4033 * trans-common.c (gfc_sym_mangled_common_id): New function.
4034 (gfc_build_common_decl): Call it.
4035 * trans-decl.c (gfc_sym_mangled_function_id): New function.
4036 (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
4038 2003-08-09 Paul Brook <paul@nowt.org>
4040 * module.c (mio_symbol): Always ouput a namespace for formal args.
4041 (load_needed): Namespace now belong to their proper symbol.
4042 (gfc_dump_module): Change G95=>GFORTRAN.
4044 2003-08-05 Paul Brook <paul@nowt.org>
4046 * options.c: Force -fg77-calls.
4048 2003-08-02 Paul Brook <paul@nowt.org>
4050 * Makelang.in: Rename G95_* to GFORTRAN_*.
4051 * All sources: Rename G95_* to GFC_*.
4053 2003-08-01 Paul Brook <paul@nowt.org>
4055 * fortran/Make-lang.in: Use GMPLIBS.
4056 * fortran/config-lang.in: Set need_gmp.
4057 * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
4059 2003-07-27 Andreas Jaeger <aj@suse.de>
4061 * trans-decl.c (gfc_generate_constructors): Convert prototype to
4063 * trans-const.c (gfc_init_constants): Likewise.
4064 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
4066 * gfortranspec.c: Convert to ISO C90.
4067 (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
4069 2003-07-26 Paul Brook <paul@nowt.org>
4071 * lang.opt: Add -fdump-parse-tree.
4072 * options.c (gfc_handle_option): Ditto.
4073 * resolve.c (resolve_forall_iterators): Convert to proper type.
4074 * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
4076 2003-07-26 Paul Brook <paul@nowt.org>
4078 * Makefile.in: Add build dependencies on files common with rest of gcc.
4080 2003-07-26 Lifang Zeng <zlf605@hotmail.com>
4082 * trans.h: Declare g95_trans_pointer_assignment.
4083 * trans-expr.c (g95_trans_pointer_assignment): New function.
4084 (g95_trans_pointer_assign): Use it.
4085 * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
4086 (g95_trans_pointer_assign_need_temp): New function.
4088 2003-07-26 Paul Brook <paul@nowt.org>
4090 * gfortran.texi: Replace references to g95.
4092 2003-07-26 Paul Brook <paul@nowt.org>
4094 Rename g95_* to gfc_*.
4096 2003-07-25 Paul Brook <paul@nowt.org>
4098 * gfortran.h: Rename from g95.h.
4099 * trans-types.c (boolean_type_node, booelan_true_node,
4100 boolean_false_node): Remove.
4101 * trans-types.h: Ditto.
4103 2003-07-25 Chun Huang <compiler@sohu.com>
4105 * parse.c (accept_statement): Implement BLOCK DATA statement.
4106 * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
4109 2003-07-24 Lifang Zeng <zlf605@hotmail.com>
4111 * trans-stmt.c (temporary_list): Define.
4112 (g95_trans_assign_need_temp): New function.
4113 (g95_trans_forall_1): Modified for WHERE.
4114 (g95_trans_where_assign): Modified.
4115 (g95_trans_where_2): Modified.
4116 (g95_evaluate_where_mask): Modified.
4117 (g95_trans_where): Modified.
4118 (g95_get_temp_expr): Removed.
4119 (g95_add_to_where_stmt_list): Removed.
4120 (compute_overall_iter_number): Modified for WHERE.
4121 * trans.h: Remove where_stmt_list.
4123 2003-07-24 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4125 * lang.opt: Correct description of options -J and -M.
4127 2003-07-23 Steven Bosscher <steven@gcc.gnu.org>
4129 * lang.opt: Move help text to here.
4130 * lang-options.h: Remove.
4132 2003-07-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4133 * iresolve.c (g95_resolve_transpose): Proper variable in switch.
4134 * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
4137 2003-07-22 Steven Bosscher <steven@gcc.gnu.org>
4138 Paul Brook <paul@nowt.org>
4140 * check.c (check_rest): Use global pedantic flag.
4141 * io.c (data_desc): Ditto.
4142 * error.c (g95_warning, g95_warning_now): Use global flag.
4143 * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
4144 (expand_function_body): Update to new prototypes.
4145 (g95_init): Use new option names.
4146 * g95.h (g95_option_t): Standardize names.
4147 (g95_init_options, g95_handle_option): Update prototypes.
4148 * interface.c: Use new option names.
4155 * simplify.c: Ditto.
4157 * trans-array.c: Ditto.
4158 * trans-expr.c: Ditto.
4159 * trans-types.c: Ditto.
4160 * trans-decl.c: Ditto.
4161 (g95_build_library_function_decl): Remove obsolete VPARAMS.
4163 * options.c (g95_display_help): Remove.
4164 (g95_init_options): Convert to new scheme.
4166 (g95module_option): Ditto, rename from g95_parse_arg.
4167 (g95_handle_module_path_options): New function.
4168 * trans-equivalence.c: Fix error message.
4169 * lang.opt: Corrections.
4171 2003-07-21 Steven Bosscher <steven@gcc.gnu.org>
4173 * lang.opt: New file.
4175 2003-07-21 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4177 * decl.c (match_attr_spec): Set colon_seen.
4179 2003-07-14 Paul Brook <paul@nowt.org>
4181 * trans-array.c: Update comment.
4182 (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
4183 * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
4184 minmaxloc,minmaxval): Ditto.
4185 * trans-io.c (g95_trans_transfer): Ditto.
4186 * trans-stmt.c: Remove unneeded prototypes.
4187 (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
4188 (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
4189 (compute_inner_temp_size): Remove bits of dead code. Add comments.
4190 Don't share loopinfo.
4191 (compute_overall_iter_number): Declare as static.
4192 (allocate_temp_for_forall_nest): Ditto.
4193 (g95_trans_forall_1): Don't pass shared loopinfo.
4194 * trans.c (g95_start_block): Expand comment.
4196 2003-07-12 Paul Brook <paul@nowt.org>
4198 * arith.c (g95_index_integer_kind): Remove unused initializer.
4199 * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
4200 index by size of element.
4201 (generate_loop_for_rhs_to_temp): Ditto.
4202 (allocate_temp_for_forall_nest): Use element size, not index size.
4204 2003-07-11 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4206 * arith.c (g95_index_integer_kind): Add a TODO.
4207 * simplify.c (g95_simplify_nearest): Add a TODO.
4209 2003-07-09 Chun Huang <compiler@sohu.com>
4211 * trans.h: Add declarations for gfor_fndecl_string_scan and
4212 gfor_fndecl_string_verify.
4213 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
4214 * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
4215 (g95_conv_intrinsic_verify): New function.
4216 (g95_conv_intrinsic_function): Add SCAN and VERIFY.
4217 * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
4218 of parameter 'BACK=.TRUE.'
4220 2003-07-05 Lifang Zeng <zlf605@hotmail.com>
4222 * trans-stmt.c (iter_info, forall_info): Define.
4223 (g95_trans_forall_block): Remove.
4224 (g95_trans_forall_loop): Use forall info blocks.
4225 (g95_trans_nested_forall_loop): New function.
4226 (g95_do_allocate): Handle things other than logical masks.
4227 (generate_loop_for_temp_to_lhs): New function.
4228 (generate_loop_for_rsh_to_temp): New function.
4229 (compute_inner_temp_size): New function.
4230 (compute_overall_iter_number): New function.
4231 (allocate_temp_for_forall_nest): New function.
4232 (g95_trans_forall): Move body ...
4233 (g95_trans_forall_1): ... to here. Handle loops with temporaries.
4235 2003-07-02 Paul Brook <paul@nowt.org>
4237 * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
4238 in correct scope. Change callers to match.
4239 * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
4240 * iresolve.c (g95_resolve_reshape): Only use constant shapes.
4242 2003-07-02 Paul Brook <paul@nowt.org>
4244 * trans-array.c (g95_conv_loop_setup): Remove dead var. Use
4245 expression shape for all expressions.
4246 * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
4248 2003-07-03 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4250 * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
4251 g95_parse_arg), intrinsic.c (g95_convert_type): support of
4253 * intrinsic.c, g95.h: Add g95_convert_type_warn,
4254 * resolve.c (g95_resolve_index): Call it.
4256 2003-07-02 Paul Brook <paul@nowt.org>
4258 * iresolve.c (g95_resolve_reshape): Set expression shape.
4259 (g95_resolve_shape): Ditto.
4260 * simplify.c (g95_simplify_shape): Move common code outside condition.
4261 * trans-array.c (g95_conv_array_initializer): Teach it how to count.
4263 2003-07-01 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4265 * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
4268 2003-06-29 Paul Brook <paul@nowt.org>
4270 * array.c (g95_simplify_iterator_var): Don't bother with return value.
4271 * expr.c (find_array_element, find_component_ref): New functions.
4272 (remove_subobject_ref): New function.
4273 (simplify_const_ref): Use them. Rename from simplify_component_ref.
4274 (simplify_ref_chain): New function.
4275 (g95_simplify_expr): Use it. Simplify parameter variable subobjects.
4276 (g95_specification_expr): Simplify the expression.
4277 * resolve.c (resolve_operator): Check simplifications return code.
4278 (g95_resolve_expr): Ditto.
4280 2003-06-26 Paul Brook <paul@nowt.org>
4282 * expr.c (simplify_component_ref): New function.
4283 (g95_simplify_expr): Use it.
4284 * resolve.c (resolve_structure_cons): Handle references.
4286 2003-06-25 Paul Brook <paul@nowt.org>
4288 * trans-io.c (build_dt): Handle internal units.
4290 2003-06-25 Canqun Yang <canqun@yahoo.com.cn>
4292 * trans-common.c (g95_build_common_decl): Array index range starts at 0.
4293 (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
4294 Use g95_array_index_type instead of integer_type_node.
4295 (g95_build_common_decl, g95_set_common_master_type): Use
4296 g95_character1_type_node instead of char_type_node.
4297 * trans-equivalence.c (g95_layout_local_equiv): As above.
4299 2003-06-24 Steven G. Kargl <kargls@attbi.com>
4301 * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
4302 remove last remains of -fquiet.
4304 2003-06-22 Paul Brook <paul@nowt.org>
4306 * resolve.c (resolve_operator): Don't fail if we can't simplify.
4307 (g95_resolve_expr): Ditto.
4308 (resolce_code): Mark as static.
4309 * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
4310 gimplifer doesn't (yet).
4312 2003-06-20 Paul Brook <paul@nowt.org>
4314 * g95.h: Add ST_PAUSE and EXEC_PAUSE.
4315 * match.c (g95_match_if): Add ST_PAUSE.
4316 (g95_match_stopcode): New function.
4317 (g95_match_pause, g95_match_stop): Use it.
4318 * parse.c (g95_ascii_statement): Handle ST_PAUSE.
4319 (decode_stmt, next_statement, parse_executable): Ditto.
4320 * resolve.c (resolve_code): Ditto.
4321 * st.c (g95_free_statement): Ditto.
4322 * trans-stmt.c (g95_trans_pause): New function.
4323 * trans-stmt.h: Declare it.
4324 * trans.c (g95_trans_code): Use it.
4325 * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
4327 (g95_build_builtin_function_decls): Initialize them.
4329 * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
4331 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4333 * io.c (g95_match_open , g95_match_close, g95_match_inquire,
4334 match_filepos): Fix error handling.
4336 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4338 * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
4339 Add assertions on arguments.
4340 * resolve.c (expression_shape): Remove useless &.
4341 * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
4342 g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
4343 g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
4344 g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
4345 g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
4346 g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
4347 (g95_simplify_not, g95_simplify_scale): Add assertions.
4349 2003-06-15 Paul Brook <paul@nowt.org>
4351 Clean up stuff to work with the ssa optimizers.
4352 * convert.c (convert): Handle BOOLEAN_TYPEs.
4353 * f95-lang.c (g95_truthvalue_conversion): Implement.
4354 * trans-array.c (g95_trans_array_constructor_value): Group multiple
4356 * trans.h (g95_truthvalue_conversion): Declare.
4357 * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
4358 * trans-stmt.c (g95_trans_character_select): Don't create array
4359 assignments. Mark labels as indirect jump targets.
4360 * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
4361 (g95_get_dtype_cst): Handle LOGICAL types.
4363 2003-06-14 Paul Brook <paul@nowt.org>
4365 * f95-lang.c (g95_gimplify_expr): New function.
4366 * trans-array.c (g95_trans_array_constructor_value): Don't create
4368 (g95_conv_expr_descriptor): Rename simple->gimple.
4369 * trans-expr.c (conv_expr_op): Use proper logical operators.
4370 * trans-intrinsic.c (build_fixbound_expr): New function.
4371 (build_fix_expr): Ditto.
4372 (g95_conv_intinsic_aint): Use them. Use builtin functions.
4373 (g95_conv_intrinsic_function): Add FLOOR and CEILING.
4375 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4377 * array.c (g95_compare_array_spec): Remove unreachable code.
4378 * expr.c (g95_copy_expr): Likewise.
4379 * intrinsic.c (g95_convert_type): Likewise.
4380 * misc.c (g95_code2string): Likewise.
4381 * simplify.c (g95_simplify_ishft, g95_simplify_real,
4382 g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
4383 * trans-stmt.c (g95_trans_select): Likewise.
4384 * primary.c (extend_ref): Add an assertion.
4385 * simplify.c (g95_convert_constant): Add const.
4386 * intrinsic.h: Remove g95_check_x_ni.
4387 * f95-lang.c (g95_finish): Call g95_release_include_path.
4389 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4391 * resolve.c (resolve_contained_functions): Fix typo introduced on
4394 2003-06-09 Paul Brook <paul@nowt.org>
4396 * g95.h: Include system.h not hwint.h.
4397 * many: use safe-ctype.h not ctype.h. Change isalpha -> ISALPHA, etc.
4398 * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
4400 2003-06-09 Paul Brook <paul@nowt.org>
4402 * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
4403 * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
4404 * trans-decl.c (g95_add_decl_to_functions): Make non-static.
4405 (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
4406 (g95_generate_function_code): Translate COMMON and EQUIVALENCE
4408 * trans.h (g95_trans_equivalence, g95_trans_common,
4409 g95_add_decl_to_function): Declare.
4410 * trans-common.c, trans-equivalence.c: New files.
4412 2003-06-08 Steven Bosscher <steven@gcc.gnu.org>
4414 * intrinsic.c (g95_intrinsic_extension): Remove.
4415 (add_functions): Substitute g95_check_x for g95_check_x_ni
4417 (g95_init_expr_extensions): New function.
4418 (g95_intrinsic_func_interface): Use it.
4419 * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
4420 * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
4421 g95_check_precision, g95_check_present, g95_check_radix,
4422 g95_check_range, g95_check_selected_real_kind): Do not set
4423 g95_intrinsic_extension.
4424 (g95_check_x_ni): Remove now duplicate of g95_check_x.
4426 * expr.c (check_inquiry): Add FIXME, fixup some code style.
4428 2003-06-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4430 * g95.h (ref_type): Name this type explicitly.
4431 * module.c (MIO_NAME): Add specialisations of mio_name.
4432 (mio_symbol_attribute, mio_typespec, mio_array_ref,
4433 mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
4434 (ab_attribute): Name this type explicitly.
4435 (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
4437 2003-06-05 Kejia Zhao <kejia_zh@yahoo.com.cn>
4439 * trans-intrinsic.c (g95_conv_allocated): New function.
4440 (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
4442 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
4444 * f95-lang.c: Don't include g95-support.h
4445 (g95_mark_addressable): Add prototype.
4446 (g95_init_decl_processing): Remove C front end hack.
4447 * f95-tree.c: Remove file.
4448 * support.c: Remove file.
4449 * g95-support.h: Remove file.
4450 * trans-types.c (g95_init_types): Set up boolean
4451 type related tree nodes.
4452 * Make-lang.in: Remove rules for dead files and
4453 dependencies on them.
4455 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
4457 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
4458 C front end dependency. Also, convert.c does not depend on
4459 g95-support.h anymore.
4460 * convert.c: Don't include c-common.h and g95-support.h
4461 * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
4462 (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
4463 stmts_are_full_exprs_p, current_stmt_tree,
4464 current_scope_stmt_stack): Remove.
4465 * g95-support.h (unsigned_conversion_warning): Kill proto.
4466 (boolean_type_node, boolean_true_node, boolean_false_node):
4467 Don't define here. Instead, make then true tree nodes in
4469 * support.c (c_global_trees): Die, C front end, die!!!
4470 (g95_init_c_decl_hacks): Don't touch intmax_type_node,
4471 uintmax_type_node, string_type_node and const_string_type_node.
4472 (decl_constant_value, overflow_warning): Make static functions.
4473 They are in death row too, though.
4474 (default_conversion, c_expand_asm_operands): Remove.
4475 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
4476 trans.c: Don't include c-common.h.
4477 * trans-types.c (boolean_type_node, boolean_true_node,
4478 boolean_false_node): Make them real tree nodes.
4479 * trans-types.h (intmax_type_node, string_type_node,
4480 const_string_type_node): Hack to work around C dependencies
4481 in builtin-types.def.
4483 2003-06-04 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4485 * decl.c (decl_types): Add some iterators-like sentinels.
4486 * decl.c (match_attr_spec): Use them.
4487 Use "decl_types" instead of "int".
4488 Add cast in call to g95_match_strings.
4489 * dump-parse-tree.c (g95_show_namespace): Use "g95_intrinsic_op"
4491 * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
4492 (g95_interface_info): Use "g95_intrinsic_op".
4493 * dump-parse-tree.c (g95_show_namespace): Use them.
4494 * interface.c (g95_check_interfaces): Use them.
4495 * module.c (read_module, write_module): Use them.
4496 * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
4497 Use "g95_intrinsic_op".
4498 * interface.c (check_operator_interface): Use "g95_intrinsic_op".
4499 Add a default case in switch statement.
4500 * intrinsic.h (g95_generic_isym_id): Moved to...
4501 * g95.h (g95_generic_isym_id): here.
4502 (g95_intrinsic_sym): Use "g95_generic_isym_id".
4503 * intrinsic.c (make_generic): Use "g95_generice_isym_id".
4504 * trans-intrinsic.c (g95_intrinsic_map_t,
4505 g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
4506 * match.c (g95_match_intrinsic_op): Add cast in call to
4509 2003-06-03 Steven Bosscher <steven@gcc.gnu.org>
4511 * support.c (skip_evaluation, warn_conversion, lvalue_p,
4512 lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
4513 constant_fits_type_p, convert_and_check,
4514 unsigned_conversion_warning): Remove these ugly remnants
4515 we inherited from the C front end.
4516 (function_types_compatible): Remove '#if 0'-edcode.
4517 (build_modify_expr): Likewise.
4518 (convert_for_assignment): Don't use the deceased functions.
4519 The parameter fundecl is now unused.
4520 (decl_constant_value): Always just return decl. In fact
4521 this function is not used at present, but it might be in
4522 the future, when we start using the tree inliner.
4523 (overflow_warning, default_conversion, c_expand_asm_operands):
4524 Abort when these are called, they are part of the C type
4525 checking implementation and therefore poison to Fortran.
4527 2003-06-04 Steven Bosscher <steven@gcc.gnu.org>
4529 * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
4530 c-pretty-print.o and c-dump.o. Add a comment on why we
4531 depend on c-semantics.c.
4532 * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
4533 Don't use the C front end tree dumper hook to dump the
4534 language specific tree representation -- we don't have
4535 one. So instead, inherit the default langhook.
4537 2003-06-02 Paul Brook <paul@nowt.org>
4539 * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
4541 2003-06-02 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4543 * check.c (g95_check_associated): Use proper types. Remove
4544 extraneous argument in call to g95_error().
4546 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
4548 * resolve.c (resolve_operator): Make logical operands convert to the
4549 type with higher kind.
4551 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
4553 * check.c (g95_check_associated): Make sure both pointer and target has
4554 the same type and rank. Null pointer or array section with vector
4555 subscript as target are not allowed.
4556 * trans.h: Declare gfor_fndecl_associated.
4557 * trans-decl.c: (g95_build_builtin_function_decls): Initialize
4558 gfor_fndecl_associated.
4559 * trans-intrinsic.c (g95_conv_associated): New function.
4560 (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
4562 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
4564 * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
4565 according to POINTER itself rather than TARGET.
4566 (g95_conv_expr_descriptor): Make lbound start at 1.
4567 * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
4569 2003-06-01 Paul Brook <paul@nowt.org>
4571 * expr.c (g95_type_convert_binary): Make it match the standard.
4572 * g95.texi: Remove dead link.
4574 2003-06-01 Steven Bosscher <steven@gcc.gnu.org>
4576 * g95.texi: Cleanup somewhat in preparation for inclusion
4579 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4580 Canqun Yang <canqun@yahoo.com.cn>
4582 * resolve.c (compare_bound_int, resolve_where_shape): Proper return
4584 (g95_find_forall_index): Return proper value.
4585 (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
4586 compare the return value from g95_find_forall_index.
4588 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4589 * g95.h, io.c (g95_st_label): Remove "length".
4590 (g95_symtree): Remove "link".
4591 (g95_case): Remove "code".
4592 * arith.c, arith.h (g95_compare_string, g95_convert_integer,
4593 g95_convert_real): Make an argument pointer to const.
4594 * decl.c (colon_seen): Add a TODO.
4595 * interface.c (g95_compare_types): Fix typo.
4596 * interface.c (compare_interfaces): Preserve value of "p".
4597 * intrinsic.c (sort_actual): Remove "i".
4598 * match.c (g95_match_assign): Proper type in call to g95_match().
4599 * parse.c (next_free): Avoid duplicate call due to macro.
4600 * parse.c (check_statement_label): wrong type in call to g95_error.
4601 * primary.c (match_real_constant): Add a TODO.
4602 * resolve.c (resolve_select): Remove useless conditional.
4603 * simplify.c (g95_simplify_repeat): Proper assignment to
4604 "value.character.string".
4605 * simplify.c (g95_simplify_reshape): Wrong variable in call to
4608 2003-05-20 Canqun Yang <canqun@yahoo.com.cn>
4610 * trans-stmt.c: Remove unnecessary include file defaults.h.
4612 2003-05-19 Lifang Zeng <zlf605@hotmail.com>
4614 * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
4616 (g95_trans_forall): Allow arbitrary number of FORALL indexes and
4617 actual variables used as FORALL indexes.
4619 2003-05-15 Paul Brook <paul@nowt.org>
4621 * trans-array.c (g95_trans_static_array_pointer): Use
4623 (g95_trans_deferred_array): Initialize static array pointers.
4624 * trans-expr.c (g95_conv_function_call): Use formal arglist to
4625 correctly pass POINTER and absent CHARACTER arguments.
4627 2003-05-14 Lifang Zeng <zlf605@hotmail.com>
4629 * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
4630 (g95_resolve_forall_body): Resolve FORALL body.
4631 (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
4632 (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
4633 (g95_find_forall_index): Check whether the FORALL index appears in
4634 the expression or not.
4635 (resolve_code): Modified.
4637 2003-05-14 Paul Brook <paul@nowt.org>
4639 * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
4641 2003-05-13 Paul Brook <paul@nowt.org>
4643 * trans-types.c (g95_max_array_element_size): Now a tree node.
4644 (g95_init_types): Work out max size properly.
4645 (g95_get_dtype_cst): Modify to match.
4647 2003-05-11 Paul Brook <paul@nowt.org>
4649 * trans-io.c (add_case): Create a label decl for case labels.
4651 2003-05-11 Paul Brook <paul@nowt.org>
4653 * arith.c (g95_integer_index_kind): New variable.
4654 * f95-lang.c (g95_init): Move frontend initialization here ...
4655 (g95_post_options): ... from here.
4656 * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
4657 * intrinsic.c (add_functions): Use index kinds.
4658 * iresolve.c: Convert to index_kind where needed.
4659 * resolve.c (g95_resolve_index): Make public, use index_kind.
4660 (resolve_array_ref): Adjust to match.
4661 * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
4662 * trans-stmt.c: Ditto.
4663 * trans-types.c: Ditto.
4664 * trans-types.h (g95_array_index_kind): Remove declaration.
4665 * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
4667 2003-05-07 Paul Brook <paul@nowt.org>
4669 * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
4670 * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
4673 2003-05-07 Paul Brook <paul@nowt.org>
4675 * trans-array.c (trans_static_array_pointer,
4676 g95_trans_array_constructor_value, g95_conv_array_initializer,
4677 g95_conv_structure): CONSTRUCTOR nodes only have one operand.
4678 (g95_add_loop_ss_code): Convert subscripts to the correct type.
4679 * trans-stmt.c (g95_trans_character_select): Ditto.
4680 * trans-types.c (g95_init_types): Ditto.
4682 2003-05-07 Steven Bosscher <steven@gcc.gnu.org>
4684 * f95-lang.c (expand_function_body): Use input_line, not lineno.
4685 * trans-decl.c (g95_generate_function_code,
4686 g95_generate_constructors): Likewise.
4687 * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
4688 g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
4691 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
4692 * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
4693 with components point to the DERIVED type itself, and two DERIVED
4694 type with components point to each other.
4695 * trans-expr.c (g95_conv_componet_ref): Modified
4697 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
4698 * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
4700 (g95_trans_pointer_assign): Implement Nullify.
4702 2003-05-01 Paul Brook <paul@nowt.org>
4704 * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
4705 * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
4707 2003-05-01 Paul Brook <paul@nowr.org>
4709 * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
4710 trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
4713 2003-05-01 Canqun Yang <canqun@yahoo.com.cn>
4715 * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
4718 2003-04-28 Paul Brook <paul@nowt.org>
4720 * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
4721 as their kind suggests.
4722 (g95_resolve_reshape): Ditto.
4724 2003-04-28 Chun Huang <compiler@sohu.com>
4726 * trans-expr.c (g95_conv_substring_expr): New function.
4727 (g95_conv_expr): Use it.
4729 2003-04-28 Paul Brook <paul@nowt.org>
4731 * iresolve.c (g95_resolve_transpose): Make it match the
4733 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
4735 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
4737 * trans-types.c (g95_add_field_to_struct): New function to
4738 add a field to a UNION_TYPE or RECORD_TYPE.
4739 * trans-types.h (g95_add_field_to_struct): Prototype.
4740 (g95_get_derived_type): Use g95_add_field_to_struct to add
4742 * trans-io.c (g95_add_field): Remove.
4743 (ADD_FIELD): Use new g95_add_field_to_struct function.
4744 (ADD_STRING): Likewise.
4745 * trans-stmt.c (g95_trans_select): Likewise.
4746 (g95_add_field): Remove duplicated function.
4748 2003-04-18 Canqun Yang <canqun@yahoo.com.cn>
4750 Port implementation for CHARACTER SELECT from Andy's tree.
4751 * trans-stmt.c (g95_trans_character_select): Implement character
4752 select. (g95_add_field): New function.
4753 * trans-decl.c: Declare 'gfor_gndecl_select_string'.
4754 (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
4755 * g95.h (struct g95_case): Add field 'int n'.
4756 * trans.h: Declare 'gfor_fndecl_select_string'.
4758 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
4760 * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
4761 (g95_insert_bbd): Die on duplicates.
4762 * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
4764 2003-04-14 Steven Bosscher <steven@gcc.gnu.org>
4766 * g95.texi: Require GMP 4.0 -- like we actually
4767 do. Explain the testsuite and what-goes-where.
4768 Don't use undefined texinfo symbol. Break very
4769 long line. Remove finished item from the list
4772 2003-04-11 Canqun Yang <canqun@yahoo.com.cn>
4774 * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
4777 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
4779 * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
4780 (g95_trans_forall_body): New function.
4782 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
4784 * resolve.c (resove_where): New function.
4785 (resolve_where_shape): New function.
4786 (resolve_code): Add call to 'resolve_where'
4787 * trans-stmt.c (g95_trans_where): Modified.
4788 (g95_trans_where_2): New function.
4789 (g95_trans_where_assign): New function.
4790 (g95_evaluate_where_mask): New function.
4791 (g95_add_to_stmt_list): New function.
4792 (g95_get_temp_expr): New function.
4793 * trans.h (where_stmt_list): New structure.
4795 2003-04-10 Paul Brook <paul@nowt.org>
4797 * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
4798 (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
4800 2003-04-10 Steven Bosscher <steven@gcc.gnu.org>
4802 Update after mainline -> tree-ssa-branch merge.
4803 * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
4805 (g95_init): Update for new lang_hooks definition.
4806 (g95_post_options): New langhook.
4807 (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
4808 * scanner.c (g95_new_file): Comment update.
4810 2003-04-09 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4812 * g95.h, lang-options.h: Add -Wimplicit-interface.
4813 * options.c (g95_init_options, g95_parse_arg): Set it.
4814 * interface.c (check_intents): Warn about call with implicit
4816 * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
4819 2003-04-05 Paul Brook <paul@nowt.org>
4821 * iresolve.c (g95_resolve_spread): Don't resole based on type.
4822 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
4824 2003-03-29 Paul Brook <paul@nowt.org>
4826 * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
4827 (g95_resolve_unpack): Ditto.
4828 * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
4829 (g95_conv_intrinsic_function): Use it. Remove PACK and UNPACK.
4830 (g95_is_intrinsic_libcall): Add PACK and UNPACK.
4832 2003-03-25 Paul Brook <paul@nowt.org>
4834 * arith.c (g95_unary_user, g95_user): Remove dead functions.
4836 * array.c (g95_free_array_ref): Ditto.
4838 * symbol.c (g95_use_derived_tree): Ditto.
4839 * intrinsic.c (add_functions): Use simplification for SCALE.
4840 * primary.c (g95_match_rvalue): Test sym, not symtree.
4842 2003-03-25 Paul Brook <paul@nowt.org>
4844 * trans-decl.c (build_function_decl): Add parameter before it gets
4845 turned into a constant.
4846 * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
4847 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
4848 * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
4850 2003-03-22 Paul Brook <paul@nowt.org>
4852 * trans-array.c (g95_conv_array_initializer): Allow scalar
4854 * trans-decl.c (g95_finish_var_decl): Result variables are not
4856 * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
4857 (g95_conv_intrinsic_function): Use it.
4858 * trans-types.h (g95_type_spec): Remove dead declaration.
4860 2003-03-21 Paul Brook <paul@nowt.org>
4862 * trans-decl.c (g95_build_function_decl): Mark string parameters.
4864 2003-03-20 Paul Brook <paul@nowt.org>
4866 * trans-decl.c (g95_build_function_decl): Put character length
4867 parameters at the end of the function declaration.
4868 * trans-expr.c (g95_conv_function_call): Ditto.
4869 * trans-types.c (g95_get_function_type): Ditto.
4871 2003-03-20 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4873 * resolve.c (resolve_formal_arglist): Don't impose intent for
4874 procedure arguments of pure functions.
4875 (resolve_select): Remove redundant assignment.
4877 2003-03-19 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4879 * arith.c (validate_logical), g95.h, options.c (g95_init_options):
4881 * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
4882 * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
4884 * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
4886 * symbol.c (g95_add_type): Fix typo in comment.
4889 2003-03-16 Paul Brook <paul@nowt.org>
4891 * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
4892 * expr.c (g95_build_call): Remove.
4893 * f95-lang.c (puchdecl_top_level): New function.
4894 * g95.h (g95_code): Store resolved symbol, not just the name.
4895 * intrinsic.c (g95_intrinsic_namespace): New global namespace.
4896 (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
4897 (g95_get_intrinsic_sub_symbol): New function.
4898 * iresolve.c (g95_resolve_cpu_time): Use it.
4899 (g95_resolve_random_number): Ditto.
4900 * resolve.c: Set code->resolved_sym instead of code->sub_name.
4901 * trans-decl.c (g95_get_extern_function_decl): Give external decls
4902 the correct DECL_CONTEXT. Add global symbold to the global scope.
4903 * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
4906 2003-03-16 Paul Brook <paul@nowt.org>
4908 * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
4909 * options.c (g95_parse_arg): Ditto.
4910 * module.c (mio_symbol_attribute): Handle the always_explicit bit.
4911 * resolve.c (resolve_formal_arglist): The always_explicit sould be set
4912 for the procedure, not the parameter.
4913 * trans-array.c (g95_trans_g77_array): New function.
4914 (g95_trans_assumed_size): Use it.
4915 (g95_trans_dummy_array_bias): Ditto.
4916 (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
4917 (g95_conv_expr_descriptor): ... to here. Update callers.
4918 * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
4919 (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
4920 * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
4921 * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
4922 * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
4923 (g95_sym_type): Ditto.
4925 2003-03-15 Paul Brook <paul@nowt.org>
4927 * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
4929 * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
4931 2003-03-14 Paul Brook <paul@nowt.org>
4933 * trans-array.c (g95_array_is_packed): Remove.
4934 (g95_conv_array_base): Correctly handle all descriptorless cases.
4935 (g95_conv_array_stride): Use descriptorless strides.
4936 (g95_trans_dummy_array_bias): Don't always repack the array.
4937 (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
4939 * trans-types.c (g95_get_nodesc_array_type): Differentiate between
4940 dummy and non-dummy arrays...
4941 (g95_sym_type, g95_get_derived_type): ... like these.
4942 (g95_get_array_type_bounds): Allow discontiguous arrays.
4944 2003-03-12 Paul Brook <paul@nowt.org>
4946 * array.c (g95_resolve_array_spec): Fix comment.
4947 * g95.h (symbol_attributes): New flag always_explicit.
4948 * resolve.c (resolve_formal_arglist): Set it always_explicit.
4949 * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
4950 * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
4951 (g95_trans_array_bounds): Allow assumed shape arrays.
4952 (g95_trans_repack_array): Remove.
4953 (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
4954 * trans-decl.c (g95_build_qualified_array): Only ignore absent
4955 bounds for assumed size arrays.
4956 (g95_build_dummy_array_decl): Use descriptorless arrays.
4957 * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
4958 (g95_trans_pointer_assign): Fix typo.
4959 * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
4961 (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
4962 * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
4963 Also modify callers.
4964 * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
4966 2003-03-08 Paul Brook <paul@nowt.org>
4968 * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
4969 (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
4970 * resolve.c (compare_spec_to_ref): Allow full array sections.
4972 2003-03-08 Paul Brook <paul@nowt.org>
4974 * expr.c (g95_simplify_expr): Also simplify array index and
4975 substring expressions.
4976 * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
4977 * trans-array.c (g95_trans_array_bounds): New function.
4978 (g95_trans_auto_array_allocation): Use it.
4979 (g95_trans_assumed_size): Rewrite.
4980 * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
4981 (gfor_fndecl_repack): Remove.
4982 (g95_build_qualified_array): Handle absent upper bounds.
4983 (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
4984 (g95_get_symbol_decl): Update.
4985 (g95_build_intrinsic_function_decls): Initialize new decls.
4986 * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
4987 (gfor_fndecl_repack): Remove.
4988 * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
4989 * trans-types.c: (g95_build_array_type): Merge duplicated code..
4990 (g95_get_nodesc_array_type): Handle absent bounds.
4991 * trans-types.h (g95_get_nodesc_array_type): Declare.
4993 2003-03-04 Paul Brook <paul@nowt.org>
4995 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
4998 2003-03-02 Paul Brook <paul@nowt.org>
5000 * options.c (g95_init_options): Drfault to 1.
5001 (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
5002 * trans-array.c (g95_conv_array_data, g95_conv_array_base,
5003 g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
5004 Handle non-constant size automatic arrays.
5005 (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
5006 generic bound functions.
5007 (g95_trans_auto_array_allocation): Don't create a descriptor.
5008 (g95_trans_assumed_size): New function (broken).
5009 (g95_trans_dummy_array_bias): Remove unused var.
5010 * trans-array.h (g95_trans_assumed_size): Declare.
5011 * trans-decl.c (create_index_var): New fuction.
5012 (g95_build_qualified_array): New function.
5013 (g95_get_symbol_decl): Use it.
5014 (g95_trans_deferred_vars): Handle assumed shape seperately.
5015 * trans-types.c (get_element_type): Handle heap allocated arrays.
5016 (g95_is_nodesc_array): Include non-const size arrays.
5017 (g95_get_nodesc_array_type): Ditto.
5019 2003-02-23 Paul Brook <paul@nowt.org>
5021 * trans-array.c (g95_array_init_size): Should use stride, not size of
5024 2003-02-18 Paul Brook <paul@nowt.org>
5026 * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
5027 after intrinsic function check.
5029 2003-02-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5031 * io.c (match_io): Fix missing return value and remove useless
5033 * match.c (g95_match): Remove useless assignment.
5034 * module.c (parse_string): Remove useless post increment.
5035 * simplify.c (g95_simplify_verify): Remove useless assignment.
5037 2003-02-15 Paul Brook <paul@nowt.org>
5039 * expr.c (restricted_intrinsic): Handle bad values gracefully.
5040 * g95.h (symbol_attribute): Add referenced member.
5041 (g95_symbol): Add dummy_order member.
5042 (g95_set_sym_referenced): Declare.
5043 * match.c (g95_match_assignment, g95_match_call): Use it
5044 * primary.c (match_actual_arg, g95_match_rvalue,
5045 g95_match_variable): Ditto.
5046 * symbol.c (next_dummy_order): New variable.
5047 (g95_set_sym_referenced): New function.
5048 (check_done): New function.
5049 (g95_add_*): Use it.
5050 * trans-decl.c: Make formatting conform to GCC standards.
5051 (g95_defer_symbol_init): Add dummy variables in the right order.
5052 (g95_get_symbol_decl): Only accept referenced variables.
5053 (g95_create_module_variable): Module variables are always required.
5054 (generatr_local_decls): New function.
5055 (generate_local_vars): New function.
5056 (g95_generate_function_code): Use it.
5058 2003-02-13 Paul Brook <paul@nowt.org>
5060 * trans-decl.c (g95_conv_struct_cons): Remove.
5061 (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
5062 * trans-expr.c (g95_conv_structure): New function.
5063 (g95_conv_expr): Use it.
5065 2003-02-09 Paul Brook <paul@nowt.org>
5067 * trans-array.c (g95_array_init_size): Don't evaluate the linit
5068 expressions multiple times.
5069 (g95_trans_auto_arry_allocation): Use pointer not tmp.
5071 2003-02-08 Paul Brook <paul@nowt.org>
5073 * module.c (mio_symtree_ref): Declare as static.
5074 (mio_expr): Remove dead code.
5075 (read_module): Set the symtree link for fixups.
5076 * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
5077 (build_round_expr): ... to this.
5078 (g95_conv_intrinsic_aint): New function.
5079 (g95_conv_intrinsic_function): Use it.
5081 2003-02-08 Paul Brook <paul@nowt.org>
5083 * trans-array.c (g95_trans_array_constructor_value): Use the acutal
5084 offset after modificaton, not the increment expression.
5085 * dependency.c: Kill excess whitespace.
5087 2003-02-07 Sanjiv Gupta <sanjivg@noida.hcltech.com>
5089 * dependency.h: Remove some function declarations.
5090 * dependency.c (get_no_of_elements): Change this function not to
5092 * other: Add comments for all modified functions.
5094 2003-02-06 Paul Brook <paul@nowt.org>
5096 * g95spec.c (lang_specific_functions): Fix initializer warning.
5097 * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
5098 for structure type names.
5099 * trans-decl.c (g95_cons_structure_cons): New function.
5100 (g95_get_symbol_decl): Use it.
5101 * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
5104 2003-02-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5106 * resolve.c (compare_cases): Add const to casts.
5108 2003-01-30 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5110 * g95.h (g95_check_f): Change a1 to f1m.
5111 * intrinsic.c (add_sym_1m, check_specific,
5112 g95_intrinsic_func_interface): Use it.
5114 * module.c (init_pi_tree): Remove useless cast.
5115 (fp2): Fix argument type.
5117 * parse.c (parse_select_block): Add comment.
5119 2003-02-05 Toon Moene <toon@moene.indiv.nluug.nl>
5121 * lang-options.h: Fix warning involving C90 concatenated
5124 2003-02-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
5125 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5127 * io.c (format_asterisk): Complete initializer to kill warning.
5128 * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
5129 DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
5130 (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
5131 new defines to complete initializers. Kills all warnings.
5133 * Make-lang.in: Comment cleanup.
5135 2003-02-05 Paul Brook <paul@nowt.org>
5137 * array.c (g95_free_constructor): Handle NULL expressions.
5138 * resolve.c (resolve_structure_cons): Ditto.
5139 * decl.c (g95_match_null): New Function.
5140 (variable_decl): Use it.
5141 * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
5142 * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
5143 * trans-types.c (g95_set_decl_attributes): Remove empty function.
5145 2003-02-05 Paul Brook <paul@nowt.org>
5147 * trans.h (build1_v): New macro.
5148 (build_v): Remove pointless and incorrect prototype.
5149 * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
5150 * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
5152 2003-02-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
5154 * Make-lang.in (F95_OBJS): Remove one more dead file.
5156 2003-02-01 Paul Brook <paul@nowt.org>
5158 * lang-specs.h: Don't pass -ffixed-form to the linker.
5159 * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
5161 2003-02-01 Paul Brook <paul@nowt.org>
5163 * Make-lang.in (F95_OBJS): Remove dead files.
5164 * trans-array.c (g95_array_init_size): Do the right thing when
5166 * trans-decl.c (g95_generate_function_code): Initialize deffered
5167 symbol list before translating contained subroutines.
5168 * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
5169 scalar invariant values here...
5170 (g95_conv_variable, g95_conv_function_call): ... instead of here ...
5171 * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
5173 2003-01-29 Paul Brook <paul@nowt.org>
5175 * trans-array.c (g95_add_loop_code): Put pre code in the right block.
5176 (g95_walk_elemental_function_args): Reverse chains before adding.
5177 (g95_reverse_ss): Move about a bit.
5178 * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
5181 2003-01-28 Paul Brook <paul@nowt.org>
5183 * intrinsic.c (resolve_intrinsic): Use correct union member.
5184 * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
5186 * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
5187 use associated variables.
5188 * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
5189 * trans-expr.c (g95_conv_expr_present): ... to here.
5190 * trans.h: Declare it.
5191 * trans-types.c (g95_sym_type): Assume subroutine if not specified.
5193 2003-01-28 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5195 * array.c (expand_iterator): Suppress useless assignment.
5196 * decl.c (match_char_spec): Ditto.
5197 * io.c (match_io_iterator): Ditto.
5198 * primary.c (match_real_constant): Ditto.
5199 * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
5200 Ditto. Also, use g95_intrinsic_op not int for intrinsic operators.
5201 * matchexp.c (match_add_operand, match_level_5): Likewise.
5202 * module.c (parse_atom, find_enum): Likewise.
5203 * resolve.c: move #include <string.h>
5204 (resolve_select): Fix serious typo.
5206 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.n>
5208 * Make-lang.in: Don't build with broken tree-ssa-pre.
5210 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.nl>
5212 * resolve.c (resolve_index): Add a TODO.
5213 * symbol.c: Remove useless "#include <ctype.h>".
5215 2003-01-27 Paul Brook <paul@nowt.org>
5217 * check.c (check_rest): Allow different type kinds as an extension.
5218 * g95.h (g95_resolve_f): Add f1m.
5219 * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
5220 * intrinsic.h: Chenge prototypes for MIN and MAX.
5221 * iresolve.c (g95_resolve_minmax): New function.
5222 (g95_resolve_min, g95_resolve_max): Use it.
5223 * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
5225 (g95_conv_intrinsic_present): Fix logic.
5227 2003-01-27 Steven Bossche <s.bosscher@student.tudelft.nl>
5229 * g95.h (g95_case): Don't be a tree, be a double linked list.
5230 * match.c (match_case_selector): Remove redundant semantics check.
5231 Clean up a few goto's to make it a tiny little bit faster.
5232 * resolve.c (case_tree): Die.
5233 (compare_cases): Accept and compare unbounded cases too.
5234 (check_case_overlap): Don't build a tree. Instead, merge-sort the
5235 whole list of g95_cases passed from resolve_select.
5236 (sane_logical_select): Die.
5237 (check_case_expr): Return FAILURE if a CASE label is of the wrong
5239 (resolve_select): Fixup case expression for computed GOTOs, put it
5240 in expr, not expr2, for easier handing in the parse tree dumper and
5241 the code generator. Rewrite the rest of the function: Kill
5242 unreachable case labels and unreachable case blocks.
5243 * dump-parse-tree.c (g95_show_code_node): Always dump expr for
5244 an EXEC_SELECT, not case2 anymore.
5245 * trans-const.c (g95_conv_constant_to_tree): New function.
5246 (g95_conv_constant): Use it.
5247 * trans-const.h: Declare prototype for the new function.
5248 * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
5249 g95_trans_character_select): New static functions.
5250 (g95_trans_select): Rewrite.
5252 2003-01-26 Paul Brook <paul@nowt.org>
5254 * intrinsic.c (add_fnctions): Properly add dreal.
5255 * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
5256 (g95_conv_intrinsic_function): Use it.
5257 * trans-io.c (build_dt): Abort on internal files (unimplemented).
5259 2003-01-26 Paul Brook <paul@nowt.org>
5261 Widespread changes to the handling of symbols in expressions. These
5262 are now linked via g95_symtree nodes.
5263 * parse.c (g95_fixup_sibling symbols): New function.
5264 (parse_contained): Use it.
5265 * g95.h (symbol_attribute): Add contained. Indicates a symbol is a
5266 contained procedure that has bee correctly fixed up.
5267 (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
5269 2003-01-24 Paul Brook <paul@nowt.org>
5271 * trans-array.c (g95_walk_expr): Function result attributes are in
5273 * trans-expr.c (g95_conv_function_call,
5274 g95_trans_arrayfunc_assign): Ditto.
5275 * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
5277 2003-01-23 Steven Bosscher <s.bosscher@student.tudelft.nl>
5279 * expr.c (check_restricted): Fix error message.
5280 * symbol.c (free_st_labels): Plug memleak.
5282 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
5284 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
5285 reduce_binary_aa, reduce_binary, eval_intrinsic,
5286 eval_intrinsic_f2): Use typesafe prototypes for eval functions.
5287 * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
5288 for typesafe intrinsics helper functions.
5289 (g95_intrinsic_sym): Use them.
5290 * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
5291 add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
5292 add_sym_5, add_conv, resolve_intrinsic, do_simplify,
5293 check_specific, g95_intrinsic_func_interface,
5294 g95_intrinsic_sub_interface): Adjust all calls to intrinsics
5296 * trans-decl.c (g95_get_extern_function_decl): Likewise.
5297 * Make-lang.in: Don't disable warnings for strict prototypes
5298 any longer, everything is typesafe now.
5300 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
5302 * bbt.c (duplicate_node): Make static.
5303 * module.c (module_name): Make static.
5304 * scanner.c (include_dirs): Make static.
5306 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
5308 Hard coded _gfor_'s should not show up anymore.
5309 * g95.h (PREFIX): New macro.
5310 * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
5312 (g95_resolve_random_number): Likewise.
5313 * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
5314 * trans-io.c: Remove 'prefix' macro. Replace all uses with
5315 the new PREFIX macro from g95.h.
5317 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
5319 The troubles of forking... Andy implemented this just now too.
5320 Let's stick to that and keep the trees close.
5321 * g95.h (g95_st_label): 'format' member is now a g95_expr.
5322 * io.c: Revert previous changes.
5323 (g95_match_format): Match the format string as a character
5325 * match.h (g95_statement_label): Declare external.
5326 * parse.c: Revert previous changes.
5327 * symbol.c (g95_free_st_label): Free a g95_expr instead
5329 * trans-io.c: Revert previous changes.
5330 (build_dt): Use set_string to set the format string.
5332 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
5334 * io.c (format_string): Make non-static.
5335 (g95_match_format): Remember the format string.
5336 (terminate_io): Add I/O termination for empty I/O lists.
5337 * match.h: Declare external format_string.
5338 * parse.c (check_statement_label): Attack the format string
5339 to a format label for FORMAT statements.
5340 * trans-io.c (g95_add_field): Define prefix macro. Replace
5341 all uses of PREFIX define with a use of this macro.
5342 (build_dt): Implement formatted I/O for format labels.
5344 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
5346 * lang-options.h: Kill "-std=F".
5347 * options.c: Remove unimplemented "-std=F". Modify
5349 * misc.c (g95_terminal_width): New function.
5350 * error.c (g95_error_init_1): Use g95_terminal_width.
5351 * g95.h: Add prototype for g95_terminal_width, remove
5354 2003-01-19 Steven Bosscher <s.bosscher@student.tudelft.nl>
5356 * Make-lang.in: Fix typo.
5358 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
5360 * g95.h (struct g95_case): Remove unused cruft, new member
5361 'where' to keep track of the locus of the default case.
5362 * match.c (g95_match_case): Add locus to the current case.
5363 (match_case_selector): Likewise.
5364 * parse.c (parse_select_block): Move semantics check for
5365 multiple DEFAULT cases out of here to...
5366 * resolve.c (check_case_overlap): ...here. Return sooner
5368 (check_case_expr): Take two g95_cases now, use to sure the
5369 expression kinds are the same.
5370 (resolve_select): Cleanup.
5372 2003-01-18 Paul Brook <paul@nowt.org>
5374 * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
5375 * trans-decl.c (g95_set_symbol_decl): Handle non-array result
5377 (g95_get_extern_function_decl): Put decls in the correct context.
5379 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
5381 * trans-io.c: Port changes from Andy to set ERR flag.
5383 2003-01-17 Paul Brook <paul@nowt.org>
5385 * trans-array.c: Add various comments.
5386 (g95_ss_terminator): Declare as const.
5387 (g95_walk_expr): Remove first parameter and update all callers.
5388 (g95_walk_op_expr): Initialize scalar SS properly.
5389 * trans-array.h (g95_walk_expr): Update prototype.
5390 * trans-expr.c: Update for new g95_walk_expr.
5391 * trans-intrinsic.c: Ditto.
5392 * trans-io.c: Ditto.
5393 * trans.h: Various comments for SS chains.
5395 2003-01-17 Paul Brook <paul@nowt.org>
5397 * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
5399 * intrinsic.c (add_functions): Use them.
5400 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
5401 * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
5403 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
5405 Fallout of a small merge conflict:
5406 * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
5408 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
5410 * initrinsic.c: New add_sym_* functions for strong typing.
5411 (add_conv): Make prototype strict.
5412 * dump-parse-tree.c, dependency.c: Include config.h
5413 * resolve.c, trans-io.c: Fix typos.
5415 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
5417 * dump-parse-tree.c (g95_show_code_node): Show the
5418 condition for a computed GOTO that was transformed
5419 to a SELECT CASE construct.
5420 * resolve.c (check_case_overlap): Revert previous switch
5421 to treaps, it was too slow and didn't catch all trouble.
5422 (resolve_symbol): Be more flexible about module procedures.
5423 * symbol.c (check_conflict): Point to relevant section in
5424 the standard for dubious conflict. Allow procedure
5425 dummy arguments to be optional again.
5426 * trans-io (add_field): Rename to g95_add_field. Change
5428 * trans-stmt (trans_select): Handle unbounded cases for
5429 integer SELECT CASE constructs. Fix/add more comment.
5431 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
5433 * g95.h: Uses GCC's function attribute macros.
5434 * error.c, module.c, parse.c, g95.h: More function attributes.
5436 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
5438 * trans-decl.c (get_label_decl): Use TREE_LINENO instead
5439 of DECL_SOURCE_LINE, and TREE_FILENAME instead of
5442 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
5444 * f95-lang.c (pushdecl): Use TREE_LINENO instead of
5446 * trans.c (g95_trans_code): Use annotate_all_with_file_line
5447 instead of nowdead wrap_all_with_wfl.
5449 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
5451 * parse.c (g95_parse_file): In verbose mode, dump the parse tree
5452 before generating code, so we can still see it even if the code
5453 generation phase dies.
5455 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
5457 * decl.c (build_sym): Split out initialization expression parts...
5458 (add_init_expr_to_sym): ...to here.
5459 (variable_decl): Add the symbol following an attribute list to the
5460 symbol tree before parsing the optional initialization expression
5461 if the symbol is not of a derived type.
5462 * primary.c (g95_match_rvalue): Don't assume a symbol always has
5463 a value if it is a PARAMETER.
5465 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
5467 * misc.c: Don't #include <mcheck.h>
5468 * module.c: Ditto. Kill uses of mtrace, muntrace. If there
5469 ever was a glibc bug, then either this was never reported to
5470 glibc people, or it has been fixed for so long that there's
5471 no information you can find about it, anywhere.
5473 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
5476 * module.c (attr_bits, bt_types, array_spec_types):
5477 Switch 'const' and 'static'.
5478 * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
5480 GNU'ify source code:
5481 * trans-io.c: Numerous fixes, one fixed warning and a few
5482 TODO markers so that we don't forget about them.
5484 2003-01-13 Paul Brook <paul@nowt.org>
5486 * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
5487 * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
5489 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
5490 * match.c (g95_match_stop): Fix dumb == -> != error.
5492 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
5494 * dump-parse-tree.c (show_indent): Add line breaks. This
5495 whole dumping process needs cleanups.
5496 * f95-lang.c (g95_mark_addressable): Fix prototype to match
5497 the langhook. Fix 'return's accordingly.
5498 * g95-support.h: Adjust prototype.
5499 * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
5500 * lang-options.h: Add '-fsyntax-only'.
5501 * options.c (g95_init_options): Init 'no_backend'.
5502 (g95_parse_arg): Deal with '-fsyntax-only'.
5503 * parse.c (g95_parse_file): Do not generate code if 'no_backend'
5506 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
5508 * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
5509 arguments. Also make sure that if a symbol is marked INTRINSIC,
5510 an intrinsic with the symbol's name actually exists.
5511 (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
5512 Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
5513 ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
5515 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
5517 * resolve.c (resolve_contained_functions): Fix condition, don't
5518 throw internal_error if a child namespace has no name. Apparently
5519 this can be the case?
5521 2003-01-11 Paul Brook <paul@nowt.org>
5523 Port changes from Andy's tree:
5524 * g95.h (g95_code): Add stop_code.
5525 * match.c (g95_match_stop): Detter syntax checking.
5526 * resolve.c (resolve_generic_f0): Return match type.
5527 (resolve_generic_f): Remove dead/duplicated code.
5528 (resolve_specific_f): Ditto.
5529 * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
5530 * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
5531 * trans-stmt.c (g95_trans_stop): Handle new STOP format.
5533 2003-01-11 Paul Brook <paul@nowt.org>
5535 * trans-array.c: Various documentation/comment changes.
5536 * trans-stmt.c: Ditto.
5539 2003-01-10 Paul Brook <paul@nowt.org>
5541 * options.c/h: Add -fdump-parse-tree as alias of -v.
5543 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
5545 * dump-parse-tree.c (g95_show_namespace): Fixed another
5546 typo. Sorry, it's Friday...
5548 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
5551 * trans-array.c, trans-array.h, trans.c, trans-const.c,
5552 trans-const.h, trans-decl.c, trans-expr.c, trans.h
5553 trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
5554 trans-types.c: Fix bogus copyright years, add 2003.
5555 * trans-types.h: Give copyright header.
5557 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
5559 * dump-parse-tree.c (g95_show_namespace): Fixed typo.
5560 * expr.c, options.c, scanner.c: Add some more 'const' markers.
5561 * intrinsic.c: Some constant strings moved to read-only memory.
5562 * io.c (format_asterisk): Move to...
5565 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
5567 * dump-parse-tree.c (g95_show_namespace): Dump implicit
5568 types for ranges instead of per-letter. Indent the
5569 'CONTAINS' just like everything else.
5570 * resolve.c (resolve_contained_functions): Clarify comment.
5571 Explain non-obvious conditional expression. Improve
5572 diagnostics if tyoe cannot be resolved.
5573 Port semi-fix from Andy's tree:
5574 (was_declared): Move up before first use.
5575 (generic_sym, specific_sym): New functions. Code moved
5576 out if procedure_kind.
5577 (procedure_kind): Simplify using new functions.
5578 (resolve_generic_f): Make sure the functions we find in
5579 a parent namespace is generic.
5580 (resolve_specific_f): Ditto for specific functions.
5582 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
5584 * trans-stmt.c, trans.c: Fix some code style issues. Add
5585 some more comment (but still not enough!).
5587 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
5589 * symbol.c (flavors, procedures, intents, acces_types,
5590 access_types, ifsrc_types): Make const.
5591 * misc.c (g95_string2code): Make 'm' param 'const'.
5592 * module.c (find_enum, write_atom, mio_name): Make
5594 (attr_bits, bt_types, array_spec_types, array_ref_types,
5595 ref_types, expr_types): Make const.
5596 * g95.h: Adjust external decls.
5598 2003-01-09 Paul Brook <paul@nowt.org>
5600 * Testsuite: Add a load of new cases.
5602 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
5604 * Make-file.in: Add dependency on back end header files;
5605 a parallel build should work now.
5606 * f95-lang-c (lang_identifier): Remove bogus comment.
5607 (g95_be_parse_file): Fix prototype.
5608 (g95_init): Make static.
5609 (g95_finish): Make static.
5610 * error.c (g95_syntax_error): Kill. Make define in...
5611 * g95.h (g95_syntax_error): Define.
5612 (g95.options): Make 'source' member 'const'.
5613 * interface.c (g95_match_interface): Explain
5614 hard-to-read condition.
5615 (g95_match_end_interface): Ditto.
5616 * trans_const.c (g95_build_string_const): Make 's' parameter
5618 * trans_const.h: Adjust protoype accordingly.
5619 * trans-decl.c: Include tree-dump.h
5620 (g95_generate_function_code): Build fixes for recent changes
5621 in the tree-ssa branch.
5623 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
5625 * format.c: Kill, move code from here...
5627 * Make-lang.in: Adjust.
5630 * BUGS: Mention where to submit bugs. Move old content...
5631 * TODO: ...to here. New file.
5633 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
5634 Fix most warnings, and suppress the ones we can't fix for now.
5635 * Make-lang.in: Suppress warnings about bad proto's in g95.h,
5636 these warnings just clutter the screen and there's not much
5637 we can do about them for now anyway.
5638 * check.c, iresolve.c: Mark unused function parameters.
5639 * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
5640 they should be resolved before they get here.
5641 * error.c: Remove unused FILE *status_out.
5642 * f95-lang.c (g95_init): Remove bogus cast.
5643 * Many files: Make things 'const' where required.
5644 * g95.h: Fix prototypes for all modified functions above.
5645 (g95_options): Remove 'object' member.
5647 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
5649 * Make-file.in: Cleanup bogus targets. Add more comment.
5650 * lang-options.h: New option '-w'.
5651 * g95.h: add no_options field to struct g95_options.
5652 * options.c (g95_init_options): Default no_warnings to off.
5653 (g95_parse_arg): Recognise the '-w' switch and its alias,
5655 * error.c (g95_warning, g95_warning_now): Don't emit warning if
5656 no_warning option is set.
5657 * iresolve.c (g95_resolve_shape): Fix warning.
5659 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
5661 * primary.c (g95_next_string_char): Rename next_string_char, and
5662 make static. Adjust callers accordingly.
5663 * resolve.c (resolve_generic_f0): Return try, not match. Adjust
5664 callers accordingly.
5665 * g95.h: Split out all g95_match* functions to...
5666 * match.h: ...here. New file.
5667 * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
5668 matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
5670 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
5672 * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
5673 g95_merge_new_implicit): New functions.
5674 (g95_match_implicit_none, g95_match_implicit): Move from here...
5675 * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
5676 Modify to use the new functions in symbol.c.
5677 * g95.h: Add and move prototypes.
5679 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
5681 * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
5682 node compare function.
5683 (g95_insert_bbt): Likewise.
5684 (g95_insert_bbt_with_overlap): Likewise.
5685 (g95_delete_bbt): Likewise.
5686 (delete_treap): Likewise. Also fix a potential bug when calling it.
5687 * module.c (compare_pointers): Change proto to compare_fn.
5688 (compare_integers): Likewise.
5689 (compare_true_names): Likewise.
5690 (find_true_name): Adjust call to compare_true_names to match proto.
5691 (require_atom, write_atom, mio_name): Fix 'const' warnings.
5692 (init_pi_tree): Make compare a compare_fn instead of (int *).
5693 * resolve.c (compare_cases): Change proto to compare_fn.
5694 * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
5695 it static, and rename to compare_symtree.
5696 (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
5698 * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
5699 of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
5701 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
5702 * Make-lang.in: Fix spaces/tabs issues from previous patch.
5703 * patch.options: Blow away Paul's checkin mistake :-)
5704 * io.c (terminate_io): Fix memory leak (Arnaud).
5706 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
5708 * Make-lang.in: Teach about building DVI, info manual.
5709 * g95.texi: New file.
5711 2003-01-02 Paul Brook <paul@nowt.org>
5713 * trans-array.c (g95_reverse_ss): Make static and don't use.
5714 (g95_conv_ss_descriptor): Don't use g95_loopinfo
5715 (g95_conv_array_parameters): Modify for pointer assignments.
5716 (g95_walk_subexpr): New function.
5717 (g95_walk_expr*): Use it.
5718 * trans-array.h (g95_reverse_ss): Remove prototype.
5719 * trans-expr.c (g95_trans_pointer_assign): Implement.
5720 (Many): Set se.want_pointer before calling g95_conv_array_parameter.
5721 * trans-intrinsic.c: Sync with scalarizer changes.
5722 * trans-io.c: Ditto.
5724 2002-12-29 Paul Brook <paul@nowt.org>
5726 * trans-array.c: Document calling convention for arrays.
5728 2002-12-19 Paul Brook <paul@nowt.org>
5730 * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
5731 assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
5732 optional parameters for some intrinsics.
5733 (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
5734 * trans-expr.c (g95_conv_function_call): Pass NULL for absent
5735 optional parameters.
5736 * trans.h (g95_se): Add ignore_optional flag.
5738 2002-12-15 Paul Brook <paul@nowt.org>
5740 * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
5741 * trans-decl.c (g95_generate_function_code): Use TDI_original.
5743 2002-12-14 Paul Brook <paul@nowt.org>
5745 * trans-stmt.c (g95_trans_call): Use resolved symbol name.
5747 2002-12-12 Paul Brook <paul@nowt.org>
5749 * trans-array.c (g95_trans_array_constructor_subarray): Fully
5750 initialize the scalarizer.
5751 (various): Update to new format of g95_expr->value.constructor.
5753 2002-12-08 Paul Brook <paul@nowt.org>
5755 * trans-array.c (g95_put_offset_into_var): New function.
5756 (g95_trans_array_constructor_subarray): New function.
5757 (g95_trans_array_constructor_value): Use it.
5758 (g95_array_cons_size): Don't abort() on array components.
5760 2002-12-08 Paul Brook <paul@nowt.org>
5762 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
5763 * support.c: Update #includes.
5764 (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
5765 * trans-array.c: Update #includes.
5767 * trans-const.c: Ditto.
5768 * trans-io.c: Ditto.
5769 * trans-types.c: Ditto.
5770 (g95_init_types): Set size_type_node.
5771 * trans-decl.c: Update #includes.
5772 (gfor_fndecl_adjust{l,r}): Declare and initialize.
5773 * trans-stmt.c: Update #includes.
5774 (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
5775 (g95_trans_select): Fix check for unbounded ranges.
5776 * trans-expr.c: Update #includes.
5777 (g95_conv_string_tmp): New function.
5778 (g95_conv_concat_op): Use it.
5779 * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
5780 * Trans-intrisic.c: Update #includes.
5781 (g95_conv_intrinsic_strcmp): New function.
5782 (g95_conv_intrinsic_adjust): Ditto.
5783 (g95_conv_intrinsic_function: Use them.
5785 2002-11-30 Paul Brook <paul@nowt.org>
5787 * trans-array.c (g95_walk_function_expr): Handle non-array return by
5789 * trans-dec.c (g95_build_function_decl): Handle character return
5791 (g95_get_fake_result_decl): Ditto.
5792 (g95_trans_deferred_vars): Ditto.
5793 * trans-expr.c (g95_conv_function_call): Ditto.
5794 (g95_trans_arrayfunc_assign) Limit to array valued functions.
5795 * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
5796 (g95_conv_intrinsic_function): Use it.
5797 * trans-types.c (g95_sym_type): Handle functions returning strings.
5798 (g95_return_by_reference): Ditto.
5799 (g95_get_function_type): Ditto.
5801 2002-11-18 Paul Brook <paul@nowt.org>
5803 * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
5804 requires a temporary.
5805 (g95_trans_select): Handle computed gotos.
5806 * trans-types.c (g95_build_array_type): Warn about non-functional
5807 assumed shape arrays.
5808 * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
5810 * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
5811 (g95_conv_intrinsic_int): New function.
5812 (g95_conv_intrinsic_mod): New function.
5813 (g95_conv_intrinsic_ichar): New function.
5814 (g95_conv_intrinsic_function): Use them.
5815 (g95_conv_intrinsic_dim): Use g95_evaluate_now.
5817 2002-11-17 Toon Moene <toon@moene.indiv.nluug.nl>
5819 * trans-types.c (g95_build_array_type): Assumed
5820 sized arrays can have rank > 1.
5821 * trans.c (g95_trans_code): Remove erroneous
5822 warning about CONTINUE.
5823 * trans-expr.c (g95_conv_variable): Remove
5826 2002-11-15 Paul Brook <paul@nowt.org>
5828 * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
5830 2002-10-31 Paul Brook <paul@nowt.org>
5832 * f95-tree.c: Remove tree copying stuff that's now in gimple.c
5833 * trans-expr.c (g95_conv_component_ref): Handle character string
5835 (g95_conv_string_parameter): Ditto.
5836 * trans-types.c (g95_get_derived_type): Add length decl to caracter
5839 2002-10-10 Paul Brook <paul@nowt.org>
5841 * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
5842 * trans-expr.c (g95_conv_function_call): Remove unreliable return value
5844 * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
5845 (g95_conv_intrinsic_function): Handle size and shape intrinsics.
5846 (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
5847 * trans-types.c (pvoid_type_node): Declare and initialize.
5848 * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
5849 (g95_array_allocate): Fix when base==data.
5850 (g95_conv_array_parameter): Correctly handle reduced rank sections.
5851 * trans-io.c (g95_trans_write): Correctly handle string modifiers.
5853 2002-10-09 Paul Brook <paul@nowt.org>
5855 * (g95_conv_expr_reference): Handle character strings correctly.
5857 2002-10-07 Paul Brook <paul@nowt.org>
5859 (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
5861 * trans-array.c (g95_build_array_initializer): Remove.
5862 (g95_conv_array_initializer): New Function.
5863 (g95_trans_auto_arry_allocation): Cleanup.
5864 (g95_trans_init_character_array): Remove.
5865 * g95spec.c: Link in libgforbegin.
5866 * trans.c (g95_generate_code): Rename main function to MAIN__.
5867 (g95_create_var): New function.
5868 (g95_create_var_np): New function.
5869 (g95_evaluate_now): New function.
5870 (g95_start_block): New function.
5871 (g95_finish_block): New function.
5872 (g95_add_expr_to_block): New function.
5873 (g95_add_block_to_block): New function.
5874 * trans-expr.c (g95_conv_componen_ref): New function.
5875 * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
5876 (F95_OBJS): Add dependency.o.
5877 * f95-lang.c (g95_is_simple_stmt): Remove.
5878 * f95-tree.c (mark_not_simple): New function.
5879 (unshare_all_trees): New function.
5880 (create_tmp_var, create_tmp_alias_var): Remove.
5881 * support.c (declare_tmp_vars, tree_last_decl): Remove.
5882 * trans*: Convert to new IR using GENERIC trees. Don't bother about
5883 SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
5885 2002-10-01 Paul Brook <paul@nowt.org>
5887 * trans-array.c: Add support for descriptorless arrays.
5888 (g95_conv_array_data): New function.
5889 (g95_conv_array_base): New function.
5890 * trans-array.h: Declare these here.
5891 * trans-decl.c(g95_create_mopdule_variable): Perform variable
5892 initialization and creation here.
5893 (g95_create_module_vars): Instead of here.
5894 * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
5895 * trans-intrinsic.c: Ditto.
5896 * trans-types.c (g95_is_nodesc_array): New function.
5897 (g95_get_nodesc_array_type): New function.
5898 (g95_sym_type, g95_get_derived_type): Use them.
5899 * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
5901 2002-09-28 Paul Brook <paul@nowt.org>
5903 * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
5904 * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
5907 2002-09-24 Paul Brook <paul@nowt.org>
5909 * f95-lang.c (listify): Remove declaration.
5910 (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
5912 * f95-tree.c (get_name): New function.
5913 * trans.c (module_namespace): Remove.
5914 * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
5915 * trans-types.c: Ditto.
5917 2002-09-19 Paul Brook <paul@nowt.org>
5919 * trans-array.c (g95_get_array_cons_size): New Function.
5920 (g95_con_ss_startstride): Handle Array constructors.
5921 (g95_conv_loop_setup): Ditto.
5922 (g95_conv_array_parameter): Ditto.
5923 * tras-decl.c (g95_finish_var_decl): Make initializes variables
5926 2002-09-19 Paul Brook <paul@nowt.org>
5928 * trans.c (g95_simple_fold_tmp): Detect variables inside
5930 * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
5932 2002-09-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
5934 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
5936 2002-09-14 Paul Brook <paul@nowt.org>
5938 * trans.c (g95_create_module_variable): Move to trans-decl.c.
5939 * trans-const.c (g95_conv_string_init): New Function.
5940 * trans-const.h: Declare it.
5941 * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
5942 variables. Don't bail on intrinsic symbols.
5943 (get_extern_function_decl): Handle specific intrinsic functions.
5944 * trans-types.c (g95_sym_type): Dummy functions don't return
5946 * trans-array.c (g95_build_array_initializer): New Function.
5947 (g95_trans_auto_array_allocation): Build initializer for static decls.
5948 Don't use mpz_addmul, it's GMP4 only.
5950 2002-09-12 Paul Brook <paul@nowt.org>
5952 * trans-decl.c (g95_generate_code): Fix thinko with return variable.
5953 (g95_get_extern_function_decl, g95_build_function_decl): Mangle
5954 assembler names for module procedures.
5956 2002-09-11 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
5958 * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
5961 2002-09-10 Paul Brook <paul@nowt.org>
5963 * trans-array.c: Change format of G95_SS_TEMP strictures.
5964 (g95_check_fncall_dependancy): New function.
5965 (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
5967 * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
5969 (g95_build_function_decl): Don't assume result arrays are packed.
5970 (g95_trans-deferred-vars): Handle array result variables.
5971 (g95_generate_fuction_code): Clear saved_function_decls.
5972 * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
5974 (g95_trans_arrayfunc_assign): New function.
5975 (g95_trans_assignment): Use it.
5976 * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
5977 (g95_se): Add direct_byref.
5978 * trans-types.c: Use sym->result rather than sym where appropriate.
5979 * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
5980 Update other functions to use this.
5981 (g95_is_intrinsic_libcall): New function.
5982 (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
5983 (g95_walk_intrinsic_function): Ditto.
5985 2002-09-08 Paul Brook <paul@nowt.org>
5987 * trans-types.c: Change rank field to dtype field in array descriptor.
5988 * trans-array.c: Implement filling of dtype array descriptor field.
5989 * trans-intrinsic.c: Fix broken LEN intrinsic.
5991 2002-09-07 Paul Brook <paul@nowt.org>
5993 * trans-intrinsic.c: Remove outdated todo intrinsic list.
5994 (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
5995 (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
5997 2002-09-06 Paul Brook <paul@nowt.org>
5999 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
6000 (gt-f95-trans-types.h): Add dependancy information.
6001 * config-lang.in (gtfiles): Add trans-types.c
6002 * f95-lang.c (g95_be_parse_file): Pass error and warning counts
6003 back to top-level code.
6004 * trans-array.c, trans-types.c: Change format of array descriptor.
6005 (g95_conv_descriptor_dimension): New function.
6006 * trans-types.h (g95_conv_descriptor_rank): define.
6007 * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
6010 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
6012 * trans-array.c, trans-types.c: Add rank information to descriptor.
6014 2002-09-06 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
6016 * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
6018 2002-09-04 Paul Brook <paul@nowt.org>
6020 * f95-lang.c (g95_create_decls): New function.
6021 (g95_init): Move initialization of external decls to above, and call
6022 from g95_be_parse_file.
6023 * trans.c (g95_finish_stmt): Don't amputate the decl chain.
6024 * trans-types.c (g95_init_types): Always name integer and char types.
6025 (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
6027 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
6029 * Make-lang.in: Add options.c to F95_PARSER_OBJS
6031 2002-09-02 Paul Brook <paul@nowt.org>
6033 * g95_generate_code: Clear the attr for __fortran_main.
6034 * trans-types.c (g95_finish_type): New function.
6035 * g95_init_io_state_type: Use g95_finish_type.
6036 * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
6038 2002-09-01 Paul Brook <paul@nowt.org>
6040 * README.backend: Warn about the dangers of extra config.h files.
6041 Remove obsolete libgfor stuff.
6042 * config-lang.in: Add target-libgfor dependancy.
6043 * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
6045 2002-09-01 Toon Moene <toon@moene.indiv.nluug.nl>
6047 * g95_conv_mpz_to_tree: Free storage pointed to by q,
6050 2002-08-30 Paul Brook <paul@nowt.org>
6052 * trans-intrinsic.c (g95_conv_intrinsic_function,
6053 g95_walk_intrinsic_function): Added ANY and ALL.
6054 (g95_conv_intrinsic_anyall): New function.
6055 * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in