1 2004-05-25 Paul Brook <paul@codesourcery.com>
3 * expr.c (check_inquiry): Remove bogus tests.
5 2004-05-23 Paul Brook <paul@codesourcery.com>
8 * expr.c (restricted_args): Remove redundant checks/argument.
9 (external_spec_function): Update to match.
10 (restricted_intrinsic): Rewrite.
12 2004-05-23 Paul Brook <paul@codesourcery.com>
13 Victor Leikehman <lei@haifasphere.co.il>
15 * gfortran.h (struct gfc_symbol): Add equiv_built.
16 * trans-common.c: Change int to HOST_WIDE_INT. Capitalize error
18 (current_length): Remove.
19 (add_segments): New function.
20 (build_equiv_decl): Create initialized common blocks.
21 (build_common_decl): Always add decl to bindings.
22 (create_common): Create initializers.
23 (find_segment_info): Reformat to match coding conventions.
24 (new_condition): Use add_segments.
25 (add_condition, find_equivalence, add_equivalences): Move iteration
26 inside functions. Only process each segment once.
27 (new_segment, finish_equivalences, translate_common): Simplify.
29 2004-05-23 Steven G. Kargl <kargls@comcast.net>
31 * check.c (gfc_check_random_seed): Issue for too many arguments.
33 2004-05-22 Steven G. Kargl <kargls@comcast.net>
35 * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
37 2004-05-22 Paul Brook <paul@codesourcery.com>
39 * dump-parse-tree.c (gfc_show_equiv): New function.
40 (gfc_show_namespace): Use it.
42 2004-05-22 Victor Leikehman <lei@haifasphere.co.il>
45 * symbol.c (gfc_add_common): Disable checks to work around other more
46 fundamental inadequacies.
48 2004-05-22 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
50 * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
52 (gfc_build_function_decl): Likewise.
54 2004-05-22 Steven G. Kargl <kargls@comcast.net>
56 * check.c (gfc_check_system_clock): New function.
57 * intrinsic.c (add_sym_3s): New function.
58 (add_subroutines): Use it.
59 * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
61 * iresolve.c (gfc_resolve_system_clock): New function.
63 2004-05-22 Steven G. Kargl <kargls@comcast.net>
65 * invoke.texi: Document -Wunderflow and spell check.
66 * lang.opt: Add Wunderflow.
67 * gfortran.h (gfc_option_t): Add warn_underflow option.
68 * options.c (gfc_init_options, set_Wall): Use it.
69 * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
70 * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
71 gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
72 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
73 * arith.c (common_logarithm): Fix typo in comment.
75 2004-05-21 Roger Sayle <roger@eyesopen.com>
77 * io.c (check_format): As a GNU extension, allow the comma after a
78 string literal to be optional in a format. Use gfc_notify_std to
79 issue an error/warning as appropriate.
81 2004-05-21 Roger Sayle <roger@eyesopen.com>
83 * io.c (check_format): Use gfc_notify_std to determine whether to
84 issue an error/warning for omitting the digits from the X format.
86 2004-05-20 Roger Sayle <roger@eyesopen.com>
88 * io.c (check_format): Allow the number before the X format to
89 be optional when not -pedantic.
91 2004-05-18 Feng Wang <fengwang@nudt.edu.cn>
92 Paul Brook <paul@codesourcery.com>
94 * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
95 Create decls for __builtin_pow{,f}.
96 * gfortran.h (PREFIX_LEN): Define.
97 * trans-decl.c (gfor_fndecl_math_powi): Add.
98 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
99 (gfc_build_intrinsic_function_decls): Create decls for powi.
100 * trans-expr.c (powi_table): Add.
101 (gfc_conv_integer_power): Remove.
102 (gfc_conv_powi): New function.
103 (gfc_conv_cst_int_power): New function.
104 (gfc_conv_power_op): Use new powi routines.
105 * trans.h (struct gfc_powdecl_list): Add.
106 (gfor_fndecl_math_powi): Add.
107 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
109 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
111 * trans.c, trans-decl.c: Fix comment typos.
113 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
115 * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
117 2004-05-18 Steve Kargl <kargls@comcast.net>
119 * arith.c (gfc_int2complex): Fix incorrect range checking.
121 2004-05-18 Paul Brook <paul@codesourcery.com>
124 * decl.c (add_init_expr_to_sym): Remove incorrect check.
125 (default_initializer): Move to expr.c.
126 (variable_decl): Don't assign default initializer to variables.
127 * expr.c (gfc_default_initializer): Move to here.
128 * gfortran.h (gfc_default_initializer): Add prototype.
129 * resolve.c (resolve_symbol): Check for illegal initializers.
130 Assign default initializer.
132 2004-05-17 Steve Kargl <kargls@comcast.net>
134 * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
136 2004-05-17 Steve Kargl <kargls@comcast.net>
138 * arith.c (gfc_real2complex): Range checking wrong part of complex
141 2004-05-16 Paul Brook <paul@codesourcery.com>
143 * options.c (gfc_handle_module_path_options): Fix buffer overrun.
145 2004-05-16 Paul Brook <paul@codesourcery.com>
147 * arith.c (gfc_range_check): Fix logic error.
149 2004-05-16 Steve Kargl <sgk@troutmask.apl.washington.edu>
151 * arith.c: Fix comment typos.
153 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
156 * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
157 not initialized in a disallowed fashion.
158 * match.c (gfc_match_common): Likewise.
159 (var_element): Verify that variable is not in the blank COMMON,
160 if it is in a common.
162 2004-05-15 Joseph S. Myers <jsm@polyomino.org.uk>
164 * Make-lang.in (f95.generated-manpages): Remove.
166 (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
167 f95.maintainer-clean): Generate info and dvi files in objdir/doc.
170 (f95.install-info): Remove.
173 2004-05-15 Victor Leikehman <lei@haifasphere.co.il>
175 * decl.c (add_init_expr_to_sym): Check for variable size arrays.
177 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
179 * primary.c (match_boz_constant): Use gfc_notify_std() for
180 issuing a warning or an error.
182 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
185 * primary.c (match_structure_constructor): Rename ...
186 (gfc_match_structure_constructor): ... to this. Make non-static.
187 (gfc_match_rvalue): Call renamed function.
188 * match.h (gfc_match_structure_constructor): Declare.
189 * match.c (gfc_match_data_constant): Handle structure
192 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
196 * gfortran.h (gfc_linebuf): New typedef.
198 (gfc_file): Revamped, use new gfc_linebuf.
199 (locus): Revamped, use new types.
200 (gfc_current_file): Remove.
201 (gfc_current_form, gfc_source_file): New global variables.
202 * match.c (gfc_match_space, gfc_match_strings): Use
203 gfc_current_form to find source form.
204 * module.c (gfc_dump_module): Use gfc_source_file when printing
206 * error.c (show_locus, show_loci) Use new data structures to print
208 * scanner.c (first_file, first_duplicated_file, gfc_current_file):
210 (file_head, current_file, gfc_current_form, line_head, line_tail,
211 gfc_current_locus1, gfc_source_file): New global variables.
212 (gfc_scanner_init1): Set new global variables.
213 (gfc_scanner_done1): Free new data structures.
214 (gfc_current_locus): Return pointer to gfc_current_locus1.
215 (gfc_set_locus): Set gfc_current_locus1.
216 (gfc_at_eof): Set new variables.
217 (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
218 to new locus structure.
219 (gfc_check_include): Remove.
220 (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
221 (gfc_skip_comments): Use gfc_current_form, find locus with
223 (gfc_next_char): Use gfc_current_form.
224 (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
225 (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
227 (get_file): New function.
228 (preprocessor_line, include_line): New functions.
229 (load_file): Move down, rewrite to match new data structures.
230 (gfc_new_file): Rewrite to match new data structures.
231 * parse.c (next_statement): Remove code which is now useless. Use
232 gfc_source_form and gfc_source_file where appropriate.
233 * trans-decl.c (gfc_get_label_decl): adapt to new data structures
234 when determining locus of frontend code.
235 * trans-io.c (set_error_locus): Same.
236 * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
237 * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
239 (all): Add missing initializers.
241 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
243 * Make-lang.in (trans-common.o): Remove redundant dependency.
244 (data.c): Replace object file name ...
245 (data.o): ... by the correct one.
247 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
249 * dump-parse-tree.c (gfc_show_array_ref): Print colon only
250 for ranges when dumping array references.
252 2004-05-14 Victor Leikehman <lei@haifasphere.co.il>
254 * decl.c (variable_decl): Always apply default initializer.
256 2004-05-08 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
259 * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
260 handle zero correctly.
262 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
264 * match.c (gfc_match): Eliminate dead code.
266 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
268 * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
269 Detect bad continuation line in fixed form sources.
271 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
274 * iresolve.c (gfc_resolve_nearest): Add new function.
275 * intrinsic.h: ... declare it here.
276 * intrinsic.c (add_functions): ... add it as resolving function
279 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
282 * match.c (gfc_match_do): Allow infinite loops with
283 label-do-stmt. Do not enforce space after comma.
285 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
288 * parse.c (parse_interface): Allow empty INTERFACE, remove
291 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
293 * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
294 decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
295 expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
296 intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
297 matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
298 primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
299 trans-array.c, trans-array.h, trans-common.c, trans-const.c,
300 trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
301 trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
302 trans-types.h, trans.c, trans.h: Update copyright years and
304 * data.c: Likewise, also removed two whitespace-only lines.
305 * gfortranspec.c, lang.opt: Update copyright years.
307 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
310 * trans-decl.c (generate_local_decl): Don't warn for unused
311 variables which are in common blocks.
313 2004-05-13 Diego Novillo <dnovillo@redhat.com>
315 * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
316 trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
317 trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
319 2004-05-13 Victor Leikehman <lei@haifasphere.co.il>
322 * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
324 2004-05-13 Joseph S. Myers <jsm@polyomino.org.uk>
326 * gfortran.texi: Use @table @emph instead of @itemize @emph.
327 Remove "set DEVELOPMENT".
328 (Compiling GFORTRAN): Remove.
330 2004-05-09 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
332 * array.c (match_subscript, match_array_ref): Add comments
333 explaining argument 'init'.
334 * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
335 trans-expr.c, trans.c: Fix some typos in comments.
336 * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
337 * primary.c (match_digits, match_integer_constant): Add comment
340 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
343 * primary.c: Include system.h and flags.h, needed for pedantic.
344 (match_boz_constant): Allow "x" for hexadecimal constants, warn if
347 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
350 * match.c (match_data_constant): Handle case where
351 gfc_find_symbol sets sym to NULL
353 2004-04-28 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
355 * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
356 dependency on mathbuiltins.def
358 2004-04-24 Victor Leikehman <lei@il.ibm.com>
360 * trans-io.c (transfer_expr): Implemented recursive printing
363 2004-04-24 Andrew Pinski <pinskia@physics.uc.edu>
365 * gfortranspec.c: Do not include multilib.h.
367 2004-04-24 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
369 * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
370 2004 to copyright years.
371 * trans-expr.c, trans-decl.c: Comment update, we now generate
372 GENERIC, not SIMPLE. Add 2004 to copyright years.
374 2004-04-24 Paul Brook <paul@codesourcery.com>
376 * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
378 2004-04-24 Feng Wang <fengwang@nudt.edu.cn>
381 * arith.c (gfc_arith_divide): Fix complex divide.
383 2004-04-23 Andrew Pinski <pinskia@physics.uc.edu>
385 * gfortranspec.c: Include the target headers.
387 2004-04-18 Feng Wang <fengwang@nudt.edu.cn>
391 * arith.c (arctangent2): New function.
392 * arith.h (arctangent2): Add function prototype.
393 * simplify.c (gfc_simplify_atan2): Use it.
394 (gfc_simplify_log): Use it.
396 2004-04-12 Diego Novillo <dnovillo@redhat.com>
398 * fortran/f95-lang.c (gfc_expand_stmt): Remove.
399 (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
401 2004-04-11 Bud Davis <bdavis9659@comcast.net>
404 * trans-io.c (build_dt): Change REC to value.
406 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
409 * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
410 the real value when converting mpf to string.
412 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
415 * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
418 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
421 * simplify.c (simplify_min_max): Convert the type of the result.
423 2004-04-11 Paul Brook <paul@codesourcery.com>
425 * gfortran.texi: Use full target triplet.
427 2004-04-11 Paul Brook <paul@codesourcery.com>
429 * Make-lang.in (GFORTRAN_TEXI): Set it.
430 (fortran/dfortran.dvi): Use it. Add fortran to include paths.
431 (fortran/gfortran.info): Ditto.
432 * gfortran.texi: Major update.
433 * invoke.texi: New file.
435 2004-04-10 Paul Brook <paul@codesourcery.com>
437 * trans-array.c (gfc_trans_allocate_temp_array,
438 gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
439 * trans-decl.c (gfc_build_dummy_array_decl,
440 gfc_get_symbol_decl, gfc_build_function_decl,
441 gfc_create_module_variable): Ditto.
442 * trans-expr.c (gfc_conv_variable): Ditto.
443 * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
444 * trans.h (GFC_DECL_STRING): Remove.
445 (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
446 GFC_DECL_ASSIGN): Renumber flags.
448 2004-04-05 Paul Brook <paul@codesourcery.com>
452 * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
454 * gfortran.h (struct gfc_charlen): Add backend_decl.
455 * trans-array.c (gfc_trans_allocate_temp_array,
456 gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
457 (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
458 Remove old, broken string handling.
459 (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
460 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
461 gfc_trans_deferred_array): Handle character arrays.
462 * trans-const.c (gfc_conv_const_charlen): New function.
463 * trans-const.h (gfc_conv_const_charlen): Add prototype.
464 * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
466 (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
467 (gfc_create_string_length): New function.
468 (gfc_get_symbol_decl): Create lengths for character variables.
469 (gfc_get_fake_result_decl): Ditto.
470 (gfc_build_function_decl): Only set length for assumed length
472 (gfc_trans_dummy_character): New function.
473 (gfc_trans_auto_character_variable): Rewrite.
474 (gfc_trans_deferred_vars): Handle more types of character variable.
475 (gfc_create_module_variable): String lengths have moved.
476 (gfc_generate_function_code): Initialize deferred var chain earlier.
477 * trans-expr.c (gfc_conv_init_string_length): Rename ...
478 (gfc_trans_init_string_length): ... to this.
479 (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
480 gfc_conv_function_call): Update to new format for character variables.
481 (gfc_conv_string_length): Remove.
482 (gfc_conv_string_parameter): Update assertion.
483 * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
484 * trans-io.c (set_string): Use new macro names.
485 * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
486 * trans-types.c (gfc_get_character_type): Use existing length expr.
487 (gfc_is_nodesc_array): Make public.
488 (gfc_get_dtype_cst): Rename ...
489 (gfc_get_dtype): ... to this. Handle unknown size arrays.
490 (gfc_get_nodesc_array_type): Use new name.
491 (gfc_sym_type): New character variable code.
492 (gfc_get_derived_type): Ditto.
493 (gfc_get_function_type): Evaluate character variable lengths.
494 * trans-types.h (gfc_strlen_kind): Define.
495 (gfc_is_nodesc_array): Add prototype.
496 * trans.h: Update prototypes.
497 (struct lang_type): Update comments.
498 (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
499 (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
501 2004-04-04 Paul Brook <paul@codesourcery.com>
503 * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
504 * options.c (gfc_init.options, gfc_handle_option): Ditto.
505 * trans-expr.c (gfc_conv_function_call): Ditto.
506 * trans-types.c (gfc_is_nodesc_array): Ditto
507 * lang.opt (fg77-calls): Remove.
509 2004-04-04 Paul Brook <paul@codesourcery.com>
511 * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
512 (gfc_conv_descriptor_base): Rename ...
513 (gfc_conv_descriptor_offset): ... to this.
514 (gfc_trans_allocate_array_storage): Set offset to zero.
515 (gfc_conv_array_base): Rename ...
516 (gfc_conv_array_offset): ... to this.
517 (gfc_conv_array_index_ref): Add offset parameter.
518 (gfc_conv_array_ref): Include offset.
519 (gfc_trans_preloop_setup): Use existing offset.
520 (gfc_trans_allocate_temp_array, gfc_array_allocate,
521 gfc_trans_auto_array_allocation, gfc_trans_g77_array,
522 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
523 gfc_conf_ss_descriptor): Set offset.
524 * trans-array.h: Rename prototypes.
525 * trans-const.h (gfc_index_zero_node): Define.
526 * trans-decl.c (gfc_build_qualified_array): Change base to offset.
527 * trans-types.c (gfc_get_array_type_bounds): Ditto.
528 (gfc_get_nodesc_array_type): Calculate offset before upper bound.
530 2004-03-25 Diego Novillo <dnovillo@redhat.com>
532 * convert.c (convert): Don't handle WITH_RECORD_EXPR.
534 2004-03-24 Bud Davis <bdavis9659@comcast.net>
537 * arith.c (gfc_convert_integer,gfc_convert_real): Removed leading '+'
538 before conversion by gmp library call.
540 2004-03-24 Bud Davis <bdavis9659@comcast.net>
543 * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
545 2004-02-24 Richard Henderson <rth@redhat.com>
547 * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
549 2004-02-19 Loren J. Rittle <ljrittle@acm.org>
551 * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
552 (fortran/gfortran.info): ... to here.
555 2004-02-16 Richard Henderson <rth@redhat.com>
557 * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
558 * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
559 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
560 (gfc_expand_function): Rename from expand_function_body, make static,
561 don't do anything except invoke tree_rest_of_compilation.
562 (gfc_be_parse_file): Invoke cgraph.
563 (gfc_expand_decl): Remove.
564 (gfc_init_builtin_functions): Add __builtin_init_trampoline and
565 __builtin_adjust_trampoline.
566 * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
568 (gfc_generate_function_code): Use it. Lower nested functions.
569 * trans-expr.c (gfc_conv_function_call): Add static chain operand
571 * trans.c (gfc_build_function_call): Likewise.
572 * trans.h (expand_function_body): Remove.
574 2004-02-15 Victor Leikehman <lei@il.ibm.com>
577 * trans-decl.c (gfc_build_function_decl) For functions
578 returning CHARACTER pass an extra length argument,
579 following g77 calling conventions.
580 * trans-types.c (gfc_get_function_type) Ditto.
581 * trans-expr.c (gfc_conv_function_call) Ditto.
583 2004-02-14 Paul Brook <paul@codesourcery.com>
585 * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
587 2004-02-12 Paul Brook <paul@nowt.org>
591 2004-02-08 Steve Kargl <sgk@troutmask.apl.washington.edu>
593 * gfortran.texi: Fix typos.
595 2004-02-07 Bud Davis <bdavis9659@comcast.net>
598 * intrinsic.c (add_conversions) Use logical conversion instead
600 * trans-types.c (gfc_get_logical_type) implemented logical*1
603 2004-01-17 Paul Brook <paul@codesourcery.com>
605 * lang-specs.h: Remove %<fixed-form.
607 2004-01-15 Toon Moene <toon@moene.indiv.nluug.nl>
609 * lang-specs.h: Enable preprocessing of source files
610 ending in .F, .fpp, .FPP, .F90 and .F95.
612 2004-01-13 Toon Moene <toon@moene.indiv.nluug.nl>
615 * lang-specs.h: Enable compilation of files ending
616 in .f, .for and .FOR.
618 2004-01-11 Paul Brook <paul@codesourcery.com>
620 * trans-stmt.c (gfc_trans_if_1): New function.
621 (gfc_trans_if): Use it.
623 2004-01-11 Erik Schnetter <schnetter@uni-tuebingen.de>
625 * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
626 (gfc_option_t): Add max_identifier_length.
627 * lang.opt: Add fmax-identifier-length.
628 * match.c (parse_name): Use limit.
629 * options.c (gfc_init_options): Set max_identifier_length.
630 (gfc_handle_option): Ditto.
632 2004-01-11 Feng Wang <fengwang@nudt.edu.cn>
634 * intrinsic.c (add_functions): Add resolve function to dcmplx.
635 * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
636 * iresolve.c (gfc_resolve_dcmplx): New function.
638 2004-01-10 Paul Brook <paul@codesourcery.com>
640 * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
641 * trans-types.c (gfc_sym_type): Handle external dummy procedures.
642 (gfc_return_by_reference): Correct condition.
643 (gfc_get_function_type): Ditto.
645 2004-01-10 Paul Brook <paul@codesourcery.com>
647 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
650 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
652 * iresolve.c: Use correct kind.
654 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
657 * trans-decl.c (gfc_create_module_variable): Output array valued
660 2004-01-10 Paul Brook <paul@codesourcery.com>
662 * resolve.c (resolve_branch): Get error message right way round.
664 2004-01-10 Canqun Yang <canqun@nudt.edu.cn>
666 * trans-array (gfc_conv_loop_setup): Adjust comment to track
668 (gfc_array_allocate): Don't count size of element twice.
670 2004-01-04 Paul Brook <paul@codesourcery.com>
672 * lang.opt (i8, r8, std=*): Remove RejectNegative.
674 2004-01-04 Paul Brook <paul@codesourcery.com>
676 * error.c (gfc_notify_std): New function.
677 * gfortran.h (gfc_notify_std): Declare.
679 (gfc_option_t): Add warn_std and allow_std.
680 * intrinsic.c (gfc_init_expr_extensions): Fix logic.
681 (gfc_intrinsic_func_interface): Use gfc_notify_std.
682 * check.c (check_rest): Use gfc_notify_std.
683 * match.c (gfc_match_pause): Ditto.
684 (gfc_match_assign): Ditto.
685 (gfc_match_goto): Ditto.
686 * resolve.c (resolve_branch): Ditto.
687 * lang.opt: Add std=<foo> and w.
688 * options.c (gfc_init_options): Set allow_std and warn_std.
689 (gfc_handle_option): Handle OPT_std_* and OPT_w.
691 2004-01-01 Paul Brook <paul@codesourcery.com>
693 * array.c (gfc_append_constructor): Take constructor, not expression.
694 * data.c (struct gfc_expr_stack): Remove.
695 (expr_stack): Remove.
696 (find_con_by_offset): Rename from find_expr_in_con.
697 (find_con_by_component): Rename from find_component_in_con.
698 (gfc_get_expr_stack): Remove.
699 (gfc_assign_data_value): Rewrite.
700 (gfc_expr_push): Remove.
701 (gfc_expr_pop): Remove.
702 (gfc_advance_section): Rename from
703 gfc_modify_index_and_calculate_offset. Handle unbounded sections.
704 (gfc_get_section_index): Handle unbounded sections.
705 * gfortran.h: Update prototypes.
706 * resolve.c (check_data_variable): Array section maight not be the
709 2004-01-01 Paul Brook <paul@codesourcery.com>
712 * resolve.c (resolve_symbol): Allow assumed length function results.
714 2004-01-01 Steve Kargl <sgk@troutmask.apl.washington.edu>
716 * match.c (gfc_match_pause): Fix spelling.
718 2004-01-01 Steven Bosscher <stevenb@suse.de>
721 * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
722 reference from the expression.
724 2003-12-26 Feng Wang <fengwang@nudt.edu.cn>
726 * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
728 * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
729 (gfc_exec_op): New EXEC_LABEL_ASSIGN.
730 (symbol_attribute):New variable attribute: assign.
731 * io.c (resolve_tag):Integer variable is allowed.
732 (match_dt_format): Add ASSIGN statement. Set assign flag.
733 * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
734 (gfc_match_assign): Add ASSIGN statement. Set assign flag.
735 (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
736 * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
737 (next_statement): Add ST_LABEL_ASSIGNMENT.
738 (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
739 * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
740 (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
741 * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
742 * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
743 assign. Put them into the stuct lang_decl.
744 * trans-io.c (set_string): Add the assign statement.
745 * trans-stmt.c (gfc_trans_label_assign): New function.
746 (gfc_trans_goto): Translate ASSIGNED GOTO statement.
747 * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
748 * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
749 * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
750 (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
751 (GFC_DECL_ASSIGN(node)): New macro to access flag.
753 2003-12-31 Huang Chun <chunhuang73@hotmail.com>
756 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
759 2003-12-22 Toon Moene <toon@moene.indiv.nluug.nl>
761 * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
762 that arguments to subroutines/functions can't alias themselves, nor global
765 2003-12-20 Steven Bosscher <stevenb@suse.de>
767 * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
768 * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
770 2003-12-12 Huang Chun <chunhuang73@hotmail.com>
772 * primary.c (match_substring): Fix substring bug for start point
773 or end point is NULL.
774 * trans-expr.c (gfc_conv_substring): Ditto
775 * trans-types.c (gfc_sym_type): Get correct type of scalar
777 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
780 2003-12-10 Richard Henderson <rth@redhat.com>
782 * options.c (gfc_post_options): Don't ever use rtl inlining.
784 2003-12-05 Canqun Yang <canqun@nudt.edu.cn>
786 * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
787 * trans-equivalence.c: Remove.
788 * trans-decl.c (gfc_get_symbol_decl): Update to match.
789 (gfc_generate_function_code): Ditto.
790 * trans-array.c (gfc_conv_array_parameter): Ditto.
791 * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
792 (F95_ADDITIONAL_OBJS): Add stor-layout.o
793 * trans.h (gfc_trans_equivalence): Remove.
794 * gfortran.h (struct gfc_equiv): Add used field.
795 (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
798 2003-12-05 Richard Henderson <rth@redhat.com>
800 * trans.c (gfc_build_addr_expr): New.
801 (gfc_build_indirect_ref, gfc_build_array_ref): New.
802 * trans.h: Declare them.
803 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
804 trans-stmt.c, trans.c (*): Use them.
806 * f95-lang.c (gfc_post_options): Remove dead prototype.
807 * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
808 * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
811 2003-12-01 Feng Wang <fengwang@nudt.edu.cn>
813 * io.c (gfc_match_format): Check for missing format label.
815 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
818 * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
819 from interfaces in modules.
821 2003-11-30 Paul Brook <paul@nowt.org>
823 * trans-array.c (gfc_trans_g77_array): Make non-static.
824 (gfc_trans_assumed_size): Remove.
825 (gfc_trans_dummy_array_bias): Explicitly free temporary.
826 * trans-array.h (gfc_trans_g77_array): Add prototype.
827 (gfc_trans_assumed_size): Remove.
828 * trans-decls.c (gfor_fndecl_push_context): Remove.
829 (gfor_fndecl_pop_context): Remove.
830 (gfc_build_function)decls): Don't create them.
831 (gfc_trans_deferred_vars): Update to match. Remove dead code.
832 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
834 2003-11-30 Kejia Zhao <kejia_zh@nudt.edu.cn>
836 * trans-array.c (gfc_conv_array_parameter): Simplify
837 array argument passing for array name actual argument.
838 * trans-expr.c (gfc_conv_function_call): Ditto
839 * trans-types.c (gfc_is_nodesc_array):Ditto.
841 2003-11-30 Paul Brook <paul@nowt.org>
843 * f95-lang.c (gfc_post_options): Move ...
844 * options.c (gfc_post_options): .. to here. Handle inlining options.
845 * gfortran.h (gfc_post_options): Add prototype.
847 2003-11-28 Richard Henderson <rth@redhat.com>
849 * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
851 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
853 * trans.h (has_alternate_specifier): New global variable.
854 * match.c (gfc_match_call): Handle actual arguments associated with
855 alternate return indicators.
856 * trans-expr.c (gfc_conv_function_call): Ditto
857 * trans-stmt.c (gfc_trans_call): Ditto
858 (gfc_trans_return): Handle return statement with value.
859 * trans-decl.c (gfc_generate_function_code): Handle functions with
861 (gfc_get_fake_result_decl): Ditto
862 * trans-types.c (gfc_get_function_type): Ditto
863 * resolve.c (resolve_actual_arglist): Check alternate return indicators.
864 (resolve_formal_arglist): Check asterisk dummy.
866 2003-11-27 Paul Brook <paul@nowt.org>
868 * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
869 allocation interface.
870 (gfc_conv_ array_parameter): Ditto.
871 (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
872 * trans-array.c: Update prototype.
873 * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
874 (gfc_trans_auto_character_variable): Use new memory alloc interface.
875 * trans-expr.c (gfc_conv_string_tmp): Ditto.
876 (gfc_conv_function_call): Use gfc_conv_string_tmp.
877 * trans-stmt.c (gfc_do_allocate): Use new memory alloc interface.
878 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
879 * trans.h (gfc_ss_info): Remove unused pdata field.
880 * trans.c (gfc_create_var_np): Change T to V.
882 2003-11-26 Richard Henderson <rth@redhat.com>
884 * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
885 * trans-intrinsic.c (gfc_intrinsic_map): ... here. Add SCALE,
886 FRACTION, NEAREST, SET_EXPONENT.
887 (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
888 Fix GTY marking. Remove unnecessary const's.
889 (LIBM_FUNCTION): Rename from I_LIB.
890 (LIBF_FUNCTION): New.
891 (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
892 conventions. Assume the expr signature is correct. Mark const.
893 (gfc_conv_intrinsic_exponent): Use library functions.
894 (gfc_conv_intrinsic_set_exponent): Remove.
895 (gfc_conv_intrinsic_scale): Remove.
896 (gfc_conv_intrinsic_nearest): Remove.
897 (gfc_conv_intrinsic_fraction): Remove.
898 (gfc_conv_intrinsic_function): Update.
899 * trans-decl.c (gfor_fndecl_math_exponent4): New.
900 (gfor_fndecl_math_exponent8): New.
901 (gfc_build_intrinsic_function_decls): Set them.
902 * trans.h: Declare them.
904 2003-11-25 Canqun Yang <canqun@nudt.edu.cn>
906 * trans-common.c (gfc_layout_global_equiv): Locate the error for
907 underflow COMMON block.
908 (gfc_trans_one_common): Fix bug for size of COMMON block containing
909 EQUIVALENCE object. Also fix typo in an error message.
911 2003-11-25 Diego Novillo <dnovillo@redhat.com>
913 * Make-lang.in: Add check-gfortran to lang_checks.
914 (check-f95): Alias for check-gfortran.
916 2003-11-25 Jason Merrill <jason@redhat.com>
918 * Make-lang.in (f95.tags): Create TAGS.sub files in each
919 directory and TAGS files that include them for each front end.
921 2003-11-24 Paul Brook <paul@nowt.org>
924 * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
926 2003-11-24 Paul Brook <paul@nowt.org>
928 * expr.c (simplify_const_ref): Return SUCCESS for things we don't
930 * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
932 2003-11-24 Paul Brook <paul@nowt.org>
935 * array.c (gfc_array_ref_shape): Handle elemental dimensions.
936 * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
938 2003-11-20 Richard Henderson <rth@redhat.com>
940 * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
941 (gfc_conv_array_base): Likewise.
942 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
943 * trans-expr.c (gfc_conv_string_tmp): Likewise.
944 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
945 * trans-stmt.c (gfc_trans_character_select): Likewise.
947 2003-11-13 Paul Brook <paul@nowt.org>
949 * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
951 2003-11-13 Canqun Yang <canqun@nudt.edu.cn>
953 * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
954 (resolve_equivalence): New function.
955 (resolve_equivalence_derived): New function.
957 2003-11-12 Richard Henderson <rth@redhat.com>
959 * trans.c (gfc_trans_code): Use annotate_with_locus instead of
960 annotate_all_with_locus.
962 2003-11-11 Canqun Yang <canqun@nudt.edu.cn>
964 * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
965 * trans-decl.c (gfc_finish_var_decl): Modified.
967 2003-11-08 Paul Brook <paul@nowt.org>
970 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
973 2003-11-06 Paul Brook <paul@nowt.org>
975 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
977 2003-11-02 Canqun Yang <canqun@nudt.edu.cn>
979 * match.c (gfc_match_stopcode): Assign '0' to stop_code.
981 2003-10-27 Anthony Green <green@redhat.com>
983 * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
984 (f95.stagefeedback): Ditto.
986 2003-10-27 Andrew Pinski <pinskia@physics.uc.edu>
989 * Make-lang.in (f95.stageprofile): Add.
990 (f95.stagefeedback): Add.
992 2003-10-23 Richard Henderson <rth@redhat.com>
994 * f96-lang.c (gfc_gimplify_expr): Remove.
995 (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
996 (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
998 2003-10-23 Richard Henderson <rth@redhat.com>
1000 * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
1002 2003-10-20 Paul Brook <paul@nowt.org>
1004 * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
1005 * trans-stmt.c (gfc_trans_do_while): Ditto.
1007 2003-10-17 Paul Brook <paul@nowt.org>
1009 * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
1011 2003-10-17 Paul Brook <paul@nowt.org>
1013 * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
1015 2003-10-17 Feng Wang <wf_cs@yahoo.com>
1017 * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
1018 (gfc_resolve_minloc): Ditto.
1019 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
1020 Return the value after subtracting the lower bound.
1022 2003-10-16 Richard Henderson <rth@redhat.com>
1024 * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
1026 2003-10-16 Steven Bosscher <steven@gcc.gnu.org>
1028 * lang.c: Remove -M option for now, it's in the way for C.
1030 2003-10-14 Jason Merrill <jason@redhat.com>
1032 * Make-lang.in (f95.tags): New rule.
1034 2003-10-13 Richard Henderson <rth@redhat.com>
1036 * trans.c (gfc_trans_code): Use annotate_all_with_locus.
1038 2003-10-13 Paul Brook <paul@nowt.org>
1040 * trans-decl.c (generate_local_decl): Don't create junk variables.
1042 2003-10-13 Paul Brook <paul@nowt.org>
1044 * resolve.c (resolve_formal_arglist): Use function result decl in
1045 preference to function decl.
1047 2003-10-12 Richard Henderson <rth@redhat.com>
1049 * f95-lang.c (gfc_define_builtin): New const_p argument. Set
1050 TREE_READONLY. Update all callers.
1052 2003-10-12 Feng Wang <wf_cs@yahoo.com>
1054 * iresolve.c (gfc_resolve_cshift): Change to match implementation.
1055 * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
1056 (gfc_is_intrinsic_libcall): Add CSHIFT.
1058 2003-10-12 Richard Henderson <rth@redhat.com>
1060 * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
1061 (gfc_trans_array_constructor_value): Likewise.
1062 (gfc_conv_array_initializer): Likewise.
1063 * trans-stmt.c (gfc_trans_character_select): Likewise.
1065 2003-11-12 Kejia Zhao <kejia_zh@yahoo.com.cn>
1067 * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
1069 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
1071 * check.c (gfc_check_repeat): Check arguments are scalar.
1072 (gfc_check_trim): New function.
1073 * intrinsic.h (gfc_check_trim): Add prototype.
1074 * intrinsic.c (add_functions): Use it.
1075 * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
1077 * trans-decl.c: Ditto.
1078 (gfc_build_intrinsic_fucntion_decls): Set them.
1079 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
1080 (gfc_conv_intrinsic_trim): New function.
1081 (gfc_conv_intrinsic_repeat): New function.
1082 (gfc_conv_intrinsic_function): Use them.
1084 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
1086 * trans-types.c (gfc_sym_type): Handle result variables.
1088 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
1090 * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
1091 gfc_get_character_type.
1093 2003-10-11 Feng Wang <wf_cs@yahoo.com>
1095 * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
1097 2003-10-11 Paul Brook <paul@nowt.org>
1099 * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
1100 (gfc_resolve_dprod): New function.
1101 (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
1102 * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
1103 (gfc_resolve_dprod): Declare.
1104 * intrinsic.c (add_functions): Use them.
1105 * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
1107 2003-10-06 Richard Henderson <rth@redhat.com>
1109 * f95-lang.c (gfc_init_builtin_functions): Add clzll.
1110 * trans-intrinsic.c (call_builtin_clz): Use it.
1112 2003-10-05 Paul Brook <paul@nowt.org>
1114 * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
1115 * trans-decl.c (gfc_generate_function_code): Set
1116 cfun->function_end_locus.
1118 2003-09-24 Jason Merrill <jason@redhat.com>
1120 * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
1123 2003-09-21 Lifang Zeng <zlf605@hotmail.com>
1124 Paul Brook <paul@nowt.org>
1126 * Make-lang.in (F95_OBJS): Add fortran/data.o.
1127 * array.c (gfc_inser_constructor): New function.
1128 (gfc_get_constructor): New function.
1129 (gfc_free_constructor): Initialize offset and repeat.
1130 (iterator_stack): Remove.
1131 (expand_info): Add offset, component and repeat fields.
1132 (expand_constructor): Set them.
1133 (expand): Set new fields.
1134 (gfc_copy_constructor): Ditto. Avoid recursion.
1135 * gfortran.h: Add prototypes for new functions.
1136 (gfc_constructor): Add offset, component and repeat.
1137 (iteratio_stack): Move to here.
1138 * resolve.c (check_data_variable): Convert data values into variable
1140 (traverse_data_list): Build implicit loop chain.
1141 (gfc_resolve): Ditto.
1142 * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
1143 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
1144 * trans-expr.c (gfc_conv_structure): Handle array initializers.
1145 (gfc_conv_expr): Update to match.
1146 * trans.h (gfc_conv_structure): Declare.
1149 2003-09-20 Kejia Zhao <kejia_zh@yahoo.com.cn>
1151 * trans.h: Add declarations for gfor_fndecl_si_kind and
1152 gfor_fndecl_sr_kind.
1153 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
1154 * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
1155 (g95_conv_intrinsic_sr_kind): New function.
1156 (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
1159 2003-09-17 Lars Segerlund <Lars.Segerlund@comsys.se>
1161 * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
1162 instead of _4 and _8 as postfix for libgfortran calls.
1164 2003-09-16 Paul Brook <paul@nowt.org>
1166 * array.c (compare_bounds): New function.
1167 (gfc_compare_array_spec): Use it.
1169 2003-09-14 Paul Brook <paul@nowt.org>
1171 * primary.c (gfc_match_rvalue): Make sure sym->result is set.
1172 * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
1174 2003-09-14 Paul Brook <paul@nowt.org>
1176 * check.c (dim_rank_check): Allow assumed bounds if requested.
1177 (gfc_check_lbound): Call it.
1178 (gfc_check_ubound): Ditto.
1179 (gfc_check_size): Change to match.
1180 * simplify.c (gfc_simplify_bound): New function.
1181 (gfc_simplify_lbound): New function.
1182 (gfc_simplify_ubound): New function.
1183 * intrinsic.h: Declare them.
1184 * intrinsic.c (add_functions): Use them.
1186 2003-09-14 Paul Brook <paul@nowt.org>
1188 * io.c (format_lex): Initialize negative_flag.
1189 (check_format): Intialize repeat.
1190 * trans-io.c (gfc_new_nml_name_expr): Declare static.
1191 (gfc_new_var_expr): Ditto.
1193 2003-09-14 Paul Brook <paul@nowt.org>
1195 * trans-array.c (gfc_conv_array_initializer): Handle derived types.
1196 * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
1198 2003-09-12 Paul Brook <paul@nowt.org>
1200 * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
1202 2003-09-12 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
1204 * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
1205 for a correct expression.
1207 2003-09-10 Kejia Zhao <kejia_zh@yahoo.com.cn>
1209 * trans-intrinsic.c (real_compnt_info): New struct.
1210 (prepare_arg_info): New function.
1211 (gfc_conv_intrinsic_set_exponent): New function.
1212 (gfc_conv_intrinsic_scale): New function.
1213 (gfc_conv_intrinsic_nearest): New function.
1214 (gfc_conv_intrinsic_fraction): New function.
1215 (gfc_conv_intrinsic_exponent): New function.
1216 (gfc_conv_intrinsic_spacing): New function.
1217 (gfc_conv_intrinsic_rrspacing): New function.
1218 (gfc_conv_intrinsic_function): Use them.
1220 2003-08-24 XiaoQiang Zhang (zhangapache@yahoo.com>
1222 * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
1223 build_int_2 changed from (high, low) to (low, high).
1224 * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
1225 ioparm_namelist_read_mode, iocall_set_nml_val_int,
1226 iocall_set_nml_val_float, iocall_set_nml_val_char,
1227 iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
1228 (gfc_build_io_library_fndecls): Add variable initialization.
1229 (gfc_new_nml_name_expr, get_new_var_expr): New function.
1230 (build_dt): Add namelist support.
1231 * io.c (value): New variable.
1232 (check_format): Support FMT_H now.
1234 2003-09-07 Paul Brook <paul@nowt.org>
1236 * io.c (gfc_resolve_dt): Error if format label is not defined.
1238 2003-09-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
1240 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
1241 about case_switch's break. The other is about building the condition
1242 statement tree, which judges the argument in the range of the
1243 corresponding integer type.
1244 * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
1245 for the large values.
1247 2003-09-05 Paul Brook <paul@nowt.org>
1249 * f95-lang.c (expand_function_body): Gimplify the function.
1251 2003-09-04 Jeff Law <law@redhat.com>
1253 * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
1256 2003-09-04 Paul Brook <paul@nowt.org>
1258 * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
1259 (gfc_expand_stmt): New function.
1260 (LANG_HOOKS_RTL_EXPAND_STMT): Define.
1261 (expand_function_body): Use tree_rest_of_compilation.
1262 * trans-decl.c (gfc_generate_function_code): Don't free cfun.
1264 2003-09-03 Jeff Law <law@redhat.com>
1266 * f95-lang.c (gfc_init_builtin_functions): C arrays start at
1269 2003-08-30 Paul Brook <paul@nowt.org>
1271 * f95-lang.c (builtin_function): Remove #if 0 code.
1272 (gfc_define_builtin): New function.
1273 (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
1274 * mathbuiltins.def: New file.
1275 * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
1276 (gfc_intrinsic_map): Use mathbuiltins.def.
1277 (gfc_intrinsic_builtin_t): Remove.
1278 (gfc_build_intrinsic_lib_fndecls): Update.
1279 * trans-types.c (gfc_init_types): Remove redundant initilaization of
1280 signed_size_type_node.
1282 2003-08-29 Paul Brook <paul@nowt.org>
1284 * arith.c (gfc_real_kinds): Use correct minimum exponents.
1286 2003-08-22 Kejia Zhao <kejia_zh@yahoo.com.cn>
1288 * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
1289 (gfc_conv_intrinsic_function): Add MODULO.
1291 2003-08-22 Jason Merrill <jason@redhat.com>
1293 * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
1295 2003-08-22 Andreas Jaeger <aj@suse.de>
1297 * Make-lang.in (f95.install-common): Add DESTDIR support.
1298 * (f95.install-info): Likewise.
1299 (f95.uninstall): Likewise.
1301 2003-08-19 Diego Novillo <dnovillo@redhat.com>
1303 * trans-types.c (gfc_init_types): Initialize
1304 signed_size_type_node with size_type_node.
1306 2003-08-18 Paul Brook <paul@nowt.org>
1308 * dependency.c (gfc_dependency): New enum.
1309 (check_another_array_ref): Remove.
1310 (gfc_get_array_from_component): Remove.
1312 (get_range): Remove.
1313 (get_no_of_elements): Use mpz_t, not mpf_t.
1314 (transform_sections): New function.
1315 (gfc_check_range_range): Rename ...
1316 (gfc_check_section_vs_section): ... to this. Use new function.
1317 (gfc_is_inside_range): Rewrite to match.
1318 (gfc_check_element_vs_section): Ditto.
1319 (gfc_check_element_vs_element): Ditto.
1321 (gfc_dep_resolver): Ditto. Remove unused parameter.
1322 * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
1323 gfc_check_element_vs_element, gfc_is_inside_range,
1324 gfc_get_array_from_component): Remove prototypes for static functions.
1325 (gfc_dep_resolver): Update prototype.
1326 * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
1328 2003-08-15 Paul Brook <paul@nowt.org>
1330 * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
1331 return values to parent scope.
1332 (gfc_build_dummy_array_decl): Ditto.
1334 2003-08-14 Paul Brook <paul@nowt.org>
1336 * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
1337 size of the type, not the pointer.
1338 * resolve.c (resolve_symbol): Give more accurate error message.
1340 2003-08-10 Paul Brook <paul@nowt.org>
1342 * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
1344 2003-08-10 Paul Brook <paul@nowt.org>
1346 * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
1349 2003-08-10 Chun Huang <compiler@sohu.com>
1351 * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
1352 (resolve_symbol): Ditto.
1353 * trans-expr.c (gfc_conv_statement_function): New function.
1354 (gfc_conv_function_expr): Use it.
1356 2003-08-10 Paul Brook <paul@nowt.org>
1358 * trans-array.c (gfc_conv_ss_startstride): Handle functions.
1359 (walk_function_expr): Set section rank.
1360 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
1362 2003-08-10 Paul Brook <paul@nowt.org>
1364 * intrinsic.c (add_sym): Prefix names with correct string.
1365 (add_sym_0s): New function.
1366 (add_subroutines): Register abort.
1368 2003-08-10 Erik Schnetter <schnetter@uni-tuebingen.de>
1370 * gfortran.h: Introduce options to control the mangling.
1371 * lang.opt: Likewise.
1372 * options.c (gfc_init_options): Handle the options.
1373 * trans-common.c (gfc_sym_mangled_common_id): New function.
1374 (gfc_build_common_decl): Call it.
1375 * trans-decl.c (gfc_sym_mangled_function_id): New function.
1376 (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
1378 2003-08-09 Paul Brook <paul@nowt.org>
1380 * module.c (mio_symbol): Always ouput a namespace for formal args.
1381 (load_needed): Namespace now belong to their proper symbol.
1382 (gfc_dump_module): Change G95=>GFORTRAN.
1384 2003-08-05 Paul Brook <paul@nowt.org>
1386 * options.c: Force -fg77-calls.
1388 2003-08-02 Paul Brook <paul@nowt.org>
1390 * Makelang.in: Rename G95_* to GFORTRAN_*.
1391 * All sources: Rename G95_* to GFC_*.
1393 2003-08-01 Paul Brook <paul@nowt.org>
1395 * fortran/Make-lang.in: Use GMPLIBS.
1396 * fortran/config-lang.in: Set need_gmp.
1397 * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
1399 2003-07-27 Andreas Jaeger <aj@suse.de>
1401 * trans-decl.c (gfc_generate_constructors): Convert prototype to
1403 * trans-const.c (gfc_init_constants): Likewise.
1404 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
1406 * gfortranspec.c: Convert to ISO C90.
1407 (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
1409 2003-07-26 Paul Brook <paul@nowt.org>
1411 * lang.opt: Add -fdump-parse-tree.
1412 * options.c (gfc_handle_option): Ditto.
1413 * resolve.c (resolve_forall_iterators): Convert to proper type.
1414 * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
1416 2003-07-26 Paul Brook <paul@nowt.org>
1418 * Makefile.in: Add build dependencies on files common with rest of gcc.
1420 2003-07-26 Lifang Zeng <zlf605@hotmail.com>
1422 * trans.h: Declare g95_trans_pointer_assignment.
1423 * trans-expr.c (g95_trans_pointer_assignment): New function.
1424 (g95_trans_pointer_assign): Use it.
1425 * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
1426 (g95_trans_pointer_assign_need_temp): New function.
1428 2003-07-26 Paul Brook <paul@nowt.org>
1430 * gfortran.texi: Replace references to g95.
1432 2003-07-26 Paul Brook <paul@nowt.org>
1434 Rename g95_* to gfc_*.
1436 2003-07-25 Paul Brook <paul@nowt.org>
1438 * gfortran.h: Rename from g95.h.
1439 * trans-types.c (boolean_type_node, booelan_true_node,
1440 boolean_false_node): Remove.
1441 * trans-types.h: Ditto.
1443 2003-07-25 Chun Huang <compiler@sohu.com>
1445 * parse.c (accept_statement): Implement BLOCK DATA statement.
1446 * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
1449 2003-07-24 Lifang Zeng <zlf605@hotmail.com>
1451 * trans-stmt.c (temporary_list): Define.
1452 (g95_trans_assign_need_temp): New function.
1453 (g95_trans_forall_1): Modified for WHERE.
1454 (g95_trans_where_assign): Modified.
1455 (g95_trans_where_2): Modified.
1456 (g95_evaluate_where_mask): Modified.
1457 (g95_trans_where): Modified.
1458 (g95_get_temp_expr): Removed.
1459 (g95_add_to_where_stmt_list): Removed.
1460 (compute_overall_iter_number): Modified for WHERE.
1461 * trans.h: Remove where_stmt_list.
1463 2003-07-24 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1465 * lang.opt: Correct description of options -J and -M.
1467 2003-07-23 Steven Bosscher <steven@gcc.gnu.org>
1469 * lang.opt: Move help text to here.
1470 * lang-options.h: Remove.
1472 2003-07-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1473 * iresolve.c (g95_resolve_transpose): Proper variable in switch.
1474 * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
1477 2003-07-22 Steven Bosscher <steven@gcc.gnu.org>
1478 Paul Brook <paul@nowt.org>
1480 * check.c (check_rest): Use global pedantic flag.
1481 * io.c (data_desc): Ditto.
1482 * error.c (g95_warning, g95_warning_now): Use global flag.
1483 * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
1484 (expand_function_body): Update to new prototypes.
1485 (g95_init): Use new option names.
1486 * g95.h (g95_option_t): Standardize names.
1487 (g95_init_options, g95_handle_option): Update prototypes.
1488 * interface.c: Use new option names.
1495 * simplify.c: Ditto.
1497 * trans-array.c: Ditto.
1498 * trans-expr.c: Ditto.
1499 * trans-types.c: Ditto.
1500 * trans-decl.c: Ditto.
1501 (g95_build_library_function_decl): Remove obsolete VPARAMS.
1503 * options.c (g95_display_help): Remove.
1504 (g95_init_options): Convert to new scheme.
1506 (g95module_option): Ditto, rename from g95_parse_arg.
1507 (g95_handle_module_path_options): New function.
1508 * trans-equivalence.c: Fix error message.
1509 * lang.opt: Corrections.
1511 2003-07-21 Steven Bosscher <steven@gcc.gnu.org>
1513 * lang.opt: New file.
1515 2003-07-21 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1517 * decl.c (match_attr_spec): Set colon_seen.
1519 2003-07-14 Paul Brook <paul@nowt.org>
1521 * trans-array.c: Update comment.
1522 (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
1523 * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
1524 minmaxloc,minmaxval): Ditto.
1525 * trans-io.c (g95_trans_transfer): Ditto.
1526 * trans-stmt.c: Remove unneeded prototypes.
1527 (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
1528 (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
1529 (compute_inner_temp_size): Remove bits of dead code. Add comments.
1530 Don't share loopinfo.
1531 (compute_overall_iter_number): Declare as static.
1532 (allocate_temp_for_forall_nest): Ditto.
1533 (g95_trans_forall_1): Don't pass shared loopinfo.
1534 * trans.c (g95_start_block): Expand comment.
1536 2003-07-12 Paul Brook <paul@nowt.org>
1538 * arith.c (g95_index_integer_kind): Remove unused initializer.
1539 * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
1540 index by size of element.
1541 (generate_loop_for_rhs_to_temp): Ditto.
1542 (allocate_temp_for_forall_nest): Use element size, not index size.
1544 2003-07-11 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1546 * arith.c (g95_index_integer_kind): Add a TODO.
1547 * simplify.c (g95_simplify_nearest): Add a TODO.
1549 2003-07-09 Chun Huang <compiler@sohu.com>
1551 * trans.h: Add declarations for gfor_fndecl_string_scan and
1552 gfor_fndecl_string_verify.
1553 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
1554 * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
1555 (g95_conv_intrinsic_verify): New function.
1556 (g95_conv_intrinsic_function): Add SCAN and VERIFY.
1557 * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
1558 of parameter 'BACK=.TRUE.'
1560 2003-07-05 Lifang Zeng <zlf605@hotmail.com>
1562 * trans-stmt.c (iter_info, forall_info): Define.
1563 (g95_trans_forall_block): Remove.
1564 (g95_trans_forall_loop): Use forall info blocks.
1565 (g95_trans_nested_forall_loop): New function.
1566 (g95_do_allocate): Handle things other than logical masks.
1567 (generate_loop_for_temp_to_lhs): New function.
1568 (generate_loop_for_rsh_to_temp): New function.
1569 (compute_inner_temp_size): New function.
1570 (compute_overall_iter_number): New function.
1571 (allocate_temp_for_forall_nest): New function.
1572 (g95_trans_forall): Move body ...
1573 (g95_trans_forall_1): ... to here. Handle loops with temporaries.
1575 2003-07-02 Paul Brook <paul@nowt.org>
1577 * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
1578 in correct scope. Change callers to match.
1579 * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
1580 * iresolve.c (g95_resolve_reshape): Only use constant shapes.
1582 2003-07-02 Paul Brook <paul@nowt.org>
1584 * trans-array.c (g95_conv_loop_setup): Remove dead var. Use
1585 expression shape for all expressions.
1586 * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
1588 2003-07-03 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1590 * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
1591 g95_parse_arg), intrinsic.c (g95_convert_type): support of
1593 * intrinsic.c, g95.h: Add g95_convert_type_warn,
1594 * resolve.c (g95_resolve_index): Call it.
1596 2003-07-02 Paul Brook <paul@nowt.org>
1598 * iresolve.c (g95_resolve_reshape): Set expression shape.
1599 (g95_resolve_shape): Ditto.
1600 * simplify.c (g95_simplify_shape): Move common code outside condition.
1601 * trans-array.c (g95_conv_array_initializer): Teach it how to count.
1603 2003-07-01 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1605 * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
1608 2003-06-29 Paul Brook <paul@nowt.org>
1610 * array.c (g95_simplify_iterator_var): Don't bother with return value.
1611 * expr.c (find_array_element, find_component_ref): New functions.
1612 (remove_subobject_ref): New function.
1613 (simplify_const_ref): Use them. Rename from simplify_component_ref.
1614 (simplify_ref_chain): New function.
1615 (g95_simplify_expr): Use it. Simplify parameter variable subobjects.
1616 (g95_specification_expr): Simplify the expression.
1617 * resolve.c (resolve_operator): Check simplifications return code.
1618 (g95_resolve_expr): Ditto.
1620 2003-06-26 Paul Brook <paul@nowt.org>
1622 * expr.c (simplify_component_ref): New function.
1623 (g95_simplify_expr): Use it.
1624 * resolve.c (resolve_structure_cons): Handle references.
1626 2003-06-25 Paul Brook <paul@nowt.org>
1628 * trans-io.c (build_dt): Handle internal units.
1630 2003-06-25 Canqun Yang <canqun@yahoo.com.cn>
1632 * trans-common.c (g95_build_common_decl): Array index range starts at 0.
1633 (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
1634 Use g95_array_index_type instead of integer_type_node.
1635 (g95_build_common_decl, g95_set_common_master_type): Use
1636 g95_character1_type_node instead of char_type_node.
1637 * trans-equivalence.c (g95_layout_local_equiv): As above.
1639 2003-06-24 Steven G. Kargl <kargls@attbi.com>
1641 * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
1642 remove last remains of -fquiet.
1644 2003-06-22 Paul Brook <paul@nowt.org>
1646 * resolve.c (resolve_operator): Don't fail if we can't simplify.
1647 (g95_resolve_expr): Ditto.
1648 (resolce_code): Mark as static.
1649 * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
1650 gimplifer doesn't (yet).
1652 2003-06-20 Paul Brook <paul@nowt.org>
1654 * g95.h: Add ST_PAUSE and EXEC_PAUSE.
1655 * match.c (g95_match_if): Add ST_PAUSE.
1656 (g95_match_stopcode): New function.
1657 (g95_match_pause, g95_match_stop): Use it.
1658 * parse.c (g95_ascii_statement): Handle ST_PAUSE.
1659 (decode_stmt, next_statement, parse_executable): Ditto.
1660 * resolve.c (resolve_code): Ditto.
1661 * st.c (g95_free_statement): Ditto.
1662 * trans-stmt.c (g95_trans_pause): New function.
1663 * trans-stmt.h: Declare it.
1664 * trans.c (g95_trans_code): Use it.
1665 * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
1667 (g95_build_builtin_function_decls): Initialize them.
1669 * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
1671 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1673 * io.c (g95_match_open , g95_match_close, g95_match_inquire,
1674 match_filepos): Fix error handling.
1676 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1678 * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
1679 Add assertions on arguments.
1680 * resolve.c (expression_shape): Remove useless &.
1681 * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
1682 g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
1683 g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
1684 g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
1685 g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
1686 g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
1687 (g95_simplify_not, g95_simplify_scale): Add assertions.
1689 2003-06-15 Paul Brook <paul@nowt.org>
1691 Clean up stuff to work with the ssa optimizers.
1692 * convert.c (convert): Handle BOOLEAN_TYPEs.
1693 * f95-lang.c (g95_truthvalue_conversion): Implement.
1694 * trans-array.c (g95_trans_array_constructor_value): Group multiple
1696 * trans.h (g95_truthvalue_conversion): Declare.
1697 * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
1698 * trans-stmt.c (g95_trans_character_select): Don't create array
1699 assignments. Mark labels as indirect jump targets.
1700 * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
1701 (g95_get_dtype_cst): Handle LOGICAL types.
1703 2003-06-14 Paul Brook <paul@nowt.org>
1705 * f95-lang.c (g95_gimplify_expr): New function.
1706 * trans-array.c (g95_trans_array_constructor_value): Don't create
1708 (g95_conv_expr_descriptor): Rename simple->gimple.
1709 * trans-expr.c (conv_expr_op): Use proper logical operators.
1710 * trans-intrinsic.c (build_fixbound_expr): New function.
1711 (build_fix_expr): Ditto.
1712 (g95_conv_intinsic_aint): Use them. Use builtin functions.
1713 (g95_conv_intrinsic_function): Add FLOOR and CEILING.
1715 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1717 * array.c (g95_compare_array_spec): Remove unreachable code.
1718 * expr.c (g95_copy_expr): Likewise.
1719 * intrinsic.c (g95_convert_type): Likewise.
1720 * misc.c (g95_code2string): Likewise.
1721 * simplify.c (g95_simplify_ishft, g95_simplify_real,
1722 g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
1723 * trans-stmt.c (g95_trans_select): Likewise.
1724 * primary.c (extend_ref): Add an assertion.
1725 * simplify.c (g95_convert_constant): Add const.
1726 * intrinsic.h: Remove g95_check_x_ni.
1727 * f95-lang.c (g95_finish): Call g95_release_include_path.
1729 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1731 * resolve.c (resolve_contained_functions): Fix typo introduced on
1734 2003-06-09 Paul Brook <paul@nowt.org>
1736 * g95.h: Include system.h not hwint.h.
1737 * many: use safe-ctype.h not ctype.h. Change isalpha -> ISALPHA, etc.
1738 * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
1740 2003-06-09 Paul Brook <paul@nowt.org>
1742 * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
1743 * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
1744 * trans-decl.c (g95_add_decl_to_functions): Make non-static.
1745 (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
1746 (g95_generate_function_code): Translate COMMON and EQUIVALENCE
1748 * trans.h (g95_trans_equivalence, g95_trans_common,
1749 g95_add_decl_to_function): Declare.
1750 * trans-common.c, trans-equivalence.c: New files.
1752 2003-06-08 Steven Bosscher <steven@gcc.gnu.org>
1754 * intrinsic.c (g95_intrinsic_extension): Remove.
1755 (add_functions): Substitute g95_check_x for g95_check_x_ni
1757 (g95_init_expr_extensions): New function.
1758 (g95_intrinsic_func_interface): Use it.
1759 * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
1760 * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
1761 g95_check_precision, g95_check_present, g95_check_radix,
1762 g95_check_range, g95_check_selected_real_kind): Do not set
1763 g95_intrinsic_extension.
1764 (g95_check_x_ni): Remove now duplicate of g95_check_x.
1766 * expr.c (check_inquiry): Add FIXME, fixup some code style.
1768 2003-06-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1770 * g95.h (ref_type): Name this type explicitly.
1771 * module.c (MIO_NAME): Add specialisations of mio_name.
1772 (mio_symbol_attribute, mio_typespec, mio_array_ref,
1773 mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
1774 (ab_attribute): Name this type explicitly.
1775 (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
1777 2003-06-05 Kejia Zhao <kejia_zh@yahoo.com.cn>
1779 * trans-intrinsic.c (g95_conv_allocated): New function.
1780 (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
1782 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
1784 * f95-lang.c: Don't include g95-support.h
1785 (g95_mark_addressable): Add prototype.
1786 (g95_init_decl_processing): Remove C front end hack.
1787 * f95-tree.c: Remove file.
1788 * support.c: Remove file.
1789 * g95-support.h: Remove file.
1790 * trans-types.c (g95_init_types): Set up boolean
1791 type related tree nodes.
1792 * Make-lang.in: Remove rules for dead files and
1793 dependencies on them.
1795 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
1797 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
1798 C front end dependency. Also, convert.c does not depend on
1799 g95-support.h anymore.
1800 * convert.c: Don't include c-common.h and g95-support.h
1801 * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
1802 (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
1803 stmts_are_full_exprs_p, current_stmt_tree,
1804 current_scope_stmt_stack): Remove.
1805 * g95-support.h (unsigned_conversion_warning): Kill proto.
1806 (boolean_type_node, boolean_true_node, boolean_false_node):
1807 Don't define here. Instead, make then true tree nodes in
1809 * support.c (c_global_trees): Die, C front end, die!!!
1810 (g95_init_c_decl_hacks): Don't touch intmax_type_node,
1811 uintmax_type_node, string_type_node and const_string_type_node.
1812 (decl_constant_value, overflow_warning): Make static functions.
1813 They are in death row too, though.
1814 (default_conversion, c_expand_asm_operands): Remove.
1815 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
1816 trans.c: Don't include c-common.h.
1817 * trans-types.c (boolean_type_node, boolean_true_node,
1818 boolean_false_node): Make them real tree nodes.
1819 * trans-types.h (intmax_type_node, string_type_node,
1820 const_string_type_node): Hack to work around C dependencies
1821 in builtin-types.def.
1823 2003-06-04 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1825 * decl.c (decl_types): Add some iterators-like sentinels.
1826 * decl.c (match_attr_spec): Use them.
1827 Use "decl_types" instead of "int".
1828 Add cast in call to g95_match_strings.
1829 * dump-parse-tree.c (g95_show_namespace): Use "g95_intrinsic_op"
1831 * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
1832 (g95_interface_info): Use "g95_intrinsic_op".
1833 * dump-parse-tree.c (g95_show_namespace): Use them.
1834 * interface.c (g95_check_interfaces): Use them.
1835 * module.c (read_module, write_module): Use them.
1836 * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
1837 Use "g95_intrinsic_op".
1838 * interface.c (check_operator_interface): Use "g95_intrinsic_op".
1839 Add a default case in switch statement.
1840 * intrinsic.h (g95_generic_isym_id): Moved to...
1841 * g95.h (g95_generic_isym_id): here.
1842 (g95_intrinsic_sym): Use "g95_generic_isym_id".
1843 * intrinsic.c (make_generic): Use "g95_generice_isym_id".
1844 * trans-intrinsic.c (g95_intrinsic_map_t,
1845 g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
1846 * match.c (g95_match_intrinsic_op): Add cast in call to
1849 2003-06-03 Steven Bosscher <steven@gcc.gnu.org>
1851 * support.c (skip_evaluation, warn_conversion, lvalue_p,
1852 lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
1853 constant_fits_type_p, convert_and_check,
1854 unsigned_conversion_warning): Remove these ugly remnants
1855 we inherited from the C front end.
1856 (function_types_compatible): Remove '#if 0'-edcode.
1857 (build_modify_expr): Likewise.
1858 (convert_for_assignment): Don't use the deceased functions.
1859 The parameter fundecl is now unused.
1860 (decl_constant_value): Always just return decl. In fact
1861 this function is not used at present, but it might be in
1862 the future, when we start using the tree inliner.
1863 (overflow_warning, default_conversion, c_expand_asm_operands):
1864 Abort when these are called, they are part of the C type
1865 checking implementation and therefore poison to Fortran.
1867 2003-06-04 Steven Bosscher <steven@gcc.gnu.org>
1869 * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
1870 c-pretty-print.o and c-dump.o. Add a comment on why we
1871 depend on c-semantics.c.
1872 * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
1873 Don't use the C front end tree dumper hook to dump the
1874 language specific tree representation -- we don't have
1875 one. So instead, inherit the default langhook.
1877 2003-06-02 Paul Brook <paul@nowt.org>
1879 * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
1881 2003-06-02 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1883 * check.c (g95_check_associated): Use proper types. Remove
1884 extraneous argument in call to g95_error().
1886 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
1888 * resolve.c (resolve_operator): Make logical operands convert to the
1889 type with higher kind.
1891 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
1893 * check.c (g95_check_associated): Make sure both pointer and target has
1894 the same type and rank. Null pointer or array section with vector
1895 subscript as target are not allowed.
1896 * trans.h: Declare gfor_fndecl_associated.
1897 * trans-decl.c: (g95_build_builtin_function_decls): Initialize
1898 gfor_fndecl_associated.
1899 * trans-intrinsic.c (g95_conv_associated): New function.
1900 (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
1902 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
1904 * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
1905 according to POINTER itself rather than TARGET.
1906 (g95_conv_expr_descriptor): Make lbound start at 1.
1907 * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
1909 2003-06-01 Paul Brook <paul@nowt.org>
1911 * expr.c (g95_type_convert_binary): Make it match the standard.
1912 * g95.texi: Remove dead link.
1914 2003-06-01 Steven Bosscher <steven@gcc.gnu.org>
1916 * g95.texi: Cleanup somewhat in preparation for inclusion
1919 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1920 Canqun Yang <canqun@yahoo.com.cn>
1922 * resolve.c (compare_bound_int, resolve_where_shape): Proper return
1924 (g95_find_forall_index): Return proper value.
1925 (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
1926 compare the return value from g95_find_forall_index.
1928 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1929 * g95.h, io.c (g95_st_label): Remove "length".
1930 (g95_symtree): Remove "link".
1931 (g95_case): Remove "code".
1932 * arith.c, arith.h (g95_compare_string, g95_convert_integer,
1933 g95_convert_real): Make an argument pointer to const.
1934 * decl.c (colon_seen): Add a TODO.
1935 * interface.c (g95_compare_types): Fix typo.
1936 * interface.c (compare_interfaces): Preserve value of "p".
1937 * intrinsic.c (sort_actual): Remove "i".
1938 * match.c (g95_match_assign): Proper type in call to g95_match().
1939 * parse.c (next_free): Avoid duplicate call due to macro.
1940 * parse.c (check_statement_label): wrong type in call to g95_error.
1941 * primary.c (match_real_constant): Add a TODO.
1942 * resolve.c (resolve_select): Remove useless conditional.
1943 * simplify.c (g95_simplify_repeat): Proper assignment to
1944 "value.character.string".
1945 * simplify.c (g95_simplify_reshape): Wrong variable in call to
1948 2003-05-20 Canqun Yang <canqun@yahoo.com.cn>
1950 * trans-stmt.c: Remove unnecessary include file defaults.h.
1952 2003-05-19 Lifang Zeng <zlf605@hotmail.com>
1954 * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
1956 (g95_trans_forall): Allow arbitrary number of FORALL indexes and
1957 actual variables used as FORALL indexes.
1959 2003-05-15 Paul Brook <paul@nowt.org>
1961 * trans-array.c (g95_trans_static_array_pointer): Use
1963 (g95_trans_deferred_array): Initialize static array pointers.
1964 * trans-expr.c (g95_conv_function_call): Use formal arglist to
1965 correctly pass POINTER and absent CHARACTER arguments.
1967 2003-05-14 Lifang Zeng <zlf605@hotmail.com>
1969 * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
1970 (g95_resolve_forall_body): Resolve FORALL body.
1971 (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
1972 (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
1973 (g95_find_forall_index): Check whether the FORALL index appears in
1974 the expression or not.
1975 (resolve_code): Modified.
1977 2003-05-14 Paul Brook <paul@nowt.org>
1979 * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
1981 2003-05-13 Paul Brook <paul@nowt.org>
1983 * trans-types.c (g95_max_array_element_size): Now a tree node.
1984 (g95_init_types): Work out max size properly.
1985 (g95_get_dtype_cst): Modify to match.
1987 2003-05-11 Paul Brook <paul@nowt.org>
1989 * trans-io.c (add_case): Create a label decl for case labels.
1991 2003-05-11 Paul Brook <paul@nowt.org>
1993 * arith.c (g95_integer_index_kind): New variable.
1994 * f95-lang.c (g95_init): Move frontend initialization here ...
1995 (g95_post_options): ... from here.
1996 * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
1997 * intrinsic.c (add_functions): Use index kinds.
1998 * iresolve.c: Convert to index_kind where needed.
1999 * resolve.c (g95_resolve_index): Make public, use index_kind.
2000 (resolve_array_ref): Adjust to match.
2001 * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
2002 * trans-stmt.c: Ditto.
2003 * trans-types.c: Ditto.
2004 * trans-types.h (g95_array_index_kind): Remove declaration.
2005 * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
2007 2003-05-07 Paul Brook <paul@nowt.org>
2009 * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
2010 * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
2013 2003-05-07 Paul Brook <paul@nowt.org>
2015 * trans-array.c (trans_static_array_pointer,
2016 g95_trans_array_constructor_value, g95_conv_array_initializer,
2017 g95_conv_structure): CONSTRUCTOR nodes only have one operand.
2018 (g95_add_loop_ss_code): Convert subscripts to the correct type.
2019 * trans-stmt.c (g95_trans_character_select): Ditto.
2020 * trans-types.c (g95_init_types): Ditto.
2022 2003-05-07 Steven Bosscher <steven@gcc.gnu.org>
2024 * f95-lang.c (expand_function_body): Use input_line, not lineno.
2025 * trans-decl.c (g95_generate_function_code,
2026 g95_generate_constructors): Likewise.
2027 * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
2028 g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
2031 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
2032 * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
2033 with components point to the DERIVED type itself, and two DERIVED
2034 type with components point to each other.
2035 * trans-expr.c (g95_conv_componet_ref): Modified
2037 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
2038 * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
2040 (g95_trans_pointer_assign): Implement Nullify.
2042 2003-05-01 Paul Brook <paul@nowt.org>
2044 * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
2045 * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
2047 2003-05-01 Paul Brook <paul@nowr.org>
2049 * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
2050 trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
2053 2003-05-01 Canqun Yang <canqun@yahoo.com.cn>
2055 * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
2058 2003-04-28 Paul Brook <paul@nowt.org>
2060 * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
2061 as their kind suggests.
2062 (g95_resolve_reshape): Ditto.
2064 2003-04-28 Chun Huang <compiler@sohu.com>
2066 * trans-expr.c (g95_conv_substring_expr): New function.
2067 (g95_conv_expr): Use it.
2069 2003-04-28 Paul Brook <paul@nowt.org>
2071 * iresolve.c (g95_resolve_transpose): Make it match the
2073 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
2075 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
2077 * trans-types.c (g95_add_field_to_struct): New function to
2078 add a field to a UNION_TYPE or RECORD_TYPE.
2079 * trans-types.h (g95_add_field_to_struct): Prototype.
2080 (g95_get_derived_type): Use g95_add_field_to_struct to add
2082 * trans-io.c (g95_add_field): Remove.
2083 (ADD_FIELD): Use new g95_add_field_to_struct function.
2084 (ADD_STRING): Likewise.
2085 * trans-stmt.c (g95_trans_select): Likewise.
2086 (g95_add_field): Remove duplicated function.
2088 2003-04-18 Canqun Yang <canqun@yahoo.com.cn>
2090 Port implementation for CHARACTER SELECT from Andy's tree.
2091 * trans-stmt.c (g95_trans_character_select): Implement character
2092 select. (g95_add_field): New function.
2093 * trans-decl.c: Declare 'gfor_gndecl_select_string'.
2094 (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
2095 * g95.h (struct g95_case): Add field 'int n'.
2096 * trans.h: Declare 'gfor_fndecl_select_string'.
2098 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
2100 * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
2101 (g95_insert_bbd): Die on duplicates.
2102 * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
2104 2003-04-14 Steven Bosscher <steven@gcc.gnu.org>
2106 * g95.texi: Require GMP 4.0 -- like we actually
2107 do. Explain the testsuite and what-goes-where.
2108 Don't use undefined texinfo symbol. Break very
2109 long line. Remove finished item from the list
2112 2003-04-11 Canqun Yang <canqun@yahoo.com.cn>
2114 * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
2117 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
2119 * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
2120 (g95_trans_forall_body): New function.
2122 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
2124 * resolve.c (resove_where): New function.
2125 (resolve_where_shape): New function.
2126 (resolve_code): Add call to 'resolve_where'
2127 * trans-stmt.c (g95_trans_where): Modified.
2128 (g95_trans_where_2): New function.
2129 (g95_trans_where_assign): New function.
2130 (g95_evaluate_where_mask): New function.
2131 (g95_add_to_stmt_list): New function.
2132 (g95_get_temp_expr): New function.
2133 * trans.h (where_stmt_list): New structure.
2135 2003-04-10 Paul Brook <paul@nowt.org>
2137 * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
2138 (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
2140 2003-04-10 Steven Bosscher <steven@gcc.gnu.org>
2142 Update after mainline -> tree-ssa-branch merge.
2143 * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
2145 (g95_init): Update for new lang_hooks definition.
2146 (g95_post_options): New langhook.
2147 (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
2148 * scanner.c (g95_new_file): Comment update.
2150 2003-04-09 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2152 * g95.h, lang-options.h: Add -Wimplicit-interface.
2153 * options.c (g95_init_options, g95_parse_arg): Set it.
2154 * interface.c (check_intents): Warn about call with implicit
2156 * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
2159 2003-04-05 Paul Brook <paul@nowt.org>
2161 * iresolve.c (g95_resolve_spread): Don't resole based on type.
2162 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
2164 2003-03-29 Paul Brook <paul@nowt.org>
2166 * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
2167 (g95_resolve_unpack): Ditto.
2168 * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
2169 (g95_conv_intrinsic_function): Use it. Remove PACK and UNPACK.
2170 (g95_is_intrinsic_libcall): Add PACK and UNPACK.
2172 2003-03-25 Paul Brook <paul@nowt.org>
2174 * arith.c (g95_unary_user, g95_user): Remove dead functions.
2176 * array.c (g95_free_array_ref): Ditto.
2178 * symbol.c (g95_use_derived_tree): Ditto.
2179 * intrinsic.c (add_functions): Use simplification for SCALE.
2180 * primary.c (g95_match_rvalue): Test sym, not symtree.
2182 2003-03-25 Paul Brook <paul@nowt.org>
2184 * trans-decl.c (build_function_decl): Add parameter before it gets
2185 turned into a constant.
2186 * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
2187 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
2188 * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
2190 2003-03-22 Paul Brook <paul@nowt.org>
2192 * trans-array.c (g95_conv_array_initializer): Allow scalar
2194 * trans-decl.c (g95_finish_var_decl): Result variables are not
2196 * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
2197 (g95_conv_intrinsic_function): Use it.
2198 * trans-types.h (g95_type_spec): Remove dead declaration.
2200 2003-03-21 Paul Brook <paul@nowt.org>
2202 * trans-decl.c (g95_build_function_decl): Mark string parameters.
2204 2003-03-20 Paul Brook <paul@nowt.org>
2206 * trans-decl.c (g95_build_function_decl): Put character length
2207 parameters at the end of the function declaration.
2208 * trans-expr.c (g95_conv_function_call): Ditto.
2209 * trans-types.c (g95_get_function_type): Ditto.
2211 2003-03-20 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2213 * resolve.c (resolve_formal_arglist): Don't impose intent for
2214 procedure arguments of pure functions.
2215 (resolve_select): Remove redundant assignment.
2217 2003-03-19 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2219 * arith.c (validate_logical), g95.h, options.c (g95_init_options):
2221 * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
2222 * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
2224 * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
2226 * symbol.c (g95_add_type): Fix typo in comment.
2229 2003-03-16 Paul Brook <paul@nowt.org>
2231 * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
2232 * expr.c (g95_build_call): Remove.
2233 * f95-lang.c (puchdecl_top_level): New function.
2234 * g95.h (g95_code): Store resolved symbol, not just the name.
2235 * intrinsic.c (g95_intrinsic_namespace): New global namespace.
2236 (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
2237 (g95_get_intrinsic_sub_symbol): New function.
2238 * iresolve.c (g95_resolve_cpu_time): Use it.
2239 (g95_resolve_random_number): Ditto.
2240 * resolve.c: Set code->resolved_sym instead of code->sub_name.
2241 * trans-decl.c (g95_get_extern_function_decl): Give external decls
2242 the correct DECL_CONTEXT. Add global symbold to the global scope.
2243 * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
2246 2003-03-16 Paul Brook <paul@nowt.org>
2248 * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
2249 * options.c (g95_parse_arg): Ditto.
2250 * module.c (mio_symbol_attribute): Handle the always_explicit bit.
2251 * resolve.c (resolve_formal_arglist): The always_explicit sould be set
2252 for the procedure, not the parameter.
2253 * trans-array.c (g95_trans_g77_array): New function.
2254 (g95_trans_assumed_size): Use it.
2255 (g95_trans_dummy_array_bias): Ditto.
2256 (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
2257 (g95_conv_expr_descriptor): ... to here. Update callers.
2258 * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
2259 (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
2260 * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
2261 * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
2262 * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
2263 (g95_sym_type): Ditto.
2265 2003-03-15 Paul Brook <paul@nowt.org>
2267 * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
2269 * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
2271 2003-03-14 Paul Brook <paul@nowt.org>
2273 * trans-array.c (g95_array_is_packed): Remove.
2274 (g95_conv_array_base): Correctly handle all descriptorless cases.
2275 (g95_conv_array_stride): Use descriptorless strides.
2276 (g95_trans_dummy_array_bias): Don't always repack the array.
2277 (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
2279 * trans-types.c (g95_get_nodesc_array_type): Differentiate between
2280 dummy and non-dummy arrays...
2281 (g95_sym_type, g95_get_derived_type): ... like these.
2282 (g95_get_array_type_bounds): Allow discontiguous arrays.
2284 2003-03-12 Paul Brook <paul@nowt.org>
2286 * array.c (g95_resolve_array_spec): Fix comment.
2287 * g95.h (symbol_attributes): New flag always_explicit.
2288 * resolve.c (resolve_formal_arglist): Set it always_explicit.
2289 * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
2290 * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
2291 (g95_trans_array_bounds): Allow assumed shape arrays.
2292 (g95_trans_repack_array): Remove.
2293 (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
2294 * trans-decl.c (g95_build_qualified_array): Only ignore absent
2295 bounds for assumed size arrays.
2296 (g95_build_dummy_array_decl): Use descriptorless arrays.
2297 * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
2298 (g95_trans_pointer_assign): Fix typo.
2299 * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
2301 (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
2302 * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
2303 Also modify callers.
2304 * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
2306 2003-03-08 Paul Brook <paul@nowt.org>
2308 * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
2309 (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
2310 * resolve.c (compare_spec_to_ref): Allow full array sections.
2312 2003-03-08 Paul Brook <paul@nowt.org>
2314 * expr.c (g95_simplify_expr): Also simplify array index and
2315 substring expressions.
2316 * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
2317 * trans-array.c (g95_trans_array_bounds): New function.
2318 (g95_trans_auto_array_allocation): Use it.
2319 (g95_trans_assumed_size): Rewrite.
2320 * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
2321 (gfor_fndecl_repack): Remove.
2322 (g95_build_qualified_array): Handle absent upper bounds.
2323 (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
2324 (g95_get_symbol_decl): Update.
2325 (g95_build_intrinsic_function_decls): Initialize new decls.
2326 * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
2327 (gfor_fndecl_repack): Remove.
2328 * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
2329 * trans-types.c: (g95_build_array_type): Merge duplicated code..
2330 (g95_get_nodesc_array_type): Handle absent bounds.
2331 * trans-types.h (g95_get_nodesc_array_type): Declare.
2333 2003-03-04 Paul Brook <paul@nowt.org>
2335 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
2338 2003-03-02 Paul Brook <paul@nowt.org>
2340 * options.c (g95_init_options): Drfault to 1.
2341 (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
2342 * trans-array.c (g95_conv_array_data, g95_conv_array_base,
2343 g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
2344 Handle non-constant size automatic arrays.
2345 (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
2346 generic bound functions.
2347 (g95_trans_auto_array_allocation): Don't create a descriptor.
2348 (g95_trans_assumed_size): New function (broken).
2349 (g95_trans_dummy_array_bias): Remove unused var.
2350 * trans-array.h (g95_trans_assumed_size): Declare.
2351 * trans-decl.c (create_index_var): New fuction.
2352 (g95_build_qualified_array): New function.
2353 (g95_get_symbol_decl): Use it.
2354 (g95_trans_deferred_vars): Handle assumed shape seperately.
2355 * trans-types.c (get_element_type): Handle heap allocated arrays.
2356 (g95_is_nodesc_array): Include non-const size arrays.
2357 (g95_get_nodesc_array_type): Ditto.
2359 2003-02-23 Paul Brook <paul@nowt.org>
2361 * trans-array.c (g95_array_init_size): Should use stride, not size of
2364 2003-02-18 Paul Brook <paul@nowt.org>
2366 * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
2367 after intrinsic function check.
2369 2003-02-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2371 * io.c (match_io): Fix missing return value and remove useless
2373 * match.c (g95_match): Remove useless assignment.
2374 * module.c (parse_string): Remove useless post increment.
2375 * simplify.c (g95_simplify_verify): Remove useless assignment.
2377 2003-02-15 Paul Brook <paul@nowt.org>
2379 * expr.c (restricted_intrinsic): Handle bad values gracefully.
2380 * g95.h (symbol_attribute): Add referenced member.
2381 (g95_symbol): Add dummy_order member.
2382 (g95_set_sym_referenced): Declare.
2383 * match.c (g95_match_assignment, g95_match_call): Use it
2384 * primary.c (match_actual_arg, g95_match_rvalue,
2385 g95_match_variable): Ditto.
2386 * symbol.c (next_dummy_order): New variable.
2387 (g95_set_sym_referenced): New function.
2388 (check_done): New function.
2389 (g95_add_*): Use it.
2390 * trans-decl.c: Make formatting conform to GCC standards.
2391 (g95_defer_symbol_init): Add dummy variables in the right order.
2392 (g95_get_symbol_decl): Only accept referenced variables.
2393 (g95_create_module_variable): Module variables are always required.
2394 (generatr_local_decls): New function.
2395 (generate_local_vars): New function.
2396 (g95_generate_function_code): Use it.
2398 2003-02-13 Paul Brook <paul@nowt.org>
2400 * trans-decl.c (g95_conv_struct_cons): Remove.
2401 (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
2402 * trans-expr.c (g95_conv_structure): New function.
2403 (g95_conv_expr): Use it.
2405 2003-02-09 Paul Brook <paul@nowt.org>
2407 * trans-array.c (g95_array_init_size): Don't evaluate the linit
2408 expressions multiple times.
2409 (g95_trans_auto_arry_allocation): Use pointer not tmp.
2411 2003-02-08 Paul Brook <paul@nowt.org>
2413 * module.c (mio_symtree_ref): Declare as static.
2414 (mio_expr): Remove dead code.
2415 (read_module): Set the symtree link for fixups.
2416 * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
2417 (build_round_expr): ... to this.
2418 (g95_conv_intrinsic_aint): New function.
2419 (g95_conv_intrinsic_function): Use it.
2421 2003-02-08 Paul Brook <paul@nowt.org>
2423 * trans-array.c (g95_trans_array_constructor_value): Use the acutal
2424 offset after modificaton, not the increment expression.
2425 * dependency.c: Kill excess whitespace.
2427 2003-02-07 Sanjiv Gupta <sanjivg@noida.hcltech.com>
2429 * dependency.h: Remove some function declarations.
2430 * dependency.c (get_no_of_elements): Change this function not to
2432 * other: Add comments for all modified functions.
2434 2003-02-06 Paul Brook <paul@nowt.org>
2436 * g95spec.c (lang_specific_functions): Fix initializer warning.
2437 * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
2438 for structure type names.
2439 * trans-decl.c (g95_cons_structure_cons): New function.
2440 (g95_get_symbol_decl): Use it.
2441 * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
2444 2003-02-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2446 * resolve.c (compare_cases): Add const to casts.
2448 2003-01-30 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2450 * g95.h (g95_check_f): Change a1 to f1m.
2451 * intrinsic.c (add_sym_1m, check_specific,
2452 g95_intrinsic_func_interface): Use it.
2454 * module.c (init_pi_tree): Remove useless cast.
2455 (fp2): Fix argument type.
2457 * parse.c (parse_select_block): Add comment.
2459 2003-02-05 Toon Moene <toon@moene.indiv.nluug.nl>
2461 * lang-options.h: Fix warning involving C90 concatenated
2464 2003-02-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
2465 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2467 * io.c (format_asterisk): Complete initializer to kill warning.
2468 * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
2469 DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
2470 (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
2471 new defines to complete initializers. Kills all warnings.
2473 * Make-lang.in: Comment cleanup.
2475 2003-02-05 Paul Brook <paul@nowt.org>
2477 * array.c (g95_free_constructor): Handle NULL expressions.
2478 * resolve.c (resolve_structure_cons): Ditto.
2479 * decl.c (g95_match_null): New Function.
2480 (variable_decl): Use it.
2481 * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
2482 * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
2483 * trans-types.c (g95_set_decl_attributes): Remove empty function.
2485 2003-02-05 Paul Brook <paul@nowt.org>
2487 * trans.h (build1_v): New macro.
2488 (build_v): Remove pointless and incorrect prototype.
2489 * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
2490 * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
2492 2003-02-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
2494 * Make-lang.in (F95_OBJS): Remove one more dead file.
2496 2003-02-01 Paul Brook <paul@nowt.org>
2498 * lang-specs.h: Don't pass -ffixed-form to the linker.
2499 * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
2501 2003-02-01 Paul Brook <paul@nowt.org>
2503 * Make-lang.in (F95_OBJS): Remove dead files.
2504 * trans-array.c (g95_array_init_size): Do the right thing when
2506 * trans-decl.c (g95_generate_function_code): Initialize deffered
2507 symbol list before translating contained subroutines.
2508 * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
2509 scalar invariant values here...
2510 (g95_conv_variable, g95_conv_function_call): ... instead of here ...
2511 * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
2513 2003-01-29 Paul Brook <paul@nowt.org>
2515 * trans-array.c (g95_add_loop_code): Put pre code in the right block.
2516 (g95_walk_elemental_function_args): Reverse chains before adding.
2517 (g95_reverse_ss): Move about a bit.
2518 * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
2521 2003-01-28 Paul Brook <paul@nowt.org>
2523 * intrinsic.c (resolve_intrinsic): Use correct union member.
2524 * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
2526 * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
2527 use associated variables.
2528 * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
2529 * trans-expr.c (g95_conv_expr_present): ... to here.
2530 * trans.h: Declare it.
2531 * trans-types.c (g95_sym_type): Assume subroutine if not specified.
2533 2003-01-28 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2535 * array.c (expand_iterator): Suppress useless assignment.
2536 * decl.c (match_char_spec): Ditto.
2537 * io.c (match_io_iterator): Ditto.
2538 * primary.c (match_real_constant): Ditto.
2539 * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
2540 Ditto. Also, use g95_intrinsic_op not int for intrinsic operators.
2541 * matchexp.c (match_add_operand, match_level_5): Likewise.
2542 * module.c (parse_atom, find_enum): Likewise.
2543 * resolve.c: move #include <string.h>
2544 (resolve_select): Fix serious typo.
2546 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.n>
2548 * Make-lang.in: Don't build with broken tree-ssa-pre.
2550 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.nl>
2552 * resolve.c (resolve_index): Add a TODO.
2553 * symbol.c: Remove useless "#include <ctype.h>".
2555 2003-01-27 Paul Brook <paul@nowt.org>
2557 * check.c (check_rest): Allow different type kinds as an extension.
2558 * g95.h (g95_resolve_f): Add f1m.
2559 * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
2560 * intrinsic.h: Chenge prototypes for MIN and MAX.
2561 * iresolve.c (g95_resolve_minmax): New function.
2562 (g95_resolve_min, g95_resolve_max): Use it.
2563 * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
2565 (g95_conv_intrinsic_present): Fix logic.
2567 2003-01-27 Steven Bossche <s.bosscher@student.tudelft.nl>
2569 * g95.h (g95_case): Don't be a tree, be a double linked list.
2570 * match.c (match_case_selector): Remove redundant semantics check.
2571 Clean up a few goto's to make it a tiny little bit faster.
2572 * resolve.c (case_tree): Die.
2573 (compare_cases): Accept and compare unbounded cases too.
2574 (check_case_overlap): Don't build a tree. Instead, merge-sort the
2575 whole list of g95_cases passed from resolve_select.
2576 (sane_logical_select): Die.
2577 (check_case_expr): Return FAILURE if a CASE label is of the wrong
2579 (resolve_select): Fixup case expression for computed GOTOs, put it
2580 in expr, not expr2, for easier handing in the parse tree dumper and
2581 the code generator. Rewrite the rest of the function: Kill
2582 unreachable case labels and unreachable case blocks.
2583 * dump-parse-tree.c (g95_show_code_node): Always dump expr for
2584 an EXEC_SELECT, not case2 anymore.
2585 * trans-const.c (g95_conv_constant_to_tree): New function.
2586 (g95_conv_constant): Use it.
2587 * trans-const.h: Declare prototype for the new function.
2588 * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
2589 g95_trans_character_select): New static functions.
2590 (g95_trans_select): Rewrite.
2592 2003-01-26 Paul Brook <paul@nowt.org>
2594 * intrinsic.c (add_fnctions): Properly add dreal.
2595 * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
2596 (g95_conv_intrinsic_function): Use it.
2597 * trans-io.c (build_dt): Abort on internal files (unimplemented).
2599 2003-01-26 Paul Brook <paul@nowt.org>
2601 Widespread changes to the handling of symbols in expressions. These
2602 are now linked via g95_symtree nodes.
2603 * parse.c (g95_fixup_sibling symbols): New function.
2604 (parse_contained): Use it.
2605 * g95.h (symbol_attribute): Add contained. Indicates a symbol is a
2606 contained procedure that has bee correctly fixed up.
2607 (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
2609 2003-01-24 Paul Brook <paul@nowt.org>
2611 * trans-array.c (g95_walk_expr): Function result attributes are in
2613 * trans-expr.c (g95_conv_function_call,
2614 g95_trans_arrayfunc_assign): Ditto.
2615 * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
2617 2003-01-23 Steven Bosscher <s.bosscher@student.tudelft.nl>
2619 * expr.c (check_restricted): Fix error message.
2620 * symbol.c (free_st_labels): Plug memleak.
2622 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
2624 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
2625 reduce_binary_aa, reduce_binary, eval_intrinsic,
2626 eval_intrinsic_f2): Use typesafe prototypes for eval functions.
2627 * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
2628 for typesafe intrinsics helper functions.
2629 (g95_intrinsic_sym): Use them.
2630 * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
2631 add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
2632 add_sym_5, add_conv, resolve_intrinsic, do_simplify,
2633 check_specific, g95_intrinsic_func_interface,
2634 g95_intrinsic_sub_interface): Adjust all calls to intrinsics
2636 * trans-decl.c (g95_get_extern_function_decl): Likewise.
2637 * Make-lang.in: Don't disable warnings for strict prototypes
2638 any longer, everything is typesafe now.
2640 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
2642 * bbt.c (duplicate_node): Make static.
2643 * module.c (module_name): Make static.
2644 * scanner.c (include_dirs): Make static.
2646 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
2648 Hard coded _gfor_'s should not show up anymore.
2649 * g95.h (PREFIX): New macro.
2650 * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
2652 (g95_resolve_random_number): Likewise.
2653 * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
2654 * trans-io.c: Remove 'prefix' macro. Replace all uses with
2655 the new PREFIX macro from g95.h.
2657 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
2659 The troubles of forking... Andy implemented this just now too.
2660 Let's stick to that and keep the trees close.
2661 * g95.h (g95_st_label): 'format' member is now a g95_expr.
2662 * io.c: Revert previous changes.
2663 (g95_match_format): Match the format string as a character
2665 * match.h (g95_statement_label): Declare external.
2666 * parse.c: Revert previous changes.
2667 * symbol.c (g95_free_st_label): Free a g95_expr instead
2669 * trans-io.c: Revert previous changes.
2670 (build_dt): Use set_string to set the format string.
2672 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
2674 * io.c (format_string): Make non-static.
2675 (g95_match_format): Remember the format string.
2676 (terminate_io): Add I/O termination for empty I/O lists.
2677 * match.h: Declare external format_string.
2678 * parse.c (check_statement_label): Attack the format string
2679 to a format label for FORMAT statements.
2680 * trans-io.c (g95_add_field): Define prefix macro. Replace
2681 all uses of PREFIX define with a use of this macro.
2682 (build_dt): Implement formatted I/O for format labels.
2684 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
2686 * lang-options.h: Kill "-std=F".
2687 * options.c: Remove unimplemented "-std=F". Modify
2689 * misc.c (g95_terminal_width): New function.
2690 * error.c (g95_error_init_1): Use g95_terminal_width.
2691 * g95.h: Add prototype for g95_terminal_width, remove
2694 2003-01-19 Steven Bosscher <s.bosscher@student.tudelft.nl>
2696 * Make-lang.in: Fix typo.
2698 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
2700 * g95.h (struct g95_case): Remove unused cruft, new member
2701 'where' to keep track of the locus of the default case.
2702 * match.c (g95_match_case): Add locus to the current case.
2703 (match_case_selector): Likewise.
2704 * parse.c (parse_select_block): Move semantics check for
2705 multiple DEFAULT cases out of here to...
2706 * resolve.c (check_case_overlap): ...here. Return sooner
2708 (check_case_expr): Take two g95_cases now, use to sure the
2709 expression kinds are the same.
2710 (resolve_select): Cleanup.
2712 2003-01-18 Paul Brook <paul@nowt.org>
2714 * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
2715 * trans-decl.c (g95_set_symbol_decl): Handle non-array result
2717 (g95_get_extern_function_decl): Put decls in the correct context.
2719 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
2721 * trans-io.c: Port changes from Andy to set ERR flag.
2723 2003-01-17 Paul Brook <paul@nowt.org>
2725 * trans-array.c: Add various comments.
2726 (g95_ss_terminator): Declare as const.
2727 (g95_walk_expr): Remove first parameter and update all callers.
2728 (g95_walk_op_expr): Initialize scalar SS properly.
2729 * trans-array.h (g95_walk_expr): Update prototype.
2730 * trans-expr.c: Update for new g95_walk_expr.
2731 * trans-intrinsic.c: Ditto.
2732 * trans-io.c: Ditto.
2733 * trans.h: Various comments for SS chains.
2735 2003-01-17 Paul Brook <paul@nowt.org>
2737 * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
2739 * intrinsic.c (add_functions): Use them.
2740 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
2741 * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
2743 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
2745 Fallout of a small merge conflict:
2746 * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
2748 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
2750 * initrinsic.c: New add_sym_* functions for strong typing.
2751 (add_conv): Make prototype strict.
2752 * dump-parse-tree.c, dependency.c: Include config.h
2753 * resolve.c, trans-io.c: Fix typos.
2755 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
2757 * dump-parse-tree.c (g95_show_code_node): Show the
2758 condition for a computed GOTO that was transformed
2759 to a SELECT CASE construct.
2760 * resolve.c (check_case_overlap): Revert previous switch
2761 to treaps, it was too slow and didn't catch all trouble.
2762 (resolve_symbol): Be more flexible about module procedures.
2763 * symbol.c (check_conflict): Point to relevant section in
2764 the standard for dubious conflict. Allow procedure
2765 dummy arguments to be optional again.
2766 * trans-io (add_field): Rename to g95_add_field. Change
2768 * trans-stmt (trans_select): Handle unbounded cases for
2769 integer SELECT CASE constructs. Fix/add more comment.
2771 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
2773 * g95.h: Uses GCC's function attribute macros.
2774 * error.c, module.c, parse.c, g95.h: More function attributes.
2776 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
2778 * trans-decl.c (get_label_decl): Use TREE_LINENO instead
2779 of DECL_SOURCE_LINE, and TREE_FILENAME instead of
2782 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
2784 * f95-lang.c (pushdecl): Use TREE_LINENO instead of
2786 * trans.c (g95_trans_code): Use annotate_all_with_file_line
2787 instead of nowdead wrap_all_with_wfl.
2789 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
2791 * parse.c (g95_parse_file): In verbose mode, dump the parse tree
2792 before generating code, so we can still see it even if the code
2793 generation phase dies.
2795 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
2797 * decl.c (build_sym): Split out initialization expression parts...
2798 (add_init_expr_to_sym): ...to here.
2799 (variable_decl): Add the symbol following an attribute list to the
2800 symbol tree before parsing the optional initialization expression
2801 if the symbol is not of a derived type.
2802 * primary.c (g95_match_rvalue): Don't assume a symbol always has
2803 a value if it is a PARAMETER.
2805 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
2807 * misc.c: Don't #include <mcheck.h>
2808 * module.c: Ditto. Kill uses of mtrace, muntrace. If there
2809 ever was a glibc bug, then either this was never reported to
2810 glibc people, or it has been fixed for so long that there's
2811 no information you can find about it, anywhere.
2813 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
2816 * module.c (attr_bits, bt_types, array_spec_types):
2817 Switch 'const' and 'static'.
2818 * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
2820 GNU'ify source code:
2821 * trans-io.c: Numerous fixes, one fixed warning and a few
2822 TODO markers so that we don't forget about them.
2824 2003-01-13 Paul Brook <paul@nowt.org>
2826 * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
2827 * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
2829 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
2830 * match.c (g95_match_stop): Fix dumb == -> != error.
2832 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
2834 * dump-parse-tree.c (show_indent): Add line breaks. This
2835 whole dumping process needs cleanups.
2836 * f95-lang.c (g95_mark_addressable): Fix prototype to match
2837 the langhook. Fix 'return's accordingly.
2838 * g95-support.h: Adjust prototype.
2839 * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
2840 * lang-options.h: Add '-fsyntax-only'.
2841 * options.c (g95_init_options): Init 'no_backend'.
2842 (g95_parse_arg): Deal with '-fsyntax-only'.
2843 * parse.c (g95_parse_file): Do not generate code if 'no_backend'
2846 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
2848 * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
2849 arguments. Also make sure that if a symbol is marked INTRINSIC,
2850 an intrinsic with the symbol's name actually exists.
2851 (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
2852 Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
2853 ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
2855 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
2857 * resolve.c (resolve_contained_functions): Fix condition, don't
2858 throw internal_error if a child namespace has no name. Apparently
2859 this can be the case?
2861 2003-01-11 Paul Brook <paul@nowt.org>
2863 Port changes from Andy's tree:
2864 * g95.h (g95_code): Add stop_code.
2865 * match.c (g95_match_stop): Detter syntax checking.
2866 * resolve.c (resolve_generic_f0): Return match type.
2867 (resolve_generic_f): Remove dead/duplicated code.
2868 (resolve_specific_f): Ditto.
2869 * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
2870 * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
2871 * trans-stmt.c (g95_trans_stop): Handle new STOP format.
2873 2003-01-11 Paul Brook <paul@nowt.org>
2875 * trans-array.c: Various documentation/comment changes.
2876 * trans-stmt.c: Ditto.
2879 2003-01-10 Paul Brook <paul@nowt.org>
2881 * options.c/h: Add -fdump-parse-tree as alias of -v.
2883 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
2885 * dump-parse-tree.c (g95_show_namespace): Fixed another
2886 typo. Sorry, it's Friday...
2888 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
2891 * trans-array.c, trans-array.h, trans.c, trans-const.c,
2892 trans-const.h, trans-decl.c, trans-expr.c, trans.h
2893 trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
2894 trans-types.c: Fix bogus copyright years, add 2003.
2895 * trans-types.h: Give copyright header.
2897 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
2899 * dump-parse-tree.c (g95_show_namespace): Fixed typo.
2900 * expr.c, options.c, scanner.c: Add some more 'const' markers.
2901 * intrinsic.c: Some constant strings moved to read-only memory.
2902 * io.c (format_asterisk): Move to...
2905 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
2907 * dump-parse-tree.c (g95_show_namespace): Dump implicit
2908 types for ranges instead of per-letter. Indent the
2909 'CONTAINS' just like everything else.
2910 * resolve.c (resolve_contained_functions): Clarify comment.
2911 Explain non-obvious conditional expression. Improve
2912 diagnostics if tyoe cannot be resolved.
2913 Port semi-fix from Andy's tree:
2914 (was_declared): Move up before first use.
2915 (generic_sym, specific_sym): New functions. Code moved
2916 out if procedure_kind.
2917 (procedure_kind): Simplify using new functions.
2918 (resolve_generic_f): Make sure the functions we find in
2919 a parent namespace is generic.
2920 (resolve_specific_f): Ditto for specific functions.
2922 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
2924 * trans-stmt.c, trans.c: Fix some code style issues. Add
2925 some more comment (but still not enough!).
2927 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
2929 * symbol.c (flavors, procedures, intents, acces_types,
2930 access_types, ifsrc_types): Make const.
2931 * misc.c (g95_string2code): Make 'm' param 'const'.
2932 * module.c (find_enum, write_atom, mio_name): Make
2934 (attr_bits, bt_types, array_spec_types, array_ref_types,
2935 ref_types, expr_types): Make const.
2936 * g95.h: Adjust external decls.
2938 2003-01-09 Paul Brook <paul@nowt.org>
2940 * Testsuite: Add a load of new cases.
2942 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
2944 * Make-file.in: Add dependency on back end header files;
2945 a parallel build should work now.
2946 * f95-lang-c (lang_identifier): Remove bogus comment.
2947 (g95_be_parse_file): Fix prototype.
2948 (g95_init): Make static.
2949 (g95_finish): Make static.
2950 * error.c (g95_syntax_error): Kill. Make define in...
2951 * g95.h (g95_syntax_error): Define.
2952 (g95.options): Make 'source' member 'const'.
2953 * interface.c (g95_match_interface): Explain
2954 hard-to-read condition.
2955 (g95_match_end_interface): Ditto.
2956 * trans_const.c (g95_build_string_const): Make 's' parameter
2958 * trans_const.h: Adjust protoype accordingly.
2959 * trans-decl.c: Include tree-dump.h
2960 (g95_generate_function_code): Build fixes for recent changes
2961 in the tree-ssa branch.
2963 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
2965 * format.c: Kill, move code from here...
2967 * Make-lang.in: Adjust.
2970 * BUGS: Mention where to submit bugs. Move old content...
2971 * TODO: ...to here. New file.
2973 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
2974 Fix most warnings, and suppress the ones we can't fix for now.
2975 * Make-lang.in: Suppress warnings about bad proto's in g95.h,
2976 these warnings just clutter the screen and there's not much
2977 we can do about them for now anyway.
2978 * check.c, iresolve.c: Mark unused function parameters.
2979 * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
2980 they should be resolved before they get here.
2981 * error.c: Remove unused FILE *status_out.
2982 * f95-lang.c (g95_init): Remove bogus cast.
2983 * Many files: Make things 'const' where required.
2984 * g95.h: Fix prototypes for all modified functions above.
2985 (g95_options): Remove 'object' member.
2987 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
2989 * Make-file.in: Cleanup bogus targets. Add more comment.
2990 * lang-options.h: New option '-w'.
2991 * g95.h: add no_options field to struct g95_options.
2992 * options.c (g95_init_options): Default no_warnings to off.
2993 (g95_parse_arg): Recognise the '-w' switch and its alias,
2995 * error.c (g95_warning, g95_warning_now): Don't emit warning if
2996 no_warning option is set.
2997 * iresolve.c (g95_resolve_shape): Fix warning.
2999 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
3001 * primary.c (g95_next_string_char): Rename next_string_char, and
3002 make static. Adjust callers accordingly.
3003 * resolve.c (resolve_generic_f0): Return try, not match. Adjust
3004 callers accordingly.
3005 * g95.h: Split out all g95_match* functions to...
3006 * match.h: ...here. New file.
3007 * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
3008 matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
3010 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
3012 * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
3013 g95_merge_new_implicit): New functions.
3014 (g95_match_implicit_none, g95_match_implicit): Move from here...
3015 * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
3016 Modify to use the new functions in symbol.c.
3017 * g95.h: Add and move prototypes.
3019 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
3021 * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
3022 node compare function.
3023 (g95_insert_bbt): Likewise.
3024 (g95_insert_bbt_with_overlap): Likewise.
3025 (g95_delete_bbt): Likewise.
3026 (delete_treap): Likewise. Also fix a potential bug when calling it.
3027 * module.c (compare_pointers): Change proto to compare_fn.
3028 (compare_integers): Likewise.
3029 (compare_true_names): Likewise.
3030 (find_true_name): Adjust call to compare_true_names to match proto.
3031 (require_atom, write_atom, mio_name): Fix 'const' warnings.
3032 (init_pi_tree): Make compare a compare_fn instead of (int *).
3033 * resolve.c (compare_cases): Change proto to compare_fn.
3034 * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
3035 it static, and rename to compare_symtree.
3036 (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
3038 * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
3039 of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
3041 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
3042 * Make-lang.in: Fix spaces/tabs issues from previous patch.
3043 * patch.options: Blow away Paul's checkin mistake :-)
3044 * io.c (terminate_io): Fix memory leak (Arnaud).
3046 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
3048 * Make-lang.in: Teach about building DVI, info manual.
3049 * g95.texi: New file.
3051 2003-01-02 Paul Brook <paul@nowt.org>
3053 * trans-array.c (g95_reverse_ss): Make static and don't use.
3054 (g95_conv_ss_descriptor): Don't use g95_loopinfo
3055 (g95_conv_array_parameters): Modify for pointer assignments.
3056 (g95_walk_subexpr): New function.
3057 (g95_walk_expr*): Use it.
3058 * trans-array.h (g95_reverse_ss): Remove prototype.
3059 * trans-expr.c (g95_trans_pointer_assign): Implement.
3060 (Many): Set se.want_pointer before calling g95_conv_array_parameter.
3061 * trans-intrinsic.c: Sync with scalarizer changes.
3062 * trans-io.c: Ditto.
3064 2002-12-29 Paul Brook <paul@nowt.org>
3066 * trans-array.c: Document calling convention for arrays.
3068 2002-12-19 Paul Brook <paul@nowt.org>
3070 * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
3071 assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
3072 optional parameters for some intrinsics.
3073 (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
3074 * trans-expr.c (g95_conv_function_call): Pass NULL for absent
3075 optional parameters.
3076 * trans.h (g95_se): Add ignore_optional flag.
3078 2002-12-15 Paul Brook <paul@nowt.org>
3080 * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
3081 * trans-decl.c (g95_generate_function_code): Use TDI_original.
3083 2002-12-14 Paul Brook <paul@nowt.org>
3085 * trans-stmt.c (g95_trans_call): Use resolved symbol name.
3087 2002-12-12 Paul Brook <paul@nowt.org>
3089 * trans-array.c (g95_trans_array_constructor_subarray): Fully
3090 initialize the scalarizer.
3091 (various): Update to new format of g95_expr->value.constructor.
3093 2002-12-08 Paul Brook <paul@nowt.org>
3095 * trans-array.c (g95_put_offset_into_var): New function.
3096 (g95_trans_array_constructor_subarray): New function.
3097 (g95_trans_array_constructor_value): Use it.
3098 (g95_array_cons_size): Don't abort() on array components.
3100 2002-12-08 Paul Brook <paul@nowt.org>
3102 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
3103 * support.c: Update #includes.
3104 (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
3105 * trans-array.c: Update #includes.
3107 * trans-const.c: Ditto.
3108 * trans-io.c: Ditto.
3109 * trans-types.c: Ditto.
3110 (g95_init_types): Set size_type_node.
3111 * trans-decl.c: Update #includes.
3112 (gfor_fndecl_adjust{l,r}): Declare and initialize.
3113 * trans-stmt.c: Update #includes.
3114 (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
3115 (g95_trans_select): Fix check for unbounded ranges.
3116 * trans-expr.c: Update #includes.
3117 (g95_conv_string_tmp): New function.
3118 (g95_conv_concat_op): Use it.
3119 * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
3120 * Trans-intrisic.c: Update #includes.
3121 (g95_conv_intrinsic_strcmp): New function.
3122 (g95_conv_intrinsic_adjust): Ditto.
3123 (g95_conv_intrinsic_function: Use them.
3125 2002-11-30 Paul Brook <paul@nowt.org>
3127 * trans-array.c (g95_walk_function_expr): Handle non-array return by
3129 * trans-dec.c (g95_build_function_decl): Handle character return
3131 (g95_get_fake_result_decl): Ditto.
3132 (g95_trans_deferred_vars): Ditto.
3133 * trans-expr.c (g95_conv_function_call): Ditto.
3134 (g95_trans_arrayfunc_assign) Limit to array valued functions.
3135 * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
3136 (g95_conv_intrinsic_function): Use it.
3137 * trans-types.c (g95_sym_type): Handle functions returning strings.
3138 (g95_return_by_reference): Ditto.
3139 (g95_get_function_type): Ditto.
3141 2002-11-18 Paul Brook <paul@nowt.org>
3143 * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
3144 requires a temporary.
3145 (g95_trans_select): Handle computed gotos.
3146 * trans-types.c (g95_build_array_type): Warn about non-functional
3147 assumed shape arrays.
3148 * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
3150 * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
3151 (g95_conv_intrinsic_int): New function.
3152 (g95_conv_intrinsic_mod): New function.
3153 (g95_conv_intrinsic_ichar): New function.
3154 (g95_conv_intrinsic_function): Use them.
3155 (g95_conv_intrinsic_dim): Use g95_evaluate_now.
3157 2002-11-17 Toon Moene <toon@moene.indiv.nluug.nl>
3159 * trans-types.c (g95_build_array_type): Assumed
3160 sized arrays can have rank > 1.
3161 * trans.c (g95_trans_code): Remove erroneous
3162 warning about CONTINUE.
3163 * trans-expr.c (g95_conv_variable): Remove
3166 2002-11-15 Paul Brook <paul@nowt.org>
3168 * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
3170 2002-10-31 Paul Brook <paul@nowt.org>
3172 * f95-tree.c: Remove tree copying stuff that's now in gimple.c
3173 * trans-expr.c (g95_conv_component_ref): Handle character string
3175 (g95_conv_string_parameter): Ditto.
3176 * trans-types.c (g95_get_derived_type): Add length decl to caracter
3179 2002-10-10 Paul Brook <paul@nowt.org>
3181 * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
3182 * trans-expr.c (g95_conv_function_call): Remove unreliable return value
3184 * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
3185 (g95_conv_intrinsic_function): Handle size and shape intrinsics.
3186 (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
3187 * trans-types.c (pvoid_type_node): Declare and initialize.
3188 * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
3189 (g95_array_allocate): Fix when base==data.
3190 (g95_conv_array_parameter): Correctly handle reduced rank sections.
3191 * trans-io.c (g95_trans_write): Correctly handle string modifiers.
3193 2002-10-09 Paul Brook <paul@nowt.org>
3195 * (g95_conv_expr_reference): Handle character strings correctly.
3197 2002-10-07 Paul Brook <paul@nowt.org>
3199 (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
3201 * trans-array.c (g95_build_array_initializer): Remove.
3202 (g95_conv_array_initializer): New Function.
3203 (g95_trans_auto_arry_allocation): Cleanup.
3204 (g95_trans_init_character_array): Remove.
3205 * g95spec.c: Link in libgforbegin.
3206 * trans.c (g95_generate_code): Rename main function to MAIN__.
3207 (g95_create_var): New function.
3208 (g95_create_var_np): New function.
3209 (g95_evaluate_now): New function.
3210 (g95_start_block): New function.
3211 (g95_finish_block): New function.
3212 (g95_add_expr_to_block): New function.
3213 (g95_add_block_to_block): New function.
3214 * trans-expr.c (g95_conv_componen_ref): New function.
3215 * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
3216 (F95_OBJS): Add dependency.o.
3217 * f95-lang.c (g95_is_simple_stmt): Remove.
3218 * f95-tree.c (mark_not_simple): New function.
3219 (unshare_all_trees): New function.
3220 (create_tmp_var, create_tmp_alias_var): Remove.
3221 * support.c (declare_tmp_vars, tree_last_decl): Remove.
3222 * trans*: Convert to new IR using GENERIC trees. Don't bother about
3223 SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
3225 2002-10-01 Paul Brook <paul@nowt.org>
3227 * trans-array.c: Add support for descriptorless arrays.
3228 (g95_conv_array_data): New function.
3229 (g95_conv_array_base): New function.
3230 * trans-array.h: Declare these here.
3231 * trans-decl.c(g95_create_mopdule_variable): Perform variable
3232 initialization and creation here.
3233 (g95_create_module_vars): Instead of here.
3234 * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
3235 * trans-intrinsic.c: Ditto.
3236 * trans-types.c (g95_is_nodesc_array): New function.
3237 (g95_get_nodesc_array_type): New function.
3238 (g95_sym_type, g95_get_derived_type): Use them.
3239 * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
3241 2002-09-28 Paul Brook <paul@nowt.org>
3243 * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
3244 * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
3247 2002-09-24 Paul Brook <paul@nowt.org>
3249 * f95-lang.c (listify): Remove declaration.
3250 (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
3252 * f95-tree.c (get_name): New function.
3253 * trans.c (module_namespace): Remove.
3254 * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
3255 * trans-types.c: Ditto.
3257 2002-09-19 Paul Brook <paul@nowt.org>
3259 * trans-array.c (g95_get_array_cons_size): New Function.
3260 (g95_con_ss_startstride): Handle Array constructors.
3261 (g95_conv_loop_setup): Ditto.
3262 (g95_conv_array_parameter): Ditto.
3263 * tras-decl.c (g95_finish_var_decl): Make initializes variables
3266 2002-09-19 Paul Brook <paul@nowt.org>
3268 * trans.c (g95_simple_fold_tmp): Detect variables inside
3270 * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
3272 2002-09-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
3274 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
3276 2002-09-14 Paul Brook <paul@nowt.org>
3278 * trans.c (g95_create_module_variable): Move to trans-decl.c.
3279 * trans-const.c (g95_conv_string_init): New Function.
3280 * trans-const.h: Declare it.
3281 * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
3282 variables. Don't bail on intrinsic symbols.
3283 (get_extern_function_decl): Handle specific intrinsic functions.
3284 * trans-types.c (g95_sym_type): Dummy functions don't return
3286 * trans-array.c (g95_build_array_initializer): New Function.
3287 (g95_trans_auto_array_allocation): Build initializer for static decls.
3288 Don't use mpz_addmul, it's GMP4 only.
3290 2002-09-12 Paul Brook <paul@nowt.org>
3292 * trans-decl.c (g95_generate_code): Fix thinko with return variable.
3293 (g95_get_extern_function_decl, g95_build_function_decl): Mangle
3294 assembler names for module procedures.
3296 2002-09-11 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
3298 * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
3301 2002-09-10 Paul Brook <paul@nowt.org>
3303 * trans-array.c: Change format of G95_SS_TEMP strictures.
3304 (g95_check_fncall_dependancy): New function.
3305 (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
3307 * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
3309 (g95_build_function_decl): Don't assume result arrays are packed.
3310 (g95_trans-deferred-vars): Handle array result variables.
3311 (g95_generate_fuction_code): Clear saved_function_decls.
3312 * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
3314 (g95_trans_arrayfunc_assign): New function.
3315 (g95_trans_assignment): Use it.
3316 * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
3317 (g95_se): Add direct_byref.
3318 * trans-types.c: Use sym->result rather than sym where appropriate.
3319 * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
3320 Update other functions to use this.
3321 (g95_is_intrinsic_libcall): New function.
3322 (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
3323 (g95_walk_intrinsic_function): Ditto.
3325 2002-09-08 Paul Brook <paul@nowt.org>
3327 * trans-types.c: Change rank field to dtype field in array descriptor.
3328 * trans-array.c: Implement filling of dtype array descriptor field.
3329 * trans-intrinsic.c: Fix broken LEN intrinsic.
3331 2002-09-07 Paul Brook <paul@nowt.org>
3333 * trans-intrinsic.c: Remove outdated todo intrinsic list.
3334 (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
3335 (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
3337 2002-09-06 Paul Brook <paul@nowt.org>
3339 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
3340 (gt-f95-trans-types.h): Add dependancy information.
3341 * config-lang.in (gtfiles): Add trans-types.c
3342 * f95-lang.c (g95_be_parse_file): Pass error and warning counts
3343 back to top-level code.
3344 * trans-array.c, trans-types.c: Change format of array descriptor.
3345 (g95_conv_descriptor_dimension): New function.
3346 * trans-types.h (g95_conv_descriptor_rank): define.
3347 * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
3350 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
3352 * trans-array.c, trans-types.c: Add rank information to descriptor.
3354 2002-09-06 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
3356 * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
3358 2002-09-04 Paul Brook <paul@nowt.org>
3360 * f95-lang.c (g95_create_decls): New function.
3361 (g95_init): Move initialization of external decls to above, and call
3362 from g95_be_parse_file.
3363 * trans.c (g95_finish_stmt): Don't amputate the decl chain.
3364 * trans-types.c (g95_init_types): Always name integer and char types.
3365 (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
3367 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
3369 * Make-lang.in: Add options.c to F95_PARSER_OBJS
3371 2002-09-02 Paul Brook <paul@nowt.org>
3373 * g95_generate_code: Clear the attr for __fortran_main.
3374 * trans-types.c (g95_finish_type): New function.
3375 * g95_init_io_state_type: Use g95_finish_type.
3376 * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
3378 2002-09-01 Paul Brook <paul@nowt.org>
3380 * README.backend: Warn about the dangers of extra config.h files.
3381 Remove obsolete libgfor stuff.
3382 * config-lang.in: Add target-libgfor dependancy.
3383 * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
3385 2002-09-01 Toon Moene <toon@moene.indiv.nluug.nl>
3387 * g95_conv_mpz_to_tree: Free storage pointed to by q,
3390 2002-08-30 Paul Brook <paul@nowt.org>
3392 * trans-intrinsic.c (g95_conv_intrinsic_function,
3393 g95_walk_intrinsic_function): Added ANY and ALL.
3394 (g95_conv_intrinsic_anyall): New function.
3395 * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in