1 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
3 * f95-lang.c (set_block): Remove.
4 (gfc_clear_binding_stack): New.
5 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
6 (struct binding_level): Remove block_created_by_back_end.
7 (clear_binding_level): Likewise.
8 (poplevel): Don't handle block_created_by_back_end.
10 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
12 * trans-decl.c (gfc_create_module_variable): Nothing to do if
13 symbol is in common, because we ...
14 (gfc_generate_module_vars): Call gfc_trans_common.
16 2004-07-10 Paul Brook <paul@codesourcery.com>
18 * trans-array.c (gfc_build_null_descriptor): New function.
19 (gfc_trans_static_array_pointer): Use it.
20 * trans-array.h (gfc_build_null_descriptor): Add prototype.
21 * trans-expr.c (gfc_conv_structure): Handle array pointers.
23 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
26 * decl.c (gfc_match_save): Use-associated common block
28 * gfortran.h (gfc_common_head): Add new field 'name'.
29 Fix typo in comment after #endif.
30 * match.c (gfc_get_common): Add new argument from_common,
31 mangle name if flag is set, fill in new field in structure
33 (match_common): Set new arg in call to gfc_get_common,
34 use-associated common block doesn't collide.
35 * match.h (gfc_get_common): Adapt prototype.
36 * module.c (load_commons): Set new arg in call to
38 * symbol.c (free_common_tree): New function.
39 (gfc_free_namespace): Call new function.
40 * trans-common.c (several functions): Remove argument
41 'name', use name from gfc_common_head instead.
43 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
45 * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
46 and RHS match. Return early if the RHS is NULL().
49 * match.c (match_common): Fix error reporting for used common.
52 * trans-expr.c (gfc_conv_structure): Handle initialization
53 of scalar pointer components.
55 * parse.c (decode_statement): Fix matching of BLOCK DATA.
57 * trans-decl.c (generate_local_decl): Remove workaround obsoleted
60 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
62 * trans-common.c: Fix whitespace issues, make variable names
64 (create_common): Additionally, make loop logic more obvious.
66 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
67 Paul Brook <paul@codesourcery.com>
70 * trans-common.c (calculate_length): Remove ...
71 (get_segment_info): Merge into here. Save field type.
72 (build_field): Use saved type.
73 (create_common, new_condition, new_segment, finish_equivalences):
74 Use new get_segment_info.
75 * trans-types.c: Update comment.
77 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
80 * moduele.c (mio_symbol): Don't I/O initial values unless
81 symbol is a parameter.
83 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
86 * resolve.c (resolve_symbol): Verify that the shape of a
87 parameter array is not only explicit, but also constant.
88 * array.c (gfc_is_compile_time_shape): New function.
89 * gfortran.h (gfc_is_compile_time_shape): Add prototype.
91 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
97 * module.c (write_symbol, write_symtree): Remove workaround.
98 * primary.c (match_actual_arglist): Enhance comment.
99 (gfc_match_rvalue): Handle function call with first argument
100 a keyword argument correctly.
101 * resolve.c (resolve_symbol): Change call to
102 gfc_set_default_type to issue error if no implicit type
104 * trans-decl.c (gfc_create_module_variable): Remove workaround.
106 2004-07-08 Paul Brook <paul@codesourcery.com>
108 * intrinsic.c (add_sym_4s): New function.
109 (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
111 2004-07-04 Janne Blomqvist <jblomqvi@cc.hut.fi>
112 Paul Brook <paul@codesourcery.com>
116 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
117 GFC_ISYM_COMMAND_ARGUMENT_COUNT.
118 * intrinsic.c (add_functions): Identify iargc. Add
119 command_argument_count.
120 (add_subroutines): Resolve getarg. Add get_command and
121 get_command_argument.
122 * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
123 gfc_resolve_get_command_argument): Add prototypes.
124 * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
125 gfc_resolve_get_command_argument): New functions.
126 * trans-decl.c (gfor_fndecl_iargc): New variable.
127 (gfc_build_intrinsic_function_decls): Set it.
128 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
129 (gfc_conv_intrinsic_function): Use it.
130 * trans.h (gfor_fndecl_iargc): Declare.
132 2004-07-04 Matthias Klose <doko@debian.org>
134 * Make-lang.in: Generate and install gfortran man page.
135 * invoke.texi: Remove extra '@c man end'.
137 2004-07-04 Richard Henderson <rth@redhat.com>
139 * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
141 2004-07-04 Paul Brook <paul@codesourcery.com>
143 * decl.c (gfc_match_implicit_range): Don't use typespec.
144 (gfc_match_implicit): Handle character selectors.
145 * gfortran.h (gfc_set_implicit): Remove prototype.
146 (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
147 * parse.c (accept_statement): Don't call gfc_set_implicit.
148 * symbol.c (new_ts): Remove.
149 (gfc_set_implicit_none): Use same loop bounds as other functions.
150 (gfc_set_implicit): Remove.
151 (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
152 (gfc_merge_new_implicit): Combine with gfc_set_implicit.
154 2004-06-30 Richard Henderson <rth@redhat.com>
156 * match.c (var_element): Remove unused variable.
158 * trans-decl.c (gfc_generate_function_code): Don't set
159 x_whole_function_mode_p.
160 (gfc_generate_constructors): Likewise.
162 2004-06-30 Richard Henderson <rth@redhat.com>
164 * trans-decl.c (gfc_generate_function_code): Don't set
165 immediate_size_expand.
166 (gfc_generate_constructors): Likewise.
168 2004-06-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
171 * decl.c (gfc_match_type_spec): Rename second argument to
172 'implicit_flag', reverse meaning. Don't match_char_spec if
173 'implicit_flag' is set. Rename to ...
174 (match_type_spec): ... this.
175 (gfc_match_implicit_none, match_implicit_range): Move here
177 (gfc_match_implicit): Move here from match.c, try to
178 match_char_len if match_implicit_range doesn't succeed for
179 CHARACTER implicits. Call renamed fucntion match_type_spec.
180 (gfc_match_data_decl, match_prefix): Call renamed function
182 * match.c (gfc_match_implicit_none, match_implicit_range,
183 gfc_match_implicit): Move to decl.c.
184 * match.h (gfc_match_implicit_none, gfc_match_implicit):
185 Move protoypes to section 'decl.c'.
186 (gfc_match_type_spec): Remove prototype.
188 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
190 * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
193 2004-06-29 Steven Bosscher <stevenb@suse.de>
195 Make sure types in assignments are compatible. Mostly mechanical.
196 * trans-const.h (gfc_index_one_node): New define.
197 * trans-array.c (gfc_trans_allocate_array_storage,
198 gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
199 gfc_trans_array_constructor_value, gfc_trans_array_constructor,
200 gfc_conv_array_ubound, gfc_conv_array_ref,
201 gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
202 gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
203 gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
204 gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
205 types in assignments, conversions and conditionals for expressions.
206 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
207 gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
208 gfc_conv_function_call, gfc_trans_pointer_assignment,
209 gfc_trans_scalar_assign): Likewise.
210 * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
211 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
212 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
213 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
214 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
215 gfc_conv_allocated, gfc_conv_associated,
216 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
217 * trans-io.c (set_string): Likewise.
218 * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
219 gfc_do_allocate, generate_loop_for_temp_to_lhs,
220 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
221 compute_overall_iter_number, gfc_trans_assign_need_temp,
222 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
223 gfc_evaluate_where_mask, gfc_trans_where_assign,
224 gfc_trans_where_2): Likewise.
225 * trans-types.c (gfc_get_character_type, gfc_build_array_type,
226 gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
228 * trans.c (gfc_add_modify_expr): Add sanity check that types
229 for the lhs and rhs are the same for scalar assignments.
231 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
233 * dump-parse-tree.c (show_common): New function.
234 (gfc_show_namespace): Show commons.
236 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
237 Andrew Vaught <andyv@firstinter.net>
241 * decl.c (gfc_match_save): Adapt to new common structures,
242 don't allow saving USE-associated common.
243 * dump-parse-tree (gfc_show_attr): (saved_)common are not
244 symbol attributes any longer.
245 (gfc_show_symbol): Don't show old-style commons any longer.
246 (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
248 * gfortran.h (symbol_attribute): Remove common and saved_common
250 (gfc_symbol): Remove common_head element.
251 (gfc_common_head): New struct.
252 (gfc_get_common_head): New macro.
253 (gfc_symtree): Add field 'common' to union.
254 (gfc_namespace): Add field 'common_root'; change type of field
255 'blank_common' to blank_common.
256 (gfc_add_data): New prototype.
257 (gfc_traverse_symtree): Expect a symtree as first argument
258 instead of namespace.
259 * match.c (gfc_get_common): New function.
260 (match_common_name): Change to take char * as argument, adapt,
261 fix bug with empty name.
262 (gfc_match_common): Adapt to new data structures. Disallow
263 redeclaration of USE-associated COMMON-block. Fix bug with
265 (var_element): Adapt to new common structures.
266 * match.h (gfc_get_common): Declare.
267 * module.c: Add 2004 to copyright years, add commons to module
268 file layout description.
269 (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
270 for removed attributes.
271 (mio_symbol): Adapt to new way of storing common relations.
272 (load_commons): New function.
273 (read_module): Skip common list on first pass, load_commons at
275 (write_commons): New function.
276 (write_module): Call write_commons().
277 * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
278 functions related to removed attributes.
279 (gfc_add_data): New function.
280 (gfc_clear_attr): Don't set removed attributes.
281 (gfc_copy_attr): Don't copy removed attributes.
282 (traverse_symtree): Remove.
283 (gfc_traverse_symtree): Don't traverse symbol
284 tree of the passed namespace, but require a symtree to be passed
285 instead. Unify with traverse_symtree.
286 (gfc_traverse_ns): Call gfc_traverse_symtree according to new
288 (save_symbol): Remove setting of removed attribute.
289 * trans-common.c (gfc_sym_mangled_common_id): Change to
290 take 'char *' argument instead of 'gfc_symbol'.
291 (build_common_decl, new_segment, translate_common): Adapt to new
292 data structures, add new
294 (create_common): Adapt to new data structures, add new
295 argument name. Fix typo in intialization of derived types.
296 (finish_equivalences): Add second argument in call to
298 (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
299 (gfc_trans_common): Adapt to new data structures.
300 * trans-decl.c (gfc_create_module_variables): Remove test for
303 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
305 * io.c: Add 2004 to copyright years.
307 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
308 Andrew Vaught <andyv@firstinter.net>
310 * gfortran.h (gfc_gsymbol): New typedef.
311 (gfc_gsym_root): New variable.
312 (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
313 * parse.c (global_used): New function.
314 (parse_block_data): Check for double empty BLOCK DATA,
315 use global symbol table.
316 (parse_module): Use global symbol table.
317 (add_global_procedure, add_global_program): New functions.
318 (gfc_parse_file): Use global symbol table.
319 * symbol.c (gfc_gsym_root): New variable.
320 (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
323 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
325 * module.c (mio_gmp_real): Correct writing of negative numbers.
327 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
330 * expr.c (check_intrinsic_op): Allow comparison of characters.
333 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
334 Andrew Vaught <andyv@firstinter.net>
336 * decl.c (contained_procedure): New function.
337 (match_end): Verify correctness of END STATEMENT in
340 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
341 Andrew Vaught <andyv@firstinter.net>
344 * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
345 (decode_statement): Enforce required space in free-form.
347 2004-06-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
349 * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
350 * trans-array.c (gfc_conv_descriptor_data): Add operand
352 (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
353 (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
354 (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
355 * trans-common.c (create_common): Likewise.
356 * trans-expr.c (gfc_conv_component_ref): Likewise.
357 * trans-io.c (set_parameter_value): Likewise.
358 (set_parameter_ref, set_string, set_flag, io_result): Likewise.
359 (transfer_expr): Likewise.
360 * trans-decl.c (gfc_trans_auto_character_variable):
361 Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
362 (gfc_gimplify_function): New function.
363 (gfc_generate_function-code): Properly handle nested functions.
364 * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
366 2004-06-22 Janne Blomqvist <jblomqvi@cc.hut.fi>
369 * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
370 (gfc_resolve_inquire): Resolve the iolength tag. Return
371 SUCCESS at end of function if no failure has occured.
372 * resolve.c (resolve_code): Resolve if iolength is encountered.
373 * trans-io.c: (ioparm_iolength, iocall_iolength,
374 iocall_iolength_done): New variables.
375 (last_dt): Add IOLENGTH.
376 (gfc_build_io_library_fndecls ): Set iolength related variables.
377 (gfc_trans_iolength): Implement.
378 (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
380 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de
383 * scanner.c (load_line): Don't truncate preprocessor lines.
384 Reformat error message.
385 (preprocessor_line): Issue warning in case of malformed
388 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
390 * resolve.c (resolve_symbol): Add comment in function body.
391 (check_data_variable): Change type of mark to ar_type, adapt code
394 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
396 * array.c (gfc_insert_constructor): Avoid redundant call to
397 mpz_comp. Add 2004 to copyright years.
399 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
401 * trans.h (stmtblock_t): Change has_scope to unsigned int.
403 2004-06-20 Steven G. Kargl <kargls@comcast.net>
405 * arith.c (gfc_range_check): correct complex underflow.
407 2004-06-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
410 * match.c (match_case_selector): Call gfc_match_init_expr
411 instead of gfc_match_expr.
412 * resolve.c (validate_case_label_expr): No need to check for
413 constant, since it wouldn't have been matched with the fix to
416 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
419 * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
422 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
425 * trans-deecl.c (generate_local_decl): Do not issue warning for
426 unused variables if they're use associated.
428 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
429 Andrew Vaught <andyv@firstinter.net>
432 * gfortran.h (gfc_check_f): Add new field f3ml.
433 * check.c (gfc_check_minloc_maxloc): Take argument list instead
434 of individual arguments, reorder if necessary.
435 * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
436 * intrinsic.c (add_sym_3ml): New function.
437 (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
438 (check_specific): Catch special case MINLOC, MAXLOC.
440 2004-06-14 Paul Brook <paul@codesourcery.com>
442 * intrinsic.c (add_sym_2s): Use correct function types.
444 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
446 * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize. Move data.c
447 * data.c (gfc_get_section_index): Remove dependency on trans.h.
449 2004-06-12 Steven G. Kargl <kargls@comcast.net>
451 * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
452 gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
453 * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
454 GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
455 * trans-intrinsic.c: Use symbols.
456 * intrinsic.c (add_sym_2s): New function.
457 * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
458 * intrinsic.h: Function prototypes.
459 * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
460 gfc_resolve_srand): New functions.
462 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
465 * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
468 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
471 * interface.c (compare_parameter, compare_actual_formal): Don't
472 check types and array shapes for NULL()
473 * trans-expr.c (conv_function_call): No double indirection for
476 2004-06-09 Toon Moene <toon@moene.indiv.nluug.nl>
478 * trans-expr.c (gfc_conv_cst_int_power): Compute
479 x**(-n) by converting it to (1/x)**n instead of
482 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
485 * module.c (write_symbol, write_symtree): Don't write symbols
486 wrongly added to namespace.
487 * trans-decl.c (gfc_create_module_variable): Don't create a
488 backend decl for a symbol incorrectly added to namespace.
490 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
493 * resolve.c (resolve_symbol): Verify that parameter array has an
494 explicit shape. Fix typos and coding style issues in surrounding
497 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
500 * gfortran.texi: The documentation doesn't contain infomration on
501 how to report bugs, and shouldn't, so remove the line which
504 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
506 * intrinsic.c (sort_actual): Keep track of type of missing
507 arguments. (Missing from previous commit.)
509 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
511 * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
512 * interface.c (compare_actual_formal): Keep type of omitted
514 * trans-expr.c (gfc_conv_function_call): Add string length
515 argument for omitted string argument.
517 2004-06-03 Paul Brook <paul@codesourcery.com>
519 * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
520 lists instead of compound expr chains.
521 (gfc_trans_code): Annotate statement lists.
523 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
525 * trans-array.c: Fix spelling in comments.
527 2004-06-02 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
530 * data.c (assign_substring_data_value): New function.
531 (gfc_assign_data_value): Call the new function if we're dealing
532 with a substring LHS.
534 2004-06-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
537 * gfortran.h (GFC_VERSION): Remove.
538 * gfortran.texi (version-gfortran): Remove, replace by version-GCC
541 2004-05-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
543 * trans-types.c: Fix spelling & layout in comments.
545 2004-05-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
548 * trans-const.c (gfc_conv_string_init): Allow variable string
549 length lower than initialization string length.
551 2004-05-30 Paul Brook <paul@codesourcery.com>
554 * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
555 * trans-expr.c (gfc_trans_string_copy): New function.
556 (gfc_conv_statement_function): Use them. Create temp vars. Enforce
558 (gfc_conv_string_parameter): Use gfc_trans_string_copy.
559 * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
560 * trans.h (struct gfc_saved_var): Define.
561 (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
563 2004-05-30 Steven G. Kargl <kargls@comcast.net>
565 * iresolve.c (gfc_resolve_random_number): Clean up conditional.
567 2004-05-29 Steven G. Kargl <kargls@comcast.net>
569 * simplify.c (gfc_simplify_log): Remove useless line of code.
571 2004-05-29 Paul Brook <paul@codesourcery.com>
573 * trans-common.c (find_equivalence): Find multiple rules.
575 2004-05-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
577 * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
578 (gfc_current_locus): Declare new global variable.
579 * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
580 (gfc_current_locus1): Rename ...
581 (gfc_current_locus): ... to this.
582 (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
583 skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
584 gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
585 gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
586 and gfc_current_locus(), respectively.
587 * array.c (match_subscript, gfc_match_array_ref, match_array_list,
588 match_array_cons_element, gfc_match_array_constructor):
589 Read/modify gfc_current_locus instead of calling gfc_set_locus()
590 and gfc_current_locus().
591 * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
592 match_attr_spec, gfc_match_function_decl, gfc_match_end,
593 attr_decl1, gfc_match_save): Likewise.
594 * error.c (error_print, gfc_internal_error): Likewise.
595 * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
596 * interface.c (gfc_add_interface): Likewise.
597 * io.c (gfc_match_format, match_dt_format, match_dt_element,
598 match_io_iterator, match_io): Likewise.
599 * match.c (gfc_match_space, gfc_match_eos,
600 gfc_match_small_literal_int, gfc_match_st_label,
601 gfc_match_strings, gfc_match_name, gfc_match_iterator,
602 gfc_match_char, gfc_match, gfc_match_assignment,
603 gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
604 gfc_match_nullify, gfc_match_call, match_implicit_range,
605 gfc_match_implicit, gfc_match_data, match_case_selector,
606 gfc_match_case, match_forall_iterator): Likewise.
607 * matchexp.c (gfc_match_defined_op_name, next_operator,
608 match_level_1, match_mult_operand, match_ext_mult_operand,
609 match_add_operand, match_ext_add_operand, match_level_2,
610 match_level_3, match_level_4, match_and_operand, match_or_operand,
611 match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
612 * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
613 * parse.c (match_word, decode_statement, next_free, next_fixed,
614 add_statement, verify_st_order, parse_if_block, gfc_parse_file):
616 * primary.c (match_digits, match_integer_constant,
617 match_boz_constant, match_real_constant, match_substring,
618 next_string_char, match_charkind_name, match_string_constant,
619 match_logical_constant, match_const_complex_part,
620 match_complex_constant, match_actual_arg, match_keyword_arg,
621 gfc_match_actual_arglist, gfc_match_structure_constructor,
622 gfc_match_rvalue, gfc_match_variable): Likewise.
623 * st.c (gfc_get_code): Likewise.
624 * symbol.c (check_conflict, check_used, check_done,
625 duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
626 gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
627 gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
629 2004-05-26 Roger Sayle <roger@eyesopen.com>
631 * io.c (format_asterisk): Silence compiler warnings by correcting
632 the number of elements of a "locus" initializer.
634 2004-05-25 Roger Sayle <roger@eyesopen.com>
637 * matchexp.c: Allow unary operators after arithmetic operators
639 (match_ext_mult_operand, match_ext_add_operand): New functions.
640 (match_mult_operand): Tweak to call match_ext_mult_operand.
641 (match_add_operand): Tweak to call match_ext_mult_operand.
642 (match_level_2): Rearrange to call match_ext_add_operand.
644 2004-05-25 Paul Brook <paul@codesourcery.com>
646 * expr.c (check_inquiry): Remove bogus tests.
648 2004-05-23 Paul Brook <paul@codesourcery.com>
651 * expr.c (restricted_args): Remove redundant checks/argument.
652 (external_spec_function): Update to match.
653 (restricted_intrinsic): Rewrite.
655 2004-05-23 Paul Brook <paul@codesourcery.com>
656 Victor Leikehman <lei@haifasphere.co.il>
658 * gfortran.h (struct gfc_symbol): Add equiv_built.
659 * trans-common.c: Change int to HOST_WIDE_INT. Capitalize error
661 (current_length): Remove.
662 (add_segments): New function.
663 (build_equiv_decl): Create initialized common blocks.
664 (build_common_decl): Always add decl to bindings.
665 (create_common): Create initializers.
666 (find_segment_info): Reformat to match coding conventions.
667 (new_condition): Use add_segments.
668 (add_condition, find_equivalence, add_equivalences): Move iteration
669 inside functions. Only process each segment once.
670 (new_segment, finish_equivalences, translate_common): Simplify.
672 2004-05-23 Steven G. Kargl <kargls@comcast.net>
674 * check.c (gfc_check_random_seed): Issue for too many arguments.
676 2004-05-22 Steven G. Kargl <kargls@comcast.net>
678 * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
680 2004-05-22 Paul Brook <paul@codesourcery.com>
682 * dump-parse-tree.c (gfc_show_equiv): New function.
683 (gfc_show_namespace): Use it.
685 2004-05-22 Victor Leikehman <lei@haifasphere.co.il>
688 * symbol.c (gfc_add_common): Disable checks to work around other more
689 fundamental inadequacies.
691 2004-05-22 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
693 * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
695 (gfc_build_function_decl): Likewise.
697 2004-05-22 Steven G. Kargl <kargls@comcast.net>
699 * check.c (gfc_check_system_clock): New function.
700 * intrinsic.c (add_sym_3s): New function.
701 (add_subroutines): Use it.
702 * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
704 * iresolve.c (gfc_resolve_system_clock): New function.
706 2004-05-22 Steven G. Kargl <kargls@comcast.net>
708 * invoke.texi: Document -Wunderflow and spell check.
709 * lang.opt: Add Wunderflow.
710 * gfortran.h (gfc_option_t): Add warn_underflow option.
711 * options.c (gfc_init_options, set_Wall): Use it.
712 * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
713 * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
714 gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
715 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
716 * arith.c (common_logarithm): Fix typo in comment.
718 2004-05-21 Roger Sayle <roger@eyesopen.com>
720 * io.c (check_format): As a GNU extension, allow the comma after a
721 string literal to be optional in a format. Use gfc_notify_std to
722 issue an error/warning as appropriate.
724 2004-05-21 Roger Sayle <roger@eyesopen.com>
726 * io.c (check_format): Use gfc_notify_std to determine whether to
727 issue an error/warning for omitting the digits from the X format.
729 2004-05-20 Roger Sayle <roger@eyesopen.com>
731 * io.c (check_format): Allow the number before the X format to
732 be optional when not -pedantic.
734 2004-05-18 Feng Wang <fengwang@nudt.edu.cn>
735 Paul Brook <paul@codesourcery.com>
737 * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
738 Create decls for __builtin_pow{,f}.
739 * gfortran.h (PREFIX_LEN): Define.
740 * trans-decl.c (gfor_fndecl_math_powi): Add.
741 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
742 (gfc_build_intrinsic_function_decls): Create decls for powi.
743 * trans-expr.c (powi_table): Add.
744 (gfc_conv_integer_power): Remove.
745 (gfc_conv_powi): New function.
746 (gfc_conv_cst_int_power): New function.
747 (gfc_conv_power_op): Use new powi routines.
748 * trans.h (struct gfc_powdecl_list): Add.
749 (gfor_fndecl_math_powi): Add.
750 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
752 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
754 * trans.c, trans-decl.c: Fix comment typos.
756 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
758 * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
760 2004-05-18 Steve Kargl <kargls@comcast.net>
762 * arith.c (gfc_int2complex): Fix incorrect range checking.
764 2004-05-18 Paul Brook <paul@codesourcery.com>
767 * decl.c (add_init_expr_to_sym): Remove incorrect check.
768 (default_initializer): Move to expr.c.
769 (variable_decl): Don't assign default initializer to variables.
770 * expr.c (gfc_default_initializer): Move to here.
771 * gfortran.h (gfc_default_initializer): Add prototype.
772 * resolve.c (resolve_symbol): Check for illegal initializers.
773 Assign default initializer.
775 2004-05-17 Steve Kargl <kargls@comcast.net>
777 * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
779 2004-05-17 Steve Kargl <kargls@comcast.net>
781 * arith.c (gfc_real2complex): Range checking wrong part of complex
784 2004-05-16 Paul Brook <paul@codesourcery.com>
786 * options.c (gfc_handle_module_path_options): Fix buffer overrun.
788 2004-05-16 Paul Brook <paul@codesourcery.com>
790 * arith.c (gfc_range_check): Fix logic error.
792 2004-05-16 Steve Kargl <sgk@troutmask.apl.washington.edu>
794 * arith.c: Fix comment typos.
796 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
799 * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
800 not initialized in a disallowed fashion.
801 * match.c (gfc_match_common): Likewise.
802 (var_element): Verify that variable is not in the blank COMMON,
803 if it is in a common.
805 2004-05-15 Joseph S. Myers <jsm@polyomino.org.uk>
807 * Make-lang.in (f95.generated-manpages): Remove.
809 (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
810 f95.maintainer-clean): Generate info and dvi files in objdir/doc.
813 (f95.install-info): Remove.
816 2004-05-15 Victor Leikehman <lei@haifasphere.co.il>
818 * decl.c (add_init_expr_to_sym): Check for variable size arrays.
820 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
822 * primary.c (match_boz_constant): Use gfc_notify_std() for
823 issuing a warning or an error.
825 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
828 * primary.c (match_structure_constructor): Rename ...
829 (gfc_match_structure_constructor): ... to this. Make non-static.
830 (gfc_match_rvalue): Call renamed function.
831 * match.h (gfc_match_structure_constructor): Declare.
832 * match.c (gfc_match_data_constant): Handle structure
835 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
839 * gfortran.h (gfc_linebuf): New typedef.
841 (gfc_file): Revamped, use new gfc_linebuf.
842 (locus): Revamped, use new types.
843 (gfc_current_file): Remove.
844 (gfc_current_form, gfc_source_file): New global variables.
845 * match.c (gfc_match_space, gfc_match_strings): Use
846 gfc_current_form to find source form.
847 * module.c (gfc_dump_module): Use gfc_source_file when printing
849 * error.c (show_locus, show_loci) Use new data structures to print
851 * scanner.c (first_file, first_duplicated_file, gfc_current_file):
853 (file_head, current_file, gfc_current_form, line_head, line_tail,
854 gfc_current_locus1, gfc_source_file): New global variables.
855 (gfc_scanner_init1): Set new global variables.
856 (gfc_scanner_done1): Free new data structures.
857 (gfc_current_locus): Return pointer to gfc_current_locus1.
858 (gfc_set_locus): Set gfc_current_locus1.
859 (gfc_at_eof): Set new variables.
860 (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
861 to new locus structure.
862 (gfc_check_include): Remove.
863 (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
864 (gfc_skip_comments): Use gfc_current_form, find locus with
866 (gfc_next_char): Use gfc_current_form.
867 (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
868 (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
870 (get_file): New function.
871 (preprocessor_line, include_line): New functions.
872 (load_file): Move down, rewrite to match new data structures.
873 (gfc_new_file): Rewrite to match new data structures.
874 * parse.c (next_statement): Remove code which is now useless. Use
875 gfc_source_form and gfc_source_file where appropriate.
876 * trans-decl.c (gfc_get_label_decl): adapt to new data structures
877 when determining locus of frontend code.
878 * trans-io.c (set_error_locus): Same.
879 * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
880 * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
882 (all): Add missing initializers.
884 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
886 * Make-lang.in (trans-common.o): Remove redundant dependency.
887 (data.c): Replace object file name ...
888 (data.o): ... by the correct one.
890 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
892 * dump-parse-tree.c (gfc_show_array_ref): Print colon only
893 for ranges when dumping array references.
895 2004-05-14 Victor Leikehman <lei@haifasphere.co.il>
897 * decl.c (variable_decl): Always apply default initializer.
899 2004-05-08 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
902 * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
903 handle zero correctly.
905 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
907 * match.c (gfc_match): Eliminate dead code.
909 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
911 * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
912 Detect bad continuation line in fixed form sources.
914 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
917 * iresolve.c (gfc_resolve_nearest): Add new function.
918 * intrinsic.h: ... declare it here.
919 * intrinsic.c (add_functions): ... add it as resolving function
922 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
925 * match.c (gfc_match_do): Allow infinite loops with
926 label-do-stmt. Do not enforce space after comma.
928 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
931 * parse.c (parse_interface): Allow empty INTERFACE, remove
934 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
936 * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
937 decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
938 expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
939 intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
940 matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
941 primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
942 trans-array.c, trans-array.h, trans-common.c, trans-const.c,
943 trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
944 trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
945 trans-types.h, trans.c, trans.h: Update copyright years and
947 * data.c: Likewise, also removed two whitespace-only lines.
948 * gfortranspec.c, lang.opt: Update copyright years.
950 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
953 * trans-decl.c (generate_local_decl): Don't warn for unused
954 variables which are in common blocks.
956 2004-05-13 Diego Novillo <dnovillo@redhat.com>
958 * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
959 trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
960 trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
962 2004-05-13 Victor Leikehman <lei@haifasphere.co.il>
965 * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
967 2004-05-13 Joseph S. Myers <jsm@polyomino.org.uk>
969 * gfortran.texi: Use @table @emph instead of @itemize @emph.
970 Remove "set DEVELOPMENT".
971 (Compiling GFORTRAN): Remove.
973 2004-05-09 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
975 * array.c (match_subscript, match_array_ref): Add comments
976 explaining argument 'init'.
977 * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
978 trans-expr.c, trans.c: Fix some typos in comments.
979 * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
980 * primary.c (match_digits, match_integer_constant): Add comment
983 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
986 * primary.c: Include system.h and flags.h, needed for pedantic.
987 (match_boz_constant): Allow "x" for hexadecimal constants, warn if
990 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
993 * match.c (match_data_constant): Handle case where
994 gfc_find_symbol sets sym to NULL
996 2004-04-28 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
998 * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
999 dependency on mathbuiltins.def
1001 2004-04-24 Victor Leikehman <lei@il.ibm.com>
1003 * trans-io.c (transfer_expr): Implemented recursive printing
1006 2004-04-24 Andrew Pinski <pinskia@physics.uc.edu>
1008 * gfortranspec.c: Do not include multilib.h.
1010 2004-04-24 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1012 * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
1013 2004 to copyright years.
1014 * trans-expr.c, trans-decl.c: Comment update, we now generate
1015 GENERIC, not SIMPLE. Add 2004 to copyright years.
1017 2004-04-24 Paul Brook <paul@codesourcery.com>
1019 * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
1021 2004-04-24 Feng Wang <fengwang@nudt.edu.cn>
1024 * arith.c (gfc_arith_divide): Fix complex divide.
1026 2004-04-23 Andrew Pinski <pinskia@physics.uc.edu>
1028 * gfortranspec.c: Include the target headers.
1030 2004-04-18 Feng Wang <fengwang@nudt.edu.cn>
1034 * arith.c (arctangent2): New function.
1035 * arith.h (arctangent2): Add function prototype.
1036 * simplify.c (gfc_simplify_atan2): Use it.
1037 (gfc_simplify_log): Use it.
1039 2004-04-12 Diego Novillo <dnovillo@redhat.com>
1041 * fortran/f95-lang.c (gfc_expand_stmt): Remove.
1042 (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
1044 2004-04-11 Bud Davis <bdavis9659@comcast.net>
1047 * trans-io.c (build_dt): Change REC to value.
1049 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
1052 * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
1053 the real value when converting mpf to string.
1055 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
1058 * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
1061 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
1064 * simplify.c (simplify_min_max): Convert the type of the result.
1066 2004-04-11 Paul Brook <paul@codesourcery.com>
1068 * gfortran.texi: Use full target triplet.
1070 2004-04-11 Paul Brook <paul@codesourcery.com>
1072 * Make-lang.in (GFORTRAN_TEXI): Set it.
1073 (fortran/dfortran.dvi): Use it. Add fortran to include paths.
1074 (fortran/gfortran.info): Ditto.
1075 * gfortran.texi: Major update.
1076 * invoke.texi: New file.
1078 2004-04-10 Paul Brook <paul@codesourcery.com>
1080 * trans-array.c (gfc_trans_allocate_temp_array,
1081 gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
1082 * trans-decl.c (gfc_build_dummy_array_decl,
1083 gfc_get_symbol_decl, gfc_build_function_decl,
1084 gfc_create_module_variable): Ditto.
1085 * trans-expr.c (gfc_conv_variable): Ditto.
1086 * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
1087 * trans.h (GFC_DECL_STRING): Remove.
1088 (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
1089 GFC_DECL_ASSIGN): Renumber flags.
1091 2004-04-05 Paul Brook <paul@codesourcery.com>
1095 * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
1097 * gfortran.h (struct gfc_charlen): Add backend_decl.
1098 * trans-array.c (gfc_trans_allocate_temp_array,
1099 gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
1100 (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
1101 Remove old, broken string handling.
1102 (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
1103 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
1104 gfc_trans_deferred_array): Handle character arrays.
1105 * trans-const.c (gfc_conv_const_charlen): New function.
1106 * trans-const.h (gfc_conv_const_charlen): Add prototype.
1107 * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
1109 (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
1110 (gfc_create_string_length): New function.
1111 (gfc_get_symbol_decl): Create lengths for character variables.
1112 (gfc_get_fake_result_decl): Ditto.
1113 (gfc_build_function_decl): Only set length for assumed length
1114 character arguments.
1115 (gfc_trans_dummy_character): New function.
1116 (gfc_trans_auto_character_variable): Rewrite.
1117 (gfc_trans_deferred_vars): Handle more types of character variable.
1118 (gfc_create_module_variable): String lengths have moved.
1119 (gfc_generate_function_code): Initialize deferred var chain earlier.
1120 * trans-expr.c (gfc_conv_init_string_length): Rename ...
1121 (gfc_trans_init_string_length): ... to this.
1122 (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
1123 gfc_conv_function_call): Update to new format for character variables.
1124 (gfc_conv_string_length): Remove.
1125 (gfc_conv_string_parameter): Update assertion.
1126 * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
1127 * trans-io.c (set_string): Use new macro names.
1128 * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
1129 * trans-types.c (gfc_get_character_type): Use existing length expr.
1130 (gfc_is_nodesc_array): Make public.
1131 (gfc_get_dtype_cst): Rename ...
1132 (gfc_get_dtype): ... to this. Handle unknown size arrays.
1133 (gfc_get_nodesc_array_type): Use new name.
1134 (gfc_sym_type): New character variable code.
1135 (gfc_get_derived_type): Ditto.
1136 (gfc_get_function_type): Evaluate character variable lengths.
1137 * trans-types.h (gfc_strlen_kind): Define.
1138 (gfc_is_nodesc_array): Add prototype.
1139 * trans.h: Update prototypes.
1140 (struct lang_type): Update comments.
1141 (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
1142 (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
1144 2004-04-04 Paul Brook <paul@codesourcery.com>
1146 * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
1147 * options.c (gfc_init.options, gfc_handle_option): Ditto.
1148 * trans-expr.c (gfc_conv_function_call): Ditto.
1149 * trans-types.c (gfc_is_nodesc_array): Ditto
1150 * lang.opt (fg77-calls): Remove.
1152 2004-04-04 Paul Brook <paul@codesourcery.com>
1154 * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
1155 (gfc_conv_descriptor_base): Rename ...
1156 (gfc_conv_descriptor_offset): ... to this.
1157 (gfc_trans_allocate_array_storage): Set offset to zero.
1158 (gfc_conv_array_base): Rename ...
1159 (gfc_conv_array_offset): ... to this.
1160 (gfc_conv_array_index_ref): Add offset parameter.
1161 (gfc_conv_array_ref): Include offset.
1162 (gfc_trans_preloop_setup): Use existing offset.
1163 (gfc_trans_allocate_temp_array, gfc_array_allocate,
1164 gfc_trans_auto_array_allocation, gfc_trans_g77_array,
1165 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
1166 gfc_conf_ss_descriptor): Set offset.
1167 * trans-array.h: Rename prototypes.
1168 * trans-const.h (gfc_index_zero_node): Define.
1169 * trans-decl.c (gfc_build_qualified_array): Change base to offset.
1170 * trans-types.c (gfc_get_array_type_bounds): Ditto.
1171 (gfc_get_nodesc_array_type): Calculate offset before upper bound.
1173 2004-03-25 Diego Novillo <dnovillo@redhat.com>
1175 * convert.c (convert): Don't handle WITH_RECORD_EXPR.
1177 2004-03-24 Bud Davis <bdavis9659@comcast.net>
1180 * arith.c (gfc_convert_integer,gfc_convert_real): Removed leading '+'
1181 before conversion by gmp library call.
1183 2004-03-24 Bud Davis <bdavis9659@comcast.net>
1186 * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
1188 2004-02-24 Richard Henderson <rth@redhat.com>
1190 * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
1192 2004-02-19 Loren J. Rittle <ljrittle@acm.org>
1194 * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
1195 (fortran/gfortran.info): ... to here.
1198 2004-02-16 Richard Henderson <rth@redhat.com>
1200 * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
1201 * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
1202 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
1203 (gfc_expand_function): Rename from expand_function_body, make static,
1204 don't do anything except invoke tree_rest_of_compilation.
1205 (gfc_be_parse_file): Invoke cgraph.
1206 (gfc_expand_decl): Remove.
1207 (gfc_init_builtin_functions): Add __builtin_init_trampoline and
1208 __builtin_adjust_trampoline.
1209 * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
1210 (gfc_finalize): New.
1211 (gfc_generate_function_code): Use it. Lower nested functions.
1212 * trans-expr.c (gfc_conv_function_call): Add static chain operand
1214 * trans.c (gfc_build_function_call): Likewise.
1215 * trans.h (expand_function_body): Remove.
1217 2004-02-15 Victor Leikehman <lei@il.ibm.com>
1220 * trans-decl.c (gfc_build_function_decl) For functions
1221 returning CHARACTER pass an extra length argument,
1222 following g77 calling conventions.
1223 * trans-types.c (gfc_get_function_type) Ditto.
1224 * trans-expr.c (gfc_conv_function_call) Ditto.
1226 2004-02-14 Paul Brook <paul@codesourcery.com>
1228 * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
1230 2004-02-12 Paul Brook <paul@nowt.org>
1234 2004-02-08 Steve Kargl <sgk@troutmask.apl.washington.edu>
1236 * gfortran.texi: Fix typos.
1238 2004-02-07 Bud Davis <bdavis9659@comcast.net>
1241 * intrinsic.c (add_conversions) Use logical conversion instead
1243 * trans-types.c (gfc_get_logical_type) implemented logical*1
1246 2004-01-17 Paul Brook <paul@codesourcery.com>
1248 * lang-specs.h: Remove %<fixed-form.
1250 2004-01-15 Toon Moene <toon@moene.indiv.nluug.nl>
1252 * lang-specs.h: Enable preprocessing of source files
1253 ending in .F, .fpp, .FPP, .F90 and .F95.
1255 2004-01-13 Toon Moene <toon@moene.indiv.nluug.nl>
1258 * lang-specs.h: Enable compilation of files ending
1259 in .f, .for and .FOR.
1261 2004-01-11 Paul Brook <paul@codesourcery.com>
1263 * trans-stmt.c (gfc_trans_if_1): New function.
1264 (gfc_trans_if): Use it.
1266 2004-01-11 Erik Schnetter <schnetter@uni-tuebingen.de>
1268 * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
1269 (gfc_option_t): Add max_identifier_length.
1270 * lang.opt: Add fmax-identifier-length.
1271 * match.c (parse_name): Use limit.
1272 * options.c (gfc_init_options): Set max_identifier_length.
1273 (gfc_handle_option): Ditto.
1275 2004-01-11 Feng Wang <fengwang@nudt.edu.cn>
1277 * intrinsic.c (add_functions): Add resolve function to dcmplx.
1278 * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
1279 * iresolve.c (gfc_resolve_dcmplx): New function.
1281 2004-01-10 Paul Brook <paul@codesourcery.com>
1283 * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
1284 * trans-types.c (gfc_sym_type): Handle external dummy procedures.
1285 (gfc_return_by_reference): Correct condition.
1286 (gfc_get_function_type): Ditto.
1288 2004-01-10 Paul Brook <paul@codesourcery.com>
1290 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
1293 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
1295 * iresolve.c: Use correct kind.
1297 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
1300 * trans-decl.c (gfc_create_module_variable): Output array valued
1303 2004-01-10 Paul Brook <paul@codesourcery.com>
1305 * resolve.c (resolve_branch): Get error message right way round.
1307 2004-01-10 Canqun Yang <canqun@nudt.edu.cn>
1309 * trans-array (gfc_conv_loop_setup): Adjust comment to track
1311 (gfc_array_allocate): Don't count size of element twice.
1313 2004-01-04 Paul Brook <paul@codesourcery.com>
1315 * lang.opt (i8, r8, std=*): Remove RejectNegative.
1317 2004-01-04 Paul Brook <paul@codesourcery.com>
1319 * error.c (gfc_notify_std): New function.
1320 * gfortran.h (gfc_notify_std): Declare.
1321 (GFC_STD_*): Define.
1322 (gfc_option_t): Add warn_std and allow_std.
1323 * intrinsic.c (gfc_init_expr_extensions): Fix logic.
1324 (gfc_intrinsic_func_interface): Use gfc_notify_std.
1325 * check.c (check_rest): Use gfc_notify_std.
1326 * match.c (gfc_match_pause): Ditto.
1327 (gfc_match_assign): Ditto.
1328 (gfc_match_goto): Ditto.
1329 * resolve.c (resolve_branch): Ditto.
1330 * lang.opt: Add std=<foo> and w.
1331 * options.c (gfc_init_options): Set allow_std and warn_std.
1332 (gfc_handle_option): Handle OPT_std_* and OPT_w.
1334 2004-01-01 Paul Brook <paul@codesourcery.com>
1336 * array.c (gfc_append_constructor): Take constructor, not expression.
1337 * data.c (struct gfc_expr_stack): Remove.
1338 (expr_stack): Remove.
1339 (find_con_by_offset): Rename from find_expr_in_con.
1340 (find_con_by_component): Rename from find_component_in_con.
1341 (gfc_get_expr_stack): Remove.
1342 (gfc_assign_data_value): Rewrite.
1343 (gfc_expr_push): Remove.
1344 (gfc_expr_pop): Remove.
1345 (gfc_advance_section): Rename from
1346 gfc_modify_index_and_calculate_offset. Handle unbounded sections.
1347 (gfc_get_section_index): Handle unbounded sections.
1348 * gfortran.h: Update prototypes.
1349 * resolve.c (check_data_variable): Array section maight not be the
1352 2004-01-01 Paul Brook <paul@codesourcery.com>
1355 * resolve.c (resolve_symbol): Allow assumed length function results.
1357 2004-01-01 Steve Kargl <sgk@troutmask.apl.washington.edu>
1359 * match.c (gfc_match_pause): Fix spelling.
1361 2004-01-01 Steven Bosscher <stevenb@suse.de>
1364 * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
1365 reference from the expression.
1367 2003-12-26 Feng Wang <fengwang@nudt.edu.cn>
1369 * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
1371 * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
1372 (gfc_exec_op): New EXEC_LABEL_ASSIGN.
1373 (symbol_attribute):New variable attribute: assign.
1374 * io.c (resolve_tag):Integer variable is allowed.
1375 (match_dt_format): Add ASSIGN statement. Set assign flag.
1376 * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
1377 (gfc_match_assign): Add ASSIGN statement. Set assign flag.
1378 (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
1379 * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
1380 (next_statement): Add ST_LABEL_ASSIGNMENT.
1381 (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
1382 * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
1383 (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
1384 * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
1385 * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
1386 assign. Put them into the stuct lang_decl.
1387 * trans-io.c (set_string): Add the assign statement.
1388 * trans-stmt.c (gfc_trans_label_assign): New function.
1389 (gfc_trans_goto): Translate ASSIGNED GOTO statement.
1390 * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
1391 * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
1392 * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
1393 (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
1394 (GFC_DECL_ASSIGN(node)): New macro to access flag.
1396 2003-12-31 Huang Chun <chunhuang73@hotmail.com>
1399 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
1402 2003-12-22 Toon Moene <toon@moene.indiv.nluug.nl>
1404 * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
1405 that arguments to subroutines/functions can't alias themselves, nor global
1408 2003-12-20 Steven Bosscher <stevenb@suse.de>
1410 * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
1411 * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
1413 2003-12-12 Huang Chun <chunhuang73@hotmail.com>
1415 * primary.c (match_substring): Fix substring bug for start point
1416 or end point is NULL.
1417 * trans-expr.c (gfc_conv_substring): Ditto
1418 * trans-types.c (gfc_sym_type): Get correct type of scalar
1419 character variables.
1420 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
1423 2003-12-10 Richard Henderson <rth@redhat.com>
1425 * options.c (gfc_post_options): Don't ever use rtl inlining.
1427 2003-12-05 Canqun Yang <canqun@nudt.edu.cn>
1429 * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
1430 * trans-equivalence.c: Remove.
1431 * trans-decl.c (gfc_get_symbol_decl): Update to match.
1432 (gfc_generate_function_code): Ditto.
1433 * trans-array.c (gfc_conv_array_parameter): Ditto.
1434 * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
1435 (F95_ADDITIONAL_OBJS): Add stor-layout.o
1436 * trans.h (gfc_trans_equivalence): Remove.
1437 * gfortran.h (struct gfc_equiv): Add used field.
1438 (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
1439 equiv_offset fields.
1441 2003-12-05 Richard Henderson <rth@redhat.com>
1443 * trans.c (gfc_build_addr_expr): New.
1444 (gfc_build_indirect_ref, gfc_build_array_ref): New.
1445 * trans.h: Declare them.
1446 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
1447 trans-stmt.c, trans.c (*): Use them.
1449 * f95-lang.c (gfc_post_options): Remove dead prototype.
1450 * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
1451 * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
1454 2003-12-01 Feng Wang <fengwang@nudt.edu.cn>
1456 * io.c (gfc_match_format): Check for missing format label.
1458 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
1461 * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
1462 from interfaces in modules.
1464 2003-11-30 Paul Brook <paul@nowt.org>
1466 * trans-array.c (gfc_trans_g77_array): Make non-static.
1467 (gfc_trans_assumed_size): Remove.
1468 (gfc_trans_dummy_array_bias): Explicitly free temporary.
1469 * trans-array.h (gfc_trans_g77_array): Add prototype.
1470 (gfc_trans_assumed_size): Remove.
1471 * trans-decls.c (gfor_fndecl_push_context): Remove.
1472 (gfor_fndecl_pop_context): Remove.
1473 (gfc_build_function)decls): Don't create them.
1474 (gfc_trans_deferred_vars): Update to match. Remove dead code.
1475 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
1477 2003-11-30 Kejia Zhao <kejia_zh@nudt.edu.cn>
1479 * trans-array.c (gfc_conv_array_parameter): Simplify
1480 array argument passing for array name actual argument.
1481 * trans-expr.c (gfc_conv_function_call): Ditto
1482 * trans-types.c (gfc_is_nodesc_array):Ditto.
1484 2003-11-30 Paul Brook <paul@nowt.org>
1486 * f95-lang.c (gfc_post_options): Move ...
1487 * options.c (gfc_post_options): .. to here. Handle inlining options.
1488 * gfortran.h (gfc_post_options): Add prototype.
1490 2003-11-28 Richard Henderson <rth@redhat.com>
1492 * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
1494 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
1496 * trans.h (has_alternate_specifier): New global variable.
1497 * match.c (gfc_match_call): Handle actual arguments associated with
1498 alternate return indicators.
1499 * trans-expr.c (gfc_conv_function_call): Ditto
1500 * trans-stmt.c (gfc_trans_call): Ditto
1501 (gfc_trans_return): Handle return statement with value.
1502 * trans-decl.c (gfc_generate_function_code): Handle functions with
1504 (gfc_get_fake_result_decl): Ditto
1505 * trans-types.c (gfc_get_function_type): Ditto
1506 * resolve.c (resolve_actual_arglist): Check alternate return indicators.
1507 (resolve_formal_arglist): Check asterisk dummy.
1509 2003-11-27 Paul Brook <paul@nowt.org>
1511 * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
1512 allocation interface.
1513 (gfc_conv_ array_parameter): Ditto.
1514 (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
1515 * trans-array.c: Update prototype.
1516 * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
1517 (gfc_trans_auto_character_variable): Use new memory alloc interface.
1518 * trans-expr.c (gfc_conv_string_tmp): Ditto.
1519 (gfc_conv_function_call): Use gfc_conv_string_tmp.
1520 * trans-stmt.c (gfc_do_allocate): Use new memory alloc interface.
1521 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
1522 * trans.h (gfc_ss_info): Remove unused pdata field.
1523 * trans.c (gfc_create_var_np): Change T to V.
1525 2003-11-26 Richard Henderson <rth@redhat.com>
1527 * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
1528 * trans-intrinsic.c (gfc_intrinsic_map): ... here. Add SCALE,
1529 FRACTION, NEAREST, SET_EXPONENT.
1530 (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
1531 Fix GTY marking. Remove unnecessary const's.
1532 (LIBM_FUNCTION): Rename from I_LIB.
1533 (LIBF_FUNCTION): New.
1534 (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
1535 conventions. Assume the expr signature is correct. Mark const.
1536 (gfc_conv_intrinsic_exponent): Use library functions.
1537 (gfc_conv_intrinsic_set_exponent): Remove.
1538 (gfc_conv_intrinsic_scale): Remove.
1539 (gfc_conv_intrinsic_nearest): Remove.
1540 (gfc_conv_intrinsic_fraction): Remove.
1541 (gfc_conv_intrinsic_function): Update.
1542 * trans-decl.c (gfor_fndecl_math_exponent4): New.
1543 (gfor_fndecl_math_exponent8): New.
1544 (gfc_build_intrinsic_function_decls): Set them.
1545 * trans.h: Declare them.
1547 2003-11-25 Canqun Yang <canqun@nudt.edu.cn>
1549 * trans-common.c (gfc_layout_global_equiv): Locate the error for
1550 underflow COMMON block.
1551 (gfc_trans_one_common): Fix bug for size of COMMON block containing
1552 EQUIVALENCE object. Also fix typo in an error message.
1554 2003-11-25 Diego Novillo <dnovillo@redhat.com>
1556 * Make-lang.in: Add check-gfortran to lang_checks.
1557 (check-f95): Alias for check-gfortran.
1559 2003-11-25 Jason Merrill <jason@redhat.com>
1561 * Make-lang.in (f95.tags): Create TAGS.sub files in each
1562 directory and TAGS files that include them for each front end.
1564 2003-11-24 Paul Brook <paul@nowt.org>
1567 * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
1569 2003-11-24 Paul Brook <paul@nowt.org>
1571 * expr.c (simplify_const_ref): Return SUCCESS for things we don't
1573 * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
1575 2003-11-24 Paul Brook <paul@nowt.org>
1578 * array.c (gfc_array_ref_shape): Handle elemental dimensions.
1579 * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
1581 2003-11-20 Richard Henderson <rth@redhat.com>
1583 * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
1584 (gfc_conv_array_base): Likewise.
1585 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
1586 * trans-expr.c (gfc_conv_string_tmp): Likewise.
1587 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
1588 * trans-stmt.c (gfc_trans_character_select): Likewise.
1590 2003-11-13 Paul Brook <paul@nowt.org>
1592 * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
1594 2003-11-13 Canqun Yang <canqun@nudt.edu.cn>
1596 * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
1597 (resolve_equivalence): New function.
1598 (resolve_equivalence_derived): New function.
1600 2003-11-12 Richard Henderson <rth@redhat.com>
1602 * trans.c (gfc_trans_code): Use annotate_with_locus instead of
1603 annotate_all_with_locus.
1605 2003-11-11 Canqun Yang <canqun@nudt.edu.cn>
1607 * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
1608 * trans-decl.c (gfc_finish_var_decl): Modified.
1610 2003-11-08 Paul Brook <paul@nowt.org>
1613 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
1616 2003-11-06 Paul Brook <paul@nowt.org>
1618 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
1620 2003-11-02 Canqun Yang <canqun@nudt.edu.cn>
1622 * match.c (gfc_match_stopcode): Assign '0' to stop_code.
1624 2003-10-27 Anthony Green <green@redhat.com>
1626 * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
1627 (f95.stagefeedback): Ditto.
1629 2003-10-27 Andrew Pinski <pinskia@physics.uc.edu>
1632 * Make-lang.in (f95.stageprofile): Add.
1633 (f95.stagefeedback): Add.
1635 2003-10-23 Richard Henderson <rth@redhat.com>
1637 * f96-lang.c (gfc_gimplify_expr): Remove.
1638 (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
1639 (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
1641 2003-10-23 Richard Henderson <rth@redhat.com>
1643 * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
1645 2003-10-20 Paul Brook <paul@nowt.org>
1647 * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
1648 * trans-stmt.c (gfc_trans_do_while): Ditto.
1650 2003-10-17 Paul Brook <paul@nowt.org>
1652 * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
1654 2003-10-17 Paul Brook <paul@nowt.org>
1656 * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
1658 2003-10-17 Feng Wang <wf_cs@yahoo.com>
1660 * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
1661 (gfc_resolve_minloc): Ditto.
1662 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
1663 Return the value after subtracting the lower bound.
1665 2003-10-16 Richard Henderson <rth@redhat.com>
1667 * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
1669 2003-10-16 Steven Bosscher <steven@gcc.gnu.org>
1671 * lang.c: Remove -M option for now, it's in the way for C.
1673 2003-10-14 Jason Merrill <jason@redhat.com>
1675 * Make-lang.in (f95.tags): New rule.
1677 2003-10-13 Richard Henderson <rth@redhat.com>
1679 * trans.c (gfc_trans_code): Use annotate_all_with_locus.
1681 2003-10-13 Paul Brook <paul@nowt.org>
1683 * trans-decl.c (generate_local_decl): Don't create junk variables.
1685 2003-10-13 Paul Brook <paul@nowt.org>
1687 * resolve.c (resolve_formal_arglist): Use function result decl in
1688 preference to function decl.
1690 2003-10-12 Richard Henderson <rth@redhat.com>
1692 * f95-lang.c (gfc_define_builtin): New const_p argument. Set
1693 TREE_READONLY. Update all callers.
1695 2003-10-12 Feng Wang <wf_cs@yahoo.com>
1697 * iresolve.c (gfc_resolve_cshift): Change to match implementation.
1698 * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
1699 (gfc_is_intrinsic_libcall): Add CSHIFT.
1701 2003-10-12 Richard Henderson <rth@redhat.com>
1703 * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
1704 (gfc_trans_array_constructor_value): Likewise.
1705 (gfc_conv_array_initializer): Likewise.
1706 * trans-stmt.c (gfc_trans_character_select): Likewise.
1708 2003-11-12 Kejia Zhao <kejia_zh@yahoo.com.cn>
1710 * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
1712 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
1714 * check.c (gfc_check_repeat): Check arguments are scalar.
1715 (gfc_check_trim): New function.
1716 * intrinsic.h (gfc_check_trim): Add prototype.
1717 * intrinsic.c (add_functions): Use it.
1718 * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
1720 * trans-decl.c: Ditto.
1721 (gfc_build_intrinsic_fucntion_decls): Set them.
1722 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
1723 (gfc_conv_intrinsic_trim): New function.
1724 (gfc_conv_intrinsic_repeat): New function.
1725 (gfc_conv_intrinsic_function): Use them.
1727 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
1729 * trans-types.c (gfc_sym_type): Handle result variables.
1731 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
1733 * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
1734 gfc_get_character_type.
1736 2003-10-11 Feng Wang <wf_cs@yahoo.com>
1738 * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
1740 2003-10-11 Paul Brook <paul@nowt.org>
1742 * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
1743 (gfc_resolve_dprod): New function.
1744 (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
1745 * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
1746 (gfc_resolve_dprod): Declare.
1747 * intrinsic.c (add_functions): Use them.
1748 * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
1750 2003-10-06 Richard Henderson <rth@redhat.com>
1752 * f95-lang.c (gfc_init_builtin_functions): Add clzll.
1753 * trans-intrinsic.c (call_builtin_clz): Use it.
1755 2003-10-05 Paul Brook <paul@nowt.org>
1757 * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
1758 * trans-decl.c (gfc_generate_function_code): Set
1759 cfun->function_end_locus.
1761 2003-09-24 Jason Merrill <jason@redhat.com>
1763 * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
1766 2003-09-21 Lifang Zeng <zlf605@hotmail.com>
1767 Paul Brook <paul@nowt.org>
1769 * Make-lang.in (F95_OBJS): Add fortran/data.o.
1770 * array.c (gfc_inser_constructor): New function.
1771 (gfc_get_constructor): New function.
1772 (gfc_free_constructor): Initialize offset and repeat.
1773 (iterator_stack): Remove.
1774 (expand_info): Add offset, component and repeat fields.
1775 (expand_constructor): Set them.
1776 (expand): Set new fields.
1777 (gfc_copy_constructor): Ditto. Avoid recursion.
1778 * gfortran.h: Add prototypes for new functions.
1779 (gfc_constructor): Add offset, component and repeat.
1780 (iteratio_stack): Move to here.
1781 * resolve.c (check_data_variable): Convert data values into variable
1783 (traverse_data_list): Build implicit loop chain.
1784 (gfc_resolve): Ditto.
1785 * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
1786 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
1787 * trans-expr.c (gfc_conv_structure): Handle array initializers.
1788 (gfc_conv_expr): Update to match.
1789 * trans.h (gfc_conv_structure): Declare.
1792 2003-09-20 Kejia Zhao <kejia_zh@yahoo.com.cn>
1794 * trans.h: Add declarations for gfor_fndecl_si_kind and
1795 gfor_fndecl_sr_kind.
1796 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
1797 * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
1798 (g95_conv_intrinsic_sr_kind): New function.
1799 (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
1802 2003-09-17 Lars Segerlund <Lars.Segerlund@comsys.se>
1804 * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
1805 instead of _4 and _8 as postfix for libgfortran calls.
1807 2003-09-16 Paul Brook <paul@nowt.org>
1809 * array.c (compare_bounds): New function.
1810 (gfc_compare_array_spec): Use it.
1812 2003-09-14 Paul Brook <paul@nowt.org>
1814 * primary.c (gfc_match_rvalue): Make sure sym->result is set.
1815 * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
1817 2003-09-14 Paul Brook <paul@nowt.org>
1819 * check.c (dim_rank_check): Allow assumed bounds if requested.
1820 (gfc_check_lbound): Call it.
1821 (gfc_check_ubound): Ditto.
1822 (gfc_check_size): Change to match.
1823 * simplify.c (gfc_simplify_bound): New function.
1824 (gfc_simplify_lbound): New function.
1825 (gfc_simplify_ubound): New function.
1826 * intrinsic.h: Declare them.
1827 * intrinsic.c (add_functions): Use them.
1829 2003-09-14 Paul Brook <paul@nowt.org>
1831 * io.c (format_lex): Initialize negative_flag.
1832 (check_format): Intialize repeat.
1833 * trans-io.c (gfc_new_nml_name_expr): Declare static.
1834 (gfc_new_var_expr): Ditto.
1836 2003-09-14 Paul Brook <paul@nowt.org>
1838 * trans-array.c (gfc_conv_array_initializer): Handle derived types.
1839 * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
1841 2003-09-12 Paul Brook <paul@nowt.org>
1843 * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
1845 2003-09-12 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
1847 * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
1848 for a correct expression.
1850 2003-09-10 Kejia Zhao <kejia_zh@yahoo.com.cn>
1852 * trans-intrinsic.c (real_compnt_info): New struct.
1853 (prepare_arg_info): New function.
1854 (gfc_conv_intrinsic_set_exponent): New function.
1855 (gfc_conv_intrinsic_scale): New function.
1856 (gfc_conv_intrinsic_nearest): New function.
1857 (gfc_conv_intrinsic_fraction): New function.
1858 (gfc_conv_intrinsic_exponent): New function.
1859 (gfc_conv_intrinsic_spacing): New function.
1860 (gfc_conv_intrinsic_rrspacing): New function.
1861 (gfc_conv_intrinsic_function): Use them.
1863 2003-08-24 XiaoQiang Zhang (zhangapache@yahoo.com>
1865 * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
1866 build_int_2 changed from (high, low) to (low, high).
1867 * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
1868 ioparm_namelist_read_mode, iocall_set_nml_val_int,
1869 iocall_set_nml_val_float, iocall_set_nml_val_char,
1870 iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
1871 (gfc_build_io_library_fndecls): Add variable initialization.
1872 (gfc_new_nml_name_expr, get_new_var_expr): New function.
1873 (build_dt): Add namelist support.
1874 * io.c (value): New variable.
1875 (check_format): Support FMT_H now.
1877 2003-09-07 Paul Brook <paul@nowt.org>
1879 * io.c (gfc_resolve_dt): Error if format label is not defined.
1881 2003-09-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
1883 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
1884 about case_switch's break. The other is about building the condition
1885 statement tree, which judges the argument in the range of the
1886 corresponding integer type.
1887 * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
1888 for the large values.
1890 2003-09-05 Paul Brook <paul@nowt.org>
1892 * f95-lang.c (expand_function_body): Gimplify the function.
1894 2003-09-04 Jeff Law <law@redhat.com>
1896 * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
1899 2003-09-04 Paul Brook <paul@nowt.org>
1901 * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
1902 (gfc_expand_stmt): New function.
1903 (LANG_HOOKS_RTL_EXPAND_STMT): Define.
1904 (expand_function_body): Use tree_rest_of_compilation.
1905 * trans-decl.c (gfc_generate_function_code): Don't free cfun.
1907 2003-09-03 Jeff Law <law@redhat.com>
1909 * f95-lang.c (gfc_init_builtin_functions): C arrays start at
1912 2003-08-30 Paul Brook <paul@nowt.org>
1914 * f95-lang.c (builtin_function): Remove #if 0 code.
1915 (gfc_define_builtin): New function.
1916 (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
1917 * mathbuiltins.def: New file.
1918 * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
1919 (gfc_intrinsic_map): Use mathbuiltins.def.
1920 (gfc_intrinsic_builtin_t): Remove.
1921 (gfc_build_intrinsic_lib_fndecls): Update.
1922 * trans-types.c (gfc_init_types): Remove redundant initilaization of
1923 signed_size_type_node.
1925 2003-08-29 Paul Brook <paul@nowt.org>
1927 * arith.c (gfc_real_kinds): Use correct minimum exponents.
1929 2003-08-22 Kejia Zhao <kejia_zh@yahoo.com.cn>
1931 * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
1932 (gfc_conv_intrinsic_function): Add MODULO.
1934 2003-08-22 Jason Merrill <jason@redhat.com>
1936 * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
1938 2003-08-22 Andreas Jaeger <aj@suse.de>
1940 * Make-lang.in (f95.install-common): Add DESTDIR support.
1941 * (f95.install-info): Likewise.
1942 (f95.uninstall): Likewise.
1944 2003-08-19 Diego Novillo <dnovillo@redhat.com>
1946 * trans-types.c (gfc_init_types): Initialize
1947 signed_size_type_node with size_type_node.
1949 2003-08-18 Paul Brook <paul@nowt.org>
1951 * dependency.c (gfc_dependency): New enum.
1952 (check_another_array_ref): Remove.
1953 (gfc_get_array_from_component): Remove.
1955 (get_range): Remove.
1956 (get_no_of_elements): Use mpz_t, not mpf_t.
1957 (transform_sections): New function.
1958 (gfc_check_range_range): Rename ...
1959 (gfc_check_section_vs_section): ... to this. Use new function.
1960 (gfc_is_inside_range): Rewrite to match.
1961 (gfc_check_element_vs_section): Ditto.
1962 (gfc_check_element_vs_element): Ditto.
1964 (gfc_dep_resolver): Ditto. Remove unused parameter.
1965 * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
1966 gfc_check_element_vs_element, gfc_is_inside_range,
1967 gfc_get_array_from_component): Remove prototypes for static functions.
1968 (gfc_dep_resolver): Update prototype.
1969 * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
1971 2003-08-15 Paul Brook <paul@nowt.org>
1973 * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
1974 return values to parent scope.
1975 (gfc_build_dummy_array_decl): Ditto.
1977 2003-08-14 Paul Brook <paul@nowt.org>
1979 * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
1980 size of the type, not the pointer.
1981 * resolve.c (resolve_symbol): Give more accurate error message.
1983 2003-08-10 Paul Brook <paul@nowt.org>
1985 * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
1987 2003-08-10 Paul Brook <paul@nowt.org>
1989 * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
1992 2003-08-10 Chun Huang <compiler@sohu.com>
1994 * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
1995 (resolve_symbol): Ditto.
1996 * trans-expr.c (gfc_conv_statement_function): New function.
1997 (gfc_conv_function_expr): Use it.
1999 2003-08-10 Paul Brook <paul@nowt.org>
2001 * trans-array.c (gfc_conv_ss_startstride): Handle functions.
2002 (walk_function_expr): Set section rank.
2003 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
2005 2003-08-10 Paul Brook <paul@nowt.org>
2007 * intrinsic.c (add_sym): Prefix names with correct string.
2008 (add_sym_0s): New function.
2009 (add_subroutines): Register abort.
2011 2003-08-10 Erik Schnetter <schnetter@uni-tuebingen.de>
2013 * gfortran.h: Introduce options to control the mangling.
2014 * lang.opt: Likewise.
2015 * options.c (gfc_init_options): Handle the options.
2016 * trans-common.c (gfc_sym_mangled_common_id): New function.
2017 (gfc_build_common_decl): Call it.
2018 * trans-decl.c (gfc_sym_mangled_function_id): New function.
2019 (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
2021 2003-08-09 Paul Brook <paul@nowt.org>
2023 * module.c (mio_symbol): Always ouput a namespace for formal args.
2024 (load_needed): Namespace now belong to their proper symbol.
2025 (gfc_dump_module): Change G95=>GFORTRAN.
2027 2003-08-05 Paul Brook <paul@nowt.org>
2029 * options.c: Force -fg77-calls.
2031 2003-08-02 Paul Brook <paul@nowt.org>
2033 * Makelang.in: Rename G95_* to GFORTRAN_*.
2034 * All sources: Rename G95_* to GFC_*.
2036 2003-08-01 Paul Brook <paul@nowt.org>
2038 * fortran/Make-lang.in: Use GMPLIBS.
2039 * fortran/config-lang.in: Set need_gmp.
2040 * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
2042 2003-07-27 Andreas Jaeger <aj@suse.de>
2044 * trans-decl.c (gfc_generate_constructors): Convert prototype to
2046 * trans-const.c (gfc_init_constants): Likewise.
2047 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
2049 * gfortranspec.c: Convert to ISO C90.
2050 (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
2052 2003-07-26 Paul Brook <paul@nowt.org>
2054 * lang.opt: Add -fdump-parse-tree.
2055 * options.c (gfc_handle_option): Ditto.
2056 * resolve.c (resolve_forall_iterators): Convert to proper type.
2057 * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
2059 2003-07-26 Paul Brook <paul@nowt.org>
2061 * Makefile.in: Add build dependencies on files common with rest of gcc.
2063 2003-07-26 Lifang Zeng <zlf605@hotmail.com>
2065 * trans.h: Declare g95_trans_pointer_assignment.
2066 * trans-expr.c (g95_trans_pointer_assignment): New function.
2067 (g95_trans_pointer_assign): Use it.
2068 * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
2069 (g95_trans_pointer_assign_need_temp): New function.
2071 2003-07-26 Paul Brook <paul@nowt.org>
2073 * gfortran.texi: Replace references to g95.
2075 2003-07-26 Paul Brook <paul@nowt.org>
2077 Rename g95_* to gfc_*.
2079 2003-07-25 Paul Brook <paul@nowt.org>
2081 * gfortran.h: Rename from g95.h.
2082 * trans-types.c (boolean_type_node, booelan_true_node,
2083 boolean_false_node): Remove.
2084 * trans-types.h: Ditto.
2086 2003-07-25 Chun Huang <compiler@sohu.com>
2088 * parse.c (accept_statement): Implement BLOCK DATA statement.
2089 * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
2092 2003-07-24 Lifang Zeng <zlf605@hotmail.com>
2094 * trans-stmt.c (temporary_list): Define.
2095 (g95_trans_assign_need_temp): New function.
2096 (g95_trans_forall_1): Modified for WHERE.
2097 (g95_trans_where_assign): Modified.
2098 (g95_trans_where_2): Modified.
2099 (g95_evaluate_where_mask): Modified.
2100 (g95_trans_where): Modified.
2101 (g95_get_temp_expr): Removed.
2102 (g95_add_to_where_stmt_list): Removed.
2103 (compute_overall_iter_number): Modified for WHERE.
2104 * trans.h: Remove where_stmt_list.
2106 2003-07-24 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2108 * lang.opt: Correct description of options -J and -M.
2110 2003-07-23 Steven Bosscher <steven@gcc.gnu.org>
2112 * lang.opt: Move help text to here.
2113 * lang-options.h: Remove.
2115 2003-07-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2116 * iresolve.c (g95_resolve_transpose): Proper variable in switch.
2117 * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
2120 2003-07-22 Steven Bosscher <steven@gcc.gnu.org>
2121 Paul Brook <paul@nowt.org>
2123 * check.c (check_rest): Use global pedantic flag.
2124 * io.c (data_desc): Ditto.
2125 * error.c (g95_warning, g95_warning_now): Use global flag.
2126 * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
2127 (expand_function_body): Update to new prototypes.
2128 (g95_init): Use new option names.
2129 * g95.h (g95_option_t): Standardize names.
2130 (g95_init_options, g95_handle_option): Update prototypes.
2131 * interface.c: Use new option names.
2138 * simplify.c: Ditto.
2140 * trans-array.c: Ditto.
2141 * trans-expr.c: Ditto.
2142 * trans-types.c: Ditto.
2143 * trans-decl.c: Ditto.
2144 (g95_build_library_function_decl): Remove obsolete VPARAMS.
2146 * options.c (g95_display_help): Remove.
2147 (g95_init_options): Convert to new scheme.
2149 (g95module_option): Ditto, rename from g95_parse_arg.
2150 (g95_handle_module_path_options): New function.
2151 * trans-equivalence.c: Fix error message.
2152 * lang.opt: Corrections.
2154 2003-07-21 Steven Bosscher <steven@gcc.gnu.org>
2156 * lang.opt: New file.
2158 2003-07-21 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2160 * decl.c (match_attr_spec): Set colon_seen.
2162 2003-07-14 Paul Brook <paul@nowt.org>
2164 * trans-array.c: Update comment.
2165 (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
2166 * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
2167 minmaxloc,minmaxval): Ditto.
2168 * trans-io.c (g95_trans_transfer): Ditto.
2169 * trans-stmt.c: Remove unneeded prototypes.
2170 (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
2171 (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
2172 (compute_inner_temp_size): Remove bits of dead code. Add comments.
2173 Don't share loopinfo.
2174 (compute_overall_iter_number): Declare as static.
2175 (allocate_temp_for_forall_nest): Ditto.
2176 (g95_trans_forall_1): Don't pass shared loopinfo.
2177 * trans.c (g95_start_block): Expand comment.
2179 2003-07-12 Paul Brook <paul@nowt.org>
2181 * arith.c (g95_index_integer_kind): Remove unused initializer.
2182 * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
2183 index by size of element.
2184 (generate_loop_for_rhs_to_temp): Ditto.
2185 (allocate_temp_for_forall_nest): Use element size, not index size.
2187 2003-07-11 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2189 * arith.c (g95_index_integer_kind): Add a TODO.
2190 * simplify.c (g95_simplify_nearest): Add a TODO.
2192 2003-07-09 Chun Huang <compiler@sohu.com>
2194 * trans.h: Add declarations for gfor_fndecl_string_scan and
2195 gfor_fndecl_string_verify.
2196 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
2197 * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
2198 (g95_conv_intrinsic_verify): New function.
2199 (g95_conv_intrinsic_function): Add SCAN and VERIFY.
2200 * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
2201 of parameter 'BACK=.TRUE.'
2203 2003-07-05 Lifang Zeng <zlf605@hotmail.com>
2205 * trans-stmt.c (iter_info, forall_info): Define.
2206 (g95_trans_forall_block): Remove.
2207 (g95_trans_forall_loop): Use forall info blocks.
2208 (g95_trans_nested_forall_loop): New function.
2209 (g95_do_allocate): Handle things other than logical masks.
2210 (generate_loop_for_temp_to_lhs): New function.
2211 (generate_loop_for_rsh_to_temp): New function.
2212 (compute_inner_temp_size): New function.
2213 (compute_overall_iter_number): New function.
2214 (allocate_temp_for_forall_nest): New function.
2215 (g95_trans_forall): Move body ...
2216 (g95_trans_forall_1): ... to here. Handle loops with temporaries.
2218 2003-07-02 Paul Brook <paul@nowt.org>
2220 * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
2221 in correct scope. Change callers to match.
2222 * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
2223 * iresolve.c (g95_resolve_reshape): Only use constant shapes.
2225 2003-07-02 Paul Brook <paul@nowt.org>
2227 * trans-array.c (g95_conv_loop_setup): Remove dead var. Use
2228 expression shape for all expressions.
2229 * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
2231 2003-07-03 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2233 * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
2234 g95_parse_arg), intrinsic.c (g95_convert_type): support of
2236 * intrinsic.c, g95.h: Add g95_convert_type_warn,
2237 * resolve.c (g95_resolve_index): Call it.
2239 2003-07-02 Paul Brook <paul@nowt.org>
2241 * iresolve.c (g95_resolve_reshape): Set expression shape.
2242 (g95_resolve_shape): Ditto.
2243 * simplify.c (g95_simplify_shape): Move common code outside condition.
2244 * trans-array.c (g95_conv_array_initializer): Teach it how to count.
2246 2003-07-01 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2248 * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
2251 2003-06-29 Paul Brook <paul@nowt.org>
2253 * array.c (g95_simplify_iterator_var): Don't bother with return value.
2254 * expr.c (find_array_element, find_component_ref): New functions.
2255 (remove_subobject_ref): New function.
2256 (simplify_const_ref): Use them. Rename from simplify_component_ref.
2257 (simplify_ref_chain): New function.
2258 (g95_simplify_expr): Use it. Simplify parameter variable subobjects.
2259 (g95_specification_expr): Simplify the expression.
2260 * resolve.c (resolve_operator): Check simplifications return code.
2261 (g95_resolve_expr): Ditto.
2263 2003-06-26 Paul Brook <paul@nowt.org>
2265 * expr.c (simplify_component_ref): New function.
2266 (g95_simplify_expr): Use it.
2267 * resolve.c (resolve_structure_cons): Handle references.
2269 2003-06-25 Paul Brook <paul@nowt.org>
2271 * trans-io.c (build_dt): Handle internal units.
2273 2003-06-25 Canqun Yang <canqun@yahoo.com.cn>
2275 * trans-common.c (g95_build_common_decl): Array index range starts at 0.
2276 (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
2277 Use g95_array_index_type instead of integer_type_node.
2278 (g95_build_common_decl, g95_set_common_master_type): Use
2279 g95_character1_type_node instead of char_type_node.
2280 * trans-equivalence.c (g95_layout_local_equiv): As above.
2282 2003-06-24 Steven G. Kargl <kargls@attbi.com>
2284 * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
2285 remove last remains of -fquiet.
2287 2003-06-22 Paul Brook <paul@nowt.org>
2289 * resolve.c (resolve_operator): Don't fail if we can't simplify.
2290 (g95_resolve_expr): Ditto.
2291 (resolce_code): Mark as static.
2292 * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
2293 gimplifer doesn't (yet).
2295 2003-06-20 Paul Brook <paul@nowt.org>
2297 * g95.h: Add ST_PAUSE and EXEC_PAUSE.
2298 * match.c (g95_match_if): Add ST_PAUSE.
2299 (g95_match_stopcode): New function.
2300 (g95_match_pause, g95_match_stop): Use it.
2301 * parse.c (g95_ascii_statement): Handle ST_PAUSE.
2302 (decode_stmt, next_statement, parse_executable): Ditto.
2303 * resolve.c (resolve_code): Ditto.
2304 * st.c (g95_free_statement): Ditto.
2305 * trans-stmt.c (g95_trans_pause): New function.
2306 * trans-stmt.h: Declare it.
2307 * trans.c (g95_trans_code): Use it.
2308 * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
2310 (g95_build_builtin_function_decls): Initialize them.
2312 * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
2314 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2316 * io.c (g95_match_open , g95_match_close, g95_match_inquire,
2317 match_filepos): Fix error handling.
2319 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2321 * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
2322 Add assertions on arguments.
2323 * resolve.c (expression_shape): Remove useless &.
2324 * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
2325 g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
2326 g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
2327 g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
2328 g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
2329 g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
2330 (g95_simplify_not, g95_simplify_scale): Add assertions.
2332 2003-06-15 Paul Brook <paul@nowt.org>
2334 Clean up stuff to work with the ssa optimizers.
2335 * convert.c (convert): Handle BOOLEAN_TYPEs.
2336 * f95-lang.c (g95_truthvalue_conversion): Implement.
2337 * trans-array.c (g95_trans_array_constructor_value): Group multiple
2339 * trans.h (g95_truthvalue_conversion): Declare.
2340 * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
2341 * trans-stmt.c (g95_trans_character_select): Don't create array
2342 assignments. Mark labels as indirect jump targets.
2343 * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
2344 (g95_get_dtype_cst): Handle LOGICAL types.
2346 2003-06-14 Paul Brook <paul@nowt.org>
2348 * f95-lang.c (g95_gimplify_expr): New function.
2349 * trans-array.c (g95_trans_array_constructor_value): Don't create
2351 (g95_conv_expr_descriptor): Rename simple->gimple.
2352 * trans-expr.c (conv_expr_op): Use proper logical operators.
2353 * trans-intrinsic.c (build_fixbound_expr): New function.
2354 (build_fix_expr): Ditto.
2355 (g95_conv_intinsic_aint): Use them. Use builtin functions.
2356 (g95_conv_intrinsic_function): Add FLOOR and CEILING.
2358 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2360 * array.c (g95_compare_array_spec): Remove unreachable code.
2361 * expr.c (g95_copy_expr): Likewise.
2362 * intrinsic.c (g95_convert_type): Likewise.
2363 * misc.c (g95_code2string): Likewise.
2364 * simplify.c (g95_simplify_ishft, g95_simplify_real,
2365 g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
2366 * trans-stmt.c (g95_trans_select): Likewise.
2367 * primary.c (extend_ref): Add an assertion.
2368 * simplify.c (g95_convert_constant): Add const.
2369 * intrinsic.h: Remove g95_check_x_ni.
2370 * f95-lang.c (g95_finish): Call g95_release_include_path.
2372 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2374 * resolve.c (resolve_contained_functions): Fix typo introduced on
2377 2003-06-09 Paul Brook <paul@nowt.org>
2379 * g95.h: Include system.h not hwint.h.
2380 * many: use safe-ctype.h not ctype.h. Change isalpha -> ISALPHA, etc.
2381 * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
2383 2003-06-09 Paul Brook <paul@nowt.org>
2385 * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
2386 * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
2387 * trans-decl.c (g95_add_decl_to_functions): Make non-static.
2388 (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
2389 (g95_generate_function_code): Translate COMMON and EQUIVALENCE
2391 * trans.h (g95_trans_equivalence, g95_trans_common,
2392 g95_add_decl_to_function): Declare.
2393 * trans-common.c, trans-equivalence.c: New files.
2395 2003-06-08 Steven Bosscher <steven@gcc.gnu.org>
2397 * intrinsic.c (g95_intrinsic_extension): Remove.
2398 (add_functions): Substitute g95_check_x for g95_check_x_ni
2400 (g95_init_expr_extensions): New function.
2401 (g95_intrinsic_func_interface): Use it.
2402 * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
2403 * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
2404 g95_check_precision, g95_check_present, g95_check_radix,
2405 g95_check_range, g95_check_selected_real_kind): Do not set
2406 g95_intrinsic_extension.
2407 (g95_check_x_ni): Remove now duplicate of g95_check_x.
2409 * expr.c (check_inquiry): Add FIXME, fixup some code style.
2411 2003-06-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2413 * g95.h (ref_type): Name this type explicitly.
2414 * module.c (MIO_NAME): Add specialisations of mio_name.
2415 (mio_symbol_attribute, mio_typespec, mio_array_ref,
2416 mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
2417 (ab_attribute): Name this type explicitly.
2418 (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
2420 2003-06-05 Kejia Zhao <kejia_zh@yahoo.com.cn>
2422 * trans-intrinsic.c (g95_conv_allocated): New function.
2423 (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
2425 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
2427 * f95-lang.c: Don't include g95-support.h
2428 (g95_mark_addressable): Add prototype.
2429 (g95_init_decl_processing): Remove C front end hack.
2430 * f95-tree.c: Remove file.
2431 * support.c: Remove file.
2432 * g95-support.h: Remove file.
2433 * trans-types.c (g95_init_types): Set up boolean
2434 type related tree nodes.
2435 * Make-lang.in: Remove rules for dead files and
2436 dependencies on them.
2438 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
2440 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
2441 C front end dependency. Also, convert.c does not depend on
2442 g95-support.h anymore.
2443 * convert.c: Don't include c-common.h and g95-support.h
2444 * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
2445 (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
2446 stmts_are_full_exprs_p, current_stmt_tree,
2447 current_scope_stmt_stack): Remove.
2448 * g95-support.h (unsigned_conversion_warning): Kill proto.
2449 (boolean_type_node, boolean_true_node, boolean_false_node):
2450 Don't define here. Instead, make then true tree nodes in
2452 * support.c (c_global_trees): Die, C front end, die!!!
2453 (g95_init_c_decl_hacks): Don't touch intmax_type_node,
2454 uintmax_type_node, string_type_node and const_string_type_node.
2455 (decl_constant_value, overflow_warning): Make static functions.
2456 They are in death row too, though.
2457 (default_conversion, c_expand_asm_operands): Remove.
2458 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
2459 trans.c: Don't include c-common.h.
2460 * trans-types.c (boolean_type_node, boolean_true_node,
2461 boolean_false_node): Make them real tree nodes.
2462 * trans-types.h (intmax_type_node, string_type_node,
2463 const_string_type_node): Hack to work around C dependencies
2464 in builtin-types.def.
2466 2003-06-04 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2468 * decl.c (decl_types): Add some iterators-like sentinels.
2469 * decl.c (match_attr_spec): Use them.
2470 Use "decl_types" instead of "int".
2471 Add cast in call to g95_match_strings.
2472 * dump-parse-tree.c (g95_show_namespace): Use "g95_intrinsic_op"
2474 * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
2475 (g95_interface_info): Use "g95_intrinsic_op".
2476 * dump-parse-tree.c (g95_show_namespace): Use them.
2477 * interface.c (g95_check_interfaces): Use them.
2478 * module.c (read_module, write_module): Use them.
2479 * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
2480 Use "g95_intrinsic_op".
2481 * interface.c (check_operator_interface): Use "g95_intrinsic_op".
2482 Add a default case in switch statement.
2483 * intrinsic.h (g95_generic_isym_id): Moved to...
2484 * g95.h (g95_generic_isym_id): here.
2485 (g95_intrinsic_sym): Use "g95_generic_isym_id".
2486 * intrinsic.c (make_generic): Use "g95_generice_isym_id".
2487 * trans-intrinsic.c (g95_intrinsic_map_t,
2488 g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
2489 * match.c (g95_match_intrinsic_op): Add cast in call to
2492 2003-06-03 Steven Bosscher <steven@gcc.gnu.org>
2494 * support.c (skip_evaluation, warn_conversion, lvalue_p,
2495 lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
2496 constant_fits_type_p, convert_and_check,
2497 unsigned_conversion_warning): Remove these ugly remnants
2498 we inherited from the C front end.
2499 (function_types_compatible): Remove '#if 0'-edcode.
2500 (build_modify_expr): Likewise.
2501 (convert_for_assignment): Don't use the deceased functions.
2502 The parameter fundecl is now unused.
2503 (decl_constant_value): Always just return decl. In fact
2504 this function is not used at present, but it might be in
2505 the future, when we start using the tree inliner.
2506 (overflow_warning, default_conversion, c_expand_asm_operands):
2507 Abort when these are called, they are part of the C type
2508 checking implementation and therefore poison to Fortran.
2510 2003-06-04 Steven Bosscher <steven@gcc.gnu.org>
2512 * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
2513 c-pretty-print.o and c-dump.o. Add a comment on why we
2514 depend on c-semantics.c.
2515 * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
2516 Don't use the C front end tree dumper hook to dump the
2517 language specific tree representation -- we don't have
2518 one. So instead, inherit the default langhook.
2520 2003-06-02 Paul Brook <paul@nowt.org>
2522 * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
2524 2003-06-02 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2526 * check.c (g95_check_associated): Use proper types. Remove
2527 extraneous argument in call to g95_error().
2529 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
2531 * resolve.c (resolve_operator): Make logical operands convert to the
2532 type with higher kind.
2534 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
2536 * check.c (g95_check_associated): Make sure both pointer and target has
2537 the same type and rank. Null pointer or array section with vector
2538 subscript as target are not allowed.
2539 * trans.h: Declare gfor_fndecl_associated.
2540 * trans-decl.c: (g95_build_builtin_function_decls): Initialize
2541 gfor_fndecl_associated.
2542 * trans-intrinsic.c (g95_conv_associated): New function.
2543 (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
2545 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
2547 * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
2548 according to POINTER itself rather than TARGET.
2549 (g95_conv_expr_descriptor): Make lbound start at 1.
2550 * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
2552 2003-06-01 Paul Brook <paul@nowt.org>
2554 * expr.c (g95_type_convert_binary): Make it match the standard.
2555 * g95.texi: Remove dead link.
2557 2003-06-01 Steven Bosscher <steven@gcc.gnu.org>
2559 * g95.texi: Cleanup somewhat in preparation for inclusion
2562 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2563 Canqun Yang <canqun@yahoo.com.cn>
2565 * resolve.c (compare_bound_int, resolve_where_shape): Proper return
2567 (g95_find_forall_index): Return proper value.
2568 (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
2569 compare the return value from g95_find_forall_index.
2571 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2572 * g95.h, io.c (g95_st_label): Remove "length".
2573 (g95_symtree): Remove "link".
2574 (g95_case): Remove "code".
2575 * arith.c, arith.h (g95_compare_string, g95_convert_integer,
2576 g95_convert_real): Make an argument pointer to const.
2577 * decl.c (colon_seen): Add a TODO.
2578 * interface.c (g95_compare_types): Fix typo.
2579 * interface.c (compare_interfaces): Preserve value of "p".
2580 * intrinsic.c (sort_actual): Remove "i".
2581 * match.c (g95_match_assign): Proper type in call to g95_match().
2582 * parse.c (next_free): Avoid duplicate call due to macro.
2583 * parse.c (check_statement_label): wrong type in call to g95_error.
2584 * primary.c (match_real_constant): Add a TODO.
2585 * resolve.c (resolve_select): Remove useless conditional.
2586 * simplify.c (g95_simplify_repeat): Proper assignment to
2587 "value.character.string".
2588 * simplify.c (g95_simplify_reshape): Wrong variable in call to
2591 2003-05-20 Canqun Yang <canqun@yahoo.com.cn>
2593 * trans-stmt.c: Remove unnecessary include file defaults.h.
2595 2003-05-19 Lifang Zeng <zlf605@hotmail.com>
2597 * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
2599 (g95_trans_forall): Allow arbitrary number of FORALL indexes and
2600 actual variables used as FORALL indexes.
2602 2003-05-15 Paul Brook <paul@nowt.org>
2604 * trans-array.c (g95_trans_static_array_pointer): Use
2606 (g95_trans_deferred_array): Initialize static array pointers.
2607 * trans-expr.c (g95_conv_function_call): Use formal arglist to
2608 correctly pass POINTER and absent CHARACTER arguments.
2610 2003-05-14 Lifang Zeng <zlf605@hotmail.com>
2612 * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
2613 (g95_resolve_forall_body): Resolve FORALL body.
2614 (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
2615 (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
2616 (g95_find_forall_index): Check whether the FORALL index appears in
2617 the expression or not.
2618 (resolve_code): Modified.
2620 2003-05-14 Paul Brook <paul@nowt.org>
2622 * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
2624 2003-05-13 Paul Brook <paul@nowt.org>
2626 * trans-types.c (g95_max_array_element_size): Now a tree node.
2627 (g95_init_types): Work out max size properly.
2628 (g95_get_dtype_cst): Modify to match.
2630 2003-05-11 Paul Brook <paul@nowt.org>
2632 * trans-io.c (add_case): Create a label decl for case labels.
2634 2003-05-11 Paul Brook <paul@nowt.org>
2636 * arith.c (g95_integer_index_kind): New variable.
2637 * f95-lang.c (g95_init): Move frontend initialization here ...
2638 (g95_post_options): ... from here.
2639 * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
2640 * intrinsic.c (add_functions): Use index kinds.
2641 * iresolve.c: Convert to index_kind where needed.
2642 * resolve.c (g95_resolve_index): Make public, use index_kind.
2643 (resolve_array_ref): Adjust to match.
2644 * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
2645 * trans-stmt.c: Ditto.
2646 * trans-types.c: Ditto.
2647 * trans-types.h (g95_array_index_kind): Remove declaration.
2648 * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
2650 2003-05-07 Paul Brook <paul@nowt.org>
2652 * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
2653 * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
2656 2003-05-07 Paul Brook <paul@nowt.org>
2658 * trans-array.c (trans_static_array_pointer,
2659 g95_trans_array_constructor_value, g95_conv_array_initializer,
2660 g95_conv_structure): CONSTRUCTOR nodes only have one operand.
2661 (g95_add_loop_ss_code): Convert subscripts to the correct type.
2662 * trans-stmt.c (g95_trans_character_select): Ditto.
2663 * trans-types.c (g95_init_types): Ditto.
2665 2003-05-07 Steven Bosscher <steven@gcc.gnu.org>
2667 * f95-lang.c (expand_function_body): Use input_line, not lineno.
2668 * trans-decl.c (g95_generate_function_code,
2669 g95_generate_constructors): Likewise.
2670 * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
2671 g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
2674 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
2675 * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
2676 with components point to the DERIVED type itself, and two DERIVED
2677 type with components point to each other.
2678 * trans-expr.c (g95_conv_componet_ref): Modified
2680 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
2681 * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
2683 (g95_trans_pointer_assign): Implement Nullify.
2685 2003-05-01 Paul Brook <paul@nowt.org>
2687 * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
2688 * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
2690 2003-05-01 Paul Brook <paul@nowr.org>
2692 * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
2693 trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
2696 2003-05-01 Canqun Yang <canqun@yahoo.com.cn>
2698 * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
2701 2003-04-28 Paul Brook <paul@nowt.org>
2703 * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
2704 as their kind suggests.
2705 (g95_resolve_reshape): Ditto.
2707 2003-04-28 Chun Huang <compiler@sohu.com>
2709 * trans-expr.c (g95_conv_substring_expr): New function.
2710 (g95_conv_expr): Use it.
2712 2003-04-28 Paul Brook <paul@nowt.org>
2714 * iresolve.c (g95_resolve_transpose): Make it match the
2716 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
2718 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
2720 * trans-types.c (g95_add_field_to_struct): New function to
2721 add a field to a UNION_TYPE or RECORD_TYPE.
2722 * trans-types.h (g95_add_field_to_struct): Prototype.
2723 (g95_get_derived_type): Use g95_add_field_to_struct to add
2725 * trans-io.c (g95_add_field): Remove.
2726 (ADD_FIELD): Use new g95_add_field_to_struct function.
2727 (ADD_STRING): Likewise.
2728 * trans-stmt.c (g95_trans_select): Likewise.
2729 (g95_add_field): Remove duplicated function.
2731 2003-04-18 Canqun Yang <canqun@yahoo.com.cn>
2733 Port implementation for CHARACTER SELECT from Andy's tree.
2734 * trans-stmt.c (g95_trans_character_select): Implement character
2735 select. (g95_add_field): New function.
2736 * trans-decl.c: Declare 'gfor_gndecl_select_string'.
2737 (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
2738 * g95.h (struct g95_case): Add field 'int n'.
2739 * trans.h: Declare 'gfor_fndecl_select_string'.
2741 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
2743 * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
2744 (g95_insert_bbd): Die on duplicates.
2745 * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
2747 2003-04-14 Steven Bosscher <steven@gcc.gnu.org>
2749 * g95.texi: Require GMP 4.0 -- like we actually
2750 do. Explain the testsuite and what-goes-where.
2751 Don't use undefined texinfo symbol. Break very
2752 long line. Remove finished item from the list
2755 2003-04-11 Canqun Yang <canqun@yahoo.com.cn>
2757 * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
2760 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
2762 * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
2763 (g95_trans_forall_body): New function.
2765 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
2767 * resolve.c (resove_where): New function.
2768 (resolve_where_shape): New function.
2769 (resolve_code): Add call to 'resolve_where'
2770 * trans-stmt.c (g95_trans_where): Modified.
2771 (g95_trans_where_2): New function.
2772 (g95_trans_where_assign): New function.
2773 (g95_evaluate_where_mask): New function.
2774 (g95_add_to_stmt_list): New function.
2775 (g95_get_temp_expr): New function.
2776 * trans.h (where_stmt_list): New structure.
2778 2003-04-10 Paul Brook <paul@nowt.org>
2780 * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
2781 (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
2783 2003-04-10 Steven Bosscher <steven@gcc.gnu.org>
2785 Update after mainline -> tree-ssa-branch merge.
2786 * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
2788 (g95_init): Update for new lang_hooks definition.
2789 (g95_post_options): New langhook.
2790 (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
2791 * scanner.c (g95_new_file): Comment update.
2793 2003-04-09 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2795 * g95.h, lang-options.h: Add -Wimplicit-interface.
2796 * options.c (g95_init_options, g95_parse_arg): Set it.
2797 * interface.c (check_intents): Warn about call with implicit
2799 * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
2802 2003-04-05 Paul Brook <paul@nowt.org>
2804 * iresolve.c (g95_resolve_spread): Don't resole based on type.
2805 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
2807 2003-03-29 Paul Brook <paul@nowt.org>
2809 * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
2810 (g95_resolve_unpack): Ditto.
2811 * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
2812 (g95_conv_intrinsic_function): Use it. Remove PACK and UNPACK.
2813 (g95_is_intrinsic_libcall): Add PACK and UNPACK.
2815 2003-03-25 Paul Brook <paul@nowt.org>
2817 * arith.c (g95_unary_user, g95_user): Remove dead functions.
2819 * array.c (g95_free_array_ref): Ditto.
2821 * symbol.c (g95_use_derived_tree): Ditto.
2822 * intrinsic.c (add_functions): Use simplification for SCALE.
2823 * primary.c (g95_match_rvalue): Test sym, not symtree.
2825 2003-03-25 Paul Brook <paul@nowt.org>
2827 * trans-decl.c (build_function_decl): Add parameter before it gets
2828 turned into a constant.
2829 * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
2830 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
2831 * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
2833 2003-03-22 Paul Brook <paul@nowt.org>
2835 * trans-array.c (g95_conv_array_initializer): Allow scalar
2837 * trans-decl.c (g95_finish_var_decl): Result variables are not
2839 * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
2840 (g95_conv_intrinsic_function): Use it.
2841 * trans-types.h (g95_type_spec): Remove dead declaration.
2843 2003-03-21 Paul Brook <paul@nowt.org>
2845 * trans-decl.c (g95_build_function_decl): Mark string parameters.
2847 2003-03-20 Paul Brook <paul@nowt.org>
2849 * trans-decl.c (g95_build_function_decl): Put character length
2850 parameters at the end of the function declaration.
2851 * trans-expr.c (g95_conv_function_call): Ditto.
2852 * trans-types.c (g95_get_function_type): Ditto.
2854 2003-03-20 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2856 * resolve.c (resolve_formal_arglist): Don't impose intent for
2857 procedure arguments of pure functions.
2858 (resolve_select): Remove redundant assignment.
2860 2003-03-19 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2862 * arith.c (validate_logical), g95.h, options.c (g95_init_options):
2864 * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
2865 * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
2867 * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
2869 * symbol.c (g95_add_type): Fix typo in comment.
2872 2003-03-16 Paul Brook <paul@nowt.org>
2874 * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
2875 * expr.c (g95_build_call): Remove.
2876 * f95-lang.c (puchdecl_top_level): New function.
2877 * g95.h (g95_code): Store resolved symbol, not just the name.
2878 * intrinsic.c (g95_intrinsic_namespace): New global namespace.
2879 (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
2880 (g95_get_intrinsic_sub_symbol): New function.
2881 * iresolve.c (g95_resolve_cpu_time): Use it.
2882 (g95_resolve_random_number): Ditto.
2883 * resolve.c: Set code->resolved_sym instead of code->sub_name.
2884 * trans-decl.c (g95_get_extern_function_decl): Give external decls
2885 the correct DECL_CONTEXT. Add global symbold to the global scope.
2886 * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
2889 2003-03-16 Paul Brook <paul@nowt.org>
2891 * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
2892 * options.c (g95_parse_arg): Ditto.
2893 * module.c (mio_symbol_attribute): Handle the always_explicit bit.
2894 * resolve.c (resolve_formal_arglist): The always_explicit sould be set
2895 for the procedure, not the parameter.
2896 * trans-array.c (g95_trans_g77_array): New function.
2897 (g95_trans_assumed_size): Use it.
2898 (g95_trans_dummy_array_bias): Ditto.
2899 (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
2900 (g95_conv_expr_descriptor): ... to here. Update callers.
2901 * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
2902 (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
2903 * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
2904 * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
2905 * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
2906 (g95_sym_type): Ditto.
2908 2003-03-15 Paul Brook <paul@nowt.org>
2910 * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
2912 * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
2914 2003-03-14 Paul Brook <paul@nowt.org>
2916 * trans-array.c (g95_array_is_packed): Remove.
2917 (g95_conv_array_base): Correctly handle all descriptorless cases.
2918 (g95_conv_array_stride): Use descriptorless strides.
2919 (g95_trans_dummy_array_bias): Don't always repack the array.
2920 (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
2922 * trans-types.c (g95_get_nodesc_array_type): Differentiate between
2923 dummy and non-dummy arrays...
2924 (g95_sym_type, g95_get_derived_type): ... like these.
2925 (g95_get_array_type_bounds): Allow discontiguous arrays.
2927 2003-03-12 Paul Brook <paul@nowt.org>
2929 * array.c (g95_resolve_array_spec): Fix comment.
2930 * g95.h (symbol_attributes): New flag always_explicit.
2931 * resolve.c (resolve_formal_arglist): Set it always_explicit.
2932 * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
2933 * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
2934 (g95_trans_array_bounds): Allow assumed shape arrays.
2935 (g95_trans_repack_array): Remove.
2936 (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
2937 * trans-decl.c (g95_build_qualified_array): Only ignore absent
2938 bounds for assumed size arrays.
2939 (g95_build_dummy_array_decl): Use descriptorless arrays.
2940 * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
2941 (g95_trans_pointer_assign): Fix typo.
2942 * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
2944 (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
2945 * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
2946 Also modify callers.
2947 * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
2949 2003-03-08 Paul Brook <paul@nowt.org>
2951 * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
2952 (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
2953 * resolve.c (compare_spec_to_ref): Allow full array sections.
2955 2003-03-08 Paul Brook <paul@nowt.org>
2957 * expr.c (g95_simplify_expr): Also simplify array index and
2958 substring expressions.
2959 * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
2960 * trans-array.c (g95_trans_array_bounds): New function.
2961 (g95_trans_auto_array_allocation): Use it.
2962 (g95_trans_assumed_size): Rewrite.
2963 * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
2964 (gfor_fndecl_repack): Remove.
2965 (g95_build_qualified_array): Handle absent upper bounds.
2966 (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
2967 (g95_get_symbol_decl): Update.
2968 (g95_build_intrinsic_function_decls): Initialize new decls.
2969 * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
2970 (gfor_fndecl_repack): Remove.
2971 * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
2972 * trans-types.c: (g95_build_array_type): Merge duplicated code..
2973 (g95_get_nodesc_array_type): Handle absent bounds.
2974 * trans-types.h (g95_get_nodesc_array_type): Declare.
2976 2003-03-04 Paul Brook <paul@nowt.org>
2978 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
2981 2003-03-02 Paul Brook <paul@nowt.org>
2983 * options.c (g95_init_options): Drfault to 1.
2984 (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
2985 * trans-array.c (g95_conv_array_data, g95_conv_array_base,
2986 g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
2987 Handle non-constant size automatic arrays.
2988 (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
2989 generic bound functions.
2990 (g95_trans_auto_array_allocation): Don't create a descriptor.
2991 (g95_trans_assumed_size): New function (broken).
2992 (g95_trans_dummy_array_bias): Remove unused var.
2993 * trans-array.h (g95_trans_assumed_size): Declare.
2994 * trans-decl.c (create_index_var): New fuction.
2995 (g95_build_qualified_array): New function.
2996 (g95_get_symbol_decl): Use it.
2997 (g95_trans_deferred_vars): Handle assumed shape seperately.
2998 * trans-types.c (get_element_type): Handle heap allocated arrays.
2999 (g95_is_nodesc_array): Include non-const size arrays.
3000 (g95_get_nodesc_array_type): Ditto.
3002 2003-02-23 Paul Brook <paul@nowt.org>
3004 * trans-array.c (g95_array_init_size): Should use stride, not size of
3007 2003-02-18 Paul Brook <paul@nowt.org>
3009 * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
3010 after intrinsic function check.
3012 2003-02-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3014 * io.c (match_io): Fix missing return value and remove useless
3016 * match.c (g95_match): Remove useless assignment.
3017 * module.c (parse_string): Remove useless post increment.
3018 * simplify.c (g95_simplify_verify): Remove useless assignment.
3020 2003-02-15 Paul Brook <paul@nowt.org>
3022 * expr.c (restricted_intrinsic): Handle bad values gracefully.
3023 * g95.h (symbol_attribute): Add referenced member.
3024 (g95_symbol): Add dummy_order member.
3025 (g95_set_sym_referenced): Declare.
3026 * match.c (g95_match_assignment, g95_match_call): Use it
3027 * primary.c (match_actual_arg, g95_match_rvalue,
3028 g95_match_variable): Ditto.
3029 * symbol.c (next_dummy_order): New variable.
3030 (g95_set_sym_referenced): New function.
3031 (check_done): New function.
3032 (g95_add_*): Use it.
3033 * trans-decl.c: Make formatting conform to GCC standards.
3034 (g95_defer_symbol_init): Add dummy variables in the right order.
3035 (g95_get_symbol_decl): Only accept referenced variables.
3036 (g95_create_module_variable): Module variables are always required.
3037 (generatr_local_decls): New function.
3038 (generate_local_vars): New function.
3039 (g95_generate_function_code): Use it.
3041 2003-02-13 Paul Brook <paul@nowt.org>
3043 * trans-decl.c (g95_conv_struct_cons): Remove.
3044 (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
3045 * trans-expr.c (g95_conv_structure): New function.
3046 (g95_conv_expr): Use it.
3048 2003-02-09 Paul Brook <paul@nowt.org>
3050 * trans-array.c (g95_array_init_size): Don't evaluate the linit
3051 expressions multiple times.
3052 (g95_trans_auto_arry_allocation): Use pointer not tmp.
3054 2003-02-08 Paul Brook <paul@nowt.org>
3056 * module.c (mio_symtree_ref): Declare as static.
3057 (mio_expr): Remove dead code.
3058 (read_module): Set the symtree link for fixups.
3059 * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
3060 (build_round_expr): ... to this.
3061 (g95_conv_intrinsic_aint): New function.
3062 (g95_conv_intrinsic_function): Use it.
3064 2003-02-08 Paul Brook <paul@nowt.org>
3066 * trans-array.c (g95_trans_array_constructor_value): Use the acutal
3067 offset after modificaton, not the increment expression.
3068 * dependency.c: Kill excess whitespace.
3070 2003-02-07 Sanjiv Gupta <sanjivg@noida.hcltech.com>
3072 * dependency.h: Remove some function declarations.
3073 * dependency.c (get_no_of_elements): Change this function not to
3075 * other: Add comments for all modified functions.
3077 2003-02-06 Paul Brook <paul@nowt.org>
3079 * g95spec.c (lang_specific_functions): Fix initializer warning.
3080 * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
3081 for structure type names.
3082 * trans-decl.c (g95_cons_structure_cons): New function.
3083 (g95_get_symbol_decl): Use it.
3084 * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
3087 2003-02-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3089 * resolve.c (compare_cases): Add const to casts.
3091 2003-01-30 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3093 * g95.h (g95_check_f): Change a1 to f1m.
3094 * intrinsic.c (add_sym_1m, check_specific,
3095 g95_intrinsic_func_interface): Use it.
3097 * module.c (init_pi_tree): Remove useless cast.
3098 (fp2): Fix argument type.
3100 * parse.c (parse_select_block): Add comment.
3102 2003-02-05 Toon Moene <toon@moene.indiv.nluug.nl>
3104 * lang-options.h: Fix warning involving C90 concatenated
3107 2003-02-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
3108 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3110 * io.c (format_asterisk): Complete initializer to kill warning.
3111 * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
3112 DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
3113 (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
3114 new defines to complete initializers. Kills all warnings.
3116 * Make-lang.in: Comment cleanup.
3118 2003-02-05 Paul Brook <paul@nowt.org>
3120 * array.c (g95_free_constructor): Handle NULL expressions.
3121 * resolve.c (resolve_structure_cons): Ditto.
3122 * decl.c (g95_match_null): New Function.
3123 (variable_decl): Use it.
3124 * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
3125 * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
3126 * trans-types.c (g95_set_decl_attributes): Remove empty function.
3128 2003-02-05 Paul Brook <paul@nowt.org>
3130 * trans.h (build1_v): New macro.
3131 (build_v): Remove pointless and incorrect prototype.
3132 * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
3133 * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
3135 2003-02-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
3137 * Make-lang.in (F95_OBJS): Remove one more dead file.
3139 2003-02-01 Paul Brook <paul@nowt.org>
3141 * lang-specs.h: Don't pass -ffixed-form to the linker.
3142 * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
3144 2003-02-01 Paul Brook <paul@nowt.org>
3146 * Make-lang.in (F95_OBJS): Remove dead files.
3147 * trans-array.c (g95_array_init_size): Do the right thing when
3149 * trans-decl.c (g95_generate_function_code): Initialize deffered
3150 symbol list before translating contained subroutines.
3151 * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
3152 scalar invariant values here...
3153 (g95_conv_variable, g95_conv_function_call): ... instead of here ...
3154 * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
3156 2003-01-29 Paul Brook <paul@nowt.org>
3158 * trans-array.c (g95_add_loop_code): Put pre code in the right block.
3159 (g95_walk_elemental_function_args): Reverse chains before adding.
3160 (g95_reverse_ss): Move about a bit.
3161 * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
3164 2003-01-28 Paul Brook <paul@nowt.org>
3166 * intrinsic.c (resolve_intrinsic): Use correct union member.
3167 * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
3169 * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
3170 use associated variables.
3171 * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
3172 * trans-expr.c (g95_conv_expr_present): ... to here.
3173 * trans.h: Declare it.
3174 * trans-types.c (g95_sym_type): Assume subroutine if not specified.
3176 2003-01-28 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3178 * array.c (expand_iterator): Suppress useless assignment.
3179 * decl.c (match_char_spec): Ditto.
3180 * io.c (match_io_iterator): Ditto.
3181 * primary.c (match_real_constant): Ditto.
3182 * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
3183 Ditto. Also, use g95_intrinsic_op not int for intrinsic operators.
3184 * matchexp.c (match_add_operand, match_level_5): Likewise.
3185 * module.c (parse_atom, find_enum): Likewise.
3186 * resolve.c: move #include <string.h>
3187 (resolve_select): Fix serious typo.
3189 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.n>
3191 * Make-lang.in: Don't build with broken tree-ssa-pre.
3193 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.nl>
3195 * resolve.c (resolve_index): Add a TODO.
3196 * symbol.c: Remove useless "#include <ctype.h>".
3198 2003-01-27 Paul Brook <paul@nowt.org>
3200 * check.c (check_rest): Allow different type kinds as an extension.
3201 * g95.h (g95_resolve_f): Add f1m.
3202 * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
3203 * intrinsic.h: Chenge prototypes for MIN and MAX.
3204 * iresolve.c (g95_resolve_minmax): New function.
3205 (g95_resolve_min, g95_resolve_max): Use it.
3206 * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
3208 (g95_conv_intrinsic_present): Fix logic.
3210 2003-01-27 Steven Bossche <s.bosscher@student.tudelft.nl>
3212 * g95.h (g95_case): Don't be a tree, be a double linked list.
3213 * match.c (match_case_selector): Remove redundant semantics check.
3214 Clean up a few goto's to make it a tiny little bit faster.
3215 * resolve.c (case_tree): Die.
3216 (compare_cases): Accept and compare unbounded cases too.
3217 (check_case_overlap): Don't build a tree. Instead, merge-sort the
3218 whole list of g95_cases passed from resolve_select.
3219 (sane_logical_select): Die.
3220 (check_case_expr): Return FAILURE if a CASE label is of the wrong
3222 (resolve_select): Fixup case expression for computed GOTOs, put it
3223 in expr, not expr2, for easier handing in the parse tree dumper and
3224 the code generator. Rewrite the rest of the function: Kill
3225 unreachable case labels and unreachable case blocks.
3226 * dump-parse-tree.c (g95_show_code_node): Always dump expr for
3227 an EXEC_SELECT, not case2 anymore.
3228 * trans-const.c (g95_conv_constant_to_tree): New function.
3229 (g95_conv_constant): Use it.
3230 * trans-const.h: Declare prototype for the new function.
3231 * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
3232 g95_trans_character_select): New static functions.
3233 (g95_trans_select): Rewrite.
3235 2003-01-26 Paul Brook <paul@nowt.org>
3237 * intrinsic.c (add_fnctions): Properly add dreal.
3238 * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
3239 (g95_conv_intrinsic_function): Use it.
3240 * trans-io.c (build_dt): Abort on internal files (unimplemented).
3242 2003-01-26 Paul Brook <paul@nowt.org>
3244 Widespread changes to the handling of symbols in expressions. These
3245 are now linked via g95_symtree nodes.
3246 * parse.c (g95_fixup_sibling symbols): New function.
3247 (parse_contained): Use it.
3248 * g95.h (symbol_attribute): Add contained. Indicates a symbol is a
3249 contained procedure that has bee correctly fixed up.
3250 (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
3252 2003-01-24 Paul Brook <paul@nowt.org>
3254 * trans-array.c (g95_walk_expr): Function result attributes are in
3256 * trans-expr.c (g95_conv_function_call,
3257 g95_trans_arrayfunc_assign): Ditto.
3258 * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
3260 2003-01-23 Steven Bosscher <s.bosscher@student.tudelft.nl>
3262 * expr.c (check_restricted): Fix error message.
3263 * symbol.c (free_st_labels): Plug memleak.
3265 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
3267 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
3268 reduce_binary_aa, reduce_binary, eval_intrinsic,
3269 eval_intrinsic_f2): Use typesafe prototypes for eval functions.
3270 * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
3271 for typesafe intrinsics helper functions.
3272 (g95_intrinsic_sym): Use them.
3273 * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
3274 add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
3275 add_sym_5, add_conv, resolve_intrinsic, do_simplify,
3276 check_specific, g95_intrinsic_func_interface,
3277 g95_intrinsic_sub_interface): Adjust all calls to intrinsics
3279 * trans-decl.c (g95_get_extern_function_decl): Likewise.
3280 * Make-lang.in: Don't disable warnings for strict prototypes
3281 any longer, everything is typesafe now.
3283 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
3285 * bbt.c (duplicate_node): Make static.
3286 * module.c (module_name): Make static.
3287 * scanner.c (include_dirs): Make static.
3289 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
3291 Hard coded _gfor_'s should not show up anymore.
3292 * g95.h (PREFIX): New macro.
3293 * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
3295 (g95_resolve_random_number): Likewise.
3296 * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
3297 * trans-io.c: Remove 'prefix' macro. Replace all uses with
3298 the new PREFIX macro from g95.h.
3300 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
3302 The troubles of forking... Andy implemented this just now too.
3303 Let's stick to that and keep the trees close.
3304 * g95.h (g95_st_label): 'format' member is now a g95_expr.
3305 * io.c: Revert previous changes.
3306 (g95_match_format): Match the format string as a character
3308 * match.h (g95_statement_label): Declare external.
3309 * parse.c: Revert previous changes.
3310 * symbol.c (g95_free_st_label): Free a g95_expr instead
3312 * trans-io.c: Revert previous changes.
3313 (build_dt): Use set_string to set the format string.
3315 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
3317 * io.c (format_string): Make non-static.
3318 (g95_match_format): Remember the format string.
3319 (terminate_io): Add I/O termination for empty I/O lists.
3320 * match.h: Declare external format_string.
3321 * parse.c (check_statement_label): Attack the format string
3322 to a format label for FORMAT statements.
3323 * trans-io.c (g95_add_field): Define prefix macro. Replace
3324 all uses of PREFIX define with a use of this macro.
3325 (build_dt): Implement formatted I/O for format labels.
3327 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
3329 * lang-options.h: Kill "-std=F".
3330 * options.c: Remove unimplemented "-std=F". Modify
3332 * misc.c (g95_terminal_width): New function.
3333 * error.c (g95_error_init_1): Use g95_terminal_width.
3334 * g95.h: Add prototype for g95_terminal_width, remove
3337 2003-01-19 Steven Bosscher <s.bosscher@student.tudelft.nl>
3339 * Make-lang.in: Fix typo.
3341 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
3343 * g95.h (struct g95_case): Remove unused cruft, new member
3344 'where' to keep track of the locus of the default case.
3345 * match.c (g95_match_case): Add locus to the current case.
3346 (match_case_selector): Likewise.
3347 * parse.c (parse_select_block): Move semantics check for
3348 multiple DEFAULT cases out of here to...
3349 * resolve.c (check_case_overlap): ...here. Return sooner
3351 (check_case_expr): Take two g95_cases now, use to sure the
3352 expression kinds are the same.
3353 (resolve_select): Cleanup.
3355 2003-01-18 Paul Brook <paul@nowt.org>
3357 * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
3358 * trans-decl.c (g95_set_symbol_decl): Handle non-array result
3360 (g95_get_extern_function_decl): Put decls in the correct context.
3362 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
3364 * trans-io.c: Port changes from Andy to set ERR flag.
3366 2003-01-17 Paul Brook <paul@nowt.org>
3368 * trans-array.c: Add various comments.
3369 (g95_ss_terminator): Declare as const.
3370 (g95_walk_expr): Remove first parameter and update all callers.
3371 (g95_walk_op_expr): Initialize scalar SS properly.
3372 * trans-array.h (g95_walk_expr): Update prototype.
3373 * trans-expr.c: Update for new g95_walk_expr.
3374 * trans-intrinsic.c: Ditto.
3375 * trans-io.c: Ditto.
3376 * trans.h: Various comments for SS chains.
3378 2003-01-17 Paul Brook <paul@nowt.org>
3380 * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
3382 * intrinsic.c (add_functions): Use them.
3383 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
3384 * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
3386 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
3388 Fallout of a small merge conflict:
3389 * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
3391 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
3393 * initrinsic.c: New add_sym_* functions for strong typing.
3394 (add_conv): Make prototype strict.
3395 * dump-parse-tree.c, dependency.c: Include config.h
3396 * resolve.c, trans-io.c: Fix typos.
3398 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
3400 * dump-parse-tree.c (g95_show_code_node): Show the
3401 condition for a computed GOTO that was transformed
3402 to a SELECT CASE construct.
3403 * resolve.c (check_case_overlap): Revert previous switch
3404 to treaps, it was too slow and didn't catch all trouble.
3405 (resolve_symbol): Be more flexible about module procedures.
3406 * symbol.c (check_conflict): Point to relevant section in
3407 the standard for dubious conflict. Allow procedure
3408 dummy arguments to be optional again.
3409 * trans-io (add_field): Rename to g95_add_field. Change
3411 * trans-stmt (trans_select): Handle unbounded cases for
3412 integer SELECT CASE constructs. Fix/add more comment.
3414 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
3416 * g95.h: Uses GCC's function attribute macros.
3417 * error.c, module.c, parse.c, g95.h: More function attributes.
3419 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
3421 * trans-decl.c (get_label_decl): Use TREE_LINENO instead
3422 of DECL_SOURCE_LINE, and TREE_FILENAME instead of
3425 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
3427 * f95-lang.c (pushdecl): Use TREE_LINENO instead of
3429 * trans.c (g95_trans_code): Use annotate_all_with_file_line
3430 instead of nowdead wrap_all_with_wfl.
3432 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
3434 * parse.c (g95_parse_file): In verbose mode, dump the parse tree
3435 before generating code, so we can still see it even if the code
3436 generation phase dies.
3438 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
3440 * decl.c (build_sym): Split out initialization expression parts...
3441 (add_init_expr_to_sym): ...to here.
3442 (variable_decl): Add the symbol following an attribute list to the
3443 symbol tree before parsing the optional initialization expression
3444 if the symbol is not of a derived type.
3445 * primary.c (g95_match_rvalue): Don't assume a symbol always has
3446 a value if it is a PARAMETER.
3448 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
3450 * misc.c: Don't #include <mcheck.h>
3451 * module.c: Ditto. Kill uses of mtrace, muntrace. If there
3452 ever was a glibc bug, then either this was never reported to
3453 glibc people, or it has been fixed for so long that there's
3454 no information you can find about it, anywhere.
3456 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
3459 * module.c (attr_bits, bt_types, array_spec_types):
3460 Switch 'const' and 'static'.
3461 * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
3463 GNU'ify source code:
3464 * trans-io.c: Numerous fixes, one fixed warning and a few
3465 TODO markers so that we don't forget about them.
3467 2003-01-13 Paul Brook <paul@nowt.org>
3469 * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
3470 * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
3472 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
3473 * match.c (g95_match_stop): Fix dumb == -> != error.
3475 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
3477 * dump-parse-tree.c (show_indent): Add line breaks. This
3478 whole dumping process needs cleanups.
3479 * f95-lang.c (g95_mark_addressable): Fix prototype to match
3480 the langhook. Fix 'return's accordingly.
3481 * g95-support.h: Adjust prototype.
3482 * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
3483 * lang-options.h: Add '-fsyntax-only'.
3484 * options.c (g95_init_options): Init 'no_backend'.
3485 (g95_parse_arg): Deal with '-fsyntax-only'.
3486 * parse.c (g95_parse_file): Do not generate code if 'no_backend'
3489 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
3491 * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
3492 arguments. Also make sure that if a symbol is marked INTRINSIC,
3493 an intrinsic with the symbol's name actually exists.
3494 (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
3495 Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
3496 ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
3498 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
3500 * resolve.c (resolve_contained_functions): Fix condition, don't
3501 throw internal_error if a child namespace has no name. Apparently
3502 this can be the case?
3504 2003-01-11 Paul Brook <paul@nowt.org>
3506 Port changes from Andy's tree:
3507 * g95.h (g95_code): Add stop_code.
3508 * match.c (g95_match_stop): Detter syntax checking.
3509 * resolve.c (resolve_generic_f0): Return match type.
3510 (resolve_generic_f): Remove dead/duplicated code.
3511 (resolve_specific_f): Ditto.
3512 * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
3513 * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
3514 * trans-stmt.c (g95_trans_stop): Handle new STOP format.
3516 2003-01-11 Paul Brook <paul@nowt.org>
3518 * trans-array.c: Various documentation/comment changes.
3519 * trans-stmt.c: Ditto.
3522 2003-01-10 Paul Brook <paul@nowt.org>
3524 * options.c/h: Add -fdump-parse-tree as alias of -v.
3526 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3528 * dump-parse-tree.c (g95_show_namespace): Fixed another
3529 typo. Sorry, it's Friday...
3531 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3534 * trans-array.c, trans-array.h, trans.c, trans-const.c,
3535 trans-const.h, trans-decl.c, trans-expr.c, trans.h
3536 trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
3537 trans-types.c: Fix bogus copyright years, add 2003.
3538 * trans-types.h: Give copyright header.
3540 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3542 * dump-parse-tree.c (g95_show_namespace): Fixed typo.
3543 * expr.c, options.c, scanner.c: Add some more 'const' markers.
3544 * intrinsic.c: Some constant strings moved to read-only memory.
3545 * io.c (format_asterisk): Move to...
3548 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3550 * dump-parse-tree.c (g95_show_namespace): Dump implicit
3551 types for ranges instead of per-letter. Indent the
3552 'CONTAINS' just like everything else.
3553 * resolve.c (resolve_contained_functions): Clarify comment.
3554 Explain non-obvious conditional expression. Improve
3555 diagnostics if tyoe cannot be resolved.
3556 Port semi-fix from Andy's tree:
3557 (was_declared): Move up before first use.
3558 (generic_sym, specific_sym): New functions. Code moved
3559 out if procedure_kind.
3560 (procedure_kind): Simplify using new functions.
3561 (resolve_generic_f): Make sure the functions we find in
3562 a parent namespace is generic.
3563 (resolve_specific_f): Ditto for specific functions.
3565 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3567 * trans-stmt.c, trans.c: Fix some code style issues. Add
3568 some more comment (but still not enough!).
3570 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3572 * symbol.c (flavors, procedures, intents, acces_types,
3573 access_types, ifsrc_types): Make const.
3574 * misc.c (g95_string2code): Make 'm' param 'const'.
3575 * module.c (find_enum, write_atom, mio_name): Make
3577 (attr_bits, bt_types, array_spec_types, array_ref_types,
3578 ref_types, expr_types): Make const.
3579 * g95.h: Adjust external decls.
3581 2003-01-09 Paul Brook <paul@nowt.org>
3583 * Testsuite: Add a load of new cases.
3585 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
3587 * Make-file.in: Add dependency on back end header files;
3588 a parallel build should work now.
3589 * f95-lang-c (lang_identifier): Remove bogus comment.
3590 (g95_be_parse_file): Fix prototype.
3591 (g95_init): Make static.
3592 (g95_finish): Make static.
3593 * error.c (g95_syntax_error): Kill. Make define in...
3594 * g95.h (g95_syntax_error): Define.
3595 (g95.options): Make 'source' member 'const'.
3596 * interface.c (g95_match_interface): Explain
3597 hard-to-read condition.
3598 (g95_match_end_interface): Ditto.
3599 * trans_const.c (g95_build_string_const): Make 's' parameter
3601 * trans_const.h: Adjust protoype accordingly.
3602 * trans-decl.c: Include tree-dump.h
3603 (g95_generate_function_code): Build fixes for recent changes
3604 in the tree-ssa branch.
3606 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
3608 * format.c: Kill, move code from here...
3610 * Make-lang.in: Adjust.
3613 * BUGS: Mention where to submit bugs. Move old content...
3614 * TODO: ...to here. New file.
3616 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
3617 Fix most warnings, and suppress the ones we can't fix for now.
3618 * Make-lang.in: Suppress warnings about bad proto's in g95.h,
3619 these warnings just clutter the screen and there's not much
3620 we can do about them for now anyway.
3621 * check.c, iresolve.c: Mark unused function parameters.
3622 * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
3623 they should be resolved before they get here.
3624 * error.c: Remove unused FILE *status_out.
3625 * f95-lang.c (g95_init): Remove bogus cast.
3626 * Many files: Make things 'const' where required.
3627 * g95.h: Fix prototypes for all modified functions above.
3628 (g95_options): Remove 'object' member.
3630 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
3632 * Make-file.in: Cleanup bogus targets. Add more comment.
3633 * lang-options.h: New option '-w'.
3634 * g95.h: add no_options field to struct g95_options.
3635 * options.c (g95_init_options): Default no_warnings to off.
3636 (g95_parse_arg): Recognise the '-w' switch and its alias,
3638 * error.c (g95_warning, g95_warning_now): Don't emit warning if
3639 no_warning option is set.
3640 * iresolve.c (g95_resolve_shape): Fix warning.
3642 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
3644 * primary.c (g95_next_string_char): Rename next_string_char, and
3645 make static. Adjust callers accordingly.
3646 * resolve.c (resolve_generic_f0): Return try, not match. Adjust
3647 callers accordingly.
3648 * g95.h: Split out all g95_match* functions to...
3649 * match.h: ...here. New file.
3650 * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
3651 matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
3653 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
3655 * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
3656 g95_merge_new_implicit): New functions.
3657 (g95_match_implicit_none, g95_match_implicit): Move from here...
3658 * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
3659 Modify to use the new functions in symbol.c.
3660 * g95.h: Add and move prototypes.
3662 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
3664 * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
3665 node compare function.
3666 (g95_insert_bbt): Likewise.
3667 (g95_insert_bbt_with_overlap): Likewise.
3668 (g95_delete_bbt): Likewise.
3669 (delete_treap): Likewise. Also fix a potential bug when calling it.
3670 * module.c (compare_pointers): Change proto to compare_fn.
3671 (compare_integers): Likewise.
3672 (compare_true_names): Likewise.
3673 (find_true_name): Adjust call to compare_true_names to match proto.
3674 (require_atom, write_atom, mio_name): Fix 'const' warnings.
3675 (init_pi_tree): Make compare a compare_fn instead of (int *).
3676 * resolve.c (compare_cases): Change proto to compare_fn.
3677 * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
3678 it static, and rename to compare_symtree.
3679 (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
3681 * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
3682 of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
3684 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
3685 * Make-lang.in: Fix spaces/tabs issues from previous patch.
3686 * patch.options: Blow away Paul's checkin mistake :-)
3687 * io.c (terminate_io): Fix memory leak (Arnaud).
3689 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
3691 * Make-lang.in: Teach about building DVI, info manual.
3692 * g95.texi: New file.
3694 2003-01-02 Paul Brook <paul@nowt.org>
3696 * trans-array.c (g95_reverse_ss): Make static and don't use.
3697 (g95_conv_ss_descriptor): Don't use g95_loopinfo
3698 (g95_conv_array_parameters): Modify for pointer assignments.
3699 (g95_walk_subexpr): New function.
3700 (g95_walk_expr*): Use it.
3701 * trans-array.h (g95_reverse_ss): Remove prototype.
3702 * trans-expr.c (g95_trans_pointer_assign): Implement.
3703 (Many): Set se.want_pointer before calling g95_conv_array_parameter.
3704 * trans-intrinsic.c: Sync with scalarizer changes.
3705 * trans-io.c: Ditto.
3707 2002-12-29 Paul Brook <paul@nowt.org>
3709 * trans-array.c: Document calling convention for arrays.
3711 2002-12-19 Paul Brook <paul@nowt.org>
3713 * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
3714 assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
3715 optional parameters for some intrinsics.
3716 (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
3717 * trans-expr.c (g95_conv_function_call): Pass NULL for absent
3718 optional parameters.
3719 * trans.h (g95_se): Add ignore_optional flag.
3721 2002-12-15 Paul Brook <paul@nowt.org>
3723 * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
3724 * trans-decl.c (g95_generate_function_code): Use TDI_original.
3726 2002-12-14 Paul Brook <paul@nowt.org>
3728 * trans-stmt.c (g95_trans_call): Use resolved symbol name.
3730 2002-12-12 Paul Brook <paul@nowt.org>
3732 * trans-array.c (g95_trans_array_constructor_subarray): Fully
3733 initialize the scalarizer.
3734 (various): Update to new format of g95_expr->value.constructor.
3736 2002-12-08 Paul Brook <paul@nowt.org>
3738 * trans-array.c (g95_put_offset_into_var): New function.
3739 (g95_trans_array_constructor_subarray): New function.
3740 (g95_trans_array_constructor_value): Use it.
3741 (g95_array_cons_size): Don't abort() on array components.
3743 2002-12-08 Paul Brook <paul@nowt.org>
3745 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
3746 * support.c: Update #includes.
3747 (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
3748 * trans-array.c: Update #includes.
3750 * trans-const.c: Ditto.
3751 * trans-io.c: Ditto.
3752 * trans-types.c: Ditto.
3753 (g95_init_types): Set size_type_node.
3754 * trans-decl.c: Update #includes.
3755 (gfor_fndecl_adjust{l,r}): Declare and initialize.
3756 * trans-stmt.c: Update #includes.
3757 (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
3758 (g95_trans_select): Fix check for unbounded ranges.
3759 * trans-expr.c: Update #includes.
3760 (g95_conv_string_tmp): New function.
3761 (g95_conv_concat_op): Use it.
3762 * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
3763 * Trans-intrisic.c: Update #includes.
3764 (g95_conv_intrinsic_strcmp): New function.
3765 (g95_conv_intrinsic_adjust): Ditto.
3766 (g95_conv_intrinsic_function: Use them.
3768 2002-11-30 Paul Brook <paul@nowt.org>
3770 * trans-array.c (g95_walk_function_expr): Handle non-array return by
3772 * trans-dec.c (g95_build_function_decl): Handle character return
3774 (g95_get_fake_result_decl): Ditto.
3775 (g95_trans_deferred_vars): Ditto.
3776 * trans-expr.c (g95_conv_function_call): Ditto.
3777 (g95_trans_arrayfunc_assign) Limit to array valued functions.
3778 * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
3779 (g95_conv_intrinsic_function): Use it.
3780 * trans-types.c (g95_sym_type): Handle functions returning strings.
3781 (g95_return_by_reference): Ditto.
3782 (g95_get_function_type): Ditto.
3784 2002-11-18 Paul Brook <paul@nowt.org>
3786 * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
3787 requires a temporary.
3788 (g95_trans_select): Handle computed gotos.
3789 * trans-types.c (g95_build_array_type): Warn about non-functional
3790 assumed shape arrays.
3791 * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
3793 * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
3794 (g95_conv_intrinsic_int): New function.
3795 (g95_conv_intrinsic_mod): New function.
3796 (g95_conv_intrinsic_ichar): New function.
3797 (g95_conv_intrinsic_function): Use them.
3798 (g95_conv_intrinsic_dim): Use g95_evaluate_now.
3800 2002-11-17 Toon Moene <toon@moene.indiv.nluug.nl>
3802 * trans-types.c (g95_build_array_type): Assumed
3803 sized arrays can have rank > 1.
3804 * trans.c (g95_trans_code): Remove erroneous
3805 warning about CONTINUE.
3806 * trans-expr.c (g95_conv_variable): Remove
3809 2002-11-15 Paul Brook <paul@nowt.org>
3811 * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
3813 2002-10-31 Paul Brook <paul@nowt.org>
3815 * f95-tree.c: Remove tree copying stuff that's now in gimple.c
3816 * trans-expr.c (g95_conv_component_ref): Handle character string
3818 (g95_conv_string_parameter): Ditto.
3819 * trans-types.c (g95_get_derived_type): Add length decl to caracter
3822 2002-10-10 Paul Brook <paul@nowt.org>
3824 * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
3825 * trans-expr.c (g95_conv_function_call): Remove unreliable return value
3827 * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
3828 (g95_conv_intrinsic_function): Handle size and shape intrinsics.
3829 (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
3830 * trans-types.c (pvoid_type_node): Declare and initialize.
3831 * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
3832 (g95_array_allocate): Fix when base==data.
3833 (g95_conv_array_parameter): Correctly handle reduced rank sections.
3834 * trans-io.c (g95_trans_write): Correctly handle string modifiers.
3836 2002-10-09 Paul Brook <paul@nowt.org>
3838 * (g95_conv_expr_reference): Handle character strings correctly.
3840 2002-10-07 Paul Brook <paul@nowt.org>
3842 (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
3844 * trans-array.c (g95_build_array_initializer): Remove.
3845 (g95_conv_array_initializer): New Function.
3846 (g95_trans_auto_arry_allocation): Cleanup.
3847 (g95_trans_init_character_array): Remove.
3848 * g95spec.c: Link in libgforbegin.
3849 * trans.c (g95_generate_code): Rename main function to MAIN__.
3850 (g95_create_var): New function.
3851 (g95_create_var_np): New function.
3852 (g95_evaluate_now): New function.
3853 (g95_start_block): New function.
3854 (g95_finish_block): New function.
3855 (g95_add_expr_to_block): New function.
3856 (g95_add_block_to_block): New function.
3857 * trans-expr.c (g95_conv_componen_ref): New function.
3858 * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
3859 (F95_OBJS): Add dependency.o.
3860 * f95-lang.c (g95_is_simple_stmt): Remove.
3861 * f95-tree.c (mark_not_simple): New function.
3862 (unshare_all_trees): New function.
3863 (create_tmp_var, create_tmp_alias_var): Remove.
3864 * support.c (declare_tmp_vars, tree_last_decl): Remove.
3865 * trans*: Convert to new IR using GENERIC trees. Don't bother about
3866 SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
3868 2002-10-01 Paul Brook <paul@nowt.org>
3870 * trans-array.c: Add support for descriptorless arrays.
3871 (g95_conv_array_data): New function.
3872 (g95_conv_array_base): New function.
3873 * trans-array.h: Declare these here.
3874 * trans-decl.c(g95_create_mopdule_variable): Perform variable
3875 initialization and creation here.
3876 (g95_create_module_vars): Instead of here.
3877 * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
3878 * trans-intrinsic.c: Ditto.
3879 * trans-types.c (g95_is_nodesc_array): New function.
3880 (g95_get_nodesc_array_type): New function.
3881 (g95_sym_type, g95_get_derived_type): Use them.
3882 * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
3884 2002-09-28 Paul Brook <paul@nowt.org>
3886 * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
3887 * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
3890 2002-09-24 Paul Brook <paul@nowt.org>
3892 * f95-lang.c (listify): Remove declaration.
3893 (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
3895 * f95-tree.c (get_name): New function.
3896 * trans.c (module_namespace): Remove.
3897 * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
3898 * trans-types.c: Ditto.
3900 2002-09-19 Paul Brook <paul@nowt.org>
3902 * trans-array.c (g95_get_array_cons_size): New Function.
3903 (g95_con_ss_startstride): Handle Array constructors.
3904 (g95_conv_loop_setup): Ditto.
3905 (g95_conv_array_parameter): Ditto.
3906 * tras-decl.c (g95_finish_var_decl): Make initializes variables
3909 2002-09-19 Paul Brook <paul@nowt.org>
3911 * trans.c (g95_simple_fold_tmp): Detect variables inside
3913 * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
3915 2002-09-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
3917 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
3919 2002-09-14 Paul Brook <paul@nowt.org>
3921 * trans.c (g95_create_module_variable): Move to trans-decl.c.
3922 * trans-const.c (g95_conv_string_init): New Function.
3923 * trans-const.h: Declare it.
3924 * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
3925 variables. Don't bail on intrinsic symbols.
3926 (get_extern_function_decl): Handle specific intrinsic functions.
3927 * trans-types.c (g95_sym_type): Dummy functions don't return
3929 * trans-array.c (g95_build_array_initializer): New Function.
3930 (g95_trans_auto_array_allocation): Build initializer for static decls.
3931 Don't use mpz_addmul, it's GMP4 only.
3933 2002-09-12 Paul Brook <paul@nowt.org>
3935 * trans-decl.c (g95_generate_code): Fix thinko with return variable.
3936 (g95_get_extern_function_decl, g95_build_function_decl): Mangle
3937 assembler names for module procedures.
3939 2002-09-11 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
3941 * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
3944 2002-09-10 Paul Brook <paul@nowt.org>
3946 * trans-array.c: Change format of G95_SS_TEMP strictures.
3947 (g95_check_fncall_dependancy): New function.
3948 (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
3950 * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
3952 (g95_build_function_decl): Don't assume result arrays are packed.
3953 (g95_trans-deferred-vars): Handle array result variables.
3954 (g95_generate_fuction_code): Clear saved_function_decls.
3955 * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
3957 (g95_trans_arrayfunc_assign): New function.
3958 (g95_trans_assignment): Use it.
3959 * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
3960 (g95_se): Add direct_byref.
3961 * trans-types.c: Use sym->result rather than sym where appropriate.
3962 * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
3963 Update other functions to use this.
3964 (g95_is_intrinsic_libcall): New function.
3965 (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
3966 (g95_walk_intrinsic_function): Ditto.
3968 2002-09-08 Paul Brook <paul@nowt.org>
3970 * trans-types.c: Change rank field to dtype field in array descriptor.
3971 * trans-array.c: Implement filling of dtype array descriptor field.
3972 * trans-intrinsic.c: Fix broken LEN intrinsic.
3974 2002-09-07 Paul Brook <paul@nowt.org>
3976 * trans-intrinsic.c: Remove outdated todo intrinsic list.
3977 (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
3978 (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
3980 2002-09-06 Paul Brook <paul@nowt.org>
3982 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
3983 (gt-f95-trans-types.h): Add dependancy information.
3984 * config-lang.in (gtfiles): Add trans-types.c
3985 * f95-lang.c (g95_be_parse_file): Pass error and warning counts
3986 back to top-level code.
3987 * trans-array.c, trans-types.c: Change format of array descriptor.
3988 (g95_conv_descriptor_dimension): New function.
3989 * trans-types.h (g95_conv_descriptor_rank): define.
3990 * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
3993 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
3995 * trans-array.c, trans-types.c: Add rank information to descriptor.
3997 2002-09-06 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
3999 * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
4001 2002-09-04 Paul Brook <paul@nowt.org>
4003 * f95-lang.c (g95_create_decls): New function.
4004 (g95_init): Move initialization of external decls to above, and call
4005 from g95_be_parse_file.
4006 * trans.c (g95_finish_stmt): Don't amputate the decl chain.
4007 * trans-types.c (g95_init_types): Always name integer and char types.
4008 (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
4010 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
4012 * Make-lang.in: Add options.c to F95_PARSER_OBJS
4014 2002-09-02 Paul Brook <paul@nowt.org>
4016 * g95_generate_code: Clear the attr for __fortran_main.
4017 * trans-types.c (g95_finish_type): New function.
4018 * g95_init_io_state_type: Use g95_finish_type.
4019 * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
4021 2002-09-01 Paul Brook <paul@nowt.org>
4023 * README.backend: Warn about the dangers of extra config.h files.
4024 Remove obsolete libgfor stuff.
4025 * config-lang.in: Add target-libgfor dependancy.
4026 * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
4028 2002-09-01 Toon Moene <toon@moene.indiv.nluug.nl>
4030 * g95_conv_mpz_to_tree: Free storage pointed to by q,
4033 2002-08-30 Paul Brook <paul@nowt.org>
4035 * trans-intrinsic.c (g95_conv_intrinsic_function,
4036 g95_walk_intrinsic_function): Added ANY and ALL.
4037 (g95_conv_intrinsic_anyall): New function.
4038 * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in