1 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3 * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
4 and RHS match. Return early if the RHS is NULL().
7 * match.c (match_common): Fix error reporting for used common.
10 * trans-expr.c (gfc_conv_structure): Handle initialization
11 of scalar pointer components.
13 * parse.c (decode_statement): Fix matching of BLOCK DATA.
15 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
17 * trans-common.c: Fix whitespace issues, make variable names
19 (create_common): Additionally, make loop logic more obvious.
21 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
22 Paul Brook <paul@codesourcery.com>
25 * trans-common.c (calculate_length): Remove ...
26 (get_segment_info): Merge into here. Save field type.
27 (build_field): Use saved type.
28 (create_common, new_condition, new_segment, finish_equivalences):
29 Use new get_segment_info.
30 * trans-types.c: Update comment.
32 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
35 * moduele.c (mio_symbol): Don't I/O initial values unless
36 symbol is a parameter.
38 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
41 * resolve.c (resolve_symbol): Verify that the shape of a
42 parameter array is not only explicit, but also constant.
43 * array.c (gfc_is_compile_time_shape): New function.
44 * gfortran.h (gfc_is_compile_time_shape): Add prototype.
46 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
52 * module.c (write_symbol, write_symtree): Remove workaround.
53 * primary.c (match_actual_arglist): Enhance comment.
54 (gfc_match_rvalue): Handle function call with first argument
55 a keyword argument correctly.
56 * resolve.c (resolve_symbol): Change call to
57 gfc_set_default_type to issue error if no implicit type
59 * trans-decl.c (gfc_create_module_variable): Remove workaround.
61 2004-07-08 Paul Brook <paul@codesourcery.com>
63 * intrinsic.c (add_sym_4s): New function.
64 (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
66 2004-07-04 Janne Blomqvist <jblomqvi@cc.hut.fi>
67 Paul Brook <paul@codesourcery.com>
71 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
72 GFC_ISYM_COMMAND_ARGUMENT_COUNT.
73 * intrinsic.c (add_functions): Identify iargc. Add
74 command_argument_count.
75 (add_subroutines): Resolve getarg. Add get_command and
77 * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
78 gfc_resolve_get_command_argument): Add prototypes.
79 * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
80 gfc_resolve_get_command_argument): New functions.
81 * trans-decl.c (gfor_fndecl_iargc): New variable.
82 (gfc_build_intrinsic_function_decls): Set it.
83 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
84 (gfc_conv_intrinsic_function): Use it.
85 * trans.h (gfor_fndecl_iargc): Declare.
87 2004-07-04 Matthias Klose <doko@debian.org>
89 * Make-lang.in: Generate and install gfortran man page.
90 * invoke.texi: Remove extra '@c man end'.
92 2004-07-04 Richard Henderson <rth@redhat.com>
94 * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
96 2004-07-04 Paul Brook <paul@codesourcery.com>
98 * decl.c (gfc_match_implicit_range): Don't use typespec.
99 (gfc_match_implicit): Handle character selectors.
100 * gfortran.h (gfc_set_implicit): Remove prototype.
101 (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
102 * parse.c (accept_statement): Don't call gfc_set_implicit.
103 * symbol.c (new_ts): Remove.
104 (gfc_set_implicit_none): Use same loop bounds as other functions.
105 (gfc_set_implicit): Remove.
106 (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
107 (gfc_merge_new_implicit): Combine with gfc_set_implicit.
109 2004-06-30 Richard Henderson <rth@redhat.com>
111 * match.c (var_element): Remove unused variable.
113 * trans-decl.c (gfc_generate_function_code): Don't set
114 x_whole_function_mode_p.
115 (gfc_generate_constructors): Likewise.
117 2004-06-30 Richard Henderson <rth@redhat.com>
119 * trans-decl.c (gfc_generate_function_code): Don't set
120 immediate_size_expand.
121 (gfc_generate_constructors): Likewise.
123 2004-06-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
126 * decl.c (gfc_match_type_spec): Rename second argument to
127 'implicit_flag', reverse meaning. Don't match_char_spec if
128 'implicit_flag' is set. Rename to ...
129 (match_type_spec): ... this.
130 (gfc_match_implicit_none, match_implicit_range): Move here
132 (gfc_match_implicit): Move here from match.c, try to
133 match_char_len if match_implicit_range doesn't succeed for
134 CHARACTER implicits. Call renamed fucntion match_type_spec.
135 (gfc_match_data_decl, match_prefix): Call renamed function
137 * match.c (gfc_match_implicit_none, match_implicit_range,
138 gfc_match_implicit): Move to decl.c.
139 * match.h (gfc_match_implicit_none, gfc_match_implicit):
140 Move protoypes to section 'decl.c'.
141 (gfc_match_type_spec): Remove prototype.
143 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
145 * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
148 2004-06-29 Steven Bosscher <stevenb@suse.de>
150 Make sure types in assignments are compatible. Mostly mechanical.
151 * trans-const.h (gfc_index_one_node): New define.
152 * trans-array.c (gfc_trans_allocate_array_storage,
153 gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
154 gfc_trans_array_constructor_value, gfc_trans_array_constructor,
155 gfc_conv_array_ubound, gfc_conv_array_ref,
156 gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
157 gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
158 gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
159 gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
160 types in assignments, conversions and conditionals for expressions.
161 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
162 gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
163 gfc_conv_function_call, gfc_trans_pointer_assignment,
164 gfc_trans_scalar_assign): Likewise.
165 * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
166 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
167 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
168 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
169 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
170 gfc_conv_allocated, gfc_conv_associated,
171 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
172 * trans-io.c (set_string): Likewise.
173 * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
174 gfc_do_allocate, generate_loop_for_temp_to_lhs,
175 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
176 compute_overall_iter_number, gfc_trans_assign_need_temp,
177 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
178 gfc_evaluate_where_mask, gfc_trans_where_assign,
179 gfc_trans_where_2): Likewise.
180 * trans-types.c (gfc_get_character_type, gfc_build_array_type,
181 gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
183 * trans.c (gfc_add_modify_expr): Add sanity check that types
184 for the lhs and rhs are the same for scalar assignments.
186 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
188 * dump-parse-tree.c (show_common): New function.
189 (gfc_show_namespace): Show commons.
191 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
192 Andrew Vaught <andyv@firstinter.net>
196 * decl.c (gfc_match_save): Adapt to new common structures,
197 don't allow saving USE-associated common.
198 * dump-parse-tree (gfc_show_attr): (saved_)common are not
199 symbol attributes any longer.
200 (gfc_show_symbol): Don't show old-style commons any longer.
201 (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
203 * gfortran.h (symbol_attribute): Remove common and saved_common
205 (gfc_symbol): Remove common_head element.
206 (gfc_common_head): New struct.
207 (gfc_get_common_head): New macro.
208 (gfc_symtree): Add field 'common' to union.
209 (gfc_namespace): Add field 'common_root'; change type of field
210 'blank_common' to blank_common.
211 (gfc_add_data): New prototype.
212 (gfc_traverse_symtree): Expect a symtree as first argument
213 instead of namespace.
214 * match.c (gfc_get_common): New function.
215 (match_common_name): Change to take char * as argument, adapt,
216 fix bug with empty name.
217 (gfc_match_common): Adapt to new data structures. Disallow
218 redeclaration of USE-associated COMMON-block. Fix bug with
220 (var_element): Adapt to new common structures.
221 * match.h (gfc_get_common): Declare.
222 * module.c: Add 2004 to copyright years, add commons to module
223 file layout description.
224 (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
225 for removed attributes.
226 (mio_symbol): Adapt to new way of storing common relations.
227 (load_commons): New function.
228 (read_module): Skip common list on first pass, load_commons at
230 (write_commons): New function.
231 (write_module): Call write_commons().
232 * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
233 functions related to removed attributes.
234 (gfc_add_data): New function.
235 (gfc_clear_attr): Don't set removed attributes.
236 (gfc_copy_attr): Don't copy removed attributes.
237 (traverse_symtree): Remove.
238 (gfc_traverse_symtree): Don't traverse symbol
239 tree of the passed namespace, but require a symtree to be passed
240 instead. Unify with traverse_symtree.
241 (gfc_traverse_ns): Call gfc_traverse_symtree according to new
243 (save_symbol): Remove setting of removed attribute.
244 * trans-common.c (gfc_sym_mangled_common_id): Change to
245 take 'char *' argument instead of 'gfc_symbol'.
246 (build_common_decl, new_segment, translate_common): Adapt to new
247 data structures, add new
249 (create_common): Adapt to new data structures, add new
250 argument name. Fix typo in intialization of derived types.
251 (finish_equivalences): Add second argument in call to
253 (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
254 (gfc_trans_common): Adapt to new data structures.
255 * trans-decl.c (gfc_create_module_variables): Remove test for
258 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
260 * io.c: Add 2004 to copyright years.
262 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
263 Andrew Vaught <andyv@firstinter.net>
265 * gfortran.h (gfc_gsymbol): New typedef.
266 (gfc_gsym_root): New variable.
267 (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
268 * parse.c (global_used): New function.
269 (parse_block_data): Check for double empty BLOCK DATA,
270 use global symbol table.
271 (parse_module): Use global symbol table.
272 (add_global_procedure, add_global_program): New functions.
273 (gfc_parse_file): Use global symbol table.
274 * symbol.c (gfc_gsym_root): New variable.
275 (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
278 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
280 * module.c (mio_gmp_real): Correct writing of negative numbers.
282 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
285 * expr.c (check_intrinsic_op): Allow comparison of characters.
288 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
289 Andrew Vaught <andyv@firstinter.net>
291 * decl.c (contained_procedure): New function.
292 (match_end): Verify correctness of END STATEMENT in
295 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
296 Andrew Vaught <andyv@firstinter.net>
299 * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
300 (decode_statement): Enforce required space in free-form.
302 2004-06-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
304 * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
305 * trans-array.c (gfc_conv_descriptor_data): Add operand
307 (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
308 (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
309 (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
310 * trans-common.c (create_common): Likewise.
311 * trans-expr.c (gfc_conv_component_ref): Likewise.
312 * trans-io.c (set_parameter_value): Likewise.
313 (set_parameter_ref, set_string, set_flag, io_result): Likewise.
314 (transfer_expr): Likewise.
315 * trans-decl.c (gfc_trans_auto_character_variable):
316 Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
317 (gfc_gimplify_function): New function.
318 (gfc_generate_function-code): Properly handle nested functions.
319 * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
321 2004-06-22 Janne Blomqvist <jblomqvi@cc.hut.fi>
324 * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
325 (gfc_resolve_inquire): Resolve the iolength tag. Return
326 SUCCESS at end of function if no failure has occured.
327 * resolve.c (resolve_code): Resolve if iolength is encountered.
328 * trans-io.c: (ioparm_iolength, iocall_iolength,
329 iocall_iolength_done): New variables.
330 (last_dt): Add IOLENGTH.
331 (gfc_build_io_library_fndecls ): Set iolength related variables.
332 (gfc_trans_iolength): Implement.
333 (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
335 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de
338 * scanner.c (load_line): Don't truncate preprocessor lines.
339 Reformat error message.
340 (preprocessor_line): Issue warning in case of malformed
343 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
345 * resolve.c (resolve_symbol): Add comment in function body.
346 (check_data_variable): Change type of mark to ar_type, adapt code
349 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
351 * array.c (gfc_insert_constructor): Avoid redundant call to
352 mpz_comp. Add 2004 to copyright years.
354 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
356 * trans.h (stmtblock_t): Change has_scope to unsigned int.
358 2004-06-20 Steven G. Kargl <kargls@comcast.net>
360 * arith.c (gfc_range_check): correct complex underflow.
362 2004-06-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
365 * match.c (match_case_selector): Call gfc_match_init_expr
366 instead of gfc_match_expr.
367 * resolve.c (validate_case_label_expr): No need to check for
368 constant, since it wouldn't have been matched with the fix to
371 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
374 * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
377 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
380 * trans-deecl.c (generate_local_decl): Do not issue warning for
381 unused variables if they're use associated.
383 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
384 Andrew Vaught <andyv@firstinter.net>
387 * gfortran.h (gfc_check_f): Add new field f3ml.
388 * check.c (gfc_check_minloc_maxloc): Take argument list instead
389 of individual arguments, reorder if necessary.
390 * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
391 * intrinsic.c (add_sym_3ml): New function.
392 (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
393 (check_specific): Catch special case MINLOC, MAXLOC.
395 2004-06-14 Paul Brook <paul@codesourcery.com>
397 * intrinsic.c (add_sym_2s): Use correct function types.
399 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
401 * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize. Move data.c
402 * data.c (gfc_get_section_index): Remove dependency on trans.h.
404 2004-06-12 Steven G. Kargl <kargls@comcast.net>
406 * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
407 gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
408 * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
409 GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
410 * trans-intrinsic.c: Use symbols.
411 * intrinsic.c (add_sym_2s): New function.
412 * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
413 * intrinsic.h: Function prototypes.
414 * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
415 gfc_resolve_srand): New functions.
417 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
420 * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
423 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
426 * interface.c (compare_parameter, compare_actual_formal): Don't
427 check types and array shapes for NULL()
428 * trans-expr.c (conv_function_call): No double indirection for
431 2004-06-09 Toon Moene <toon@moene.indiv.nluug.nl>
433 * trans-expr.c (gfc_conv_cst_int_power): Compute
434 x**(-n) by converting it to (1/x)**n instead of
437 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
440 * module.c (write_symbol, write_symtree): Don't write symbols
441 wrongly added to namespace.
442 * trans-decl.c (gfc_create_module_variable): Don't create a
443 backend decl for a symbol incorrectly added to namespace.
445 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
448 * resolve.c (resolve_symbol): Verify that parameter array has an
449 explicit shape. Fix typos and coding style issues in surrounding
452 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
455 * gfortran.texi: The documentation doesn't contain infomration on
456 how to report bugs, and shouldn't, so remove the line which
459 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
461 * intrinsic.c (sort_actual): Keep track of type of missing
462 arguments. (Missing from previous commit.)
464 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
466 * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
467 * interface.c (compare_actual_formal): Keep type of omitted
469 * trans-expr.c (gfc_conv_function_call): Add string length
470 argument for omitted string argument.
472 2004-06-03 Paul Brook <paul@codesourcery.com>
474 * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
475 lists instead of compound expr chains.
476 (gfc_trans_code): Annotate statement lists.
478 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
480 * trans-array.c: Fix spelling in comments.
482 2004-06-02 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
485 * data.c (assign_substring_data_value): New function.
486 (gfc_assign_data_value): Call the new function if we're dealing
487 with a substring LHS.
489 2004-06-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
492 * gfortran.h (GFC_VERSION): Remove.
493 * gfortran.texi (version-gfortran): Remove, replace by version-GCC
496 2004-05-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
498 * trans-types.c: Fix spelling & layout in comments.
500 2004-05-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
503 * trans-const.c (gfc_conv_string_init): Allow variable string
504 length lower than initialization string length.
506 2004-05-30 Paul Brook <paul@codesourcery.com>
509 * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
510 * trans-expr.c (gfc_trans_string_copy): New function.
511 (gfc_conv_statement_function): Use them. Create temp vars. Enforce
513 (gfc_conv_string_parameter): Use gfc_trans_string_copy.
514 * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
515 * trans.h (struct gfc_saved_var): Define.
516 (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
518 2004-05-30 Steven G. Kargl <kargls@comcast.net>
520 * iresolve.c (gfc_resolve_random_number): Clean up conditional.
522 2004-05-29 Steven G. Kargl <kargls@comcast.net>
524 * simplify.c (gfc_simplify_log): Remove useless line of code.
526 2004-05-29 Paul Brook <paul@codesourcery.com>
528 * trans-common.c (find_equivalence): Find multiple rules.
530 2004-05-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
532 * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
533 (gfc_current_locus): Declare new global variable.
534 * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
535 (gfc_current_locus1): Rename ...
536 (gfc_current_locus): ... to this.
537 (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
538 skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
539 gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
540 gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
541 and gfc_current_locus(), respectively.
542 * array.c (match_subscript, gfc_match_array_ref, match_array_list,
543 match_array_cons_element, gfc_match_array_constructor):
544 Read/modify gfc_current_locus instead of calling gfc_set_locus()
545 and gfc_current_locus().
546 * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
547 match_attr_spec, gfc_match_function_decl, gfc_match_end,
548 attr_decl1, gfc_match_save): Likewise.
549 * error.c (error_print, gfc_internal_error): Likewise.
550 * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
551 * interface.c (gfc_add_interface): Likewise.
552 * io.c (gfc_match_format, match_dt_format, match_dt_element,
553 match_io_iterator, match_io): Likewise.
554 * match.c (gfc_match_space, gfc_match_eos,
555 gfc_match_small_literal_int, gfc_match_st_label,
556 gfc_match_strings, gfc_match_name, gfc_match_iterator,
557 gfc_match_char, gfc_match, gfc_match_assignment,
558 gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
559 gfc_match_nullify, gfc_match_call, match_implicit_range,
560 gfc_match_implicit, gfc_match_data, match_case_selector,
561 gfc_match_case, match_forall_iterator): Likewise.
562 * matchexp.c (gfc_match_defined_op_name, next_operator,
563 match_level_1, match_mult_operand, match_ext_mult_operand,
564 match_add_operand, match_ext_add_operand, match_level_2,
565 match_level_3, match_level_4, match_and_operand, match_or_operand,
566 match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
567 * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
568 * parse.c (match_word, decode_statement, next_free, next_fixed,
569 add_statement, verify_st_order, parse_if_block, gfc_parse_file):
571 * primary.c (match_digits, match_integer_constant,
572 match_boz_constant, match_real_constant, match_substring,
573 next_string_char, match_charkind_name, match_string_constant,
574 match_logical_constant, match_const_complex_part,
575 match_complex_constant, match_actual_arg, match_keyword_arg,
576 gfc_match_actual_arglist, gfc_match_structure_constructor,
577 gfc_match_rvalue, gfc_match_variable): Likewise.
578 * st.c (gfc_get_code): Likewise.
579 * symbol.c (check_conflict, check_used, check_done,
580 duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
581 gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
582 gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
584 2004-05-26 Roger Sayle <roger@eyesopen.com>
586 * io.c (format_asterisk): Silence compiler warnings by correcting
587 the number of elements of a "locus" initializer.
589 2004-05-25 Roger Sayle <roger@eyesopen.com>
592 * matchexp.c: Allow unary operators after arithmetic operators
594 (match_ext_mult_operand, match_ext_add_operand): New functions.
595 (match_mult_operand): Tweak to call match_ext_mult_operand.
596 (match_add_operand): Tweak to call match_ext_mult_operand.
597 (match_level_2): Rearrange to call match_ext_add_operand.
599 2004-05-25 Paul Brook <paul@codesourcery.com>
601 * expr.c (check_inquiry): Remove bogus tests.
603 2004-05-23 Paul Brook <paul@codesourcery.com>
606 * expr.c (restricted_args): Remove redundant checks/argument.
607 (external_spec_function): Update to match.
608 (restricted_intrinsic): Rewrite.
610 2004-05-23 Paul Brook <paul@codesourcery.com>
611 Victor Leikehman <lei@haifasphere.co.il>
613 * gfortran.h (struct gfc_symbol): Add equiv_built.
614 * trans-common.c: Change int to HOST_WIDE_INT. Capitalize error
616 (current_length): Remove.
617 (add_segments): New function.
618 (build_equiv_decl): Create initialized common blocks.
619 (build_common_decl): Always add decl to bindings.
620 (create_common): Create initializers.
621 (find_segment_info): Reformat to match coding conventions.
622 (new_condition): Use add_segments.
623 (add_condition, find_equivalence, add_equivalences): Move iteration
624 inside functions. Only process each segment once.
625 (new_segment, finish_equivalences, translate_common): Simplify.
627 2004-05-23 Steven G. Kargl <kargls@comcast.net>
629 * check.c (gfc_check_random_seed): Issue for too many arguments.
631 2004-05-22 Steven G. Kargl <kargls@comcast.net>
633 * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
635 2004-05-22 Paul Brook <paul@codesourcery.com>
637 * dump-parse-tree.c (gfc_show_equiv): New function.
638 (gfc_show_namespace): Use it.
640 2004-05-22 Victor Leikehman <lei@haifasphere.co.il>
643 * symbol.c (gfc_add_common): Disable checks to work around other more
644 fundamental inadequacies.
646 2004-05-22 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
648 * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
650 (gfc_build_function_decl): Likewise.
652 2004-05-22 Steven G. Kargl <kargls@comcast.net>
654 * check.c (gfc_check_system_clock): New function.
655 * intrinsic.c (add_sym_3s): New function.
656 (add_subroutines): Use it.
657 * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
659 * iresolve.c (gfc_resolve_system_clock): New function.
661 2004-05-22 Steven G. Kargl <kargls@comcast.net>
663 * invoke.texi: Document -Wunderflow and spell check.
664 * lang.opt: Add Wunderflow.
665 * gfortran.h (gfc_option_t): Add warn_underflow option.
666 * options.c (gfc_init_options, set_Wall): Use it.
667 * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
668 * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
669 gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
670 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
671 * arith.c (common_logarithm): Fix typo in comment.
673 2004-05-21 Roger Sayle <roger@eyesopen.com>
675 * io.c (check_format): As a GNU extension, allow the comma after a
676 string literal to be optional in a format. Use gfc_notify_std to
677 issue an error/warning as appropriate.
679 2004-05-21 Roger Sayle <roger@eyesopen.com>
681 * io.c (check_format): Use gfc_notify_std to determine whether to
682 issue an error/warning for omitting the digits from the X format.
684 2004-05-20 Roger Sayle <roger@eyesopen.com>
686 * io.c (check_format): Allow the number before the X format to
687 be optional when not -pedantic.
689 2004-05-18 Feng Wang <fengwang@nudt.edu.cn>
690 Paul Brook <paul@codesourcery.com>
692 * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
693 Create decls for __builtin_pow{,f}.
694 * gfortran.h (PREFIX_LEN): Define.
695 * trans-decl.c (gfor_fndecl_math_powi): Add.
696 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
697 (gfc_build_intrinsic_function_decls): Create decls for powi.
698 * trans-expr.c (powi_table): Add.
699 (gfc_conv_integer_power): Remove.
700 (gfc_conv_powi): New function.
701 (gfc_conv_cst_int_power): New function.
702 (gfc_conv_power_op): Use new powi routines.
703 * trans.h (struct gfc_powdecl_list): Add.
704 (gfor_fndecl_math_powi): Add.
705 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
707 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
709 * trans.c, trans-decl.c: Fix comment typos.
711 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
713 * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
715 2004-05-18 Steve Kargl <kargls@comcast.net>
717 * arith.c (gfc_int2complex): Fix incorrect range checking.
719 2004-05-18 Paul Brook <paul@codesourcery.com>
722 * decl.c (add_init_expr_to_sym): Remove incorrect check.
723 (default_initializer): Move to expr.c.
724 (variable_decl): Don't assign default initializer to variables.
725 * expr.c (gfc_default_initializer): Move to here.
726 * gfortran.h (gfc_default_initializer): Add prototype.
727 * resolve.c (resolve_symbol): Check for illegal initializers.
728 Assign default initializer.
730 2004-05-17 Steve Kargl <kargls@comcast.net>
732 * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
734 2004-05-17 Steve Kargl <kargls@comcast.net>
736 * arith.c (gfc_real2complex): Range checking wrong part of complex
739 2004-05-16 Paul Brook <paul@codesourcery.com>
741 * options.c (gfc_handle_module_path_options): Fix buffer overrun.
743 2004-05-16 Paul Brook <paul@codesourcery.com>
745 * arith.c (gfc_range_check): Fix logic error.
747 2004-05-16 Steve Kargl <sgk@troutmask.apl.washington.edu>
749 * arith.c: Fix comment typos.
751 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
754 * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
755 not initialized in a disallowed fashion.
756 * match.c (gfc_match_common): Likewise.
757 (var_element): Verify that variable is not in the blank COMMON,
758 if it is in a common.
760 2004-05-15 Joseph S. Myers <jsm@polyomino.org.uk>
762 * Make-lang.in (f95.generated-manpages): Remove.
764 (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
765 f95.maintainer-clean): Generate info and dvi files in objdir/doc.
768 (f95.install-info): Remove.
771 2004-05-15 Victor Leikehman <lei@haifasphere.co.il>
773 * decl.c (add_init_expr_to_sym): Check for variable size arrays.
775 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
777 * primary.c (match_boz_constant): Use gfc_notify_std() for
778 issuing a warning or an error.
780 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
783 * primary.c (match_structure_constructor): Rename ...
784 (gfc_match_structure_constructor): ... to this. Make non-static.
785 (gfc_match_rvalue): Call renamed function.
786 * match.h (gfc_match_structure_constructor): Declare.
787 * match.c (gfc_match_data_constant): Handle structure
790 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
794 * gfortran.h (gfc_linebuf): New typedef.
796 (gfc_file): Revamped, use new gfc_linebuf.
797 (locus): Revamped, use new types.
798 (gfc_current_file): Remove.
799 (gfc_current_form, gfc_source_file): New global variables.
800 * match.c (gfc_match_space, gfc_match_strings): Use
801 gfc_current_form to find source form.
802 * module.c (gfc_dump_module): Use gfc_source_file when printing
804 * error.c (show_locus, show_loci) Use new data structures to print
806 * scanner.c (first_file, first_duplicated_file, gfc_current_file):
808 (file_head, current_file, gfc_current_form, line_head, line_tail,
809 gfc_current_locus1, gfc_source_file): New global variables.
810 (gfc_scanner_init1): Set new global variables.
811 (gfc_scanner_done1): Free new data structures.
812 (gfc_current_locus): Return pointer to gfc_current_locus1.
813 (gfc_set_locus): Set gfc_current_locus1.
814 (gfc_at_eof): Set new variables.
815 (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
816 to new locus structure.
817 (gfc_check_include): Remove.
818 (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
819 (gfc_skip_comments): Use gfc_current_form, find locus with
821 (gfc_next_char): Use gfc_current_form.
822 (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
823 (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
825 (get_file): New function.
826 (preprocessor_line, include_line): New functions.
827 (load_file): Move down, rewrite to match new data structures.
828 (gfc_new_file): Rewrite to match new data structures.
829 * parse.c (next_statement): Remove code which is now useless. Use
830 gfc_source_form and gfc_source_file where appropriate.
831 * trans-decl.c (gfc_get_label_decl): adapt to new data structures
832 when determining locus of frontend code.
833 * trans-io.c (set_error_locus): Same.
834 * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
835 * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
837 (all): Add missing initializers.
839 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
841 * Make-lang.in (trans-common.o): Remove redundant dependency.
842 (data.c): Replace object file name ...
843 (data.o): ... by the correct one.
845 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
847 * dump-parse-tree.c (gfc_show_array_ref): Print colon only
848 for ranges when dumping array references.
850 2004-05-14 Victor Leikehman <lei@haifasphere.co.il>
852 * decl.c (variable_decl): Always apply default initializer.
854 2004-05-08 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
857 * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
858 handle zero correctly.
860 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
862 * match.c (gfc_match): Eliminate dead code.
864 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
866 * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
867 Detect bad continuation line in fixed form sources.
869 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
872 * iresolve.c (gfc_resolve_nearest): Add new function.
873 * intrinsic.h: ... declare it here.
874 * intrinsic.c (add_functions): ... add it as resolving function
877 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
880 * match.c (gfc_match_do): Allow infinite loops with
881 label-do-stmt. Do not enforce space after comma.
883 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
886 * parse.c (parse_interface): Allow empty INTERFACE, remove
889 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
891 * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
892 decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
893 expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
894 intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
895 matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
896 primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
897 trans-array.c, trans-array.h, trans-common.c, trans-const.c,
898 trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
899 trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
900 trans-types.h, trans.c, trans.h: Update copyright years and
902 * data.c: Likewise, also removed two whitespace-only lines.
903 * gfortranspec.c, lang.opt: Update copyright years.
905 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
908 * trans-decl.c (generate_local_decl): Don't warn for unused
909 variables which are in common blocks.
911 2004-05-13 Diego Novillo <dnovillo@redhat.com>
913 * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
914 trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
915 trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
917 2004-05-13 Victor Leikehman <lei@haifasphere.co.il>
920 * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
922 2004-05-13 Joseph S. Myers <jsm@polyomino.org.uk>
924 * gfortran.texi: Use @table @emph instead of @itemize @emph.
925 Remove "set DEVELOPMENT".
926 (Compiling GFORTRAN): Remove.
928 2004-05-09 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
930 * array.c (match_subscript, match_array_ref): Add comments
931 explaining argument 'init'.
932 * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
933 trans-expr.c, trans.c: Fix some typos in comments.
934 * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
935 * primary.c (match_digits, match_integer_constant): Add comment
938 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
941 * primary.c: Include system.h and flags.h, needed for pedantic.
942 (match_boz_constant): Allow "x" for hexadecimal constants, warn if
945 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
948 * match.c (match_data_constant): Handle case where
949 gfc_find_symbol sets sym to NULL
951 2004-04-28 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
953 * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
954 dependency on mathbuiltins.def
956 2004-04-24 Victor Leikehman <lei@il.ibm.com>
958 * trans-io.c (transfer_expr): Implemented recursive printing
961 2004-04-24 Andrew Pinski <pinskia@physics.uc.edu>
963 * gfortranspec.c: Do not include multilib.h.
965 2004-04-24 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
967 * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
968 2004 to copyright years.
969 * trans-expr.c, trans-decl.c: Comment update, we now generate
970 GENERIC, not SIMPLE. Add 2004 to copyright years.
972 2004-04-24 Paul Brook <paul@codesourcery.com>
974 * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
976 2004-04-24 Feng Wang <fengwang@nudt.edu.cn>
979 * arith.c (gfc_arith_divide): Fix complex divide.
981 2004-04-23 Andrew Pinski <pinskia@physics.uc.edu>
983 * gfortranspec.c: Include the target headers.
985 2004-04-18 Feng Wang <fengwang@nudt.edu.cn>
989 * arith.c (arctangent2): New function.
990 * arith.h (arctangent2): Add function prototype.
991 * simplify.c (gfc_simplify_atan2): Use it.
992 (gfc_simplify_log): Use it.
994 2004-04-12 Diego Novillo <dnovillo@redhat.com>
996 * fortran/f95-lang.c (gfc_expand_stmt): Remove.
997 (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
999 2004-04-11 Bud Davis <bdavis9659@comcast.net>
1002 * trans-io.c (build_dt): Change REC to value.
1004 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
1007 * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
1008 the real value when converting mpf to string.
1010 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
1013 * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
1016 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
1019 * simplify.c (simplify_min_max): Convert the type of the result.
1021 2004-04-11 Paul Brook <paul@codesourcery.com>
1023 * gfortran.texi: Use full target triplet.
1025 2004-04-11 Paul Brook <paul@codesourcery.com>
1027 * Make-lang.in (GFORTRAN_TEXI): Set it.
1028 (fortran/dfortran.dvi): Use it. Add fortran to include paths.
1029 (fortran/gfortran.info): Ditto.
1030 * gfortran.texi: Major update.
1031 * invoke.texi: New file.
1033 2004-04-10 Paul Brook <paul@codesourcery.com>
1035 * trans-array.c (gfc_trans_allocate_temp_array,
1036 gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
1037 * trans-decl.c (gfc_build_dummy_array_decl,
1038 gfc_get_symbol_decl, gfc_build_function_decl,
1039 gfc_create_module_variable): Ditto.
1040 * trans-expr.c (gfc_conv_variable): Ditto.
1041 * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
1042 * trans.h (GFC_DECL_STRING): Remove.
1043 (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
1044 GFC_DECL_ASSIGN): Renumber flags.
1046 2004-04-05 Paul Brook <paul@codesourcery.com>
1050 * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
1052 * gfortran.h (struct gfc_charlen): Add backend_decl.
1053 * trans-array.c (gfc_trans_allocate_temp_array,
1054 gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
1055 (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
1056 Remove old, broken string handling.
1057 (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
1058 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
1059 gfc_trans_deferred_array): Handle character arrays.
1060 * trans-const.c (gfc_conv_const_charlen): New function.
1061 * trans-const.h (gfc_conv_const_charlen): Add prototype.
1062 * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
1064 (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
1065 (gfc_create_string_length): New function.
1066 (gfc_get_symbol_decl): Create lengths for character variables.
1067 (gfc_get_fake_result_decl): Ditto.
1068 (gfc_build_function_decl): Only set length for assumed length
1069 character arguments.
1070 (gfc_trans_dummy_character): New function.
1071 (gfc_trans_auto_character_variable): Rewrite.
1072 (gfc_trans_deferred_vars): Handle more types of character variable.
1073 (gfc_create_module_variable): String lengths have moved.
1074 (gfc_generate_function_code): Initialize deferred var chain earlier.
1075 * trans-expr.c (gfc_conv_init_string_length): Rename ...
1076 (gfc_trans_init_string_length): ... to this.
1077 (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
1078 gfc_conv_function_call): Update to new format for character variables.
1079 (gfc_conv_string_length): Remove.
1080 (gfc_conv_string_parameter): Update assertion.
1081 * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
1082 * trans-io.c (set_string): Use new macro names.
1083 * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
1084 * trans-types.c (gfc_get_character_type): Use existing length expr.
1085 (gfc_is_nodesc_array): Make public.
1086 (gfc_get_dtype_cst): Rename ...
1087 (gfc_get_dtype): ... to this. Handle unknown size arrays.
1088 (gfc_get_nodesc_array_type): Use new name.
1089 (gfc_sym_type): New character variable code.
1090 (gfc_get_derived_type): Ditto.
1091 (gfc_get_function_type): Evaluate character variable lengths.
1092 * trans-types.h (gfc_strlen_kind): Define.
1093 (gfc_is_nodesc_array): Add prototype.
1094 * trans.h: Update prototypes.
1095 (struct lang_type): Update comments.
1096 (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
1097 (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
1099 2004-04-04 Paul Brook <paul@codesourcery.com>
1101 * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
1102 * options.c (gfc_init.options, gfc_handle_option): Ditto.
1103 * trans-expr.c (gfc_conv_function_call): Ditto.
1104 * trans-types.c (gfc_is_nodesc_array): Ditto
1105 * lang.opt (fg77-calls): Remove.
1107 2004-04-04 Paul Brook <paul@codesourcery.com>
1109 * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
1110 (gfc_conv_descriptor_base): Rename ...
1111 (gfc_conv_descriptor_offset): ... to this.
1112 (gfc_trans_allocate_array_storage): Set offset to zero.
1113 (gfc_conv_array_base): Rename ...
1114 (gfc_conv_array_offset): ... to this.
1115 (gfc_conv_array_index_ref): Add offset parameter.
1116 (gfc_conv_array_ref): Include offset.
1117 (gfc_trans_preloop_setup): Use existing offset.
1118 (gfc_trans_allocate_temp_array, gfc_array_allocate,
1119 gfc_trans_auto_array_allocation, gfc_trans_g77_array,
1120 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
1121 gfc_conf_ss_descriptor): Set offset.
1122 * trans-array.h: Rename prototypes.
1123 * trans-const.h (gfc_index_zero_node): Define.
1124 * trans-decl.c (gfc_build_qualified_array): Change base to offset.
1125 * trans-types.c (gfc_get_array_type_bounds): Ditto.
1126 (gfc_get_nodesc_array_type): Calculate offset before upper bound.
1128 2004-03-25 Diego Novillo <dnovillo@redhat.com>
1130 * convert.c (convert): Don't handle WITH_RECORD_EXPR.
1132 2004-03-24 Bud Davis <bdavis9659@comcast.net>
1135 * arith.c (gfc_convert_integer,gfc_convert_real): Removed leading '+'
1136 before conversion by gmp library call.
1138 2004-03-24 Bud Davis <bdavis9659@comcast.net>
1141 * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
1143 2004-02-24 Richard Henderson <rth@redhat.com>
1145 * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
1147 2004-02-19 Loren J. Rittle <ljrittle@acm.org>
1149 * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
1150 (fortran/gfortran.info): ... to here.
1153 2004-02-16 Richard Henderson <rth@redhat.com>
1155 * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
1156 * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
1157 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
1158 (gfc_expand_function): Rename from expand_function_body, make static,
1159 don't do anything except invoke tree_rest_of_compilation.
1160 (gfc_be_parse_file): Invoke cgraph.
1161 (gfc_expand_decl): Remove.
1162 (gfc_init_builtin_functions): Add __builtin_init_trampoline and
1163 __builtin_adjust_trampoline.
1164 * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
1165 (gfc_finalize): New.
1166 (gfc_generate_function_code): Use it. Lower nested functions.
1167 * trans-expr.c (gfc_conv_function_call): Add static chain operand
1169 * trans.c (gfc_build_function_call): Likewise.
1170 * trans.h (expand_function_body): Remove.
1172 2004-02-15 Victor Leikehman <lei@il.ibm.com>
1175 * trans-decl.c (gfc_build_function_decl) For functions
1176 returning CHARACTER pass an extra length argument,
1177 following g77 calling conventions.
1178 * trans-types.c (gfc_get_function_type) Ditto.
1179 * trans-expr.c (gfc_conv_function_call) Ditto.
1181 2004-02-14 Paul Brook <paul@codesourcery.com>
1183 * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
1185 2004-02-12 Paul Brook <paul@nowt.org>
1189 2004-02-08 Steve Kargl <sgk@troutmask.apl.washington.edu>
1191 * gfortran.texi: Fix typos.
1193 2004-02-07 Bud Davis <bdavis9659@comcast.net>
1196 * intrinsic.c (add_conversions) Use logical conversion instead
1198 * trans-types.c (gfc_get_logical_type) implemented logical*1
1201 2004-01-17 Paul Brook <paul@codesourcery.com>
1203 * lang-specs.h: Remove %<fixed-form.
1205 2004-01-15 Toon Moene <toon@moene.indiv.nluug.nl>
1207 * lang-specs.h: Enable preprocessing of source files
1208 ending in .F, .fpp, .FPP, .F90 and .F95.
1210 2004-01-13 Toon Moene <toon@moene.indiv.nluug.nl>
1213 * lang-specs.h: Enable compilation of files ending
1214 in .f, .for and .FOR.
1216 2004-01-11 Paul Brook <paul@codesourcery.com>
1218 * trans-stmt.c (gfc_trans_if_1): New function.
1219 (gfc_trans_if): Use it.
1221 2004-01-11 Erik Schnetter <schnetter@uni-tuebingen.de>
1223 * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
1224 (gfc_option_t): Add max_identifier_length.
1225 * lang.opt: Add fmax-identifier-length.
1226 * match.c (parse_name): Use limit.
1227 * options.c (gfc_init_options): Set max_identifier_length.
1228 (gfc_handle_option): Ditto.
1230 2004-01-11 Feng Wang <fengwang@nudt.edu.cn>
1232 * intrinsic.c (add_functions): Add resolve function to dcmplx.
1233 * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
1234 * iresolve.c (gfc_resolve_dcmplx): New function.
1236 2004-01-10 Paul Brook <paul@codesourcery.com>
1238 * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
1239 * trans-types.c (gfc_sym_type): Handle external dummy procedures.
1240 (gfc_return_by_reference): Correct condition.
1241 (gfc_get_function_type): Ditto.
1243 2004-01-10 Paul Brook <paul@codesourcery.com>
1245 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
1248 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
1250 * iresolve.c: Use correct kind.
1252 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
1255 * trans-decl.c (gfc_create_module_variable): Output array valued
1258 2004-01-10 Paul Brook <paul@codesourcery.com>
1260 * resolve.c (resolve_branch): Get error message right way round.
1262 2004-01-10 Canqun Yang <canqun@nudt.edu.cn>
1264 * trans-array (gfc_conv_loop_setup): Adjust comment to track
1266 (gfc_array_allocate): Don't count size of element twice.
1268 2004-01-04 Paul Brook <paul@codesourcery.com>
1270 * lang.opt (i8, r8, std=*): Remove RejectNegative.
1272 2004-01-04 Paul Brook <paul@codesourcery.com>
1274 * error.c (gfc_notify_std): New function.
1275 * gfortran.h (gfc_notify_std): Declare.
1276 (GFC_STD_*): Define.
1277 (gfc_option_t): Add warn_std and allow_std.
1278 * intrinsic.c (gfc_init_expr_extensions): Fix logic.
1279 (gfc_intrinsic_func_interface): Use gfc_notify_std.
1280 * check.c (check_rest): Use gfc_notify_std.
1281 * match.c (gfc_match_pause): Ditto.
1282 (gfc_match_assign): Ditto.
1283 (gfc_match_goto): Ditto.
1284 * resolve.c (resolve_branch): Ditto.
1285 * lang.opt: Add std=<foo> and w.
1286 * options.c (gfc_init_options): Set allow_std and warn_std.
1287 (gfc_handle_option): Handle OPT_std_* and OPT_w.
1289 2004-01-01 Paul Brook <paul@codesourcery.com>
1291 * array.c (gfc_append_constructor): Take constructor, not expression.
1292 * data.c (struct gfc_expr_stack): Remove.
1293 (expr_stack): Remove.
1294 (find_con_by_offset): Rename from find_expr_in_con.
1295 (find_con_by_component): Rename from find_component_in_con.
1296 (gfc_get_expr_stack): Remove.
1297 (gfc_assign_data_value): Rewrite.
1298 (gfc_expr_push): Remove.
1299 (gfc_expr_pop): Remove.
1300 (gfc_advance_section): Rename from
1301 gfc_modify_index_and_calculate_offset. Handle unbounded sections.
1302 (gfc_get_section_index): Handle unbounded sections.
1303 * gfortran.h: Update prototypes.
1304 * resolve.c (check_data_variable): Array section maight not be the
1307 2004-01-01 Paul Brook <paul@codesourcery.com>
1310 * resolve.c (resolve_symbol): Allow assumed length function results.
1312 2004-01-01 Steve Kargl <sgk@troutmask.apl.washington.edu>
1314 * match.c (gfc_match_pause): Fix spelling.
1316 2004-01-01 Steven Bosscher <stevenb@suse.de>
1319 * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
1320 reference from the expression.
1322 2003-12-26 Feng Wang <fengwang@nudt.edu.cn>
1324 * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
1326 * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
1327 (gfc_exec_op): New EXEC_LABEL_ASSIGN.
1328 (symbol_attribute):New variable attribute: assign.
1329 * io.c (resolve_tag):Integer variable is allowed.
1330 (match_dt_format): Add ASSIGN statement. Set assign flag.
1331 * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
1332 (gfc_match_assign): Add ASSIGN statement. Set assign flag.
1333 (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
1334 * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
1335 (next_statement): Add ST_LABEL_ASSIGNMENT.
1336 (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
1337 * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
1338 (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
1339 * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
1340 * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
1341 assign. Put them into the stuct lang_decl.
1342 * trans-io.c (set_string): Add the assign statement.
1343 * trans-stmt.c (gfc_trans_label_assign): New function.
1344 (gfc_trans_goto): Translate ASSIGNED GOTO statement.
1345 * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
1346 * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
1347 * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
1348 (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
1349 (GFC_DECL_ASSIGN(node)): New macro to access flag.
1351 2003-12-31 Huang Chun <chunhuang73@hotmail.com>
1354 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
1357 2003-12-22 Toon Moene <toon@moene.indiv.nluug.nl>
1359 * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
1360 that arguments to subroutines/functions can't alias themselves, nor global
1363 2003-12-20 Steven Bosscher <stevenb@suse.de>
1365 * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
1366 * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
1368 2003-12-12 Huang Chun <chunhuang73@hotmail.com>
1370 * primary.c (match_substring): Fix substring bug for start point
1371 or end point is NULL.
1372 * trans-expr.c (gfc_conv_substring): Ditto
1373 * trans-types.c (gfc_sym_type): Get correct type of scalar
1374 character variables.
1375 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
1378 2003-12-10 Richard Henderson <rth@redhat.com>
1380 * options.c (gfc_post_options): Don't ever use rtl inlining.
1382 2003-12-05 Canqun Yang <canqun@nudt.edu.cn>
1384 * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
1385 * trans-equivalence.c: Remove.
1386 * trans-decl.c (gfc_get_symbol_decl): Update to match.
1387 (gfc_generate_function_code): Ditto.
1388 * trans-array.c (gfc_conv_array_parameter): Ditto.
1389 * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
1390 (F95_ADDITIONAL_OBJS): Add stor-layout.o
1391 * trans.h (gfc_trans_equivalence): Remove.
1392 * gfortran.h (struct gfc_equiv): Add used field.
1393 (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
1394 equiv_offset fields.
1396 2003-12-05 Richard Henderson <rth@redhat.com>
1398 * trans.c (gfc_build_addr_expr): New.
1399 (gfc_build_indirect_ref, gfc_build_array_ref): New.
1400 * trans.h: Declare them.
1401 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
1402 trans-stmt.c, trans.c (*): Use them.
1404 * f95-lang.c (gfc_post_options): Remove dead prototype.
1405 * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
1406 * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
1409 2003-12-01 Feng Wang <fengwang@nudt.edu.cn>
1411 * io.c (gfc_match_format): Check for missing format label.
1413 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
1416 * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
1417 from interfaces in modules.
1419 2003-11-30 Paul Brook <paul@nowt.org>
1421 * trans-array.c (gfc_trans_g77_array): Make non-static.
1422 (gfc_trans_assumed_size): Remove.
1423 (gfc_trans_dummy_array_bias): Explicitly free temporary.
1424 * trans-array.h (gfc_trans_g77_array): Add prototype.
1425 (gfc_trans_assumed_size): Remove.
1426 * trans-decls.c (gfor_fndecl_push_context): Remove.
1427 (gfor_fndecl_pop_context): Remove.
1428 (gfc_build_function)decls): Don't create them.
1429 (gfc_trans_deferred_vars): Update to match. Remove dead code.
1430 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
1432 2003-11-30 Kejia Zhao <kejia_zh@nudt.edu.cn>
1434 * trans-array.c (gfc_conv_array_parameter): Simplify
1435 array argument passing for array name actual argument.
1436 * trans-expr.c (gfc_conv_function_call): Ditto
1437 * trans-types.c (gfc_is_nodesc_array):Ditto.
1439 2003-11-30 Paul Brook <paul@nowt.org>
1441 * f95-lang.c (gfc_post_options): Move ...
1442 * options.c (gfc_post_options): .. to here. Handle inlining options.
1443 * gfortran.h (gfc_post_options): Add prototype.
1445 2003-11-28 Richard Henderson <rth@redhat.com>
1447 * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
1449 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
1451 * trans.h (has_alternate_specifier): New global variable.
1452 * match.c (gfc_match_call): Handle actual arguments associated with
1453 alternate return indicators.
1454 * trans-expr.c (gfc_conv_function_call): Ditto
1455 * trans-stmt.c (gfc_trans_call): Ditto
1456 (gfc_trans_return): Handle return statement with value.
1457 * trans-decl.c (gfc_generate_function_code): Handle functions with
1459 (gfc_get_fake_result_decl): Ditto
1460 * trans-types.c (gfc_get_function_type): Ditto
1461 * resolve.c (resolve_actual_arglist): Check alternate return indicators.
1462 (resolve_formal_arglist): Check asterisk dummy.
1464 2003-11-27 Paul Brook <paul@nowt.org>
1466 * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
1467 allocation interface.
1468 (gfc_conv_ array_parameter): Ditto.
1469 (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
1470 * trans-array.c: Update prototype.
1471 * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
1472 (gfc_trans_auto_character_variable): Use new memory alloc interface.
1473 * trans-expr.c (gfc_conv_string_tmp): Ditto.
1474 (gfc_conv_function_call): Use gfc_conv_string_tmp.
1475 * trans-stmt.c (gfc_do_allocate): Use new memory alloc interface.
1476 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
1477 * trans.h (gfc_ss_info): Remove unused pdata field.
1478 * trans.c (gfc_create_var_np): Change T to V.
1480 2003-11-26 Richard Henderson <rth@redhat.com>
1482 * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
1483 * trans-intrinsic.c (gfc_intrinsic_map): ... here. Add SCALE,
1484 FRACTION, NEAREST, SET_EXPONENT.
1485 (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
1486 Fix GTY marking. Remove unnecessary const's.
1487 (LIBM_FUNCTION): Rename from I_LIB.
1488 (LIBF_FUNCTION): New.
1489 (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
1490 conventions. Assume the expr signature is correct. Mark const.
1491 (gfc_conv_intrinsic_exponent): Use library functions.
1492 (gfc_conv_intrinsic_set_exponent): Remove.
1493 (gfc_conv_intrinsic_scale): Remove.
1494 (gfc_conv_intrinsic_nearest): Remove.
1495 (gfc_conv_intrinsic_fraction): Remove.
1496 (gfc_conv_intrinsic_function): Update.
1497 * trans-decl.c (gfor_fndecl_math_exponent4): New.
1498 (gfor_fndecl_math_exponent8): New.
1499 (gfc_build_intrinsic_function_decls): Set them.
1500 * trans.h: Declare them.
1502 2003-11-25 Canqun Yang <canqun@nudt.edu.cn>
1504 * trans-common.c (gfc_layout_global_equiv): Locate the error for
1505 underflow COMMON block.
1506 (gfc_trans_one_common): Fix bug for size of COMMON block containing
1507 EQUIVALENCE object. Also fix typo in an error message.
1509 2003-11-25 Diego Novillo <dnovillo@redhat.com>
1511 * Make-lang.in: Add check-gfortran to lang_checks.
1512 (check-f95): Alias for check-gfortran.
1514 2003-11-25 Jason Merrill <jason@redhat.com>
1516 * Make-lang.in (f95.tags): Create TAGS.sub files in each
1517 directory and TAGS files that include them for each front end.
1519 2003-11-24 Paul Brook <paul@nowt.org>
1522 * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
1524 2003-11-24 Paul Brook <paul@nowt.org>
1526 * expr.c (simplify_const_ref): Return SUCCESS for things we don't
1528 * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
1530 2003-11-24 Paul Brook <paul@nowt.org>
1533 * array.c (gfc_array_ref_shape): Handle elemental dimensions.
1534 * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
1536 2003-11-20 Richard Henderson <rth@redhat.com>
1538 * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
1539 (gfc_conv_array_base): Likewise.
1540 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
1541 * trans-expr.c (gfc_conv_string_tmp): Likewise.
1542 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
1543 * trans-stmt.c (gfc_trans_character_select): Likewise.
1545 2003-11-13 Paul Brook <paul@nowt.org>
1547 * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
1549 2003-11-13 Canqun Yang <canqun@nudt.edu.cn>
1551 * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
1552 (resolve_equivalence): New function.
1553 (resolve_equivalence_derived): New function.
1555 2003-11-12 Richard Henderson <rth@redhat.com>
1557 * trans.c (gfc_trans_code): Use annotate_with_locus instead of
1558 annotate_all_with_locus.
1560 2003-11-11 Canqun Yang <canqun@nudt.edu.cn>
1562 * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
1563 * trans-decl.c (gfc_finish_var_decl): Modified.
1565 2003-11-08 Paul Brook <paul@nowt.org>
1568 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
1571 2003-11-06 Paul Brook <paul@nowt.org>
1573 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
1575 2003-11-02 Canqun Yang <canqun@nudt.edu.cn>
1577 * match.c (gfc_match_stopcode): Assign '0' to stop_code.
1579 2003-10-27 Anthony Green <green@redhat.com>
1581 * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
1582 (f95.stagefeedback): Ditto.
1584 2003-10-27 Andrew Pinski <pinskia@physics.uc.edu>
1587 * Make-lang.in (f95.stageprofile): Add.
1588 (f95.stagefeedback): Add.
1590 2003-10-23 Richard Henderson <rth@redhat.com>
1592 * f96-lang.c (gfc_gimplify_expr): Remove.
1593 (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
1594 (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
1596 2003-10-23 Richard Henderson <rth@redhat.com>
1598 * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
1600 2003-10-20 Paul Brook <paul@nowt.org>
1602 * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
1603 * trans-stmt.c (gfc_trans_do_while): Ditto.
1605 2003-10-17 Paul Brook <paul@nowt.org>
1607 * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
1609 2003-10-17 Paul Brook <paul@nowt.org>
1611 * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
1613 2003-10-17 Feng Wang <wf_cs@yahoo.com>
1615 * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
1616 (gfc_resolve_minloc): Ditto.
1617 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
1618 Return the value after subtracting the lower bound.
1620 2003-10-16 Richard Henderson <rth@redhat.com>
1622 * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
1624 2003-10-16 Steven Bosscher <steven@gcc.gnu.org>
1626 * lang.c: Remove -M option for now, it's in the way for C.
1628 2003-10-14 Jason Merrill <jason@redhat.com>
1630 * Make-lang.in (f95.tags): New rule.
1632 2003-10-13 Richard Henderson <rth@redhat.com>
1634 * trans.c (gfc_trans_code): Use annotate_all_with_locus.
1636 2003-10-13 Paul Brook <paul@nowt.org>
1638 * trans-decl.c (generate_local_decl): Don't create junk variables.
1640 2003-10-13 Paul Brook <paul@nowt.org>
1642 * resolve.c (resolve_formal_arglist): Use function result decl in
1643 preference to function decl.
1645 2003-10-12 Richard Henderson <rth@redhat.com>
1647 * f95-lang.c (gfc_define_builtin): New const_p argument. Set
1648 TREE_READONLY. Update all callers.
1650 2003-10-12 Feng Wang <wf_cs@yahoo.com>
1652 * iresolve.c (gfc_resolve_cshift): Change to match implementation.
1653 * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
1654 (gfc_is_intrinsic_libcall): Add CSHIFT.
1656 2003-10-12 Richard Henderson <rth@redhat.com>
1658 * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
1659 (gfc_trans_array_constructor_value): Likewise.
1660 (gfc_conv_array_initializer): Likewise.
1661 * trans-stmt.c (gfc_trans_character_select): Likewise.
1663 2003-11-12 Kejia Zhao <kejia_zh@yahoo.com.cn>
1665 * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
1667 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
1669 * check.c (gfc_check_repeat): Check arguments are scalar.
1670 (gfc_check_trim): New function.
1671 * intrinsic.h (gfc_check_trim): Add prototype.
1672 * intrinsic.c (add_functions): Use it.
1673 * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
1675 * trans-decl.c: Ditto.
1676 (gfc_build_intrinsic_fucntion_decls): Set them.
1677 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
1678 (gfc_conv_intrinsic_trim): New function.
1679 (gfc_conv_intrinsic_repeat): New function.
1680 (gfc_conv_intrinsic_function): Use them.
1682 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
1684 * trans-types.c (gfc_sym_type): Handle result variables.
1686 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
1688 * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
1689 gfc_get_character_type.
1691 2003-10-11 Feng Wang <wf_cs@yahoo.com>
1693 * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
1695 2003-10-11 Paul Brook <paul@nowt.org>
1697 * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
1698 (gfc_resolve_dprod): New function.
1699 (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
1700 * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
1701 (gfc_resolve_dprod): Declare.
1702 * intrinsic.c (add_functions): Use them.
1703 * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
1705 2003-10-06 Richard Henderson <rth@redhat.com>
1707 * f95-lang.c (gfc_init_builtin_functions): Add clzll.
1708 * trans-intrinsic.c (call_builtin_clz): Use it.
1710 2003-10-05 Paul Brook <paul@nowt.org>
1712 * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
1713 * trans-decl.c (gfc_generate_function_code): Set
1714 cfun->function_end_locus.
1716 2003-09-24 Jason Merrill <jason@redhat.com>
1718 * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
1721 2003-09-21 Lifang Zeng <zlf605@hotmail.com>
1722 Paul Brook <paul@nowt.org>
1724 * Make-lang.in (F95_OBJS): Add fortran/data.o.
1725 * array.c (gfc_inser_constructor): New function.
1726 (gfc_get_constructor): New function.
1727 (gfc_free_constructor): Initialize offset and repeat.
1728 (iterator_stack): Remove.
1729 (expand_info): Add offset, component and repeat fields.
1730 (expand_constructor): Set them.
1731 (expand): Set new fields.
1732 (gfc_copy_constructor): Ditto. Avoid recursion.
1733 * gfortran.h: Add prototypes for new functions.
1734 (gfc_constructor): Add offset, component and repeat.
1735 (iteratio_stack): Move to here.
1736 * resolve.c (check_data_variable): Convert data values into variable
1738 (traverse_data_list): Build implicit loop chain.
1739 (gfc_resolve): Ditto.
1740 * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
1741 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
1742 * trans-expr.c (gfc_conv_structure): Handle array initializers.
1743 (gfc_conv_expr): Update to match.
1744 * trans.h (gfc_conv_structure): Declare.
1747 2003-09-20 Kejia Zhao <kejia_zh@yahoo.com.cn>
1749 * trans.h: Add declarations for gfor_fndecl_si_kind and
1750 gfor_fndecl_sr_kind.
1751 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
1752 * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
1753 (g95_conv_intrinsic_sr_kind): New function.
1754 (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
1757 2003-09-17 Lars Segerlund <Lars.Segerlund@comsys.se>
1759 * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
1760 instead of _4 and _8 as postfix for libgfortran calls.
1762 2003-09-16 Paul Brook <paul@nowt.org>
1764 * array.c (compare_bounds): New function.
1765 (gfc_compare_array_spec): Use it.
1767 2003-09-14 Paul Brook <paul@nowt.org>
1769 * primary.c (gfc_match_rvalue): Make sure sym->result is set.
1770 * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
1772 2003-09-14 Paul Brook <paul@nowt.org>
1774 * check.c (dim_rank_check): Allow assumed bounds if requested.
1775 (gfc_check_lbound): Call it.
1776 (gfc_check_ubound): Ditto.
1777 (gfc_check_size): Change to match.
1778 * simplify.c (gfc_simplify_bound): New function.
1779 (gfc_simplify_lbound): New function.
1780 (gfc_simplify_ubound): New function.
1781 * intrinsic.h: Declare them.
1782 * intrinsic.c (add_functions): Use them.
1784 2003-09-14 Paul Brook <paul@nowt.org>
1786 * io.c (format_lex): Initialize negative_flag.
1787 (check_format): Intialize repeat.
1788 * trans-io.c (gfc_new_nml_name_expr): Declare static.
1789 (gfc_new_var_expr): Ditto.
1791 2003-09-14 Paul Brook <paul@nowt.org>
1793 * trans-array.c (gfc_conv_array_initializer): Handle derived types.
1794 * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
1796 2003-09-12 Paul Brook <paul@nowt.org>
1798 * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
1800 2003-09-12 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
1802 * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
1803 for a correct expression.
1805 2003-09-10 Kejia Zhao <kejia_zh@yahoo.com.cn>
1807 * trans-intrinsic.c (real_compnt_info): New struct.
1808 (prepare_arg_info): New function.
1809 (gfc_conv_intrinsic_set_exponent): New function.
1810 (gfc_conv_intrinsic_scale): New function.
1811 (gfc_conv_intrinsic_nearest): New function.
1812 (gfc_conv_intrinsic_fraction): New function.
1813 (gfc_conv_intrinsic_exponent): New function.
1814 (gfc_conv_intrinsic_spacing): New function.
1815 (gfc_conv_intrinsic_rrspacing): New function.
1816 (gfc_conv_intrinsic_function): Use them.
1818 2003-08-24 XiaoQiang Zhang (zhangapache@yahoo.com>
1820 * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
1821 build_int_2 changed from (high, low) to (low, high).
1822 * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
1823 ioparm_namelist_read_mode, iocall_set_nml_val_int,
1824 iocall_set_nml_val_float, iocall_set_nml_val_char,
1825 iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
1826 (gfc_build_io_library_fndecls): Add variable initialization.
1827 (gfc_new_nml_name_expr, get_new_var_expr): New function.
1828 (build_dt): Add namelist support.
1829 * io.c (value): New variable.
1830 (check_format): Support FMT_H now.
1832 2003-09-07 Paul Brook <paul@nowt.org>
1834 * io.c (gfc_resolve_dt): Error if format label is not defined.
1836 2003-09-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
1838 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
1839 about case_switch's break. The other is about building the condition
1840 statement tree, which judges the argument in the range of the
1841 corresponding integer type.
1842 * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
1843 for the large values.
1845 2003-09-05 Paul Brook <paul@nowt.org>
1847 * f95-lang.c (expand_function_body): Gimplify the function.
1849 2003-09-04 Jeff Law <law@redhat.com>
1851 * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
1854 2003-09-04 Paul Brook <paul@nowt.org>
1856 * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
1857 (gfc_expand_stmt): New function.
1858 (LANG_HOOKS_RTL_EXPAND_STMT): Define.
1859 (expand_function_body): Use tree_rest_of_compilation.
1860 * trans-decl.c (gfc_generate_function_code): Don't free cfun.
1862 2003-09-03 Jeff Law <law@redhat.com>
1864 * f95-lang.c (gfc_init_builtin_functions): C arrays start at
1867 2003-08-30 Paul Brook <paul@nowt.org>
1869 * f95-lang.c (builtin_function): Remove #if 0 code.
1870 (gfc_define_builtin): New function.
1871 (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
1872 * mathbuiltins.def: New file.
1873 * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
1874 (gfc_intrinsic_map): Use mathbuiltins.def.
1875 (gfc_intrinsic_builtin_t): Remove.
1876 (gfc_build_intrinsic_lib_fndecls): Update.
1877 * trans-types.c (gfc_init_types): Remove redundant initilaization of
1878 signed_size_type_node.
1880 2003-08-29 Paul Brook <paul@nowt.org>
1882 * arith.c (gfc_real_kinds): Use correct minimum exponents.
1884 2003-08-22 Kejia Zhao <kejia_zh@yahoo.com.cn>
1886 * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
1887 (gfc_conv_intrinsic_function): Add MODULO.
1889 2003-08-22 Jason Merrill <jason@redhat.com>
1891 * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
1893 2003-08-22 Andreas Jaeger <aj@suse.de>
1895 * Make-lang.in (f95.install-common): Add DESTDIR support.
1896 * (f95.install-info): Likewise.
1897 (f95.uninstall): Likewise.
1899 2003-08-19 Diego Novillo <dnovillo@redhat.com>
1901 * trans-types.c (gfc_init_types): Initialize
1902 signed_size_type_node with size_type_node.
1904 2003-08-18 Paul Brook <paul@nowt.org>
1906 * dependency.c (gfc_dependency): New enum.
1907 (check_another_array_ref): Remove.
1908 (gfc_get_array_from_component): Remove.
1910 (get_range): Remove.
1911 (get_no_of_elements): Use mpz_t, not mpf_t.
1912 (transform_sections): New function.
1913 (gfc_check_range_range): Rename ...
1914 (gfc_check_section_vs_section): ... to this. Use new function.
1915 (gfc_is_inside_range): Rewrite to match.
1916 (gfc_check_element_vs_section): Ditto.
1917 (gfc_check_element_vs_element): Ditto.
1919 (gfc_dep_resolver): Ditto. Remove unused parameter.
1920 * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
1921 gfc_check_element_vs_element, gfc_is_inside_range,
1922 gfc_get_array_from_component): Remove prototypes for static functions.
1923 (gfc_dep_resolver): Update prototype.
1924 * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
1926 2003-08-15 Paul Brook <paul@nowt.org>
1928 * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
1929 return values to parent scope.
1930 (gfc_build_dummy_array_decl): Ditto.
1932 2003-08-14 Paul Brook <paul@nowt.org>
1934 * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
1935 size of the type, not the pointer.
1936 * resolve.c (resolve_symbol): Give more accurate error message.
1938 2003-08-10 Paul Brook <paul@nowt.org>
1940 * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
1942 2003-08-10 Paul Brook <paul@nowt.org>
1944 * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
1947 2003-08-10 Chun Huang <compiler@sohu.com>
1949 * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
1950 (resolve_symbol): Ditto.
1951 * trans-expr.c (gfc_conv_statement_function): New function.
1952 (gfc_conv_function_expr): Use it.
1954 2003-08-10 Paul Brook <paul@nowt.org>
1956 * trans-array.c (gfc_conv_ss_startstride): Handle functions.
1957 (walk_function_expr): Set section rank.
1958 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
1960 2003-08-10 Paul Brook <paul@nowt.org>
1962 * intrinsic.c (add_sym): Prefix names with correct string.
1963 (add_sym_0s): New function.
1964 (add_subroutines): Register abort.
1966 2003-08-10 Erik Schnetter <schnetter@uni-tuebingen.de>
1968 * gfortran.h: Introduce options to control the mangling.
1969 * lang.opt: Likewise.
1970 * options.c (gfc_init_options): Handle the options.
1971 * trans-common.c (gfc_sym_mangled_common_id): New function.
1972 (gfc_build_common_decl): Call it.
1973 * trans-decl.c (gfc_sym_mangled_function_id): New function.
1974 (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
1976 2003-08-09 Paul Brook <paul@nowt.org>
1978 * module.c (mio_symbol): Always ouput a namespace for formal args.
1979 (load_needed): Namespace now belong to their proper symbol.
1980 (gfc_dump_module): Change G95=>GFORTRAN.
1982 2003-08-05 Paul Brook <paul@nowt.org>
1984 * options.c: Force -fg77-calls.
1986 2003-08-02 Paul Brook <paul@nowt.org>
1988 * Makelang.in: Rename G95_* to GFORTRAN_*.
1989 * All sources: Rename G95_* to GFC_*.
1991 2003-08-01 Paul Brook <paul@nowt.org>
1993 * fortran/Make-lang.in: Use GMPLIBS.
1994 * fortran/config-lang.in: Set need_gmp.
1995 * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
1997 2003-07-27 Andreas Jaeger <aj@suse.de>
1999 * trans-decl.c (gfc_generate_constructors): Convert prototype to
2001 * trans-const.c (gfc_init_constants): Likewise.
2002 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
2004 * gfortranspec.c: Convert to ISO C90.
2005 (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
2007 2003-07-26 Paul Brook <paul@nowt.org>
2009 * lang.opt: Add -fdump-parse-tree.
2010 * options.c (gfc_handle_option): Ditto.
2011 * resolve.c (resolve_forall_iterators): Convert to proper type.
2012 * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
2014 2003-07-26 Paul Brook <paul@nowt.org>
2016 * Makefile.in: Add build dependencies on files common with rest of gcc.
2018 2003-07-26 Lifang Zeng <zlf605@hotmail.com>
2020 * trans.h: Declare g95_trans_pointer_assignment.
2021 * trans-expr.c (g95_trans_pointer_assignment): New function.
2022 (g95_trans_pointer_assign): Use it.
2023 * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
2024 (g95_trans_pointer_assign_need_temp): New function.
2026 2003-07-26 Paul Brook <paul@nowt.org>
2028 * gfortran.texi: Replace references to g95.
2030 2003-07-26 Paul Brook <paul@nowt.org>
2032 Rename g95_* to gfc_*.
2034 2003-07-25 Paul Brook <paul@nowt.org>
2036 * gfortran.h: Rename from g95.h.
2037 * trans-types.c (boolean_type_node, booelan_true_node,
2038 boolean_false_node): Remove.
2039 * trans-types.h: Ditto.
2041 2003-07-25 Chun Huang <compiler@sohu.com>
2043 * parse.c (accept_statement): Implement BLOCK DATA statement.
2044 * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
2047 2003-07-24 Lifang Zeng <zlf605@hotmail.com>
2049 * trans-stmt.c (temporary_list): Define.
2050 (g95_trans_assign_need_temp): New function.
2051 (g95_trans_forall_1): Modified for WHERE.
2052 (g95_trans_where_assign): Modified.
2053 (g95_trans_where_2): Modified.
2054 (g95_evaluate_where_mask): Modified.
2055 (g95_trans_where): Modified.
2056 (g95_get_temp_expr): Removed.
2057 (g95_add_to_where_stmt_list): Removed.
2058 (compute_overall_iter_number): Modified for WHERE.
2059 * trans.h: Remove where_stmt_list.
2061 2003-07-24 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2063 * lang.opt: Correct description of options -J and -M.
2065 2003-07-23 Steven Bosscher <steven@gcc.gnu.org>
2067 * lang.opt: Move help text to here.
2068 * lang-options.h: Remove.
2070 2003-07-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2071 * iresolve.c (g95_resolve_transpose): Proper variable in switch.
2072 * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
2075 2003-07-22 Steven Bosscher <steven@gcc.gnu.org>
2076 Paul Brook <paul@nowt.org>
2078 * check.c (check_rest): Use global pedantic flag.
2079 * io.c (data_desc): Ditto.
2080 * error.c (g95_warning, g95_warning_now): Use global flag.
2081 * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
2082 (expand_function_body): Update to new prototypes.
2083 (g95_init): Use new option names.
2084 * g95.h (g95_option_t): Standardize names.
2085 (g95_init_options, g95_handle_option): Update prototypes.
2086 * interface.c: Use new option names.
2093 * simplify.c: Ditto.
2095 * trans-array.c: Ditto.
2096 * trans-expr.c: Ditto.
2097 * trans-types.c: Ditto.
2098 * trans-decl.c: Ditto.
2099 (g95_build_library_function_decl): Remove obsolete VPARAMS.
2101 * options.c (g95_display_help): Remove.
2102 (g95_init_options): Convert to new scheme.
2104 (g95module_option): Ditto, rename from g95_parse_arg.
2105 (g95_handle_module_path_options): New function.
2106 * trans-equivalence.c: Fix error message.
2107 * lang.opt: Corrections.
2109 2003-07-21 Steven Bosscher <steven@gcc.gnu.org>
2111 * lang.opt: New file.
2113 2003-07-21 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2115 * decl.c (match_attr_spec): Set colon_seen.
2117 2003-07-14 Paul Brook <paul@nowt.org>
2119 * trans-array.c: Update comment.
2120 (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
2121 * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
2122 minmaxloc,minmaxval): Ditto.
2123 * trans-io.c (g95_trans_transfer): Ditto.
2124 * trans-stmt.c: Remove unneeded prototypes.
2125 (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
2126 (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
2127 (compute_inner_temp_size): Remove bits of dead code. Add comments.
2128 Don't share loopinfo.
2129 (compute_overall_iter_number): Declare as static.
2130 (allocate_temp_for_forall_nest): Ditto.
2131 (g95_trans_forall_1): Don't pass shared loopinfo.
2132 * trans.c (g95_start_block): Expand comment.
2134 2003-07-12 Paul Brook <paul@nowt.org>
2136 * arith.c (g95_index_integer_kind): Remove unused initializer.
2137 * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
2138 index by size of element.
2139 (generate_loop_for_rhs_to_temp): Ditto.
2140 (allocate_temp_for_forall_nest): Use element size, not index size.
2142 2003-07-11 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2144 * arith.c (g95_index_integer_kind): Add a TODO.
2145 * simplify.c (g95_simplify_nearest): Add a TODO.
2147 2003-07-09 Chun Huang <compiler@sohu.com>
2149 * trans.h: Add declarations for gfor_fndecl_string_scan and
2150 gfor_fndecl_string_verify.
2151 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
2152 * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
2153 (g95_conv_intrinsic_verify): New function.
2154 (g95_conv_intrinsic_function): Add SCAN and VERIFY.
2155 * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
2156 of parameter 'BACK=.TRUE.'
2158 2003-07-05 Lifang Zeng <zlf605@hotmail.com>
2160 * trans-stmt.c (iter_info, forall_info): Define.
2161 (g95_trans_forall_block): Remove.
2162 (g95_trans_forall_loop): Use forall info blocks.
2163 (g95_trans_nested_forall_loop): New function.
2164 (g95_do_allocate): Handle things other than logical masks.
2165 (generate_loop_for_temp_to_lhs): New function.
2166 (generate_loop_for_rsh_to_temp): New function.
2167 (compute_inner_temp_size): New function.
2168 (compute_overall_iter_number): New function.
2169 (allocate_temp_for_forall_nest): New function.
2170 (g95_trans_forall): Move body ...
2171 (g95_trans_forall_1): ... to here. Handle loops with temporaries.
2173 2003-07-02 Paul Brook <paul@nowt.org>
2175 * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
2176 in correct scope. Change callers to match.
2177 * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
2178 * iresolve.c (g95_resolve_reshape): Only use constant shapes.
2180 2003-07-02 Paul Brook <paul@nowt.org>
2182 * trans-array.c (g95_conv_loop_setup): Remove dead var. Use
2183 expression shape for all expressions.
2184 * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
2186 2003-07-03 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2188 * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
2189 g95_parse_arg), intrinsic.c (g95_convert_type): support of
2191 * intrinsic.c, g95.h: Add g95_convert_type_warn,
2192 * resolve.c (g95_resolve_index): Call it.
2194 2003-07-02 Paul Brook <paul@nowt.org>
2196 * iresolve.c (g95_resolve_reshape): Set expression shape.
2197 (g95_resolve_shape): Ditto.
2198 * simplify.c (g95_simplify_shape): Move common code outside condition.
2199 * trans-array.c (g95_conv_array_initializer): Teach it how to count.
2201 2003-07-01 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2203 * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
2206 2003-06-29 Paul Brook <paul@nowt.org>
2208 * array.c (g95_simplify_iterator_var): Don't bother with return value.
2209 * expr.c (find_array_element, find_component_ref): New functions.
2210 (remove_subobject_ref): New function.
2211 (simplify_const_ref): Use them. Rename from simplify_component_ref.
2212 (simplify_ref_chain): New function.
2213 (g95_simplify_expr): Use it. Simplify parameter variable subobjects.
2214 (g95_specification_expr): Simplify the expression.
2215 * resolve.c (resolve_operator): Check simplifications return code.
2216 (g95_resolve_expr): Ditto.
2218 2003-06-26 Paul Brook <paul@nowt.org>
2220 * expr.c (simplify_component_ref): New function.
2221 (g95_simplify_expr): Use it.
2222 * resolve.c (resolve_structure_cons): Handle references.
2224 2003-06-25 Paul Brook <paul@nowt.org>
2226 * trans-io.c (build_dt): Handle internal units.
2228 2003-06-25 Canqun Yang <canqun@yahoo.com.cn>
2230 * trans-common.c (g95_build_common_decl): Array index range starts at 0.
2231 (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
2232 Use g95_array_index_type instead of integer_type_node.
2233 (g95_build_common_decl, g95_set_common_master_type): Use
2234 g95_character1_type_node instead of char_type_node.
2235 * trans-equivalence.c (g95_layout_local_equiv): As above.
2237 2003-06-24 Steven G. Kargl <kargls@attbi.com>
2239 * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
2240 remove last remains of -fquiet.
2242 2003-06-22 Paul Brook <paul@nowt.org>
2244 * resolve.c (resolve_operator): Don't fail if we can't simplify.
2245 (g95_resolve_expr): Ditto.
2246 (resolce_code): Mark as static.
2247 * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
2248 gimplifer doesn't (yet).
2250 2003-06-20 Paul Brook <paul@nowt.org>
2252 * g95.h: Add ST_PAUSE and EXEC_PAUSE.
2253 * match.c (g95_match_if): Add ST_PAUSE.
2254 (g95_match_stopcode): New function.
2255 (g95_match_pause, g95_match_stop): Use it.
2256 * parse.c (g95_ascii_statement): Handle ST_PAUSE.
2257 (decode_stmt, next_statement, parse_executable): Ditto.
2258 * resolve.c (resolve_code): Ditto.
2259 * st.c (g95_free_statement): Ditto.
2260 * trans-stmt.c (g95_trans_pause): New function.
2261 * trans-stmt.h: Declare it.
2262 * trans.c (g95_trans_code): Use it.
2263 * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
2265 (g95_build_builtin_function_decls): Initialize them.
2267 * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
2269 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2271 * io.c (g95_match_open , g95_match_close, g95_match_inquire,
2272 match_filepos): Fix error handling.
2274 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2276 * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
2277 Add assertions on arguments.
2278 * resolve.c (expression_shape): Remove useless &.
2279 * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
2280 g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
2281 g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
2282 g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
2283 g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
2284 g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
2285 (g95_simplify_not, g95_simplify_scale): Add assertions.
2287 2003-06-15 Paul Brook <paul@nowt.org>
2289 Clean up stuff to work with the ssa optimizers.
2290 * convert.c (convert): Handle BOOLEAN_TYPEs.
2291 * f95-lang.c (g95_truthvalue_conversion): Implement.
2292 * trans-array.c (g95_trans_array_constructor_value): Group multiple
2294 * trans.h (g95_truthvalue_conversion): Declare.
2295 * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
2296 * trans-stmt.c (g95_trans_character_select): Don't create array
2297 assignments. Mark labels as indirect jump targets.
2298 * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
2299 (g95_get_dtype_cst): Handle LOGICAL types.
2301 2003-06-14 Paul Brook <paul@nowt.org>
2303 * f95-lang.c (g95_gimplify_expr): New function.
2304 * trans-array.c (g95_trans_array_constructor_value): Don't create
2306 (g95_conv_expr_descriptor): Rename simple->gimple.
2307 * trans-expr.c (conv_expr_op): Use proper logical operators.
2308 * trans-intrinsic.c (build_fixbound_expr): New function.
2309 (build_fix_expr): Ditto.
2310 (g95_conv_intinsic_aint): Use them. Use builtin functions.
2311 (g95_conv_intrinsic_function): Add FLOOR and CEILING.
2313 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2315 * array.c (g95_compare_array_spec): Remove unreachable code.
2316 * expr.c (g95_copy_expr): Likewise.
2317 * intrinsic.c (g95_convert_type): Likewise.
2318 * misc.c (g95_code2string): Likewise.
2319 * simplify.c (g95_simplify_ishft, g95_simplify_real,
2320 g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
2321 * trans-stmt.c (g95_trans_select): Likewise.
2322 * primary.c (extend_ref): Add an assertion.
2323 * simplify.c (g95_convert_constant): Add const.
2324 * intrinsic.h: Remove g95_check_x_ni.
2325 * f95-lang.c (g95_finish): Call g95_release_include_path.
2327 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2329 * resolve.c (resolve_contained_functions): Fix typo introduced on
2332 2003-06-09 Paul Brook <paul@nowt.org>
2334 * g95.h: Include system.h not hwint.h.
2335 * many: use safe-ctype.h not ctype.h. Change isalpha -> ISALPHA, etc.
2336 * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
2338 2003-06-09 Paul Brook <paul@nowt.org>
2340 * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
2341 * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
2342 * trans-decl.c (g95_add_decl_to_functions): Make non-static.
2343 (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
2344 (g95_generate_function_code): Translate COMMON and EQUIVALENCE
2346 * trans.h (g95_trans_equivalence, g95_trans_common,
2347 g95_add_decl_to_function): Declare.
2348 * trans-common.c, trans-equivalence.c: New files.
2350 2003-06-08 Steven Bosscher <steven@gcc.gnu.org>
2352 * intrinsic.c (g95_intrinsic_extension): Remove.
2353 (add_functions): Substitute g95_check_x for g95_check_x_ni
2355 (g95_init_expr_extensions): New function.
2356 (g95_intrinsic_func_interface): Use it.
2357 * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
2358 * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
2359 g95_check_precision, g95_check_present, g95_check_radix,
2360 g95_check_range, g95_check_selected_real_kind): Do not set
2361 g95_intrinsic_extension.
2362 (g95_check_x_ni): Remove now duplicate of g95_check_x.
2364 * expr.c (check_inquiry): Add FIXME, fixup some code style.
2366 2003-06-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2368 * g95.h (ref_type): Name this type explicitly.
2369 * module.c (MIO_NAME): Add specialisations of mio_name.
2370 (mio_symbol_attribute, mio_typespec, mio_array_ref,
2371 mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
2372 (ab_attribute): Name this type explicitly.
2373 (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
2375 2003-06-05 Kejia Zhao <kejia_zh@yahoo.com.cn>
2377 * trans-intrinsic.c (g95_conv_allocated): New function.
2378 (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
2380 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
2382 * f95-lang.c: Don't include g95-support.h
2383 (g95_mark_addressable): Add prototype.
2384 (g95_init_decl_processing): Remove C front end hack.
2385 * f95-tree.c: Remove file.
2386 * support.c: Remove file.
2387 * g95-support.h: Remove file.
2388 * trans-types.c (g95_init_types): Set up boolean
2389 type related tree nodes.
2390 * Make-lang.in: Remove rules for dead files and
2391 dependencies on them.
2393 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
2395 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
2396 C front end dependency. Also, convert.c does not depend on
2397 g95-support.h anymore.
2398 * convert.c: Don't include c-common.h and g95-support.h
2399 * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
2400 (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
2401 stmts_are_full_exprs_p, current_stmt_tree,
2402 current_scope_stmt_stack): Remove.
2403 * g95-support.h (unsigned_conversion_warning): Kill proto.
2404 (boolean_type_node, boolean_true_node, boolean_false_node):
2405 Don't define here. Instead, make then true tree nodes in
2407 * support.c (c_global_trees): Die, C front end, die!!!
2408 (g95_init_c_decl_hacks): Don't touch intmax_type_node,
2409 uintmax_type_node, string_type_node and const_string_type_node.
2410 (decl_constant_value, overflow_warning): Make static functions.
2411 They are in death row too, though.
2412 (default_conversion, c_expand_asm_operands): Remove.
2413 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
2414 trans.c: Don't include c-common.h.
2415 * trans-types.c (boolean_type_node, boolean_true_node,
2416 boolean_false_node): Make them real tree nodes.
2417 * trans-types.h (intmax_type_node, string_type_node,
2418 const_string_type_node): Hack to work around C dependencies
2419 in builtin-types.def.
2421 2003-06-04 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2423 * decl.c (decl_types): Add some iterators-like sentinels.
2424 * decl.c (match_attr_spec): Use them.
2425 Use "decl_types" instead of "int".
2426 Add cast in call to g95_match_strings.
2427 * dump-parse-tree.c (g95_show_namespace): Use "g95_intrinsic_op"
2429 * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
2430 (g95_interface_info): Use "g95_intrinsic_op".
2431 * dump-parse-tree.c (g95_show_namespace): Use them.
2432 * interface.c (g95_check_interfaces): Use them.
2433 * module.c (read_module, write_module): Use them.
2434 * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
2435 Use "g95_intrinsic_op".
2436 * interface.c (check_operator_interface): Use "g95_intrinsic_op".
2437 Add a default case in switch statement.
2438 * intrinsic.h (g95_generic_isym_id): Moved to...
2439 * g95.h (g95_generic_isym_id): here.
2440 (g95_intrinsic_sym): Use "g95_generic_isym_id".
2441 * intrinsic.c (make_generic): Use "g95_generice_isym_id".
2442 * trans-intrinsic.c (g95_intrinsic_map_t,
2443 g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
2444 * match.c (g95_match_intrinsic_op): Add cast in call to
2447 2003-06-03 Steven Bosscher <steven@gcc.gnu.org>
2449 * support.c (skip_evaluation, warn_conversion, lvalue_p,
2450 lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
2451 constant_fits_type_p, convert_and_check,
2452 unsigned_conversion_warning): Remove these ugly remnants
2453 we inherited from the C front end.
2454 (function_types_compatible): Remove '#if 0'-edcode.
2455 (build_modify_expr): Likewise.
2456 (convert_for_assignment): Don't use the deceased functions.
2457 The parameter fundecl is now unused.
2458 (decl_constant_value): Always just return decl. In fact
2459 this function is not used at present, but it might be in
2460 the future, when we start using the tree inliner.
2461 (overflow_warning, default_conversion, c_expand_asm_operands):
2462 Abort when these are called, they are part of the C type
2463 checking implementation and therefore poison to Fortran.
2465 2003-06-04 Steven Bosscher <steven@gcc.gnu.org>
2467 * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
2468 c-pretty-print.o and c-dump.o. Add a comment on why we
2469 depend on c-semantics.c.
2470 * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
2471 Don't use the C front end tree dumper hook to dump the
2472 language specific tree representation -- we don't have
2473 one. So instead, inherit the default langhook.
2475 2003-06-02 Paul Brook <paul@nowt.org>
2477 * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
2479 2003-06-02 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2481 * check.c (g95_check_associated): Use proper types. Remove
2482 extraneous argument in call to g95_error().
2484 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
2486 * resolve.c (resolve_operator): Make logical operands convert to the
2487 type with higher kind.
2489 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
2491 * check.c (g95_check_associated): Make sure both pointer and target has
2492 the same type and rank. Null pointer or array section with vector
2493 subscript as target are not allowed.
2494 * trans.h: Declare gfor_fndecl_associated.
2495 * trans-decl.c: (g95_build_builtin_function_decls): Initialize
2496 gfor_fndecl_associated.
2497 * trans-intrinsic.c (g95_conv_associated): New function.
2498 (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
2500 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
2502 * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
2503 according to POINTER itself rather than TARGET.
2504 (g95_conv_expr_descriptor): Make lbound start at 1.
2505 * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
2507 2003-06-01 Paul Brook <paul@nowt.org>
2509 * expr.c (g95_type_convert_binary): Make it match the standard.
2510 * g95.texi: Remove dead link.
2512 2003-06-01 Steven Bosscher <steven@gcc.gnu.org>
2514 * g95.texi: Cleanup somewhat in preparation for inclusion
2517 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2518 Canqun Yang <canqun@yahoo.com.cn>
2520 * resolve.c (compare_bound_int, resolve_where_shape): Proper return
2522 (g95_find_forall_index): Return proper value.
2523 (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
2524 compare the return value from g95_find_forall_index.
2526 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2527 * g95.h, io.c (g95_st_label): Remove "length".
2528 (g95_symtree): Remove "link".
2529 (g95_case): Remove "code".
2530 * arith.c, arith.h (g95_compare_string, g95_convert_integer,
2531 g95_convert_real): Make an argument pointer to const.
2532 * decl.c (colon_seen): Add a TODO.
2533 * interface.c (g95_compare_types): Fix typo.
2534 * interface.c (compare_interfaces): Preserve value of "p".
2535 * intrinsic.c (sort_actual): Remove "i".
2536 * match.c (g95_match_assign): Proper type in call to g95_match().
2537 * parse.c (next_free): Avoid duplicate call due to macro.
2538 * parse.c (check_statement_label): wrong type in call to g95_error.
2539 * primary.c (match_real_constant): Add a TODO.
2540 * resolve.c (resolve_select): Remove useless conditional.
2541 * simplify.c (g95_simplify_repeat): Proper assignment to
2542 "value.character.string".
2543 * simplify.c (g95_simplify_reshape): Wrong variable in call to
2546 2003-05-20 Canqun Yang <canqun@yahoo.com.cn>
2548 * trans-stmt.c: Remove unnecessary include file defaults.h.
2550 2003-05-19 Lifang Zeng <zlf605@hotmail.com>
2552 * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
2554 (g95_trans_forall): Allow arbitrary number of FORALL indexes and
2555 actual variables used as FORALL indexes.
2557 2003-05-15 Paul Brook <paul@nowt.org>
2559 * trans-array.c (g95_trans_static_array_pointer): Use
2561 (g95_trans_deferred_array): Initialize static array pointers.
2562 * trans-expr.c (g95_conv_function_call): Use formal arglist to
2563 correctly pass POINTER and absent CHARACTER arguments.
2565 2003-05-14 Lifang Zeng <zlf605@hotmail.com>
2567 * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
2568 (g95_resolve_forall_body): Resolve FORALL body.
2569 (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
2570 (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
2571 (g95_find_forall_index): Check whether the FORALL index appears in
2572 the expression or not.
2573 (resolve_code): Modified.
2575 2003-05-14 Paul Brook <paul@nowt.org>
2577 * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
2579 2003-05-13 Paul Brook <paul@nowt.org>
2581 * trans-types.c (g95_max_array_element_size): Now a tree node.
2582 (g95_init_types): Work out max size properly.
2583 (g95_get_dtype_cst): Modify to match.
2585 2003-05-11 Paul Brook <paul@nowt.org>
2587 * trans-io.c (add_case): Create a label decl for case labels.
2589 2003-05-11 Paul Brook <paul@nowt.org>
2591 * arith.c (g95_integer_index_kind): New variable.
2592 * f95-lang.c (g95_init): Move frontend initialization here ...
2593 (g95_post_options): ... from here.
2594 * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
2595 * intrinsic.c (add_functions): Use index kinds.
2596 * iresolve.c: Convert to index_kind where needed.
2597 * resolve.c (g95_resolve_index): Make public, use index_kind.
2598 (resolve_array_ref): Adjust to match.
2599 * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
2600 * trans-stmt.c: Ditto.
2601 * trans-types.c: Ditto.
2602 * trans-types.h (g95_array_index_kind): Remove declaration.
2603 * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
2605 2003-05-07 Paul Brook <paul@nowt.org>
2607 * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
2608 * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
2611 2003-05-07 Paul Brook <paul@nowt.org>
2613 * trans-array.c (trans_static_array_pointer,
2614 g95_trans_array_constructor_value, g95_conv_array_initializer,
2615 g95_conv_structure): CONSTRUCTOR nodes only have one operand.
2616 (g95_add_loop_ss_code): Convert subscripts to the correct type.
2617 * trans-stmt.c (g95_trans_character_select): Ditto.
2618 * trans-types.c (g95_init_types): Ditto.
2620 2003-05-07 Steven Bosscher <steven@gcc.gnu.org>
2622 * f95-lang.c (expand_function_body): Use input_line, not lineno.
2623 * trans-decl.c (g95_generate_function_code,
2624 g95_generate_constructors): Likewise.
2625 * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
2626 g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
2629 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
2630 * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
2631 with components point to the DERIVED type itself, and two DERIVED
2632 type with components point to each other.
2633 * trans-expr.c (g95_conv_componet_ref): Modified
2635 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
2636 * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
2638 (g95_trans_pointer_assign): Implement Nullify.
2640 2003-05-01 Paul Brook <paul@nowt.org>
2642 * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
2643 * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
2645 2003-05-01 Paul Brook <paul@nowr.org>
2647 * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
2648 trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
2651 2003-05-01 Canqun Yang <canqun@yahoo.com.cn>
2653 * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
2656 2003-04-28 Paul Brook <paul@nowt.org>
2658 * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
2659 as their kind suggests.
2660 (g95_resolve_reshape): Ditto.
2662 2003-04-28 Chun Huang <compiler@sohu.com>
2664 * trans-expr.c (g95_conv_substring_expr): New function.
2665 (g95_conv_expr): Use it.
2667 2003-04-28 Paul Brook <paul@nowt.org>
2669 * iresolve.c (g95_resolve_transpose): Make it match the
2671 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
2673 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
2675 * trans-types.c (g95_add_field_to_struct): New function to
2676 add a field to a UNION_TYPE or RECORD_TYPE.
2677 * trans-types.h (g95_add_field_to_struct): Prototype.
2678 (g95_get_derived_type): Use g95_add_field_to_struct to add
2680 * trans-io.c (g95_add_field): Remove.
2681 (ADD_FIELD): Use new g95_add_field_to_struct function.
2682 (ADD_STRING): Likewise.
2683 * trans-stmt.c (g95_trans_select): Likewise.
2684 (g95_add_field): Remove duplicated function.
2686 2003-04-18 Canqun Yang <canqun@yahoo.com.cn>
2688 Port implementation for CHARACTER SELECT from Andy's tree.
2689 * trans-stmt.c (g95_trans_character_select): Implement character
2690 select. (g95_add_field): New function.
2691 * trans-decl.c: Declare 'gfor_gndecl_select_string'.
2692 (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
2693 * g95.h (struct g95_case): Add field 'int n'.
2694 * trans.h: Declare 'gfor_fndecl_select_string'.
2696 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
2698 * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
2699 (g95_insert_bbd): Die on duplicates.
2700 * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
2702 2003-04-14 Steven Bosscher <steven@gcc.gnu.org>
2704 * g95.texi: Require GMP 4.0 -- like we actually
2705 do. Explain the testsuite and what-goes-where.
2706 Don't use undefined texinfo symbol. Break very
2707 long line. Remove finished item from the list
2710 2003-04-11 Canqun Yang <canqun@yahoo.com.cn>
2712 * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
2715 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
2717 * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
2718 (g95_trans_forall_body): New function.
2720 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
2722 * resolve.c (resove_where): New function.
2723 (resolve_where_shape): New function.
2724 (resolve_code): Add call to 'resolve_where'
2725 * trans-stmt.c (g95_trans_where): Modified.
2726 (g95_trans_where_2): New function.
2727 (g95_trans_where_assign): New function.
2728 (g95_evaluate_where_mask): New function.
2729 (g95_add_to_stmt_list): New function.
2730 (g95_get_temp_expr): New function.
2731 * trans.h (where_stmt_list): New structure.
2733 2003-04-10 Paul Brook <paul@nowt.org>
2735 * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
2736 (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
2738 2003-04-10 Steven Bosscher <steven@gcc.gnu.org>
2740 Update after mainline -> tree-ssa-branch merge.
2741 * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
2743 (g95_init): Update for new lang_hooks definition.
2744 (g95_post_options): New langhook.
2745 (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
2746 * scanner.c (g95_new_file): Comment update.
2748 2003-04-09 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2750 * g95.h, lang-options.h: Add -Wimplicit-interface.
2751 * options.c (g95_init_options, g95_parse_arg): Set it.
2752 * interface.c (check_intents): Warn about call with implicit
2754 * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
2757 2003-04-05 Paul Brook <paul@nowt.org>
2759 * iresolve.c (g95_resolve_spread): Don't resole based on type.
2760 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
2762 2003-03-29 Paul Brook <paul@nowt.org>
2764 * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
2765 (g95_resolve_unpack): Ditto.
2766 * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
2767 (g95_conv_intrinsic_function): Use it. Remove PACK and UNPACK.
2768 (g95_is_intrinsic_libcall): Add PACK and UNPACK.
2770 2003-03-25 Paul Brook <paul@nowt.org>
2772 * arith.c (g95_unary_user, g95_user): Remove dead functions.
2774 * array.c (g95_free_array_ref): Ditto.
2776 * symbol.c (g95_use_derived_tree): Ditto.
2777 * intrinsic.c (add_functions): Use simplification for SCALE.
2778 * primary.c (g95_match_rvalue): Test sym, not symtree.
2780 2003-03-25 Paul Brook <paul@nowt.org>
2782 * trans-decl.c (build_function_decl): Add parameter before it gets
2783 turned into a constant.
2784 * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
2785 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
2786 * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
2788 2003-03-22 Paul Brook <paul@nowt.org>
2790 * trans-array.c (g95_conv_array_initializer): Allow scalar
2792 * trans-decl.c (g95_finish_var_decl): Result variables are not
2794 * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
2795 (g95_conv_intrinsic_function): Use it.
2796 * trans-types.h (g95_type_spec): Remove dead declaration.
2798 2003-03-21 Paul Brook <paul@nowt.org>
2800 * trans-decl.c (g95_build_function_decl): Mark string parameters.
2802 2003-03-20 Paul Brook <paul@nowt.org>
2804 * trans-decl.c (g95_build_function_decl): Put character length
2805 parameters at the end of the function declaration.
2806 * trans-expr.c (g95_conv_function_call): Ditto.
2807 * trans-types.c (g95_get_function_type): Ditto.
2809 2003-03-20 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2811 * resolve.c (resolve_formal_arglist): Don't impose intent for
2812 procedure arguments of pure functions.
2813 (resolve_select): Remove redundant assignment.
2815 2003-03-19 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2817 * arith.c (validate_logical), g95.h, options.c (g95_init_options):
2819 * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
2820 * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
2822 * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
2824 * symbol.c (g95_add_type): Fix typo in comment.
2827 2003-03-16 Paul Brook <paul@nowt.org>
2829 * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
2830 * expr.c (g95_build_call): Remove.
2831 * f95-lang.c (puchdecl_top_level): New function.
2832 * g95.h (g95_code): Store resolved symbol, not just the name.
2833 * intrinsic.c (g95_intrinsic_namespace): New global namespace.
2834 (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
2835 (g95_get_intrinsic_sub_symbol): New function.
2836 * iresolve.c (g95_resolve_cpu_time): Use it.
2837 (g95_resolve_random_number): Ditto.
2838 * resolve.c: Set code->resolved_sym instead of code->sub_name.
2839 * trans-decl.c (g95_get_extern_function_decl): Give external decls
2840 the correct DECL_CONTEXT. Add global symbold to the global scope.
2841 * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
2844 2003-03-16 Paul Brook <paul@nowt.org>
2846 * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
2847 * options.c (g95_parse_arg): Ditto.
2848 * module.c (mio_symbol_attribute): Handle the always_explicit bit.
2849 * resolve.c (resolve_formal_arglist): The always_explicit sould be set
2850 for the procedure, not the parameter.
2851 * trans-array.c (g95_trans_g77_array): New function.
2852 (g95_trans_assumed_size): Use it.
2853 (g95_trans_dummy_array_bias): Ditto.
2854 (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
2855 (g95_conv_expr_descriptor): ... to here. Update callers.
2856 * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
2857 (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
2858 * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
2859 * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
2860 * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
2861 (g95_sym_type): Ditto.
2863 2003-03-15 Paul Brook <paul@nowt.org>
2865 * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
2867 * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
2869 2003-03-14 Paul Brook <paul@nowt.org>
2871 * trans-array.c (g95_array_is_packed): Remove.
2872 (g95_conv_array_base): Correctly handle all descriptorless cases.
2873 (g95_conv_array_stride): Use descriptorless strides.
2874 (g95_trans_dummy_array_bias): Don't always repack the array.
2875 (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
2877 * trans-types.c (g95_get_nodesc_array_type): Differentiate between
2878 dummy and non-dummy arrays...
2879 (g95_sym_type, g95_get_derived_type): ... like these.
2880 (g95_get_array_type_bounds): Allow discontiguous arrays.
2882 2003-03-12 Paul Brook <paul@nowt.org>
2884 * array.c (g95_resolve_array_spec): Fix comment.
2885 * g95.h (symbol_attributes): New flag always_explicit.
2886 * resolve.c (resolve_formal_arglist): Set it always_explicit.
2887 * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
2888 * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
2889 (g95_trans_array_bounds): Allow assumed shape arrays.
2890 (g95_trans_repack_array): Remove.
2891 (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
2892 * trans-decl.c (g95_build_qualified_array): Only ignore absent
2893 bounds for assumed size arrays.
2894 (g95_build_dummy_array_decl): Use descriptorless arrays.
2895 * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
2896 (g95_trans_pointer_assign): Fix typo.
2897 * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
2899 (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
2900 * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
2901 Also modify callers.
2902 * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
2904 2003-03-08 Paul Brook <paul@nowt.org>
2906 * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
2907 (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
2908 * resolve.c (compare_spec_to_ref): Allow full array sections.
2910 2003-03-08 Paul Brook <paul@nowt.org>
2912 * expr.c (g95_simplify_expr): Also simplify array index and
2913 substring expressions.
2914 * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
2915 * trans-array.c (g95_trans_array_bounds): New function.
2916 (g95_trans_auto_array_allocation): Use it.
2917 (g95_trans_assumed_size): Rewrite.
2918 * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
2919 (gfor_fndecl_repack): Remove.
2920 (g95_build_qualified_array): Handle absent upper bounds.
2921 (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
2922 (g95_get_symbol_decl): Update.
2923 (g95_build_intrinsic_function_decls): Initialize new decls.
2924 * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
2925 (gfor_fndecl_repack): Remove.
2926 * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
2927 * trans-types.c: (g95_build_array_type): Merge duplicated code..
2928 (g95_get_nodesc_array_type): Handle absent bounds.
2929 * trans-types.h (g95_get_nodesc_array_type): Declare.
2931 2003-03-04 Paul Brook <paul@nowt.org>
2933 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
2936 2003-03-02 Paul Brook <paul@nowt.org>
2938 * options.c (g95_init_options): Drfault to 1.
2939 (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
2940 * trans-array.c (g95_conv_array_data, g95_conv_array_base,
2941 g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
2942 Handle non-constant size automatic arrays.
2943 (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
2944 generic bound functions.
2945 (g95_trans_auto_array_allocation): Don't create a descriptor.
2946 (g95_trans_assumed_size): New function (broken).
2947 (g95_trans_dummy_array_bias): Remove unused var.
2948 * trans-array.h (g95_trans_assumed_size): Declare.
2949 * trans-decl.c (create_index_var): New fuction.
2950 (g95_build_qualified_array): New function.
2951 (g95_get_symbol_decl): Use it.
2952 (g95_trans_deferred_vars): Handle assumed shape seperately.
2953 * trans-types.c (get_element_type): Handle heap allocated arrays.
2954 (g95_is_nodesc_array): Include non-const size arrays.
2955 (g95_get_nodesc_array_type): Ditto.
2957 2003-02-23 Paul Brook <paul@nowt.org>
2959 * trans-array.c (g95_array_init_size): Should use stride, not size of
2962 2003-02-18 Paul Brook <paul@nowt.org>
2964 * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
2965 after intrinsic function check.
2967 2003-02-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2969 * io.c (match_io): Fix missing return value and remove useless
2971 * match.c (g95_match): Remove useless assignment.
2972 * module.c (parse_string): Remove useless post increment.
2973 * simplify.c (g95_simplify_verify): Remove useless assignment.
2975 2003-02-15 Paul Brook <paul@nowt.org>
2977 * expr.c (restricted_intrinsic): Handle bad values gracefully.
2978 * g95.h (symbol_attribute): Add referenced member.
2979 (g95_symbol): Add dummy_order member.
2980 (g95_set_sym_referenced): Declare.
2981 * match.c (g95_match_assignment, g95_match_call): Use it
2982 * primary.c (match_actual_arg, g95_match_rvalue,
2983 g95_match_variable): Ditto.
2984 * symbol.c (next_dummy_order): New variable.
2985 (g95_set_sym_referenced): New function.
2986 (check_done): New function.
2987 (g95_add_*): Use it.
2988 * trans-decl.c: Make formatting conform to GCC standards.
2989 (g95_defer_symbol_init): Add dummy variables in the right order.
2990 (g95_get_symbol_decl): Only accept referenced variables.
2991 (g95_create_module_variable): Module variables are always required.
2992 (generatr_local_decls): New function.
2993 (generate_local_vars): New function.
2994 (g95_generate_function_code): Use it.
2996 2003-02-13 Paul Brook <paul@nowt.org>
2998 * trans-decl.c (g95_conv_struct_cons): Remove.
2999 (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
3000 * trans-expr.c (g95_conv_structure): New function.
3001 (g95_conv_expr): Use it.
3003 2003-02-09 Paul Brook <paul@nowt.org>
3005 * trans-array.c (g95_array_init_size): Don't evaluate the linit
3006 expressions multiple times.
3007 (g95_trans_auto_arry_allocation): Use pointer not tmp.
3009 2003-02-08 Paul Brook <paul@nowt.org>
3011 * module.c (mio_symtree_ref): Declare as static.
3012 (mio_expr): Remove dead code.
3013 (read_module): Set the symtree link for fixups.
3014 * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
3015 (build_round_expr): ... to this.
3016 (g95_conv_intrinsic_aint): New function.
3017 (g95_conv_intrinsic_function): Use it.
3019 2003-02-08 Paul Brook <paul@nowt.org>
3021 * trans-array.c (g95_trans_array_constructor_value): Use the acutal
3022 offset after modificaton, not the increment expression.
3023 * dependency.c: Kill excess whitespace.
3025 2003-02-07 Sanjiv Gupta <sanjivg@noida.hcltech.com>
3027 * dependency.h: Remove some function declarations.
3028 * dependency.c (get_no_of_elements): Change this function not to
3030 * other: Add comments for all modified functions.
3032 2003-02-06 Paul Brook <paul@nowt.org>
3034 * g95spec.c (lang_specific_functions): Fix initializer warning.
3035 * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
3036 for structure type names.
3037 * trans-decl.c (g95_cons_structure_cons): New function.
3038 (g95_get_symbol_decl): Use it.
3039 * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
3042 2003-02-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3044 * resolve.c (compare_cases): Add const to casts.
3046 2003-01-30 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3048 * g95.h (g95_check_f): Change a1 to f1m.
3049 * intrinsic.c (add_sym_1m, check_specific,
3050 g95_intrinsic_func_interface): Use it.
3052 * module.c (init_pi_tree): Remove useless cast.
3053 (fp2): Fix argument type.
3055 * parse.c (parse_select_block): Add comment.
3057 2003-02-05 Toon Moene <toon@moene.indiv.nluug.nl>
3059 * lang-options.h: Fix warning involving C90 concatenated
3062 2003-02-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
3063 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3065 * io.c (format_asterisk): Complete initializer to kill warning.
3066 * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
3067 DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
3068 (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
3069 new defines to complete initializers. Kills all warnings.
3071 * Make-lang.in: Comment cleanup.
3073 2003-02-05 Paul Brook <paul@nowt.org>
3075 * array.c (g95_free_constructor): Handle NULL expressions.
3076 * resolve.c (resolve_structure_cons): Ditto.
3077 * decl.c (g95_match_null): New Function.
3078 (variable_decl): Use it.
3079 * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
3080 * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
3081 * trans-types.c (g95_set_decl_attributes): Remove empty function.
3083 2003-02-05 Paul Brook <paul@nowt.org>
3085 * trans.h (build1_v): New macro.
3086 (build_v): Remove pointless and incorrect prototype.
3087 * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
3088 * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
3090 2003-02-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
3092 * Make-lang.in (F95_OBJS): Remove one more dead file.
3094 2003-02-01 Paul Brook <paul@nowt.org>
3096 * lang-specs.h: Don't pass -ffixed-form to the linker.
3097 * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
3099 2003-02-01 Paul Brook <paul@nowt.org>
3101 * Make-lang.in (F95_OBJS): Remove dead files.
3102 * trans-array.c (g95_array_init_size): Do the right thing when
3104 * trans-decl.c (g95_generate_function_code): Initialize deffered
3105 symbol list before translating contained subroutines.
3106 * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
3107 scalar invariant values here...
3108 (g95_conv_variable, g95_conv_function_call): ... instead of here ...
3109 * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
3111 2003-01-29 Paul Brook <paul@nowt.org>
3113 * trans-array.c (g95_add_loop_code): Put pre code in the right block.
3114 (g95_walk_elemental_function_args): Reverse chains before adding.
3115 (g95_reverse_ss): Move about a bit.
3116 * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
3119 2003-01-28 Paul Brook <paul@nowt.org>
3121 * intrinsic.c (resolve_intrinsic): Use correct union member.
3122 * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
3124 * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
3125 use associated variables.
3126 * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
3127 * trans-expr.c (g95_conv_expr_present): ... to here.
3128 * trans.h: Declare it.
3129 * trans-types.c (g95_sym_type): Assume subroutine if not specified.
3131 2003-01-28 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3133 * array.c (expand_iterator): Suppress useless assignment.
3134 * decl.c (match_char_spec): Ditto.
3135 * io.c (match_io_iterator): Ditto.
3136 * primary.c (match_real_constant): Ditto.
3137 * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
3138 Ditto. Also, use g95_intrinsic_op not int for intrinsic operators.
3139 * matchexp.c (match_add_operand, match_level_5): Likewise.
3140 * module.c (parse_atom, find_enum): Likewise.
3141 * resolve.c: move #include <string.h>
3142 (resolve_select): Fix serious typo.
3144 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.n>
3146 * Make-lang.in: Don't build with broken tree-ssa-pre.
3148 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.nl>
3150 * resolve.c (resolve_index): Add a TODO.
3151 * symbol.c: Remove useless "#include <ctype.h>".
3153 2003-01-27 Paul Brook <paul@nowt.org>
3155 * check.c (check_rest): Allow different type kinds as an extension.
3156 * g95.h (g95_resolve_f): Add f1m.
3157 * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
3158 * intrinsic.h: Chenge prototypes for MIN and MAX.
3159 * iresolve.c (g95_resolve_minmax): New function.
3160 (g95_resolve_min, g95_resolve_max): Use it.
3161 * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
3163 (g95_conv_intrinsic_present): Fix logic.
3165 2003-01-27 Steven Bossche <s.bosscher@student.tudelft.nl>
3167 * g95.h (g95_case): Don't be a tree, be a double linked list.
3168 * match.c (match_case_selector): Remove redundant semantics check.
3169 Clean up a few goto's to make it a tiny little bit faster.
3170 * resolve.c (case_tree): Die.
3171 (compare_cases): Accept and compare unbounded cases too.
3172 (check_case_overlap): Don't build a tree. Instead, merge-sort the
3173 whole list of g95_cases passed from resolve_select.
3174 (sane_logical_select): Die.
3175 (check_case_expr): Return FAILURE if a CASE label is of the wrong
3177 (resolve_select): Fixup case expression for computed GOTOs, put it
3178 in expr, not expr2, for easier handing in the parse tree dumper and
3179 the code generator. Rewrite the rest of the function: Kill
3180 unreachable case labels and unreachable case blocks.
3181 * dump-parse-tree.c (g95_show_code_node): Always dump expr for
3182 an EXEC_SELECT, not case2 anymore.
3183 * trans-const.c (g95_conv_constant_to_tree): New function.
3184 (g95_conv_constant): Use it.
3185 * trans-const.h: Declare prototype for the new function.
3186 * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
3187 g95_trans_character_select): New static functions.
3188 (g95_trans_select): Rewrite.
3190 2003-01-26 Paul Brook <paul@nowt.org>
3192 * intrinsic.c (add_fnctions): Properly add dreal.
3193 * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
3194 (g95_conv_intrinsic_function): Use it.
3195 * trans-io.c (build_dt): Abort on internal files (unimplemented).
3197 2003-01-26 Paul Brook <paul@nowt.org>
3199 Widespread changes to the handling of symbols in expressions. These
3200 are now linked via g95_symtree nodes.
3201 * parse.c (g95_fixup_sibling symbols): New function.
3202 (parse_contained): Use it.
3203 * g95.h (symbol_attribute): Add contained. Indicates a symbol is a
3204 contained procedure that has bee correctly fixed up.
3205 (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
3207 2003-01-24 Paul Brook <paul@nowt.org>
3209 * trans-array.c (g95_walk_expr): Function result attributes are in
3211 * trans-expr.c (g95_conv_function_call,
3212 g95_trans_arrayfunc_assign): Ditto.
3213 * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
3215 2003-01-23 Steven Bosscher <s.bosscher@student.tudelft.nl>
3217 * expr.c (check_restricted): Fix error message.
3218 * symbol.c (free_st_labels): Plug memleak.
3220 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
3222 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
3223 reduce_binary_aa, reduce_binary, eval_intrinsic,
3224 eval_intrinsic_f2): Use typesafe prototypes for eval functions.
3225 * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
3226 for typesafe intrinsics helper functions.
3227 (g95_intrinsic_sym): Use them.
3228 * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
3229 add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
3230 add_sym_5, add_conv, resolve_intrinsic, do_simplify,
3231 check_specific, g95_intrinsic_func_interface,
3232 g95_intrinsic_sub_interface): Adjust all calls to intrinsics
3234 * trans-decl.c (g95_get_extern_function_decl): Likewise.
3235 * Make-lang.in: Don't disable warnings for strict prototypes
3236 any longer, everything is typesafe now.
3238 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
3240 * bbt.c (duplicate_node): Make static.
3241 * module.c (module_name): Make static.
3242 * scanner.c (include_dirs): Make static.
3244 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
3246 Hard coded _gfor_'s should not show up anymore.
3247 * g95.h (PREFIX): New macro.
3248 * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
3250 (g95_resolve_random_number): Likewise.
3251 * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
3252 * trans-io.c: Remove 'prefix' macro. Replace all uses with
3253 the new PREFIX macro from g95.h.
3255 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
3257 The troubles of forking... Andy implemented this just now too.
3258 Let's stick to that and keep the trees close.
3259 * g95.h (g95_st_label): 'format' member is now a g95_expr.
3260 * io.c: Revert previous changes.
3261 (g95_match_format): Match the format string as a character
3263 * match.h (g95_statement_label): Declare external.
3264 * parse.c: Revert previous changes.
3265 * symbol.c (g95_free_st_label): Free a g95_expr instead
3267 * trans-io.c: Revert previous changes.
3268 (build_dt): Use set_string to set the format string.
3270 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
3272 * io.c (format_string): Make non-static.
3273 (g95_match_format): Remember the format string.
3274 (terminate_io): Add I/O termination for empty I/O lists.
3275 * match.h: Declare external format_string.
3276 * parse.c (check_statement_label): Attack the format string
3277 to a format label for FORMAT statements.
3278 * trans-io.c (g95_add_field): Define prefix macro. Replace
3279 all uses of PREFIX define with a use of this macro.
3280 (build_dt): Implement formatted I/O for format labels.
3282 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
3284 * lang-options.h: Kill "-std=F".
3285 * options.c: Remove unimplemented "-std=F". Modify
3287 * misc.c (g95_terminal_width): New function.
3288 * error.c (g95_error_init_1): Use g95_terminal_width.
3289 * g95.h: Add prototype for g95_terminal_width, remove
3292 2003-01-19 Steven Bosscher <s.bosscher@student.tudelft.nl>
3294 * Make-lang.in: Fix typo.
3296 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
3298 * g95.h (struct g95_case): Remove unused cruft, new member
3299 'where' to keep track of the locus of the default case.
3300 * match.c (g95_match_case): Add locus to the current case.
3301 (match_case_selector): Likewise.
3302 * parse.c (parse_select_block): Move semantics check for
3303 multiple DEFAULT cases out of here to...
3304 * resolve.c (check_case_overlap): ...here. Return sooner
3306 (check_case_expr): Take two g95_cases now, use to sure the
3307 expression kinds are the same.
3308 (resolve_select): Cleanup.
3310 2003-01-18 Paul Brook <paul@nowt.org>
3312 * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
3313 * trans-decl.c (g95_set_symbol_decl): Handle non-array result
3315 (g95_get_extern_function_decl): Put decls in the correct context.
3317 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
3319 * trans-io.c: Port changes from Andy to set ERR flag.
3321 2003-01-17 Paul Brook <paul@nowt.org>
3323 * trans-array.c: Add various comments.
3324 (g95_ss_terminator): Declare as const.
3325 (g95_walk_expr): Remove first parameter and update all callers.
3326 (g95_walk_op_expr): Initialize scalar SS properly.
3327 * trans-array.h (g95_walk_expr): Update prototype.
3328 * trans-expr.c: Update for new g95_walk_expr.
3329 * trans-intrinsic.c: Ditto.
3330 * trans-io.c: Ditto.
3331 * trans.h: Various comments for SS chains.
3333 2003-01-17 Paul Brook <paul@nowt.org>
3335 * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
3337 * intrinsic.c (add_functions): Use them.
3338 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
3339 * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
3341 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
3343 Fallout of a small merge conflict:
3344 * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
3346 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
3348 * initrinsic.c: New add_sym_* functions for strong typing.
3349 (add_conv): Make prototype strict.
3350 * dump-parse-tree.c, dependency.c: Include config.h
3351 * resolve.c, trans-io.c: Fix typos.
3353 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
3355 * dump-parse-tree.c (g95_show_code_node): Show the
3356 condition for a computed GOTO that was transformed
3357 to a SELECT CASE construct.
3358 * resolve.c (check_case_overlap): Revert previous switch
3359 to treaps, it was too slow and didn't catch all trouble.
3360 (resolve_symbol): Be more flexible about module procedures.
3361 * symbol.c (check_conflict): Point to relevant section in
3362 the standard for dubious conflict. Allow procedure
3363 dummy arguments to be optional again.
3364 * trans-io (add_field): Rename to g95_add_field. Change
3366 * trans-stmt (trans_select): Handle unbounded cases for
3367 integer SELECT CASE constructs. Fix/add more comment.
3369 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
3371 * g95.h: Uses GCC's function attribute macros.
3372 * error.c, module.c, parse.c, g95.h: More function attributes.
3374 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
3376 * trans-decl.c (get_label_decl): Use TREE_LINENO instead
3377 of DECL_SOURCE_LINE, and TREE_FILENAME instead of
3380 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
3382 * f95-lang.c (pushdecl): Use TREE_LINENO instead of
3384 * trans.c (g95_trans_code): Use annotate_all_with_file_line
3385 instead of nowdead wrap_all_with_wfl.
3387 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
3389 * parse.c (g95_parse_file): In verbose mode, dump the parse tree
3390 before generating code, so we can still see it even if the code
3391 generation phase dies.
3393 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
3395 * decl.c (build_sym): Split out initialization expression parts...
3396 (add_init_expr_to_sym): ...to here.
3397 (variable_decl): Add the symbol following an attribute list to the
3398 symbol tree before parsing the optional initialization expression
3399 if the symbol is not of a derived type.
3400 * primary.c (g95_match_rvalue): Don't assume a symbol always has
3401 a value if it is a PARAMETER.
3403 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
3405 * misc.c: Don't #include <mcheck.h>
3406 * module.c: Ditto. Kill uses of mtrace, muntrace. If there
3407 ever was a glibc bug, then either this was never reported to
3408 glibc people, or it has been fixed for so long that there's
3409 no information you can find about it, anywhere.
3411 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
3414 * module.c (attr_bits, bt_types, array_spec_types):
3415 Switch 'const' and 'static'.
3416 * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
3418 GNU'ify source code:
3419 * trans-io.c: Numerous fixes, one fixed warning and a few
3420 TODO markers so that we don't forget about them.
3422 2003-01-13 Paul Brook <paul@nowt.org>
3424 * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
3425 * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
3427 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
3428 * match.c (g95_match_stop): Fix dumb == -> != error.
3430 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
3432 * dump-parse-tree.c (show_indent): Add line breaks. This
3433 whole dumping process needs cleanups.
3434 * f95-lang.c (g95_mark_addressable): Fix prototype to match
3435 the langhook. Fix 'return's accordingly.
3436 * g95-support.h: Adjust prototype.
3437 * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
3438 * lang-options.h: Add '-fsyntax-only'.
3439 * options.c (g95_init_options): Init 'no_backend'.
3440 (g95_parse_arg): Deal with '-fsyntax-only'.
3441 * parse.c (g95_parse_file): Do not generate code if 'no_backend'
3444 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
3446 * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
3447 arguments. Also make sure that if a symbol is marked INTRINSIC,
3448 an intrinsic with the symbol's name actually exists.
3449 (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
3450 Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
3451 ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
3453 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
3455 * resolve.c (resolve_contained_functions): Fix condition, don't
3456 throw internal_error if a child namespace has no name. Apparently
3457 this can be the case?
3459 2003-01-11 Paul Brook <paul@nowt.org>
3461 Port changes from Andy's tree:
3462 * g95.h (g95_code): Add stop_code.
3463 * match.c (g95_match_stop): Detter syntax checking.
3464 * resolve.c (resolve_generic_f0): Return match type.
3465 (resolve_generic_f): Remove dead/duplicated code.
3466 (resolve_specific_f): Ditto.
3467 * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
3468 * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
3469 * trans-stmt.c (g95_trans_stop): Handle new STOP format.
3471 2003-01-11 Paul Brook <paul@nowt.org>
3473 * trans-array.c: Various documentation/comment changes.
3474 * trans-stmt.c: Ditto.
3477 2003-01-10 Paul Brook <paul@nowt.org>
3479 * options.c/h: Add -fdump-parse-tree as alias of -v.
3481 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3483 * dump-parse-tree.c (g95_show_namespace): Fixed another
3484 typo. Sorry, it's Friday...
3486 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3489 * trans-array.c, trans-array.h, trans.c, trans-const.c,
3490 trans-const.h, trans-decl.c, trans-expr.c, trans.h
3491 trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
3492 trans-types.c: Fix bogus copyright years, add 2003.
3493 * trans-types.h: Give copyright header.
3495 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3497 * dump-parse-tree.c (g95_show_namespace): Fixed typo.
3498 * expr.c, options.c, scanner.c: Add some more 'const' markers.
3499 * intrinsic.c: Some constant strings moved to read-only memory.
3500 * io.c (format_asterisk): Move to...
3503 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3505 * dump-parse-tree.c (g95_show_namespace): Dump implicit
3506 types for ranges instead of per-letter. Indent the
3507 'CONTAINS' just like everything else.
3508 * resolve.c (resolve_contained_functions): Clarify comment.
3509 Explain non-obvious conditional expression. Improve
3510 diagnostics if tyoe cannot be resolved.
3511 Port semi-fix from Andy's tree:
3512 (was_declared): Move up before first use.
3513 (generic_sym, specific_sym): New functions. Code moved
3514 out if procedure_kind.
3515 (procedure_kind): Simplify using new functions.
3516 (resolve_generic_f): Make sure the functions we find in
3517 a parent namespace is generic.
3518 (resolve_specific_f): Ditto for specific functions.
3520 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3522 * trans-stmt.c, trans.c: Fix some code style issues. Add
3523 some more comment (but still not enough!).
3525 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3527 * symbol.c (flavors, procedures, intents, acces_types,
3528 access_types, ifsrc_types): Make const.
3529 * misc.c (g95_string2code): Make 'm' param 'const'.
3530 * module.c (find_enum, write_atom, mio_name): Make
3532 (attr_bits, bt_types, array_spec_types, array_ref_types,
3533 ref_types, expr_types): Make const.
3534 * g95.h: Adjust external decls.
3536 2003-01-09 Paul Brook <paul@nowt.org>
3538 * Testsuite: Add a load of new cases.
3540 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
3542 * Make-file.in: Add dependency on back end header files;
3543 a parallel build should work now.
3544 * f95-lang-c (lang_identifier): Remove bogus comment.
3545 (g95_be_parse_file): Fix prototype.
3546 (g95_init): Make static.
3547 (g95_finish): Make static.
3548 * error.c (g95_syntax_error): Kill. Make define in...
3549 * g95.h (g95_syntax_error): Define.
3550 (g95.options): Make 'source' member 'const'.
3551 * interface.c (g95_match_interface): Explain
3552 hard-to-read condition.
3553 (g95_match_end_interface): Ditto.
3554 * trans_const.c (g95_build_string_const): Make 's' parameter
3556 * trans_const.h: Adjust protoype accordingly.
3557 * trans-decl.c: Include tree-dump.h
3558 (g95_generate_function_code): Build fixes for recent changes
3559 in the tree-ssa branch.
3561 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
3563 * format.c: Kill, move code from here...
3565 * Make-lang.in: Adjust.
3568 * BUGS: Mention where to submit bugs. Move old content...
3569 * TODO: ...to here. New file.
3571 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
3572 Fix most warnings, and suppress the ones we can't fix for now.
3573 * Make-lang.in: Suppress warnings about bad proto's in g95.h,
3574 these warnings just clutter the screen and there's not much
3575 we can do about them for now anyway.
3576 * check.c, iresolve.c: Mark unused function parameters.
3577 * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
3578 they should be resolved before they get here.
3579 * error.c: Remove unused FILE *status_out.
3580 * f95-lang.c (g95_init): Remove bogus cast.
3581 * Many files: Make things 'const' where required.
3582 * g95.h: Fix prototypes for all modified functions above.
3583 (g95_options): Remove 'object' member.
3585 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
3587 * Make-file.in: Cleanup bogus targets. Add more comment.
3588 * lang-options.h: New option '-w'.
3589 * g95.h: add no_options field to struct g95_options.
3590 * options.c (g95_init_options): Default no_warnings to off.
3591 (g95_parse_arg): Recognise the '-w' switch and its alias,
3593 * error.c (g95_warning, g95_warning_now): Don't emit warning if
3594 no_warning option is set.
3595 * iresolve.c (g95_resolve_shape): Fix warning.
3597 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
3599 * primary.c (g95_next_string_char): Rename next_string_char, and
3600 make static. Adjust callers accordingly.
3601 * resolve.c (resolve_generic_f0): Return try, not match. Adjust
3602 callers accordingly.
3603 * g95.h: Split out all g95_match* functions to...
3604 * match.h: ...here. New file.
3605 * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
3606 matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
3608 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
3610 * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
3611 g95_merge_new_implicit): New functions.
3612 (g95_match_implicit_none, g95_match_implicit): Move from here...
3613 * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
3614 Modify to use the new functions in symbol.c.
3615 * g95.h: Add and move prototypes.
3617 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
3619 * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
3620 node compare function.
3621 (g95_insert_bbt): Likewise.
3622 (g95_insert_bbt_with_overlap): Likewise.
3623 (g95_delete_bbt): Likewise.
3624 (delete_treap): Likewise. Also fix a potential bug when calling it.
3625 * module.c (compare_pointers): Change proto to compare_fn.
3626 (compare_integers): Likewise.
3627 (compare_true_names): Likewise.
3628 (find_true_name): Adjust call to compare_true_names to match proto.
3629 (require_atom, write_atom, mio_name): Fix 'const' warnings.
3630 (init_pi_tree): Make compare a compare_fn instead of (int *).
3631 * resolve.c (compare_cases): Change proto to compare_fn.
3632 * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
3633 it static, and rename to compare_symtree.
3634 (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
3636 * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
3637 of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
3639 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
3640 * Make-lang.in: Fix spaces/tabs issues from previous patch.
3641 * patch.options: Blow away Paul's checkin mistake :-)
3642 * io.c (terminate_io): Fix memory leak (Arnaud).
3644 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
3646 * Make-lang.in: Teach about building DVI, info manual.
3647 * g95.texi: New file.
3649 2003-01-02 Paul Brook <paul@nowt.org>
3651 * trans-array.c (g95_reverse_ss): Make static and don't use.
3652 (g95_conv_ss_descriptor): Don't use g95_loopinfo
3653 (g95_conv_array_parameters): Modify for pointer assignments.
3654 (g95_walk_subexpr): New function.
3655 (g95_walk_expr*): Use it.
3656 * trans-array.h (g95_reverse_ss): Remove prototype.
3657 * trans-expr.c (g95_trans_pointer_assign): Implement.
3658 (Many): Set se.want_pointer before calling g95_conv_array_parameter.
3659 * trans-intrinsic.c: Sync with scalarizer changes.
3660 * trans-io.c: Ditto.
3662 2002-12-29 Paul Brook <paul@nowt.org>
3664 * trans-array.c: Document calling convention for arrays.
3666 2002-12-19 Paul Brook <paul@nowt.org>
3668 * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
3669 assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
3670 optional parameters for some intrinsics.
3671 (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
3672 * trans-expr.c (g95_conv_function_call): Pass NULL for absent
3673 optional parameters.
3674 * trans.h (g95_se): Add ignore_optional flag.
3676 2002-12-15 Paul Brook <paul@nowt.org>
3678 * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
3679 * trans-decl.c (g95_generate_function_code): Use TDI_original.
3681 2002-12-14 Paul Brook <paul@nowt.org>
3683 * trans-stmt.c (g95_trans_call): Use resolved symbol name.
3685 2002-12-12 Paul Brook <paul@nowt.org>
3687 * trans-array.c (g95_trans_array_constructor_subarray): Fully
3688 initialize the scalarizer.
3689 (various): Update to new format of g95_expr->value.constructor.
3691 2002-12-08 Paul Brook <paul@nowt.org>
3693 * trans-array.c (g95_put_offset_into_var): New function.
3694 (g95_trans_array_constructor_subarray): New function.
3695 (g95_trans_array_constructor_value): Use it.
3696 (g95_array_cons_size): Don't abort() on array components.
3698 2002-12-08 Paul Brook <paul@nowt.org>
3700 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
3701 * support.c: Update #includes.
3702 (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
3703 * trans-array.c: Update #includes.
3705 * trans-const.c: Ditto.
3706 * trans-io.c: Ditto.
3707 * trans-types.c: Ditto.
3708 (g95_init_types): Set size_type_node.
3709 * trans-decl.c: Update #includes.
3710 (gfor_fndecl_adjust{l,r}): Declare and initialize.
3711 * trans-stmt.c: Update #includes.
3712 (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
3713 (g95_trans_select): Fix check for unbounded ranges.
3714 * trans-expr.c: Update #includes.
3715 (g95_conv_string_tmp): New function.
3716 (g95_conv_concat_op): Use it.
3717 * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
3718 * Trans-intrisic.c: Update #includes.
3719 (g95_conv_intrinsic_strcmp): New function.
3720 (g95_conv_intrinsic_adjust): Ditto.
3721 (g95_conv_intrinsic_function: Use them.
3723 2002-11-30 Paul Brook <paul@nowt.org>
3725 * trans-array.c (g95_walk_function_expr): Handle non-array return by
3727 * trans-dec.c (g95_build_function_decl): Handle character return
3729 (g95_get_fake_result_decl): Ditto.
3730 (g95_trans_deferred_vars): Ditto.
3731 * trans-expr.c (g95_conv_function_call): Ditto.
3732 (g95_trans_arrayfunc_assign) Limit to array valued functions.
3733 * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
3734 (g95_conv_intrinsic_function): Use it.
3735 * trans-types.c (g95_sym_type): Handle functions returning strings.
3736 (g95_return_by_reference): Ditto.
3737 (g95_get_function_type): Ditto.
3739 2002-11-18 Paul Brook <paul@nowt.org>
3741 * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
3742 requires a temporary.
3743 (g95_trans_select): Handle computed gotos.
3744 * trans-types.c (g95_build_array_type): Warn about non-functional
3745 assumed shape arrays.
3746 * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
3748 * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
3749 (g95_conv_intrinsic_int): New function.
3750 (g95_conv_intrinsic_mod): New function.
3751 (g95_conv_intrinsic_ichar): New function.
3752 (g95_conv_intrinsic_function): Use them.
3753 (g95_conv_intrinsic_dim): Use g95_evaluate_now.
3755 2002-11-17 Toon Moene <toon@moene.indiv.nluug.nl>
3757 * trans-types.c (g95_build_array_type): Assumed
3758 sized arrays can have rank > 1.
3759 * trans.c (g95_trans_code): Remove erroneous
3760 warning about CONTINUE.
3761 * trans-expr.c (g95_conv_variable): Remove
3764 2002-11-15 Paul Brook <paul@nowt.org>
3766 * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
3768 2002-10-31 Paul Brook <paul@nowt.org>
3770 * f95-tree.c: Remove tree copying stuff that's now in gimple.c
3771 * trans-expr.c (g95_conv_component_ref): Handle character string
3773 (g95_conv_string_parameter): Ditto.
3774 * trans-types.c (g95_get_derived_type): Add length decl to caracter
3777 2002-10-10 Paul Brook <paul@nowt.org>
3779 * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
3780 * trans-expr.c (g95_conv_function_call): Remove unreliable return value
3782 * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
3783 (g95_conv_intrinsic_function): Handle size and shape intrinsics.
3784 (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
3785 * trans-types.c (pvoid_type_node): Declare and initialize.
3786 * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
3787 (g95_array_allocate): Fix when base==data.
3788 (g95_conv_array_parameter): Correctly handle reduced rank sections.
3789 * trans-io.c (g95_trans_write): Correctly handle string modifiers.
3791 2002-10-09 Paul Brook <paul@nowt.org>
3793 * (g95_conv_expr_reference): Handle character strings correctly.
3795 2002-10-07 Paul Brook <paul@nowt.org>
3797 (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
3799 * trans-array.c (g95_build_array_initializer): Remove.
3800 (g95_conv_array_initializer): New Function.
3801 (g95_trans_auto_arry_allocation): Cleanup.
3802 (g95_trans_init_character_array): Remove.
3803 * g95spec.c: Link in libgforbegin.
3804 * trans.c (g95_generate_code): Rename main function to MAIN__.
3805 (g95_create_var): New function.
3806 (g95_create_var_np): New function.
3807 (g95_evaluate_now): New function.
3808 (g95_start_block): New function.
3809 (g95_finish_block): New function.
3810 (g95_add_expr_to_block): New function.
3811 (g95_add_block_to_block): New function.
3812 * trans-expr.c (g95_conv_componen_ref): New function.
3813 * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
3814 (F95_OBJS): Add dependency.o.
3815 * f95-lang.c (g95_is_simple_stmt): Remove.
3816 * f95-tree.c (mark_not_simple): New function.
3817 (unshare_all_trees): New function.
3818 (create_tmp_var, create_tmp_alias_var): Remove.
3819 * support.c (declare_tmp_vars, tree_last_decl): Remove.
3820 * trans*: Convert to new IR using GENERIC trees. Don't bother about
3821 SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
3823 2002-10-01 Paul Brook <paul@nowt.org>
3825 * trans-array.c: Add support for descriptorless arrays.
3826 (g95_conv_array_data): New function.
3827 (g95_conv_array_base): New function.
3828 * trans-array.h: Declare these here.
3829 * trans-decl.c(g95_create_mopdule_variable): Perform variable
3830 initialization and creation here.
3831 (g95_create_module_vars): Instead of here.
3832 * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
3833 * trans-intrinsic.c: Ditto.
3834 * trans-types.c (g95_is_nodesc_array): New function.
3835 (g95_get_nodesc_array_type): New function.
3836 (g95_sym_type, g95_get_derived_type): Use them.
3837 * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
3839 2002-09-28 Paul Brook <paul@nowt.org>
3841 * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
3842 * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
3845 2002-09-24 Paul Brook <paul@nowt.org>
3847 * f95-lang.c (listify): Remove declaration.
3848 (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
3850 * f95-tree.c (get_name): New function.
3851 * trans.c (module_namespace): Remove.
3852 * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
3853 * trans-types.c: Ditto.
3855 2002-09-19 Paul Brook <paul@nowt.org>
3857 * trans-array.c (g95_get_array_cons_size): New Function.
3858 (g95_con_ss_startstride): Handle Array constructors.
3859 (g95_conv_loop_setup): Ditto.
3860 (g95_conv_array_parameter): Ditto.
3861 * tras-decl.c (g95_finish_var_decl): Make initializes variables
3864 2002-09-19 Paul Brook <paul@nowt.org>
3866 * trans.c (g95_simple_fold_tmp): Detect variables inside
3868 * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
3870 2002-09-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
3872 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
3874 2002-09-14 Paul Brook <paul@nowt.org>
3876 * trans.c (g95_create_module_variable): Move to trans-decl.c.
3877 * trans-const.c (g95_conv_string_init): New Function.
3878 * trans-const.h: Declare it.
3879 * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
3880 variables. Don't bail on intrinsic symbols.
3881 (get_extern_function_decl): Handle specific intrinsic functions.
3882 * trans-types.c (g95_sym_type): Dummy functions don't return
3884 * trans-array.c (g95_build_array_initializer): New Function.
3885 (g95_trans_auto_array_allocation): Build initializer for static decls.
3886 Don't use mpz_addmul, it's GMP4 only.
3888 2002-09-12 Paul Brook <paul@nowt.org>
3890 * trans-decl.c (g95_generate_code): Fix thinko with return variable.
3891 (g95_get_extern_function_decl, g95_build_function_decl): Mangle
3892 assembler names for module procedures.
3894 2002-09-11 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
3896 * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
3899 2002-09-10 Paul Brook <paul@nowt.org>
3901 * trans-array.c: Change format of G95_SS_TEMP strictures.
3902 (g95_check_fncall_dependancy): New function.
3903 (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
3905 * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
3907 (g95_build_function_decl): Don't assume result arrays are packed.
3908 (g95_trans-deferred-vars): Handle array result variables.
3909 (g95_generate_fuction_code): Clear saved_function_decls.
3910 * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
3912 (g95_trans_arrayfunc_assign): New function.
3913 (g95_trans_assignment): Use it.
3914 * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
3915 (g95_se): Add direct_byref.
3916 * trans-types.c: Use sym->result rather than sym where appropriate.
3917 * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
3918 Update other functions to use this.
3919 (g95_is_intrinsic_libcall): New function.
3920 (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
3921 (g95_walk_intrinsic_function): Ditto.
3923 2002-09-08 Paul Brook <paul@nowt.org>
3925 * trans-types.c: Change rank field to dtype field in array descriptor.
3926 * trans-array.c: Implement filling of dtype array descriptor field.
3927 * trans-intrinsic.c: Fix broken LEN intrinsic.
3929 2002-09-07 Paul Brook <paul@nowt.org>
3931 * trans-intrinsic.c: Remove outdated todo intrinsic list.
3932 (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
3933 (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
3935 2002-09-06 Paul Brook <paul@nowt.org>
3937 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
3938 (gt-f95-trans-types.h): Add dependancy information.
3939 * config-lang.in (gtfiles): Add trans-types.c
3940 * f95-lang.c (g95_be_parse_file): Pass error and warning counts
3941 back to top-level code.
3942 * trans-array.c, trans-types.c: Change format of array descriptor.
3943 (g95_conv_descriptor_dimension): New function.
3944 * trans-types.h (g95_conv_descriptor_rank): define.
3945 * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
3948 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
3950 * trans-array.c, trans-types.c: Add rank information to descriptor.
3952 2002-09-06 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
3954 * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
3956 2002-09-04 Paul Brook <paul@nowt.org>
3958 * f95-lang.c (g95_create_decls): New function.
3959 (g95_init): Move initialization of external decls to above, and call
3960 from g95_be_parse_file.
3961 * trans.c (g95_finish_stmt): Don't amputate the decl chain.
3962 * trans-types.c (g95_init_types): Always name integer and char types.
3963 (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
3965 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
3967 * Make-lang.in: Add options.c to F95_PARSER_OBJS
3969 2002-09-02 Paul Brook <paul@nowt.org>
3971 * g95_generate_code: Clear the attr for __fortran_main.
3972 * trans-types.c (g95_finish_type): New function.
3973 * g95_init_io_state_type: Use g95_finish_type.
3974 * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
3976 2002-09-01 Paul Brook <paul@nowt.org>
3978 * README.backend: Warn about the dangers of extra config.h files.
3979 Remove obsolete libgfor stuff.
3980 * config-lang.in: Add target-libgfor dependancy.
3981 * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
3983 2002-09-01 Toon Moene <toon@moene.indiv.nluug.nl>
3985 * g95_conv_mpz_to_tree: Free storage pointed to by q,
3988 2002-08-30 Paul Brook <paul@nowt.org>
3990 * trans-intrinsic.c (g95_conv_intrinsic_function,
3991 g95_walk_intrinsic_function): Added ANY and ALL.
3992 (g95_conv_intrinsic_anyall): New function.
3993 * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in