1 2004-06-20 Steven G. Kargl <kargls@comcast.net>
3 * arith.c (gfc_range_check): correct complex underflow.
5 2004-06-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
8 * match.c (match_case_selector): Call gfc_match_init_expr
9 instead of gfc_match_expr.
10 * resolve.c (validate_case_label_expr): No need to check for
11 constant, since it wouldn't have been matched with the fix to
14 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
17 * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
20 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
23 * trans-deecl.c (generate_local_decl): Do not issue warning for
24 unused variables if they're use associated.
26 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
27 Andrew Vaught <andyv@firstinter.net>
30 * gfortran.h (gfc_check_f): Add new field f3ml.
31 * check.c (gfc_check_minloc_maxloc): Take argument list instead
32 of individual arguments, reorder if necessary.
33 * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
34 * intrinsic.c (add_sym_3ml): New function.
35 (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
36 (check_specific): Catch special case MINLOC, MAXLOC.
38 2004-06-14 Paul Brook <paul@codesourcery.com>
40 * intrinsic.c (add_sym_2s): Use correct function types.
42 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
44 * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize. Move data.c
45 * data.c (gfc_get_section_index): Remove dependency on trans.h.
47 2004-06-12 Steven G. Kargl <kargls@comcast.net>
49 * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
50 gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
51 * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
52 GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
53 * trans-intrinsic.c: Use symbols.
54 * intrinsic.c (add_sym_2s): New function.
55 * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
56 * intrinsic.h: Function prototypes.
57 * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
58 gfc_resolve_srand): New functions.
60 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
63 * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
66 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
69 * interface.c (compare_parameter, compare_actual_formal): Don't
70 check types and array shapes for NULL()
71 * trans-expr.c (conv_function_call): No double indirection for
74 2004-06-09 Toon Moene <toon@moene.indiv.nluug.nl>
76 * trans-expr.c (gfc_conv_cst_int_power): Compute
77 x**(-n) by converting it to (1/x)**n instead of
80 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
83 * module.c (write_symbol, write_symtree): Don't write symbols
84 wrongly added to namespace.
85 * trans-decl.c (gfc_create_module_variable): Don't create a
86 backend decl for a symbol incorrectly added to namespace.
88 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
91 * resolve.c (resolve_symbol): Verify that parameter array has an
92 explicit shape. Fix typos and coding style issues in surrounding
95 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
98 * gfortran.texi: The documentation doesn't contain infomration on
99 how to report bugs, and shouldn't, so remove the line which
102 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
104 * intrinsic.c (sort_actual): Keep track of type of missing
105 arguments. (Missing from previous commit.)
107 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
109 * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
110 * interface.c (compare_actual_formal): Keep type of omitted
112 * trans-expr.c (gfc_conv_function_call): Add string length
113 argument for omitted string argument.
115 2004-06-03 Paul Brook <paul@codesourcery.com>
117 * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
118 lists instead of compound expr chains.
119 (gfc_trans_code): Annotate statement lists.
121 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
123 * trans-array.c: Fix spelling in comments.
125 2004-06-02 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
128 * data.c (assign_substring_data_value): New function.
129 (gfc_assign_data_value): Call the new function if we're dealing
130 with a substring LHS.
132 2004-06-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
135 * gfortran.h (GFC_VERSION): Remove.
136 * gfortran.texi (version-gfortran): Remove, replace by version-GCC
139 2004-05-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
141 * trans-types.c: Fix spelling & layout in comments.
143 2004-05-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
146 * trans-const.c (gfc_conv_string_init): Allow variable string
147 length lower than initialization string length.
149 2004-05-30 Paul Brook <paul@codesourcery.com>
152 * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
153 * trans-expr.c (gfc_trans_string_copy): New function.
154 (gfc_conv_statement_function): Use them. Create temp vars. Enforce
156 (gfc_conv_string_parameter): Use gfc_trans_string_copy.
157 * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
158 * trans.h (struct gfc_saved_var): Define.
159 (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
161 2004-05-30 Steven G. Kargl <kargls@comcast.net>
163 * iresolve.c (gfc_resolve_random_number): Clean up conditional.
165 2004-05-29 Steven G. Kargl <kargls@comcast.net>
167 * simplify.c (gfc_simplify_log): Remove useless line of code.
169 2004-05-29 Paul Brook <paul@codesourcery.com>
171 * trans-common.c (find_equivalence): Find multiple rules.
173 2004-05-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
175 * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
176 (gfc_current_locus): Declare new global variable.
177 * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
178 (gfc_current_locus1): Rename ...
179 (gfc_current_locus): ... to this.
180 (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
181 skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
182 gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
183 gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
184 and gfc_current_locus(), respectively.
185 * array.c (match_subscript, gfc_match_array_ref, match_array_list,
186 match_array_cons_element, gfc_match_array_constructor):
187 Read/modify gfc_current_locus instead of calling gfc_set_locus()
188 and gfc_current_locus().
189 * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
190 match_attr_spec, gfc_match_function_decl, gfc_match_end,
191 attr_decl1, gfc_match_save): Likewise.
192 * error.c (error_print, gfc_internal_error): Likewise.
193 * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
194 * interface.c (gfc_add_interface): Likewise.
195 * io.c (gfc_match_format, match_dt_format, match_dt_element,
196 match_io_iterator, match_io): Likewise.
197 * match.c (gfc_match_space, gfc_match_eos,
198 gfc_match_small_literal_int, gfc_match_st_label,
199 gfc_match_strings, gfc_match_name, gfc_match_iterator,
200 gfc_match_char, gfc_match, gfc_match_assignment,
201 gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
202 gfc_match_nullify, gfc_match_call, match_implicit_range,
203 gfc_match_implicit, gfc_match_data, match_case_selector,
204 gfc_match_case, match_forall_iterator): Likewise.
205 * matchexp.c (gfc_match_defined_op_name, next_operator,
206 match_level_1, match_mult_operand, match_ext_mult_operand,
207 match_add_operand, match_ext_add_operand, match_level_2,
208 match_level_3, match_level_4, match_and_operand, match_or_operand,
209 match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
210 * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
211 * parse.c (match_word, decode_statement, next_free, next_fixed,
212 add_statement, verify_st_order, parse_if_block, gfc_parse_file):
214 * primary.c (match_digits, match_integer_constant,
215 match_boz_constant, match_real_constant, match_substring,
216 next_string_char, match_charkind_name, match_string_constant,
217 match_logical_constant, match_const_complex_part,
218 match_complex_constant, match_actual_arg, match_keyword_arg,
219 gfc_match_actual_arglist, gfc_match_structure_constructor,
220 gfc_match_rvalue, gfc_match_variable): Likewise.
221 * st.c (gfc_get_code): Likewise.
222 * symbol.c (check_conflict, check_used, check_done,
223 duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
224 gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
225 gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
227 2004-05-26 Roger Sayle <roger@eyesopen.com>
229 * io.c (format_asterisk): Silence compiler warnings by correcting
230 the number of elements of a "locus" initializer.
232 2004-05-25 Roger Sayle <roger@eyesopen.com>
235 * matchexp.c: Allow unary operators after arithmetic operators
237 (match_ext_mult_operand, match_ext_add_operand): New functions.
238 (match_mult_operand): Tweak to call match_ext_mult_operand.
239 (match_add_operand): Tweak to call match_ext_mult_operand.
240 (match_level_2): Rearrange to call match_ext_add_operand.
242 2004-05-25 Paul Brook <paul@codesourcery.com>
244 * expr.c (check_inquiry): Remove bogus tests.
246 2004-05-23 Paul Brook <paul@codesourcery.com>
249 * expr.c (restricted_args): Remove redundant checks/argument.
250 (external_spec_function): Update to match.
251 (restricted_intrinsic): Rewrite.
253 2004-05-23 Paul Brook <paul@codesourcery.com>
254 Victor Leikehman <lei@haifasphere.co.il>
256 * gfortran.h (struct gfc_symbol): Add equiv_built.
257 * trans-common.c: Change int to HOST_WIDE_INT. Capitalize error
259 (current_length): Remove.
260 (add_segments): New function.
261 (build_equiv_decl): Create initialized common blocks.
262 (build_common_decl): Always add decl to bindings.
263 (create_common): Create initializers.
264 (find_segment_info): Reformat to match coding conventions.
265 (new_condition): Use add_segments.
266 (add_condition, find_equivalence, add_equivalences): Move iteration
267 inside functions. Only process each segment once.
268 (new_segment, finish_equivalences, translate_common): Simplify.
270 2004-05-23 Steven G. Kargl <kargls@comcast.net>
272 * check.c (gfc_check_random_seed): Issue for too many arguments.
274 2004-05-22 Steven G. Kargl <kargls@comcast.net>
276 * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
278 2004-05-22 Paul Brook <paul@codesourcery.com>
280 * dump-parse-tree.c (gfc_show_equiv): New function.
281 (gfc_show_namespace): Use it.
283 2004-05-22 Victor Leikehman <lei@haifasphere.co.il>
286 * symbol.c (gfc_add_common): Disable checks to work around other more
287 fundamental inadequacies.
289 2004-05-22 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
291 * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
293 (gfc_build_function_decl): Likewise.
295 2004-05-22 Steven G. Kargl <kargls@comcast.net>
297 * check.c (gfc_check_system_clock): New function.
298 * intrinsic.c (add_sym_3s): New function.
299 (add_subroutines): Use it.
300 * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
302 * iresolve.c (gfc_resolve_system_clock): New function.
304 2004-05-22 Steven G. Kargl <kargls@comcast.net>
306 * invoke.texi: Document -Wunderflow and spell check.
307 * lang.opt: Add Wunderflow.
308 * gfortran.h (gfc_option_t): Add warn_underflow option.
309 * options.c (gfc_init_options, set_Wall): Use it.
310 * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
311 * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
312 gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
313 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
314 * arith.c (common_logarithm): Fix typo in comment.
316 2004-05-21 Roger Sayle <roger@eyesopen.com>
318 * io.c (check_format): As a GNU extension, allow the comma after a
319 string literal to be optional in a format. Use gfc_notify_std to
320 issue an error/warning as appropriate.
322 2004-05-21 Roger Sayle <roger@eyesopen.com>
324 * io.c (check_format): Use gfc_notify_std to determine whether to
325 issue an error/warning for omitting the digits from the X format.
327 2004-05-20 Roger Sayle <roger@eyesopen.com>
329 * io.c (check_format): Allow the number before the X format to
330 be optional when not -pedantic.
332 2004-05-18 Feng Wang <fengwang@nudt.edu.cn>
333 Paul Brook <paul@codesourcery.com>
335 * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
336 Create decls for __builtin_pow{,f}.
337 * gfortran.h (PREFIX_LEN): Define.
338 * trans-decl.c (gfor_fndecl_math_powi): Add.
339 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
340 (gfc_build_intrinsic_function_decls): Create decls for powi.
341 * trans-expr.c (powi_table): Add.
342 (gfc_conv_integer_power): Remove.
343 (gfc_conv_powi): New function.
344 (gfc_conv_cst_int_power): New function.
345 (gfc_conv_power_op): Use new powi routines.
346 * trans.h (struct gfc_powdecl_list): Add.
347 (gfor_fndecl_math_powi): Add.
348 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
350 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
352 * trans.c, trans-decl.c: Fix comment typos.
354 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
356 * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
358 2004-05-18 Steve Kargl <kargls@comcast.net>
360 * arith.c (gfc_int2complex): Fix incorrect range checking.
362 2004-05-18 Paul Brook <paul@codesourcery.com>
365 * decl.c (add_init_expr_to_sym): Remove incorrect check.
366 (default_initializer): Move to expr.c.
367 (variable_decl): Don't assign default initializer to variables.
368 * expr.c (gfc_default_initializer): Move to here.
369 * gfortran.h (gfc_default_initializer): Add prototype.
370 * resolve.c (resolve_symbol): Check for illegal initializers.
371 Assign default initializer.
373 2004-05-17 Steve Kargl <kargls@comcast.net>
375 * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
377 2004-05-17 Steve Kargl <kargls@comcast.net>
379 * arith.c (gfc_real2complex): Range checking wrong part of complex
382 2004-05-16 Paul Brook <paul@codesourcery.com>
384 * options.c (gfc_handle_module_path_options): Fix buffer overrun.
386 2004-05-16 Paul Brook <paul@codesourcery.com>
388 * arith.c (gfc_range_check): Fix logic error.
390 2004-05-16 Steve Kargl <sgk@troutmask.apl.washington.edu>
392 * arith.c: Fix comment typos.
394 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
397 * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
398 not initialized in a disallowed fashion.
399 * match.c (gfc_match_common): Likewise.
400 (var_element): Verify that variable is not in the blank COMMON,
401 if it is in a common.
403 2004-05-15 Joseph S. Myers <jsm@polyomino.org.uk>
405 * Make-lang.in (f95.generated-manpages): Remove.
407 (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
408 f95.maintainer-clean): Generate info and dvi files in objdir/doc.
411 (f95.install-info): Remove.
414 2004-05-15 Victor Leikehman <lei@haifasphere.co.il>
416 * decl.c (add_init_expr_to_sym): Check for variable size arrays.
418 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
420 * primary.c (match_boz_constant): Use gfc_notify_std() for
421 issuing a warning or an error.
423 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
426 * primary.c (match_structure_constructor): Rename ...
427 (gfc_match_structure_constructor): ... to this. Make non-static.
428 (gfc_match_rvalue): Call renamed function.
429 * match.h (gfc_match_structure_constructor): Declare.
430 * match.c (gfc_match_data_constant): Handle structure
433 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
437 * gfortran.h (gfc_linebuf): New typedef.
439 (gfc_file): Revamped, use new gfc_linebuf.
440 (locus): Revamped, use new types.
441 (gfc_current_file): Remove.
442 (gfc_current_form, gfc_source_file): New global variables.
443 * match.c (gfc_match_space, gfc_match_strings): Use
444 gfc_current_form to find source form.
445 * module.c (gfc_dump_module): Use gfc_source_file when printing
447 * error.c (show_locus, show_loci) Use new data structures to print
449 * scanner.c (first_file, first_duplicated_file, gfc_current_file):
451 (file_head, current_file, gfc_current_form, line_head, line_tail,
452 gfc_current_locus1, gfc_source_file): New global variables.
453 (gfc_scanner_init1): Set new global variables.
454 (gfc_scanner_done1): Free new data structures.
455 (gfc_current_locus): Return pointer to gfc_current_locus1.
456 (gfc_set_locus): Set gfc_current_locus1.
457 (gfc_at_eof): Set new variables.
458 (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
459 to new locus structure.
460 (gfc_check_include): Remove.
461 (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
462 (gfc_skip_comments): Use gfc_current_form, find locus with
464 (gfc_next_char): Use gfc_current_form.
465 (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
466 (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
468 (get_file): New function.
469 (preprocessor_line, include_line): New functions.
470 (load_file): Move down, rewrite to match new data structures.
471 (gfc_new_file): Rewrite to match new data structures.
472 * parse.c (next_statement): Remove code which is now useless. Use
473 gfc_source_form and gfc_source_file where appropriate.
474 * trans-decl.c (gfc_get_label_decl): adapt to new data structures
475 when determining locus of frontend code.
476 * trans-io.c (set_error_locus): Same.
477 * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
478 * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
480 (all): Add missing initializers.
482 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
484 * Make-lang.in (trans-common.o): Remove redundant dependency.
485 (data.c): Replace object file name ...
486 (data.o): ... by the correct one.
488 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
490 * dump-parse-tree.c (gfc_show_array_ref): Print colon only
491 for ranges when dumping array references.
493 2004-05-14 Victor Leikehman <lei@haifasphere.co.il>
495 * decl.c (variable_decl): Always apply default initializer.
497 2004-05-08 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
500 * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
501 handle zero correctly.
503 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
505 * match.c (gfc_match): Eliminate dead code.
507 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
509 * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
510 Detect bad continuation line in fixed form sources.
512 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
515 * iresolve.c (gfc_resolve_nearest): Add new function.
516 * intrinsic.h: ... declare it here.
517 * intrinsic.c (add_functions): ... add it as resolving function
520 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
523 * match.c (gfc_match_do): Allow infinite loops with
524 label-do-stmt. Do not enforce space after comma.
526 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
529 * parse.c (parse_interface): Allow empty INTERFACE, remove
532 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
534 * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
535 decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
536 expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
537 intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
538 matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
539 primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
540 trans-array.c, trans-array.h, trans-common.c, trans-const.c,
541 trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
542 trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
543 trans-types.h, trans.c, trans.h: Update copyright years and
545 * data.c: Likewise, also removed two whitespace-only lines.
546 * gfortranspec.c, lang.opt: Update copyright years.
548 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
551 * trans-decl.c (generate_local_decl): Don't warn for unused
552 variables which are in common blocks.
554 2004-05-13 Diego Novillo <dnovillo@redhat.com>
556 * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
557 trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
558 trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
560 2004-05-13 Victor Leikehman <lei@haifasphere.co.il>
563 * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
565 2004-05-13 Joseph S. Myers <jsm@polyomino.org.uk>
567 * gfortran.texi: Use @table @emph instead of @itemize @emph.
568 Remove "set DEVELOPMENT".
569 (Compiling GFORTRAN): Remove.
571 2004-05-09 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
573 * array.c (match_subscript, match_array_ref): Add comments
574 explaining argument 'init'.
575 * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
576 trans-expr.c, trans.c: Fix some typos in comments.
577 * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
578 * primary.c (match_digits, match_integer_constant): Add comment
581 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
584 * primary.c: Include system.h and flags.h, needed for pedantic.
585 (match_boz_constant): Allow "x" for hexadecimal constants, warn if
588 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
591 * match.c (match_data_constant): Handle case where
592 gfc_find_symbol sets sym to NULL
594 2004-04-28 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
596 * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
597 dependency on mathbuiltins.def
599 2004-04-24 Victor Leikehman <lei@il.ibm.com>
601 * trans-io.c (transfer_expr): Implemented recursive printing
604 2004-04-24 Andrew Pinski <pinskia@physics.uc.edu>
606 * gfortranspec.c: Do not include multilib.h.
608 2004-04-24 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
610 * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
611 2004 to copyright years.
612 * trans-expr.c, trans-decl.c: Comment update, we now generate
613 GENERIC, not SIMPLE. Add 2004 to copyright years.
615 2004-04-24 Paul Brook <paul@codesourcery.com>
617 * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
619 2004-04-24 Feng Wang <fengwang@nudt.edu.cn>
622 * arith.c (gfc_arith_divide): Fix complex divide.
624 2004-04-23 Andrew Pinski <pinskia@physics.uc.edu>
626 * gfortranspec.c: Include the target headers.
628 2004-04-18 Feng Wang <fengwang@nudt.edu.cn>
632 * arith.c (arctangent2): New function.
633 * arith.h (arctangent2): Add function prototype.
634 * simplify.c (gfc_simplify_atan2): Use it.
635 (gfc_simplify_log): Use it.
637 2004-04-12 Diego Novillo <dnovillo@redhat.com>
639 * fortran/f95-lang.c (gfc_expand_stmt): Remove.
640 (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
642 2004-04-11 Bud Davis <bdavis9659@comcast.net>
645 * trans-io.c (build_dt): Change REC to value.
647 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
650 * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
651 the real value when converting mpf to string.
653 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
656 * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
659 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
662 * simplify.c (simplify_min_max): Convert the type of the result.
664 2004-04-11 Paul Brook <paul@codesourcery.com>
666 * gfortran.texi: Use full target triplet.
668 2004-04-11 Paul Brook <paul@codesourcery.com>
670 * Make-lang.in (GFORTRAN_TEXI): Set it.
671 (fortran/dfortran.dvi): Use it. Add fortran to include paths.
672 (fortran/gfortran.info): Ditto.
673 * gfortran.texi: Major update.
674 * invoke.texi: New file.
676 2004-04-10 Paul Brook <paul@codesourcery.com>
678 * trans-array.c (gfc_trans_allocate_temp_array,
679 gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
680 * trans-decl.c (gfc_build_dummy_array_decl,
681 gfc_get_symbol_decl, gfc_build_function_decl,
682 gfc_create_module_variable): Ditto.
683 * trans-expr.c (gfc_conv_variable): Ditto.
684 * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
685 * trans.h (GFC_DECL_STRING): Remove.
686 (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
687 GFC_DECL_ASSIGN): Renumber flags.
689 2004-04-05 Paul Brook <paul@codesourcery.com>
693 * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
695 * gfortran.h (struct gfc_charlen): Add backend_decl.
696 * trans-array.c (gfc_trans_allocate_temp_array,
697 gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
698 (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
699 Remove old, broken string handling.
700 (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
701 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
702 gfc_trans_deferred_array): Handle character arrays.
703 * trans-const.c (gfc_conv_const_charlen): New function.
704 * trans-const.h (gfc_conv_const_charlen): Add prototype.
705 * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
707 (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
708 (gfc_create_string_length): New function.
709 (gfc_get_symbol_decl): Create lengths for character variables.
710 (gfc_get_fake_result_decl): Ditto.
711 (gfc_build_function_decl): Only set length for assumed length
713 (gfc_trans_dummy_character): New function.
714 (gfc_trans_auto_character_variable): Rewrite.
715 (gfc_trans_deferred_vars): Handle more types of character variable.
716 (gfc_create_module_variable): String lengths have moved.
717 (gfc_generate_function_code): Initialize deferred var chain earlier.
718 * trans-expr.c (gfc_conv_init_string_length): Rename ...
719 (gfc_trans_init_string_length): ... to this.
720 (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
721 gfc_conv_function_call): Update to new format for character variables.
722 (gfc_conv_string_length): Remove.
723 (gfc_conv_string_parameter): Update assertion.
724 * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
725 * trans-io.c (set_string): Use new macro names.
726 * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
727 * trans-types.c (gfc_get_character_type): Use existing length expr.
728 (gfc_is_nodesc_array): Make public.
729 (gfc_get_dtype_cst): Rename ...
730 (gfc_get_dtype): ... to this. Handle unknown size arrays.
731 (gfc_get_nodesc_array_type): Use new name.
732 (gfc_sym_type): New character variable code.
733 (gfc_get_derived_type): Ditto.
734 (gfc_get_function_type): Evaluate character variable lengths.
735 * trans-types.h (gfc_strlen_kind): Define.
736 (gfc_is_nodesc_array): Add prototype.
737 * trans.h: Update prototypes.
738 (struct lang_type): Update comments.
739 (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
740 (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
742 2004-04-04 Paul Brook <paul@codesourcery.com>
744 * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
745 * options.c (gfc_init.options, gfc_handle_option): Ditto.
746 * trans-expr.c (gfc_conv_function_call): Ditto.
747 * trans-types.c (gfc_is_nodesc_array): Ditto
748 * lang.opt (fg77-calls): Remove.
750 2004-04-04 Paul Brook <paul@codesourcery.com>
752 * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
753 (gfc_conv_descriptor_base): Rename ...
754 (gfc_conv_descriptor_offset): ... to this.
755 (gfc_trans_allocate_array_storage): Set offset to zero.
756 (gfc_conv_array_base): Rename ...
757 (gfc_conv_array_offset): ... to this.
758 (gfc_conv_array_index_ref): Add offset parameter.
759 (gfc_conv_array_ref): Include offset.
760 (gfc_trans_preloop_setup): Use existing offset.
761 (gfc_trans_allocate_temp_array, gfc_array_allocate,
762 gfc_trans_auto_array_allocation, gfc_trans_g77_array,
763 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
764 gfc_conf_ss_descriptor): Set offset.
765 * trans-array.h: Rename prototypes.
766 * trans-const.h (gfc_index_zero_node): Define.
767 * trans-decl.c (gfc_build_qualified_array): Change base to offset.
768 * trans-types.c (gfc_get_array_type_bounds): Ditto.
769 (gfc_get_nodesc_array_type): Calculate offset before upper bound.
771 2004-03-25 Diego Novillo <dnovillo@redhat.com>
773 * convert.c (convert): Don't handle WITH_RECORD_EXPR.
775 2004-03-24 Bud Davis <bdavis9659@comcast.net>
778 * arith.c (gfc_convert_integer,gfc_convert_real): Removed leading '+'
779 before conversion by gmp library call.
781 2004-03-24 Bud Davis <bdavis9659@comcast.net>
784 * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
786 2004-02-24 Richard Henderson <rth@redhat.com>
788 * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
790 2004-02-19 Loren J. Rittle <ljrittle@acm.org>
792 * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
793 (fortran/gfortran.info): ... to here.
796 2004-02-16 Richard Henderson <rth@redhat.com>
798 * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
799 * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
800 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
801 (gfc_expand_function): Rename from expand_function_body, make static,
802 don't do anything except invoke tree_rest_of_compilation.
803 (gfc_be_parse_file): Invoke cgraph.
804 (gfc_expand_decl): Remove.
805 (gfc_init_builtin_functions): Add __builtin_init_trampoline and
806 __builtin_adjust_trampoline.
807 * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
809 (gfc_generate_function_code): Use it. Lower nested functions.
810 * trans-expr.c (gfc_conv_function_call): Add static chain operand
812 * trans.c (gfc_build_function_call): Likewise.
813 * trans.h (expand_function_body): Remove.
815 2004-02-15 Victor Leikehman <lei@il.ibm.com>
818 * trans-decl.c (gfc_build_function_decl) For functions
819 returning CHARACTER pass an extra length argument,
820 following g77 calling conventions.
821 * trans-types.c (gfc_get_function_type) Ditto.
822 * trans-expr.c (gfc_conv_function_call) Ditto.
824 2004-02-14 Paul Brook <paul@codesourcery.com>
826 * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
828 2004-02-12 Paul Brook <paul@nowt.org>
832 2004-02-08 Steve Kargl <sgk@troutmask.apl.washington.edu>
834 * gfortran.texi: Fix typos.
836 2004-02-07 Bud Davis <bdavis9659@comcast.net>
839 * intrinsic.c (add_conversions) Use logical conversion instead
841 * trans-types.c (gfc_get_logical_type) implemented logical*1
844 2004-01-17 Paul Brook <paul@codesourcery.com>
846 * lang-specs.h: Remove %<fixed-form.
848 2004-01-15 Toon Moene <toon@moene.indiv.nluug.nl>
850 * lang-specs.h: Enable preprocessing of source files
851 ending in .F, .fpp, .FPP, .F90 and .F95.
853 2004-01-13 Toon Moene <toon@moene.indiv.nluug.nl>
856 * lang-specs.h: Enable compilation of files ending
857 in .f, .for and .FOR.
859 2004-01-11 Paul Brook <paul@codesourcery.com>
861 * trans-stmt.c (gfc_trans_if_1): New function.
862 (gfc_trans_if): Use it.
864 2004-01-11 Erik Schnetter <schnetter@uni-tuebingen.de>
866 * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
867 (gfc_option_t): Add max_identifier_length.
868 * lang.opt: Add fmax-identifier-length.
869 * match.c (parse_name): Use limit.
870 * options.c (gfc_init_options): Set max_identifier_length.
871 (gfc_handle_option): Ditto.
873 2004-01-11 Feng Wang <fengwang@nudt.edu.cn>
875 * intrinsic.c (add_functions): Add resolve function to dcmplx.
876 * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
877 * iresolve.c (gfc_resolve_dcmplx): New function.
879 2004-01-10 Paul Brook <paul@codesourcery.com>
881 * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
882 * trans-types.c (gfc_sym_type): Handle external dummy procedures.
883 (gfc_return_by_reference): Correct condition.
884 (gfc_get_function_type): Ditto.
886 2004-01-10 Paul Brook <paul@codesourcery.com>
888 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
891 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
893 * iresolve.c: Use correct kind.
895 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
898 * trans-decl.c (gfc_create_module_variable): Output array valued
901 2004-01-10 Paul Brook <paul@codesourcery.com>
903 * resolve.c (resolve_branch): Get error message right way round.
905 2004-01-10 Canqun Yang <canqun@nudt.edu.cn>
907 * trans-array (gfc_conv_loop_setup): Adjust comment to track
909 (gfc_array_allocate): Don't count size of element twice.
911 2004-01-04 Paul Brook <paul@codesourcery.com>
913 * lang.opt (i8, r8, std=*): Remove RejectNegative.
915 2004-01-04 Paul Brook <paul@codesourcery.com>
917 * error.c (gfc_notify_std): New function.
918 * gfortran.h (gfc_notify_std): Declare.
920 (gfc_option_t): Add warn_std and allow_std.
921 * intrinsic.c (gfc_init_expr_extensions): Fix logic.
922 (gfc_intrinsic_func_interface): Use gfc_notify_std.
923 * check.c (check_rest): Use gfc_notify_std.
924 * match.c (gfc_match_pause): Ditto.
925 (gfc_match_assign): Ditto.
926 (gfc_match_goto): Ditto.
927 * resolve.c (resolve_branch): Ditto.
928 * lang.opt: Add std=<foo> and w.
929 * options.c (gfc_init_options): Set allow_std and warn_std.
930 (gfc_handle_option): Handle OPT_std_* and OPT_w.
932 2004-01-01 Paul Brook <paul@codesourcery.com>
934 * array.c (gfc_append_constructor): Take constructor, not expression.
935 * data.c (struct gfc_expr_stack): Remove.
936 (expr_stack): Remove.
937 (find_con_by_offset): Rename from find_expr_in_con.
938 (find_con_by_component): Rename from find_component_in_con.
939 (gfc_get_expr_stack): Remove.
940 (gfc_assign_data_value): Rewrite.
941 (gfc_expr_push): Remove.
942 (gfc_expr_pop): Remove.
943 (gfc_advance_section): Rename from
944 gfc_modify_index_and_calculate_offset. Handle unbounded sections.
945 (gfc_get_section_index): Handle unbounded sections.
946 * gfortran.h: Update prototypes.
947 * resolve.c (check_data_variable): Array section maight not be the
950 2004-01-01 Paul Brook <paul@codesourcery.com>
953 * resolve.c (resolve_symbol): Allow assumed length function results.
955 2004-01-01 Steve Kargl <sgk@troutmask.apl.washington.edu>
957 * match.c (gfc_match_pause): Fix spelling.
959 2004-01-01 Steven Bosscher <stevenb@suse.de>
962 * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
963 reference from the expression.
965 2003-12-26 Feng Wang <fengwang@nudt.edu.cn>
967 * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
969 * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
970 (gfc_exec_op): New EXEC_LABEL_ASSIGN.
971 (symbol_attribute):New variable attribute: assign.
972 * io.c (resolve_tag):Integer variable is allowed.
973 (match_dt_format): Add ASSIGN statement. Set assign flag.
974 * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
975 (gfc_match_assign): Add ASSIGN statement. Set assign flag.
976 (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
977 * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
978 (next_statement): Add ST_LABEL_ASSIGNMENT.
979 (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
980 * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
981 (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
982 * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
983 * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
984 assign. Put them into the stuct lang_decl.
985 * trans-io.c (set_string): Add the assign statement.
986 * trans-stmt.c (gfc_trans_label_assign): New function.
987 (gfc_trans_goto): Translate ASSIGNED GOTO statement.
988 * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
989 * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
990 * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
991 (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
992 (GFC_DECL_ASSIGN(node)): New macro to access flag.
994 2003-12-31 Huang Chun <chunhuang73@hotmail.com>
997 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
1000 2003-12-22 Toon Moene <toon@moene.indiv.nluug.nl>
1002 * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
1003 that arguments to subroutines/functions can't alias themselves, nor global
1006 2003-12-20 Steven Bosscher <stevenb@suse.de>
1008 * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
1009 * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
1011 2003-12-12 Huang Chun <chunhuang73@hotmail.com>
1013 * primary.c (match_substring): Fix substring bug for start point
1014 or end point is NULL.
1015 * trans-expr.c (gfc_conv_substring): Ditto
1016 * trans-types.c (gfc_sym_type): Get correct type of scalar
1017 character variables.
1018 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
1021 2003-12-10 Richard Henderson <rth@redhat.com>
1023 * options.c (gfc_post_options): Don't ever use rtl inlining.
1025 2003-12-05 Canqun Yang <canqun@nudt.edu.cn>
1027 * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
1028 * trans-equivalence.c: Remove.
1029 * trans-decl.c (gfc_get_symbol_decl): Update to match.
1030 (gfc_generate_function_code): Ditto.
1031 * trans-array.c (gfc_conv_array_parameter): Ditto.
1032 * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
1033 (F95_ADDITIONAL_OBJS): Add stor-layout.o
1034 * trans.h (gfc_trans_equivalence): Remove.
1035 * gfortran.h (struct gfc_equiv): Add used field.
1036 (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
1037 equiv_offset fields.
1039 2003-12-05 Richard Henderson <rth@redhat.com>
1041 * trans.c (gfc_build_addr_expr): New.
1042 (gfc_build_indirect_ref, gfc_build_array_ref): New.
1043 * trans.h: Declare them.
1044 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
1045 trans-stmt.c, trans.c (*): Use them.
1047 * f95-lang.c (gfc_post_options): Remove dead prototype.
1048 * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
1049 * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
1052 2003-12-01 Feng Wang <fengwang@nudt.edu.cn>
1054 * io.c (gfc_match_format): Check for missing format label.
1056 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
1059 * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
1060 from interfaces in modules.
1062 2003-11-30 Paul Brook <paul@nowt.org>
1064 * trans-array.c (gfc_trans_g77_array): Make non-static.
1065 (gfc_trans_assumed_size): Remove.
1066 (gfc_trans_dummy_array_bias): Explicitly free temporary.
1067 * trans-array.h (gfc_trans_g77_array): Add prototype.
1068 (gfc_trans_assumed_size): Remove.
1069 * trans-decls.c (gfor_fndecl_push_context): Remove.
1070 (gfor_fndecl_pop_context): Remove.
1071 (gfc_build_function)decls): Don't create them.
1072 (gfc_trans_deferred_vars): Update to match. Remove dead code.
1073 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
1075 2003-11-30 Kejia Zhao <kejia_zh@nudt.edu.cn>
1077 * trans-array.c (gfc_conv_array_parameter): Simplify
1078 array argument passing for array name actual argument.
1079 * trans-expr.c (gfc_conv_function_call): Ditto
1080 * trans-types.c (gfc_is_nodesc_array):Ditto.
1082 2003-11-30 Paul Brook <paul@nowt.org>
1084 * f95-lang.c (gfc_post_options): Move ...
1085 * options.c (gfc_post_options): .. to here. Handle inlining options.
1086 * gfortran.h (gfc_post_options): Add prototype.
1088 2003-11-28 Richard Henderson <rth@redhat.com>
1090 * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
1092 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
1094 * trans.h (has_alternate_specifier): New global variable.
1095 * match.c (gfc_match_call): Handle actual arguments associated with
1096 alternate return indicators.
1097 * trans-expr.c (gfc_conv_function_call): Ditto
1098 * trans-stmt.c (gfc_trans_call): Ditto
1099 (gfc_trans_return): Handle return statement with value.
1100 * trans-decl.c (gfc_generate_function_code): Handle functions with
1102 (gfc_get_fake_result_decl): Ditto
1103 * trans-types.c (gfc_get_function_type): Ditto
1104 * resolve.c (resolve_actual_arglist): Check alternate return indicators.
1105 (resolve_formal_arglist): Check asterisk dummy.
1107 2003-11-27 Paul Brook <paul@nowt.org>
1109 * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
1110 allocation interface.
1111 (gfc_conv_ array_parameter): Ditto.
1112 (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
1113 * trans-array.c: Update prototype.
1114 * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
1115 (gfc_trans_auto_character_variable): Use new memory alloc interface.
1116 * trans-expr.c (gfc_conv_string_tmp): Ditto.
1117 (gfc_conv_function_call): Use gfc_conv_string_tmp.
1118 * trans-stmt.c (gfc_do_allocate): Use new memory alloc interface.
1119 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
1120 * trans.h (gfc_ss_info): Remove unused pdata field.
1121 * trans.c (gfc_create_var_np): Change T to V.
1123 2003-11-26 Richard Henderson <rth@redhat.com>
1125 * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
1126 * trans-intrinsic.c (gfc_intrinsic_map): ... here. Add SCALE,
1127 FRACTION, NEAREST, SET_EXPONENT.
1128 (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
1129 Fix GTY marking. Remove unnecessary const's.
1130 (LIBM_FUNCTION): Rename from I_LIB.
1131 (LIBF_FUNCTION): New.
1132 (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
1133 conventions. Assume the expr signature is correct. Mark const.
1134 (gfc_conv_intrinsic_exponent): Use library functions.
1135 (gfc_conv_intrinsic_set_exponent): Remove.
1136 (gfc_conv_intrinsic_scale): Remove.
1137 (gfc_conv_intrinsic_nearest): Remove.
1138 (gfc_conv_intrinsic_fraction): Remove.
1139 (gfc_conv_intrinsic_function): Update.
1140 * trans-decl.c (gfor_fndecl_math_exponent4): New.
1141 (gfor_fndecl_math_exponent8): New.
1142 (gfc_build_intrinsic_function_decls): Set them.
1143 * trans.h: Declare them.
1145 2003-11-25 Canqun Yang <canqun@nudt.edu.cn>
1147 * trans-common.c (gfc_layout_global_equiv): Locate the error for
1148 underflow COMMON block.
1149 (gfc_trans_one_common): Fix bug for size of COMMON block containing
1150 EQUIVALENCE object. Also fix typo in an error message.
1152 2003-11-25 Diego Novillo <dnovillo@redhat.com>
1154 * Make-lang.in: Add check-gfortran to lang_checks.
1155 (check-f95): Alias for check-gfortran.
1157 2003-11-25 Jason Merrill <jason@redhat.com>
1159 * Make-lang.in (f95.tags): Create TAGS.sub files in each
1160 directory and TAGS files that include them for each front end.
1162 2003-11-24 Paul Brook <paul@nowt.org>
1165 * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
1167 2003-11-24 Paul Brook <paul@nowt.org>
1169 * expr.c (simplify_const_ref): Return SUCCESS for things we don't
1171 * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
1173 2003-11-24 Paul Brook <paul@nowt.org>
1176 * array.c (gfc_array_ref_shape): Handle elemental dimensions.
1177 * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
1179 2003-11-20 Richard Henderson <rth@redhat.com>
1181 * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
1182 (gfc_conv_array_base): Likewise.
1183 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
1184 * trans-expr.c (gfc_conv_string_tmp): Likewise.
1185 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
1186 * trans-stmt.c (gfc_trans_character_select): Likewise.
1188 2003-11-13 Paul Brook <paul@nowt.org>
1190 * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
1192 2003-11-13 Canqun Yang <canqun@nudt.edu.cn>
1194 * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
1195 (resolve_equivalence): New function.
1196 (resolve_equivalence_derived): New function.
1198 2003-11-12 Richard Henderson <rth@redhat.com>
1200 * trans.c (gfc_trans_code): Use annotate_with_locus instead of
1201 annotate_all_with_locus.
1203 2003-11-11 Canqun Yang <canqun@nudt.edu.cn>
1205 * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
1206 * trans-decl.c (gfc_finish_var_decl): Modified.
1208 2003-11-08 Paul Brook <paul@nowt.org>
1211 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
1214 2003-11-06 Paul Brook <paul@nowt.org>
1216 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
1218 2003-11-02 Canqun Yang <canqun@nudt.edu.cn>
1220 * match.c (gfc_match_stopcode): Assign '0' to stop_code.
1222 2003-10-27 Anthony Green <green@redhat.com>
1224 * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
1225 (f95.stagefeedback): Ditto.
1227 2003-10-27 Andrew Pinski <pinskia@physics.uc.edu>
1230 * Make-lang.in (f95.stageprofile): Add.
1231 (f95.stagefeedback): Add.
1233 2003-10-23 Richard Henderson <rth@redhat.com>
1235 * f96-lang.c (gfc_gimplify_expr): Remove.
1236 (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
1237 (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
1239 2003-10-23 Richard Henderson <rth@redhat.com>
1241 * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
1243 2003-10-20 Paul Brook <paul@nowt.org>
1245 * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
1246 * trans-stmt.c (gfc_trans_do_while): Ditto.
1248 2003-10-17 Paul Brook <paul@nowt.org>
1250 * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
1252 2003-10-17 Paul Brook <paul@nowt.org>
1254 * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
1256 2003-10-17 Feng Wang <wf_cs@yahoo.com>
1258 * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
1259 (gfc_resolve_minloc): Ditto.
1260 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
1261 Return the value after subtracting the lower bound.
1263 2003-10-16 Richard Henderson <rth@redhat.com>
1265 * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
1267 2003-10-16 Steven Bosscher <steven@gcc.gnu.org>
1269 * lang.c: Remove -M option for now, it's in the way for C.
1271 2003-10-14 Jason Merrill <jason@redhat.com>
1273 * Make-lang.in (f95.tags): New rule.
1275 2003-10-13 Richard Henderson <rth@redhat.com>
1277 * trans.c (gfc_trans_code): Use annotate_all_with_locus.
1279 2003-10-13 Paul Brook <paul@nowt.org>
1281 * trans-decl.c (generate_local_decl): Don't create junk variables.
1283 2003-10-13 Paul Brook <paul@nowt.org>
1285 * resolve.c (resolve_formal_arglist): Use function result decl in
1286 preference to function decl.
1288 2003-10-12 Richard Henderson <rth@redhat.com>
1290 * f95-lang.c (gfc_define_builtin): New const_p argument. Set
1291 TREE_READONLY. Update all callers.
1293 2003-10-12 Feng Wang <wf_cs@yahoo.com>
1295 * iresolve.c (gfc_resolve_cshift): Change to match implementation.
1296 * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
1297 (gfc_is_intrinsic_libcall): Add CSHIFT.
1299 2003-10-12 Richard Henderson <rth@redhat.com>
1301 * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
1302 (gfc_trans_array_constructor_value): Likewise.
1303 (gfc_conv_array_initializer): Likewise.
1304 * trans-stmt.c (gfc_trans_character_select): Likewise.
1306 2003-11-12 Kejia Zhao <kejia_zh@yahoo.com.cn>
1308 * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
1310 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
1312 * check.c (gfc_check_repeat): Check arguments are scalar.
1313 (gfc_check_trim): New function.
1314 * intrinsic.h (gfc_check_trim): Add prototype.
1315 * intrinsic.c (add_functions): Use it.
1316 * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
1318 * trans-decl.c: Ditto.
1319 (gfc_build_intrinsic_fucntion_decls): Set them.
1320 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
1321 (gfc_conv_intrinsic_trim): New function.
1322 (gfc_conv_intrinsic_repeat): New function.
1323 (gfc_conv_intrinsic_function): Use them.
1325 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
1327 * trans-types.c (gfc_sym_type): Handle result variables.
1329 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
1331 * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
1332 gfc_get_character_type.
1334 2003-10-11 Feng Wang <wf_cs@yahoo.com>
1336 * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
1338 2003-10-11 Paul Brook <paul@nowt.org>
1340 * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
1341 (gfc_resolve_dprod): New function.
1342 (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
1343 * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
1344 (gfc_resolve_dprod): Declare.
1345 * intrinsic.c (add_functions): Use them.
1346 * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
1348 2003-10-06 Richard Henderson <rth@redhat.com>
1350 * f95-lang.c (gfc_init_builtin_functions): Add clzll.
1351 * trans-intrinsic.c (call_builtin_clz): Use it.
1353 2003-10-05 Paul Brook <paul@nowt.org>
1355 * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
1356 * trans-decl.c (gfc_generate_function_code): Set
1357 cfun->function_end_locus.
1359 2003-09-24 Jason Merrill <jason@redhat.com>
1361 * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
1364 2003-09-21 Lifang Zeng <zlf605@hotmail.com>
1365 Paul Brook <paul@nowt.org>
1367 * Make-lang.in (F95_OBJS): Add fortran/data.o.
1368 * array.c (gfc_inser_constructor): New function.
1369 (gfc_get_constructor): New function.
1370 (gfc_free_constructor): Initialize offset and repeat.
1371 (iterator_stack): Remove.
1372 (expand_info): Add offset, component and repeat fields.
1373 (expand_constructor): Set them.
1374 (expand): Set new fields.
1375 (gfc_copy_constructor): Ditto. Avoid recursion.
1376 * gfortran.h: Add prototypes for new functions.
1377 (gfc_constructor): Add offset, component and repeat.
1378 (iteratio_stack): Move to here.
1379 * resolve.c (check_data_variable): Convert data values into variable
1381 (traverse_data_list): Build implicit loop chain.
1382 (gfc_resolve): Ditto.
1383 * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
1384 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
1385 * trans-expr.c (gfc_conv_structure): Handle array initializers.
1386 (gfc_conv_expr): Update to match.
1387 * trans.h (gfc_conv_structure): Declare.
1390 2003-09-20 Kejia Zhao <kejia_zh@yahoo.com.cn>
1392 * trans.h: Add declarations for gfor_fndecl_si_kind and
1393 gfor_fndecl_sr_kind.
1394 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
1395 * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
1396 (g95_conv_intrinsic_sr_kind): New function.
1397 (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
1400 2003-09-17 Lars Segerlund <Lars.Segerlund@comsys.se>
1402 * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
1403 instead of _4 and _8 as postfix for libgfortran calls.
1405 2003-09-16 Paul Brook <paul@nowt.org>
1407 * array.c (compare_bounds): New function.
1408 (gfc_compare_array_spec): Use it.
1410 2003-09-14 Paul Brook <paul@nowt.org>
1412 * primary.c (gfc_match_rvalue): Make sure sym->result is set.
1413 * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
1415 2003-09-14 Paul Brook <paul@nowt.org>
1417 * check.c (dim_rank_check): Allow assumed bounds if requested.
1418 (gfc_check_lbound): Call it.
1419 (gfc_check_ubound): Ditto.
1420 (gfc_check_size): Change to match.
1421 * simplify.c (gfc_simplify_bound): New function.
1422 (gfc_simplify_lbound): New function.
1423 (gfc_simplify_ubound): New function.
1424 * intrinsic.h: Declare them.
1425 * intrinsic.c (add_functions): Use them.
1427 2003-09-14 Paul Brook <paul@nowt.org>
1429 * io.c (format_lex): Initialize negative_flag.
1430 (check_format): Intialize repeat.
1431 * trans-io.c (gfc_new_nml_name_expr): Declare static.
1432 (gfc_new_var_expr): Ditto.
1434 2003-09-14 Paul Brook <paul@nowt.org>
1436 * trans-array.c (gfc_conv_array_initializer): Handle derived types.
1437 * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
1439 2003-09-12 Paul Brook <paul@nowt.org>
1441 * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
1443 2003-09-12 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
1445 * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
1446 for a correct expression.
1448 2003-09-10 Kejia Zhao <kejia_zh@yahoo.com.cn>
1450 * trans-intrinsic.c (real_compnt_info): New struct.
1451 (prepare_arg_info): New function.
1452 (gfc_conv_intrinsic_set_exponent): New function.
1453 (gfc_conv_intrinsic_scale): New function.
1454 (gfc_conv_intrinsic_nearest): New function.
1455 (gfc_conv_intrinsic_fraction): New function.
1456 (gfc_conv_intrinsic_exponent): New function.
1457 (gfc_conv_intrinsic_spacing): New function.
1458 (gfc_conv_intrinsic_rrspacing): New function.
1459 (gfc_conv_intrinsic_function): Use them.
1461 2003-08-24 XiaoQiang Zhang (zhangapache@yahoo.com>
1463 * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
1464 build_int_2 changed from (high, low) to (low, high).
1465 * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
1466 ioparm_namelist_read_mode, iocall_set_nml_val_int,
1467 iocall_set_nml_val_float, iocall_set_nml_val_char,
1468 iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
1469 (gfc_build_io_library_fndecls): Add variable initialization.
1470 (gfc_new_nml_name_expr, get_new_var_expr): New function.
1471 (build_dt): Add namelist support.
1472 * io.c (value): New variable.
1473 (check_format): Support FMT_H now.
1475 2003-09-07 Paul Brook <paul@nowt.org>
1477 * io.c (gfc_resolve_dt): Error if format label is not defined.
1479 2003-09-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
1481 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
1482 about case_switch's break. The other is about building the condition
1483 statement tree, which judges the argument in the range of the
1484 corresponding integer type.
1485 * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
1486 for the large values.
1488 2003-09-05 Paul Brook <paul@nowt.org>
1490 * f95-lang.c (expand_function_body): Gimplify the function.
1492 2003-09-04 Jeff Law <law@redhat.com>
1494 * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
1497 2003-09-04 Paul Brook <paul@nowt.org>
1499 * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
1500 (gfc_expand_stmt): New function.
1501 (LANG_HOOKS_RTL_EXPAND_STMT): Define.
1502 (expand_function_body): Use tree_rest_of_compilation.
1503 * trans-decl.c (gfc_generate_function_code): Don't free cfun.
1505 2003-09-03 Jeff Law <law@redhat.com>
1507 * f95-lang.c (gfc_init_builtin_functions): C arrays start at
1510 2003-08-30 Paul Brook <paul@nowt.org>
1512 * f95-lang.c (builtin_function): Remove #if 0 code.
1513 (gfc_define_builtin): New function.
1514 (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
1515 * mathbuiltins.def: New file.
1516 * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
1517 (gfc_intrinsic_map): Use mathbuiltins.def.
1518 (gfc_intrinsic_builtin_t): Remove.
1519 (gfc_build_intrinsic_lib_fndecls): Update.
1520 * trans-types.c (gfc_init_types): Remove redundant initilaization of
1521 signed_size_type_node.
1523 2003-08-29 Paul Brook <paul@nowt.org>
1525 * arith.c (gfc_real_kinds): Use correct minimum exponents.
1527 2003-08-22 Kejia Zhao <kejia_zh@yahoo.com.cn>
1529 * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
1530 (gfc_conv_intrinsic_function): Add MODULO.
1532 2003-08-22 Jason Merrill <jason@redhat.com>
1534 * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
1536 2003-08-22 Andreas Jaeger <aj@suse.de>
1538 * Make-lang.in (f95.install-common): Add DESTDIR support.
1539 * (f95.install-info): Likewise.
1540 (f95.uninstall): Likewise.
1542 2003-08-19 Diego Novillo <dnovillo@redhat.com>
1544 * trans-types.c (gfc_init_types): Initialize
1545 signed_size_type_node with size_type_node.
1547 2003-08-18 Paul Brook <paul@nowt.org>
1549 * dependency.c (gfc_dependency): New enum.
1550 (check_another_array_ref): Remove.
1551 (gfc_get_array_from_component): Remove.
1553 (get_range): Remove.
1554 (get_no_of_elements): Use mpz_t, not mpf_t.
1555 (transform_sections): New function.
1556 (gfc_check_range_range): Rename ...
1557 (gfc_check_section_vs_section): ... to this. Use new function.
1558 (gfc_is_inside_range): Rewrite to match.
1559 (gfc_check_element_vs_section): Ditto.
1560 (gfc_check_element_vs_element): Ditto.
1562 (gfc_dep_resolver): Ditto. Remove unused parameter.
1563 * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
1564 gfc_check_element_vs_element, gfc_is_inside_range,
1565 gfc_get_array_from_component): Remove prototypes for static functions.
1566 (gfc_dep_resolver): Update prototype.
1567 * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
1569 2003-08-15 Paul Brook <paul@nowt.org>
1571 * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
1572 return values to parent scope.
1573 (gfc_build_dummy_array_decl): Ditto.
1575 2003-08-14 Paul Brook <paul@nowt.org>
1577 * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
1578 size of the type, not the pointer.
1579 * resolve.c (resolve_symbol): Give more accurate error message.
1581 2003-08-10 Paul Brook <paul@nowt.org>
1583 * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
1585 2003-08-10 Paul Brook <paul@nowt.org>
1587 * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
1590 2003-08-10 Chun Huang <compiler@sohu.com>
1592 * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
1593 (resolve_symbol): Ditto.
1594 * trans-expr.c (gfc_conv_statement_function): New function.
1595 (gfc_conv_function_expr): Use it.
1597 2003-08-10 Paul Brook <paul@nowt.org>
1599 * trans-array.c (gfc_conv_ss_startstride): Handle functions.
1600 (walk_function_expr): Set section rank.
1601 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
1603 2003-08-10 Paul Brook <paul@nowt.org>
1605 * intrinsic.c (add_sym): Prefix names with correct string.
1606 (add_sym_0s): New function.
1607 (add_subroutines): Register abort.
1609 2003-08-10 Erik Schnetter <schnetter@uni-tuebingen.de>
1611 * gfortran.h: Introduce options to control the mangling.
1612 * lang.opt: Likewise.
1613 * options.c (gfc_init_options): Handle the options.
1614 * trans-common.c (gfc_sym_mangled_common_id): New function.
1615 (gfc_build_common_decl): Call it.
1616 * trans-decl.c (gfc_sym_mangled_function_id): New function.
1617 (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
1619 2003-08-09 Paul Brook <paul@nowt.org>
1621 * module.c (mio_symbol): Always ouput a namespace for formal args.
1622 (load_needed): Namespace now belong to their proper symbol.
1623 (gfc_dump_module): Change G95=>GFORTRAN.
1625 2003-08-05 Paul Brook <paul@nowt.org>
1627 * options.c: Force -fg77-calls.
1629 2003-08-02 Paul Brook <paul@nowt.org>
1631 * Makelang.in: Rename G95_* to GFORTRAN_*.
1632 * All sources: Rename G95_* to GFC_*.
1634 2003-08-01 Paul Brook <paul@nowt.org>
1636 * fortran/Make-lang.in: Use GMPLIBS.
1637 * fortran/config-lang.in: Set need_gmp.
1638 * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
1640 2003-07-27 Andreas Jaeger <aj@suse.de>
1642 * trans-decl.c (gfc_generate_constructors): Convert prototype to
1644 * trans-const.c (gfc_init_constants): Likewise.
1645 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
1647 * gfortranspec.c: Convert to ISO C90.
1648 (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
1650 2003-07-26 Paul Brook <paul@nowt.org>
1652 * lang.opt: Add -fdump-parse-tree.
1653 * options.c (gfc_handle_option): Ditto.
1654 * resolve.c (resolve_forall_iterators): Convert to proper type.
1655 * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
1657 2003-07-26 Paul Brook <paul@nowt.org>
1659 * Makefile.in: Add build dependencies on files common with rest of gcc.
1661 2003-07-26 Lifang Zeng <zlf605@hotmail.com>
1663 * trans.h: Declare g95_trans_pointer_assignment.
1664 * trans-expr.c (g95_trans_pointer_assignment): New function.
1665 (g95_trans_pointer_assign): Use it.
1666 * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
1667 (g95_trans_pointer_assign_need_temp): New function.
1669 2003-07-26 Paul Brook <paul@nowt.org>
1671 * gfortran.texi: Replace references to g95.
1673 2003-07-26 Paul Brook <paul@nowt.org>
1675 Rename g95_* to gfc_*.
1677 2003-07-25 Paul Brook <paul@nowt.org>
1679 * gfortran.h: Rename from g95.h.
1680 * trans-types.c (boolean_type_node, booelan_true_node,
1681 boolean_false_node): Remove.
1682 * trans-types.h: Ditto.
1684 2003-07-25 Chun Huang <compiler@sohu.com>
1686 * parse.c (accept_statement): Implement BLOCK DATA statement.
1687 * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
1690 2003-07-24 Lifang Zeng <zlf605@hotmail.com>
1692 * trans-stmt.c (temporary_list): Define.
1693 (g95_trans_assign_need_temp): New function.
1694 (g95_trans_forall_1): Modified for WHERE.
1695 (g95_trans_where_assign): Modified.
1696 (g95_trans_where_2): Modified.
1697 (g95_evaluate_where_mask): Modified.
1698 (g95_trans_where): Modified.
1699 (g95_get_temp_expr): Removed.
1700 (g95_add_to_where_stmt_list): Removed.
1701 (compute_overall_iter_number): Modified for WHERE.
1702 * trans.h: Remove where_stmt_list.
1704 2003-07-24 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1706 * lang.opt: Correct description of options -J and -M.
1708 2003-07-23 Steven Bosscher <steven@gcc.gnu.org>
1710 * lang.opt: Move help text to here.
1711 * lang-options.h: Remove.
1713 2003-07-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1714 * iresolve.c (g95_resolve_transpose): Proper variable in switch.
1715 * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
1718 2003-07-22 Steven Bosscher <steven@gcc.gnu.org>
1719 Paul Brook <paul@nowt.org>
1721 * check.c (check_rest): Use global pedantic flag.
1722 * io.c (data_desc): Ditto.
1723 * error.c (g95_warning, g95_warning_now): Use global flag.
1724 * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
1725 (expand_function_body): Update to new prototypes.
1726 (g95_init): Use new option names.
1727 * g95.h (g95_option_t): Standardize names.
1728 (g95_init_options, g95_handle_option): Update prototypes.
1729 * interface.c: Use new option names.
1736 * simplify.c: Ditto.
1738 * trans-array.c: Ditto.
1739 * trans-expr.c: Ditto.
1740 * trans-types.c: Ditto.
1741 * trans-decl.c: Ditto.
1742 (g95_build_library_function_decl): Remove obsolete VPARAMS.
1744 * options.c (g95_display_help): Remove.
1745 (g95_init_options): Convert to new scheme.
1747 (g95module_option): Ditto, rename from g95_parse_arg.
1748 (g95_handle_module_path_options): New function.
1749 * trans-equivalence.c: Fix error message.
1750 * lang.opt: Corrections.
1752 2003-07-21 Steven Bosscher <steven@gcc.gnu.org>
1754 * lang.opt: New file.
1756 2003-07-21 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1758 * decl.c (match_attr_spec): Set colon_seen.
1760 2003-07-14 Paul Brook <paul@nowt.org>
1762 * trans-array.c: Update comment.
1763 (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
1764 * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
1765 minmaxloc,minmaxval): Ditto.
1766 * trans-io.c (g95_trans_transfer): Ditto.
1767 * trans-stmt.c: Remove unneeded prototypes.
1768 (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
1769 (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
1770 (compute_inner_temp_size): Remove bits of dead code. Add comments.
1771 Don't share loopinfo.
1772 (compute_overall_iter_number): Declare as static.
1773 (allocate_temp_for_forall_nest): Ditto.
1774 (g95_trans_forall_1): Don't pass shared loopinfo.
1775 * trans.c (g95_start_block): Expand comment.
1777 2003-07-12 Paul Brook <paul@nowt.org>
1779 * arith.c (g95_index_integer_kind): Remove unused initializer.
1780 * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
1781 index by size of element.
1782 (generate_loop_for_rhs_to_temp): Ditto.
1783 (allocate_temp_for_forall_nest): Use element size, not index size.
1785 2003-07-11 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1787 * arith.c (g95_index_integer_kind): Add a TODO.
1788 * simplify.c (g95_simplify_nearest): Add a TODO.
1790 2003-07-09 Chun Huang <compiler@sohu.com>
1792 * trans.h: Add declarations for gfor_fndecl_string_scan and
1793 gfor_fndecl_string_verify.
1794 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
1795 * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
1796 (g95_conv_intrinsic_verify): New function.
1797 (g95_conv_intrinsic_function): Add SCAN and VERIFY.
1798 * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
1799 of parameter 'BACK=.TRUE.'
1801 2003-07-05 Lifang Zeng <zlf605@hotmail.com>
1803 * trans-stmt.c (iter_info, forall_info): Define.
1804 (g95_trans_forall_block): Remove.
1805 (g95_trans_forall_loop): Use forall info blocks.
1806 (g95_trans_nested_forall_loop): New function.
1807 (g95_do_allocate): Handle things other than logical masks.
1808 (generate_loop_for_temp_to_lhs): New function.
1809 (generate_loop_for_rsh_to_temp): New function.
1810 (compute_inner_temp_size): New function.
1811 (compute_overall_iter_number): New function.
1812 (allocate_temp_for_forall_nest): New function.
1813 (g95_trans_forall): Move body ...
1814 (g95_trans_forall_1): ... to here. Handle loops with temporaries.
1816 2003-07-02 Paul Brook <paul@nowt.org>
1818 * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
1819 in correct scope. Change callers to match.
1820 * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
1821 * iresolve.c (g95_resolve_reshape): Only use constant shapes.
1823 2003-07-02 Paul Brook <paul@nowt.org>
1825 * trans-array.c (g95_conv_loop_setup): Remove dead var. Use
1826 expression shape for all expressions.
1827 * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
1829 2003-07-03 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1831 * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
1832 g95_parse_arg), intrinsic.c (g95_convert_type): support of
1834 * intrinsic.c, g95.h: Add g95_convert_type_warn,
1835 * resolve.c (g95_resolve_index): Call it.
1837 2003-07-02 Paul Brook <paul@nowt.org>
1839 * iresolve.c (g95_resolve_reshape): Set expression shape.
1840 (g95_resolve_shape): Ditto.
1841 * simplify.c (g95_simplify_shape): Move common code outside condition.
1842 * trans-array.c (g95_conv_array_initializer): Teach it how to count.
1844 2003-07-01 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1846 * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
1849 2003-06-29 Paul Brook <paul@nowt.org>
1851 * array.c (g95_simplify_iterator_var): Don't bother with return value.
1852 * expr.c (find_array_element, find_component_ref): New functions.
1853 (remove_subobject_ref): New function.
1854 (simplify_const_ref): Use them. Rename from simplify_component_ref.
1855 (simplify_ref_chain): New function.
1856 (g95_simplify_expr): Use it. Simplify parameter variable subobjects.
1857 (g95_specification_expr): Simplify the expression.
1858 * resolve.c (resolve_operator): Check simplifications return code.
1859 (g95_resolve_expr): Ditto.
1861 2003-06-26 Paul Brook <paul@nowt.org>
1863 * expr.c (simplify_component_ref): New function.
1864 (g95_simplify_expr): Use it.
1865 * resolve.c (resolve_structure_cons): Handle references.
1867 2003-06-25 Paul Brook <paul@nowt.org>
1869 * trans-io.c (build_dt): Handle internal units.
1871 2003-06-25 Canqun Yang <canqun@yahoo.com.cn>
1873 * trans-common.c (g95_build_common_decl): Array index range starts at 0.
1874 (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
1875 Use g95_array_index_type instead of integer_type_node.
1876 (g95_build_common_decl, g95_set_common_master_type): Use
1877 g95_character1_type_node instead of char_type_node.
1878 * trans-equivalence.c (g95_layout_local_equiv): As above.
1880 2003-06-24 Steven G. Kargl <kargls@attbi.com>
1882 * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
1883 remove last remains of -fquiet.
1885 2003-06-22 Paul Brook <paul@nowt.org>
1887 * resolve.c (resolve_operator): Don't fail if we can't simplify.
1888 (g95_resolve_expr): Ditto.
1889 (resolce_code): Mark as static.
1890 * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
1891 gimplifer doesn't (yet).
1893 2003-06-20 Paul Brook <paul@nowt.org>
1895 * g95.h: Add ST_PAUSE and EXEC_PAUSE.
1896 * match.c (g95_match_if): Add ST_PAUSE.
1897 (g95_match_stopcode): New function.
1898 (g95_match_pause, g95_match_stop): Use it.
1899 * parse.c (g95_ascii_statement): Handle ST_PAUSE.
1900 (decode_stmt, next_statement, parse_executable): Ditto.
1901 * resolve.c (resolve_code): Ditto.
1902 * st.c (g95_free_statement): Ditto.
1903 * trans-stmt.c (g95_trans_pause): New function.
1904 * trans-stmt.h: Declare it.
1905 * trans.c (g95_trans_code): Use it.
1906 * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
1908 (g95_build_builtin_function_decls): Initialize them.
1910 * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
1912 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1914 * io.c (g95_match_open , g95_match_close, g95_match_inquire,
1915 match_filepos): Fix error handling.
1917 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1919 * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
1920 Add assertions on arguments.
1921 * resolve.c (expression_shape): Remove useless &.
1922 * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
1923 g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
1924 g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
1925 g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
1926 g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
1927 g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
1928 (g95_simplify_not, g95_simplify_scale): Add assertions.
1930 2003-06-15 Paul Brook <paul@nowt.org>
1932 Clean up stuff to work with the ssa optimizers.
1933 * convert.c (convert): Handle BOOLEAN_TYPEs.
1934 * f95-lang.c (g95_truthvalue_conversion): Implement.
1935 * trans-array.c (g95_trans_array_constructor_value): Group multiple
1937 * trans.h (g95_truthvalue_conversion): Declare.
1938 * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
1939 * trans-stmt.c (g95_trans_character_select): Don't create array
1940 assignments. Mark labels as indirect jump targets.
1941 * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
1942 (g95_get_dtype_cst): Handle LOGICAL types.
1944 2003-06-14 Paul Brook <paul@nowt.org>
1946 * f95-lang.c (g95_gimplify_expr): New function.
1947 * trans-array.c (g95_trans_array_constructor_value): Don't create
1949 (g95_conv_expr_descriptor): Rename simple->gimple.
1950 * trans-expr.c (conv_expr_op): Use proper logical operators.
1951 * trans-intrinsic.c (build_fixbound_expr): New function.
1952 (build_fix_expr): Ditto.
1953 (g95_conv_intinsic_aint): Use them. Use builtin functions.
1954 (g95_conv_intrinsic_function): Add FLOOR and CEILING.
1956 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1958 * array.c (g95_compare_array_spec): Remove unreachable code.
1959 * expr.c (g95_copy_expr): Likewise.
1960 * intrinsic.c (g95_convert_type): Likewise.
1961 * misc.c (g95_code2string): Likewise.
1962 * simplify.c (g95_simplify_ishft, g95_simplify_real,
1963 g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
1964 * trans-stmt.c (g95_trans_select): Likewise.
1965 * primary.c (extend_ref): Add an assertion.
1966 * simplify.c (g95_convert_constant): Add const.
1967 * intrinsic.h: Remove g95_check_x_ni.
1968 * f95-lang.c (g95_finish): Call g95_release_include_path.
1970 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1972 * resolve.c (resolve_contained_functions): Fix typo introduced on
1975 2003-06-09 Paul Brook <paul@nowt.org>
1977 * g95.h: Include system.h not hwint.h.
1978 * many: use safe-ctype.h not ctype.h. Change isalpha -> ISALPHA, etc.
1979 * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
1981 2003-06-09 Paul Brook <paul@nowt.org>
1983 * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
1984 * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
1985 * trans-decl.c (g95_add_decl_to_functions): Make non-static.
1986 (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
1987 (g95_generate_function_code): Translate COMMON and EQUIVALENCE
1989 * trans.h (g95_trans_equivalence, g95_trans_common,
1990 g95_add_decl_to_function): Declare.
1991 * trans-common.c, trans-equivalence.c: New files.
1993 2003-06-08 Steven Bosscher <steven@gcc.gnu.org>
1995 * intrinsic.c (g95_intrinsic_extension): Remove.
1996 (add_functions): Substitute g95_check_x for g95_check_x_ni
1998 (g95_init_expr_extensions): New function.
1999 (g95_intrinsic_func_interface): Use it.
2000 * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
2001 * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
2002 g95_check_precision, g95_check_present, g95_check_radix,
2003 g95_check_range, g95_check_selected_real_kind): Do not set
2004 g95_intrinsic_extension.
2005 (g95_check_x_ni): Remove now duplicate of g95_check_x.
2007 * expr.c (check_inquiry): Add FIXME, fixup some code style.
2009 2003-06-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2011 * g95.h (ref_type): Name this type explicitly.
2012 * module.c (MIO_NAME): Add specialisations of mio_name.
2013 (mio_symbol_attribute, mio_typespec, mio_array_ref,
2014 mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
2015 (ab_attribute): Name this type explicitly.
2016 (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
2018 2003-06-05 Kejia Zhao <kejia_zh@yahoo.com.cn>
2020 * trans-intrinsic.c (g95_conv_allocated): New function.
2021 (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
2023 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
2025 * f95-lang.c: Don't include g95-support.h
2026 (g95_mark_addressable): Add prototype.
2027 (g95_init_decl_processing): Remove C front end hack.
2028 * f95-tree.c: Remove file.
2029 * support.c: Remove file.
2030 * g95-support.h: Remove file.
2031 * trans-types.c (g95_init_types): Set up boolean
2032 type related tree nodes.
2033 * Make-lang.in: Remove rules for dead files and
2034 dependencies on them.
2036 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
2038 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
2039 C front end dependency. Also, convert.c does not depend on
2040 g95-support.h anymore.
2041 * convert.c: Don't include c-common.h and g95-support.h
2042 * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
2043 (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
2044 stmts_are_full_exprs_p, current_stmt_tree,
2045 current_scope_stmt_stack): Remove.
2046 * g95-support.h (unsigned_conversion_warning): Kill proto.
2047 (boolean_type_node, boolean_true_node, boolean_false_node):
2048 Don't define here. Instead, make then true tree nodes in
2050 * support.c (c_global_trees): Die, C front end, die!!!
2051 (g95_init_c_decl_hacks): Don't touch intmax_type_node,
2052 uintmax_type_node, string_type_node and const_string_type_node.
2053 (decl_constant_value, overflow_warning): Make static functions.
2054 They are in death row too, though.
2055 (default_conversion, c_expand_asm_operands): Remove.
2056 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
2057 trans.c: Don't include c-common.h.
2058 * trans-types.c (boolean_type_node, boolean_true_node,
2059 boolean_false_node): Make them real tree nodes.
2060 * trans-types.h (intmax_type_node, string_type_node,
2061 const_string_type_node): Hack to work around C dependencies
2062 in builtin-types.def.
2064 2003-06-04 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2066 * decl.c (decl_types): Add some iterators-like sentinels.
2067 * decl.c (match_attr_spec): Use them.
2068 Use "decl_types" instead of "int".
2069 Add cast in call to g95_match_strings.
2070 * dump-parse-tree.c (g95_show_namespace): Use "g95_intrinsic_op"
2072 * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
2073 (g95_interface_info): Use "g95_intrinsic_op".
2074 * dump-parse-tree.c (g95_show_namespace): Use them.
2075 * interface.c (g95_check_interfaces): Use them.
2076 * module.c (read_module, write_module): Use them.
2077 * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
2078 Use "g95_intrinsic_op".
2079 * interface.c (check_operator_interface): Use "g95_intrinsic_op".
2080 Add a default case in switch statement.
2081 * intrinsic.h (g95_generic_isym_id): Moved to...
2082 * g95.h (g95_generic_isym_id): here.
2083 (g95_intrinsic_sym): Use "g95_generic_isym_id".
2084 * intrinsic.c (make_generic): Use "g95_generice_isym_id".
2085 * trans-intrinsic.c (g95_intrinsic_map_t,
2086 g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
2087 * match.c (g95_match_intrinsic_op): Add cast in call to
2090 2003-06-03 Steven Bosscher <steven@gcc.gnu.org>
2092 * support.c (skip_evaluation, warn_conversion, lvalue_p,
2093 lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
2094 constant_fits_type_p, convert_and_check,
2095 unsigned_conversion_warning): Remove these ugly remnants
2096 we inherited from the C front end.
2097 (function_types_compatible): Remove '#if 0'-edcode.
2098 (build_modify_expr): Likewise.
2099 (convert_for_assignment): Don't use the deceased functions.
2100 The parameter fundecl is now unused.
2101 (decl_constant_value): Always just return decl. In fact
2102 this function is not used at present, but it might be in
2103 the future, when we start using the tree inliner.
2104 (overflow_warning, default_conversion, c_expand_asm_operands):
2105 Abort when these are called, they are part of the C type
2106 checking implementation and therefore poison to Fortran.
2108 2003-06-04 Steven Bosscher <steven@gcc.gnu.org>
2110 * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
2111 c-pretty-print.o and c-dump.o. Add a comment on why we
2112 depend on c-semantics.c.
2113 * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
2114 Don't use the C front end tree dumper hook to dump the
2115 language specific tree representation -- we don't have
2116 one. So instead, inherit the default langhook.
2118 2003-06-02 Paul Brook <paul@nowt.org>
2120 * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
2122 2003-06-02 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2124 * check.c (g95_check_associated): Use proper types. Remove
2125 extraneous argument in call to g95_error().
2127 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
2129 * resolve.c (resolve_operator): Make logical operands convert to the
2130 type with higher kind.
2132 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
2134 * check.c (g95_check_associated): Make sure both pointer and target has
2135 the same type and rank. Null pointer or array section with vector
2136 subscript as target are not allowed.
2137 * trans.h: Declare gfor_fndecl_associated.
2138 * trans-decl.c: (g95_build_builtin_function_decls): Initialize
2139 gfor_fndecl_associated.
2140 * trans-intrinsic.c (g95_conv_associated): New function.
2141 (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
2143 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
2145 * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
2146 according to POINTER itself rather than TARGET.
2147 (g95_conv_expr_descriptor): Make lbound start at 1.
2148 * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
2150 2003-06-01 Paul Brook <paul@nowt.org>
2152 * expr.c (g95_type_convert_binary): Make it match the standard.
2153 * g95.texi: Remove dead link.
2155 2003-06-01 Steven Bosscher <steven@gcc.gnu.org>
2157 * g95.texi: Cleanup somewhat in preparation for inclusion
2160 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2161 Canqun Yang <canqun@yahoo.com.cn>
2163 * resolve.c (compare_bound_int, resolve_where_shape): Proper return
2165 (g95_find_forall_index): Return proper value.
2166 (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
2167 compare the return value from g95_find_forall_index.
2169 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2170 * g95.h, io.c (g95_st_label): Remove "length".
2171 (g95_symtree): Remove "link".
2172 (g95_case): Remove "code".
2173 * arith.c, arith.h (g95_compare_string, g95_convert_integer,
2174 g95_convert_real): Make an argument pointer to const.
2175 * decl.c (colon_seen): Add a TODO.
2176 * interface.c (g95_compare_types): Fix typo.
2177 * interface.c (compare_interfaces): Preserve value of "p".
2178 * intrinsic.c (sort_actual): Remove "i".
2179 * match.c (g95_match_assign): Proper type in call to g95_match().
2180 * parse.c (next_free): Avoid duplicate call due to macro.
2181 * parse.c (check_statement_label): wrong type in call to g95_error.
2182 * primary.c (match_real_constant): Add a TODO.
2183 * resolve.c (resolve_select): Remove useless conditional.
2184 * simplify.c (g95_simplify_repeat): Proper assignment to
2185 "value.character.string".
2186 * simplify.c (g95_simplify_reshape): Wrong variable in call to
2189 2003-05-20 Canqun Yang <canqun@yahoo.com.cn>
2191 * trans-stmt.c: Remove unnecessary include file defaults.h.
2193 2003-05-19 Lifang Zeng <zlf605@hotmail.com>
2195 * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
2197 (g95_trans_forall): Allow arbitrary number of FORALL indexes and
2198 actual variables used as FORALL indexes.
2200 2003-05-15 Paul Brook <paul@nowt.org>
2202 * trans-array.c (g95_trans_static_array_pointer): Use
2204 (g95_trans_deferred_array): Initialize static array pointers.
2205 * trans-expr.c (g95_conv_function_call): Use formal arglist to
2206 correctly pass POINTER and absent CHARACTER arguments.
2208 2003-05-14 Lifang Zeng <zlf605@hotmail.com>
2210 * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
2211 (g95_resolve_forall_body): Resolve FORALL body.
2212 (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
2213 (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
2214 (g95_find_forall_index): Check whether the FORALL index appears in
2215 the expression or not.
2216 (resolve_code): Modified.
2218 2003-05-14 Paul Brook <paul@nowt.org>
2220 * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
2222 2003-05-13 Paul Brook <paul@nowt.org>
2224 * trans-types.c (g95_max_array_element_size): Now a tree node.
2225 (g95_init_types): Work out max size properly.
2226 (g95_get_dtype_cst): Modify to match.
2228 2003-05-11 Paul Brook <paul@nowt.org>
2230 * trans-io.c (add_case): Create a label decl for case labels.
2232 2003-05-11 Paul Brook <paul@nowt.org>
2234 * arith.c (g95_integer_index_kind): New variable.
2235 * f95-lang.c (g95_init): Move frontend initialization here ...
2236 (g95_post_options): ... from here.
2237 * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
2238 * intrinsic.c (add_functions): Use index kinds.
2239 * iresolve.c: Convert to index_kind where needed.
2240 * resolve.c (g95_resolve_index): Make public, use index_kind.
2241 (resolve_array_ref): Adjust to match.
2242 * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
2243 * trans-stmt.c: Ditto.
2244 * trans-types.c: Ditto.
2245 * trans-types.h (g95_array_index_kind): Remove declaration.
2246 * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
2248 2003-05-07 Paul Brook <paul@nowt.org>
2250 * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
2251 * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
2254 2003-05-07 Paul Brook <paul@nowt.org>
2256 * trans-array.c (trans_static_array_pointer,
2257 g95_trans_array_constructor_value, g95_conv_array_initializer,
2258 g95_conv_structure): CONSTRUCTOR nodes only have one operand.
2259 (g95_add_loop_ss_code): Convert subscripts to the correct type.
2260 * trans-stmt.c (g95_trans_character_select): Ditto.
2261 * trans-types.c (g95_init_types): Ditto.
2263 2003-05-07 Steven Bosscher <steven@gcc.gnu.org>
2265 * f95-lang.c (expand_function_body): Use input_line, not lineno.
2266 * trans-decl.c (g95_generate_function_code,
2267 g95_generate_constructors): Likewise.
2268 * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
2269 g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
2272 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
2273 * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
2274 with components point to the DERIVED type itself, and two DERIVED
2275 type with components point to each other.
2276 * trans-expr.c (g95_conv_componet_ref): Modified
2278 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
2279 * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
2281 (g95_trans_pointer_assign): Implement Nullify.
2283 2003-05-01 Paul Brook <paul@nowt.org>
2285 * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
2286 * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
2288 2003-05-01 Paul Brook <paul@nowr.org>
2290 * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
2291 trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
2294 2003-05-01 Canqun Yang <canqun@yahoo.com.cn>
2296 * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
2299 2003-04-28 Paul Brook <paul@nowt.org>
2301 * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
2302 as their kind suggests.
2303 (g95_resolve_reshape): Ditto.
2305 2003-04-28 Chun Huang <compiler@sohu.com>
2307 * trans-expr.c (g95_conv_substring_expr): New function.
2308 (g95_conv_expr): Use it.
2310 2003-04-28 Paul Brook <paul@nowt.org>
2312 * iresolve.c (g95_resolve_transpose): Make it match the
2314 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
2316 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
2318 * trans-types.c (g95_add_field_to_struct): New function to
2319 add a field to a UNION_TYPE or RECORD_TYPE.
2320 * trans-types.h (g95_add_field_to_struct): Prototype.
2321 (g95_get_derived_type): Use g95_add_field_to_struct to add
2323 * trans-io.c (g95_add_field): Remove.
2324 (ADD_FIELD): Use new g95_add_field_to_struct function.
2325 (ADD_STRING): Likewise.
2326 * trans-stmt.c (g95_trans_select): Likewise.
2327 (g95_add_field): Remove duplicated function.
2329 2003-04-18 Canqun Yang <canqun@yahoo.com.cn>
2331 Port implementation for CHARACTER SELECT from Andy's tree.
2332 * trans-stmt.c (g95_trans_character_select): Implement character
2333 select. (g95_add_field): New function.
2334 * trans-decl.c: Declare 'gfor_gndecl_select_string'.
2335 (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
2336 * g95.h (struct g95_case): Add field 'int n'.
2337 * trans.h: Declare 'gfor_fndecl_select_string'.
2339 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
2341 * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
2342 (g95_insert_bbd): Die on duplicates.
2343 * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
2345 2003-04-14 Steven Bosscher <steven@gcc.gnu.org>
2347 * g95.texi: Require GMP 4.0 -- like we actually
2348 do. Explain the testsuite and what-goes-where.
2349 Don't use undefined texinfo symbol. Break very
2350 long line. Remove finished item from the list
2353 2003-04-11 Canqun Yang <canqun@yahoo.com.cn>
2355 * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
2358 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
2360 * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
2361 (g95_trans_forall_body): New function.
2363 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
2365 * resolve.c (resove_where): New function.
2366 (resolve_where_shape): New function.
2367 (resolve_code): Add call to 'resolve_where'
2368 * trans-stmt.c (g95_trans_where): Modified.
2369 (g95_trans_where_2): New function.
2370 (g95_trans_where_assign): New function.
2371 (g95_evaluate_where_mask): New function.
2372 (g95_add_to_stmt_list): New function.
2373 (g95_get_temp_expr): New function.
2374 * trans.h (where_stmt_list): New structure.
2376 2003-04-10 Paul Brook <paul@nowt.org>
2378 * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
2379 (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
2381 2003-04-10 Steven Bosscher <steven@gcc.gnu.org>
2383 Update after mainline -> tree-ssa-branch merge.
2384 * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
2386 (g95_init): Update for new lang_hooks definition.
2387 (g95_post_options): New langhook.
2388 (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
2389 * scanner.c (g95_new_file): Comment update.
2391 2003-04-09 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2393 * g95.h, lang-options.h: Add -Wimplicit-interface.
2394 * options.c (g95_init_options, g95_parse_arg): Set it.
2395 * interface.c (check_intents): Warn about call with implicit
2397 * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
2400 2003-04-05 Paul Brook <paul@nowt.org>
2402 * iresolve.c (g95_resolve_spread): Don't resole based on type.
2403 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
2405 2003-03-29 Paul Brook <paul@nowt.org>
2407 * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
2408 (g95_resolve_unpack): Ditto.
2409 * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
2410 (g95_conv_intrinsic_function): Use it. Remove PACK and UNPACK.
2411 (g95_is_intrinsic_libcall): Add PACK and UNPACK.
2413 2003-03-25 Paul Brook <paul@nowt.org>
2415 * arith.c (g95_unary_user, g95_user): Remove dead functions.
2417 * array.c (g95_free_array_ref): Ditto.
2419 * symbol.c (g95_use_derived_tree): Ditto.
2420 * intrinsic.c (add_functions): Use simplification for SCALE.
2421 * primary.c (g95_match_rvalue): Test sym, not symtree.
2423 2003-03-25 Paul Brook <paul@nowt.org>
2425 * trans-decl.c (build_function_decl): Add parameter before it gets
2426 turned into a constant.
2427 * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
2428 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
2429 * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
2431 2003-03-22 Paul Brook <paul@nowt.org>
2433 * trans-array.c (g95_conv_array_initializer): Allow scalar
2435 * trans-decl.c (g95_finish_var_decl): Result variables are not
2437 * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
2438 (g95_conv_intrinsic_function): Use it.
2439 * trans-types.h (g95_type_spec): Remove dead declaration.
2441 2003-03-21 Paul Brook <paul@nowt.org>
2443 * trans-decl.c (g95_build_function_decl): Mark string parameters.
2445 2003-03-20 Paul Brook <paul@nowt.org>
2447 * trans-decl.c (g95_build_function_decl): Put character length
2448 parameters at the end of the function declaration.
2449 * trans-expr.c (g95_conv_function_call): Ditto.
2450 * trans-types.c (g95_get_function_type): Ditto.
2452 2003-03-20 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2454 * resolve.c (resolve_formal_arglist): Don't impose intent for
2455 procedure arguments of pure functions.
2456 (resolve_select): Remove redundant assignment.
2458 2003-03-19 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2460 * arith.c (validate_logical), g95.h, options.c (g95_init_options):
2462 * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
2463 * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
2465 * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
2467 * symbol.c (g95_add_type): Fix typo in comment.
2470 2003-03-16 Paul Brook <paul@nowt.org>
2472 * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
2473 * expr.c (g95_build_call): Remove.
2474 * f95-lang.c (puchdecl_top_level): New function.
2475 * g95.h (g95_code): Store resolved symbol, not just the name.
2476 * intrinsic.c (g95_intrinsic_namespace): New global namespace.
2477 (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
2478 (g95_get_intrinsic_sub_symbol): New function.
2479 * iresolve.c (g95_resolve_cpu_time): Use it.
2480 (g95_resolve_random_number): Ditto.
2481 * resolve.c: Set code->resolved_sym instead of code->sub_name.
2482 * trans-decl.c (g95_get_extern_function_decl): Give external decls
2483 the correct DECL_CONTEXT. Add global symbold to the global scope.
2484 * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
2487 2003-03-16 Paul Brook <paul@nowt.org>
2489 * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
2490 * options.c (g95_parse_arg): Ditto.
2491 * module.c (mio_symbol_attribute): Handle the always_explicit bit.
2492 * resolve.c (resolve_formal_arglist): The always_explicit sould be set
2493 for the procedure, not the parameter.
2494 * trans-array.c (g95_trans_g77_array): New function.
2495 (g95_trans_assumed_size): Use it.
2496 (g95_trans_dummy_array_bias): Ditto.
2497 (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
2498 (g95_conv_expr_descriptor): ... to here. Update callers.
2499 * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
2500 (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
2501 * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
2502 * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
2503 * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
2504 (g95_sym_type): Ditto.
2506 2003-03-15 Paul Brook <paul@nowt.org>
2508 * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
2510 * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
2512 2003-03-14 Paul Brook <paul@nowt.org>
2514 * trans-array.c (g95_array_is_packed): Remove.
2515 (g95_conv_array_base): Correctly handle all descriptorless cases.
2516 (g95_conv_array_stride): Use descriptorless strides.
2517 (g95_trans_dummy_array_bias): Don't always repack the array.
2518 (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
2520 * trans-types.c (g95_get_nodesc_array_type): Differentiate between
2521 dummy and non-dummy arrays...
2522 (g95_sym_type, g95_get_derived_type): ... like these.
2523 (g95_get_array_type_bounds): Allow discontiguous arrays.
2525 2003-03-12 Paul Brook <paul@nowt.org>
2527 * array.c (g95_resolve_array_spec): Fix comment.
2528 * g95.h (symbol_attributes): New flag always_explicit.
2529 * resolve.c (resolve_formal_arglist): Set it always_explicit.
2530 * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
2531 * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
2532 (g95_trans_array_bounds): Allow assumed shape arrays.
2533 (g95_trans_repack_array): Remove.
2534 (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
2535 * trans-decl.c (g95_build_qualified_array): Only ignore absent
2536 bounds for assumed size arrays.
2537 (g95_build_dummy_array_decl): Use descriptorless arrays.
2538 * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
2539 (g95_trans_pointer_assign): Fix typo.
2540 * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
2542 (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
2543 * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
2544 Also modify callers.
2545 * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
2547 2003-03-08 Paul Brook <paul@nowt.org>
2549 * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
2550 (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
2551 * resolve.c (compare_spec_to_ref): Allow full array sections.
2553 2003-03-08 Paul Brook <paul@nowt.org>
2555 * expr.c (g95_simplify_expr): Also simplify array index and
2556 substring expressions.
2557 * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
2558 * trans-array.c (g95_trans_array_bounds): New function.
2559 (g95_trans_auto_array_allocation): Use it.
2560 (g95_trans_assumed_size): Rewrite.
2561 * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
2562 (gfor_fndecl_repack): Remove.
2563 (g95_build_qualified_array): Handle absent upper bounds.
2564 (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
2565 (g95_get_symbol_decl): Update.
2566 (g95_build_intrinsic_function_decls): Initialize new decls.
2567 * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
2568 (gfor_fndecl_repack): Remove.
2569 * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
2570 * trans-types.c: (g95_build_array_type): Merge duplicated code..
2571 (g95_get_nodesc_array_type): Handle absent bounds.
2572 * trans-types.h (g95_get_nodesc_array_type): Declare.
2574 2003-03-04 Paul Brook <paul@nowt.org>
2576 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
2579 2003-03-02 Paul Brook <paul@nowt.org>
2581 * options.c (g95_init_options): Drfault to 1.
2582 (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
2583 * trans-array.c (g95_conv_array_data, g95_conv_array_base,
2584 g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
2585 Handle non-constant size automatic arrays.
2586 (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
2587 generic bound functions.
2588 (g95_trans_auto_array_allocation): Don't create a descriptor.
2589 (g95_trans_assumed_size): New function (broken).
2590 (g95_trans_dummy_array_bias): Remove unused var.
2591 * trans-array.h (g95_trans_assumed_size): Declare.
2592 * trans-decl.c (create_index_var): New fuction.
2593 (g95_build_qualified_array): New function.
2594 (g95_get_symbol_decl): Use it.
2595 (g95_trans_deferred_vars): Handle assumed shape seperately.
2596 * trans-types.c (get_element_type): Handle heap allocated arrays.
2597 (g95_is_nodesc_array): Include non-const size arrays.
2598 (g95_get_nodesc_array_type): Ditto.
2600 2003-02-23 Paul Brook <paul@nowt.org>
2602 * trans-array.c (g95_array_init_size): Should use stride, not size of
2605 2003-02-18 Paul Brook <paul@nowt.org>
2607 * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
2608 after intrinsic function check.
2610 2003-02-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2612 * io.c (match_io): Fix missing return value and remove useless
2614 * match.c (g95_match): Remove useless assignment.
2615 * module.c (parse_string): Remove useless post increment.
2616 * simplify.c (g95_simplify_verify): Remove useless assignment.
2618 2003-02-15 Paul Brook <paul@nowt.org>
2620 * expr.c (restricted_intrinsic): Handle bad values gracefully.
2621 * g95.h (symbol_attribute): Add referenced member.
2622 (g95_symbol): Add dummy_order member.
2623 (g95_set_sym_referenced): Declare.
2624 * match.c (g95_match_assignment, g95_match_call): Use it
2625 * primary.c (match_actual_arg, g95_match_rvalue,
2626 g95_match_variable): Ditto.
2627 * symbol.c (next_dummy_order): New variable.
2628 (g95_set_sym_referenced): New function.
2629 (check_done): New function.
2630 (g95_add_*): Use it.
2631 * trans-decl.c: Make formatting conform to GCC standards.
2632 (g95_defer_symbol_init): Add dummy variables in the right order.
2633 (g95_get_symbol_decl): Only accept referenced variables.
2634 (g95_create_module_variable): Module variables are always required.
2635 (generatr_local_decls): New function.
2636 (generate_local_vars): New function.
2637 (g95_generate_function_code): Use it.
2639 2003-02-13 Paul Brook <paul@nowt.org>
2641 * trans-decl.c (g95_conv_struct_cons): Remove.
2642 (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
2643 * trans-expr.c (g95_conv_structure): New function.
2644 (g95_conv_expr): Use it.
2646 2003-02-09 Paul Brook <paul@nowt.org>
2648 * trans-array.c (g95_array_init_size): Don't evaluate the linit
2649 expressions multiple times.
2650 (g95_trans_auto_arry_allocation): Use pointer not tmp.
2652 2003-02-08 Paul Brook <paul@nowt.org>
2654 * module.c (mio_symtree_ref): Declare as static.
2655 (mio_expr): Remove dead code.
2656 (read_module): Set the symtree link for fixups.
2657 * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
2658 (build_round_expr): ... to this.
2659 (g95_conv_intrinsic_aint): New function.
2660 (g95_conv_intrinsic_function): Use it.
2662 2003-02-08 Paul Brook <paul@nowt.org>
2664 * trans-array.c (g95_trans_array_constructor_value): Use the acutal
2665 offset after modificaton, not the increment expression.
2666 * dependency.c: Kill excess whitespace.
2668 2003-02-07 Sanjiv Gupta <sanjivg@noida.hcltech.com>
2670 * dependency.h: Remove some function declarations.
2671 * dependency.c (get_no_of_elements): Change this function not to
2673 * other: Add comments for all modified functions.
2675 2003-02-06 Paul Brook <paul@nowt.org>
2677 * g95spec.c (lang_specific_functions): Fix initializer warning.
2678 * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
2679 for structure type names.
2680 * trans-decl.c (g95_cons_structure_cons): New function.
2681 (g95_get_symbol_decl): Use it.
2682 * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
2685 2003-02-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2687 * resolve.c (compare_cases): Add const to casts.
2689 2003-01-30 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2691 * g95.h (g95_check_f): Change a1 to f1m.
2692 * intrinsic.c (add_sym_1m, check_specific,
2693 g95_intrinsic_func_interface): Use it.
2695 * module.c (init_pi_tree): Remove useless cast.
2696 (fp2): Fix argument type.
2698 * parse.c (parse_select_block): Add comment.
2700 2003-02-05 Toon Moene <toon@moene.indiv.nluug.nl>
2702 * lang-options.h: Fix warning involving C90 concatenated
2705 2003-02-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
2706 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2708 * io.c (format_asterisk): Complete initializer to kill warning.
2709 * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
2710 DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
2711 (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
2712 new defines to complete initializers. Kills all warnings.
2714 * Make-lang.in: Comment cleanup.
2716 2003-02-05 Paul Brook <paul@nowt.org>
2718 * array.c (g95_free_constructor): Handle NULL expressions.
2719 * resolve.c (resolve_structure_cons): Ditto.
2720 * decl.c (g95_match_null): New Function.
2721 (variable_decl): Use it.
2722 * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
2723 * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
2724 * trans-types.c (g95_set_decl_attributes): Remove empty function.
2726 2003-02-05 Paul Brook <paul@nowt.org>
2728 * trans.h (build1_v): New macro.
2729 (build_v): Remove pointless and incorrect prototype.
2730 * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
2731 * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
2733 2003-02-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
2735 * Make-lang.in (F95_OBJS): Remove one more dead file.
2737 2003-02-01 Paul Brook <paul@nowt.org>
2739 * lang-specs.h: Don't pass -ffixed-form to the linker.
2740 * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
2742 2003-02-01 Paul Brook <paul@nowt.org>
2744 * Make-lang.in (F95_OBJS): Remove dead files.
2745 * trans-array.c (g95_array_init_size): Do the right thing when
2747 * trans-decl.c (g95_generate_function_code): Initialize deffered
2748 symbol list before translating contained subroutines.
2749 * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
2750 scalar invariant values here...
2751 (g95_conv_variable, g95_conv_function_call): ... instead of here ...
2752 * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
2754 2003-01-29 Paul Brook <paul@nowt.org>
2756 * trans-array.c (g95_add_loop_code): Put pre code in the right block.
2757 (g95_walk_elemental_function_args): Reverse chains before adding.
2758 (g95_reverse_ss): Move about a bit.
2759 * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
2762 2003-01-28 Paul Brook <paul@nowt.org>
2764 * intrinsic.c (resolve_intrinsic): Use correct union member.
2765 * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
2767 * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
2768 use associated variables.
2769 * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
2770 * trans-expr.c (g95_conv_expr_present): ... to here.
2771 * trans.h: Declare it.
2772 * trans-types.c (g95_sym_type): Assume subroutine if not specified.
2774 2003-01-28 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2776 * array.c (expand_iterator): Suppress useless assignment.
2777 * decl.c (match_char_spec): Ditto.
2778 * io.c (match_io_iterator): Ditto.
2779 * primary.c (match_real_constant): Ditto.
2780 * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
2781 Ditto. Also, use g95_intrinsic_op not int for intrinsic operators.
2782 * matchexp.c (match_add_operand, match_level_5): Likewise.
2783 * module.c (parse_atom, find_enum): Likewise.
2784 * resolve.c: move #include <string.h>
2785 (resolve_select): Fix serious typo.
2787 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.n>
2789 * Make-lang.in: Don't build with broken tree-ssa-pre.
2791 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.nl>
2793 * resolve.c (resolve_index): Add a TODO.
2794 * symbol.c: Remove useless "#include <ctype.h>".
2796 2003-01-27 Paul Brook <paul@nowt.org>
2798 * check.c (check_rest): Allow different type kinds as an extension.
2799 * g95.h (g95_resolve_f): Add f1m.
2800 * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
2801 * intrinsic.h: Chenge prototypes for MIN and MAX.
2802 * iresolve.c (g95_resolve_minmax): New function.
2803 (g95_resolve_min, g95_resolve_max): Use it.
2804 * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
2806 (g95_conv_intrinsic_present): Fix logic.
2808 2003-01-27 Steven Bossche <s.bosscher@student.tudelft.nl>
2810 * g95.h (g95_case): Don't be a tree, be a double linked list.
2811 * match.c (match_case_selector): Remove redundant semantics check.
2812 Clean up a few goto's to make it a tiny little bit faster.
2813 * resolve.c (case_tree): Die.
2814 (compare_cases): Accept and compare unbounded cases too.
2815 (check_case_overlap): Don't build a tree. Instead, merge-sort the
2816 whole list of g95_cases passed from resolve_select.
2817 (sane_logical_select): Die.
2818 (check_case_expr): Return FAILURE if a CASE label is of the wrong
2820 (resolve_select): Fixup case expression for computed GOTOs, put it
2821 in expr, not expr2, for easier handing in the parse tree dumper and
2822 the code generator. Rewrite the rest of the function: Kill
2823 unreachable case labels and unreachable case blocks.
2824 * dump-parse-tree.c (g95_show_code_node): Always dump expr for
2825 an EXEC_SELECT, not case2 anymore.
2826 * trans-const.c (g95_conv_constant_to_tree): New function.
2827 (g95_conv_constant): Use it.
2828 * trans-const.h: Declare prototype for the new function.
2829 * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
2830 g95_trans_character_select): New static functions.
2831 (g95_trans_select): Rewrite.
2833 2003-01-26 Paul Brook <paul@nowt.org>
2835 * intrinsic.c (add_fnctions): Properly add dreal.
2836 * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
2837 (g95_conv_intrinsic_function): Use it.
2838 * trans-io.c (build_dt): Abort on internal files (unimplemented).
2840 2003-01-26 Paul Brook <paul@nowt.org>
2842 Widespread changes to the handling of symbols in expressions. These
2843 are now linked via g95_symtree nodes.
2844 * parse.c (g95_fixup_sibling symbols): New function.
2845 (parse_contained): Use it.
2846 * g95.h (symbol_attribute): Add contained. Indicates a symbol is a
2847 contained procedure that has bee correctly fixed up.
2848 (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
2850 2003-01-24 Paul Brook <paul@nowt.org>
2852 * trans-array.c (g95_walk_expr): Function result attributes are in
2854 * trans-expr.c (g95_conv_function_call,
2855 g95_trans_arrayfunc_assign): Ditto.
2856 * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
2858 2003-01-23 Steven Bosscher <s.bosscher@student.tudelft.nl>
2860 * expr.c (check_restricted): Fix error message.
2861 * symbol.c (free_st_labels): Plug memleak.
2863 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
2865 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
2866 reduce_binary_aa, reduce_binary, eval_intrinsic,
2867 eval_intrinsic_f2): Use typesafe prototypes for eval functions.
2868 * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
2869 for typesafe intrinsics helper functions.
2870 (g95_intrinsic_sym): Use them.
2871 * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
2872 add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
2873 add_sym_5, add_conv, resolve_intrinsic, do_simplify,
2874 check_specific, g95_intrinsic_func_interface,
2875 g95_intrinsic_sub_interface): Adjust all calls to intrinsics
2877 * trans-decl.c (g95_get_extern_function_decl): Likewise.
2878 * Make-lang.in: Don't disable warnings for strict prototypes
2879 any longer, everything is typesafe now.
2881 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
2883 * bbt.c (duplicate_node): Make static.
2884 * module.c (module_name): Make static.
2885 * scanner.c (include_dirs): Make static.
2887 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
2889 Hard coded _gfor_'s should not show up anymore.
2890 * g95.h (PREFIX): New macro.
2891 * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
2893 (g95_resolve_random_number): Likewise.
2894 * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
2895 * trans-io.c: Remove 'prefix' macro. Replace all uses with
2896 the new PREFIX macro from g95.h.
2898 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
2900 The troubles of forking... Andy implemented this just now too.
2901 Let's stick to that and keep the trees close.
2902 * g95.h (g95_st_label): 'format' member is now a g95_expr.
2903 * io.c: Revert previous changes.
2904 (g95_match_format): Match the format string as a character
2906 * match.h (g95_statement_label): Declare external.
2907 * parse.c: Revert previous changes.
2908 * symbol.c (g95_free_st_label): Free a g95_expr instead
2910 * trans-io.c: Revert previous changes.
2911 (build_dt): Use set_string to set the format string.
2913 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
2915 * io.c (format_string): Make non-static.
2916 (g95_match_format): Remember the format string.
2917 (terminate_io): Add I/O termination for empty I/O lists.
2918 * match.h: Declare external format_string.
2919 * parse.c (check_statement_label): Attack the format string
2920 to a format label for FORMAT statements.
2921 * trans-io.c (g95_add_field): Define prefix macro. Replace
2922 all uses of PREFIX define with a use of this macro.
2923 (build_dt): Implement formatted I/O for format labels.
2925 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
2927 * lang-options.h: Kill "-std=F".
2928 * options.c: Remove unimplemented "-std=F". Modify
2930 * misc.c (g95_terminal_width): New function.
2931 * error.c (g95_error_init_1): Use g95_terminal_width.
2932 * g95.h: Add prototype for g95_terminal_width, remove
2935 2003-01-19 Steven Bosscher <s.bosscher@student.tudelft.nl>
2937 * Make-lang.in: Fix typo.
2939 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
2941 * g95.h (struct g95_case): Remove unused cruft, new member
2942 'where' to keep track of the locus of the default case.
2943 * match.c (g95_match_case): Add locus to the current case.
2944 (match_case_selector): Likewise.
2945 * parse.c (parse_select_block): Move semantics check for
2946 multiple DEFAULT cases out of here to...
2947 * resolve.c (check_case_overlap): ...here. Return sooner
2949 (check_case_expr): Take two g95_cases now, use to sure the
2950 expression kinds are the same.
2951 (resolve_select): Cleanup.
2953 2003-01-18 Paul Brook <paul@nowt.org>
2955 * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
2956 * trans-decl.c (g95_set_symbol_decl): Handle non-array result
2958 (g95_get_extern_function_decl): Put decls in the correct context.
2960 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
2962 * trans-io.c: Port changes from Andy to set ERR flag.
2964 2003-01-17 Paul Brook <paul@nowt.org>
2966 * trans-array.c: Add various comments.
2967 (g95_ss_terminator): Declare as const.
2968 (g95_walk_expr): Remove first parameter and update all callers.
2969 (g95_walk_op_expr): Initialize scalar SS properly.
2970 * trans-array.h (g95_walk_expr): Update prototype.
2971 * trans-expr.c: Update for new g95_walk_expr.
2972 * trans-intrinsic.c: Ditto.
2973 * trans-io.c: Ditto.
2974 * trans.h: Various comments for SS chains.
2976 2003-01-17 Paul Brook <paul@nowt.org>
2978 * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
2980 * intrinsic.c (add_functions): Use them.
2981 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
2982 * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
2984 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
2986 Fallout of a small merge conflict:
2987 * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
2989 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
2991 * initrinsic.c: New add_sym_* functions for strong typing.
2992 (add_conv): Make prototype strict.
2993 * dump-parse-tree.c, dependency.c: Include config.h
2994 * resolve.c, trans-io.c: Fix typos.
2996 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
2998 * dump-parse-tree.c (g95_show_code_node): Show the
2999 condition for a computed GOTO that was transformed
3000 to a SELECT CASE construct.
3001 * resolve.c (check_case_overlap): Revert previous switch
3002 to treaps, it was too slow and didn't catch all trouble.
3003 (resolve_symbol): Be more flexible about module procedures.
3004 * symbol.c (check_conflict): Point to relevant section in
3005 the standard for dubious conflict. Allow procedure
3006 dummy arguments to be optional again.
3007 * trans-io (add_field): Rename to g95_add_field. Change
3009 * trans-stmt (trans_select): Handle unbounded cases for
3010 integer SELECT CASE constructs. Fix/add more comment.
3012 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
3014 * g95.h: Uses GCC's function attribute macros.
3015 * error.c, module.c, parse.c, g95.h: More function attributes.
3017 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
3019 * trans-decl.c (get_label_decl): Use TREE_LINENO instead
3020 of DECL_SOURCE_LINE, and TREE_FILENAME instead of
3023 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
3025 * f95-lang.c (pushdecl): Use TREE_LINENO instead of
3027 * trans.c (g95_trans_code): Use annotate_all_with_file_line
3028 instead of nowdead wrap_all_with_wfl.
3030 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
3032 * parse.c (g95_parse_file): In verbose mode, dump the parse tree
3033 before generating code, so we can still see it even if the code
3034 generation phase dies.
3036 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
3038 * decl.c (build_sym): Split out initialization expression parts...
3039 (add_init_expr_to_sym): ...to here.
3040 (variable_decl): Add the symbol following an attribute list to the
3041 symbol tree before parsing the optional initialization expression
3042 if the symbol is not of a derived type.
3043 * primary.c (g95_match_rvalue): Don't assume a symbol always has
3044 a value if it is a PARAMETER.
3046 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
3048 * misc.c: Don't #include <mcheck.h>
3049 * module.c: Ditto. Kill uses of mtrace, muntrace. If there
3050 ever was a glibc bug, then either this was never reported to
3051 glibc people, or it has been fixed for so long that there's
3052 no information you can find about it, anywhere.
3054 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
3057 * module.c (attr_bits, bt_types, array_spec_types):
3058 Switch 'const' and 'static'.
3059 * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
3061 GNU'ify source code:
3062 * trans-io.c: Numerous fixes, one fixed warning and a few
3063 TODO markers so that we don't forget about them.
3065 2003-01-13 Paul Brook <paul@nowt.org>
3067 * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
3068 * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
3070 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
3071 * match.c (g95_match_stop): Fix dumb == -> != error.
3073 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
3075 * dump-parse-tree.c (show_indent): Add line breaks. This
3076 whole dumping process needs cleanups.
3077 * f95-lang.c (g95_mark_addressable): Fix prototype to match
3078 the langhook. Fix 'return's accordingly.
3079 * g95-support.h: Adjust prototype.
3080 * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
3081 * lang-options.h: Add '-fsyntax-only'.
3082 * options.c (g95_init_options): Init 'no_backend'.
3083 (g95_parse_arg): Deal with '-fsyntax-only'.
3084 * parse.c (g95_parse_file): Do not generate code if 'no_backend'
3087 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
3089 * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
3090 arguments. Also make sure that if a symbol is marked INTRINSIC,
3091 an intrinsic with the symbol's name actually exists.
3092 (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
3093 Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
3094 ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
3096 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
3098 * resolve.c (resolve_contained_functions): Fix condition, don't
3099 throw internal_error if a child namespace has no name. Apparently
3100 this can be the case?
3102 2003-01-11 Paul Brook <paul@nowt.org>
3104 Port changes from Andy's tree:
3105 * g95.h (g95_code): Add stop_code.
3106 * match.c (g95_match_stop): Detter syntax checking.
3107 * resolve.c (resolve_generic_f0): Return match type.
3108 (resolve_generic_f): Remove dead/duplicated code.
3109 (resolve_specific_f): Ditto.
3110 * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
3111 * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
3112 * trans-stmt.c (g95_trans_stop): Handle new STOP format.
3114 2003-01-11 Paul Brook <paul@nowt.org>
3116 * trans-array.c: Various documentation/comment changes.
3117 * trans-stmt.c: Ditto.
3120 2003-01-10 Paul Brook <paul@nowt.org>
3122 * options.c/h: Add -fdump-parse-tree as alias of -v.
3124 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3126 * dump-parse-tree.c (g95_show_namespace): Fixed another
3127 typo. Sorry, it's Friday...
3129 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3132 * trans-array.c, trans-array.h, trans.c, trans-const.c,
3133 trans-const.h, trans-decl.c, trans-expr.c, trans.h
3134 trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
3135 trans-types.c: Fix bogus copyright years, add 2003.
3136 * trans-types.h: Give copyright header.
3138 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3140 * dump-parse-tree.c (g95_show_namespace): Fixed typo.
3141 * expr.c, options.c, scanner.c: Add some more 'const' markers.
3142 * intrinsic.c: Some constant strings moved to read-only memory.
3143 * io.c (format_asterisk): Move to...
3146 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3148 * dump-parse-tree.c (g95_show_namespace): Dump implicit
3149 types for ranges instead of per-letter. Indent the
3150 'CONTAINS' just like everything else.
3151 * resolve.c (resolve_contained_functions): Clarify comment.
3152 Explain non-obvious conditional expression. Improve
3153 diagnostics if tyoe cannot be resolved.
3154 Port semi-fix from Andy's tree:
3155 (was_declared): Move up before first use.
3156 (generic_sym, specific_sym): New functions. Code moved
3157 out if procedure_kind.
3158 (procedure_kind): Simplify using new functions.
3159 (resolve_generic_f): Make sure the functions we find in
3160 a parent namespace is generic.
3161 (resolve_specific_f): Ditto for specific functions.
3163 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3165 * trans-stmt.c, trans.c: Fix some code style issues. Add
3166 some more comment (but still not enough!).
3168 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3170 * symbol.c (flavors, procedures, intents, acces_types,
3171 access_types, ifsrc_types): Make const.
3172 * misc.c (g95_string2code): Make 'm' param 'const'.
3173 * module.c (find_enum, write_atom, mio_name): Make
3175 (attr_bits, bt_types, array_spec_types, array_ref_types,
3176 ref_types, expr_types): Make const.
3177 * g95.h: Adjust external decls.
3179 2003-01-09 Paul Brook <paul@nowt.org>
3181 * Testsuite: Add a load of new cases.
3183 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
3185 * Make-file.in: Add dependency on back end header files;
3186 a parallel build should work now.
3187 * f95-lang-c (lang_identifier): Remove bogus comment.
3188 (g95_be_parse_file): Fix prototype.
3189 (g95_init): Make static.
3190 (g95_finish): Make static.
3191 * error.c (g95_syntax_error): Kill. Make define in...
3192 * g95.h (g95_syntax_error): Define.
3193 (g95.options): Make 'source' member 'const'.
3194 * interface.c (g95_match_interface): Explain
3195 hard-to-read condition.
3196 (g95_match_end_interface): Ditto.
3197 * trans_const.c (g95_build_string_const): Make 's' parameter
3199 * trans_const.h: Adjust protoype accordingly.
3200 * trans-decl.c: Include tree-dump.h
3201 (g95_generate_function_code): Build fixes for recent changes
3202 in the tree-ssa branch.
3204 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
3206 * format.c: Kill, move code from here...
3208 * Make-lang.in: Adjust.
3211 * BUGS: Mention where to submit bugs. Move old content...
3212 * TODO: ...to here. New file.
3214 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
3215 Fix most warnings, and suppress the ones we can't fix for now.
3216 * Make-lang.in: Suppress warnings about bad proto's in g95.h,
3217 these warnings just clutter the screen and there's not much
3218 we can do about them for now anyway.
3219 * check.c, iresolve.c: Mark unused function parameters.
3220 * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
3221 they should be resolved before they get here.
3222 * error.c: Remove unused FILE *status_out.
3223 * f95-lang.c (g95_init): Remove bogus cast.
3224 * Many files: Make things 'const' where required.
3225 * g95.h: Fix prototypes for all modified functions above.
3226 (g95_options): Remove 'object' member.
3228 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
3230 * Make-file.in: Cleanup bogus targets. Add more comment.
3231 * lang-options.h: New option '-w'.
3232 * g95.h: add no_options field to struct g95_options.
3233 * options.c (g95_init_options): Default no_warnings to off.
3234 (g95_parse_arg): Recognise the '-w' switch and its alias,
3236 * error.c (g95_warning, g95_warning_now): Don't emit warning if
3237 no_warning option is set.
3238 * iresolve.c (g95_resolve_shape): Fix warning.
3240 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
3242 * primary.c (g95_next_string_char): Rename next_string_char, and
3243 make static. Adjust callers accordingly.
3244 * resolve.c (resolve_generic_f0): Return try, not match. Adjust
3245 callers accordingly.
3246 * g95.h: Split out all g95_match* functions to...
3247 * match.h: ...here. New file.
3248 * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
3249 matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
3251 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
3253 * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
3254 g95_merge_new_implicit): New functions.
3255 (g95_match_implicit_none, g95_match_implicit): Move from here...
3256 * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
3257 Modify to use the new functions in symbol.c.
3258 * g95.h: Add and move prototypes.
3260 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
3262 * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
3263 node compare function.
3264 (g95_insert_bbt): Likewise.
3265 (g95_insert_bbt_with_overlap): Likewise.
3266 (g95_delete_bbt): Likewise.
3267 (delete_treap): Likewise. Also fix a potential bug when calling it.
3268 * module.c (compare_pointers): Change proto to compare_fn.
3269 (compare_integers): Likewise.
3270 (compare_true_names): Likewise.
3271 (find_true_name): Adjust call to compare_true_names to match proto.
3272 (require_atom, write_atom, mio_name): Fix 'const' warnings.
3273 (init_pi_tree): Make compare a compare_fn instead of (int *).
3274 * resolve.c (compare_cases): Change proto to compare_fn.
3275 * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
3276 it static, and rename to compare_symtree.
3277 (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
3279 * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
3280 of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
3282 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
3283 * Make-lang.in: Fix spaces/tabs issues from previous patch.
3284 * patch.options: Blow away Paul's checkin mistake :-)
3285 * io.c (terminate_io): Fix memory leak (Arnaud).
3287 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
3289 * Make-lang.in: Teach about building DVI, info manual.
3290 * g95.texi: New file.
3292 2003-01-02 Paul Brook <paul@nowt.org>
3294 * trans-array.c (g95_reverse_ss): Make static and don't use.
3295 (g95_conv_ss_descriptor): Don't use g95_loopinfo
3296 (g95_conv_array_parameters): Modify for pointer assignments.
3297 (g95_walk_subexpr): New function.
3298 (g95_walk_expr*): Use it.
3299 * trans-array.h (g95_reverse_ss): Remove prototype.
3300 * trans-expr.c (g95_trans_pointer_assign): Implement.
3301 (Many): Set se.want_pointer before calling g95_conv_array_parameter.
3302 * trans-intrinsic.c: Sync with scalarizer changes.
3303 * trans-io.c: Ditto.
3305 2002-12-29 Paul Brook <paul@nowt.org>
3307 * trans-array.c: Document calling convention for arrays.
3309 2002-12-19 Paul Brook <paul@nowt.org>
3311 * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
3312 assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
3313 optional parameters for some intrinsics.
3314 (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
3315 * trans-expr.c (g95_conv_function_call): Pass NULL for absent
3316 optional parameters.
3317 * trans.h (g95_se): Add ignore_optional flag.
3319 2002-12-15 Paul Brook <paul@nowt.org>
3321 * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
3322 * trans-decl.c (g95_generate_function_code): Use TDI_original.
3324 2002-12-14 Paul Brook <paul@nowt.org>
3326 * trans-stmt.c (g95_trans_call): Use resolved symbol name.
3328 2002-12-12 Paul Brook <paul@nowt.org>
3330 * trans-array.c (g95_trans_array_constructor_subarray): Fully
3331 initialize the scalarizer.
3332 (various): Update to new format of g95_expr->value.constructor.
3334 2002-12-08 Paul Brook <paul@nowt.org>
3336 * trans-array.c (g95_put_offset_into_var): New function.
3337 (g95_trans_array_constructor_subarray): New function.
3338 (g95_trans_array_constructor_value): Use it.
3339 (g95_array_cons_size): Don't abort() on array components.
3341 2002-12-08 Paul Brook <paul@nowt.org>
3343 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
3344 * support.c: Update #includes.
3345 (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
3346 * trans-array.c: Update #includes.
3348 * trans-const.c: Ditto.
3349 * trans-io.c: Ditto.
3350 * trans-types.c: Ditto.
3351 (g95_init_types): Set size_type_node.
3352 * trans-decl.c: Update #includes.
3353 (gfor_fndecl_adjust{l,r}): Declare and initialize.
3354 * trans-stmt.c: Update #includes.
3355 (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
3356 (g95_trans_select): Fix check for unbounded ranges.
3357 * trans-expr.c: Update #includes.
3358 (g95_conv_string_tmp): New function.
3359 (g95_conv_concat_op): Use it.
3360 * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
3361 * Trans-intrisic.c: Update #includes.
3362 (g95_conv_intrinsic_strcmp): New function.
3363 (g95_conv_intrinsic_adjust): Ditto.
3364 (g95_conv_intrinsic_function: Use them.
3366 2002-11-30 Paul Brook <paul@nowt.org>
3368 * trans-array.c (g95_walk_function_expr): Handle non-array return by
3370 * trans-dec.c (g95_build_function_decl): Handle character return
3372 (g95_get_fake_result_decl): Ditto.
3373 (g95_trans_deferred_vars): Ditto.
3374 * trans-expr.c (g95_conv_function_call): Ditto.
3375 (g95_trans_arrayfunc_assign) Limit to array valued functions.
3376 * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
3377 (g95_conv_intrinsic_function): Use it.
3378 * trans-types.c (g95_sym_type): Handle functions returning strings.
3379 (g95_return_by_reference): Ditto.
3380 (g95_get_function_type): Ditto.
3382 2002-11-18 Paul Brook <paul@nowt.org>
3384 * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
3385 requires a temporary.
3386 (g95_trans_select): Handle computed gotos.
3387 * trans-types.c (g95_build_array_type): Warn about non-functional
3388 assumed shape arrays.
3389 * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
3391 * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
3392 (g95_conv_intrinsic_int): New function.
3393 (g95_conv_intrinsic_mod): New function.
3394 (g95_conv_intrinsic_ichar): New function.
3395 (g95_conv_intrinsic_function): Use them.
3396 (g95_conv_intrinsic_dim): Use g95_evaluate_now.
3398 2002-11-17 Toon Moene <toon@moene.indiv.nluug.nl>
3400 * trans-types.c (g95_build_array_type): Assumed
3401 sized arrays can have rank > 1.
3402 * trans.c (g95_trans_code): Remove erroneous
3403 warning about CONTINUE.
3404 * trans-expr.c (g95_conv_variable): Remove
3407 2002-11-15 Paul Brook <paul@nowt.org>
3409 * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
3411 2002-10-31 Paul Brook <paul@nowt.org>
3413 * f95-tree.c: Remove tree copying stuff that's now in gimple.c
3414 * trans-expr.c (g95_conv_component_ref): Handle character string
3416 (g95_conv_string_parameter): Ditto.
3417 * trans-types.c (g95_get_derived_type): Add length decl to caracter
3420 2002-10-10 Paul Brook <paul@nowt.org>
3422 * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
3423 * trans-expr.c (g95_conv_function_call): Remove unreliable return value
3425 * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
3426 (g95_conv_intrinsic_function): Handle size and shape intrinsics.
3427 (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
3428 * trans-types.c (pvoid_type_node): Declare and initialize.
3429 * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
3430 (g95_array_allocate): Fix when base==data.
3431 (g95_conv_array_parameter): Correctly handle reduced rank sections.
3432 * trans-io.c (g95_trans_write): Correctly handle string modifiers.
3434 2002-10-09 Paul Brook <paul@nowt.org>
3436 * (g95_conv_expr_reference): Handle character strings correctly.
3438 2002-10-07 Paul Brook <paul@nowt.org>
3440 (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
3442 * trans-array.c (g95_build_array_initializer): Remove.
3443 (g95_conv_array_initializer): New Function.
3444 (g95_trans_auto_arry_allocation): Cleanup.
3445 (g95_trans_init_character_array): Remove.
3446 * g95spec.c: Link in libgforbegin.
3447 * trans.c (g95_generate_code): Rename main function to MAIN__.
3448 (g95_create_var): New function.
3449 (g95_create_var_np): New function.
3450 (g95_evaluate_now): New function.
3451 (g95_start_block): New function.
3452 (g95_finish_block): New function.
3453 (g95_add_expr_to_block): New function.
3454 (g95_add_block_to_block): New function.
3455 * trans-expr.c (g95_conv_componen_ref): New function.
3456 * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
3457 (F95_OBJS): Add dependency.o.
3458 * f95-lang.c (g95_is_simple_stmt): Remove.
3459 * f95-tree.c (mark_not_simple): New function.
3460 (unshare_all_trees): New function.
3461 (create_tmp_var, create_tmp_alias_var): Remove.
3462 * support.c (declare_tmp_vars, tree_last_decl): Remove.
3463 * trans*: Convert to new IR using GENERIC trees. Don't bother about
3464 SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
3466 2002-10-01 Paul Brook <paul@nowt.org>
3468 * trans-array.c: Add support for descriptorless arrays.
3469 (g95_conv_array_data): New function.
3470 (g95_conv_array_base): New function.
3471 * trans-array.h: Declare these here.
3472 * trans-decl.c(g95_create_mopdule_variable): Perform variable
3473 initialization and creation here.
3474 (g95_create_module_vars): Instead of here.
3475 * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
3476 * trans-intrinsic.c: Ditto.
3477 * trans-types.c (g95_is_nodesc_array): New function.
3478 (g95_get_nodesc_array_type): New function.
3479 (g95_sym_type, g95_get_derived_type): Use them.
3480 * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
3482 2002-09-28 Paul Brook <paul@nowt.org>
3484 * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
3485 * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
3488 2002-09-24 Paul Brook <paul@nowt.org>
3490 * f95-lang.c (listify): Remove declaration.
3491 (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
3493 * f95-tree.c (get_name): New function.
3494 * trans.c (module_namespace): Remove.
3495 * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
3496 * trans-types.c: Ditto.
3498 2002-09-19 Paul Brook <paul@nowt.org>
3500 * trans-array.c (g95_get_array_cons_size): New Function.
3501 (g95_con_ss_startstride): Handle Array constructors.
3502 (g95_conv_loop_setup): Ditto.
3503 (g95_conv_array_parameter): Ditto.
3504 * tras-decl.c (g95_finish_var_decl): Make initializes variables
3507 2002-09-19 Paul Brook <paul@nowt.org>
3509 * trans.c (g95_simple_fold_tmp): Detect variables inside
3511 * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
3513 2002-09-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
3515 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
3517 2002-09-14 Paul Brook <paul@nowt.org>
3519 * trans.c (g95_create_module_variable): Move to trans-decl.c.
3520 * trans-const.c (g95_conv_string_init): New Function.
3521 * trans-const.h: Declare it.
3522 * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
3523 variables. Don't bail on intrinsic symbols.
3524 (get_extern_function_decl): Handle specific intrinsic functions.
3525 * trans-types.c (g95_sym_type): Dummy functions don't return
3527 * trans-array.c (g95_build_array_initializer): New Function.
3528 (g95_trans_auto_array_allocation): Build initializer for static decls.
3529 Don't use mpz_addmul, it's GMP4 only.
3531 2002-09-12 Paul Brook <paul@nowt.org>
3533 * trans-decl.c (g95_generate_code): Fix thinko with return variable.
3534 (g95_get_extern_function_decl, g95_build_function_decl): Mangle
3535 assembler names for module procedures.
3537 2002-09-11 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
3539 * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
3542 2002-09-10 Paul Brook <paul@nowt.org>
3544 * trans-array.c: Change format of G95_SS_TEMP strictures.
3545 (g95_check_fncall_dependancy): New function.
3546 (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
3548 * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
3550 (g95_build_function_decl): Don't assume result arrays are packed.
3551 (g95_trans-deferred-vars): Handle array result variables.
3552 (g95_generate_fuction_code): Clear saved_function_decls.
3553 * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
3555 (g95_trans_arrayfunc_assign): New function.
3556 (g95_trans_assignment): Use it.
3557 * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
3558 (g95_se): Add direct_byref.
3559 * trans-types.c: Use sym->result rather than sym where appropriate.
3560 * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
3561 Update other functions to use this.
3562 (g95_is_intrinsic_libcall): New function.
3563 (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
3564 (g95_walk_intrinsic_function): Ditto.
3566 2002-09-08 Paul Brook <paul@nowt.org>
3568 * trans-types.c: Change rank field to dtype field in array descriptor.
3569 * trans-array.c: Implement filling of dtype array descriptor field.
3570 * trans-intrinsic.c: Fix broken LEN intrinsic.
3572 2002-09-07 Paul Brook <paul@nowt.org>
3574 * trans-intrinsic.c: Remove outdated todo intrinsic list.
3575 (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
3576 (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
3578 2002-09-06 Paul Brook <paul@nowt.org>
3580 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
3581 (gt-f95-trans-types.h): Add dependancy information.
3582 * config-lang.in (gtfiles): Add trans-types.c
3583 * f95-lang.c (g95_be_parse_file): Pass error and warning counts
3584 back to top-level code.
3585 * trans-array.c, trans-types.c: Change format of array descriptor.
3586 (g95_conv_descriptor_dimension): New function.
3587 * trans-types.h (g95_conv_descriptor_rank): define.
3588 * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
3591 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
3593 * trans-array.c, trans-types.c: Add rank information to descriptor.
3595 2002-09-06 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
3597 * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
3599 2002-09-04 Paul Brook <paul@nowt.org>
3601 * f95-lang.c (g95_create_decls): New function.
3602 (g95_init): Move initialization of external decls to above, and call
3603 from g95_be_parse_file.
3604 * trans.c (g95_finish_stmt): Don't amputate the decl chain.
3605 * trans-types.c (g95_init_types): Always name integer and char types.
3606 (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
3608 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
3610 * Make-lang.in: Add options.c to F95_PARSER_OBJS
3612 2002-09-02 Paul Brook <paul@nowt.org>
3614 * g95_generate_code: Clear the attr for __fortran_main.
3615 * trans-types.c (g95_finish_type): New function.
3616 * g95_init_io_state_type: Use g95_finish_type.
3617 * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
3619 2002-09-01 Paul Brook <paul@nowt.org>
3621 * README.backend: Warn about the dangers of extra config.h files.
3622 Remove obsolete libgfor stuff.
3623 * config-lang.in: Add target-libgfor dependancy.
3624 * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
3626 2002-09-01 Toon Moene <toon@moene.indiv.nluug.nl>
3628 * g95_conv_mpz_to_tree: Free storage pointed to by q,
3631 2002-08-30 Paul Brook <paul@nowt.org>
3633 * trans-intrinsic.c (g95_conv_intrinsic_function,
3634 g95_walk_intrinsic_function): Added ANY and ALL.
3635 (g95_conv_intrinsic_anyall): New function.
3636 * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in