1 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4 * trans-array.c gfc_trans_g77_array,
5 gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init
6 for assumed length characters.
7 (gfc_conv_expr_descriptor): Set se->string_length if dealing
8 with a character expression.
9 (gfc_cvonv_array_parameter): Pass string length when passing
10 character array according to g77 conventions.
12 2004-07-12 Paul Brook <paul@codesourcery.com>
14 * expr.c (gfc_check_assign_symbol): Handle pointer assignments.
15 * trans-array.c (gfc_trans_auto_array_allocation): Remove
17 * trans-common.c (create_common): Use gfc_conv_initializer.
18 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer.
19 * trans-expr.c (gfc_conv_initializer): New function.
20 (gfc_conv_structure): Use it.
21 * trans.h (gfc_conv_initializer): Add prototype.
23 2004-07-11 Paul Brook <paul@codesourcery.com>
26 * parse.c (gfc_fixup_sibling_symbols): Also look for untyped
28 (parse_contained): Mark contained symbols as referenced.
30 2004-07-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
33 * module.c (gfc_dump_module, gfc_use_module): Print locus
34 when opening of module file fails.
37 * io.c (match_io): Flag 'WRITE(...), ...' as extension.
40 * match.c (gfc_match_program): A program name is obligatory.
41 (gfc_match_return): RETURN in main program is an extension.
42 (gfc_match_block_data): A space is required before a block data
46 * primary.c (match_boz_constant): Call gfc_notify_std only if
47 we actually have a non-standard boz-literal-constant.
50 * expr.c (gfc_check_assign): Print ranks if incompatible. Issue
51 warning if assigning NULL().
53 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
55 * f95-lang.c (set_block): Remove.
56 (gfc_clear_binding_stack): New.
57 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
58 (struct binding_level): Remove block_created_by_back_end.
59 (clear_binding_level): Likewise.
60 (poplevel): Don't handle block_created_by_back_end.
62 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
64 * trans-decl.c (gfc_create_module_variable): Nothing to do if
65 symbol is in common, because we ...
66 (gfc_generate_module_vars): Call gfc_trans_common.
68 2004-07-10 Paul Brook <paul@codesourcery.com>
70 * trans-array.c (gfc_build_null_descriptor): New function.
71 (gfc_trans_static_array_pointer): Use it.
72 * trans-array.h (gfc_build_null_descriptor): Add prototype.
73 * trans-expr.c (gfc_conv_structure): Handle array pointers.
75 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
78 * decl.c (gfc_match_save): Use-associated common block
80 * gfortran.h (gfc_common_head): Add new field 'name'.
81 Fix typo in comment after #endif.
82 * match.c (gfc_get_common): Add new argument from_common,
83 mangle name if flag is set, fill in new field in structure
85 (match_common): Set new arg in call to gfc_get_common,
86 use-associated common block doesn't collide.
87 * match.h (gfc_get_common): Adapt prototype.
88 * module.c (load_commons): Set new arg in call to
90 * symbol.c (free_common_tree): New function.
91 (gfc_free_namespace): Call new function.
92 * trans-common.c (several functions): Remove argument
93 'name', use name from gfc_common_head instead.
95 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
97 * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
98 and RHS match. Return early if the RHS is NULL().
101 * match.c (match_common): Fix error reporting for used common.
104 * trans-expr.c (gfc_conv_structure): Handle initialization
105 of scalar pointer components.
107 * parse.c (decode_statement): Fix matching of BLOCK DATA.
109 * trans-decl.c (generate_local_decl): Remove workaround obsoleted
112 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
114 * trans-common.c: Fix whitespace issues, make variable names
116 (create_common): Additionally, make loop logic more obvious.
118 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
119 Paul Brook <paul@codesourcery.com>
122 * trans-common.c (calculate_length): Remove ...
123 (get_segment_info): Merge into here. Save field type.
124 (build_field): Use saved type.
125 (create_common, new_condition, new_segment, finish_equivalences):
126 Use new get_segment_info.
127 * trans-types.c: Update comment.
129 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
132 * moduele.c (mio_symbol): Don't I/O initial values unless
133 symbol is a parameter.
135 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
138 * resolve.c (resolve_symbol): Verify that the shape of a
139 parameter array is not only explicit, but also constant.
140 * array.c (gfc_is_compile_time_shape): New function.
141 * gfortran.h (gfc_is_compile_time_shape): Add prototype.
143 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
149 * module.c (write_symbol, write_symtree): Remove workaround.
150 * primary.c (match_actual_arglist): Enhance comment.
151 (gfc_match_rvalue): Handle function call with first argument
152 a keyword argument correctly.
153 * resolve.c (resolve_symbol): Change call to
154 gfc_set_default_type to issue error if no implicit type
156 * trans-decl.c (gfc_create_module_variable): Remove workaround.
158 2004-07-08 Paul Brook <paul@codesourcery.com>
160 * intrinsic.c (add_sym_4s): New function.
161 (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
163 2004-07-04 Janne Blomqvist <jblomqvi@cc.hut.fi>
164 Paul Brook <paul@codesourcery.com>
168 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
169 GFC_ISYM_COMMAND_ARGUMENT_COUNT.
170 * intrinsic.c (add_functions): Identify iargc. Add
171 command_argument_count.
172 (add_subroutines): Resolve getarg. Add get_command and
173 get_command_argument.
174 * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
175 gfc_resolve_get_command_argument): Add prototypes.
176 * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
177 gfc_resolve_get_command_argument): New functions.
178 * trans-decl.c (gfor_fndecl_iargc): New variable.
179 (gfc_build_intrinsic_function_decls): Set it.
180 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
181 (gfc_conv_intrinsic_function): Use it.
182 * trans.h (gfor_fndecl_iargc): Declare.
184 2004-07-04 Matthias Klose <doko@debian.org>
186 * Make-lang.in: Generate and install gfortran man page.
187 * invoke.texi: Remove extra '@c man end'.
189 2004-07-04 Richard Henderson <rth@redhat.com>
191 * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
193 2004-07-04 Paul Brook <paul@codesourcery.com>
195 * decl.c (gfc_match_implicit_range): Don't use typespec.
196 (gfc_match_implicit): Handle character selectors.
197 * gfortran.h (gfc_set_implicit): Remove prototype.
198 (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
199 * parse.c (accept_statement): Don't call gfc_set_implicit.
200 * symbol.c (new_ts): Remove.
201 (gfc_set_implicit_none): Use same loop bounds as other functions.
202 (gfc_set_implicit): Remove.
203 (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
204 (gfc_merge_new_implicit): Combine with gfc_set_implicit.
206 2004-06-30 Richard Henderson <rth@redhat.com>
208 * match.c (var_element): Remove unused variable.
210 * trans-decl.c (gfc_generate_function_code): Don't set
211 x_whole_function_mode_p.
212 (gfc_generate_constructors): Likewise.
214 2004-06-30 Richard Henderson <rth@redhat.com>
216 * trans-decl.c (gfc_generate_function_code): Don't set
217 immediate_size_expand.
218 (gfc_generate_constructors): Likewise.
220 2004-06-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
223 * decl.c (gfc_match_type_spec): Rename second argument to
224 'implicit_flag', reverse meaning. Don't match_char_spec if
225 'implicit_flag' is set. Rename to ...
226 (match_type_spec): ... this.
227 (gfc_match_implicit_none, match_implicit_range): Move here
229 (gfc_match_implicit): Move here from match.c, try to
230 match_char_len if match_implicit_range doesn't succeed for
231 CHARACTER implicits. Call renamed fucntion match_type_spec.
232 (gfc_match_data_decl, match_prefix): Call renamed function
234 * match.c (gfc_match_implicit_none, match_implicit_range,
235 gfc_match_implicit): Move to decl.c.
236 * match.h (gfc_match_implicit_none, gfc_match_implicit):
237 Move protoypes to section 'decl.c'.
238 (gfc_match_type_spec): Remove prototype.
240 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
242 * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
245 2004-06-29 Steven Bosscher <stevenb@suse.de>
247 Make sure types in assignments are compatible. Mostly mechanical.
248 * trans-const.h (gfc_index_one_node): New define.
249 * trans-array.c (gfc_trans_allocate_array_storage,
250 gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
251 gfc_trans_array_constructor_value, gfc_trans_array_constructor,
252 gfc_conv_array_ubound, gfc_conv_array_ref,
253 gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
254 gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
255 gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
256 gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
257 types in assignments, conversions and conditionals for expressions.
258 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
259 gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
260 gfc_conv_function_call, gfc_trans_pointer_assignment,
261 gfc_trans_scalar_assign): Likewise.
262 * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
263 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
264 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
265 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
266 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
267 gfc_conv_allocated, gfc_conv_associated,
268 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
269 * trans-io.c (set_string): Likewise.
270 * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
271 gfc_do_allocate, generate_loop_for_temp_to_lhs,
272 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
273 compute_overall_iter_number, gfc_trans_assign_need_temp,
274 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
275 gfc_evaluate_where_mask, gfc_trans_where_assign,
276 gfc_trans_where_2): Likewise.
277 * trans-types.c (gfc_get_character_type, gfc_build_array_type,
278 gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
280 * trans.c (gfc_add_modify_expr): Add sanity check that types
281 for the lhs and rhs are the same for scalar assignments.
283 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
285 * dump-parse-tree.c (show_common): New function.
286 (gfc_show_namespace): Show commons.
288 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
289 Andrew Vaught <andyv@firstinter.net>
293 * decl.c (gfc_match_save): Adapt to new common structures,
294 don't allow saving USE-associated common.
295 * dump-parse-tree (gfc_show_attr): (saved_)common are not
296 symbol attributes any longer.
297 (gfc_show_symbol): Don't show old-style commons any longer.
298 (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
300 * gfortran.h (symbol_attribute): Remove common and saved_common
302 (gfc_symbol): Remove common_head element.
303 (gfc_common_head): New struct.
304 (gfc_get_common_head): New macro.
305 (gfc_symtree): Add field 'common' to union.
306 (gfc_namespace): Add field 'common_root'; change type of field
307 'blank_common' to blank_common.
308 (gfc_add_data): New prototype.
309 (gfc_traverse_symtree): Expect a symtree as first argument
310 instead of namespace.
311 * match.c (gfc_get_common): New function.
312 (match_common_name): Change to take char * as argument, adapt,
313 fix bug with empty name.
314 (gfc_match_common): Adapt to new data structures. Disallow
315 redeclaration of USE-associated COMMON-block. Fix bug with
317 (var_element): Adapt to new common structures.
318 * match.h (gfc_get_common): Declare.
319 * module.c: Add 2004 to copyright years, add commons to module
320 file layout description.
321 (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
322 for removed attributes.
323 (mio_symbol): Adapt to new way of storing common relations.
324 (load_commons): New function.
325 (read_module): Skip common list on first pass, load_commons at
327 (write_commons): New function.
328 (write_module): Call write_commons().
329 * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
330 functions related to removed attributes.
331 (gfc_add_data): New function.
332 (gfc_clear_attr): Don't set removed attributes.
333 (gfc_copy_attr): Don't copy removed attributes.
334 (traverse_symtree): Remove.
335 (gfc_traverse_symtree): Don't traverse symbol
336 tree of the passed namespace, but require a symtree to be passed
337 instead. Unify with traverse_symtree.
338 (gfc_traverse_ns): Call gfc_traverse_symtree according to new
340 (save_symbol): Remove setting of removed attribute.
341 * trans-common.c (gfc_sym_mangled_common_id): Change to
342 take 'char *' argument instead of 'gfc_symbol'.
343 (build_common_decl, new_segment, translate_common): Adapt to new
344 data structures, add new
346 (create_common): Adapt to new data structures, add new
347 argument name. Fix typo in intialization of derived types.
348 (finish_equivalences): Add second argument in call to
350 (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
351 (gfc_trans_common): Adapt to new data structures.
352 * trans-decl.c (gfc_create_module_variables): Remove test for
355 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
357 * io.c: Add 2004 to copyright years.
359 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
360 Andrew Vaught <andyv@firstinter.net>
362 * gfortran.h (gfc_gsymbol): New typedef.
363 (gfc_gsym_root): New variable.
364 (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
365 * parse.c (global_used): New function.
366 (parse_block_data): Check for double empty BLOCK DATA,
367 use global symbol table.
368 (parse_module): Use global symbol table.
369 (add_global_procedure, add_global_program): New functions.
370 (gfc_parse_file): Use global symbol table.
371 * symbol.c (gfc_gsym_root): New variable.
372 (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
375 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
377 * module.c (mio_gmp_real): Correct writing of negative numbers.
379 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
382 * expr.c (check_intrinsic_op): Allow comparison of characters.
385 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
386 Andrew Vaught <andyv@firstinter.net>
388 * decl.c (contained_procedure): New function.
389 (match_end): Verify correctness of END STATEMENT in
392 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
393 Andrew Vaught <andyv@firstinter.net>
396 * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
397 (decode_statement): Enforce required space in free-form.
399 2004-06-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
401 * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
402 * trans-array.c (gfc_conv_descriptor_data): Add operand
404 (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
405 (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
406 (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
407 * trans-common.c (create_common): Likewise.
408 * trans-expr.c (gfc_conv_component_ref): Likewise.
409 * trans-io.c (set_parameter_value): Likewise.
410 (set_parameter_ref, set_string, set_flag, io_result): Likewise.
411 (transfer_expr): Likewise.
412 * trans-decl.c (gfc_trans_auto_character_variable):
413 Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
414 (gfc_gimplify_function): New function.
415 (gfc_generate_function-code): Properly handle nested functions.
416 * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
418 2004-06-22 Janne Blomqvist <jblomqvi@cc.hut.fi>
421 * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
422 (gfc_resolve_inquire): Resolve the iolength tag. Return
423 SUCCESS at end of function if no failure has occured.
424 * resolve.c (resolve_code): Resolve if iolength is encountered.
425 * trans-io.c: (ioparm_iolength, iocall_iolength,
426 iocall_iolength_done): New variables.
427 (last_dt): Add IOLENGTH.
428 (gfc_build_io_library_fndecls ): Set iolength related variables.
429 (gfc_trans_iolength): Implement.
430 (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
432 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de
435 * scanner.c (load_line): Don't truncate preprocessor lines.
436 Reformat error message.
437 (preprocessor_line): Issue warning in case of malformed
440 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
442 * resolve.c (resolve_symbol): Add comment in function body.
443 (check_data_variable): Change type of mark to ar_type, adapt code
446 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
448 * array.c (gfc_insert_constructor): Avoid redundant call to
449 mpz_comp. Add 2004 to copyright years.
451 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
453 * trans.h (stmtblock_t): Change has_scope to unsigned int.
455 2004-06-20 Steven G. Kargl <kargls@comcast.net>
457 * arith.c (gfc_range_check): correct complex underflow.
459 2004-06-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
462 * match.c (match_case_selector): Call gfc_match_init_expr
463 instead of gfc_match_expr.
464 * resolve.c (validate_case_label_expr): No need to check for
465 constant, since it wouldn't have been matched with the fix to
468 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
471 * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
474 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
477 * trans-deecl.c (generate_local_decl): Do not issue warning for
478 unused variables if they're use associated.
480 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
481 Andrew Vaught <andyv@firstinter.net>
484 * gfortran.h (gfc_check_f): Add new field f3ml.
485 * check.c (gfc_check_minloc_maxloc): Take argument list instead
486 of individual arguments, reorder if necessary.
487 * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
488 * intrinsic.c (add_sym_3ml): New function.
489 (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
490 (check_specific): Catch special case MINLOC, MAXLOC.
492 2004-06-14 Paul Brook <paul@codesourcery.com>
494 * intrinsic.c (add_sym_2s): Use correct function types.
496 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
498 * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize. Move data.c
499 * data.c (gfc_get_section_index): Remove dependency on trans.h.
501 2004-06-12 Steven G. Kargl <kargls@comcast.net>
503 * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
504 gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
505 * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
506 GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
507 * trans-intrinsic.c: Use symbols.
508 * intrinsic.c (add_sym_2s): New function.
509 * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
510 * intrinsic.h: Function prototypes.
511 * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
512 gfc_resolve_srand): New functions.
514 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
517 * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
520 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
523 * interface.c (compare_parameter, compare_actual_formal): Don't
524 check types and array shapes for NULL()
525 * trans-expr.c (conv_function_call): No double indirection for
528 2004-06-09 Toon Moene <toon@moene.indiv.nluug.nl>
530 * trans-expr.c (gfc_conv_cst_int_power): Compute
531 x**(-n) by converting it to (1/x)**n instead of
534 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
537 * module.c (write_symbol, write_symtree): Don't write symbols
538 wrongly added to namespace.
539 * trans-decl.c (gfc_create_module_variable): Don't create a
540 backend decl for a symbol incorrectly added to namespace.
542 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
545 * resolve.c (resolve_symbol): Verify that parameter array has an
546 explicit shape. Fix typos and coding style issues in surrounding
549 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
552 * gfortran.texi: The documentation doesn't contain infomration on
553 how to report bugs, and shouldn't, so remove the line which
556 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
558 * intrinsic.c (sort_actual): Keep track of type of missing
559 arguments. (Missing from previous commit.)
561 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
563 * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
564 * interface.c (compare_actual_formal): Keep type of omitted
566 * trans-expr.c (gfc_conv_function_call): Add string length
567 argument for omitted string argument.
569 2004-06-03 Paul Brook <paul@codesourcery.com>
571 * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
572 lists instead of compound expr chains.
573 (gfc_trans_code): Annotate statement lists.
575 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
577 * trans-array.c: Fix spelling in comments.
579 2004-06-02 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
582 * data.c (assign_substring_data_value): New function.
583 (gfc_assign_data_value): Call the new function if we're dealing
584 with a substring LHS.
586 2004-06-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
589 * gfortran.h (GFC_VERSION): Remove.
590 * gfortran.texi (version-gfortran): Remove, replace by version-GCC
593 2004-05-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
595 * trans-types.c: Fix spelling & layout in comments.
597 2004-05-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
600 * trans-const.c (gfc_conv_string_init): Allow variable string
601 length lower than initialization string length.
603 2004-05-30 Paul Brook <paul@codesourcery.com>
606 * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
607 * trans-expr.c (gfc_trans_string_copy): New function.
608 (gfc_conv_statement_function): Use them. Create temp vars. Enforce
610 (gfc_conv_string_parameter): Use gfc_trans_string_copy.
611 * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
612 * trans.h (struct gfc_saved_var): Define.
613 (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
615 2004-05-30 Steven G. Kargl <kargls@comcast.net>
617 * iresolve.c (gfc_resolve_random_number): Clean up conditional.
619 2004-05-29 Steven G. Kargl <kargls@comcast.net>
621 * simplify.c (gfc_simplify_log): Remove useless line of code.
623 2004-05-29 Paul Brook <paul@codesourcery.com>
625 * trans-common.c (find_equivalence): Find multiple rules.
627 2004-05-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
629 * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
630 (gfc_current_locus): Declare new global variable.
631 * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
632 (gfc_current_locus1): Rename ...
633 (gfc_current_locus): ... to this.
634 (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
635 skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
636 gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
637 gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
638 and gfc_current_locus(), respectively.
639 * array.c (match_subscript, gfc_match_array_ref, match_array_list,
640 match_array_cons_element, gfc_match_array_constructor):
641 Read/modify gfc_current_locus instead of calling gfc_set_locus()
642 and gfc_current_locus().
643 * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
644 match_attr_spec, gfc_match_function_decl, gfc_match_end,
645 attr_decl1, gfc_match_save): Likewise.
646 * error.c (error_print, gfc_internal_error): Likewise.
647 * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
648 * interface.c (gfc_add_interface): Likewise.
649 * io.c (gfc_match_format, match_dt_format, match_dt_element,
650 match_io_iterator, match_io): Likewise.
651 * match.c (gfc_match_space, gfc_match_eos,
652 gfc_match_small_literal_int, gfc_match_st_label,
653 gfc_match_strings, gfc_match_name, gfc_match_iterator,
654 gfc_match_char, gfc_match, gfc_match_assignment,
655 gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
656 gfc_match_nullify, gfc_match_call, match_implicit_range,
657 gfc_match_implicit, gfc_match_data, match_case_selector,
658 gfc_match_case, match_forall_iterator): Likewise.
659 * matchexp.c (gfc_match_defined_op_name, next_operator,
660 match_level_1, match_mult_operand, match_ext_mult_operand,
661 match_add_operand, match_ext_add_operand, match_level_2,
662 match_level_3, match_level_4, match_and_operand, match_or_operand,
663 match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
664 * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
665 * parse.c (match_word, decode_statement, next_free, next_fixed,
666 add_statement, verify_st_order, parse_if_block, gfc_parse_file):
668 * primary.c (match_digits, match_integer_constant,
669 match_boz_constant, match_real_constant, match_substring,
670 next_string_char, match_charkind_name, match_string_constant,
671 match_logical_constant, match_const_complex_part,
672 match_complex_constant, match_actual_arg, match_keyword_arg,
673 gfc_match_actual_arglist, gfc_match_structure_constructor,
674 gfc_match_rvalue, gfc_match_variable): Likewise.
675 * st.c (gfc_get_code): Likewise.
676 * symbol.c (check_conflict, check_used, check_done,
677 duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
678 gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
679 gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
681 2004-05-26 Roger Sayle <roger@eyesopen.com>
683 * io.c (format_asterisk): Silence compiler warnings by correcting
684 the number of elements of a "locus" initializer.
686 2004-05-25 Roger Sayle <roger@eyesopen.com>
689 * matchexp.c: Allow unary operators after arithmetic operators
691 (match_ext_mult_operand, match_ext_add_operand): New functions.
692 (match_mult_operand): Tweak to call match_ext_mult_operand.
693 (match_add_operand): Tweak to call match_ext_mult_operand.
694 (match_level_2): Rearrange to call match_ext_add_operand.
696 2004-05-25 Paul Brook <paul@codesourcery.com>
698 * expr.c (check_inquiry): Remove bogus tests.
700 2004-05-23 Paul Brook <paul@codesourcery.com>
703 * expr.c (restricted_args): Remove redundant checks/argument.
704 (external_spec_function): Update to match.
705 (restricted_intrinsic): Rewrite.
707 2004-05-23 Paul Brook <paul@codesourcery.com>
708 Victor Leikehman <lei@haifasphere.co.il>
710 * gfortran.h (struct gfc_symbol): Add equiv_built.
711 * trans-common.c: Change int to HOST_WIDE_INT. Capitalize error
713 (current_length): Remove.
714 (add_segments): New function.
715 (build_equiv_decl): Create initialized common blocks.
716 (build_common_decl): Always add decl to bindings.
717 (create_common): Create initializers.
718 (find_segment_info): Reformat to match coding conventions.
719 (new_condition): Use add_segments.
720 (add_condition, find_equivalence, add_equivalences): Move iteration
721 inside functions. Only process each segment once.
722 (new_segment, finish_equivalences, translate_common): Simplify.
724 2004-05-23 Steven G. Kargl <kargls@comcast.net>
726 * check.c (gfc_check_random_seed): Issue for too many arguments.
728 2004-05-22 Steven G. Kargl <kargls@comcast.net>
730 * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
732 2004-05-22 Paul Brook <paul@codesourcery.com>
734 * dump-parse-tree.c (gfc_show_equiv): New function.
735 (gfc_show_namespace): Use it.
737 2004-05-22 Victor Leikehman <lei@haifasphere.co.il>
740 * symbol.c (gfc_add_common): Disable checks to work around other more
741 fundamental inadequacies.
743 2004-05-22 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
745 * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
747 (gfc_build_function_decl): Likewise.
749 2004-05-22 Steven G. Kargl <kargls@comcast.net>
751 * check.c (gfc_check_system_clock): New function.
752 * intrinsic.c (add_sym_3s): New function.
753 (add_subroutines): Use it.
754 * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
756 * iresolve.c (gfc_resolve_system_clock): New function.
758 2004-05-22 Steven G. Kargl <kargls@comcast.net>
760 * invoke.texi: Document -Wunderflow and spell check.
761 * lang.opt: Add Wunderflow.
762 * gfortran.h (gfc_option_t): Add warn_underflow option.
763 * options.c (gfc_init_options, set_Wall): Use it.
764 * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
765 * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
766 gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
767 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
768 * arith.c (common_logarithm): Fix typo in comment.
770 2004-05-21 Roger Sayle <roger@eyesopen.com>
772 * io.c (check_format): As a GNU extension, allow the comma after a
773 string literal to be optional in a format. Use gfc_notify_std to
774 issue an error/warning as appropriate.
776 2004-05-21 Roger Sayle <roger@eyesopen.com>
778 * io.c (check_format): Use gfc_notify_std to determine whether to
779 issue an error/warning for omitting the digits from the X format.
781 2004-05-20 Roger Sayle <roger@eyesopen.com>
783 * io.c (check_format): Allow the number before the X format to
784 be optional when not -pedantic.
786 2004-05-18 Feng Wang <fengwang@nudt.edu.cn>
787 Paul Brook <paul@codesourcery.com>
789 * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
790 Create decls for __builtin_pow{,f}.
791 * gfortran.h (PREFIX_LEN): Define.
792 * trans-decl.c (gfor_fndecl_math_powi): Add.
793 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
794 (gfc_build_intrinsic_function_decls): Create decls for powi.
795 * trans-expr.c (powi_table): Add.
796 (gfc_conv_integer_power): Remove.
797 (gfc_conv_powi): New function.
798 (gfc_conv_cst_int_power): New function.
799 (gfc_conv_power_op): Use new powi routines.
800 * trans.h (struct gfc_powdecl_list): Add.
801 (gfor_fndecl_math_powi): Add.
802 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
804 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
806 * trans.c, trans-decl.c: Fix comment typos.
808 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
810 * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
812 2004-05-18 Steve Kargl <kargls@comcast.net>
814 * arith.c (gfc_int2complex): Fix incorrect range checking.
816 2004-05-18 Paul Brook <paul@codesourcery.com>
819 * decl.c (add_init_expr_to_sym): Remove incorrect check.
820 (default_initializer): Move to expr.c.
821 (variable_decl): Don't assign default initializer to variables.
822 * expr.c (gfc_default_initializer): Move to here.
823 * gfortran.h (gfc_default_initializer): Add prototype.
824 * resolve.c (resolve_symbol): Check for illegal initializers.
825 Assign default initializer.
827 2004-05-17 Steve Kargl <kargls@comcast.net>
829 * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
831 2004-05-17 Steve Kargl <kargls@comcast.net>
833 * arith.c (gfc_real2complex): Range checking wrong part of complex
836 2004-05-16 Paul Brook <paul@codesourcery.com>
838 * options.c (gfc_handle_module_path_options): Fix buffer overrun.
840 2004-05-16 Paul Brook <paul@codesourcery.com>
842 * arith.c (gfc_range_check): Fix logic error.
844 2004-05-16 Steve Kargl <sgk@troutmask.apl.washington.edu>
846 * arith.c: Fix comment typos.
848 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
851 * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
852 not initialized in a disallowed fashion.
853 * match.c (gfc_match_common): Likewise.
854 (var_element): Verify that variable is not in the blank COMMON,
855 if it is in a common.
857 2004-05-15 Joseph S. Myers <jsm@polyomino.org.uk>
859 * Make-lang.in (f95.generated-manpages): Remove.
861 (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
862 f95.maintainer-clean): Generate info and dvi files in objdir/doc.
865 (f95.install-info): Remove.
868 2004-05-15 Victor Leikehman <lei@haifasphere.co.il>
870 * decl.c (add_init_expr_to_sym): Check for variable size arrays.
872 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
874 * primary.c (match_boz_constant): Use gfc_notify_std() for
875 issuing a warning or an error.
877 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
880 * primary.c (match_structure_constructor): Rename ...
881 (gfc_match_structure_constructor): ... to this. Make non-static.
882 (gfc_match_rvalue): Call renamed function.
883 * match.h (gfc_match_structure_constructor): Declare.
884 * match.c (gfc_match_data_constant): Handle structure
887 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
891 * gfortran.h (gfc_linebuf): New typedef.
893 (gfc_file): Revamped, use new gfc_linebuf.
894 (locus): Revamped, use new types.
895 (gfc_current_file): Remove.
896 (gfc_current_form, gfc_source_file): New global variables.
897 * match.c (gfc_match_space, gfc_match_strings): Use
898 gfc_current_form to find source form.
899 * module.c (gfc_dump_module): Use gfc_source_file when printing
901 * error.c (show_locus, show_loci) Use new data structures to print
903 * scanner.c (first_file, first_duplicated_file, gfc_current_file):
905 (file_head, current_file, gfc_current_form, line_head, line_tail,
906 gfc_current_locus1, gfc_source_file): New global variables.
907 (gfc_scanner_init1): Set new global variables.
908 (gfc_scanner_done1): Free new data structures.
909 (gfc_current_locus): Return pointer to gfc_current_locus1.
910 (gfc_set_locus): Set gfc_current_locus1.
911 (gfc_at_eof): Set new variables.
912 (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
913 to new locus structure.
914 (gfc_check_include): Remove.
915 (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
916 (gfc_skip_comments): Use gfc_current_form, find locus with
918 (gfc_next_char): Use gfc_current_form.
919 (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
920 (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
922 (get_file): New function.
923 (preprocessor_line, include_line): New functions.
924 (load_file): Move down, rewrite to match new data structures.
925 (gfc_new_file): Rewrite to match new data structures.
926 * parse.c (next_statement): Remove code which is now useless. Use
927 gfc_source_form and gfc_source_file where appropriate.
928 * trans-decl.c (gfc_get_label_decl): adapt to new data structures
929 when determining locus of frontend code.
930 * trans-io.c (set_error_locus): Same.
931 * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
932 * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
934 (all): Add missing initializers.
936 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
938 * Make-lang.in (trans-common.o): Remove redundant dependency.
939 (data.c): Replace object file name ...
940 (data.o): ... by the correct one.
942 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
944 * dump-parse-tree.c (gfc_show_array_ref): Print colon only
945 for ranges when dumping array references.
947 2004-05-14 Victor Leikehman <lei@haifasphere.co.il>
949 * decl.c (variable_decl): Always apply default initializer.
951 2004-05-08 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
954 * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
955 handle zero correctly.
957 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
959 * match.c (gfc_match): Eliminate dead code.
961 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
963 * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
964 Detect bad continuation line in fixed form sources.
966 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
969 * iresolve.c (gfc_resolve_nearest): Add new function.
970 * intrinsic.h: ... declare it here.
971 * intrinsic.c (add_functions): ... add it as resolving function
974 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
977 * match.c (gfc_match_do): Allow infinite loops with
978 label-do-stmt. Do not enforce space after comma.
980 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
983 * parse.c (parse_interface): Allow empty INTERFACE, remove
986 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
988 * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
989 decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
990 expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
991 intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
992 matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
993 primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
994 trans-array.c, trans-array.h, trans-common.c, trans-const.c,
995 trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
996 trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
997 trans-types.h, trans.c, trans.h: Update copyright years and
999 * data.c: Likewise, also removed two whitespace-only lines.
1000 * gfortranspec.c, lang.opt: Update copyright years.
1002 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1005 * trans-decl.c (generate_local_decl): Don't warn for unused
1006 variables which are in common blocks.
1008 2004-05-13 Diego Novillo <dnovillo@redhat.com>
1010 * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
1011 trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
1012 trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
1014 2004-05-13 Victor Leikehman <lei@haifasphere.co.il>
1017 * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
1019 2004-05-13 Joseph S. Myers <jsm@polyomino.org.uk>
1021 * gfortran.texi: Use @table @emph instead of @itemize @emph.
1022 Remove "set DEVELOPMENT".
1023 (Compiling GFORTRAN): Remove.
1025 2004-05-09 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1027 * array.c (match_subscript, match_array_ref): Add comments
1028 explaining argument 'init'.
1029 * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
1030 trans-expr.c, trans.c: Fix some typos in comments.
1031 * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
1032 * primary.c (match_digits, match_integer_constant): Add comment
1033 explaining signflag.
1035 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1038 * primary.c: Include system.h and flags.h, needed for pedantic.
1039 (match_boz_constant): Allow "x" for hexadecimal constants, warn if
1042 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1045 * match.c (match_data_constant): Handle case where
1046 gfc_find_symbol sets sym to NULL
1048 2004-04-28 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1050 * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
1051 dependency on mathbuiltins.def
1053 2004-04-24 Victor Leikehman <lei@il.ibm.com>
1055 * trans-io.c (transfer_expr): Implemented recursive printing
1058 2004-04-24 Andrew Pinski <pinskia@physics.uc.edu>
1060 * gfortranspec.c: Do not include multilib.h.
1062 2004-04-24 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1064 * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
1065 2004 to copyright years.
1066 * trans-expr.c, trans-decl.c: Comment update, we now generate
1067 GENERIC, not SIMPLE. Add 2004 to copyright years.
1069 2004-04-24 Paul Brook <paul@codesourcery.com>
1071 * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
1073 2004-04-24 Feng Wang <fengwang@nudt.edu.cn>
1076 * arith.c (gfc_arith_divide): Fix complex divide.
1078 2004-04-23 Andrew Pinski <pinskia@physics.uc.edu>
1080 * gfortranspec.c: Include the target headers.
1082 2004-04-18 Feng Wang <fengwang@nudt.edu.cn>
1086 * arith.c (arctangent2): New function.
1087 * arith.h (arctangent2): Add function prototype.
1088 * simplify.c (gfc_simplify_atan2): Use it.
1089 (gfc_simplify_log): Use it.
1091 2004-04-12 Diego Novillo <dnovillo@redhat.com>
1093 * fortran/f95-lang.c (gfc_expand_stmt): Remove.
1094 (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
1096 2004-04-11 Bud Davis <bdavis9659@comcast.net>
1099 * trans-io.c (build_dt): Change REC to value.
1101 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
1104 * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
1105 the real value when converting mpf to string.
1107 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
1110 * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
1113 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
1116 * simplify.c (simplify_min_max): Convert the type of the result.
1118 2004-04-11 Paul Brook <paul@codesourcery.com>
1120 * gfortran.texi: Use full target triplet.
1122 2004-04-11 Paul Brook <paul@codesourcery.com>
1124 * Make-lang.in (GFORTRAN_TEXI): Set it.
1125 (fortran/dfortran.dvi): Use it. Add fortran to include paths.
1126 (fortran/gfortran.info): Ditto.
1127 * gfortran.texi: Major update.
1128 * invoke.texi: New file.
1130 2004-04-10 Paul Brook <paul@codesourcery.com>
1132 * trans-array.c (gfc_trans_allocate_temp_array,
1133 gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
1134 * trans-decl.c (gfc_build_dummy_array_decl,
1135 gfc_get_symbol_decl, gfc_build_function_decl,
1136 gfc_create_module_variable): Ditto.
1137 * trans-expr.c (gfc_conv_variable): Ditto.
1138 * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
1139 * trans.h (GFC_DECL_STRING): Remove.
1140 (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
1141 GFC_DECL_ASSIGN): Renumber flags.
1143 2004-04-05 Paul Brook <paul@codesourcery.com>
1147 * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
1149 * gfortran.h (struct gfc_charlen): Add backend_decl.
1150 * trans-array.c (gfc_trans_allocate_temp_array,
1151 gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
1152 (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
1153 Remove old, broken string handling.
1154 (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
1155 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
1156 gfc_trans_deferred_array): Handle character arrays.
1157 * trans-const.c (gfc_conv_const_charlen): New function.
1158 * trans-const.h (gfc_conv_const_charlen): Add prototype.
1159 * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
1161 (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
1162 (gfc_create_string_length): New function.
1163 (gfc_get_symbol_decl): Create lengths for character variables.
1164 (gfc_get_fake_result_decl): Ditto.
1165 (gfc_build_function_decl): Only set length for assumed length
1166 character arguments.
1167 (gfc_trans_dummy_character): New function.
1168 (gfc_trans_auto_character_variable): Rewrite.
1169 (gfc_trans_deferred_vars): Handle more types of character variable.
1170 (gfc_create_module_variable): String lengths have moved.
1171 (gfc_generate_function_code): Initialize deferred var chain earlier.
1172 * trans-expr.c (gfc_conv_init_string_length): Rename ...
1173 (gfc_trans_init_string_length): ... to this.
1174 (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
1175 gfc_conv_function_call): Update to new format for character variables.
1176 (gfc_conv_string_length): Remove.
1177 (gfc_conv_string_parameter): Update assertion.
1178 * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
1179 * trans-io.c (set_string): Use new macro names.
1180 * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
1181 * trans-types.c (gfc_get_character_type): Use existing length expr.
1182 (gfc_is_nodesc_array): Make public.
1183 (gfc_get_dtype_cst): Rename ...
1184 (gfc_get_dtype): ... to this. Handle unknown size arrays.
1185 (gfc_get_nodesc_array_type): Use new name.
1186 (gfc_sym_type): New character variable code.
1187 (gfc_get_derived_type): Ditto.
1188 (gfc_get_function_type): Evaluate character variable lengths.
1189 * trans-types.h (gfc_strlen_kind): Define.
1190 (gfc_is_nodesc_array): Add prototype.
1191 * trans.h: Update prototypes.
1192 (struct lang_type): Update comments.
1193 (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
1194 (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
1196 2004-04-04 Paul Brook <paul@codesourcery.com>
1198 * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
1199 * options.c (gfc_init.options, gfc_handle_option): Ditto.
1200 * trans-expr.c (gfc_conv_function_call): Ditto.
1201 * trans-types.c (gfc_is_nodesc_array): Ditto
1202 * lang.opt (fg77-calls): Remove.
1204 2004-04-04 Paul Brook <paul@codesourcery.com>
1206 * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
1207 (gfc_conv_descriptor_base): Rename ...
1208 (gfc_conv_descriptor_offset): ... to this.
1209 (gfc_trans_allocate_array_storage): Set offset to zero.
1210 (gfc_conv_array_base): Rename ...
1211 (gfc_conv_array_offset): ... to this.
1212 (gfc_conv_array_index_ref): Add offset parameter.
1213 (gfc_conv_array_ref): Include offset.
1214 (gfc_trans_preloop_setup): Use existing offset.
1215 (gfc_trans_allocate_temp_array, gfc_array_allocate,
1216 gfc_trans_auto_array_allocation, gfc_trans_g77_array,
1217 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
1218 gfc_conf_ss_descriptor): Set offset.
1219 * trans-array.h: Rename prototypes.
1220 * trans-const.h (gfc_index_zero_node): Define.
1221 * trans-decl.c (gfc_build_qualified_array): Change base to offset.
1222 * trans-types.c (gfc_get_array_type_bounds): Ditto.
1223 (gfc_get_nodesc_array_type): Calculate offset before upper bound.
1225 2004-03-25 Diego Novillo <dnovillo@redhat.com>
1227 * convert.c (convert): Don't handle WITH_RECORD_EXPR.
1229 2004-03-24 Bud Davis <bdavis9659@comcast.net>
1232 * arith.c (gfc_convert_integer,gfc_convert_real): Removed leading '+'
1233 before conversion by gmp library call.
1235 2004-03-24 Bud Davis <bdavis9659@comcast.net>
1238 * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
1240 2004-02-24 Richard Henderson <rth@redhat.com>
1242 * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
1244 2004-02-19 Loren J. Rittle <ljrittle@acm.org>
1246 * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
1247 (fortran/gfortran.info): ... to here.
1250 2004-02-16 Richard Henderson <rth@redhat.com>
1252 * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
1253 * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
1254 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
1255 (gfc_expand_function): Rename from expand_function_body, make static,
1256 don't do anything except invoke tree_rest_of_compilation.
1257 (gfc_be_parse_file): Invoke cgraph.
1258 (gfc_expand_decl): Remove.
1259 (gfc_init_builtin_functions): Add __builtin_init_trampoline and
1260 __builtin_adjust_trampoline.
1261 * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
1262 (gfc_finalize): New.
1263 (gfc_generate_function_code): Use it. Lower nested functions.
1264 * trans-expr.c (gfc_conv_function_call): Add static chain operand
1266 * trans.c (gfc_build_function_call): Likewise.
1267 * trans.h (expand_function_body): Remove.
1269 2004-02-15 Victor Leikehman <lei@il.ibm.com>
1272 * trans-decl.c (gfc_build_function_decl) For functions
1273 returning CHARACTER pass an extra length argument,
1274 following g77 calling conventions.
1275 * trans-types.c (gfc_get_function_type) Ditto.
1276 * trans-expr.c (gfc_conv_function_call) Ditto.
1278 2004-02-14 Paul Brook <paul@codesourcery.com>
1280 * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
1282 2004-02-12 Paul Brook <paul@nowt.org>
1286 2004-02-08 Steve Kargl <sgk@troutmask.apl.washington.edu>
1288 * gfortran.texi: Fix typos.
1290 2004-02-07 Bud Davis <bdavis9659@comcast.net>
1293 * intrinsic.c (add_conversions) Use logical conversion instead
1295 * trans-types.c (gfc_get_logical_type) implemented logical*1
1298 2004-01-17 Paul Brook <paul@codesourcery.com>
1300 * lang-specs.h: Remove %<fixed-form.
1302 2004-01-15 Toon Moene <toon@moene.indiv.nluug.nl>
1304 * lang-specs.h: Enable preprocessing of source files
1305 ending in .F, .fpp, .FPP, .F90 and .F95.
1307 2004-01-13 Toon Moene <toon@moene.indiv.nluug.nl>
1310 * lang-specs.h: Enable compilation of files ending
1311 in .f, .for and .FOR.
1313 2004-01-11 Paul Brook <paul@codesourcery.com>
1315 * trans-stmt.c (gfc_trans_if_1): New function.
1316 (gfc_trans_if): Use it.
1318 2004-01-11 Erik Schnetter <schnetter@uni-tuebingen.de>
1320 * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
1321 (gfc_option_t): Add max_identifier_length.
1322 * lang.opt: Add fmax-identifier-length.
1323 * match.c (parse_name): Use limit.
1324 * options.c (gfc_init_options): Set max_identifier_length.
1325 (gfc_handle_option): Ditto.
1327 2004-01-11 Feng Wang <fengwang@nudt.edu.cn>
1329 * intrinsic.c (add_functions): Add resolve function to dcmplx.
1330 * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
1331 * iresolve.c (gfc_resolve_dcmplx): New function.
1333 2004-01-10 Paul Brook <paul@codesourcery.com>
1335 * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
1336 * trans-types.c (gfc_sym_type): Handle external dummy procedures.
1337 (gfc_return_by_reference): Correct condition.
1338 (gfc_get_function_type): Ditto.
1340 2004-01-10 Paul Brook <paul@codesourcery.com>
1342 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
1345 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
1347 * iresolve.c: Use correct kind.
1349 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
1352 * trans-decl.c (gfc_create_module_variable): Output array valued
1355 2004-01-10 Paul Brook <paul@codesourcery.com>
1357 * resolve.c (resolve_branch): Get error message right way round.
1359 2004-01-10 Canqun Yang <canqun@nudt.edu.cn>
1361 * trans-array (gfc_conv_loop_setup): Adjust comment to track
1363 (gfc_array_allocate): Don't count size of element twice.
1365 2004-01-04 Paul Brook <paul@codesourcery.com>
1367 * lang.opt (i8, r8, std=*): Remove RejectNegative.
1369 2004-01-04 Paul Brook <paul@codesourcery.com>
1371 * error.c (gfc_notify_std): New function.
1372 * gfortran.h (gfc_notify_std): Declare.
1373 (GFC_STD_*): Define.
1374 (gfc_option_t): Add warn_std and allow_std.
1375 * intrinsic.c (gfc_init_expr_extensions): Fix logic.
1376 (gfc_intrinsic_func_interface): Use gfc_notify_std.
1377 * check.c (check_rest): Use gfc_notify_std.
1378 * match.c (gfc_match_pause): Ditto.
1379 (gfc_match_assign): Ditto.
1380 (gfc_match_goto): Ditto.
1381 * resolve.c (resolve_branch): Ditto.
1382 * lang.opt: Add std=<foo> and w.
1383 * options.c (gfc_init_options): Set allow_std and warn_std.
1384 (gfc_handle_option): Handle OPT_std_* and OPT_w.
1386 2004-01-01 Paul Brook <paul@codesourcery.com>
1388 * array.c (gfc_append_constructor): Take constructor, not expression.
1389 * data.c (struct gfc_expr_stack): Remove.
1390 (expr_stack): Remove.
1391 (find_con_by_offset): Rename from find_expr_in_con.
1392 (find_con_by_component): Rename from find_component_in_con.
1393 (gfc_get_expr_stack): Remove.
1394 (gfc_assign_data_value): Rewrite.
1395 (gfc_expr_push): Remove.
1396 (gfc_expr_pop): Remove.
1397 (gfc_advance_section): Rename from
1398 gfc_modify_index_and_calculate_offset. Handle unbounded sections.
1399 (gfc_get_section_index): Handle unbounded sections.
1400 * gfortran.h: Update prototypes.
1401 * resolve.c (check_data_variable): Array section maight not be the
1404 2004-01-01 Paul Brook <paul@codesourcery.com>
1407 * resolve.c (resolve_symbol): Allow assumed length function results.
1409 2004-01-01 Steve Kargl <sgk@troutmask.apl.washington.edu>
1411 * match.c (gfc_match_pause): Fix spelling.
1413 2004-01-01 Steven Bosscher <stevenb@suse.de>
1416 * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
1417 reference from the expression.
1419 2003-12-26 Feng Wang <fengwang@nudt.edu.cn>
1421 * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
1423 * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
1424 (gfc_exec_op): New EXEC_LABEL_ASSIGN.
1425 (symbol_attribute):New variable attribute: assign.
1426 * io.c (resolve_tag):Integer variable is allowed.
1427 (match_dt_format): Add ASSIGN statement. Set assign flag.
1428 * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
1429 (gfc_match_assign): Add ASSIGN statement. Set assign flag.
1430 (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
1431 * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
1432 (next_statement): Add ST_LABEL_ASSIGNMENT.
1433 (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
1434 * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
1435 (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
1436 * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
1437 * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
1438 assign. Put them into the stuct lang_decl.
1439 * trans-io.c (set_string): Add the assign statement.
1440 * trans-stmt.c (gfc_trans_label_assign): New function.
1441 (gfc_trans_goto): Translate ASSIGNED GOTO statement.
1442 * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
1443 * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
1444 * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
1445 (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
1446 (GFC_DECL_ASSIGN(node)): New macro to access flag.
1448 2003-12-31 Huang Chun <chunhuang73@hotmail.com>
1451 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
1454 2003-12-22 Toon Moene <toon@moene.indiv.nluug.nl>
1456 * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
1457 that arguments to subroutines/functions can't alias themselves, nor global
1460 2003-12-20 Steven Bosscher <stevenb@suse.de>
1462 * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
1463 * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
1465 2003-12-12 Huang Chun <chunhuang73@hotmail.com>
1467 * primary.c (match_substring): Fix substring bug for start point
1468 or end point is NULL.
1469 * trans-expr.c (gfc_conv_substring): Ditto
1470 * trans-types.c (gfc_sym_type): Get correct type of scalar
1471 character variables.
1472 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
1475 2003-12-10 Richard Henderson <rth@redhat.com>
1477 * options.c (gfc_post_options): Don't ever use rtl inlining.
1479 2003-12-05 Canqun Yang <canqun@nudt.edu.cn>
1481 * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
1482 * trans-equivalence.c: Remove.
1483 * trans-decl.c (gfc_get_symbol_decl): Update to match.
1484 (gfc_generate_function_code): Ditto.
1485 * trans-array.c (gfc_conv_array_parameter): Ditto.
1486 * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
1487 (F95_ADDITIONAL_OBJS): Add stor-layout.o
1488 * trans.h (gfc_trans_equivalence): Remove.
1489 * gfortran.h (struct gfc_equiv): Add used field.
1490 (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
1491 equiv_offset fields.
1493 2003-12-05 Richard Henderson <rth@redhat.com>
1495 * trans.c (gfc_build_addr_expr): New.
1496 (gfc_build_indirect_ref, gfc_build_array_ref): New.
1497 * trans.h: Declare them.
1498 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
1499 trans-stmt.c, trans.c (*): Use them.
1501 * f95-lang.c (gfc_post_options): Remove dead prototype.
1502 * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
1503 * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
1506 2003-12-01 Feng Wang <fengwang@nudt.edu.cn>
1508 * io.c (gfc_match_format): Check for missing format label.
1510 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
1513 * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
1514 from interfaces in modules.
1516 2003-11-30 Paul Brook <paul@nowt.org>
1518 * trans-array.c (gfc_trans_g77_array): Make non-static.
1519 (gfc_trans_assumed_size): Remove.
1520 (gfc_trans_dummy_array_bias): Explicitly free temporary.
1521 * trans-array.h (gfc_trans_g77_array): Add prototype.
1522 (gfc_trans_assumed_size): Remove.
1523 * trans-decls.c (gfor_fndecl_push_context): Remove.
1524 (gfor_fndecl_pop_context): Remove.
1525 (gfc_build_function)decls): Don't create them.
1526 (gfc_trans_deferred_vars): Update to match. Remove dead code.
1527 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
1529 2003-11-30 Kejia Zhao <kejia_zh@nudt.edu.cn>
1531 * trans-array.c (gfc_conv_array_parameter): Simplify
1532 array argument passing for array name actual argument.
1533 * trans-expr.c (gfc_conv_function_call): Ditto
1534 * trans-types.c (gfc_is_nodesc_array):Ditto.
1536 2003-11-30 Paul Brook <paul@nowt.org>
1538 * f95-lang.c (gfc_post_options): Move ...
1539 * options.c (gfc_post_options): .. to here. Handle inlining options.
1540 * gfortran.h (gfc_post_options): Add prototype.
1542 2003-11-28 Richard Henderson <rth@redhat.com>
1544 * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
1546 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
1548 * trans.h (has_alternate_specifier): New global variable.
1549 * match.c (gfc_match_call): Handle actual arguments associated with
1550 alternate return indicators.
1551 * trans-expr.c (gfc_conv_function_call): Ditto
1552 * trans-stmt.c (gfc_trans_call): Ditto
1553 (gfc_trans_return): Handle return statement with value.
1554 * trans-decl.c (gfc_generate_function_code): Handle functions with
1556 (gfc_get_fake_result_decl): Ditto
1557 * trans-types.c (gfc_get_function_type): Ditto
1558 * resolve.c (resolve_actual_arglist): Check alternate return indicators.
1559 (resolve_formal_arglist): Check asterisk dummy.
1561 2003-11-27 Paul Brook <paul@nowt.org>
1563 * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
1564 allocation interface.
1565 (gfc_conv_ array_parameter): Ditto.
1566 (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
1567 * trans-array.c: Update prototype.
1568 * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
1569 (gfc_trans_auto_character_variable): Use new memory alloc interface.
1570 * trans-expr.c (gfc_conv_string_tmp): Ditto.
1571 (gfc_conv_function_call): Use gfc_conv_string_tmp.
1572 * trans-stmt.c (gfc_do_allocate): Use new memory alloc interface.
1573 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
1574 * trans.h (gfc_ss_info): Remove unused pdata field.
1575 * trans.c (gfc_create_var_np): Change T to V.
1577 2003-11-26 Richard Henderson <rth@redhat.com>
1579 * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
1580 * trans-intrinsic.c (gfc_intrinsic_map): ... here. Add SCALE,
1581 FRACTION, NEAREST, SET_EXPONENT.
1582 (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
1583 Fix GTY marking. Remove unnecessary const's.
1584 (LIBM_FUNCTION): Rename from I_LIB.
1585 (LIBF_FUNCTION): New.
1586 (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
1587 conventions. Assume the expr signature is correct. Mark const.
1588 (gfc_conv_intrinsic_exponent): Use library functions.
1589 (gfc_conv_intrinsic_set_exponent): Remove.
1590 (gfc_conv_intrinsic_scale): Remove.
1591 (gfc_conv_intrinsic_nearest): Remove.
1592 (gfc_conv_intrinsic_fraction): Remove.
1593 (gfc_conv_intrinsic_function): Update.
1594 * trans-decl.c (gfor_fndecl_math_exponent4): New.
1595 (gfor_fndecl_math_exponent8): New.
1596 (gfc_build_intrinsic_function_decls): Set them.
1597 * trans.h: Declare them.
1599 2003-11-25 Canqun Yang <canqun@nudt.edu.cn>
1601 * trans-common.c (gfc_layout_global_equiv): Locate the error for
1602 underflow COMMON block.
1603 (gfc_trans_one_common): Fix bug for size of COMMON block containing
1604 EQUIVALENCE object. Also fix typo in an error message.
1606 2003-11-25 Diego Novillo <dnovillo@redhat.com>
1608 * Make-lang.in: Add check-gfortran to lang_checks.
1609 (check-f95): Alias for check-gfortran.
1611 2003-11-25 Jason Merrill <jason@redhat.com>
1613 * Make-lang.in (f95.tags): Create TAGS.sub files in each
1614 directory and TAGS files that include them for each front end.
1616 2003-11-24 Paul Brook <paul@nowt.org>
1619 * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
1621 2003-11-24 Paul Brook <paul@nowt.org>
1623 * expr.c (simplify_const_ref): Return SUCCESS for things we don't
1625 * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
1627 2003-11-24 Paul Brook <paul@nowt.org>
1630 * array.c (gfc_array_ref_shape): Handle elemental dimensions.
1631 * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
1633 2003-11-20 Richard Henderson <rth@redhat.com>
1635 * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
1636 (gfc_conv_array_base): Likewise.
1637 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
1638 * trans-expr.c (gfc_conv_string_tmp): Likewise.
1639 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
1640 * trans-stmt.c (gfc_trans_character_select): Likewise.
1642 2003-11-13 Paul Brook <paul@nowt.org>
1644 * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
1646 2003-11-13 Canqun Yang <canqun@nudt.edu.cn>
1648 * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
1649 (resolve_equivalence): New function.
1650 (resolve_equivalence_derived): New function.
1652 2003-11-12 Richard Henderson <rth@redhat.com>
1654 * trans.c (gfc_trans_code): Use annotate_with_locus instead of
1655 annotate_all_with_locus.
1657 2003-11-11 Canqun Yang <canqun@nudt.edu.cn>
1659 * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
1660 * trans-decl.c (gfc_finish_var_decl): Modified.
1662 2003-11-08 Paul Brook <paul@nowt.org>
1665 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
1668 2003-11-06 Paul Brook <paul@nowt.org>
1670 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
1672 2003-11-02 Canqun Yang <canqun@nudt.edu.cn>
1674 * match.c (gfc_match_stopcode): Assign '0' to stop_code.
1676 2003-10-27 Anthony Green <green@redhat.com>
1678 * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
1679 (f95.stagefeedback): Ditto.
1681 2003-10-27 Andrew Pinski <pinskia@physics.uc.edu>
1684 * Make-lang.in (f95.stageprofile): Add.
1685 (f95.stagefeedback): Add.
1687 2003-10-23 Richard Henderson <rth@redhat.com>
1689 * f96-lang.c (gfc_gimplify_expr): Remove.
1690 (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
1691 (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
1693 2003-10-23 Richard Henderson <rth@redhat.com>
1695 * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
1697 2003-10-20 Paul Brook <paul@nowt.org>
1699 * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
1700 * trans-stmt.c (gfc_trans_do_while): Ditto.
1702 2003-10-17 Paul Brook <paul@nowt.org>
1704 * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
1706 2003-10-17 Paul Brook <paul@nowt.org>
1708 * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
1710 2003-10-17 Feng Wang <wf_cs@yahoo.com>
1712 * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
1713 (gfc_resolve_minloc): Ditto.
1714 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
1715 Return the value after subtracting the lower bound.
1717 2003-10-16 Richard Henderson <rth@redhat.com>
1719 * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
1721 2003-10-16 Steven Bosscher <steven@gcc.gnu.org>
1723 * lang.c: Remove -M option for now, it's in the way for C.
1725 2003-10-14 Jason Merrill <jason@redhat.com>
1727 * Make-lang.in (f95.tags): New rule.
1729 2003-10-13 Richard Henderson <rth@redhat.com>
1731 * trans.c (gfc_trans_code): Use annotate_all_with_locus.
1733 2003-10-13 Paul Brook <paul@nowt.org>
1735 * trans-decl.c (generate_local_decl): Don't create junk variables.
1737 2003-10-13 Paul Brook <paul@nowt.org>
1739 * resolve.c (resolve_formal_arglist): Use function result decl in
1740 preference to function decl.
1742 2003-10-12 Richard Henderson <rth@redhat.com>
1744 * f95-lang.c (gfc_define_builtin): New const_p argument. Set
1745 TREE_READONLY. Update all callers.
1747 2003-10-12 Feng Wang <wf_cs@yahoo.com>
1749 * iresolve.c (gfc_resolve_cshift): Change to match implementation.
1750 * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
1751 (gfc_is_intrinsic_libcall): Add CSHIFT.
1753 2003-10-12 Richard Henderson <rth@redhat.com>
1755 * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
1756 (gfc_trans_array_constructor_value): Likewise.
1757 (gfc_conv_array_initializer): Likewise.
1758 * trans-stmt.c (gfc_trans_character_select): Likewise.
1760 2003-11-12 Kejia Zhao <kejia_zh@yahoo.com.cn>
1762 * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
1764 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
1766 * check.c (gfc_check_repeat): Check arguments are scalar.
1767 (gfc_check_trim): New function.
1768 * intrinsic.h (gfc_check_trim): Add prototype.
1769 * intrinsic.c (add_functions): Use it.
1770 * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
1772 * trans-decl.c: Ditto.
1773 (gfc_build_intrinsic_fucntion_decls): Set them.
1774 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
1775 (gfc_conv_intrinsic_trim): New function.
1776 (gfc_conv_intrinsic_repeat): New function.
1777 (gfc_conv_intrinsic_function): Use them.
1779 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
1781 * trans-types.c (gfc_sym_type): Handle result variables.
1783 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
1785 * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
1786 gfc_get_character_type.
1788 2003-10-11 Feng Wang <wf_cs@yahoo.com>
1790 * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
1792 2003-10-11 Paul Brook <paul@nowt.org>
1794 * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
1795 (gfc_resolve_dprod): New function.
1796 (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
1797 * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
1798 (gfc_resolve_dprod): Declare.
1799 * intrinsic.c (add_functions): Use them.
1800 * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
1802 2003-10-06 Richard Henderson <rth@redhat.com>
1804 * f95-lang.c (gfc_init_builtin_functions): Add clzll.
1805 * trans-intrinsic.c (call_builtin_clz): Use it.
1807 2003-10-05 Paul Brook <paul@nowt.org>
1809 * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
1810 * trans-decl.c (gfc_generate_function_code): Set
1811 cfun->function_end_locus.
1813 2003-09-24 Jason Merrill <jason@redhat.com>
1815 * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
1818 2003-09-21 Lifang Zeng <zlf605@hotmail.com>
1819 Paul Brook <paul@nowt.org>
1821 * Make-lang.in (F95_OBJS): Add fortran/data.o.
1822 * array.c (gfc_inser_constructor): New function.
1823 (gfc_get_constructor): New function.
1824 (gfc_free_constructor): Initialize offset and repeat.
1825 (iterator_stack): Remove.
1826 (expand_info): Add offset, component and repeat fields.
1827 (expand_constructor): Set them.
1828 (expand): Set new fields.
1829 (gfc_copy_constructor): Ditto. Avoid recursion.
1830 * gfortran.h: Add prototypes for new functions.
1831 (gfc_constructor): Add offset, component and repeat.
1832 (iteratio_stack): Move to here.
1833 * resolve.c (check_data_variable): Convert data values into variable
1835 (traverse_data_list): Build implicit loop chain.
1836 (gfc_resolve): Ditto.
1837 * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
1838 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
1839 * trans-expr.c (gfc_conv_structure): Handle array initializers.
1840 (gfc_conv_expr): Update to match.
1841 * trans.h (gfc_conv_structure): Declare.
1844 2003-09-20 Kejia Zhao <kejia_zh@yahoo.com.cn>
1846 * trans.h: Add declarations for gfor_fndecl_si_kind and
1847 gfor_fndecl_sr_kind.
1848 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
1849 * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
1850 (g95_conv_intrinsic_sr_kind): New function.
1851 (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
1854 2003-09-17 Lars Segerlund <Lars.Segerlund@comsys.se>
1856 * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
1857 instead of _4 and _8 as postfix for libgfortran calls.
1859 2003-09-16 Paul Brook <paul@nowt.org>
1861 * array.c (compare_bounds): New function.
1862 (gfc_compare_array_spec): Use it.
1864 2003-09-14 Paul Brook <paul@nowt.org>
1866 * primary.c (gfc_match_rvalue): Make sure sym->result is set.
1867 * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
1869 2003-09-14 Paul Brook <paul@nowt.org>
1871 * check.c (dim_rank_check): Allow assumed bounds if requested.
1872 (gfc_check_lbound): Call it.
1873 (gfc_check_ubound): Ditto.
1874 (gfc_check_size): Change to match.
1875 * simplify.c (gfc_simplify_bound): New function.
1876 (gfc_simplify_lbound): New function.
1877 (gfc_simplify_ubound): New function.
1878 * intrinsic.h: Declare them.
1879 * intrinsic.c (add_functions): Use them.
1881 2003-09-14 Paul Brook <paul@nowt.org>
1883 * io.c (format_lex): Initialize negative_flag.
1884 (check_format): Intialize repeat.
1885 * trans-io.c (gfc_new_nml_name_expr): Declare static.
1886 (gfc_new_var_expr): Ditto.
1888 2003-09-14 Paul Brook <paul@nowt.org>
1890 * trans-array.c (gfc_conv_array_initializer): Handle derived types.
1891 * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
1893 2003-09-12 Paul Brook <paul@nowt.org>
1895 * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
1897 2003-09-12 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
1899 * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
1900 for a correct expression.
1902 2003-09-10 Kejia Zhao <kejia_zh@yahoo.com.cn>
1904 * trans-intrinsic.c (real_compnt_info): New struct.
1905 (prepare_arg_info): New function.
1906 (gfc_conv_intrinsic_set_exponent): New function.
1907 (gfc_conv_intrinsic_scale): New function.
1908 (gfc_conv_intrinsic_nearest): New function.
1909 (gfc_conv_intrinsic_fraction): New function.
1910 (gfc_conv_intrinsic_exponent): New function.
1911 (gfc_conv_intrinsic_spacing): New function.
1912 (gfc_conv_intrinsic_rrspacing): New function.
1913 (gfc_conv_intrinsic_function): Use them.
1915 2003-08-24 XiaoQiang Zhang (zhangapache@yahoo.com>
1917 * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
1918 build_int_2 changed from (high, low) to (low, high).
1919 * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
1920 ioparm_namelist_read_mode, iocall_set_nml_val_int,
1921 iocall_set_nml_val_float, iocall_set_nml_val_char,
1922 iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
1923 (gfc_build_io_library_fndecls): Add variable initialization.
1924 (gfc_new_nml_name_expr, get_new_var_expr): New function.
1925 (build_dt): Add namelist support.
1926 * io.c (value): New variable.
1927 (check_format): Support FMT_H now.
1929 2003-09-07 Paul Brook <paul@nowt.org>
1931 * io.c (gfc_resolve_dt): Error if format label is not defined.
1933 2003-09-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
1935 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
1936 about case_switch's break. The other is about building the condition
1937 statement tree, which judges the argument in the range of the
1938 corresponding integer type.
1939 * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
1940 for the large values.
1942 2003-09-05 Paul Brook <paul@nowt.org>
1944 * f95-lang.c (expand_function_body): Gimplify the function.
1946 2003-09-04 Jeff Law <law@redhat.com>
1948 * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
1951 2003-09-04 Paul Brook <paul@nowt.org>
1953 * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
1954 (gfc_expand_stmt): New function.
1955 (LANG_HOOKS_RTL_EXPAND_STMT): Define.
1956 (expand_function_body): Use tree_rest_of_compilation.
1957 * trans-decl.c (gfc_generate_function_code): Don't free cfun.
1959 2003-09-03 Jeff Law <law@redhat.com>
1961 * f95-lang.c (gfc_init_builtin_functions): C arrays start at
1964 2003-08-30 Paul Brook <paul@nowt.org>
1966 * f95-lang.c (builtin_function): Remove #if 0 code.
1967 (gfc_define_builtin): New function.
1968 (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
1969 * mathbuiltins.def: New file.
1970 * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
1971 (gfc_intrinsic_map): Use mathbuiltins.def.
1972 (gfc_intrinsic_builtin_t): Remove.
1973 (gfc_build_intrinsic_lib_fndecls): Update.
1974 * trans-types.c (gfc_init_types): Remove redundant initilaization of
1975 signed_size_type_node.
1977 2003-08-29 Paul Brook <paul@nowt.org>
1979 * arith.c (gfc_real_kinds): Use correct minimum exponents.
1981 2003-08-22 Kejia Zhao <kejia_zh@yahoo.com.cn>
1983 * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
1984 (gfc_conv_intrinsic_function): Add MODULO.
1986 2003-08-22 Jason Merrill <jason@redhat.com>
1988 * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
1990 2003-08-22 Andreas Jaeger <aj@suse.de>
1992 * Make-lang.in (f95.install-common): Add DESTDIR support.
1993 * (f95.install-info): Likewise.
1994 (f95.uninstall): Likewise.
1996 2003-08-19 Diego Novillo <dnovillo@redhat.com>
1998 * trans-types.c (gfc_init_types): Initialize
1999 signed_size_type_node with size_type_node.
2001 2003-08-18 Paul Brook <paul@nowt.org>
2003 * dependency.c (gfc_dependency): New enum.
2004 (check_another_array_ref): Remove.
2005 (gfc_get_array_from_component): Remove.
2007 (get_range): Remove.
2008 (get_no_of_elements): Use mpz_t, not mpf_t.
2009 (transform_sections): New function.
2010 (gfc_check_range_range): Rename ...
2011 (gfc_check_section_vs_section): ... to this. Use new function.
2012 (gfc_is_inside_range): Rewrite to match.
2013 (gfc_check_element_vs_section): Ditto.
2014 (gfc_check_element_vs_element): Ditto.
2016 (gfc_dep_resolver): Ditto. Remove unused parameter.
2017 * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
2018 gfc_check_element_vs_element, gfc_is_inside_range,
2019 gfc_get_array_from_component): Remove prototypes for static functions.
2020 (gfc_dep_resolver): Update prototype.
2021 * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
2023 2003-08-15 Paul Brook <paul@nowt.org>
2025 * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
2026 return values to parent scope.
2027 (gfc_build_dummy_array_decl): Ditto.
2029 2003-08-14 Paul Brook <paul@nowt.org>
2031 * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
2032 size of the type, not the pointer.
2033 * resolve.c (resolve_symbol): Give more accurate error message.
2035 2003-08-10 Paul Brook <paul@nowt.org>
2037 * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
2039 2003-08-10 Paul Brook <paul@nowt.org>
2041 * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
2044 2003-08-10 Chun Huang <compiler@sohu.com>
2046 * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
2047 (resolve_symbol): Ditto.
2048 * trans-expr.c (gfc_conv_statement_function): New function.
2049 (gfc_conv_function_expr): Use it.
2051 2003-08-10 Paul Brook <paul@nowt.org>
2053 * trans-array.c (gfc_conv_ss_startstride): Handle functions.
2054 (walk_function_expr): Set section rank.
2055 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
2057 2003-08-10 Paul Brook <paul@nowt.org>
2059 * intrinsic.c (add_sym): Prefix names with correct string.
2060 (add_sym_0s): New function.
2061 (add_subroutines): Register abort.
2063 2003-08-10 Erik Schnetter <schnetter@uni-tuebingen.de>
2065 * gfortran.h: Introduce options to control the mangling.
2066 * lang.opt: Likewise.
2067 * options.c (gfc_init_options): Handle the options.
2068 * trans-common.c (gfc_sym_mangled_common_id): New function.
2069 (gfc_build_common_decl): Call it.
2070 * trans-decl.c (gfc_sym_mangled_function_id): New function.
2071 (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
2073 2003-08-09 Paul Brook <paul@nowt.org>
2075 * module.c (mio_symbol): Always ouput a namespace for formal args.
2076 (load_needed): Namespace now belong to their proper symbol.
2077 (gfc_dump_module): Change G95=>GFORTRAN.
2079 2003-08-05 Paul Brook <paul@nowt.org>
2081 * options.c: Force -fg77-calls.
2083 2003-08-02 Paul Brook <paul@nowt.org>
2085 * Makelang.in: Rename G95_* to GFORTRAN_*.
2086 * All sources: Rename G95_* to GFC_*.
2088 2003-08-01 Paul Brook <paul@nowt.org>
2090 * fortran/Make-lang.in: Use GMPLIBS.
2091 * fortran/config-lang.in: Set need_gmp.
2092 * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
2094 2003-07-27 Andreas Jaeger <aj@suse.de>
2096 * trans-decl.c (gfc_generate_constructors): Convert prototype to
2098 * trans-const.c (gfc_init_constants): Likewise.
2099 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
2101 * gfortranspec.c: Convert to ISO C90.
2102 (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
2104 2003-07-26 Paul Brook <paul@nowt.org>
2106 * lang.opt: Add -fdump-parse-tree.
2107 * options.c (gfc_handle_option): Ditto.
2108 * resolve.c (resolve_forall_iterators): Convert to proper type.
2109 * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
2111 2003-07-26 Paul Brook <paul@nowt.org>
2113 * Makefile.in: Add build dependencies on files common with rest of gcc.
2115 2003-07-26 Lifang Zeng <zlf605@hotmail.com>
2117 * trans.h: Declare g95_trans_pointer_assignment.
2118 * trans-expr.c (g95_trans_pointer_assignment): New function.
2119 (g95_trans_pointer_assign): Use it.
2120 * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
2121 (g95_trans_pointer_assign_need_temp): New function.
2123 2003-07-26 Paul Brook <paul@nowt.org>
2125 * gfortran.texi: Replace references to g95.
2127 2003-07-26 Paul Brook <paul@nowt.org>
2129 Rename g95_* to gfc_*.
2131 2003-07-25 Paul Brook <paul@nowt.org>
2133 * gfortran.h: Rename from g95.h.
2134 * trans-types.c (boolean_type_node, booelan_true_node,
2135 boolean_false_node): Remove.
2136 * trans-types.h: Ditto.
2138 2003-07-25 Chun Huang <compiler@sohu.com>
2140 * parse.c (accept_statement): Implement BLOCK DATA statement.
2141 * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
2144 2003-07-24 Lifang Zeng <zlf605@hotmail.com>
2146 * trans-stmt.c (temporary_list): Define.
2147 (g95_trans_assign_need_temp): New function.
2148 (g95_trans_forall_1): Modified for WHERE.
2149 (g95_trans_where_assign): Modified.
2150 (g95_trans_where_2): Modified.
2151 (g95_evaluate_where_mask): Modified.
2152 (g95_trans_where): Modified.
2153 (g95_get_temp_expr): Removed.
2154 (g95_add_to_where_stmt_list): Removed.
2155 (compute_overall_iter_number): Modified for WHERE.
2156 * trans.h: Remove where_stmt_list.
2158 2003-07-24 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2160 * lang.opt: Correct description of options -J and -M.
2162 2003-07-23 Steven Bosscher <steven@gcc.gnu.org>
2164 * lang.opt: Move help text to here.
2165 * lang-options.h: Remove.
2167 2003-07-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2168 * iresolve.c (g95_resolve_transpose): Proper variable in switch.
2169 * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
2172 2003-07-22 Steven Bosscher <steven@gcc.gnu.org>
2173 Paul Brook <paul@nowt.org>
2175 * check.c (check_rest): Use global pedantic flag.
2176 * io.c (data_desc): Ditto.
2177 * error.c (g95_warning, g95_warning_now): Use global flag.
2178 * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
2179 (expand_function_body): Update to new prototypes.
2180 (g95_init): Use new option names.
2181 * g95.h (g95_option_t): Standardize names.
2182 (g95_init_options, g95_handle_option): Update prototypes.
2183 * interface.c: Use new option names.
2190 * simplify.c: Ditto.
2192 * trans-array.c: Ditto.
2193 * trans-expr.c: Ditto.
2194 * trans-types.c: Ditto.
2195 * trans-decl.c: Ditto.
2196 (g95_build_library_function_decl): Remove obsolete VPARAMS.
2198 * options.c (g95_display_help): Remove.
2199 (g95_init_options): Convert to new scheme.
2201 (g95module_option): Ditto, rename from g95_parse_arg.
2202 (g95_handle_module_path_options): New function.
2203 * trans-equivalence.c: Fix error message.
2204 * lang.opt: Corrections.
2206 2003-07-21 Steven Bosscher <steven@gcc.gnu.org>
2208 * lang.opt: New file.
2210 2003-07-21 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2212 * decl.c (match_attr_spec): Set colon_seen.
2214 2003-07-14 Paul Brook <paul@nowt.org>
2216 * trans-array.c: Update comment.
2217 (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
2218 * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
2219 minmaxloc,minmaxval): Ditto.
2220 * trans-io.c (g95_trans_transfer): Ditto.
2221 * trans-stmt.c: Remove unneeded prototypes.
2222 (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
2223 (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
2224 (compute_inner_temp_size): Remove bits of dead code. Add comments.
2225 Don't share loopinfo.
2226 (compute_overall_iter_number): Declare as static.
2227 (allocate_temp_for_forall_nest): Ditto.
2228 (g95_trans_forall_1): Don't pass shared loopinfo.
2229 * trans.c (g95_start_block): Expand comment.
2231 2003-07-12 Paul Brook <paul@nowt.org>
2233 * arith.c (g95_index_integer_kind): Remove unused initializer.
2234 * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
2235 index by size of element.
2236 (generate_loop_for_rhs_to_temp): Ditto.
2237 (allocate_temp_for_forall_nest): Use element size, not index size.
2239 2003-07-11 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2241 * arith.c (g95_index_integer_kind): Add a TODO.
2242 * simplify.c (g95_simplify_nearest): Add a TODO.
2244 2003-07-09 Chun Huang <compiler@sohu.com>
2246 * trans.h: Add declarations for gfor_fndecl_string_scan and
2247 gfor_fndecl_string_verify.
2248 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
2249 * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
2250 (g95_conv_intrinsic_verify): New function.
2251 (g95_conv_intrinsic_function): Add SCAN and VERIFY.
2252 * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
2253 of parameter 'BACK=.TRUE.'
2255 2003-07-05 Lifang Zeng <zlf605@hotmail.com>
2257 * trans-stmt.c (iter_info, forall_info): Define.
2258 (g95_trans_forall_block): Remove.
2259 (g95_trans_forall_loop): Use forall info blocks.
2260 (g95_trans_nested_forall_loop): New function.
2261 (g95_do_allocate): Handle things other than logical masks.
2262 (generate_loop_for_temp_to_lhs): New function.
2263 (generate_loop_for_rsh_to_temp): New function.
2264 (compute_inner_temp_size): New function.
2265 (compute_overall_iter_number): New function.
2266 (allocate_temp_for_forall_nest): New function.
2267 (g95_trans_forall): Move body ...
2268 (g95_trans_forall_1): ... to here. Handle loops with temporaries.
2270 2003-07-02 Paul Brook <paul@nowt.org>
2272 * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
2273 in correct scope. Change callers to match.
2274 * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
2275 * iresolve.c (g95_resolve_reshape): Only use constant shapes.
2277 2003-07-02 Paul Brook <paul@nowt.org>
2279 * trans-array.c (g95_conv_loop_setup): Remove dead var. Use
2280 expression shape for all expressions.
2281 * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
2283 2003-07-03 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2285 * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
2286 g95_parse_arg), intrinsic.c (g95_convert_type): support of
2288 * intrinsic.c, g95.h: Add g95_convert_type_warn,
2289 * resolve.c (g95_resolve_index): Call it.
2291 2003-07-02 Paul Brook <paul@nowt.org>
2293 * iresolve.c (g95_resolve_reshape): Set expression shape.
2294 (g95_resolve_shape): Ditto.
2295 * simplify.c (g95_simplify_shape): Move common code outside condition.
2296 * trans-array.c (g95_conv_array_initializer): Teach it how to count.
2298 2003-07-01 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2300 * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
2303 2003-06-29 Paul Brook <paul@nowt.org>
2305 * array.c (g95_simplify_iterator_var): Don't bother with return value.
2306 * expr.c (find_array_element, find_component_ref): New functions.
2307 (remove_subobject_ref): New function.
2308 (simplify_const_ref): Use them. Rename from simplify_component_ref.
2309 (simplify_ref_chain): New function.
2310 (g95_simplify_expr): Use it. Simplify parameter variable subobjects.
2311 (g95_specification_expr): Simplify the expression.
2312 * resolve.c (resolve_operator): Check simplifications return code.
2313 (g95_resolve_expr): Ditto.
2315 2003-06-26 Paul Brook <paul@nowt.org>
2317 * expr.c (simplify_component_ref): New function.
2318 (g95_simplify_expr): Use it.
2319 * resolve.c (resolve_structure_cons): Handle references.
2321 2003-06-25 Paul Brook <paul@nowt.org>
2323 * trans-io.c (build_dt): Handle internal units.
2325 2003-06-25 Canqun Yang <canqun@yahoo.com.cn>
2327 * trans-common.c (g95_build_common_decl): Array index range starts at 0.
2328 (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
2329 Use g95_array_index_type instead of integer_type_node.
2330 (g95_build_common_decl, g95_set_common_master_type): Use
2331 g95_character1_type_node instead of char_type_node.
2332 * trans-equivalence.c (g95_layout_local_equiv): As above.
2334 2003-06-24 Steven G. Kargl <kargls@attbi.com>
2336 * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
2337 remove last remains of -fquiet.
2339 2003-06-22 Paul Brook <paul@nowt.org>
2341 * resolve.c (resolve_operator): Don't fail if we can't simplify.
2342 (g95_resolve_expr): Ditto.
2343 (resolce_code): Mark as static.
2344 * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
2345 gimplifer doesn't (yet).
2347 2003-06-20 Paul Brook <paul@nowt.org>
2349 * g95.h: Add ST_PAUSE and EXEC_PAUSE.
2350 * match.c (g95_match_if): Add ST_PAUSE.
2351 (g95_match_stopcode): New function.
2352 (g95_match_pause, g95_match_stop): Use it.
2353 * parse.c (g95_ascii_statement): Handle ST_PAUSE.
2354 (decode_stmt, next_statement, parse_executable): Ditto.
2355 * resolve.c (resolve_code): Ditto.
2356 * st.c (g95_free_statement): Ditto.
2357 * trans-stmt.c (g95_trans_pause): New function.
2358 * trans-stmt.h: Declare it.
2359 * trans.c (g95_trans_code): Use it.
2360 * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
2362 (g95_build_builtin_function_decls): Initialize them.
2364 * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
2366 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2368 * io.c (g95_match_open , g95_match_close, g95_match_inquire,
2369 match_filepos): Fix error handling.
2371 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2373 * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
2374 Add assertions on arguments.
2375 * resolve.c (expression_shape): Remove useless &.
2376 * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
2377 g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
2378 g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
2379 g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
2380 g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
2381 g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
2382 (g95_simplify_not, g95_simplify_scale): Add assertions.
2384 2003-06-15 Paul Brook <paul@nowt.org>
2386 Clean up stuff to work with the ssa optimizers.
2387 * convert.c (convert): Handle BOOLEAN_TYPEs.
2388 * f95-lang.c (g95_truthvalue_conversion): Implement.
2389 * trans-array.c (g95_trans_array_constructor_value): Group multiple
2391 * trans.h (g95_truthvalue_conversion): Declare.
2392 * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
2393 * trans-stmt.c (g95_trans_character_select): Don't create array
2394 assignments. Mark labels as indirect jump targets.
2395 * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
2396 (g95_get_dtype_cst): Handle LOGICAL types.
2398 2003-06-14 Paul Brook <paul@nowt.org>
2400 * f95-lang.c (g95_gimplify_expr): New function.
2401 * trans-array.c (g95_trans_array_constructor_value): Don't create
2403 (g95_conv_expr_descriptor): Rename simple->gimple.
2404 * trans-expr.c (conv_expr_op): Use proper logical operators.
2405 * trans-intrinsic.c (build_fixbound_expr): New function.
2406 (build_fix_expr): Ditto.
2407 (g95_conv_intinsic_aint): Use them. Use builtin functions.
2408 (g95_conv_intrinsic_function): Add FLOOR and CEILING.
2410 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2412 * array.c (g95_compare_array_spec): Remove unreachable code.
2413 * expr.c (g95_copy_expr): Likewise.
2414 * intrinsic.c (g95_convert_type): Likewise.
2415 * misc.c (g95_code2string): Likewise.
2416 * simplify.c (g95_simplify_ishft, g95_simplify_real,
2417 g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
2418 * trans-stmt.c (g95_trans_select): Likewise.
2419 * primary.c (extend_ref): Add an assertion.
2420 * simplify.c (g95_convert_constant): Add const.
2421 * intrinsic.h: Remove g95_check_x_ni.
2422 * f95-lang.c (g95_finish): Call g95_release_include_path.
2424 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2426 * resolve.c (resolve_contained_functions): Fix typo introduced on
2429 2003-06-09 Paul Brook <paul@nowt.org>
2431 * g95.h: Include system.h not hwint.h.
2432 * many: use safe-ctype.h not ctype.h. Change isalpha -> ISALPHA, etc.
2433 * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
2435 2003-06-09 Paul Brook <paul@nowt.org>
2437 * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
2438 * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
2439 * trans-decl.c (g95_add_decl_to_functions): Make non-static.
2440 (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
2441 (g95_generate_function_code): Translate COMMON and EQUIVALENCE
2443 * trans.h (g95_trans_equivalence, g95_trans_common,
2444 g95_add_decl_to_function): Declare.
2445 * trans-common.c, trans-equivalence.c: New files.
2447 2003-06-08 Steven Bosscher <steven@gcc.gnu.org>
2449 * intrinsic.c (g95_intrinsic_extension): Remove.
2450 (add_functions): Substitute g95_check_x for g95_check_x_ni
2452 (g95_init_expr_extensions): New function.
2453 (g95_intrinsic_func_interface): Use it.
2454 * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
2455 * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
2456 g95_check_precision, g95_check_present, g95_check_radix,
2457 g95_check_range, g95_check_selected_real_kind): Do not set
2458 g95_intrinsic_extension.
2459 (g95_check_x_ni): Remove now duplicate of g95_check_x.
2461 * expr.c (check_inquiry): Add FIXME, fixup some code style.
2463 2003-06-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2465 * g95.h (ref_type): Name this type explicitly.
2466 * module.c (MIO_NAME): Add specialisations of mio_name.
2467 (mio_symbol_attribute, mio_typespec, mio_array_ref,
2468 mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
2469 (ab_attribute): Name this type explicitly.
2470 (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
2472 2003-06-05 Kejia Zhao <kejia_zh@yahoo.com.cn>
2474 * trans-intrinsic.c (g95_conv_allocated): New function.
2475 (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
2477 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
2479 * f95-lang.c: Don't include g95-support.h
2480 (g95_mark_addressable): Add prototype.
2481 (g95_init_decl_processing): Remove C front end hack.
2482 * f95-tree.c: Remove file.
2483 * support.c: Remove file.
2484 * g95-support.h: Remove file.
2485 * trans-types.c (g95_init_types): Set up boolean
2486 type related tree nodes.
2487 * Make-lang.in: Remove rules for dead files and
2488 dependencies on them.
2490 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
2492 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
2493 C front end dependency. Also, convert.c does not depend on
2494 g95-support.h anymore.
2495 * convert.c: Don't include c-common.h and g95-support.h
2496 * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
2497 (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
2498 stmts_are_full_exprs_p, current_stmt_tree,
2499 current_scope_stmt_stack): Remove.
2500 * g95-support.h (unsigned_conversion_warning): Kill proto.
2501 (boolean_type_node, boolean_true_node, boolean_false_node):
2502 Don't define here. Instead, make then true tree nodes in
2504 * support.c (c_global_trees): Die, C front end, die!!!
2505 (g95_init_c_decl_hacks): Don't touch intmax_type_node,
2506 uintmax_type_node, string_type_node and const_string_type_node.
2507 (decl_constant_value, overflow_warning): Make static functions.
2508 They are in death row too, though.
2509 (default_conversion, c_expand_asm_operands): Remove.
2510 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
2511 trans.c: Don't include c-common.h.
2512 * trans-types.c (boolean_type_node, boolean_true_node,
2513 boolean_false_node): Make them real tree nodes.
2514 * trans-types.h (intmax_type_node, string_type_node,
2515 const_string_type_node): Hack to work around C dependencies
2516 in builtin-types.def.
2518 2003-06-04 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2520 * decl.c (decl_types): Add some iterators-like sentinels.
2521 * decl.c (match_attr_spec): Use them.
2522 Use "decl_types" instead of "int".
2523 Add cast in call to g95_match_strings.
2524 * dump-parse-tree.c (g95_show_namespace): Use "g95_intrinsic_op"
2526 * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
2527 (g95_interface_info): Use "g95_intrinsic_op".
2528 * dump-parse-tree.c (g95_show_namespace): Use them.
2529 * interface.c (g95_check_interfaces): Use them.
2530 * module.c (read_module, write_module): Use them.
2531 * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
2532 Use "g95_intrinsic_op".
2533 * interface.c (check_operator_interface): Use "g95_intrinsic_op".
2534 Add a default case in switch statement.
2535 * intrinsic.h (g95_generic_isym_id): Moved to...
2536 * g95.h (g95_generic_isym_id): here.
2537 (g95_intrinsic_sym): Use "g95_generic_isym_id".
2538 * intrinsic.c (make_generic): Use "g95_generice_isym_id".
2539 * trans-intrinsic.c (g95_intrinsic_map_t,
2540 g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
2541 * match.c (g95_match_intrinsic_op): Add cast in call to
2544 2003-06-03 Steven Bosscher <steven@gcc.gnu.org>
2546 * support.c (skip_evaluation, warn_conversion, lvalue_p,
2547 lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
2548 constant_fits_type_p, convert_and_check,
2549 unsigned_conversion_warning): Remove these ugly remnants
2550 we inherited from the C front end.
2551 (function_types_compatible): Remove '#if 0'-edcode.
2552 (build_modify_expr): Likewise.
2553 (convert_for_assignment): Don't use the deceased functions.
2554 The parameter fundecl is now unused.
2555 (decl_constant_value): Always just return decl. In fact
2556 this function is not used at present, but it might be in
2557 the future, when we start using the tree inliner.
2558 (overflow_warning, default_conversion, c_expand_asm_operands):
2559 Abort when these are called, they are part of the C type
2560 checking implementation and therefore poison to Fortran.
2562 2003-06-04 Steven Bosscher <steven@gcc.gnu.org>
2564 * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
2565 c-pretty-print.o and c-dump.o. Add a comment on why we
2566 depend on c-semantics.c.
2567 * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
2568 Don't use the C front end tree dumper hook to dump the
2569 language specific tree representation -- we don't have
2570 one. So instead, inherit the default langhook.
2572 2003-06-02 Paul Brook <paul@nowt.org>
2574 * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
2576 2003-06-02 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2578 * check.c (g95_check_associated): Use proper types. Remove
2579 extraneous argument in call to g95_error().
2581 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
2583 * resolve.c (resolve_operator): Make logical operands convert to the
2584 type with higher kind.
2586 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
2588 * check.c (g95_check_associated): Make sure both pointer and target has
2589 the same type and rank. Null pointer or array section with vector
2590 subscript as target are not allowed.
2591 * trans.h: Declare gfor_fndecl_associated.
2592 * trans-decl.c: (g95_build_builtin_function_decls): Initialize
2593 gfor_fndecl_associated.
2594 * trans-intrinsic.c (g95_conv_associated): New function.
2595 (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
2597 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
2599 * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
2600 according to POINTER itself rather than TARGET.
2601 (g95_conv_expr_descriptor): Make lbound start at 1.
2602 * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
2604 2003-06-01 Paul Brook <paul@nowt.org>
2606 * expr.c (g95_type_convert_binary): Make it match the standard.
2607 * g95.texi: Remove dead link.
2609 2003-06-01 Steven Bosscher <steven@gcc.gnu.org>
2611 * g95.texi: Cleanup somewhat in preparation for inclusion
2614 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2615 Canqun Yang <canqun@yahoo.com.cn>
2617 * resolve.c (compare_bound_int, resolve_where_shape): Proper return
2619 (g95_find_forall_index): Return proper value.
2620 (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
2621 compare the return value from g95_find_forall_index.
2623 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2624 * g95.h, io.c (g95_st_label): Remove "length".
2625 (g95_symtree): Remove "link".
2626 (g95_case): Remove "code".
2627 * arith.c, arith.h (g95_compare_string, g95_convert_integer,
2628 g95_convert_real): Make an argument pointer to const.
2629 * decl.c (colon_seen): Add a TODO.
2630 * interface.c (g95_compare_types): Fix typo.
2631 * interface.c (compare_interfaces): Preserve value of "p".
2632 * intrinsic.c (sort_actual): Remove "i".
2633 * match.c (g95_match_assign): Proper type in call to g95_match().
2634 * parse.c (next_free): Avoid duplicate call due to macro.
2635 * parse.c (check_statement_label): wrong type in call to g95_error.
2636 * primary.c (match_real_constant): Add a TODO.
2637 * resolve.c (resolve_select): Remove useless conditional.
2638 * simplify.c (g95_simplify_repeat): Proper assignment to
2639 "value.character.string".
2640 * simplify.c (g95_simplify_reshape): Wrong variable in call to
2643 2003-05-20 Canqun Yang <canqun@yahoo.com.cn>
2645 * trans-stmt.c: Remove unnecessary include file defaults.h.
2647 2003-05-19 Lifang Zeng <zlf605@hotmail.com>
2649 * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
2651 (g95_trans_forall): Allow arbitrary number of FORALL indexes and
2652 actual variables used as FORALL indexes.
2654 2003-05-15 Paul Brook <paul@nowt.org>
2656 * trans-array.c (g95_trans_static_array_pointer): Use
2658 (g95_trans_deferred_array): Initialize static array pointers.
2659 * trans-expr.c (g95_conv_function_call): Use formal arglist to
2660 correctly pass POINTER and absent CHARACTER arguments.
2662 2003-05-14 Lifang Zeng <zlf605@hotmail.com>
2664 * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
2665 (g95_resolve_forall_body): Resolve FORALL body.
2666 (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
2667 (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
2668 (g95_find_forall_index): Check whether the FORALL index appears in
2669 the expression or not.
2670 (resolve_code): Modified.
2672 2003-05-14 Paul Brook <paul@nowt.org>
2674 * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
2676 2003-05-13 Paul Brook <paul@nowt.org>
2678 * trans-types.c (g95_max_array_element_size): Now a tree node.
2679 (g95_init_types): Work out max size properly.
2680 (g95_get_dtype_cst): Modify to match.
2682 2003-05-11 Paul Brook <paul@nowt.org>
2684 * trans-io.c (add_case): Create a label decl for case labels.
2686 2003-05-11 Paul Brook <paul@nowt.org>
2688 * arith.c (g95_integer_index_kind): New variable.
2689 * f95-lang.c (g95_init): Move frontend initialization here ...
2690 (g95_post_options): ... from here.
2691 * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
2692 * intrinsic.c (add_functions): Use index kinds.
2693 * iresolve.c: Convert to index_kind where needed.
2694 * resolve.c (g95_resolve_index): Make public, use index_kind.
2695 (resolve_array_ref): Adjust to match.
2696 * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
2697 * trans-stmt.c: Ditto.
2698 * trans-types.c: Ditto.
2699 * trans-types.h (g95_array_index_kind): Remove declaration.
2700 * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
2702 2003-05-07 Paul Brook <paul@nowt.org>
2704 * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
2705 * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
2708 2003-05-07 Paul Brook <paul@nowt.org>
2710 * trans-array.c (trans_static_array_pointer,
2711 g95_trans_array_constructor_value, g95_conv_array_initializer,
2712 g95_conv_structure): CONSTRUCTOR nodes only have one operand.
2713 (g95_add_loop_ss_code): Convert subscripts to the correct type.
2714 * trans-stmt.c (g95_trans_character_select): Ditto.
2715 * trans-types.c (g95_init_types): Ditto.
2717 2003-05-07 Steven Bosscher <steven@gcc.gnu.org>
2719 * f95-lang.c (expand_function_body): Use input_line, not lineno.
2720 * trans-decl.c (g95_generate_function_code,
2721 g95_generate_constructors): Likewise.
2722 * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
2723 g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
2726 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
2727 * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
2728 with components point to the DERIVED type itself, and two DERIVED
2729 type with components point to each other.
2730 * trans-expr.c (g95_conv_componet_ref): Modified
2732 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
2733 * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
2735 (g95_trans_pointer_assign): Implement Nullify.
2737 2003-05-01 Paul Brook <paul@nowt.org>
2739 * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
2740 * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
2742 2003-05-01 Paul Brook <paul@nowr.org>
2744 * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
2745 trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
2748 2003-05-01 Canqun Yang <canqun@yahoo.com.cn>
2750 * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
2753 2003-04-28 Paul Brook <paul@nowt.org>
2755 * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
2756 as their kind suggests.
2757 (g95_resolve_reshape): Ditto.
2759 2003-04-28 Chun Huang <compiler@sohu.com>
2761 * trans-expr.c (g95_conv_substring_expr): New function.
2762 (g95_conv_expr): Use it.
2764 2003-04-28 Paul Brook <paul@nowt.org>
2766 * iresolve.c (g95_resolve_transpose): Make it match the
2768 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
2770 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
2772 * trans-types.c (g95_add_field_to_struct): New function to
2773 add a field to a UNION_TYPE or RECORD_TYPE.
2774 * trans-types.h (g95_add_field_to_struct): Prototype.
2775 (g95_get_derived_type): Use g95_add_field_to_struct to add
2777 * trans-io.c (g95_add_field): Remove.
2778 (ADD_FIELD): Use new g95_add_field_to_struct function.
2779 (ADD_STRING): Likewise.
2780 * trans-stmt.c (g95_trans_select): Likewise.
2781 (g95_add_field): Remove duplicated function.
2783 2003-04-18 Canqun Yang <canqun@yahoo.com.cn>
2785 Port implementation for CHARACTER SELECT from Andy's tree.
2786 * trans-stmt.c (g95_trans_character_select): Implement character
2787 select. (g95_add_field): New function.
2788 * trans-decl.c: Declare 'gfor_gndecl_select_string'.
2789 (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
2790 * g95.h (struct g95_case): Add field 'int n'.
2791 * trans.h: Declare 'gfor_fndecl_select_string'.
2793 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
2795 * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
2796 (g95_insert_bbd): Die on duplicates.
2797 * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
2799 2003-04-14 Steven Bosscher <steven@gcc.gnu.org>
2801 * g95.texi: Require GMP 4.0 -- like we actually
2802 do. Explain the testsuite and what-goes-where.
2803 Don't use undefined texinfo symbol. Break very
2804 long line. Remove finished item from the list
2807 2003-04-11 Canqun Yang <canqun@yahoo.com.cn>
2809 * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
2812 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
2814 * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
2815 (g95_trans_forall_body): New function.
2817 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
2819 * resolve.c (resove_where): New function.
2820 (resolve_where_shape): New function.
2821 (resolve_code): Add call to 'resolve_where'
2822 * trans-stmt.c (g95_trans_where): Modified.
2823 (g95_trans_where_2): New function.
2824 (g95_trans_where_assign): New function.
2825 (g95_evaluate_where_mask): New function.
2826 (g95_add_to_stmt_list): New function.
2827 (g95_get_temp_expr): New function.
2828 * trans.h (where_stmt_list): New structure.
2830 2003-04-10 Paul Brook <paul@nowt.org>
2832 * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
2833 (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
2835 2003-04-10 Steven Bosscher <steven@gcc.gnu.org>
2837 Update after mainline -> tree-ssa-branch merge.
2838 * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
2840 (g95_init): Update for new lang_hooks definition.
2841 (g95_post_options): New langhook.
2842 (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
2843 * scanner.c (g95_new_file): Comment update.
2845 2003-04-09 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2847 * g95.h, lang-options.h: Add -Wimplicit-interface.
2848 * options.c (g95_init_options, g95_parse_arg): Set it.
2849 * interface.c (check_intents): Warn about call with implicit
2851 * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
2854 2003-04-05 Paul Brook <paul@nowt.org>
2856 * iresolve.c (g95_resolve_spread): Don't resole based on type.
2857 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
2859 2003-03-29 Paul Brook <paul@nowt.org>
2861 * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
2862 (g95_resolve_unpack): Ditto.
2863 * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
2864 (g95_conv_intrinsic_function): Use it. Remove PACK and UNPACK.
2865 (g95_is_intrinsic_libcall): Add PACK and UNPACK.
2867 2003-03-25 Paul Brook <paul@nowt.org>
2869 * arith.c (g95_unary_user, g95_user): Remove dead functions.
2871 * array.c (g95_free_array_ref): Ditto.
2873 * symbol.c (g95_use_derived_tree): Ditto.
2874 * intrinsic.c (add_functions): Use simplification for SCALE.
2875 * primary.c (g95_match_rvalue): Test sym, not symtree.
2877 2003-03-25 Paul Brook <paul@nowt.org>
2879 * trans-decl.c (build_function_decl): Add parameter before it gets
2880 turned into a constant.
2881 * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
2882 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
2883 * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
2885 2003-03-22 Paul Brook <paul@nowt.org>
2887 * trans-array.c (g95_conv_array_initializer): Allow scalar
2889 * trans-decl.c (g95_finish_var_decl): Result variables are not
2891 * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
2892 (g95_conv_intrinsic_function): Use it.
2893 * trans-types.h (g95_type_spec): Remove dead declaration.
2895 2003-03-21 Paul Brook <paul@nowt.org>
2897 * trans-decl.c (g95_build_function_decl): Mark string parameters.
2899 2003-03-20 Paul Brook <paul@nowt.org>
2901 * trans-decl.c (g95_build_function_decl): Put character length
2902 parameters at the end of the function declaration.
2903 * trans-expr.c (g95_conv_function_call): Ditto.
2904 * trans-types.c (g95_get_function_type): Ditto.
2906 2003-03-20 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2908 * resolve.c (resolve_formal_arglist): Don't impose intent for
2909 procedure arguments of pure functions.
2910 (resolve_select): Remove redundant assignment.
2912 2003-03-19 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2914 * arith.c (validate_logical), g95.h, options.c (g95_init_options):
2916 * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
2917 * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
2919 * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
2921 * symbol.c (g95_add_type): Fix typo in comment.
2924 2003-03-16 Paul Brook <paul@nowt.org>
2926 * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
2927 * expr.c (g95_build_call): Remove.
2928 * f95-lang.c (puchdecl_top_level): New function.
2929 * g95.h (g95_code): Store resolved symbol, not just the name.
2930 * intrinsic.c (g95_intrinsic_namespace): New global namespace.
2931 (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
2932 (g95_get_intrinsic_sub_symbol): New function.
2933 * iresolve.c (g95_resolve_cpu_time): Use it.
2934 (g95_resolve_random_number): Ditto.
2935 * resolve.c: Set code->resolved_sym instead of code->sub_name.
2936 * trans-decl.c (g95_get_extern_function_decl): Give external decls
2937 the correct DECL_CONTEXT. Add global symbold to the global scope.
2938 * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
2941 2003-03-16 Paul Brook <paul@nowt.org>
2943 * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
2944 * options.c (g95_parse_arg): Ditto.
2945 * module.c (mio_symbol_attribute): Handle the always_explicit bit.
2946 * resolve.c (resolve_formal_arglist): The always_explicit sould be set
2947 for the procedure, not the parameter.
2948 * trans-array.c (g95_trans_g77_array): New function.
2949 (g95_trans_assumed_size): Use it.
2950 (g95_trans_dummy_array_bias): Ditto.
2951 (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
2952 (g95_conv_expr_descriptor): ... to here. Update callers.
2953 * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
2954 (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
2955 * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
2956 * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
2957 * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
2958 (g95_sym_type): Ditto.
2960 2003-03-15 Paul Brook <paul@nowt.org>
2962 * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
2964 * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
2966 2003-03-14 Paul Brook <paul@nowt.org>
2968 * trans-array.c (g95_array_is_packed): Remove.
2969 (g95_conv_array_base): Correctly handle all descriptorless cases.
2970 (g95_conv_array_stride): Use descriptorless strides.
2971 (g95_trans_dummy_array_bias): Don't always repack the array.
2972 (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
2974 * trans-types.c (g95_get_nodesc_array_type): Differentiate between
2975 dummy and non-dummy arrays...
2976 (g95_sym_type, g95_get_derived_type): ... like these.
2977 (g95_get_array_type_bounds): Allow discontiguous arrays.
2979 2003-03-12 Paul Brook <paul@nowt.org>
2981 * array.c (g95_resolve_array_spec): Fix comment.
2982 * g95.h (symbol_attributes): New flag always_explicit.
2983 * resolve.c (resolve_formal_arglist): Set it always_explicit.
2984 * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
2985 * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
2986 (g95_trans_array_bounds): Allow assumed shape arrays.
2987 (g95_trans_repack_array): Remove.
2988 (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
2989 * trans-decl.c (g95_build_qualified_array): Only ignore absent
2990 bounds for assumed size arrays.
2991 (g95_build_dummy_array_decl): Use descriptorless arrays.
2992 * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
2993 (g95_trans_pointer_assign): Fix typo.
2994 * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
2996 (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
2997 * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
2998 Also modify callers.
2999 * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
3001 2003-03-08 Paul Brook <paul@nowt.org>
3003 * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
3004 (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
3005 * resolve.c (compare_spec_to_ref): Allow full array sections.
3007 2003-03-08 Paul Brook <paul@nowt.org>
3009 * expr.c (g95_simplify_expr): Also simplify array index and
3010 substring expressions.
3011 * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
3012 * trans-array.c (g95_trans_array_bounds): New function.
3013 (g95_trans_auto_array_allocation): Use it.
3014 (g95_trans_assumed_size): Rewrite.
3015 * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
3016 (gfor_fndecl_repack): Remove.
3017 (g95_build_qualified_array): Handle absent upper bounds.
3018 (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
3019 (g95_get_symbol_decl): Update.
3020 (g95_build_intrinsic_function_decls): Initialize new decls.
3021 * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
3022 (gfor_fndecl_repack): Remove.
3023 * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
3024 * trans-types.c: (g95_build_array_type): Merge duplicated code..
3025 (g95_get_nodesc_array_type): Handle absent bounds.
3026 * trans-types.h (g95_get_nodesc_array_type): Declare.
3028 2003-03-04 Paul Brook <paul@nowt.org>
3030 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
3033 2003-03-02 Paul Brook <paul@nowt.org>
3035 * options.c (g95_init_options): Drfault to 1.
3036 (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
3037 * trans-array.c (g95_conv_array_data, g95_conv_array_base,
3038 g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
3039 Handle non-constant size automatic arrays.
3040 (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
3041 generic bound functions.
3042 (g95_trans_auto_array_allocation): Don't create a descriptor.
3043 (g95_trans_assumed_size): New function (broken).
3044 (g95_trans_dummy_array_bias): Remove unused var.
3045 * trans-array.h (g95_trans_assumed_size): Declare.
3046 * trans-decl.c (create_index_var): New fuction.
3047 (g95_build_qualified_array): New function.
3048 (g95_get_symbol_decl): Use it.
3049 (g95_trans_deferred_vars): Handle assumed shape seperately.
3050 * trans-types.c (get_element_type): Handle heap allocated arrays.
3051 (g95_is_nodesc_array): Include non-const size arrays.
3052 (g95_get_nodesc_array_type): Ditto.
3054 2003-02-23 Paul Brook <paul@nowt.org>
3056 * trans-array.c (g95_array_init_size): Should use stride, not size of
3059 2003-02-18 Paul Brook <paul@nowt.org>
3061 * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
3062 after intrinsic function check.
3064 2003-02-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3066 * io.c (match_io): Fix missing return value and remove useless
3068 * match.c (g95_match): Remove useless assignment.
3069 * module.c (parse_string): Remove useless post increment.
3070 * simplify.c (g95_simplify_verify): Remove useless assignment.
3072 2003-02-15 Paul Brook <paul@nowt.org>
3074 * expr.c (restricted_intrinsic): Handle bad values gracefully.
3075 * g95.h (symbol_attribute): Add referenced member.
3076 (g95_symbol): Add dummy_order member.
3077 (g95_set_sym_referenced): Declare.
3078 * match.c (g95_match_assignment, g95_match_call): Use it
3079 * primary.c (match_actual_arg, g95_match_rvalue,
3080 g95_match_variable): Ditto.
3081 * symbol.c (next_dummy_order): New variable.
3082 (g95_set_sym_referenced): New function.
3083 (check_done): New function.
3084 (g95_add_*): Use it.
3085 * trans-decl.c: Make formatting conform to GCC standards.
3086 (g95_defer_symbol_init): Add dummy variables in the right order.
3087 (g95_get_symbol_decl): Only accept referenced variables.
3088 (g95_create_module_variable): Module variables are always required.
3089 (generatr_local_decls): New function.
3090 (generate_local_vars): New function.
3091 (g95_generate_function_code): Use it.
3093 2003-02-13 Paul Brook <paul@nowt.org>
3095 * trans-decl.c (g95_conv_struct_cons): Remove.
3096 (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
3097 * trans-expr.c (g95_conv_structure): New function.
3098 (g95_conv_expr): Use it.
3100 2003-02-09 Paul Brook <paul@nowt.org>
3102 * trans-array.c (g95_array_init_size): Don't evaluate the linit
3103 expressions multiple times.
3104 (g95_trans_auto_arry_allocation): Use pointer not tmp.
3106 2003-02-08 Paul Brook <paul@nowt.org>
3108 * module.c (mio_symtree_ref): Declare as static.
3109 (mio_expr): Remove dead code.
3110 (read_module): Set the symtree link for fixups.
3111 * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
3112 (build_round_expr): ... to this.
3113 (g95_conv_intrinsic_aint): New function.
3114 (g95_conv_intrinsic_function): Use it.
3116 2003-02-08 Paul Brook <paul@nowt.org>
3118 * trans-array.c (g95_trans_array_constructor_value): Use the acutal
3119 offset after modificaton, not the increment expression.
3120 * dependency.c: Kill excess whitespace.
3122 2003-02-07 Sanjiv Gupta <sanjivg@noida.hcltech.com>
3124 * dependency.h: Remove some function declarations.
3125 * dependency.c (get_no_of_elements): Change this function not to
3127 * other: Add comments for all modified functions.
3129 2003-02-06 Paul Brook <paul@nowt.org>
3131 * g95spec.c (lang_specific_functions): Fix initializer warning.
3132 * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
3133 for structure type names.
3134 * trans-decl.c (g95_cons_structure_cons): New function.
3135 (g95_get_symbol_decl): Use it.
3136 * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
3139 2003-02-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3141 * resolve.c (compare_cases): Add const to casts.
3143 2003-01-30 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3145 * g95.h (g95_check_f): Change a1 to f1m.
3146 * intrinsic.c (add_sym_1m, check_specific,
3147 g95_intrinsic_func_interface): Use it.
3149 * module.c (init_pi_tree): Remove useless cast.
3150 (fp2): Fix argument type.
3152 * parse.c (parse_select_block): Add comment.
3154 2003-02-05 Toon Moene <toon@moene.indiv.nluug.nl>
3156 * lang-options.h: Fix warning involving C90 concatenated
3159 2003-02-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
3160 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3162 * io.c (format_asterisk): Complete initializer to kill warning.
3163 * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
3164 DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
3165 (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
3166 new defines to complete initializers. Kills all warnings.
3168 * Make-lang.in: Comment cleanup.
3170 2003-02-05 Paul Brook <paul@nowt.org>
3172 * array.c (g95_free_constructor): Handle NULL expressions.
3173 * resolve.c (resolve_structure_cons): Ditto.
3174 * decl.c (g95_match_null): New Function.
3175 (variable_decl): Use it.
3176 * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
3177 * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
3178 * trans-types.c (g95_set_decl_attributes): Remove empty function.
3180 2003-02-05 Paul Brook <paul@nowt.org>
3182 * trans.h (build1_v): New macro.
3183 (build_v): Remove pointless and incorrect prototype.
3184 * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
3185 * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
3187 2003-02-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
3189 * Make-lang.in (F95_OBJS): Remove one more dead file.
3191 2003-02-01 Paul Brook <paul@nowt.org>
3193 * lang-specs.h: Don't pass -ffixed-form to the linker.
3194 * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
3196 2003-02-01 Paul Brook <paul@nowt.org>
3198 * Make-lang.in (F95_OBJS): Remove dead files.
3199 * trans-array.c (g95_array_init_size): Do the right thing when
3201 * trans-decl.c (g95_generate_function_code): Initialize deffered
3202 symbol list before translating contained subroutines.
3203 * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
3204 scalar invariant values here...
3205 (g95_conv_variable, g95_conv_function_call): ... instead of here ...
3206 * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
3208 2003-01-29 Paul Brook <paul@nowt.org>
3210 * trans-array.c (g95_add_loop_code): Put pre code in the right block.
3211 (g95_walk_elemental_function_args): Reverse chains before adding.
3212 (g95_reverse_ss): Move about a bit.
3213 * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
3216 2003-01-28 Paul Brook <paul@nowt.org>
3218 * intrinsic.c (resolve_intrinsic): Use correct union member.
3219 * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
3221 * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
3222 use associated variables.
3223 * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
3224 * trans-expr.c (g95_conv_expr_present): ... to here.
3225 * trans.h: Declare it.
3226 * trans-types.c (g95_sym_type): Assume subroutine if not specified.
3228 2003-01-28 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3230 * array.c (expand_iterator): Suppress useless assignment.
3231 * decl.c (match_char_spec): Ditto.
3232 * io.c (match_io_iterator): Ditto.
3233 * primary.c (match_real_constant): Ditto.
3234 * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
3235 Ditto. Also, use g95_intrinsic_op not int for intrinsic operators.
3236 * matchexp.c (match_add_operand, match_level_5): Likewise.
3237 * module.c (parse_atom, find_enum): Likewise.
3238 * resolve.c: move #include <string.h>
3239 (resolve_select): Fix serious typo.
3241 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.n>
3243 * Make-lang.in: Don't build with broken tree-ssa-pre.
3245 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.nl>
3247 * resolve.c (resolve_index): Add a TODO.
3248 * symbol.c: Remove useless "#include <ctype.h>".
3250 2003-01-27 Paul Brook <paul@nowt.org>
3252 * check.c (check_rest): Allow different type kinds as an extension.
3253 * g95.h (g95_resolve_f): Add f1m.
3254 * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
3255 * intrinsic.h: Chenge prototypes for MIN and MAX.
3256 * iresolve.c (g95_resolve_minmax): New function.
3257 (g95_resolve_min, g95_resolve_max): Use it.
3258 * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
3260 (g95_conv_intrinsic_present): Fix logic.
3262 2003-01-27 Steven Bossche <s.bosscher@student.tudelft.nl>
3264 * g95.h (g95_case): Don't be a tree, be a double linked list.
3265 * match.c (match_case_selector): Remove redundant semantics check.
3266 Clean up a few goto's to make it a tiny little bit faster.
3267 * resolve.c (case_tree): Die.
3268 (compare_cases): Accept and compare unbounded cases too.
3269 (check_case_overlap): Don't build a tree. Instead, merge-sort the
3270 whole list of g95_cases passed from resolve_select.
3271 (sane_logical_select): Die.
3272 (check_case_expr): Return FAILURE if a CASE label is of the wrong
3274 (resolve_select): Fixup case expression for computed GOTOs, put it
3275 in expr, not expr2, for easier handing in the parse tree dumper and
3276 the code generator. Rewrite the rest of the function: Kill
3277 unreachable case labels and unreachable case blocks.
3278 * dump-parse-tree.c (g95_show_code_node): Always dump expr for
3279 an EXEC_SELECT, not case2 anymore.
3280 * trans-const.c (g95_conv_constant_to_tree): New function.
3281 (g95_conv_constant): Use it.
3282 * trans-const.h: Declare prototype for the new function.
3283 * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
3284 g95_trans_character_select): New static functions.
3285 (g95_trans_select): Rewrite.
3287 2003-01-26 Paul Brook <paul@nowt.org>
3289 * intrinsic.c (add_fnctions): Properly add dreal.
3290 * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
3291 (g95_conv_intrinsic_function): Use it.
3292 * trans-io.c (build_dt): Abort on internal files (unimplemented).
3294 2003-01-26 Paul Brook <paul@nowt.org>
3296 Widespread changes to the handling of symbols in expressions. These
3297 are now linked via g95_symtree nodes.
3298 * parse.c (g95_fixup_sibling symbols): New function.
3299 (parse_contained): Use it.
3300 * g95.h (symbol_attribute): Add contained. Indicates a symbol is a
3301 contained procedure that has bee correctly fixed up.
3302 (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
3304 2003-01-24 Paul Brook <paul@nowt.org>
3306 * trans-array.c (g95_walk_expr): Function result attributes are in
3308 * trans-expr.c (g95_conv_function_call,
3309 g95_trans_arrayfunc_assign): Ditto.
3310 * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
3312 2003-01-23 Steven Bosscher <s.bosscher@student.tudelft.nl>
3314 * expr.c (check_restricted): Fix error message.
3315 * symbol.c (free_st_labels): Plug memleak.
3317 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
3319 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
3320 reduce_binary_aa, reduce_binary, eval_intrinsic,
3321 eval_intrinsic_f2): Use typesafe prototypes for eval functions.
3322 * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
3323 for typesafe intrinsics helper functions.
3324 (g95_intrinsic_sym): Use them.
3325 * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
3326 add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
3327 add_sym_5, add_conv, resolve_intrinsic, do_simplify,
3328 check_specific, g95_intrinsic_func_interface,
3329 g95_intrinsic_sub_interface): Adjust all calls to intrinsics
3331 * trans-decl.c (g95_get_extern_function_decl): Likewise.
3332 * Make-lang.in: Don't disable warnings for strict prototypes
3333 any longer, everything is typesafe now.
3335 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
3337 * bbt.c (duplicate_node): Make static.
3338 * module.c (module_name): Make static.
3339 * scanner.c (include_dirs): Make static.
3341 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
3343 Hard coded _gfor_'s should not show up anymore.
3344 * g95.h (PREFIX): New macro.
3345 * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
3347 (g95_resolve_random_number): Likewise.
3348 * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
3349 * trans-io.c: Remove 'prefix' macro. Replace all uses with
3350 the new PREFIX macro from g95.h.
3352 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
3354 The troubles of forking... Andy implemented this just now too.
3355 Let's stick to that and keep the trees close.
3356 * g95.h (g95_st_label): 'format' member is now a g95_expr.
3357 * io.c: Revert previous changes.
3358 (g95_match_format): Match the format string as a character
3360 * match.h (g95_statement_label): Declare external.
3361 * parse.c: Revert previous changes.
3362 * symbol.c (g95_free_st_label): Free a g95_expr instead
3364 * trans-io.c: Revert previous changes.
3365 (build_dt): Use set_string to set the format string.
3367 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
3369 * io.c (format_string): Make non-static.
3370 (g95_match_format): Remember the format string.
3371 (terminate_io): Add I/O termination for empty I/O lists.
3372 * match.h: Declare external format_string.
3373 * parse.c (check_statement_label): Attack the format string
3374 to a format label for FORMAT statements.
3375 * trans-io.c (g95_add_field): Define prefix macro. Replace
3376 all uses of PREFIX define with a use of this macro.
3377 (build_dt): Implement formatted I/O for format labels.
3379 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
3381 * lang-options.h: Kill "-std=F".
3382 * options.c: Remove unimplemented "-std=F". Modify
3384 * misc.c (g95_terminal_width): New function.
3385 * error.c (g95_error_init_1): Use g95_terminal_width.
3386 * g95.h: Add prototype for g95_terminal_width, remove
3389 2003-01-19 Steven Bosscher <s.bosscher@student.tudelft.nl>
3391 * Make-lang.in: Fix typo.
3393 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
3395 * g95.h (struct g95_case): Remove unused cruft, new member
3396 'where' to keep track of the locus of the default case.
3397 * match.c (g95_match_case): Add locus to the current case.
3398 (match_case_selector): Likewise.
3399 * parse.c (parse_select_block): Move semantics check for
3400 multiple DEFAULT cases out of here to...
3401 * resolve.c (check_case_overlap): ...here. Return sooner
3403 (check_case_expr): Take two g95_cases now, use to sure the
3404 expression kinds are the same.
3405 (resolve_select): Cleanup.
3407 2003-01-18 Paul Brook <paul@nowt.org>
3409 * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
3410 * trans-decl.c (g95_set_symbol_decl): Handle non-array result
3412 (g95_get_extern_function_decl): Put decls in the correct context.
3414 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
3416 * trans-io.c: Port changes from Andy to set ERR flag.
3418 2003-01-17 Paul Brook <paul@nowt.org>
3420 * trans-array.c: Add various comments.
3421 (g95_ss_terminator): Declare as const.
3422 (g95_walk_expr): Remove first parameter and update all callers.
3423 (g95_walk_op_expr): Initialize scalar SS properly.
3424 * trans-array.h (g95_walk_expr): Update prototype.
3425 * trans-expr.c: Update for new g95_walk_expr.
3426 * trans-intrinsic.c: Ditto.
3427 * trans-io.c: Ditto.
3428 * trans.h: Various comments for SS chains.
3430 2003-01-17 Paul Brook <paul@nowt.org>
3432 * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
3434 * intrinsic.c (add_functions): Use them.
3435 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
3436 * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
3438 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
3440 Fallout of a small merge conflict:
3441 * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
3443 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
3445 * initrinsic.c: New add_sym_* functions for strong typing.
3446 (add_conv): Make prototype strict.
3447 * dump-parse-tree.c, dependency.c: Include config.h
3448 * resolve.c, trans-io.c: Fix typos.
3450 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
3452 * dump-parse-tree.c (g95_show_code_node): Show the
3453 condition for a computed GOTO that was transformed
3454 to a SELECT CASE construct.
3455 * resolve.c (check_case_overlap): Revert previous switch
3456 to treaps, it was too slow and didn't catch all trouble.
3457 (resolve_symbol): Be more flexible about module procedures.
3458 * symbol.c (check_conflict): Point to relevant section in
3459 the standard for dubious conflict. Allow procedure
3460 dummy arguments to be optional again.
3461 * trans-io (add_field): Rename to g95_add_field. Change
3463 * trans-stmt (trans_select): Handle unbounded cases for
3464 integer SELECT CASE constructs. Fix/add more comment.
3466 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
3468 * g95.h: Uses GCC's function attribute macros.
3469 * error.c, module.c, parse.c, g95.h: More function attributes.
3471 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
3473 * trans-decl.c (get_label_decl): Use TREE_LINENO instead
3474 of DECL_SOURCE_LINE, and TREE_FILENAME instead of
3477 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
3479 * f95-lang.c (pushdecl): Use TREE_LINENO instead of
3481 * trans.c (g95_trans_code): Use annotate_all_with_file_line
3482 instead of nowdead wrap_all_with_wfl.
3484 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
3486 * parse.c (g95_parse_file): In verbose mode, dump the parse tree
3487 before generating code, so we can still see it even if the code
3488 generation phase dies.
3490 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
3492 * decl.c (build_sym): Split out initialization expression parts...
3493 (add_init_expr_to_sym): ...to here.
3494 (variable_decl): Add the symbol following an attribute list to the
3495 symbol tree before parsing the optional initialization expression
3496 if the symbol is not of a derived type.
3497 * primary.c (g95_match_rvalue): Don't assume a symbol always has
3498 a value if it is a PARAMETER.
3500 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
3502 * misc.c: Don't #include <mcheck.h>
3503 * module.c: Ditto. Kill uses of mtrace, muntrace. If there
3504 ever was a glibc bug, then either this was never reported to
3505 glibc people, or it has been fixed for so long that there's
3506 no information you can find about it, anywhere.
3508 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
3511 * module.c (attr_bits, bt_types, array_spec_types):
3512 Switch 'const' and 'static'.
3513 * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
3515 GNU'ify source code:
3516 * trans-io.c: Numerous fixes, one fixed warning and a few
3517 TODO markers so that we don't forget about them.
3519 2003-01-13 Paul Brook <paul@nowt.org>
3521 * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
3522 * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
3524 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
3525 * match.c (g95_match_stop): Fix dumb == -> != error.
3527 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
3529 * dump-parse-tree.c (show_indent): Add line breaks. This
3530 whole dumping process needs cleanups.
3531 * f95-lang.c (g95_mark_addressable): Fix prototype to match
3532 the langhook. Fix 'return's accordingly.
3533 * g95-support.h: Adjust prototype.
3534 * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
3535 * lang-options.h: Add '-fsyntax-only'.
3536 * options.c (g95_init_options): Init 'no_backend'.
3537 (g95_parse_arg): Deal with '-fsyntax-only'.
3538 * parse.c (g95_parse_file): Do not generate code if 'no_backend'
3541 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
3543 * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
3544 arguments. Also make sure that if a symbol is marked INTRINSIC,
3545 an intrinsic with the symbol's name actually exists.
3546 (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
3547 Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
3548 ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
3550 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
3552 * resolve.c (resolve_contained_functions): Fix condition, don't
3553 throw internal_error if a child namespace has no name. Apparently
3554 this can be the case?
3556 2003-01-11 Paul Brook <paul@nowt.org>
3558 Port changes from Andy's tree:
3559 * g95.h (g95_code): Add stop_code.
3560 * match.c (g95_match_stop): Detter syntax checking.
3561 * resolve.c (resolve_generic_f0): Return match type.
3562 (resolve_generic_f): Remove dead/duplicated code.
3563 (resolve_specific_f): Ditto.
3564 * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
3565 * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
3566 * trans-stmt.c (g95_trans_stop): Handle new STOP format.
3568 2003-01-11 Paul Brook <paul@nowt.org>
3570 * trans-array.c: Various documentation/comment changes.
3571 * trans-stmt.c: Ditto.
3574 2003-01-10 Paul Brook <paul@nowt.org>
3576 * options.c/h: Add -fdump-parse-tree as alias of -v.
3578 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3580 * dump-parse-tree.c (g95_show_namespace): Fixed another
3581 typo. Sorry, it's Friday...
3583 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3586 * trans-array.c, trans-array.h, trans.c, trans-const.c,
3587 trans-const.h, trans-decl.c, trans-expr.c, trans.h
3588 trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
3589 trans-types.c: Fix bogus copyright years, add 2003.
3590 * trans-types.h: Give copyright header.
3592 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3594 * dump-parse-tree.c (g95_show_namespace): Fixed typo.
3595 * expr.c, options.c, scanner.c: Add some more 'const' markers.
3596 * intrinsic.c: Some constant strings moved to read-only memory.
3597 * io.c (format_asterisk): Move to...
3600 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3602 * dump-parse-tree.c (g95_show_namespace): Dump implicit
3603 types for ranges instead of per-letter. Indent the
3604 'CONTAINS' just like everything else.
3605 * resolve.c (resolve_contained_functions): Clarify comment.
3606 Explain non-obvious conditional expression. Improve
3607 diagnostics if tyoe cannot be resolved.
3608 Port semi-fix from Andy's tree:
3609 (was_declared): Move up before first use.
3610 (generic_sym, specific_sym): New functions. Code moved
3611 out if procedure_kind.
3612 (procedure_kind): Simplify using new functions.
3613 (resolve_generic_f): Make sure the functions we find in
3614 a parent namespace is generic.
3615 (resolve_specific_f): Ditto for specific functions.
3617 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3619 * trans-stmt.c, trans.c: Fix some code style issues. Add
3620 some more comment (but still not enough!).
3622 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3624 * symbol.c (flavors, procedures, intents, acces_types,
3625 access_types, ifsrc_types): Make const.
3626 * misc.c (g95_string2code): Make 'm' param 'const'.
3627 * module.c (find_enum, write_atom, mio_name): Make
3629 (attr_bits, bt_types, array_spec_types, array_ref_types,
3630 ref_types, expr_types): Make const.
3631 * g95.h: Adjust external decls.
3633 2003-01-09 Paul Brook <paul@nowt.org>
3635 * Testsuite: Add a load of new cases.
3637 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
3639 * Make-file.in: Add dependency on back end header files;
3640 a parallel build should work now.
3641 * f95-lang-c (lang_identifier): Remove bogus comment.
3642 (g95_be_parse_file): Fix prototype.
3643 (g95_init): Make static.
3644 (g95_finish): Make static.
3645 * error.c (g95_syntax_error): Kill. Make define in...
3646 * g95.h (g95_syntax_error): Define.
3647 (g95.options): Make 'source' member 'const'.
3648 * interface.c (g95_match_interface): Explain
3649 hard-to-read condition.
3650 (g95_match_end_interface): Ditto.
3651 * trans_const.c (g95_build_string_const): Make 's' parameter
3653 * trans_const.h: Adjust protoype accordingly.
3654 * trans-decl.c: Include tree-dump.h
3655 (g95_generate_function_code): Build fixes for recent changes
3656 in the tree-ssa branch.
3658 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
3660 * format.c: Kill, move code from here...
3662 * Make-lang.in: Adjust.
3665 * BUGS: Mention where to submit bugs. Move old content...
3666 * TODO: ...to here. New file.
3668 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
3669 Fix most warnings, and suppress the ones we can't fix for now.
3670 * Make-lang.in: Suppress warnings about bad proto's in g95.h,
3671 these warnings just clutter the screen and there's not much
3672 we can do about them for now anyway.
3673 * check.c, iresolve.c: Mark unused function parameters.
3674 * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
3675 they should be resolved before they get here.
3676 * error.c: Remove unused FILE *status_out.
3677 * f95-lang.c (g95_init): Remove bogus cast.
3678 * Many files: Make things 'const' where required.
3679 * g95.h: Fix prototypes for all modified functions above.
3680 (g95_options): Remove 'object' member.
3682 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
3684 * Make-file.in: Cleanup bogus targets. Add more comment.
3685 * lang-options.h: New option '-w'.
3686 * g95.h: add no_options field to struct g95_options.
3687 * options.c (g95_init_options): Default no_warnings to off.
3688 (g95_parse_arg): Recognise the '-w' switch and its alias,
3690 * error.c (g95_warning, g95_warning_now): Don't emit warning if
3691 no_warning option is set.
3692 * iresolve.c (g95_resolve_shape): Fix warning.
3694 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
3696 * primary.c (g95_next_string_char): Rename next_string_char, and
3697 make static. Adjust callers accordingly.
3698 * resolve.c (resolve_generic_f0): Return try, not match. Adjust
3699 callers accordingly.
3700 * g95.h: Split out all g95_match* functions to...
3701 * match.h: ...here. New file.
3702 * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
3703 matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
3705 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
3707 * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
3708 g95_merge_new_implicit): New functions.
3709 (g95_match_implicit_none, g95_match_implicit): Move from here...
3710 * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
3711 Modify to use the new functions in symbol.c.
3712 * g95.h: Add and move prototypes.
3714 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
3716 * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
3717 node compare function.
3718 (g95_insert_bbt): Likewise.
3719 (g95_insert_bbt_with_overlap): Likewise.
3720 (g95_delete_bbt): Likewise.
3721 (delete_treap): Likewise. Also fix a potential bug when calling it.
3722 * module.c (compare_pointers): Change proto to compare_fn.
3723 (compare_integers): Likewise.
3724 (compare_true_names): Likewise.
3725 (find_true_name): Adjust call to compare_true_names to match proto.
3726 (require_atom, write_atom, mio_name): Fix 'const' warnings.
3727 (init_pi_tree): Make compare a compare_fn instead of (int *).
3728 * resolve.c (compare_cases): Change proto to compare_fn.
3729 * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
3730 it static, and rename to compare_symtree.
3731 (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
3733 * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
3734 of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
3736 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
3737 * Make-lang.in: Fix spaces/tabs issues from previous patch.
3738 * patch.options: Blow away Paul's checkin mistake :-)
3739 * io.c (terminate_io): Fix memory leak (Arnaud).
3741 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
3743 * Make-lang.in: Teach about building DVI, info manual.
3744 * g95.texi: New file.
3746 2003-01-02 Paul Brook <paul@nowt.org>
3748 * trans-array.c (g95_reverse_ss): Make static and don't use.
3749 (g95_conv_ss_descriptor): Don't use g95_loopinfo
3750 (g95_conv_array_parameters): Modify for pointer assignments.
3751 (g95_walk_subexpr): New function.
3752 (g95_walk_expr*): Use it.
3753 * trans-array.h (g95_reverse_ss): Remove prototype.
3754 * trans-expr.c (g95_trans_pointer_assign): Implement.
3755 (Many): Set se.want_pointer before calling g95_conv_array_parameter.
3756 * trans-intrinsic.c: Sync with scalarizer changes.
3757 * trans-io.c: Ditto.
3759 2002-12-29 Paul Brook <paul@nowt.org>
3761 * trans-array.c: Document calling convention for arrays.
3763 2002-12-19 Paul Brook <paul@nowt.org>
3765 * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
3766 assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
3767 optional parameters for some intrinsics.
3768 (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
3769 * trans-expr.c (g95_conv_function_call): Pass NULL for absent
3770 optional parameters.
3771 * trans.h (g95_se): Add ignore_optional flag.
3773 2002-12-15 Paul Brook <paul@nowt.org>
3775 * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
3776 * trans-decl.c (g95_generate_function_code): Use TDI_original.
3778 2002-12-14 Paul Brook <paul@nowt.org>
3780 * trans-stmt.c (g95_trans_call): Use resolved symbol name.
3782 2002-12-12 Paul Brook <paul@nowt.org>
3784 * trans-array.c (g95_trans_array_constructor_subarray): Fully
3785 initialize the scalarizer.
3786 (various): Update to new format of g95_expr->value.constructor.
3788 2002-12-08 Paul Brook <paul@nowt.org>
3790 * trans-array.c (g95_put_offset_into_var): New function.
3791 (g95_trans_array_constructor_subarray): New function.
3792 (g95_trans_array_constructor_value): Use it.
3793 (g95_array_cons_size): Don't abort() on array components.
3795 2002-12-08 Paul Brook <paul@nowt.org>
3797 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
3798 * support.c: Update #includes.
3799 (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
3800 * trans-array.c: Update #includes.
3802 * trans-const.c: Ditto.
3803 * trans-io.c: Ditto.
3804 * trans-types.c: Ditto.
3805 (g95_init_types): Set size_type_node.
3806 * trans-decl.c: Update #includes.
3807 (gfor_fndecl_adjust{l,r}): Declare and initialize.
3808 * trans-stmt.c: Update #includes.
3809 (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
3810 (g95_trans_select): Fix check for unbounded ranges.
3811 * trans-expr.c: Update #includes.
3812 (g95_conv_string_tmp): New function.
3813 (g95_conv_concat_op): Use it.
3814 * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
3815 * Trans-intrisic.c: Update #includes.
3816 (g95_conv_intrinsic_strcmp): New function.
3817 (g95_conv_intrinsic_adjust): Ditto.
3818 (g95_conv_intrinsic_function: Use them.
3820 2002-11-30 Paul Brook <paul@nowt.org>
3822 * trans-array.c (g95_walk_function_expr): Handle non-array return by
3824 * trans-dec.c (g95_build_function_decl): Handle character return
3826 (g95_get_fake_result_decl): Ditto.
3827 (g95_trans_deferred_vars): Ditto.
3828 * trans-expr.c (g95_conv_function_call): Ditto.
3829 (g95_trans_arrayfunc_assign) Limit to array valued functions.
3830 * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
3831 (g95_conv_intrinsic_function): Use it.
3832 * trans-types.c (g95_sym_type): Handle functions returning strings.
3833 (g95_return_by_reference): Ditto.
3834 (g95_get_function_type): Ditto.
3836 2002-11-18 Paul Brook <paul@nowt.org>
3838 * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
3839 requires a temporary.
3840 (g95_trans_select): Handle computed gotos.
3841 * trans-types.c (g95_build_array_type): Warn about non-functional
3842 assumed shape arrays.
3843 * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
3845 * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
3846 (g95_conv_intrinsic_int): New function.
3847 (g95_conv_intrinsic_mod): New function.
3848 (g95_conv_intrinsic_ichar): New function.
3849 (g95_conv_intrinsic_function): Use them.
3850 (g95_conv_intrinsic_dim): Use g95_evaluate_now.
3852 2002-11-17 Toon Moene <toon@moene.indiv.nluug.nl>
3854 * trans-types.c (g95_build_array_type): Assumed
3855 sized arrays can have rank > 1.
3856 * trans.c (g95_trans_code): Remove erroneous
3857 warning about CONTINUE.
3858 * trans-expr.c (g95_conv_variable): Remove
3861 2002-11-15 Paul Brook <paul@nowt.org>
3863 * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
3865 2002-10-31 Paul Brook <paul@nowt.org>
3867 * f95-tree.c: Remove tree copying stuff that's now in gimple.c
3868 * trans-expr.c (g95_conv_component_ref): Handle character string
3870 (g95_conv_string_parameter): Ditto.
3871 * trans-types.c (g95_get_derived_type): Add length decl to caracter
3874 2002-10-10 Paul Brook <paul@nowt.org>
3876 * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
3877 * trans-expr.c (g95_conv_function_call): Remove unreliable return value
3879 * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
3880 (g95_conv_intrinsic_function): Handle size and shape intrinsics.
3881 (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
3882 * trans-types.c (pvoid_type_node): Declare and initialize.
3883 * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
3884 (g95_array_allocate): Fix when base==data.
3885 (g95_conv_array_parameter): Correctly handle reduced rank sections.
3886 * trans-io.c (g95_trans_write): Correctly handle string modifiers.
3888 2002-10-09 Paul Brook <paul@nowt.org>
3890 * (g95_conv_expr_reference): Handle character strings correctly.
3892 2002-10-07 Paul Brook <paul@nowt.org>
3894 (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
3896 * trans-array.c (g95_build_array_initializer): Remove.
3897 (g95_conv_array_initializer): New Function.
3898 (g95_trans_auto_arry_allocation): Cleanup.
3899 (g95_trans_init_character_array): Remove.
3900 * g95spec.c: Link in libgforbegin.
3901 * trans.c (g95_generate_code): Rename main function to MAIN__.
3902 (g95_create_var): New function.
3903 (g95_create_var_np): New function.
3904 (g95_evaluate_now): New function.
3905 (g95_start_block): New function.
3906 (g95_finish_block): New function.
3907 (g95_add_expr_to_block): New function.
3908 (g95_add_block_to_block): New function.
3909 * trans-expr.c (g95_conv_componen_ref): New function.
3910 * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
3911 (F95_OBJS): Add dependency.o.
3912 * f95-lang.c (g95_is_simple_stmt): Remove.
3913 * f95-tree.c (mark_not_simple): New function.
3914 (unshare_all_trees): New function.
3915 (create_tmp_var, create_tmp_alias_var): Remove.
3916 * support.c (declare_tmp_vars, tree_last_decl): Remove.
3917 * trans*: Convert to new IR using GENERIC trees. Don't bother about
3918 SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
3920 2002-10-01 Paul Brook <paul@nowt.org>
3922 * trans-array.c: Add support for descriptorless arrays.
3923 (g95_conv_array_data): New function.
3924 (g95_conv_array_base): New function.
3925 * trans-array.h: Declare these here.
3926 * trans-decl.c(g95_create_mopdule_variable): Perform variable
3927 initialization and creation here.
3928 (g95_create_module_vars): Instead of here.
3929 * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
3930 * trans-intrinsic.c: Ditto.
3931 * trans-types.c (g95_is_nodesc_array): New function.
3932 (g95_get_nodesc_array_type): New function.
3933 (g95_sym_type, g95_get_derived_type): Use them.
3934 * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
3936 2002-09-28 Paul Brook <paul@nowt.org>
3938 * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
3939 * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
3942 2002-09-24 Paul Brook <paul@nowt.org>
3944 * f95-lang.c (listify): Remove declaration.
3945 (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
3947 * f95-tree.c (get_name): New function.
3948 * trans.c (module_namespace): Remove.
3949 * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
3950 * trans-types.c: Ditto.
3952 2002-09-19 Paul Brook <paul@nowt.org>
3954 * trans-array.c (g95_get_array_cons_size): New Function.
3955 (g95_con_ss_startstride): Handle Array constructors.
3956 (g95_conv_loop_setup): Ditto.
3957 (g95_conv_array_parameter): Ditto.
3958 * tras-decl.c (g95_finish_var_decl): Make initializes variables
3961 2002-09-19 Paul Brook <paul@nowt.org>
3963 * trans.c (g95_simple_fold_tmp): Detect variables inside
3965 * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
3967 2002-09-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
3969 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
3971 2002-09-14 Paul Brook <paul@nowt.org>
3973 * trans.c (g95_create_module_variable): Move to trans-decl.c.
3974 * trans-const.c (g95_conv_string_init): New Function.
3975 * trans-const.h: Declare it.
3976 * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
3977 variables. Don't bail on intrinsic symbols.
3978 (get_extern_function_decl): Handle specific intrinsic functions.
3979 * trans-types.c (g95_sym_type): Dummy functions don't return
3981 * trans-array.c (g95_build_array_initializer): New Function.
3982 (g95_trans_auto_array_allocation): Build initializer for static decls.
3983 Don't use mpz_addmul, it's GMP4 only.
3985 2002-09-12 Paul Brook <paul@nowt.org>
3987 * trans-decl.c (g95_generate_code): Fix thinko with return variable.
3988 (g95_get_extern_function_decl, g95_build_function_decl): Mangle
3989 assembler names for module procedures.
3991 2002-09-11 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
3993 * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
3996 2002-09-10 Paul Brook <paul@nowt.org>
3998 * trans-array.c: Change format of G95_SS_TEMP strictures.
3999 (g95_check_fncall_dependancy): New function.
4000 (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
4002 * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
4004 (g95_build_function_decl): Don't assume result arrays are packed.
4005 (g95_trans-deferred-vars): Handle array result variables.
4006 (g95_generate_fuction_code): Clear saved_function_decls.
4007 * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
4009 (g95_trans_arrayfunc_assign): New function.
4010 (g95_trans_assignment): Use it.
4011 * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
4012 (g95_se): Add direct_byref.
4013 * trans-types.c: Use sym->result rather than sym where appropriate.
4014 * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
4015 Update other functions to use this.
4016 (g95_is_intrinsic_libcall): New function.
4017 (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
4018 (g95_walk_intrinsic_function): Ditto.
4020 2002-09-08 Paul Brook <paul@nowt.org>
4022 * trans-types.c: Change rank field to dtype field in array descriptor.
4023 * trans-array.c: Implement filling of dtype array descriptor field.
4024 * trans-intrinsic.c: Fix broken LEN intrinsic.
4026 2002-09-07 Paul Brook <paul@nowt.org>
4028 * trans-intrinsic.c: Remove outdated todo intrinsic list.
4029 (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
4030 (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
4032 2002-09-06 Paul Brook <paul@nowt.org>
4034 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
4035 (gt-f95-trans-types.h): Add dependancy information.
4036 * config-lang.in (gtfiles): Add trans-types.c
4037 * f95-lang.c (g95_be_parse_file): Pass error and warning counts
4038 back to top-level code.
4039 * trans-array.c, trans-types.c: Change format of array descriptor.
4040 (g95_conv_descriptor_dimension): New function.
4041 * trans-types.h (g95_conv_descriptor_rank): define.
4042 * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
4045 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
4047 * trans-array.c, trans-types.c: Add rank information to descriptor.
4049 2002-09-06 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
4051 * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
4053 2002-09-04 Paul Brook <paul@nowt.org>
4055 * f95-lang.c (g95_create_decls): New function.
4056 (g95_init): Move initialization of external decls to above, and call
4057 from g95_be_parse_file.
4058 * trans.c (g95_finish_stmt): Don't amputate the decl chain.
4059 * trans-types.c (g95_init_types): Always name integer and char types.
4060 (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
4062 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
4064 * Make-lang.in: Add options.c to F95_PARSER_OBJS
4066 2002-09-02 Paul Brook <paul@nowt.org>
4068 * g95_generate_code: Clear the attr for __fortran_main.
4069 * trans-types.c (g95_finish_type): New function.
4070 * g95_init_io_state_type: Use g95_finish_type.
4071 * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
4073 2002-09-01 Paul Brook <paul@nowt.org>
4075 * README.backend: Warn about the dangers of extra config.h files.
4076 Remove obsolete libgfor stuff.
4077 * config-lang.in: Add target-libgfor dependancy.
4078 * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
4080 2002-09-01 Toon Moene <toon@moene.indiv.nluug.nl>
4082 * g95_conv_mpz_to_tree: Free storage pointed to by q,
4085 2002-08-30 Paul Brook <paul@nowt.org>
4087 * trans-intrinsic.c (g95_conv_intrinsic_function,
4088 g95_walk_intrinsic_function): Added ANY and ALL.
4089 (g95_conv_intrinsic_anyall): New function.
4090 * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in