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