1 2004-06-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2 Andrew Vaught <andyv@firstinter.net>
5 * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
6 (decode_statement): Enforce required space in free-form.
8 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10 * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
11 * trans-array.c (gfc_conv_descriptor_data): Add operand
13 (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
14 (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
15 (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
16 * trans-common.c (create_common): Likewise.
17 * trans-expr.c (gfc_conv_component_ref): Likewise.
18 * trans-io.c (set_parameter_value): Likewise.
19 (set_parameter_ref, set_string, set_flag, io_result): Likewise.
20 (transfer_expr): Likewise.
21 * trans-decl.c (gfc_trans_auto_character_variable):
22 Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
23 (gfc_simplify_function): New function.
24 (gfc_generate_function-code): Properly handle nested functions.
25 * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
27 2004-06-22 Janne Blomqvist <jblomqvi@cc.hut.fi>
30 * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
31 (gfc_resolve_inquire): Resolve the iolength tag. Return
32 SUCCESS at end of function if no failure has occured.
33 * resolve.c (resolve_code): Resolve if iolength is encountered.
34 * trans-io.c: (ioparm_iolength, iocall_iolength,
35 iocall_iolength_done): New variables.
36 (last_dt): Add IOLENGTH.
37 (gfc_build_io_library_fndecls ): Set iolength related variables.
38 (gfc_trans_iolength): Implement.
39 (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
41 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de
44 * scanner.c (load_line): Don't truncate preprocessor lines.
45 Reformat error message.
46 (preprocessor_line): Issue warning in case of malformed
49 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
51 * resolve.c (resolve_symbol): Add comment in function body.
52 (check_data_variable): Change type of mark to ar_type, adapt code
55 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
57 * array.c (gfc_insert_constructor): Avoid redundant call to
58 mpz_comp. Add 2004 to copyright years.
60 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
62 * trans.h (stmtblock_t): Change has_scope to unsigned int.
64 2004-06-20 Steven G. Kargl <kargls@comcast.net>
66 * arith.c (gfc_range_check): correct complex underflow.
68 2004-06-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
71 * match.c (match_case_selector): Call gfc_match_init_expr
72 instead of gfc_match_expr.
73 * resolve.c (validate_case_label_expr): No need to check for
74 constant, since it wouldn't have been matched with the fix to
77 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
80 * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
83 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
86 * trans-deecl.c (generate_local_decl): Do not issue warning for
87 unused variables if they're use associated.
89 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
90 Andrew Vaught <andyv@firstinter.net>
93 * gfortran.h (gfc_check_f): Add new field f3ml.
94 * check.c (gfc_check_minloc_maxloc): Take argument list instead
95 of individual arguments, reorder if necessary.
96 * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
97 * intrinsic.c (add_sym_3ml): New function.
98 (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
99 (check_specific): Catch special case MINLOC, MAXLOC.
101 2004-06-14 Paul Brook <paul@codesourcery.com>
103 * intrinsic.c (add_sym_2s): Use correct function types.
105 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
107 * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize. Move data.c
108 * data.c (gfc_get_section_index): Remove dependency on trans.h.
110 2004-06-12 Steven G. Kargl <kargls@comcast.net>
112 * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
113 gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
114 * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
115 GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
116 * trans-intrinsic.c: Use symbols.
117 * intrinsic.c (add_sym_2s): New function.
118 * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
119 * intrinsic.h: Function prototypes.
120 * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
121 gfc_resolve_srand): New functions.
123 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
126 * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
129 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
132 * interface.c (compare_parameter, compare_actual_formal): Don't
133 check types and array shapes for NULL()
134 * trans-expr.c (conv_function_call): No double indirection for
137 2004-06-09 Toon Moene <toon@moene.indiv.nluug.nl>
139 * trans-expr.c (gfc_conv_cst_int_power): Compute
140 x**(-n) by converting it to (1/x)**n instead of
143 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
146 * module.c (write_symbol, write_symtree): Don't write symbols
147 wrongly added to namespace.
148 * trans-decl.c (gfc_create_module_variable): Don't create a
149 backend decl for a symbol incorrectly added to namespace.
151 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
154 * resolve.c (resolve_symbol): Verify that parameter array has an
155 explicit shape. Fix typos and coding style issues in surrounding
158 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
161 * gfortran.texi: The documentation doesn't contain infomration on
162 how to report bugs, and shouldn't, so remove the line which
165 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
167 * intrinsic.c (sort_actual): Keep track of type of missing
168 arguments. (Missing from previous commit.)
170 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
172 * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
173 * interface.c (compare_actual_formal): Keep type of omitted
175 * trans-expr.c (gfc_conv_function_call): Add string length
176 argument for omitted string argument.
178 2004-06-03 Paul Brook <paul@codesourcery.com>
180 * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
181 lists instead of compound expr chains.
182 (gfc_trans_code): Annotate statement lists.
184 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
186 * trans-array.c: Fix spelling in comments.
188 2004-06-02 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
191 * data.c (assign_substring_data_value): New function.
192 (gfc_assign_data_value): Call the new function if we're dealing
193 with a substring LHS.
195 2004-06-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
198 * gfortran.h (GFC_VERSION): Remove.
199 * gfortran.texi (version-gfortran): Remove, replace by version-GCC
202 2004-05-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
204 * trans-types.c: Fix spelling & layout in comments.
206 2004-05-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
209 * trans-const.c (gfc_conv_string_init): Allow variable string
210 length lower than initialization string length.
212 2004-05-30 Paul Brook <paul@codesourcery.com>
215 * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
216 * trans-expr.c (gfc_trans_string_copy): New function.
217 (gfc_conv_statement_function): Use them. Create temp vars. Enforce
219 (gfc_conv_string_parameter): Use gfc_trans_string_copy.
220 * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
221 * trans.h (struct gfc_saved_var): Define.
222 (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
224 2004-05-30 Steven G. Kargl <kargls@comcast.net>
226 * iresolve.c (gfc_resolve_random_number): Clean up conditional.
228 2004-05-29 Steven G. Kargl <kargls@comcast.net>
230 * simplify.c (gfc_simplify_log): Remove useless line of code.
232 2004-05-29 Paul Brook <paul@codesourcery.com>
234 * trans-common.c (find_equivalence): Find multiple rules.
236 2004-05-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
238 * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
239 (gfc_current_locus): Declare new global variable.
240 * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
241 (gfc_current_locus1): Rename ...
242 (gfc_current_locus): ... to this.
243 (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
244 skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
245 gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
246 gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
247 and gfc_current_locus(), respectively.
248 * array.c (match_subscript, gfc_match_array_ref, match_array_list,
249 match_array_cons_element, gfc_match_array_constructor):
250 Read/modify gfc_current_locus instead of calling gfc_set_locus()
251 and gfc_current_locus().
252 * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
253 match_attr_spec, gfc_match_function_decl, gfc_match_end,
254 attr_decl1, gfc_match_save): Likewise.
255 * error.c (error_print, gfc_internal_error): Likewise.
256 * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
257 * interface.c (gfc_add_interface): Likewise.
258 * io.c (gfc_match_format, match_dt_format, match_dt_element,
259 match_io_iterator, match_io): Likewise.
260 * match.c (gfc_match_space, gfc_match_eos,
261 gfc_match_small_literal_int, gfc_match_st_label,
262 gfc_match_strings, gfc_match_name, gfc_match_iterator,
263 gfc_match_char, gfc_match, gfc_match_assignment,
264 gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
265 gfc_match_nullify, gfc_match_call, match_implicit_range,
266 gfc_match_implicit, gfc_match_data, match_case_selector,
267 gfc_match_case, match_forall_iterator): Likewise.
268 * matchexp.c (gfc_match_defined_op_name, next_operator,
269 match_level_1, match_mult_operand, match_ext_mult_operand,
270 match_add_operand, match_ext_add_operand, match_level_2,
271 match_level_3, match_level_4, match_and_operand, match_or_operand,
272 match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
273 * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
274 * parse.c (match_word, decode_statement, next_free, next_fixed,
275 add_statement, verify_st_order, parse_if_block, gfc_parse_file):
277 * primary.c (match_digits, match_integer_constant,
278 match_boz_constant, match_real_constant, match_substring,
279 next_string_char, match_charkind_name, match_string_constant,
280 match_logical_constant, match_const_complex_part,
281 match_complex_constant, match_actual_arg, match_keyword_arg,
282 gfc_match_actual_arglist, gfc_match_structure_constructor,
283 gfc_match_rvalue, gfc_match_variable): Likewise.
284 * st.c (gfc_get_code): Likewise.
285 * symbol.c (check_conflict, check_used, check_done,
286 duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
287 gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
288 gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
290 2004-05-26 Roger Sayle <roger@eyesopen.com>
292 * io.c (format_asterisk): Silence compiler warnings by correcting
293 the number of elements of a "locus" initializer.
295 2004-05-25 Roger Sayle <roger@eyesopen.com>
298 * matchexp.c: Allow unary operators after arithmetic operators
300 (match_ext_mult_operand, match_ext_add_operand): New functions.
301 (match_mult_operand): Tweak to call match_ext_mult_operand.
302 (match_add_operand): Tweak to call match_ext_mult_operand.
303 (match_level_2): Rearrange to call match_ext_add_operand.
305 2004-05-25 Paul Brook <paul@codesourcery.com>
307 * expr.c (check_inquiry): Remove bogus tests.
309 2004-05-23 Paul Brook <paul@codesourcery.com>
312 * expr.c (restricted_args): Remove redundant checks/argument.
313 (external_spec_function): Update to match.
314 (restricted_intrinsic): Rewrite.
316 2004-05-23 Paul Brook <paul@codesourcery.com>
317 Victor Leikehman <lei@haifasphere.co.il>
319 * gfortran.h (struct gfc_symbol): Add equiv_built.
320 * trans-common.c: Change int to HOST_WIDE_INT. Capitalize error
322 (current_length): Remove.
323 (add_segments): New function.
324 (build_equiv_decl): Create initialized common blocks.
325 (build_common_decl): Always add decl to bindings.
326 (create_common): Create initializers.
327 (find_segment_info): Reformat to match coding conventions.
328 (new_condition): Use add_segments.
329 (add_condition, find_equivalence, add_equivalences): Move iteration
330 inside functions. Only process each segment once.
331 (new_segment, finish_equivalences, translate_common): Simplify.
333 2004-05-23 Steven G. Kargl <kargls@comcast.net>
335 * check.c (gfc_check_random_seed): Issue for too many arguments.
337 2004-05-22 Steven G. Kargl <kargls@comcast.net>
339 * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
341 2004-05-22 Paul Brook <paul@codesourcery.com>
343 * dump-parse-tree.c (gfc_show_equiv): New function.
344 (gfc_show_namespace): Use it.
346 2004-05-22 Victor Leikehman <lei@haifasphere.co.il>
349 * symbol.c (gfc_add_common): Disable checks to work around other more
350 fundamental inadequacies.
352 2004-05-22 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
354 * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
356 (gfc_build_function_decl): Likewise.
358 2004-05-22 Steven G. Kargl <kargls@comcast.net>
360 * check.c (gfc_check_system_clock): New function.
361 * intrinsic.c (add_sym_3s): New function.
362 (add_subroutines): Use it.
363 * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
365 * iresolve.c (gfc_resolve_system_clock): New function.
367 2004-05-22 Steven G. Kargl <kargls@comcast.net>
369 * invoke.texi: Document -Wunderflow and spell check.
370 * lang.opt: Add Wunderflow.
371 * gfortran.h (gfc_option_t): Add warn_underflow option.
372 * options.c (gfc_init_options, set_Wall): Use it.
373 * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
374 * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
375 gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
376 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
377 * arith.c (common_logarithm): Fix typo in comment.
379 2004-05-21 Roger Sayle <roger@eyesopen.com>
381 * io.c (check_format): As a GNU extension, allow the comma after a
382 string literal to be optional in a format. Use gfc_notify_std to
383 issue an error/warning as appropriate.
385 2004-05-21 Roger Sayle <roger@eyesopen.com>
387 * io.c (check_format): Use gfc_notify_std to determine whether to
388 issue an error/warning for omitting the digits from the X format.
390 2004-05-20 Roger Sayle <roger@eyesopen.com>
392 * io.c (check_format): Allow the number before the X format to
393 be optional when not -pedantic.
395 2004-05-18 Feng Wang <fengwang@nudt.edu.cn>
396 Paul Brook <paul@codesourcery.com>
398 * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
399 Create decls for __builtin_pow{,f}.
400 * gfortran.h (PREFIX_LEN): Define.
401 * trans-decl.c (gfor_fndecl_math_powi): Add.
402 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
403 (gfc_build_intrinsic_function_decls): Create decls for powi.
404 * trans-expr.c (powi_table): Add.
405 (gfc_conv_integer_power): Remove.
406 (gfc_conv_powi): New function.
407 (gfc_conv_cst_int_power): New function.
408 (gfc_conv_power_op): Use new powi routines.
409 * trans.h (struct gfc_powdecl_list): Add.
410 (gfor_fndecl_math_powi): Add.
411 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
413 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
415 * trans.c, trans-decl.c: Fix comment typos.
417 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
419 * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
421 2004-05-18 Steve Kargl <kargls@comcast.net>
423 * arith.c (gfc_int2complex): Fix incorrect range checking.
425 2004-05-18 Paul Brook <paul@codesourcery.com>
428 * decl.c (add_init_expr_to_sym): Remove incorrect check.
429 (default_initializer): Move to expr.c.
430 (variable_decl): Don't assign default initializer to variables.
431 * expr.c (gfc_default_initializer): Move to here.
432 * gfortran.h (gfc_default_initializer): Add prototype.
433 * resolve.c (resolve_symbol): Check for illegal initializers.
434 Assign default initializer.
436 2004-05-17 Steve Kargl <kargls@comcast.net>
438 * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
440 2004-05-17 Steve Kargl <kargls@comcast.net>
442 * arith.c (gfc_real2complex): Range checking wrong part of complex
445 2004-05-16 Paul Brook <paul@codesourcery.com>
447 * options.c (gfc_handle_module_path_options): Fix buffer overrun.
449 2004-05-16 Paul Brook <paul@codesourcery.com>
451 * arith.c (gfc_range_check): Fix logic error.
453 2004-05-16 Steve Kargl <sgk@troutmask.apl.washington.edu>
455 * arith.c: Fix comment typos.
457 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
460 * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
461 not initialized in a disallowed fashion.
462 * match.c (gfc_match_common): Likewise.
463 (var_element): Verify that variable is not in the blank COMMON,
464 if it is in a common.
466 2004-05-15 Joseph S. Myers <jsm@polyomino.org.uk>
468 * Make-lang.in (f95.generated-manpages): Remove.
470 (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
471 f95.maintainer-clean): Generate info and dvi files in objdir/doc.
474 (f95.install-info): Remove.
477 2004-05-15 Victor Leikehman <lei@haifasphere.co.il>
479 * decl.c (add_init_expr_to_sym): Check for variable size arrays.
481 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
483 * primary.c (match_boz_constant): Use gfc_notify_std() for
484 issuing a warning or an error.
486 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
489 * primary.c (match_structure_constructor): Rename ...
490 (gfc_match_structure_constructor): ... to this. Make non-static.
491 (gfc_match_rvalue): Call renamed function.
492 * match.h (gfc_match_structure_constructor): Declare.
493 * match.c (gfc_match_data_constant): Handle structure
496 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
500 * gfortran.h (gfc_linebuf): New typedef.
502 (gfc_file): Revamped, use new gfc_linebuf.
503 (locus): Revamped, use new types.
504 (gfc_current_file): Remove.
505 (gfc_current_form, gfc_source_file): New global variables.
506 * match.c (gfc_match_space, gfc_match_strings): Use
507 gfc_current_form to find source form.
508 * module.c (gfc_dump_module): Use gfc_source_file when printing
510 * error.c (show_locus, show_loci) Use new data structures to print
512 * scanner.c (first_file, first_duplicated_file, gfc_current_file):
514 (file_head, current_file, gfc_current_form, line_head, line_tail,
515 gfc_current_locus1, gfc_source_file): New global variables.
516 (gfc_scanner_init1): Set new global variables.
517 (gfc_scanner_done1): Free new data structures.
518 (gfc_current_locus): Return pointer to gfc_current_locus1.
519 (gfc_set_locus): Set gfc_current_locus1.
520 (gfc_at_eof): Set new variables.
521 (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
522 to new locus structure.
523 (gfc_check_include): Remove.
524 (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
525 (gfc_skip_comments): Use gfc_current_form, find locus with
527 (gfc_next_char): Use gfc_current_form.
528 (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
529 (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
531 (get_file): New function.
532 (preprocessor_line, include_line): New functions.
533 (load_file): Move down, rewrite to match new data structures.
534 (gfc_new_file): Rewrite to match new data structures.
535 * parse.c (next_statement): Remove code which is now useless. Use
536 gfc_source_form and gfc_source_file where appropriate.
537 * trans-decl.c (gfc_get_label_decl): adapt to new data structures
538 when determining locus of frontend code.
539 * trans-io.c (set_error_locus): Same.
540 * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
541 * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
543 (all): Add missing initializers.
545 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
547 * Make-lang.in (trans-common.o): Remove redundant dependency.
548 (data.c): Replace object file name ...
549 (data.o): ... by the correct one.
551 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
553 * dump-parse-tree.c (gfc_show_array_ref): Print colon only
554 for ranges when dumping array references.
556 2004-05-14 Victor Leikehman <lei@haifasphere.co.il>
558 * decl.c (variable_decl): Always apply default initializer.
560 2004-05-08 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
563 * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
564 handle zero correctly.
566 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
568 * match.c (gfc_match): Eliminate dead code.
570 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
572 * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
573 Detect bad continuation line in fixed form sources.
575 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
578 * iresolve.c (gfc_resolve_nearest): Add new function.
579 * intrinsic.h: ... declare it here.
580 * intrinsic.c (add_functions): ... add it as resolving function
583 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
586 * match.c (gfc_match_do): Allow infinite loops with
587 label-do-stmt. Do not enforce space after comma.
589 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
592 * parse.c (parse_interface): Allow empty INTERFACE, remove
595 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
597 * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
598 decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
599 expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
600 intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
601 matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
602 primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
603 trans-array.c, trans-array.h, trans-common.c, trans-const.c,
604 trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
605 trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
606 trans-types.h, trans.c, trans.h: Update copyright years and
608 * data.c: Likewise, also removed two whitespace-only lines.
609 * gfortranspec.c, lang.opt: Update copyright years.
611 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
614 * trans-decl.c (generate_local_decl): Don't warn for unused
615 variables which are in common blocks.
617 2004-05-13 Diego Novillo <dnovillo@redhat.com>
619 * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
620 trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
621 trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
623 2004-05-13 Victor Leikehman <lei@haifasphere.co.il>
626 * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
628 2004-05-13 Joseph S. Myers <jsm@polyomino.org.uk>
630 * gfortran.texi: Use @table @emph instead of @itemize @emph.
631 Remove "set DEVELOPMENT".
632 (Compiling GFORTRAN): Remove.
634 2004-05-09 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
636 * array.c (match_subscript, match_array_ref): Add comments
637 explaining argument 'init'.
638 * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
639 trans-expr.c, trans.c: Fix some typos in comments.
640 * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
641 * primary.c (match_digits, match_integer_constant): Add comment
644 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
647 * primary.c: Include system.h and flags.h, needed for pedantic.
648 (match_boz_constant): Allow "x" for hexadecimal constants, warn if
651 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
654 * match.c (match_data_constant): Handle case where
655 gfc_find_symbol sets sym to NULL
657 2004-04-28 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
659 * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
660 dependency on mathbuiltins.def
662 2004-04-24 Victor Leikehman <lei@il.ibm.com>
664 * trans-io.c (transfer_expr): Implemented recursive printing
667 2004-04-24 Andrew Pinski <pinskia@physics.uc.edu>
669 * gfortranspec.c: Do not include multilib.h.
671 2004-04-24 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
673 * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
674 2004 to copyright years.
675 * trans-expr.c, trans-decl.c: Comment update, we now generate
676 GENERIC, not SIMPLE. Add 2004 to copyright years.
678 2004-04-24 Paul Brook <paul@codesourcery.com>
680 * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
682 2004-04-24 Feng Wang <fengwang@nudt.edu.cn>
685 * arith.c (gfc_arith_divide): Fix complex divide.
687 2004-04-23 Andrew Pinski <pinskia@physics.uc.edu>
689 * gfortranspec.c: Include the target headers.
691 2004-04-18 Feng Wang <fengwang@nudt.edu.cn>
695 * arith.c (arctangent2): New function.
696 * arith.h (arctangent2): Add function prototype.
697 * simplify.c (gfc_simplify_atan2): Use it.
698 (gfc_simplify_log): Use it.
700 2004-04-12 Diego Novillo <dnovillo@redhat.com>
702 * fortran/f95-lang.c (gfc_expand_stmt): Remove.
703 (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
705 2004-04-11 Bud Davis <bdavis9659@comcast.net>
708 * trans-io.c (build_dt): Change REC to value.
710 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
713 * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
714 the real value when converting mpf to string.
716 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
719 * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
722 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
725 * simplify.c (simplify_min_max): Convert the type of the result.
727 2004-04-11 Paul Brook <paul@codesourcery.com>
729 * gfortran.texi: Use full target triplet.
731 2004-04-11 Paul Brook <paul@codesourcery.com>
733 * Make-lang.in (GFORTRAN_TEXI): Set it.
734 (fortran/dfortran.dvi): Use it. Add fortran to include paths.
735 (fortran/gfortran.info): Ditto.
736 * gfortran.texi: Major update.
737 * invoke.texi: New file.
739 2004-04-10 Paul Brook <paul@codesourcery.com>
741 * trans-array.c (gfc_trans_allocate_temp_array,
742 gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
743 * trans-decl.c (gfc_build_dummy_array_decl,
744 gfc_get_symbol_decl, gfc_build_function_decl,
745 gfc_create_module_variable): Ditto.
746 * trans-expr.c (gfc_conv_variable): Ditto.
747 * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
748 * trans.h (GFC_DECL_STRING): Remove.
749 (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
750 GFC_DECL_ASSIGN): Renumber flags.
752 2004-04-05 Paul Brook <paul@codesourcery.com>
756 * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
758 * gfortran.h (struct gfc_charlen): Add backend_decl.
759 * trans-array.c (gfc_trans_allocate_temp_array,
760 gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
761 (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
762 Remove old, broken string handling.
763 (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
764 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
765 gfc_trans_deferred_array): Handle character arrays.
766 * trans-const.c (gfc_conv_const_charlen): New function.
767 * trans-const.h (gfc_conv_const_charlen): Add prototype.
768 * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
770 (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
771 (gfc_create_string_length): New function.
772 (gfc_get_symbol_decl): Create lengths for character variables.
773 (gfc_get_fake_result_decl): Ditto.
774 (gfc_build_function_decl): Only set length for assumed length
776 (gfc_trans_dummy_character): New function.
777 (gfc_trans_auto_character_variable): Rewrite.
778 (gfc_trans_deferred_vars): Handle more types of character variable.
779 (gfc_create_module_variable): String lengths have moved.
780 (gfc_generate_function_code): Initialize deferred var chain earlier.
781 * trans-expr.c (gfc_conv_init_string_length): Rename ...
782 (gfc_trans_init_string_length): ... to this.
783 (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
784 gfc_conv_function_call): Update to new format for character variables.
785 (gfc_conv_string_length): Remove.
786 (gfc_conv_string_parameter): Update assertion.
787 * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
788 * trans-io.c (set_string): Use new macro names.
789 * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
790 * trans-types.c (gfc_get_character_type): Use existing length expr.
791 (gfc_is_nodesc_array): Make public.
792 (gfc_get_dtype_cst): Rename ...
793 (gfc_get_dtype): ... to this. Handle unknown size arrays.
794 (gfc_get_nodesc_array_type): Use new name.
795 (gfc_sym_type): New character variable code.
796 (gfc_get_derived_type): Ditto.
797 (gfc_get_function_type): Evaluate character variable lengths.
798 * trans-types.h (gfc_strlen_kind): Define.
799 (gfc_is_nodesc_array): Add prototype.
800 * trans.h: Update prototypes.
801 (struct lang_type): Update comments.
802 (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
803 (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
805 2004-04-04 Paul Brook <paul@codesourcery.com>
807 * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
808 * options.c (gfc_init.options, gfc_handle_option): Ditto.
809 * trans-expr.c (gfc_conv_function_call): Ditto.
810 * trans-types.c (gfc_is_nodesc_array): Ditto
811 * lang.opt (fg77-calls): Remove.
813 2004-04-04 Paul Brook <paul@codesourcery.com>
815 * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
816 (gfc_conv_descriptor_base): Rename ...
817 (gfc_conv_descriptor_offset): ... to this.
818 (gfc_trans_allocate_array_storage): Set offset to zero.
819 (gfc_conv_array_base): Rename ...
820 (gfc_conv_array_offset): ... to this.
821 (gfc_conv_array_index_ref): Add offset parameter.
822 (gfc_conv_array_ref): Include offset.
823 (gfc_trans_preloop_setup): Use existing offset.
824 (gfc_trans_allocate_temp_array, gfc_array_allocate,
825 gfc_trans_auto_array_allocation, gfc_trans_g77_array,
826 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
827 gfc_conf_ss_descriptor): Set offset.
828 * trans-array.h: Rename prototypes.
829 * trans-const.h (gfc_index_zero_node): Define.
830 * trans-decl.c (gfc_build_qualified_array): Change base to offset.
831 * trans-types.c (gfc_get_array_type_bounds): Ditto.
832 (gfc_get_nodesc_array_type): Calculate offset before upper bound.
834 2004-03-25 Diego Novillo <dnovillo@redhat.com>
836 * convert.c (convert): Don't handle WITH_RECORD_EXPR.
838 2004-03-24 Bud Davis <bdavis9659@comcast.net>
841 * arith.c (gfc_convert_integer,gfc_convert_real): Removed leading '+'
842 before conversion by gmp library call.
844 2004-03-24 Bud Davis <bdavis9659@comcast.net>
847 * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
849 2004-02-24 Richard Henderson <rth@redhat.com>
851 * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
853 2004-02-19 Loren J. Rittle <ljrittle@acm.org>
855 * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
856 (fortran/gfortran.info): ... to here.
859 2004-02-16 Richard Henderson <rth@redhat.com>
861 * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
862 * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
863 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
864 (gfc_expand_function): Rename from expand_function_body, make static,
865 don't do anything except invoke tree_rest_of_compilation.
866 (gfc_be_parse_file): Invoke cgraph.
867 (gfc_expand_decl): Remove.
868 (gfc_init_builtin_functions): Add __builtin_init_trampoline and
869 __builtin_adjust_trampoline.
870 * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
872 (gfc_generate_function_code): Use it. Lower nested functions.
873 * trans-expr.c (gfc_conv_function_call): Add static chain operand
875 * trans.c (gfc_build_function_call): Likewise.
876 * trans.h (expand_function_body): Remove.
878 2004-02-15 Victor Leikehman <lei@il.ibm.com>
881 * trans-decl.c (gfc_build_function_decl) For functions
882 returning CHARACTER pass an extra length argument,
883 following g77 calling conventions.
884 * trans-types.c (gfc_get_function_type) Ditto.
885 * trans-expr.c (gfc_conv_function_call) Ditto.
887 2004-02-14 Paul Brook <paul@codesourcery.com>
889 * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
891 2004-02-12 Paul Brook <paul@nowt.org>
895 2004-02-08 Steve Kargl <sgk@troutmask.apl.washington.edu>
897 * gfortran.texi: Fix typos.
899 2004-02-07 Bud Davis <bdavis9659@comcast.net>
902 * intrinsic.c (add_conversions) Use logical conversion instead
904 * trans-types.c (gfc_get_logical_type) implemented logical*1
907 2004-01-17 Paul Brook <paul@codesourcery.com>
909 * lang-specs.h: Remove %<fixed-form.
911 2004-01-15 Toon Moene <toon@moene.indiv.nluug.nl>
913 * lang-specs.h: Enable preprocessing of source files
914 ending in .F, .fpp, .FPP, .F90 and .F95.
916 2004-01-13 Toon Moene <toon@moene.indiv.nluug.nl>
919 * lang-specs.h: Enable compilation of files ending
920 in .f, .for and .FOR.
922 2004-01-11 Paul Brook <paul@codesourcery.com>
924 * trans-stmt.c (gfc_trans_if_1): New function.
925 (gfc_trans_if): Use it.
927 2004-01-11 Erik Schnetter <schnetter@uni-tuebingen.de>
929 * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
930 (gfc_option_t): Add max_identifier_length.
931 * lang.opt: Add fmax-identifier-length.
932 * match.c (parse_name): Use limit.
933 * options.c (gfc_init_options): Set max_identifier_length.
934 (gfc_handle_option): Ditto.
936 2004-01-11 Feng Wang <fengwang@nudt.edu.cn>
938 * intrinsic.c (add_functions): Add resolve function to dcmplx.
939 * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
940 * iresolve.c (gfc_resolve_dcmplx): New function.
942 2004-01-10 Paul Brook <paul@codesourcery.com>
944 * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
945 * trans-types.c (gfc_sym_type): Handle external dummy procedures.
946 (gfc_return_by_reference): Correct condition.
947 (gfc_get_function_type): Ditto.
949 2004-01-10 Paul Brook <paul@codesourcery.com>
951 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
954 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
956 * iresolve.c: Use correct kind.
958 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
961 * trans-decl.c (gfc_create_module_variable): Output array valued
964 2004-01-10 Paul Brook <paul@codesourcery.com>
966 * resolve.c (resolve_branch): Get error message right way round.
968 2004-01-10 Canqun Yang <canqun@nudt.edu.cn>
970 * trans-array (gfc_conv_loop_setup): Adjust comment to track
972 (gfc_array_allocate): Don't count size of element twice.
974 2004-01-04 Paul Brook <paul@codesourcery.com>
976 * lang.opt (i8, r8, std=*): Remove RejectNegative.
978 2004-01-04 Paul Brook <paul@codesourcery.com>
980 * error.c (gfc_notify_std): New function.
981 * gfortran.h (gfc_notify_std): Declare.
983 (gfc_option_t): Add warn_std and allow_std.
984 * intrinsic.c (gfc_init_expr_extensions): Fix logic.
985 (gfc_intrinsic_func_interface): Use gfc_notify_std.
986 * check.c (check_rest): Use gfc_notify_std.
987 * match.c (gfc_match_pause): Ditto.
988 (gfc_match_assign): Ditto.
989 (gfc_match_goto): Ditto.
990 * resolve.c (resolve_branch): Ditto.
991 * lang.opt: Add std=<foo> and w.
992 * options.c (gfc_init_options): Set allow_std and warn_std.
993 (gfc_handle_option): Handle OPT_std_* and OPT_w.
995 2004-01-01 Paul Brook <paul@codesourcery.com>
997 * array.c (gfc_append_constructor): Take constructor, not expression.
998 * data.c (struct gfc_expr_stack): Remove.
999 (expr_stack): Remove.
1000 (find_con_by_offset): Rename from find_expr_in_con.
1001 (find_con_by_component): Rename from find_component_in_con.
1002 (gfc_get_expr_stack): Remove.
1003 (gfc_assign_data_value): Rewrite.
1004 (gfc_expr_push): Remove.
1005 (gfc_expr_pop): Remove.
1006 (gfc_advance_section): Rename from
1007 gfc_modify_index_and_calculate_offset. Handle unbounded sections.
1008 (gfc_get_section_index): Handle unbounded sections.
1009 * gfortran.h: Update prototypes.
1010 * resolve.c (check_data_variable): Array section maight not be the
1013 2004-01-01 Paul Brook <paul@codesourcery.com>
1016 * resolve.c (resolve_symbol): Allow assumed length function results.
1018 2004-01-01 Steve Kargl <sgk@troutmask.apl.washington.edu>
1020 * match.c (gfc_match_pause): Fix spelling.
1022 2004-01-01 Steven Bosscher <stevenb@suse.de>
1025 * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
1026 reference from the expression.
1028 2003-12-26 Feng Wang <fengwang@nudt.edu.cn>
1030 * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
1032 * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
1033 (gfc_exec_op): New EXEC_LABEL_ASSIGN.
1034 (symbol_attribute):New variable attribute: assign.
1035 * io.c (resolve_tag):Integer variable is allowed.
1036 (match_dt_format): Add ASSIGN statement. Set assign flag.
1037 * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
1038 (gfc_match_assign): Add ASSIGN statement. Set assign flag.
1039 (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
1040 * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
1041 (next_statement): Add ST_LABEL_ASSIGNMENT.
1042 (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
1043 * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
1044 (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
1045 * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
1046 * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
1047 assign. Put them into the stuct lang_decl.
1048 * trans-io.c (set_string): Add the assign statement.
1049 * trans-stmt.c (gfc_trans_label_assign): New function.
1050 (gfc_trans_goto): Translate ASSIGNED GOTO statement.
1051 * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
1052 * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
1053 * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
1054 (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
1055 (GFC_DECL_ASSIGN(node)): New macro to access flag.
1057 2003-12-31 Huang Chun <chunhuang73@hotmail.com>
1060 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
1063 2003-12-22 Toon Moene <toon@moene.indiv.nluug.nl>
1065 * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
1066 that arguments to subroutines/functions can't alias themselves, nor global
1069 2003-12-20 Steven Bosscher <stevenb@suse.de>
1071 * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
1072 * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
1074 2003-12-12 Huang Chun <chunhuang73@hotmail.com>
1076 * primary.c (match_substring): Fix substring bug for start point
1077 or end point is NULL.
1078 * trans-expr.c (gfc_conv_substring): Ditto
1079 * trans-types.c (gfc_sym_type): Get correct type of scalar
1080 character variables.
1081 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
1084 2003-12-10 Richard Henderson <rth@redhat.com>
1086 * options.c (gfc_post_options): Don't ever use rtl inlining.
1088 2003-12-05 Canqun Yang <canqun@nudt.edu.cn>
1090 * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
1091 * trans-equivalence.c: Remove.
1092 * trans-decl.c (gfc_get_symbol_decl): Update to match.
1093 (gfc_generate_function_code): Ditto.
1094 * trans-array.c (gfc_conv_array_parameter): Ditto.
1095 * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
1096 (F95_ADDITIONAL_OBJS): Add stor-layout.o
1097 * trans.h (gfc_trans_equivalence): Remove.
1098 * gfortran.h (struct gfc_equiv): Add used field.
1099 (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
1100 equiv_offset fields.
1102 2003-12-05 Richard Henderson <rth@redhat.com>
1104 * trans.c (gfc_build_addr_expr): New.
1105 (gfc_build_indirect_ref, gfc_build_array_ref): New.
1106 * trans.h: Declare them.
1107 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
1108 trans-stmt.c, trans.c (*): Use them.
1110 * f95-lang.c (gfc_post_options): Remove dead prototype.
1111 * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
1112 * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
1115 2003-12-01 Feng Wang <fengwang@nudt.edu.cn>
1117 * io.c (gfc_match_format): Check for missing format label.
1119 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
1122 * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
1123 from interfaces in modules.
1125 2003-11-30 Paul Brook <paul@nowt.org>
1127 * trans-array.c (gfc_trans_g77_array): Make non-static.
1128 (gfc_trans_assumed_size): Remove.
1129 (gfc_trans_dummy_array_bias): Explicitly free temporary.
1130 * trans-array.h (gfc_trans_g77_array): Add prototype.
1131 (gfc_trans_assumed_size): Remove.
1132 * trans-decls.c (gfor_fndecl_push_context): Remove.
1133 (gfor_fndecl_pop_context): Remove.
1134 (gfc_build_function)decls): Don't create them.
1135 (gfc_trans_deferred_vars): Update to match. Remove dead code.
1136 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
1138 2003-11-30 Kejia Zhao <kejia_zh@nudt.edu.cn>
1140 * trans-array.c (gfc_conv_array_parameter): Simplify
1141 array argument passing for array name actual argument.
1142 * trans-expr.c (gfc_conv_function_call): Ditto
1143 * trans-types.c (gfc_is_nodesc_array):Ditto.
1145 2003-11-30 Paul Brook <paul@nowt.org>
1147 * f95-lang.c (gfc_post_options): Move ...
1148 * options.c (gfc_post_options): .. to here. Handle inlining options.
1149 * gfortran.h (gfc_post_options): Add prototype.
1151 2003-11-28 Richard Henderson <rth@redhat.com>
1153 * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
1155 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
1157 * trans.h (has_alternate_specifier): New global variable.
1158 * match.c (gfc_match_call): Handle actual arguments associated with
1159 alternate return indicators.
1160 * trans-expr.c (gfc_conv_function_call): Ditto
1161 * trans-stmt.c (gfc_trans_call): Ditto
1162 (gfc_trans_return): Handle return statement with value.
1163 * trans-decl.c (gfc_generate_function_code): Handle functions with
1165 (gfc_get_fake_result_decl): Ditto
1166 * trans-types.c (gfc_get_function_type): Ditto
1167 * resolve.c (resolve_actual_arglist): Check alternate return indicators.
1168 (resolve_formal_arglist): Check asterisk dummy.
1170 2003-11-27 Paul Brook <paul@nowt.org>
1172 * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
1173 allocation interface.
1174 (gfc_conv_ array_parameter): Ditto.
1175 (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
1176 * trans-array.c: Update prototype.
1177 * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
1178 (gfc_trans_auto_character_variable): Use new memory alloc interface.
1179 * trans-expr.c (gfc_conv_string_tmp): Ditto.
1180 (gfc_conv_function_call): Use gfc_conv_string_tmp.
1181 * trans-stmt.c (gfc_do_allocate): Use new memory alloc interface.
1182 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
1183 * trans.h (gfc_ss_info): Remove unused pdata field.
1184 * trans.c (gfc_create_var_np): Change T to V.
1186 2003-11-26 Richard Henderson <rth@redhat.com>
1188 * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
1189 * trans-intrinsic.c (gfc_intrinsic_map): ... here. Add SCALE,
1190 FRACTION, NEAREST, SET_EXPONENT.
1191 (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
1192 Fix GTY marking. Remove unnecessary const's.
1193 (LIBM_FUNCTION): Rename from I_LIB.
1194 (LIBF_FUNCTION): New.
1195 (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
1196 conventions. Assume the expr signature is correct. Mark const.
1197 (gfc_conv_intrinsic_exponent): Use library functions.
1198 (gfc_conv_intrinsic_set_exponent): Remove.
1199 (gfc_conv_intrinsic_scale): Remove.
1200 (gfc_conv_intrinsic_nearest): Remove.
1201 (gfc_conv_intrinsic_fraction): Remove.
1202 (gfc_conv_intrinsic_function): Update.
1203 * trans-decl.c (gfor_fndecl_math_exponent4): New.
1204 (gfor_fndecl_math_exponent8): New.
1205 (gfc_build_intrinsic_function_decls): Set them.
1206 * trans.h: Declare them.
1208 2003-11-25 Canqun Yang <canqun@nudt.edu.cn>
1210 * trans-common.c (gfc_layout_global_equiv): Locate the error for
1211 underflow COMMON block.
1212 (gfc_trans_one_common): Fix bug for size of COMMON block containing
1213 EQUIVALENCE object. Also fix typo in an error message.
1215 2003-11-25 Diego Novillo <dnovillo@redhat.com>
1217 * Make-lang.in: Add check-gfortran to lang_checks.
1218 (check-f95): Alias for check-gfortran.
1220 2003-11-25 Jason Merrill <jason@redhat.com>
1222 * Make-lang.in (f95.tags): Create TAGS.sub files in each
1223 directory and TAGS files that include them for each front end.
1225 2003-11-24 Paul Brook <paul@nowt.org>
1228 * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
1230 2003-11-24 Paul Brook <paul@nowt.org>
1232 * expr.c (simplify_const_ref): Return SUCCESS for things we don't
1234 * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
1236 2003-11-24 Paul Brook <paul@nowt.org>
1239 * array.c (gfc_array_ref_shape): Handle elemental dimensions.
1240 * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
1242 2003-11-20 Richard Henderson <rth@redhat.com>
1244 * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
1245 (gfc_conv_array_base): Likewise.
1246 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
1247 * trans-expr.c (gfc_conv_string_tmp): Likewise.
1248 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
1249 * trans-stmt.c (gfc_trans_character_select): Likewise.
1251 2003-11-13 Paul Brook <paul@nowt.org>
1253 * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
1255 2003-11-13 Canqun Yang <canqun@nudt.edu.cn>
1257 * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
1258 (resolve_equivalence): New function.
1259 (resolve_equivalence_derived): New function.
1261 2003-11-12 Richard Henderson <rth@redhat.com>
1263 * trans.c (gfc_trans_code): Use annotate_with_locus instead of
1264 annotate_all_with_locus.
1266 2003-11-11 Canqun Yang <canqun@nudt.edu.cn>
1268 * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
1269 * trans-decl.c (gfc_finish_var_decl): Modified.
1271 2003-11-08 Paul Brook <paul@nowt.org>
1274 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
1277 2003-11-06 Paul Brook <paul@nowt.org>
1279 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
1281 2003-11-02 Canqun Yang <canqun@nudt.edu.cn>
1283 * match.c (gfc_match_stopcode): Assign '0' to stop_code.
1285 2003-10-27 Anthony Green <green@redhat.com>
1287 * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
1288 (f95.stagefeedback): Ditto.
1290 2003-10-27 Andrew Pinski <pinskia@physics.uc.edu>
1293 * Make-lang.in (f95.stageprofile): Add.
1294 (f95.stagefeedback): Add.
1296 2003-10-23 Richard Henderson <rth@redhat.com>
1298 * f96-lang.c (gfc_gimplify_expr): Remove.
1299 (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
1300 (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
1302 2003-10-23 Richard Henderson <rth@redhat.com>
1304 * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
1306 2003-10-20 Paul Brook <paul@nowt.org>
1308 * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
1309 * trans-stmt.c (gfc_trans_do_while): Ditto.
1311 2003-10-17 Paul Brook <paul@nowt.org>
1313 * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
1315 2003-10-17 Paul Brook <paul@nowt.org>
1317 * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
1319 2003-10-17 Feng Wang <wf_cs@yahoo.com>
1321 * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
1322 (gfc_resolve_minloc): Ditto.
1323 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
1324 Return the value after subtracting the lower bound.
1326 2003-10-16 Richard Henderson <rth@redhat.com>
1328 * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
1330 2003-10-16 Steven Bosscher <steven@gcc.gnu.org>
1332 * lang.c: Remove -M option for now, it's in the way for C.
1334 2003-10-14 Jason Merrill <jason@redhat.com>
1336 * Make-lang.in (f95.tags): New rule.
1338 2003-10-13 Richard Henderson <rth@redhat.com>
1340 * trans.c (gfc_trans_code): Use annotate_all_with_locus.
1342 2003-10-13 Paul Brook <paul@nowt.org>
1344 * trans-decl.c (generate_local_decl): Don't create junk variables.
1346 2003-10-13 Paul Brook <paul@nowt.org>
1348 * resolve.c (resolve_formal_arglist): Use function result decl in
1349 preference to function decl.
1351 2003-10-12 Richard Henderson <rth@redhat.com>
1353 * f95-lang.c (gfc_define_builtin): New const_p argument. Set
1354 TREE_READONLY. Update all callers.
1356 2003-10-12 Feng Wang <wf_cs@yahoo.com>
1358 * iresolve.c (gfc_resolve_cshift): Change to match implementation.
1359 * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
1360 (gfc_is_intrinsic_libcall): Add CSHIFT.
1362 2003-10-12 Richard Henderson <rth@redhat.com>
1364 * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
1365 (gfc_trans_array_constructor_value): Likewise.
1366 (gfc_conv_array_initializer): Likewise.
1367 * trans-stmt.c (gfc_trans_character_select): Likewise.
1369 2003-11-12 Kejia Zhao <kejia_zh@yahoo.com.cn>
1371 * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
1373 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
1375 * check.c (gfc_check_repeat): Check arguments are scalar.
1376 (gfc_check_trim): New function.
1377 * intrinsic.h (gfc_check_trim): Add prototype.
1378 * intrinsic.c (add_functions): Use it.
1379 * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
1381 * trans-decl.c: Ditto.
1382 (gfc_build_intrinsic_fucntion_decls): Set them.
1383 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
1384 (gfc_conv_intrinsic_trim): New function.
1385 (gfc_conv_intrinsic_repeat): New function.
1386 (gfc_conv_intrinsic_function): Use them.
1388 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
1390 * trans-types.c (gfc_sym_type): Handle result variables.
1392 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
1394 * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
1395 gfc_get_character_type.
1397 2003-10-11 Feng Wang <wf_cs@yahoo.com>
1399 * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
1401 2003-10-11 Paul Brook <paul@nowt.org>
1403 * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
1404 (gfc_resolve_dprod): New function.
1405 (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
1406 * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
1407 (gfc_resolve_dprod): Declare.
1408 * intrinsic.c (add_functions): Use them.
1409 * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
1411 2003-10-06 Richard Henderson <rth@redhat.com>
1413 * f95-lang.c (gfc_init_builtin_functions): Add clzll.
1414 * trans-intrinsic.c (call_builtin_clz): Use it.
1416 2003-10-05 Paul Brook <paul@nowt.org>
1418 * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
1419 * trans-decl.c (gfc_generate_function_code): Set
1420 cfun->function_end_locus.
1422 2003-09-24 Jason Merrill <jason@redhat.com>
1424 * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
1427 2003-09-21 Lifang Zeng <zlf605@hotmail.com>
1428 Paul Brook <paul@nowt.org>
1430 * Make-lang.in (F95_OBJS): Add fortran/data.o.
1431 * array.c (gfc_inser_constructor): New function.
1432 (gfc_get_constructor): New function.
1433 (gfc_free_constructor): Initialize offset and repeat.
1434 (iterator_stack): Remove.
1435 (expand_info): Add offset, component and repeat fields.
1436 (expand_constructor): Set them.
1437 (expand): Set new fields.
1438 (gfc_copy_constructor): Ditto. Avoid recursion.
1439 * gfortran.h: Add prototypes for new functions.
1440 (gfc_constructor): Add offset, component and repeat.
1441 (iteratio_stack): Move to here.
1442 * resolve.c (check_data_variable): Convert data values into variable
1444 (traverse_data_list): Build implicit loop chain.
1445 (gfc_resolve): Ditto.
1446 * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
1447 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
1448 * trans-expr.c (gfc_conv_structure): Handle array initializers.
1449 (gfc_conv_expr): Update to match.
1450 * trans.h (gfc_conv_structure): Declare.
1453 2003-09-20 Kejia Zhao <kejia_zh@yahoo.com.cn>
1455 * trans.h: Add declarations for gfor_fndecl_si_kind and
1456 gfor_fndecl_sr_kind.
1457 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
1458 * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
1459 (g95_conv_intrinsic_sr_kind): New function.
1460 (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
1463 2003-09-17 Lars Segerlund <Lars.Segerlund@comsys.se>
1465 * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
1466 instead of _4 and _8 as postfix for libgfortran calls.
1468 2003-09-16 Paul Brook <paul@nowt.org>
1470 * array.c (compare_bounds): New function.
1471 (gfc_compare_array_spec): Use it.
1473 2003-09-14 Paul Brook <paul@nowt.org>
1475 * primary.c (gfc_match_rvalue): Make sure sym->result is set.
1476 * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
1478 2003-09-14 Paul Brook <paul@nowt.org>
1480 * check.c (dim_rank_check): Allow assumed bounds if requested.
1481 (gfc_check_lbound): Call it.
1482 (gfc_check_ubound): Ditto.
1483 (gfc_check_size): Change to match.
1484 * simplify.c (gfc_simplify_bound): New function.
1485 (gfc_simplify_lbound): New function.
1486 (gfc_simplify_ubound): New function.
1487 * intrinsic.h: Declare them.
1488 * intrinsic.c (add_functions): Use them.
1490 2003-09-14 Paul Brook <paul@nowt.org>
1492 * io.c (format_lex): Initialize negative_flag.
1493 (check_format): Intialize repeat.
1494 * trans-io.c (gfc_new_nml_name_expr): Declare static.
1495 (gfc_new_var_expr): Ditto.
1497 2003-09-14 Paul Brook <paul@nowt.org>
1499 * trans-array.c (gfc_conv_array_initializer): Handle derived types.
1500 * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
1502 2003-09-12 Paul Brook <paul@nowt.org>
1504 * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
1506 2003-09-12 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
1508 * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
1509 for a correct expression.
1511 2003-09-10 Kejia Zhao <kejia_zh@yahoo.com.cn>
1513 * trans-intrinsic.c (real_compnt_info): New struct.
1514 (prepare_arg_info): New function.
1515 (gfc_conv_intrinsic_set_exponent): New function.
1516 (gfc_conv_intrinsic_scale): New function.
1517 (gfc_conv_intrinsic_nearest): New function.
1518 (gfc_conv_intrinsic_fraction): New function.
1519 (gfc_conv_intrinsic_exponent): New function.
1520 (gfc_conv_intrinsic_spacing): New function.
1521 (gfc_conv_intrinsic_rrspacing): New function.
1522 (gfc_conv_intrinsic_function): Use them.
1524 2003-08-24 XiaoQiang Zhang (zhangapache@yahoo.com>
1526 * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
1527 build_int_2 changed from (high, low) to (low, high).
1528 * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
1529 ioparm_namelist_read_mode, iocall_set_nml_val_int,
1530 iocall_set_nml_val_float, iocall_set_nml_val_char,
1531 iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
1532 (gfc_build_io_library_fndecls): Add variable initialization.
1533 (gfc_new_nml_name_expr, get_new_var_expr): New function.
1534 (build_dt): Add namelist support.
1535 * io.c (value): New variable.
1536 (check_format): Support FMT_H now.
1538 2003-09-07 Paul Brook <paul@nowt.org>
1540 * io.c (gfc_resolve_dt): Error if format label is not defined.
1542 2003-09-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
1544 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
1545 about case_switch's break. The other is about building the condition
1546 statement tree, which judges the argument in the range of the
1547 corresponding integer type.
1548 * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
1549 for the large values.
1551 2003-09-05 Paul Brook <paul@nowt.org>
1553 * f95-lang.c (expand_function_body): Gimplify the function.
1555 2003-09-04 Jeff Law <law@redhat.com>
1557 * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
1560 2003-09-04 Paul Brook <paul@nowt.org>
1562 * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
1563 (gfc_expand_stmt): New function.
1564 (LANG_HOOKS_RTL_EXPAND_STMT): Define.
1565 (expand_function_body): Use tree_rest_of_compilation.
1566 * trans-decl.c (gfc_generate_function_code): Don't free cfun.
1568 2003-09-03 Jeff Law <law@redhat.com>
1570 * f95-lang.c (gfc_init_builtin_functions): C arrays start at
1573 2003-08-30 Paul Brook <paul@nowt.org>
1575 * f95-lang.c (builtin_function): Remove #if 0 code.
1576 (gfc_define_builtin): New function.
1577 (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
1578 * mathbuiltins.def: New file.
1579 * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
1580 (gfc_intrinsic_map): Use mathbuiltins.def.
1581 (gfc_intrinsic_builtin_t): Remove.
1582 (gfc_build_intrinsic_lib_fndecls): Update.
1583 * trans-types.c (gfc_init_types): Remove redundant initilaization of
1584 signed_size_type_node.
1586 2003-08-29 Paul Brook <paul@nowt.org>
1588 * arith.c (gfc_real_kinds): Use correct minimum exponents.
1590 2003-08-22 Kejia Zhao <kejia_zh@yahoo.com.cn>
1592 * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
1593 (gfc_conv_intrinsic_function): Add MODULO.
1595 2003-08-22 Jason Merrill <jason@redhat.com>
1597 * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
1599 2003-08-22 Andreas Jaeger <aj@suse.de>
1601 * Make-lang.in (f95.install-common): Add DESTDIR support.
1602 * (f95.install-info): Likewise.
1603 (f95.uninstall): Likewise.
1605 2003-08-19 Diego Novillo <dnovillo@redhat.com>
1607 * trans-types.c (gfc_init_types): Initialize
1608 signed_size_type_node with size_type_node.
1610 2003-08-18 Paul Brook <paul@nowt.org>
1612 * dependency.c (gfc_dependency): New enum.
1613 (check_another_array_ref): Remove.
1614 (gfc_get_array_from_component): Remove.
1616 (get_range): Remove.
1617 (get_no_of_elements): Use mpz_t, not mpf_t.
1618 (transform_sections): New function.
1619 (gfc_check_range_range): Rename ...
1620 (gfc_check_section_vs_section): ... to this. Use new function.
1621 (gfc_is_inside_range): Rewrite to match.
1622 (gfc_check_element_vs_section): Ditto.
1623 (gfc_check_element_vs_element): Ditto.
1625 (gfc_dep_resolver): Ditto. Remove unused parameter.
1626 * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
1627 gfc_check_element_vs_element, gfc_is_inside_range,
1628 gfc_get_array_from_component): Remove prototypes for static functions.
1629 (gfc_dep_resolver): Update prototype.
1630 * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
1632 2003-08-15 Paul Brook <paul@nowt.org>
1634 * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
1635 return values to parent scope.
1636 (gfc_build_dummy_array_decl): Ditto.
1638 2003-08-14 Paul Brook <paul@nowt.org>
1640 * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
1641 size of the type, not the pointer.
1642 * resolve.c (resolve_symbol): Give more accurate error message.
1644 2003-08-10 Paul Brook <paul@nowt.org>
1646 * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
1648 2003-08-10 Paul Brook <paul@nowt.org>
1650 * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
1653 2003-08-10 Chun Huang <compiler@sohu.com>
1655 * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
1656 (resolve_symbol): Ditto.
1657 * trans-expr.c (gfc_conv_statement_function): New function.
1658 (gfc_conv_function_expr): Use it.
1660 2003-08-10 Paul Brook <paul@nowt.org>
1662 * trans-array.c (gfc_conv_ss_startstride): Handle functions.
1663 (walk_function_expr): Set section rank.
1664 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
1666 2003-08-10 Paul Brook <paul@nowt.org>
1668 * intrinsic.c (add_sym): Prefix names with correct string.
1669 (add_sym_0s): New function.
1670 (add_subroutines): Register abort.
1672 2003-08-10 Erik Schnetter <schnetter@uni-tuebingen.de>
1674 * gfortran.h: Introduce options to control the mangling.
1675 * lang.opt: Likewise.
1676 * options.c (gfc_init_options): Handle the options.
1677 * trans-common.c (gfc_sym_mangled_common_id): New function.
1678 (gfc_build_common_decl): Call it.
1679 * trans-decl.c (gfc_sym_mangled_function_id): New function.
1680 (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
1682 2003-08-09 Paul Brook <paul@nowt.org>
1684 * module.c (mio_symbol): Always ouput a namespace for formal args.
1685 (load_needed): Namespace now belong to their proper symbol.
1686 (gfc_dump_module): Change G95=>GFORTRAN.
1688 2003-08-05 Paul Brook <paul@nowt.org>
1690 * options.c: Force -fg77-calls.
1692 2003-08-02 Paul Brook <paul@nowt.org>
1694 * Makelang.in: Rename G95_* to GFORTRAN_*.
1695 * All sources: Rename G95_* to GFC_*.
1697 2003-08-01 Paul Brook <paul@nowt.org>
1699 * fortran/Make-lang.in: Use GMPLIBS.
1700 * fortran/config-lang.in: Set need_gmp.
1701 * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
1703 2003-07-27 Andreas Jaeger <aj@suse.de>
1705 * trans-decl.c (gfc_generate_constructors): Convert prototype to
1707 * trans-const.c (gfc_init_constants): Likewise.
1708 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
1710 * gfortranspec.c: Convert to ISO C90.
1711 (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
1713 2003-07-26 Paul Brook <paul@nowt.org>
1715 * lang.opt: Add -fdump-parse-tree.
1716 * options.c (gfc_handle_option): Ditto.
1717 * resolve.c (resolve_forall_iterators): Convert to proper type.
1718 * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
1720 2003-07-26 Paul Brook <paul@nowt.org>
1722 * Makefile.in: Add build dependencies on files common with rest of gcc.
1724 2003-07-26 Lifang Zeng <zlf605@hotmail.com>
1726 * trans.h: Declare g95_trans_pointer_assignment.
1727 * trans-expr.c (g95_trans_pointer_assignment): New function.
1728 (g95_trans_pointer_assign): Use it.
1729 * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
1730 (g95_trans_pointer_assign_need_temp): New function.
1732 2003-07-26 Paul Brook <paul@nowt.org>
1734 * gfortran.texi: Replace references to g95.
1736 2003-07-26 Paul Brook <paul@nowt.org>
1738 Rename g95_* to gfc_*.
1740 2003-07-25 Paul Brook <paul@nowt.org>
1742 * gfortran.h: Rename from g95.h.
1743 * trans-types.c (boolean_type_node, booelan_true_node,
1744 boolean_false_node): Remove.
1745 * trans-types.h: Ditto.
1747 2003-07-25 Chun Huang <compiler@sohu.com>
1749 * parse.c (accept_statement): Implement BLOCK DATA statement.
1750 * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
1753 2003-07-24 Lifang Zeng <zlf605@hotmail.com>
1755 * trans-stmt.c (temporary_list): Define.
1756 (g95_trans_assign_need_temp): New function.
1757 (g95_trans_forall_1): Modified for WHERE.
1758 (g95_trans_where_assign): Modified.
1759 (g95_trans_where_2): Modified.
1760 (g95_evaluate_where_mask): Modified.
1761 (g95_trans_where): Modified.
1762 (g95_get_temp_expr): Removed.
1763 (g95_add_to_where_stmt_list): Removed.
1764 (compute_overall_iter_number): Modified for WHERE.
1765 * trans.h: Remove where_stmt_list.
1767 2003-07-24 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1769 * lang.opt: Correct description of options -J and -M.
1771 2003-07-23 Steven Bosscher <steven@gcc.gnu.org>
1773 * lang.opt: Move help text to here.
1774 * lang-options.h: Remove.
1776 2003-07-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1777 * iresolve.c (g95_resolve_transpose): Proper variable in switch.
1778 * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
1781 2003-07-22 Steven Bosscher <steven@gcc.gnu.org>
1782 Paul Brook <paul@nowt.org>
1784 * check.c (check_rest): Use global pedantic flag.
1785 * io.c (data_desc): Ditto.
1786 * error.c (g95_warning, g95_warning_now): Use global flag.
1787 * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
1788 (expand_function_body): Update to new prototypes.
1789 (g95_init): Use new option names.
1790 * g95.h (g95_option_t): Standardize names.
1791 (g95_init_options, g95_handle_option): Update prototypes.
1792 * interface.c: Use new option names.
1799 * simplify.c: Ditto.
1801 * trans-array.c: Ditto.
1802 * trans-expr.c: Ditto.
1803 * trans-types.c: Ditto.
1804 * trans-decl.c: Ditto.
1805 (g95_build_library_function_decl): Remove obsolete VPARAMS.
1807 * options.c (g95_display_help): Remove.
1808 (g95_init_options): Convert to new scheme.
1810 (g95module_option): Ditto, rename from g95_parse_arg.
1811 (g95_handle_module_path_options): New function.
1812 * trans-equivalence.c: Fix error message.
1813 * lang.opt: Corrections.
1815 2003-07-21 Steven Bosscher <steven@gcc.gnu.org>
1817 * lang.opt: New file.
1819 2003-07-21 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1821 * decl.c (match_attr_spec): Set colon_seen.
1823 2003-07-14 Paul Brook <paul@nowt.org>
1825 * trans-array.c: Update comment.
1826 (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
1827 * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
1828 minmaxloc,minmaxval): Ditto.
1829 * trans-io.c (g95_trans_transfer): Ditto.
1830 * trans-stmt.c: Remove unneeded prototypes.
1831 (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
1832 (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
1833 (compute_inner_temp_size): Remove bits of dead code. Add comments.
1834 Don't share loopinfo.
1835 (compute_overall_iter_number): Declare as static.
1836 (allocate_temp_for_forall_nest): Ditto.
1837 (g95_trans_forall_1): Don't pass shared loopinfo.
1838 * trans.c (g95_start_block): Expand comment.
1840 2003-07-12 Paul Brook <paul@nowt.org>
1842 * arith.c (g95_index_integer_kind): Remove unused initializer.
1843 * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
1844 index by size of element.
1845 (generate_loop_for_rhs_to_temp): Ditto.
1846 (allocate_temp_for_forall_nest): Use element size, not index size.
1848 2003-07-11 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1850 * arith.c (g95_index_integer_kind): Add a TODO.
1851 * simplify.c (g95_simplify_nearest): Add a TODO.
1853 2003-07-09 Chun Huang <compiler@sohu.com>
1855 * trans.h: Add declarations for gfor_fndecl_string_scan and
1856 gfor_fndecl_string_verify.
1857 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
1858 * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
1859 (g95_conv_intrinsic_verify): New function.
1860 (g95_conv_intrinsic_function): Add SCAN and VERIFY.
1861 * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
1862 of parameter 'BACK=.TRUE.'
1864 2003-07-05 Lifang Zeng <zlf605@hotmail.com>
1866 * trans-stmt.c (iter_info, forall_info): Define.
1867 (g95_trans_forall_block): Remove.
1868 (g95_trans_forall_loop): Use forall info blocks.
1869 (g95_trans_nested_forall_loop): New function.
1870 (g95_do_allocate): Handle things other than logical masks.
1871 (generate_loop_for_temp_to_lhs): New function.
1872 (generate_loop_for_rsh_to_temp): New function.
1873 (compute_inner_temp_size): New function.
1874 (compute_overall_iter_number): New function.
1875 (allocate_temp_for_forall_nest): New function.
1876 (g95_trans_forall): Move body ...
1877 (g95_trans_forall_1): ... to here. Handle loops with temporaries.
1879 2003-07-02 Paul Brook <paul@nowt.org>
1881 * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
1882 in correct scope. Change callers to match.
1883 * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
1884 * iresolve.c (g95_resolve_reshape): Only use constant shapes.
1886 2003-07-02 Paul Brook <paul@nowt.org>
1888 * trans-array.c (g95_conv_loop_setup): Remove dead var. Use
1889 expression shape for all expressions.
1890 * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
1892 2003-07-03 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1894 * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
1895 g95_parse_arg), intrinsic.c (g95_convert_type): support of
1897 * intrinsic.c, g95.h: Add g95_convert_type_warn,
1898 * resolve.c (g95_resolve_index): Call it.
1900 2003-07-02 Paul Brook <paul@nowt.org>
1902 * iresolve.c (g95_resolve_reshape): Set expression shape.
1903 (g95_resolve_shape): Ditto.
1904 * simplify.c (g95_simplify_shape): Move common code outside condition.
1905 * trans-array.c (g95_conv_array_initializer): Teach it how to count.
1907 2003-07-01 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1909 * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
1912 2003-06-29 Paul Brook <paul@nowt.org>
1914 * array.c (g95_simplify_iterator_var): Don't bother with return value.
1915 * expr.c (find_array_element, find_component_ref): New functions.
1916 (remove_subobject_ref): New function.
1917 (simplify_const_ref): Use them. Rename from simplify_component_ref.
1918 (simplify_ref_chain): New function.
1919 (g95_simplify_expr): Use it. Simplify parameter variable subobjects.
1920 (g95_specification_expr): Simplify the expression.
1921 * resolve.c (resolve_operator): Check simplifications return code.
1922 (g95_resolve_expr): Ditto.
1924 2003-06-26 Paul Brook <paul@nowt.org>
1926 * expr.c (simplify_component_ref): New function.
1927 (g95_simplify_expr): Use it.
1928 * resolve.c (resolve_structure_cons): Handle references.
1930 2003-06-25 Paul Brook <paul@nowt.org>
1932 * trans-io.c (build_dt): Handle internal units.
1934 2003-06-25 Canqun Yang <canqun@yahoo.com.cn>
1936 * trans-common.c (g95_build_common_decl): Array index range starts at 0.
1937 (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
1938 Use g95_array_index_type instead of integer_type_node.
1939 (g95_build_common_decl, g95_set_common_master_type): Use
1940 g95_character1_type_node instead of char_type_node.
1941 * trans-equivalence.c (g95_layout_local_equiv): As above.
1943 2003-06-24 Steven G. Kargl <kargls@attbi.com>
1945 * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
1946 remove last remains of -fquiet.
1948 2003-06-22 Paul Brook <paul@nowt.org>
1950 * resolve.c (resolve_operator): Don't fail if we can't simplify.
1951 (g95_resolve_expr): Ditto.
1952 (resolce_code): Mark as static.
1953 * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
1954 gimplifer doesn't (yet).
1956 2003-06-20 Paul Brook <paul@nowt.org>
1958 * g95.h: Add ST_PAUSE and EXEC_PAUSE.
1959 * match.c (g95_match_if): Add ST_PAUSE.
1960 (g95_match_stopcode): New function.
1961 (g95_match_pause, g95_match_stop): Use it.
1962 * parse.c (g95_ascii_statement): Handle ST_PAUSE.
1963 (decode_stmt, next_statement, parse_executable): Ditto.
1964 * resolve.c (resolve_code): Ditto.
1965 * st.c (g95_free_statement): Ditto.
1966 * trans-stmt.c (g95_trans_pause): New function.
1967 * trans-stmt.h: Declare it.
1968 * trans.c (g95_trans_code): Use it.
1969 * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
1971 (g95_build_builtin_function_decls): Initialize them.
1973 * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
1975 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1977 * io.c (g95_match_open , g95_match_close, g95_match_inquire,
1978 match_filepos): Fix error handling.
1980 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1982 * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
1983 Add assertions on arguments.
1984 * resolve.c (expression_shape): Remove useless &.
1985 * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
1986 g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
1987 g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
1988 g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
1989 g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
1990 g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
1991 (g95_simplify_not, g95_simplify_scale): Add assertions.
1993 2003-06-15 Paul Brook <paul@nowt.org>
1995 Clean up stuff to work with the ssa optimizers.
1996 * convert.c (convert): Handle BOOLEAN_TYPEs.
1997 * f95-lang.c (g95_truthvalue_conversion): Implement.
1998 * trans-array.c (g95_trans_array_constructor_value): Group multiple
2000 * trans.h (g95_truthvalue_conversion): Declare.
2001 * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
2002 * trans-stmt.c (g95_trans_character_select): Don't create array
2003 assignments. Mark labels as indirect jump targets.
2004 * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
2005 (g95_get_dtype_cst): Handle LOGICAL types.
2007 2003-06-14 Paul Brook <paul@nowt.org>
2009 * f95-lang.c (g95_gimplify_expr): New function.
2010 * trans-array.c (g95_trans_array_constructor_value): Don't create
2012 (g95_conv_expr_descriptor): Rename simple->gimple.
2013 * trans-expr.c (conv_expr_op): Use proper logical operators.
2014 * trans-intrinsic.c (build_fixbound_expr): New function.
2015 (build_fix_expr): Ditto.
2016 (g95_conv_intinsic_aint): Use them. Use builtin functions.
2017 (g95_conv_intrinsic_function): Add FLOOR and CEILING.
2019 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2021 * array.c (g95_compare_array_spec): Remove unreachable code.
2022 * expr.c (g95_copy_expr): Likewise.
2023 * intrinsic.c (g95_convert_type): Likewise.
2024 * misc.c (g95_code2string): Likewise.
2025 * simplify.c (g95_simplify_ishft, g95_simplify_real,
2026 g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
2027 * trans-stmt.c (g95_trans_select): Likewise.
2028 * primary.c (extend_ref): Add an assertion.
2029 * simplify.c (g95_convert_constant): Add const.
2030 * intrinsic.h: Remove g95_check_x_ni.
2031 * f95-lang.c (g95_finish): Call g95_release_include_path.
2033 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2035 * resolve.c (resolve_contained_functions): Fix typo introduced on
2038 2003-06-09 Paul Brook <paul@nowt.org>
2040 * g95.h: Include system.h not hwint.h.
2041 * many: use safe-ctype.h not ctype.h. Change isalpha -> ISALPHA, etc.
2042 * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
2044 2003-06-09 Paul Brook <paul@nowt.org>
2046 * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
2047 * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
2048 * trans-decl.c (g95_add_decl_to_functions): Make non-static.
2049 (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
2050 (g95_generate_function_code): Translate COMMON and EQUIVALENCE
2052 * trans.h (g95_trans_equivalence, g95_trans_common,
2053 g95_add_decl_to_function): Declare.
2054 * trans-common.c, trans-equivalence.c: New files.
2056 2003-06-08 Steven Bosscher <steven@gcc.gnu.org>
2058 * intrinsic.c (g95_intrinsic_extension): Remove.
2059 (add_functions): Substitute g95_check_x for g95_check_x_ni
2061 (g95_init_expr_extensions): New function.
2062 (g95_intrinsic_func_interface): Use it.
2063 * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
2064 * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
2065 g95_check_precision, g95_check_present, g95_check_radix,
2066 g95_check_range, g95_check_selected_real_kind): Do not set
2067 g95_intrinsic_extension.
2068 (g95_check_x_ni): Remove now duplicate of g95_check_x.
2070 * expr.c (check_inquiry): Add FIXME, fixup some code style.
2072 2003-06-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2074 * g95.h (ref_type): Name this type explicitly.
2075 * module.c (MIO_NAME): Add specialisations of mio_name.
2076 (mio_symbol_attribute, mio_typespec, mio_array_ref,
2077 mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
2078 (ab_attribute): Name this type explicitly.
2079 (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
2081 2003-06-05 Kejia Zhao <kejia_zh@yahoo.com.cn>
2083 * trans-intrinsic.c (g95_conv_allocated): New function.
2084 (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
2086 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
2088 * f95-lang.c: Don't include g95-support.h
2089 (g95_mark_addressable): Add prototype.
2090 (g95_init_decl_processing): Remove C front end hack.
2091 * f95-tree.c: Remove file.
2092 * support.c: Remove file.
2093 * g95-support.h: Remove file.
2094 * trans-types.c (g95_init_types): Set up boolean
2095 type related tree nodes.
2096 * Make-lang.in: Remove rules for dead files and
2097 dependencies on them.
2099 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
2101 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
2102 C front end dependency. Also, convert.c does not depend on
2103 g95-support.h anymore.
2104 * convert.c: Don't include c-common.h and g95-support.h
2105 * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
2106 (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
2107 stmts_are_full_exprs_p, current_stmt_tree,
2108 current_scope_stmt_stack): Remove.
2109 * g95-support.h (unsigned_conversion_warning): Kill proto.
2110 (boolean_type_node, boolean_true_node, boolean_false_node):
2111 Don't define here. Instead, make then true tree nodes in
2113 * support.c (c_global_trees): Die, C front end, die!!!
2114 (g95_init_c_decl_hacks): Don't touch intmax_type_node,
2115 uintmax_type_node, string_type_node and const_string_type_node.
2116 (decl_constant_value, overflow_warning): Make static functions.
2117 They are in death row too, though.
2118 (default_conversion, c_expand_asm_operands): Remove.
2119 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
2120 trans.c: Don't include c-common.h.
2121 * trans-types.c (boolean_type_node, boolean_true_node,
2122 boolean_false_node): Make them real tree nodes.
2123 * trans-types.h (intmax_type_node, string_type_node,
2124 const_string_type_node): Hack to work around C dependencies
2125 in builtin-types.def.
2127 2003-06-04 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2129 * decl.c (decl_types): Add some iterators-like sentinels.
2130 * decl.c (match_attr_spec): Use them.
2131 Use "decl_types" instead of "int".
2132 Add cast in call to g95_match_strings.
2133 * dump-parse-tree.c (g95_show_namespace): Use "g95_intrinsic_op"
2135 * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
2136 (g95_interface_info): Use "g95_intrinsic_op".
2137 * dump-parse-tree.c (g95_show_namespace): Use them.
2138 * interface.c (g95_check_interfaces): Use them.
2139 * module.c (read_module, write_module): Use them.
2140 * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
2141 Use "g95_intrinsic_op".
2142 * interface.c (check_operator_interface): Use "g95_intrinsic_op".
2143 Add a default case in switch statement.
2144 * intrinsic.h (g95_generic_isym_id): Moved to...
2145 * g95.h (g95_generic_isym_id): here.
2146 (g95_intrinsic_sym): Use "g95_generic_isym_id".
2147 * intrinsic.c (make_generic): Use "g95_generice_isym_id".
2148 * trans-intrinsic.c (g95_intrinsic_map_t,
2149 g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
2150 * match.c (g95_match_intrinsic_op): Add cast in call to
2153 2003-06-03 Steven Bosscher <steven@gcc.gnu.org>
2155 * support.c (skip_evaluation, warn_conversion, lvalue_p,
2156 lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
2157 constant_fits_type_p, convert_and_check,
2158 unsigned_conversion_warning): Remove these ugly remnants
2159 we inherited from the C front end.
2160 (function_types_compatible): Remove '#if 0'-edcode.
2161 (build_modify_expr): Likewise.
2162 (convert_for_assignment): Don't use the deceased functions.
2163 The parameter fundecl is now unused.
2164 (decl_constant_value): Always just return decl. In fact
2165 this function is not used at present, but it might be in
2166 the future, when we start using the tree inliner.
2167 (overflow_warning, default_conversion, c_expand_asm_operands):
2168 Abort when these are called, they are part of the C type
2169 checking implementation and therefore poison to Fortran.
2171 2003-06-04 Steven Bosscher <steven@gcc.gnu.org>
2173 * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
2174 c-pretty-print.o and c-dump.o. Add a comment on why we
2175 depend on c-semantics.c.
2176 * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
2177 Don't use the C front end tree dumper hook to dump the
2178 language specific tree representation -- we don't have
2179 one. So instead, inherit the default langhook.
2181 2003-06-02 Paul Brook <paul@nowt.org>
2183 * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
2185 2003-06-02 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2187 * check.c (g95_check_associated): Use proper types. Remove
2188 extraneous argument in call to g95_error().
2190 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
2192 * resolve.c (resolve_operator): Make logical operands convert to the
2193 type with higher kind.
2195 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
2197 * check.c (g95_check_associated): Make sure both pointer and target has
2198 the same type and rank. Null pointer or array section with vector
2199 subscript as target are not allowed.
2200 * trans.h: Declare gfor_fndecl_associated.
2201 * trans-decl.c: (g95_build_builtin_function_decls): Initialize
2202 gfor_fndecl_associated.
2203 * trans-intrinsic.c (g95_conv_associated): New function.
2204 (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
2206 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
2208 * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
2209 according to POINTER itself rather than TARGET.
2210 (g95_conv_expr_descriptor): Make lbound start at 1.
2211 * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
2213 2003-06-01 Paul Brook <paul@nowt.org>
2215 * expr.c (g95_type_convert_binary): Make it match the standard.
2216 * g95.texi: Remove dead link.
2218 2003-06-01 Steven Bosscher <steven@gcc.gnu.org>
2220 * g95.texi: Cleanup somewhat in preparation for inclusion
2223 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2224 Canqun Yang <canqun@yahoo.com.cn>
2226 * resolve.c (compare_bound_int, resolve_where_shape): Proper return
2228 (g95_find_forall_index): Return proper value.
2229 (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
2230 compare the return value from g95_find_forall_index.
2232 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2233 * g95.h, io.c (g95_st_label): Remove "length".
2234 (g95_symtree): Remove "link".
2235 (g95_case): Remove "code".
2236 * arith.c, arith.h (g95_compare_string, g95_convert_integer,
2237 g95_convert_real): Make an argument pointer to const.
2238 * decl.c (colon_seen): Add a TODO.
2239 * interface.c (g95_compare_types): Fix typo.
2240 * interface.c (compare_interfaces): Preserve value of "p".
2241 * intrinsic.c (sort_actual): Remove "i".
2242 * match.c (g95_match_assign): Proper type in call to g95_match().
2243 * parse.c (next_free): Avoid duplicate call due to macro.
2244 * parse.c (check_statement_label): wrong type in call to g95_error.
2245 * primary.c (match_real_constant): Add a TODO.
2246 * resolve.c (resolve_select): Remove useless conditional.
2247 * simplify.c (g95_simplify_repeat): Proper assignment to
2248 "value.character.string".
2249 * simplify.c (g95_simplify_reshape): Wrong variable in call to
2252 2003-05-20 Canqun Yang <canqun@yahoo.com.cn>
2254 * trans-stmt.c: Remove unnecessary include file defaults.h.
2256 2003-05-19 Lifang Zeng <zlf605@hotmail.com>
2258 * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
2260 (g95_trans_forall): Allow arbitrary number of FORALL indexes and
2261 actual variables used as FORALL indexes.
2263 2003-05-15 Paul Brook <paul@nowt.org>
2265 * trans-array.c (g95_trans_static_array_pointer): Use
2267 (g95_trans_deferred_array): Initialize static array pointers.
2268 * trans-expr.c (g95_conv_function_call): Use formal arglist to
2269 correctly pass POINTER and absent CHARACTER arguments.
2271 2003-05-14 Lifang Zeng <zlf605@hotmail.com>
2273 * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
2274 (g95_resolve_forall_body): Resolve FORALL body.
2275 (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
2276 (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
2277 (g95_find_forall_index): Check whether the FORALL index appears in
2278 the expression or not.
2279 (resolve_code): Modified.
2281 2003-05-14 Paul Brook <paul@nowt.org>
2283 * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
2285 2003-05-13 Paul Brook <paul@nowt.org>
2287 * trans-types.c (g95_max_array_element_size): Now a tree node.
2288 (g95_init_types): Work out max size properly.
2289 (g95_get_dtype_cst): Modify to match.
2291 2003-05-11 Paul Brook <paul@nowt.org>
2293 * trans-io.c (add_case): Create a label decl for case labels.
2295 2003-05-11 Paul Brook <paul@nowt.org>
2297 * arith.c (g95_integer_index_kind): New variable.
2298 * f95-lang.c (g95_init): Move frontend initialization here ...
2299 (g95_post_options): ... from here.
2300 * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
2301 * intrinsic.c (add_functions): Use index kinds.
2302 * iresolve.c: Convert to index_kind where needed.
2303 * resolve.c (g95_resolve_index): Make public, use index_kind.
2304 (resolve_array_ref): Adjust to match.
2305 * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
2306 * trans-stmt.c: Ditto.
2307 * trans-types.c: Ditto.
2308 * trans-types.h (g95_array_index_kind): Remove declaration.
2309 * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
2311 2003-05-07 Paul Brook <paul@nowt.org>
2313 * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
2314 * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
2317 2003-05-07 Paul Brook <paul@nowt.org>
2319 * trans-array.c (trans_static_array_pointer,
2320 g95_trans_array_constructor_value, g95_conv_array_initializer,
2321 g95_conv_structure): CONSTRUCTOR nodes only have one operand.
2322 (g95_add_loop_ss_code): Convert subscripts to the correct type.
2323 * trans-stmt.c (g95_trans_character_select): Ditto.
2324 * trans-types.c (g95_init_types): Ditto.
2326 2003-05-07 Steven Bosscher <steven@gcc.gnu.org>
2328 * f95-lang.c (expand_function_body): Use input_line, not lineno.
2329 * trans-decl.c (g95_generate_function_code,
2330 g95_generate_constructors): Likewise.
2331 * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
2332 g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
2335 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
2336 * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
2337 with components point to the DERIVED type itself, and two DERIVED
2338 type with components point to each other.
2339 * trans-expr.c (g95_conv_componet_ref): Modified
2341 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
2342 * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
2344 (g95_trans_pointer_assign): Implement Nullify.
2346 2003-05-01 Paul Brook <paul@nowt.org>
2348 * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
2349 * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
2351 2003-05-01 Paul Brook <paul@nowr.org>
2353 * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
2354 trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
2357 2003-05-01 Canqun Yang <canqun@yahoo.com.cn>
2359 * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
2362 2003-04-28 Paul Brook <paul@nowt.org>
2364 * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
2365 as their kind suggests.
2366 (g95_resolve_reshape): Ditto.
2368 2003-04-28 Chun Huang <compiler@sohu.com>
2370 * trans-expr.c (g95_conv_substring_expr): New function.
2371 (g95_conv_expr): Use it.
2373 2003-04-28 Paul Brook <paul@nowt.org>
2375 * iresolve.c (g95_resolve_transpose): Make it match the
2377 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
2379 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
2381 * trans-types.c (g95_add_field_to_struct): New function to
2382 add a field to a UNION_TYPE or RECORD_TYPE.
2383 * trans-types.h (g95_add_field_to_struct): Prototype.
2384 (g95_get_derived_type): Use g95_add_field_to_struct to add
2386 * trans-io.c (g95_add_field): Remove.
2387 (ADD_FIELD): Use new g95_add_field_to_struct function.
2388 (ADD_STRING): Likewise.
2389 * trans-stmt.c (g95_trans_select): Likewise.
2390 (g95_add_field): Remove duplicated function.
2392 2003-04-18 Canqun Yang <canqun@yahoo.com.cn>
2394 Port implementation for CHARACTER SELECT from Andy's tree.
2395 * trans-stmt.c (g95_trans_character_select): Implement character
2396 select. (g95_add_field): New function.
2397 * trans-decl.c: Declare 'gfor_gndecl_select_string'.
2398 (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
2399 * g95.h (struct g95_case): Add field 'int n'.
2400 * trans.h: Declare 'gfor_fndecl_select_string'.
2402 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
2404 * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
2405 (g95_insert_bbd): Die on duplicates.
2406 * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
2408 2003-04-14 Steven Bosscher <steven@gcc.gnu.org>
2410 * g95.texi: Require GMP 4.0 -- like we actually
2411 do. Explain the testsuite and what-goes-where.
2412 Don't use undefined texinfo symbol. Break very
2413 long line. Remove finished item from the list
2416 2003-04-11 Canqun Yang <canqun@yahoo.com.cn>
2418 * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
2421 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
2423 * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
2424 (g95_trans_forall_body): New function.
2426 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
2428 * resolve.c (resove_where): New function.
2429 (resolve_where_shape): New function.
2430 (resolve_code): Add call to 'resolve_where'
2431 * trans-stmt.c (g95_trans_where): Modified.
2432 (g95_trans_where_2): New function.
2433 (g95_trans_where_assign): New function.
2434 (g95_evaluate_where_mask): New function.
2435 (g95_add_to_stmt_list): New function.
2436 (g95_get_temp_expr): New function.
2437 * trans.h (where_stmt_list): New structure.
2439 2003-04-10 Paul Brook <paul@nowt.org>
2441 * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
2442 (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
2444 2003-04-10 Steven Bosscher <steven@gcc.gnu.org>
2446 Update after mainline -> tree-ssa-branch merge.
2447 * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
2449 (g95_init): Update for new lang_hooks definition.
2450 (g95_post_options): New langhook.
2451 (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
2452 * scanner.c (g95_new_file): Comment update.
2454 2003-04-09 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2456 * g95.h, lang-options.h: Add -Wimplicit-interface.
2457 * options.c (g95_init_options, g95_parse_arg): Set it.
2458 * interface.c (check_intents): Warn about call with implicit
2460 * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
2463 2003-04-05 Paul Brook <paul@nowt.org>
2465 * iresolve.c (g95_resolve_spread): Don't resole based on type.
2466 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
2468 2003-03-29 Paul Brook <paul@nowt.org>
2470 * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
2471 (g95_resolve_unpack): Ditto.
2472 * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
2473 (g95_conv_intrinsic_function): Use it. Remove PACK and UNPACK.
2474 (g95_is_intrinsic_libcall): Add PACK and UNPACK.
2476 2003-03-25 Paul Brook <paul@nowt.org>
2478 * arith.c (g95_unary_user, g95_user): Remove dead functions.
2480 * array.c (g95_free_array_ref): Ditto.
2482 * symbol.c (g95_use_derived_tree): Ditto.
2483 * intrinsic.c (add_functions): Use simplification for SCALE.
2484 * primary.c (g95_match_rvalue): Test sym, not symtree.
2486 2003-03-25 Paul Brook <paul@nowt.org>
2488 * trans-decl.c (build_function_decl): Add parameter before it gets
2489 turned into a constant.
2490 * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
2491 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
2492 * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
2494 2003-03-22 Paul Brook <paul@nowt.org>
2496 * trans-array.c (g95_conv_array_initializer): Allow scalar
2498 * trans-decl.c (g95_finish_var_decl): Result variables are not
2500 * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
2501 (g95_conv_intrinsic_function): Use it.
2502 * trans-types.h (g95_type_spec): Remove dead declaration.
2504 2003-03-21 Paul Brook <paul@nowt.org>
2506 * trans-decl.c (g95_build_function_decl): Mark string parameters.
2508 2003-03-20 Paul Brook <paul@nowt.org>
2510 * trans-decl.c (g95_build_function_decl): Put character length
2511 parameters at the end of the function declaration.
2512 * trans-expr.c (g95_conv_function_call): Ditto.
2513 * trans-types.c (g95_get_function_type): Ditto.
2515 2003-03-20 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2517 * resolve.c (resolve_formal_arglist): Don't impose intent for
2518 procedure arguments of pure functions.
2519 (resolve_select): Remove redundant assignment.
2521 2003-03-19 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2523 * arith.c (validate_logical), g95.h, options.c (g95_init_options):
2525 * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
2526 * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
2528 * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
2530 * symbol.c (g95_add_type): Fix typo in comment.
2533 2003-03-16 Paul Brook <paul@nowt.org>
2535 * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
2536 * expr.c (g95_build_call): Remove.
2537 * f95-lang.c (puchdecl_top_level): New function.
2538 * g95.h (g95_code): Store resolved symbol, not just the name.
2539 * intrinsic.c (g95_intrinsic_namespace): New global namespace.
2540 (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
2541 (g95_get_intrinsic_sub_symbol): New function.
2542 * iresolve.c (g95_resolve_cpu_time): Use it.
2543 (g95_resolve_random_number): Ditto.
2544 * resolve.c: Set code->resolved_sym instead of code->sub_name.
2545 * trans-decl.c (g95_get_extern_function_decl): Give external decls
2546 the correct DECL_CONTEXT. Add global symbold to the global scope.
2547 * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
2550 2003-03-16 Paul Brook <paul@nowt.org>
2552 * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
2553 * options.c (g95_parse_arg): Ditto.
2554 * module.c (mio_symbol_attribute): Handle the always_explicit bit.
2555 * resolve.c (resolve_formal_arglist): The always_explicit sould be set
2556 for the procedure, not the parameter.
2557 * trans-array.c (g95_trans_g77_array): New function.
2558 (g95_trans_assumed_size): Use it.
2559 (g95_trans_dummy_array_bias): Ditto.
2560 (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
2561 (g95_conv_expr_descriptor): ... to here. Update callers.
2562 * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
2563 (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
2564 * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
2565 * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
2566 * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
2567 (g95_sym_type): Ditto.
2569 2003-03-15 Paul Brook <paul@nowt.org>
2571 * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
2573 * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
2575 2003-03-14 Paul Brook <paul@nowt.org>
2577 * trans-array.c (g95_array_is_packed): Remove.
2578 (g95_conv_array_base): Correctly handle all descriptorless cases.
2579 (g95_conv_array_stride): Use descriptorless strides.
2580 (g95_trans_dummy_array_bias): Don't always repack the array.
2581 (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
2583 * trans-types.c (g95_get_nodesc_array_type): Differentiate between
2584 dummy and non-dummy arrays...
2585 (g95_sym_type, g95_get_derived_type): ... like these.
2586 (g95_get_array_type_bounds): Allow discontiguous arrays.
2588 2003-03-12 Paul Brook <paul@nowt.org>
2590 * array.c (g95_resolve_array_spec): Fix comment.
2591 * g95.h (symbol_attributes): New flag always_explicit.
2592 * resolve.c (resolve_formal_arglist): Set it always_explicit.
2593 * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
2594 * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
2595 (g95_trans_array_bounds): Allow assumed shape arrays.
2596 (g95_trans_repack_array): Remove.
2597 (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
2598 * trans-decl.c (g95_build_qualified_array): Only ignore absent
2599 bounds for assumed size arrays.
2600 (g95_build_dummy_array_decl): Use descriptorless arrays.
2601 * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
2602 (g95_trans_pointer_assign): Fix typo.
2603 * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
2605 (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
2606 * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
2607 Also modify callers.
2608 * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
2610 2003-03-08 Paul Brook <paul@nowt.org>
2612 * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
2613 (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
2614 * resolve.c (compare_spec_to_ref): Allow full array sections.
2616 2003-03-08 Paul Brook <paul@nowt.org>
2618 * expr.c (g95_simplify_expr): Also simplify array index and
2619 substring expressions.
2620 * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
2621 * trans-array.c (g95_trans_array_bounds): New function.
2622 (g95_trans_auto_array_allocation): Use it.
2623 (g95_trans_assumed_size): Rewrite.
2624 * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
2625 (gfor_fndecl_repack): Remove.
2626 (g95_build_qualified_array): Handle absent upper bounds.
2627 (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
2628 (g95_get_symbol_decl): Update.
2629 (g95_build_intrinsic_function_decls): Initialize new decls.
2630 * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
2631 (gfor_fndecl_repack): Remove.
2632 * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
2633 * trans-types.c: (g95_build_array_type): Merge duplicated code..
2634 (g95_get_nodesc_array_type): Handle absent bounds.
2635 * trans-types.h (g95_get_nodesc_array_type): Declare.
2637 2003-03-04 Paul Brook <paul@nowt.org>
2639 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
2642 2003-03-02 Paul Brook <paul@nowt.org>
2644 * options.c (g95_init_options): Drfault to 1.
2645 (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
2646 * trans-array.c (g95_conv_array_data, g95_conv_array_base,
2647 g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
2648 Handle non-constant size automatic arrays.
2649 (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
2650 generic bound functions.
2651 (g95_trans_auto_array_allocation): Don't create a descriptor.
2652 (g95_trans_assumed_size): New function (broken).
2653 (g95_trans_dummy_array_bias): Remove unused var.
2654 * trans-array.h (g95_trans_assumed_size): Declare.
2655 * trans-decl.c (create_index_var): New fuction.
2656 (g95_build_qualified_array): New function.
2657 (g95_get_symbol_decl): Use it.
2658 (g95_trans_deferred_vars): Handle assumed shape seperately.
2659 * trans-types.c (get_element_type): Handle heap allocated arrays.
2660 (g95_is_nodesc_array): Include non-const size arrays.
2661 (g95_get_nodesc_array_type): Ditto.
2663 2003-02-23 Paul Brook <paul@nowt.org>
2665 * trans-array.c (g95_array_init_size): Should use stride, not size of
2668 2003-02-18 Paul Brook <paul@nowt.org>
2670 * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
2671 after intrinsic function check.
2673 2003-02-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2675 * io.c (match_io): Fix missing return value and remove useless
2677 * match.c (g95_match): Remove useless assignment.
2678 * module.c (parse_string): Remove useless post increment.
2679 * simplify.c (g95_simplify_verify): Remove useless assignment.
2681 2003-02-15 Paul Brook <paul@nowt.org>
2683 * expr.c (restricted_intrinsic): Handle bad values gracefully.
2684 * g95.h (symbol_attribute): Add referenced member.
2685 (g95_symbol): Add dummy_order member.
2686 (g95_set_sym_referenced): Declare.
2687 * match.c (g95_match_assignment, g95_match_call): Use it
2688 * primary.c (match_actual_arg, g95_match_rvalue,
2689 g95_match_variable): Ditto.
2690 * symbol.c (next_dummy_order): New variable.
2691 (g95_set_sym_referenced): New function.
2692 (check_done): New function.
2693 (g95_add_*): Use it.
2694 * trans-decl.c: Make formatting conform to GCC standards.
2695 (g95_defer_symbol_init): Add dummy variables in the right order.
2696 (g95_get_symbol_decl): Only accept referenced variables.
2697 (g95_create_module_variable): Module variables are always required.
2698 (generatr_local_decls): New function.
2699 (generate_local_vars): New function.
2700 (g95_generate_function_code): Use it.
2702 2003-02-13 Paul Brook <paul@nowt.org>
2704 * trans-decl.c (g95_conv_struct_cons): Remove.
2705 (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
2706 * trans-expr.c (g95_conv_structure): New function.
2707 (g95_conv_expr): Use it.
2709 2003-02-09 Paul Brook <paul@nowt.org>
2711 * trans-array.c (g95_array_init_size): Don't evaluate the linit
2712 expressions multiple times.
2713 (g95_trans_auto_arry_allocation): Use pointer not tmp.
2715 2003-02-08 Paul Brook <paul@nowt.org>
2717 * module.c (mio_symtree_ref): Declare as static.
2718 (mio_expr): Remove dead code.
2719 (read_module): Set the symtree link for fixups.
2720 * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
2721 (build_round_expr): ... to this.
2722 (g95_conv_intrinsic_aint): New function.
2723 (g95_conv_intrinsic_function): Use it.
2725 2003-02-08 Paul Brook <paul@nowt.org>
2727 * trans-array.c (g95_trans_array_constructor_value): Use the acutal
2728 offset after modificaton, not the increment expression.
2729 * dependency.c: Kill excess whitespace.
2731 2003-02-07 Sanjiv Gupta <sanjivg@noida.hcltech.com>
2733 * dependency.h: Remove some function declarations.
2734 * dependency.c (get_no_of_elements): Change this function not to
2736 * other: Add comments for all modified functions.
2738 2003-02-06 Paul Brook <paul@nowt.org>
2740 * g95spec.c (lang_specific_functions): Fix initializer warning.
2741 * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
2742 for structure type names.
2743 * trans-decl.c (g95_cons_structure_cons): New function.
2744 (g95_get_symbol_decl): Use it.
2745 * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
2748 2003-02-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2750 * resolve.c (compare_cases): Add const to casts.
2752 2003-01-30 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2754 * g95.h (g95_check_f): Change a1 to f1m.
2755 * intrinsic.c (add_sym_1m, check_specific,
2756 g95_intrinsic_func_interface): Use it.
2758 * module.c (init_pi_tree): Remove useless cast.
2759 (fp2): Fix argument type.
2761 * parse.c (parse_select_block): Add comment.
2763 2003-02-05 Toon Moene <toon@moene.indiv.nluug.nl>
2765 * lang-options.h: Fix warning involving C90 concatenated
2768 2003-02-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
2769 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2771 * io.c (format_asterisk): Complete initializer to kill warning.
2772 * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
2773 DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
2774 (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
2775 new defines to complete initializers. Kills all warnings.
2777 * Make-lang.in: Comment cleanup.
2779 2003-02-05 Paul Brook <paul@nowt.org>
2781 * array.c (g95_free_constructor): Handle NULL expressions.
2782 * resolve.c (resolve_structure_cons): Ditto.
2783 * decl.c (g95_match_null): New Function.
2784 (variable_decl): Use it.
2785 * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
2786 * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
2787 * trans-types.c (g95_set_decl_attributes): Remove empty function.
2789 2003-02-05 Paul Brook <paul@nowt.org>
2791 * trans.h (build1_v): New macro.
2792 (build_v): Remove pointless and incorrect prototype.
2793 * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
2794 * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
2796 2003-02-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
2798 * Make-lang.in (F95_OBJS): Remove one more dead file.
2800 2003-02-01 Paul Brook <paul@nowt.org>
2802 * lang-specs.h: Don't pass -ffixed-form to the linker.
2803 * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
2805 2003-02-01 Paul Brook <paul@nowt.org>
2807 * Make-lang.in (F95_OBJS): Remove dead files.
2808 * trans-array.c (g95_array_init_size): Do the right thing when
2810 * trans-decl.c (g95_generate_function_code): Initialize deffered
2811 symbol list before translating contained subroutines.
2812 * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
2813 scalar invariant values here...
2814 (g95_conv_variable, g95_conv_function_call): ... instead of here ...
2815 * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
2817 2003-01-29 Paul Brook <paul@nowt.org>
2819 * trans-array.c (g95_add_loop_code): Put pre code in the right block.
2820 (g95_walk_elemental_function_args): Reverse chains before adding.
2821 (g95_reverse_ss): Move about a bit.
2822 * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
2825 2003-01-28 Paul Brook <paul@nowt.org>
2827 * intrinsic.c (resolve_intrinsic): Use correct union member.
2828 * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
2830 * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
2831 use associated variables.
2832 * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
2833 * trans-expr.c (g95_conv_expr_present): ... to here.
2834 * trans.h: Declare it.
2835 * trans-types.c (g95_sym_type): Assume subroutine if not specified.
2837 2003-01-28 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2839 * array.c (expand_iterator): Suppress useless assignment.
2840 * decl.c (match_char_spec): Ditto.
2841 * io.c (match_io_iterator): Ditto.
2842 * primary.c (match_real_constant): Ditto.
2843 * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
2844 Ditto. Also, use g95_intrinsic_op not int for intrinsic operators.
2845 * matchexp.c (match_add_operand, match_level_5): Likewise.
2846 * module.c (parse_atom, find_enum): Likewise.
2847 * resolve.c: move #include <string.h>
2848 (resolve_select): Fix serious typo.
2850 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.n>
2852 * Make-lang.in: Don't build with broken tree-ssa-pre.
2854 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.nl>
2856 * resolve.c (resolve_index): Add a TODO.
2857 * symbol.c: Remove useless "#include <ctype.h>".
2859 2003-01-27 Paul Brook <paul@nowt.org>
2861 * check.c (check_rest): Allow different type kinds as an extension.
2862 * g95.h (g95_resolve_f): Add f1m.
2863 * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
2864 * intrinsic.h: Chenge prototypes for MIN and MAX.
2865 * iresolve.c (g95_resolve_minmax): New function.
2866 (g95_resolve_min, g95_resolve_max): Use it.
2867 * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
2869 (g95_conv_intrinsic_present): Fix logic.
2871 2003-01-27 Steven Bossche <s.bosscher@student.tudelft.nl>
2873 * g95.h (g95_case): Don't be a tree, be a double linked list.
2874 * match.c (match_case_selector): Remove redundant semantics check.
2875 Clean up a few goto's to make it a tiny little bit faster.
2876 * resolve.c (case_tree): Die.
2877 (compare_cases): Accept and compare unbounded cases too.
2878 (check_case_overlap): Don't build a tree. Instead, merge-sort the
2879 whole list of g95_cases passed from resolve_select.
2880 (sane_logical_select): Die.
2881 (check_case_expr): Return FAILURE if a CASE label is of the wrong
2883 (resolve_select): Fixup case expression for computed GOTOs, put it
2884 in expr, not expr2, for easier handing in the parse tree dumper and
2885 the code generator. Rewrite the rest of the function: Kill
2886 unreachable case labels and unreachable case blocks.
2887 * dump-parse-tree.c (g95_show_code_node): Always dump expr for
2888 an EXEC_SELECT, not case2 anymore.
2889 * trans-const.c (g95_conv_constant_to_tree): New function.
2890 (g95_conv_constant): Use it.
2891 * trans-const.h: Declare prototype for the new function.
2892 * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
2893 g95_trans_character_select): New static functions.
2894 (g95_trans_select): Rewrite.
2896 2003-01-26 Paul Brook <paul@nowt.org>
2898 * intrinsic.c (add_fnctions): Properly add dreal.
2899 * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
2900 (g95_conv_intrinsic_function): Use it.
2901 * trans-io.c (build_dt): Abort on internal files (unimplemented).
2903 2003-01-26 Paul Brook <paul@nowt.org>
2905 Widespread changes to the handling of symbols in expressions. These
2906 are now linked via g95_symtree nodes.
2907 * parse.c (g95_fixup_sibling symbols): New function.
2908 (parse_contained): Use it.
2909 * g95.h (symbol_attribute): Add contained. Indicates a symbol is a
2910 contained procedure that has bee correctly fixed up.
2911 (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
2913 2003-01-24 Paul Brook <paul@nowt.org>
2915 * trans-array.c (g95_walk_expr): Function result attributes are in
2917 * trans-expr.c (g95_conv_function_call,
2918 g95_trans_arrayfunc_assign): Ditto.
2919 * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
2921 2003-01-23 Steven Bosscher <s.bosscher@student.tudelft.nl>
2923 * expr.c (check_restricted): Fix error message.
2924 * symbol.c (free_st_labels): Plug memleak.
2926 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
2928 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
2929 reduce_binary_aa, reduce_binary, eval_intrinsic,
2930 eval_intrinsic_f2): Use typesafe prototypes for eval functions.
2931 * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
2932 for typesafe intrinsics helper functions.
2933 (g95_intrinsic_sym): Use them.
2934 * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
2935 add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
2936 add_sym_5, add_conv, resolve_intrinsic, do_simplify,
2937 check_specific, g95_intrinsic_func_interface,
2938 g95_intrinsic_sub_interface): Adjust all calls to intrinsics
2940 * trans-decl.c (g95_get_extern_function_decl): Likewise.
2941 * Make-lang.in: Don't disable warnings for strict prototypes
2942 any longer, everything is typesafe now.
2944 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
2946 * bbt.c (duplicate_node): Make static.
2947 * module.c (module_name): Make static.
2948 * scanner.c (include_dirs): Make static.
2950 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
2952 Hard coded _gfor_'s should not show up anymore.
2953 * g95.h (PREFIX): New macro.
2954 * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
2956 (g95_resolve_random_number): Likewise.
2957 * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
2958 * trans-io.c: Remove 'prefix' macro. Replace all uses with
2959 the new PREFIX macro from g95.h.
2961 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
2963 The troubles of forking... Andy implemented this just now too.
2964 Let's stick to that and keep the trees close.
2965 * g95.h (g95_st_label): 'format' member is now a g95_expr.
2966 * io.c: Revert previous changes.
2967 (g95_match_format): Match the format string as a character
2969 * match.h (g95_statement_label): Declare external.
2970 * parse.c: Revert previous changes.
2971 * symbol.c (g95_free_st_label): Free a g95_expr instead
2973 * trans-io.c: Revert previous changes.
2974 (build_dt): Use set_string to set the format string.
2976 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
2978 * io.c (format_string): Make non-static.
2979 (g95_match_format): Remember the format string.
2980 (terminate_io): Add I/O termination for empty I/O lists.
2981 * match.h: Declare external format_string.
2982 * parse.c (check_statement_label): Attack the format string
2983 to a format label for FORMAT statements.
2984 * trans-io.c (g95_add_field): Define prefix macro. Replace
2985 all uses of PREFIX define with a use of this macro.
2986 (build_dt): Implement formatted I/O for format labels.
2988 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
2990 * lang-options.h: Kill "-std=F".
2991 * options.c: Remove unimplemented "-std=F". Modify
2993 * misc.c (g95_terminal_width): New function.
2994 * error.c (g95_error_init_1): Use g95_terminal_width.
2995 * g95.h: Add prototype for g95_terminal_width, remove
2998 2003-01-19 Steven Bosscher <s.bosscher@student.tudelft.nl>
3000 * Make-lang.in: Fix typo.
3002 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
3004 * g95.h (struct g95_case): Remove unused cruft, new member
3005 'where' to keep track of the locus of the default case.
3006 * match.c (g95_match_case): Add locus to the current case.
3007 (match_case_selector): Likewise.
3008 * parse.c (parse_select_block): Move semantics check for
3009 multiple DEFAULT cases out of here to...
3010 * resolve.c (check_case_overlap): ...here. Return sooner
3012 (check_case_expr): Take two g95_cases now, use to sure the
3013 expression kinds are the same.
3014 (resolve_select): Cleanup.
3016 2003-01-18 Paul Brook <paul@nowt.org>
3018 * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
3019 * trans-decl.c (g95_set_symbol_decl): Handle non-array result
3021 (g95_get_extern_function_decl): Put decls in the correct context.
3023 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
3025 * trans-io.c: Port changes from Andy to set ERR flag.
3027 2003-01-17 Paul Brook <paul@nowt.org>
3029 * trans-array.c: Add various comments.
3030 (g95_ss_terminator): Declare as const.
3031 (g95_walk_expr): Remove first parameter and update all callers.
3032 (g95_walk_op_expr): Initialize scalar SS properly.
3033 * trans-array.h (g95_walk_expr): Update prototype.
3034 * trans-expr.c: Update for new g95_walk_expr.
3035 * trans-intrinsic.c: Ditto.
3036 * trans-io.c: Ditto.
3037 * trans.h: Various comments for SS chains.
3039 2003-01-17 Paul Brook <paul@nowt.org>
3041 * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
3043 * intrinsic.c (add_functions): Use them.
3044 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
3045 * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
3047 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
3049 Fallout of a small merge conflict:
3050 * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
3052 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
3054 * initrinsic.c: New add_sym_* functions for strong typing.
3055 (add_conv): Make prototype strict.
3056 * dump-parse-tree.c, dependency.c: Include config.h
3057 * resolve.c, trans-io.c: Fix typos.
3059 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
3061 * dump-parse-tree.c (g95_show_code_node): Show the
3062 condition for a computed GOTO that was transformed
3063 to a SELECT CASE construct.
3064 * resolve.c (check_case_overlap): Revert previous switch
3065 to treaps, it was too slow and didn't catch all trouble.
3066 (resolve_symbol): Be more flexible about module procedures.
3067 * symbol.c (check_conflict): Point to relevant section in
3068 the standard for dubious conflict. Allow procedure
3069 dummy arguments to be optional again.
3070 * trans-io (add_field): Rename to g95_add_field. Change
3072 * trans-stmt (trans_select): Handle unbounded cases for
3073 integer SELECT CASE constructs. Fix/add more comment.
3075 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
3077 * g95.h: Uses GCC's function attribute macros.
3078 * error.c, module.c, parse.c, g95.h: More function attributes.
3080 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
3082 * trans-decl.c (get_label_decl): Use TREE_LINENO instead
3083 of DECL_SOURCE_LINE, and TREE_FILENAME instead of
3086 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
3088 * f95-lang.c (pushdecl): Use TREE_LINENO instead of
3090 * trans.c (g95_trans_code): Use annotate_all_with_file_line
3091 instead of nowdead wrap_all_with_wfl.
3093 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
3095 * parse.c (g95_parse_file): In verbose mode, dump the parse tree
3096 before generating code, so we can still see it even if the code
3097 generation phase dies.
3099 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
3101 * decl.c (build_sym): Split out initialization expression parts...
3102 (add_init_expr_to_sym): ...to here.
3103 (variable_decl): Add the symbol following an attribute list to the
3104 symbol tree before parsing the optional initialization expression
3105 if the symbol is not of a derived type.
3106 * primary.c (g95_match_rvalue): Don't assume a symbol always has
3107 a value if it is a PARAMETER.
3109 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
3111 * misc.c: Don't #include <mcheck.h>
3112 * module.c: Ditto. Kill uses of mtrace, muntrace. If there
3113 ever was a glibc bug, then either this was never reported to
3114 glibc people, or it has been fixed for so long that there's
3115 no information you can find about it, anywhere.
3117 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
3120 * module.c (attr_bits, bt_types, array_spec_types):
3121 Switch 'const' and 'static'.
3122 * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
3124 GNU'ify source code:
3125 * trans-io.c: Numerous fixes, one fixed warning and a few
3126 TODO markers so that we don't forget about them.
3128 2003-01-13 Paul Brook <paul@nowt.org>
3130 * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
3131 * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
3133 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
3134 * match.c (g95_match_stop): Fix dumb == -> != error.
3136 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
3138 * dump-parse-tree.c (show_indent): Add line breaks. This
3139 whole dumping process needs cleanups.
3140 * f95-lang.c (g95_mark_addressable): Fix prototype to match
3141 the langhook. Fix 'return's accordingly.
3142 * g95-support.h: Adjust prototype.
3143 * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
3144 * lang-options.h: Add '-fsyntax-only'.
3145 * options.c (g95_init_options): Init 'no_backend'.
3146 (g95_parse_arg): Deal with '-fsyntax-only'.
3147 * parse.c (g95_parse_file): Do not generate code if 'no_backend'
3150 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
3152 * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
3153 arguments. Also make sure that if a symbol is marked INTRINSIC,
3154 an intrinsic with the symbol's name actually exists.
3155 (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
3156 Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
3157 ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
3159 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
3161 * resolve.c (resolve_contained_functions): Fix condition, don't
3162 throw internal_error if a child namespace has no name. Apparently
3163 this can be the case?
3165 2003-01-11 Paul Brook <paul@nowt.org>
3167 Port changes from Andy's tree:
3168 * g95.h (g95_code): Add stop_code.
3169 * match.c (g95_match_stop): Detter syntax checking.
3170 * resolve.c (resolve_generic_f0): Return match type.
3171 (resolve_generic_f): Remove dead/duplicated code.
3172 (resolve_specific_f): Ditto.
3173 * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
3174 * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
3175 * trans-stmt.c (g95_trans_stop): Handle new STOP format.
3177 2003-01-11 Paul Brook <paul@nowt.org>
3179 * trans-array.c: Various documentation/comment changes.
3180 * trans-stmt.c: Ditto.
3183 2003-01-10 Paul Brook <paul@nowt.org>
3185 * options.c/h: Add -fdump-parse-tree as alias of -v.
3187 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3189 * dump-parse-tree.c (g95_show_namespace): Fixed another
3190 typo. Sorry, it's Friday...
3192 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3195 * trans-array.c, trans-array.h, trans.c, trans-const.c,
3196 trans-const.h, trans-decl.c, trans-expr.c, trans.h
3197 trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
3198 trans-types.c: Fix bogus copyright years, add 2003.
3199 * trans-types.h: Give copyright header.
3201 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3203 * dump-parse-tree.c (g95_show_namespace): Fixed typo.
3204 * expr.c, options.c, scanner.c: Add some more 'const' markers.
3205 * intrinsic.c: Some constant strings moved to read-only memory.
3206 * io.c (format_asterisk): Move to...
3209 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3211 * dump-parse-tree.c (g95_show_namespace): Dump implicit
3212 types for ranges instead of per-letter. Indent the
3213 'CONTAINS' just like everything else.
3214 * resolve.c (resolve_contained_functions): Clarify comment.
3215 Explain non-obvious conditional expression. Improve
3216 diagnostics if tyoe cannot be resolved.
3217 Port semi-fix from Andy's tree:
3218 (was_declared): Move up before first use.
3219 (generic_sym, specific_sym): New functions. Code moved
3220 out if procedure_kind.
3221 (procedure_kind): Simplify using new functions.
3222 (resolve_generic_f): Make sure the functions we find in
3223 a parent namespace is generic.
3224 (resolve_specific_f): Ditto for specific functions.
3226 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3228 * trans-stmt.c, trans.c: Fix some code style issues. Add
3229 some more comment (but still not enough!).
3231 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3233 * symbol.c (flavors, procedures, intents, acces_types,
3234 access_types, ifsrc_types): Make const.
3235 * misc.c (g95_string2code): Make 'm' param 'const'.
3236 * module.c (find_enum, write_atom, mio_name): Make
3238 (attr_bits, bt_types, array_spec_types, array_ref_types,
3239 ref_types, expr_types): Make const.
3240 * g95.h: Adjust external decls.
3242 2003-01-09 Paul Brook <paul@nowt.org>
3244 * Testsuite: Add a load of new cases.
3246 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
3248 * Make-file.in: Add dependency on back end header files;
3249 a parallel build should work now.
3250 * f95-lang-c (lang_identifier): Remove bogus comment.
3251 (g95_be_parse_file): Fix prototype.
3252 (g95_init): Make static.
3253 (g95_finish): Make static.
3254 * error.c (g95_syntax_error): Kill. Make define in...
3255 * g95.h (g95_syntax_error): Define.
3256 (g95.options): Make 'source' member 'const'.
3257 * interface.c (g95_match_interface): Explain
3258 hard-to-read condition.
3259 (g95_match_end_interface): Ditto.
3260 * trans_const.c (g95_build_string_const): Make 's' parameter
3262 * trans_const.h: Adjust protoype accordingly.
3263 * trans-decl.c: Include tree-dump.h
3264 (g95_generate_function_code): Build fixes for recent changes
3265 in the tree-ssa branch.
3267 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
3269 * format.c: Kill, move code from here...
3271 * Make-lang.in: Adjust.
3274 * BUGS: Mention where to submit bugs. Move old content...
3275 * TODO: ...to here. New file.
3277 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
3278 Fix most warnings, and suppress the ones we can't fix for now.
3279 * Make-lang.in: Suppress warnings about bad proto's in g95.h,
3280 these warnings just clutter the screen and there's not much
3281 we can do about them for now anyway.
3282 * check.c, iresolve.c: Mark unused function parameters.
3283 * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
3284 they should be resolved before they get here.
3285 * error.c: Remove unused FILE *status_out.
3286 * f95-lang.c (g95_init): Remove bogus cast.
3287 * Many files: Make things 'const' where required.
3288 * g95.h: Fix prototypes for all modified functions above.
3289 (g95_options): Remove 'object' member.
3291 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
3293 * Make-file.in: Cleanup bogus targets. Add more comment.
3294 * lang-options.h: New option '-w'.
3295 * g95.h: add no_options field to struct g95_options.
3296 * options.c (g95_init_options): Default no_warnings to off.
3297 (g95_parse_arg): Recognise the '-w' switch and its alias,
3299 * error.c (g95_warning, g95_warning_now): Don't emit warning if
3300 no_warning option is set.
3301 * iresolve.c (g95_resolve_shape): Fix warning.
3303 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
3305 * primary.c (g95_next_string_char): Rename next_string_char, and
3306 make static. Adjust callers accordingly.
3307 * resolve.c (resolve_generic_f0): Return try, not match. Adjust
3308 callers accordingly.
3309 * g95.h: Split out all g95_match* functions to...
3310 * match.h: ...here. New file.
3311 * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
3312 matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
3314 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
3316 * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
3317 g95_merge_new_implicit): New functions.
3318 (g95_match_implicit_none, g95_match_implicit): Move from here...
3319 * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
3320 Modify to use the new functions in symbol.c.
3321 * g95.h: Add and move prototypes.
3323 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
3325 * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
3326 node compare function.
3327 (g95_insert_bbt): Likewise.
3328 (g95_insert_bbt_with_overlap): Likewise.
3329 (g95_delete_bbt): Likewise.
3330 (delete_treap): Likewise. Also fix a potential bug when calling it.
3331 * module.c (compare_pointers): Change proto to compare_fn.
3332 (compare_integers): Likewise.
3333 (compare_true_names): Likewise.
3334 (find_true_name): Adjust call to compare_true_names to match proto.
3335 (require_atom, write_atom, mio_name): Fix 'const' warnings.
3336 (init_pi_tree): Make compare a compare_fn instead of (int *).
3337 * resolve.c (compare_cases): Change proto to compare_fn.
3338 * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
3339 it static, and rename to compare_symtree.
3340 (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
3342 * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
3343 of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
3345 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
3346 * Make-lang.in: Fix spaces/tabs issues from previous patch.
3347 * patch.options: Blow away Paul's checkin mistake :-)
3348 * io.c (terminate_io): Fix memory leak (Arnaud).
3350 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
3352 * Make-lang.in: Teach about building DVI, info manual.
3353 * g95.texi: New file.
3355 2003-01-02 Paul Brook <paul@nowt.org>
3357 * trans-array.c (g95_reverse_ss): Make static and don't use.
3358 (g95_conv_ss_descriptor): Don't use g95_loopinfo
3359 (g95_conv_array_parameters): Modify for pointer assignments.
3360 (g95_walk_subexpr): New function.
3361 (g95_walk_expr*): Use it.
3362 * trans-array.h (g95_reverse_ss): Remove prototype.
3363 * trans-expr.c (g95_trans_pointer_assign): Implement.
3364 (Many): Set se.want_pointer before calling g95_conv_array_parameter.
3365 * trans-intrinsic.c: Sync with scalarizer changes.
3366 * trans-io.c: Ditto.
3368 2002-12-29 Paul Brook <paul@nowt.org>
3370 * trans-array.c: Document calling convention for arrays.
3372 2002-12-19 Paul Brook <paul@nowt.org>
3374 * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
3375 assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
3376 optional parameters for some intrinsics.
3377 (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
3378 * trans-expr.c (g95_conv_function_call): Pass NULL for absent
3379 optional parameters.
3380 * trans.h (g95_se): Add ignore_optional flag.
3382 2002-12-15 Paul Brook <paul@nowt.org>
3384 * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
3385 * trans-decl.c (g95_generate_function_code): Use TDI_original.
3387 2002-12-14 Paul Brook <paul@nowt.org>
3389 * trans-stmt.c (g95_trans_call): Use resolved symbol name.
3391 2002-12-12 Paul Brook <paul@nowt.org>
3393 * trans-array.c (g95_trans_array_constructor_subarray): Fully
3394 initialize the scalarizer.
3395 (various): Update to new format of g95_expr->value.constructor.
3397 2002-12-08 Paul Brook <paul@nowt.org>
3399 * trans-array.c (g95_put_offset_into_var): New function.
3400 (g95_trans_array_constructor_subarray): New function.
3401 (g95_trans_array_constructor_value): Use it.
3402 (g95_array_cons_size): Don't abort() on array components.
3404 2002-12-08 Paul Brook <paul@nowt.org>
3406 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
3407 * support.c: Update #includes.
3408 (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
3409 * trans-array.c: Update #includes.
3411 * trans-const.c: Ditto.
3412 * trans-io.c: Ditto.
3413 * trans-types.c: Ditto.
3414 (g95_init_types): Set size_type_node.
3415 * trans-decl.c: Update #includes.
3416 (gfor_fndecl_adjust{l,r}): Declare and initialize.
3417 * trans-stmt.c: Update #includes.
3418 (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
3419 (g95_trans_select): Fix check for unbounded ranges.
3420 * trans-expr.c: Update #includes.
3421 (g95_conv_string_tmp): New function.
3422 (g95_conv_concat_op): Use it.
3423 * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
3424 * Trans-intrisic.c: Update #includes.
3425 (g95_conv_intrinsic_strcmp): New function.
3426 (g95_conv_intrinsic_adjust): Ditto.
3427 (g95_conv_intrinsic_function: Use them.
3429 2002-11-30 Paul Brook <paul@nowt.org>
3431 * trans-array.c (g95_walk_function_expr): Handle non-array return by
3433 * trans-dec.c (g95_build_function_decl): Handle character return
3435 (g95_get_fake_result_decl): Ditto.
3436 (g95_trans_deferred_vars): Ditto.
3437 * trans-expr.c (g95_conv_function_call): Ditto.
3438 (g95_trans_arrayfunc_assign) Limit to array valued functions.
3439 * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
3440 (g95_conv_intrinsic_function): Use it.
3441 * trans-types.c (g95_sym_type): Handle functions returning strings.
3442 (g95_return_by_reference): Ditto.
3443 (g95_get_function_type): Ditto.
3445 2002-11-18 Paul Brook <paul@nowt.org>
3447 * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
3448 requires a temporary.
3449 (g95_trans_select): Handle computed gotos.
3450 * trans-types.c (g95_build_array_type): Warn about non-functional
3451 assumed shape arrays.
3452 * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
3454 * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
3455 (g95_conv_intrinsic_int): New function.
3456 (g95_conv_intrinsic_mod): New function.
3457 (g95_conv_intrinsic_ichar): New function.
3458 (g95_conv_intrinsic_function): Use them.
3459 (g95_conv_intrinsic_dim): Use g95_evaluate_now.
3461 2002-11-17 Toon Moene <toon@moene.indiv.nluug.nl>
3463 * trans-types.c (g95_build_array_type): Assumed
3464 sized arrays can have rank > 1.
3465 * trans.c (g95_trans_code): Remove erroneous
3466 warning about CONTINUE.
3467 * trans-expr.c (g95_conv_variable): Remove
3470 2002-11-15 Paul Brook <paul@nowt.org>
3472 * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
3474 2002-10-31 Paul Brook <paul@nowt.org>
3476 * f95-tree.c: Remove tree copying stuff that's now in gimple.c
3477 * trans-expr.c (g95_conv_component_ref): Handle character string
3479 (g95_conv_string_parameter): Ditto.
3480 * trans-types.c (g95_get_derived_type): Add length decl to caracter
3483 2002-10-10 Paul Brook <paul@nowt.org>
3485 * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
3486 * trans-expr.c (g95_conv_function_call): Remove unreliable return value
3488 * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
3489 (g95_conv_intrinsic_function): Handle size and shape intrinsics.
3490 (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
3491 * trans-types.c (pvoid_type_node): Declare and initialize.
3492 * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
3493 (g95_array_allocate): Fix when base==data.
3494 (g95_conv_array_parameter): Correctly handle reduced rank sections.
3495 * trans-io.c (g95_trans_write): Correctly handle string modifiers.
3497 2002-10-09 Paul Brook <paul@nowt.org>
3499 * (g95_conv_expr_reference): Handle character strings correctly.
3501 2002-10-07 Paul Brook <paul@nowt.org>
3503 (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
3505 * trans-array.c (g95_build_array_initializer): Remove.
3506 (g95_conv_array_initializer): New Function.
3507 (g95_trans_auto_arry_allocation): Cleanup.
3508 (g95_trans_init_character_array): Remove.
3509 * g95spec.c: Link in libgforbegin.
3510 * trans.c (g95_generate_code): Rename main function to MAIN__.
3511 (g95_create_var): New function.
3512 (g95_create_var_np): New function.
3513 (g95_evaluate_now): New function.
3514 (g95_start_block): New function.
3515 (g95_finish_block): New function.
3516 (g95_add_expr_to_block): New function.
3517 (g95_add_block_to_block): New function.
3518 * trans-expr.c (g95_conv_componen_ref): New function.
3519 * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
3520 (F95_OBJS): Add dependency.o.
3521 * f95-lang.c (g95_is_simple_stmt): Remove.
3522 * f95-tree.c (mark_not_simple): New function.
3523 (unshare_all_trees): New function.
3524 (create_tmp_var, create_tmp_alias_var): Remove.
3525 * support.c (declare_tmp_vars, tree_last_decl): Remove.
3526 * trans*: Convert to new IR using GENERIC trees. Don't bother about
3527 SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
3529 2002-10-01 Paul Brook <paul@nowt.org>
3531 * trans-array.c: Add support for descriptorless arrays.
3532 (g95_conv_array_data): New function.
3533 (g95_conv_array_base): New function.
3534 * trans-array.h: Declare these here.
3535 * trans-decl.c(g95_create_mopdule_variable): Perform variable
3536 initialization and creation here.
3537 (g95_create_module_vars): Instead of here.
3538 * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
3539 * trans-intrinsic.c: Ditto.
3540 * trans-types.c (g95_is_nodesc_array): New function.
3541 (g95_get_nodesc_array_type): New function.
3542 (g95_sym_type, g95_get_derived_type): Use them.
3543 * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
3545 2002-09-28 Paul Brook <paul@nowt.org>
3547 * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
3548 * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
3551 2002-09-24 Paul Brook <paul@nowt.org>
3553 * f95-lang.c (listify): Remove declaration.
3554 (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
3556 * f95-tree.c (get_name): New function.
3557 * trans.c (module_namespace): Remove.
3558 * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
3559 * trans-types.c: Ditto.
3561 2002-09-19 Paul Brook <paul@nowt.org>
3563 * trans-array.c (g95_get_array_cons_size): New Function.
3564 (g95_con_ss_startstride): Handle Array constructors.
3565 (g95_conv_loop_setup): Ditto.
3566 (g95_conv_array_parameter): Ditto.
3567 * tras-decl.c (g95_finish_var_decl): Make initializes variables
3570 2002-09-19 Paul Brook <paul@nowt.org>
3572 * trans.c (g95_simple_fold_tmp): Detect variables inside
3574 * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
3576 2002-09-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
3578 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
3580 2002-09-14 Paul Brook <paul@nowt.org>
3582 * trans.c (g95_create_module_variable): Move to trans-decl.c.
3583 * trans-const.c (g95_conv_string_init): New Function.
3584 * trans-const.h: Declare it.
3585 * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
3586 variables. Don't bail on intrinsic symbols.
3587 (get_extern_function_decl): Handle specific intrinsic functions.
3588 * trans-types.c (g95_sym_type): Dummy functions don't return
3590 * trans-array.c (g95_build_array_initializer): New Function.
3591 (g95_trans_auto_array_allocation): Build initializer for static decls.
3592 Don't use mpz_addmul, it's GMP4 only.
3594 2002-09-12 Paul Brook <paul@nowt.org>
3596 * trans-decl.c (g95_generate_code): Fix thinko with return variable.
3597 (g95_get_extern_function_decl, g95_build_function_decl): Mangle
3598 assembler names for module procedures.
3600 2002-09-11 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
3602 * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
3605 2002-09-10 Paul Brook <paul@nowt.org>
3607 * trans-array.c: Change format of G95_SS_TEMP strictures.
3608 (g95_check_fncall_dependancy): New function.
3609 (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
3611 * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
3613 (g95_build_function_decl): Don't assume result arrays are packed.
3614 (g95_trans-deferred-vars): Handle array result variables.
3615 (g95_generate_fuction_code): Clear saved_function_decls.
3616 * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
3618 (g95_trans_arrayfunc_assign): New function.
3619 (g95_trans_assignment): Use it.
3620 * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
3621 (g95_se): Add direct_byref.
3622 * trans-types.c: Use sym->result rather than sym where appropriate.
3623 * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
3624 Update other functions to use this.
3625 (g95_is_intrinsic_libcall): New function.
3626 (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
3627 (g95_walk_intrinsic_function): Ditto.
3629 2002-09-08 Paul Brook <paul@nowt.org>
3631 * trans-types.c: Change rank field to dtype field in array descriptor.
3632 * trans-array.c: Implement filling of dtype array descriptor field.
3633 * trans-intrinsic.c: Fix broken LEN intrinsic.
3635 2002-09-07 Paul Brook <paul@nowt.org>
3637 * trans-intrinsic.c: Remove outdated todo intrinsic list.
3638 (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
3639 (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
3641 2002-09-06 Paul Brook <paul@nowt.org>
3643 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
3644 (gt-f95-trans-types.h): Add dependancy information.
3645 * config-lang.in (gtfiles): Add trans-types.c
3646 * f95-lang.c (g95_be_parse_file): Pass error and warning counts
3647 back to top-level code.
3648 * trans-array.c, trans-types.c: Change format of array descriptor.
3649 (g95_conv_descriptor_dimension): New function.
3650 * trans-types.h (g95_conv_descriptor_rank): define.
3651 * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
3654 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
3656 * trans-array.c, trans-types.c: Add rank information to descriptor.
3658 2002-09-06 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
3660 * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
3662 2002-09-04 Paul Brook <paul@nowt.org>
3664 * f95-lang.c (g95_create_decls): New function.
3665 (g95_init): Move initialization of external decls to above, and call
3666 from g95_be_parse_file.
3667 * trans.c (g95_finish_stmt): Don't amputate the decl chain.
3668 * trans-types.c (g95_init_types): Always name integer and char types.
3669 (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
3671 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
3673 * Make-lang.in: Add options.c to F95_PARSER_OBJS
3675 2002-09-02 Paul Brook <paul@nowt.org>
3677 * g95_generate_code: Clear the attr for __fortran_main.
3678 * trans-types.c (g95_finish_type): New function.
3679 * g95_init_io_state_type: Use g95_finish_type.
3680 * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
3682 2002-09-01 Paul Brook <paul@nowt.org>
3684 * README.backend: Warn about the dangers of extra config.h files.
3685 Remove obsolete libgfor stuff.
3686 * config-lang.in: Add target-libgfor dependancy.
3687 * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
3689 2002-09-01 Toon Moene <toon@moene.indiv.nluug.nl>
3691 * g95_conv_mpz_to_tree: Free storage pointed to by q,
3694 2002-08-30 Paul Brook <paul@nowt.org>
3696 * trans-intrinsic.c (g95_conv_intrinsic_function,
3697 g95_walk_intrinsic_function): Added ANY and ALL.
3698 (g95_conv_intrinsic_anyall): New function.
3699 * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in