1 2004-05-30 Paul Brook <paul@codesourcery.com>
4 * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
5 * trans-expr.c (gfc_trans_string_copy): New function.
6 (gfc_conv_statement_function): Use them. Create temp vars. Enforce
8 (gfc_conv_string_parameter): Use gfc_trans_string_copy.
9 * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
10 * trans.h (struct gfc_saved_var): Define.
11 (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
13 2004-05-30 Steven G. Kargl <kargls@comcast.net>
15 * iresolve.c (gfc_resolve_random_number): Clean up conditional.
17 2004-05-29 Steven G. Kargl <kargls@comcast.net>
19 * simplify.c (gfc_simplify_log): Remove useless line of code.
21 2004-05-29 Paul Brook <paul@codesourcery.com>
23 * trans-common.c (find_equivalence): Find multiple rules.
25 2004-05-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
27 * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
28 (gfc_current_locus): Declare new global variable.
29 * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
30 (gfc_current_locus1): Rename ...
31 (gfc_current_locus): ... to this.
32 (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
33 skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
34 gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
35 gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
36 and gfc_current_locus(), respectively.
37 * array.c (match_subscript, gfc_match_array_ref, match_array_list,
38 match_array_cons_element, gfc_match_array_constructor):
39 Read/modify gfc_current_locus instead of calling gfc_set_locus()
40 and gfc_current_locus().
41 * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
42 match_attr_spec, gfc_match_function_decl, gfc_match_end,
43 attr_decl1, gfc_match_save): Likewise.
44 * error.c (error_print, gfc_internal_error): Likewise.
45 * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
46 * interface.c (gfc_add_interface): Likewise.
47 * io.c (gfc_match_format, match_dt_format, match_dt_element,
48 match_io_iterator, match_io): Likewise.
49 * match.c (gfc_match_space, gfc_match_eos,
50 gfc_match_small_literal_int, gfc_match_st_label,
51 gfc_match_strings, gfc_match_name, gfc_match_iterator,
52 gfc_match_char, gfc_match, gfc_match_assignment,
53 gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
54 gfc_match_nullify, gfc_match_call, match_implicit_range,
55 gfc_match_implicit, gfc_match_data, match_case_selector,
56 gfc_match_case, match_forall_iterator): Likewise.
57 * matchexp.c (gfc_match_defined_op_name, next_operator,
58 match_level_1, match_mult_operand, match_ext_mult_operand,
59 match_add_operand, match_ext_add_operand, match_level_2,
60 match_level_3, match_level_4, match_and_operand, match_or_operand,
61 match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
62 * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
63 * parse.c (match_word, decode_statement, next_free, next_fixed,
64 add_statement, verify_st_order, parse_if_block, gfc_parse_file):
66 * primary.c (match_digits, match_integer_constant,
67 match_boz_constant, match_real_constant, match_substring,
68 next_string_char, match_charkind_name, match_string_constant,
69 match_logical_constant, match_const_complex_part,
70 match_complex_constant, match_actual_arg, match_keyword_arg,
71 gfc_match_actual_arglist, gfc_match_structure_constructor,
72 gfc_match_rvalue, gfc_match_variable): Likewise.
73 * st.c (gfc_get_code): Likewise.
74 * symbol.c (check_conflict, check_used, check_done,
75 duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
76 gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
77 gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
79 2004-05-26 Roger Sayle <roger@eyesopen.com>
81 * io.c (format_asterisk): Silence compiler warnings by correcting
82 the number of elements of a "locus" initializer.
84 2004-05-25 Roger Sayle <roger@eyesopen.com>
87 * matchexp.c: Allow unary operators after arithmetic operators
89 (match_ext_mult_operand, match_ext_add_operand): New functions.
90 (match_mult_operand): Tweak to call match_ext_mult_operand.
91 (match_add_operand): Tweak to call match_ext_mult_operand.
92 (match_level_2): Rearrange to call match_ext_add_operand.
94 2004-05-25 Paul Brook <paul@codesourcery.com>
96 * expr.c (check_inquiry): Remove bogus tests.
98 2004-05-23 Paul Brook <paul@codesourcery.com>
101 * expr.c (restricted_args): Remove redundant checks/argument.
102 (external_spec_function): Update to match.
103 (restricted_intrinsic): Rewrite.
105 2004-05-23 Paul Brook <paul@codesourcery.com>
106 Victor Leikehman <lei@haifasphere.co.il>
108 * gfortran.h (struct gfc_symbol): Add equiv_built.
109 * trans-common.c: Change int to HOST_WIDE_INT. Capitalize error
111 (current_length): Remove.
112 (add_segments): New function.
113 (build_equiv_decl): Create initialized common blocks.
114 (build_common_decl): Always add decl to bindings.
115 (create_common): Create initializers.
116 (find_segment_info): Reformat to match coding conventions.
117 (new_condition): Use add_segments.
118 (add_condition, find_equivalence, add_equivalences): Move iteration
119 inside functions. Only process each segment once.
120 (new_segment, finish_equivalences, translate_common): Simplify.
122 2004-05-23 Steven G. Kargl <kargls@comcast.net>
124 * check.c (gfc_check_random_seed): Issue for too many arguments.
126 2004-05-22 Steven G. Kargl <kargls@comcast.net>
128 * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
130 2004-05-22 Paul Brook <paul@codesourcery.com>
132 * dump-parse-tree.c (gfc_show_equiv): New function.
133 (gfc_show_namespace): Use it.
135 2004-05-22 Victor Leikehman <lei@haifasphere.co.il>
138 * symbol.c (gfc_add_common): Disable checks to work around other more
139 fundamental inadequacies.
141 2004-05-22 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
143 * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
145 (gfc_build_function_decl): Likewise.
147 2004-05-22 Steven G. Kargl <kargls@comcast.net>
149 * check.c (gfc_check_system_clock): New function.
150 * intrinsic.c (add_sym_3s): New function.
151 (add_subroutines): Use it.
152 * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
154 * iresolve.c (gfc_resolve_system_clock): New function.
156 2004-05-22 Steven G. Kargl <kargls@comcast.net>
158 * invoke.texi: Document -Wunderflow and spell check.
159 * lang.opt: Add Wunderflow.
160 * gfortran.h (gfc_option_t): Add warn_underflow option.
161 * options.c (gfc_init_options, set_Wall): Use it.
162 * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
163 * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
164 gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
165 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
166 * arith.c (common_logarithm): Fix typo in comment.
168 2004-05-21 Roger Sayle <roger@eyesopen.com>
170 * io.c (check_format): As a GNU extension, allow the comma after a
171 string literal to be optional in a format. Use gfc_notify_std to
172 issue an error/warning as appropriate.
174 2004-05-21 Roger Sayle <roger@eyesopen.com>
176 * io.c (check_format): Use gfc_notify_std to determine whether to
177 issue an error/warning for omitting the digits from the X format.
179 2004-05-20 Roger Sayle <roger@eyesopen.com>
181 * io.c (check_format): Allow the number before the X format to
182 be optional when not -pedantic.
184 2004-05-18 Feng Wang <fengwang@nudt.edu.cn>
185 Paul Brook <paul@codesourcery.com>
187 * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
188 Create decls for __builtin_pow{,f}.
189 * gfortran.h (PREFIX_LEN): Define.
190 * trans-decl.c (gfor_fndecl_math_powi): Add.
191 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
192 (gfc_build_intrinsic_function_decls): Create decls for powi.
193 * trans-expr.c (powi_table): Add.
194 (gfc_conv_integer_power): Remove.
195 (gfc_conv_powi): New function.
196 (gfc_conv_cst_int_power): New function.
197 (gfc_conv_power_op): Use new powi routines.
198 * trans.h (struct gfc_powdecl_list): Add.
199 (gfor_fndecl_math_powi): Add.
200 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
202 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
204 * trans.c, trans-decl.c: Fix comment typos.
206 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
208 * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
210 2004-05-18 Steve Kargl <kargls@comcast.net>
212 * arith.c (gfc_int2complex): Fix incorrect range checking.
214 2004-05-18 Paul Brook <paul@codesourcery.com>
217 * decl.c (add_init_expr_to_sym): Remove incorrect check.
218 (default_initializer): Move to expr.c.
219 (variable_decl): Don't assign default initializer to variables.
220 * expr.c (gfc_default_initializer): Move to here.
221 * gfortran.h (gfc_default_initializer): Add prototype.
222 * resolve.c (resolve_symbol): Check for illegal initializers.
223 Assign default initializer.
225 2004-05-17 Steve Kargl <kargls@comcast.net>
227 * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
229 2004-05-17 Steve Kargl <kargls@comcast.net>
231 * arith.c (gfc_real2complex): Range checking wrong part of complex
234 2004-05-16 Paul Brook <paul@codesourcery.com>
236 * options.c (gfc_handle_module_path_options): Fix buffer overrun.
238 2004-05-16 Paul Brook <paul@codesourcery.com>
240 * arith.c (gfc_range_check): Fix logic error.
242 2004-05-16 Steve Kargl <sgk@troutmask.apl.washington.edu>
244 * arith.c: Fix comment typos.
246 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
249 * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
250 not initialized in a disallowed fashion.
251 * match.c (gfc_match_common): Likewise.
252 (var_element): Verify that variable is not in the blank COMMON,
253 if it is in a common.
255 2004-05-15 Joseph S. Myers <jsm@polyomino.org.uk>
257 * Make-lang.in (f95.generated-manpages): Remove.
259 (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
260 f95.maintainer-clean): Generate info and dvi files in objdir/doc.
263 (f95.install-info): Remove.
266 2004-05-15 Victor Leikehman <lei@haifasphere.co.il>
268 * decl.c (add_init_expr_to_sym): Check for variable size arrays.
270 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
272 * primary.c (match_boz_constant): Use gfc_notify_std() for
273 issuing a warning or an error.
275 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
278 * primary.c (match_structure_constructor): Rename ...
279 (gfc_match_structure_constructor): ... to this. Make non-static.
280 (gfc_match_rvalue): Call renamed function.
281 * match.h (gfc_match_structure_constructor): Declare.
282 * match.c (gfc_match_data_constant): Handle structure
285 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
289 * gfortran.h (gfc_linebuf): New typedef.
291 (gfc_file): Revamped, use new gfc_linebuf.
292 (locus): Revamped, use new types.
293 (gfc_current_file): Remove.
294 (gfc_current_form, gfc_source_file): New global variables.
295 * match.c (gfc_match_space, gfc_match_strings): Use
296 gfc_current_form to find source form.
297 * module.c (gfc_dump_module): Use gfc_source_file when printing
299 * error.c (show_locus, show_loci) Use new data structures to print
301 * scanner.c (first_file, first_duplicated_file, gfc_current_file):
303 (file_head, current_file, gfc_current_form, line_head, line_tail,
304 gfc_current_locus1, gfc_source_file): New global variables.
305 (gfc_scanner_init1): Set new global variables.
306 (gfc_scanner_done1): Free new data structures.
307 (gfc_current_locus): Return pointer to gfc_current_locus1.
308 (gfc_set_locus): Set gfc_current_locus1.
309 (gfc_at_eof): Set new variables.
310 (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
311 to new locus structure.
312 (gfc_check_include): Remove.
313 (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
314 (gfc_skip_comments): Use gfc_current_form, find locus with
316 (gfc_next_char): Use gfc_current_form.
317 (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
318 (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
320 (get_file): New function.
321 (preprocessor_line, include_line): New functions.
322 (load_file): Move down, rewrite to match new data structures.
323 (gfc_new_file): Rewrite to match new data structures.
324 * parse.c (next_statement): Remove code which is now useless. Use
325 gfc_source_form and gfc_source_file where appropriate.
326 * trans-decl.c (gfc_get_label_decl): adapt to new data structures
327 when determining locus of frontend code.
328 * trans-io.c (set_error_locus): Same.
329 * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
330 * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
332 (all): Add missing initializers.
334 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
336 * Make-lang.in (trans-common.o): Remove redundant dependency.
337 (data.c): Replace object file name ...
338 (data.o): ... by the correct one.
340 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
342 * dump-parse-tree.c (gfc_show_array_ref): Print colon only
343 for ranges when dumping array references.
345 2004-05-14 Victor Leikehman <lei@haifasphere.co.il>
347 * decl.c (variable_decl): Always apply default initializer.
349 2004-05-08 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
352 * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
353 handle zero correctly.
355 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
357 * match.c (gfc_match): Eliminate dead code.
359 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
361 * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
362 Detect bad continuation line in fixed form sources.
364 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
367 * iresolve.c (gfc_resolve_nearest): Add new function.
368 * intrinsic.h: ... declare it here.
369 * intrinsic.c (add_functions): ... add it as resolving function
372 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
375 * match.c (gfc_match_do): Allow infinite loops with
376 label-do-stmt. Do not enforce space after comma.
378 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
381 * parse.c (parse_interface): Allow empty INTERFACE, remove
384 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
386 * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
387 decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
388 expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
389 intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
390 matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
391 primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
392 trans-array.c, trans-array.h, trans-common.c, trans-const.c,
393 trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
394 trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
395 trans-types.h, trans.c, trans.h: Update copyright years and
397 * data.c: Likewise, also removed two whitespace-only lines.
398 * gfortranspec.c, lang.opt: Update copyright years.
400 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
403 * trans-decl.c (generate_local_decl): Don't warn for unused
404 variables which are in common blocks.
406 2004-05-13 Diego Novillo <dnovillo@redhat.com>
408 * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
409 trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
410 trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
412 2004-05-13 Victor Leikehman <lei@haifasphere.co.il>
415 * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
417 2004-05-13 Joseph S. Myers <jsm@polyomino.org.uk>
419 * gfortran.texi: Use @table @emph instead of @itemize @emph.
420 Remove "set DEVELOPMENT".
421 (Compiling GFORTRAN): Remove.
423 2004-05-09 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
425 * array.c (match_subscript, match_array_ref): Add comments
426 explaining argument 'init'.
427 * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
428 trans-expr.c, trans.c: Fix some typos in comments.
429 * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
430 * primary.c (match_digits, match_integer_constant): Add comment
433 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
436 * primary.c: Include system.h and flags.h, needed for pedantic.
437 (match_boz_constant): Allow "x" for hexadecimal constants, warn if
440 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
443 * match.c (match_data_constant): Handle case where
444 gfc_find_symbol sets sym to NULL
446 2004-04-28 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
448 * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
449 dependency on mathbuiltins.def
451 2004-04-24 Victor Leikehman <lei@il.ibm.com>
453 * trans-io.c (transfer_expr): Implemented recursive printing
456 2004-04-24 Andrew Pinski <pinskia@physics.uc.edu>
458 * gfortranspec.c: Do not include multilib.h.
460 2004-04-24 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
462 * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
463 2004 to copyright years.
464 * trans-expr.c, trans-decl.c: Comment update, we now generate
465 GENERIC, not SIMPLE. Add 2004 to copyright years.
467 2004-04-24 Paul Brook <paul@codesourcery.com>
469 * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
471 2004-04-24 Feng Wang <fengwang@nudt.edu.cn>
474 * arith.c (gfc_arith_divide): Fix complex divide.
476 2004-04-23 Andrew Pinski <pinskia@physics.uc.edu>
478 * gfortranspec.c: Include the target headers.
480 2004-04-18 Feng Wang <fengwang@nudt.edu.cn>
484 * arith.c (arctangent2): New function.
485 * arith.h (arctangent2): Add function prototype.
486 * simplify.c (gfc_simplify_atan2): Use it.
487 (gfc_simplify_log): Use it.
489 2004-04-12 Diego Novillo <dnovillo@redhat.com>
491 * fortran/f95-lang.c (gfc_expand_stmt): Remove.
492 (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
494 2004-04-11 Bud Davis <bdavis9659@comcast.net>
497 * trans-io.c (build_dt): Change REC to value.
499 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
502 * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
503 the real value when converting mpf to string.
505 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
508 * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
511 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
514 * simplify.c (simplify_min_max): Convert the type of the result.
516 2004-04-11 Paul Brook <paul@codesourcery.com>
518 * gfortran.texi: Use full target triplet.
520 2004-04-11 Paul Brook <paul@codesourcery.com>
522 * Make-lang.in (GFORTRAN_TEXI): Set it.
523 (fortran/dfortran.dvi): Use it. Add fortran to include paths.
524 (fortran/gfortran.info): Ditto.
525 * gfortran.texi: Major update.
526 * invoke.texi: New file.
528 2004-04-10 Paul Brook <paul@codesourcery.com>
530 * trans-array.c (gfc_trans_allocate_temp_array,
531 gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
532 * trans-decl.c (gfc_build_dummy_array_decl,
533 gfc_get_symbol_decl, gfc_build_function_decl,
534 gfc_create_module_variable): Ditto.
535 * trans-expr.c (gfc_conv_variable): Ditto.
536 * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
537 * trans.h (GFC_DECL_STRING): Remove.
538 (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
539 GFC_DECL_ASSIGN): Renumber flags.
541 2004-04-05 Paul Brook <paul@codesourcery.com>
545 * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
547 * gfortran.h (struct gfc_charlen): Add backend_decl.
548 * trans-array.c (gfc_trans_allocate_temp_array,
549 gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
550 (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
551 Remove old, broken string handling.
552 (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
553 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
554 gfc_trans_deferred_array): Handle character arrays.
555 * trans-const.c (gfc_conv_const_charlen): New function.
556 * trans-const.h (gfc_conv_const_charlen): Add prototype.
557 * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
559 (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
560 (gfc_create_string_length): New function.
561 (gfc_get_symbol_decl): Create lengths for character variables.
562 (gfc_get_fake_result_decl): Ditto.
563 (gfc_build_function_decl): Only set length for assumed length
565 (gfc_trans_dummy_character): New function.
566 (gfc_trans_auto_character_variable): Rewrite.
567 (gfc_trans_deferred_vars): Handle more types of character variable.
568 (gfc_create_module_variable): String lengths have moved.
569 (gfc_generate_function_code): Initialize deferred var chain earlier.
570 * trans-expr.c (gfc_conv_init_string_length): Rename ...
571 (gfc_trans_init_string_length): ... to this.
572 (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
573 gfc_conv_function_call): Update to new format for character variables.
574 (gfc_conv_string_length): Remove.
575 (gfc_conv_string_parameter): Update assertion.
576 * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
577 * trans-io.c (set_string): Use new macro names.
578 * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
579 * trans-types.c (gfc_get_character_type): Use existing length expr.
580 (gfc_is_nodesc_array): Make public.
581 (gfc_get_dtype_cst): Rename ...
582 (gfc_get_dtype): ... to this. Handle unknown size arrays.
583 (gfc_get_nodesc_array_type): Use new name.
584 (gfc_sym_type): New character variable code.
585 (gfc_get_derived_type): Ditto.
586 (gfc_get_function_type): Evaluate character variable lengths.
587 * trans-types.h (gfc_strlen_kind): Define.
588 (gfc_is_nodesc_array): Add prototype.
589 * trans.h: Update prototypes.
590 (struct lang_type): Update comments.
591 (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
592 (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
594 2004-04-04 Paul Brook <paul@codesourcery.com>
596 * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
597 * options.c (gfc_init.options, gfc_handle_option): Ditto.
598 * trans-expr.c (gfc_conv_function_call): Ditto.
599 * trans-types.c (gfc_is_nodesc_array): Ditto
600 * lang.opt (fg77-calls): Remove.
602 2004-04-04 Paul Brook <paul@codesourcery.com>
604 * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
605 (gfc_conv_descriptor_base): Rename ...
606 (gfc_conv_descriptor_offset): ... to this.
607 (gfc_trans_allocate_array_storage): Set offset to zero.
608 (gfc_conv_array_base): Rename ...
609 (gfc_conv_array_offset): ... to this.
610 (gfc_conv_array_index_ref): Add offset parameter.
611 (gfc_conv_array_ref): Include offset.
612 (gfc_trans_preloop_setup): Use existing offset.
613 (gfc_trans_allocate_temp_array, gfc_array_allocate,
614 gfc_trans_auto_array_allocation, gfc_trans_g77_array,
615 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
616 gfc_conf_ss_descriptor): Set offset.
617 * trans-array.h: Rename prototypes.
618 * trans-const.h (gfc_index_zero_node): Define.
619 * trans-decl.c (gfc_build_qualified_array): Change base to offset.
620 * trans-types.c (gfc_get_array_type_bounds): Ditto.
621 (gfc_get_nodesc_array_type): Calculate offset before upper bound.
623 2004-03-25 Diego Novillo <dnovillo@redhat.com>
625 * convert.c (convert): Don't handle WITH_RECORD_EXPR.
627 2004-03-24 Bud Davis <bdavis9659@comcast.net>
630 * arith.c (gfc_convert_integer,gfc_convert_real): Removed leading '+'
631 before conversion by gmp library call.
633 2004-03-24 Bud Davis <bdavis9659@comcast.net>
636 * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
638 2004-02-24 Richard Henderson <rth@redhat.com>
640 * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
642 2004-02-19 Loren J. Rittle <ljrittle@acm.org>
644 * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
645 (fortran/gfortran.info): ... to here.
648 2004-02-16 Richard Henderson <rth@redhat.com>
650 * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
651 * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
652 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
653 (gfc_expand_function): Rename from expand_function_body, make static,
654 don't do anything except invoke tree_rest_of_compilation.
655 (gfc_be_parse_file): Invoke cgraph.
656 (gfc_expand_decl): Remove.
657 (gfc_init_builtin_functions): Add __builtin_init_trampoline and
658 __builtin_adjust_trampoline.
659 * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
661 (gfc_generate_function_code): Use it. Lower nested functions.
662 * trans-expr.c (gfc_conv_function_call): Add static chain operand
664 * trans.c (gfc_build_function_call): Likewise.
665 * trans.h (expand_function_body): Remove.
667 2004-02-15 Victor Leikehman <lei@il.ibm.com>
670 * trans-decl.c (gfc_build_function_decl) For functions
671 returning CHARACTER pass an extra length argument,
672 following g77 calling conventions.
673 * trans-types.c (gfc_get_function_type) Ditto.
674 * trans-expr.c (gfc_conv_function_call) Ditto.
676 2004-02-14 Paul Brook <paul@codesourcery.com>
678 * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
680 2004-02-12 Paul Brook <paul@nowt.org>
684 2004-02-08 Steve Kargl <sgk@troutmask.apl.washington.edu>
686 * gfortran.texi: Fix typos.
688 2004-02-07 Bud Davis <bdavis9659@comcast.net>
691 * intrinsic.c (add_conversions) Use logical conversion instead
693 * trans-types.c (gfc_get_logical_type) implemented logical*1
696 2004-01-17 Paul Brook <paul@codesourcery.com>
698 * lang-specs.h: Remove %<fixed-form.
700 2004-01-15 Toon Moene <toon@moene.indiv.nluug.nl>
702 * lang-specs.h: Enable preprocessing of source files
703 ending in .F, .fpp, .FPP, .F90 and .F95.
705 2004-01-13 Toon Moene <toon@moene.indiv.nluug.nl>
708 * lang-specs.h: Enable compilation of files ending
709 in .f, .for and .FOR.
711 2004-01-11 Paul Brook <paul@codesourcery.com>
713 * trans-stmt.c (gfc_trans_if_1): New function.
714 (gfc_trans_if): Use it.
716 2004-01-11 Erik Schnetter <schnetter@uni-tuebingen.de>
718 * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
719 (gfc_option_t): Add max_identifier_length.
720 * lang.opt: Add fmax-identifier-length.
721 * match.c (parse_name): Use limit.
722 * options.c (gfc_init_options): Set max_identifier_length.
723 (gfc_handle_option): Ditto.
725 2004-01-11 Feng Wang <fengwang@nudt.edu.cn>
727 * intrinsic.c (add_functions): Add resolve function to dcmplx.
728 * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
729 * iresolve.c (gfc_resolve_dcmplx): New function.
731 2004-01-10 Paul Brook <paul@codesourcery.com>
733 * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
734 * trans-types.c (gfc_sym_type): Handle external dummy procedures.
735 (gfc_return_by_reference): Correct condition.
736 (gfc_get_function_type): Ditto.
738 2004-01-10 Paul Brook <paul@codesourcery.com>
740 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
743 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
745 * iresolve.c: Use correct kind.
747 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
750 * trans-decl.c (gfc_create_module_variable): Output array valued
753 2004-01-10 Paul Brook <paul@codesourcery.com>
755 * resolve.c (resolve_branch): Get error message right way round.
757 2004-01-10 Canqun Yang <canqun@nudt.edu.cn>
759 * trans-array (gfc_conv_loop_setup): Adjust comment to track
761 (gfc_array_allocate): Don't count size of element twice.
763 2004-01-04 Paul Brook <paul@codesourcery.com>
765 * lang.opt (i8, r8, std=*): Remove RejectNegative.
767 2004-01-04 Paul Brook <paul@codesourcery.com>
769 * error.c (gfc_notify_std): New function.
770 * gfortran.h (gfc_notify_std): Declare.
772 (gfc_option_t): Add warn_std and allow_std.
773 * intrinsic.c (gfc_init_expr_extensions): Fix logic.
774 (gfc_intrinsic_func_interface): Use gfc_notify_std.
775 * check.c (check_rest): Use gfc_notify_std.
776 * match.c (gfc_match_pause): Ditto.
777 (gfc_match_assign): Ditto.
778 (gfc_match_goto): Ditto.
779 * resolve.c (resolve_branch): Ditto.
780 * lang.opt: Add std=<foo> and w.
781 * options.c (gfc_init_options): Set allow_std and warn_std.
782 (gfc_handle_option): Handle OPT_std_* and OPT_w.
784 2004-01-01 Paul Brook <paul@codesourcery.com>
786 * array.c (gfc_append_constructor): Take constructor, not expression.
787 * data.c (struct gfc_expr_stack): Remove.
788 (expr_stack): Remove.
789 (find_con_by_offset): Rename from find_expr_in_con.
790 (find_con_by_component): Rename from find_component_in_con.
791 (gfc_get_expr_stack): Remove.
792 (gfc_assign_data_value): Rewrite.
793 (gfc_expr_push): Remove.
794 (gfc_expr_pop): Remove.
795 (gfc_advance_section): Rename from
796 gfc_modify_index_and_calculate_offset. Handle unbounded sections.
797 (gfc_get_section_index): Handle unbounded sections.
798 * gfortran.h: Update prototypes.
799 * resolve.c (check_data_variable): Array section maight not be the
802 2004-01-01 Paul Brook <paul@codesourcery.com>
805 * resolve.c (resolve_symbol): Allow assumed length function results.
807 2004-01-01 Steve Kargl <sgk@troutmask.apl.washington.edu>
809 * match.c (gfc_match_pause): Fix spelling.
811 2004-01-01 Steven Bosscher <stevenb@suse.de>
814 * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
815 reference from the expression.
817 2003-12-26 Feng Wang <fengwang@nudt.edu.cn>
819 * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
821 * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
822 (gfc_exec_op): New EXEC_LABEL_ASSIGN.
823 (symbol_attribute):New variable attribute: assign.
824 * io.c (resolve_tag):Integer variable is allowed.
825 (match_dt_format): Add ASSIGN statement. Set assign flag.
826 * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
827 (gfc_match_assign): Add ASSIGN statement. Set assign flag.
828 (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
829 * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
830 (next_statement): Add ST_LABEL_ASSIGNMENT.
831 (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
832 * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
833 (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
834 * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
835 * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
836 assign. Put them into the stuct lang_decl.
837 * trans-io.c (set_string): Add the assign statement.
838 * trans-stmt.c (gfc_trans_label_assign): New function.
839 (gfc_trans_goto): Translate ASSIGNED GOTO statement.
840 * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
841 * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
842 * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
843 (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
844 (GFC_DECL_ASSIGN(node)): New macro to access flag.
846 2003-12-31 Huang Chun <chunhuang73@hotmail.com>
849 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
852 2003-12-22 Toon Moene <toon@moene.indiv.nluug.nl>
854 * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
855 that arguments to subroutines/functions can't alias themselves, nor global
858 2003-12-20 Steven Bosscher <stevenb@suse.de>
860 * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
861 * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
863 2003-12-12 Huang Chun <chunhuang73@hotmail.com>
865 * primary.c (match_substring): Fix substring bug for start point
866 or end point is NULL.
867 * trans-expr.c (gfc_conv_substring): Ditto
868 * trans-types.c (gfc_sym_type): Get correct type of scalar
870 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
873 2003-12-10 Richard Henderson <rth@redhat.com>
875 * options.c (gfc_post_options): Don't ever use rtl inlining.
877 2003-12-05 Canqun Yang <canqun@nudt.edu.cn>
879 * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
880 * trans-equivalence.c: Remove.
881 * trans-decl.c (gfc_get_symbol_decl): Update to match.
882 (gfc_generate_function_code): Ditto.
883 * trans-array.c (gfc_conv_array_parameter): Ditto.
884 * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
885 (F95_ADDITIONAL_OBJS): Add stor-layout.o
886 * trans.h (gfc_trans_equivalence): Remove.
887 * gfortran.h (struct gfc_equiv): Add used field.
888 (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
891 2003-12-05 Richard Henderson <rth@redhat.com>
893 * trans.c (gfc_build_addr_expr): New.
894 (gfc_build_indirect_ref, gfc_build_array_ref): New.
895 * trans.h: Declare them.
896 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
897 trans-stmt.c, trans.c (*): Use them.
899 * f95-lang.c (gfc_post_options): Remove dead prototype.
900 * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
901 * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
904 2003-12-01 Feng Wang <fengwang@nudt.edu.cn>
906 * io.c (gfc_match_format): Check for missing format label.
908 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
911 * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
912 from interfaces in modules.
914 2003-11-30 Paul Brook <paul@nowt.org>
916 * trans-array.c (gfc_trans_g77_array): Make non-static.
917 (gfc_trans_assumed_size): Remove.
918 (gfc_trans_dummy_array_bias): Explicitly free temporary.
919 * trans-array.h (gfc_trans_g77_array): Add prototype.
920 (gfc_trans_assumed_size): Remove.
921 * trans-decls.c (gfor_fndecl_push_context): Remove.
922 (gfor_fndecl_pop_context): Remove.
923 (gfc_build_function)decls): Don't create them.
924 (gfc_trans_deferred_vars): Update to match. Remove dead code.
925 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
927 2003-11-30 Kejia Zhao <kejia_zh@nudt.edu.cn>
929 * trans-array.c (gfc_conv_array_parameter): Simplify
930 array argument passing for array name actual argument.
931 * trans-expr.c (gfc_conv_function_call): Ditto
932 * trans-types.c (gfc_is_nodesc_array):Ditto.
934 2003-11-30 Paul Brook <paul@nowt.org>
936 * f95-lang.c (gfc_post_options): Move ...
937 * options.c (gfc_post_options): .. to here. Handle inlining options.
938 * gfortran.h (gfc_post_options): Add prototype.
940 2003-11-28 Richard Henderson <rth@redhat.com>
942 * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
944 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
946 * trans.h (has_alternate_specifier): New global variable.
947 * match.c (gfc_match_call): Handle actual arguments associated with
948 alternate return indicators.
949 * trans-expr.c (gfc_conv_function_call): Ditto
950 * trans-stmt.c (gfc_trans_call): Ditto
951 (gfc_trans_return): Handle return statement with value.
952 * trans-decl.c (gfc_generate_function_code): Handle functions with
954 (gfc_get_fake_result_decl): Ditto
955 * trans-types.c (gfc_get_function_type): Ditto
956 * resolve.c (resolve_actual_arglist): Check alternate return indicators.
957 (resolve_formal_arglist): Check asterisk dummy.
959 2003-11-27 Paul Brook <paul@nowt.org>
961 * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
962 allocation interface.
963 (gfc_conv_ array_parameter): Ditto.
964 (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
965 * trans-array.c: Update prototype.
966 * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
967 (gfc_trans_auto_character_variable): Use new memory alloc interface.
968 * trans-expr.c (gfc_conv_string_tmp): Ditto.
969 (gfc_conv_function_call): Use gfc_conv_string_tmp.
970 * trans-stmt.c (gfc_do_allocate): Use new memory alloc interface.
971 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
972 * trans.h (gfc_ss_info): Remove unused pdata field.
973 * trans.c (gfc_create_var_np): Change T to V.
975 2003-11-26 Richard Henderson <rth@redhat.com>
977 * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
978 * trans-intrinsic.c (gfc_intrinsic_map): ... here. Add SCALE,
979 FRACTION, NEAREST, SET_EXPONENT.
980 (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
981 Fix GTY marking. Remove unnecessary const's.
982 (LIBM_FUNCTION): Rename from I_LIB.
983 (LIBF_FUNCTION): New.
984 (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
985 conventions. Assume the expr signature is correct. Mark const.
986 (gfc_conv_intrinsic_exponent): Use library functions.
987 (gfc_conv_intrinsic_set_exponent): Remove.
988 (gfc_conv_intrinsic_scale): Remove.
989 (gfc_conv_intrinsic_nearest): Remove.
990 (gfc_conv_intrinsic_fraction): Remove.
991 (gfc_conv_intrinsic_function): Update.
992 * trans-decl.c (gfor_fndecl_math_exponent4): New.
993 (gfor_fndecl_math_exponent8): New.
994 (gfc_build_intrinsic_function_decls): Set them.
995 * trans.h: Declare them.
997 2003-11-25 Canqun Yang <canqun@nudt.edu.cn>
999 * trans-common.c (gfc_layout_global_equiv): Locate the error for
1000 underflow COMMON block.
1001 (gfc_trans_one_common): Fix bug for size of COMMON block containing
1002 EQUIVALENCE object. Also fix typo in an error message.
1004 2003-11-25 Diego Novillo <dnovillo@redhat.com>
1006 * Make-lang.in: Add check-gfortran to lang_checks.
1007 (check-f95): Alias for check-gfortran.
1009 2003-11-25 Jason Merrill <jason@redhat.com>
1011 * Make-lang.in (f95.tags): Create TAGS.sub files in each
1012 directory and TAGS files that include them for each front end.
1014 2003-11-24 Paul Brook <paul@nowt.org>
1017 * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
1019 2003-11-24 Paul Brook <paul@nowt.org>
1021 * expr.c (simplify_const_ref): Return SUCCESS for things we don't
1023 * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
1025 2003-11-24 Paul Brook <paul@nowt.org>
1028 * array.c (gfc_array_ref_shape): Handle elemental dimensions.
1029 * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
1031 2003-11-20 Richard Henderson <rth@redhat.com>
1033 * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
1034 (gfc_conv_array_base): Likewise.
1035 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
1036 * trans-expr.c (gfc_conv_string_tmp): Likewise.
1037 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
1038 * trans-stmt.c (gfc_trans_character_select): Likewise.
1040 2003-11-13 Paul Brook <paul@nowt.org>
1042 * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
1044 2003-11-13 Canqun Yang <canqun@nudt.edu.cn>
1046 * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
1047 (resolve_equivalence): New function.
1048 (resolve_equivalence_derived): New function.
1050 2003-11-12 Richard Henderson <rth@redhat.com>
1052 * trans.c (gfc_trans_code): Use annotate_with_locus instead of
1053 annotate_all_with_locus.
1055 2003-11-11 Canqun Yang <canqun@nudt.edu.cn>
1057 * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
1058 * trans-decl.c (gfc_finish_var_decl): Modified.
1060 2003-11-08 Paul Brook <paul@nowt.org>
1063 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
1066 2003-11-06 Paul Brook <paul@nowt.org>
1068 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
1070 2003-11-02 Canqun Yang <canqun@nudt.edu.cn>
1072 * match.c (gfc_match_stopcode): Assign '0' to stop_code.
1074 2003-10-27 Anthony Green <green@redhat.com>
1076 * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
1077 (f95.stagefeedback): Ditto.
1079 2003-10-27 Andrew Pinski <pinskia@physics.uc.edu>
1082 * Make-lang.in (f95.stageprofile): Add.
1083 (f95.stagefeedback): Add.
1085 2003-10-23 Richard Henderson <rth@redhat.com>
1087 * f96-lang.c (gfc_gimplify_expr): Remove.
1088 (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
1089 (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
1091 2003-10-23 Richard Henderson <rth@redhat.com>
1093 * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
1095 2003-10-20 Paul Brook <paul@nowt.org>
1097 * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
1098 * trans-stmt.c (gfc_trans_do_while): Ditto.
1100 2003-10-17 Paul Brook <paul@nowt.org>
1102 * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
1104 2003-10-17 Paul Brook <paul@nowt.org>
1106 * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
1108 2003-10-17 Feng Wang <wf_cs@yahoo.com>
1110 * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
1111 (gfc_resolve_minloc): Ditto.
1112 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
1113 Return the value after subtracting the lower bound.
1115 2003-10-16 Richard Henderson <rth@redhat.com>
1117 * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
1119 2003-10-16 Steven Bosscher <steven@gcc.gnu.org>
1121 * lang.c: Remove -M option for now, it's in the way for C.
1123 2003-10-14 Jason Merrill <jason@redhat.com>
1125 * Make-lang.in (f95.tags): New rule.
1127 2003-10-13 Richard Henderson <rth@redhat.com>
1129 * trans.c (gfc_trans_code): Use annotate_all_with_locus.
1131 2003-10-13 Paul Brook <paul@nowt.org>
1133 * trans-decl.c (generate_local_decl): Don't create junk variables.
1135 2003-10-13 Paul Brook <paul@nowt.org>
1137 * resolve.c (resolve_formal_arglist): Use function result decl in
1138 preference to function decl.
1140 2003-10-12 Richard Henderson <rth@redhat.com>
1142 * f95-lang.c (gfc_define_builtin): New const_p argument. Set
1143 TREE_READONLY. Update all callers.
1145 2003-10-12 Feng Wang <wf_cs@yahoo.com>
1147 * iresolve.c (gfc_resolve_cshift): Change to match implementation.
1148 * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
1149 (gfc_is_intrinsic_libcall): Add CSHIFT.
1151 2003-10-12 Richard Henderson <rth@redhat.com>
1153 * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
1154 (gfc_trans_array_constructor_value): Likewise.
1155 (gfc_conv_array_initializer): Likewise.
1156 * trans-stmt.c (gfc_trans_character_select): Likewise.
1158 2003-11-12 Kejia Zhao <kejia_zh@yahoo.com.cn>
1160 * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
1162 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
1164 * check.c (gfc_check_repeat): Check arguments are scalar.
1165 (gfc_check_trim): New function.
1166 * intrinsic.h (gfc_check_trim): Add prototype.
1167 * intrinsic.c (add_functions): Use it.
1168 * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
1170 * trans-decl.c: Ditto.
1171 (gfc_build_intrinsic_fucntion_decls): Set them.
1172 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
1173 (gfc_conv_intrinsic_trim): New function.
1174 (gfc_conv_intrinsic_repeat): New function.
1175 (gfc_conv_intrinsic_function): Use them.
1177 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
1179 * trans-types.c (gfc_sym_type): Handle result variables.
1181 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
1183 * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
1184 gfc_get_character_type.
1186 2003-10-11 Feng Wang <wf_cs@yahoo.com>
1188 * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
1190 2003-10-11 Paul Brook <paul@nowt.org>
1192 * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
1193 (gfc_resolve_dprod): New function.
1194 (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
1195 * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
1196 (gfc_resolve_dprod): Declare.
1197 * intrinsic.c (add_functions): Use them.
1198 * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
1200 2003-10-06 Richard Henderson <rth@redhat.com>
1202 * f95-lang.c (gfc_init_builtin_functions): Add clzll.
1203 * trans-intrinsic.c (call_builtin_clz): Use it.
1205 2003-10-05 Paul Brook <paul@nowt.org>
1207 * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
1208 * trans-decl.c (gfc_generate_function_code): Set
1209 cfun->function_end_locus.
1211 2003-09-24 Jason Merrill <jason@redhat.com>
1213 * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
1216 2003-09-21 Lifang Zeng <zlf605@hotmail.com>
1217 Paul Brook <paul@nowt.org>
1219 * Make-lang.in (F95_OBJS): Add fortran/data.o.
1220 * array.c (gfc_inser_constructor): New function.
1221 (gfc_get_constructor): New function.
1222 (gfc_free_constructor): Initialize offset and repeat.
1223 (iterator_stack): Remove.
1224 (expand_info): Add offset, component and repeat fields.
1225 (expand_constructor): Set them.
1226 (expand): Set new fields.
1227 (gfc_copy_constructor): Ditto. Avoid recursion.
1228 * gfortran.h: Add prototypes for new functions.
1229 (gfc_constructor): Add offset, component and repeat.
1230 (iteratio_stack): Move to here.
1231 * resolve.c (check_data_variable): Convert data values into variable
1233 (traverse_data_list): Build implicit loop chain.
1234 (gfc_resolve): Ditto.
1235 * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
1236 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
1237 * trans-expr.c (gfc_conv_structure): Handle array initializers.
1238 (gfc_conv_expr): Update to match.
1239 * trans.h (gfc_conv_structure): Declare.
1242 2003-09-20 Kejia Zhao <kejia_zh@yahoo.com.cn>
1244 * trans.h: Add declarations for gfor_fndecl_si_kind and
1245 gfor_fndecl_sr_kind.
1246 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
1247 * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
1248 (g95_conv_intrinsic_sr_kind): New function.
1249 (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
1252 2003-09-17 Lars Segerlund <Lars.Segerlund@comsys.se>
1254 * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
1255 instead of _4 and _8 as postfix for libgfortran calls.
1257 2003-09-16 Paul Brook <paul@nowt.org>
1259 * array.c (compare_bounds): New function.
1260 (gfc_compare_array_spec): Use it.
1262 2003-09-14 Paul Brook <paul@nowt.org>
1264 * primary.c (gfc_match_rvalue): Make sure sym->result is set.
1265 * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
1267 2003-09-14 Paul Brook <paul@nowt.org>
1269 * check.c (dim_rank_check): Allow assumed bounds if requested.
1270 (gfc_check_lbound): Call it.
1271 (gfc_check_ubound): Ditto.
1272 (gfc_check_size): Change to match.
1273 * simplify.c (gfc_simplify_bound): New function.
1274 (gfc_simplify_lbound): New function.
1275 (gfc_simplify_ubound): New function.
1276 * intrinsic.h: Declare them.
1277 * intrinsic.c (add_functions): Use them.
1279 2003-09-14 Paul Brook <paul@nowt.org>
1281 * io.c (format_lex): Initialize negative_flag.
1282 (check_format): Intialize repeat.
1283 * trans-io.c (gfc_new_nml_name_expr): Declare static.
1284 (gfc_new_var_expr): Ditto.
1286 2003-09-14 Paul Brook <paul@nowt.org>
1288 * trans-array.c (gfc_conv_array_initializer): Handle derived types.
1289 * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
1291 2003-09-12 Paul Brook <paul@nowt.org>
1293 * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
1295 2003-09-12 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
1297 * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
1298 for a correct expression.
1300 2003-09-10 Kejia Zhao <kejia_zh@yahoo.com.cn>
1302 * trans-intrinsic.c (real_compnt_info): New struct.
1303 (prepare_arg_info): New function.
1304 (gfc_conv_intrinsic_set_exponent): New function.
1305 (gfc_conv_intrinsic_scale): New function.
1306 (gfc_conv_intrinsic_nearest): New function.
1307 (gfc_conv_intrinsic_fraction): New function.
1308 (gfc_conv_intrinsic_exponent): New function.
1309 (gfc_conv_intrinsic_spacing): New function.
1310 (gfc_conv_intrinsic_rrspacing): New function.
1311 (gfc_conv_intrinsic_function): Use them.
1313 2003-08-24 XiaoQiang Zhang (zhangapache@yahoo.com>
1315 * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
1316 build_int_2 changed from (high, low) to (low, high).
1317 * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
1318 ioparm_namelist_read_mode, iocall_set_nml_val_int,
1319 iocall_set_nml_val_float, iocall_set_nml_val_char,
1320 iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
1321 (gfc_build_io_library_fndecls): Add variable initialization.
1322 (gfc_new_nml_name_expr, get_new_var_expr): New function.
1323 (build_dt): Add namelist support.
1324 * io.c (value): New variable.
1325 (check_format): Support FMT_H now.
1327 2003-09-07 Paul Brook <paul@nowt.org>
1329 * io.c (gfc_resolve_dt): Error if format label is not defined.
1331 2003-09-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
1333 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
1334 about case_switch's break. The other is about building the condition
1335 statement tree, which judges the argument in the range of the
1336 corresponding integer type.
1337 * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
1338 for the large values.
1340 2003-09-05 Paul Brook <paul@nowt.org>
1342 * f95-lang.c (expand_function_body): Gimplify the function.
1344 2003-09-04 Jeff Law <law@redhat.com>
1346 * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
1349 2003-09-04 Paul Brook <paul@nowt.org>
1351 * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
1352 (gfc_expand_stmt): New function.
1353 (LANG_HOOKS_RTL_EXPAND_STMT): Define.
1354 (expand_function_body): Use tree_rest_of_compilation.
1355 * trans-decl.c (gfc_generate_function_code): Don't free cfun.
1357 2003-09-03 Jeff Law <law@redhat.com>
1359 * f95-lang.c (gfc_init_builtin_functions): C arrays start at
1362 2003-08-30 Paul Brook <paul@nowt.org>
1364 * f95-lang.c (builtin_function): Remove #if 0 code.
1365 (gfc_define_builtin): New function.
1366 (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
1367 * mathbuiltins.def: New file.
1368 * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
1369 (gfc_intrinsic_map): Use mathbuiltins.def.
1370 (gfc_intrinsic_builtin_t): Remove.
1371 (gfc_build_intrinsic_lib_fndecls): Update.
1372 * trans-types.c (gfc_init_types): Remove redundant initilaization of
1373 signed_size_type_node.
1375 2003-08-29 Paul Brook <paul@nowt.org>
1377 * arith.c (gfc_real_kinds): Use correct minimum exponents.
1379 2003-08-22 Kejia Zhao <kejia_zh@yahoo.com.cn>
1381 * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
1382 (gfc_conv_intrinsic_function): Add MODULO.
1384 2003-08-22 Jason Merrill <jason@redhat.com>
1386 * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
1388 2003-08-22 Andreas Jaeger <aj@suse.de>
1390 * Make-lang.in (f95.install-common): Add DESTDIR support.
1391 * (f95.install-info): Likewise.
1392 (f95.uninstall): Likewise.
1394 2003-08-19 Diego Novillo <dnovillo@redhat.com>
1396 * trans-types.c (gfc_init_types): Initialize
1397 signed_size_type_node with size_type_node.
1399 2003-08-18 Paul Brook <paul@nowt.org>
1401 * dependency.c (gfc_dependency): New enum.
1402 (check_another_array_ref): Remove.
1403 (gfc_get_array_from_component): Remove.
1405 (get_range): Remove.
1406 (get_no_of_elements): Use mpz_t, not mpf_t.
1407 (transform_sections): New function.
1408 (gfc_check_range_range): Rename ...
1409 (gfc_check_section_vs_section): ... to this. Use new function.
1410 (gfc_is_inside_range): Rewrite to match.
1411 (gfc_check_element_vs_section): Ditto.
1412 (gfc_check_element_vs_element): Ditto.
1414 (gfc_dep_resolver): Ditto. Remove unused parameter.
1415 * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
1416 gfc_check_element_vs_element, gfc_is_inside_range,
1417 gfc_get_array_from_component): Remove prototypes for static functions.
1418 (gfc_dep_resolver): Update prototype.
1419 * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
1421 2003-08-15 Paul Brook <paul@nowt.org>
1423 * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
1424 return values to parent scope.
1425 (gfc_build_dummy_array_decl): Ditto.
1427 2003-08-14 Paul Brook <paul@nowt.org>
1429 * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
1430 size of the type, not the pointer.
1431 * resolve.c (resolve_symbol): Give more accurate error message.
1433 2003-08-10 Paul Brook <paul@nowt.org>
1435 * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
1437 2003-08-10 Paul Brook <paul@nowt.org>
1439 * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
1442 2003-08-10 Chun Huang <compiler@sohu.com>
1444 * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
1445 (resolve_symbol): Ditto.
1446 * trans-expr.c (gfc_conv_statement_function): New function.
1447 (gfc_conv_function_expr): Use it.
1449 2003-08-10 Paul Brook <paul@nowt.org>
1451 * trans-array.c (gfc_conv_ss_startstride): Handle functions.
1452 (walk_function_expr): Set section rank.
1453 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
1455 2003-08-10 Paul Brook <paul@nowt.org>
1457 * intrinsic.c (add_sym): Prefix names with correct string.
1458 (add_sym_0s): New function.
1459 (add_subroutines): Register abort.
1461 2003-08-10 Erik Schnetter <schnetter@uni-tuebingen.de>
1463 * gfortran.h: Introduce options to control the mangling.
1464 * lang.opt: Likewise.
1465 * options.c (gfc_init_options): Handle the options.
1466 * trans-common.c (gfc_sym_mangled_common_id): New function.
1467 (gfc_build_common_decl): Call it.
1468 * trans-decl.c (gfc_sym_mangled_function_id): New function.
1469 (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
1471 2003-08-09 Paul Brook <paul@nowt.org>
1473 * module.c (mio_symbol): Always ouput a namespace for formal args.
1474 (load_needed): Namespace now belong to their proper symbol.
1475 (gfc_dump_module): Change G95=>GFORTRAN.
1477 2003-08-05 Paul Brook <paul@nowt.org>
1479 * options.c: Force -fg77-calls.
1481 2003-08-02 Paul Brook <paul@nowt.org>
1483 * Makelang.in: Rename G95_* to GFORTRAN_*.
1484 * All sources: Rename G95_* to GFC_*.
1486 2003-08-01 Paul Brook <paul@nowt.org>
1488 * fortran/Make-lang.in: Use GMPLIBS.
1489 * fortran/config-lang.in: Set need_gmp.
1490 * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
1492 2003-07-27 Andreas Jaeger <aj@suse.de>
1494 * trans-decl.c (gfc_generate_constructors): Convert prototype to
1496 * trans-const.c (gfc_init_constants): Likewise.
1497 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
1499 * gfortranspec.c: Convert to ISO C90.
1500 (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
1502 2003-07-26 Paul Brook <paul@nowt.org>
1504 * lang.opt: Add -fdump-parse-tree.
1505 * options.c (gfc_handle_option): Ditto.
1506 * resolve.c (resolve_forall_iterators): Convert to proper type.
1507 * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
1509 2003-07-26 Paul Brook <paul@nowt.org>
1511 * Makefile.in: Add build dependencies on files common with rest of gcc.
1513 2003-07-26 Lifang Zeng <zlf605@hotmail.com>
1515 * trans.h: Declare g95_trans_pointer_assignment.
1516 * trans-expr.c (g95_trans_pointer_assignment): New function.
1517 (g95_trans_pointer_assign): Use it.
1518 * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
1519 (g95_trans_pointer_assign_need_temp): New function.
1521 2003-07-26 Paul Brook <paul@nowt.org>
1523 * gfortran.texi: Replace references to g95.
1525 2003-07-26 Paul Brook <paul@nowt.org>
1527 Rename g95_* to gfc_*.
1529 2003-07-25 Paul Brook <paul@nowt.org>
1531 * gfortran.h: Rename from g95.h.
1532 * trans-types.c (boolean_type_node, booelan_true_node,
1533 boolean_false_node): Remove.
1534 * trans-types.h: Ditto.
1536 2003-07-25 Chun Huang <compiler@sohu.com>
1538 * parse.c (accept_statement): Implement BLOCK DATA statement.
1539 * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
1542 2003-07-24 Lifang Zeng <zlf605@hotmail.com>
1544 * trans-stmt.c (temporary_list): Define.
1545 (g95_trans_assign_need_temp): New function.
1546 (g95_trans_forall_1): Modified for WHERE.
1547 (g95_trans_where_assign): Modified.
1548 (g95_trans_where_2): Modified.
1549 (g95_evaluate_where_mask): Modified.
1550 (g95_trans_where): Modified.
1551 (g95_get_temp_expr): Removed.
1552 (g95_add_to_where_stmt_list): Removed.
1553 (compute_overall_iter_number): Modified for WHERE.
1554 * trans.h: Remove where_stmt_list.
1556 2003-07-24 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1558 * lang.opt: Correct description of options -J and -M.
1560 2003-07-23 Steven Bosscher <steven@gcc.gnu.org>
1562 * lang.opt: Move help text to here.
1563 * lang-options.h: Remove.
1565 2003-07-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1566 * iresolve.c (g95_resolve_transpose): Proper variable in switch.
1567 * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
1570 2003-07-22 Steven Bosscher <steven@gcc.gnu.org>
1571 Paul Brook <paul@nowt.org>
1573 * check.c (check_rest): Use global pedantic flag.
1574 * io.c (data_desc): Ditto.
1575 * error.c (g95_warning, g95_warning_now): Use global flag.
1576 * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
1577 (expand_function_body): Update to new prototypes.
1578 (g95_init): Use new option names.
1579 * g95.h (g95_option_t): Standardize names.
1580 (g95_init_options, g95_handle_option): Update prototypes.
1581 * interface.c: Use new option names.
1588 * simplify.c: Ditto.
1590 * trans-array.c: Ditto.
1591 * trans-expr.c: Ditto.
1592 * trans-types.c: Ditto.
1593 * trans-decl.c: Ditto.
1594 (g95_build_library_function_decl): Remove obsolete VPARAMS.
1596 * options.c (g95_display_help): Remove.
1597 (g95_init_options): Convert to new scheme.
1599 (g95module_option): Ditto, rename from g95_parse_arg.
1600 (g95_handle_module_path_options): New function.
1601 * trans-equivalence.c: Fix error message.
1602 * lang.opt: Corrections.
1604 2003-07-21 Steven Bosscher <steven@gcc.gnu.org>
1606 * lang.opt: New file.
1608 2003-07-21 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1610 * decl.c (match_attr_spec): Set colon_seen.
1612 2003-07-14 Paul Brook <paul@nowt.org>
1614 * trans-array.c: Update comment.
1615 (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
1616 * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
1617 minmaxloc,minmaxval): Ditto.
1618 * trans-io.c (g95_trans_transfer): Ditto.
1619 * trans-stmt.c: Remove unneeded prototypes.
1620 (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
1621 (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
1622 (compute_inner_temp_size): Remove bits of dead code. Add comments.
1623 Don't share loopinfo.
1624 (compute_overall_iter_number): Declare as static.
1625 (allocate_temp_for_forall_nest): Ditto.
1626 (g95_trans_forall_1): Don't pass shared loopinfo.
1627 * trans.c (g95_start_block): Expand comment.
1629 2003-07-12 Paul Brook <paul@nowt.org>
1631 * arith.c (g95_index_integer_kind): Remove unused initializer.
1632 * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
1633 index by size of element.
1634 (generate_loop_for_rhs_to_temp): Ditto.
1635 (allocate_temp_for_forall_nest): Use element size, not index size.
1637 2003-07-11 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1639 * arith.c (g95_index_integer_kind): Add a TODO.
1640 * simplify.c (g95_simplify_nearest): Add a TODO.
1642 2003-07-09 Chun Huang <compiler@sohu.com>
1644 * trans.h: Add declarations for gfor_fndecl_string_scan and
1645 gfor_fndecl_string_verify.
1646 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
1647 * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
1648 (g95_conv_intrinsic_verify): New function.
1649 (g95_conv_intrinsic_function): Add SCAN and VERIFY.
1650 * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
1651 of parameter 'BACK=.TRUE.'
1653 2003-07-05 Lifang Zeng <zlf605@hotmail.com>
1655 * trans-stmt.c (iter_info, forall_info): Define.
1656 (g95_trans_forall_block): Remove.
1657 (g95_trans_forall_loop): Use forall info blocks.
1658 (g95_trans_nested_forall_loop): New function.
1659 (g95_do_allocate): Handle things other than logical masks.
1660 (generate_loop_for_temp_to_lhs): New function.
1661 (generate_loop_for_rsh_to_temp): New function.
1662 (compute_inner_temp_size): New function.
1663 (compute_overall_iter_number): New function.
1664 (allocate_temp_for_forall_nest): New function.
1665 (g95_trans_forall): Move body ...
1666 (g95_trans_forall_1): ... to here. Handle loops with temporaries.
1668 2003-07-02 Paul Brook <paul@nowt.org>
1670 * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
1671 in correct scope. Change callers to match.
1672 * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
1673 * iresolve.c (g95_resolve_reshape): Only use constant shapes.
1675 2003-07-02 Paul Brook <paul@nowt.org>
1677 * trans-array.c (g95_conv_loop_setup): Remove dead var. Use
1678 expression shape for all expressions.
1679 * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
1681 2003-07-03 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1683 * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
1684 g95_parse_arg), intrinsic.c (g95_convert_type): support of
1686 * intrinsic.c, g95.h: Add g95_convert_type_warn,
1687 * resolve.c (g95_resolve_index): Call it.
1689 2003-07-02 Paul Brook <paul@nowt.org>
1691 * iresolve.c (g95_resolve_reshape): Set expression shape.
1692 (g95_resolve_shape): Ditto.
1693 * simplify.c (g95_simplify_shape): Move common code outside condition.
1694 * trans-array.c (g95_conv_array_initializer): Teach it how to count.
1696 2003-07-01 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1698 * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
1701 2003-06-29 Paul Brook <paul@nowt.org>
1703 * array.c (g95_simplify_iterator_var): Don't bother with return value.
1704 * expr.c (find_array_element, find_component_ref): New functions.
1705 (remove_subobject_ref): New function.
1706 (simplify_const_ref): Use them. Rename from simplify_component_ref.
1707 (simplify_ref_chain): New function.
1708 (g95_simplify_expr): Use it. Simplify parameter variable subobjects.
1709 (g95_specification_expr): Simplify the expression.
1710 * resolve.c (resolve_operator): Check simplifications return code.
1711 (g95_resolve_expr): Ditto.
1713 2003-06-26 Paul Brook <paul@nowt.org>
1715 * expr.c (simplify_component_ref): New function.
1716 (g95_simplify_expr): Use it.
1717 * resolve.c (resolve_structure_cons): Handle references.
1719 2003-06-25 Paul Brook <paul@nowt.org>
1721 * trans-io.c (build_dt): Handle internal units.
1723 2003-06-25 Canqun Yang <canqun@yahoo.com.cn>
1725 * trans-common.c (g95_build_common_decl): Array index range starts at 0.
1726 (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
1727 Use g95_array_index_type instead of integer_type_node.
1728 (g95_build_common_decl, g95_set_common_master_type): Use
1729 g95_character1_type_node instead of char_type_node.
1730 * trans-equivalence.c (g95_layout_local_equiv): As above.
1732 2003-06-24 Steven G. Kargl <kargls@attbi.com>
1734 * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
1735 remove last remains of -fquiet.
1737 2003-06-22 Paul Brook <paul@nowt.org>
1739 * resolve.c (resolve_operator): Don't fail if we can't simplify.
1740 (g95_resolve_expr): Ditto.
1741 (resolce_code): Mark as static.
1742 * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
1743 gimplifer doesn't (yet).
1745 2003-06-20 Paul Brook <paul@nowt.org>
1747 * g95.h: Add ST_PAUSE and EXEC_PAUSE.
1748 * match.c (g95_match_if): Add ST_PAUSE.
1749 (g95_match_stopcode): New function.
1750 (g95_match_pause, g95_match_stop): Use it.
1751 * parse.c (g95_ascii_statement): Handle ST_PAUSE.
1752 (decode_stmt, next_statement, parse_executable): Ditto.
1753 * resolve.c (resolve_code): Ditto.
1754 * st.c (g95_free_statement): Ditto.
1755 * trans-stmt.c (g95_trans_pause): New function.
1756 * trans-stmt.h: Declare it.
1757 * trans.c (g95_trans_code): Use it.
1758 * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
1760 (g95_build_builtin_function_decls): Initialize them.
1762 * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
1764 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1766 * io.c (g95_match_open , g95_match_close, g95_match_inquire,
1767 match_filepos): Fix error handling.
1769 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1771 * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
1772 Add assertions on arguments.
1773 * resolve.c (expression_shape): Remove useless &.
1774 * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
1775 g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
1776 g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
1777 g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
1778 g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
1779 g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
1780 (g95_simplify_not, g95_simplify_scale): Add assertions.
1782 2003-06-15 Paul Brook <paul@nowt.org>
1784 Clean up stuff to work with the ssa optimizers.
1785 * convert.c (convert): Handle BOOLEAN_TYPEs.
1786 * f95-lang.c (g95_truthvalue_conversion): Implement.
1787 * trans-array.c (g95_trans_array_constructor_value): Group multiple
1789 * trans.h (g95_truthvalue_conversion): Declare.
1790 * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
1791 * trans-stmt.c (g95_trans_character_select): Don't create array
1792 assignments. Mark labels as indirect jump targets.
1793 * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
1794 (g95_get_dtype_cst): Handle LOGICAL types.
1796 2003-06-14 Paul Brook <paul@nowt.org>
1798 * f95-lang.c (g95_gimplify_expr): New function.
1799 * trans-array.c (g95_trans_array_constructor_value): Don't create
1801 (g95_conv_expr_descriptor): Rename simple->gimple.
1802 * trans-expr.c (conv_expr_op): Use proper logical operators.
1803 * trans-intrinsic.c (build_fixbound_expr): New function.
1804 (build_fix_expr): Ditto.
1805 (g95_conv_intinsic_aint): Use them. Use builtin functions.
1806 (g95_conv_intrinsic_function): Add FLOOR and CEILING.
1808 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1810 * array.c (g95_compare_array_spec): Remove unreachable code.
1811 * expr.c (g95_copy_expr): Likewise.
1812 * intrinsic.c (g95_convert_type): Likewise.
1813 * misc.c (g95_code2string): Likewise.
1814 * simplify.c (g95_simplify_ishft, g95_simplify_real,
1815 g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
1816 * trans-stmt.c (g95_trans_select): Likewise.
1817 * primary.c (extend_ref): Add an assertion.
1818 * simplify.c (g95_convert_constant): Add const.
1819 * intrinsic.h: Remove g95_check_x_ni.
1820 * f95-lang.c (g95_finish): Call g95_release_include_path.
1822 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1824 * resolve.c (resolve_contained_functions): Fix typo introduced on
1827 2003-06-09 Paul Brook <paul@nowt.org>
1829 * g95.h: Include system.h not hwint.h.
1830 * many: use safe-ctype.h not ctype.h. Change isalpha -> ISALPHA, etc.
1831 * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
1833 2003-06-09 Paul Brook <paul@nowt.org>
1835 * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
1836 * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
1837 * trans-decl.c (g95_add_decl_to_functions): Make non-static.
1838 (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
1839 (g95_generate_function_code): Translate COMMON and EQUIVALENCE
1841 * trans.h (g95_trans_equivalence, g95_trans_common,
1842 g95_add_decl_to_function): Declare.
1843 * trans-common.c, trans-equivalence.c: New files.
1845 2003-06-08 Steven Bosscher <steven@gcc.gnu.org>
1847 * intrinsic.c (g95_intrinsic_extension): Remove.
1848 (add_functions): Substitute g95_check_x for g95_check_x_ni
1850 (g95_init_expr_extensions): New function.
1851 (g95_intrinsic_func_interface): Use it.
1852 * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
1853 * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
1854 g95_check_precision, g95_check_present, g95_check_radix,
1855 g95_check_range, g95_check_selected_real_kind): Do not set
1856 g95_intrinsic_extension.
1857 (g95_check_x_ni): Remove now duplicate of g95_check_x.
1859 * expr.c (check_inquiry): Add FIXME, fixup some code style.
1861 2003-06-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1863 * g95.h (ref_type): Name this type explicitly.
1864 * module.c (MIO_NAME): Add specialisations of mio_name.
1865 (mio_symbol_attribute, mio_typespec, mio_array_ref,
1866 mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
1867 (ab_attribute): Name this type explicitly.
1868 (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
1870 2003-06-05 Kejia Zhao <kejia_zh@yahoo.com.cn>
1872 * trans-intrinsic.c (g95_conv_allocated): New function.
1873 (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
1875 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
1877 * f95-lang.c: Don't include g95-support.h
1878 (g95_mark_addressable): Add prototype.
1879 (g95_init_decl_processing): Remove C front end hack.
1880 * f95-tree.c: Remove file.
1881 * support.c: Remove file.
1882 * g95-support.h: Remove file.
1883 * trans-types.c (g95_init_types): Set up boolean
1884 type related tree nodes.
1885 * Make-lang.in: Remove rules for dead files and
1886 dependencies on them.
1888 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
1890 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
1891 C front end dependency. Also, convert.c does not depend on
1892 g95-support.h anymore.
1893 * convert.c: Don't include c-common.h and g95-support.h
1894 * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
1895 (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
1896 stmts_are_full_exprs_p, current_stmt_tree,
1897 current_scope_stmt_stack): Remove.
1898 * g95-support.h (unsigned_conversion_warning): Kill proto.
1899 (boolean_type_node, boolean_true_node, boolean_false_node):
1900 Don't define here. Instead, make then true tree nodes in
1902 * support.c (c_global_trees): Die, C front end, die!!!
1903 (g95_init_c_decl_hacks): Don't touch intmax_type_node,
1904 uintmax_type_node, string_type_node and const_string_type_node.
1905 (decl_constant_value, overflow_warning): Make static functions.
1906 They are in death row too, though.
1907 (default_conversion, c_expand_asm_operands): Remove.
1908 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
1909 trans.c: Don't include c-common.h.
1910 * trans-types.c (boolean_type_node, boolean_true_node,
1911 boolean_false_node): Make them real tree nodes.
1912 * trans-types.h (intmax_type_node, string_type_node,
1913 const_string_type_node): Hack to work around C dependencies
1914 in builtin-types.def.
1916 2003-06-04 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1918 * decl.c (decl_types): Add some iterators-like sentinels.
1919 * decl.c (match_attr_spec): Use them.
1920 Use "decl_types" instead of "int".
1921 Add cast in call to g95_match_strings.
1922 * dump-parse-tree.c (g95_show_namespace): Use "g95_intrinsic_op"
1924 * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
1925 (g95_interface_info): Use "g95_intrinsic_op".
1926 * dump-parse-tree.c (g95_show_namespace): Use them.
1927 * interface.c (g95_check_interfaces): Use them.
1928 * module.c (read_module, write_module): Use them.
1929 * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
1930 Use "g95_intrinsic_op".
1931 * interface.c (check_operator_interface): Use "g95_intrinsic_op".
1932 Add a default case in switch statement.
1933 * intrinsic.h (g95_generic_isym_id): Moved to...
1934 * g95.h (g95_generic_isym_id): here.
1935 (g95_intrinsic_sym): Use "g95_generic_isym_id".
1936 * intrinsic.c (make_generic): Use "g95_generice_isym_id".
1937 * trans-intrinsic.c (g95_intrinsic_map_t,
1938 g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
1939 * match.c (g95_match_intrinsic_op): Add cast in call to
1942 2003-06-03 Steven Bosscher <steven@gcc.gnu.org>
1944 * support.c (skip_evaluation, warn_conversion, lvalue_p,
1945 lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
1946 constant_fits_type_p, convert_and_check,
1947 unsigned_conversion_warning): Remove these ugly remnants
1948 we inherited from the C front end.
1949 (function_types_compatible): Remove '#if 0'-edcode.
1950 (build_modify_expr): Likewise.
1951 (convert_for_assignment): Don't use the deceased functions.
1952 The parameter fundecl is now unused.
1953 (decl_constant_value): Always just return decl. In fact
1954 this function is not used at present, but it might be in
1955 the future, when we start using the tree inliner.
1956 (overflow_warning, default_conversion, c_expand_asm_operands):
1957 Abort when these are called, they are part of the C type
1958 checking implementation and therefore poison to Fortran.
1960 2003-06-04 Steven Bosscher <steven@gcc.gnu.org>
1962 * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
1963 c-pretty-print.o and c-dump.o. Add a comment on why we
1964 depend on c-semantics.c.
1965 * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
1966 Don't use the C front end tree dumper hook to dump the
1967 language specific tree representation -- we don't have
1968 one. So instead, inherit the default langhook.
1970 2003-06-02 Paul Brook <paul@nowt.org>
1972 * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
1974 2003-06-02 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1976 * check.c (g95_check_associated): Use proper types. Remove
1977 extraneous argument in call to g95_error().
1979 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
1981 * resolve.c (resolve_operator): Make logical operands convert to the
1982 type with higher kind.
1984 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
1986 * check.c (g95_check_associated): Make sure both pointer and target has
1987 the same type and rank. Null pointer or array section with vector
1988 subscript as target are not allowed.
1989 * trans.h: Declare gfor_fndecl_associated.
1990 * trans-decl.c: (g95_build_builtin_function_decls): Initialize
1991 gfor_fndecl_associated.
1992 * trans-intrinsic.c (g95_conv_associated): New function.
1993 (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
1995 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
1997 * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
1998 according to POINTER itself rather than TARGET.
1999 (g95_conv_expr_descriptor): Make lbound start at 1.
2000 * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
2002 2003-06-01 Paul Brook <paul@nowt.org>
2004 * expr.c (g95_type_convert_binary): Make it match the standard.
2005 * g95.texi: Remove dead link.
2007 2003-06-01 Steven Bosscher <steven@gcc.gnu.org>
2009 * g95.texi: Cleanup somewhat in preparation for inclusion
2012 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2013 Canqun Yang <canqun@yahoo.com.cn>
2015 * resolve.c (compare_bound_int, resolve_where_shape): Proper return
2017 (g95_find_forall_index): Return proper value.
2018 (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
2019 compare the return value from g95_find_forall_index.
2021 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2022 * g95.h, io.c (g95_st_label): Remove "length".
2023 (g95_symtree): Remove "link".
2024 (g95_case): Remove "code".
2025 * arith.c, arith.h (g95_compare_string, g95_convert_integer,
2026 g95_convert_real): Make an argument pointer to const.
2027 * decl.c (colon_seen): Add a TODO.
2028 * interface.c (g95_compare_types): Fix typo.
2029 * interface.c (compare_interfaces): Preserve value of "p".
2030 * intrinsic.c (sort_actual): Remove "i".
2031 * match.c (g95_match_assign): Proper type in call to g95_match().
2032 * parse.c (next_free): Avoid duplicate call due to macro.
2033 * parse.c (check_statement_label): wrong type in call to g95_error.
2034 * primary.c (match_real_constant): Add a TODO.
2035 * resolve.c (resolve_select): Remove useless conditional.
2036 * simplify.c (g95_simplify_repeat): Proper assignment to
2037 "value.character.string".
2038 * simplify.c (g95_simplify_reshape): Wrong variable in call to
2041 2003-05-20 Canqun Yang <canqun@yahoo.com.cn>
2043 * trans-stmt.c: Remove unnecessary include file defaults.h.
2045 2003-05-19 Lifang Zeng <zlf605@hotmail.com>
2047 * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
2049 (g95_trans_forall): Allow arbitrary number of FORALL indexes and
2050 actual variables used as FORALL indexes.
2052 2003-05-15 Paul Brook <paul@nowt.org>
2054 * trans-array.c (g95_trans_static_array_pointer): Use
2056 (g95_trans_deferred_array): Initialize static array pointers.
2057 * trans-expr.c (g95_conv_function_call): Use formal arglist to
2058 correctly pass POINTER and absent CHARACTER arguments.
2060 2003-05-14 Lifang Zeng <zlf605@hotmail.com>
2062 * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
2063 (g95_resolve_forall_body): Resolve FORALL body.
2064 (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
2065 (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
2066 (g95_find_forall_index): Check whether the FORALL index appears in
2067 the expression or not.
2068 (resolve_code): Modified.
2070 2003-05-14 Paul Brook <paul@nowt.org>
2072 * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
2074 2003-05-13 Paul Brook <paul@nowt.org>
2076 * trans-types.c (g95_max_array_element_size): Now a tree node.
2077 (g95_init_types): Work out max size properly.
2078 (g95_get_dtype_cst): Modify to match.
2080 2003-05-11 Paul Brook <paul@nowt.org>
2082 * trans-io.c (add_case): Create a label decl for case labels.
2084 2003-05-11 Paul Brook <paul@nowt.org>
2086 * arith.c (g95_integer_index_kind): New variable.
2087 * f95-lang.c (g95_init): Move frontend initialization here ...
2088 (g95_post_options): ... from here.
2089 * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
2090 * intrinsic.c (add_functions): Use index kinds.
2091 * iresolve.c: Convert to index_kind where needed.
2092 * resolve.c (g95_resolve_index): Make public, use index_kind.
2093 (resolve_array_ref): Adjust to match.
2094 * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
2095 * trans-stmt.c: Ditto.
2096 * trans-types.c: Ditto.
2097 * trans-types.h (g95_array_index_kind): Remove declaration.
2098 * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
2100 2003-05-07 Paul Brook <paul@nowt.org>
2102 * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
2103 * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
2106 2003-05-07 Paul Brook <paul@nowt.org>
2108 * trans-array.c (trans_static_array_pointer,
2109 g95_trans_array_constructor_value, g95_conv_array_initializer,
2110 g95_conv_structure): CONSTRUCTOR nodes only have one operand.
2111 (g95_add_loop_ss_code): Convert subscripts to the correct type.
2112 * trans-stmt.c (g95_trans_character_select): Ditto.
2113 * trans-types.c (g95_init_types): Ditto.
2115 2003-05-07 Steven Bosscher <steven@gcc.gnu.org>
2117 * f95-lang.c (expand_function_body): Use input_line, not lineno.
2118 * trans-decl.c (g95_generate_function_code,
2119 g95_generate_constructors): Likewise.
2120 * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
2121 g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
2124 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
2125 * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
2126 with components point to the DERIVED type itself, and two DERIVED
2127 type with components point to each other.
2128 * trans-expr.c (g95_conv_componet_ref): Modified
2130 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
2131 * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
2133 (g95_trans_pointer_assign): Implement Nullify.
2135 2003-05-01 Paul Brook <paul@nowt.org>
2137 * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
2138 * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
2140 2003-05-01 Paul Brook <paul@nowr.org>
2142 * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
2143 trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
2146 2003-05-01 Canqun Yang <canqun@yahoo.com.cn>
2148 * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
2151 2003-04-28 Paul Brook <paul@nowt.org>
2153 * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
2154 as their kind suggests.
2155 (g95_resolve_reshape): Ditto.
2157 2003-04-28 Chun Huang <compiler@sohu.com>
2159 * trans-expr.c (g95_conv_substring_expr): New function.
2160 (g95_conv_expr): Use it.
2162 2003-04-28 Paul Brook <paul@nowt.org>
2164 * iresolve.c (g95_resolve_transpose): Make it match the
2166 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
2168 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
2170 * trans-types.c (g95_add_field_to_struct): New function to
2171 add a field to a UNION_TYPE or RECORD_TYPE.
2172 * trans-types.h (g95_add_field_to_struct): Prototype.
2173 (g95_get_derived_type): Use g95_add_field_to_struct to add
2175 * trans-io.c (g95_add_field): Remove.
2176 (ADD_FIELD): Use new g95_add_field_to_struct function.
2177 (ADD_STRING): Likewise.
2178 * trans-stmt.c (g95_trans_select): Likewise.
2179 (g95_add_field): Remove duplicated function.
2181 2003-04-18 Canqun Yang <canqun@yahoo.com.cn>
2183 Port implementation for CHARACTER SELECT from Andy's tree.
2184 * trans-stmt.c (g95_trans_character_select): Implement character
2185 select. (g95_add_field): New function.
2186 * trans-decl.c: Declare 'gfor_gndecl_select_string'.
2187 (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
2188 * g95.h (struct g95_case): Add field 'int n'.
2189 * trans.h: Declare 'gfor_fndecl_select_string'.
2191 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
2193 * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
2194 (g95_insert_bbd): Die on duplicates.
2195 * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
2197 2003-04-14 Steven Bosscher <steven@gcc.gnu.org>
2199 * g95.texi: Require GMP 4.0 -- like we actually
2200 do. Explain the testsuite and what-goes-where.
2201 Don't use undefined texinfo symbol. Break very
2202 long line. Remove finished item from the list
2205 2003-04-11 Canqun Yang <canqun@yahoo.com.cn>
2207 * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
2210 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
2212 * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
2213 (g95_trans_forall_body): New function.
2215 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
2217 * resolve.c (resove_where): New function.
2218 (resolve_where_shape): New function.
2219 (resolve_code): Add call to 'resolve_where'
2220 * trans-stmt.c (g95_trans_where): Modified.
2221 (g95_trans_where_2): New function.
2222 (g95_trans_where_assign): New function.
2223 (g95_evaluate_where_mask): New function.
2224 (g95_add_to_stmt_list): New function.
2225 (g95_get_temp_expr): New function.
2226 * trans.h (where_stmt_list): New structure.
2228 2003-04-10 Paul Brook <paul@nowt.org>
2230 * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
2231 (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
2233 2003-04-10 Steven Bosscher <steven@gcc.gnu.org>
2235 Update after mainline -> tree-ssa-branch merge.
2236 * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
2238 (g95_init): Update for new lang_hooks definition.
2239 (g95_post_options): New langhook.
2240 (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
2241 * scanner.c (g95_new_file): Comment update.
2243 2003-04-09 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2245 * g95.h, lang-options.h: Add -Wimplicit-interface.
2246 * options.c (g95_init_options, g95_parse_arg): Set it.
2247 * interface.c (check_intents): Warn about call with implicit
2249 * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
2252 2003-04-05 Paul Brook <paul@nowt.org>
2254 * iresolve.c (g95_resolve_spread): Don't resole based on type.
2255 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
2257 2003-03-29 Paul Brook <paul@nowt.org>
2259 * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
2260 (g95_resolve_unpack): Ditto.
2261 * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
2262 (g95_conv_intrinsic_function): Use it. Remove PACK and UNPACK.
2263 (g95_is_intrinsic_libcall): Add PACK and UNPACK.
2265 2003-03-25 Paul Brook <paul@nowt.org>
2267 * arith.c (g95_unary_user, g95_user): Remove dead functions.
2269 * array.c (g95_free_array_ref): Ditto.
2271 * symbol.c (g95_use_derived_tree): Ditto.
2272 * intrinsic.c (add_functions): Use simplification for SCALE.
2273 * primary.c (g95_match_rvalue): Test sym, not symtree.
2275 2003-03-25 Paul Brook <paul@nowt.org>
2277 * trans-decl.c (build_function_decl): Add parameter before it gets
2278 turned into a constant.
2279 * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
2280 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
2281 * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
2283 2003-03-22 Paul Brook <paul@nowt.org>
2285 * trans-array.c (g95_conv_array_initializer): Allow scalar
2287 * trans-decl.c (g95_finish_var_decl): Result variables are not
2289 * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
2290 (g95_conv_intrinsic_function): Use it.
2291 * trans-types.h (g95_type_spec): Remove dead declaration.
2293 2003-03-21 Paul Brook <paul@nowt.org>
2295 * trans-decl.c (g95_build_function_decl): Mark string parameters.
2297 2003-03-20 Paul Brook <paul@nowt.org>
2299 * trans-decl.c (g95_build_function_decl): Put character length
2300 parameters at the end of the function declaration.
2301 * trans-expr.c (g95_conv_function_call): Ditto.
2302 * trans-types.c (g95_get_function_type): Ditto.
2304 2003-03-20 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2306 * resolve.c (resolve_formal_arglist): Don't impose intent for
2307 procedure arguments of pure functions.
2308 (resolve_select): Remove redundant assignment.
2310 2003-03-19 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2312 * arith.c (validate_logical), g95.h, options.c (g95_init_options):
2314 * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
2315 * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
2317 * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
2319 * symbol.c (g95_add_type): Fix typo in comment.
2322 2003-03-16 Paul Brook <paul@nowt.org>
2324 * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
2325 * expr.c (g95_build_call): Remove.
2326 * f95-lang.c (puchdecl_top_level): New function.
2327 * g95.h (g95_code): Store resolved symbol, not just the name.
2328 * intrinsic.c (g95_intrinsic_namespace): New global namespace.
2329 (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
2330 (g95_get_intrinsic_sub_symbol): New function.
2331 * iresolve.c (g95_resolve_cpu_time): Use it.
2332 (g95_resolve_random_number): Ditto.
2333 * resolve.c: Set code->resolved_sym instead of code->sub_name.
2334 * trans-decl.c (g95_get_extern_function_decl): Give external decls
2335 the correct DECL_CONTEXT. Add global symbold to the global scope.
2336 * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
2339 2003-03-16 Paul Brook <paul@nowt.org>
2341 * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
2342 * options.c (g95_parse_arg): Ditto.
2343 * module.c (mio_symbol_attribute): Handle the always_explicit bit.
2344 * resolve.c (resolve_formal_arglist): The always_explicit sould be set
2345 for the procedure, not the parameter.
2346 * trans-array.c (g95_trans_g77_array): New function.
2347 (g95_trans_assumed_size): Use it.
2348 (g95_trans_dummy_array_bias): Ditto.
2349 (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
2350 (g95_conv_expr_descriptor): ... to here. Update callers.
2351 * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
2352 (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
2353 * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
2354 * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
2355 * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
2356 (g95_sym_type): Ditto.
2358 2003-03-15 Paul Brook <paul@nowt.org>
2360 * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
2362 * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
2364 2003-03-14 Paul Brook <paul@nowt.org>
2366 * trans-array.c (g95_array_is_packed): Remove.
2367 (g95_conv_array_base): Correctly handle all descriptorless cases.
2368 (g95_conv_array_stride): Use descriptorless strides.
2369 (g95_trans_dummy_array_bias): Don't always repack the array.
2370 (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
2372 * trans-types.c (g95_get_nodesc_array_type): Differentiate between
2373 dummy and non-dummy arrays...
2374 (g95_sym_type, g95_get_derived_type): ... like these.
2375 (g95_get_array_type_bounds): Allow discontiguous arrays.
2377 2003-03-12 Paul Brook <paul@nowt.org>
2379 * array.c (g95_resolve_array_spec): Fix comment.
2380 * g95.h (symbol_attributes): New flag always_explicit.
2381 * resolve.c (resolve_formal_arglist): Set it always_explicit.
2382 * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
2383 * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
2384 (g95_trans_array_bounds): Allow assumed shape arrays.
2385 (g95_trans_repack_array): Remove.
2386 (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
2387 * trans-decl.c (g95_build_qualified_array): Only ignore absent
2388 bounds for assumed size arrays.
2389 (g95_build_dummy_array_decl): Use descriptorless arrays.
2390 * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
2391 (g95_trans_pointer_assign): Fix typo.
2392 * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
2394 (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
2395 * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
2396 Also modify callers.
2397 * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
2399 2003-03-08 Paul Brook <paul@nowt.org>
2401 * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
2402 (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
2403 * resolve.c (compare_spec_to_ref): Allow full array sections.
2405 2003-03-08 Paul Brook <paul@nowt.org>
2407 * expr.c (g95_simplify_expr): Also simplify array index and
2408 substring expressions.
2409 * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
2410 * trans-array.c (g95_trans_array_bounds): New function.
2411 (g95_trans_auto_array_allocation): Use it.
2412 (g95_trans_assumed_size): Rewrite.
2413 * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
2414 (gfor_fndecl_repack): Remove.
2415 (g95_build_qualified_array): Handle absent upper bounds.
2416 (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
2417 (g95_get_symbol_decl): Update.
2418 (g95_build_intrinsic_function_decls): Initialize new decls.
2419 * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
2420 (gfor_fndecl_repack): Remove.
2421 * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
2422 * trans-types.c: (g95_build_array_type): Merge duplicated code..
2423 (g95_get_nodesc_array_type): Handle absent bounds.
2424 * trans-types.h (g95_get_nodesc_array_type): Declare.
2426 2003-03-04 Paul Brook <paul@nowt.org>
2428 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
2431 2003-03-02 Paul Brook <paul@nowt.org>
2433 * options.c (g95_init_options): Drfault to 1.
2434 (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
2435 * trans-array.c (g95_conv_array_data, g95_conv_array_base,
2436 g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
2437 Handle non-constant size automatic arrays.
2438 (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
2439 generic bound functions.
2440 (g95_trans_auto_array_allocation): Don't create a descriptor.
2441 (g95_trans_assumed_size): New function (broken).
2442 (g95_trans_dummy_array_bias): Remove unused var.
2443 * trans-array.h (g95_trans_assumed_size): Declare.
2444 * trans-decl.c (create_index_var): New fuction.
2445 (g95_build_qualified_array): New function.
2446 (g95_get_symbol_decl): Use it.
2447 (g95_trans_deferred_vars): Handle assumed shape seperately.
2448 * trans-types.c (get_element_type): Handle heap allocated arrays.
2449 (g95_is_nodesc_array): Include non-const size arrays.
2450 (g95_get_nodesc_array_type): Ditto.
2452 2003-02-23 Paul Brook <paul@nowt.org>
2454 * trans-array.c (g95_array_init_size): Should use stride, not size of
2457 2003-02-18 Paul Brook <paul@nowt.org>
2459 * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
2460 after intrinsic function check.
2462 2003-02-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2464 * io.c (match_io): Fix missing return value and remove useless
2466 * match.c (g95_match): Remove useless assignment.
2467 * module.c (parse_string): Remove useless post increment.
2468 * simplify.c (g95_simplify_verify): Remove useless assignment.
2470 2003-02-15 Paul Brook <paul@nowt.org>
2472 * expr.c (restricted_intrinsic): Handle bad values gracefully.
2473 * g95.h (symbol_attribute): Add referenced member.
2474 (g95_symbol): Add dummy_order member.
2475 (g95_set_sym_referenced): Declare.
2476 * match.c (g95_match_assignment, g95_match_call): Use it
2477 * primary.c (match_actual_arg, g95_match_rvalue,
2478 g95_match_variable): Ditto.
2479 * symbol.c (next_dummy_order): New variable.
2480 (g95_set_sym_referenced): New function.
2481 (check_done): New function.
2482 (g95_add_*): Use it.
2483 * trans-decl.c: Make formatting conform to GCC standards.
2484 (g95_defer_symbol_init): Add dummy variables in the right order.
2485 (g95_get_symbol_decl): Only accept referenced variables.
2486 (g95_create_module_variable): Module variables are always required.
2487 (generatr_local_decls): New function.
2488 (generate_local_vars): New function.
2489 (g95_generate_function_code): Use it.
2491 2003-02-13 Paul Brook <paul@nowt.org>
2493 * trans-decl.c (g95_conv_struct_cons): Remove.
2494 (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
2495 * trans-expr.c (g95_conv_structure): New function.
2496 (g95_conv_expr): Use it.
2498 2003-02-09 Paul Brook <paul@nowt.org>
2500 * trans-array.c (g95_array_init_size): Don't evaluate the linit
2501 expressions multiple times.
2502 (g95_trans_auto_arry_allocation): Use pointer not tmp.
2504 2003-02-08 Paul Brook <paul@nowt.org>
2506 * module.c (mio_symtree_ref): Declare as static.
2507 (mio_expr): Remove dead code.
2508 (read_module): Set the symtree link for fixups.
2509 * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
2510 (build_round_expr): ... to this.
2511 (g95_conv_intrinsic_aint): New function.
2512 (g95_conv_intrinsic_function): Use it.
2514 2003-02-08 Paul Brook <paul@nowt.org>
2516 * trans-array.c (g95_trans_array_constructor_value): Use the acutal
2517 offset after modificaton, not the increment expression.
2518 * dependency.c: Kill excess whitespace.
2520 2003-02-07 Sanjiv Gupta <sanjivg@noida.hcltech.com>
2522 * dependency.h: Remove some function declarations.
2523 * dependency.c (get_no_of_elements): Change this function not to
2525 * other: Add comments for all modified functions.
2527 2003-02-06 Paul Brook <paul@nowt.org>
2529 * g95spec.c (lang_specific_functions): Fix initializer warning.
2530 * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
2531 for structure type names.
2532 * trans-decl.c (g95_cons_structure_cons): New function.
2533 (g95_get_symbol_decl): Use it.
2534 * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
2537 2003-02-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2539 * resolve.c (compare_cases): Add const to casts.
2541 2003-01-30 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2543 * g95.h (g95_check_f): Change a1 to f1m.
2544 * intrinsic.c (add_sym_1m, check_specific,
2545 g95_intrinsic_func_interface): Use it.
2547 * module.c (init_pi_tree): Remove useless cast.
2548 (fp2): Fix argument type.
2550 * parse.c (parse_select_block): Add comment.
2552 2003-02-05 Toon Moene <toon@moene.indiv.nluug.nl>
2554 * lang-options.h: Fix warning involving C90 concatenated
2557 2003-02-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
2558 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2560 * io.c (format_asterisk): Complete initializer to kill warning.
2561 * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
2562 DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
2563 (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
2564 new defines to complete initializers. Kills all warnings.
2566 * Make-lang.in: Comment cleanup.
2568 2003-02-05 Paul Brook <paul@nowt.org>
2570 * array.c (g95_free_constructor): Handle NULL expressions.
2571 * resolve.c (resolve_structure_cons): Ditto.
2572 * decl.c (g95_match_null): New Function.
2573 (variable_decl): Use it.
2574 * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
2575 * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
2576 * trans-types.c (g95_set_decl_attributes): Remove empty function.
2578 2003-02-05 Paul Brook <paul@nowt.org>
2580 * trans.h (build1_v): New macro.
2581 (build_v): Remove pointless and incorrect prototype.
2582 * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
2583 * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
2585 2003-02-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
2587 * Make-lang.in (F95_OBJS): Remove one more dead file.
2589 2003-02-01 Paul Brook <paul@nowt.org>
2591 * lang-specs.h: Don't pass -ffixed-form to the linker.
2592 * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
2594 2003-02-01 Paul Brook <paul@nowt.org>
2596 * Make-lang.in (F95_OBJS): Remove dead files.
2597 * trans-array.c (g95_array_init_size): Do the right thing when
2599 * trans-decl.c (g95_generate_function_code): Initialize deffered
2600 symbol list before translating contained subroutines.
2601 * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
2602 scalar invariant values here...
2603 (g95_conv_variable, g95_conv_function_call): ... instead of here ...
2604 * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
2606 2003-01-29 Paul Brook <paul@nowt.org>
2608 * trans-array.c (g95_add_loop_code): Put pre code in the right block.
2609 (g95_walk_elemental_function_args): Reverse chains before adding.
2610 (g95_reverse_ss): Move about a bit.
2611 * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
2614 2003-01-28 Paul Brook <paul@nowt.org>
2616 * intrinsic.c (resolve_intrinsic): Use correct union member.
2617 * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
2619 * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
2620 use associated variables.
2621 * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
2622 * trans-expr.c (g95_conv_expr_present): ... to here.
2623 * trans.h: Declare it.
2624 * trans-types.c (g95_sym_type): Assume subroutine if not specified.
2626 2003-01-28 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2628 * array.c (expand_iterator): Suppress useless assignment.
2629 * decl.c (match_char_spec): Ditto.
2630 * io.c (match_io_iterator): Ditto.
2631 * primary.c (match_real_constant): Ditto.
2632 * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
2633 Ditto. Also, use g95_intrinsic_op not int for intrinsic operators.
2634 * matchexp.c (match_add_operand, match_level_5): Likewise.
2635 * module.c (parse_atom, find_enum): Likewise.
2636 * resolve.c: move #include <string.h>
2637 (resolve_select): Fix serious typo.
2639 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.n>
2641 * Make-lang.in: Don't build with broken tree-ssa-pre.
2643 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.nl>
2645 * resolve.c (resolve_index): Add a TODO.
2646 * symbol.c: Remove useless "#include <ctype.h>".
2648 2003-01-27 Paul Brook <paul@nowt.org>
2650 * check.c (check_rest): Allow different type kinds as an extension.
2651 * g95.h (g95_resolve_f): Add f1m.
2652 * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
2653 * intrinsic.h: Chenge prototypes for MIN and MAX.
2654 * iresolve.c (g95_resolve_minmax): New function.
2655 (g95_resolve_min, g95_resolve_max): Use it.
2656 * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
2658 (g95_conv_intrinsic_present): Fix logic.
2660 2003-01-27 Steven Bossche <s.bosscher@student.tudelft.nl>
2662 * g95.h (g95_case): Don't be a tree, be a double linked list.
2663 * match.c (match_case_selector): Remove redundant semantics check.
2664 Clean up a few goto's to make it a tiny little bit faster.
2665 * resolve.c (case_tree): Die.
2666 (compare_cases): Accept and compare unbounded cases too.
2667 (check_case_overlap): Don't build a tree. Instead, merge-sort the
2668 whole list of g95_cases passed from resolve_select.
2669 (sane_logical_select): Die.
2670 (check_case_expr): Return FAILURE if a CASE label is of the wrong
2672 (resolve_select): Fixup case expression for computed GOTOs, put it
2673 in expr, not expr2, for easier handing in the parse tree dumper and
2674 the code generator. Rewrite the rest of the function: Kill
2675 unreachable case labels and unreachable case blocks.
2676 * dump-parse-tree.c (g95_show_code_node): Always dump expr for
2677 an EXEC_SELECT, not case2 anymore.
2678 * trans-const.c (g95_conv_constant_to_tree): New function.
2679 (g95_conv_constant): Use it.
2680 * trans-const.h: Declare prototype for the new function.
2681 * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
2682 g95_trans_character_select): New static functions.
2683 (g95_trans_select): Rewrite.
2685 2003-01-26 Paul Brook <paul@nowt.org>
2687 * intrinsic.c (add_fnctions): Properly add dreal.
2688 * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
2689 (g95_conv_intrinsic_function): Use it.
2690 * trans-io.c (build_dt): Abort on internal files (unimplemented).
2692 2003-01-26 Paul Brook <paul@nowt.org>
2694 Widespread changes to the handling of symbols in expressions. These
2695 are now linked via g95_symtree nodes.
2696 * parse.c (g95_fixup_sibling symbols): New function.
2697 (parse_contained): Use it.
2698 * g95.h (symbol_attribute): Add contained. Indicates a symbol is a
2699 contained procedure that has bee correctly fixed up.
2700 (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
2702 2003-01-24 Paul Brook <paul@nowt.org>
2704 * trans-array.c (g95_walk_expr): Function result attributes are in
2706 * trans-expr.c (g95_conv_function_call,
2707 g95_trans_arrayfunc_assign): Ditto.
2708 * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
2710 2003-01-23 Steven Bosscher <s.bosscher@student.tudelft.nl>
2712 * expr.c (check_restricted): Fix error message.
2713 * symbol.c (free_st_labels): Plug memleak.
2715 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
2717 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
2718 reduce_binary_aa, reduce_binary, eval_intrinsic,
2719 eval_intrinsic_f2): Use typesafe prototypes for eval functions.
2720 * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
2721 for typesafe intrinsics helper functions.
2722 (g95_intrinsic_sym): Use them.
2723 * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
2724 add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
2725 add_sym_5, add_conv, resolve_intrinsic, do_simplify,
2726 check_specific, g95_intrinsic_func_interface,
2727 g95_intrinsic_sub_interface): Adjust all calls to intrinsics
2729 * trans-decl.c (g95_get_extern_function_decl): Likewise.
2730 * Make-lang.in: Don't disable warnings for strict prototypes
2731 any longer, everything is typesafe now.
2733 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
2735 * bbt.c (duplicate_node): Make static.
2736 * module.c (module_name): Make static.
2737 * scanner.c (include_dirs): Make static.
2739 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
2741 Hard coded _gfor_'s should not show up anymore.
2742 * g95.h (PREFIX): New macro.
2743 * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
2745 (g95_resolve_random_number): Likewise.
2746 * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
2747 * trans-io.c: Remove 'prefix' macro. Replace all uses with
2748 the new PREFIX macro from g95.h.
2750 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
2752 The troubles of forking... Andy implemented this just now too.
2753 Let's stick to that and keep the trees close.
2754 * g95.h (g95_st_label): 'format' member is now a g95_expr.
2755 * io.c: Revert previous changes.
2756 (g95_match_format): Match the format string as a character
2758 * match.h (g95_statement_label): Declare external.
2759 * parse.c: Revert previous changes.
2760 * symbol.c (g95_free_st_label): Free a g95_expr instead
2762 * trans-io.c: Revert previous changes.
2763 (build_dt): Use set_string to set the format string.
2765 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
2767 * io.c (format_string): Make non-static.
2768 (g95_match_format): Remember the format string.
2769 (terminate_io): Add I/O termination for empty I/O lists.
2770 * match.h: Declare external format_string.
2771 * parse.c (check_statement_label): Attack the format string
2772 to a format label for FORMAT statements.
2773 * trans-io.c (g95_add_field): Define prefix macro. Replace
2774 all uses of PREFIX define with a use of this macro.
2775 (build_dt): Implement formatted I/O for format labels.
2777 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
2779 * lang-options.h: Kill "-std=F".
2780 * options.c: Remove unimplemented "-std=F". Modify
2782 * misc.c (g95_terminal_width): New function.
2783 * error.c (g95_error_init_1): Use g95_terminal_width.
2784 * g95.h: Add prototype for g95_terminal_width, remove
2787 2003-01-19 Steven Bosscher <s.bosscher@student.tudelft.nl>
2789 * Make-lang.in: Fix typo.
2791 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
2793 * g95.h (struct g95_case): Remove unused cruft, new member
2794 'where' to keep track of the locus of the default case.
2795 * match.c (g95_match_case): Add locus to the current case.
2796 (match_case_selector): Likewise.
2797 * parse.c (parse_select_block): Move semantics check for
2798 multiple DEFAULT cases out of here to...
2799 * resolve.c (check_case_overlap): ...here. Return sooner
2801 (check_case_expr): Take two g95_cases now, use to sure the
2802 expression kinds are the same.
2803 (resolve_select): Cleanup.
2805 2003-01-18 Paul Brook <paul@nowt.org>
2807 * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
2808 * trans-decl.c (g95_set_symbol_decl): Handle non-array result
2810 (g95_get_extern_function_decl): Put decls in the correct context.
2812 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
2814 * trans-io.c: Port changes from Andy to set ERR flag.
2816 2003-01-17 Paul Brook <paul@nowt.org>
2818 * trans-array.c: Add various comments.
2819 (g95_ss_terminator): Declare as const.
2820 (g95_walk_expr): Remove first parameter and update all callers.
2821 (g95_walk_op_expr): Initialize scalar SS properly.
2822 * trans-array.h (g95_walk_expr): Update prototype.
2823 * trans-expr.c: Update for new g95_walk_expr.
2824 * trans-intrinsic.c: Ditto.
2825 * trans-io.c: Ditto.
2826 * trans.h: Various comments for SS chains.
2828 2003-01-17 Paul Brook <paul@nowt.org>
2830 * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
2832 * intrinsic.c (add_functions): Use them.
2833 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
2834 * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
2836 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
2838 Fallout of a small merge conflict:
2839 * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
2841 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
2843 * initrinsic.c: New add_sym_* functions for strong typing.
2844 (add_conv): Make prototype strict.
2845 * dump-parse-tree.c, dependency.c: Include config.h
2846 * resolve.c, trans-io.c: Fix typos.
2848 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
2850 * dump-parse-tree.c (g95_show_code_node): Show the
2851 condition for a computed GOTO that was transformed
2852 to a SELECT CASE construct.
2853 * resolve.c (check_case_overlap): Revert previous switch
2854 to treaps, it was too slow and didn't catch all trouble.
2855 (resolve_symbol): Be more flexible about module procedures.
2856 * symbol.c (check_conflict): Point to relevant section in
2857 the standard for dubious conflict. Allow procedure
2858 dummy arguments to be optional again.
2859 * trans-io (add_field): Rename to g95_add_field. Change
2861 * trans-stmt (trans_select): Handle unbounded cases for
2862 integer SELECT CASE constructs. Fix/add more comment.
2864 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
2866 * g95.h: Uses GCC's function attribute macros.
2867 * error.c, module.c, parse.c, g95.h: More function attributes.
2869 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
2871 * trans-decl.c (get_label_decl): Use TREE_LINENO instead
2872 of DECL_SOURCE_LINE, and TREE_FILENAME instead of
2875 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
2877 * f95-lang.c (pushdecl): Use TREE_LINENO instead of
2879 * trans.c (g95_trans_code): Use annotate_all_with_file_line
2880 instead of nowdead wrap_all_with_wfl.
2882 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
2884 * parse.c (g95_parse_file): In verbose mode, dump the parse tree
2885 before generating code, so we can still see it even if the code
2886 generation phase dies.
2888 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
2890 * decl.c (build_sym): Split out initialization expression parts...
2891 (add_init_expr_to_sym): ...to here.
2892 (variable_decl): Add the symbol following an attribute list to the
2893 symbol tree before parsing the optional initialization expression
2894 if the symbol is not of a derived type.
2895 * primary.c (g95_match_rvalue): Don't assume a symbol always has
2896 a value if it is a PARAMETER.
2898 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
2900 * misc.c: Don't #include <mcheck.h>
2901 * module.c: Ditto. Kill uses of mtrace, muntrace. If there
2902 ever was a glibc bug, then either this was never reported to
2903 glibc people, or it has been fixed for so long that there's
2904 no information you can find about it, anywhere.
2906 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
2909 * module.c (attr_bits, bt_types, array_spec_types):
2910 Switch 'const' and 'static'.
2911 * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
2913 GNU'ify source code:
2914 * trans-io.c: Numerous fixes, one fixed warning and a few
2915 TODO markers so that we don't forget about them.
2917 2003-01-13 Paul Brook <paul@nowt.org>
2919 * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
2920 * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
2922 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
2923 * match.c (g95_match_stop): Fix dumb == -> != error.
2925 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
2927 * dump-parse-tree.c (show_indent): Add line breaks. This
2928 whole dumping process needs cleanups.
2929 * f95-lang.c (g95_mark_addressable): Fix prototype to match
2930 the langhook. Fix 'return's accordingly.
2931 * g95-support.h: Adjust prototype.
2932 * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
2933 * lang-options.h: Add '-fsyntax-only'.
2934 * options.c (g95_init_options): Init 'no_backend'.
2935 (g95_parse_arg): Deal with '-fsyntax-only'.
2936 * parse.c (g95_parse_file): Do not generate code if 'no_backend'
2939 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
2941 * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
2942 arguments. Also make sure that if a symbol is marked INTRINSIC,
2943 an intrinsic with the symbol's name actually exists.
2944 (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
2945 Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
2946 ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
2948 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
2950 * resolve.c (resolve_contained_functions): Fix condition, don't
2951 throw internal_error if a child namespace has no name. Apparently
2952 this can be the case?
2954 2003-01-11 Paul Brook <paul@nowt.org>
2956 Port changes from Andy's tree:
2957 * g95.h (g95_code): Add stop_code.
2958 * match.c (g95_match_stop): Detter syntax checking.
2959 * resolve.c (resolve_generic_f0): Return match type.
2960 (resolve_generic_f): Remove dead/duplicated code.
2961 (resolve_specific_f): Ditto.
2962 * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
2963 * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
2964 * trans-stmt.c (g95_trans_stop): Handle new STOP format.
2966 2003-01-11 Paul Brook <paul@nowt.org>
2968 * trans-array.c: Various documentation/comment changes.
2969 * trans-stmt.c: Ditto.
2972 2003-01-10 Paul Brook <paul@nowt.org>
2974 * options.c/h: Add -fdump-parse-tree as alias of -v.
2976 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
2978 * dump-parse-tree.c (g95_show_namespace): Fixed another
2979 typo. Sorry, it's Friday...
2981 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
2984 * trans-array.c, trans-array.h, trans.c, trans-const.c,
2985 trans-const.h, trans-decl.c, trans-expr.c, trans.h
2986 trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
2987 trans-types.c: Fix bogus copyright years, add 2003.
2988 * trans-types.h: Give copyright header.
2990 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
2992 * dump-parse-tree.c (g95_show_namespace): Fixed typo.
2993 * expr.c, options.c, scanner.c: Add some more 'const' markers.
2994 * intrinsic.c: Some constant strings moved to read-only memory.
2995 * io.c (format_asterisk): Move to...
2998 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3000 * dump-parse-tree.c (g95_show_namespace): Dump implicit
3001 types for ranges instead of per-letter. Indent the
3002 'CONTAINS' just like everything else.
3003 * resolve.c (resolve_contained_functions): Clarify comment.
3004 Explain non-obvious conditional expression. Improve
3005 diagnostics if tyoe cannot be resolved.
3006 Port semi-fix from Andy's tree:
3007 (was_declared): Move up before first use.
3008 (generic_sym, specific_sym): New functions. Code moved
3009 out if procedure_kind.
3010 (procedure_kind): Simplify using new functions.
3011 (resolve_generic_f): Make sure the functions we find in
3012 a parent namespace is generic.
3013 (resolve_specific_f): Ditto for specific functions.
3015 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3017 * trans-stmt.c, trans.c: Fix some code style issues. Add
3018 some more comment (but still not enough!).
3020 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3022 * symbol.c (flavors, procedures, intents, acces_types,
3023 access_types, ifsrc_types): Make const.
3024 * misc.c (g95_string2code): Make 'm' param 'const'.
3025 * module.c (find_enum, write_atom, mio_name): Make
3027 (attr_bits, bt_types, array_spec_types, array_ref_types,
3028 ref_types, expr_types): Make const.
3029 * g95.h: Adjust external decls.
3031 2003-01-09 Paul Brook <paul@nowt.org>
3033 * Testsuite: Add a load of new cases.
3035 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
3037 * Make-file.in: Add dependency on back end header files;
3038 a parallel build should work now.
3039 * f95-lang-c (lang_identifier): Remove bogus comment.
3040 (g95_be_parse_file): Fix prototype.
3041 (g95_init): Make static.
3042 (g95_finish): Make static.
3043 * error.c (g95_syntax_error): Kill. Make define in...
3044 * g95.h (g95_syntax_error): Define.
3045 (g95.options): Make 'source' member 'const'.
3046 * interface.c (g95_match_interface): Explain
3047 hard-to-read condition.
3048 (g95_match_end_interface): Ditto.
3049 * trans_const.c (g95_build_string_const): Make 's' parameter
3051 * trans_const.h: Adjust protoype accordingly.
3052 * trans-decl.c: Include tree-dump.h
3053 (g95_generate_function_code): Build fixes for recent changes
3054 in the tree-ssa branch.
3056 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
3058 * format.c: Kill, move code from here...
3060 * Make-lang.in: Adjust.
3063 * BUGS: Mention where to submit bugs. Move old content...
3064 * TODO: ...to here. New file.
3066 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
3067 Fix most warnings, and suppress the ones we can't fix for now.
3068 * Make-lang.in: Suppress warnings about bad proto's in g95.h,
3069 these warnings just clutter the screen and there's not much
3070 we can do about them for now anyway.
3071 * check.c, iresolve.c: Mark unused function parameters.
3072 * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
3073 they should be resolved before they get here.
3074 * error.c: Remove unused FILE *status_out.
3075 * f95-lang.c (g95_init): Remove bogus cast.
3076 * Many files: Make things 'const' where required.
3077 * g95.h: Fix prototypes for all modified functions above.
3078 (g95_options): Remove 'object' member.
3080 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
3082 * Make-file.in: Cleanup bogus targets. Add more comment.
3083 * lang-options.h: New option '-w'.
3084 * g95.h: add no_options field to struct g95_options.
3085 * options.c (g95_init_options): Default no_warnings to off.
3086 (g95_parse_arg): Recognise the '-w' switch and its alias,
3088 * error.c (g95_warning, g95_warning_now): Don't emit warning if
3089 no_warning option is set.
3090 * iresolve.c (g95_resolve_shape): Fix warning.
3092 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
3094 * primary.c (g95_next_string_char): Rename next_string_char, and
3095 make static. Adjust callers accordingly.
3096 * resolve.c (resolve_generic_f0): Return try, not match. Adjust
3097 callers accordingly.
3098 * g95.h: Split out all g95_match* functions to...
3099 * match.h: ...here. New file.
3100 * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
3101 matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
3103 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
3105 * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
3106 g95_merge_new_implicit): New functions.
3107 (g95_match_implicit_none, g95_match_implicit): Move from here...
3108 * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
3109 Modify to use the new functions in symbol.c.
3110 * g95.h: Add and move prototypes.
3112 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
3114 * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
3115 node compare function.
3116 (g95_insert_bbt): Likewise.
3117 (g95_insert_bbt_with_overlap): Likewise.
3118 (g95_delete_bbt): Likewise.
3119 (delete_treap): Likewise. Also fix a potential bug when calling it.
3120 * module.c (compare_pointers): Change proto to compare_fn.
3121 (compare_integers): Likewise.
3122 (compare_true_names): Likewise.
3123 (find_true_name): Adjust call to compare_true_names to match proto.
3124 (require_atom, write_atom, mio_name): Fix 'const' warnings.
3125 (init_pi_tree): Make compare a compare_fn instead of (int *).
3126 * resolve.c (compare_cases): Change proto to compare_fn.
3127 * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
3128 it static, and rename to compare_symtree.
3129 (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
3131 * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
3132 of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
3134 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
3135 * Make-lang.in: Fix spaces/tabs issues from previous patch.
3136 * patch.options: Blow away Paul's checkin mistake :-)
3137 * io.c (terminate_io): Fix memory leak (Arnaud).
3139 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
3141 * Make-lang.in: Teach about building DVI, info manual.
3142 * g95.texi: New file.
3144 2003-01-02 Paul Brook <paul@nowt.org>
3146 * trans-array.c (g95_reverse_ss): Make static and don't use.
3147 (g95_conv_ss_descriptor): Don't use g95_loopinfo
3148 (g95_conv_array_parameters): Modify for pointer assignments.
3149 (g95_walk_subexpr): New function.
3150 (g95_walk_expr*): Use it.
3151 * trans-array.h (g95_reverse_ss): Remove prototype.
3152 * trans-expr.c (g95_trans_pointer_assign): Implement.
3153 (Many): Set se.want_pointer before calling g95_conv_array_parameter.
3154 * trans-intrinsic.c: Sync with scalarizer changes.
3155 * trans-io.c: Ditto.
3157 2002-12-29 Paul Brook <paul@nowt.org>
3159 * trans-array.c: Document calling convention for arrays.
3161 2002-12-19 Paul Brook <paul@nowt.org>
3163 * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
3164 assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
3165 optional parameters for some intrinsics.
3166 (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
3167 * trans-expr.c (g95_conv_function_call): Pass NULL for absent
3168 optional parameters.
3169 * trans.h (g95_se): Add ignore_optional flag.
3171 2002-12-15 Paul Brook <paul@nowt.org>
3173 * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
3174 * trans-decl.c (g95_generate_function_code): Use TDI_original.
3176 2002-12-14 Paul Brook <paul@nowt.org>
3178 * trans-stmt.c (g95_trans_call): Use resolved symbol name.
3180 2002-12-12 Paul Brook <paul@nowt.org>
3182 * trans-array.c (g95_trans_array_constructor_subarray): Fully
3183 initialize the scalarizer.
3184 (various): Update to new format of g95_expr->value.constructor.
3186 2002-12-08 Paul Brook <paul@nowt.org>
3188 * trans-array.c (g95_put_offset_into_var): New function.
3189 (g95_trans_array_constructor_subarray): New function.
3190 (g95_trans_array_constructor_value): Use it.
3191 (g95_array_cons_size): Don't abort() on array components.
3193 2002-12-08 Paul Brook <paul@nowt.org>
3195 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
3196 * support.c: Update #includes.
3197 (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
3198 * trans-array.c: Update #includes.
3200 * trans-const.c: Ditto.
3201 * trans-io.c: Ditto.
3202 * trans-types.c: Ditto.
3203 (g95_init_types): Set size_type_node.
3204 * trans-decl.c: Update #includes.
3205 (gfor_fndecl_adjust{l,r}): Declare and initialize.
3206 * trans-stmt.c: Update #includes.
3207 (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
3208 (g95_trans_select): Fix check for unbounded ranges.
3209 * trans-expr.c: Update #includes.
3210 (g95_conv_string_tmp): New function.
3211 (g95_conv_concat_op): Use it.
3212 * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
3213 * Trans-intrisic.c: Update #includes.
3214 (g95_conv_intrinsic_strcmp): New function.
3215 (g95_conv_intrinsic_adjust): Ditto.
3216 (g95_conv_intrinsic_function: Use them.
3218 2002-11-30 Paul Brook <paul@nowt.org>
3220 * trans-array.c (g95_walk_function_expr): Handle non-array return by
3222 * trans-dec.c (g95_build_function_decl): Handle character return
3224 (g95_get_fake_result_decl): Ditto.
3225 (g95_trans_deferred_vars): Ditto.
3226 * trans-expr.c (g95_conv_function_call): Ditto.
3227 (g95_trans_arrayfunc_assign) Limit to array valued functions.
3228 * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
3229 (g95_conv_intrinsic_function): Use it.
3230 * trans-types.c (g95_sym_type): Handle functions returning strings.
3231 (g95_return_by_reference): Ditto.
3232 (g95_get_function_type): Ditto.
3234 2002-11-18 Paul Brook <paul@nowt.org>
3236 * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
3237 requires a temporary.
3238 (g95_trans_select): Handle computed gotos.
3239 * trans-types.c (g95_build_array_type): Warn about non-functional
3240 assumed shape arrays.
3241 * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
3243 * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
3244 (g95_conv_intrinsic_int): New function.
3245 (g95_conv_intrinsic_mod): New function.
3246 (g95_conv_intrinsic_ichar): New function.
3247 (g95_conv_intrinsic_function): Use them.
3248 (g95_conv_intrinsic_dim): Use g95_evaluate_now.
3250 2002-11-17 Toon Moene <toon@moene.indiv.nluug.nl>
3252 * trans-types.c (g95_build_array_type): Assumed
3253 sized arrays can have rank > 1.
3254 * trans.c (g95_trans_code): Remove erroneous
3255 warning about CONTINUE.
3256 * trans-expr.c (g95_conv_variable): Remove
3259 2002-11-15 Paul Brook <paul@nowt.org>
3261 * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
3263 2002-10-31 Paul Brook <paul@nowt.org>
3265 * f95-tree.c: Remove tree copying stuff that's now in gimple.c
3266 * trans-expr.c (g95_conv_component_ref): Handle character string
3268 (g95_conv_string_parameter): Ditto.
3269 * trans-types.c (g95_get_derived_type): Add length decl to caracter
3272 2002-10-10 Paul Brook <paul@nowt.org>
3274 * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
3275 * trans-expr.c (g95_conv_function_call): Remove unreliable return value
3277 * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
3278 (g95_conv_intrinsic_function): Handle size and shape intrinsics.
3279 (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
3280 * trans-types.c (pvoid_type_node): Declare and initialize.
3281 * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
3282 (g95_array_allocate): Fix when base==data.
3283 (g95_conv_array_parameter): Correctly handle reduced rank sections.
3284 * trans-io.c (g95_trans_write): Correctly handle string modifiers.
3286 2002-10-09 Paul Brook <paul@nowt.org>
3288 * (g95_conv_expr_reference): Handle character strings correctly.
3290 2002-10-07 Paul Brook <paul@nowt.org>
3292 (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
3294 * trans-array.c (g95_build_array_initializer): Remove.
3295 (g95_conv_array_initializer): New Function.
3296 (g95_trans_auto_arry_allocation): Cleanup.
3297 (g95_trans_init_character_array): Remove.
3298 * g95spec.c: Link in libgforbegin.
3299 * trans.c (g95_generate_code): Rename main function to MAIN__.
3300 (g95_create_var): New function.
3301 (g95_create_var_np): New function.
3302 (g95_evaluate_now): New function.
3303 (g95_start_block): New function.
3304 (g95_finish_block): New function.
3305 (g95_add_expr_to_block): New function.
3306 (g95_add_block_to_block): New function.
3307 * trans-expr.c (g95_conv_componen_ref): New function.
3308 * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
3309 (F95_OBJS): Add dependency.o.
3310 * f95-lang.c (g95_is_simple_stmt): Remove.
3311 * f95-tree.c (mark_not_simple): New function.
3312 (unshare_all_trees): New function.
3313 (create_tmp_var, create_tmp_alias_var): Remove.
3314 * support.c (declare_tmp_vars, tree_last_decl): Remove.
3315 * trans*: Convert to new IR using GENERIC trees. Don't bother about
3316 SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
3318 2002-10-01 Paul Brook <paul@nowt.org>
3320 * trans-array.c: Add support for descriptorless arrays.
3321 (g95_conv_array_data): New function.
3322 (g95_conv_array_base): New function.
3323 * trans-array.h: Declare these here.
3324 * trans-decl.c(g95_create_mopdule_variable): Perform variable
3325 initialization and creation here.
3326 (g95_create_module_vars): Instead of here.
3327 * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
3328 * trans-intrinsic.c: Ditto.
3329 * trans-types.c (g95_is_nodesc_array): New function.
3330 (g95_get_nodesc_array_type): New function.
3331 (g95_sym_type, g95_get_derived_type): Use them.
3332 * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
3334 2002-09-28 Paul Brook <paul@nowt.org>
3336 * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
3337 * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
3340 2002-09-24 Paul Brook <paul@nowt.org>
3342 * f95-lang.c (listify): Remove declaration.
3343 (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
3345 * f95-tree.c (get_name): New function.
3346 * trans.c (module_namespace): Remove.
3347 * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
3348 * trans-types.c: Ditto.
3350 2002-09-19 Paul Brook <paul@nowt.org>
3352 * trans-array.c (g95_get_array_cons_size): New Function.
3353 (g95_con_ss_startstride): Handle Array constructors.
3354 (g95_conv_loop_setup): Ditto.
3355 (g95_conv_array_parameter): Ditto.
3356 * tras-decl.c (g95_finish_var_decl): Make initializes variables
3359 2002-09-19 Paul Brook <paul@nowt.org>
3361 * trans.c (g95_simple_fold_tmp): Detect variables inside
3363 * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
3365 2002-09-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
3367 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
3369 2002-09-14 Paul Brook <paul@nowt.org>
3371 * trans.c (g95_create_module_variable): Move to trans-decl.c.
3372 * trans-const.c (g95_conv_string_init): New Function.
3373 * trans-const.h: Declare it.
3374 * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
3375 variables. Don't bail on intrinsic symbols.
3376 (get_extern_function_decl): Handle specific intrinsic functions.
3377 * trans-types.c (g95_sym_type): Dummy functions don't return
3379 * trans-array.c (g95_build_array_initializer): New Function.
3380 (g95_trans_auto_array_allocation): Build initializer for static decls.
3381 Don't use mpz_addmul, it's GMP4 only.
3383 2002-09-12 Paul Brook <paul@nowt.org>
3385 * trans-decl.c (g95_generate_code): Fix thinko with return variable.
3386 (g95_get_extern_function_decl, g95_build_function_decl): Mangle
3387 assembler names for module procedures.
3389 2002-09-11 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
3391 * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
3394 2002-09-10 Paul Brook <paul@nowt.org>
3396 * trans-array.c: Change format of G95_SS_TEMP strictures.
3397 (g95_check_fncall_dependancy): New function.
3398 (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
3400 * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
3402 (g95_build_function_decl): Don't assume result arrays are packed.
3403 (g95_trans-deferred-vars): Handle array result variables.
3404 (g95_generate_fuction_code): Clear saved_function_decls.
3405 * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
3407 (g95_trans_arrayfunc_assign): New function.
3408 (g95_trans_assignment): Use it.
3409 * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
3410 (g95_se): Add direct_byref.
3411 * trans-types.c: Use sym->result rather than sym where appropriate.
3412 * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
3413 Update other functions to use this.
3414 (g95_is_intrinsic_libcall): New function.
3415 (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
3416 (g95_walk_intrinsic_function): Ditto.
3418 2002-09-08 Paul Brook <paul@nowt.org>
3420 * trans-types.c: Change rank field to dtype field in array descriptor.
3421 * trans-array.c: Implement filling of dtype array descriptor field.
3422 * trans-intrinsic.c: Fix broken LEN intrinsic.
3424 2002-09-07 Paul Brook <paul@nowt.org>
3426 * trans-intrinsic.c: Remove outdated todo intrinsic list.
3427 (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
3428 (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
3430 2002-09-06 Paul Brook <paul@nowt.org>
3432 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
3433 (gt-f95-trans-types.h): Add dependancy information.
3434 * config-lang.in (gtfiles): Add trans-types.c
3435 * f95-lang.c (g95_be_parse_file): Pass error and warning counts
3436 back to top-level code.
3437 * trans-array.c, trans-types.c: Change format of array descriptor.
3438 (g95_conv_descriptor_dimension): New function.
3439 * trans-types.h (g95_conv_descriptor_rank): define.
3440 * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
3443 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
3445 * trans-array.c, trans-types.c: Add rank information to descriptor.
3447 2002-09-06 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
3449 * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
3451 2002-09-04 Paul Brook <paul@nowt.org>
3453 * f95-lang.c (g95_create_decls): New function.
3454 (g95_init): Move initialization of external decls to above, and call
3455 from g95_be_parse_file.
3456 * trans.c (g95_finish_stmt): Don't amputate the decl chain.
3457 * trans-types.c (g95_init_types): Always name integer and char types.
3458 (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
3460 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
3462 * Make-lang.in: Add options.c to F95_PARSER_OBJS
3464 2002-09-02 Paul Brook <paul@nowt.org>
3466 * g95_generate_code: Clear the attr for __fortran_main.
3467 * trans-types.c (g95_finish_type): New function.
3468 * g95_init_io_state_type: Use g95_finish_type.
3469 * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
3471 2002-09-01 Paul Brook <paul@nowt.org>
3473 * README.backend: Warn about the dangers of extra config.h files.
3474 Remove obsolete libgfor stuff.
3475 * config-lang.in: Add target-libgfor dependancy.
3476 * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
3478 2002-09-01 Toon Moene <toon@moene.indiv.nluug.nl>
3480 * g95_conv_mpz_to_tree: Free storage pointed to by q,
3483 2002-08-30 Paul Brook <paul@nowt.org>
3485 * trans-intrinsic.c (g95_conv_intrinsic_function,
3486 g95_walk_intrinsic_function): Added ANY and ALL.
3487 (g95_conv_intrinsic_anyall): New function.
3488 * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in