1 2005-06-25 Jakub Jelinek <jakub@redhat.com>
3 * trans-stmt.c (gfc_trans_forall_1): Prefer to use smaller logical
4 type than boolean_type_node.
6 2005-06-25 Kelley Cook <kcook@gcc.gnu.org>
8 * all files: Update FSF address in copyright headers.
10 2005-06-24 Jerry DeLisle <jvdelisle@verizon.net>
13 * gfortran.h: Add symbols for new intrinsic functions.
14 * intrinsic.c: Add new functions acosh, asinh, and atanh.
15 * intrinsic.h: Add prototypes for the new functions.
16 * iresolve.c (gfc_resolve_acosh): New function.
17 (gfc_resolve_asinh): New function.
18 (gfc_resolve_atanh): New function.
19 * mathbuiltins.def: Add defines.
20 * simplify.c (gfc_simplify_acosh): New function.
21 (gfc_simplify_asinh): New function.
22 (gfc_simplify_atanh): New function.
24 2005-06-24 Feng Wang <fengwang@nudt.edu.cn>
26 * simplify.c (gfc_simplify_modulo): Don't clear before get result.
28 2005-06-22 Paul Brook <paul@codesourcery.com>
31 * symbol.c (gfc_is_var_automatic): New function.
32 (save_symbol): Use it.
34 2005-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
35 Paul Thomas <pault@gcc.gnu.org>
39 * module.c (mio_namelist): New function. Correct to set
40 namelist_tail and to give error on renaming namelist by use
42 (mio_symbol): Call mio_namelist.
44 2005-06-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
46 * gfortran.h: Add flag_backslash compile-time option.
47 * lang.opt: Add support for -fbackslash option.
48 * options.c: Likewise.
49 * primary.c: Implement behavior for -fno-backslash.
50 * invoke.texi: Add doc for -fbackslash option.
51 * gfortran.texi: Remove mention of -fno-backslash as a
54 2005-06-20 Steven G. Kargl <kargls@comcast.net>
58 * match.c (gfc_match_label): Detect duplicate labels.
61 2005-06-20 Erik Edelmann <erik.edelmann@iki.fi>
63 * intrinsic.c (check_intrinsic_standard): Fix spelling error
66 2005-06-18 Erik Edelman <eedelman@acclab.helsinki.fi>
67 Steven G. Kargl <kargls@comast.net>
70 * primary.c (gfc_match_rvalue): expr_type can be EXPR_CONSTANT
71 for an array; check that sym->as is NULL.
74 2005-06-18 Steven G. Kargl <kargls@comcast.net>
76 * intrinsic.c (gfc_intrinsic_func_interface): Enable errors for generic
77 functions whose simplification routine return FAILURE.
79 2005-06-13 Geoffrey Keating <geoffk@apple.com>
81 * Make-lang.in (fortran.install-man): Doesn't depend on installdirs.
82 (rule for installing f95.1 manpage): Does depend on installdirs.
84 2005-06-13 Jakub Jelinek <jakub@redhat.com>
87 * trans-stmt.c (gfc_trans_forall_loop): Only increment maskindex
88 in the innermost loop.
90 * trans-expr.c (gfc_conv_function_call): Return int instead of
91 void. Use a local variable for has_alternate_specifier and
92 return it. Avoid modification of function type's return value
93 in place, since it may be shared.
94 * trans.h (has_alternate_specifier): Remove.
95 (gfc_conv_function_call): Change return type.
96 * trans-stmt.c (has_alternate_specifier): Remove.
97 (gfc_trans_call): Add a local has_alternate_specifier variable,
98 set it from gfc_conv_function_call return value.
100 2005-06-12 Richard Henderson <rth@redhat.com>
102 * trans-array.c (gfc_conv_descriptor_data_get): Rename from
103 gfc_conv_descriptor_data. Cast the result to the DATAPTR type.
104 (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): New.
105 (gfc_trans_allocate_array_storage): Use them.
106 (gfc_array_allocate, gfc_array_deallocate): Likewise.
107 (gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor): Likewise.
108 (gfc_trans_deferred_array): Likewise.
109 * trans-expr.c (gfc_conv_function_call): Likewise.
110 (gfc_trans_subcomponent_assign): Likewise.
111 (gfc_trans_pointer_assignment): Likewise.
112 * trans-intrinsic.c (gfc_conv_allocated): Likewise.
113 * trans-types.c (gfc_array_descriptor_base): New.
114 (gfc_get_element_type): Use GFC_TYPE_ARRAY_DATAPTR_TYPE.
115 (gfc_get_array_descriptor_base): Break out from ...
116 (gfc_get_array_type_bounds): ... here. Create type variants.
117 * trans-array.h (gfc_conv_descriptor_data_get): Declare.
118 (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): Declare.
120 2005-06-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
122 * trans-expr.c (gfc_conv_variable): POINTER results don't need f2c
123 calling conventions. Look at sym instead of sym->result.
124 * trans-types.c (gfc_sym_type): Remove workaround for frontend bug.
125 Remove condition which is always false with workaround removed.
126 (gfc_return_by_reference): Always look at sym, never at sym->result.
128 2005-06-11 Steven G. Kargl <kargls@comcast.net>
132 * trans-array.c (gfc_array_deallocate): pstat is new argument
133 (gfc_array_allocate): update gfc_array_deallocate() call.
134 (gfc_trans_deferred_array): ditto.
135 * trans-array.h: update gfc_array_deallocate() prototype.
136 * trans-decl.c (gfc_build_builtin_function_decls): update declaration
137 * trans-stmt.c (gfc_trans_deallocate): Implement STAT= feature.
139 2005-06-07 Jerry DeLisle <jvdelisle@verizon.net>
141 * intrinsic.texi: Add documentation for dcmplx, digits,
142 dim, idim, ddim, dot_product, dprod, dreal, and dtime.
144 2005-06-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
147 * trans-array.c (gfc_trans_array_constructor_value): Slightly reorder.
148 Generate correct exit condition in case of negative steps in
151 * invoke.texi: Fix description of flags required for compatibility
154 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
155 Erik Schnetter <schnetter@aei.mpg.de>
158 * trans.c (gfc_get_backend_locus): Remove unnecessary adjustment,
159 remove FIXME comment.
161 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
163 * match.c (match_forall_iterator): Don't immediately give error if '='
164 is not followed by an expression.
166 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
167 Erik Edelmann <erik.edelmann@iki.fi>
169 * array.c (gfc_match_array_constructor): Disallow empty array
172 2005-06-03 Jerry DeLisle <jvdelisle@verizon.net>
174 * fortran/intrinsic.texi: Add documentation for
175 command_argument_count, conjg, dconjg, count,
176 cpu_time, cshift, date_and_time, dble, dfloat.
178 2005-06-01 Roger Sayle <roger@eyesopen.com>
180 * intrinsic.c (add_conv): No longer take a "simplify" argument as
181 its always gfc_convert_constant, instead take a "standard" argument.
182 (add_conversions): Change all existing calls of add_conv to pass
183 GFC_STD_F77 as appropriate. Additionally, if we're allowing GNU
184 extensions support integer-logical and logical-integer conversions.
185 (gfc_convert_type_warn): Warn about use the use of these conversions
186 as a extension when appropriate, i.e. with -pedantic.
187 * simplify.c (gfc_convert_constant): Add support for integer to
188 logical and logical to integer conversions, using gfc_int2log and
190 * arith.c (gfc_log2int, gfc_int2log): New functions.
191 * arith.h (gfc_log2int, gfc_int2log): Prototype here.
192 * gfortran.texi: Document this new GNU extension.
194 2005-06-01 Paul Thomas <pault@gcc.gnu.org>
196 * fortran/trans-expr.c (gfc_conv_variable): Clean up bracketting.
197 * fortran/trans-expr.c (gfc_conv_function_call): Insert spaces.
198 Correct comments and replace convert of integer_one_node with
201 2005-06-01 Jakub Jelinek <jakub@redhat.com>
204 * resolve.c (resolve_contained_fntype): Use sym->attr.untyped
205 to avoid giving error multiple times.
206 (resolve_entries): Don't error about BT_UNKNOWN here.
207 (resolve_unknown_f): Capitalize IMPLICIT for consistency.
208 (resolve_fntype): New function.
209 (gfc_resolve): Call resolve_fntype.
211 2005-06-01 Feng Wang <fengwang@nudt.edu.cn>
214 * fortran/io.c (resolve_tag): Fix error message.
216 2005-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
218 * fortran/trans-decl.c: Don't include errors.h.
219 * fortran/Make-lang.in: Updates dependencies.
221 2005-05-31 Paul Thomas <pault@gcc.gnu.org>
226 * fortran/trans-array.c (gfc_conv_expr_descriptor): Obtain the
227 string length from the expression typespec character length value
228 and set temp_ss->stringlength and backend_decl. Obtain the
229 tree expression from gfc_conv_expr rather than gfc_conv_expr_val.
230 Dereference the expression to obtain the character.
231 * fortran/trans-expr.c (gfc_conv_component_ref): Remove the
232 dereference of scalar character pointer structure components.
233 * fortran/trans-expr.c (gfc_trans_subarray_assign): Obtain the
234 string length for the structure component from the component
237 2005-05-30 Roger Sayle <roger@eyesopen.com>
239 * gfortran.h (GFC_STD_LEGACY): New "standard" macro. Reindent.
240 * options.c (gfc_init_options): By default, allow legacy extensions
242 (gfc_post_options): Make -pedantic warn about legacy extensions
243 even with -std=legacy.
244 (gfc_handle_option): Make -std=gnu follow the default behaviour
245 of warning about legacy extensions, but allowing them. Make the
246 new -std=legacy accept everything and warn about nothing.
247 * lang.opt (std=legacy): New F95 command line option.
248 * invoke.texi: Document both -std=f2003 and -std=legacy.
249 * gfortran.texi: Explain the two types of extensions and document
250 how they are affected by the various -std= command line options.
252 2005-05-30 Kazu Hirata <kazu@cs.umass.edu>
254 * trans-expr.c: Remove trailing ^M.
256 * trans-expr.c: Fix comment typos.
258 2005-05-29 Paul Thomas <pault@gcc.gnu.org>
266 * fortran/trans-array.c (gfc_conv_resolve_dependencies): Add string
267 length to temp_ss for character pointer array assignments.
268 * fortran/trans-expr.c (gfc_conv_variable): Correct errors in
269 dereferencing of characters and character pointers.
270 * fortran/trans-expr.c (gfc_conv_function_call): Provide string
271 length as return argument for various kinds of handling of return.
272 Return a char[]* temporary for character pointer functions and
273 dereference the temporary upon return.
275 2005-05-29 Janne Blomqvist <jblomqvi@vipunen.hut.fi>
276 Steven G. Kargl <kargls@comcast.net>
279 * io.c (gfc_match_inquire): Implement constraints on UNIT and FILE usage.
281 2005-05-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
284 * io.c (format_item_1): Add check and extension warning for
287 2005-05-28 Steven G. Kargl <kargls@comcast.net>
289 * arith.c (gfc_arith_init_1): Fix off by one problem;
290 (gfc_check_integer_range): Chop extra bits in subnormal numbers.
292 2005-05-28 Jerry DeLisle <jvdelisle@verizon.net>
293 Steven G. Kargl <kargls@comcast.net>
295 * intrinsic.texi: added documentation for BIT_SIZE, BTEST, CHAR, CEILING
298 2005-05-27 Steven G. Kargl <kargls@comcast.net>
300 * trans-array.c (gfc_trans_deferred_array): Use build_int_cst to force
301 like types in comparsion.
303 2005-05-26 Kazu Hirata <kazu@cs.umass.edu>
305 * data.c, parse.c, trans-array.c, trans-decl.c,
306 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
307 trans.h: Fix comment typos. Follow spelling conventions.
309 2005-05-22 Roger Sayle <roger@eyesopen.com>
311 * gfortran.texi: Document some more GNU extensions.
313 2005-05-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
315 * error.c (gfc_warning): Fix typo in comment.
317 2005-05-18 Thomas Koenig <Thomas.Koenig@online.de>
320 * fortran/iresolve.c (gfc_resolve_reshape): Add
321 gfc_type_letter (BT_COMPLEX) for complex to
322 to resolved function name.
324 2005-05-18 Erik Edelmann <erik.edelmann@iki.fi>
326 * array.c (gfc_match_array_constructor): Support [ ... ]
327 style array constructors.
329 2005-05-18 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
331 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_TRUNC
332 and BUILT_IN_TRUNCF instead of BUILT_IN_FLOOR and BUILT_IN_FLOORF.
333 * trans-intrinsic.c (build_fix_expr): Change 'op' argument
334 to correct enum type.
335 (gfc_conv_intrinsic_aint): Likewise. Clarify comment in front of
336 function. Add default case to switch, deal with FIX_TRUNC_EXPR
337 instead of FIX_FLOOR_EXPR.
339 2005-05-18 Feng Wang <fengwang@nudt.edu.cn>
342 * trans-const.c (gfc_conv_const_charlen): Use gfc_charlen_type_node to
343 build character length.
345 2005-05-17 Zdenek Dvorak <dvorakz@suse.cz>
347 * trans-types.c (gfc_array_range_type): New variable.
348 (gfc_init_types): Initialize gfc_array_range_type.
349 (gfc_get_array_type_bounds): Use gfc_array_range_type.
351 2005-05-17 Jakub Jelinek <jakub@redhat.com>
354 * trans-stmt.c (generate_loop_for_temp_to_lhs): Remove SIZE and COUNT2
355 arguments. If LSS is gfc_ss_terminator, increment COUNT1 by 1, instead
356 of incrementing COUNT2 and using COUNT1+COUNT2 increment COUNT1 and use
358 (generate_loop_for_rhs_to_temp): Likewise.
359 (compute_overall_iter_number): Add INNER_SIZE_BODY argument.
360 It non-NULL, add it to body.
361 (allocate_temp_for_forall_nest_1): New function, split from
362 allocate_temp_for_forall_nest.
363 (allocate_temp_for_forall_nest): Add INNER_SIZE_BODY argument,
364 propagate it down to compute_overall_iter_number. Use
365 allocate_temp_for_forall_nest_1.
366 (gfc_trans_assign_need_temp): Remove COUNT2. Call
367 compute_inner_temp_size into a new stmtblock_t. Adjust calls to
368 allocate_temp_for_forall_nest, generate_loop_for_rhs_to_temp
369 and generate_loop_for_temp_to_lhs.
370 (gfc_trans_pointer_assign_need_temp): Adjust calls to
371 allocate_temp_for_forall_nest.
372 (gfc_evaluate_where_mask): Call compute_inner_temp_size into a new
373 stmtblock_t. Call compute_overall_iter_number just once, then
374 allocate_temp_for_forall_nest_1 twice with the same size.
375 Initialize mask indexes if nested_forall_info != NULL.
376 (gfc_trans_where_2): Initialize mask indexes before calling
377 gfc_trans_nested_forall_loop.
379 2005-05-15 Feng Wang <fengwang@nudt.edu.cn>
380 Jerry DeLisle <jvdelisle@verizon.net>
383 * trans-stmt.c (gfc_trans_label_assign): fix pointer type, to
384 resolve ICE on assign of format label.
385 * trans-io.c (set_string): add fold-convert to properly
386 handle assigned format label in write.
388 2005-05-13 Paul Brook <paul@codesourcery.com>
390 * trans-stmt.c (gfc_trans_forall_1): Fix comment typo.
392 2005-05-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
394 * trans-types.c (gfc_is_nodesc_array): Remove redundant check.
396 2005-05-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
399 * io.c (check_format): Look for literal characters inside
402 2005-05-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
404 * resolve.c (resolve_symbol): Copy 'pointer' and 'dimension'
405 attribute from result symbol to function symbol.
406 * trans-expr.c (gfc_conv_function_call): Look at sym->attr.dimension
407 instead of sym->result->attr.dimension.
409 2005-05-10 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
412 * gfortran.h (gfc_option): Add flag_f2c.
413 * invoke.texi: Document '-ff2c' command line option. Adapt
414 documentation for '-fno-second-underscore' and '-fno-underscoring'.
415 * lang.opt (ff2c): New entry.
416 * options.c (gfc-init_options): Set default calling convention
417 to -fno-f2c. Mark -fsecond-underscore unset.
418 (gfc_post_options): Set -fsecond-underscore if not explicitly set
420 (handle_options): Set gfc_option.flag_f2c according to requested
422 * trans-decl.c (gfc_get_extern_function_decl): Use special f2c
423 intrinsics where necessary.
424 (gfc_trans_deferred_vars): Change todo error to assertion.
425 * trans-expr.c (gfc_conv_variable): Dereference access
426 to hidden result argument.
427 (gfc_conv_function_call): Add hidden result argument to argument
428 list if f2c calling conventions requested. Slightly restructure
429 tests. Convert result of default REAL function to requested type
430 if f2c calling conventions are used. Dereference COMPLEX result
432 * trans-types.c (gfc_sym_type): Return double for default REAL
433 function if f2c cc are used.
434 (gfc_return_by_reference): Slightly restructure logic. Return
435 COMPLEX by reference depending on calling conventions.
436 (gfc_get_function_type): Correctly make hidden result argument a
437 pass-by-reference argument for COMPLEX. Remove old code which does
438 this for derived types.
440 2005-05-09 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
442 * match.c (gfc_match_return): Only require space after keyword when
443 it is obligatory. Only give stdwarn to after matching is successful.
444 * dump-parse-tree.c (gfc_show_symbol): Deal with alternate returns.
446 2005-05-08 Kazu Hirata <kazu@cs.umass.edu>
448 * intrinsic.texi: Fix typos.
450 2005-05-07 Steven G. Kargl <kargls@comcast.net>
452 * intrinsic.texi: Document ASSOCIATED and ATAN2. Update Bessel function
453 description to include information about scalar arguments.
455 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
457 * Make-lang.in, dump-parse-tree.c, invoke.texi, lang.opt,
458 match.h, trans-array.h: Update copyright.
460 2005-04-29 Tom Tromey <tromey@redhat.com>
462 * f95-lang.c (poplevel): Updated for change to build_block.
464 2005-04-29 Jakub Jelinek <jakub@redhat.com>
468 * trans-expr.c (gfc_conv_variable): Handle return values in functions
469 with alternate entry points.
470 * resolve.c (resolve_entries): Remove unnecessary string termination
471 after snprintf. Set result of entry master.
472 If all entries have the same type, set entry master's type
473 to that common type, otherwise set mixed_entry_master attribute.
474 * trans-types.c (gfc_get_mixed_entry_union): New function.
475 (gfc_get_function_type): Use it for mixed_entry_master functions.
476 * gfortran.h (symbol_attribute): Add mixed_entry_master bit.
477 * decl.c (gfc_match_entry): Set entry->result properly for
479 * trans-decl.c (gfc_get_symbol_decl): For entry_master, skip over
481 (build_entry_thunks): Handle return values in entry thunks.
482 Clear BT_CHARACTER's ts.cl->backend_decl, so that it is not
483 shared between multiple contexts.
484 (gfc_get_fake_result_decl): Use DECL_ARGUMENTS from
485 current_function_decl instead of sym->backend_decl. Skip over
486 entry master's entry id argument. For mixed_entry_master entries or
487 their results, return a COMPONENT_REF of the fake result.
488 (gfc_trans_deferred_vars): Don't warn about missing return value if
489 at least one entry point uses RESULT.
490 (gfc_generate_function_code): For entry master returning
491 CHARACTER, copy ts.cl->backend_decl to all entry result syms.
492 * trans-array.c (gfc_trans_dummy_array_bias): Don't consider return
493 values optional just because they are in entry master.
495 2005-04-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
497 * gfortran.h (gfc_namespace): Add seen_implicit_none field,
498 Tobias forgot this in previous commit.
500 2005-04-29 Paul Brook <paul@codesourcery.com>
502 * trans-expr.c (gfc_conv_expr_present): Fix broken assert. Update
505 2005-04-29 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
507 * gfortran.h (gfc_namespace): Add seen_implicit_none field.
508 * symbol.c (gfc_set_implicit_none): Give error if there's a previous
509 IMPLICIT NONE, set seen_implicit_none.
510 (gfc_merge_new_implicit): Error if there's an IMPLICIT NONE statement.
512 2005-04-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
514 * gfortran.h (gfc_gsymbol): Make name a const char *.
515 * symbol.c (gfc_get_gsymbol): Allocate gsymbol name via
518 2005-04-28 Francois-Xavier Coudert <coudert@clipper.ens.fr>
521 * resolve.c (resolve_actual_arglist): Issue an error if a statement
522 functions is used as actual argument.
524 2005-04-27 Francois-Xavier Coudert <coudert@clipper.ens.fr>
527 * interface.c (compare_parameter): Ignore type for EXPR_NULL
528 only if type is BT_UNKNOWN.
530 2005-04-25 Paul Brook <paul@codesourcery.com>
531 Steven G. Kargl <kargls@comcast.net>
534 * check.c (gfc_check_ichar_iachar): New function.
535 * instinsic.h (gfc_check_ichar_iachar): Add prototype.
536 * intrinsic.c (add_functions): Use it.
537 * primary.c (match_varspec, gfc_match_rvalue): Clear incorrect
538 character expression lengths.
540 2005-04-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
543 * trans-common.c (translate_common): Cast offset and
544 common_segment->offset to type int for warning message.
546 2005-04-23 DJ Delorie <dj@redhat.com>
548 * trans-decl.c: Adjust warning() callers.
550 2005-04-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
552 * trans-const.c (gfc_conv_mpfr_to_tree): Use hexadecimal string as
553 intermediate representation. Fix typo in comment.
555 2005-04-21 Steven G. Kargl <kargls@comcast.net>
557 * trans-const.c (gfc_conv_mpfr_to_tree): Remove unneeded computation;
558 simplify logic; Add a gcc_assert.
560 2005-04-19 Steven G. Kargl <kargls@comcast.net>
562 * trans-const.c (gfc_conv_mpz_to_tree): Fix comment.
564 2005-04-19 Arnaud Desitter <arnaud.desitter@ouce.ox.ac.uk>
565 Steven G. Kargl <kargls@comcast.net>
567 * invoke.texi: Update -Waliasing description
569 2005-04-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
572 * resolve.c (resolve_variable): If e->symtree is not set, this
573 ought to be a FAILURE, and not a segfault.
575 2005-04-17 Paul Thomas <pault@gcc.gnu.org>
582 * fortran/trans-io.c (gfc_build_io_library_fndecls): Create
583 declaration for st_set_nml_var and st_set_nml_var_dim. Remove
584 declarations of old namelist functions.
585 (build_dt): Simplified call to transfer_namelist_element.
586 (nml_get_addr_expr): Generates address expression for start of
587 object data. New function.
588 (nml_full_name): Qualified name for derived type components. New
590 (transfer_namelist_element): Modified for calls to new functions
591 and improved derived type handling.
593 2005-04-17 Richard Guenther <rguenth@gcc.gnu.org>
595 * scanner.c (gfc_next_char_literal): Reset truncation flag
596 for lines ending in a comment for both fixed and free form.
597 (load_line): Do not set truncated flag if only truncating
600 2005-04-15 Richard Guenther <rguenth@gcc.gnu.org>
603 * gfortran.h (gfc_linebuf): Add truncated field.
604 * parse.c (next_statement): Handle warning for truncated
606 * scanner.c (load_line): Return if line was truncated.
607 No longer warn for truncated lines. Remove unused parameters.
608 (load_file): Store load_line return value to linebuf.
609 (gfc_error_recovery): Do not advance line at the end.
611 2005-04-14 Steven G. Kargl <kargls@comcast.net>
613 * gfortran.h (gfc_real_info): Add subnormal struct member.
614 * arith.c (gfc_arith_init_1): Set it.
615 (gfc_check_real_range): Use it.
616 * simplify.c (gfc_simplify_nearest): Fix nearest(0.,1.).
618 2005-04-12 Kazu Hirata <kazu@cs.umass.edu>
620 * simplify.c: Fix a comment typo.
622 2005-04-11 Richard Sandiford <rsandifo@redhat.com>
624 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
626 2005-04-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
628 * simplify.c (gfc_simplify_nearest): Overhaul.
630 2005-04-10 Kazu Hirata <kazu@cs.umass.edu>
632 * interface.c: Fix a comment typo.
634 2005-04-10 Francois-Xavier Coudert <coudert@clipper.ens.fr>
636 * match.c (match_arithmetic_if): Arithmetic IF is obsolete in
639 2005-04-09 Steven G. Kargl <kargls@comcast.net>
641 * simplify.c (gfc_simplify_anint): Use mpfr_round()
642 (gfc_simplify_dnint): ditto.
643 (gfc_simplify_nint): ditto.
645 2005-04-09 Andrew Pinski <pinskia@physics.uc.edu>
648 * io.c (check_format): Allow an optional comma
651 2005-04-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
653 * match.c (match_arithmetic_if): Remove gfc_ prefix and correct
654 comment according to GNU coding style.
655 (gfc_match_if): Remove gfc_ prefix in call to
658 2005-04-08 Diego Novillo <dnovillo@redhat.com>
660 * match.c (gfc_match_arithmetic_if): Declare static.
662 2005-04-08 Francois-Xavier Coudert <coudert@clipper.ens.fr>
665 * match.c (gfc_match_arithmetic_if): New function to match an
666 arithmetic IF statement.
667 (gfc_match_if): Use gfc_match_arithmetic_if to match an
668 arithmetic IF statement embedded in a simple IF statement.
670 2005-04-07 Steven G. Kargl <kargls@comcast.net>
672 * simplify.c (gfc_simplify_exponent): Fix exponent(tiny(x))
674 2005-04-06 Steven G. Kargl <kargls@comcast.net>
676 * invoke.texi: Remove documentation of -std=f90
678 2005-04-06 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
680 * expr.c (gfc_check_assign): Don't allow NULL as rhs in a
681 non-pointer assignment.
683 2005-04-05 Feng Wang <fengwang@nudt.edu.cn>
688 * array.c (resolve_character_array_constructor): New function. Set
689 constant character array's character length.
690 (gfc_resolve_array_constructor): Use it.
691 * decl.c (add_init_expr_to_sym): Set symbol and initializer character
693 (gfc_set_constant_character_len): New function. Set constant character
694 expression according the given length.
695 * match.h (gfc_set_constant_character_len): Add prototype.
697 2005-04-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
699 * intrinsic.texi: BES?? functions are not in the f95 standard.
701 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
703 * intrinsic.texi: Document COS, EXP, LOG, LOG10, SIN, SQRT, TAN.
705 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
707 * intrinsic.texi: Document BESJ0, BESJ1, BESJN, BESY0, BESY1,
708 BESYN, ATAN, COSH, ERF, ERC, SINH, TANH.
710 2005-04-02 Steven G. Kargl <kargls@comcast.net>
712 * intrinsic.texi: Document ALLOCATED, ANINT, ANY, ASIN; fix typos
714 2005-04-01 Kazu Hirata <kazu@cs.umass.edu>
716 * decl.c, f95-lang.c, interface.c, module.c, trans-stmt.c,
717 trans.h: Fix comment typos.
719 2005-03-29 Steven G. Kargl <kargls@comcast.net>
721 * gfortran.h (option_t): Change d8, i8, r8 to flag_default_double,
722 flag_default_integer, flag_default_real
723 * invoke.texi: Update documentation
724 * lang.opt: Remove d8, i8, r8 definitions; Add fdefault-double-8
725 fdefault-integer-8, and fdefault-real-8 definitions.
726 * options.c (gfc_init_options): Set option defaults
727 (gfc_handle_option): Handle command line options.
728 * trans-types.c (gfc_init_kinds): Use options.
730 2005-03-29 Keith Besaw <kbesaw@us.ibm.com>
732 * f95-lang.c (builtin_function): Process the attrs parameter
733 and apply the "const" attribute to the builtin if found.
735 2005-03-27 Steven G. Kargl <kargls@comcast.net>
737 * intrinsic.texi: Document AIMAG, AINT, ALL
739 2005-03-26 Steven G. Kargl <kargls@comcast.net>
741 * arith.c (check_result): Fix illogical logic.
743 2005-03-26 Canqun Yang <canqun@nudt.edu.cn>
745 * trans-common.c (create_common): Build RECORD_NODE for common blocks
746 contain no equivalence objects.
747 (add_equivalences): New argument saw_equiv.
748 (trans_common): New local variable saw_equiv.
749 (finish_equivalences): Add a local variable dummy, Always pass true
750 for the 3rd parameter to create_common.
752 2005-03-25 Steven G. Kargl <kargls@comcast.net>
754 * intrinsic.texi: Fix "make dvi"
756 2005-03-24 Steven G. Kargl <kargls@comcast.net>
758 * intrinsic.texi: New file.
759 * gfortran.texi: Include it; white space change; fix typo.
761 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
763 * f95-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
765 2005-03-23 Steven Bosscher <stevenb@suse.de>
767 * convert.c (convert): Replace fold (buildN (...)) with fold_buildN.
768 * trans-array.c (gfc_trans_allocate_array_storage,
769 gfc_trans_allocate_temp_array gfc_trans_array_constructor_value,
770 gfc_conv_array_index_ref, gfc_trans_array_bound_check,
771 gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
772 gfc_conv_array_ref, gfc_trans_preloop_setup, gfc_conv_ss_startstride,
773 gfc_conv_loop_setup, gfc_array_init_size, gfc_trans_array_bounds,
774 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
775 gfc_conv_expr_descriptor): Likewise.
776 * trans-expr.c (gfc_conv_powi, gfc_conv_string_tmp,
777 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
778 * trans-intrinsic.c (build_round_expr, gfc_conv_intrinsic_bound,
779 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_sign,
780 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
781 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_bitop,
782 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits,
783 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_ishftc,
784 gfc_conv_intrinsic_merge, prepare_arg_info,
785 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_repeat): Likewise.
786 * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do, gfc_trans_do_while,
787 gfc_trans_forall_loop, gfc_do_allocate, generate_loop_for_temp_to_lhs,
788 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
789 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
790 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_assign):
792 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Likewise.
793 * trans.c (gfc_add_modify_expr): Likewise.
795 2005-03-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
797 * check.c (gfc_check_chdir, gfc_check_chdir_sub, gfc_check_kill,
798 gfc_check_kill_sub, gfc_check_link, gfc_check_link_sub,
799 gfc_check_symlnk, gfc_check_symlnk_sub, gfc_check_rename,
800 gfc_check_rename_sub, gfc_check_sleep_sub, gfc_check_gerror,
801 gfc_check_getlog, gfc_check_hostnm, gfc_check_hostnm_sub,
802 gfc_check_perror): new functions to check newly implemented
804 * gfortran.h: adding symbols for new intrinsics.
805 * intrinsic.c (add_functions): adding new intrinsics.
806 (add_subroutines): adding new intrinsics.
807 * intrinsic.h: prototype for all checking and resolving
809 * iresolve.c (gfc_resolve_chdir, gfc_resolve_chdir_sub,
810 gfc_resolve_hostnm, gfc_resolve_ierrno, gfc_resolve_kill,
811 gfc_resolve_link, gfc_resolve_rename, gfc_resolve_symlnk,
812 gfc_resolve_time, gfc_resolve_time8, gfc_resolve_rename_sub,
813 gfc_resolve_kill_sub, gfc_resolve_link_sub,
814 gfc_resolve_symlnk_sub, gfc_resolve_sleep_sub,
815 gfc_resolve_gerror, gfc_resolve_getlog, gfc_resolve_hostnm_sub,
816 gfc_resolve_perror): new functions to resolve intrinsics.
817 * trans-intrinsic.c (gfc_conv_intrinsic_function): add case
820 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
822 * dump-parse-tree.c (gfc_show_expr): Dump name of namespace
823 in which the variable is declared.
826 * resolve.c (was_declared): Also check for dummy attribute.
828 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
830 * gfortran.h (arith): Remove ARITH_0TO0.
831 * arith.c (gfc_arith_error): Remove handling of ARITH_0TO0.
832 (gfc_arith_power): Remove special casing of zero to integral
835 2005-03-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
837 * Make-lang.in (fortran-warn): Remove -Wno-error.
838 (expr.o-warn, resolve.o-warn, simplify.o-warn,
839 trans-common.o-warn): Specify -Wno-error.
841 2005-03-17 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
843 * trans-array.c (gfc_trans_static_array_pointer,
844 get_array_ctor_var_strlen, gfc_conv_array_index_offset): Fix
845 comment and formatting typos.
847 2005-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
849 * invoke.texi: Fix typos.
851 2005-03-15 Zack Weinberg <zack@codesourcery.com>
853 * Make-lang.in (GFORTRAN_TEXI): Add gcc-vers.texi.
855 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
857 * trans-stmt.c (gfc_trans_label_assign): Don't set DECL_ARTIFICIAL flag
858 to zero on label_tree.
860 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
863 * io.c (resolve_tag): Add checking on assigned label.
864 (match_dt_format): Does not set symbol assign attribute.
865 * match.c (gfc_match_goto):Does not set symbol assign attribute.
866 * resolve.c (resolve_code): Add checking on assigned label.
867 * trans-common.c (build_field): Deals with common variable assigned
869 * trans-stmt.c (gfc_conv_label_variable): New function.
870 (gfc_trans_label_assign): Use it.
871 (gfc_trans_goto): Ditto.
872 * trans-io.c (set_string): Ditto.
873 * trans.h (gfc_conv_label_variable): Add prototype.
875 2005-03-14 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
878 * symbol.c (check_conflict): A dummy argument can't be a statement
881 2005-03-14 Zdenek Dvorak <dvorakz@suse.cz>
883 * fortran/trans-intrinsic.c (gfc_conv_intrinsic_ishft): Convert
884 the argument of the shift to the unsigned type.
886 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
889 * resolve.c (gfc_resolve_index): Allow REAL indices as an extension.
891 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
894 * resolve.c (gfc_resolve): Check if character lengths are
895 specification expressions.
897 2005-03-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
900 * trans-array.c (gfc_stack_space_left): Remove unused variable.
901 (gfc_can_put_var_on_stack): Move to trans-decl.c, remove #if 0'ed
903 * trans-array.h (gfc_stack_space_left, gfc_can_put_var_on_stack):
904 Remove declaration / prototype.
905 * trans-common.c (build_equiv_decl): Give union a name. Check if
906 it can be put on the stack.
907 * trans-decl.c (gfc_stack_space_left): Move function here.
908 (gfc_build_qualified_array): Fix comment typo.
909 * trans.h (gfc_put_var_on_stack): Add prototype.
911 2005-03-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
913 * Make-lang.in (fortran-warn): Set to $(STRICT_WARN) -Wno-error.
914 * decl.c, trans.c: Don't use C++ style comments.
915 * gfortran.h (sym_flavor, procedure_type, sym_intent, gfc_access,
916 ifsrc): Give names to enums and use ENUM_BITFIELD.
917 (gfc_access): Remove trailing comma.
919 2005-03-05 Steven G. Kargl <kargls@comcast.net>
922 * primary.c (match_complex_constant): Mangled complex constant may
923 be an implied do-loop. Give implied do-loop matcher a chance.
925 2005-03-05 Steven G. Kargl <kargls@comcast.net>
928 * resolve.c (compare_shapes): New function.
929 (resolve_operator): Use it.
931 2005-03-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
933 * trans-const.c (gfc_conv_constant_to_tree): Use correct tree
934 type for COMPLEX constants.
936 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
939 * trans-expr.c (gfc_conv_function_call): Correctly dereference
940 argument from a pointer function also if it has a result clause.
942 2005-03-04 Steven G. Kargl <kargls@comcast.net>
944 * expr.c (gfc_copy_shape_excluding): Change && to ||.
946 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
948 * trans-intrinsic.c (gfc_get_symbol_for_expr): Fix comment typo,
951 2005-02-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
955 * simplify.c (gfc_simplify_bound): Rename to ...
956 (simplify_bound): ... this and overhaul.
958 2005-02-28 Steven G. Kargl <kargl@gcc.gnu.org>
960 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): remove boolean argument.
961 (gfc_conv_intrinsic_function): update function calls
963 2005-02-27 Steven G. Kargl <kargl@gcc.gnu.org>
966 * trans-types.c (gfc_max_integer_kind): Declare
967 (gfc_init_kinds): Initialize it.
968 * gfortran.h (gfc_max_integer_kind): extern it.
969 * primary.c (match_boz_constant): Use it; remove gfortran extension
970 of kind suffixes on BOZ literal constants
973 2005-02-27 Steven G. Kargl <kargls@comcast.net>
975 * arith.c (gfc_check_real_range): Remove multiple returns
976 (check_result): New function.
977 (gfc_arith_uminus,gfc_arith_plus,gfc_arith_times,
978 gfc_arith_divide,gfc_arith_power,gfc_arith_minus): Use it.
981 2005-02-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
983 * decl.c, resolve.c, trans-array.c, trans.h: Fix comment typo(s).
986 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-meunchen.de>
988 Unrevert previously reverted patch. Adding this fix:
989 * module.c (find_true_name): Deal with NULL module.
991 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
993 Revert yesterday's patch:
994 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
996 * gfortran.h (gfc_component, gfc_actual_arglist, ...
997 ... argument. Copy string instead of pointing to it.
999 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1001 * gfortran.h (gfc_get_namespace): Add second argument to prototype.
1002 * intrinsic.c (gfc_intrinsic_init_1): Pass second argument to
1004 * module.c (mio_namespace_ref, load_needed): Likewise.
1005 * parse.c (parse_interface, parse_contained): Likewise. Here the
1006 correct second argument matters.
1007 * symbol.c (gfc_get_namespace): Add parent_types argument, only copy
1008 parent's implicit types if this is set.
1009 (gfc_symbol_init_2): Pass second argument to gfc_get_namespace.
1010 * trans-common.c (build_common_decl): Likewise.
1012 * gfortran.h (symbol_attribute): New 'untyped' field, fix comment
1014 * symbol.c (gfc_set_default_type): Issue error only once, by setting
1015 and checking 'untyped' attribute.
1017 * gfortran.h (gfc_expr): Move 'operator', 'op1', 'op2', and 'uop'
1018 fields into new struct 'op' inside the 'value' union.
1019 * arith.c (eval_intrinsic): Adapt all users.
1020 * dependency.c (gfc_check_dependency): Likewise.
1021 * dump-parse-tree.c (gfc_show_expr): Likewise.
1022 * expr.c (gfc_get_expr): Don't clear removed fields.
1023 (free_expr0, gfc_copy_expr, gfc_type_convert_binary,
1024 gfc_is_constant_expr, simplify_intrinsic_op, check_init_expr,
1025 check_intrinsic_op): Adapt to new field names.
1026 * interface.c (gfc_extend_expr): Likewise. Also explicitly
1027 nullify 'esym' and 'isym' fields of new function call.
1028 * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
1029 Adapt to renamed structure fields.
1030 * matchexp.c (build_node, match_level_1, match_expr): Likewise.
1031 * module.c (mio_expr): Likewise.
1032 * resolve.c (resolve_operator): Likewise.
1033 (gfc_find_forall_index): Likewise. Only look through operands
1034 if dealing with EXPR_OP
1035 * trans-array.c (gfc_walk_op_expr): Adapt to renamed fields.
1036 * trans-expr.c (gfc_conv_unary_op, gfc_conv_power_op,
1037 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
1040 * gfortran.h (gfc_component, gfc_actual_arglist, gfc_user_op): Make
1041 'name' a 'const char *'.
1042 (gfc_symbol): Likewise, also for 'module'.
1043 (gfc_symtree): Make 'name' a 'const char *'.
1044 (gfc_intrinsic_sym): Likewise, also for 'lib_name'.
1045 (gfc_get_gsymbol, gfc_find_gsymbol): Add 'const' qualifier to
1047 (gfc_intrinsic_symbol): Use 'gfc_get_string' instead of 'strcpy' to
1048 initialize 'SYM->module'.
1049 * check.c (gfc_check_minloc_maxloc, check_reduction): Check for NULL
1050 pointer instead of empty string.
1051 * dump-parse-tree.c (gfc_show_actual_arglist): Likewise.
1052 * interface.c (gfc_compare_types): Adapt check to account for possible
1054 (compare_actual_formal): Check for NULL pointer instead of empty
1056 * intrinsic.c (gfc_current_intrinsic, gfc_current_intrinsic_arg):
1057 Add 'const' qualifier.
1058 (conv_name): Return a heap allocated string.
1059 (find_conv): Add 'const' qualifier to 'target'.
1060 (add_sym): Use 'gfc_get_string' instead of 'strcpy'.
1061 (make_generic): Check for NULL pointer instead of empty string.
1062 (make_alias): Use 'gfc_get_string' instead of 'strcpy'.
1063 (add_conv): No need to strcpy result from 'conv_name'.
1064 (sort_actual): Check for NULL pointer instead of empty string.
1065 * intrinsic.h (gfc_current_intrinsic, gfc_current_intrinsic_arg):
1067 * module.c (compare_true_names): Compare pointers instead of strings
1068 for 'module' member.
1069 (find_true_name): Initialize string fields with gfc_get_string.
1070 (mio_pool_string): New function.
1071 (mio_internal_string): Adapt comment.
1072 (mio_component_ref, mio_component, mio_actual_arg): Use
1073 'mio_pool_string' instead of 'mio_internal_string'.
1074 (mio_symbol_interface): Add 'const' qualifier to string arguments.
1075 Add level of indirection. Use 'mio_pool_string' instead of
1076 'mio_internal_string'.
1077 (load_needed, read_module): Use 'gfc_get_string' instead of 'strcpy'.
1078 (write_common, write_symbol): Use 'mio_pool_string' instead of
1079 'mio_internal_string'.
1080 (write_symbol0, write_symbol1): Likewise, also check for NULL pointer
1081 instead of empty string.
1082 (write_operator, write_generic): Pass correct type variable to
1083 'mio_symbol_interface'.
1084 (write_symtree): Use 'mio_pool_string' instead of
1085 'mio_internal_string'.
1086 * primary.c (match_keyword_arg): Adapt check to possible
1087 case of NULL pointer. Use 'gfc_get_string' instead of 'strcpy'.
1088 * symbol.c (gfc_add_component, gfc_new_symtree, delete_symtree,
1089 gfc_get_uop, gfc_new_symbol): Use 'gfc_get_string' instead of
1091 (ambiguous_symbol): Check for NULL pointer instead of empty string.
1092 (gfc_find_gsymbol, gfc_get_gsymbol): Add 'const' qualifier on string
1094 * trans-array.c (gfc_trans_auto_array_allocation): Check for NULL
1095 pointer instead of empty string.
1096 * trans-decl.c (gfc_sym_mangled_identifier,
1097 gfc_sym_mangled_function_id, gfc_finish_var_decl, gfc_get_symbol_decl,
1098 gfc_get_symbol_decl): Likewise.
1099 * trans-io.c (gfc_new_nml_name_expr): Add 'const' qualifier to
1100 argument. Copy string instead of pointing to it.
1102 2005-02-23 Kazu Hirata <kazu@cs.umass.edu>
1104 * intrinsic.h, st.c: Update copyright.
1106 2005-02-20 Steven G. Kargl <kargls@comcast.net>
1108 * symbol.c: Typos in comments.
1110 2005-02-20 Steven G. Kargl <kargls@comcast.net>
1112 * expr.c (gfc_type_convert_binary): Typo in comment.
1114 2005-02-19 Steven G. Kargl <kargls@comcast.net>
1116 * check.c (gfc_check_selected_int_kind): New function.
1117 * intrinsic.h: Prototype it.
1118 * intrinsic.c (add_function): Use it.
1119 * simplify (gfc_simplify_ceiling,gfc_simplify_floor): Change
1120 BT_REAL to BT_INTEGER and use gfc_default_integer_kind.
1122 2005-02-19 Steven G. Kargl <kargls@comcast.net>
1124 * check.c (gfc_check_int): improve checking of optional kind
1125 * simplify.c (gfc_simplify_int): Change BT_REAL to BT_INTEGER
1127 2005-02-19 Steven G. Kargl <kargls@comcast.net>
1129 * check.c (gfc_check_achar): New function
1130 * intrinsic.h: Prototype it.
1131 * intrinsic.c (add_function): Use it.
1133 2005-02-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1135 * trans-stmt.c (generate_loop_for_temp_to_lhs,
1136 generate_loop_for_rhs_to_temp): Remove if whose condition is
1139 2005-02-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1141 * symbol.c (gfc_use_ha_derived): Remove, fold functionality into ...
1142 (gfc_use_derived): ... this function.
1144 2005-02-09 Richard Henderson <rth@redhat.com>
1146 * f95-lang.c (gfc_init_builtin_functions): Call
1147 build_common_builtin_nodes; do not define any functions handled
1150 2005-02-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1152 * expr.c (gfc_copy_expr): Don't copy 'op1' and 'op2' for
1154 (gfc_is_constant_expr): Check 'ref' to determine if substring
1155 reference is constant.
1156 (gfc_simplify_expr): Simplify 'ref' instead of 'op1' and 'op2'.
1157 (check_init_expr, check_restricted): Check 'ref' instead of 'op1'
1159 * module.c (mio_expr): Read / write 'ref' instead of 'op1' and 'op2'.
1161 2005-02-07 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1163 * gfortran.h (gfc_add_dimension, gfc_add_result, gfc_add_save,
1164 gfc_add_dummy, gfc_add_generic, gfc_add_in_common, gfc_add_data,
1165 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
1166 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
1167 gfc_add_procedure): Add argument.
1168 * array.c (gfc_set_array_spec), decl.c (var_element, get_proc_name,
1169 gfc_match_null, match_type_spec, match_attr_spec,
1170 gfc_match_formal_arglist, match_result, gfc_match_function_decl):
1171 Update callers to match.
1172 (gfc_match_entry) : Likewise, fix comment typo.
1173 (gfc_match_subroutine, attr_decl1, gfc_add_dimension,
1174 access_attr_decl, do_parm, gfc_match_save, gfc_match_modproc,
1175 gfc_match_derived_decl): Update callers.
1176 * interface.c (gfc_match_interface): Likewise.
1177 * match.c (gfc_match_label, gfc_add_flavor,
1178 gfc_match_call, gfc_match_common, gfc_match_block_data,
1179 gfc_match_namelist, gfc_match_module, gfc_match_st_function):
1181 * parse.c (parse_derived, parse_interface, parse_contained),
1182 primary.c (gfc_match_rvalue, gfc_match_variable): Likewise.
1183 * resolve.c (resolve_formal_arglist, resolve_entries): Update callers.
1184 * symbol.c (check_conflict, check_used): Add new 'name' argument,
1185 use when printing error message.
1186 (gfc_add_dimension, gfc_add_result, gfc_add_save, gfc_add_dummy,
1187 gfc_add_generic, gfc_add_in_common, gfc_add_data,
1188 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
1189 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
1190 gfc_add_procedure): Add new 'name' argument. Pass along to
1191 check_conflict and check_used.
1192 (gfc_add_allocatable, gfc_add_external, gfc_add_intrinsic,
1193 gfc_add_optional, gfc_add_pointer, gfc_add_target, gfc_add_elemental,
1194 gfc_add_pure, gfc_add_recursive, gfc_add_intent,
1195 gfc_add_explicit_interface, gfc_copy_attr): Pass NULL for new
1196 argument in calls to any of the modified functions.
1198 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
1200 * gfortran.texi: Don't give last update date.
1202 2006-01-30 Richard Henderson <rth@redhat.com>
1204 * options.c (gfc_init_options): Zero flag_errno_math.
1206 2005-01-29 Paul Brook <paul@codesourcery.com>
1209 * check.c (real_or_complex_check): New function.
1210 (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc): New functions.
1211 * intrinsic.c (add_functions): Use new check functions.
1212 * intrinsic.h (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc):
1215 2005-01-29 Steven G. Kargl <kargls@comcast.net>
1218 * expr.c (gfc_check_assign): Check for conformance of logical operands
1220 2004-01-27 Steven Bosscher <stevenb@suse.de>
1222 * trans-decl.c (gfc_build_label_decl): Set DECL_ARTIFICAL and
1223 TREE_USED for all labels.
1224 (gfc_trans_entry_master_switch): Use it instead of building a
1226 * trans-io.c (add_case): Likewise.
1227 * trans-stmt.c (gfc_trans_integer_select): Likewise.
1229 2004-01-23 Paul Brook <paul@codesourcery.com>
1230 Steven G. Kargl <kargls@comcast.net>
1233 * arith.c (gfc_convert_real): Remove sign handling.
1234 * primary.c (match_digits): Allow whitespace after initial sign.
1235 (match_real_const): Handle signs here. Allow whitespace after
1236 initial sign. Remove dead code.
1237 (match_const_complex_part): Remove.
1238 (match_complex_part): Use match_{real,integer}_const.
1239 (match_complex_constant): Cross-promote integer types.
1241 2005-01-23 James A. Morrison <phython@gcc.gnu.org>
1244 * iresolve.c (gfc_resolve_transpose): Resolve to transpose_c4 or
1245 transpose_c8 for complex types.
1247 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
1249 * data.c, dependency.c, f95-lang.c, io.c, trans-array.c,
1250 trans-decl.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
1251 trans-stmt.c, trans-types.c, trans.h: Fix comment typos.
1252 Follow spelling conventions.
1254 2005-01-22 Bud Davis <bdavis9659@comcast.net>
1257 * trans-io.c (gfc_trans_inquire): Added code to support
1260 2005-01-22 Steven G. Kargl <kargls@comcast.net>
1262 * intrinsic.c (make_alias): Add standard argument.
1263 (add_functions): Update make_alias calls.
1265 2005-01-22 Paul Brook <paul@codesourcery.com>
1267 * trans-expr.c (gfc_conv_function_call): Remove bogus TODO.
1269 2005-01-22 Paul Brook <paul@codesourcery.com>
1271 * gfortran.h (gfc_check_access): Add prototype.
1272 * match.c (gfc_match_namelist): Remove TODO.
1273 * module.c (check_access): Rename ...
1274 (gfc_check_access): ... to this. Boolify. Update callers.
1275 * resolve.c (resolve_symbol): Check for private objects in public
1278 2005-01-22 Paul Brook <paul@codesourcery.com>
1280 * primary.c (gfc_match_rvalue): Only apply implicit type if variable
1281 does not have an explicit type.
1282 (gfc_match_variable): Resolve implicit derived types in all cases.
1283 Resolve contained function types from their own namespace, not the
1285 * resolve.c (resolve_contained_fntype): Remove duplicate sym->result
1286 checking. Resolve from the contained namespace, not the parent.
1288 2005-01-22 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1291 * trans-const.c (gfc_conv_constant_to_tree): Give logical
1292 constants the correct type.
1295 * trans-io.c (ADD_STRING): Use gfc_charlen_type_node for string
1297 (gfc_build_io_library_fndecls): 'rec' and 'recl_in' are not
1300 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
1302 * arith.c, array.c, check.c, decl.c, expr.c, f95-lang.c,
1303 gfortran.h, interface.c, intrinsic.c, io.c, iresolve.c,
1304 match.c, matchexp.c, misc.c, module.c, options.c, parse.c,
1305 scanner.c, simplify.c, symbol.c, trans-array.c, trans-expr.c,
1306 trans-io.c, trans-stmt.c, trans.c: Update copyright.
1308 2005-01-17 Ira Rosen <irar@il.ibm.com>
1310 * f95-lang.c (gfc_init_builtin_functions): Call targetm.init_builtins.
1312 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1315 * error.c (error_char): Line-buffer errors / warnings.
1317 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1319 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Fix signed /
1320 unsigned issue. Use build_int_cst instead of converting
1321 integer_zero_node. Remove unnecessary conversion.
1323 * trans-types.c (gfc_get_character_type_len): : Use
1324 gfc_charlen_type_node as basic type for the range field.
1326 * trans-intrinsic.c (build_fixbound_expr,
1327 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_anyall,
1328 gfc_conv_intrinsic_count, gfc_conv_intrinsic_btest,
1329 gfc_conv_intrinsic_singlebitop): Use 'build_int_cst' instead
1330 of converting 'integer_zero_node' or 'integer_one_node'
1332 (gfc_conv_intrinsic_ishftc): Same, but store in local variable to
1334 (gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_rrspacing,
1335 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_iargc): Use
1336 'build_int_cst' instead of converting 'integer_zero_node' or
1337 'integer_one_node' respectively.
1339 * trans-intrinsic.c (gfc_conv_intrinsic_index,
1340 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove
1341 'gfc'-prefix from local variable, remove dead code, use correct
1342 type when inserting argument.
1344 * trans-intrinsic.c, trans-types.c: Update copyright years.
1346 2005-01-16 Steven G. Kargl <kargls@comcast.net>
1349 * resolve.c (check_case_overlap): Typo in comment.
1350 (validate_case_label_expr): Fix up kinds of case values
1351 (resolve_select): Properly handle kind mismatches.
1353 2004-01-16 Paul Brook <paul@codesourcery.com>
1356 * trans-common.c (translate_common): Remove duplicate function call.
1357 (finish_equivalences): Preserve alignment when biasing offsets.
1359 2005-01-15 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de
1361 * primary.c (check_digit): Call 'ISXDIGIT' instead of assuming
1362 ASCII-like character encoding.
1364 2005-01-14 Steven G. Kargl <kargls@comcast.net>
1366 * resolve.c (compare_case): Cleanup.
1368 2005-01-14 Steven G. Kargl <kargls@comcast.net>
1370 * resolve.c (compare_case): Give arguments correct type.
1372 2005-01-13 Kazu Hirata <kazu@cs.umass.edu>
1374 * iresolve.c, trans-common.c, trans-types.c: Fix comment
1377 2005-01-09 Paul Brook <paul@codesourcery.com>
1380 * trans-common.c (current_common, current_offset): Remove.
1381 (create_common): Add head argument.
1382 (align_segment): New function.
1383 (apply_segment_offset): New function.
1384 (translate_common): Merge code from new_segment. Handle alignment.
1385 (new_segment): Remove.
1386 (finish_equivalences): Ensure proper alignment.
1388 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1390 * trans-const.c: Don't include unused math.h.
1392 * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl,
1393 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_minmaxloc,
1394 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_len): Remove
1395 trailing whitespace.
1396 (prepare_arg_info): Fix formatting, indenting and remove trailing
1398 (gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_trim): Remove
1399 trailing whitespace.
1401 * arith.c (arctangent2, gfc_arith_init_1, gfc_arith_done_1,
1402 gfc_constant_result, gfc_range_check, gfc_arith_power,
1403 eval_type_intrinsic0, eval_intrinsic_f2, gfc_real2real,
1404 gfc_real2complex, gfc_complex2int, gfc_complex2real,
1405 gfc_complex2complex): Fix whitespace issues.
1406 * check.c (must_be, type_check, numeric_check, int_or_real_check,
1407 logical_array_check, array_check, scalar_check, nonoptional_check,
1408 variable_check, dim_check, check_a_kind, gfc_check_a_ikind,
1409 gfc_check_a_xkind, gfc_check_abs, gfc_check_all_any,
1410 gfc_check_allocated, gfc_check_a_p, gfc_check_besn,
1411 gfc_check_btest, gfc_check_char, gfc_check_cmplx, gfc_check_count,
1412 gfc_check_cshift, gfc_check_dcmplx, gfc_check_dble,
1413 gfc_check_digits, gfc_check_dot_product, gfc_check_eoshift,
1414 gfc_check_fnum, gfc_check_g77_math1, gfc_check_huge, gfc_check_i,
1415 gfc_check_iand, gfc_check_ibclr, gfc_check_ibits, gfc_check_ibset,
1416 gfc_check_idnint, gfc_check_ieor, gfc_check_index, gfc_check_int,
1417 gfc_check_ior, gfc_check_ishft, gfc_check_ishftc, gfc_check_kind,
1418 gfc_check_lbound, gfc_check_logical, min_max_args,
1419 gfc_check_min_max_integer, gfc_check_min_max_real,
1420 gfc_check_min_max_double, gfc_check_matmul,
1421 gfc_check_minval_maxval, gfc_check_merge, gfc_check_nearest,
1422 gfc_check_pack, gfc_check_precision, gfc_check_radix,
1423 gfc_check_range, gfc_check_real, gfc_check_repeat,
1424 gfc_check_scale, gfc_check_scan, gfc_check_selected_real_kind,
1425 gfc_check_set_exponent): Fix formatting issues.
1426 (gfc_check_size, gfc_check_sign): Alphabetize function order,
1427 remove whitespace-only line.
1428 (gfc_check_fstat, gfc_check_fstat_sub, gfc_check_stat,
1429 gfc_check_stat_sub, gfc_check_transfer, gfc_check_transpose,
1430 gfc_check_ubound, gfc_check_unpack, gfc_check_verify, gfc_check_x,
1431 gfc_check_cpu_time, gfc_check_date_and_time, gfc_check_mvbits,
1432 gfc_check_random_number, gfc_check_random_seed,
1433 gfc_check_second_sub, gfc_check_system_clock,
1434 gfc_check_getcwd_sub, gfc_check_exit, gfc_check_flush,
1435 gfc_check_umask, gfc_check_umask_sub, gfc_check_unlink,
1436 gfc_check_unlink_sub): Fix formatting issues.
1438 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1440 * gfortran.h: Remove outdated comment. Don't include stdio.h
1443 2005-01-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1445 * gfortranspec.c (lang_specific_driver): Change year to 2005 in
1446 output of 'gfortran --version'.
1448 2005-01-03 Steven G. Kargl <kargls@comcast.net>
1450 * arith.c: Add system.h; remove string.h
1456 * check.c: Remove stdlib.h and stdarg.h
1457 * error.c: Remove stdlib.h, stdarg.h, stdio.h, string.h
1458 * expr.c: Add system.h; remove stdarg.h, stdio.h, and string.h
1459 * f95-lang.c: Add system.h; remove stdio.h
1460 * interface.c: Add system.h; remove stdlib.h and string.h
1461 * intrinsic.c: Remove stdarg.h, stdio.h, and string.h
1462 * io.c: Remove string.h
1464 * match.c: Remove stdarg.h and string.h
1465 * misc.c: Update copyright; add system.h; remove stdlib.h,
1466 string.h, and sys/stat.h
1467 * module.c: Add system.h; remove string.h, stdio.h, errno.h,
1468 unistd.h, and time.h
1469 * option.c: Remove string.h and stdlib.h
1471 * scanner.c: Update copyright; add system.h; remove stdlib.h,
1472 stdio.h, string.h, and strings.h
1473 * symbol.c: Add system.h; remove stdlib.h, stdio.h, and string.h
1474 * trans-array.c: Remove stdio.h and gmp.h
1475 * trans-const.c: Ditto
1476 * trans-expr.c: Ditto
1478 * trans-stmt.c: Ditto
1480 * trans-intrinsic.c: Remove stdio.h and string.h
1482 2004-12-29 Steven G. Kargl <kargls@comcast.net>
1484 * gfortran.h (gfc_case): fix typo in comment.
1486 2004-12-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1488 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Change to
1489 logical shift. Call fold. Remove 0-bit shift shortcut.
1490 (gfc_conv_intrinsic_ishftc): Convert first argument to at least
1491 4 bytes bits. Convert 2nd and 3rd argument to 4 bytes. Convert
1492 result if width(arg 1) < 4 bytes. Call fold.
1495 * trans-intrinsic.c (gfc_conv_intrinsic_mod): Update comment
1496 in front of function to match the standard. Correct handling
1499 2004-12-27 Andrew Pinski <pinskia@physics.uc.edu>
1501 * trans-expr.c (gfc_conv_cst_int_power): Only check for
1502 flag_unsafe_math_optimizations if we have a float type.
1504 2004-12-23 Steven G. Kargl <kargls@comcast.net>
1506 * gfortran.texi: Fix typo.
1508 2004-12-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1510 * trans-intrinsic.c (build_fixbound_expr): Clarify comment, fix
1513 2004-12-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1516 * match.c (gfc_match_if): Don't explicitly skip optional whitespace.
1517 (gfc_match_nullify): Make sure that ')' is in front of the end of
1520 * scanner.c (skip_fixed_comments): Fix typo in comment preceding
1523 2004-12-14 Richard Henderson <rth@redhat.com>
1525 * gfortran.h (gfc_expr.function.name): Make const.
1526 (gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
1527 (gfc_get_string): Update prototype.
1528 * iresolve.c: Include tree.h.
1529 (string_node, HASH_SIZE, string_head, hash): Remove.
1530 (gfc_get_string): Use vsnprintf, get_identifier.
1531 (free_strings, gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
1532 * misc.c (gfc_init_1): Don't call gfc_iresolve_init_1.
1533 (gfc_done_1): Don't call gfc_iresolve_done_1.
1534 * module.c (mio_allocated_string): Take and return const char *,
1535 instead of modifying char**.
1536 (mio_expr): Update to match.
1537 * resolve.c (pure_function): Constify name argument.
1538 (resolve_function): Constify name.
1539 * trans-intrinsic.c (gfc_conv_intrinsic_function): Likewise.
1541 2004-12-12 Richard Henderson <rth@redhat.com>
1543 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
1544 gfc_resolve_cshift, gfc_resolve_dot_product, gfc_resolve_eoshift,
1545 gfc_resolve_matmul, gfc_resolve_maxloc, gfc_resolve_maxval,
1546 gfc_resolve_minloc, gfc_resolve_minval, gfc_resolve_pack,
1547 gfc_resolve_product, gfc_resolve_reshape, gfc_resolve_shape,
1548 gfc_resolve_spread, gfc_resolve_sum, gfc_resolve_transpose,
1549 gfc_resolve_unpack: Use PREFIX.
1551 2004-12-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1554 * match.c (gfc_match_common): Skip whitespace.
1556 2004-12-12 Steven G. Kargl <kargls@comcast.net>
1559 * check.c (gfc_check_iand, gfc_check_ibclr, gfc_check_ibits,
1560 gfc_check_ibset, gfc_check_ieor, gfc_check_ior): Remove default
1561 integer kind check; Issue error for -std=f95 when needed.
1562 * intrinsic.c (add_functions): Change ieor from GFC_STD_GNU to
1564 * iresolve.c (gfc_resolve_iand, gfc_resolve_ieor, gfc_resolve_ior):
1565 Promote arguments to same kind.
1567 2004-12-12 Steven G. Kargl <kargls@comcast.net>
1568 Paul Brook <paul@codesourcery.com>
1571 * resolve.c (gfc_resolve_iterator_expr): New function.
1572 (gfc_resolve_iterator): Use it. Add real_ok argument. Convert
1573 start, end and stride to correct type.
1574 (resolve_code): Pass extra argument.
1575 * array.c (resolve_array_list): Pass extra argument.
1576 * gfortran.h (gfc_resolve): Add prototype.
1577 * trans-stmt.c (gfc_trans_do): Remove redundant type conversions.
1578 Handle real type iterators.
1580 2004-12-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1583 * iresolve.c (gfc_resolve_scale): Convert 'I' argument if not of
1584 same kind as C's 'int'.
1585 (gfc_resolve_set_exponent): Convert 'I' argument if not of kind 4.
1587 2004-12-08 Richard Henderson <rth@redhat.com>
1589 * intrinsic.c (gfc_convert_type_warn): Propagate the input shape
1590 to the output expression.
1591 * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift): Suppress
1593 (gfc_resolve_reshape): Force convert SHAPE and ORDER parameters
1596 2004-12-08 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1599 * resolve.c (resolve_code): Impose correct restrictions on
1602 * decl.c (gfc_match_end): Use locus of END when eos is an error.
1604 2004-12-02 Steven G. Kargl <kargls@comcast.net>
1605 Paul Brook <paul@codesourcery.com>
1607 * check.c (gfc_check_flush, gfc_check_fnum): New functions.
1608 (gfc_check_fstat, gfc_check_fstat_sub): New functions.
1609 (gfc_check_stat, gfc_check_stat_sub): New functions.
1610 * gfortran.h (GFC_ISYM_FNUM,GFC_ISYM_FSTAT,GFC_ISYM_STAT): New symbols
1611 * intrinsic.c (add_functions,add_subroutines): Add flush, fnum,
1612 fstat, and stat to intrinsics symbol tables.
1613 * intrinsic.h (gfc_check_flush, gfc_resolve_stat_sub): Add prototypes.
1614 (gfc_resolve_fstat_sub, gfc_resolve_stat): Ditto.
1615 * iresolve.c (gfc_resolve_fnum, gfc_resolve_fstat): New functions.
1616 (gfc_resolve_stat, gfc_resolve_flush): New functions.
1617 (gfc_resolve_stat_sub,gfc_resolve_fstat_sub): New functions
1618 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add new intrinsics.
1620 2004-12-02 Steven G. Kargl <kargls@comcast.net>
1622 * intrinsic.c: Fix and add comments, fix function declarations
1623 (OPTIONAL,REQUIRED): New symbols
1624 (add_functions,add_subroutines): Use symbols
1625 (gmp.h): Remove unused include
1627 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
1629 * f95-lang.c, gfortranspec.c, trans-decl.c: Avoid ` as left quote
1632 2004-11-24 Steven Bosscher <stevenb@suse.de>
1634 * options.c (gfc_post_options): Don't clear flag_inline_functions.
1636 2004-11-20 Steven G. Kargl <kargls@comcast.net>
1638 * check.c (gfc_check_getcwd_sub): Fix seg fault.
1640 * check.c (gfc_check_exit,gfc_check_umask,gfc_check_umask_sub,
1641 gfc_check_unlink,gfc_check_unlink_sub): New functions
1642 * gfortran.h (GFC_ISYM_UMASK,GFC_ISYM_UNLINK): New symbols
1643 * intrinsic.c (add_functions,add_subroutines): Add umask, unlink,
1644 exit to intrinsics symbol tables.
1645 * intrinsic.h (gfc_check_umask,gfc_check_unlink,gfc_check_exit,
1646 gfc_check_umask_sub,gfc_check_unlink_sub,gfc_resolve_umask,
1647 gfc_resolve_unlink,gfc_resolve_exit,gfc_resolve_umask_sub,
1648 gfc_resolve_unlink_sub): Add and sort prototypes.
1649 * iresolve.c (gfc_resolve_umask,gfc_resolve_unlink,gfc_resolve_exit,
1650 gfc_resolve_umask_sub,gfc_resolve_unlink_sub): New functions
1651 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbols
1653 2004-11-16 Paul Brook <paul@codesourcery.com>
1656 * trans-array.c (gfc_trans_allocate_temp_array): Use gfc_get_dtype.
1657 (gfc_array_init_size, gfc_conv_expr_descriptor): Ditto.
1658 * trans-types.c (gfc_get_dtype): Accept array type rather than element
1660 (gfc_get_nodesc_array_type): Don't set GFC_TYPE_ARRAY_DTYPE.
1661 (gfc_get_array_type_bounds): Ditto.
1662 (gfc_get_derived_type): Recurse into derived type pointers.
1663 * trans-types.h (gfc_get_dtype): Add prototype.
1664 * trans.h (GFC_TYPE_ARRAY_DTYPE): Add comment.
1666 2004-11-15 Paul Brook <paul@codesourcery.com>
1668 * trans-types.c (gfc_get_dtype): Remove obsolete TODO.
1670 2004-11-10 Paul Brook <paul@codesourcery.com>
1673 * trans-expr.c (gfc_trans_subarray_assign): Free shape before ss.
1674 * trans-io.c (transfer_array_component): Ditto.
1676 2004-11-10 Paul Brook <paul@codesourcery.com>
1678 * invoke.texi: Fix typo.
1680 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
1682 * arith.c, array.c, decl.c, expr.c, f95-lang.c, gfortran.h,
1683 gfortranspec.c, interface.c, intrinsic.c, iresolve.c, match.c,
1684 module.c, parse.c, parse.h, primary.c, resolve.c, scanner.c,
1685 trans-array.c, trans-array.h, trans-expr.c, trans-intrinsic.c,
1686 trans-io.c, trans-stmt.c, trans.h: Fix comment formatting.
1688 2004-11-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1691 * io.c (resolve_tag): Tighten up exception for assigned FORMAT.
1693 2004-11-06 Kazu Hirata <kazu@cs.umass.edu>
1695 * gfortranspec.c: Replace GNU CC with GCC.
1697 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1699 * gfortranspec.c (lang_specific_driver): Change year to 2004.
1701 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1704 * trans-decl.c (create_function_arglist): Set DECL_ARTIFICIAL for
1707 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1710 * trans-decl.c (gfc_finish_var_decl): Don't declare arguments to
1711 module procedures as if they were module variables.
1713 2004-11-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1718 * module.c (write_symbol1): Set module_name for dummy arguments.
1720 2004-11-02 Paul Brook <paul@codesourcery.com>
1722 * intrinsic.c (check_intrinsic_standard): Include error locus.
1724 (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Pass
1725 locus to check_intrinsic_standard.
1727 2004-10-31 Janne Blomqvist <jblomqvi@cc.hut.fi>
1730 * gfortran.h: Change GFC_STD_* flags to more appropriate
1731 ones. (struct gfc_intrinsic_isym): Add field for standard. (struct
1732 gfc_option_t): Add field for warning about use of nonstandard
1734 * intrinsic.c (add_sym): Add parameter for standard version, check
1735 this against current standard.
1736 (add_sym_0): Pass standard parameter to add_sym.
1737 (add_sym_1, add_sym_0s, add_sym_1s, add_sym_1m, add_sym_2): Ditto.
1738 (add_sym_2s, add_sym_3, add_sym_3ml, add_sym_3red, add_sym_3s): Ditto.
1739 (add_sym_4, add_sym_4s, add_sym_5, add_sym_5s): Ditto.
1740 (make_generic): Add parameter for standard, check this
1741 against currently selected standard.
1742 (add_functions, add_subroutines): Add parameter to tell which
1743 standard an intrinsic belongs to.
1744 (check_intrinsic_standard): New function.
1745 (gfc_intrinsic_func_interface): Add call to check_intrinsic_standard.
1746 (gfc_intrinsic_sub_interface): Ditto.
1747 * lang.opt: Add Wnonstd-intrinsics option.
1748 * options.c (gfc_init_options): Change to use new GFC_STD_* flags,
1750 (set_Wall): Add warning about nonstd intrinsics.
1751 (gfc_handle_option): Change to use new GFC_STD_* flags,
1753 * invoke.texi: Update manual to include -Wnonstd-intrinsics.
1755 2004-10-30 Andrew Pinski <pinskia@physics.uc.edu>
1757 * f95-lang.c (lang_tree_node): Add chain_next to be the TREE_CHAIN.
1759 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1761 * simplify.c (twos_complement): Calculate mask in GMP arithmetic.
1763 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1765 * trans.c (gfc_trans_code): Set global locus after recursing. Fix
1768 2004-10-30 Canqun Yang <canqun@nudt.edu.cn>
1770 * check.c (gfc_check_rand): Allow missing optional argument.
1771 (gfc_check_irand): Ditto.
1772 * intrinsic.c (add_functions): Set arg optional flag for {i,}rand.
1774 2004-10-28 Scott Robert Ladd <scott.ladd@coyotegulch.com>
1776 PR fortran/13490, PR fortran/17912
1777 * gcc/fortran/gfortran.h: Added pedantic_min_int to gfc_integer_info
1778 * gcc/fortran/gfortran.h: Added ARITH_ASYMMETRIC to arith
1779 * gcc/fortran/arith.c: Added support for an "asymmetric integer"
1780 warning when compiling with pedantic.
1781 * gcc/fortran/arith.c: Set minimum integer values to reflect
1782 realities of two's complement signed integers. Added
1785 2004-10-17 Andrew Pinski <pinskia@physics.uc.edu>
1787 * Make-lang.in (F95_ADDITIONAL_OBJS): Kill.
1788 (f951): Do not depend on F95_ADDITIONAL_OBJS and don't
1791 2004-10-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1793 * trans-decl.c (generate_local_decl): Simplify logic, fix comment
1795 (gfc_generate_function_code): Fix formatting issue.
1797 2004-10-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1799 * module.c: Fix formatting issues.
1801 2004-10-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1803 * module.c (mio_interface_rest): Set where member of interface
1806 2004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
1809 * options.c (gfc_handle_option): Add break after handing the
1812 2004-10-08 Tobias Schlueter <tobias.shclueter@physik.uni-muenchen.de>
1814 * arith.c: Fix formatting issues.
1816 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1819 * resolve.c (resolve_operator): Use correct operator name in message.
1821 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1823 * primary.c (match_boz_constant): Allow kind parameter suffixes.
1824 Move standard warning further to the front.
1826 2004-10-07 Kazu Hirata <kazu@cs.umass.edu>
1828 * trans-stmt.c: Fix a comment typo.
1830 2004-10-07 Paul Brook <paul@codesourcery.com>
1833 * trans-array.c (gfc_trans_deferred_array): Leave use associated
1836 2004-10-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1839 * simplify.c (twos_complement): New function.
1840 (gfc_simplify_ishft, gfc_simplify_ishftc): Revise.
1842 * simplify.c (gfc_simplify_abs): Use mpfr_hypot for CABS.
1844 2004-10-06 Paul Brook <paul@codesourcery.com>
1846 * trans-stmt.c (gfc_trans_simple_do): New function.
1847 (gfc_trans_do): Use it. Evaluate iteration bounds before entering
1848 loop. Update comments.
1850 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1853 * iresolve.c (gfc_resolve_pack): Choose function depending if mask
1857 * intrinsic.c (add_sym_5): Remove.
1858 (add_subroutines): Add resolution function for MVBITS.
1859 * intrinsic.h (gfc_resolve_mvbits): Declare resolution function for
1861 * iresolve.c (gfc_resolve_mvbits): New function.
1862 (gfc_resolve_random_number): Remove empty line at end of function.
1864 * trans-const.c (gfc_build_cstring_const): New function.
1865 (gfc_init_cst): Use new function.
1866 * trans-const.h (gfc_build_cstring_const): Add prototype.
1867 * trans-io.c (set_string, set_error_locus): Use new function.
1868 * trans-stmt.c (gfc_trans_goto): Use new function.
1871 * parse.c (accept_statement): Don't treat END DO like END IF and
1873 (parse_do_block): Generate possible END DO label inside END DO
1877 * check.c (gfc_check_system_sub): New function.
1878 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SYSTEM.
1879 * intrinsic.c (add_functions): Add 'system'.
1880 (add_subroutines): Add 'system'.
1881 * intrinsic.h (gfc_check_etime_sub, gfc_check_getcwd_sub):
1882 Move prototypes to other suborutines.
1883 (gfc_check_system_sub, gfc_resolve_system, gfc_resolve_system_sub):
1885 (gfc_resolve_system_clock): Fix formatting of prototype.
1886 * iresolve.c (gfc_resolve_system, gfc_resolve_system_sub): New
1888 * trans-intrinsic.c (gfc_conv_intrinsic_function): Deal with
1891 2004-10-04 Erik Schnetter <schnetter@aei.mpg.de>
1893 * scanner.c (preprocessor_line): Accept preprocessor lines without
1894 file names. Check file names for closing quotes. Handle escaped
1895 quotes in file names.
1897 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1898 Paul Brook <paul@codesourcery.com>
1900 * trans-array.c (gfc_conv_expr_descriptor): Check for substriungs.
1901 Use gfc_get_expr_charlen.
1902 * trans-expr.c (gfc_get_expr_charlen): New function.
1903 * trans.h (gfc_get_expr_charlen): Add prototype.
1905 2004-10-04 Kazu Hirata <kazu@cs.umass.edu>
1907 * trans-intrinsic.c: Fix a comment typo.
1909 2004-10-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1911 * simplify.c (range_check): Remove blank line at beginning of function.
1912 (gfc_simplify_dint): Same at end of function.
1913 (gfc_simplify_exponent, gfc_simplify_fraction): Simplify calculations.
1914 (gfc_simplify_bound): Fix indentation.
1915 (gfc_simplify_log10): Simplify calculation.
1916 (gfc_simplify_min, gfc_simplify_max): Remove blank line at beginning
1918 (gfc_simplify_nearest): Same at end of function.
1919 (gfc_simplify_nint, gfc_simplify_idnint): Same at beginning of
1921 (gfc_simplify_rrspacing, gfc_simplify_set_exponent,
1922 gfc_simplify_spacing): Simplify calulations.
1924 2004-10-03 Feng Wang <fengwang@nudt.edu.cn>
1926 * trans-intrinsic.c: Fix comments on spacing and rrspacing
1927 (gfc_conv_intrinsic_rrspacing): Add fold on constant trees.
1929 2004-10-01 Jan Hubicka <jh@suse.cz>
1931 * f95-lang.c (gfc_expand_function): Update call of
1932 tree_rest_of_compilation.
1933 * trans-decl.c (gfc_generate_constructors): Likewise.
1935 2004-09-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1937 * trans-intrinsic.c: Comment fixes.
1939 2004-09-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1941 * decl.c (add_init_expr_to_sym, variable_decl): Comment fixes.
1943 2004-09-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1945 * trans-types.c (gfc_return_by_reference): Remove superfluous
1948 * intrinsic.h (gfc_resolve_getcwd): Update prototype.
1949 * iresolve.c (gfc_resolve_getcwd): Add second argument to function.
1952 * trans-expr.c (gfc_trans_arrayfunc_assign): Look at resolved
1953 function to determine return type.
1955 2004-09-20 Jan Hubicka <jh@suse.cz>
1957 * trans-decl.c (build_entry_thunks): Finalize the function; do not lower
1959 (gfc_generate_function_code): Likewise.
1961 2004-09-20 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1964 * simplify.c (gfc_simplify_reshape): Set shape of return value
1967 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
1968 Zack Weinberg <zack@codesourcery.com>
1970 * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class
1971 enumeration constants.
1973 2004-09-17 Paul Brook <paul@codesourcery.com>
1975 * gfortran.h (struct gfc_linebuf): Don't use C99 empty arrays.
1976 (gfc_linebuf_header_size): Define.
1977 * scanner.c (load_file): Use it.
1979 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
1981 * array.c, data.c, decl.c, dependency.c, error.c, f95-lang.c,
1982 interface.c, intrinsic.c, io.c, misc.c, module.c, parse.h,
1983 resolve.c, scanner.c, trans-array.c, trans-array.h,
1984 trans-common.c, trans-const.h, trans-decl.c, trans-expr.c,
1985 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
1986 trans.h: Fix comment typos. Follow spelling conventions.
1988 2004-09-16 Victor Leikehman <lei@il.ibm.com>
1991 * trans-io.c (transfer_array_component): New function.
1992 (transfer_expr): For array fields, call transfer_array_component.
1994 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
1996 * gfortran.texi: Fix a typo.
1998 2004-09-15 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
2000 * parse.c (eof_buf): Rename eof to eof_buf.
2001 (unexpected_eof): Same.
2002 (gfc_parse_file): Same.
2004 2004-09-15 Steven G. Kargl <kargls@comcast.net>
2006 * check.c (gfc_check_getcwd_sub): New function.
2007 * gfortran.h (GFC_ISYM_GETCWD): New symbol.
2008 * intrinsic.c (add_functions): Add function definition;
2010 * intrinsic.c (add_subroutines): Add subroutine definitions.
2011 * intrinsic.h: Add prototypes.
2012 * iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub):
2014 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol.
2016 2004-09-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2019 * module.c (write_symbol): Don't fill in module name here.
2020 (write_symbol0): Fill in here instead.
2022 2004-09-14 Kazu Hirata <kazu@cs.umass.edu>
2024 * data.c, decl.c, f95-lang.c, gfortran.h, match.c,
2025 trans-array.c, trans-common.c, trans-expr.c,
2026 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.h: Fix
2027 comment typos. Follow spelling conventions.
2029 2004-09-09 Paul Brook <paul@codesourcery.com>
2031 * scanner.c (get_file): Add ATTRIBUTE_UNUSED.
2033 2004-09-08 Paul Brook <paul@codesourcery.com>
2035 * array.c: Don't include assert.h.
2036 * data.c: Don't include assert.h. Replace assert and abort with
2037 gcc_assert and gcc_unreachable.
2038 * dependency.c: Ditto.
2039 * f95-lang.c: Ditto.
2040 * iresolve.c: Ditto.
2042 * simplify.c: Ditto.
2044 * trans-array.c: Ditto.
2045 * trans-common.c: Ditto.
2046 * trans-const.c: Ditto.
2047 * trans-decl.c: Ditto.
2048 * trans-expr.c: Ditto.
2049 * trans-intrinsic.c: Ditto.
2050 * trans-io.c: Ditto.
2051 * trans-stmt.c: Ditto.
2052 * trans-types.c: Ditto.
2055 2004-09-07 Per Bothner <per@bothner.com>
2056 Paul Brook <paul@codesourcery.com>
2058 * error.c (show_locus): Handle mapped locations.
2059 * f95-lang.c (gfc_be_parse_file): Initialize mapped locations.
2060 * gfortran.h: Include input.h.
2061 (struct gfc_linebuf): Use source_location.
2062 * scanner.c (get_file): Initialize linemap.
2063 (preprocessor_line): Pass extra argument to get_file.
2064 (load_file): Ditto. Setup linemap.
2065 (gfc_new_file): Handle mapped locations.
2066 * trans-common.c (build_field, build_equiv_decl, build_common_decl):
2067 Set decl source locations.
2068 (gfc_trans_common): Set blank common block location.
2069 * trans-decl.c (gfc_set_decl_location): New function.
2070 (gfc_get_label_decl, gfc_get_symbol_decl): Use it.
2071 (trans_function_start): Move call to gfc_set_backend_locus..
2072 (build_function_decl): ... to here.
2073 (build_entry_thunks): Set and restore the backend locus.
2074 (gfc_generate_constructors): Remove excess arguments to
2075 init_function_start.
2076 (gfc_generate_block_data): Add comments. Set the decl locus.
2077 * trans-io.c (set_error_locus): Handle mapped locations.
2078 * trans.c (gfc_get_backend_locus, gfc_get_backend_locus): Ditto.
2079 (gfc_trans_code): Use SET_EXPR_LOCATION.
2080 (gfc_generate_code): Override the location of the new symbol.
2081 * trans.h (gfc_set_decl_location): Add prototype.
2083 2004-08-31 Paul Brook <paul@codesourcery.com>
2085 * trans-types.c (gfc_type_for_mode): Return NULL for unknown modes.
2087 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2090 * trans-intrinsic.c (gfc_conv_intrinsic_merge): Do the right thing for
2093 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2098 * resolve.c (resolve_transfer): New function.
2099 (resolve_code): Call resolve_transfer in case of EXEC_TRANSFER.
2101 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2104 * trans-types.c (gfc_init_types): Make gfc_character1_type_node an
2107 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2109 * CONTRIB, NEWS, README, TODO: Remove obsolete files.
2111 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2114 * trans-types.c (gfc_return_by_reference): Remove TODO error,
2115 add comment pointing out possible issue WRT compatibility with g77.
2117 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2119 * trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace
2120 all occurences of 'gfc_strlen_type_node' by
2121 'gfc_charlen_type_node'.
2122 * trans-types.h: Same. Also update comment accordingly.
2124 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2126 * primary.c: Update copyright boilerplate to say GCC.
2127 * f95-lang.c: Change initial comment to say gfortran.
2129 2004-08-31 Paul Brook <paul@codesourcery.com>
2131 * trans-types.h: Add comments.
2132 (intmax_type_node, string_type_node, const_string_type_node): Remove.
2134 2004-08-30 Richard Henderson <rth@redhat.com>
2136 * Make-lang.in (fortran/f95-lang.o): Update dependencies.
2137 (fortran/trans-decl.o, fortran/trans-types.o): Likewise.
2138 * gfortran.h (gfc_integer_info): Add c_char, c_short, c_int,
2139 c_long, c_long_long.
2140 (gfc_logical_info): Add c_bool.
2141 (gfc_real_info): Add mode_precision, c_float, c_double, c_long_double.
2142 * trans-array.c (gfc_array_allocate): Use TYPE_PRECISION
2143 rather than gfc_int[48]_type_node for allocate choice.
2144 * trans-decl.c (gfc_build_intrinsic_function_decls): Cache
2145 local copies of some kind type nodes.
2146 (gfc_build_builtin_function_decls): Likewise.
2147 * trans-expr.c (gfc_conv_power_op): Likewise.
2148 * trans-intrinsic.c (gfc_conv_intrinsic_index,
2149 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify,
2150 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Likewise.
2151 * trans-stmt.c (gfc_trans_pause, gfc_trans_stop,
2152 gfc_trans_character_select, gfc_trans_allocate): Likewise.
2153 * trans-io.c (gfc_pint4_type_node): Move into ...
2154 (gfc_build_io_library_fndecls): ... here. Cache local copies of
2155 some kind type nodes.
2156 * trans-types.c (gfc_type_nodes): Remove.
2157 (gfc_character1_type_node, gfc_strlen_type_node): New.
2158 (gfc_integer_types, gfc_logical_types): New.
2159 (gfc_real_types, gfc_complex_types): New.
2160 (gfc_init_kinds): Fill in real mode_precision.
2161 (gfc_build_int_type, gfc_build_real_type): New.
2162 (gfc_build_complex_type, gfc_build_logical_type): New.
2163 (c_size_t_size): New.
2164 (gfc_init_types): Loop over kinds.
2165 (gfc_get_int_type, gfc_get_real_type): Use gfc_validate_kind.
2166 (gfc_get_complex_type, gfc_get_logical_type): Likewise.
2167 (gfc_get_character_type_len): Likewise.
2168 (gfc_type_for_size): Loop over kinds; use a reduced set of
2169 unsigned type nodes.
2170 (gfc_type_for_mode): Loop over kinds.
2171 (gfc_signed_or_unsigned_type): Use gfc_type_for_size.
2172 (gfc_unsigned_type, gfc_signed_type): Use gfc_signed_or_unsigned_type.
2173 * trans-types.h (F95_INT1_TYPE, F95_INT2_TYPE, F95_INT4_TYPE,
2174 F95_INT8_TYPE, F95_INT16_TYPE, F95_REAL4_TYPE, F95_REAL8_TYPE,
2175 F95_REAl16_TYPE, F95_COMPLEX4_TYPE, F95_COMPLEX8_TYPE,
2176 F95_COMPLEX16_TYPE, F95_LOGICAL1_TYPE, F95_LOGICAL2_TYPE,
2177 F95_LOGICAL4_TYPE, F95_LOGICAL8_TYPE, F95_LOGICAL16_TYPE,
2178 F95_CHARACTER1_TYPE, NUM_F95_TYPES, gfc_type_nodes,
2179 gfc_int1_type_node, gfc_int2_type_node, gfc_int4_type_node,
2180 gfc_int8_type_node, gfc_int16_type_node, gfc_real4_type_node,
2181 gfc_real8_type_node, gfc_real16_type_node, gfc_complex4_type_node,
2182 gfc_complex8_type_node, gfc_complex16_type_node,
2183 gfc_logical1_type_node, gfc_logical2_type_node,
2184 gfc_logical4_type_node, gfc_logical8_type_node,
2185 gfc_logical16_type_node, gfc_strlen_kind): Remove.
2186 (gfc_character1_type_node): Turn in to a variable.
2187 (gfc_strlen_type_node): Likewise.
2189 2004-08-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2191 * gfortran.h (gfc_namespace): Add new field is_block_data.
2192 * parse.c (accept_statement): Remove special handling for BLOCK DATA.
2193 (parse_block_data): Record BLOCK DATA name, set is_block_data field.
2194 * trans.c (gfc_generate_code): Handle BLOCK DATA units.
2195 * trans.h (gfc_generate_block_data): Add prototype.
2196 * trans-decl.c (gfc_generate_block_data): New function.
2198 2004-08-29 Richard Henderson <rth@redhat.com>
2200 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_export.
2201 * trans-types.c (gfc_init_kinds): Reject integer kinds larger
2202 than two HOST_WIDE_INT.
2204 2004-08-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2207 * decl.c (free_variable, free_value, gfc_free_data, var_list,
2208 var_element, top_var_list, match_data_constant, top_val_list,
2209 gfc_match_data): Move here from match.c.
2210 (match_old_style_init): New function.
2211 (variable_decl): Match old-style initialization.
2212 * expr.c (gfc_get_variable_expr): New function.
2213 * gfortran.h (gfc_get_variable_expr): Add prototype.
2214 * gfortran.texi: Start documentation for supported extensions.
2215 * match.c: Remove the functions moved to decl.c.
2216 * match.h (gfc_match_data): Move prototype to under decl.c.
2217 * symbol.c (gfc_find_sym_tree, gfc_find_symbol): Add/correct
2220 2004-08-29 Steven G. Kargl <kargls@comcast.net>
2221 Paul Brook <paul@codesourcery.com>
2223 * check.c (gfc_check_besn, gfc_check_g77_math1): New functions.
2224 * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Define.
2225 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
2226 (build_builtin_fntypes): New function.
2227 (gfc_init_builtin_functions): Use it.
2228 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_{J,Y}{0,1,N}
2229 and GFC_ISYM_ERF{,C}.
2230 (gfc_c_int_kind): Declare.
2231 * intrinsic.c (add_functions): Add [d]bes* and [d]erf*.
2232 * intrinsic.h (gfc_check_besn, gfc_check_g77_math1, gfc_resolve_besn,
2233 gfc_resolve_g77_math1): Add prototypes.
2234 * resolve.c (gfc_resolve_besn, gfc_resolve_g77_math1): New functions.
2235 * mathbuiltins.def: Add comment. Change third argument. Use
2236 DEFINE_MATH_BUILTIN_C. Add bessel and error functions.
2237 * trans-intrinsic.c (BUILT_IN_FUNCTION): Define.
2238 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
2239 * trans-types.c (gfc_c_int_kind): Declare.
2240 (gfc_init_kinds): Set it.
2242 2004-08-29 Steven G. Kargl <kargls@comcast.net>
2243 Paul Brook <paul@codesourcery.com>
2245 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
2246 (gfc_check_f, gfc_simplify_f): Add f0.
2247 * intrinsic.c (do_check): Call f0. Flatten.
2248 (add_sym_0): Fix prototype. Set f0.
2249 (add_functions): Add getgid, getgid and getuid.
2250 (resolve_intrinsic): Remove obsolete comment.
2251 (do_simplify): Call f0.
2252 * intrinsic.h (gfc_resolve_getgid, gfc_resolve_getpid,
2253 gfc_resolve_getuid): Add prototypes.
2254 * iresolve.c (gfc_resolve_getgid, gfc_resolve_getpid,
2255 gfc_resolve_getuid): New functions.
2256 * trans-intrinsic.c (gfc_conv_intrinsic_function): Handle
2259 2004-08-28 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2261 * error.c (gfc_error_init_1): Remove blank line in front of
2262 function body. Add missing blank.
2263 (gfc_buffer_error, error_char, error_string): Remove blank line in
2264 front of function body.
2265 (show_locus): Add comma in comment.
2266 (gfc_clear_warning, gfc_warning_check, gfc_clear_error,
2267 gfc_push_error, gfc_pop_error): Remove blank line in front of
2269 (gfc_get_errors): Typo fix in comment in front of function. Remove
2270 blank line in front of function body.
2272 2004-08-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2274 * gfortran.h (gfc_default_*_kind): Remove prototypes, add extern
2275 variable declaration of same name.
2276 * arith.c, check.c, decl.c, dump_parse_tree.c, expr.c,
2277 intrinsic.c, io.c, iresolve.c, match.c, options.c, primary.c,
2278 resolve.c, simplify.c, symbol.c, trans-const.c, trans-io.c:
2279 Replace all calls to gfc_default_*_kind with variable accesses.
2280 * trans-types.c: Same as above.
2281 (gfc_default_*_kind_1): Rename to gfc_default_*_kind, remove
2282 static qualifier. Replace all occurences.
2283 (gfc_default_*_kind): Remove functions.
2285 2004-08-26 Richard Henderson <rth@redhat.com>
2287 * arith.c: Include system.h, not real system headers.
2288 (MPZ_NULL, MPF_NULL, DEF_GFC_INTEGER_KIND, DEF_GFC_LOGICAL_KIND,
2289 DEF_GFC_REAL_KIND, GFC_SP_KIND, GFC_SP_PREC, GFC_SP_EMIN, GFC_SP_EMAX,
2290 GFC_DP_KIND, GFC_DP_PREC, GFC_DP_EMIN, GFC_DP_EMAX, GFC_QP_KIND,
2291 GFC_QP_PREC, GFC_QP_EMIN, GFC_QP_EMAX): Remove.
2292 (gfc_integer_kinds, gfc_logical_kinds, gfc_real_kinds,
2293 gfc_index_integer_kind, gfc_default_integer_kind,
2294 gfc_default_real_kind,gfc_default_double_kind,
2295 gfc_default_character_kind, gfc_default_logical_kind,
2296 gfc_default_complex_kind, validate_integer, validate_real,
2297 validate_logical, validate_character,
2298 gfc_validate_kind): Move to trans-types.c.
2299 (gfc_set_model_kind): Use gfc_validate_kind.
2300 (gfc_set_model): Just copy the current precision to default.
2301 (gfc_arith_init_1): Use mpfr precision 128 for integer setup.
2302 * f95-lang.c (gfc_init_decl_processing): Invoke gfc_init_kinds.
2303 * gfortran.h: Update file commentary.
2304 * trans-types.c (MAX_INT_KINDS, MAX_REAL_KINDS): New.
2305 (gfc_default_integer_kind_1, gfc_default_real_kind_1,
2306 gfc_default_double_kind_1, gfc_default_character_kind_1,
2307 gfc_default_logical_kind_1, gfc_default_complex_kind_1): New.
2308 (gfc_init_kinds): New.
2309 (gfc_init_types): Don't set gfc_index_integer_kind here.
2310 * trans-types.h (gfc_init_kinds): Declare.
2311 * doc/invoke.texi: Clarify DOUBLE PRECISION behaviour wrt -r8.
2313 2004-08-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2315 * check.c (gfc_check_atan2): New function.
2316 * intrinsic.c (add_functions): Use gfc_check_atan2 for ATAN2
2317 * intrinsic.h (gfc_check_atan2): Add prototype.
2319 2004-08-25 Richard Henderson <rth@redhat.com>
2321 * arith.c (gfc_validate_kind): Add may_fail argument; abort if
2322 false and we don't validate the kind.
2323 (gfc_check_integer_range, gfc_check_real_range): Update to match.
2324 * check.c (kind_check): Likewise.
2325 * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Likewise.
2326 (match_char_spec, match_logical_spec): Likewise.
2327 * gfortran.h (gfc_validate_kind): Likewise.
2328 * options.c (gfc_handle_option): Likewise.
2329 * primary.c (match_integer_constant, match_real_constant,
2330 match_string_constant, match_logical_constant,
2331 match_const_complex_part): Likewise.
2332 * simplify.c (get_kind, gfc_simplify_bit_size, gfc_simplify_digits,
2333 gfc_simplify_epsilon, gfc_simplify_huge, gfc_simplify_ibclr,
2334 gfc_simplify_ibset, gfc_simplify_ishft, gfc_simplify_ishftc,
2335 gfc_simplify_maxexponent, gfc_simplify_minexponent,
2336 gfc_simplify_nearest, gfc_simplify_not, gfc_simplify_precision,
2337 gfc_simplify_radix, gfc_simplify_range, gfc_simplify_rrspacing,
2338 gfc_simplify_scale, gfc_simplify_spacing, gfc_simplify_tan,
2339 gfc_simplify_tiny): Likewise.
2340 * trans-intrinsic.c (gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod,
2341 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
2342 prepare_arg_info): Likewise.
2344 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2346 * expr.c (gfc_check_assign): Add comment. Add new warning.
2347 * trans-expr.c (gfc_conv_function_call): Correctly dereference
2348 result of pointer valued function when not in pointer assignment.
2350 2004-08-25 Paul Brook <paul@codesourcery.com>
2352 * config-lang.in: Remove dead commented line.
2353 * module.c: Replace g95 with gfortran in comment.
2355 2004-08-25 Paul Brook <paul@codesourcery.com>
2358 * arith.c (gfc_mpfr_to_mpz): Workaround mpfr bug.
2360 2004-08-25 Paul Brook <paul@codesourcery.com>
2363 * trans-array.c (gfc_trans_allocate_temp_array): Remove
2364 string_length argument.
2365 (gfc_trans_array_ctor_element): New function.
2366 (gfc_trans_array_constructor_subarray): Use it.
2367 (gfc_trans_array_constructor_value): Ditto. Handle constant
2369 (get_array_ctor_var_strlen, get_array_ctor_strlen): New functions.
2370 (gfc_trans_array_constructor): Use them.
2371 (gfc_add_loop_ss_code): Update to new gfc_ss layout.
2372 (gfc_conv_ss_descriptor): Remember section string length.
2373 (gfc_conv_scalarized_array_ref): Ditto. Remove dead code.
2374 (gfc_conv_resolve_dependencies): Update to new gfc_ss layout.
2375 (gfc_conv_expr_descriptor): Ditto.
2376 (gfc_conv_loop_setup): Ditto. Spelling fixes.
2377 * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
2378 * trans-const.c (gfc_conv_constant): Update to new gfc_ss layout.
2379 * trans-expr.c (gfc_conv_component_ref): Turn error into ICE.
2380 (gfc_conv_variable): Set string_length from section.
2381 (gfc_conv_function_call): Remove extra argument.
2382 (gfc_conv_expr, gfc_conv_expr_reference): Update to new gfc_ss layout.
2383 * trans-types.c (gfc_get_character_type_len): New function.
2384 (gfc_get_character_type): Use it.
2385 (gfc_get_dtype): Return zero for internal types.
2386 * trans-types.h (gfc_get_character_type_len): Add prototype.
2387 * trans.h (struct gfc_ss): Move string_length out of union.
2389 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2391 * trans.h (build2_v, build3_v): New macros.
2393 * f95-lang.c (gfc_truthvalue_conversion): Use build2 instead of
2395 * trans-array.c (gfc_conv_descriptor_data,
2396 gfc_conv_descriptor_offset, gfc_conv_descriptor_dimension,
2397 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
2398 gfc_conv_descriptor_ubound, gfc_trans_allocate_array_storage,
2399 gfc_trans_allocate_temp_array,
2400 gfc_trans_array_constructor_subarray,
2401 gfc_trans_array_constructor_value, gfc_conv_array_index_ref,
2402 gfc_trans_array_bound_check, gfc_conv_array_index_offset,
2403 gfc_conv_scalarized_array_ref, gfc_conv_array_ref,
2404 gfc_conv_array_ref, gfc_trans_preloop_setup,
2405 gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
2406 gfc_conv_loop_setup, gfc_array_init_size,
2407 gfc_conv_array_initializer, gfc_trans_array_bounds,
2408 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
2409 gfc_conv_expr_descriptor, gfc_conv_array_parameter,
2410 gfc_trans_deferred_array): Use buildN and buildN_v macros instead
2411 of build and build_v as appropriate.
2412 * trans-common.c (create_common): Same.
2413 * trans-decl.c (gfc_trans_auto_character_variable,
2414 gfc_trans_entry_master_switch, gfc_generate_function_code): Same.
2415 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
2416 gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
2417 gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
2418 gfc_conv_expr_op, gfc_conv_function_call,
2419 gfc_trans_structure_assign): Same.
2420 * trans-intrinsic.c (build_fixbound_expr, build_round_expr,
2421 gfc_conv_intrinsic_aint, gfc_conv_intrinsic_bound,
2422 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
2423 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
2424 gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_minmax,
2425 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
2426 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_minmaxloc,
2427 gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
2428 gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_singlebitop,
2429 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
2430 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_strcmp,
2431 gfc_conv_allocated, gfc_conv_associated, prepare_arg_info,
2432 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
2433 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat,
2434 gfc_conv_intrinsic_iargc): Same.
2435 * trans-io.c (set_parameter_value, set_parameter_ref, set_string,
2436 set_flag, add_case, io_result, transfer_namelist_element,
2437 transfer_expr): Same.
2438 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_if_1,
2439 gfc_trans_arithmetic_if, gfc_trans_do, gfc_trans_do_while,
2440 gfc_trans_integer_select, gfc_trans_logical_select,
2441 gfc_trans_character_select, gfc_trans_forall_loop,
2442 gfc_trans_nested_forall_loop, gfc_do_allocate,
2443 generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
2444 compute_inner_temp_size, compute_overall_iter_number,
2445 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
2446 gfc_trans_forall_1, gfc_evaluate_where_mask,
2447 gfc_trans_where_assign, gfc_trans_allocate): Same.
2448 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Same.
2449 * trans.c (gfc_add_modify_expr, gfc_finish_block,
2450 gfc_build_array_ref, gfc_build_function_call,
2451 gfc_trans_runtime_check): Same.
2453 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2455 * trans-const.c (gfc_conv_mpz_to_tree): Change call to
2456 build_int_cst to build_int_cst_wide in accordance to Nathan's
2459 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
2461 * trans-array.c (gfc_trans_array_constructor_value): Adjust
2462 build_int_cst calls.
2463 * trans-const.c (gfc_build_string_const, gfc_init_constants,
2464 gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise.
2465 * trans-decl.c (gfc_get_symbol_decl, build_entry_thunks,
2466 gfc_trans_entry_master_switch): Likewise.
2467 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
2468 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
2469 * trans-io.c (add_case, set_error_locus,
2470 transfer_namelist_element, transfer_expr): Likewise.
2471 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
2472 gfc_trans_stop, gfc_trans_character_select): Likewise.
2473 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
2474 * trans.c (gfc_trans_runtime_check): Likewise.
2476 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2478 * trans-decl.c, trans-types.c: Add and remove blank lines as
2481 2004-08-24 Richard Henderson <rth@redhat.com>
2483 * trans-const.c (gfc_conv_mpz_to_tree): Fix 64-bit shift warning.
2485 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2487 * resolve.c (merge_argument_lists): Revert unintentionally
2490 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2492 * trans-decl.c (build_function_decl): Fix spelling in comment.
2493 (build_entry_thunks): Remove code with no function.
2494 (gfc_build_intrinsic_function_decls): Remove empty line.
2496 * resolve.c (resolve_entries): Fix a bunch of comment typos.
2498 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
2500 * f95-lang.c (gfc_init_decl_processing): Adjust
2501 build_common_tree_nodes call.
2503 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2505 * trans-types.c: Spelling and formatting fixes.
2507 2004-08-23 Richard Henderson <rth@redhat.com>
2509 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_getlimbn instead
2510 of going through an intermediate string. Fix 32/64 int/long bug.
2512 2004-08-23 Eric Christopher <echristo@redhat.com>
2514 * trans-types.c (gfc_type_for_mode): Remove VECTOR_TYPE_SUPPORTED_P
2515 usage. Use build_vector_type_for_mode for vector types.
2517 2004-08-22 Richard Henderson <rth@redhat.com>
2520 * data.c (find_con_by_offset): Search ordered list; handle
2521 elements with repeat counts.
2522 (gfc_assign_data_value_range): New.
2523 * gfortran.h (struct gfc_data_value): Make repeat unsigned.
2524 (gfc_assign_data_value_range): Declare.
2525 * match.c (top_val_list): Extract repeat count into a temporary.
2526 * resolve.c (values): Make left unsigned.
2527 (next_data_value): Don't decrement left.
2528 (check_data_variable): Use gfc_assign_data_value_range.
2530 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2532 * trans-const.c, trans-decl.c, trans-expr.c: Spelling fixes.
2534 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2536 * check.c (gfc_check_reduction): Rename to ...
2537 (check_reduction): ... this. Make static. Don't check type of
2539 (gfc_check_minval_maxval, gfc_check_prodcut_sum): New functions.
2540 * intrinsic.c (add_functions): Change MAXVAL, MINVAL, PRODUCT and
2541 SUM to use new check functions.
2542 (check_specific): Change logic to call new functions.
2543 * intrinsic.h (gfc_check_minval_maxval, gfc_check_product_sum):
2545 (gfc_check_reduction): Remove prototype.
2547 2004-08-20 Paul Brook <paul@codesourcery.com>
2548 Canqun Yang <canqun@nudt.edu.cn>
2551 * trans-array.c (gfc_conv_array_parameter): Pass correct pointer
2552 for automatic arrays.
2553 * trans-types.c (gfc_get_nodesc_array_type): Add comment.
2555 2004-08-19 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2559 * match.c (match_simple_forall, match_simple_where): Forward-declare.
2560 (gfc_match_if): Order statement list alphabetically, add WHERE and
2561 FORALL, remove double PAUSE.
2562 (gfc_match_simple_where, match_forall_header,
2563 gfc_match_simple_forall): New functions.
2564 (gfc_match_forall): Use match_forall_header.
2566 2004-08-19 Paul Brook <paul@codesourcery.com>
2569 * gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0.
2570 * symbol.c (gfc_clear_attr): Use memset.
2572 2004-08-19 Paul Brook <paul@codesourcery.com>
2576 * data.c (assign_substring_data_value): Remove.
2577 (create_character_intializer): New function.
2578 (gfc_assign_data_value): Track the typespec for the current
2579 subobject. Use create_character_intializer.
2581 2004-08-19 Erik Schnetter <schnetter@aei.mpg.de>
2584 * check.c (gfc_check_reduction): New function.
2585 (gfc_check_minval_maxval): Removed.
2586 (gfc_check_product): Removed.
2587 (gfc_check_sum): Removed.
2588 * intrinsic.h: Add/remove declarations for these.
2589 * gfortran.h: Add field f3red to union gfc_check_f.
2590 * intrinsic.c (add_sym_3red): New function.
2591 (add_functions): Register maxval, minval, product, and sum intrinsics
2592 through add_sym_3red.
2593 (check_specific): Handle f3red union field.
2594 * iresolve.c: Whitespace change.
2596 2004-08-18 Paul Brook <paul@codesourcery.com>
2598 * trans-types.c (gfc_sym_type): Use pointer types for optional args.
2600 2004-08-18 Victor Leikehman <lei@il.ibm.com>
2603 * trans-io.c (transfer_namelist_element): New. Recursively handle
2604 derived-type variables. Pass string lengths.
2605 (build_dt): Code moved to build_namelist, with some
2606 changes and additions.
2607 (gfc_build_io_library_fndecls): Declare the fifth
2608 argument in st_set_nml_var_char -- string_length.
2610 2004-08-17 Paul Brook <paul@codesourcery.com>
2611 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2614 * decl.c (get_proc_name): Update mystery comment.
2615 (gfc_match_entry): Check for errors earlier. Add entry point to list.
2616 * dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes.
2617 * gfortran.h (symbol_attribute): Add entry_master. Document entry.
2618 (struct gfc_entry_list): Define.
2619 (gfc_get_entry_list): Define.
2620 (struct gfc_namespace): Add refs and entries.
2621 (enum gfc_exec_op): Add EXEC_ENTRY.
2622 (struct gfc_code): Add ext.entry.
2623 * module.c (ab_attribute, attr_bits): Remove AB_ENTRY.
2624 (mio_symbol_attribute): Don't save/reture addr->entry.
2625 (mio_namespace_ref): Refcount namespaces.
2626 * parse.c (accept_statement): Handle ST_ENTRY.
2627 (gfc_fixup_sibling_symbols): Mark symbol as referenced.
2628 (parse_contained): Fixup sibling references to entry points
2629 after parsing the procedure body.
2630 * resolve.c (resolve_contained_fntype): New function.
2631 (merge_argument_lists, resolve_entries): New functions.
2632 (resolve_contained_functions): Use them.
2633 (resolve_code): Handle EXEC_ENTRY.
2634 (gfc_resolve): Call resolve_entries.
2635 * st.c (gfc_free_statement): Handle EXEC_ENTRY.
2636 * symbol.c (gfc_get_namespace): Refcount namespaces.
2637 (gfc_free_namespace): Ditto.
2638 * trans-array.c (gfc_trans_dummy_array_bias): Treat all args as
2639 optional when multiple entry points are present.
2640 * trans-decl.c (gfc_get_symbol_decl): Remove incorrect check.
2641 (gfc_get_extern_function_decl): Add assertion. Fix coment.
2642 (create_function_arglist, trans_function_start, build_entry_thunks):
2644 (gfc_build_function_decl): Rename ...
2645 (build_function_decl): ... to this.
2646 (gfc_create_function_decl): New function.
2647 (gfc_generate_contained_functions): Use it.
2648 (gfc_trans_entry_master_switch): New function.
2649 (gfc_generate_function_code): Use new functions.
2650 * trans-stmt.c (gfc_trans_entry): New function.
2651 * trans-stmt.h (gfc_trans_entry): Add prototype.
2652 * trans-types.c (gfc_get_function_type): Add entry point argument.
2653 * trans.c (gfc_trans_code): Handle EXEC_ENTRY.
2654 (gfc_generate_module_code): Call gfc_create_function_decl.
2655 * trans.h (gfc_build_function_decl): Remove.
2656 (gfc_create_function_decl): Add prototype.
2658 2004-08-15 Andrew Pinski <apinski@apple.com>
2661 * f95-lang.c (gfc_init_builtin_functions): Initialize the builtins
2662 for cabs{,f} and copysign{,f}.
2663 * trans-decl.c (gfor_fndecl_math_cabsf): Delete.
2664 (gfor_fndecl_math_cabs): Delete.
2665 (gfor_fndecl_math_sign4): Delete.
2666 (gfor_fndecl_math_sign8): Delete.
2667 (gfc_build_intrinsic_function_decls): Remove the
2668 initializing of cabs{,f} and copysign{,f} functions.
2669 * trans-intrinsic.c (gfc_conv_intrinsic_abs): Use the builtins
2670 instead of the functions definitions.
2671 (gfc_conv_intrinsic_sign): Likewise.
2672 * trans.h (gfor_fndecl_math_cabsf): Delete.
2673 (gfor_fndecl_math_cabs): Delete.
2674 (gfor_fndecl_math_sign4): Delete.
2675 (gfor_fndecl_math_sign8): Delete.
2677 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
2679 * trans-array.c (gfc_trans_array_constructor_value): Use
2681 * trans-const.c (gfc_build_string_const,
2682 gfc_init_constants, gfc_conv_mpz_to_tree,
2683 gfc_conv_constant_to_tree): Likewise.
2684 * trans-decl.c (gfc_get_symbol_decl): Likewise.
2685 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
2686 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
2687 * trans-io.c (add_case, set_error_locus, build_dt,
2688 transfer_expr): Likewise.
2689 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
2690 gfc_trans_stop, gfc_trans_character_select): Likewise.
2691 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
2692 * trans.c (gfc_trans_runtime_check): Likewise.
2694 2004-08-14 Paul Brook <paul@codesourcery.com>
2696 * trans-decl.c (gfc_build_function_decl): Remove dead code.
2698 2004-08-14 Paul Brook <paul@codesourcery.com>
2700 * trans-arry.c (gfc_trans_auto_array_allocation): Remove unused var.
2702 2004-08-13 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2704 * gfortran.h: Add comments.
2705 * parse.c (parse_contained): Fix comment typo.
2706 * resolve.c (was_declared): Ditto.
2709 2004-08-11 Paul Brook <paul@codeourcery.com>
2712 * intrinsic.c (add_functions): Add dfloat as an alias for dble.
2714 2004-08-10 Richard Henderson <rth@redhat.com>
2716 * f95-lang.c (gfc_init_builtin_functions): Remove
2717 __builtin_stack_alloc, add __builtin_alloca.
2718 * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR.
2719 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
2721 2004-08-10 Paul Brook <paul@codesourcery.com>
2723 * trans-io.c (transfer_expr): Handle pointters.
2725 2004-08-10 Paul Brook <paul@codesourcery.com>
2728 * trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT.
2729 (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta.
2730 (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary):
2731 Handle GFC_SS_COMPONENT.
2732 (gfc_conv_ss_startstride): Ditto. Set ss->shape.
2733 (gfc_conv_loop_setup): Tweak commends. Remove dead code.
2735 (gfc_conv_array_initializer): Call specific initializer routines.
2736 * trans-expr.c (gfc_trans_structure_assign): New function.
2737 (gfc_trans_subarray_assign): New function.
2738 (gfc_trans_subcomponent_assign): New fucntion
2739 (gfc_conv_structure): Use them.
2740 * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT.
2741 (gfc_ss): Add shape.
2743 2004-08-08 Victor Leikehman <lei@il.ibm.com>
2745 * simplify.c (gfc_simplify_shape): Bugfix.
2746 * expr.c (gfc_copy_shape_excluding): New function.
2747 * gfortran.h (gfc_get_shape): Bugfix.
2748 (gfc_copy_shape_excluding): Added declaration.
2749 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
2750 gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound,
2751 gfc_resolve_ubound, gfc_resolve_transpose): Added compile
2752 time resolution of shape.
2754 2004-08-06 Janne Blomqvist <jblomqvi@cc.hut.fi>
2756 * intrinsic.c (add_subroutines): Add getenv and
2757 get_environment_variable. (add_sym_5s): New function.
2758 * intrinsic.h (gfc_resolve_get_environment_variable): Add
2760 * iresolve.c (gfc_resolve_get_environment_variable): New
2763 2004-08-06 Feng Wang <fengwang@nudt.edu.cn>
2765 * f95-lang.c (gfc_init_builtin_functions): Fix the number of
2766 __builtin_pow[f] arguments.
2768 2004-08-06 Steven G. Kargl <kargls@comcast.net>
2770 * arith.c: Add #define for model numbers. Remove global GMP variables.
2771 (natural_logarithm,common_logarithm,exponential,sine,
2772 cosine,arctangent,hypercos,hypersine ): Remove.
2773 (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions.
2774 (arctangent2,gfc_arith_init_1,gfc_arith_done_1
2775 gfc_check_real_range, gfc_constant_result, gfc_range_check,
2776 gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times,
2777 gfc_arith_divide,complex_reciprocal,complex_pow_ui,
2778 gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real,
2779 gfc_convert_complex,gfc_int2real,gfc_int2complex,
2780 gfc_real2int,gfc_real2real,gfc_real2complex,
2781 gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP
2782 to MPFR, use new functions.
2783 * arith.h: Remove extern global variables.
2784 (natural_logarithm,common_logarithm,exponential, sine, cosine,
2785 arctangent,hypercos,hypersine): Remove prototypes.
2786 (arctangent2): Update prototype from GMP to MPFR.
2787 (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes.
2788 * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR.
2789 * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR.
2790 * gfortran.h (GFC_REAL_BITS): Remove.
2791 (arith): Add ARITH_NAN.
2792 Include mpfr.h. Define GFC_RND_MODE.
2793 Rename GCC_GFORTRAN_H GFC_GFC_H.
2794 (gfc_expr): Convert GMP to MPFR.
2795 * module.c: Add arith.h, correct type in comment.
2796 (mio_gmp_real): Convert GMP to MPFR.
2797 (mio_expr): Use gfc_set_model_kind().
2798 * primary.c: Update copyright date with 2004.
2799 (match_real_constant,match_const_complex_part): Convert GMP to MPFR.
2800 * simplify.c: Remove global GMP variables
2801 (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag,
2802 gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint,
2803 gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan,
2804 gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx,
2805 gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh,
2806 gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon,
2807 gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor,
2808 gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int,
2809 gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log,
2810 gfc_simplify_log10,simplify_min_max,gfc_simplify_mod,
2811 gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint,
2812 gfc_simplify_rrspacing,gfc_simplify_scale,
2813 gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin,
2814 gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt,
2815 gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny,
2816 gfc_simplify_init_1,gfc_simplify_done_1): Convert GMP to MPFR.
2818 * trans-const.c (gfc_conv_mpfr_to_tree): Rename from
2819 gfc_conv_mpf_to_tree. Convert it to use MPFR
2820 (gfc_conv_constant_to_tree): Use it.
2821 * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree().
2822 * trans-intrinsic.c: Add arith.h, remove gmp.h
2823 (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR.
2825 2004-08-06 Victor Leikehman <lei@il.ibm.com>
2826 Paul Brook <paul@codesourcery.com>
2828 * trans-array.c (gfc_trans_allocate_array_storage,
2829 gfc_trans_allocate_temp_array, gfc_add_loop_ss_code,
2830 gfc_conv_loop_setup): For functions, if the shape of the result
2831 is not known in compile-time, generate an empty array descriptor for
2832 the result and let the callee to allocate the memory.
2833 (gfc_trans_dummy_array_bias): Do nothing for pointers.
2834 (gfc_conv_expr_descriptor): Use function return values directly.
2835 * trans-expr.c (gfc_conv_function_call): Always add byref call
2837 (gfc_trans_pointer_assignment): Add comments.
2838 (gfc_trans_arrayfunc_assign): Don't chain on expression.
2840 2004-08-01 Roger Sayle <roger@eyesopen.com>
2842 * options.c (gfc_init_options): Don't warn about the use GNU
2843 extensions by default.
2844 (gfc_post_options): Warn about GNU extensions with -pedantic.
2845 (gfc_handle_option): Don't warn about GNU extensions with -std=gnu.
2847 2004-07-30 Richard Henderson <rth@redhat.com>
2849 * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL
2852 2004-07-25 Richard Henderson <rth@redhat.com>
2854 * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL
2855 and DECL_IGNORED_P on RESULT_DECL.
2856 (gfc_generate_constructors): Likewise.
2858 2004-07-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2861 * lang.opt (ffixed-line-length-none, ffixed-line-length-): New
2863 (ffixed-line-length-80, ffixed-line-length-132): Remove.
2864 * options.c (gfc_handle_options): Deal with changed options.
2865 * scanner.c (load_line): Change second arg to 'char **',
2866 allocate if pointing to NULL. Keep track of buffer's length.
2867 Adapt buffer size to overlong lines. Pad lines to full length
2869 (load_file): Adapt to new interface of load_line.
2871 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
2873 * trans.h (builtin_function): Declare.
2875 2004-07-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2878 (parts ported from g95)
2879 * parse.h (gfc_state_data): New field do_variable.
2880 (gfc_check_do_variable): Add prototype.
2881 * parse.c (push_state): Initialize field 'do_variable'.
2882 (gfc_check_do_variable): New function.
2883 (parse_do_block): Remember do iterator variable.
2884 (parse_file): Initialize field 'do_variable'.
2885 * match.c (gfc_match_assignment, gfc_match_do,
2886 gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate):
2887 Add previously missing checks.
2888 (gfc_match_return): Reformat error message.
2889 * io.c (match_out_tag): New function.
2890 (match_open_element, match_close_element,
2891 match_file_element, match_dt_element): Call match_out_tag
2892 instead of match_vtag where appropriate.
2893 (match_io_iterator, match_io_element): Add missing check.
2894 (match_io): Reformat error message.
2895 (match_inquire_element): Call match_out_tag where appropriate.
2897 * parse.c (gfc_check_do_variable): Fix error locus.
2899 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2902 * trans-decl.c (gfc_build_function_decl): Create a new chardecl
2903 for every assumed length character dummy argument.
2906 * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion.
2909 * simplify.c (gfc_simplify_bound): Copy the bound expression.
2911 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2914 * trans-array.c gfc_trans_g77_array,
2915 gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init
2916 for assumed length characters.
2917 (gfc_conv_expr_descriptor): Set se->string_length if dealing
2918 with a character expression.
2919 (gfc_cvonv_array_parameter): Pass string length when passing
2920 character array according to g77 conventions.
2922 2004-07-12 Paul Brook <paul@codesourcery.com>
2924 * expr.c (gfc_check_assign_symbol): Handle pointer assignments.
2925 * trans-array.c (gfc_trans_auto_array_allocation): Remove
2926 initialization code.
2927 * trans-common.c (create_common): Use gfc_conv_initializer.
2928 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer.
2929 * trans-expr.c (gfc_conv_initializer): New function.
2930 (gfc_conv_structure): Use it.
2931 * trans.h (gfc_conv_initializer): Add prototype.
2933 2004-07-11 Paul Brook <paul@codesourcery.com>
2936 * parse.c (gfc_fixup_sibling_symbols): Also look for untyped
2938 (parse_contained): Mark contained symbols as referenced.
2940 2004-07-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2943 * module.c (gfc_dump_module, gfc_use_module): Print locus
2944 when opening of module file fails.
2947 * io.c (match_io): Flag 'WRITE(...), ...' as extension.
2950 * match.c (gfc_match_program): A program name is obligatory.
2951 (gfc_match_return): RETURN in main program is an extension.
2952 (gfc_match_block_data): A space is required before a block data
2956 * primary.c (match_boz_constant): Call gfc_notify_std only if
2957 we actually have a non-standard boz-literal-constant.
2960 * expr.c (gfc_check_assign): Print ranks if incompatible. Issue
2961 warning if assigning NULL().
2963 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
2965 * f95-lang.c (set_block): Remove.
2966 (gfc_clear_binding_stack): New.
2967 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
2968 (struct binding_level): Remove block_created_by_back_end.
2969 (clear_binding_level): Likewise.
2970 (poplevel): Don't handle block_created_by_back_end.
2972 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2974 * trans-decl.c (gfc_create_module_variable): Nothing to do if
2975 symbol is in common, because we ...
2976 (gfc_generate_module_vars): Call gfc_trans_common.
2978 2004-07-10 Paul Brook <paul@codesourcery.com>
2980 * trans-array.c (gfc_build_null_descriptor): New function.
2981 (gfc_trans_static_array_pointer): Use it.
2982 * trans-array.h (gfc_build_null_descriptor): Add prototype.
2983 * trans-expr.c (gfc_conv_structure): Handle array pointers.
2985 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2988 * decl.c (gfc_match_save): Use-associated common block
2990 * gfortran.h (gfc_common_head): Add new field 'name'.
2991 Fix typo in comment after #endif.
2992 * match.c (gfc_get_common): Add new argument from_common,
2993 mangle name if flag is set, fill in new field in structure
2995 (match_common): Set new arg in call to gfc_get_common,
2996 use-associated common block doesn't collide.
2997 * match.h (gfc_get_common): Adapt prototype.
2998 * module.c (load_commons): Set new arg in call to
3000 * symbol.c (free_common_tree): New function.
3001 (gfc_free_namespace): Call new function.
3002 * trans-common.c (several functions): Remove argument
3003 'name', use name from gfc_common_head instead.
3005 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3007 * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
3008 and RHS match. Return early if the RHS is NULL().
3011 * match.c (match_common): Fix error reporting for used common.
3014 * trans-expr.c (gfc_conv_structure): Handle initialization
3015 of scalar pointer components.
3017 * parse.c (decode_statement): Fix matching of BLOCK DATA.
3019 * trans-decl.c (generate_local_decl): Remove workaround obsoleted
3020 by fix for PR 15481.
3022 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3024 * trans-common.c: Fix whitespace issues, make variable names
3026 (create_common): Additionally, make loop logic more obvious.
3028 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3029 Paul Brook <paul@codesourcery.com>
3032 * trans-common.c (calculate_length): Remove ...
3033 (get_segment_info): Merge into here. Save field type.
3034 (build_field): Use saved type.
3035 (create_common, new_condition, new_segment, finish_equivalences):
3036 Use new get_segment_info.
3037 * trans-types.c: Update comment.
3039 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3042 * moduele.c (mio_symbol): Don't I/O initial values unless
3043 symbol is a parameter.
3045 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3048 * resolve.c (resolve_symbol): Verify that the shape of a
3049 parameter array is not only explicit, but also constant.
3050 * array.c (gfc_is_compile_time_shape): New function.
3051 * gfortran.h (gfc_is_compile_time_shape): Add prototype.
3053 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3059 * module.c (write_symbol, write_symtree): Remove workaround.
3060 * primary.c (match_actual_arglist): Enhance comment.
3061 (gfc_match_rvalue): Handle function call with first argument
3062 a keyword argument correctly.
3063 * resolve.c (resolve_symbol): Change call to
3064 gfc_set_default_type to issue error if no implicit type
3066 * trans-decl.c (gfc_create_module_variable): Remove workaround.
3068 2004-07-08 Paul Brook <paul@codesourcery.com>
3070 * intrinsic.c (add_sym_4s): New function.
3071 (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
3073 2004-07-04 Janne Blomqvist <jblomqvi@cc.hut.fi>
3074 Paul Brook <paul@codesourcery.com>
3078 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
3079 GFC_ISYM_COMMAND_ARGUMENT_COUNT.
3080 * intrinsic.c (add_functions): Identify iargc. Add
3081 command_argument_count.
3082 (add_subroutines): Resolve getarg. Add get_command and
3083 get_command_argument.
3084 * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
3085 gfc_resolve_get_command_argument): Add prototypes.
3086 * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
3087 gfc_resolve_get_command_argument): New functions.
3088 * trans-decl.c (gfor_fndecl_iargc): New variable.
3089 (gfc_build_intrinsic_function_decls): Set it.
3090 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
3091 (gfc_conv_intrinsic_function): Use it.
3092 * trans.h (gfor_fndecl_iargc): Declare.
3094 2004-07-04 Matthias Klose <doko@debian.org>
3096 * Make-lang.in: Generate and install gfortran man page.
3097 * invoke.texi: Remove extra '@c man end'.
3099 2004-07-04 Richard Henderson <rth@redhat.com>
3101 * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
3103 2004-07-04 Paul Brook <paul@codesourcery.com>
3105 * decl.c (gfc_match_implicit_range): Don't use typespec.
3106 (gfc_match_implicit): Handle character selectors.
3107 * gfortran.h (gfc_set_implicit): Remove prototype.
3108 (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
3109 * parse.c (accept_statement): Don't call gfc_set_implicit.
3110 * symbol.c (new_ts): Remove.
3111 (gfc_set_implicit_none): Use same loop bounds as other functions.
3112 (gfc_set_implicit): Remove.
3113 (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
3114 (gfc_merge_new_implicit): Combine with gfc_set_implicit.
3116 2004-06-30 Richard Henderson <rth@redhat.com>
3118 * match.c (var_element): Remove unused variable.
3120 * trans-decl.c (gfc_generate_function_code): Don't set
3121 x_whole_function_mode_p.
3122 (gfc_generate_constructors): Likewise.
3124 2004-06-30 Richard Henderson <rth@redhat.com>
3126 * trans-decl.c (gfc_generate_function_code): Don't set
3127 immediate_size_expand.
3128 (gfc_generate_constructors): Likewise.
3130 2004-06-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3133 * decl.c (gfc_match_type_spec): Rename second argument to
3134 'implicit_flag', reverse meaning. Don't match_char_spec if
3135 'implicit_flag' is set. Rename to ...
3136 (match_type_spec): ... this.
3137 (gfc_match_implicit_none, match_implicit_range): Move here
3139 (gfc_match_implicit): Move here from match.c, try to
3140 match_char_len if match_implicit_range doesn't succeed for
3141 CHARACTER implicits. Call renamed fucntion match_type_spec.
3142 (gfc_match_data_decl, match_prefix): Call renamed function
3144 * match.c (gfc_match_implicit_none, match_implicit_range,
3145 gfc_match_implicit): Move to decl.c.
3146 * match.h (gfc_match_implicit_none, gfc_match_implicit):
3147 Move protoypes to section 'decl.c'.
3148 (gfc_match_type_spec): Remove prototype.
3150 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3152 * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
3155 2004-06-29 Steven Bosscher <stevenb@suse.de>
3157 Make sure types in assignments are compatible. Mostly mechanical.
3158 * trans-const.h (gfc_index_one_node): New define.
3159 * trans-array.c (gfc_trans_allocate_array_storage,
3160 gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
3161 gfc_trans_array_constructor_value, gfc_trans_array_constructor,
3162 gfc_conv_array_ubound, gfc_conv_array_ref,
3163 gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
3164 gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
3165 gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
3166 gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
3167 types in assignments, conversions and conditionals for expressions.
3168 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
3169 gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
3170 gfc_conv_function_call, gfc_trans_pointer_assignment,
3171 gfc_trans_scalar_assign): Likewise.
3172 * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
3173 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
3174 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
3175 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
3176 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
3177 gfc_conv_allocated, gfc_conv_associated,
3178 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
3179 * trans-io.c (set_string): Likewise.
3180 * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
3181 gfc_do_allocate, generate_loop_for_temp_to_lhs,
3182 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
3183 compute_overall_iter_number, gfc_trans_assign_need_temp,
3184 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
3185 gfc_evaluate_where_mask, gfc_trans_where_assign,
3186 gfc_trans_where_2): Likewise.
3187 * trans-types.c (gfc_get_character_type, gfc_build_array_type,
3188 gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
3190 * trans.c (gfc_add_modify_expr): Add sanity check that types
3191 for the lhs and rhs are the same for scalar assignments.
3193 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3195 * dump-parse-tree.c (show_common): New function.
3196 (gfc_show_namespace): Show commons.
3198 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3199 Andrew Vaught <andyv@firstinter.net>
3203 * decl.c (gfc_match_save): Adapt to new common structures,
3204 don't allow saving USE-associated common.
3205 * dump-parse-tree (gfc_show_attr): (saved_)common are not
3206 symbol attributes any longer.
3207 (gfc_show_symbol): Don't show old-style commons any longer.
3208 (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
3210 * gfortran.h (symbol_attribute): Remove common and saved_common
3212 (gfc_symbol): Remove common_head element.
3213 (gfc_common_head): New struct.
3214 (gfc_get_common_head): New macro.
3215 (gfc_symtree): Add field 'common' to union.
3216 (gfc_namespace): Add field 'common_root'; change type of field
3217 'blank_common' to blank_common.
3218 (gfc_add_data): New prototype.
3219 (gfc_traverse_symtree): Expect a symtree as first argument
3220 instead of namespace.
3221 * match.c (gfc_get_common): New function.
3222 (match_common_name): Change to take char * as argument, adapt,
3223 fix bug with empty name.
3224 (gfc_match_common): Adapt to new data structures. Disallow
3225 redeclaration of USE-associated COMMON-block. Fix bug with
3227 (var_element): Adapt to new common structures.
3228 * match.h (gfc_get_common): Declare.
3229 * module.c: Add 2004 to copyright years, add commons to module
3230 file layout description.
3231 (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
3232 for removed attributes.
3233 (mio_symbol): Adapt to new way of storing common relations.
3234 (load_commons): New function.
3235 (read_module): Skip common list on first pass, load_commons at
3237 (write_commons): New function.
3238 (write_module): Call write_commons().
3239 * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
3240 functions related to removed attributes.
3241 (gfc_add_data): New function.
3242 (gfc_clear_attr): Don't set removed attributes.
3243 (gfc_copy_attr): Don't copy removed attributes.
3244 (traverse_symtree): Remove.
3245 (gfc_traverse_symtree): Don't traverse symbol
3246 tree of the passed namespace, but require a symtree to be passed
3247 instead. Unify with traverse_symtree.
3248 (gfc_traverse_ns): Call gfc_traverse_symtree according to new
3250 (save_symbol): Remove setting of removed attribute.
3251 * trans-common.c (gfc_sym_mangled_common_id): Change to
3252 take 'char *' argument instead of 'gfc_symbol'.
3253 (build_common_decl, new_segment, translate_common): Adapt to new
3254 data structures, add new
3256 (create_common): Adapt to new data structures, add new
3257 argument name. Fix typo in intialization of derived types.
3258 (finish_equivalences): Add second argument in call to
3260 (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
3261 (gfc_trans_common): Adapt to new data structures.
3262 * trans-decl.c (gfc_create_module_variables): Remove test for
3265 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3267 * io.c: Add 2004 to copyright years.
3269 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3270 Andrew Vaught <andyv@firstinter.net>
3272 * gfortran.h (gfc_gsymbol): New typedef.
3273 (gfc_gsym_root): New variable.
3274 (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
3275 * parse.c (global_used): New function.
3276 (parse_block_data): Check for double empty BLOCK DATA,
3277 use global symbol table.
3278 (parse_module): Use global symbol table.
3279 (add_global_procedure, add_global_program): New functions.
3280 (gfc_parse_file): Use global symbol table.
3281 * symbol.c (gfc_gsym_root): New variable.
3282 (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
3285 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3287 * module.c (mio_gmp_real): Correct writing of negative numbers.
3289 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3292 * expr.c (check_intrinsic_op): Allow comparison of characters.
3295 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3296 Andrew Vaught <andyv@firstinter.net>
3298 * decl.c (contained_procedure): New function.
3299 (match_end): Verify correctness of END STATEMENT in
3302 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3303 Andrew Vaught <andyv@firstinter.net>
3306 * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
3307 (decode_statement): Enforce required space in free-form.
3309 2004-06-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3311 * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
3312 * trans-array.c (gfc_conv_descriptor_data): Add operand
3314 (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
3315 (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
3316 (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
3317 * trans-common.c (create_common): Likewise.
3318 * trans-expr.c (gfc_conv_component_ref): Likewise.
3319 * trans-io.c (set_parameter_value): Likewise.
3320 (set_parameter_ref, set_string, set_flag, io_result): Likewise.
3321 (transfer_expr): Likewise.
3322 * trans-decl.c (gfc_trans_auto_character_variable):
3323 Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
3324 (gfc_gimplify_function): New function.
3325 (gfc_generate_function-code): Properly handle nested functions.
3326 * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
3328 2004-06-22 Janne Blomqvist <jblomqvi@cc.hut.fi>
3331 * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
3332 (gfc_resolve_inquire): Resolve the iolength tag. Return
3333 SUCCESS at end of function if no failure has occured.
3334 * resolve.c (resolve_code): Resolve if iolength is encountered.
3335 * trans-io.c: (ioparm_iolength, iocall_iolength,
3336 iocall_iolength_done): New variables.
3337 (last_dt): Add IOLENGTH.
3338 (gfc_build_io_library_fndecls ): Set iolength related variables.
3339 (gfc_trans_iolength): Implement.
3340 (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
3342 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de
3345 * scanner.c (load_line): Don't truncate preprocessor lines.
3346 Reformat error message.
3347 (preprocessor_line): Issue warning in case of malformed
3350 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3352 * resolve.c (resolve_symbol): Add comment in function body.
3353 (check_data_variable): Change type of mark to ar_type, adapt code
3356 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3358 * array.c (gfc_insert_constructor): Avoid redundant call to
3359 mpz_comp. Add 2004 to copyright years.
3361 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
3363 * trans.h (stmtblock_t): Change has_scope to unsigned int.
3365 2004-06-20 Steven G. Kargl <kargls@comcast.net>
3367 * arith.c (gfc_range_check): correct complex underflow.
3369 2004-06-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3372 * match.c (match_case_selector): Call gfc_match_init_expr
3373 instead of gfc_match_expr.
3374 * resolve.c (validate_case_label_expr): No need to check for
3375 constant, since it wouldn't have been matched with the fix to
3378 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3381 * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
3384 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3387 * trans-deecl.c (generate_local_decl): Do not issue warning for
3388 unused variables if they're use associated.
3390 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3391 Andrew Vaught <andyv@firstinter.net>
3394 * gfortran.h (gfc_check_f): Add new field f3ml.
3395 * check.c (gfc_check_minloc_maxloc): Take argument list instead
3396 of individual arguments, reorder if necessary.
3397 * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
3398 * intrinsic.c (add_sym_3ml): New function.
3399 (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
3400 (check_specific): Catch special case MINLOC, MAXLOC.
3402 2004-06-14 Paul Brook <paul@codesourcery.com>
3404 * intrinsic.c (add_sym_2s): Use correct function types.
3406 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3408 * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize. Move data.c
3409 * data.c (gfc_get_section_index): Remove dependency on trans.h.
3411 2004-06-12 Steven G. Kargl <kargls@comcast.net>
3413 * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
3414 gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
3415 * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
3416 GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
3417 * trans-intrinsic.c: Use symbols.
3418 * intrinsic.c (add_sym_2s): New function.
3419 * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
3420 * intrinsic.h: Function prototypes.
3421 * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
3422 gfc_resolve_srand): New functions.
3424 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3427 * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
3428 contained procedure.
3430 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3433 * interface.c (compare_parameter, compare_actual_formal): Don't
3434 check types and array shapes for NULL()
3435 * trans-expr.c (conv_function_call): No double indirection for
3438 2004-06-09 Toon Moene <toon@moene.indiv.nluug.nl>
3440 * trans-expr.c (gfc_conv_cst_int_power): Compute
3441 x**(-n) by converting it to (1/x)**n instead of
3444 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3447 * module.c (write_symbol, write_symtree): Don't write symbols
3448 wrongly added to namespace.
3449 * trans-decl.c (gfc_create_module_variable): Don't create a
3450 backend decl for a symbol incorrectly added to namespace.
3452 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3455 * resolve.c (resolve_symbol): Verify that parameter array has an
3456 explicit shape. Fix typos and coding style issues in surrounding
3459 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3462 * gfortran.texi: The documentation doesn't contain infomration on
3463 how to report bugs, and shouldn't, so remove the line which
3466 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3468 * intrinsic.c (sort_actual): Keep track of type of missing
3469 arguments. (Missing from previous commit.)
3471 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3473 * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
3474 * interface.c (compare_actual_formal): Keep type of omitted
3476 * trans-expr.c (gfc_conv_function_call): Add string length
3477 argument for omitted string argument.
3479 2004-06-03 Paul Brook <paul@codesourcery.com>
3481 * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
3482 lists instead of compound expr chains.
3483 (gfc_trans_code): Annotate statement lists.
3485 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3487 * trans-array.c: Fix spelling in comments.
3489 2004-06-02 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3492 * data.c (assign_substring_data_value): New function.
3493 (gfc_assign_data_value): Call the new function if we're dealing
3494 with a substring LHS.
3496 2004-06-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3499 * gfortran.h (GFC_VERSION): Remove.
3500 * gfortran.texi (version-gfortran): Remove, replace by version-GCC
3503 2004-05-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3505 * trans-types.c: Fix spelling & layout in comments.
3507 2004-05-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3510 * trans-const.c (gfc_conv_string_init): Allow variable string
3511 length lower than initialization string length.
3513 2004-05-30 Paul Brook <paul@codesourcery.com>
3516 * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
3517 * trans-expr.c (gfc_trans_string_copy): New function.
3518 (gfc_conv_statement_function): Use them. Create temp vars. Enforce
3520 (gfc_conv_string_parameter): Use gfc_trans_string_copy.
3521 * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
3522 * trans.h (struct gfc_saved_var): Define.
3523 (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
3525 2004-05-30 Steven G. Kargl <kargls@comcast.net>
3527 * iresolve.c (gfc_resolve_random_number): Clean up conditional.
3529 2004-05-29 Steven G. Kargl <kargls@comcast.net>
3531 * simplify.c (gfc_simplify_log): Remove useless line of code.
3533 2004-05-29 Paul Brook <paul@codesourcery.com>
3535 * trans-common.c (find_equivalence): Find multiple rules.
3537 2004-05-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3539 * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
3540 (gfc_current_locus): Declare new global variable.
3541 * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
3542 (gfc_current_locus1): Rename ...
3543 (gfc_current_locus): ... to this.
3544 (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
3545 skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
3546 gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
3547 gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
3548 and gfc_current_locus(), respectively.
3549 * array.c (match_subscript, gfc_match_array_ref, match_array_list,
3550 match_array_cons_element, gfc_match_array_constructor):
3551 Read/modify gfc_current_locus instead of calling gfc_set_locus()
3552 and gfc_current_locus().
3553 * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
3554 match_attr_spec, gfc_match_function_decl, gfc_match_end,
3555 attr_decl1, gfc_match_save): Likewise.
3556 * error.c (error_print, gfc_internal_error): Likewise.
3557 * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
3558 * interface.c (gfc_add_interface): Likewise.
3559 * io.c (gfc_match_format, match_dt_format, match_dt_element,
3560 match_io_iterator, match_io): Likewise.
3561 * match.c (gfc_match_space, gfc_match_eos,
3562 gfc_match_small_literal_int, gfc_match_st_label,
3563 gfc_match_strings, gfc_match_name, gfc_match_iterator,
3564 gfc_match_char, gfc_match, gfc_match_assignment,
3565 gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
3566 gfc_match_nullify, gfc_match_call, match_implicit_range,
3567 gfc_match_implicit, gfc_match_data, match_case_selector,
3568 gfc_match_case, match_forall_iterator): Likewise.
3569 * matchexp.c (gfc_match_defined_op_name, next_operator,
3570 match_level_1, match_mult_operand, match_ext_mult_operand,
3571 match_add_operand, match_ext_add_operand, match_level_2,
3572 match_level_3, match_level_4, match_and_operand, match_or_operand,
3573 match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
3574 * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
3575 * parse.c (match_word, decode_statement, next_free, next_fixed,
3576 add_statement, verify_st_order, parse_if_block, gfc_parse_file):
3578 * primary.c (match_digits, match_integer_constant,
3579 match_boz_constant, match_real_constant, match_substring,
3580 next_string_char, match_charkind_name, match_string_constant,
3581 match_logical_constant, match_const_complex_part,
3582 match_complex_constant, match_actual_arg, match_keyword_arg,
3583 gfc_match_actual_arglist, gfc_match_structure_constructor,
3584 gfc_match_rvalue, gfc_match_variable): Likewise.
3585 * st.c (gfc_get_code): Likewise.
3586 * symbol.c (check_conflict, check_used, check_done,
3587 duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
3588 gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
3589 gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
3591 2004-05-26 Roger Sayle <roger@eyesopen.com>
3593 * io.c (format_asterisk): Silence compiler warnings by correcting
3594 the number of elements of a "locus" initializer.
3596 2004-05-25 Roger Sayle <roger@eyesopen.com>
3599 * matchexp.c: Allow unary operators after arithmetic operators
3601 (match_ext_mult_operand, match_ext_add_operand): New functions.
3602 (match_mult_operand): Tweak to call match_ext_mult_operand.
3603 (match_add_operand): Tweak to call match_ext_mult_operand.
3604 (match_level_2): Rearrange to call match_ext_add_operand.
3606 2004-05-25 Paul Brook <paul@codesourcery.com>
3608 * expr.c (check_inquiry): Remove bogus tests.
3610 2004-05-23 Paul Brook <paul@codesourcery.com>
3613 * expr.c (restricted_args): Remove redundant checks/argument.
3614 (external_spec_function): Update to match.
3615 (restricted_intrinsic): Rewrite.
3617 2004-05-23 Paul Brook <paul@codesourcery.com>
3618 Victor Leikehman <lei@haifasphere.co.il>
3620 * gfortran.h (struct gfc_symbol): Add equiv_built.
3621 * trans-common.c: Change int to HOST_WIDE_INT. Capitalize error
3623 (current_length): Remove.
3624 (add_segments): New function.
3625 (build_equiv_decl): Create initialized common blocks.
3626 (build_common_decl): Always add decl to bindings.
3627 (create_common): Create initializers.
3628 (find_segment_info): Reformat to match coding conventions.
3629 (new_condition): Use add_segments.
3630 (add_condition, find_equivalence, add_equivalences): Move iteration
3631 inside functions. Only process each segment once.
3632 (new_segment, finish_equivalences, translate_common): Simplify.
3634 2004-05-23 Steven G. Kargl <kargls@comcast.net>
3636 * check.c (gfc_check_random_seed): Issue for too many arguments.
3638 2004-05-22 Steven G. Kargl <kargls@comcast.net>
3640 * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
3642 2004-05-22 Paul Brook <paul@codesourcery.com>
3644 * dump-parse-tree.c (gfc_show_equiv): New function.
3645 (gfc_show_namespace): Use it.
3647 2004-05-22 Victor Leikehman <lei@haifasphere.co.il>
3650 * symbol.c (gfc_add_common): Disable checks to work around other more
3651 fundamental inadequacies.
3653 2004-05-22 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3655 * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
3657 (gfc_build_function_decl): Likewise.
3659 2004-05-22 Steven G. Kargl <kargls@comcast.net>
3661 * check.c (gfc_check_system_clock): New function.
3662 * intrinsic.c (add_sym_3s): New function.
3663 (add_subroutines): Use it.
3664 * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
3666 * iresolve.c (gfc_resolve_system_clock): New function.
3668 2004-05-22 Steven G. Kargl <kargls@comcast.net>
3670 * invoke.texi: Document -Wunderflow and spell check.
3671 * lang.opt: Add Wunderflow.
3672 * gfortran.h (gfc_option_t): Add warn_underflow option.
3673 * options.c (gfc_init_options, set_Wall): Use it.
3674 * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
3675 * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
3676 gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
3677 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
3678 * arith.c (common_logarithm): Fix typo in comment.
3680 2004-05-21 Roger Sayle <roger@eyesopen.com>
3682 * io.c (check_format): As a GNU extension, allow the comma after a
3683 string literal to be optional in a format. Use gfc_notify_std to
3684 issue an error/warning as appropriate.
3686 2004-05-21 Roger Sayle <roger@eyesopen.com>
3688 * io.c (check_format): Use gfc_notify_std to determine whether to
3689 issue an error/warning for omitting the digits from the X format.
3691 2004-05-20 Roger Sayle <roger@eyesopen.com>
3693 * io.c (check_format): Allow the number before the X format to
3694 be optional when not -pedantic.
3696 2004-05-18 Feng Wang <fengwang@nudt.edu.cn>
3697 Paul Brook <paul@codesourcery.com>
3699 * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
3700 Create decls for __builtin_pow{,f}.
3701 * gfortran.h (PREFIX_LEN): Define.
3702 * trans-decl.c (gfor_fndecl_math_powi): Add.
3703 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
3704 (gfc_build_intrinsic_function_decls): Create decls for powi.
3705 * trans-expr.c (powi_table): Add.
3706 (gfc_conv_integer_power): Remove.
3707 (gfc_conv_powi): New function.
3708 (gfc_conv_cst_int_power): New function.
3709 (gfc_conv_power_op): Use new powi routines.
3710 * trans.h (struct gfc_powdecl_list): Add.
3711 (gfor_fndecl_math_powi): Add.
3712 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
3714 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3716 * trans.c, trans-decl.c: Fix comment typos.
3718 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3720 * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
3722 2004-05-18 Steve Kargl <kargls@comcast.net>
3724 * arith.c (gfc_int2complex): Fix incorrect range checking.
3726 2004-05-18 Paul Brook <paul@codesourcery.com>
3729 * decl.c (add_init_expr_to_sym): Remove incorrect check.
3730 (default_initializer): Move to expr.c.
3731 (variable_decl): Don't assign default initializer to variables.
3732 * expr.c (gfc_default_initializer): Move to here.
3733 * gfortran.h (gfc_default_initializer): Add prototype.
3734 * resolve.c (resolve_symbol): Check for illegal initializers.
3735 Assign default initializer.
3737 2004-05-17 Steve Kargl <kargls@comcast.net>
3739 * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
3741 2004-05-17 Steve Kargl <kargls@comcast.net>
3743 * arith.c (gfc_real2complex): Range checking wrong part of complex
3746 2004-05-16 Paul Brook <paul@codesourcery.com>
3748 * options.c (gfc_handle_module_path_options): Fix buffer overrun.
3750 2004-05-16 Paul Brook <paul@codesourcery.com>
3752 * arith.c (gfc_range_check): Fix logic error.
3754 2004-05-16 Steve Kargl <sgk@troutmask.apl.washington.edu>
3756 * arith.c: Fix comment typos.
3758 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3761 * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
3762 not initialized in a disallowed fashion.
3763 * match.c (gfc_match_common): Likewise.
3764 (var_element): Verify that variable is not in the blank COMMON,
3765 if it is in a common.
3767 2004-05-15 Joseph S. Myers <jsm@polyomino.org.uk>
3769 * Make-lang.in (f95.generated-manpages): Remove.
3770 (f95.srcextra): New.
3771 (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
3772 f95.maintainer-clean): Generate info and dvi files in objdir/doc.
3775 (f95.install-info): Remove.
3776 (install-info): New.
3778 2004-05-15 Victor Leikehman <lei@haifasphere.co.il>
3780 * decl.c (add_init_expr_to_sym): Check for variable size arrays.
3782 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3784 * primary.c (match_boz_constant): Use gfc_notify_std() for
3785 issuing a warning or an error.
3787 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3790 * primary.c (match_structure_constructor): Rename ...
3791 (gfc_match_structure_constructor): ... to this. Make non-static.
3792 (gfc_match_rvalue): Call renamed function.
3793 * match.h (gfc_match_structure_constructor): Declare.
3794 * match.c (gfc_match_data_constant): Handle structure
3797 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3801 * gfortran.h (gfc_linebuf): New typedef.
3803 (gfc_file): Revamped, use new gfc_linebuf.
3804 (locus): Revamped, use new types.
3805 (gfc_current_file): Remove.
3806 (gfc_current_form, gfc_source_file): New global variables.
3807 * match.c (gfc_match_space, gfc_match_strings): Use
3808 gfc_current_form to find source form.
3809 * module.c (gfc_dump_module): Use gfc_source_file when printing
3811 * error.c (show_locus, show_loci) Use new data structures to print
3813 * scanner.c (first_file, first_duplicated_file, gfc_current_file):
3815 (file_head, current_file, gfc_current_form, line_head, line_tail,
3816 gfc_current_locus1, gfc_source_file): New global variables.
3817 (gfc_scanner_init1): Set new global variables.
3818 (gfc_scanner_done1): Free new data structures.
3819 (gfc_current_locus): Return pointer to gfc_current_locus1.
3820 (gfc_set_locus): Set gfc_current_locus1.
3821 (gfc_at_eof): Set new variables.
3822 (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
3823 to new locus structure.
3824 (gfc_check_include): Remove.
3825 (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
3826 (gfc_skip_comments): Use gfc_current_form, find locus with
3828 (gfc_next_char): Use gfc_current_form.
3829 (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
3830 (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
3832 (get_file): New function.
3833 (preprocessor_line, include_line): New functions.
3834 (load_file): Move down, rewrite to match new data structures.
3835 (gfc_new_file): Rewrite to match new data structures.
3836 * parse.c (next_statement): Remove code which is now useless. Use
3837 gfc_source_form and gfc_source_file where appropriate.
3838 * trans-decl.c (gfc_get_label_decl): adapt to new data structures
3839 when determining locus of frontend code.
3840 * trans-io.c (set_error_locus): Same.
3841 * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
3842 * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
3844 (all): Add missing initializers.
3846 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3848 * Make-lang.in (trans-common.o): Remove redundant dependency.
3849 (data.c): Replace object file name ...
3850 (data.o): ... by the correct one.
3852 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3854 * dump-parse-tree.c (gfc_show_array_ref): Print colon only
3855 for ranges when dumping array references.
3857 2004-05-14 Victor Leikehman <lei@haifasphere.co.il>
3859 * decl.c (variable_decl): Always apply default initializer.
3861 2004-05-08 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3864 * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
3865 handle zero correctly.
3867 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3869 * match.c (gfc_match): Eliminate dead code.
3871 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3873 * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
3874 Detect bad continuation line in fixed form sources.
3876 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3879 * iresolve.c (gfc_resolve_nearest): Add new function.
3880 * intrinsic.h: ... declare it here.
3881 * intrinsic.c (add_functions): ... add it as resolving function
3884 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3887 * match.c (gfc_match_do): Allow infinite loops with
3888 label-do-stmt. Do not enforce space after comma.
3890 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3893 * parse.c (parse_interface): Allow empty INTERFACE, remove
3896 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3898 * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
3899 decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
3900 expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
3901 intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
3902 matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
3903 primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
3904 trans-array.c, trans-array.h, trans-common.c, trans-const.c,
3905 trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
3906 trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
3907 trans-types.h, trans.c, trans.h: Update copyright years and
3909 * data.c: Likewise, also removed two whitespace-only lines.
3910 * gfortranspec.c, lang.opt: Update copyright years.
3912 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3915 * trans-decl.c (generate_local_decl): Don't warn for unused
3916 variables which are in common blocks.
3918 2004-05-13 Diego Novillo <dnovillo@redhat.com>
3920 * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
3921 trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
3922 trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
3924 2004-05-13 Victor Leikehman <lei@haifasphere.co.il>
3927 * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
3929 2004-05-13 Joseph S. Myers <jsm@polyomino.org.uk>
3931 * gfortran.texi: Use @table @emph instead of @itemize @emph.
3932 Remove "set DEVELOPMENT".
3933 (Compiling GFORTRAN): Remove.
3935 2004-05-09 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3937 * array.c (match_subscript, match_array_ref): Add comments
3938 explaining argument 'init'.
3939 * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
3940 trans-expr.c, trans.c: Fix some typos in comments.
3941 * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
3942 * primary.c (match_digits, match_integer_constant): Add comment
3943 explaining signflag.
3945 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3948 * primary.c: Include system.h and flags.h, needed for pedantic.
3949 (match_boz_constant): Allow "x" for hexadecimal constants, warn if
3952 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3955 * match.c (match_data_constant): Handle case where
3956 gfc_find_symbol sets sym to NULL
3958 2004-04-28 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3960 * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
3961 dependency on mathbuiltins.def
3963 2004-04-24 Victor Leikehman <lei@il.ibm.com>
3965 * trans-io.c (transfer_expr): Implemented recursive printing
3968 2004-04-24 Andrew Pinski <pinskia@physics.uc.edu>
3970 * gfortranspec.c: Do not include multilib.h.
3972 2004-04-24 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3974 * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
3975 2004 to copyright years.
3976 * trans-expr.c, trans-decl.c: Comment update, we now generate
3977 GENERIC, not SIMPLE. Add 2004 to copyright years.
3979 2004-04-24 Paul Brook <paul@codesourcery.com>
3981 * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
3983 2004-04-24 Feng Wang <fengwang@nudt.edu.cn>
3986 * arith.c (gfc_arith_divide): Fix complex divide.
3988 2004-04-23 Andrew Pinski <pinskia@physics.uc.edu>
3990 * gfortranspec.c: Include the target headers.
3992 2004-04-18 Feng Wang <fengwang@nudt.edu.cn>
3996 * arith.c (arctangent2): New function.
3997 * arith.h (arctangent2): Add function prototype.
3998 * simplify.c (gfc_simplify_atan2): Use it.
3999 (gfc_simplify_log): Use it.
4001 2004-04-12 Diego Novillo <dnovillo@redhat.com>
4003 * fortran/f95-lang.c (gfc_expand_stmt): Remove.
4004 (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
4006 2004-04-11 Bud Davis <bdavis9659@comcast.net>
4009 * trans-io.c (build_dt): Change REC to value.
4011 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
4014 * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
4015 the real value when converting mpf to string.
4017 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
4020 * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
4023 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
4026 * simplify.c (simplify_min_max): Convert the type of the result.
4028 2004-04-11 Paul Brook <paul@codesourcery.com>
4030 * gfortran.texi: Use full target triplet.
4032 2004-04-11 Paul Brook <paul@codesourcery.com>
4034 * Make-lang.in (GFORTRAN_TEXI): Set it.
4035 (fortran/dfortran.dvi): Use it. Add fortran to include paths.
4036 (fortran/gfortran.info): Ditto.
4037 * gfortran.texi: Major update.
4038 * invoke.texi: New file.
4040 2004-04-10 Paul Brook <paul@codesourcery.com>
4042 * trans-array.c (gfc_trans_allocate_temp_array,
4043 gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
4044 * trans-decl.c (gfc_build_dummy_array_decl,
4045 gfc_get_symbol_decl, gfc_build_function_decl,
4046 gfc_create_module_variable): Ditto.
4047 * trans-expr.c (gfc_conv_variable): Ditto.
4048 * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
4049 * trans.h (GFC_DECL_STRING): Remove.
4050 (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
4051 GFC_DECL_ASSIGN): Renumber flags.
4053 2004-04-05 Paul Brook <paul@codesourcery.com>
4057 * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
4059 * gfortran.h (struct gfc_charlen): Add backend_decl.
4060 * trans-array.c (gfc_trans_allocate_temp_array,
4061 gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
4062 (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
4063 Remove old, broken string handling.
4064 (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
4065 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
4066 gfc_trans_deferred_array): Handle character arrays.
4067 * trans-const.c (gfc_conv_const_charlen): New function.
4068 * trans-const.h (gfc_conv_const_charlen): Add prototype.
4069 * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
4071 (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
4072 (gfc_create_string_length): New function.
4073 (gfc_get_symbol_decl): Create lengths for character variables.
4074 (gfc_get_fake_result_decl): Ditto.
4075 (gfc_build_function_decl): Only set length for assumed length
4076 character arguments.
4077 (gfc_trans_dummy_character): New function.
4078 (gfc_trans_auto_character_variable): Rewrite.
4079 (gfc_trans_deferred_vars): Handle more types of character variable.
4080 (gfc_create_module_variable): String lengths have moved.
4081 (gfc_generate_function_code): Initialize deferred var chain earlier.
4082 * trans-expr.c (gfc_conv_init_string_length): Rename ...
4083 (gfc_trans_init_string_length): ... to this.
4084 (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
4085 gfc_conv_function_call): Update to new format for character variables.
4086 (gfc_conv_string_length): Remove.
4087 (gfc_conv_string_parameter): Update assertion.
4088 * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
4089 * trans-io.c (set_string): Use new macro names.
4090 * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
4091 * trans-types.c (gfc_get_character_type): Use existing length expr.
4092 (gfc_is_nodesc_array): Make public.
4093 (gfc_get_dtype_cst): Rename ...
4094 (gfc_get_dtype): ... to this. Handle unknown size arrays.
4095 (gfc_get_nodesc_array_type): Use new name.
4096 (gfc_sym_type): New character variable code.
4097 (gfc_get_derived_type): Ditto.
4098 (gfc_get_function_type): Evaluate character variable lengths.
4099 * trans-types.h (gfc_strlen_kind): Define.
4100 (gfc_is_nodesc_array): Add prototype.
4101 * trans.h: Update prototypes.
4102 (struct lang_type): Update comments.
4103 (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
4104 (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
4106 2004-04-04 Paul Brook <paul@codesourcery.com>
4108 * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
4109 * options.c (gfc_init.options, gfc_handle_option): Ditto.
4110 * trans-expr.c (gfc_conv_function_call): Ditto.
4111 * trans-types.c (gfc_is_nodesc_array): Ditto
4112 * lang.opt (fg77-calls): Remove.
4114 2004-04-04 Paul Brook <paul@codesourcery.com>
4116 * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
4117 (gfc_conv_descriptor_base): Rename ...
4118 (gfc_conv_descriptor_offset): ... to this.
4119 (gfc_trans_allocate_array_storage): Set offset to zero.
4120 (gfc_conv_array_base): Rename ...
4121 (gfc_conv_array_offset): ... to this.
4122 (gfc_conv_array_index_ref): Add offset parameter.
4123 (gfc_conv_array_ref): Include offset.
4124 (gfc_trans_preloop_setup): Use existing offset.
4125 (gfc_trans_allocate_temp_array, gfc_array_allocate,
4126 gfc_trans_auto_array_allocation, gfc_trans_g77_array,
4127 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
4128 gfc_conf_ss_descriptor): Set offset.
4129 * trans-array.h: Rename prototypes.
4130 * trans-const.h (gfc_index_zero_node): Define.
4131 * trans-decl.c (gfc_build_qualified_array): Change base to offset.
4132 * trans-types.c (gfc_get_array_type_bounds): Ditto.
4133 (gfc_get_nodesc_array_type): Calculate offset before upper bound.
4135 2004-03-25 Diego Novillo <dnovillo@redhat.com>
4137 * convert.c (convert): Don't handle WITH_RECORD_EXPR.
4139 2004-03-24 Bud Davis <bdavis9659@comcast.net>
4142 * arith.c (gfc_convert_integer,gfc_convert_real): Removed leading '+'
4143 before conversion by gmp library call.
4145 2004-03-24 Bud Davis <bdavis9659@comcast.net>
4148 * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
4150 2004-02-24 Richard Henderson <rth@redhat.com>
4152 * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
4154 2004-02-19 Loren J. Rittle <ljrittle@acm.org>
4156 * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
4157 (fortran/gfortran.info): ... to here.
4160 2004-02-16 Richard Henderson <rth@redhat.com>
4162 * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
4163 * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
4164 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
4165 (gfc_expand_function): Rename from expand_function_body, make static,
4166 don't do anything except invoke tree_rest_of_compilation.
4167 (gfc_be_parse_file): Invoke cgraph.
4168 (gfc_expand_decl): Remove.
4169 (gfc_init_builtin_functions): Add __builtin_init_trampoline and
4170 __builtin_adjust_trampoline.
4171 * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
4172 (gfc_finalize): New.
4173 (gfc_generate_function_code): Use it. Lower nested functions.
4174 * trans-expr.c (gfc_conv_function_call): Add static chain operand
4176 * trans.c (gfc_build_function_call): Likewise.
4177 * trans.h (expand_function_body): Remove.
4179 2004-02-15 Victor Leikehman <lei@il.ibm.com>
4182 * trans-decl.c (gfc_build_function_decl) For functions
4183 returning CHARACTER pass an extra length argument,
4184 following g77 calling conventions.
4185 * trans-types.c (gfc_get_function_type) Ditto.
4186 * trans-expr.c (gfc_conv_function_call) Ditto.
4188 2004-02-14 Paul Brook <paul@codesourcery.com>
4190 * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
4192 2004-02-12 Paul Brook <paul@nowt.org>
4196 2004-02-08 Steve Kargl <sgk@troutmask.apl.washington.edu>
4198 * gfortran.texi: Fix typos.
4200 2004-02-07 Bud Davis <bdavis9659@comcast.net>
4203 * intrinsic.c (add_conversions) Use logical conversion instead
4205 * trans-types.c (gfc_get_logical_type) implemented logical*1
4208 2004-01-17 Paul Brook <paul@codesourcery.com>
4210 * lang-specs.h: Remove %<fixed-form.
4212 2004-01-15 Toon Moene <toon@moene.indiv.nluug.nl>
4214 * lang-specs.h: Enable preprocessing of source files
4215 ending in .F, .fpp, .FPP, .F90 and .F95.
4217 2004-01-13 Toon Moene <toon@moene.indiv.nluug.nl>
4220 * lang-specs.h: Enable compilation of files ending
4221 in .f, .for and .FOR.
4223 2004-01-11 Paul Brook <paul@codesourcery.com>
4225 * trans-stmt.c (gfc_trans_if_1): New function.
4226 (gfc_trans_if): Use it.
4228 2004-01-11 Erik Schnetter <schnetter@uni-tuebingen.de>
4230 * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
4231 (gfc_option_t): Add max_identifier_length.
4232 * lang.opt: Add fmax-identifier-length.
4233 * match.c (parse_name): Use limit.
4234 * options.c (gfc_init_options): Set max_identifier_length.
4235 (gfc_handle_option): Ditto.
4237 2004-01-11 Feng Wang <fengwang@nudt.edu.cn>
4239 * intrinsic.c (add_functions): Add resolve function to dcmplx.
4240 * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
4241 * iresolve.c (gfc_resolve_dcmplx): New function.
4243 2004-01-10 Paul Brook <paul@codesourcery.com>
4245 * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
4246 * trans-types.c (gfc_sym_type): Handle external dummy procedures.
4247 (gfc_return_by_reference): Correct condition.
4248 (gfc_get_function_type): Ditto.
4250 2004-01-10 Paul Brook <paul@codesourcery.com>
4252 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
4255 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
4257 * iresolve.c: Use correct kind.
4259 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
4262 * trans-decl.c (gfc_create_module_variable): Output array valued
4265 2004-01-10 Paul Brook <paul@codesourcery.com>
4267 * resolve.c (resolve_branch): Get error message right way round.
4269 2004-01-10 Canqun Yang <canqun@nudt.edu.cn>
4271 * trans-array (gfc_conv_loop_setup): Adjust comment to track
4273 (gfc_array_allocate): Don't count size of element twice.
4275 2004-01-04 Paul Brook <paul@codesourcery.com>
4277 * lang.opt (i8, r8, std=*): Remove RejectNegative.
4279 2004-01-04 Paul Brook <paul@codesourcery.com>
4281 * error.c (gfc_notify_std): New function.
4282 * gfortran.h (gfc_notify_std): Declare.
4283 (GFC_STD_*): Define.
4284 (gfc_option_t): Add warn_std and allow_std.
4285 * intrinsic.c (gfc_init_expr_extensions): Fix logic.
4286 (gfc_intrinsic_func_interface): Use gfc_notify_std.
4287 * check.c (check_rest): Use gfc_notify_std.
4288 * match.c (gfc_match_pause): Ditto.
4289 (gfc_match_assign): Ditto.
4290 (gfc_match_goto): Ditto.
4291 * resolve.c (resolve_branch): Ditto.
4292 * lang.opt: Add std=<foo> and w.
4293 * options.c (gfc_init_options): Set allow_std and warn_std.
4294 (gfc_handle_option): Handle OPT_std_* and OPT_w.
4296 2004-01-01 Paul Brook <paul@codesourcery.com>
4298 * array.c (gfc_append_constructor): Take constructor, not expression.
4299 * data.c (struct gfc_expr_stack): Remove.
4300 (expr_stack): Remove.
4301 (find_con_by_offset): Rename from find_expr_in_con.
4302 (find_con_by_component): Rename from find_component_in_con.
4303 (gfc_get_expr_stack): Remove.
4304 (gfc_assign_data_value): Rewrite.
4305 (gfc_expr_push): Remove.
4306 (gfc_expr_pop): Remove.
4307 (gfc_advance_section): Rename from
4308 gfc_modify_index_and_calculate_offset. Handle unbounded sections.
4309 (gfc_get_section_index): Handle unbounded sections.
4310 * gfortran.h: Update prototypes.
4311 * resolve.c (check_data_variable): Array section maight not be the
4314 2004-01-01 Paul Brook <paul@codesourcery.com>
4317 * resolve.c (resolve_symbol): Allow assumed length function results.
4319 2004-01-01 Steve Kargl <sgk@troutmask.apl.washington.edu>
4321 * match.c (gfc_match_pause): Fix spelling.
4323 2004-01-01 Steven Bosscher <stevenb@suse.de>
4326 * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
4327 reference from the expression.
4329 2003-12-26 Feng Wang <fengwang@nudt.edu.cn>
4331 * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
4333 * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
4334 (gfc_exec_op): New EXEC_LABEL_ASSIGN.
4335 (symbol_attribute):New variable attribute: assign.
4336 * io.c (resolve_tag):Integer variable is allowed.
4337 (match_dt_format): Add ASSIGN statement. Set assign flag.
4338 * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
4339 (gfc_match_assign): Add ASSIGN statement. Set assign flag.
4340 (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
4341 * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
4342 (next_statement): Add ST_LABEL_ASSIGNMENT.
4343 (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
4344 * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
4345 (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
4346 * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
4347 * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
4348 assign. Put them into the stuct lang_decl.
4349 * trans-io.c (set_string): Add the assign statement.
4350 * trans-stmt.c (gfc_trans_label_assign): New function.
4351 (gfc_trans_goto): Translate ASSIGNED GOTO statement.
4352 * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
4353 * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
4354 * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
4355 (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
4356 (GFC_DECL_ASSIGN(node)): New macro to access flag.
4358 2003-12-31 Huang Chun <chunhuang73@hotmail.com>
4361 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
4364 2003-12-22 Toon Moene <toon@moene.indiv.nluug.nl>
4366 * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
4367 that arguments to subroutines/functions can't alias themselves, nor global
4370 2003-12-20 Steven Bosscher <stevenb@suse.de>
4372 * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
4373 * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
4375 2003-12-12 Huang Chun <chunhuang73@hotmail.com>
4377 * primary.c (match_substring): Fix substring bug for start point
4378 or end point is NULL.
4379 * trans-expr.c (gfc_conv_substring): Ditto
4380 * trans-types.c (gfc_sym_type): Get correct type of scalar
4381 character variables.
4382 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
4385 2003-12-10 Richard Henderson <rth@redhat.com>
4387 * options.c (gfc_post_options): Don't ever use rtl inlining.
4389 2003-12-05 Canqun Yang <canqun@nudt.edu.cn>
4391 * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
4392 * trans-equivalence.c: Remove.
4393 * trans-decl.c (gfc_get_symbol_decl): Update to match.
4394 (gfc_generate_function_code): Ditto.
4395 * trans-array.c (gfc_conv_array_parameter): Ditto.
4396 * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
4397 (F95_ADDITIONAL_OBJS): Add stor-layout.o
4398 * trans.h (gfc_trans_equivalence): Remove.
4399 * gfortran.h (struct gfc_equiv): Add used field.
4400 (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
4401 equiv_offset fields.
4403 2003-12-05 Richard Henderson <rth@redhat.com>
4405 * trans.c (gfc_build_addr_expr): New.
4406 (gfc_build_indirect_ref, gfc_build_array_ref): New.
4407 * trans.h: Declare them.
4408 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
4409 trans-stmt.c, trans.c (*): Use them.
4411 * f95-lang.c (gfc_post_options): Remove dead prototype.
4412 * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
4413 * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
4416 2003-12-01 Feng Wang <fengwang@nudt.edu.cn>
4418 * io.c (gfc_match_format): Check for missing format label.
4420 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
4423 * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
4424 from interfaces in modules.
4426 2003-11-30 Paul Brook <paul@nowt.org>
4428 * trans-array.c (gfc_trans_g77_array): Make non-static.
4429 (gfc_trans_assumed_size): Remove.
4430 (gfc_trans_dummy_array_bias): Explicitly free temporary.
4431 * trans-array.h (gfc_trans_g77_array): Add prototype.
4432 (gfc_trans_assumed_size): Remove.
4433 * trans-decls.c (gfor_fndecl_push_context): Remove.
4434 (gfor_fndecl_pop_context): Remove.
4435 (gfc_build_function)decls): Don't create them.
4436 (gfc_trans_deferred_vars): Update to match. Remove dead code.
4437 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
4439 2003-11-30 Kejia Zhao <kejia_zh@nudt.edu.cn>
4441 * trans-array.c (gfc_conv_array_parameter): Simplify
4442 array argument passing for array name actual argument.
4443 * trans-expr.c (gfc_conv_function_call): Ditto
4444 * trans-types.c (gfc_is_nodesc_array):Ditto.
4446 2003-11-30 Paul Brook <paul@nowt.org>
4448 * f95-lang.c (gfc_post_options): Move ...
4449 * options.c (gfc_post_options): .. to here. Handle inlining options.
4450 * gfortran.h (gfc_post_options): Add prototype.
4452 2003-11-28 Richard Henderson <rth@redhat.com>
4454 * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
4456 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
4458 * trans.h (has_alternate_specifier): New global variable.
4459 * match.c (gfc_match_call): Handle actual arguments associated with
4460 alternate return indicators.
4461 * trans-expr.c (gfc_conv_function_call): Ditto
4462 * trans-stmt.c (gfc_trans_call): Ditto
4463 (gfc_trans_return): Handle return statement with value.
4464 * trans-decl.c (gfc_generate_function_code): Handle functions with
4466 (gfc_get_fake_result_decl): Ditto
4467 * trans-types.c (gfc_get_function_type): Ditto
4468 * resolve.c (resolve_actual_arglist): Check alternate return indicators.
4469 (resolve_formal_arglist): Check asterisk dummy.
4471 2003-11-27 Paul Brook <paul@nowt.org>
4473 * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
4474 allocation interface.
4475 (gfc_conv_ array_parameter): Ditto.
4476 (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
4477 * trans-array.c: Update prototype.
4478 * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
4479 (gfc_trans_auto_character_variable): Use new memory alloc interface.
4480 * trans-expr.c (gfc_conv_string_tmp): Ditto.
4481 (gfc_conv_function_call): Use gfc_conv_string_tmp.
4482 * trans-stmt.c (gfc_do_allocate): Use new memory alloc interface.
4483 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
4484 * trans.h (gfc_ss_info): Remove unused pdata field.
4485 * trans.c (gfc_create_var_np): Change T to V.
4487 2003-11-26 Richard Henderson <rth@redhat.com>
4489 * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
4490 * trans-intrinsic.c (gfc_intrinsic_map): ... here. Add SCALE,
4491 FRACTION, NEAREST, SET_EXPONENT.
4492 (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
4493 Fix GTY marking. Remove unnecessary const's.
4494 (LIBM_FUNCTION): Rename from I_LIB.
4495 (LIBF_FUNCTION): New.
4496 (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
4497 conventions. Assume the expr signature is correct. Mark const.
4498 (gfc_conv_intrinsic_exponent): Use library functions.
4499 (gfc_conv_intrinsic_set_exponent): Remove.
4500 (gfc_conv_intrinsic_scale): Remove.
4501 (gfc_conv_intrinsic_nearest): Remove.
4502 (gfc_conv_intrinsic_fraction): Remove.
4503 (gfc_conv_intrinsic_function): Update.
4504 * trans-decl.c (gfor_fndecl_math_exponent4): New.
4505 (gfor_fndecl_math_exponent8): New.
4506 (gfc_build_intrinsic_function_decls): Set them.
4507 * trans.h: Declare them.
4509 2003-11-25 Canqun Yang <canqun@nudt.edu.cn>
4511 * trans-common.c (gfc_layout_global_equiv): Locate the error for
4512 underflow COMMON block.
4513 (gfc_trans_one_common): Fix bug for size of COMMON block containing
4514 EQUIVALENCE object. Also fix typo in an error message.
4516 2003-11-25 Diego Novillo <dnovillo@redhat.com>
4518 * Make-lang.in: Add check-gfortran to lang_checks.
4519 (check-f95): Alias for check-gfortran.
4521 2003-11-25 Jason Merrill <jason@redhat.com>
4523 * Make-lang.in (f95.tags): Create TAGS.sub files in each
4524 directory and TAGS files that include them for each front end.
4526 2003-11-24 Paul Brook <paul@nowt.org>
4529 * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
4531 2003-11-24 Paul Brook <paul@nowt.org>
4533 * expr.c (simplify_const_ref): Return SUCCESS for things we don't
4535 * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
4537 2003-11-24 Paul Brook <paul@nowt.org>
4540 * array.c (gfc_array_ref_shape): Handle elemental dimensions.
4541 * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
4543 2003-11-20 Richard Henderson <rth@redhat.com>
4545 * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
4546 (gfc_conv_array_base): Likewise.
4547 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
4548 * trans-expr.c (gfc_conv_string_tmp): Likewise.
4549 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
4550 * trans-stmt.c (gfc_trans_character_select): Likewise.
4552 2003-11-13 Paul Brook <paul@nowt.org>
4554 * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
4556 2003-11-13 Canqun Yang <canqun@nudt.edu.cn>
4558 * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
4559 (resolve_equivalence): New function.
4560 (resolve_equivalence_derived): New function.
4562 2003-11-12 Richard Henderson <rth@redhat.com>
4564 * trans.c (gfc_trans_code): Use annotate_with_locus instead of
4565 annotate_all_with_locus.
4567 2003-11-11 Canqun Yang <canqun@nudt.edu.cn>
4569 * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
4570 * trans-decl.c (gfc_finish_var_decl): Modified.
4572 2003-11-08 Paul Brook <paul@nowt.org>
4575 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
4578 2003-11-06 Paul Brook <paul@nowt.org>
4580 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
4582 2003-11-02 Canqun Yang <canqun@nudt.edu.cn>
4584 * match.c (gfc_match_stopcode): Assign '0' to stop_code.
4586 2003-10-27 Anthony Green <green@redhat.com>
4588 * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
4589 (f95.stagefeedback): Ditto.
4591 2003-10-27 Andrew Pinski <pinskia@physics.uc.edu>
4594 * Make-lang.in (f95.stageprofile): Add.
4595 (f95.stagefeedback): Add.
4597 2003-10-23 Richard Henderson <rth@redhat.com>
4599 * f96-lang.c (gfc_gimplify_expr): Remove.
4600 (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
4601 (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
4603 2003-10-23 Richard Henderson <rth@redhat.com>
4605 * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
4607 2003-10-20 Paul Brook <paul@nowt.org>
4609 * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
4610 * trans-stmt.c (gfc_trans_do_while): Ditto.
4612 2003-10-17 Paul Brook <paul@nowt.org>
4614 * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
4616 2003-10-17 Paul Brook <paul@nowt.org>
4618 * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
4620 2003-10-17 Feng Wang <wf_cs@yahoo.com>
4622 * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
4623 (gfc_resolve_minloc): Ditto.
4624 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
4625 Return the value after subtracting the lower bound.
4627 2003-10-16 Richard Henderson <rth@redhat.com>
4629 * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
4631 2003-10-16 Steven Bosscher <steven@gcc.gnu.org>
4633 * lang.c: Remove -M option for now, it's in the way for C.
4635 2003-10-14 Jason Merrill <jason@redhat.com>
4637 * Make-lang.in (f95.tags): New rule.
4639 2003-10-13 Richard Henderson <rth@redhat.com>
4641 * trans.c (gfc_trans_code): Use annotate_all_with_locus.
4643 2003-10-13 Paul Brook <paul@nowt.org>
4645 * trans-decl.c (generate_local_decl): Don't create junk variables.
4647 2003-10-13 Paul Brook <paul@nowt.org>
4649 * resolve.c (resolve_formal_arglist): Use function result decl in
4650 preference to function decl.
4652 2003-10-12 Richard Henderson <rth@redhat.com>
4654 * f95-lang.c (gfc_define_builtin): New const_p argument. Set
4655 TREE_READONLY. Update all callers.
4657 2003-10-12 Feng Wang <wf_cs@yahoo.com>
4659 * iresolve.c (gfc_resolve_cshift): Change to match implementation.
4660 * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
4661 (gfc_is_intrinsic_libcall): Add CSHIFT.
4663 2003-10-12 Richard Henderson <rth@redhat.com>
4665 * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
4666 (gfc_trans_array_constructor_value): Likewise.
4667 (gfc_conv_array_initializer): Likewise.
4668 * trans-stmt.c (gfc_trans_character_select): Likewise.
4670 2003-11-12 Kejia Zhao <kejia_zh@yahoo.com.cn>
4672 * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
4674 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
4676 * check.c (gfc_check_repeat): Check arguments are scalar.
4677 (gfc_check_trim): New function.
4678 * intrinsic.h (gfc_check_trim): Add prototype.
4679 * intrinsic.c (add_functions): Use it.
4680 * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
4682 * trans-decl.c: Ditto.
4683 (gfc_build_intrinsic_fucntion_decls): Set them.
4684 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
4685 (gfc_conv_intrinsic_trim): New function.
4686 (gfc_conv_intrinsic_repeat): New function.
4687 (gfc_conv_intrinsic_function): Use them.
4689 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
4691 * trans-types.c (gfc_sym_type): Handle result variables.
4693 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
4695 * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
4696 gfc_get_character_type.
4698 2003-10-11 Feng Wang <wf_cs@yahoo.com>
4700 * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
4702 2003-10-11 Paul Brook <paul@nowt.org>
4704 * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
4705 (gfc_resolve_dprod): New function.
4706 (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
4707 * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
4708 (gfc_resolve_dprod): Declare.
4709 * intrinsic.c (add_functions): Use them.
4710 * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
4712 2003-10-06 Richard Henderson <rth@redhat.com>
4714 * f95-lang.c (gfc_init_builtin_functions): Add clzll.
4715 * trans-intrinsic.c (call_builtin_clz): Use it.
4717 2003-10-05 Paul Brook <paul@nowt.org>
4719 * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
4720 * trans-decl.c (gfc_generate_function_code): Set
4721 cfun->function_end_locus.
4723 2003-09-24 Jason Merrill <jason@redhat.com>
4725 * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
4728 2003-09-21 Lifang Zeng <zlf605@hotmail.com>
4729 Paul Brook <paul@nowt.org>
4731 * Make-lang.in (F95_OBJS): Add fortran/data.o.
4732 * array.c (gfc_inser_constructor): New function.
4733 (gfc_get_constructor): New function.
4734 (gfc_free_constructor): Initialize offset and repeat.
4735 (iterator_stack): Remove.
4736 (expand_info): Add offset, component and repeat fields.
4737 (expand_constructor): Set them.
4738 (expand): Set new fields.
4739 (gfc_copy_constructor): Ditto. Avoid recursion.
4740 * gfortran.h: Add prototypes for new functions.
4741 (gfc_constructor): Add offset, component and repeat.
4742 (iteratio_stack): Move to here.
4743 * resolve.c (check_data_variable): Convert data values into variable
4745 (traverse_data_list): Build implicit loop chain.
4746 (gfc_resolve): Ditto.
4747 * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
4748 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
4749 * trans-expr.c (gfc_conv_structure): Handle array initializers.
4750 (gfc_conv_expr): Update to match.
4751 * trans.h (gfc_conv_structure): Declare.
4754 2003-09-20 Kejia Zhao <kejia_zh@yahoo.com.cn>
4756 * trans.h: Add declarations for gfor_fndecl_si_kind and
4757 gfor_fndecl_sr_kind.
4758 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
4759 * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
4760 (g95_conv_intrinsic_sr_kind): New function.
4761 (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
4764 2003-09-17 Lars Segerlund <Lars.Segerlund@comsys.se>
4766 * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
4767 instead of _4 and _8 as postfix for libgfortran calls.
4769 2003-09-16 Paul Brook <paul@nowt.org>
4771 * array.c (compare_bounds): New function.
4772 (gfc_compare_array_spec): Use it.
4774 2003-09-14 Paul Brook <paul@nowt.org>
4776 * primary.c (gfc_match_rvalue): Make sure sym->result is set.
4777 * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
4779 2003-09-14 Paul Brook <paul@nowt.org>
4781 * check.c (dim_rank_check): Allow assumed bounds if requested.
4782 (gfc_check_lbound): Call it.
4783 (gfc_check_ubound): Ditto.
4784 (gfc_check_size): Change to match.
4785 * simplify.c (gfc_simplify_bound): New function.
4786 (gfc_simplify_lbound): New function.
4787 (gfc_simplify_ubound): New function.
4788 * intrinsic.h: Declare them.
4789 * intrinsic.c (add_functions): Use them.
4791 2003-09-14 Paul Brook <paul@nowt.org>
4793 * io.c (format_lex): Initialize negative_flag.
4794 (check_format): Intialize repeat.
4795 * trans-io.c (gfc_new_nml_name_expr): Declare static.
4796 (gfc_new_var_expr): Ditto.
4798 2003-09-14 Paul Brook <paul@nowt.org>
4800 * trans-array.c (gfc_conv_array_initializer): Handle derived types.
4801 * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
4803 2003-09-12 Paul Brook <paul@nowt.org>
4805 * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
4807 2003-09-12 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
4809 * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
4810 for a correct expression.
4812 2003-09-10 Kejia Zhao <kejia_zh@yahoo.com.cn>
4814 * trans-intrinsic.c (real_compnt_info): New struct.
4815 (prepare_arg_info): New function.
4816 (gfc_conv_intrinsic_set_exponent): New function.
4817 (gfc_conv_intrinsic_scale): New function.
4818 (gfc_conv_intrinsic_nearest): New function.
4819 (gfc_conv_intrinsic_fraction): New function.
4820 (gfc_conv_intrinsic_exponent): New function.
4821 (gfc_conv_intrinsic_spacing): New function.
4822 (gfc_conv_intrinsic_rrspacing): New function.
4823 (gfc_conv_intrinsic_function): Use them.
4825 2003-08-24 XiaoQiang Zhang (zhangapache@yahoo.com>
4827 * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
4828 build_int_2 changed from (high, low) to (low, high).
4829 * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
4830 ioparm_namelist_read_mode, iocall_set_nml_val_int,
4831 iocall_set_nml_val_float, iocall_set_nml_val_char,
4832 iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
4833 (gfc_build_io_library_fndecls): Add variable initialization.
4834 (gfc_new_nml_name_expr, get_new_var_expr): New function.
4835 (build_dt): Add namelist support.
4836 * io.c (value): New variable.
4837 (check_format): Support FMT_H now.
4839 2003-09-07 Paul Brook <paul@nowt.org>
4841 * io.c (gfc_resolve_dt): Error if format label is not defined.
4843 2003-09-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
4845 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
4846 about case_switch's break. The other is about building the condition
4847 statement tree, which judges the argument in the range of the
4848 corresponding integer type.
4849 * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
4850 for the large values.
4852 2003-09-05 Paul Brook <paul@nowt.org>
4854 * f95-lang.c (expand_function_body): Gimplify the function.
4856 2003-09-04 Jeff Law <law@redhat.com>
4858 * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
4861 2003-09-04 Paul Brook <paul@nowt.org>
4863 * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
4864 (gfc_expand_stmt): New function.
4865 (LANG_HOOKS_RTL_EXPAND_STMT): Define.
4866 (expand_function_body): Use tree_rest_of_compilation.
4867 * trans-decl.c (gfc_generate_function_code): Don't free cfun.
4869 2003-09-03 Jeff Law <law@redhat.com>
4871 * f95-lang.c (gfc_init_builtin_functions): C arrays start at
4874 2003-08-30 Paul Brook <paul@nowt.org>
4876 * f95-lang.c (builtin_function): Remove #if 0 code.
4877 (gfc_define_builtin): New function.
4878 (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
4879 * mathbuiltins.def: New file.
4880 * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
4881 (gfc_intrinsic_map): Use mathbuiltins.def.
4882 (gfc_intrinsic_builtin_t): Remove.
4883 (gfc_build_intrinsic_lib_fndecls): Update.
4884 * trans-types.c (gfc_init_types): Remove redundant initilaization of
4885 signed_size_type_node.
4887 2003-08-29 Paul Brook <paul@nowt.org>
4889 * arith.c (gfc_real_kinds): Use correct minimum exponents.
4891 2003-08-22 Kejia Zhao <kejia_zh@yahoo.com.cn>
4893 * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
4894 (gfc_conv_intrinsic_function): Add MODULO.
4896 2003-08-22 Jason Merrill <jason@redhat.com>
4898 * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
4900 2003-08-22 Andreas Jaeger <aj@suse.de>
4902 * Make-lang.in (f95.install-common): Add DESTDIR support.
4903 * (f95.install-info): Likewise.
4904 (f95.uninstall): Likewise.
4906 2003-08-19 Diego Novillo <dnovillo@redhat.com>
4908 * trans-types.c (gfc_init_types): Initialize
4909 signed_size_type_node with size_type_node.
4911 2003-08-18 Paul Brook <paul@nowt.org>
4913 * dependency.c (gfc_dependency): New enum.
4914 (check_another_array_ref): Remove.
4915 (gfc_get_array_from_component): Remove.
4917 (get_range): Remove.
4918 (get_no_of_elements): Use mpz_t, not mpf_t.
4919 (transform_sections): New function.
4920 (gfc_check_range_range): Rename ...
4921 (gfc_check_section_vs_section): ... to this. Use new function.
4922 (gfc_is_inside_range): Rewrite to match.
4923 (gfc_check_element_vs_section): Ditto.
4924 (gfc_check_element_vs_element): Ditto.
4926 (gfc_dep_resolver): Ditto. Remove unused parameter.
4927 * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
4928 gfc_check_element_vs_element, gfc_is_inside_range,
4929 gfc_get_array_from_component): Remove prototypes for static functions.
4930 (gfc_dep_resolver): Update prototype.
4931 * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
4933 2003-08-15 Paul Brook <paul@nowt.org>
4935 * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
4936 return values to parent scope.
4937 (gfc_build_dummy_array_decl): Ditto.
4939 2003-08-14 Paul Brook <paul@nowt.org>
4941 * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
4942 size of the type, not the pointer.
4943 * resolve.c (resolve_symbol): Give more accurate error message.
4945 2003-08-10 Paul Brook <paul@nowt.org>
4947 * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
4949 2003-08-10 Paul Brook <paul@nowt.org>
4951 * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
4954 2003-08-10 Chun Huang <compiler@sohu.com>
4956 * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
4957 (resolve_symbol): Ditto.
4958 * trans-expr.c (gfc_conv_statement_function): New function.
4959 (gfc_conv_function_expr): Use it.
4961 2003-08-10 Paul Brook <paul@nowt.org>
4963 * trans-array.c (gfc_conv_ss_startstride): Handle functions.
4964 (walk_function_expr): Set section rank.
4965 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
4967 2003-08-10 Paul Brook <paul@nowt.org>
4969 * intrinsic.c (add_sym): Prefix names with correct string.
4970 (add_sym_0s): New function.
4971 (add_subroutines): Register abort.
4973 2003-08-10 Erik Schnetter <schnetter@uni-tuebingen.de>
4975 * gfortran.h: Introduce options to control the mangling.
4976 * lang.opt: Likewise.
4977 * options.c (gfc_init_options): Handle the options.
4978 * trans-common.c (gfc_sym_mangled_common_id): New function.
4979 (gfc_build_common_decl): Call it.
4980 * trans-decl.c (gfc_sym_mangled_function_id): New function.
4981 (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
4983 2003-08-09 Paul Brook <paul@nowt.org>
4985 * module.c (mio_symbol): Always ouput a namespace for formal args.
4986 (load_needed): Namespace now belong to their proper symbol.
4987 (gfc_dump_module): Change G95=>GFORTRAN.
4989 2003-08-05 Paul Brook <paul@nowt.org>
4991 * options.c: Force -fg77-calls.
4993 2003-08-02 Paul Brook <paul@nowt.org>
4995 * Makelang.in: Rename G95_* to GFORTRAN_*.
4996 * All sources: Rename G95_* to GFC_*.
4998 2003-08-01 Paul Brook <paul@nowt.org>
5000 * fortran/Make-lang.in: Use GMPLIBS.
5001 * fortran/config-lang.in: Set need_gmp.
5002 * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
5004 2003-07-27 Andreas Jaeger <aj@suse.de>
5006 * trans-decl.c (gfc_generate_constructors): Convert prototype to
5008 * trans-const.c (gfc_init_constants): Likewise.
5009 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
5011 * gfortranspec.c: Convert to ISO C90.
5012 (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
5014 2003-07-26 Paul Brook <paul@nowt.org>
5016 * lang.opt: Add -fdump-parse-tree.
5017 * options.c (gfc_handle_option): Ditto.
5018 * resolve.c (resolve_forall_iterators): Convert to proper type.
5019 * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
5021 2003-07-26 Paul Brook <paul@nowt.org>
5023 * Makefile.in: Add build dependencies on files common with rest of gcc.
5025 2003-07-26 Lifang Zeng <zlf605@hotmail.com>
5027 * trans.h: Declare g95_trans_pointer_assignment.
5028 * trans-expr.c (g95_trans_pointer_assignment): New function.
5029 (g95_trans_pointer_assign): Use it.
5030 * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
5031 (g95_trans_pointer_assign_need_temp): New function.
5033 2003-07-26 Paul Brook <paul@nowt.org>
5035 * gfortran.texi: Replace references to g95.
5037 2003-07-26 Paul Brook <paul@nowt.org>
5039 Rename g95_* to gfc_*.
5041 2003-07-25 Paul Brook <paul@nowt.org>
5043 * gfortran.h: Rename from g95.h.
5044 * trans-types.c (boolean_type_node, booelan_true_node,
5045 boolean_false_node): Remove.
5046 * trans-types.h: Ditto.
5048 2003-07-25 Chun Huang <compiler@sohu.com>
5050 * parse.c (accept_statement): Implement BLOCK DATA statement.
5051 * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
5054 2003-07-24 Lifang Zeng <zlf605@hotmail.com>
5056 * trans-stmt.c (temporary_list): Define.
5057 (g95_trans_assign_need_temp): New function.
5058 (g95_trans_forall_1): Modified for WHERE.
5059 (g95_trans_where_assign): Modified.
5060 (g95_trans_where_2): Modified.
5061 (g95_evaluate_where_mask): Modified.
5062 (g95_trans_where): Modified.
5063 (g95_get_temp_expr): Removed.
5064 (g95_add_to_where_stmt_list): Removed.
5065 (compute_overall_iter_number): Modified for WHERE.
5066 * trans.h: Remove where_stmt_list.
5068 2003-07-24 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5070 * lang.opt: Correct description of options -J and -M.
5072 2003-07-23 Steven Bosscher <steven@gcc.gnu.org>
5074 * lang.opt: Move help text to here.
5075 * lang-options.h: Remove.
5077 2003-07-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5078 * iresolve.c (g95_resolve_transpose): Proper variable in switch.
5079 * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
5082 2003-07-22 Steven Bosscher <steven@gcc.gnu.org>
5083 Paul Brook <paul@nowt.org>
5085 * check.c (check_rest): Use global pedantic flag.
5086 * io.c (data_desc): Ditto.
5087 * error.c (g95_warning, g95_warning_now): Use global flag.
5088 * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
5089 (expand_function_body): Update to new prototypes.
5090 (g95_init): Use new option names.
5091 * g95.h (g95_option_t): Standardize names.
5092 (g95_init_options, g95_handle_option): Update prototypes.
5093 * interface.c: Use new option names.
5100 * simplify.c: Ditto.
5102 * trans-array.c: Ditto.
5103 * trans-expr.c: Ditto.
5104 * trans-types.c: Ditto.
5105 * trans-decl.c: Ditto.
5106 (g95_build_library_function_decl): Remove obsolete VPARAMS.
5108 * options.c (g95_display_help): Remove.
5109 (g95_init_options): Convert to new scheme.
5111 (g95module_option): Ditto, rename from g95_parse_arg.
5112 (g95_handle_module_path_options): New function.
5113 * trans-equivalence.c: Fix error message.
5114 * lang.opt: Corrections.
5116 2003-07-21 Steven Bosscher <steven@gcc.gnu.org>
5118 * lang.opt: New file.
5120 2003-07-21 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5122 * decl.c (match_attr_spec): Set colon_seen.
5124 2003-07-14 Paul Brook <paul@nowt.org>
5126 * trans-array.c: Update comment.
5127 (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
5128 * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
5129 minmaxloc,minmaxval): Ditto.
5130 * trans-io.c (g95_trans_transfer): Ditto.
5131 * trans-stmt.c: Remove unneeded prototypes.
5132 (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
5133 (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
5134 (compute_inner_temp_size): Remove bits of dead code. Add comments.
5135 Don't share loopinfo.
5136 (compute_overall_iter_number): Declare as static.
5137 (allocate_temp_for_forall_nest): Ditto.
5138 (g95_trans_forall_1): Don't pass shared loopinfo.
5139 * trans.c (g95_start_block): Expand comment.
5141 2003-07-12 Paul Brook <paul@nowt.org>
5143 * arith.c (g95_index_integer_kind): Remove unused initializer.
5144 * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
5145 index by size of element.
5146 (generate_loop_for_rhs_to_temp): Ditto.
5147 (allocate_temp_for_forall_nest): Use element size, not index size.
5149 2003-07-11 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5151 * arith.c (g95_index_integer_kind): Add a TODO.
5152 * simplify.c (g95_simplify_nearest): Add a TODO.
5154 2003-07-09 Chun Huang <compiler@sohu.com>
5156 * trans.h: Add declarations for gfor_fndecl_string_scan and
5157 gfor_fndecl_string_verify.
5158 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
5159 * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
5160 (g95_conv_intrinsic_verify): New function.
5161 (g95_conv_intrinsic_function): Add SCAN and VERIFY.
5162 * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
5163 of parameter 'BACK=.TRUE.'
5165 2003-07-05 Lifang Zeng <zlf605@hotmail.com>
5167 * trans-stmt.c (iter_info, forall_info): Define.
5168 (g95_trans_forall_block): Remove.
5169 (g95_trans_forall_loop): Use forall info blocks.
5170 (g95_trans_nested_forall_loop): New function.
5171 (g95_do_allocate): Handle things other than logical masks.
5172 (generate_loop_for_temp_to_lhs): New function.
5173 (generate_loop_for_rsh_to_temp): New function.
5174 (compute_inner_temp_size): New function.
5175 (compute_overall_iter_number): New function.
5176 (allocate_temp_for_forall_nest): New function.
5177 (g95_trans_forall): Move body ...
5178 (g95_trans_forall_1): ... to here. Handle loops with temporaries.
5180 2003-07-02 Paul Brook <paul@nowt.org>
5182 * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
5183 in correct scope. Change callers to match.
5184 * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
5185 * iresolve.c (g95_resolve_reshape): Only use constant shapes.
5187 2003-07-02 Paul Brook <paul@nowt.org>
5189 * trans-array.c (g95_conv_loop_setup): Remove dead var. Use
5190 expression shape for all expressions.
5191 * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
5193 2003-07-03 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5195 * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
5196 g95_parse_arg), intrinsic.c (g95_convert_type): support of
5198 * intrinsic.c, g95.h: Add g95_convert_type_warn,
5199 * resolve.c (g95_resolve_index): Call it.
5201 2003-07-02 Paul Brook <paul@nowt.org>
5203 * iresolve.c (g95_resolve_reshape): Set expression shape.
5204 (g95_resolve_shape): Ditto.
5205 * simplify.c (g95_simplify_shape): Move common code outside condition.
5206 * trans-array.c (g95_conv_array_initializer): Teach it how to count.
5208 2003-07-01 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5210 * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
5213 2003-06-29 Paul Brook <paul@nowt.org>
5215 * array.c (g95_simplify_iterator_var): Don't bother with return value.
5216 * expr.c (find_array_element, find_component_ref): New functions.
5217 (remove_subobject_ref): New function.
5218 (simplify_const_ref): Use them. Rename from simplify_component_ref.
5219 (simplify_ref_chain): New function.
5220 (g95_simplify_expr): Use it. Simplify parameter variable subobjects.
5221 (g95_specification_expr): Simplify the expression.
5222 * resolve.c (resolve_operator): Check simplifications return code.
5223 (g95_resolve_expr): Ditto.
5225 2003-06-26 Paul Brook <paul@nowt.org>
5227 * expr.c (simplify_component_ref): New function.
5228 (g95_simplify_expr): Use it.
5229 * resolve.c (resolve_structure_cons): Handle references.
5231 2003-06-25 Paul Brook <paul@nowt.org>
5233 * trans-io.c (build_dt): Handle internal units.
5235 2003-06-25 Canqun Yang <canqun@yahoo.com.cn>
5237 * trans-common.c (g95_build_common_decl): Array index range starts at 0.
5238 (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
5239 Use g95_array_index_type instead of integer_type_node.
5240 (g95_build_common_decl, g95_set_common_master_type): Use
5241 g95_character1_type_node instead of char_type_node.
5242 * trans-equivalence.c (g95_layout_local_equiv): As above.
5244 2003-06-24 Steven G. Kargl <kargls@attbi.com>
5246 * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
5247 remove last remains of -fquiet.
5249 2003-06-22 Paul Brook <paul@nowt.org>
5251 * resolve.c (resolve_operator): Don't fail if we can't simplify.
5252 (g95_resolve_expr): Ditto.
5253 (resolce_code): Mark as static.
5254 * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
5255 gimplifer doesn't (yet).
5257 2003-06-20 Paul Brook <paul@nowt.org>
5259 * g95.h: Add ST_PAUSE and EXEC_PAUSE.
5260 * match.c (g95_match_if): Add ST_PAUSE.
5261 (g95_match_stopcode): New function.
5262 (g95_match_pause, g95_match_stop): Use it.
5263 * parse.c (g95_ascii_statement): Handle ST_PAUSE.
5264 (decode_stmt, next_statement, parse_executable): Ditto.
5265 * resolve.c (resolve_code): Ditto.
5266 * st.c (g95_free_statement): Ditto.
5267 * trans-stmt.c (g95_trans_pause): New function.
5268 * trans-stmt.h: Declare it.
5269 * trans.c (g95_trans_code): Use it.
5270 * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
5272 (g95_build_builtin_function_decls): Initialize them.
5274 * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
5276 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5278 * io.c (g95_match_open , g95_match_close, g95_match_inquire,
5279 match_filepos): Fix error handling.
5281 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5283 * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
5284 Add assertions on arguments.
5285 * resolve.c (expression_shape): Remove useless &.
5286 * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
5287 g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
5288 g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
5289 g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
5290 g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
5291 g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
5292 (g95_simplify_not, g95_simplify_scale): Add assertions.
5294 2003-06-15 Paul Brook <paul@nowt.org>
5296 Clean up stuff to work with the ssa optimizers.
5297 * convert.c (convert): Handle BOOLEAN_TYPEs.
5298 * f95-lang.c (g95_truthvalue_conversion): Implement.
5299 * trans-array.c (g95_trans_array_constructor_value): Group multiple
5301 * trans.h (g95_truthvalue_conversion): Declare.
5302 * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
5303 * trans-stmt.c (g95_trans_character_select): Don't create array
5304 assignments. Mark labels as indirect jump targets.
5305 * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
5306 (g95_get_dtype_cst): Handle LOGICAL types.
5308 2003-06-14 Paul Brook <paul@nowt.org>
5310 * f95-lang.c (g95_gimplify_expr): New function.
5311 * trans-array.c (g95_trans_array_constructor_value): Don't create
5313 (g95_conv_expr_descriptor): Rename simple->gimple.
5314 * trans-expr.c (conv_expr_op): Use proper logical operators.
5315 * trans-intrinsic.c (build_fixbound_expr): New function.
5316 (build_fix_expr): Ditto.
5317 (g95_conv_intinsic_aint): Use them. Use builtin functions.
5318 (g95_conv_intrinsic_function): Add FLOOR and CEILING.
5320 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5322 * array.c (g95_compare_array_spec): Remove unreachable code.
5323 * expr.c (g95_copy_expr): Likewise.
5324 * intrinsic.c (g95_convert_type): Likewise.
5325 * misc.c (g95_code2string): Likewise.
5326 * simplify.c (g95_simplify_ishft, g95_simplify_real,
5327 g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
5328 * trans-stmt.c (g95_trans_select): Likewise.
5329 * primary.c (extend_ref): Add an assertion.
5330 * simplify.c (g95_convert_constant): Add const.
5331 * intrinsic.h: Remove g95_check_x_ni.
5332 * f95-lang.c (g95_finish): Call g95_release_include_path.
5334 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5336 * resolve.c (resolve_contained_functions): Fix typo introduced on
5339 2003-06-09 Paul Brook <paul@nowt.org>
5341 * g95.h: Include system.h not hwint.h.
5342 * many: use safe-ctype.h not ctype.h. Change isalpha -> ISALPHA, etc.
5343 * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
5345 2003-06-09 Paul Brook <paul@nowt.org>
5347 * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
5348 * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
5349 * trans-decl.c (g95_add_decl_to_functions): Make non-static.
5350 (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
5351 (g95_generate_function_code): Translate COMMON and EQUIVALENCE
5353 * trans.h (g95_trans_equivalence, g95_trans_common,
5354 g95_add_decl_to_function): Declare.
5355 * trans-common.c, trans-equivalence.c: New files.
5357 2003-06-08 Steven Bosscher <steven@gcc.gnu.org>
5359 * intrinsic.c (g95_intrinsic_extension): Remove.
5360 (add_functions): Substitute g95_check_x for g95_check_x_ni
5362 (g95_init_expr_extensions): New function.
5363 (g95_intrinsic_func_interface): Use it.
5364 * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
5365 * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
5366 g95_check_precision, g95_check_present, g95_check_radix,
5367 g95_check_range, g95_check_selected_real_kind): Do not set
5368 g95_intrinsic_extension.
5369 (g95_check_x_ni): Remove now duplicate of g95_check_x.
5371 * expr.c (check_inquiry): Add FIXME, fixup some code style.
5373 2003-06-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5375 * g95.h (ref_type): Name this type explicitly.
5376 * module.c (MIO_NAME): Add specialisations of mio_name.
5377 (mio_symbol_attribute, mio_typespec, mio_array_ref,
5378 mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
5379 (ab_attribute): Name this type explicitly.
5380 (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
5382 2003-06-05 Kejia Zhao <kejia_zh@yahoo.com.cn>
5384 * trans-intrinsic.c (g95_conv_allocated): New function.
5385 (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
5387 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
5389 * f95-lang.c: Don't include g95-support.h
5390 (g95_mark_addressable): Add prototype.
5391 (g95_init_decl_processing): Remove C front end hack.
5392 * f95-tree.c: Remove file.
5393 * support.c: Remove file.
5394 * g95-support.h: Remove file.
5395 * trans-types.c (g95_init_types): Set up boolean
5396 type related tree nodes.
5397 * Make-lang.in: Remove rules for dead files and
5398 dependencies on them.
5400 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
5402 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
5403 C front end dependency. Also, convert.c does not depend on
5404 g95-support.h anymore.
5405 * convert.c: Don't include c-common.h and g95-support.h
5406 * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
5407 (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
5408 stmts_are_full_exprs_p, current_stmt_tree,
5409 current_scope_stmt_stack): Remove.
5410 * g95-support.h (unsigned_conversion_warning): Kill proto.
5411 (boolean_type_node, boolean_true_node, boolean_false_node):
5412 Don't define here. Instead, make then true tree nodes in
5414 * support.c (c_global_trees): Die, C front end, die!!!
5415 (g95_init_c_decl_hacks): Don't touch intmax_type_node,
5416 uintmax_type_node, string_type_node and const_string_type_node.
5417 (decl_constant_value, overflow_warning): Make static functions.
5418 They are in death row too, though.
5419 (default_conversion, c_expand_asm_operands): Remove.
5420 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
5421 trans.c: Don't include c-common.h.
5422 * trans-types.c (boolean_type_node, boolean_true_node,
5423 boolean_false_node): Make them real tree nodes.
5424 * trans-types.h (intmax_type_node, string_type_node,
5425 const_string_type_node): Hack to work around C dependencies
5426 in builtin-types.def.
5428 2003-06-04 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5430 * decl.c (decl_types): Add some iterators-like sentinels.
5431 * decl.c (match_attr_spec): Use them.
5432 Use "decl_types" instead of "int".
5433 Add cast in call to g95_match_strings.
5434 * dump-parse-tree.c (g95_show_namespace): Use "g95_intrinsic_op"
5436 * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
5437 (g95_interface_info): Use "g95_intrinsic_op".
5438 * dump-parse-tree.c (g95_show_namespace): Use them.
5439 * interface.c (g95_check_interfaces): Use them.
5440 * module.c (read_module, write_module): Use them.
5441 * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
5442 Use "g95_intrinsic_op".
5443 * interface.c (check_operator_interface): Use "g95_intrinsic_op".
5444 Add a default case in switch statement.
5445 * intrinsic.h (g95_generic_isym_id): Moved to...
5446 * g95.h (g95_generic_isym_id): here.
5447 (g95_intrinsic_sym): Use "g95_generic_isym_id".
5448 * intrinsic.c (make_generic): Use "g95_generice_isym_id".
5449 * trans-intrinsic.c (g95_intrinsic_map_t,
5450 g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
5451 * match.c (g95_match_intrinsic_op): Add cast in call to
5454 2003-06-03 Steven Bosscher <steven@gcc.gnu.org>
5456 * support.c (skip_evaluation, warn_conversion, lvalue_p,
5457 lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
5458 constant_fits_type_p, convert_and_check,
5459 unsigned_conversion_warning): Remove these ugly remnants
5460 we inherited from the C front end.
5461 (function_types_compatible): Remove '#if 0'-edcode.
5462 (build_modify_expr): Likewise.
5463 (convert_for_assignment): Don't use the deceased functions.
5464 The parameter fundecl is now unused.
5465 (decl_constant_value): Always just return decl. In fact
5466 this function is not used at present, but it might be in
5467 the future, when we start using the tree inliner.
5468 (overflow_warning, default_conversion, c_expand_asm_operands):
5469 Abort when these are called, they are part of the C type
5470 checking implementation and therefore poison to Fortran.
5472 2003-06-04 Steven Bosscher <steven@gcc.gnu.org>
5474 * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
5475 c-pretty-print.o and c-dump.o. Add a comment on why we
5476 depend on c-semantics.c.
5477 * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
5478 Don't use the C front end tree dumper hook to dump the
5479 language specific tree representation -- we don't have
5480 one. So instead, inherit the default langhook.
5482 2003-06-02 Paul Brook <paul@nowt.org>
5484 * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
5486 2003-06-02 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5488 * check.c (g95_check_associated): Use proper types. Remove
5489 extraneous argument in call to g95_error().
5491 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
5493 * resolve.c (resolve_operator): Make logical operands convert to the
5494 type with higher kind.
5496 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
5498 * check.c (g95_check_associated): Make sure both pointer and target has
5499 the same type and rank. Null pointer or array section with vector
5500 subscript as target are not allowed.
5501 * trans.h: Declare gfor_fndecl_associated.
5502 * trans-decl.c: (g95_build_builtin_function_decls): Initialize
5503 gfor_fndecl_associated.
5504 * trans-intrinsic.c (g95_conv_associated): New function.
5505 (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
5507 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
5509 * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
5510 according to POINTER itself rather than TARGET.
5511 (g95_conv_expr_descriptor): Make lbound start at 1.
5512 * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
5514 2003-06-01 Paul Brook <paul@nowt.org>
5516 * expr.c (g95_type_convert_binary): Make it match the standard.
5517 * g95.texi: Remove dead link.
5519 2003-06-01 Steven Bosscher <steven@gcc.gnu.org>
5521 * g95.texi: Cleanup somewhat in preparation for inclusion
5524 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5525 Canqun Yang <canqun@yahoo.com.cn>
5527 * resolve.c (compare_bound_int, resolve_where_shape): Proper return
5529 (g95_find_forall_index): Return proper value.
5530 (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
5531 compare the return value from g95_find_forall_index.
5533 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5534 * g95.h, io.c (g95_st_label): Remove "length".
5535 (g95_symtree): Remove "link".
5536 (g95_case): Remove "code".
5537 * arith.c, arith.h (g95_compare_string, g95_convert_integer,
5538 g95_convert_real): Make an argument pointer to const.
5539 * decl.c (colon_seen): Add a TODO.
5540 * interface.c (g95_compare_types): Fix typo.
5541 * interface.c (compare_interfaces): Preserve value of "p".
5542 * intrinsic.c (sort_actual): Remove "i".
5543 * match.c (g95_match_assign): Proper type in call to g95_match().
5544 * parse.c (next_free): Avoid duplicate call due to macro.
5545 * parse.c (check_statement_label): wrong type in call to g95_error.
5546 * primary.c (match_real_constant): Add a TODO.
5547 * resolve.c (resolve_select): Remove useless conditional.
5548 * simplify.c (g95_simplify_repeat): Proper assignment to
5549 "value.character.string".
5550 * simplify.c (g95_simplify_reshape): Wrong variable in call to
5553 2003-05-20 Canqun Yang <canqun@yahoo.com.cn>
5555 * trans-stmt.c: Remove unnecessary include file defaults.h.
5557 2003-05-19 Lifang Zeng <zlf605@hotmail.com>
5559 * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
5561 (g95_trans_forall): Allow arbitrary number of FORALL indexes and
5562 actual variables used as FORALL indexes.
5564 2003-05-15 Paul Brook <paul@nowt.org>
5566 * trans-array.c (g95_trans_static_array_pointer): Use
5568 (g95_trans_deferred_array): Initialize static array pointers.
5569 * trans-expr.c (g95_conv_function_call): Use formal arglist to
5570 correctly pass POINTER and absent CHARACTER arguments.
5572 2003-05-14 Lifang Zeng <zlf605@hotmail.com>
5574 * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
5575 (g95_resolve_forall_body): Resolve FORALL body.
5576 (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
5577 (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
5578 (g95_find_forall_index): Check whether the FORALL index appears in
5579 the expression or not.
5580 (resolve_code): Modified.
5582 2003-05-14 Paul Brook <paul@nowt.org>
5584 * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
5586 2003-05-13 Paul Brook <paul@nowt.org>
5588 * trans-types.c (g95_max_array_element_size): Now a tree node.
5589 (g95_init_types): Work out max size properly.
5590 (g95_get_dtype_cst): Modify to match.
5592 2003-05-11 Paul Brook <paul@nowt.org>
5594 * trans-io.c (add_case): Create a label decl for case labels.
5596 2003-05-11 Paul Brook <paul@nowt.org>
5598 * arith.c (g95_integer_index_kind): New variable.
5599 * f95-lang.c (g95_init): Move frontend initialization here ...
5600 (g95_post_options): ... from here.
5601 * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
5602 * intrinsic.c (add_functions): Use index kinds.
5603 * iresolve.c: Convert to index_kind where needed.
5604 * resolve.c (g95_resolve_index): Make public, use index_kind.
5605 (resolve_array_ref): Adjust to match.
5606 * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
5607 * trans-stmt.c: Ditto.
5608 * trans-types.c: Ditto.
5609 * trans-types.h (g95_array_index_kind): Remove declaration.
5610 * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
5612 2003-05-07 Paul Brook <paul@nowt.org>
5614 * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
5615 * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
5618 2003-05-07 Paul Brook <paul@nowt.org>
5620 * trans-array.c (trans_static_array_pointer,
5621 g95_trans_array_constructor_value, g95_conv_array_initializer,
5622 g95_conv_structure): CONSTRUCTOR nodes only have one operand.
5623 (g95_add_loop_ss_code): Convert subscripts to the correct type.
5624 * trans-stmt.c (g95_trans_character_select): Ditto.
5625 * trans-types.c (g95_init_types): Ditto.
5627 2003-05-07 Steven Bosscher <steven@gcc.gnu.org>
5629 * f95-lang.c (expand_function_body): Use input_line, not lineno.
5630 * trans-decl.c (g95_generate_function_code,
5631 g95_generate_constructors): Likewise.
5632 * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
5633 g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
5636 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
5637 * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
5638 with components point to the DERIVED type itself, and two DERIVED
5639 type with components point to each other.
5640 * trans-expr.c (g95_conv_componet_ref): Modified
5642 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
5643 * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
5645 (g95_trans_pointer_assign): Implement Nullify.
5647 2003-05-01 Paul Brook <paul@nowt.org>
5649 * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
5650 * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
5652 2003-05-01 Paul Brook <paul@nowr.org>
5654 * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
5655 trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
5658 2003-05-01 Canqun Yang <canqun@yahoo.com.cn>
5660 * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
5663 2003-04-28 Paul Brook <paul@nowt.org>
5665 * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
5666 as their kind suggests.
5667 (g95_resolve_reshape): Ditto.
5669 2003-04-28 Chun Huang <compiler@sohu.com>
5671 * trans-expr.c (g95_conv_substring_expr): New function.
5672 (g95_conv_expr): Use it.
5674 2003-04-28 Paul Brook <paul@nowt.org>
5676 * iresolve.c (g95_resolve_transpose): Make it match the
5678 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
5680 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
5682 * trans-types.c (g95_add_field_to_struct): New function to
5683 add a field to a UNION_TYPE or RECORD_TYPE.
5684 * trans-types.h (g95_add_field_to_struct): Prototype.
5685 (g95_get_derived_type): Use g95_add_field_to_struct to add
5687 * trans-io.c (g95_add_field): Remove.
5688 (ADD_FIELD): Use new g95_add_field_to_struct function.
5689 (ADD_STRING): Likewise.
5690 * trans-stmt.c (g95_trans_select): Likewise.
5691 (g95_add_field): Remove duplicated function.
5693 2003-04-18 Canqun Yang <canqun@yahoo.com.cn>
5695 Port implementation for CHARACTER SELECT from Andy's tree.
5696 * trans-stmt.c (g95_trans_character_select): Implement character
5697 select. (g95_add_field): New function.
5698 * trans-decl.c: Declare 'gfor_gndecl_select_string'.
5699 (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
5700 * g95.h (struct g95_case): Add field 'int n'.
5701 * trans.h: Declare 'gfor_fndecl_select_string'.
5703 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
5705 * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
5706 (g95_insert_bbd): Die on duplicates.
5707 * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
5709 2003-04-14 Steven Bosscher <steven@gcc.gnu.org>
5711 * g95.texi: Require GMP 4.0 -- like we actually
5712 do. Explain the testsuite and what-goes-where.
5713 Don't use undefined texinfo symbol. Break very
5714 long line. Remove finished item from the list
5717 2003-04-11 Canqun Yang <canqun@yahoo.com.cn>
5719 * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
5722 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
5724 * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
5725 (g95_trans_forall_body): New function.
5727 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
5729 * resolve.c (resove_where): New function.
5730 (resolve_where_shape): New function.
5731 (resolve_code): Add call to 'resolve_where'
5732 * trans-stmt.c (g95_trans_where): Modified.
5733 (g95_trans_where_2): New function.
5734 (g95_trans_where_assign): New function.
5735 (g95_evaluate_where_mask): New function.
5736 (g95_add_to_stmt_list): New function.
5737 (g95_get_temp_expr): New function.
5738 * trans.h (where_stmt_list): New structure.
5740 2003-04-10 Paul Brook <paul@nowt.org>
5742 * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
5743 (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
5745 2003-04-10 Steven Bosscher <steven@gcc.gnu.org>
5747 Update after mainline -> tree-ssa-branch merge.
5748 * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
5750 (g95_init): Update for new lang_hooks definition.
5751 (g95_post_options): New langhook.
5752 (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
5753 * scanner.c (g95_new_file): Comment update.
5755 2003-04-09 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5757 * g95.h, lang-options.h: Add -Wimplicit-interface.
5758 * options.c (g95_init_options, g95_parse_arg): Set it.
5759 * interface.c (check_intents): Warn about call with implicit
5761 * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
5764 2003-04-05 Paul Brook <paul@nowt.org>
5766 * iresolve.c (g95_resolve_spread): Don't resole based on type.
5767 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
5769 2003-03-29 Paul Brook <paul@nowt.org>
5771 * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
5772 (g95_resolve_unpack): Ditto.
5773 * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
5774 (g95_conv_intrinsic_function): Use it. Remove PACK and UNPACK.
5775 (g95_is_intrinsic_libcall): Add PACK and UNPACK.
5777 2003-03-25 Paul Brook <paul@nowt.org>
5779 * arith.c (g95_unary_user, g95_user): Remove dead functions.
5781 * array.c (g95_free_array_ref): Ditto.
5783 * symbol.c (g95_use_derived_tree): Ditto.
5784 * intrinsic.c (add_functions): Use simplification for SCALE.
5785 * primary.c (g95_match_rvalue): Test sym, not symtree.
5787 2003-03-25 Paul Brook <paul@nowt.org>
5789 * trans-decl.c (build_function_decl): Add parameter before it gets
5790 turned into a constant.
5791 * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
5792 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
5793 * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
5795 2003-03-22 Paul Brook <paul@nowt.org>
5797 * trans-array.c (g95_conv_array_initializer): Allow scalar
5799 * trans-decl.c (g95_finish_var_decl): Result variables are not
5801 * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
5802 (g95_conv_intrinsic_function): Use it.
5803 * trans-types.h (g95_type_spec): Remove dead declaration.
5805 2003-03-21 Paul Brook <paul@nowt.org>
5807 * trans-decl.c (g95_build_function_decl): Mark string parameters.
5809 2003-03-20 Paul Brook <paul@nowt.org>
5811 * trans-decl.c (g95_build_function_decl): Put character length
5812 parameters at the end of the function declaration.
5813 * trans-expr.c (g95_conv_function_call): Ditto.
5814 * trans-types.c (g95_get_function_type): Ditto.
5816 2003-03-20 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5818 * resolve.c (resolve_formal_arglist): Don't impose intent for
5819 procedure arguments of pure functions.
5820 (resolve_select): Remove redundant assignment.
5822 2003-03-19 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5824 * arith.c (validate_logical), g95.h, options.c (g95_init_options):
5826 * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
5827 * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
5829 * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
5831 * symbol.c (g95_add_type): Fix typo in comment.
5834 2003-03-16 Paul Brook <paul@nowt.org>
5836 * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
5837 * expr.c (g95_build_call): Remove.
5838 * f95-lang.c (puchdecl_top_level): New function.
5839 * g95.h (g95_code): Store resolved symbol, not just the name.
5840 * intrinsic.c (g95_intrinsic_namespace): New global namespace.
5841 (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
5842 (g95_get_intrinsic_sub_symbol): New function.
5843 * iresolve.c (g95_resolve_cpu_time): Use it.
5844 (g95_resolve_random_number): Ditto.
5845 * resolve.c: Set code->resolved_sym instead of code->sub_name.
5846 * trans-decl.c (g95_get_extern_function_decl): Give external decls
5847 the correct DECL_CONTEXT. Add global symbold to the global scope.
5848 * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
5851 2003-03-16 Paul Brook <paul@nowt.org>
5853 * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
5854 * options.c (g95_parse_arg): Ditto.
5855 * module.c (mio_symbol_attribute): Handle the always_explicit bit.
5856 * resolve.c (resolve_formal_arglist): The always_explicit sould be set
5857 for the procedure, not the parameter.
5858 * trans-array.c (g95_trans_g77_array): New function.
5859 (g95_trans_assumed_size): Use it.
5860 (g95_trans_dummy_array_bias): Ditto.
5861 (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
5862 (g95_conv_expr_descriptor): ... to here. Update callers.
5863 * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
5864 (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
5865 * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
5866 * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
5867 * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
5868 (g95_sym_type): Ditto.
5870 2003-03-15 Paul Brook <paul@nowt.org>
5872 * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
5874 * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
5876 2003-03-14 Paul Brook <paul@nowt.org>
5878 * trans-array.c (g95_array_is_packed): Remove.
5879 (g95_conv_array_base): Correctly handle all descriptorless cases.
5880 (g95_conv_array_stride): Use descriptorless strides.
5881 (g95_trans_dummy_array_bias): Don't always repack the array.
5882 (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
5884 * trans-types.c (g95_get_nodesc_array_type): Differentiate between
5885 dummy and non-dummy arrays...
5886 (g95_sym_type, g95_get_derived_type): ... like these.
5887 (g95_get_array_type_bounds): Allow discontiguous arrays.
5889 2003-03-12 Paul Brook <paul@nowt.org>
5891 * array.c (g95_resolve_array_spec): Fix comment.
5892 * g95.h (symbol_attributes): New flag always_explicit.
5893 * resolve.c (resolve_formal_arglist): Set it always_explicit.
5894 * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
5895 * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
5896 (g95_trans_array_bounds): Allow assumed shape arrays.
5897 (g95_trans_repack_array): Remove.
5898 (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
5899 * trans-decl.c (g95_build_qualified_array): Only ignore absent
5900 bounds for assumed size arrays.
5901 (g95_build_dummy_array_decl): Use descriptorless arrays.
5902 * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
5903 (g95_trans_pointer_assign): Fix typo.
5904 * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
5906 (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
5907 * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
5908 Also modify callers.
5909 * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
5911 2003-03-08 Paul Brook <paul@nowt.org>
5913 * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
5914 (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
5915 * resolve.c (compare_spec_to_ref): Allow full array sections.
5917 2003-03-08 Paul Brook <paul@nowt.org>
5919 * expr.c (g95_simplify_expr): Also simplify array index and
5920 substring expressions.
5921 * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
5922 * trans-array.c (g95_trans_array_bounds): New function.
5923 (g95_trans_auto_array_allocation): Use it.
5924 (g95_trans_assumed_size): Rewrite.
5925 * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
5926 (gfor_fndecl_repack): Remove.
5927 (g95_build_qualified_array): Handle absent upper bounds.
5928 (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
5929 (g95_get_symbol_decl): Update.
5930 (g95_build_intrinsic_function_decls): Initialize new decls.
5931 * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
5932 (gfor_fndecl_repack): Remove.
5933 * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
5934 * trans-types.c: (g95_build_array_type): Merge duplicated code..
5935 (g95_get_nodesc_array_type): Handle absent bounds.
5936 * trans-types.h (g95_get_nodesc_array_type): Declare.
5938 2003-03-04 Paul Brook <paul@nowt.org>
5940 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
5943 2003-03-02 Paul Brook <paul@nowt.org>
5945 * options.c (g95_init_options): Drfault to 1.
5946 (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
5947 * trans-array.c (g95_conv_array_data, g95_conv_array_base,
5948 g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
5949 Handle non-constant size automatic arrays.
5950 (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
5951 generic bound functions.
5952 (g95_trans_auto_array_allocation): Don't create a descriptor.
5953 (g95_trans_assumed_size): New function (broken).
5954 (g95_trans_dummy_array_bias): Remove unused var.
5955 * trans-array.h (g95_trans_assumed_size): Declare.
5956 * trans-decl.c (create_index_var): New fuction.
5957 (g95_build_qualified_array): New function.
5958 (g95_get_symbol_decl): Use it.
5959 (g95_trans_deferred_vars): Handle assumed shape seperately.
5960 * trans-types.c (get_element_type): Handle heap allocated arrays.
5961 (g95_is_nodesc_array): Include non-const size arrays.
5962 (g95_get_nodesc_array_type): Ditto.
5964 2003-02-23 Paul Brook <paul@nowt.org>
5966 * trans-array.c (g95_array_init_size): Should use stride, not size of
5969 2003-02-18 Paul Brook <paul@nowt.org>
5971 * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
5972 after intrinsic function check.
5974 2003-02-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5976 * io.c (match_io): Fix missing return value and remove useless
5978 * match.c (g95_match): Remove useless assignment.
5979 * module.c (parse_string): Remove useless post increment.
5980 * simplify.c (g95_simplify_verify): Remove useless assignment.
5982 2003-02-15 Paul Brook <paul@nowt.org>
5984 * expr.c (restricted_intrinsic): Handle bad values gracefully.
5985 * g95.h (symbol_attribute): Add referenced member.
5986 (g95_symbol): Add dummy_order member.
5987 (g95_set_sym_referenced): Declare.
5988 * match.c (g95_match_assignment, g95_match_call): Use it
5989 * primary.c (match_actual_arg, g95_match_rvalue,
5990 g95_match_variable): Ditto.
5991 * symbol.c (next_dummy_order): New variable.
5992 (g95_set_sym_referenced): New function.
5993 (check_done): New function.
5994 (g95_add_*): Use it.
5995 * trans-decl.c: Make formatting conform to GCC standards.
5996 (g95_defer_symbol_init): Add dummy variables in the right order.
5997 (g95_get_symbol_decl): Only accept referenced variables.
5998 (g95_create_module_variable): Module variables are always required.
5999 (generatr_local_decls): New function.
6000 (generate_local_vars): New function.
6001 (g95_generate_function_code): Use it.
6003 2003-02-13 Paul Brook <paul@nowt.org>
6005 * trans-decl.c (g95_conv_struct_cons): Remove.
6006 (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
6007 * trans-expr.c (g95_conv_structure): New function.
6008 (g95_conv_expr): Use it.
6010 2003-02-09 Paul Brook <paul@nowt.org>
6012 * trans-array.c (g95_array_init_size): Don't evaluate the linit
6013 expressions multiple times.
6014 (g95_trans_auto_arry_allocation): Use pointer not tmp.
6016 2003-02-08 Paul Brook <paul@nowt.org>
6018 * module.c (mio_symtree_ref): Declare as static.
6019 (mio_expr): Remove dead code.
6020 (read_module): Set the symtree link for fixups.
6021 * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
6022 (build_round_expr): ... to this.
6023 (g95_conv_intrinsic_aint): New function.
6024 (g95_conv_intrinsic_function): Use it.
6026 2003-02-08 Paul Brook <paul@nowt.org>
6028 * trans-array.c (g95_trans_array_constructor_value): Use the acutal
6029 offset after modificaton, not the increment expression.
6030 * dependency.c: Kill excess whitespace.
6032 2003-02-07 Sanjiv Gupta <sanjivg@noida.hcltech.com>
6034 * dependency.h: Remove some function declarations.
6035 * dependency.c (get_no_of_elements): Change this function not to
6037 * other: Add comments for all modified functions.
6039 2003-02-06 Paul Brook <paul@nowt.org>
6041 * g95spec.c (lang_specific_functions): Fix initializer warning.
6042 * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
6043 for structure type names.
6044 * trans-decl.c (g95_cons_structure_cons): New function.
6045 (g95_get_symbol_decl): Use it.
6046 * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
6049 2003-02-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6051 * resolve.c (compare_cases): Add const to casts.
6053 2003-01-30 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6055 * g95.h (g95_check_f): Change a1 to f1m.
6056 * intrinsic.c (add_sym_1m, check_specific,
6057 g95_intrinsic_func_interface): Use it.
6059 * module.c (init_pi_tree): Remove useless cast.
6060 (fp2): Fix argument type.
6062 * parse.c (parse_select_block): Add comment.
6064 2003-02-05 Toon Moene <toon@moene.indiv.nluug.nl>
6066 * lang-options.h: Fix warning involving C90 concatenated
6069 2003-02-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
6070 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6072 * io.c (format_asterisk): Complete initializer to kill warning.
6073 * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
6074 DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
6075 (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
6076 new defines to complete initializers. Kills all warnings.
6078 * Make-lang.in: Comment cleanup.
6080 2003-02-05 Paul Brook <paul@nowt.org>
6082 * array.c (g95_free_constructor): Handle NULL expressions.
6083 * resolve.c (resolve_structure_cons): Ditto.
6084 * decl.c (g95_match_null): New Function.
6085 (variable_decl): Use it.
6086 * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
6087 * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
6088 * trans-types.c (g95_set_decl_attributes): Remove empty function.
6090 2003-02-05 Paul Brook <paul@nowt.org>
6092 * trans.h (build1_v): New macro.
6093 (build_v): Remove pointless and incorrect prototype.
6094 * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
6095 * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
6097 2003-02-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
6099 * Make-lang.in (F95_OBJS): Remove one more dead file.
6101 2003-02-01 Paul Brook <paul@nowt.org>
6103 * lang-specs.h: Don't pass -ffixed-form to the linker.
6104 * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
6106 2003-02-01 Paul Brook <paul@nowt.org>
6108 * Make-lang.in (F95_OBJS): Remove dead files.
6109 * trans-array.c (g95_array_init_size): Do the right thing when
6111 * trans-decl.c (g95_generate_function_code): Initialize deffered
6112 symbol list before translating contained subroutines.
6113 * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
6114 scalar invariant values here...
6115 (g95_conv_variable, g95_conv_function_call): ... instead of here ...
6116 * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
6118 2003-01-29 Paul Brook <paul@nowt.org>
6120 * trans-array.c (g95_add_loop_code): Put pre code in the right block.
6121 (g95_walk_elemental_function_args): Reverse chains before adding.
6122 (g95_reverse_ss): Move about a bit.
6123 * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
6126 2003-01-28 Paul Brook <paul@nowt.org>
6128 * intrinsic.c (resolve_intrinsic): Use correct union member.
6129 * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
6131 * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
6132 use associated variables.
6133 * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
6134 * trans-expr.c (g95_conv_expr_present): ... to here.
6135 * trans.h: Declare it.
6136 * trans-types.c (g95_sym_type): Assume subroutine if not specified.
6138 2003-01-28 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6140 * array.c (expand_iterator): Suppress useless assignment.
6141 * decl.c (match_char_spec): Ditto.
6142 * io.c (match_io_iterator): Ditto.
6143 * primary.c (match_real_constant): Ditto.
6144 * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
6145 Ditto. Also, use g95_intrinsic_op not int for intrinsic operators.
6146 * matchexp.c (match_add_operand, match_level_5): Likewise.
6147 * module.c (parse_atom, find_enum): Likewise.
6148 * resolve.c: move #include <string.h>
6149 (resolve_select): Fix serious typo.
6151 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.n>
6153 * Make-lang.in: Don't build with broken tree-ssa-pre.
6155 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.nl>
6157 * resolve.c (resolve_index): Add a TODO.
6158 * symbol.c: Remove useless "#include <ctype.h>".
6160 2003-01-27 Paul Brook <paul@nowt.org>
6162 * check.c (check_rest): Allow different type kinds as an extension.
6163 * g95.h (g95_resolve_f): Add f1m.
6164 * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
6165 * intrinsic.h: Chenge prototypes for MIN and MAX.
6166 * iresolve.c (g95_resolve_minmax): New function.
6167 (g95_resolve_min, g95_resolve_max): Use it.
6168 * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
6170 (g95_conv_intrinsic_present): Fix logic.
6172 2003-01-27 Steven Bossche <s.bosscher@student.tudelft.nl>
6174 * g95.h (g95_case): Don't be a tree, be a double linked list.
6175 * match.c (match_case_selector): Remove redundant semantics check.
6176 Clean up a few goto's to make it a tiny little bit faster.
6177 * resolve.c (case_tree): Die.
6178 (compare_cases): Accept and compare unbounded cases too.
6179 (check_case_overlap): Don't build a tree. Instead, merge-sort the
6180 whole list of g95_cases passed from resolve_select.
6181 (sane_logical_select): Die.
6182 (check_case_expr): Return FAILURE if a CASE label is of the wrong
6184 (resolve_select): Fixup case expression for computed GOTOs, put it
6185 in expr, not expr2, for easier handing in the parse tree dumper and
6186 the code generator. Rewrite the rest of the function: Kill
6187 unreachable case labels and unreachable case blocks.
6188 * dump-parse-tree.c (g95_show_code_node): Always dump expr for
6189 an EXEC_SELECT, not case2 anymore.
6190 * trans-const.c (g95_conv_constant_to_tree): New function.
6191 (g95_conv_constant): Use it.
6192 * trans-const.h: Declare prototype for the new function.
6193 * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
6194 g95_trans_character_select): New static functions.
6195 (g95_trans_select): Rewrite.
6197 2003-01-26 Paul Brook <paul@nowt.org>
6199 * intrinsic.c (add_fnctions): Properly add dreal.
6200 * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
6201 (g95_conv_intrinsic_function): Use it.
6202 * trans-io.c (build_dt): Abort on internal files (unimplemented).
6204 2003-01-26 Paul Brook <paul@nowt.org>
6206 Widespread changes to the handling of symbols in expressions. These
6207 are now linked via g95_symtree nodes.
6208 * parse.c (g95_fixup_sibling symbols): New function.
6209 (parse_contained): Use it.
6210 * g95.h (symbol_attribute): Add contained. Indicates a symbol is a
6211 contained procedure that has bee correctly fixed up.
6212 (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
6214 2003-01-24 Paul Brook <paul@nowt.org>
6216 * trans-array.c (g95_walk_expr): Function result attributes are in
6218 * trans-expr.c (g95_conv_function_call,
6219 g95_trans_arrayfunc_assign): Ditto.
6220 * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
6222 2003-01-23 Steven Bosscher <s.bosscher@student.tudelft.nl>
6224 * expr.c (check_restricted): Fix error message.
6225 * symbol.c (free_st_labels): Plug memleak.
6227 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
6229 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
6230 reduce_binary_aa, reduce_binary, eval_intrinsic,
6231 eval_intrinsic_f2): Use typesafe prototypes for eval functions.
6232 * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
6233 for typesafe intrinsics helper functions.
6234 (g95_intrinsic_sym): Use them.
6235 * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
6236 add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
6237 add_sym_5, add_conv, resolve_intrinsic, do_simplify,
6238 check_specific, g95_intrinsic_func_interface,
6239 g95_intrinsic_sub_interface): Adjust all calls to intrinsics
6241 * trans-decl.c (g95_get_extern_function_decl): Likewise.
6242 * Make-lang.in: Don't disable warnings for strict prototypes
6243 any longer, everything is typesafe now.
6245 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
6247 * bbt.c (duplicate_node): Make static.
6248 * module.c (module_name): Make static.
6249 * scanner.c (include_dirs): Make static.
6251 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
6253 Hard coded _gfor_'s should not show up anymore.
6254 * g95.h (PREFIX): New macro.
6255 * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
6257 (g95_resolve_random_number): Likewise.
6258 * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
6259 * trans-io.c: Remove 'prefix' macro. Replace all uses with
6260 the new PREFIX macro from g95.h.
6262 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
6264 The troubles of forking... Andy implemented this just now too.
6265 Let's stick to that and keep the trees close.
6266 * g95.h (g95_st_label): 'format' member is now a g95_expr.
6267 * io.c: Revert previous changes.
6268 (g95_match_format): Match the format string as a character
6270 * match.h (g95_statement_label): Declare external.
6271 * parse.c: Revert previous changes.
6272 * symbol.c (g95_free_st_label): Free a g95_expr instead
6274 * trans-io.c: Revert previous changes.
6275 (build_dt): Use set_string to set the format string.
6277 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
6279 * io.c (format_string): Make non-static.
6280 (g95_match_format): Remember the format string.
6281 (terminate_io): Add I/O termination for empty I/O lists.
6282 * match.h: Declare external format_string.
6283 * parse.c (check_statement_label): Attack the format string
6284 to a format label for FORMAT statements.
6285 * trans-io.c (g95_add_field): Define prefix macro. Replace
6286 all uses of PREFIX define with a use of this macro.
6287 (build_dt): Implement formatted I/O for format labels.
6289 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
6291 * lang-options.h: Kill "-std=F".
6292 * options.c: Remove unimplemented "-std=F". Modify
6294 * misc.c (g95_terminal_width): New function.
6295 * error.c (g95_error_init_1): Use g95_terminal_width.
6296 * g95.h: Add prototype for g95_terminal_width, remove
6299 2003-01-19 Steven Bosscher <s.bosscher@student.tudelft.nl>
6301 * Make-lang.in: Fix typo.
6303 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
6305 * g95.h (struct g95_case): Remove unused cruft, new member
6306 'where' to keep track of the locus of the default case.
6307 * match.c (g95_match_case): Add locus to the current case.
6308 (match_case_selector): Likewise.
6309 * parse.c (parse_select_block): Move semantics check for
6310 multiple DEFAULT cases out of here to...
6311 * resolve.c (check_case_overlap): ...here. Return sooner
6313 (check_case_expr): Take two g95_cases now, use to sure the
6314 expression kinds are the same.
6315 (resolve_select): Cleanup.
6317 2003-01-18 Paul Brook <paul@nowt.org>
6319 * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
6320 * trans-decl.c (g95_set_symbol_decl): Handle non-array result
6322 (g95_get_extern_function_decl): Put decls in the correct context.
6324 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
6326 * trans-io.c: Port changes from Andy to set ERR flag.
6328 2003-01-17 Paul Brook <paul@nowt.org>
6330 * trans-array.c: Add various comments.
6331 (g95_ss_terminator): Declare as const.
6332 (g95_walk_expr): Remove first parameter and update all callers.
6333 (g95_walk_op_expr): Initialize scalar SS properly.
6334 * trans-array.h (g95_walk_expr): Update prototype.
6335 * trans-expr.c: Update for new g95_walk_expr.
6336 * trans-intrinsic.c: Ditto.
6337 * trans-io.c: Ditto.
6338 * trans.h: Various comments for SS chains.
6340 2003-01-17 Paul Brook <paul@nowt.org>
6342 * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
6344 * intrinsic.c (add_functions): Use them.
6345 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
6346 * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
6348 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
6350 Fallout of a small merge conflict:
6351 * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
6353 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
6355 * initrinsic.c: New add_sym_* functions for strong typing.
6356 (add_conv): Make prototype strict.
6357 * dump-parse-tree.c, dependency.c: Include config.h
6358 * resolve.c, trans-io.c: Fix typos.
6360 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
6362 * dump-parse-tree.c (g95_show_code_node): Show the
6363 condition for a computed GOTO that was transformed
6364 to a SELECT CASE construct.
6365 * resolve.c (check_case_overlap): Revert previous switch
6366 to treaps, it was too slow and didn't catch all trouble.
6367 (resolve_symbol): Be more flexible about module procedures.
6368 * symbol.c (check_conflict): Point to relevant section in
6369 the standard for dubious conflict. Allow procedure
6370 dummy arguments to be optional again.
6371 * trans-io (add_field): Rename to g95_add_field. Change
6373 * trans-stmt (trans_select): Handle unbounded cases for
6374 integer SELECT CASE constructs. Fix/add more comment.
6376 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
6378 * g95.h: Uses GCC's function attribute macros.
6379 * error.c, module.c, parse.c, g95.h: More function attributes.
6381 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
6383 * trans-decl.c (get_label_decl): Use TREE_LINENO instead
6384 of DECL_SOURCE_LINE, and TREE_FILENAME instead of
6387 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
6389 * f95-lang.c (pushdecl): Use TREE_LINENO instead of
6391 * trans.c (g95_trans_code): Use annotate_all_with_file_line
6392 instead of nowdead wrap_all_with_wfl.
6394 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
6396 * parse.c (g95_parse_file): In verbose mode, dump the parse tree
6397 before generating code, so we can still see it even if the code
6398 generation phase dies.
6400 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
6402 * decl.c (build_sym): Split out initialization expression parts...
6403 (add_init_expr_to_sym): ...to here.
6404 (variable_decl): Add the symbol following an attribute list to the
6405 symbol tree before parsing the optional initialization expression
6406 if the symbol is not of a derived type.
6407 * primary.c (g95_match_rvalue): Don't assume a symbol always has
6408 a value if it is a PARAMETER.
6410 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
6412 * misc.c: Don't #include <mcheck.h>
6413 * module.c: Ditto. Kill uses of mtrace, muntrace. If there
6414 ever was a glibc bug, then either this was never reported to
6415 glibc people, or it has been fixed for so long that there's
6416 no information you can find about it, anywhere.
6418 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
6421 * module.c (attr_bits, bt_types, array_spec_types):
6422 Switch 'const' and 'static'.
6423 * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
6425 GNU'ify source code:
6426 * trans-io.c: Numerous fixes, one fixed warning and a few
6427 TODO markers so that we don't forget about them.
6429 2003-01-13 Paul Brook <paul@nowt.org>
6431 * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
6432 * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
6434 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
6435 * match.c (g95_match_stop): Fix dumb == -> != error.
6437 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
6439 * dump-parse-tree.c (show_indent): Add line breaks. This
6440 whole dumping process needs cleanups.
6441 * f95-lang.c (g95_mark_addressable): Fix prototype to match
6442 the langhook. Fix 'return's accordingly.
6443 * g95-support.h: Adjust prototype.
6444 * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
6445 * lang-options.h: Add '-fsyntax-only'.
6446 * options.c (g95_init_options): Init 'no_backend'.
6447 (g95_parse_arg): Deal with '-fsyntax-only'.
6448 * parse.c (g95_parse_file): Do not generate code if 'no_backend'
6451 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
6453 * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
6454 arguments. Also make sure that if a symbol is marked INTRINSIC,
6455 an intrinsic with the symbol's name actually exists.
6456 (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
6457 Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
6458 ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
6460 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
6462 * resolve.c (resolve_contained_functions): Fix condition, don't
6463 throw internal_error if a child namespace has no name. Apparently
6464 this can be the case?
6466 2003-01-11 Paul Brook <paul@nowt.org>
6468 Port changes from Andy's tree:
6469 * g95.h (g95_code): Add stop_code.
6470 * match.c (g95_match_stop): Detter syntax checking.
6471 * resolve.c (resolve_generic_f0): Return match type.
6472 (resolve_generic_f): Remove dead/duplicated code.
6473 (resolve_specific_f): Ditto.
6474 * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
6475 * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
6476 * trans-stmt.c (g95_trans_stop): Handle new STOP format.
6478 2003-01-11 Paul Brook <paul@nowt.org>
6480 * trans-array.c: Various documentation/comment changes.
6481 * trans-stmt.c: Ditto.
6484 2003-01-10 Paul Brook <paul@nowt.org>
6486 * options.c/h: Add -fdump-parse-tree as alias of -v.
6488 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
6490 * dump-parse-tree.c (g95_show_namespace): Fixed another
6491 typo. Sorry, it's Friday...
6493 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
6496 * trans-array.c, trans-array.h, trans.c, trans-const.c,
6497 trans-const.h, trans-decl.c, trans-expr.c, trans.h
6498 trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
6499 trans-types.c: Fix bogus copyright years, add 2003.
6500 * trans-types.h: Give copyright header.
6502 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
6504 * dump-parse-tree.c (g95_show_namespace): Fixed typo.
6505 * expr.c, options.c, scanner.c: Add some more 'const' markers.
6506 * intrinsic.c: Some constant strings moved to read-only memory.
6507 * io.c (format_asterisk): Move to...
6510 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
6512 * dump-parse-tree.c (g95_show_namespace): Dump implicit
6513 types for ranges instead of per-letter. Indent the
6514 'CONTAINS' just like everything else.
6515 * resolve.c (resolve_contained_functions): Clarify comment.
6516 Explain non-obvious conditional expression. Improve
6517 diagnostics if tyoe cannot be resolved.
6518 Port semi-fix from Andy's tree:
6519 (was_declared): Move up before first use.
6520 (generic_sym, specific_sym): New functions. Code moved
6521 out if procedure_kind.
6522 (procedure_kind): Simplify using new functions.
6523 (resolve_generic_f): Make sure the functions we find in
6524 a parent namespace is generic.
6525 (resolve_specific_f): Ditto for specific functions.
6527 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
6529 * trans-stmt.c, trans.c: Fix some code style issues. Add
6530 some more comment (but still not enough!).
6532 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
6534 * symbol.c (flavors, procedures, intents, acces_types,
6535 access_types, ifsrc_types): Make const.
6536 * misc.c (g95_string2code): Make 'm' param 'const'.
6537 * module.c (find_enum, write_atom, mio_name): Make
6539 (attr_bits, bt_types, array_spec_types, array_ref_types,
6540 ref_types, expr_types): Make const.
6541 * g95.h: Adjust external decls.
6543 2003-01-09 Paul Brook <paul@nowt.org>
6545 * Testsuite: Add a load of new cases.
6547 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
6549 * Make-file.in: Add dependency on back end header files;
6550 a parallel build should work now.
6551 * f95-lang-c (lang_identifier): Remove bogus comment.
6552 (g95_be_parse_file): Fix prototype.
6553 (g95_init): Make static.
6554 (g95_finish): Make static.
6555 * error.c (g95_syntax_error): Kill. Make define in...
6556 * g95.h (g95_syntax_error): Define.
6557 (g95.options): Make 'source' member 'const'.
6558 * interface.c (g95_match_interface): Explain
6559 hard-to-read condition.
6560 (g95_match_end_interface): Ditto.
6561 * trans_const.c (g95_build_string_const): Make 's' parameter
6563 * trans_const.h: Adjust protoype accordingly.
6564 * trans-decl.c: Include tree-dump.h
6565 (g95_generate_function_code): Build fixes for recent changes
6566 in the tree-ssa branch.
6568 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
6570 * format.c: Kill, move code from here...
6572 * Make-lang.in: Adjust.
6575 * BUGS: Mention where to submit bugs. Move old content...
6576 * TODO: ...to here. New file.
6578 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
6579 Fix most warnings, and suppress the ones we can't fix for now.
6580 * Make-lang.in: Suppress warnings about bad proto's in g95.h,
6581 these warnings just clutter the screen and there's not much
6582 we can do about them for now anyway.
6583 * check.c, iresolve.c: Mark unused function parameters.
6584 * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
6585 they should be resolved before they get here.
6586 * error.c: Remove unused FILE *status_out.
6587 * f95-lang.c (g95_init): Remove bogus cast.
6588 * Many files: Make things 'const' where required.
6589 * g95.h: Fix prototypes for all modified functions above.
6590 (g95_options): Remove 'object' member.
6592 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
6594 * Make-file.in: Cleanup bogus targets. Add more comment.
6595 * lang-options.h: New option '-w'.
6596 * g95.h: add no_options field to struct g95_options.
6597 * options.c (g95_init_options): Default no_warnings to off.
6598 (g95_parse_arg): Recognise the '-w' switch and its alias,
6600 * error.c (g95_warning, g95_warning_now): Don't emit warning if
6601 no_warning option is set.
6602 * iresolve.c (g95_resolve_shape): Fix warning.
6604 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
6606 * primary.c (g95_next_string_char): Rename next_string_char, and
6607 make static. Adjust callers accordingly.
6608 * resolve.c (resolve_generic_f0): Return try, not match. Adjust
6609 callers accordingly.
6610 * g95.h: Split out all g95_match* functions to...
6611 * match.h: ...here. New file.
6612 * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
6613 matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
6615 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
6617 * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
6618 g95_merge_new_implicit): New functions.
6619 (g95_match_implicit_none, g95_match_implicit): Move from here...
6620 * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
6621 Modify to use the new functions in symbol.c.
6622 * g95.h: Add and move prototypes.
6624 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
6626 * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
6627 node compare function.
6628 (g95_insert_bbt): Likewise.
6629 (g95_insert_bbt_with_overlap): Likewise.
6630 (g95_delete_bbt): Likewise.
6631 (delete_treap): Likewise. Also fix a potential bug when calling it.
6632 * module.c (compare_pointers): Change proto to compare_fn.
6633 (compare_integers): Likewise.
6634 (compare_true_names): Likewise.
6635 (find_true_name): Adjust call to compare_true_names to match proto.
6636 (require_atom, write_atom, mio_name): Fix 'const' warnings.
6637 (init_pi_tree): Make compare a compare_fn instead of (int *).
6638 * resolve.c (compare_cases): Change proto to compare_fn.
6639 * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
6640 it static, and rename to compare_symtree.
6641 (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
6643 * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
6644 of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
6646 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
6647 * Make-lang.in: Fix spaces/tabs issues from previous patch.
6648 * patch.options: Blow away Paul's checkin mistake :-)
6649 * io.c (terminate_io): Fix memory leak (Arnaud).
6651 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
6653 * Make-lang.in: Teach about building DVI, info manual.
6654 * g95.texi: New file.
6656 2003-01-02 Paul Brook <paul@nowt.org>
6658 * trans-array.c (g95_reverse_ss): Make static and don't use.
6659 (g95_conv_ss_descriptor): Don't use g95_loopinfo
6660 (g95_conv_array_parameters): Modify for pointer assignments.
6661 (g95_walk_subexpr): New function.
6662 (g95_walk_expr*): Use it.
6663 * trans-array.h (g95_reverse_ss): Remove prototype.
6664 * trans-expr.c (g95_trans_pointer_assign): Implement.
6665 (Many): Set se.want_pointer before calling g95_conv_array_parameter.
6666 * trans-intrinsic.c: Sync with scalarizer changes.
6667 * trans-io.c: Ditto.
6669 2002-12-29 Paul Brook <paul@nowt.org>
6671 * trans-array.c: Document calling convention for arrays.
6673 2002-12-19 Paul Brook <paul@nowt.org>
6675 * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
6676 assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
6677 optional parameters for some intrinsics.
6678 (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
6679 * trans-expr.c (g95_conv_function_call): Pass NULL for absent
6680 optional parameters.
6681 * trans.h (g95_se): Add ignore_optional flag.
6683 2002-12-15 Paul Brook <paul@nowt.org>
6685 * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
6686 * trans-decl.c (g95_generate_function_code): Use TDI_original.
6688 2002-12-14 Paul Brook <paul@nowt.org>
6690 * trans-stmt.c (g95_trans_call): Use resolved symbol name.
6692 2002-12-12 Paul Brook <paul@nowt.org>
6694 * trans-array.c (g95_trans_array_constructor_subarray): Fully
6695 initialize the scalarizer.
6696 (various): Update to new format of g95_expr->value.constructor.
6698 2002-12-08 Paul Brook <paul@nowt.org>
6700 * trans-array.c (g95_put_offset_into_var): New function.
6701 (g95_trans_array_constructor_subarray): New function.
6702 (g95_trans_array_constructor_value): Use it.
6703 (g95_array_cons_size): Don't abort() on array components.
6705 2002-12-08 Paul Brook <paul@nowt.org>
6707 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
6708 * support.c: Update #includes.
6709 (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
6710 * trans-array.c: Update #includes.
6712 * trans-const.c: Ditto.
6713 * trans-io.c: Ditto.
6714 * trans-types.c: Ditto.
6715 (g95_init_types): Set size_type_node.
6716 * trans-decl.c: Update #includes.
6717 (gfor_fndecl_adjust{l,r}): Declare and initialize.
6718 * trans-stmt.c: Update #includes.
6719 (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
6720 (g95_trans_select): Fix check for unbounded ranges.
6721 * trans-expr.c: Update #includes.
6722 (g95_conv_string_tmp): New function.
6723 (g95_conv_concat_op): Use it.
6724 * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
6725 * Trans-intrisic.c: Update #includes.
6726 (g95_conv_intrinsic_strcmp): New function.
6727 (g95_conv_intrinsic_adjust): Ditto.
6728 (g95_conv_intrinsic_function: Use them.
6730 2002-11-30 Paul Brook <paul@nowt.org>
6732 * trans-array.c (g95_walk_function_expr): Handle non-array return by
6734 * trans-dec.c (g95_build_function_decl): Handle character return
6736 (g95_get_fake_result_decl): Ditto.
6737 (g95_trans_deferred_vars): Ditto.
6738 * trans-expr.c (g95_conv_function_call): Ditto.
6739 (g95_trans_arrayfunc_assign) Limit to array valued functions.
6740 * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
6741 (g95_conv_intrinsic_function): Use it.
6742 * trans-types.c (g95_sym_type): Handle functions returning strings.
6743 (g95_return_by_reference): Ditto.
6744 (g95_get_function_type): Ditto.
6746 2002-11-18 Paul Brook <paul@nowt.org>
6748 * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
6749 requires a temporary.
6750 (g95_trans_select): Handle computed gotos.
6751 * trans-types.c (g95_build_array_type): Warn about non-functional
6752 assumed shape arrays.
6753 * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
6755 * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
6756 (g95_conv_intrinsic_int): New function.
6757 (g95_conv_intrinsic_mod): New function.
6758 (g95_conv_intrinsic_ichar): New function.
6759 (g95_conv_intrinsic_function): Use them.
6760 (g95_conv_intrinsic_dim): Use g95_evaluate_now.
6762 2002-11-17 Toon Moene <toon@moene.indiv.nluug.nl>
6764 * trans-types.c (g95_build_array_type): Assumed
6765 sized arrays can have rank > 1.
6766 * trans.c (g95_trans_code): Remove erroneous
6767 warning about CONTINUE.
6768 * trans-expr.c (g95_conv_variable): Remove
6771 2002-11-15 Paul Brook <paul@nowt.org>
6773 * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
6775 2002-10-31 Paul Brook <paul@nowt.org>
6777 * f95-tree.c: Remove tree copying stuff that's now in gimple.c
6778 * trans-expr.c (g95_conv_component_ref): Handle character string
6780 (g95_conv_string_parameter): Ditto.
6781 * trans-types.c (g95_get_derived_type): Add length decl to caracter
6784 2002-10-10 Paul Brook <paul@nowt.org>
6786 * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
6787 * trans-expr.c (g95_conv_function_call): Remove unreliable return value
6789 * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
6790 (g95_conv_intrinsic_function): Handle size and shape intrinsics.
6791 (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
6792 * trans-types.c (pvoid_type_node): Declare and initialize.
6793 * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
6794 (g95_array_allocate): Fix when base==data.
6795 (g95_conv_array_parameter): Correctly handle reduced rank sections.
6796 * trans-io.c (g95_trans_write): Correctly handle string modifiers.
6798 2002-10-09 Paul Brook <paul@nowt.org>
6800 * (g95_conv_expr_reference): Handle character strings correctly.
6802 2002-10-07 Paul Brook <paul@nowt.org>
6804 (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
6806 * trans-array.c (g95_build_array_initializer): Remove.
6807 (g95_conv_array_initializer): New Function.
6808 (g95_trans_auto_arry_allocation): Cleanup.
6809 (g95_trans_init_character_array): Remove.
6810 * g95spec.c: Link in libgforbegin.
6811 * trans.c (g95_generate_code): Rename main function to MAIN__.
6812 (g95_create_var): New function.
6813 (g95_create_var_np): New function.
6814 (g95_evaluate_now): New function.
6815 (g95_start_block): New function.
6816 (g95_finish_block): New function.
6817 (g95_add_expr_to_block): New function.
6818 (g95_add_block_to_block): New function.
6819 * trans-expr.c (g95_conv_componen_ref): New function.
6820 * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
6821 (F95_OBJS): Add dependency.o.
6822 * f95-lang.c (g95_is_simple_stmt): Remove.
6823 * f95-tree.c (mark_not_simple): New function.
6824 (unshare_all_trees): New function.
6825 (create_tmp_var, create_tmp_alias_var): Remove.
6826 * support.c (declare_tmp_vars, tree_last_decl): Remove.
6827 * trans*: Convert to new IR using GENERIC trees. Don't bother about
6828 SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
6830 2002-10-01 Paul Brook <paul@nowt.org>
6832 * trans-array.c: Add support for descriptorless arrays.
6833 (g95_conv_array_data): New function.
6834 (g95_conv_array_base): New function.
6835 * trans-array.h: Declare these here.
6836 * trans-decl.c(g95_create_mopdule_variable): Perform variable
6837 initialization and creation here.
6838 (g95_create_module_vars): Instead of here.
6839 * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
6840 * trans-intrinsic.c: Ditto.
6841 * trans-types.c (g95_is_nodesc_array): New function.
6842 (g95_get_nodesc_array_type): New function.
6843 (g95_sym_type, g95_get_derived_type): Use them.
6844 * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
6846 2002-09-28 Paul Brook <paul@nowt.org>
6848 * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
6849 * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
6852 2002-09-24 Paul Brook <paul@nowt.org>
6854 * f95-lang.c (listify): Remove declaration.
6855 (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
6857 * f95-tree.c (get_name): New function.
6858 * trans.c (module_namespace): Remove.
6859 * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
6860 * trans-types.c: Ditto.
6862 2002-09-19 Paul Brook <paul@nowt.org>
6864 * trans-array.c (g95_get_array_cons_size): New Function.
6865 (g95_con_ss_startstride): Handle Array constructors.
6866 (g95_conv_loop_setup): Ditto.
6867 (g95_conv_array_parameter): Ditto.
6868 * tras-decl.c (g95_finish_var_decl): Make initializes variables
6871 2002-09-19 Paul Brook <paul@nowt.org>
6873 * trans.c (g95_simple_fold_tmp): Detect variables inside
6875 * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
6877 2002-09-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
6879 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
6881 2002-09-14 Paul Brook <paul@nowt.org>
6883 * trans.c (g95_create_module_variable): Move to trans-decl.c.
6884 * trans-const.c (g95_conv_string_init): New Function.
6885 * trans-const.h: Declare it.
6886 * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
6887 variables. Don't bail on intrinsic symbols.
6888 (get_extern_function_decl): Handle specific intrinsic functions.
6889 * trans-types.c (g95_sym_type): Dummy functions don't return
6891 * trans-array.c (g95_build_array_initializer): New Function.
6892 (g95_trans_auto_array_allocation): Build initializer for static decls.
6893 Don't use mpz_addmul, it's GMP4 only.
6895 2002-09-12 Paul Brook <paul@nowt.org>
6897 * trans-decl.c (g95_generate_code): Fix thinko with return variable.
6898 (g95_get_extern_function_decl, g95_build_function_decl): Mangle
6899 assembler names for module procedures.
6901 2002-09-11 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
6903 * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
6906 2002-09-10 Paul Brook <paul@nowt.org>
6908 * trans-array.c: Change format of G95_SS_TEMP strictures.
6909 (g95_check_fncall_dependancy): New function.
6910 (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
6912 * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
6914 (g95_build_function_decl): Don't assume result arrays are packed.
6915 (g95_trans-deferred-vars): Handle array result variables.
6916 (g95_generate_fuction_code): Clear saved_function_decls.
6917 * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
6919 (g95_trans_arrayfunc_assign): New function.
6920 (g95_trans_assignment): Use it.
6921 * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
6922 (g95_se): Add direct_byref.
6923 * trans-types.c: Use sym->result rather than sym where appropriate.
6924 * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
6925 Update other functions to use this.
6926 (g95_is_intrinsic_libcall): New function.
6927 (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
6928 (g95_walk_intrinsic_function): Ditto.
6930 2002-09-08 Paul Brook <paul@nowt.org>
6932 * trans-types.c: Change rank field to dtype field in array descriptor.
6933 * trans-array.c: Implement filling of dtype array descriptor field.
6934 * trans-intrinsic.c: Fix broken LEN intrinsic.
6936 2002-09-07 Paul Brook <paul@nowt.org>
6938 * trans-intrinsic.c: Remove outdated todo intrinsic list.
6939 (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
6940 (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
6942 2002-09-06 Paul Brook <paul@nowt.org>
6944 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
6945 (gt-f95-trans-types.h): Add dependancy information.
6946 * config-lang.in (gtfiles): Add trans-types.c
6947 * f95-lang.c (g95_be_parse_file): Pass error and warning counts
6948 back to top-level code.
6949 * trans-array.c, trans-types.c: Change format of array descriptor.
6950 (g95_conv_descriptor_dimension): New function.
6951 * trans-types.h (g95_conv_descriptor_rank): define.
6952 * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
6955 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
6957 * trans-array.c, trans-types.c: Add rank information to descriptor.
6959 2002-09-06 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
6961 * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
6963 2002-09-04 Paul Brook <paul@nowt.org>
6965 * f95-lang.c (g95_create_decls): New function.
6966 (g95_init): Move initialization of external decls to above, and call
6967 from g95_be_parse_file.
6968 * trans.c (g95_finish_stmt): Don't amputate the decl chain.
6969 * trans-types.c (g95_init_types): Always name integer and char types.
6970 (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
6972 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
6974 * Make-lang.in: Add options.c to F95_PARSER_OBJS
6976 2002-09-02 Paul Brook <paul@nowt.org>
6978 * g95_generate_code: Clear the attr for __fortran_main.
6979 * trans-types.c (g95_finish_type): New function.
6980 * g95_init_io_state_type: Use g95_finish_type.
6981 * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
6983 2002-09-01 Paul Brook <paul@nowt.org>
6985 * README.backend: Warn about the dangers of extra config.h files.
6986 Remove obsolete libgfor stuff.
6987 * config-lang.in: Add target-libgfor dependancy.
6988 * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
6990 2002-09-01 Toon Moene <toon@moene.indiv.nluug.nl>
6992 * g95_conv_mpz_to_tree: Free storage pointed to by q,
6995 2002-08-30 Paul Brook <paul@nowt.org>
6997 * trans-intrinsic.c (g95_conv_intrinsic_function,
6998 g95_walk_intrinsic_function): Added ANY and ALL.
6999 (g95_conv_intrinsic_anyall): New function.
7000 * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in