1 2005-10-30 Steven Bosscher <stevenb@suse.de>
3 * gfortran.texi: Update contributors.
5 2005-10-29 Steven Bosscher <stevenb@suse.de>
7 * interface.c: Fix previous checkin (an incomplete patch
10 2005-10-29 Joseph S. Myers <joseph@codesourcery.com>
12 * intrinsic.texi: Remove empty @cindex line.
14 2005-10-28 Francois-Xavier Coudert <coudert@clipper.ens.fr>
16 * check.c (gfc_check_alarm_sub, gfc_check_signal,
17 gfc_check_signal_sub): New functions.
18 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SIGNAL.
19 * intrinsic.c (add_functions): Add signal intrinsic.
20 (add_subroutines): Add signal and alarm intrinsics.
21 * intrinsic.texi: Document the new intrinsics.
22 * iresolve.c (gfc_resolve_signal, gfc_resolve_alarm_sub,
23 gfc_resolve_signal_sub): New functions.
24 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add case
26 * intrinsic.h: Add prototypes for gfc_check_alarm_sub,
27 gfc_check_signal, gfc_check_signal_sub, gfc_resolve_signal,
28 gfc_resolve_alarm_sub, gfc_resolve_signal_sub.
30 2005-10-28 Steven Bosscher <stevenb@suse.de>
33 * interface.c (gfc_match_end_interface): Fix typo in
34 INTERFACE_USER_OP case.
36 2005-10-26 Francois-Xavier Coudert <coudert@clipper.ens.fr>
39 * resolve.c (resolve_symbol): Remove the use of whynot, so that
40 error messages are not built from pieces.
42 2005-10-26 Paul Thomas <pault@gcc.gnu.org>
45 * decl.c (gfc_match_data_decl): Correct broken bit of code
46 that prevents undefined derived types from being used as
47 components of another derived type.
48 * resolve.c (resolve_symbol): Add backstop error when derived
49 type variables arrive here with a type that has no components.
51 2005-10-25 Jakub Jelinek <jakub@redhat.com>
53 * trans.h (gfc_conv_cray_pointee): Remove.
54 * trans-expr.c (gfc_conv_variable): Revert 2005-10-24 change.
55 * trans-array.c (gfc_conv_array_parameter): Likewise.
56 * trans-decl.c (gfc_conv_cray_pointee): Remove.
57 (gfc_finish_cray_pointee): New function.
58 (gfc_finish_var_decl): Use it. Don't return early for Cray
60 (gfc_create_module_variable): Revert 2005-10-24 change.
61 * decl.c (cray_pointer_decl): Update comment.
62 * gfortran.texi: Don't mention Cray pointees aren't visible in the
65 * symbol.c (check_conflict): Add conflict between cray_pointee
66 and in_common resp. in_equivalence.
67 * resolve.c (resolve_equivalence): Revert 2005-10-24 change.
69 * module.c (ab_attribute): Add AB_CRAY_POINTER and AB_CRAY_POINTEE.
70 (attr_bits): Likewise.
71 (mio_symbol_attribute): Save and restore cray_pointe{r,e} attributes.
72 (mio_symbol): For cray_pointee write/read cp_pointer reference.
74 2005-10-25 Feng Wang <fengwang@nudt.edu.cn>
77 * trans-decl.c (gfc_add_assign_aux_vars): New function. Add two
79 (gfc_get_symbol_decl): Use it when a variable, including dummy
80 argument, is assigned a label.
81 (gfc_trans_assign_aux_var): New function. Set initial value of
82 the auxiliary variable explicitly.
83 (gfc_trans_deferred_vars): Use it.
84 * trans-stmt.c (gfc_conv_label_variable): Handle dummy argument.
86 2005-10-24 Asher Langton <langton2@llnl.gov>
90 * check.c (gfc_check_loc): New function.
91 * decl.c (variable_decl): New variables cp_as and sym. Added a
92 check for variables that have already been declared as Cray
93 Pointers, so we can get the necessary attributes without adding
95 (attr_decl1): Added code to catch pointee symbols and "fix"
97 (cray_pointer_decl): New method.
98 (gfc_match_pointer): Added Cray pointer parsing code.
99 (gfc_mod_pointee_as): New method.
100 * expr.c (gfc_check_assign): Added a check to catch vector-type
101 assignments to pointees with an unspecified final dimension.
102 * gfortran.h: (GFC_ISYM_LOC): New.
103 (symbol_attribute): Added cray_pointer and cray_pointee bits.
104 (gfc_array_spec): Added cray_pointee and cp_was_assumed bools.
105 (gfc_symbol): Added gfc_symbol *cp_pointer.
106 (gfc_option): Added flag_cray_pointer.
107 (gfc_add_cray_pointee): Declare.
108 (gfc_add_cray_pointer ): Declare.
109 (gfc_mod_pointee_as): Declare.
110 * intrinsic.c (add_functions): Add code for loc() intrinsic.
111 * intrinsic.h (gfc_check_loc): Declare.
112 (gfc_resolve_loc): Declare.
113 * iresolve.c (gfc_resolve_loc): New.
114 * lang.opt: Added fcray-pointer flag.
115 * options.c (gfc_init_options): Initialized.
116 gfc_match_option.flag_cray_pointer.
117 (gfc_handle_option): Deal with -fcray-pointer.
118 * parse.c:(resolve_equivalence): Added code prohibiting Cray
119 pointees in equivalence statements.
120 * resolve.c (resolve_array_ref): Added code to prevent bounds
121 checking for Cray Pointee arrays.
122 (resolve_equivalence): Prohibited pointees in equivalence
124 * symbol.c (check_conflict): Added Cray pointer/pointee
126 (gfc_add_cray_pointer): New.
127 (gfc_add_cray_pointee): New.
128 (gfc_copy_attr): New code for Cray pointers and pointees.
129 * trans-array.c (gfc_trans_auto_array_allocation): Added code to
130 prevent space from being allocated for pointees.
131 (gfc_conv_array_parameter): Added code to catch pointees and
132 correctly set their base address.
133 * trans-decl.c (gfc_finish_var_decl): Added code to prevent
134 pointee declarations from making it to the back end.
135 (gfc_create_module_variable): Same.
136 * trans-expr.c (gfc_conv_variable): Added code to detect and
138 (gfc_conv_cray_pointee): New.
139 * trans-intrinsic.c (gfc_conv_intrinsic_loc): New.
140 (gfc_conv_intrinsic_function): Added entry point for loc
142 * trans.h (gfc_conv_cray_pointee): Declare.
144 * gfortran.texi: Added section on Cray pointers, removed Cray
145 pointers from list of proposed extensions.
146 * intrinsic.texi: Added documentation for loc intrinsic.
147 * invoke.texi: Documented -fcray-pointer flag.
149 2005-10-24 Asher Langton <langton2@llnl.gov>
151 * decl.c (gfc_match_save): Changed duplicate SAVE errors to
152 warnings in the absence of strict standard conformance
153 * symbol.c (gfc_add_save): Same.
155 2005-10-24 Francois-Xavier Coudert <coudert@clipper.ens.fr>
158 * arith.c (gfc_arith_error): Change message to include locus.
159 (check_result, eval_intrinsic, gfc_int2int, gfc_real2real,
160 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Use
161 the new gfc_arith_error.
162 (arith_error): Rewrite full error messages instead of building
164 * check.c (must_be): Removed.
165 (type_check, numeric_check, int_or_real_check, real_or_complex_check,
166 kind_check, double_check, logical_array_check, array_check,
167 scalar_check, same_type_check, rank_check, kind_value_check,
168 variable_check, gfc_check_allocated, gfc_check_associated,
169 gfc_check_cmplx, gfc_check_dcmplx, gfc_check_dot_product,
170 gfc_check_index, gfc_check_kind, gfc_check_matmul, gfc_check_null,
171 gfc_check_pack, gfc_check_precision, gfc_check_present,
172 gfc_check_spread): Rewrite full error messages instead of
173 building them from pieces.
174 * decl.c (gfc_match_entry): Rewrite full error messages instead
175 of building them from pieces.
176 * parse.c (gfc_state_name): Remove.
177 * parse.h: Remove prototype for gfc_state_name.
179 2005-10-23 Andrew Pinski <pinskia@physics.uc.edu>
182 * check.c (gfc_check_ichar_iachar): Move the code around so
183 that the check on the length is after check for
186 2005-10-23 Asher Langton <langton2@llnl.gov>
188 * decl.c (match_type_spec): Add a BYTE type as an extension.
190 2005-10-23 Paul Thomas <pault@gcc.gnu.org>
193 * trans-expr.c (gfc_trans_arrayfunc_assign): Return NULL
194 if there is a component ref during an array ref to force
195 use of temporary in assignment.
199 * fortran/iresolve.c (check_charlen_present): New function to
200 add a charlen to the typespec, in the case of constant
202 (gfc_resolve_merge, gfc_resolve_spread): Call.the above.
203 (gfc_resolve_spread): Make calls to library functions that
204 handle the case of the spread intrinsic with a scalar source.
206 2005-10-22 Erik Edelmann <eedelman@gcc.gnu.org>
209 * decl.c (variable_decl): Don't assign default initializers to
212 2005-10-21 Jakub Jelinek <jakub@redhat.com>
214 * interface.c (compare_actual_formal): Issue error when attempting
215 to pass an assumed-size array as assumed-shape array argument.
217 2005-10-20 Erik Edelmann <erik.edelmann@iki.fi>
220 * resolve.c (expr_to_initialize): New function.
221 (resolve_allocate_expr): Take current statement as new
222 argument. Add default initializers to variables of
223 derived types, if they need it.
224 (resolve_code): Provide current statement as argument to
225 resolve_allocate_expr().
227 2005-10-19 Paul Thomas <pault@gcc.gnu.org>
230 * resolve.c (resolve_symbol): Correct error in check for
231 assumed size array with default initializer by testing
232 for arrayspec before dereferencing it.
234 2005-10-17 Paul Thomas <pault@gcc.gnu.org>
237 * gfortran.h: Primitive for gfc_is_formal_arg.
238 * resolve.c(gfc_is_formal_arg): New function to signal across
239 several function calls that formal argument lists are being
241 (resolve_formal_arglist): Set/reset the flag for gfc_is_formal_arg.
242 *expr.c(check_restricted): Add check, via gfc_is_formal_arg, if
243 symbol is part of an formal argument declaration.
246 * decl.c (add_init_expr_to_sym): Make a new character
247 length for each variable, when the expression is NULL
251 * match.c (recursive_stmt_fcn): New function that tests if
252 a statement function resurses through itself or other other
254 (gfc_match_st_function): Call recursive_stmt_fcn to check
255 if this is recursive and to raise error if so.
259 * resolve.c (resolve_symbol): Errors for assumed size arrays
260 with default initializer and for external objects with an
264 * decl.c (match_attr_spec): Prevent PUBLIC from being used
267 2005-10-16 Erik Edelmann <erik.edelmann@iki.fi>
270 * expr.c (check_inquiry): Add "len" to inquiry_function.
272 2005-10-14 Jakub Jelinek <jakub@redhat.com>
274 * primary.c (match_boz_constant): Add missing break after gfc_error.
276 2005-10-12 Paul Thomas <pault@gcc.gnu.org>
279 * trans-types.c (gfc_get_derived_type): Insert code to obtain backend
280 declaration for derived types, building if necessary. Return the
281 derived type if the fields have been built by this process. Otherwise,
282 continue as before but using the already obtained backend_decls for the
283 derived type components. Change the gcc_assert to act on the field.
285 2005-10-12 Paul Thomas <pault@gcc.gnu.org>
288 * decl.c (variable_decl): Make a new copy of the character
289 length for each variable, when the expression is not a
292 2005-10-12 Francois-Xavier Coudert <coudert@clipper.ens.fr>
294 * gfortran.h: Add bitmasks for different FPE traps. Add fpe
296 * invoke.texi: Document the new -ffpe-trap option.
297 * lang.opt: Add -ffpe-trap option.
298 * options.c (gfc_init_options): Initialize the FPE option.
299 (gfc_handle_fpe_trap_option): New function to parse the argument
300 of the -ffpe-trap option.
301 (gfc_handle_option): Add case for -ffpe-trap.
302 * trans-decl.c: Declare a tree for the set_fpe library function.
303 (gfc_build_builtin_function_decls): Build this tree.
304 (gfc_generate_function_code): Generate a call to set_fpe at
305 the beginning of the main program.
306 * trans.h: New tree for the set_fpe library function.
308 2005-10-12 Paul Thomas <pault@gcc.gnu.org>
312 * symbol.c (check_conflict): Prevent common variables and
313 function results from having the SAVE attribute,as required
316 2005-10-12 Paul Thomas <pault@gcc.gnu.org>
319 * resolve.c (resolve_symbol): Exclude use and host associated
320 symbols from the test for private objects in a public namelist.
322 2005-10-12 Jakub Jelinek <jakub@redhat.com>
324 * trans-common.c (build_field): Fix comment typo.
325 (create_common): Set backend_decl of COMMON or EQUIVALENCEd
326 variables to a VAR_DECL with the COMPONENT_REF in
327 DECL_HAS_VALUE_EXPR rather than COMPONENT_REF directly.
328 * f95-lang.c (gfc_expand_function): Emit debug info for
329 EQUIVALENCEd variables if the equiv union is going to be output.
331 2005-10-11 Steven G. Kargl <kargls@comcast.net>
334 * iresolve.c (gfc_resolve_aint, gfc_resolve_anint): Type conversion
337 2005-10-11 Jakub Jelinek <jakub@redhat.com>
339 * f95-lang.c (gfc_init_decl_processing): Initialize
342 2005-10-07 Erik Edelmann <erik.edelmann@iki.fi>
345 * resolve.c (find_array_spec): Search through the list of
346 components in the symbol of the type instead of the symbol of the
349 2005-10-05 Richard Guenther <rguenther@suse.de>
352 * parse.c (gfc_parse_file): Exit early for empty files.
354 2005-10-03 Steve Ellcey <sje@cup.hp.com>
356 * fortran/trans-types.c (gfc_init_kinds): Only pass float, double,
357 and long double floating point types through to Fortran compiler.
359 2005-10-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
362 * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long
363 double builtin function.
364 (gfc_init_builtin_functions): Add mfunc_longdouble,
365 mfunc_clongdouble and func_clongdouble_longdouble trees. Build
366 them for round, trunc, cabs, copysign and pow functions.
367 * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add
368 case for kind 10 and 16.
369 * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16,
370 exponent10 and exponent16.
371 (gfc_build_intrinsic_function_decls): Build nodes for int16,
372 real10, real16, complex10 and complex16 types. Build all possible
373 combinations for function _gfortran_pow_?n_?n. Build function
374 calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16.
375 * trans-expr.c (gfc_conv_power_op): Add case for integer(16),
376 real(10) and real(16).
377 * trans-intrinsic.c: Add suppport for long double builtin
378 functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION
380 (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and
382 (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl
383 and real16_decl in library functions.
384 (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex
386 (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16)
388 (gfc_conv_intrinsic_sign): Likewise.
389 (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind.
390 * trans-types.c (gfc_get_int_type, gfc_get_real_type,
391 gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in
392 the case of kinds not available.
393 * trans.h: Declare trees for cpowl10, cpowl16, ishftc16,
394 exponent10 and exponent16.
396 2005-10-01 Paul Thomas <pault@gcc.gnu.org>
405 * gfortran.h: Prototype for gfc_add_in_equivalence.
406 * match.c (gfc_match_equivalence): Make a structure component
407 an explicit,rather than a syntax, error in an equivalence
408 group. Call gfc_add_in_equivalence to add the constraints
409 imposed in check_conflict.
410 * resolve.c (resolve_symbol): Add constraints: No public
411 structures with private-type components and no public
412 procedures with private-type dummy arguments.
413 (resolve_equivalence_derived): Add constraint that prevents
414 a structure equivalence member from having a default
416 (sequence_type): New static function to determine whether an
417 object is default numeric, default character, non-default
418 or mixed sequence. Add corresponding enum typespec.
419 (resolve_equivalence): Add constraints to equivalence groups
420 or their members: No more than one initialized member and
421 that different types are not equivalenced for std=f95. All
422 the simple constraints have been moved to check_conflict.
423 * symbol.c (check_conflict): Simple equivalence constraints
424 added, including those removed from resolve_symbol.
425 (gfc_add_in_equivalence): New function to interface calls
426 match_equivalence to check_conflict.
428 2005-09-27 Jakub Jelinek <jakub@redhat.com>
431 * trans-common.c (build_equiv_decl): Add IS_SAVED argument.
432 If it is true, set TREE_STATIC on the decl.
433 (create_common): If any symbol in equivalence has SAVE attribute,
434 pass true as last argument to build_equiv_decl.
436 2005-09-24 Janne Blomqvist <jblomqvi@cc.hut.fi>
438 * trans-io.c (gfc_build_io_library_fndecls): Add entry
439 iocall_x_array for transfer_array.
440 (transfer_array_desc): New function.
441 (gfc_trans_transfer): Add code to call transfer_array_desc.
443 2005-09-26 Jakub Jelinek <jakub@redhat.com>
446 * symbol.c (gfc_is_var_automatic): Return true if character length
447 is non-constant rather than constant.
448 * resolve.c (gfc_resolve): Don't handle !gfc_option.flag_automatic
450 * options.c (gfc_post_options): Set gfc_option.flag_max_stack_var_size
451 to 0 for -fno-automatic.
453 2005-09-23 Paul Thomas <pault@gcc.gnu.org>
456 * module.c (mio_component_ref): Return if the symbol is NULL
457 and wait for another iteration during module reads.
458 (mio_symtree_ref): Suppress the writing of contained symbols,
459 when a symbol is available in the main namespace.
460 (read_module): Restrict scope of special treatment of contained
461 symbols to variables only and suppress redundant call to
464 2005-09-22 Steven G. Kargl <kargls@comcast.net>
467 * interface.c (check_interface1): Fix NULL dereference.
469 2005-09-22 Erik Edelmann <erik.edelmann@iki.fi>
472 * resolve.c (derived_inaccessible): New function.
473 (resolve_transfer): Use it to check for private
476 2005-09-22 Steven G. Kargl <kargls@comcast.net>
479 * intrinsic.c (add_function): Add IMAG, IMAGPART, and REALPART
481 * intrinsic.h: Prototypes for gfc_simplify_realpart and
482 gfc_resolve_realpart.
483 * intrinsic.texi: Document intrinsic procedures.
484 * simplify.c (gfc_simplify_realpart): New function.
485 * irseolve.c (gfc_resolve_realpart): New function.
487 2005-09-21 Erik Edelmann <erik.edelmann@iki.fi>
490 * trans-stmt.c (gfc_trans_deallocate): Check if the
491 object to be deallocated is an array by looking at
492 expr->rank instead of expr->symtree->n.sym->attr.dimension.
494 2005-09-20 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
497 * io.c (resolve_tag): Don't allow non-CHARACTER constants as formats.
498 (match_io): Fix usage of gfc_find_symbol.
500 2005-09-20 Jakub Jelinek <jakub@redhat.com>
503 * primary.c (match_actual_arg): Handle ENTRY the same way
506 2005-09-18 Francois-Xavier Coudert <coudert@clipper.ens.fr>
508 * Make-lang.in: Make check-fortran alias for check-gfortran.
510 2005-09-18 Andreas Jaeger <aj@suse.de>
512 * module.c (read_module): Add missed line from last patch.
514 2005-09-18 Erik Edelmann <erik.edelmann@iki.fi>
517 * resolve.c (resolve_symbol): Don't assign default
518 initializer to pointers.
520 2005-09-18 Paul Thomas <pault@gcc.gnu.org>
523 * module.c (read_module): Give symbols from module procedures
524 different true_name entries to those from the module proper.
526 2005-09-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
529 * arith.c (gfc_arith_error): Add translation support for error
531 * array.c (gfc_match_array_ref): Likewise.
532 (gfc_match_array_spec): Likewise.
533 * check.c (must_be): Add msgid convention to third argument.
534 (same_type_check): Add translation support for error message.
535 (rank_check): Likewise.
536 (kind_value_check): Likewise.
537 (gfc_check_associated): Correct typo.
538 (gfc_check_reshape): Add translation support for error message.
539 (gfc_check_spread): Likewise.
540 * error.c (error_printf): Add nocmsgid convention to argument.
541 (gfc_warning, gfc_notify_std, gfc_warning_now, gfc_warning_check)
542 (gfc_error, gfc_error_now): Likewise.
543 (gfc_status): Add cmsgid convention to argument.
544 * expr.c (gfc_extract_int): Add translation support for error
546 (gfc_check_conformance): Add msgid convention to argument.
547 (gfc_check_pointer_assign): Correct tabbing.
548 * gfortran.h: Include intl.h header. Remove prototype for gfc_article.
549 * gfortranspec.c: Include intl.h header.
550 (lang_specific_driver): Add translation support for --version.
551 * io.c (check_format): Add translation support for error message.
552 (format_item_1): Likewise.
553 (data_desc): Likewise.
554 * matchexp.c: Likewise.
555 * misc.c (gfc_article): Remove function.
556 * module.c (bad_module): Use msgid convention. Add translation support
558 (require_atom): Add translation support for error messages.
559 * parse.c (gfc_ascii_statement): Likewise.
560 (gfc_state_name): Likewise.
561 * primary.c (match_boz_constant): Reorganise error messages for
563 * resolve.c (resolve_entries): Likewise.
564 (resolve_operator): Add translation support for error messages.
565 (gfc_resolve_expr): Use msgid convention. Reorganise error messages
567 (resolve_symbol): Add translation support for error messages.
568 * symbol.c (gfc_add_procedure): Remove use of gfc_article function.
569 * trans-const.c (gfc_build_string_const): Use msgid convention.
571 2005-09-16 Paul Brook <paul@codesourcery.com>
574 * dependency.c (transform_sections): Divide by correct value.
577 2005-09-14 Paul Thomas <pault@gcc.gnu.org>
579 PR fortran/21875 Internal Unit Array I/O, NIST
580 * fortran/trans-io.c (gfc_build_io_library_fndecls): Add field for
581 array descriptor to IOPARM structure.
582 * fortran/trans-io.c (set_internal_unit): New function to generate code
583 to store the character (array) and the character length for an internal
585 * fortran/trans-io (build_dt): Use the new function set_internal_unit.
587 2005-09-14 Paul Thomas <pault@gcc.gnu.org>
590 * trans-array.c (gfc_trans_dummy_array_bias): correct the typo
591 which uses dim[i].upper for lbound, rather than dim[i].lower.
593 2005-09-13 Erik Edelmann <erik.edelmann@iki.fi>
596 * trans-expr.c (gfc_trans_arrayfunc_assign): Check value
597 of attr.elemental for specific function instead of generic name.
599 2005-09-13 Richard Sandiford <richard@codesourcery.com>
602 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Move initialization
603 of argse. Remove now-redundant want_pointer assignment.
604 * trans-array.c (gfc_conv_expr_descriptor): When not assigning to
605 a pointer, keep the original bounds of a full array reference.
607 2005-09-13 Richard Sandiford <richard@codesourcery.com>
610 * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift)
611 (gfc_resolve_pack, gfc_resolve_reshape, gfc_resolve_spread)
612 (gfc_resolve_transpose, gfc_resolve_unpack): Add "_char" to the name
613 for character-based operations.
614 (gfc_resolve_pack): Remove ATTRIBUTE_UNUSED from array argument.
615 (gfc_resolve_unpack): Copy the whole typespec from the vector.
616 * trans-array.c (gfc_conv_expr_descriptor): In the EXPR_FUNCTION
617 case, get the string length from the scalarization state.
619 2005-09-14 Francois-Xavier Coudert <coudert@clipper.ens.fr>
621 * Make-lang.in: Change targets prefixes from f95 to fortran.
622 * config-lang.in: Change language name to "fortran".
623 * lang.opt: Change language name to "fortran".
624 * options.c: Change CL_F95 to CL_Fortran.
626 2005-09-09 Thomas Koenig <Thomas.Koenig@online.de>
628 gfortran.texi: Document IOSTAT= specifier.
630 2005-09-09 Thomas Koenig <Thomas.Koenig@online.de>
632 * gfortran.h: Add iomsg to gfc_open, gfc_close, gfc_filepos,
633 gfc_inquire and gfc_dt.
634 * dump-parse-tree.c (gfc_show_code_node): Add iomsg
635 for open, close, file positioning, inquire and namelist.
636 * io.c (io_tag): Add tag_iomsg.
637 (resolve_tag): Add standards warning for iomsg.
638 (match_open_element): Add iomsg.
639 (gfc_free_open): Add iomsg.
640 (gfc_resolve_open): Add iomsg.
641 (gfc_free_close): Add iomsg.
642 (match_close_element): Add iomsg.
643 (gfc_resolve_close): Add iomsg.
644 (gfc_free_filepos): Add iomsg.
645 (match_file_element): Add iomsg.
646 (gfc_resolve_filepos): Add iostat and iomsg.
647 (match-dt_element): Add iomsg.
648 (gfc_free_dt): Add iomsg.
649 (gfc_resolve_dt): Add iomsg.
650 (gfc_free_inquire): Add iomsg.
651 (match_inquire_element): Add iomsg.
652 (gfc_resolve_inquire): Add iomsg.
653 * trans_io.c: Add ioparm_iomsg and ioparm_iomsg_len.
654 (gfc_build_io_library_fndecls): Add iomsg as last field.
655 (gfc_trans_open): Add iomsg.
656 (gfc_trans_close): Add iomsg.
657 (build_fileos): Call set_string for iomsg.
658 (gfc_trans_inquire): Add iomsg.
659 (build_dt): Add iomsg.
661 2005-09-09 Richard Sandiford <richard@codesourcery.com>
663 * match.h (gfc_match_equiv_variable): Declare.
665 2005-09-09 Richard Sandiford <richard@codesourcery.com>
668 * Makefile.in (fortran/trans-expr.o): Depend on dependency.h.
669 * dependency.h (gfc_ref_needs_temporary_p): Declare.
670 * dependency.c (gfc_ref_needs_temporary_p): New function.
671 (gfc_check_fncall_dependency): Use it instead of inlined check.
672 By so doing, take advantage of the fact that character substrings
673 within an array reference also need a temporary.
674 * trans.h (GFC_SS_VECTOR): Adjust comment.
675 * trans-array.c (gfc_free_ss): Remove GFC_SS_VECTOR case.
676 (gfc_set_vector_loop_bounds): New function.
677 (gfc_add_loop_ss_code): Call it after evaluating the subscripts of
678 a GFC_SS_SECTION. Deal with the GFC_SS_VECTOR case by evaluating
679 the vector expression and caching its descriptor for use within
681 (gfc_conv_array_index_ref, gfc_conv_vector_array_index): Delete.
682 (gfc_conv_array_index_offset): Handle scalar, vector and range
683 dimensions as separate cases of a switch statement. In the vector
684 case, use the loop variable to calculate a vector index and use the
685 referenced element as the dimension's index. Perform bounds checking
687 (gfc_conv_section_upper_bound): Return null for vector indexes.
688 (gfc_conv_section_startstride): Give vector indexes a start value
689 of 0 and a stride of 1.
690 (gfc_conv_ss_startstride): Adjust for new GFC_SS_VECTOR representation.
691 (gfc_conv_expr_descriptor): Expand comments. Generalize the
692 handling of the !want_pointer && !direct_byref case. Use
693 gfc_ref_needs_temporary_p to decide whether the variable case
695 (gfc_walk_variable_expr): Handle DIMEN_VECTOR by creating a
697 * trans-expr.c: Include dependency.h.
698 (gfc_trans_arrayfunc_assign): Fail if the target needs a temporary.
700 2005-09-09 Richard Sandiford <richard@codesourcery.com>
703 * trans.h (gfc_interface_sym_mapping, gfc_interface_mapping): Moved
705 (gfc_init_interface_mapping, gfc_free_interface_mapping)
706 (gfc_add_interface_mapping, gfc_finish_interface_mapping)
707 (gfc_apply_interface_mapping): Declare.
708 * trans-array.h (gfc_set_loop_bounds_from_array_spec): Declare.
709 (gfc_trans_allocate_temp_array): Add pre and post block arguments.
710 * trans-array.c (gfc_set_loop_bounds_from_array_spec): New function.
711 (gfc_trans_allocate_array_storage): Replace loop argument with
712 separate pre and post blocks.
713 (gfc_trans_allocate_temp_array): Add pre and post block arguments.
714 Update call to gfc_trans_allocate_array_storage.
715 (gfc_trans_array_constructor, gfc_conv_loop_setup): Adjust for new
716 interface to gfc_trans_allocate_temp_array.
717 * trans-expr.c (gfc_interface_sym_mapping, gfc_interface_mapping):
719 (gfc_init_interface_mapping, gfc_free_interface_mapping)
720 (gfc_add_interface_mapping, gfc_finish_interface_mapping)
721 (gfc_apply_interface_mapping): Make extern.
722 (gfc_conv_function_call): Build an interface mapping for array
723 return values too. Call gfc_set_loop_bounds_from_array_spec.
724 Adjust call to gfc_trans_allocate_temp_array so that code is
725 added to SE rather than LOOP.
727 2005-09-09 Richard Sandiford <richard@codesourcery.com>
730 * trans.h (gfor_fndecl_internal_realloc): Declare.
731 (gfor_fndecl_internal_realloc64): Declare.
732 * trans-decl.c (gfor_fndecl_internal_realloc): New variable.
733 (gfor_fndecl_internal_realloc64): New variable.
734 (gfc_build_builtin_function_decls): Initialize them.
735 * trans-array.h (gfc_trans_allocate_temp_array): Add a fourth argument.
736 * trans-array.c (gfc_trans_allocate_array_storage): Add an argument
737 to say whether the array can grow later. Don't allocate the array
738 on the stack if so. Don't call malloc for zero-sized arrays.
739 (gfc_trans_allocate_temp_array): Add a similar argument here.
740 Pass it along to gfc_trans_allocate_array_storage.
741 (gfc_get_iteration_count, gfc_grow_array): New functions.
742 (gfc_iterator_has_dynamic_bounds): New function.
743 (gfc_get_array_constructor_element_size): New function.
744 (gfc_get_array_constructor_size): New function.
745 (gfc_trans_array_ctor_element): Replace pointer argument with
747 (gfc_trans_array_constructor_subarray): Likewise. Take an extra
748 argument to say whether the variable-sized part of the constructor
749 must be allocated using realloc. Grow the array when this
751 (gfc_trans_array_constructor_value): Likewise.
752 (gfc_get_array_cons_size): Delete.
753 (gfc_trans_array_constructor): If the loop bound has not been set,
754 split the allocation into a static part and a dynamic part. Set
755 loop->to to the bounds for static part before allocating the
756 temporary. Adjust call to gfc_trans_array_constructor_value.
757 (gfc_conv_loop_setup): Allow any constructor to determine the
758 loop bounds. Check whether the constructor has a dynamic size
759 and prefer to use something else if so. Expect the loop bound
760 to be set later. Adjust call to gfc_trans_allocate_temp_array.
761 * trans-expr.c (gfc_conv_function_call): Adjust another call here.
763 2005-09-09 Paul Thomas <pault@gcc.gnu.org>
766 * module.c (find_use_name_n): Based on original
767 find_use_name. Either counts number of use names for a
768 given real name or returns use name n.
769 (find_use_name, number_use_names): Interfaces to the
770 function find_use_name_n.
771 (read_module): Add the logic and calls to these functions,
772 so that mutiple reuses of the same real name are loaded.
774 2005-09-09 Paul Thomas <pault@gcc.gnu.org>
781 * gfortran.h: Move definition of BLANK_COMMON_NAME from trans-
782 common.c so that it is accessible to module.c. Add common_head
783 field to gfc_symbol structure. Add field for the equivalence
784 name AND new attr field, in_equivalence.
785 * match.c (gfc_match_common, gfc_match_equivalence): In loops
786 that flag common block equivalences, emit an error if the
787 common blocks are different, using sym->common_head as the
788 common block identifier. Ensure that symbols that are equivalence
789 associated with a common block are marked as being in_common.
790 * module.c (write_blank_common): New.
791 (write_common): Use unmangled common block name.
792 (load_equiv): New function ported from g95.
793 (read_module): Call load_equiv.
794 (write_equiv): New function ported from g95. Correct
795 string referencing for gfc functions. Give module
796 equivalences a unique name.
797 (write_module): Call write_equiv and write_blank_common.
798 * primary.c (match_variable) Old gfc_match_variable, made
799 static and third argument provided to indicate if parent
800 namespace to be visited or not.
801 (gfc_match_variable) New. Interface to match_variable.
802 (gfc_match_equiv_variable) New. Interface to match_variable.
803 * trans-common.c (finish_equivalences): Provide the call
804 to create_common with a gfc_common_header so that
805 module equivalences are made external, rather than local.
806 (find_equivalences): Ensure that all members in common block
807 equivalences are marked as used. This prevents the subsequent
808 call to this function from making local unions.
809 * trans-decl.c (gfc_generate_function_code): Move the call to
810 gfc_generate_contained_functions to after the call to
811 gfc_trans_common so the use-associated, contained common
812 blocks produce the correct references.
813 (gfc_create_module_variable): Return for equivalenced symbols
814 with existing backend declaration.
816 2005-09-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
819 * match.c (gfc_match_common): Remove unnecessary / wrong special
820 cases for end-of-statement.
822 2005-09-08 Janne Blomqvist <jblomqvi@cc.hut.fi>
824 * gfortran.texi: Add section about implemented F2003 features.
826 2005-09-08 Richard Sandiford <richard@codesourcery.com>
829 * trans-array.c (gfc_add_loop_ss_code): Set ss->string_length in
830 the GFC_SS_FUNCTION case too.
831 * trans-expr.c (gfc_conv_function_val): Allow symbols to be bound
832 to function pointers as well as function decls.
833 (gfc_interface_sym_mapping, gfc_interface_mapping): New structures.
834 (gfc_init_interface_mapping, gfc_free_interface_mapping)
835 (gfc_get_interface_mapping_charlen, gfc_get_interface_mapping_array)
836 (gfc_set_interface_mapping_bounds, gfc_add_interface_mapping)
837 (gfc_finish_interface_mapping, gfc_apply_interface_mapping_to_cons)
838 (gfc_apply_interface_mapping_to_ref)
839 (gfc_apply_interface_mapping_to_expr)
840 (gfc_apply_interface_mapping): New functions.
841 (gfc_conv_function_call): Evaluate the arguments before working
842 out where the result should go. Make the null pointer case provide
843 the string length in parmse.string_length. Cope with non-constant
844 string lengths, using the above functions to evaluate such lengths.
845 Use a temporary typespec; don't assign to sym->cl->backend_decl.
846 Don't assign to se->string_length when returning a cached array
849 2005-09-08 Richard Sandiford <richard@codesourcery.com>
852 * trans-array.c (gfc_conv_array_ref): Call gfc_advance_se_ss_chain
853 after handling scalarized references. Make "indexse" inherit from
854 "se" when handling AR_ELEMENTs.
855 (gfc_walk_variable_expr): Add GFC_SS_SCALAR entries for each
856 substring or scalar reference that follows an array section.
857 * trans-expr.c (gfc_conv_variable): When called from within a
858 scalarization loop, start out with "ref" pointing to the scalarized
859 part of the reference. Don't call gfc_advance_se_ss_chain here.
861 2005-09-07 Richard Sandiford <richard@codesourcery.com>
864 * trans-expr.c (gfc_trans_pointer_assignment): Assign to a temporary
865 descriptor if the rhs is not a null pointer or variable.
867 2005-09-07 Thomas Koenig <Thomas.Koenig@online.de>
870 * symbol.c(check_conflict): Add conflict for parameter/save,
872 2005-09-06 Richard Sandiford <richard@codesourcery.com>
875 * simplify.c (gfc_simplify_transpose): Set the result's typespec from
876 the source, not the first element of the return value.
878 2005-09-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
881 * io.c (match_io): Correctly backup if PRINT followed by
882 symbol which is not a namelist. Force blank between PRINT
883 and namelist in free form.
885 2005-08-31 Francois-Xavier Coudert <coudert@clipper.ens.fr>
888 * gfortran.h (gfc_option_t): Add flag_automatic.
889 * invoke.texi: Document the -fno-automatic option.
890 * lang.opt: Add a -fautomatic option.
891 * options.c (gfc_init_options): Default for -fautomatic is on.
892 (gfc_handle_option): Add handling of -fautomatic option.
893 * resolve.c (gfc_resolve): When -fno-automatic is used, mark
894 needed variables as SAVE.
896 2005-08-27 Erik Edelmann <erik.edelmann@iki.fi>
898 * trans-array.c (gfc_trans_deferred_array): Fix comments.
900 2005-08-27 Erik Schnetter <schnetter@aei.mpg.de>
902 * primary.c (match_charkind_name): Fix typo in comment leading to
905 2005-08-25 Erik Edelmann <eedelman@acclab.helsinki.fi>
908 * symbol.c (find_special): Remove.
909 (build_sym, add_init_expr, attr_decl1): Remove calls to
910 find_special in favor of calls to gfc_get_symbol.
912 2005-08-24 Thomas Koenig <Thomas.Koenig@online.de>
915 * gfortran.h (symbol_attribute): Add noreturn to the structure.
916 (gfc_intrinsic_sym): Add noreturn to the structure.
917 * intrinsic.c (make_noreturn): New function.
918 (add_subroutines): Mark subroutines abort and exit as noreturn.
919 (gfc_intrinsic_sub_interface): Copy noreturn attribute from
920 isym to the resolved symbol.
921 * trans-decl.c (gfc_get_extern_function_decl): Set function
922 as VOLATILE (== noreturn) if the noreturn attribute is set.
924 2005-08-21 Steven G. Kargl <kargls@comcast.net>
926 * decl.c: Typo in comment.
928 2005-08-21 Steven G. Kargl <kargls@comcast.net>
930 * array.c: Bump GFC_MAX_AC_EXPAND from 100 to 65535.
932 2005-08-21 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
934 * gfortran.h (gfc_option_t): Remove source field. Add
936 (gfc_new_file): Remove arguments in prototype.
937 (gfc_source_file): Make 'const char *'.
938 * f95-lang.c (gfc_init): Use gfc_source_file instead of
939 gfc_option.source. Call gfc_new_file without arguments.
940 * invoke.texi: Document new options '-fd-lines-as-code' and
941 '-fd-lines-as-comment'.
942 * lang.opt: Add new options. Alphabetize.
943 * options.c (gfc_init_options): Initialize gfc_source_file instead
944 of gfc_option.source. Initialize gfc_option.flag_d_lines.
945 (form_from_filename): Move here from scanner.c. Make
946 'filename' argument 'const'.
947 (gfc_post_options): Set gfc_source_file. Determine source form.
948 Warn if 'd-lines*' are used in free form.
949 * scanner.c (gfc_source_file): Constify.
950 (skip_fixed_comments): Deal with d-lines.
951 (get_file): Constify argument 'name'.
952 (load_file): Constify argument 'filename'.
953 (form_from_filename): Moved to options.c.
954 (gfc_new_file): Remove arguments. Don't initialize
955 gfc_source_file, don't determine source form.
956 * trans-const.c (gfc_init_constants): Use gfc_source_file instead
957 of gfc_option.source.
959 2005-08-19 Steven G. Kargl <kargls@comcast.net>
962 * gfortran.h: Remove PATH_MAX definition.
963 * module.c (write_module, gfc_dump_module): Use alloca to allocate
965 * scanner.c (gfc_release_include_path, form_from_filename): Ditto.
967 2004-08-16 Huang Chun <chunhuang73@hotmail.com>
969 * trans-expr.c (gfc_conv_power_op): Evaluate the expression before
972 2005-08-14 Asher Langton <langton2@llnl.gov>
974 * parse.c (match): Enclose macro in do...while(0) and braces.
976 2005-08-14 Paul Thomas <pault@gcc.gnu.org>
979 * gfortran.texi: Document PRINT namelist.
981 2005-08-14 Paul Thomas <pault@gcc.gnu.org>
984 * io.c (match_io): Add code to implement PRINT namelist.
986 2005-08-14 Canqun Yang <canqun@nudt.edu.cn>
988 * trans-stmt.c (gfc_trans_arithmetic_if): Optimized in case of equal
991 2005-08-11 Francois-Xavier Coudert <coudert@clipper.ens.fr>
992 Steven Bosscher <stevenb@suse.de>
995 * gfortran.h: Add is_main_program member to symbol_attribute.
996 * trans-decl: Add a gfor_fndecl_set_std tree.
997 (gfc_build_builtin_function_decls): Create it.
998 (gfc_generate_function_code): Add this call at the beginning of
1000 * trans.c (gfc_generate_code): Move main_program and attr.
1001 * trans.h: Add declaration for gfor_fndecl_set_std.
1003 2005-08-10 Thomas Koenig <Thomas.Koenig@online.de>
1006 gfortran.h: Declare new function gfc_resolve_dim_arg.
1007 resolve.c: New function gfc_resolve_dim_arg.
1008 iresolve.c (gfc_resolve_all): Use gfc_resolve_dim_arg.
1009 (gfc_resolve_any): Likewise.
1010 (gfc_resolve_count): Likewise.
1011 (gfc_resolve_cshift): Likewise. If the kind of shift is less
1012 gfc_default_integer_kind, convert it to default integer type.
1013 (gfc_resolve_eoshift): Likewise.
1014 (gfc_resolve_maxloc): Use gfc_resolve_dim_arg.
1015 (gfc_resolve_maxval): Likewise.
1016 (gfc_resolve_minloc): Likewise.
1017 (gfc_resolve_minval): Likewise.
1018 (gfc_resolve_product): Likewise.
1019 (gfc_resolve_spread): Likewise.
1020 (gfc_resolve_sum): Likewise.
1022 2005-08-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1024 * check.c (gfc_check_ttynam_sub, gfc_check_isatty): Add check
1025 functions for new intrinsics TTYNAM and ISATTY.
1026 * intrinsic.c (add_functions, add_subroutines): Add new
1028 * intrinsic.h: Add prototypes for new check and resolve
1030 * iresolve.c (gfc_resolve_isatty, gfc_resolve_ttynam_sub): New
1031 resolve functions for intrinsics TTYNAM and ISATTY.
1032 * gfortran.h (gfc_generic_isym_id): Add symbol for ISATTY.
1033 * trans-intrinsic.c: Add case for GFC_ISYM_ISATTY.
1035 2005-08-09 Jakub Jelinek <jakub@redhat.com>
1037 * scanner.c (preprocessor_line): Don't write beyond the end of flag
1040 2005-08-07 Janne Blomqvist <jblomqvi@cc.hut.fi>
1043 * dump-parse-tree.c (gfc_show_code_node): Add case for FLUSH.
1044 * gfortran.h: Add enums for FLUSH.
1045 * io.c (gfc_free_filepos,match_file_element,match_filepos): Modify
1046 comment appropriately. (gfc_match_flush): New function.
1047 * match.c (gfc_match_if): Add match for flush.
1048 * match.h: Add prototype.
1049 * parse.c (decode_statement): Add flush to 'f' case.
1050 (next_statement): Add case for flush. (gfc_ascii_statement): Likewise.
1051 * resolve.c (resolve_code): Add flush case.
1052 * st.c (gfc_free_statement): Add flush case.
1053 * trans-io.c: Add prototype for flush.
1054 (gfc_build_io_library_fndecls): Build fndecl for flush.
1055 (gfc_trans_flush): New function.
1056 * trans-stmt.h: Add prototype.
1057 * trans.c (gfc_trans_code): Add case for flush.
1059 2005-08-06 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1061 * primary.c (match_hollerith_constant): Fix typo.
1063 2005-08-06 Kazu Hirata <kazu@codesourcery.com>
1065 * decl.c, dump-parse-tree.c, gfortran.texi, intrinsic.texi,
1066 invoke.texi, resolve.c, trans-array.c, trans-array.h,
1067 trans-common.c, trans-expr.c, trans-io.c, trans.h: Fix
1068 comment/doc typos. Follow spelling conventions.
1070 2005-08-06 Jakub Jelinek <jakub@redhat.com>
1074 * primary.c (match_varspec): If equiv_flag, don't look at sym's
1075 attributes, call gfc_match_array_ref up to twice and don't do any
1076 substring or component processing.
1077 * resolve.c (resolve_equivalence): Transform REF_ARRAY into
1078 REF_SUBSTRING or nothing if needed. Check that substrings
1079 don't have zero length.
1081 2005-08-05 Thomas Koenig <Thomas.Koenig@online.de>
1083 * trans-expr.c (gfc_build_builtin_function_decls): Mark
1084 stop_numeric and stop_string as non-returning.
1086 2005-08-04 Paul Brook <paul@codesourcery.com>
1088 * trans-expr.c (gfc_conv_expr, gfc_conv_expr_type): Update comments.
1089 (gfc_conv_expr_lhs): Fix assertion.
1090 (gfc_conv_expr_val): Merge post block. Set se.expr to new value.
1092 2005-08-02 David Edelsohn <edelsohn@gnu.org>
1095 * expr.c (simplify_parameter_variable): Do not copy the subobject
1096 references if the expression value is a constant.
1098 * expr.c (gfc_simplify_expr): Evaluate constant substrings.
1100 2005-07-31 Jerry DeLisle <jvdelisle@verizon.net>
1102 * intrinsic.texi: Add documentation for exponent, floor, and fnum and
1103 fix description of ceiling in index.
1105 2005-07-31 Steven Bosscher <stevenb@suse.de>
1107 * trans-decl.c (gfc_build_builtin_function_decls): Give the internal
1108 malloc functions the 'malloc' attribute. Give runtime_error the
1109 'noreturn' attribute.
1111 2005-07-31 Steven Bosscher <stevenb@suse.de>
1113 * trans-stmt.c (gfc_trans_goto): Jump to the known label instead
1114 of the assigned goto variable.
1116 2005-07-29 Steven Bosscher <stevenb@suse.de>
1118 * trans-types.h (gfc_array_range_type): Add missing GTY decl for this.
1120 2005-07-28 Andrew Pinski <pinskia@physics.uc.edu>
1122 * fortran/f95-lang.c (language_function): Remove
1123 named_labels, shadowed_labels, returns_value, returns_abnormally,
1124 warn_about_return_type, and extern_inline fields.
1125 (named_labels): Remove variable.
1126 (gfc_init_decl_processing): Remove setting of named_labels.
1128 2005-07-27 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1131 * resolve.c (resolve_operator): Improve diagnostic for comparison
1132 of logicals with invalid operator.
1134 2005-07-25 Jakub Jelinek <jakub@redhat.com>
1137 * data.c (gfc_assign_data_value_range): Call
1138 create_character_initializer if last_ts is a character type.
1140 2005-07-22 Manfred Hollstein <mh@suse.com>
1142 * match.c (gfc_match_symbol): Fix uninitialised warnings.
1143 * matchexp.c (gfc_match_expr): Likewise.
1145 2005-07-20 Giovanni Bajo <giovannibajo@libero.it>
1147 Make CONSTRUCTOR use VEC to store initializers.
1148 * trans-array.c (gfc_build_null_descriptor,
1149 gfc_trans_array_constructor_value, gfc_conv_array_initializer):
1150 Update to cope with VEC in CONSTRUCTOR_ELTS.
1151 * trans-common.c (create_common): Likewise.
1152 * trans-expr.c (gfc_conv_structure): Likewise.
1153 * trans-stmt.c (gfc_trans_character_select): Use
1154 build_constructor_from_list instead of build_constructor.
1156 2005-07-19 Paul Thomas <pault@gcc.gnu.org>
1159 * resolve.c (resolve_symbol): A symbol with FL_UNKNOWN
1160 is matched against interfaces in parent namespaces. If there
1161 the symtree is set to point to the interface.
1163 2005-07-16 David Edelsohn <edelsohn@gnu.org>
1166 * decl.c (do_parm): Adjust character initializer to character length
1167 of symbol before assigning.
1169 2005-07-14 Steve Ellcey <sje@cup.hp.com>
1171 * trans-types.c (MAX_REAL_KINDS): Increase from 4 to 5.
1173 2005-07-14 Jakub Jelinek <jakub@redhat.com>
1175 * gfortran.h (MAX_ERROR_MESSAGE): Remove.
1176 (gfc_error_buf): Add allocated and index fields. Change message
1177 field from array to a pointer.
1178 * error.c (use_warning_buffer, error_ptr, warning_ptr): Remove.
1179 (cur_error_buffer): New variable.
1180 (error_char): Use cur_error_buffer->{message,index} instead of
1181 {warning,error}_{buffer.message,ptr}. Reallocate message buffer
1183 (gfc_warning, gfc_notify_std, gfc_error, gfc_error_now): Setup
1184 cur_error_buffer and its index rather than {warning,error}_ptr
1185 and use_warning_buffer.
1186 (gfc_warning_check, gfc_error_check): Don't print anything if
1188 (gfc_push_error): Allocate saved message with xstrdup.
1189 (gfc_pop_error): Free saved message with gfc_free.
1190 (gfc_free_error): New function.
1191 * primary.c (match_complex_constant): Call gfc_free_error if
1192 gfc_pop_error will not be called.
1193 * match.c (gfc_match_st_function): Likewise.
1196 * scanner.c (preprocessor_line): Don't treat flag 3 as the start of a new
1197 file. Fix file left but not entered warning.
1199 2005-07-14 Feng Wang <fengwang@nudt.edu.cn>
1200 Steven G. Kargl <kargls@comcast.net>
1202 * array.c (resolve_character_array_constructor): Allocate gfc_charlen
1203 for the array and attach to namespace list for automatic deallocation.
1205 2005-07-13 Andreas Schwab <schwab@suse.de>
1207 * Make-lang.in (fortran/dependency.o): Depend on
1208 $(GFORTRAN_TRANS_DEPS).
1210 2005-07-11 Jakub Jelinek <jakub@redhat.com>
1212 * trans-stmt.c (gfc_trans_forall_loop): Clear maskindex before
1214 (gfc_trans_assign_need_temp, gfc_trans_pointer_assign_need_temp,
1215 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_2):
1216 Don't clear maskindexes here.
1218 2005-07-08 Daniel Berlin <dberlin@dberlin.org>
1220 * trans-decl.c (create_function_arglist): DECL_ARG_TYPE_AS_WRITTEN
1223 2005-07-08 Jakub Jelinek <jakub@redhat.com>
1225 * primary.c (gfc_match_rvalue): Handle ENTRY the same way
1228 2005-07-07 Jakub Jelinek <jakub@redhat.com>
1230 * scanner.c (load_line): Add pbuflen argument, don't make
1231 buflen static. If maxlen == 0 or preprocessor_flag,
1232 don't truncate at buflen, but at maxlen. In xrealloc add
1233 1 byte at the end for the terminating '\0'. Don't fill
1234 with spaces up to buflen, but gfc_option.fixed_line_length.
1235 (load_file): Adjust load_line caller. Add line_len variable.
1237 * scanner.c (preprocessor_line): Only set current_file->line when errors
1238 have not been encountered. Warn and don't crash if a file leave
1239 preprocessor line has no corresponding entering line. Formatting.
1241 2005-07-07 Steven Bosscher <stevenb@suse.de>
1243 * primary.c (match_hollerith_constant): Use int, not unsigned int,
1244 for the hollerith length. Fix indentation.
1246 2005-07-07 Feng Wang <fengwang@nudt.edu.cn>
1251 * arith.c (gfc_hollerith2int, gfc_hollerith2real,
1252 gfc_hollerith2complex, gfc_hollerith2character, gfc_hollerith2logical):
1254 (eval_intrinsic): Don't evaluate if Hollerith constant arguments exist.
1255 * arith.h (gfc_hollerith2int, gfc_hollerith2real,
1256 gfc_hollerith2complex, gfc_hollerith2character, gfc_hollerith2logical):
1258 * expr.c (free_expr0): Free memery allocated for Hollerith constant.
1259 (gfc_copy_expr): Allocate and copy string if Expr is from Hollerith.
1260 (gfc_check_assign): Enable conversion from Hollerith to other.
1261 * gfortran.h (bt): Add BT_HOLLERITH.
1262 (gfc_expr): Add from_H flag.
1263 * intrinsic.c (gfc_type_letter): Return 'h' for BT_HOLLERITH.
1264 (add_conversions): Add conversions from Hollerith constant to other.
1265 (do_simplify): Don't simplify if Hollerith constant arguments exist.
1266 * io.c (resolve_tag): Enable array in FORMAT tag under GFC_STD_GNU.
1267 * misc.c (gfc_basetype_name): Return "HOLLERITH" for BT_HOLLERITH.
1268 (gfc_type_name): Print "HOLLERITH" for BT_HOLLERITH.
1269 * primary.c (match_hollerith_constant): New function.
1270 (gfc_match_literal_constant): Add match Hollerith before Integer.
1271 * simplify.c (gfc_convert_constant): Add conversion from Hollerith
1273 * trans-const.c (gfc_conv_constant_to_tree): Use VIEW_CONVERT_EXPR to
1274 convert Hollerith constant to tree.
1275 * trans-io.c (gfc_convert_array_to_string): Get array's address and
1276 length to set string expr.
1277 (set_string): Deal with array assigned Hollerith constant and character
1279 * gfortran.texi: Document Hollerith constants as extention support.
1281 2005-07-07 Feng Wang <fengwang@nudt.edu.cn>
1284 * trans-array.c (gfc_trans_array_constructor_value): Fix index of data.
1286 2005-07-07 Jakub Jelinek <jakub@redhat.com>
1288 * decl.c (gfc_match_entry): Allow ENTRY without parentheses
1291 2005-07-03 Kazu Hirata <kazu@codesourcery.com>
1293 * gfortran.texi, intrinsic.texi: Fix typos.
1294 * symbol.c: Fix a comment typo.
1296 2005-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1298 * error.c (error_printf, error_print): Use ATTRIBUTE_GCC_GFC.
1299 * gfortran.h (ATTRIBUTE_GCC_GFC): New.
1300 (gfc_warning, gfc_warning_now, gfc_error, gfc_error_now,
1301 gfc_fatal_error, gfc_internal_error, gfc_notify_std): Use
1304 2005-07-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1307 * io.c (match_dt_element): Do not allow END tag in PRINT or
1310 2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
1312 * lang.opt: Remove "." from end of help texts.
1314 2005-07-01 Jerry DeLisle <jvdelisle@verizon.net>
1316 * gfortran.texi: Fix typos and grammar.
1317 * invoke.texi: Fix typos and grammar.
1318 * intrinsic.texi: Add documentaion for eoshift, epsilon, etime, and
1319 exit. Fixed alignment of text for dtime syntax. Fixed a few line
1322 2005-06-25 Jakub Jelinek <jakub@redhat.com>
1324 * trans-stmt.c (gfc_trans_forall_1): Prefer to use smaller logical
1325 type than boolean_type_node.
1327 2005-06-25 Kelley Cook <kcook@gcc.gnu.org>
1329 * all files: Update FSF address in copyright headers.
1331 2005-06-24 Jerry DeLisle <jvdelisle@verizon.net>
1334 * gfortran.h: Add symbols for new intrinsic functions.
1335 * intrinsic.c: Add new functions acosh, asinh, and atanh.
1336 * intrinsic.h: Add prototypes for the new functions.
1337 * iresolve.c (gfc_resolve_acosh): New function.
1338 (gfc_resolve_asinh): New function.
1339 (gfc_resolve_atanh): New function.
1340 * mathbuiltins.def: Add defines.
1341 * simplify.c (gfc_simplify_acosh): New function.
1342 (gfc_simplify_asinh): New function.
1343 (gfc_simplify_atanh): New function.
1345 2005-06-24 Feng Wang <fengwang@nudt.edu.cn>
1347 * simplify.c (gfc_simplify_modulo): Don't clear before get result.
1349 2005-06-22 Paul Brook <paul@codesourcery.com>
1352 * symbol.c (gfc_is_var_automatic): New function.
1353 (save_symbol): Use it.
1355 2005-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1356 Paul Thomas <pault@gcc.gnu.org>
1360 * module.c (mio_namelist): New function. Correct to set
1361 namelist_tail and to give error on renaming namelist by use
1363 (mio_symbol): Call mio_namelist.
1365 2005-06-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1367 * gfortran.h: Add flag_backslash compile-time option.
1368 * lang.opt: Add support for -fbackslash option.
1369 * options.c: Likewise.
1370 * primary.c: Implement behavior for -fno-backslash.
1371 * invoke.texi: Add doc for -fbackslash option.
1372 * gfortran.texi: Remove mention of -fno-backslash as a
1375 2005-06-20 Steven G. Kargl <kargls@comcast.net>
1379 * match.c (gfc_match_label): Detect duplicate labels.
1382 2005-06-20 Erik Edelmann <erik.edelmann@iki.fi>
1384 * intrinsic.c (check_intrinsic_standard): Fix spelling error
1385 in a warning message.
1387 2005-06-18 Erik Edelman <eedelman@acclab.helsinki.fi>
1388 Steven G. Kargl <kargls@comast.net>
1391 * primary.c (gfc_match_rvalue): expr_type can be EXPR_CONSTANT
1392 for an array; check that sym->as is NULL.
1395 2005-06-18 Steven G. Kargl <kargls@comcast.net>
1397 * intrinsic.c (gfc_intrinsic_func_interface): Enable errors for generic
1398 functions whose simplification routine return FAILURE.
1400 2005-06-13 Geoffrey Keating <geoffk@apple.com>
1402 * Make-lang.in (fortran.install-man): Doesn't depend on installdirs.
1403 (rule for installing f95.1 manpage): Does depend on installdirs.
1405 2005-06-13 Jakub Jelinek <jakub@redhat.com>
1408 * trans-stmt.c (gfc_trans_forall_loop): Only increment maskindex
1409 in the innermost loop.
1411 * trans-expr.c (gfc_conv_function_call): Return int instead of
1412 void. Use a local variable for has_alternate_specifier and
1413 return it. Avoid modification of function type's return value
1414 in place, since it may be shared.
1415 * trans.h (has_alternate_specifier): Remove.
1416 (gfc_conv_function_call): Change return type.
1417 * trans-stmt.c (has_alternate_specifier): Remove.
1418 (gfc_trans_call): Add a local has_alternate_specifier variable,
1419 set it from gfc_conv_function_call return value.
1421 2005-06-12 Richard Henderson <rth@redhat.com>
1423 * trans-array.c (gfc_conv_descriptor_data_get): Rename from
1424 gfc_conv_descriptor_data. Cast the result to the DATAPTR type.
1425 (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): New.
1426 (gfc_trans_allocate_array_storage): Use them.
1427 (gfc_array_allocate, gfc_array_deallocate): Likewise.
1428 (gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor): Likewise.
1429 (gfc_trans_deferred_array): Likewise.
1430 * trans-expr.c (gfc_conv_function_call): Likewise.
1431 (gfc_trans_subcomponent_assign): Likewise.
1432 (gfc_trans_pointer_assignment): Likewise.
1433 * trans-intrinsic.c (gfc_conv_allocated): Likewise.
1434 * trans-types.c (gfc_array_descriptor_base): New.
1435 (gfc_get_element_type): Use GFC_TYPE_ARRAY_DATAPTR_TYPE.
1436 (gfc_get_array_descriptor_base): Break out from ...
1437 (gfc_get_array_type_bounds): ... here. Create type variants.
1438 * trans-array.h (gfc_conv_descriptor_data_get): Declare.
1439 (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): Declare.
1441 2005-06-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1443 * trans-expr.c (gfc_conv_variable): POINTER results don't need f2c
1444 calling conventions. Look at sym instead of sym->result.
1445 * trans-types.c (gfc_sym_type): Remove workaround for frontend bug.
1446 Remove condition which is always false with workaround removed.
1447 (gfc_return_by_reference): Always look at sym, never at sym->result.
1449 2005-06-11 Steven G. Kargl <kargls@comcast.net>
1453 * trans-array.c (gfc_array_deallocate): pstat is new argument
1454 (gfc_array_allocate): update gfc_array_deallocate() call.
1455 (gfc_trans_deferred_array): ditto.
1456 * trans-array.h: update gfc_array_deallocate() prototype.
1457 * trans-decl.c (gfc_build_builtin_function_decls): update declaration
1458 * trans-stmt.c (gfc_trans_deallocate): Implement STAT= feature.
1460 2005-06-07 Jerry DeLisle <jvdelisle@verizon.net>
1462 * intrinsic.texi: Add documentation for dcmplx, digits,
1463 dim, idim, ddim, dot_product, dprod, dreal, and dtime.
1465 2005-06-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1468 * trans-array.c (gfc_trans_array_constructor_value): Slightly reorder.
1469 Generate correct exit condition in case of negative steps in
1472 * invoke.texi: Fix description of flags required for compatibility
1475 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1476 Erik Schnetter <schnetter@aei.mpg.de>
1479 * trans.c (gfc_get_backend_locus): Remove unnecessary adjustment,
1480 remove FIXME comment.
1482 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1484 * match.c (match_forall_iterator): Don't immediately give error if '='
1485 is not followed by an expression.
1487 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1488 Erik Edelmann <erik.edelmann@iki.fi>
1490 * array.c (gfc_match_array_constructor): Disallow empty array
1493 2005-06-03 Jerry DeLisle <jvdelisle@verizon.net>
1495 * fortran/intrinsic.texi: Add documentation for
1496 command_argument_count, conjg, dconjg, count,
1497 cpu_time, cshift, date_and_time, dble, dfloat.
1499 2005-06-01 Roger Sayle <roger@eyesopen.com>
1501 * intrinsic.c (add_conv): No longer take a "simplify" argument as
1502 its always gfc_convert_constant, instead take a "standard" argument.
1503 (add_conversions): Change all existing calls of add_conv to pass
1504 GFC_STD_F77 as appropriate. Additionally, if we're allowing GNU
1505 extensions support integer-logical and logical-integer conversions.
1506 (gfc_convert_type_warn): Warn about use the use of these conversions
1507 as a extension when appropriate, i.e. with -pedantic.
1508 * simplify.c (gfc_convert_constant): Add support for integer to
1509 logical and logical to integer conversions, using gfc_int2log and
1511 * arith.c (gfc_log2int, gfc_int2log): New functions.
1512 * arith.h (gfc_log2int, gfc_int2log): Prototype here.
1513 * gfortran.texi: Document this new GNU extension.
1515 2005-06-01 Paul Thomas <pault@gcc.gnu.org>
1517 * fortran/trans-expr.c (gfc_conv_variable): Clean up bracketting.
1518 * fortran/trans-expr.c (gfc_conv_function_call): Insert spaces.
1519 Correct comments and replace convert of integer_one_node with
1522 2005-06-01 Jakub Jelinek <jakub@redhat.com>
1525 * resolve.c (resolve_contained_fntype): Use sym->attr.untyped
1526 to avoid giving error multiple times.
1527 (resolve_entries): Don't error about BT_UNKNOWN here.
1528 (resolve_unknown_f): Capitalize IMPLICIT for consistency.
1529 (resolve_fntype): New function.
1530 (gfc_resolve): Call resolve_fntype.
1532 2005-06-01 Feng Wang <fengwang@nudt.edu.cn>
1535 * fortran/io.c (resolve_tag): Fix error message.
1537 2005-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1539 * fortran/trans-decl.c: Don't include errors.h.
1540 * fortran/Make-lang.in: Updates dependencies.
1542 2005-05-31 Paul Thomas <pault@gcc.gnu.org>
1547 * fortran/trans-array.c (gfc_conv_expr_descriptor): Obtain the
1548 string length from the expression typespec character length value
1549 and set temp_ss->stringlength and backend_decl. Obtain the
1550 tree expression from gfc_conv_expr rather than gfc_conv_expr_val.
1551 Dereference the expression to obtain the character.
1552 * fortran/trans-expr.c (gfc_conv_component_ref): Remove the
1553 dereference of scalar character pointer structure components.
1554 * fortran/trans-expr.c (gfc_trans_subarray_assign): Obtain the
1555 string length for the structure component from the component
1558 2005-05-30 Roger Sayle <roger@eyesopen.com>
1560 * gfortran.h (GFC_STD_LEGACY): New "standard" macro. Reindent.
1561 * options.c (gfc_init_options): By default, allow legacy extensions
1562 but warn about them.
1563 (gfc_post_options): Make -pedantic warn about legacy extensions
1564 even with -std=legacy.
1565 (gfc_handle_option): Make -std=gnu follow the default behaviour
1566 of warning about legacy extensions, but allowing them. Make the
1567 new -std=legacy accept everything and warn about nothing.
1568 * lang.opt (std=legacy): New F95 command line option.
1569 * invoke.texi: Document both -std=f2003 and -std=legacy.
1570 * gfortran.texi: Explain the two types of extensions and document
1571 how they are affected by the various -std= command line options.
1573 2005-05-30 Kazu Hirata <kazu@cs.umass.edu>
1575 * trans-expr.c: Remove trailing ^M.
1577 * trans-expr.c: Fix comment typos.
1579 2005-05-29 Paul Thomas <pault@gcc.gnu.org>
1587 * fortran/trans-array.c (gfc_conv_resolve_dependencies): Add string
1588 length to temp_ss for character pointer array assignments.
1589 * fortran/trans-expr.c (gfc_conv_variable): Correct errors in
1590 dereferencing of characters and character pointers.
1591 * fortran/trans-expr.c (gfc_conv_function_call): Provide string
1592 length as return argument for various kinds of handling of return.
1593 Return a char[]* temporary for character pointer functions and
1594 dereference the temporary upon return.
1596 2005-05-29 Janne Blomqvist <jblomqvi@vipunen.hut.fi>
1597 Steven G. Kargl <kargls@comcast.net>
1600 * io.c (gfc_match_inquire): Implement constraints on UNIT and FILE usage.
1602 2005-05-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1605 * io.c (format_item_1): Add check and extension warning for
1608 2005-05-28 Steven G. Kargl <kargls@comcast.net>
1610 * arith.c (gfc_arith_init_1): Fix off by one problem;
1611 (gfc_check_integer_range): Chop extra bits in subnormal numbers.
1613 2005-05-28 Jerry DeLisle <jvdelisle@verizon.net>
1614 Steven G. Kargl <kargls@comcast.net>
1616 * intrinsic.texi: added documentation for BIT_SIZE, BTEST, CHAR, CEILING
1619 2005-05-27 Steven G. Kargl <kargls@comcast.net>
1621 * trans-array.c (gfc_trans_deferred_array): Use build_int_cst to force
1622 like types in comparsion.
1624 2005-05-26 Kazu Hirata <kazu@cs.umass.edu>
1626 * data.c, parse.c, trans-array.c, trans-decl.c,
1627 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
1628 trans.h: Fix comment typos. Follow spelling conventions.
1630 2005-05-22 Roger Sayle <roger@eyesopen.com>
1632 * gfortran.texi: Document some more GNU extensions.
1634 2005-05-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1636 * error.c (gfc_warning): Fix typo in comment.
1638 2005-05-18 Thomas Koenig <Thomas.Koenig@online.de>
1641 * fortran/iresolve.c (gfc_resolve_reshape): Add
1642 gfc_type_letter (BT_COMPLEX) for complex to
1643 to resolved function name.
1645 2005-05-18 Erik Edelmann <erik.edelmann@iki.fi>
1647 * array.c (gfc_match_array_constructor): Support [ ... ]
1648 style array constructors.
1650 2005-05-18 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1652 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_TRUNC
1653 and BUILT_IN_TRUNCF instead of BUILT_IN_FLOOR and BUILT_IN_FLOORF.
1654 * trans-intrinsic.c (build_fix_expr): Change 'op' argument
1655 to correct enum type.
1656 (gfc_conv_intrinsic_aint): Likewise. Clarify comment in front of
1657 function. Add default case to switch, deal with FIX_TRUNC_EXPR
1658 instead of FIX_FLOOR_EXPR.
1660 2005-05-18 Feng Wang <fengwang@nudt.edu.cn>
1663 * trans-const.c (gfc_conv_const_charlen): Use gfc_charlen_type_node to
1664 build character length.
1666 2005-05-17 Zdenek Dvorak <dvorakz@suse.cz>
1668 * trans-types.c (gfc_array_range_type): New variable.
1669 (gfc_init_types): Initialize gfc_array_range_type.
1670 (gfc_get_array_type_bounds): Use gfc_array_range_type.
1672 2005-05-17 Jakub Jelinek <jakub@redhat.com>
1675 * trans-stmt.c (generate_loop_for_temp_to_lhs): Remove SIZE and COUNT2
1676 arguments. If LSS is gfc_ss_terminator, increment COUNT1 by 1, instead
1677 of incrementing COUNT2 and using COUNT1+COUNT2 increment COUNT1 and use
1679 (generate_loop_for_rhs_to_temp): Likewise.
1680 (compute_overall_iter_number): Add INNER_SIZE_BODY argument.
1681 It non-NULL, add it to body.
1682 (allocate_temp_for_forall_nest_1): New function, split from
1683 allocate_temp_for_forall_nest.
1684 (allocate_temp_for_forall_nest): Add INNER_SIZE_BODY argument,
1685 propagate it down to compute_overall_iter_number. Use
1686 allocate_temp_for_forall_nest_1.
1687 (gfc_trans_assign_need_temp): Remove COUNT2. Call
1688 compute_inner_temp_size into a new stmtblock_t. Adjust calls to
1689 allocate_temp_for_forall_nest, generate_loop_for_rhs_to_temp
1690 and generate_loop_for_temp_to_lhs.
1691 (gfc_trans_pointer_assign_need_temp): Adjust calls to
1692 allocate_temp_for_forall_nest.
1693 (gfc_evaluate_where_mask): Call compute_inner_temp_size into a new
1694 stmtblock_t. Call compute_overall_iter_number just once, then
1695 allocate_temp_for_forall_nest_1 twice with the same size.
1696 Initialize mask indexes if nested_forall_info != NULL.
1697 (gfc_trans_where_2): Initialize mask indexes before calling
1698 gfc_trans_nested_forall_loop.
1700 2005-05-15 Feng Wang <fengwang@nudt.edu.cn>
1701 Jerry DeLisle <jvdelisle@verizon.net>
1704 * trans-stmt.c (gfc_trans_label_assign): fix pointer type, to
1705 resolve ICE on assign of format label.
1706 * trans-io.c (set_string): add fold-convert to properly
1707 handle assigned format label in write.
1709 2005-05-13 Paul Brook <paul@codesourcery.com>
1711 * trans-stmt.c (gfc_trans_forall_1): Fix comment typo.
1713 2005-05-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1715 * trans-types.c (gfc_is_nodesc_array): Remove redundant check.
1717 2005-05-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1720 * io.c (check_format): Look for literal characters inside
1723 2005-05-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1725 * resolve.c (resolve_symbol): Copy 'pointer' and 'dimension'
1726 attribute from result symbol to function symbol.
1727 * trans-expr.c (gfc_conv_function_call): Look at sym->attr.dimension
1728 instead of sym->result->attr.dimension.
1730 2005-05-10 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1733 * gfortran.h (gfc_option): Add flag_f2c.
1734 * invoke.texi: Document '-ff2c' command line option. Adapt
1735 documentation for '-fno-second-underscore' and '-fno-underscoring'.
1736 * lang.opt (ff2c): New entry.
1737 * options.c (gfc-init_options): Set default calling convention
1738 to -fno-f2c. Mark -fsecond-underscore unset.
1739 (gfc_post_options): Set -fsecond-underscore if not explicitly set
1741 (handle_options): Set gfc_option.flag_f2c according to requested
1743 * trans-decl.c (gfc_get_extern_function_decl): Use special f2c
1744 intrinsics where necessary.
1745 (gfc_trans_deferred_vars): Change todo error to assertion.
1746 * trans-expr.c (gfc_conv_variable): Dereference access
1747 to hidden result argument.
1748 (gfc_conv_function_call): Add hidden result argument to argument
1749 list if f2c calling conventions requested. Slightly restructure
1750 tests. Convert result of default REAL function to requested type
1751 if f2c calling conventions are used. Dereference COMPLEX result
1753 * trans-types.c (gfc_sym_type): Return double for default REAL
1754 function if f2c cc are used.
1755 (gfc_return_by_reference): Slightly restructure logic. Return
1756 COMPLEX by reference depending on calling conventions.
1757 (gfc_get_function_type): Correctly make hidden result argument a
1758 pass-by-reference argument for COMPLEX. Remove old code which does
1759 this for derived types.
1761 2005-05-09 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1763 * match.c (gfc_match_return): Only require space after keyword when
1764 it is obligatory. Only give stdwarn to after matching is successful.
1765 * dump-parse-tree.c (gfc_show_symbol): Deal with alternate returns.
1767 2005-05-08 Kazu Hirata <kazu@cs.umass.edu>
1769 * intrinsic.texi: Fix typos.
1771 2005-05-07 Steven G. Kargl <kargls@comcast.net>
1773 * intrinsic.texi: Document ASSOCIATED and ATAN2. Update Bessel function
1774 description to include information about scalar arguments.
1776 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
1778 * Make-lang.in, dump-parse-tree.c, invoke.texi, lang.opt,
1779 match.h, trans-array.h: Update copyright.
1781 2005-04-29 Tom Tromey <tromey@redhat.com>
1783 * f95-lang.c (poplevel): Updated for change to build_block.
1785 2005-04-29 Jakub Jelinek <jakub@redhat.com>
1789 * trans-expr.c (gfc_conv_variable): Handle return values in functions
1790 with alternate entry points.
1791 * resolve.c (resolve_entries): Remove unnecessary string termination
1792 after snprintf. Set result of entry master.
1793 If all entries have the same type, set entry master's type
1794 to that common type, otherwise set mixed_entry_master attribute.
1795 * trans-types.c (gfc_get_mixed_entry_union): New function.
1796 (gfc_get_function_type): Use it for mixed_entry_master functions.
1797 * gfortran.h (symbol_attribute): Add mixed_entry_master bit.
1798 * decl.c (gfc_match_entry): Set entry->result properly for
1800 * trans-decl.c (gfc_get_symbol_decl): For entry_master, skip over
1802 (build_entry_thunks): Handle return values in entry thunks.
1803 Clear BT_CHARACTER's ts.cl->backend_decl, so that it is not
1804 shared between multiple contexts.
1805 (gfc_get_fake_result_decl): Use DECL_ARGUMENTS from
1806 current_function_decl instead of sym->backend_decl. Skip over
1807 entry master's entry id argument. For mixed_entry_master entries or
1808 their results, return a COMPONENT_REF of the fake result.
1809 (gfc_trans_deferred_vars): Don't warn about missing return value if
1810 at least one entry point uses RESULT.
1811 (gfc_generate_function_code): For entry master returning
1812 CHARACTER, copy ts.cl->backend_decl to all entry result syms.
1813 * trans-array.c (gfc_trans_dummy_array_bias): Don't consider return
1814 values optional just because they are in entry master.
1816 2005-04-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1818 * gfortran.h (gfc_namespace): Add seen_implicit_none field,
1819 Tobias forgot this in previous commit.
1821 2005-04-29 Paul Brook <paul@codesourcery.com>
1823 * trans-expr.c (gfc_conv_expr_present): Fix broken assert. Update
1826 2005-04-29 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1828 * gfortran.h (gfc_namespace): Add seen_implicit_none field.
1829 * symbol.c (gfc_set_implicit_none): Give error if there's a previous
1830 IMPLICIT NONE, set seen_implicit_none.
1831 (gfc_merge_new_implicit): Error if there's an IMPLICIT NONE statement.
1833 2005-04-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1835 * gfortran.h (gfc_gsymbol): Make name a const char *.
1836 * symbol.c (gfc_get_gsymbol): Allocate gsymbol name via
1839 2005-04-28 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1842 * resolve.c (resolve_actual_arglist): Issue an error if a statement
1843 functions is used as actual argument.
1845 2005-04-27 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1848 * interface.c (compare_parameter): Ignore type for EXPR_NULL
1849 only if type is BT_UNKNOWN.
1851 2005-04-25 Paul Brook <paul@codesourcery.com>
1852 Steven G. Kargl <kargls@comcast.net>
1855 * check.c (gfc_check_ichar_iachar): New function.
1856 * instinsic.h (gfc_check_ichar_iachar): Add prototype.
1857 * intrinsic.c (add_functions): Use it.
1858 * primary.c (match_varspec, gfc_match_rvalue): Clear incorrect
1859 character expression lengths.
1861 2005-04-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1864 * trans-common.c (translate_common): Cast offset and
1865 common_segment->offset to type int for warning message.
1867 2005-04-23 DJ Delorie <dj@redhat.com>
1869 * trans-decl.c: Adjust warning() callers.
1871 2005-04-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1873 * trans-const.c (gfc_conv_mpfr_to_tree): Use hexadecimal string as
1874 intermediate representation. Fix typo in comment.
1876 2005-04-21 Steven G. Kargl <kargls@comcast.net>
1878 * trans-const.c (gfc_conv_mpfr_to_tree): Remove unneeded computation;
1879 simplify logic; Add a gcc_assert.
1881 2005-04-19 Steven G. Kargl <kargls@comcast.net>
1883 * trans-const.c (gfc_conv_mpz_to_tree): Fix comment.
1885 2005-04-19 Arnaud Desitter <arnaud.desitter@ouce.ox.ac.uk>
1886 Steven G. Kargl <kargls@comcast.net>
1888 * invoke.texi: Update -Waliasing description
1890 2005-04-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1893 * resolve.c (resolve_variable): If e->symtree is not set, this
1894 ought to be a FAILURE, and not a segfault.
1896 2005-04-17 Paul Thomas <pault@gcc.gnu.org>
1903 * fortran/trans-io.c (gfc_build_io_library_fndecls): Create
1904 declaration for st_set_nml_var and st_set_nml_var_dim. Remove
1905 declarations of old namelist functions.
1906 (build_dt): Simplified call to transfer_namelist_element.
1907 (nml_get_addr_expr): Generates address expression for start of
1908 object data. New function.
1909 (nml_full_name): Qualified name for derived type components. New
1911 (transfer_namelist_element): Modified for calls to new functions
1912 and improved derived type handling.
1914 2005-04-17 Richard Guenther <rguenth@gcc.gnu.org>
1916 * scanner.c (gfc_next_char_literal): Reset truncation flag
1917 for lines ending in a comment for both fixed and free form.
1918 (load_line): Do not set truncated flag if only truncating
1921 2005-04-15 Richard Guenther <rguenth@gcc.gnu.org>
1924 * gfortran.h (gfc_linebuf): Add truncated field.
1925 * parse.c (next_statement): Handle warning for truncated
1927 * scanner.c (load_line): Return if line was truncated.
1928 No longer warn for truncated lines. Remove unused parameters.
1929 (load_file): Store load_line return value to linebuf.
1930 (gfc_error_recovery): Do not advance line at the end.
1932 2005-04-14 Steven G. Kargl <kargls@comcast.net>
1934 * gfortran.h (gfc_real_info): Add subnormal struct member.
1935 * arith.c (gfc_arith_init_1): Set it.
1936 (gfc_check_real_range): Use it.
1937 * simplify.c (gfc_simplify_nearest): Fix nearest(0.,1.).
1939 2005-04-12 Kazu Hirata <kazu@cs.umass.edu>
1941 * simplify.c: Fix a comment typo.
1943 2005-04-11 Richard Sandiford <rsandifo@redhat.com>
1945 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
1947 2005-04-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1949 * simplify.c (gfc_simplify_nearest): Overhaul.
1951 2005-04-10 Kazu Hirata <kazu@cs.umass.edu>
1953 * interface.c: Fix a comment typo.
1955 2005-04-10 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1957 * match.c (match_arithmetic_if): Arithmetic IF is obsolete in
1960 2005-04-09 Steven G. Kargl <kargls@comcast.net>
1962 * simplify.c (gfc_simplify_anint): Use mpfr_round()
1963 (gfc_simplify_dnint): ditto.
1964 (gfc_simplify_nint): ditto.
1966 2005-04-09 Andrew Pinski <pinskia@physics.uc.edu>
1969 * io.c (check_format): Allow an optional comma
1970 between descriptors.
1972 2005-04-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1974 * match.c (match_arithmetic_if): Remove gfc_ prefix and correct
1975 comment according to GNU coding style.
1976 (gfc_match_if): Remove gfc_ prefix in call to
1977 match_arithmetic_if.
1979 2005-04-08 Diego Novillo <dnovillo@redhat.com>
1981 * match.c (gfc_match_arithmetic_if): Declare static.
1983 2005-04-08 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1986 * match.c (gfc_match_arithmetic_if): New function to match an
1987 arithmetic IF statement.
1988 (gfc_match_if): Use gfc_match_arithmetic_if to match an
1989 arithmetic IF statement embedded in a simple IF statement.
1991 2005-04-07 Steven G. Kargl <kargls@comcast.net>
1993 * simplify.c (gfc_simplify_exponent): Fix exponent(tiny(x))
1995 2005-04-06 Steven G. Kargl <kargls@comcast.net>
1997 * invoke.texi: Remove documentation of -std=f90
1999 2005-04-06 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2001 * expr.c (gfc_check_assign): Don't allow NULL as rhs in a
2002 non-pointer assignment.
2004 2005-04-05 Feng Wang <fengwang@nudt.edu.cn>
2009 * array.c (resolve_character_array_constructor): New function. Set
2010 constant character array's character length.
2011 (gfc_resolve_array_constructor): Use it.
2012 * decl.c (add_init_expr_to_sym): Set symbol and initializer character
2014 (gfc_set_constant_character_len): New function. Set constant character
2015 expression according the given length.
2016 * match.h (gfc_set_constant_character_len): Add prototype.
2018 2005-04-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2020 * intrinsic.texi: BES?? functions are not in the f95 standard.
2022 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2024 * intrinsic.texi: Document COS, EXP, LOG, LOG10, SIN, SQRT, TAN.
2026 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2028 * intrinsic.texi: Document BESJ0, BESJ1, BESJN, BESY0, BESY1,
2029 BESYN, ATAN, COSH, ERF, ERC, SINH, TANH.
2031 2005-04-02 Steven G. Kargl <kargls@comcast.net>
2033 * intrinsic.texi: Document ALLOCATED, ANINT, ANY, ASIN; fix typos
2035 2005-04-01 Kazu Hirata <kazu@cs.umass.edu>
2037 * decl.c, f95-lang.c, interface.c, module.c, trans-stmt.c,
2038 trans.h: Fix comment typos.
2040 2005-03-29 Steven G. Kargl <kargls@comcast.net>
2042 * gfortran.h (option_t): Change d8, i8, r8 to flag_default_double,
2043 flag_default_integer, flag_default_real
2044 * invoke.texi: Update documentation
2045 * lang.opt: Remove d8, i8, r8 definitions; Add fdefault-double-8
2046 fdefault-integer-8, and fdefault-real-8 definitions.
2047 * options.c (gfc_init_options): Set option defaults
2048 (gfc_handle_option): Handle command line options.
2049 * trans-types.c (gfc_init_kinds): Use options.
2051 2005-03-29 Keith Besaw <kbesaw@us.ibm.com>
2053 * f95-lang.c (builtin_function): Process the attrs parameter
2054 and apply the "const" attribute to the builtin if found.
2056 2005-03-27 Steven G. Kargl <kargls@comcast.net>
2058 * intrinsic.texi: Document AIMAG, AINT, ALL
2060 2005-03-26 Steven G. Kargl <kargls@comcast.net>
2062 * arith.c (check_result): Fix illogical logic.
2064 2005-03-26 Canqun Yang <canqun@nudt.edu.cn>
2066 * trans-common.c (create_common): Build RECORD_NODE for common blocks
2067 contain no equivalence objects.
2068 (add_equivalences): New argument saw_equiv.
2069 (trans_common): New local variable saw_equiv.
2070 (finish_equivalences): Add a local variable dummy, Always pass true
2071 for the 3rd parameter to create_common.
2073 2005-03-25 Steven G. Kargl <kargls@comcast.net>
2075 * intrinsic.texi: Fix "make dvi"
2077 2005-03-24 Steven G. Kargl <kargls@comcast.net>
2079 * intrinsic.texi: New file.
2080 * gfortran.texi: Include it; white space change; fix typo.
2082 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
2084 * f95-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
2086 2005-03-23 Steven Bosscher <stevenb@suse.de>
2088 * convert.c (convert): Replace fold (buildN (...)) with fold_buildN.
2089 * trans-array.c (gfc_trans_allocate_array_storage,
2090 gfc_trans_allocate_temp_array gfc_trans_array_constructor_value,
2091 gfc_conv_array_index_ref, gfc_trans_array_bound_check,
2092 gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
2093 gfc_conv_array_ref, gfc_trans_preloop_setup, gfc_conv_ss_startstride,
2094 gfc_conv_loop_setup, gfc_array_init_size, gfc_trans_array_bounds,
2095 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
2096 gfc_conv_expr_descriptor): Likewise.
2097 * trans-expr.c (gfc_conv_powi, gfc_conv_string_tmp,
2098 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
2099 * trans-intrinsic.c (build_round_expr, gfc_conv_intrinsic_bound,
2100 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_sign,
2101 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
2102 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_bitop,
2103 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits,
2104 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_ishftc,
2105 gfc_conv_intrinsic_merge, prepare_arg_info,
2106 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_repeat): Likewise.
2107 * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do, gfc_trans_do_while,
2108 gfc_trans_forall_loop, gfc_do_allocate, generate_loop_for_temp_to_lhs,
2109 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
2110 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
2111 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_assign):
2113 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Likewise.
2114 * trans.c (gfc_add_modify_expr): Likewise.
2116 2005-03-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2118 * check.c (gfc_check_chdir, gfc_check_chdir_sub, gfc_check_kill,
2119 gfc_check_kill_sub, gfc_check_link, gfc_check_link_sub,
2120 gfc_check_symlnk, gfc_check_symlnk_sub, gfc_check_rename,
2121 gfc_check_rename_sub, gfc_check_sleep_sub, gfc_check_gerror,
2122 gfc_check_getlog, gfc_check_hostnm, gfc_check_hostnm_sub,
2123 gfc_check_perror): new functions to check newly implemented
2125 * gfortran.h: adding symbols for new intrinsics.
2126 * intrinsic.c (add_functions): adding new intrinsics.
2127 (add_subroutines): adding new intrinsics.
2128 * intrinsic.h: prototype for all checking and resolving
2130 * iresolve.c (gfc_resolve_chdir, gfc_resolve_chdir_sub,
2131 gfc_resolve_hostnm, gfc_resolve_ierrno, gfc_resolve_kill,
2132 gfc_resolve_link, gfc_resolve_rename, gfc_resolve_symlnk,
2133 gfc_resolve_time, gfc_resolve_time8, gfc_resolve_rename_sub,
2134 gfc_resolve_kill_sub, gfc_resolve_link_sub,
2135 gfc_resolve_symlnk_sub, gfc_resolve_sleep_sub,
2136 gfc_resolve_gerror, gfc_resolve_getlog, gfc_resolve_hostnm_sub,
2137 gfc_resolve_perror): new functions to resolve intrinsics.
2138 * trans-intrinsic.c (gfc_conv_intrinsic_function): add case
2141 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2143 * dump-parse-tree.c (gfc_show_expr): Dump name of namespace
2144 in which the variable is declared.
2147 * resolve.c (was_declared): Also check for dummy attribute.
2149 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2151 * gfortran.h (arith): Remove ARITH_0TO0.
2152 * arith.c (gfc_arith_error): Remove handling of ARITH_0TO0.
2153 (gfc_arith_power): Remove special casing of zero to integral
2156 2005-03-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2158 * Make-lang.in (fortran-warn): Remove -Wno-error.
2159 (expr.o-warn, resolve.o-warn, simplify.o-warn,
2160 trans-common.o-warn): Specify -Wno-error.
2162 2005-03-17 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2164 * trans-array.c (gfc_trans_static_array_pointer,
2165 get_array_ctor_var_strlen, gfc_conv_array_index_offset): Fix
2166 comment and formatting typos.
2168 2005-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2170 * invoke.texi: Fix typos.
2172 2005-03-15 Zack Weinberg <zack@codesourcery.com>
2174 * Make-lang.in (GFORTRAN_TEXI): Add gcc-vers.texi.
2176 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
2178 * trans-stmt.c (gfc_trans_label_assign): Don't set DECL_ARTIFICIAL flag
2179 to zero on label_tree.
2181 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
2184 * io.c (resolve_tag): Add checking on assigned label.
2185 (match_dt_format): Does not set symbol assign attribute.
2186 * match.c (gfc_match_goto):Does not set symbol assign attribute.
2187 * resolve.c (resolve_code): Add checking on assigned label.
2188 * trans-common.c (build_field): Deals with common variable assigned
2190 * trans-stmt.c (gfc_conv_label_variable): New function.
2191 (gfc_trans_label_assign): Use it.
2192 (gfc_trans_goto): Ditto.
2193 * trans-io.c (set_string): Ditto.
2194 * trans.h (gfc_conv_label_variable): Add prototype.
2196 2005-03-14 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2199 * symbol.c (check_conflict): A dummy argument can't be a statement
2202 2005-03-14 Zdenek Dvorak <dvorakz@suse.cz>
2204 * fortran/trans-intrinsic.c (gfc_conv_intrinsic_ishft): Convert
2205 the argument of the shift to the unsigned type.
2207 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2210 * resolve.c (gfc_resolve_index): Allow REAL indices as an extension.
2212 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2215 * resolve.c (gfc_resolve): Check if character lengths are
2216 specification expressions.
2218 2005-03-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2221 * trans-array.c (gfc_stack_space_left): Remove unused variable.
2222 (gfc_can_put_var_on_stack): Move to trans-decl.c, remove #if 0'ed
2224 * trans-array.h (gfc_stack_space_left, gfc_can_put_var_on_stack):
2225 Remove declaration / prototype.
2226 * trans-common.c (build_equiv_decl): Give union a name. Check if
2227 it can be put on the stack.
2228 * trans-decl.c (gfc_stack_space_left): Move function here.
2229 (gfc_build_qualified_array): Fix comment typo.
2230 * trans.h (gfc_put_var_on_stack): Add prototype.
2232 2005-03-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2234 * Make-lang.in (fortran-warn): Set to $(STRICT_WARN) -Wno-error.
2235 * decl.c, trans.c: Don't use C++ style comments.
2236 * gfortran.h (sym_flavor, procedure_type, sym_intent, gfc_access,
2237 ifsrc): Give names to enums and use ENUM_BITFIELD.
2238 (gfc_access): Remove trailing comma.
2240 2005-03-05 Steven G. Kargl <kargls@comcast.net>
2243 * primary.c (match_complex_constant): Mangled complex constant may
2244 be an implied do-loop. Give implied do-loop matcher a chance.
2246 2005-03-05 Steven G. Kargl <kargls@comcast.net>
2249 * resolve.c (compare_shapes): New function.
2250 (resolve_operator): Use it.
2252 2005-03-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2254 * trans-const.c (gfc_conv_constant_to_tree): Use correct tree
2255 type for COMPLEX constants.
2257 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2260 * trans-expr.c (gfc_conv_function_call): Correctly dereference
2261 argument from a pointer function also if it has a result clause.
2263 2005-03-04 Steven G. Kargl <kargls@comcast.net>
2265 * expr.c (gfc_copy_shape_excluding): Change && to ||.
2267 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2269 * trans-intrinsic.c (gfc_get_symbol_for_expr): Fix comment typo,
2272 2005-02-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2276 * simplify.c (gfc_simplify_bound): Rename to ...
2277 (simplify_bound): ... this and overhaul.
2279 2005-02-28 Steven G. Kargl <kargl@gcc.gnu.org>
2281 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): remove boolean argument.
2282 (gfc_conv_intrinsic_function): update function calls
2284 2005-02-27 Steven G. Kargl <kargl@gcc.gnu.org>
2287 * trans-types.c (gfc_max_integer_kind): Declare
2288 (gfc_init_kinds): Initialize it.
2289 * gfortran.h (gfc_max_integer_kind): extern it.
2290 * primary.c (match_boz_constant): Use it; remove gfortran extension
2291 of kind suffixes on BOZ literal constants
2294 2005-02-27 Steven G. Kargl <kargls@comcast.net>
2296 * arith.c (gfc_check_real_range): Remove multiple returns
2297 (check_result): New function.
2298 (gfc_arith_uminus,gfc_arith_plus,gfc_arith_times,
2299 gfc_arith_divide,gfc_arith_power,gfc_arith_minus): Use it.
2302 2005-02-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2304 * decl.c, resolve.c, trans-array.c, trans.h: Fix comment typo(s).
2307 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-meunchen.de>
2309 Unrevert previously reverted patch. Adding this fix:
2310 * module.c (find_true_name): Deal with NULL module.
2312 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2314 Revert yesterday's patch:
2315 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2317 * gfortran.h (gfc_component, gfc_actual_arglist, ...
2318 ... argument. Copy string instead of pointing to it.
2320 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2322 * gfortran.h (gfc_get_namespace): Add second argument to prototype.
2323 * intrinsic.c (gfc_intrinsic_init_1): Pass second argument to
2325 * module.c (mio_namespace_ref, load_needed): Likewise.
2326 * parse.c (parse_interface, parse_contained): Likewise. Here the
2327 correct second argument matters.
2328 * symbol.c (gfc_get_namespace): Add parent_types argument, only copy
2329 parent's implicit types if this is set.
2330 (gfc_symbol_init_2): Pass second argument to gfc_get_namespace.
2331 * trans-common.c (build_common_decl): Likewise.
2333 * gfortran.h (symbol_attribute): New 'untyped' field, fix comment
2335 * symbol.c (gfc_set_default_type): Issue error only once, by setting
2336 and checking 'untyped' attribute.
2338 * gfortran.h (gfc_expr): Move 'operator', 'op1', 'op2', and 'uop'
2339 fields into new struct 'op' inside the 'value' union.
2340 * arith.c (eval_intrinsic): Adapt all users.
2341 * dependency.c (gfc_check_dependency): Likewise.
2342 * dump-parse-tree.c (gfc_show_expr): Likewise.
2343 * expr.c (gfc_get_expr): Don't clear removed fields.
2344 (free_expr0, gfc_copy_expr, gfc_type_convert_binary,
2345 gfc_is_constant_expr, simplify_intrinsic_op, check_init_expr,
2346 check_intrinsic_op): Adapt to new field names.
2347 * interface.c (gfc_extend_expr): Likewise. Also explicitly
2348 nullify 'esym' and 'isym' fields of new function call.
2349 * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
2350 Adapt to renamed structure fields.
2351 * matchexp.c (build_node, match_level_1, match_expr): Likewise.
2352 * module.c (mio_expr): Likewise.
2353 * resolve.c (resolve_operator): Likewise.
2354 (gfc_find_forall_index): Likewise. Only look through operands
2355 if dealing with EXPR_OP
2356 * trans-array.c (gfc_walk_op_expr): Adapt to renamed fields.
2357 * trans-expr.c (gfc_conv_unary_op, gfc_conv_power_op,
2358 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
2361 * gfortran.h (gfc_component, gfc_actual_arglist, gfc_user_op): Make
2362 'name' a 'const char *'.
2363 (gfc_symbol): Likewise, also for 'module'.
2364 (gfc_symtree): Make 'name' a 'const char *'.
2365 (gfc_intrinsic_sym): Likewise, also for 'lib_name'.
2366 (gfc_get_gsymbol, gfc_find_gsymbol): Add 'const' qualifier to
2368 (gfc_intrinsic_symbol): Use 'gfc_get_string' instead of 'strcpy' to
2369 initialize 'SYM->module'.
2370 * check.c (gfc_check_minloc_maxloc, check_reduction): Check for NULL
2371 pointer instead of empty string.
2372 * dump-parse-tree.c (gfc_show_actual_arglist): Likewise.
2373 * interface.c (gfc_compare_types): Adapt check to account for possible
2375 (compare_actual_formal): Check for NULL pointer instead of empty
2377 * intrinsic.c (gfc_current_intrinsic, gfc_current_intrinsic_arg):
2378 Add 'const' qualifier.
2379 (conv_name): Return a heap allocated string.
2380 (find_conv): Add 'const' qualifier to 'target'.
2381 (add_sym): Use 'gfc_get_string' instead of 'strcpy'.
2382 (make_generic): Check for NULL pointer instead of empty string.
2383 (make_alias): Use 'gfc_get_string' instead of 'strcpy'.
2384 (add_conv): No need to strcpy result from 'conv_name'.
2385 (sort_actual): Check for NULL pointer instead of empty string.
2386 * intrinsic.h (gfc_current_intrinsic, gfc_current_intrinsic_arg):
2388 * module.c (compare_true_names): Compare pointers instead of strings
2389 for 'module' member.
2390 (find_true_name): Initialize string fields with gfc_get_string.
2391 (mio_pool_string): New function.
2392 (mio_internal_string): Adapt comment.
2393 (mio_component_ref, mio_component, mio_actual_arg): Use
2394 'mio_pool_string' instead of 'mio_internal_string'.
2395 (mio_symbol_interface): Add 'const' qualifier to string arguments.
2396 Add level of indirection. Use 'mio_pool_string' instead of
2397 'mio_internal_string'.
2398 (load_needed, read_module): Use 'gfc_get_string' instead of 'strcpy'.
2399 (write_common, write_symbol): Use 'mio_pool_string' instead of
2400 'mio_internal_string'.
2401 (write_symbol0, write_symbol1): Likewise, also check for NULL pointer
2402 instead of empty string.
2403 (write_operator, write_generic): Pass correct type variable to
2404 'mio_symbol_interface'.
2405 (write_symtree): Use 'mio_pool_string' instead of
2406 'mio_internal_string'.
2407 * primary.c (match_keyword_arg): Adapt check to possible
2408 case of NULL pointer. Use 'gfc_get_string' instead of 'strcpy'.
2409 * symbol.c (gfc_add_component, gfc_new_symtree, delete_symtree,
2410 gfc_get_uop, gfc_new_symbol): Use 'gfc_get_string' instead of
2412 (ambiguous_symbol): Check for NULL pointer instead of empty string.
2413 (gfc_find_gsymbol, gfc_get_gsymbol): Add 'const' qualifier on string
2415 * trans-array.c (gfc_trans_auto_array_allocation): Check for NULL
2416 pointer instead of empty string.
2417 * trans-decl.c (gfc_sym_mangled_identifier,
2418 gfc_sym_mangled_function_id, gfc_finish_var_decl, gfc_get_symbol_decl,
2419 gfc_get_symbol_decl): Likewise.
2420 * trans-io.c (gfc_new_nml_name_expr): Add 'const' qualifier to
2421 argument. Copy string instead of pointing to it.
2423 2005-02-23 Kazu Hirata <kazu@cs.umass.edu>
2425 * intrinsic.h, st.c: Update copyright.
2427 2005-02-20 Steven G. Kargl <kargls@comcast.net>
2429 * symbol.c: Typos in comments.
2431 2005-02-20 Steven G. Kargl <kargls@comcast.net>
2433 * expr.c (gfc_type_convert_binary): Typo in comment.
2435 2005-02-19 Steven G. Kargl <kargls@comcast.net>
2437 * check.c (gfc_check_selected_int_kind): New function.
2438 * intrinsic.h: Prototype it.
2439 * intrinsic.c (add_function): Use it.
2440 * simplify (gfc_simplify_ceiling,gfc_simplify_floor): Change
2441 BT_REAL to BT_INTEGER and use gfc_default_integer_kind.
2443 2005-02-19 Steven G. Kargl <kargls@comcast.net>
2445 * check.c (gfc_check_int): improve checking of optional kind
2446 * simplify.c (gfc_simplify_int): Change BT_REAL to BT_INTEGER
2448 2005-02-19 Steven G. Kargl <kargls@comcast.net>
2450 * check.c (gfc_check_achar): New function
2451 * intrinsic.h: Prototype it.
2452 * intrinsic.c (add_function): Use it.
2454 2005-02-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2456 * trans-stmt.c (generate_loop_for_temp_to_lhs,
2457 generate_loop_for_rhs_to_temp): Remove if whose condition is
2460 2005-02-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2462 * symbol.c (gfc_use_ha_derived): Remove, fold functionality into ...
2463 (gfc_use_derived): ... this function.
2465 2005-02-09 Richard Henderson <rth@redhat.com>
2467 * f95-lang.c (gfc_init_builtin_functions): Call
2468 build_common_builtin_nodes; do not define any functions handled
2471 2005-02-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2473 * expr.c (gfc_copy_expr): Don't copy 'op1' and 'op2' for
2475 (gfc_is_constant_expr): Check 'ref' to determine if substring
2476 reference is constant.
2477 (gfc_simplify_expr): Simplify 'ref' instead of 'op1' and 'op2'.
2478 (check_init_expr, check_restricted): Check 'ref' instead of 'op1'
2480 * module.c (mio_expr): Read / write 'ref' instead of 'op1' and 'op2'.
2482 2005-02-07 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2484 * gfortran.h (gfc_add_dimension, gfc_add_result, gfc_add_save,
2485 gfc_add_dummy, gfc_add_generic, gfc_add_in_common, gfc_add_data,
2486 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
2487 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
2488 gfc_add_procedure): Add argument.
2489 * array.c (gfc_set_array_spec), decl.c (var_element, get_proc_name,
2490 gfc_match_null, match_type_spec, match_attr_spec,
2491 gfc_match_formal_arglist, match_result, gfc_match_function_decl):
2492 Update callers to match.
2493 (gfc_match_entry): Likewise, fix comment typo.
2494 (gfc_match_subroutine, attr_decl1, gfc_add_dimension,
2495 access_attr_decl, do_parm, gfc_match_save, gfc_match_modproc,
2496 gfc_match_derived_decl): Update callers.
2497 * interface.c (gfc_match_interface): Likewise.
2498 * match.c (gfc_match_label, gfc_add_flavor,
2499 gfc_match_call, gfc_match_common, gfc_match_block_data,
2500 gfc_match_namelist, gfc_match_module, gfc_match_st_function):
2502 * parse.c (parse_derived, parse_interface, parse_contained),
2503 primary.c (gfc_match_rvalue, gfc_match_variable): Likewise.
2504 * resolve.c (resolve_formal_arglist, resolve_entries): Update callers.
2505 * symbol.c (check_conflict, check_used): Add new 'name' argument,
2506 use when printing error message.
2507 (gfc_add_dimension, gfc_add_result, gfc_add_save, gfc_add_dummy,
2508 gfc_add_generic, gfc_add_in_common, gfc_add_data,
2509 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
2510 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
2511 gfc_add_procedure): Add new 'name' argument. Pass along to
2512 check_conflict and check_used.
2513 (gfc_add_allocatable, gfc_add_external, gfc_add_intrinsic,
2514 gfc_add_optional, gfc_add_pointer, gfc_add_target, gfc_add_elemental,
2515 gfc_add_pure, gfc_add_recursive, gfc_add_intent,
2516 gfc_add_explicit_interface, gfc_copy_attr): Pass NULL for new
2517 argument in calls to any of the modified functions.
2519 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
2521 * gfortran.texi: Don't give last update date.
2523 2006-01-30 Richard Henderson <rth@redhat.com>
2525 * options.c (gfc_init_options): Zero flag_errno_math.
2527 2005-01-29 Paul Brook <paul@codesourcery.com>
2530 * check.c (real_or_complex_check): New function.
2531 (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc): New functions.
2532 * intrinsic.c (add_functions): Use new check functions.
2533 * intrinsic.h (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc):
2536 2005-01-29 Steven G. Kargl <kargls@comcast.net>
2539 * expr.c (gfc_check_assign): Check for conformance of logical operands
2541 2004-01-27 Steven Bosscher <stevenb@suse.de>
2543 * trans-decl.c (gfc_build_label_decl): Set DECL_ARTIFICAL and
2544 TREE_USED for all labels.
2545 (gfc_trans_entry_master_switch): Use it instead of building a
2547 * trans-io.c (add_case): Likewise.
2548 * trans-stmt.c (gfc_trans_integer_select): Likewise.
2550 2004-01-23 Paul Brook <paul@codesourcery.com>
2551 Steven G. Kargl <kargls@comcast.net>
2554 * arith.c (gfc_convert_real): Remove sign handling.
2555 * primary.c (match_digits): Allow whitespace after initial sign.
2556 (match_real_const): Handle signs here. Allow whitespace after
2557 initial sign. Remove dead code.
2558 (match_const_complex_part): Remove.
2559 (match_complex_part): Use match_{real,integer}_const.
2560 (match_complex_constant): Cross-promote integer types.
2562 2005-01-23 James A. Morrison <phython@gcc.gnu.org>
2565 * iresolve.c (gfc_resolve_transpose): Resolve to transpose_c4 or
2566 transpose_c8 for complex types.
2568 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
2570 * data.c, dependency.c, f95-lang.c, io.c, trans-array.c,
2571 trans-decl.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
2572 trans-stmt.c, trans-types.c, trans.h: Fix comment typos.
2573 Follow spelling conventions.
2575 2005-01-22 Bud Davis <bdavis9659@comcast.net>
2578 * trans-io.c (gfc_trans_inquire): Added code to support
2581 2005-01-22 Steven G. Kargl <kargls@comcast.net>
2583 * intrinsic.c (make_alias): Add standard argument.
2584 (add_functions): Update make_alias calls.
2586 2005-01-22 Paul Brook <paul@codesourcery.com>
2588 * trans-expr.c (gfc_conv_function_call): Remove bogus TODO.
2590 2005-01-22 Paul Brook <paul@codesourcery.com>
2592 * gfortran.h (gfc_check_access): Add prototype.
2593 * match.c (gfc_match_namelist): Remove TODO.
2594 * module.c (check_access): Rename ...
2595 (gfc_check_access): ... to this. Boolify. Update callers.
2596 * resolve.c (resolve_symbol): Check for private objects in public
2599 2005-01-22 Paul Brook <paul@codesourcery.com>
2601 * primary.c (gfc_match_rvalue): Only apply implicit type if variable
2602 does not have an explicit type.
2603 (gfc_match_variable): Resolve implicit derived types in all cases.
2604 Resolve contained function types from their own namespace, not the
2606 * resolve.c (resolve_contained_fntype): Remove duplicate sym->result
2607 checking. Resolve from the contained namespace, not the parent.
2609 2005-01-22 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2612 * trans-const.c (gfc_conv_constant_to_tree): Give logical
2613 constants the correct type.
2616 * trans-io.c (ADD_STRING): Use gfc_charlen_type_node for string
2618 (gfc_build_io_library_fndecls): 'rec' and 'recl_in' are not
2621 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
2623 * arith.c, array.c, check.c, decl.c, expr.c, f95-lang.c,
2624 gfortran.h, interface.c, intrinsic.c, io.c, iresolve.c,
2625 match.c, matchexp.c, misc.c, module.c, options.c, parse.c,
2626 scanner.c, simplify.c, symbol.c, trans-array.c, trans-expr.c,
2627 trans-io.c, trans-stmt.c, trans.c: Update copyright.
2629 2005-01-17 Ira Rosen <irar@il.ibm.com>
2631 * f95-lang.c (gfc_init_builtin_functions): Call targetm.init_builtins.
2633 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2636 * error.c (error_char): Line-buffer errors / warnings.
2638 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2640 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Fix signed /
2641 unsigned issue. Use build_int_cst instead of converting
2642 integer_zero_node. Remove unnecessary conversion.
2644 * trans-types.c (gfc_get_character_type_len): Use
2645 gfc_charlen_type_node as basic type for the range field.
2647 * trans-intrinsic.c (build_fixbound_expr,
2648 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_anyall,
2649 gfc_conv_intrinsic_count, gfc_conv_intrinsic_btest,
2650 gfc_conv_intrinsic_singlebitop): Use 'build_int_cst' instead
2651 of converting 'integer_zero_node' or 'integer_one_node'
2653 (gfc_conv_intrinsic_ishftc): Same, but store in local variable to
2655 (gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_rrspacing,
2656 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_iargc): Use
2657 'build_int_cst' instead of converting 'integer_zero_node' or
2658 'integer_one_node' respectively.
2660 * trans-intrinsic.c (gfc_conv_intrinsic_index,
2661 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove
2662 'gfc'-prefix from local variable, remove dead code, use correct
2663 type when inserting argument.
2665 * trans-intrinsic.c, trans-types.c: Update copyright years.
2667 2005-01-16 Steven G. Kargl <kargls@comcast.net>
2670 * resolve.c (check_case_overlap): Typo in comment.
2671 (validate_case_label_expr): Fix up kinds of case values
2672 (resolve_select): Properly handle kind mismatches.
2674 2004-01-16 Paul Brook <paul@codesourcery.com>
2677 * trans-common.c (translate_common): Remove duplicate function call.
2678 (finish_equivalences): Preserve alignment when biasing offsets.
2680 2005-01-15 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de
2682 * primary.c (check_digit): Call 'ISXDIGIT' instead of assuming
2683 ASCII-like character encoding.
2685 2005-01-14 Steven G. Kargl <kargls@comcast.net>
2687 * resolve.c (compare_case): Cleanup.
2689 2005-01-14 Steven G. Kargl <kargls@comcast.net>
2691 * resolve.c (compare_case): Give arguments correct type.
2693 2005-01-13 Kazu Hirata <kazu@cs.umass.edu>
2695 * iresolve.c, trans-common.c, trans-types.c: Fix comment
2698 2005-01-09 Paul Brook <paul@codesourcery.com>
2701 * trans-common.c (current_common, current_offset): Remove.
2702 (create_common): Add head argument.
2703 (align_segment): New function.
2704 (apply_segment_offset): New function.
2705 (translate_common): Merge code from new_segment. Handle alignment.
2706 (new_segment): Remove.
2707 (finish_equivalences): Ensure proper alignment.
2709 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2711 * trans-const.c: Don't include unused math.h.
2713 * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl,
2714 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_minmaxloc,
2715 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_len): Remove
2716 trailing whitespace.
2717 (prepare_arg_info): Fix formatting, indenting and remove trailing
2719 (gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_trim): Remove
2720 trailing whitespace.
2722 * arith.c (arctangent2, gfc_arith_init_1, gfc_arith_done_1,
2723 gfc_constant_result, gfc_range_check, gfc_arith_power,
2724 eval_type_intrinsic0, eval_intrinsic_f2, gfc_real2real,
2725 gfc_real2complex, gfc_complex2int, gfc_complex2real,
2726 gfc_complex2complex): Fix whitespace issues.
2727 * check.c (must_be, type_check, numeric_check, int_or_real_check,
2728 logical_array_check, array_check, scalar_check, nonoptional_check,
2729 variable_check, dim_check, check_a_kind, gfc_check_a_ikind,
2730 gfc_check_a_xkind, gfc_check_abs, gfc_check_all_any,
2731 gfc_check_allocated, gfc_check_a_p, gfc_check_besn,
2732 gfc_check_btest, gfc_check_char, gfc_check_cmplx, gfc_check_count,
2733 gfc_check_cshift, gfc_check_dcmplx, gfc_check_dble,
2734 gfc_check_digits, gfc_check_dot_product, gfc_check_eoshift,
2735 gfc_check_fnum, gfc_check_g77_math1, gfc_check_huge, gfc_check_i,
2736 gfc_check_iand, gfc_check_ibclr, gfc_check_ibits, gfc_check_ibset,
2737 gfc_check_idnint, gfc_check_ieor, gfc_check_index, gfc_check_int,
2738 gfc_check_ior, gfc_check_ishft, gfc_check_ishftc, gfc_check_kind,
2739 gfc_check_lbound, gfc_check_logical, min_max_args,
2740 gfc_check_min_max_integer, gfc_check_min_max_real,
2741 gfc_check_min_max_double, gfc_check_matmul,
2742 gfc_check_minval_maxval, gfc_check_merge, gfc_check_nearest,
2743 gfc_check_pack, gfc_check_precision, gfc_check_radix,
2744 gfc_check_range, gfc_check_real, gfc_check_repeat,
2745 gfc_check_scale, gfc_check_scan, gfc_check_selected_real_kind,
2746 gfc_check_set_exponent): Fix formatting issues.
2747 (gfc_check_size, gfc_check_sign): Alphabetize function order,
2748 remove whitespace-only line.
2749 (gfc_check_fstat, gfc_check_fstat_sub, gfc_check_stat,
2750 gfc_check_stat_sub, gfc_check_transfer, gfc_check_transpose,
2751 gfc_check_ubound, gfc_check_unpack, gfc_check_verify, gfc_check_x,
2752 gfc_check_cpu_time, gfc_check_date_and_time, gfc_check_mvbits,
2753 gfc_check_random_number, gfc_check_random_seed,
2754 gfc_check_second_sub, gfc_check_system_clock,
2755 gfc_check_getcwd_sub, gfc_check_exit, gfc_check_flush,
2756 gfc_check_umask, gfc_check_umask_sub, gfc_check_unlink,
2757 gfc_check_unlink_sub): Fix formatting issues.
2759 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2761 * gfortran.h: Remove outdated comment. Don't include stdio.h
2764 2005-01-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2766 * gfortranspec.c (lang_specific_driver): Change year to 2005 in
2767 output of 'gfortran --version'.
2769 2005-01-03 Steven G. Kargl <kargls@comcast.net>
2771 * arith.c: Add system.h; remove string.h
2777 * check.c: Remove stdlib.h and stdarg.h
2778 * error.c: Remove stdlib.h, stdarg.h, stdio.h, string.h
2779 * expr.c: Add system.h; remove stdarg.h, stdio.h, and string.h
2780 * f95-lang.c: Add system.h; remove stdio.h
2781 * interface.c: Add system.h; remove stdlib.h and string.h
2782 * intrinsic.c: Remove stdarg.h, stdio.h, and string.h
2783 * io.c: Remove string.h
2785 * match.c: Remove stdarg.h and string.h
2786 * misc.c: Update copyright; add system.h; remove stdlib.h,
2787 string.h, and sys/stat.h
2788 * module.c: Add system.h; remove string.h, stdio.h, errno.h,
2789 unistd.h, and time.h
2790 * option.c: Remove string.h and stdlib.h
2792 * scanner.c: Update copyright; add system.h; remove stdlib.h,
2793 stdio.h, string.h, and strings.h
2794 * symbol.c: Add system.h; remove stdlib.h, stdio.h, and string.h
2795 * trans-array.c: Remove stdio.h and gmp.h
2796 * trans-const.c: Ditto
2797 * trans-expr.c: Ditto
2799 * trans-stmt.c: Ditto
2801 * trans-intrinsic.c: Remove stdio.h and string.h
2803 2004-12-29 Steven G. Kargl <kargls@comcast.net>
2805 * gfortran.h (gfc_case): fix typo in comment.
2807 2004-12-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2809 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Change to
2810 logical shift. Call fold. Remove 0-bit shift shortcut.
2811 (gfc_conv_intrinsic_ishftc): Convert first argument to at least
2812 4 bytes bits. Convert 2nd and 3rd argument to 4 bytes. Convert
2813 result if width(arg 1) < 4 bytes. Call fold.
2816 * trans-intrinsic.c (gfc_conv_intrinsic_mod): Update comment
2817 in front of function to match the standard. Correct handling
2820 2004-12-27 Andrew Pinski <pinskia@physics.uc.edu>
2822 * trans-expr.c (gfc_conv_cst_int_power): Only check for
2823 flag_unsafe_math_optimizations if we have a float type.
2825 2004-12-23 Steven G. Kargl <kargls@comcast.net>
2827 * gfortran.texi: Fix typo.
2829 2004-12-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2831 * trans-intrinsic.c (build_fixbound_expr): Clarify comment, fix
2834 2004-12-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2837 * match.c (gfc_match_if): Don't explicitly skip optional whitespace.
2838 (gfc_match_nullify): Make sure that ')' is in front of the end of
2841 * scanner.c (skip_fixed_comments): Fix typo in comment preceding
2844 2004-12-14 Richard Henderson <rth@redhat.com>
2846 * gfortran.h (gfc_expr.function.name): Make const.
2847 (gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
2848 (gfc_get_string): Update prototype.
2849 * iresolve.c: Include tree.h.
2850 (string_node, HASH_SIZE, string_head, hash): Remove.
2851 (gfc_get_string): Use vsnprintf, get_identifier.
2852 (free_strings, gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
2853 * misc.c (gfc_init_1): Don't call gfc_iresolve_init_1.
2854 (gfc_done_1): Don't call gfc_iresolve_done_1.
2855 * module.c (mio_allocated_string): Take and return const char *,
2856 instead of modifying char**.
2857 (mio_expr): Update to match.
2858 * resolve.c (pure_function): Constify name argument.
2859 (resolve_function): Constify name.
2860 * trans-intrinsic.c (gfc_conv_intrinsic_function): Likewise.
2862 2004-12-12 Richard Henderson <rth@redhat.com>
2864 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
2865 gfc_resolve_cshift, gfc_resolve_dot_product, gfc_resolve_eoshift,
2866 gfc_resolve_matmul, gfc_resolve_maxloc, gfc_resolve_maxval,
2867 gfc_resolve_minloc, gfc_resolve_minval, gfc_resolve_pack,
2868 gfc_resolve_product, gfc_resolve_reshape, gfc_resolve_shape,
2869 gfc_resolve_spread, gfc_resolve_sum, gfc_resolve_transpose,
2870 gfc_resolve_unpack: Use PREFIX.
2872 2004-12-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2875 * match.c (gfc_match_common): Skip whitespace.
2877 2004-12-12 Steven G. Kargl <kargls@comcast.net>
2880 * check.c (gfc_check_iand, gfc_check_ibclr, gfc_check_ibits,
2881 gfc_check_ibset, gfc_check_ieor, gfc_check_ior): Remove default
2882 integer kind check; Issue error for -std=f95 when needed.
2883 * intrinsic.c (add_functions): Change ieor from GFC_STD_GNU to
2885 * iresolve.c (gfc_resolve_iand, gfc_resolve_ieor, gfc_resolve_ior):
2886 Promote arguments to same kind.
2888 2004-12-12 Steven G. Kargl <kargls@comcast.net>
2889 Paul Brook <paul@codesourcery.com>
2892 * resolve.c (gfc_resolve_iterator_expr): New function.
2893 (gfc_resolve_iterator): Use it. Add real_ok argument. Convert
2894 start, end and stride to correct type.
2895 (resolve_code): Pass extra argument.
2896 * array.c (resolve_array_list): Pass extra argument.
2897 * gfortran.h (gfc_resolve): Add prototype.
2898 * trans-stmt.c (gfc_trans_do): Remove redundant type conversions.
2899 Handle real type iterators.
2901 2004-12-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2904 * iresolve.c (gfc_resolve_scale): Convert 'I' argument if not of
2905 same kind as C's 'int'.
2906 (gfc_resolve_set_exponent): Convert 'I' argument if not of kind 4.
2908 2004-12-08 Richard Henderson <rth@redhat.com>
2910 * intrinsic.c (gfc_convert_type_warn): Propagate the input shape
2911 to the output expression.
2912 * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift): Suppress
2914 (gfc_resolve_reshape): Force convert SHAPE and ORDER parameters
2917 2004-12-08 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2920 * resolve.c (resolve_code): Impose correct restrictions on
2923 * decl.c (gfc_match_end): Use locus of END when eos is an error.
2925 2004-12-02 Steven G. Kargl <kargls@comcast.net>
2926 Paul Brook <paul@codesourcery.com>
2928 * check.c (gfc_check_flush, gfc_check_fnum): New functions.
2929 (gfc_check_fstat, gfc_check_fstat_sub): New functions.
2930 (gfc_check_stat, gfc_check_stat_sub): New functions.
2931 * gfortran.h (GFC_ISYM_FNUM,GFC_ISYM_FSTAT,GFC_ISYM_STAT): New symbols
2932 * intrinsic.c (add_functions,add_subroutines): Add flush, fnum,
2933 fstat, and stat to intrinsics symbol tables.
2934 * intrinsic.h (gfc_check_flush, gfc_resolve_stat_sub): Add prototypes.
2935 (gfc_resolve_fstat_sub, gfc_resolve_stat): Ditto.
2936 * iresolve.c (gfc_resolve_fnum, gfc_resolve_fstat): New functions.
2937 (gfc_resolve_stat, gfc_resolve_flush): New functions.
2938 (gfc_resolve_stat_sub,gfc_resolve_fstat_sub): New functions
2939 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add new intrinsics.
2941 2004-12-02 Steven G. Kargl <kargls@comcast.net>
2943 * intrinsic.c: Fix and add comments, fix function declarations
2944 (OPTIONAL,REQUIRED): New symbols
2945 (add_functions,add_subroutines): Use symbols
2946 (gmp.h): Remove unused include
2948 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
2950 * f95-lang.c, gfortranspec.c, trans-decl.c: Avoid ` as left quote
2953 2004-11-24 Steven Bosscher <stevenb@suse.de>
2955 * options.c (gfc_post_options): Don't clear flag_inline_functions.
2957 2004-11-20 Steven G. Kargl <kargls@comcast.net>
2959 * check.c (gfc_check_getcwd_sub): Fix seg fault.
2961 * check.c (gfc_check_exit,gfc_check_umask,gfc_check_umask_sub,
2962 gfc_check_unlink,gfc_check_unlink_sub): New functions
2963 * gfortran.h (GFC_ISYM_UMASK,GFC_ISYM_UNLINK): New symbols
2964 * intrinsic.c (add_functions,add_subroutines): Add umask, unlink,
2965 exit to intrinsics symbol tables.
2966 * intrinsic.h (gfc_check_umask,gfc_check_unlink,gfc_check_exit,
2967 gfc_check_umask_sub,gfc_check_unlink_sub,gfc_resolve_umask,
2968 gfc_resolve_unlink,gfc_resolve_exit,gfc_resolve_umask_sub,
2969 gfc_resolve_unlink_sub): Add and sort prototypes.
2970 * iresolve.c (gfc_resolve_umask,gfc_resolve_unlink,gfc_resolve_exit,
2971 gfc_resolve_umask_sub,gfc_resolve_unlink_sub): New functions
2972 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbols
2974 2004-11-16 Paul Brook <paul@codesourcery.com>
2977 * trans-array.c (gfc_trans_allocate_temp_array): Use gfc_get_dtype.
2978 (gfc_array_init_size, gfc_conv_expr_descriptor): Ditto.
2979 * trans-types.c (gfc_get_dtype): Accept array type rather than element
2981 (gfc_get_nodesc_array_type): Don't set GFC_TYPE_ARRAY_DTYPE.
2982 (gfc_get_array_type_bounds): Ditto.
2983 (gfc_get_derived_type): Recurse into derived type pointers.
2984 * trans-types.h (gfc_get_dtype): Add prototype.
2985 * trans.h (GFC_TYPE_ARRAY_DTYPE): Add comment.
2987 2004-11-15 Paul Brook <paul@codesourcery.com>
2989 * trans-types.c (gfc_get_dtype): Remove obsolete TODO.
2991 2004-11-10 Paul Brook <paul@codesourcery.com>
2994 * trans-expr.c (gfc_trans_subarray_assign): Free shape before ss.
2995 * trans-io.c (transfer_array_component): Ditto.
2997 2004-11-10 Paul Brook <paul@codesourcery.com>
2999 * invoke.texi: Fix typo.
3001 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
3003 * arith.c, array.c, decl.c, expr.c, f95-lang.c, gfortran.h,
3004 gfortranspec.c, interface.c, intrinsic.c, iresolve.c, match.c,
3005 module.c, parse.c, parse.h, primary.c, resolve.c, scanner.c,
3006 trans-array.c, trans-array.h, trans-expr.c, trans-intrinsic.c,
3007 trans-io.c, trans-stmt.c, trans.h: Fix comment formatting.
3009 2004-11-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3012 * io.c (resolve_tag): Tighten up exception for assigned FORMAT.
3014 2004-11-06 Kazu Hirata <kazu@cs.umass.edu>
3016 * gfortranspec.c: Replace GNU CC with GCC.
3018 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3020 * gfortranspec.c (lang_specific_driver): Change year to 2004.
3022 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3025 * trans-decl.c (create_function_arglist): Set DECL_ARTIFICIAL for
3028 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3031 * trans-decl.c (gfc_finish_var_decl): Don't declare arguments to
3032 module procedures as if they were module variables.
3034 2004-11-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3039 * module.c (write_symbol1): Set module_name for dummy arguments.
3041 2004-11-02 Paul Brook <paul@codesourcery.com>
3043 * intrinsic.c (check_intrinsic_standard): Include error locus.
3045 (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Pass
3046 locus to check_intrinsic_standard.
3048 2004-10-31 Janne Blomqvist <jblomqvi@cc.hut.fi>
3051 * gfortran.h: Change GFC_STD_* flags to more appropriate
3052 ones. (struct gfc_intrinsic_isym): Add field for standard. (struct
3053 gfc_option_t): Add field for warning about use of nonstandard
3055 * intrinsic.c (add_sym): Add parameter for standard version, check
3056 this against current standard.
3057 (add_sym_0): Pass standard parameter to add_sym.
3058 (add_sym_1, add_sym_0s, add_sym_1s, add_sym_1m, add_sym_2): Ditto.
3059 (add_sym_2s, add_sym_3, add_sym_3ml, add_sym_3red, add_sym_3s): Ditto.
3060 (add_sym_4, add_sym_4s, add_sym_5, add_sym_5s): Ditto.
3061 (make_generic): Add parameter for standard, check this
3062 against currently selected standard.
3063 (add_functions, add_subroutines): Add parameter to tell which
3064 standard an intrinsic belongs to.
3065 (check_intrinsic_standard): New function.
3066 (gfc_intrinsic_func_interface): Add call to check_intrinsic_standard.
3067 (gfc_intrinsic_sub_interface): Ditto.
3068 * lang.opt: Add Wnonstd-intrinsics option.
3069 * options.c (gfc_init_options): Change to use new GFC_STD_* flags,
3071 (set_Wall): Add warning about nonstd intrinsics.
3072 (gfc_handle_option): Change to use new GFC_STD_* flags,
3074 * invoke.texi: Update manual to include -Wnonstd-intrinsics.
3076 2004-10-30 Andrew Pinski <pinskia@physics.uc.edu>
3078 * f95-lang.c (lang_tree_node): Add chain_next to be the TREE_CHAIN.
3080 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3082 * simplify.c (twos_complement): Calculate mask in GMP arithmetic.
3084 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3086 * trans.c (gfc_trans_code): Set global locus after recursing. Fix
3089 2004-10-30 Canqun Yang <canqun@nudt.edu.cn>
3091 * check.c (gfc_check_rand): Allow missing optional argument.
3092 (gfc_check_irand): Ditto.
3093 * intrinsic.c (add_functions): Set arg optional flag for {i,}rand.
3095 2004-10-28 Scott Robert Ladd <scott.ladd@coyotegulch.com>
3097 PR fortran/13490, PR fortran/17912
3098 * gcc/fortran/gfortran.h: Added pedantic_min_int to gfc_integer_info
3099 * gcc/fortran/gfortran.h: Added ARITH_ASYMMETRIC to arith
3100 * gcc/fortran/arith.c: Added support for an "asymmetric integer"
3101 warning when compiling with pedantic.
3102 * gcc/fortran/arith.c: Set minimum integer values to reflect
3103 realities of two's complement signed integers. Added
3106 2004-10-17 Andrew Pinski <pinskia@physics.uc.edu>
3108 * Make-lang.in (F95_ADDITIONAL_OBJS): Kill.
3109 (f951): Do not depend on F95_ADDITIONAL_OBJS and don't
3112 2004-10-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3114 * trans-decl.c (generate_local_decl): Simplify logic, fix comment
3116 (gfc_generate_function_code): Fix formatting issue.
3118 2004-10-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3120 * module.c: Fix formatting issues.
3122 2004-10-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3124 * module.c (mio_interface_rest): Set where member of interface
3127 2004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
3130 * options.c (gfc_handle_option): Add break after handing the
3133 2004-10-08 Tobias Schlueter <tobias.shclueter@physik.uni-muenchen.de>
3135 * arith.c: Fix formatting issues.
3137 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3140 * resolve.c (resolve_operator): Use correct operator name in message.
3142 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3144 * primary.c (match_boz_constant): Allow kind parameter suffixes.
3145 Move standard warning further to the front.
3147 2004-10-07 Kazu Hirata <kazu@cs.umass.edu>
3149 * trans-stmt.c: Fix a comment typo.
3151 2004-10-07 Paul Brook <paul@codesourcery.com>
3154 * trans-array.c (gfc_trans_deferred_array): Leave use associated
3157 2004-10-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3160 * simplify.c (twos_complement): New function.
3161 (gfc_simplify_ishft, gfc_simplify_ishftc): Revise.
3163 * simplify.c (gfc_simplify_abs): Use mpfr_hypot for CABS.
3165 2004-10-06 Paul Brook <paul@codesourcery.com>
3167 * trans-stmt.c (gfc_trans_simple_do): New function.
3168 (gfc_trans_do): Use it. Evaluate iteration bounds before entering
3169 loop. Update comments.
3171 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3174 * iresolve.c (gfc_resolve_pack): Choose function depending if mask
3178 * intrinsic.c (add_sym_5): Remove.
3179 (add_subroutines): Add resolution function for MVBITS.
3180 * intrinsic.h (gfc_resolve_mvbits): Declare resolution function for
3182 * iresolve.c (gfc_resolve_mvbits): New function.
3183 (gfc_resolve_random_number): Remove empty line at end of function.
3185 * trans-const.c (gfc_build_cstring_const): New function.
3186 (gfc_init_cst): Use new function.
3187 * trans-const.h (gfc_build_cstring_const): Add prototype.
3188 * trans-io.c (set_string, set_error_locus): Use new function.
3189 * trans-stmt.c (gfc_trans_goto): Use new function.
3192 * parse.c (accept_statement): Don't treat END DO like END IF and
3194 (parse_do_block): Generate possible END DO label inside END DO
3198 * check.c (gfc_check_system_sub): New function.
3199 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SYSTEM.
3200 * intrinsic.c (add_functions): Add 'system'.
3201 (add_subroutines): Add 'system'.
3202 * intrinsic.h (gfc_check_etime_sub, gfc_check_getcwd_sub):
3203 Move prototypes to other suborutines.
3204 (gfc_check_system_sub, gfc_resolve_system, gfc_resolve_system_sub):
3206 (gfc_resolve_system_clock): Fix formatting of prototype.
3207 * iresolve.c (gfc_resolve_system, gfc_resolve_system_sub): New
3209 * trans-intrinsic.c (gfc_conv_intrinsic_function): Deal with
3212 2004-10-04 Erik Schnetter <schnetter@aei.mpg.de>
3214 * scanner.c (preprocessor_line): Accept preprocessor lines without
3215 file names. Check file names for closing quotes. Handle escaped
3216 quotes in file names.
3218 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3219 Paul Brook <paul@codesourcery.com>
3221 * trans-array.c (gfc_conv_expr_descriptor): Check for substriungs.
3222 Use gfc_get_expr_charlen.
3223 * trans-expr.c (gfc_get_expr_charlen): New function.
3224 * trans.h (gfc_get_expr_charlen): Add prototype.
3226 2004-10-04 Kazu Hirata <kazu@cs.umass.edu>
3228 * trans-intrinsic.c: Fix a comment typo.
3230 2004-10-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3232 * simplify.c (range_check): Remove blank line at beginning of function.
3233 (gfc_simplify_dint): Same at end of function.
3234 (gfc_simplify_exponent, gfc_simplify_fraction): Simplify calculations.
3235 (gfc_simplify_bound): Fix indentation.
3236 (gfc_simplify_log10): Simplify calculation.
3237 (gfc_simplify_min, gfc_simplify_max): Remove blank line at beginning
3239 (gfc_simplify_nearest): Same at end of function.
3240 (gfc_simplify_nint, gfc_simplify_idnint): Same at beginning of
3242 (gfc_simplify_rrspacing, gfc_simplify_set_exponent,
3243 gfc_simplify_spacing): Simplify calulations.
3245 2004-10-03 Feng Wang <fengwang@nudt.edu.cn>
3247 * trans-intrinsic.c: Fix comments on spacing and rrspacing
3248 (gfc_conv_intrinsic_rrspacing): Add fold on constant trees.
3250 2004-10-01 Jan Hubicka <jh@suse.cz>
3252 * f95-lang.c (gfc_expand_function): Update call of
3253 tree_rest_of_compilation.
3254 * trans-decl.c (gfc_generate_constructors): Likewise.
3256 2004-09-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3258 * trans-intrinsic.c: Comment fixes.
3260 2004-09-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3262 * decl.c (add_init_expr_to_sym, variable_decl): Comment fixes.
3264 2004-09-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3266 * trans-types.c (gfc_return_by_reference): Remove superfluous
3269 * intrinsic.h (gfc_resolve_getcwd): Update prototype.
3270 * iresolve.c (gfc_resolve_getcwd): Add second argument to function.
3273 * trans-expr.c (gfc_trans_arrayfunc_assign): Look at resolved
3274 function to determine return type.
3276 2004-09-20 Jan Hubicka <jh@suse.cz>
3278 * trans-decl.c (build_entry_thunks): Finalize the function; do not lower
3280 (gfc_generate_function_code): Likewise.
3282 2004-09-20 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3285 * simplify.c (gfc_simplify_reshape): Set shape of return value
3288 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
3289 Zack Weinberg <zack@codesourcery.com>
3291 * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class
3292 enumeration constants.
3294 2004-09-17 Paul Brook <paul@codesourcery.com>
3296 * gfortran.h (struct gfc_linebuf): Don't use C99 empty arrays.
3297 (gfc_linebuf_header_size): Define.
3298 * scanner.c (load_file): Use it.
3300 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
3302 * array.c, data.c, decl.c, dependency.c, error.c, f95-lang.c,
3303 interface.c, intrinsic.c, io.c, misc.c, module.c, parse.h,
3304 resolve.c, scanner.c, trans-array.c, trans-array.h,
3305 trans-common.c, trans-const.h, trans-decl.c, trans-expr.c,
3306 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
3307 trans.h: Fix comment typos. Follow spelling conventions.
3309 2004-09-16 Victor Leikehman <lei@il.ibm.com>
3312 * trans-io.c (transfer_array_component): New function.
3313 (transfer_expr): For array fields, call transfer_array_component.
3315 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
3317 * gfortran.texi: Fix a typo.
3319 2004-09-15 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
3321 * parse.c (eof_buf): Rename eof to eof_buf.
3322 (unexpected_eof): Same.
3323 (gfc_parse_file): Same.
3325 2004-09-15 Steven G. Kargl <kargls@comcast.net>
3327 * check.c (gfc_check_getcwd_sub): New function.
3328 * gfortran.h (GFC_ISYM_GETCWD): New symbol.
3329 * intrinsic.c (add_functions): Add function definition;
3331 * intrinsic.c (add_subroutines): Add subroutine definitions.
3332 * intrinsic.h: Add prototypes.
3333 * iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub):
3335 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol.
3337 2004-09-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3340 * module.c (write_symbol): Don't fill in module name here.
3341 (write_symbol0): Fill in here instead.
3343 2004-09-14 Kazu Hirata <kazu@cs.umass.edu>
3345 * data.c, decl.c, f95-lang.c, gfortran.h, match.c,
3346 trans-array.c, trans-common.c, trans-expr.c,
3347 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.h: Fix
3348 comment typos. Follow spelling conventions.
3350 2004-09-09 Paul Brook <paul@codesourcery.com>
3352 * scanner.c (get_file): Add ATTRIBUTE_UNUSED.
3354 2004-09-08 Paul Brook <paul@codesourcery.com>
3356 * array.c: Don't include assert.h.
3357 * data.c: Don't include assert.h. Replace assert and abort with
3358 gcc_assert and gcc_unreachable.
3359 * dependency.c: Ditto.
3360 * f95-lang.c: Ditto.
3361 * iresolve.c: Ditto.
3363 * simplify.c: Ditto.
3365 * trans-array.c: Ditto.
3366 * trans-common.c: Ditto.
3367 * trans-const.c: Ditto.
3368 * trans-decl.c: Ditto.
3369 * trans-expr.c: Ditto.
3370 * trans-intrinsic.c: Ditto.
3371 * trans-io.c: Ditto.
3372 * trans-stmt.c: Ditto.
3373 * trans-types.c: Ditto.
3376 2004-09-07 Per Bothner <per@bothner.com>
3377 Paul Brook <paul@codesourcery.com>
3379 * error.c (show_locus): Handle mapped locations.
3380 * f95-lang.c (gfc_be_parse_file): Initialize mapped locations.
3381 * gfortran.h: Include input.h.
3382 (struct gfc_linebuf): Use source_location.
3383 * scanner.c (get_file): Initialize linemap.
3384 (preprocessor_line): Pass extra argument to get_file.
3385 (load_file): Ditto. Setup linemap.
3386 (gfc_new_file): Handle mapped locations.
3387 * trans-common.c (build_field, build_equiv_decl, build_common_decl):
3388 Set decl source locations.
3389 (gfc_trans_common): Set blank common block location.
3390 * trans-decl.c (gfc_set_decl_location): New function.
3391 (gfc_get_label_decl, gfc_get_symbol_decl): Use it.
3392 (trans_function_start): Move call to gfc_set_backend_locus..
3393 (build_function_decl): ... to here.
3394 (build_entry_thunks): Set and restore the backend locus.
3395 (gfc_generate_constructors): Remove excess arguments to
3396 init_function_start.
3397 (gfc_generate_block_data): Add comments. Set the decl locus.
3398 * trans-io.c (set_error_locus): Handle mapped locations.
3399 * trans.c (gfc_get_backend_locus, gfc_get_backend_locus): Ditto.
3400 (gfc_trans_code): Use SET_EXPR_LOCATION.
3401 (gfc_generate_code): Override the location of the new symbol.
3402 * trans.h (gfc_set_decl_location): Add prototype.
3404 2004-08-31 Paul Brook <paul@codesourcery.com>
3406 * trans-types.c (gfc_type_for_mode): Return NULL for unknown modes.
3408 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3411 * trans-intrinsic.c (gfc_conv_intrinsic_merge): Do the right thing for
3414 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3419 * resolve.c (resolve_transfer): New function.
3420 (resolve_code): Call resolve_transfer in case of EXEC_TRANSFER.
3422 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3425 * trans-types.c (gfc_init_types): Make gfc_character1_type_node an
3428 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3430 * CONTRIB, NEWS, README, TODO: Remove obsolete files.
3432 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3435 * trans-types.c (gfc_return_by_reference): Remove TODO error,
3436 add comment pointing out possible issue WRT compatibility with g77.
3438 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3440 * trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace
3441 all occurences of 'gfc_strlen_type_node' by
3442 'gfc_charlen_type_node'.
3443 * trans-types.h: Same. Also update comment accordingly.
3445 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3447 * primary.c: Update copyright boilerplate to say GCC.
3448 * f95-lang.c: Change initial comment to say gfortran.
3450 2004-08-31 Paul Brook <paul@codesourcery.com>
3452 * trans-types.h: Add comments.
3453 (intmax_type_node, string_type_node, const_string_type_node): Remove.
3455 2004-08-30 Richard Henderson <rth@redhat.com>
3457 * Make-lang.in (fortran/f95-lang.o): Update dependencies.
3458 (fortran/trans-decl.o, fortran/trans-types.o): Likewise.
3459 * gfortran.h (gfc_integer_info): Add c_char, c_short, c_int,
3460 c_long, c_long_long.
3461 (gfc_logical_info): Add c_bool.
3462 (gfc_real_info): Add mode_precision, c_float, c_double, c_long_double.
3463 * trans-array.c (gfc_array_allocate): Use TYPE_PRECISION
3464 rather than gfc_int[48]_type_node for allocate choice.
3465 * trans-decl.c (gfc_build_intrinsic_function_decls): Cache
3466 local copies of some kind type nodes.
3467 (gfc_build_builtin_function_decls): Likewise.
3468 * trans-expr.c (gfc_conv_power_op): Likewise.
3469 * trans-intrinsic.c (gfc_conv_intrinsic_index,
3470 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify,
3471 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Likewise.
3472 * trans-stmt.c (gfc_trans_pause, gfc_trans_stop,
3473 gfc_trans_character_select, gfc_trans_allocate): Likewise.
3474 * trans-io.c (gfc_pint4_type_node): Move into ...
3475 (gfc_build_io_library_fndecls): ... here. Cache local copies of
3476 some kind type nodes.
3477 * trans-types.c (gfc_type_nodes): Remove.
3478 (gfc_character1_type_node, gfc_strlen_type_node): New.
3479 (gfc_integer_types, gfc_logical_types): New.
3480 (gfc_real_types, gfc_complex_types): New.
3481 (gfc_init_kinds): Fill in real mode_precision.
3482 (gfc_build_int_type, gfc_build_real_type): New.
3483 (gfc_build_complex_type, gfc_build_logical_type): New.
3484 (c_size_t_size): New.
3485 (gfc_init_types): Loop over kinds.
3486 (gfc_get_int_type, gfc_get_real_type): Use gfc_validate_kind.
3487 (gfc_get_complex_type, gfc_get_logical_type): Likewise.
3488 (gfc_get_character_type_len): Likewise.
3489 (gfc_type_for_size): Loop over kinds; use a reduced set of
3490 unsigned type nodes.
3491 (gfc_type_for_mode): Loop over kinds.
3492 (gfc_signed_or_unsigned_type): Use gfc_type_for_size.
3493 (gfc_unsigned_type, gfc_signed_type): Use gfc_signed_or_unsigned_type.
3494 * trans-types.h (F95_INT1_TYPE, F95_INT2_TYPE, F95_INT4_TYPE,
3495 F95_INT8_TYPE, F95_INT16_TYPE, F95_REAL4_TYPE, F95_REAL8_TYPE,
3496 F95_REAl16_TYPE, F95_COMPLEX4_TYPE, F95_COMPLEX8_TYPE,
3497 F95_COMPLEX16_TYPE, F95_LOGICAL1_TYPE, F95_LOGICAL2_TYPE,
3498 F95_LOGICAL4_TYPE, F95_LOGICAL8_TYPE, F95_LOGICAL16_TYPE,
3499 F95_CHARACTER1_TYPE, NUM_F95_TYPES, gfc_type_nodes,
3500 gfc_int1_type_node, gfc_int2_type_node, gfc_int4_type_node,
3501 gfc_int8_type_node, gfc_int16_type_node, gfc_real4_type_node,
3502 gfc_real8_type_node, gfc_real16_type_node, gfc_complex4_type_node,
3503 gfc_complex8_type_node, gfc_complex16_type_node,
3504 gfc_logical1_type_node, gfc_logical2_type_node,
3505 gfc_logical4_type_node, gfc_logical8_type_node,
3506 gfc_logical16_type_node, gfc_strlen_kind): Remove.
3507 (gfc_character1_type_node): Turn in to a variable.
3508 (gfc_strlen_type_node): Likewise.
3510 2004-08-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3512 * gfortran.h (gfc_namespace): Add new field is_block_data.
3513 * parse.c (accept_statement): Remove special handling for BLOCK DATA.
3514 (parse_block_data): Record BLOCK DATA name, set is_block_data field.
3515 * trans.c (gfc_generate_code): Handle BLOCK DATA units.
3516 * trans.h (gfc_generate_block_data): Add prototype.
3517 * trans-decl.c (gfc_generate_block_data): New function.
3519 2004-08-29 Richard Henderson <rth@redhat.com>
3521 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_export.
3522 * trans-types.c (gfc_init_kinds): Reject integer kinds larger
3523 than two HOST_WIDE_INT.
3525 2004-08-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3528 * decl.c (free_variable, free_value, gfc_free_data, var_list,
3529 var_element, top_var_list, match_data_constant, top_val_list,
3530 gfc_match_data): Move here from match.c.
3531 (match_old_style_init): New function.
3532 (variable_decl): Match old-style initialization.
3533 * expr.c (gfc_get_variable_expr): New function.
3534 * gfortran.h (gfc_get_variable_expr): Add prototype.
3535 * gfortran.texi: Start documentation for supported extensions.
3536 * match.c: Remove the functions moved to decl.c.
3537 * match.h (gfc_match_data): Move prototype to under decl.c.
3538 * symbol.c (gfc_find_sym_tree, gfc_find_symbol): Add/correct
3541 2004-08-29 Steven G. Kargl <kargls@comcast.net>
3542 Paul Brook <paul@codesourcery.com>
3544 * check.c (gfc_check_besn, gfc_check_g77_math1): New functions.
3545 * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Define.
3546 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
3547 (build_builtin_fntypes): New function.
3548 (gfc_init_builtin_functions): Use it.
3549 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_{J,Y}{0,1,N}
3550 and GFC_ISYM_ERF{,C}.
3551 (gfc_c_int_kind): Declare.
3552 * intrinsic.c (add_functions): Add [d]bes* and [d]erf*.
3553 * intrinsic.h (gfc_check_besn, gfc_check_g77_math1, gfc_resolve_besn,
3554 gfc_resolve_g77_math1): Add prototypes.
3555 * resolve.c (gfc_resolve_besn, gfc_resolve_g77_math1): New functions.
3556 * mathbuiltins.def: Add comment. Change third argument. Use
3557 DEFINE_MATH_BUILTIN_C. Add bessel and error functions.
3558 * trans-intrinsic.c (BUILT_IN_FUNCTION): Define.
3559 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
3560 * trans-types.c (gfc_c_int_kind): Declare.
3561 (gfc_init_kinds): Set it.
3563 2004-08-29 Steven G. Kargl <kargls@comcast.net>
3564 Paul Brook <paul@codesourcery.com>
3566 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
3567 (gfc_check_f, gfc_simplify_f): Add f0.
3568 * intrinsic.c (do_check): Call f0. Flatten.
3569 (add_sym_0): Fix prototype. Set f0.
3570 (add_functions): Add getgid, getgid and getuid.
3571 (resolve_intrinsic): Remove obsolete comment.
3572 (do_simplify): Call f0.
3573 * intrinsic.h (gfc_resolve_getgid, gfc_resolve_getpid,
3574 gfc_resolve_getuid): Add prototypes.
3575 * iresolve.c (gfc_resolve_getgid, gfc_resolve_getpid,
3576 gfc_resolve_getuid): New functions.
3577 * trans-intrinsic.c (gfc_conv_intrinsic_function): Handle
3580 2004-08-28 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3582 * error.c (gfc_error_init_1): Remove blank line in front of
3583 function body. Add missing blank.
3584 (gfc_buffer_error, error_char, error_string): Remove blank line in
3585 front of function body.
3586 (show_locus): Add comma in comment.
3587 (gfc_clear_warning, gfc_warning_check, gfc_clear_error,
3588 gfc_push_error, gfc_pop_error): Remove blank line in front of
3590 (gfc_get_errors): Typo fix in comment in front of function. Remove
3591 blank line in front of function body.
3593 2004-08-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3595 * gfortran.h (gfc_default_*_kind): Remove prototypes, add extern
3596 variable declaration of same name.
3597 * arith.c, check.c, decl.c, dump_parse_tree.c, expr.c,
3598 intrinsic.c, io.c, iresolve.c, match.c, options.c, primary.c,
3599 resolve.c, simplify.c, symbol.c, trans-const.c, trans-io.c:
3600 Replace all calls to gfc_default_*_kind with variable accesses.
3601 * trans-types.c: Same as above.
3602 (gfc_default_*_kind_1): Rename to gfc_default_*_kind, remove
3603 static qualifier. Replace all occurences.
3604 (gfc_default_*_kind): Remove functions.
3606 2004-08-26 Richard Henderson <rth@redhat.com>
3608 * arith.c: Include system.h, not real system headers.
3609 (MPZ_NULL, MPF_NULL, DEF_GFC_INTEGER_KIND, DEF_GFC_LOGICAL_KIND,
3610 DEF_GFC_REAL_KIND, GFC_SP_KIND, GFC_SP_PREC, GFC_SP_EMIN, GFC_SP_EMAX,
3611 GFC_DP_KIND, GFC_DP_PREC, GFC_DP_EMIN, GFC_DP_EMAX, GFC_QP_KIND,
3612 GFC_QP_PREC, GFC_QP_EMIN, GFC_QP_EMAX): Remove.
3613 (gfc_integer_kinds, gfc_logical_kinds, gfc_real_kinds,
3614 gfc_index_integer_kind, gfc_default_integer_kind,
3615 gfc_default_real_kind,gfc_default_double_kind,
3616 gfc_default_character_kind, gfc_default_logical_kind,
3617 gfc_default_complex_kind, validate_integer, validate_real,
3618 validate_logical, validate_character,
3619 gfc_validate_kind): Move to trans-types.c.
3620 (gfc_set_model_kind): Use gfc_validate_kind.
3621 (gfc_set_model): Just copy the current precision to default.
3622 (gfc_arith_init_1): Use mpfr precision 128 for integer setup.
3623 * f95-lang.c (gfc_init_decl_processing): Invoke gfc_init_kinds.
3624 * gfortran.h: Update file commentary.
3625 * trans-types.c (MAX_INT_KINDS, MAX_REAL_KINDS): New.
3626 (gfc_default_integer_kind_1, gfc_default_real_kind_1,
3627 gfc_default_double_kind_1, gfc_default_character_kind_1,
3628 gfc_default_logical_kind_1, gfc_default_complex_kind_1): New.
3629 (gfc_init_kinds): New.
3630 (gfc_init_types): Don't set gfc_index_integer_kind here.
3631 * trans-types.h (gfc_init_kinds): Declare.
3632 * doc/invoke.texi: Clarify DOUBLE PRECISION behaviour wrt -r8.
3634 2004-08-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3636 * check.c (gfc_check_atan2): New function.
3637 * intrinsic.c (add_functions): Use gfc_check_atan2 for ATAN2
3638 * intrinsic.h (gfc_check_atan2): Add prototype.
3640 2004-08-25 Richard Henderson <rth@redhat.com>
3642 * arith.c (gfc_validate_kind): Add may_fail argument; abort if
3643 false and we don't validate the kind.
3644 (gfc_check_integer_range, gfc_check_real_range): Update to match.
3645 * check.c (kind_check): Likewise.
3646 * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Likewise.
3647 (match_char_spec, match_logical_spec): Likewise.
3648 * gfortran.h (gfc_validate_kind): Likewise.
3649 * options.c (gfc_handle_option): Likewise.
3650 * primary.c (match_integer_constant, match_real_constant,
3651 match_string_constant, match_logical_constant,
3652 match_const_complex_part): Likewise.
3653 * simplify.c (get_kind, gfc_simplify_bit_size, gfc_simplify_digits,
3654 gfc_simplify_epsilon, gfc_simplify_huge, gfc_simplify_ibclr,
3655 gfc_simplify_ibset, gfc_simplify_ishft, gfc_simplify_ishftc,
3656 gfc_simplify_maxexponent, gfc_simplify_minexponent,
3657 gfc_simplify_nearest, gfc_simplify_not, gfc_simplify_precision,
3658 gfc_simplify_radix, gfc_simplify_range, gfc_simplify_rrspacing,
3659 gfc_simplify_scale, gfc_simplify_spacing, gfc_simplify_tan,
3660 gfc_simplify_tiny): Likewise.
3661 * trans-intrinsic.c (gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod,
3662 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
3663 prepare_arg_info): Likewise.
3665 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3667 * expr.c (gfc_check_assign): Add comment. Add new warning.
3668 * trans-expr.c (gfc_conv_function_call): Correctly dereference
3669 result of pointer valued function when not in pointer assignment.
3671 2004-08-25 Paul Brook <paul@codesourcery.com>
3673 * config-lang.in: Remove dead commented line.
3674 * module.c: Replace g95 with gfortran in comment.
3676 2004-08-25 Paul Brook <paul@codesourcery.com>
3679 * arith.c (gfc_mpfr_to_mpz): Workaround mpfr bug.
3681 2004-08-25 Paul Brook <paul@codesourcery.com>
3684 * trans-array.c (gfc_trans_allocate_temp_array): Remove
3685 string_length argument.
3686 (gfc_trans_array_ctor_element): New function.
3687 (gfc_trans_array_constructor_subarray): Use it.
3688 (gfc_trans_array_constructor_value): Ditto. Handle constant
3690 (get_array_ctor_var_strlen, get_array_ctor_strlen): New functions.
3691 (gfc_trans_array_constructor): Use them.
3692 (gfc_add_loop_ss_code): Update to new gfc_ss layout.
3693 (gfc_conv_ss_descriptor): Remember section string length.
3694 (gfc_conv_scalarized_array_ref): Ditto. Remove dead code.
3695 (gfc_conv_resolve_dependencies): Update to new gfc_ss layout.
3696 (gfc_conv_expr_descriptor): Ditto.
3697 (gfc_conv_loop_setup): Ditto. Spelling fixes.
3698 * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
3699 * trans-const.c (gfc_conv_constant): Update to new gfc_ss layout.
3700 * trans-expr.c (gfc_conv_component_ref): Turn error into ICE.
3701 (gfc_conv_variable): Set string_length from section.
3702 (gfc_conv_function_call): Remove extra argument.
3703 (gfc_conv_expr, gfc_conv_expr_reference): Update to new gfc_ss layout.
3704 * trans-types.c (gfc_get_character_type_len): New function.
3705 (gfc_get_character_type): Use it.
3706 (gfc_get_dtype): Return zero for internal types.
3707 * trans-types.h (gfc_get_character_type_len): Add prototype.
3708 * trans.h (struct gfc_ss): Move string_length out of union.
3710 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3712 * trans.h (build2_v, build3_v): New macros.
3714 * f95-lang.c (gfc_truthvalue_conversion): Use build2 instead of
3716 * trans-array.c (gfc_conv_descriptor_data,
3717 gfc_conv_descriptor_offset, gfc_conv_descriptor_dimension,
3718 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
3719 gfc_conv_descriptor_ubound, gfc_trans_allocate_array_storage,
3720 gfc_trans_allocate_temp_array,
3721 gfc_trans_array_constructor_subarray,
3722 gfc_trans_array_constructor_value, gfc_conv_array_index_ref,
3723 gfc_trans_array_bound_check, gfc_conv_array_index_offset,
3724 gfc_conv_scalarized_array_ref, gfc_conv_array_ref,
3725 gfc_conv_array_ref, gfc_trans_preloop_setup,
3726 gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
3727 gfc_conv_loop_setup, gfc_array_init_size,
3728 gfc_conv_array_initializer, gfc_trans_array_bounds,
3729 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
3730 gfc_conv_expr_descriptor, gfc_conv_array_parameter,
3731 gfc_trans_deferred_array): Use buildN and buildN_v macros instead
3732 of build and build_v as appropriate.
3733 * trans-common.c (create_common): Same.
3734 * trans-decl.c (gfc_trans_auto_character_variable,
3735 gfc_trans_entry_master_switch, gfc_generate_function_code): Same.
3736 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
3737 gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
3738 gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
3739 gfc_conv_expr_op, gfc_conv_function_call,
3740 gfc_trans_structure_assign): Same.
3741 * trans-intrinsic.c (build_fixbound_expr, build_round_expr,
3742 gfc_conv_intrinsic_aint, gfc_conv_intrinsic_bound,
3743 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
3744 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
3745 gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_minmax,
3746 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
3747 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_minmaxloc,
3748 gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
3749 gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_singlebitop,
3750 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
3751 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_strcmp,
3752 gfc_conv_allocated, gfc_conv_associated, prepare_arg_info,
3753 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
3754 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat,
3755 gfc_conv_intrinsic_iargc): Same.
3756 * trans-io.c (set_parameter_value, set_parameter_ref, set_string,
3757 set_flag, add_case, io_result, transfer_namelist_element,
3758 transfer_expr): Same.
3759 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_if_1,
3760 gfc_trans_arithmetic_if, gfc_trans_do, gfc_trans_do_while,
3761 gfc_trans_integer_select, gfc_trans_logical_select,
3762 gfc_trans_character_select, gfc_trans_forall_loop,
3763 gfc_trans_nested_forall_loop, gfc_do_allocate,
3764 generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
3765 compute_inner_temp_size, compute_overall_iter_number,
3766 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
3767 gfc_trans_forall_1, gfc_evaluate_where_mask,
3768 gfc_trans_where_assign, gfc_trans_allocate): Same.
3769 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Same.
3770 * trans.c (gfc_add_modify_expr, gfc_finish_block,
3771 gfc_build_array_ref, gfc_build_function_call,
3772 gfc_trans_runtime_check): Same.
3774 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3776 * trans-const.c (gfc_conv_mpz_to_tree): Change call to
3777 build_int_cst to build_int_cst_wide in accordance to Nathan's
3780 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
3782 * trans-array.c (gfc_trans_array_constructor_value): Adjust
3783 build_int_cst calls.
3784 * trans-const.c (gfc_build_string_const, gfc_init_constants,
3785 gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise.
3786 * trans-decl.c (gfc_get_symbol_decl, build_entry_thunks,
3787 gfc_trans_entry_master_switch): Likewise.
3788 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
3789 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
3790 * trans-io.c (add_case, set_error_locus,
3791 transfer_namelist_element, transfer_expr): Likewise.
3792 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
3793 gfc_trans_stop, gfc_trans_character_select): Likewise.
3794 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
3795 * trans.c (gfc_trans_runtime_check): Likewise.
3797 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3799 * trans-decl.c, trans-types.c: Add and remove blank lines as
3802 2004-08-24 Richard Henderson <rth@redhat.com>
3804 * trans-const.c (gfc_conv_mpz_to_tree): Fix 64-bit shift warning.
3806 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3808 * resolve.c (merge_argument_lists): Revert unintentionally
3811 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3813 * trans-decl.c (build_function_decl): Fix spelling in comment.
3814 (build_entry_thunks): Remove code with no function.
3815 (gfc_build_intrinsic_function_decls): Remove empty line.
3817 * resolve.c (resolve_entries): Fix a bunch of comment typos.
3819 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
3821 * f95-lang.c (gfc_init_decl_processing): Adjust
3822 build_common_tree_nodes call.
3824 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3826 * trans-types.c: Spelling and formatting fixes.
3828 2004-08-23 Richard Henderson <rth@redhat.com>
3830 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_getlimbn instead
3831 of going through an intermediate string. Fix 32/64 int/long bug.
3833 2004-08-23 Eric Christopher <echristo@redhat.com>
3835 * trans-types.c (gfc_type_for_mode): Remove VECTOR_TYPE_SUPPORTED_P
3836 usage. Use build_vector_type_for_mode for vector types.
3838 2004-08-22 Richard Henderson <rth@redhat.com>
3841 * data.c (find_con_by_offset): Search ordered list; handle
3842 elements with repeat counts.
3843 (gfc_assign_data_value_range): New.
3844 * gfortran.h (struct gfc_data_value): Make repeat unsigned.
3845 (gfc_assign_data_value_range): Declare.
3846 * match.c (top_val_list): Extract repeat count into a temporary.
3847 * resolve.c (values): Make left unsigned.
3848 (next_data_value): Don't decrement left.
3849 (check_data_variable): Use gfc_assign_data_value_range.
3851 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3853 * trans-const.c, trans-decl.c, trans-expr.c: Spelling fixes.
3855 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3857 * check.c (gfc_check_reduction): Rename to ...
3858 (check_reduction): ... this. Make static. Don't check type of
3860 (gfc_check_minval_maxval, gfc_check_prodcut_sum): New functions.
3861 * intrinsic.c (add_functions): Change MAXVAL, MINVAL, PRODUCT and
3862 SUM to use new check functions.
3863 (check_specific): Change logic to call new functions.
3864 * intrinsic.h (gfc_check_minval_maxval, gfc_check_product_sum):
3866 (gfc_check_reduction): Remove prototype.
3868 2004-08-20 Paul Brook <paul@codesourcery.com>
3869 Canqun Yang <canqun@nudt.edu.cn>
3872 * trans-array.c (gfc_conv_array_parameter): Pass correct pointer
3873 for automatic arrays.
3874 * trans-types.c (gfc_get_nodesc_array_type): Add comment.
3876 2004-08-19 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3880 * match.c (match_simple_forall, match_simple_where): Forward-declare.
3881 (gfc_match_if): Order statement list alphabetically, add WHERE and
3882 FORALL, remove double PAUSE.
3883 (gfc_match_simple_where, match_forall_header,
3884 gfc_match_simple_forall): New functions.
3885 (gfc_match_forall): Use match_forall_header.
3887 2004-08-19 Paul Brook <paul@codesourcery.com>
3890 * gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0.
3891 * symbol.c (gfc_clear_attr): Use memset.
3893 2004-08-19 Paul Brook <paul@codesourcery.com>
3897 * data.c (assign_substring_data_value): Remove.
3898 (create_character_intializer): New function.
3899 (gfc_assign_data_value): Track the typespec for the current
3900 subobject. Use create_character_intializer.
3902 2004-08-19 Erik Schnetter <schnetter@aei.mpg.de>
3905 * check.c (gfc_check_reduction): New function.
3906 (gfc_check_minval_maxval): Removed.
3907 (gfc_check_product): Removed.
3908 (gfc_check_sum): Removed.
3909 * intrinsic.h: Add/remove declarations for these.
3910 * gfortran.h: Add field f3red to union gfc_check_f.
3911 * intrinsic.c (add_sym_3red): New function.
3912 (add_functions): Register maxval, minval, product, and sum intrinsics
3913 through add_sym_3red.
3914 (check_specific): Handle f3red union field.
3915 * iresolve.c: Whitespace change.
3917 2004-08-18 Paul Brook <paul@codesourcery.com>
3919 * trans-types.c (gfc_sym_type): Use pointer types for optional args.
3921 2004-08-18 Victor Leikehman <lei@il.ibm.com>
3924 * trans-io.c (transfer_namelist_element): New. Recursively handle
3925 derived-type variables. Pass string lengths.
3926 (build_dt): Code moved to build_namelist, with some
3927 changes and additions.
3928 (gfc_build_io_library_fndecls): Declare the fifth
3929 argument in st_set_nml_var_char -- string_length.
3931 2004-08-17 Paul Brook <paul@codesourcery.com>
3932 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3935 * decl.c (get_proc_name): Update mystery comment.
3936 (gfc_match_entry): Check for errors earlier. Add entry point to list.
3937 * dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes.
3938 * gfortran.h (symbol_attribute): Add entry_master. Document entry.
3939 (struct gfc_entry_list): Define.
3940 (gfc_get_entry_list): Define.
3941 (struct gfc_namespace): Add refs and entries.
3942 (enum gfc_exec_op): Add EXEC_ENTRY.
3943 (struct gfc_code): Add ext.entry.
3944 * module.c (ab_attribute, attr_bits): Remove AB_ENTRY.
3945 (mio_symbol_attribute): Don't save/reture addr->entry.
3946 (mio_namespace_ref): Refcount namespaces.
3947 * parse.c (accept_statement): Handle ST_ENTRY.
3948 (gfc_fixup_sibling_symbols): Mark symbol as referenced.
3949 (parse_contained): Fixup sibling references to entry points
3950 after parsing the procedure body.
3951 * resolve.c (resolve_contained_fntype): New function.
3952 (merge_argument_lists, resolve_entries): New functions.
3953 (resolve_contained_functions): Use them.
3954 (resolve_code): Handle EXEC_ENTRY.
3955 (gfc_resolve): Call resolve_entries.
3956 * st.c (gfc_free_statement): Handle EXEC_ENTRY.
3957 * symbol.c (gfc_get_namespace): Refcount namespaces.
3958 (gfc_free_namespace): Ditto.
3959 * trans-array.c (gfc_trans_dummy_array_bias): Treat all args as
3960 optional when multiple entry points are present.
3961 * trans-decl.c (gfc_get_symbol_decl): Remove incorrect check.
3962 (gfc_get_extern_function_decl): Add assertion. Fix coment.
3963 (create_function_arglist, trans_function_start, build_entry_thunks):
3965 (gfc_build_function_decl): Rename ...
3966 (build_function_decl): ... to this.
3967 (gfc_create_function_decl): New function.
3968 (gfc_generate_contained_functions): Use it.
3969 (gfc_trans_entry_master_switch): New function.
3970 (gfc_generate_function_code): Use new functions.
3971 * trans-stmt.c (gfc_trans_entry): New function.
3972 * trans-stmt.h (gfc_trans_entry): Add prototype.
3973 * trans-types.c (gfc_get_function_type): Add entry point argument.
3974 * trans.c (gfc_trans_code): Handle EXEC_ENTRY.
3975 (gfc_generate_module_code): Call gfc_create_function_decl.
3976 * trans.h (gfc_build_function_decl): Remove.
3977 (gfc_create_function_decl): Add prototype.
3979 2004-08-15 Andrew Pinski <apinski@apple.com>
3982 * f95-lang.c (gfc_init_builtin_functions): Initialize the builtins
3983 for cabs{,f} and copysign{,f}.
3984 * trans-decl.c (gfor_fndecl_math_cabsf): Delete.
3985 (gfor_fndecl_math_cabs): Delete.
3986 (gfor_fndecl_math_sign4): Delete.
3987 (gfor_fndecl_math_sign8): Delete.
3988 (gfc_build_intrinsic_function_decls): Remove the
3989 initializing of cabs{,f} and copysign{,f} functions.
3990 * trans-intrinsic.c (gfc_conv_intrinsic_abs): Use the builtins
3991 instead of the functions definitions.
3992 (gfc_conv_intrinsic_sign): Likewise.
3993 * trans.h (gfor_fndecl_math_cabsf): Delete.
3994 (gfor_fndecl_math_cabs): Delete.
3995 (gfor_fndecl_math_sign4): Delete.
3996 (gfor_fndecl_math_sign8): Delete.
3998 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
4000 * trans-array.c (gfc_trans_array_constructor_value): Use
4002 * trans-const.c (gfc_build_string_const,
4003 gfc_init_constants, gfc_conv_mpz_to_tree,
4004 gfc_conv_constant_to_tree): Likewise.
4005 * trans-decl.c (gfc_get_symbol_decl): Likewise.
4006 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
4007 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
4008 * trans-io.c (add_case, set_error_locus, build_dt,
4009 transfer_expr): Likewise.
4010 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
4011 gfc_trans_stop, gfc_trans_character_select): Likewise.
4012 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
4013 * trans.c (gfc_trans_runtime_check): Likewise.
4015 2004-08-14 Paul Brook <paul@codesourcery.com>
4017 * trans-decl.c (gfc_build_function_decl): Remove dead code.
4019 2004-08-14 Paul Brook <paul@codesourcery.com>
4021 * trans-arry.c (gfc_trans_auto_array_allocation): Remove unused var.
4023 2004-08-13 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4025 * gfortran.h: Add comments.
4026 * parse.c (parse_contained): Fix comment typo.
4027 * resolve.c (was_declared): Ditto.
4030 2004-08-11 Paul Brook <paul@codeourcery.com>
4033 * intrinsic.c (add_functions): Add dfloat as an alias for dble.
4035 2004-08-10 Richard Henderson <rth@redhat.com>
4037 * f95-lang.c (gfc_init_builtin_functions): Remove
4038 __builtin_stack_alloc, add __builtin_alloca.
4039 * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR.
4040 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
4042 2004-08-10 Paul Brook <paul@codesourcery.com>
4044 * trans-io.c (transfer_expr): Handle pointters.
4046 2004-08-10 Paul Brook <paul@codesourcery.com>
4049 * trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT.
4050 (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta.
4051 (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary):
4052 Handle GFC_SS_COMPONENT.
4053 (gfc_conv_ss_startstride): Ditto. Set ss->shape.
4054 (gfc_conv_loop_setup): Tweak commends. Remove dead code.
4056 (gfc_conv_array_initializer): Call specific initializer routines.
4057 * trans-expr.c (gfc_trans_structure_assign): New function.
4058 (gfc_trans_subarray_assign): New function.
4059 (gfc_trans_subcomponent_assign): New fucntion
4060 (gfc_conv_structure): Use them.
4061 * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT.
4062 (gfc_ss): Add shape.
4064 2004-08-08 Victor Leikehman <lei@il.ibm.com>
4066 * simplify.c (gfc_simplify_shape): Bugfix.
4067 * expr.c (gfc_copy_shape_excluding): New function.
4068 * gfortran.h (gfc_get_shape): Bugfix.
4069 (gfc_copy_shape_excluding): Added declaration.
4070 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
4071 gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound,
4072 gfc_resolve_ubound, gfc_resolve_transpose): Added compile
4073 time resolution of shape.
4075 2004-08-06 Janne Blomqvist <jblomqvi@cc.hut.fi>
4077 * intrinsic.c (add_subroutines): Add getenv and
4078 get_environment_variable. (add_sym_5s): New function.
4079 * intrinsic.h (gfc_resolve_get_environment_variable): Add
4081 * iresolve.c (gfc_resolve_get_environment_variable): New
4084 2004-08-06 Feng Wang <fengwang@nudt.edu.cn>
4086 * f95-lang.c (gfc_init_builtin_functions): Fix the number of
4087 __builtin_pow[f] arguments.
4089 2004-08-06 Steven G. Kargl <kargls@comcast.net>
4091 * arith.c: Add #define for model numbers. Remove global GMP variables.
4092 (natural_logarithm,common_logarithm,exponential,sine,
4093 cosine,arctangent,hypercos,hypersine ): Remove.
4094 (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions.
4095 (arctangent2,gfc_arith_init_1,gfc_arith_done_1
4096 gfc_check_real_range, gfc_constant_result, gfc_range_check,
4097 gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times,
4098 gfc_arith_divide,complex_reciprocal,complex_pow_ui,
4099 gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real,
4100 gfc_convert_complex,gfc_int2real,gfc_int2complex,
4101 gfc_real2int,gfc_real2real,gfc_real2complex,
4102 gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP
4103 to MPFR, use new functions.
4104 * arith.h: Remove extern global variables.
4105 (natural_logarithm,common_logarithm,exponential, sine, cosine,
4106 arctangent,hypercos,hypersine): Remove prototypes.
4107 (arctangent2): Update prototype from GMP to MPFR.
4108 (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes.
4109 * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR.
4110 * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR.
4111 * gfortran.h (GFC_REAL_BITS): Remove.
4112 (arith): Add ARITH_NAN.
4113 Include mpfr.h. Define GFC_RND_MODE.
4114 Rename GCC_GFORTRAN_H GFC_GFC_H.
4115 (gfc_expr): Convert GMP to MPFR.
4116 * module.c: Add arith.h, correct type in comment.
4117 (mio_gmp_real): Convert GMP to MPFR.
4118 (mio_expr): Use gfc_set_model_kind().
4119 * primary.c: Update copyright date with 2004.
4120 (match_real_constant,match_const_complex_part): Convert GMP to MPFR.
4121 * simplify.c: Remove global GMP variables
4122 (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag,
4123 gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint,
4124 gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan,
4125 gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx,
4126 gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh,
4127 gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon,
4128 gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor,
4129 gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int,
4130 gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log,
4131 gfc_simplify_log10,simplify_min_max,gfc_simplify_mod,
4132 gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint,
4133 gfc_simplify_rrspacing,gfc_simplify_scale,
4134 gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin,
4135 gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt,
4136 gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny,
4137 gfc_simplify_init_1,gfc_simplify_done_1): Convert GMP to MPFR.
4139 * trans-const.c (gfc_conv_mpfr_to_tree): Rename from
4140 gfc_conv_mpf_to_tree. Convert it to use MPFR
4141 (gfc_conv_constant_to_tree): Use it.
4142 * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree().
4143 * trans-intrinsic.c: Add arith.h, remove gmp.h
4144 (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR.
4146 2004-08-06 Victor Leikehman <lei@il.ibm.com>
4147 Paul Brook <paul@codesourcery.com>
4149 * trans-array.c (gfc_trans_allocate_array_storage,
4150 gfc_trans_allocate_temp_array, gfc_add_loop_ss_code,
4151 gfc_conv_loop_setup): For functions, if the shape of the result
4152 is not known in compile-time, generate an empty array descriptor for
4153 the result and let the callee to allocate the memory.
4154 (gfc_trans_dummy_array_bias): Do nothing for pointers.
4155 (gfc_conv_expr_descriptor): Use function return values directly.
4156 * trans-expr.c (gfc_conv_function_call): Always add byref call
4158 (gfc_trans_pointer_assignment): Add comments.
4159 (gfc_trans_arrayfunc_assign): Don't chain on expression.
4161 2004-08-01 Roger Sayle <roger@eyesopen.com>
4163 * options.c (gfc_init_options): Don't warn about the use GNU
4164 extensions by default.
4165 (gfc_post_options): Warn about GNU extensions with -pedantic.
4166 (gfc_handle_option): Don't warn about GNU extensions with -std=gnu.
4168 2004-07-30 Richard Henderson <rth@redhat.com>
4170 * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL
4173 2004-07-25 Richard Henderson <rth@redhat.com>
4175 * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL
4176 and DECL_IGNORED_P on RESULT_DECL.
4177 (gfc_generate_constructors): Likewise.
4179 2004-07-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4182 * lang.opt (ffixed-line-length-none, ffixed-line-length-): New
4184 (ffixed-line-length-80, ffixed-line-length-132): Remove.
4185 * options.c (gfc_handle_options): Deal with changed options.
4186 * scanner.c (load_line): Change second arg to 'char **',
4187 allocate if pointing to NULL. Keep track of buffer's length.
4188 Adapt buffer size to overlong lines. Pad lines to full length
4190 (load_file): Adapt to new interface of load_line.
4192 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
4194 * trans.h (builtin_function): Declare.
4196 2004-07-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4199 (parts ported from g95)
4200 * parse.h (gfc_state_data): New field do_variable.
4201 (gfc_check_do_variable): Add prototype.
4202 * parse.c (push_state): Initialize field 'do_variable'.
4203 (gfc_check_do_variable): New function.
4204 (parse_do_block): Remember do iterator variable.
4205 (parse_file): Initialize field 'do_variable'.
4206 * match.c (gfc_match_assignment, gfc_match_do,
4207 gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate):
4208 Add previously missing checks.
4209 (gfc_match_return): Reformat error message.
4210 * io.c (match_out_tag): New function.
4211 (match_open_element, match_close_element,
4212 match_file_element, match_dt_element): Call match_out_tag
4213 instead of match_vtag where appropriate.
4214 (match_io_iterator, match_io_element): Add missing check.
4215 (match_io): Reformat error message.
4216 (match_inquire_element): Call match_out_tag where appropriate.
4218 * parse.c (gfc_check_do_variable): Fix error locus.
4220 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4223 * trans-decl.c (gfc_build_function_decl): Create a new chardecl
4224 for every assumed length character dummy argument.
4227 * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion.
4230 * simplify.c (gfc_simplify_bound): Copy the bound expression.
4232 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4235 * trans-array.c gfc_trans_g77_array,
4236 gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init
4237 for assumed length characters.
4238 (gfc_conv_expr_descriptor): Set se->string_length if dealing
4239 with a character expression.
4240 (gfc_cvonv_array_parameter): Pass string length when passing
4241 character array according to g77 conventions.
4243 2004-07-12 Paul Brook <paul@codesourcery.com>
4245 * expr.c (gfc_check_assign_symbol): Handle pointer assignments.
4246 * trans-array.c (gfc_trans_auto_array_allocation): Remove
4247 initialization code.
4248 * trans-common.c (create_common): Use gfc_conv_initializer.
4249 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer.
4250 * trans-expr.c (gfc_conv_initializer): New function.
4251 (gfc_conv_structure): Use it.
4252 * trans.h (gfc_conv_initializer): Add prototype.
4254 2004-07-11 Paul Brook <paul@codesourcery.com>
4257 * parse.c (gfc_fixup_sibling_symbols): Also look for untyped
4259 (parse_contained): Mark contained symbols as referenced.
4261 2004-07-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4264 * module.c (gfc_dump_module, gfc_use_module): Print locus
4265 when opening of module file fails.
4268 * io.c (match_io): Flag 'WRITE(...), ...' as extension.
4271 * match.c (gfc_match_program): A program name is obligatory.
4272 (gfc_match_return): RETURN in main program is an extension.
4273 (gfc_match_block_data): A space is required before a block data
4277 * primary.c (match_boz_constant): Call gfc_notify_std only if
4278 we actually have a non-standard boz-literal-constant.
4281 * expr.c (gfc_check_assign): Print ranks if incompatible. Issue
4282 warning if assigning NULL().
4284 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
4286 * f95-lang.c (set_block): Remove.
4287 (gfc_clear_binding_stack): New.
4288 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
4289 (struct binding_level): Remove block_created_by_back_end.
4290 (clear_binding_level): Likewise.
4291 (poplevel): Don't handle block_created_by_back_end.
4293 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4295 * trans-decl.c (gfc_create_module_variable): Nothing to do if
4296 symbol is in common, because we ...
4297 (gfc_generate_module_vars): Call gfc_trans_common.
4299 2004-07-10 Paul Brook <paul@codesourcery.com>
4301 * trans-array.c (gfc_build_null_descriptor): New function.
4302 (gfc_trans_static_array_pointer): Use it.
4303 * trans-array.h (gfc_build_null_descriptor): Add prototype.
4304 * trans-expr.c (gfc_conv_structure): Handle array pointers.
4306 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4309 * decl.c (gfc_match_save): Use-associated common block
4311 * gfortran.h (gfc_common_head): Add new field 'name'.
4312 Fix typo in comment after #endif.
4313 * match.c (gfc_get_common): Add new argument from_common,
4314 mangle name if flag is set, fill in new field in structure
4316 (match_common): Set new arg in call to gfc_get_common,
4317 use-associated common block doesn't collide.
4318 * match.h (gfc_get_common): Adapt prototype.
4319 * module.c (load_commons): Set new arg in call to
4321 * symbol.c (free_common_tree): New function.
4322 (gfc_free_namespace): Call new function.
4323 * trans-common.c (several functions): Remove argument
4324 'name', use name from gfc_common_head instead.
4326 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4328 * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
4329 and RHS match. Return early if the RHS is NULL().
4332 * match.c (match_common): Fix error reporting for used common.
4335 * trans-expr.c (gfc_conv_structure): Handle initialization
4336 of scalar pointer components.
4338 * parse.c (decode_statement): Fix matching of BLOCK DATA.
4340 * trans-decl.c (generate_local_decl): Remove workaround obsoleted
4341 by fix for PR 15481.
4343 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4345 * trans-common.c: Fix whitespace issues, make variable names
4347 (create_common): Additionally, make loop logic more obvious.
4349 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4350 Paul Brook <paul@codesourcery.com>
4353 * trans-common.c (calculate_length): Remove ...
4354 (get_segment_info): Merge into here. Save field type.
4355 (build_field): Use saved type.
4356 (create_common, new_condition, new_segment, finish_equivalences):
4357 Use new get_segment_info.
4358 * trans-types.c: Update comment.
4360 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4363 * moduele.c (mio_symbol): Don't I/O initial values unless
4364 symbol is a parameter.
4366 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4369 * resolve.c (resolve_symbol): Verify that the shape of a
4370 parameter array is not only explicit, but also constant.
4371 * array.c (gfc_is_compile_time_shape): New function.
4372 * gfortran.h (gfc_is_compile_time_shape): Add prototype.
4374 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4380 * module.c (write_symbol, write_symtree): Remove workaround.
4381 * primary.c (match_actual_arglist): Enhance comment.
4382 (gfc_match_rvalue): Handle function call with first argument
4383 a keyword argument correctly.
4384 * resolve.c (resolve_symbol): Change call to
4385 gfc_set_default_type to issue error if no implicit type
4387 * trans-decl.c (gfc_create_module_variable): Remove workaround.
4389 2004-07-08 Paul Brook <paul@codesourcery.com>
4391 * intrinsic.c (add_sym_4s): New function.
4392 (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
4394 2004-07-04 Janne Blomqvist <jblomqvi@cc.hut.fi>
4395 Paul Brook <paul@codesourcery.com>
4399 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
4400 GFC_ISYM_COMMAND_ARGUMENT_COUNT.
4401 * intrinsic.c (add_functions): Identify iargc. Add
4402 command_argument_count.
4403 (add_subroutines): Resolve getarg. Add get_command and
4404 get_command_argument.
4405 * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
4406 gfc_resolve_get_command_argument): Add prototypes.
4407 * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
4408 gfc_resolve_get_command_argument): New functions.
4409 * trans-decl.c (gfor_fndecl_iargc): New variable.
4410 (gfc_build_intrinsic_function_decls): Set it.
4411 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
4412 (gfc_conv_intrinsic_function): Use it.
4413 * trans.h (gfor_fndecl_iargc): Declare.
4415 2004-07-04 Matthias Klose <doko@debian.org>
4417 * Make-lang.in: Generate and install gfortran man page.
4418 * invoke.texi: Remove extra '@c man end'.
4420 2004-07-04 Richard Henderson <rth@redhat.com>
4422 * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
4424 2004-07-04 Paul Brook <paul@codesourcery.com>
4426 * decl.c (gfc_match_implicit_range): Don't use typespec.
4427 (gfc_match_implicit): Handle character selectors.
4428 * gfortran.h (gfc_set_implicit): Remove prototype.
4429 (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
4430 * parse.c (accept_statement): Don't call gfc_set_implicit.
4431 * symbol.c (new_ts): Remove.
4432 (gfc_set_implicit_none): Use same loop bounds as other functions.
4433 (gfc_set_implicit): Remove.
4434 (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
4435 (gfc_merge_new_implicit): Combine with gfc_set_implicit.
4437 2004-06-30 Richard Henderson <rth@redhat.com>
4439 * match.c (var_element): Remove unused variable.
4441 * trans-decl.c (gfc_generate_function_code): Don't set
4442 x_whole_function_mode_p.
4443 (gfc_generate_constructors): Likewise.
4445 2004-06-30 Richard Henderson <rth@redhat.com>
4447 * trans-decl.c (gfc_generate_function_code): Don't set
4448 immediate_size_expand.
4449 (gfc_generate_constructors): Likewise.
4451 2004-06-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4454 * decl.c (gfc_match_type_spec): Rename second argument to
4455 'implicit_flag', reverse meaning. Don't match_char_spec if
4456 'implicit_flag' is set. Rename to ...
4457 (match_type_spec): ... this.
4458 (gfc_match_implicit_none, match_implicit_range): Move here
4460 (gfc_match_implicit): Move here from match.c, try to
4461 match_char_len if match_implicit_range doesn't succeed for
4462 CHARACTER implicits. Call renamed fucntion match_type_spec.
4463 (gfc_match_data_decl, match_prefix): Call renamed function
4465 * match.c (gfc_match_implicit_none, match_implicit_range,
4466 gfc_match_implicit): Move to decl.c.
4467 * match.h (gfc_match_implicit_none, gfc_match_implicit):
4468 Move protoypes to section 'decl.c'.
4469 (gfc_match_type_spec): Remove prototype.
4471 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4473 * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
4476 2004-06-29 Steven Bosscher <stevenb@suse.de>
4478 Make sure types in assignments are compatible. Mostly mechanical.
4479 * trans-const.h (gfc_index_one_node): New define.
4480 * trans-array.c (gfc_trans_allocate_array_storage,
4481 gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
4482 gfc_trans_array_constructor_value, gfc_trans_array_constructor,
4483 gfc_conv_array_ubound, gfc_conv_array_ref,
4484 gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
4485 gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
4486 gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
4487 gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
4488 types in assignments, conversions and conditionals for expressions.
4489 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
4490 gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
4491 gfc_conv_function_call, gfc_trans_pointer_assignment,
4492 gfc_trans_scalar_assign): Likewise.
4493 * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
4494 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
4495 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
4496 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
4497 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
4498 gfc_conv_allocated, gfc_conv_associated,
4499 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
4500 * trans-io.c (set_string): Likewise.
4501 * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
4502 gfc_do_allocate, generate_loop_for_temp_to_lhs,
4503 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
4504 compute_overall_iter_number, gfc_trans_assign_need_temp,
4505 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
4506 gfc_evaluate_where_mask, gfc_trans_where_assign,
4507 gfc_trans_where_2): Likewise.
4508 * trans-types.c (gfc_get_character_type, gfc_build_array_type,
4509 gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
4511 * trans.c (gfc_add_modify_expr): Add sanity check that types
4512 for the lhs and rhs are the same for scalar assignments.
4514 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4516 * dump-parse-tree.c (show_common): New function.
4517 (gfc_show_namespace): Show commons.
4519 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4520 Andrew Vaught <andyv@firstinter.net>
4524 * decl.c (gfc_match_save): Adapt to new common structures,
4525 don't allow saving USE-associated common.
4526 * dump-parse-tree (gfc_show_attr): (saved_)common are not
4527 symbol attributes any longer.
4528 (gfc_show_symbol): Don't show old-style commons any longer.
4529 (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
4531 * gfortran.h (symbol_attribute): Remove common and saved_common
4533 (gfc_symbol): Remove common_head element.
4534 (gfc_common_head): New struct.
4535 (gfc_get_common_head): New macro.
4536 (gfc_symtree): Add field 'common' to union.
4537 (gfc_namespace): Add field 'common_root'; change type of field
4538 'blank_common' to blank_common.
4539 (gfc_add_data): New prototype.
4540 (gfc_traverse_symtree): Expect a symtree as first argument
4541 instead of namespace.
4542 * match.c (gfc_get_common): New function.
4543 (match_common_name): Change to take char * as argument, adapt,
4544 fix bug with empty name.
4545 (gfc_match_common): Adapt to new data structures. Disallow
4546 redeclaration of USE-associated COMMON-block. Fix bug with
4548 (var_element): Adapt to new common structures.
4549 * match.h (gfc_get_common): Declare.
4550 * module.c: Add 2004 to copyright years, add commons to module
4551 file layout description.
4552 (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
4553 for removed attributes.
4554 (mio_symbol): Adapt to new way of storing common relations.
4555 (load_commons): New function.
4556 (read_module): Skip common list on first pass, load_commons at
4558 (write_commons): New function.
4559 (write_module): Call write_commons().
4560 * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
4561 functions related to removed attributes.
4562 (gfc_add_data): New function.
4563 (gfc_clear_attr): Don't set removed attributes.
4564 (gfc_copy_attr): Don't copy removed attributes.
4565 (traverse_symtree): Remove.
4566 (gfc_traverse_symtree): Don't traverse symbol
4567 tree of the passed namespace, but require a symtree to be passed
4568 instead. Unify with traverse_symtree.
4569 (gfc_traverse_ns): Call gfc_traverse_symtree according to new
4571 (save_symbol): Remove setting of removed attribute.
4572 * trans-common.c (gfc_sym_mangled_common_id): Change to
4573 take 'char *' argument instead of 'gfc_symbol'.
4574 (build_common_decl, new_segment, translate_common): Adapt to new
4575 data structures, add new
4577 (create_common): Adapt to new data structures, add new
4578 argument name. Fix typo in intialization of derived types.
4579 (finish_equivalences): Add second argument in call to
4581 (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
4582 (gfc_trans_common): Adapt to new data structures.
4583 * trans-decl.c (gfc_create_module_variables): Remove test for
4586 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4588 * io.c: Add 2004 to copyright years.
4590 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4591 Andrew Vaught <andyv@firstinter.net>
4593 * gfortran.h (gfc_gsymbol): New typedef.
4594 (gfc_gsym_root): New variable.
4595 (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
4596 * parse.c (global_used): New function.
4597 (parse_block_data): Check for double empty BLOCK DATA,
4598 use global symbol table.
4599 (parse_module): Use global symbol table.
4600 (add_global_procedure, add_global_program): New functions.
4601 (gfc_parse_file): Use global symbol table.
4602 * symbol.c (gfc_gsym_root): New variable.
4603 (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
4606 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4608 * module.c (mio_gmp_real): Correct writing of negative numbers.
4610 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4613 * expr.c (check_intrinsic_op): Allow comparison of characters.
4616 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4617 Andrew Vaught <andyv@firstinter.net>
4619 * decl.c (contained_procedure): New function.
4620 (match_end): Verify correctness of END STATEMENT in
4623 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4624 Andrew Vaught <andyv@firstinter.net>
4627 * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
4628 (decode_statement): Enforce required space in free-form.
4630 2004-06-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4632 * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
4633 * trans-array.c (gfc_conv_descriptor_data): Add operand
4635 (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
4636 (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
4637 (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
4638 * trans-common.c (create_common): Likewise.
4639 * trans-expr.c (gfc_conv_component_ref): Likewise.
4640 * trans-io.c (set_parameter_value): Likewise.
4641 (set_parameter_ref, set_string, set_flag, io_result): Likewise.
4642 (transfer_expr): Likewise.
4643 * trans-decl.c (gfc_trans_auto_character_variable):
4644 Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
4645 (gfc_gimplify_function): New function.
4646 (gfc_generate_function-code): Properly handle nested functions.
4647 * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
4649 2004-06-22 Janne Blomqvist <jblomqvi@cc.hut.fi>
4652 * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
4653 (gfc_resolve_inquire): Resolve the iolength tag. Return
4654 SUCCESS at end of function if no failure has occured.
4655 * resolve.c (resolve_code): Resolve if iolength is encountered.
4656 * trans-io.c: (ioparm_iolength, iocall_iolength,
4657 iocall_iolength_done): New variables.
4658 (last_dt): Add IOLENGTH.
4659 (gfc_build_io_library_fndecls ): Set iolength related variables.
4660 (gfc_trans_iolength): Implement.
4661 (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
4663 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de
4666 * scanner.c (load_line): Don't truncate preprocessor lines.
4667 Reformat error message.
4668 (preprocessor_line): Issue warning in case of malformed
4671 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4673 * resolve.c (resolve_symbol): Add comment in function body.
4674 (check_data_variable): Change type of mark to ar_type, adapt code
4677 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4679 * array.c (gfc_insert_constructor): Avoid redundant call to
4680 mpz_comp. Add 2004 to copyright years.
4682 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
4684 * trans.h (stmtblock_t): Change has_scope to unsigned int.
4686 2004-06-20 Steven G. Kargl <kargls@comcast.net>
4688 * arith.c (gfc_range_check): correct complex underflow.
4690 2004-06-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4693 * match.c (match_case_selector): Call gfc_match_init_expr
4694 instead of gfc_match_expr.
4695 * resolve.c (validate_case_label_expr): No need to check for
4696 constant, since it wouldn't have been matched with the fix to
4699 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4702 * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
4705 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4708 * trans-deecl.c (generate_local_decl): Do not issue warning for
4709 unused variables if they're use associated.
4711 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4712 Andrew Vaught <andyv@firstinter.net>
4715 * gfortran.h (gfc_check_f): Add new field f3ml.
4716 * check.c (gfc_check_minloc_maxloc): Take argument list instead
4717 of individual arguments, reorder if necessary.
4718 * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
4719 * intrinsic.c (add_sym_3ml): New function.
4720 (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
4721 (check_specific): Catch special case MINLOC, MAXLOC.
4723 2004-06-14 Paul Brook <paul@codesourcery.com>
4725 * intrinsic.c (add_sym_2s): Use correct function types.
4727 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4729 * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize. Move data.c
4730 * data.c (gfc_get_section_index): Remove dependency on trans.h.
4732 2004-06-12 Steven G. Kargl <kargls@comcast.net>
4734 * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
4735 gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
4736 * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
4737 GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
4738 * trans-intrinsic.c: Use symbols.
4739 * intrinsic.c (add_sym_2s): New function.
4740 * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
4741 * intrinsic.h: Function prototypes.
4742 * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
4743 gfc_resolve_srand): New functions.
4745 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4748 * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
4749 contained procedure.
4751 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4754 * interface.c (compare_parameter, compare_actual_formal): Don't
4755 check types and array shapes for NULL()
4756 * trans-expr.c (conv_function_call): No double indirection for
4759 2004-06-09 Toon Moene <toon@moene.indiv.nluug.nl>
4761 * trans-expr.c (gfc_conv_cst_int_power): Compute
4762 x**(-n) by converting it to (1/x)**n instead of
4765 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4768 * module.c (write_symbol, write_symtree): Don't write symbols
4769 wrongly added to namespace.
4770 * trans-decl.c (gfc_create_module_variable): Don't create a
4771 backend decl for a symbol incorrectly added to namespace.
4773 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4776 * resolve.c (resolve_symbol): Verify that parameter array has an
4777 explicit shape. Fix typos and coding style issues in surrounding
4780 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4783 * gfortran.texi: The documentation doesn't contain infomration on
4784 how to report bugs, and shouldn't, so remove the line which
4787 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4789 * intrinsic.c (sort_actual): Keep track of type of missing
4790 arguments. (Missing from previous commit.)
4792 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4794 * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
4795 * interface.c (compare_actual_formal): Keep type of omitted
4797 * trans-expr.c (gfc_conv_function_call): Add string length
4798 argument for omitted string argument.
4800 2004-06-03 Paul Brook <paul@codesourcery.com>
4802 * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
4803 lists instead of compound expr chains.
4804 (gfc_trans_code): Annotate statement lists.
4806 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4808 * trans-array.c: Fix spelling in comments.
4810 2004-06-02 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4813 * data.c (assign_substring_data_value): New function.
4814 (gfc_assign_data_value): Call the new function if we're dealing
4815 with a substring LHS.
4817 2004-06-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4820 * gfortran.h (GFC_VERSION): Remove.
4821 * gfortran.texi (version-gfortran): Remove, replace by version-GCC
4824 2004-05-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4826 * trans-types.c: Fix spelling & layout in comments.
4828 2004-05-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4831 * trans-const.c (gfc_conv_string_init): Allow variable string
4832 length lower than initialization string length.
4834 2004-05-30 Paul Brook <paul@codesourcery.com>
4837 * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
4838 * trans-expr.c (gfc_trans_string_copy): New function.
4839 (gfc_conv_statement_function): Use them. Create temp vars. Enforce
4841 (gfc_conv_string_parameter): Use gfc_trans_string_copy.
4842 * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
4843 * trans.h (struct gfc_saved_var): Define.
4844 (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
4846 2004-05-30 Steven G. Kargl <kargls@comcast.net>
4848 * iresolve.c (gfc_resolve_random_number): Clean up conditional.
4850 2004-05-29 Steven G. Kargl <kargls@comcast.net>
4852 * simplify.c (gfc_simplify_log): Remove useless line of code.
4854 2004-05-29 Paul Brook <paul@codesourcery.com>
4856 * trans-common.c (find_equivalence): Find multiple rules.
4858 2004-05-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4860 * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
4861 (gfc_current_locus): Declare new global variable.
4862 * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
4863 (gfc_current_locus1): Rename ...
4864 (gfc_current_locus): ... to this.
4865 (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
4866 skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
4867 gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
4868 gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
4869 and gfc_current_locus(), respectively.
4870 * array.c (match_subscript, gfc_match_array_ref, match_array_list,
4871 match_array_cons_element, gfc_match_array_constructor):
4872 Read/modify gfc_current_locus instead of calling gfc_set_locus()
4873 and gfc_current_locus().
4874 * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
4875 match_attr_spec, gfc_match_function_decl, gfc_match_end,
4876 attr_decl1, gfc_match_save): Likewise.
4877 * error.c (error_print, gfc_internal_error): Likewise.
4878 * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
4879 * interface.c (gfc_add_interface): Likewise.
4880 * io.c (gfc_match_format, match_dt_format, match_dt_element,
4881 match_io_iterator, match_io): Likewise.
4882 * match.c (gfc_match_space, gfc_match_eos,
4883 gfc_match_small_literal_int, gfc_match_st_label,
4884 gfc_match_strings, gfc_match_name, gfc_match_iterator,
4885 gfc_match_char, gfc_match, gfc_match_assignment,
4886 gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
4887 gfc_match_nullify, gfc_match_call, match_implicit_range,
4888 gfc_match_implicit, gfc_match_data, match_case_selector,
4889 gfc_match_case, match_forall_iterator): Likewise.
4890 * matchexp.c (gfc_match_defined_op_name, next_operator,
4891 match_level_1, match_mult_operand, match_ext_mult_operand,
4892 match_add_operand, match_ext_add_operand, match_level_2,
4893 match_level_3, match_level_4, match_and_operand, match_or_operand,
4894 match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
4895 * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
4896 * parse.c (match_word, decode_statement, next_free, next_fixed,
4897 add_statement, verify_st_order, parse_if_block, gfc_parse_file):
4899 * primary.c (match_digits, match_integer_constant,
4900 match_boz_constant, match_real_constant, match_substring,
4901 next_string_char, match_charkind_name, match_string_constant,
4902 match_logical_constant, match_const_complex_part,
4903 match_complex_constant, match_actual_arg, match_keyword_arg,
4904 gfc_match_actual_arglist, gfc_match_structure_constructor,
4905 gfc_match_rvalue, gfc_match_variable): Likewise.
4906 * st.c (gfc_get_code): Likewise.
4907 * symbol.c (check_conflict, check_used, check_done,
4908 duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
4909 gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
4910 gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
4912 2004-05-26 Roger Sayle <roger@eyesopen.com>
4914 * io.c (format_asterisk): Silence compiler warnings by correcting
4915 the number of elements of a "locus" initializer.
4917 2004-05-25 Roger Sayle <roger@eyesopen.com>
4920 * matchexp.c: Allow unary operators after arithmetic operators
4922 (match_ext_mult_operand, match_ext_add_operand): New functions.
4923 (match_mult_operand): Tweak to call match_ext_mult_operand.
4924 (match_add_operand): Tweak to call match_ext_mult_operand.
4925 (match_level_2): Rearrange to call match_ext_add_operand.
4927 2004-05-25 Paul Brook <paul@codesourcery.com>
4929 * expr.c (check_inquiry): Remove bogus tests.
4931 2004-05-23 Paul Brook <paul@codesourcery.com>
4934 * expr.c (restricted_args): Remove redundant checks/argument.
4935 (external_spec_function): Update to match.
4936 (restricted_intrinsic): Rewrite.
4938 2004-05-23 Paul Brook <paul@codesourcery.com>
4939 Victor Leikehman <lei@haifasphere.co.il>
4941 * gfortran.h (struct gfc_symbol): Add equiv_built.
4942 * trans-common.c: Change int to HOST_WIDE_INT. Capitalize error
4944 (current_length): Remove.
4945 (add_segments): New function.
4946 (build_equiv_decl): Create initialized common blocks.
4947 (build_common_decl): Always add decl to bindings.
4948 (create_common): Create initializers.
4949 (find_segment_info): Reformat to match coding conventions.
4950 (new_condition): Use add_segments.
4951 (add_condition, find_equivalence, add_equivalences): Move iteration
4952 inside functions. Only process each segment once.
4953 (new_segment, finish_equivalences, translate_common): Simplify.
4955 2004-05-23 Steven G. Kargl <kargls@comcast.net>
4957 * check.c (gfc_check_random_seed): Issue for too many arguments.
4959 2004-05-22 Steven G. Kargl <kargls@comcast.net>
4961 * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
4963 2004-05-22 Paul Brook <paul@codesourcery.com>
4965 * dump-parse-tree.c (gfc_show_equiv): New function.
4966 (gfc_show_namespace): Use it.
4968 2004-05-22 Victor Leikehman <lei@haifasphere.co.il>
4971 * symbol.c (gfc_add_common): Disable checks to work around other more
4972 fundamental inadequacies.
4974 2004-05-22 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
4976 * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
4978 (gfc_build_function_decl): Likewise.
4980 2004-05-22 Steven G. Kargl <kargls@comcast.net>
4982 * check.c (gfc_check_system_clock): New function.
4983 * intrinsic.c (add_sym_3s): New function.
4984 (add_subroutines): Use it.
4985 * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
4987 * iresolve.c (gfc_resolve_system_clock): New function.
4989 2004-05-22 Steven G. Kargl <kargls@comcast.net>
4991 * invoke.texi: Document -Wunderflow and spell check.
4992 * lang.opt: Add Wunderflow.
4993 * gfortran.h (gfc_option_t): Add warn_underflow option.
4994 * options.c (gfc_init_options, set_Wall): Use it.
4995 * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
4996 * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
4997 gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
4998 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
4999 * arith.c (common_logarithm): Fix typo in comment.
5001 2004-05-21 Roger Sayle <roger@eyesopen.com>
5003 * io.c (check_format): As a GNU extension, allow the comma after a
5004 string literal to be optional in a format. Use gfc_notify_std to
5005 issue an error/warning as appropriate.
5007 2004-05-21 Roger Sayle <roger@eyesopen.com>
5009 * io.c (check_format): Use gfc_notify_std to determine whether to
5010 issue an error/warning for omitting the digits from the X format.
5012 2004-05-20 Roger Sayle <roger@eyesopen.com>
5014 * io.c (check_format): Allow the number before the X format to
5015 be optional when not -pedantic.
5017 2004-05-18 Feng Wang <fengwang@nudt.edu.cn>
5018 Paul Brook <paul@codesourcery.com>
5020 * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
5021 Create decls for __builtin_pow{,f}.
5022 * gfortran.h (PREFIX_LEN): Define.
5023 * trans-decl.c (gfor_fndecl_math_powi): Add.
5024 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
5025 (gfc_build_intrinsic_function_decls): Create decls for powi.
5026 * trans-expr.c (powi_table): Add.
5027 (gfc_conv_integer_power): Remove.
5028 (gfc_conv_powi): New function.
5029 (gfc_conv_cst_int_power): New function.
5030 (gfc_conv_power_op): Use new powi routines.
5031 * trans.h (struct gfc_powdecl_list): Add.
5032 (gfor_fndecl_math_powi): Add.
5033 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
5035 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5037 * trans.c, trans-decl.c: Fix comment typos.
5039 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5041 * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
5043 2004-05-18 Steve Kargl <kargls@comcast.net>
5045 * arith.c (gfc_int2complex): Fix incorrect range checking.
5047 2004-05-18 Paul Brook <paul@codesourcery.com>
5050 * decl.c (add_init_expr_to_sym): Remove incorrect check.
5051 (default_initializer): Move to expr.c.
5052 (variable_decl): Don't assign default initializer to variables.
5053 * expr.c (gfc_default_initializer): Move to here.
5054 * gfortran.h (gfc_default_initializer): Add prototype.
5055 * resolve.c (resolve_symbol): Check for illegal initializers.
5056 Assign default initializer.
5058 2004-05-17 Steve Kargl <kargls@comcast.net>
5060 * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
5062 2004-05-17 Steve Kargl <kargls@comcast.net>
5064 * arith.c (gfc_real2complex): Range checking wrong part of complex
5067 2004-05-16 Paul Brook <paul@codesourcery.com>
5069 * options.c (gfc_handle_module_path_options): Fix buffer overrun.
5071 2004-05-16 Paul Brook <paul@codesourcery.com>
5073 * arith.c (gfc_range_check): Fix logic error.
5075 2004-05-16 Steve Kargl <sgk@troutmask.apl.washington.edu>
5077 * arith.c: Fix comment typos.
5079 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5082 * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
5083 not initialized in a disallowed fashion.
5084 * match.c (gfc_match_common): Likewise.
5085 (var_element): Verify that variable is not in the blank COMMON,
5086 if it is in a common.
5088 2004-05-15 Joseph S. Myers <jsm@polyomino.org.uk>
5090 * Make-lang.in (f95.generated-manpages): Remove.
5091 (f95.srcextra): New.
5092 (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
5093 f95.maintainer-clean): Generate info and dvi files in objdir/doc.
5096 (f95.install-info): Remove.
5097 (install-info): New.
5099 2004-05-15 Victor Leikehman <lei@haifasphere.co.il>
5101 * decl.c (add_init_expr_to_sym): Check for variable size arrays.
5103 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5105 * primary.c (match_boz_constant): Use gfc_notify_std() for
5106 issuing a warning or an error.
5108 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5111 * primary.c (match_structure_constructor): Rename ...
5112 (gfc_match_structure_constructor): ... to this. Make non-static.
5113 (gfc_match_rvalue): Call renamed function.
5114 * match.h (gfc_match_structure_constructor): Declare.
5115 * match.c (gfc_match_data_constant): Handle structure
5118 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5122 * gfortran.h (gfc_linebuf): New typedef.
5124 (gfc_file): Revamped, use new gfc_linebuf.
5125 (locus): Revamped, use new types.
5126 (gfc_current_file): Remove.
5127 (gfc_current_form, gfc_source_file): New global variables.
5128 * match.c (gfc_match_space, gfc_match_strings): Use
5129 gfc_current_form to find source form.
5130 * module.c (gfc_dump_module): Use gfc_source_file when printing
5132 * error.c (show_locus, show_loci) Use new data structures to print
5134 * scanner.c (first_file, first_duplicated_file, gfc_current_file):
5136 (file_head, current_file, gfc_current_form, line_head, line_tail,
5137 gfc_current_locus1, gfc_source_file): New global variables.
5138 (gfc_scanner_init1): Set new global variables.
5139 (gfc_scanner_done1): Free new data structures.
5140 (gfc_current_locus): Return pointer to gfc_current_locus1.
5141 (gfc_set_locus): Set gfc_current_locus1.
5142 (gfc_at_eof): Set new variables.
5143 (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
5144 to new locus structure.
5145 (gfc_check_include): Remove.
5146 (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
5147 (gfc_skip_comments): Use gfc_current_form, find locus with
5149 (gfc_next_char): Use gfc_current_form.
5150 (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
5151 (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
5153 (get_file): New function.
5154 (preprocessor_line, include_line): New functions.
5155 (load_file): Move down, rewrite to match new data structures.
5156 (gfc_new_file): Rewrite to match new data structures.
5157 * parse.c (next_statement): Remove code which is now useless. Use
5158 gfc_source_form and gfc_source_file where appropriate.
5159 * trans-decl.c (gfc_get_label_decl): adapt to new data structures
5160 when determining locus of frontend code.
5161 * trans-io.c (set_error_locus): Same.
5162 * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
5163 * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
5165 (all): Add missing initializers.
5167 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5169 * Make-lang.in (trans-common.o): Remove redundant dependency.
5170 (data.c): Replace object file name ...
5171 (data.o): ... by the correct one.
5173 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5175 * dump-parse-tree.c (gfc_show_array_ref): Print colon only
5176 for ranges when dumping array references.
5178 2004-05-14 Victor Leikehman <lei@haifasphere.co.il>
5180 * decl.c (variable_decl): Always apply default initializer.
5182 2004-05-08 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5185 * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
5186 handle zero correctly.
5188 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5190 * match.c (gfc_match): Eliminate dead code.
5192 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5194 * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
5195 Detect bad continuation line in fixed form sources.
5197 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5200 * iresolve.c (gfc_resolve_nearest): Add new function.
5201 * intrinsic.h: ... declare it here.
5202 * intrinsic.c (add_functions): ... add it as resolving function
5205 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5208 * match.c (gfc_match_do): Allow infinite loops with
5209 label-do-stmt. Do not enforce space after comma.
5211 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5214 * parse.c (parse_interface): Allow empty INTERFACE, remove
5217 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5219 * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
5220 decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
5221 expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
5222 intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
5223 matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
5224 primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
5225 trans-array.c, trans-array.h, trans-common.c, trans-const.c,
5226 trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
5227 trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
5228 trans-types.h, trans.c, trans.h: Update copyright years and
5230 * data.c: Likewise, also removed two whitespace-only lines.
5231 * gfortranspec.c, lang.opt: Update copyright years.
5233 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5236 * trans-decl.c (generate_local_decl): Don't warn for unused
5237 variables which are in common blocks.
5239 2004-05-13 Diego Novillo <dnovillo@redhat.com>
5241 * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
5242 trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
5243 trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
5245 2004-05-13 Victor Leikehman <lei@haifasphere.co.il>
5248 * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
5250 2004-05-13 Joseph S. Myers <jsm@polyomino.org.uk>
5252 * gfortran.texi: Use @table @emph instead of @itemize @emph.
5253 Remove "set DEVELOPMENT".
5254 (Compiling GFORTRAN): Remove.
5256 2004-05-09 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5258 * array.c (match_subscript, match_array_ref): Add comments
5259 explaining argument 'init'.
5260 * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
5261 trans-expr.c, trans.c: Fix some typos in comments.
5262 * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
5263 * primary.c (match_digits, match_integer_constant): Add comment
5264 explaining signflag.
5266 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5269 * primary.c: Include system.h and flags.h, needed for pedantic.
5270 (match_boz_constant): Allow "x" for hexadecimal constants, warn if
5273 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5276 * match.c (match_data_constant): Handle case where
5277 gfc_find_symbol sets sym to NULL
5279 2004-04-28 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5281 * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
5282 dependency on mathbuiltins.def
5284 2004-04-24 Victor Leikehman <lei@il.ibm.com>
5286 * trans-io.c (transfer_expr): Implemented recursive printing
5289 2004-04-24 Andrew Pinski <pinskia@physics.uc.edu>
5291 * gfortranspec.c: Do not include multilib.h.
5293 2004-04-24 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5295 * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
5296 2004 to copyright years.
5297 * trans-expr.c, trans-decl.c: Comment update, we now generate
5298 GENERIC, not SIMPLE. Add 2004 to copyright years.
5300 2004-04-24 Paul Brook <paul@codesourcery.com>
5302 * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
5304 2004-04-24 Feng Wang <fengwang@nudt.edu.cn>
5307 * arith.c (gfc_arith_divide): Fix complex divide.
5309 2004-04-23 Andrew Pinski <pinskia@physics.uc.edu>
5311 * gfortranspec.c: Include the target headers.
5313 2004-04-18 Feng Wang <fengwang@nudt.edu.cn>
5317 * arith.c (arctangent2): New function.
5318 * arith.h (arctangent2): Add function prototype.
5319 * simplify.c (gfc_simplify_atan2): Use it.
5320 (gfc_simplify_log): Use it.
5322 2004-04-12 Diego Novillo <dnovillo@redhat.com>
5324 * fortran/f95-lang.c (gfc_expand_stmt): Remove.
5325 (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
5327 2004-04-11 Bud Davis <bdavis9659@comcast.net>
5330 * trans-io.c (build_dt): Change REC to value.
5332 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
5335 * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
5336 the real value when converting mpf to string.
5338 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
5341 * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
5344 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
5347 * simplify.c (simplify_min_max): Convert the type of the result.
5349 2004-04-11 Paul Brook <paul@codesourcery.com>
5351 * gfortran.texi: Use full target triplet.
5353 2004-04-11 Paul Brook <paul@codesourcery.com>
5355 * Make-lang.in (GFORTRAN_TEXI): Set it.
5356 (fortran/dfortran.dvi): Use it. Add fortran to include paths.
5357 (fortran/gfortran.info): Ditto.
5358 * gfortran.texi: Major update.
5359 * invoke.texi: New file.
5361 2004-04-10 Paul Brook <paul@codesourcery.com>
5363 * trans-array.c (gfc_trans_allocate_temp_array,
5364 gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
5365 * trans-decl.c (gfc_build_dummy_array_decl,
5366 gfc_get_symbol_decl, gfc_build_function_decl,
5367 gfc_create_module_variable): Ditto.
5368 * trans-expr.c (gfc_conv_variable): Ditto.
5369 * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
5370 * trans.h (GFC_DECL_STRING): Remove.
5371 (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
5372 GFC_DECL_ASSIGN): Renumber flags.
5374 2004-04-05 Paul Brook <paul@codesourcery.com>
5378 * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
5380 * gfortran.h (struct gfc_charlen): Add backend_decl.
5381 * trans-array.c (gfc_trans_allocate_temp_array,
5382 gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
5383 (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
5384 Remove old, broken string handling.
5385 (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
5386 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
5387 gfc_trans_deferred_array): Handle character arrays.
5388 * trans-const.c (gfc_conv_const_charlen): New function.
5389 * trans-const.h (gfc_conv_const_charlen): Add prototype.
5390 * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
5392 (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
5393 (gfc_create_string_length): New function.
5394 (gfc_get_symbol_decl): Create lengths for character variables.
5395 (gfc_get_fake_result_decl): Ditto.
5396 (gfc_build_function_decl): Only set length for assumed length
5397 character arguments.
5398 (gfc_trans_dummy_character): New function.
5399 (gfc_trans_auto_character_variable): Rewrite.
5400 (gfc_trans_deferred_vars): Handle more types of character variable.
5401 (gfc_create_module_variable): String lengths have moved.
5402 (gfc_generate_function_code): Initialize deferred var chain earlier.
5403 * trans-expr.c (gfc_conv_init_string_length): Rename ...
5404 (gfc_trans_init_string_length): ... to this.
5405 (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
5406 gfc_conv_function_call): Update to new format for character variables.
5407 (gfc_conv_string_length): Remove.
5408 (gfc_conv_string_parameter): Update assertion.
5409 * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
5410 * trans-io.c (set_string): Use new macro names.
5411 * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
5412 * trans-types.c (gfc_get_character_type): Use existing length expr.
5413 (gfc_is_nodesc_array): Make public.
5414 (gfc_get_dtype_cst): Rename ...
5415 (gfc_get_dtype): ... to this. Handle unknown size arrays.
5416 (gfc_get_nodesc_array_type): Use new name.
5417 (gfc_sym_type): New character variable code.
5418 (gfc_get_derived_type): Ditto.
5419 (gfc_get_function_type): Evaluate character variable lengths.
5420 * trans-types.h (gfc_strlen_kind): Define.
5421 (gfc_is_nodesc_array): Add prototype.
5422 * trans.h: Update prototypes.
5423 (struct lang_type): Update comments.
5424 (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
5425 (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
5427 2004-04-04 Paul Brook <paul@codesourcery.com>
5429 * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
5430 * options.c (gfc_init.options, gfc_handle_option): Ditto.
5431 * trans-expr.c (gfc_conv_function_call): Ditto.
5432 * trans-types.c (gfc_is_nodesc_array): Ditto
5433 * lang.opt (fg77-calls): Remove.
5435 2004-04-04 Paul Brook <paul@codesourcery.com>
5437 * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
5438 (gfc_conv_descriptor_base): Rename ...
5439 (gfc_conv_descriptor_offset): ... to this.
5440 (gfc_trans_allocate_array_storage): Set offset to zero.
5441 (gfc_conv_array_base): Rename ...
5442 (gfc_conv_array_offset): ... to this.
5443 (gfc_conv_array_index_ref): Add offset parameter.
5444 (gfc_conv_array_ref): Include offset.
5445 (gfc_trans_preloop_setup): Use existing offset.
5446 (gfc_trans_allocate_temp_array, gfc_array_allocate,
5447 gfc_trans_auto_array_allocation, gfc_trans_g77_array,
5448 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
5449 gfc_conf_ss_descriptor): Set offset.
5450 * trans-array.h: Rename prototypes.
5451 * trans-const.h (gfc_index_zero_node): Define.
5452 * trans-decl.c (gfc_build_qualified_array): Change base to offset.
5453 * trans-types.c (gfc_get_array_type_bounds): Ditto.
5454 (gfc_get_nodesc_array_type): Calculate offset before upper bound.
5456 2004-03-25 Diego Novillo <dnovillo@redhat.com>
5458 * convert.c (convert): Don't handle WITH_RECORD_EXPR.
5460 2004-03-24 Bud Davis <bdavis9659@comcast.net>
5463 * arith.c (gfc_convert_integer,gfc_convert_real): Removed leading '+'
5464 before conversion by gmp library call.
5466 2004-03-24 Bud Davis <bdavis9659@comcast.net>
5469 * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
5471 2004-02-24 Richard Henderson <rth@redhat.com>
5473 * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
5475 2004-02-19 Loren J. Rittle <ljrittle@acm.org>
5477 * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
5478 (fortran/gfortran.info): ... to here.
5481 2004-02-16 Richard Henderson <rth@redhat.com>
5483 * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
5484 * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
5485 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
5486 (gfc_expand_function): Rename from expand_function_body, make static,
5487 don't do anything except invoke tree_rest_of_compilation.
5488 (gfc_be_parse_file): Invoke cgraph.
5489 (gfc_expand_decl): Remove.
5490 (gfc_init_builtin_functions): Add __builtin_init_trampoline and
5491 __builtin_adjust_trampoline.
5492 * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
5493 (gfc_finalize): New.
5494 (gfc_generate_function_code): Use it. Lower nested functions.
5495 * trans-expr.c (gfc_conv_function_call): Add static chain operand
5497 * trans.c (gfc_build_function_call): Likewise.
5498 * trans.h (expand_function_body): Remove.
5500 2004-02-15 Victor Leikehman <lei@il.ibm.com>
5503 * trans-decl.c (gfc_build_function_decl) For functions
5504 returning CHARACTER pass an extra length argument,
5505 following g77 calling conventions.
5506 * trans-types.c (gfc_get_function_type) Ditto.
5507 * trans-expr.c (gfc_conv_function_call) Ditto.
5509 2004-02-14 Paul Brook <paul@codesourcery.com>
5511 * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
5513 2004-02-12 Paul Brook <paul@nowt.org>
5517 2004-02-08 Steve Kargl <sgk@troutmask.apl.washington.edu>
5519 * gfortran.texi: Fix typos.
5521 2004-02-07 Bud Davis <bdavis9659@comcast.net>
5524 * intrinsic.c (add_conversions) Use logical conversion instead
5526 * trans-types.c (gfc_get_logical_type) implemented logical*1
5529 2004-01-17 Paul Brook <paul@codesourcery.com>
5531 * lang-specs.h: Remove %<fixed-form.
5533 2004-01-15 Toon Moene <toon@moene.indiv.nluug.nl>
5535 * lang-specs.h: Enable preprocessing of source files
5536 ending in .F, .fpp, .FPP, .F90 and .F95.
5538 2004-01-13 Toon Moene <toon@moene.indiv.nluug.nl>
5541 * lang-specs.h: Enable compilation of files ending
5542 in .f, .for and .FOR.
5544 2004-01-11 Paul Brook <paul@codesourcery.com>
5546 * trans-stmt.c (gfc_trans_if_1): New function.
5547 (gfc_trans_if): Use it.
5549 2004-01-11 Erik Schnetter <schnetter@uni-tuebingen.de>
5551 * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
5552 (gfc_option_t): Add max_identifier_length.
5553 * lang.opt: Add fmax-identifier-length.
5554 * match.c (parse_name): Use limit.
5555 * options.c (gfc_init_options): Set max_identifier_length.
5556 (gfc_handle_option): Ditto.
5558 2004-01-11 Feng Wang <fengwang@nudt.edu.cn>
5560 * intrinsic.c (add_functions): Add resolve function to dcmplx.
5561 * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
5562 * iresolve.c (gfc_resolve_dcmplx): New function.
5564 2004-01-10 Paul Brook <paul@codesourcery.com>
5566 * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
5567 * trans-types.c (gfc_sym_type): Handle external dummy procedures.
5568 (gfc_return_by_reference): Correct condition.
5569 (gfc_get_function_type): Ditto.
5571 2004-01-10 Paul Brook <paul@codesourcery.com>
5573 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
5576 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
5578 * iresolve.c: Use correct kind.
5580 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
5583 * trans-decl.c (gfc_create_module_variable): Output array valued
5586 2004-01-10 Paul Brook <paul@codesourcery.com>
5588 * resolve.c (resolve_branch): Get error message right way round.
5590 2004-01-10 Canqun Yang <canqun@nudt.edu.cn>
5592 * trans-array (gfc_conv_loop_setup): Adjust comment to track
5594 (gfc_array_allocate): Don't count size of element twice.
5596 2004-01-04 Paul Brook <paul@codesourcery.com>
5598 * lang.opt (i8, r8, std=*): Remove RejectNegative.
5600 2004-01-04 Paul Brook <paul@codesourcery.com>
5602 * error.c (gfc_notify_std): New function.
5603 * gfortran.h (gfc_notify_std): Declare.
5604 (GFC_STD_*): Define.
5605 (gfc_option_t): Add warn_std and allow_std.
5606 * intrinsic.c (gfc_init_expr_extensions): Fix logic.
5607 (gfc_intrinsic_func_interface): Use gfc_notify_std.
5608 * check.c (check_rest): Use gfc_notify_std.
5609 * match.c (gfc_match_pause): Ditto.
5610 (gfc_match_assign): Ditto.
5611 (gfc_match_goto): Ditto.
5612 * resolve.c (resolve_branch): Ditto.
5613 * lang.opt: Add std=<foo> and w.
5614 * options.c (gfc_init_options): Set allow_std and warn_std.
5615 (gfc_handle_option): Handle OPT_std_* and OPT_w.
5617 2004-01-01 Paul Brook <paul@codesourcery.com>
5619 * array.c (gfc_append_constructor): Take constructor, not expression.
5620 * data.c (struct gfc_expr_stack): Remove.
5621 (expr_stack): Remove.
5622 (find_con_by_offset): Rename from find_expr_in_con.
5623 (find_con_by_component): Rename from find_component_in_con.
5624 (gfc_get_expr_stack): Remove.
5625 (gfc_assign_data_value): Rewrite.
5626 (gfc_expr_push): Remove.
5627 (gfc_expr_pop): Remove.
5628 (gfc_advance_section): Rename from
5629 gfc_modify_index_and_calculate_offset. Handle unbounded sections.
5630 (gfc_get_section_index): Handle unbounded sections.
5631 * gfortran.h: Update prototypes.
5632 * resolve.c (check_data_variable): Array section maight not be the
5635 2004-01-01 Paul Brook <paul@codesourcery.com>
5638 * resolve.c (resolve_symbol): Allow assumed length function results.
5640 2004-01-01 Steve Kargl <sgk@troutmask.apl.washington.edu>
5642 * match.c (gfc_match_pause): Fix spelling.
5644 2004-01-01 Steven Bosscher <stevenb@suse.de>
5647 * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
5648 reference from the expression.
5650 2003-12-26 Feng Wang <fengwang@nudt.edu.cn>
5652 * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
5654 * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
5655 (gfc_exec_op): New EXEC_LABEL_ASSIGN.
5656 (symbol_attribute):New variable attribute: assign.
5657 * io.c (resolve_tag):Integer variable is allowed.
5658 (match_dt_format): Add ASSIGN statement. Set assign flag.
5659 * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
5660 (gfc_match_assign): Add ASSIGN statement. Set assign flag.
5661 (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
5662 * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
5663 (next_statement): Add ST_LABEL_ASSIGNMENT.
5664 (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
5665 * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
5666 (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
5667 * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
5668 * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
5669 assign. Put them into the stuct lang_decl.
5670 * trans-io.c (set_string): Add the assign statement.
5671 * trans-stmt.c (gfc_trans_label_assign): New function.
5672 (gfc_trans_goto): Translate ASSIGNED GOTO statement.
5673 * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
5674 * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
5675 * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
5676 (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
5677 (GFC_DECL_ASSIGN(node)): New macro to access flag.
5679 2003-12-31 Huang Chun <chunhuang73@hotmail.com>
5682 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
5685 2003-12-22 Toon Moene <toon@moene.indiv.nluug.nl>
5687 * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
5688 that arguments to subroutines/functions can't alias themselves, nor global
5691 2003-12-20 Steven Bosscher <stevenb@suse.de>
5693 * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
5694 * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
5696 2003-12-12 Huang Chun <chunhuang73@hotmail.com>
5698 * primary.c (match_substring): Fix substring bug for start point
5699 or end point is NULL.
5700 * trans-expr.c (gfc_conv_substring): Ditto
5701 * trans-types.c (gfc_sym_type): Get correct type of scalar
5702 character variables.
5703 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
5706 2003-12-10 Richard Henderson <rth@redhat.com>
5708 * options.c (gfc_post_options): Don't ever use rtl inlining.
5710 2003-12-05 Canqun Yang <canqun@nudt.edu.cn>
5712 * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
5713 * trans-equivalence.c: Remove.
5714 * trans-decl.c (gfc_get_symbol_decl): Update to match.
5715 (gfc_generate_function_code): Ditto.
5716 * trans-array.c (gfc_conv_array_parameter): Ditto.
5717 * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
5718 (F95_ADDITIONAL_OBJS): Add stor-layout.o
5719 * trans.h (gfc_trans_equivalence): Remove.
5720 * gfortran.h (struct gfc_equiv): Add used field.
5721 (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
5722 equiv_offset fields.
5724 2003-12-05 Richard Henderson <rth@redhat.com>
5726 * trans.c (gfc_build_addr_expr): New.
5727 (gfc_build_indirect_ref, gfc_build_array_ref): New.
5728 * trans.h: Declare them.
5729 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
5730 trans-stmt.c, trans.c (*): Use them.
5732 * f95-lang.c (gfc_post_options): Remove dead prototype.
5733 * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
5734 * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
5737 2003-12-01 Feng Wang <fengwang@nudt.edu.cn>
5739 * io.c (gfc_match_format): Check for missing format label.
5741 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
5744 * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
5745 from interfaces in modules.
5747 2003-11-30 Paul Brook <paul@nowt.org>
5749 * trans-array.c (gfc_trans_g77_array): Make non-static.
5750 (gfc_trans_assumed_size): Remove.
5751 (gfc_trans_dummy_array_bias): Explicitly free temporary.
5752 * trans-array.h (gfc_trans_g77_array): Add prototype.
5753 (gfc_trans_assumed_size): Remove.
5754 * trans-decls.c (gfor_fndecl_push_context): Remove.
5755 (gfor_fndecl_pop_context): Remove.
5756 (gfc_build_function)decls): Don't create them.
5757 (gfc_trans_deferred_vars): Update to match. Remove dead code.
5758 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
5760 2003-11-30 Kejia Zhao <kejia_zh@nudt.edu.cn>
5762 * trans-array.c (gfc_conv_array_parameter): Simplify
5763 array argument passing for array name actual argument.
5764 * trans-expr.c (gfc_conv_function_call): Ditto
5765 * trans-types.c (gfc_is_nodesc_array):Ditto.
5767 2003-11-30 Paul Brook <paul@nowt.org>
5769 * f95-lang.c (gfc_post_options): Move ...
5770 * options.c (gfc_post_options): .. to here. Handle inlining options.
5771 * gfortran.h (gfc_post_options): Add prototype.
5773 2003-11-28 Richard Henderson <rth@redhat.com>
5775 * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
5777 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
5779 * trans.h (has_alternate_specifier): New global variable.
5780 * match.c (gfc_match_call): Handle actual arguments associated with
5781 alternate return indicators.
5782 * trans-expr.c (gfc_conv_function_call): Ditto
5783 * trans-stmt.c (gfc_trans_call): Ditto
5784 (gfc_trans_return): Handle return statement with value.
5785 * trans-decl.c (gfc_generate_function_code): Handle functions with
5787 (gfc_get_fake_result_decl): Ditto
5788 * trans-types.c (gfc_get_function_type): Ditto
5789 * resolve.c (resolve_actual_arglist): Check alternate return indicators.
5790 (resolve_formal_arglist): Check asterisk dummy.
5792 2003-11-27 Paul Brook <paul@nowt.org>
5794 * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
5795 allocation interface.
5796 (gfc_conv_ array_parameter): Ditto.
5797 (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
5798 * trans-array.c: Update prototype.
5799 * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
5800 (gfc_trans_auto_character_variable): Use new memory alloc interface.
5801 * trans-expr.c (gfc_conv_string_tmp): Ditto.
5802 (gfc_conv_function_call): Use gfc_conv_string_tmp.
5803 * trans-stmt.c (gfc_do_allocate): Use new memory alloc interface.
5804 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
5805 * trans.h (gfc_ss_info): Remove unused pdata field.
5806 * trans.c (gfc_create_var_np): Change T to V.
5808 2003-11-26 Richard Henderson <rth@redhat.com>
5810 * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
5811 * trans-intrinsic.c (gfc_intrinsic_map): ... here. Add SCALE,
5812 FRACTION, NEAREST, SET_EXPONENT.
5813 (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
5814 Fix GTY marking. Remove unnecessary const's.
5815 (LIBM_FUNCTION): Rename from I_LIB.
5816 (LIBF_FUNCTION): New.
5817 (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
5818 conventions. Assume the expr signature is correct. Mark const.
5819 (gfc_conv_intrinsic_exponent): Use library functions.
5820 (gfc_conv_intrinsic_set_exponent): Remove.
5821 (gfc_conv_intrinsic_scale): Remove.
5822 (gfc_conv_intrinsic_nearest): Remove.
5823 (gfc_conv_intrinsic_fraction): Remove.
5824 (gfc_conv_intrinsic_function): Update.
5825 * trans-decl.c (gfor_fndecl_math_exponent4): New.
5826 (gfor_fndecl_math_exponent8): New.
5827 (gfc_build_intrinsic_function_decls): Set them.
5828 * trans.h: Declare them.
5830 2003-11-25 Canqun Yang <canqun@nudt.edu.cn>
5832 * trans-common.c (gfc_layout_global_equiv): Locate the error for
5833 underflow COMMON block.
5834 (gfc_trans_one_common): Fix bug for size of COMMON block containing
5835 EQUIVALENCE object. Also fix typo in an error message.
5837 2003-11-25 Diego Novillo <dnovillo@redhat.com>
5839 * Make-lang.in: Add check-gfortran to lang_checks.
5840 (check-f95): Alias for check-gfortran.
5842 2003-11-25 Jason Merrill <jason@redhat.com>
5844 * Make-lang.in (f95.tags): Create TAGS.sub files in each
5845 directory and TAGS files that include them for each front end.
5847 2003-11-24 Paul Brook <paul@nowt.org>
5850 * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
5852 2003-11-24 Paul Brook <paul@nowt.org>
5854 * expr.c (simplify_const_ref): Return SUCCESS for things we don't
5856 * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
5858 2003-11-24 Paul Brook <paul@nowt.org>
5861 * array.c (gfc_array_ref_shape): Handle elemental dimensions.
5862 * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
5864 2003-11-20 Richard Henderson <rth@redhat.com>
5866 * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
5867 (gfc_conv_array_base): Likewise.
5868 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
5869 * trans-expr.c (gfc_conv_string_tmp): Likewise.
5870 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
5871 * trans-stmt.c (gfc_trans_character_select): Likewise.
5873 2003-11-13 Paul Brook <paul@nowt.org>
5875 * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
5877 2003-11-13 Canqun Yang <canqun@nudt.edu.cn>
5879 * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
5880 (resolve_equivalence): New function.
5881 (resolve_equivalence_derived): New function.
5883 2003-11-12 Richard Henderson <rth@redhat.com>
5885 * trans.c (gfc_trans_code): Use annotate_with_locus instead of
5886 annotate_all_with_locus.
5888 2003-11-11 Canqun Yang <canqun@nudt.edu.cn>
5890 * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
5891 * trans-decl.c (gfc_finish_var_decl): Modified.
5893 2003-11-08 Paul Brook <paul@nowt.org>
5896 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
5899 2003-11-06 Paul Brook <paul@nowt.org>
5901 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
5903 2003-11-02 Canqun Yang <canqun@nudt.edu.cn>
5905 * match.c (gfc_match_stopcode): Assign '0' to stop_code.
5907 2003-10-27 Anthony Green <green@redhat.com>
5909 * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
5910 (f95.stagefeedback): Ditto.
5912 2003-10-27 Andrew Pinski <pinskia@physics.uc.edu>
5915 * Make-lang.in (f95.stageprofile): Add.
5916 (f95.stagefeedback): Add.
5918 2003-10-23 Richard Henderson <rth@redhat.com>
5920 * f96-lang.c (gfc_gimplify_expr): Remove.
5921 (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
5922 (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
5924 2003-10-23 Richard Henderson <rth@redhat.com>
5926 * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
5928 2003-10-20 Paul Brook <paul@nowt.org>
5930 * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
5931 * trans-stmt.c (gfc_trans_do_while): Ditto.
5933 2003-10-17 Paul Brook <paul@nowt.org>
5935 * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
5937 2003-10-17 Paul Brook <paul@nowt.org>
5939 * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
5941 2003-10-17 Feng Wang <wf_cs@yahoo.com>
5943 * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
5944 (gfc_resolve_minloc): Ditto.
5945 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
5946 Return the value after subtracting the lower bound.
5948 2003-10-16 Richard Henderson <rth@redhat.com>
5950 * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
5952 2003-10-16 Steven Bosscher <steven@gcc.gnu.org>
5954 * lang.c: Remove -M option for now, it's in the way for C.
5956 2003-10-14 Jason Merrill <jason@redhat.com>
5958 * Make-lang.in (f95.tags): New rule.
5960 2003-10-13 Richard Henderson <rth@redhat.com>
5962 * trans.c (gfc_trans_code): Use annotate_all_with_locus.
5964 2003-10-13 Paul Brook <paul@nowt.org>
5966 * trans-decl.c (generate_local_decl): Don't create junk variables.
5968 2003-10-13 Paul Brook <paul@nowt.org>
5970 * resolve.c (resolve_formal_arglist): Use function result decl in
5971 preference to function decl.
5973 2003-10-12 Richard Henderson <rth@redhat.com>
5975 * f95-lang.c (gfc_define_builtin): New const_p argument. Set
5976 TREE_READONLY. Update all callers.
5978 2003-10-12 Feng Wang <wf_cs@yahoo.com>
5980 * iresolve.c (gfc_resolve_cshift): Change to match implementation.
5981 * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
5982 (gfc_is_intrinsic_libcall): Add CSHIFT.
5984 2003-10-12 Richard Henderson <rth@redhat.com>
5986 * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
5987 (gfc_trans_array_constructor_value): Likewise.
5988 (gfc_conv_array_initializer): Likewise.
5989 * trans-stmt.c (gfc_trans_character_select): Likewise.
5991 2003-11-12 Kejia Zhao <kejia_zh@yahoo.com.cn>
5993 * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
5995 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
5997 * check.c (gfc_check_repeat): Check arguments are scalar.
5998 (gfc_check_trim): New function.
5999 * intrinsic.h (gfc_check_trim): Add prototype.
6000 * intrinsic.c (add_functions): Use it.
6001 * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
6003 * trans-decl.c: Ditto.
6004 (gfc_build_intrinsic_fucntion_decls): Set them.
6005 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
6006 (gfc_conv_intrinsic_trim): New function.
6007 (gfc_conv_intrinsic_repeat): New function.
6008 (gfc_conv_intrinsic_function): Use them.
6010 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
6012 * trans-types.c (gfc_sym_type): Handle result variables.
6014 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
6016 * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
6017 gfc_get_character_type.
6019 2003-10-11 Feng Wang <wf_cs@yahoo.com>
6021 * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
6023 2003-10-11 Paul Brook <paul@nowt.org>
6025 * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
6026 (gfc_resolve_dprod): New function.
6027 (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
6028 * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
6029 (gfc_resolve_dprod): Declare.
6030 * intrinsic.c (add_functions): Use them.
6031 * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
6033 2003-10-06 Richard Henderson <rth@redhat.com>
6035 * f95-lang.c (gfc_init_builtin_functions): Add clzll.
6036 * trans-intrinsic.c (call_builtin_clz): Use it.
6038 2003-10-05 Paul Brook <paul@nowt.org>
6040 * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
6041 * trans-decl.c (gfc_generate_function_code): Set
6042 cfun->function_end_locus.
6044 2003-09-24 Jason Merrill <jason@redhat.com>
6046 * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
6049 2003-09-21 Lifang Zeng <zlf605@hotmail.com>
6050 Paul Brook <paul@nowt.org>
6052 * Make-lang.in (F95_OBJS): Add fortran/data.o.
6053 * array.c (gfc_inser_constructor): New function.
6054 (gfc_get_constructor): New function.
6055 (gfc_free_constructor): Initialize offset and repeat.
6056 (iterator_stack): Remove.
6057 (expand_info): Add offset, component and repeat fields.
6058 (expand_constructor): Set them.
6059 (expand): Set new fields.
6060 (gfc_copy_constructor): Ditto. Avoid recursion.
6061 * gfortran.h: Add prototypes for new functions.
6062 (gfc_constructor): Add offset, component and repeat.
6063 (iteratio_stack): Move to here.
6064 * resolve.c (check_data_variable): Convert data values into variable
6066 (traverse_data_list): Build implicit loop chain.
6067 (gfc_resolve): Ditto.
6068 * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
6069 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
6070 * trans-expr.c (gfc_conv_structure): Handle array initializers.
6071 (gfc_conv_expr): Update to match.
6072 * trans.h (gfc_conv_structure): Declare.
6075 2003-09-20 Kejia Zhao <kejia_zh@yahoo.com.cn>
6077 * trans.h: Add declarations for gfor_fndecl_si_kind and
6078 gfor_fndecl_sr_kind.
6079 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
6080 * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
6081 (g95_conv_intrinsic_sr_kind): New function.
6082 (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
6085 2003-09-17 Lars Segerlund <Lars.Segerlund@comsys.se>
6087 * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
6088 instead of _4 and _8 as postfix for libgfortran calls.
6090 2003-09-16 Paul Brook <paul@nowt.org>
6092 * array.c (compare_bounds): New function.
6093 (gfc_compare_array_spec): Use it.
6095 2003-09-14 Paul Brook <paul@nowt.org>
6097 * primary.c (gfc_match_rvalue): Make sure sym->result is set.
6098 * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
6100 2003-09-14 Paul Brook <paul@nowt.org>
6102 * check.c (dim_rank_check): Allow assumed bounds if requested.
6103 (gfc_check_lbound): Call it.
6104 (gfc_check_ubound): Ditto.
6105 (gfc_check_size): Change to match.
6106 * simplify.c (gfc_simplify_bound): New function.
6107 (gfc_simplify_lbound): New function.
6108 (gfc_simplify_ubound): New function.
6109 * intrinsic.h: Declare them.
6110 * intrinsic.c (add_functions): Use them.
6112 2003-09-14 Paul Brook <paul@nowt.org>
6114 * io.c (format_lex): Initialize negative_flag.
6115 (check_format): Intialize repeat.
6116 * trans-io.c (gfc_new_nml_name_expr): Declare static.
6117 (gfc_new_var_expr): Ditto.
6119 2003-09-14 Paul Brook <paul@nowt.org>
6121 * trans-array.c (gfc_conv_array_initializer): Handle derived types.
6122 * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
6124 2003-09-12 Paul Brook <paul@nowt.org>
6126 * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
6128 2003-09-12 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
6130 * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
6131 for a correct expression.
6133 2003-09-10 Kejia Zhao <kejia_zh@yahoo.com.cn>
6135 * trans-intrinsic.c (real_compnt_info): New struct.
6136 (prepare_arg_info): New function.
6137 (gfc_conv_intrinsic_set_exponent): New function.
6138 (gfc_conv_intrinsic_scale): New function.
6139 (gfc_conv_intrinsic_nearest): New function.
6140 (gfc_conv_intrinsic_fraction): New function.
6141 (gfc_conv_intrinsic_exponent): New function.
6142 (gfc_conv_intrinsic_spacing): New function.
6143 (gfc_conv_intrinsic_rrspacing): New function.
6144 (gfc_conv_intrinsic_function): Use them.
6146 2003-08-24 XiaoQiang Zhang (zhangapache@yahoo.com>
6148 * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
6149 build_int_2 changed from (high, low) to (low, high).
6150 * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
6151 ioparm_namelist_read_mode, iocall_set_nml_val_int,
6152 iocall_set_nml_val_float, iocall_set_nml_val_char,
6153 iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
6154 (gfc_build_io_library_fndecls): Add variable initialization.
6155 (gfc_new_nml_name_expr, get_new_var_expr): New function.
6156 (build_dt): Add namelist support.
6157 * io.c (value): New variable.
6158 (check_format): Support FMT_H now.
6160 2003-09-07 Paul Brook <paul@nowt.org>
6162 * io.c (gfc_resolve_dt): Error if format label is not defined.
6164 2003-09-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
6166 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
6167 about case_switch's break. The other is about building the condition
6168 statement tree, which judges the argument in the range of the
6169 corresponding integer type.
6170 * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
6171 for the large values.
6173 2003-09-05 Paul Brook <paul@nowt.org>
6175 * f95-lang.c (expand_function_body): Gimplify the function.
6177 2003-09-04 Jeff Law <law@redhat.com>
6179 * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
6182 2003-09-04 Paul Brook <paul@nowt.org>
6184 * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
6185 (gfc_expand_stmt): New function.
6186 (LANG_HOOKS_RTL_EXPAND_STMT): Define.
6187 (expand_function_body): Use tree_rest_of_compilation.
6188 * trans-decl.c (gfc_generate_function_code): Don't free cfun.
6190 2003-09-03 Jeff Law <law@redhat.com>
6192 * f95-lang.c (gfc_init_builtin_functions): C arrays start at
6195 2003-08-30 Paul Brook <paul@nowt.org>
6197 * f95-lang.c (builtin_function): Remove #if 0 code.
6198 (gfc_define_builtin): New function.
6199 (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
6200 * mathbuiltins.def: New file.
6201 * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
6202 (gfc_intrinsic_map): Use mathbuiltins.def.
6203 (gfc_intrinsic_builtin_t): Remove.
6204 (gfc_build_intrinsic_lib_fndecls): Update.
6205 * trans-types.c (gfc_init_types): Remove redundant initilaization of
6206 signed_size_type_node.
6208 2003-08-29 Paul Brook <paul@nowt.org>
6210 * arith.c (gfc_real_kinds): Use correct minimum exponents.
6212 2003-08-22 Kejia Zhao <kejia_zh@yahoo.com.cn>
6214 * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
6215 (gfc_conv_intrinsic_function): Add MODULO.
6217 2003-08-22 Jason Merrill <jason@redhat.com>
6219 * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
6221 2003-08-22 Andreas Jaeger <aj@suse.de>
6223 * Make-lang.in (f95.install-common): Add DESTDIR support.
6224 * (f95.install-info): Likewise.
6225 (f95.uninstall): Likewise.
6227 2003-08-19 Diego Novillo <dnovillo@redhat.com>
6229 * trans-types.c (gfc_init_types): Initialize
6230 signed_size_type_node with size_type_node.
6232 2003-08-18 Paul Brook <paul@nowt.org>
6234 * dependency.c (gfc_dependency): New enum.
6235 (check_another_array_ref): Remove.
6236 (gfc_get_array_from_component): Remove.
6238 (get_range): Remove.
6239 (get_no_of_elements): Use mpz_t, not mpf_t.
6240 (transform_sections): New function.
6241 (gfc_check_range_range): Rename ...
6242 (gfc_check_section_vs_section): ... to this. Use new function.
6243 (gfc_is_inside_range): Rewrite to match.
6244 (gfc_check_element_vs_section): Ditto.
6245 (gfc_check_element_vs_element): Ditto.
6247 (gfc_dep_resolver): Ditto. Remove unused parameter.
6248 * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
6249 gfc_check_element_vs_element, gfc_is_inside_range,
6250 gfc_get_array_from_component): Remove prototypes for static functions.
6251 (gfc_dep_resolver): Update prototype.
6252 * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
6254 2003-08-15 Paul Brook <paul@nowt.org>
6256 * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
6257 return values to parent scope.
6258 (gfc_build_dummy_array_decl): Ditto.
6260 2003-08-14 Paul Brook <paul@nowt.org>
6262 * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
6263 size of the type, not the pointer.
6264 * resolve.c (resolve_symbol): Give more accurate error message.
6266 2003-08-10 Paul Brook <paul@nowt.org>
6268 * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
6270 2003-08-10 Paul Brook <paul@nowt.org>
6272 * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
6275 2003-08-10 Chun Huang <compiler@sohu.com>
6277 * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
6278 (resolve_symbol): Ditto.
6279 * trans-expr.c (gfc_conv_statement_function): New function.
6280 (gfc_conv_function_expr): Use it.
6282 2003-08-10 Paul Brook <paul@nowt.org>
6284 * trans-array.c (gfc_conv_ss_startstride): Handle functions.
6285 (walk_function_expr): Set section rank.
6286 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
6288 2003-08-10 Paul Brook <paul@nowt.org>
6290 * intrinsic.c (add_sym): Prefix names with correct string.
6291 (add_sym_0s): New function.
6292 (add_subroutines): Register abort.
6294 2003-08-10 Erik Schnetter <schnetter@uni-tuebingen.de>
6296 * gfortran.h: Introduce options to control the mangling.
6297 * lang.opt: Likewise.
6298 * options.c (gfc_init_options): Handle the options.
6299 * trans-common.c (gfc_sym_mangled_common_id): New function.
6300 (gfc_build_common_decl): Call it.
6301 * trans-decl.c (gfc_sym_mangled_function_id): New function.
6302 (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
6304 2003-08-09 Paul Brook <paul@nowt.org>
6306 * module.c (mio_symbol): Always ouput a namespace for formal args.
6307 (load_needed): Namespace now belong to their proper symbol.
6308 (gfc_dump_module): Change G95=>GFORTRAN.
6310 2003-08-05 Paul Brook <paul@nowt.org>
6312 * options.c: Force -fg77-calls.
6314 2003-08-02 Paul Brook <paul@nowt.org>
6316 * Makelang.in: Rename G95_* to GFORTRAN_*.
6317 * All sources: Rename G95_* to GFC_*.
6319 2003-08-01 Paul Brook <paul@nowt.org>
6321 * fortran/Make-lang.in: Use GMPLIBS.
6322 * fortran/config-lang.in: Set need_gmp.
6323 * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
6325 2003-07-27 Andreas Jaeger <aj@suse.de>
6327 * trans-decl.c (gfc_generate_constructors): Convert prototype to
6329 * trans-const.c (gfc_init_constants): Likewise.
6330 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
6332 * gfortranspec.c: Convert to ISO C90.
6333 (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
6335 2003-07-26 Paul Brook <paul@nowt.org>
6337 * lang.opt: Add -fdump-parse-tree.
6338 * options.c (gfc_handle_option): Ditto.
6339 * resolve.c (resolve_forall_iterators): Convert to proper type.
6340 * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
6342 2003-07-26 Paul Brook <paul@nowt.org>
6344 * Makefile.in: Add build dependencies on files common with rest of gcc.
6346 2003-07-26 Lifang Zeng <zlf605@hotmail.com>
6348 * trans.h: Declare g95_trans_pointer_assignment.
6349 * trans-expr.c (g95_trans_pointer_assignment): New function.
6350 (g95_trans_pointer_assign): Use it.
6351 * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
6352 (g95_trans_pointer_assign_need_temp): New function.
6354 2003-07-26 Paul Brook <paul@nowt.org>
6356 * gfortran.texi: Replace references to g95.
6358 2003-07-26 Paul Brook <paul@nowt.org>
6360 Rename g95_* to gfc_*.
6362 2003-07-25 Paul Brook <paul@nowt.org>
6364 * gfortran.h: Rename from g95.h.
6365 * trans-types.c (boolean_type_node, booelan_true_node,
6366 boolean_false_node): Remove.
6367 * trans-types.h: Ditto.
6369 2003-07-25 Chun Huang <compiler@sohu.com>
6371 * parse.c (accept_statement): Implement BLOCK DATA statement.
6372 * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
6375 2003-07-24 Lifang Zeng <zlf605@hotmail.com>
6377 * trans-stmt.c (temporary_list): Define.
6378 (g95_trans_assign_need_temp): New function.
6379 (g95_trans_forall_1): Modified for WHERE.
6380 (g95_trans_where_assign): Modified.
6381 (g95_trans_where_2): Modified.
6382 (g95_evaluate_where_mask): Modified.
6383 (g95_trans_where): Modified.
6384 (g95_get_temp_expr): Removed.
6385 (g95_add_to_where_stmt_list): Removed.
6386 (compute_overall_iter_number): Modified for WHERE.
6387 * trans.h: Remove where_stmt_list.
6389 2003-07-24 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6391 * lang.opt: Correct description of options -J and -M.
6393 2003-07-23 Steven Bosscher <steven@gcc.gnu.org>
6395 * lang.opt: Move help text to here.
6396 * lang-options.h: Remove.
6398 2003-07-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6399 * iresolve.c (g95_resolve_transpose): Proper variable in switch.
6400 * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
6403 2003-07-22 Steven Bosscher <steven@gcc.gnu.org>
6404 Paul Brook <paul@nowt.org>
6406 * check.c (check_rest): Use global pedantic flag.
6407 * io.c (data_desc): Ditto.
6408 * error.c (g95_warning, g95_warning_now): Use global flag.
6409 * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
6410 (expand_function_body): Update to new prototypes.
6411 (g95_init): Use new option names.
6412 * g95.h (g95_option_t): Standardize names.
6413 (g95_init_options, g95_handle_option): Update prototypes.
6414 * interface.c: Use new option names.
6421 * simplify.c: Ditto.
6423 * trans-array.c: Ditto.
6424 * trans-expr.c: Ditto.
6425 * trans-types.c: Ditto.
6426 * trans-decl.c: Ditto.
6427 (g95_build_library_function_decl): Remove obsolete VPARAMS.
6429 * options.c (g95_display_help): Remove.
6430 (g95_init_options): Convert to new scheme.
6432 (g95module_option): Ditto, rename from g95_parse_arg.
6433 (g95_handle_module_path_options): New function.
6434 * trans-equivalence.c: Fix error message.
6435 * lang.opt: Corrections.
6437 2003-07-21 Steven Bosscher <steven@gcc.gnu.org>
6439 * lang.opt: New file.
6441 2003-07-21 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6443 * decl.c (match_attr_spec): Set colon_seen.
6445 2003-07-14 Paul Brook <paul@nowt.org>
6447 * trans-array.c: Update comment.
6448 (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
6449 * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
6450 minmaxloc,minmaxval): Ditto.
6451 * trans-io.c (g95_trans_transfer): Ditto.
6452 * trans-stmt.c: Remove unneeded prototypes.
6453 (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
6454 (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
6455 (compute_inner_temp_size): Remove bits of dead code. Add comments.
6456 Don't share loopinfo.
6457 (compute_overall_iter_number): Declare as static.
6458 (allocate_temp_for_forall_nest): Ditto.
6459 (g95_trans_forall_1): Don't pass shared loopinfo.
6460 * trans.c (g95_start_block): Expand comment.
6462 2003-07-12 Paul Brook <paul@nowt.org>
6464 * arith.c (g95_index_integer_kind): Remove unused initializer.
6465 * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
6466 index by size of element.
6467 (generate_loop_for_rhs_to_temp): Ditto.
6468 (allocate_temp_for_forall_nest): Use element size, not index size.
6470 2003-07-11 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6472 * arith.c (g95_index_integer_kind): Add a TODO.
6473 * simplify.c (g95_simplify_nearest): Add a TODO.
6475 2003-07-09 Chun Huang <compiler@sohu.com>
6477 * trans.h: Add declarations for gfor_fndecl_string_scan and
6478 gfor_fndecl_string_verify.
6479 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
6480 * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
6481 (g95_conv_intrinsic_verify): New function.
6482 (g95_conv_intrinsic_function): Add SCAN and VERIFY.
6483 * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
6484 of parameter 'BACK=.TRUE.'
6486 2003-07-05 Lifang Zeng <zlf605@hotmail.com>
6488 * trans-stmt.c (iter_info, forall_info): Define.
6489 (g95_trans_forall_block): Remove.
6490 (g95_trans_forall_loop): Use forall info blocks.
6491 (g95_trans_nested_forall_loop): New function.
6492 (g95_do_allocate): Handle things other than logical masks.
6493 (generate_loop_for_temp_to_lhs): New function.
6494 (generate_loop_for_rsh_to_temp): New function.
6495 (compute_inner_temp_size): New function.
6496 (compute_overall_iter_number): New function.
6497 (allocate_temp_for_forall_nest): New function.
6498 (g95_trans_forall): Move body ...
6499 (g95_trans_forall_1): ... to here. Handle loops with temporaries.
6501 2003-07-02 Paul Brook <paul@nowt.org>
6503 * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
6504 in correct scope. Change callers to match.
6505 * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
6506 * iresolve.c (g95_resolve_reshape): Only use constant shapes.
6508 2003-07-02 Paul Brook <paul@nowt.org>
6510 * trans-array.c (g95_conv_loop_setup): Remove dead var. Use
6511 expression shape for all expressions.
6512 * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
6514 2003-07-03 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6516 * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
6517 g95_parse_arg), intrinsic.c (g95_convert_type): support of
6519 * intrinsic.c, g95.h: Add g95_convert_type_warn,
6520 * resolve.c (g95_resolve_index): Call it.
6522 2003-07-02 Paul Brook <paul@nowt.org>
6524 * iresolve.c (g95_resolve_reshape): Set expression shape.
6525 (g95_resolve_shape): Ditto.
6526 * simplify.c (g95_simplify_shape): Move common code outside condition.
6527 * trans-array.c (g95_conv_array_initializer): Teach it how to count.
6529 2003-07-01 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6531 * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
6534 2003-06-29 Paul Brook <paul@nowt.org>
6536 * array.c (g95_simplify_iterator_var): Don't bother with return value.
6537 * expr.c (find_array_element, find_component_ref): New functions.
6538 (remove_subobject_ref): New function.
6539 (simplify_const_ref): Use them. Rename from simplify_component_ref.
6540 (simplify_ref_chain): New function.
6541 (g95_simplify_expr): Use it. Simplify parameter variable subobjects.
6542 (g95_specification_expr): Simplify the expression.
6543 * resolve.c (resolve_operator): Check simplifications return code.
6544 (g95_resolve_expr): Ditto.
6546 2003-06-26 Paul Brook <paul@nowt.org>
6548 * expr.c (simplify_component_ref): New function.
6549 (g95_simplify_expr): Use it.
6550 * resolve.c (resolve_structure_cons): Handle references.
6552 2003-06-25 Paul Brook <paul@nowt.org>
6554 * trans-io.c (build_dt): Handle internal units.
6556 2003-06-25 Canqun Yang <canqun@yahoo.com.cn>
6558 * trans-common.c (g95_build_common_decl): Array index range starts at 0.
6559 (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
6560 Use g95_array_index_type instead of integer_type_node.
6561 (g95_build_common_decl, g95_set_common_master_type): Use
6562 g95_character1_type_node instead of char_type_node.
6563 * trans-equivalence.c (g95_layout_local_equiv): As above.
6565 2003-06-24 Steven G. Kargl <kargls@attbi.com>
6567 * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
6568 remove last remains of -fquiet.
6570 2003-06-22 Paul Brook <paul@nowt.org>
6572 * resolve.c (resolve_operator): Don't fail if we can't simplify.
6573 (g95_resolve_expr): Ditto.
6574 (resolce_code): Mark as static.
6575 * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
6576 gimplifer doesn't (yet).
6578 2003-06-20 Paul Brook <paul@nowt.org>
6580 * g95.h: Add ST_PAUSE and EXEC_PAUSE.
6581 * match.c (g95_match_if): Add ST_PAUSE.
6582 (g95_match_stopcode): New function.
6583 (g95_match_pause, g95_match_stop): Use it.
6584 * parse.c (g95_ascii_statement): Handle ST_PAUSE.
6585 (decode_stmt, next_statement, parse_executable): Ditto.
6586 * resolve.c (resolve_code): Ditto.
6587 * st.c (g95_free_statement): Ditto.
6588 * trans-stmt.c (g95_trans_pause): New function.
6589 * trans-stmt.h: Declare it.
6590 * trans.c (g95_trans_code): Use it.
6591 * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
6593 (g95_build_builtin_function_decls): Initialize them.
6595 * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
6597 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6599 * io.c (g95_match_open , g95_match_close, g95_match_inquire,
6600 match_filepos): Fix error handling.
6602 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6604 * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
6605 Add assertions on arguments.
6606 * resolve.c (expression_shape): Remove useless &.
6607 * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
6608 g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
6609 g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
6610 g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
6611 g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
6612 g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
6613 (g95_simplify_not, g95_simplify_scale): Add assertions.
6615 2003-06-15 Paul Brook <paul@nowt.org>
6617 Clean up stuff to work with the ssa optimizers.
6618 * convert.c (convert): Handle BOOLEAN_TYPEs.
6619 * f95-lang.c (g95_truthvalue_conversion): Implement.
6620 * trans-array.c (g95_trans_array_constructor_value): Group multiple
6622 * trans.h (g95_truthvalue_conversion): Declare.
6623 * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
6624 * trans-stmt.c (g95_trans_character_select): Don't create array
6625 assignments. Mark labels as indirect jump targets.
6626 * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
6627 (g95_get_dtype_cst): Handle LOGICAL types.
6629 2003-06-14 Paul Brook <paul@nowt.org>
6631 * f95-lang.c (g95_gimplify_expr): New function.
6632 * trans-array.c (g95_trans_array_constructor_value): Don't create
6634 (g95_conv_expr_descriptor): Rename simple->gimple.
6635 * trans-expr.c (conv_expr_op): Use proper logical operators.
6636 * trans-intrinsic.c (build_fixbound_expr): New function.
6637 (build_fix_expr): Ditto.
6638 (g95_conv_intinsic_aint): Use them. Use builtin functions.
6639 (g95_conv_intrinsic_function): Add FLOOR and CEILING.
6641 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6643 * array.c (g95_compare_array_spec): Remove unreachable code.
6644 * expr.c (g95_copy_expr): Likewise.
6645 * intrinsic.c (g95_convert_type): Likewise.
6646 * misc.c (g95_code2string): Likewise.
6647 * simplify.c (g95_simplify_ishft, g95_simplify_real,
6648 g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
6649 * trans-stmt.c (g95_trans_select): Likewise.
6650 * primary.c (extend_ref): Add an assertion.
6651 * simplify.c (g95_convert_constant): Add const.
6652 * intrinsic.h: Remove g95_check_x_ni.
6653 * f95-lang.c (g95_finish): Call g95_release_include_path.
6655 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6657 * resolve.c (resolve_contained_functions): Fix typo introduced on
6660 2003-06-09 Paul Brook <paul@nowt.org>
6662 * g95.h: Include system.h not hwint.h.
6663 * many: use safe-ctype.h not ctype.h. Change isalpha -> ISALPHA, etc.
6664 * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
6666 2003-06-09 Paul Brook <paul@nowt.org>
6668 * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
6669 * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
6670 * trans-decl.c (g95_add_decl_to_functions): Make non-static.
6671 (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
6672 (g95_generate_function_code): Translate COMMON and EQUIVALENCE
6674 * trans.h (g95_trans_equivalence, g95_trans_common,
6675 g95_add_decl_to_function): Declare.
6676 * trans-common.c, trans-equivalence.c: New files.
6678 2003-06-08 Steven Bosscher <steven@gcc.gnu.org>
6680 * intrinsic.c (g95_intrinsic_extension): Remove.
6681 (add_functions): Substitute g95_check_x for g95_check_x_ni
6683 (g95_init_expr_extensions): New function.
6684 (g95_intrinsic_func_interface): Use it.
6685 * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
6686 * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
6687 g95_check_precision, g95_check_present, g95_check_radix,
6688 g95_check_range, g95_check_selected_real_kind): Do not set
6689 g95_intrinsic_extension.
6690 (g95_check_x_ni): Remove now duplicate of g95_check_x.
6692 * expr.c (check_inquiry): Add FIXME, fixup some code style.
6694 2003-06-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6696 * g95.h (ref_type): Name this type explicitly.
6697 * module.c (MIO_NAME): Add specialisations of mio_name.
6698 (mio_symbol_attribute, mio_typespec, mio_array_ref,
6699 mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
6700 (ab_attribute): Name this type explicitly.
6701 (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
6703 2003-06-05 Kejia Zhao <kejia_zh@yahoo.com.cn>
6705 * trans-intrinsic.c (g95_conv_allocated): New function.
6706 (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
6708 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
6710 * f95-lang.c: Don't include g95-support.h
6711 (g95_mark_addressable): Add prototype.
6712 (g95_init_decl_processing): Remove C front end hack.
6713 * f95-tree.c: Remove file.
6714 * support.c: Remove file.
6715 * g95-support.h: Remove file.
6716 * trans-types.c (g95_init_types): Set up boolean
6717 type related tree nodes.
6718 * Make-lang.in: Remove rules for dead files and
6719 dependencies on them.
6721 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
6723 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
6724 C front end dependency. Also, convert.c does not depend on
6725 g95-support.h anymore.
6726 * convert.c: Don't include c-common.h and g95-support.h
6727 * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
6728 (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
6729 stmts_are_full_exprs_p, current_stmt_tree,
6730 current_scope_stmt_stack): Remove.
6731 * g95-support.h (unsigned_conversion_warning): Kill proto.
6732 (boolean_type_node, boolean_true_node, boolean_false_node):
6733 Don't define here. Instead, make then true tree nodes in
6735 * support.c (c_global_trees): Die, C front end, die!!!
6736 (g95_init_c_decl_hacks): Don't touch intmax_type_node,
6737 uintmax_type_node, string_type_node and const_string_type_node.
6738 (decl_constant_value, overflow_warning): Make static functions.
6739 They are in death row too, though.
6740 (default_conversion, c_expand_asm_operands): Remove.
6741 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
6742 trans.c: Don't include c-common.h.
6743 * trans-types.c (boolean_type_node, boolean_true_node,
6744 boolean_false_node): Make them real tree nodes.
6745 * trans-types.h (intmax_type_node, string_type_node,
6746 const_string_type_node): Hack to work around C dependencies
6747 in builtin-types.def.
6749 2003-06-04 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6751 * decl.c (decl_types): Add some iterators-like sentinels.
6752 * decl.c (match_attr_spec): Use them.
6753 Use "decl_types" instead of "int".
6754 Add cast in call to g95_match_strings.
6755 * dump-parse-tree.c (g95_show_namespace): Use "g95_intrinsic_op"
6757 * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
6758 (g95_interface_info): Use "g95_intrinsic_op".
6759 * dump-parse-tree.c (g95_show_namespace): Use them.
6760 * interface.c (g95_check_interfaces): Use them.
6761 * module.c (read_module, write_module): Use them.
6762 * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
6763 Use "g95_intrinsic_op".
6764 * interface.c (check_operator_interface): Use "g95_intrinsic_op".
6765 Add a default case in switch statement.
6766 * intrinsic.h (g95_generic_isym_id): Moved to...
6767 * g95.h (g95_generic_isym_id): here.
6768 (g95_intrinsic_sym): Use "g95_generic_isym_id".
6769 * intrinsic.c (make_generic): Use "g95_generice_isym_id".
6770 * trans-intrinsic.c (g95_intrinsic_map_t,
6771 g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
6772 * match.c (g95_match_intrinsic_op): Add cast in call to
6775 2003-06-03 Steven Bosscher <steven@gcc.gnu.org>
6777 * support.c (skip_evaluation, warn_conversion, lvalue_p,
6778 lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
6779 constant_fits_type_p, convert_and_check,
6780 unsigned_conversion_warning): Remove these ugly remnants
6781 we inherited from the C front end.
6782 (function_types_compatible): Remove '#if 0'-edcode.
6783 (build_modify_expr): Likewise.
6784 (convert_for_assignment): Don't use the deceased functions.
6785 The parameter fundecl is now unused.
6786 (decl_constant_value): Always just return decl. In fact
6787 this function is not used at present, but it might be in
6788 the future, when we start using the tree inliner.
6789 (overflow_warning, default_conversion, c_expand_asm_operands):
6790 Abort when these are called, they are part of the C type
6791 checking implementation and therefore poison to Fortran.
6793 2003-06-04 Steven Bosscher <steven@gcc.gnu.org>
6795 * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
6796 c-pretty-print.o and c-dump.o. Add a comment on why we
6797 depend on c-semantics.c.
6798 * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
6799 Don't use the C front end tree dumper hook to dump the
6800 language specific tree representation -- we don't have
6801 one. So instead, inherit the default langhook.
6803 2003-06-02 Paul Brook <paul@nowt.org>
6805 * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
6807 2003-06-02 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6809 * check.c (g95_check_associated): Use proper types. Remove
6810 extraneous argument in call to g95_error().
6812 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
6814 * resolve.c (resolve_operator): Make logical operands convert to the
6815 type with higher kind.
6817 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
6819 * check.c (g95_check_associated): Make sure both pointer and target has
6820 the same type and rank. Null pointer or array section with vector
6821 subscript as target are not allowed.
6822 * trans.h: Declare gfor_fndecl_associated.
6823 * trans-decl.c: (g95_build_builtin_function_decls): Initialize
6824 gfor_fndecl_associated.
6825 * trans-intrinsic.c (g95_conv_associated): New function.
6826 (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
6828 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
6830 * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
6831 according to POINTER itself rather than TARGET.
6832 (g95_conv_expr_descriptor): Make lbound start at 1.
6833 * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
6835 2003-06-01 Paul Brook <paul@nowt.org>
6837 * expr.c (g95_type_convert_binary): Make it match the standard.
6838 * g95.texi: Remove dead link.
6840 2003-06-01 Steven Bosscher <steven@gcc.gnu.org>
6842 * g95.texi: Cleanup somewhat in preparation for inclusion
6845 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6846 Canqun Yang <canqun@yahoo.com.cn>
6848 * resolve.c (compare_bound_int, resolve_where_shape): Proper return
6850 (g95_find_forall_index): Return proper value.
6851 (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
6852 compare the return value from g95_find_forall_index.
6854 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6855 * g95.h, io.c (g95_st_label): Remove "length".
6856 (g95_symtree): Remove "link".
6857 (g95_case): Remove "code".
6858 * arith.c, arith.h (g95_compare_string, g95_convert_integer,
6859 g95_convert_real): Make an argument pointer to const.
6860 * decl.c (colon_seen): Add a TODO.
6861 * interface.c (g95_compare_types): Fix typo.
6862 * interface.c (compare_interfaces): Preserve value of "p".
6863 * intrinsic.c (sort_actual): Remove "i".
6864 * match.c (g95_match_assign): Proper type in call to g95_match().
6865 * parse.c (next_free): Avoid duplicate call due to macro.
6866 * parse.c (check_statement_label): wrong type in call to g95_error.
6867 * primary.c (match_real_constant): Add a TODO.
6868 * resolve.c (resolve_select): Remove useless conditional.
6869 * simplify.c (g95_simplify_repeat): Proper assignment to
6870 "value.character.string".
6871 * simplify.c (g95_simplify_reshape): Wrong variable in call to
6874 2003-05-20 Canqun Yang <canqun@yahoo.com.cn>
6876 * trans-stmt.c: Remove unnecessary include file defaults.h.
6878 2003-05-19 Lifang Zeng <zlf605@hotmail.com>
6880 * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
6882 (g95_trans_forall): Allow arbitrary number of FORALL indexes and
6883 actual variables used as FORALL indexes.
6885 2003-05-15 Paul Brook <paul@nowt.org>
6887 * trans-array.c (g95_trans_static_array_pointer): Use
6889 (g95_trans_deferred_array): Initialize static array pointers.
6890 * trans-expr.c (g95_conv_function_call): Use formal arglist to
6891 correctly pass POINTER and absent CHARACTER arguments.
6893 2003-05-14 Lifang Zeng <zlf605@hotmail.com>
6895 * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
6896 (g95_resolve_forall_body): Resolve FORALL body.
6897 (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
6898 (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
6899 (g95_find_forall_index): Check whether the FORALL index appears in
6900 the expression or not.
6901 (resolve_code): Modified.
6903 2003-05-14 Paul Brook <paul@nowt.org>
6905 * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
6907 2003-05-13 Paul Brook <paul@nowt.org>
6909 * trans-types.c (g95_max_array_element_size): Now a tree node.
6910 (g95_init_types): Work out max size properly.
6911 (g95_get_dtype_cst): Modify to match.
6913 2003-05-11 Paul Brook <paul@nowt.org>
6915 * trans-io.c (add_case): Create a label decl for case labels.
6917 2003-05-11 Paul Brook <paul@nowt.org>
6919 * arith.c (g95_integer_index_kind): New variable.
6920 * f95-lang.c (g95_init): Move frontend initialization here ...
6921 (g95_post_options): ... from here.
6922 * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
6923 * intrinsic.c (add_functions): Use index kinds.
6924 * iresolve.c: Convert to index_kind where needed.
6925 * resolve.c (g95_resolve_index): Make public, use index_kind.
6926 (resolve_array_ref): Adjust to match.
6927 * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
6928 * trans-stmt.c: Ditto.
6929 * trans-types.c: Ditto.
6930 * trans-types.h (g95_array_index_kind): Remove declaration.
6931 * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
6933 2003-05-07 Paul Brook <paul@nowt.org>
6935 * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
6936 * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
6939 2003-05-07 Paul Brook <paul@nowt.org>
6941 * trans-array.c (trans_static_array_pointer,
6942 g95_trans_array_constructor_value, g95_conv_array_initializer,
6943 g95_conv_structure): CONSTRUCTOR nodes only have one operand.
6944 (g95_add_loop_ss_code): Convert subscripts to the correct type.
6945 * trans-stmt.c (g95_trans_character_select): Ditto.
6946 * trans-types.c (g95_init_types): Ditto.
6948 2003-05-07 Steven Bosscher <steven@gcc.gnu.org>
6950 * f95-lang.c (expand_function_body): Use input_line, not lineno.
6951 * trans-decl.c (g95_generate_function_code,
6952 g95_generate_constructors): Likewise.
6953 * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
6954 g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
6957 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
6958 * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
6959 with components point to the DERIVED type itself, and two DERIVED
6960 type with components point to each other.
6961 * trans-expr.c (g95_conv_componet_ref): Modified
6963 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
6964 * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
6966 (g95_trans_pointer_assign): Implement Nullify.
6968 2003-05-01 Paul Brook <paul@nowt.org>
6970 * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
6971 * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
6973 2003-05-01 Paul Brook <paul@nowr.org>
6975 * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
6976 trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
6979 2003-05-01 Canqun Yang <canqun@yahoo.com.cn>
6981 * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
6984 2003-04-28 Paul Brook <paul@nowt.org>
6986 * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
6987 as their kind suggests.
6988 (g95_resolve_reshape): Ditto.
6990 2003-04-28 Chun Huang <compiler@sohu.com>
6992 * trans-expr.c (g95_conv_substring_expr): New function.
6993 (g95_conv_expr): Use it.
6995 2003-04-28 Paul Brook <paul@nowt.org>
6997 * iresolve.c (g95_resolve_transpose): Make it match the
6999 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
7001 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
7003 * trans-types.c (g95_add_field_to_struct): New function to
7004 add a field to a UNION_TYPE or RECORD_TYPE.
7005 * trans-types.h (g95_add_field_to_struct): Prototype.
7006 (g95_get_derived_type): Use g95_add_field_to_struct to add
7008 * trans-io.c (g95_add_field): Remove.
7009 (ADD_FIELD): Use new g95_add_field_to_struct function.
7010 (ADD_STRING): Likewise.
7011 * trans-stmt.c (g95_trans_select): Likewise.
7012 (g95_add_field): Remove duplicated function.
7014 2003-04-18 Canqun Yang <canqun@yahoo.com.cn>
7016 Port implementation for CHARACTER SELECT from Andy's tree.
7017 * trans-stmt.c (g95_trans_character_select): Implement character
7018 select. (g95_add_field): New function.
7019 * trans-decl.c: Declare 'gfor_gndecl_select_string'.
7020 (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
7021 * g95.h (struct g95_case): Add field 'int n'.
7022 * trans.h: Declare 'gfor_fndecl_select_string'.
7024 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
7026 * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
7027 (g95_insert_bbd): Die on duplicates.
7028 * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
7030 2003-04-14 Steven Bosscher <steven@gcc.gnu.org>
7032 * g95.texi: Require GMP 4.0 -- like we actually
7033 do. Explain the testsuite and what-goes-where.
7034 Don't use undefined texinfo symbol. Break very
7035 long line. Remove finished item from the list
7038 2003-04-11 Canqun Yang <canqun@yahoo.com.cn>
7040 * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
7043 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
7045 * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
7046 (g95_trans_forall_body): New function.
7048 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
7050 * resolve.c (resove_where): New function.
7051 (resolve_where_shape): New function.
7052 (resolve_code): Add call to 'resolve_where'
7053 * trans-stmt.c (g95_trans_where): Modified.
7054 (g95_trans_where_2): New function.
7055 (g95_trans_where_assign): New function.
7056 (g95_evaluate_where_mask): New function.
7057 (g95_add_to_stmt_list): New function.
7058 (g95_get_temp_expr): New function.
7059 * trans.h (where_stmt_list): New structure.
7061 2003-04-10 Paul Brook <paul@nowt.org>
7063 * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
7064 (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
7066 2003-04-10 Steven Bosscher <steven@gcc.gnu.org>
7068 Update after mainline -> tree-ssa-branch merge.
7069 * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
7071 (g95_init): Update for new lang_hooks definition.
7072 (g95_post_options): New langhook.
7073 (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
7074 * scanner.c (g95_new_file): Comment update.
7076 2003-04-09 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7078 * g95.h, lang-options.h: Add -Wimplicit-interface.
7079 * options.c (g95_init_options, g95_parse_arg): Set it.
7080 * interface.c (check_intents): Warn about call with implicit
7082 * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
7085 2003-04-05 Paul Brook <paul@nowt.org>
7087 * iresolve.c (g95_resolve_spread): Don't resole based on type.
7088 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
7090 2003-03-29 Paul Brook <paul@nowt.org>
7092 * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
7093 (g95_resolve_unpack): Ditto.
7094 * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
7095 (g95_conv_intrinsic_function): Use it. Remove PACK and UNPACK.
7096 (g95_is_intrinsic_libcall): Add PACK and UNPACK.
7098 2003-03-25 Paul Brook <paul@nowt.org>
7100 * arith.c (g95_unary_user, g95_user): Remove dead functions.
7102 * array.c (g95_free_array_ref): Ditto.
7104 * symbol.c (g95_use_derived_tree): Ditto.
7105 * intrinsic.c (add_functions): Use simplification for SCALE.
7106 * primary.c (g95_match_rvalue): Test sym, not symtree.
7108 2003-03-25 Paul Brook <paul@nowt.org>
7110 * trans-decl.c (build_function_decl): Add parameter before it gets
7111 turned into a constant.
7112 * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
7113 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
7114 * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
7116 2003-03-22 Paul Brook <paul@nowt.org>
7118 * trans-array.c (g95_conv_array_initializer): Allow scalar
7120 * trans-decl.c (g95_finish_var_decl): Result variables are not
7122 * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
7123 (g95_conv_intrinsic_function): Use it.
7124 * trans-types.h (g95_type_spec): Remove dead declaration.
7126 2003-03-21 Paul Brook <paul@nowt.org>
7128 * trans-decl.c (g95_build_function_decl): Mark string parameters.
7130 2003-03-20 Paul Brook <paul@nowt.org>
7132 * trans-decl.c (g95_build_function_decl): Put character length
7133 parameters at the end of the function declaration.
7134 * trans-expr.c (g95_conv_function_call): Ditto.
7135 * trans-types.c (g95_get_function_type): Ditto.
7137 2003-03-20 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7139 * resolve.c (resolve_formal_arglist): Don't impose intent for
7140 procedure arguments of pure functions.
7141 (resolve_select): Remove redundant assignment.
7143 2003-03-19 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7145 * arith.c (validate_logical), g95.h, options.c (g95_init_options):
7147 * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
7148 * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
7150 * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
7152 * symbol.c (g95_add_type): Fix typo in comment.
7155 2003-03-16 Paul Brook <paul@nowt.org>
7157 * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
7158 * expr.c (g95_build_call): Remove.
7159 * f95-lang.c (puchdecl_top_level): New function.
7160 * g95.h (g95_code): Store resolved symbol, not just the name.
7161 * intrinsic.c (g95_intrinsic_namespace): New global namespace.
7162 (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
7163 (g95_get_intrinsic_sub_symbol): New function.
7164 * iresolve.c (g95_resolve_cpu_time): Use it.
7165 (g95_resolve_random_number): Ditto.
7166 * resolve.c: Set code->resolved_sym instead of code->sub_name.
7167 * trans-decl.c (g95_get_extern_function_decl): Give external decls
7168 the correct DECL_CONTEXT. Add global symbold to the global scope.
7169 * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
7172 2003-03-16 Paul Brook <paul@nowt.org>
7174 * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
7175 * options.c (g95_parse_arg): Ditto.
7176 * module.c (mio_symbol_attribute): Handle the always_explicit bit.
7177 * resolve.c (resolve_formal_arglist): The always_explicit sould be set
7178 for the procedure, not the parameter.
7179 * trans-array.c (g95_trans_g77_array): New function.
7180 (g95_trans_assumed_size): Use it.
7181 (g95_trans_dummy_array_bias): Ditto.
7182 (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
7183 (g95_conv_expr_descriptor): ... to here. Update callers.
7184 * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
7185 (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
7186 * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
7187 * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
7188 * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
7189 (g95_sym_type): Ditto.
7191 2003-03-15 Paul Brook <paul@nowt.org>
7193 * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
7195 * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
7197 2003-03-14 Paul Brook <paul@nowt.org>
7199 * trans-array.c (g95_array_is_packed): Remove.
7200 (g95_conv_array_base): Correctly handle all descriptorless cases.
7201 (g95_conv_array_stride): Use descriptorless strides.
7202 (g95_trans_dummy_array_bias): Don't always repack the array.
7203 (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
7205 * trans-types.c (g95_get_nodesc_array_type): Differentiate between
7206 dummy and non-dummy arrays...
7207 (g95_sym_type, g95_get_derived_type): ... like these.
7208 (g95_get_array_type_bounds): Allow discontiguous arrays.
7210 2003-03-12 Paul Brook <paul@nowt.org>
7212 * array.c (g95_resolve_array_spec): Fix comment.
7213 * g95.h (symbol_attributes): New flag always_explicit.
7214 * resolve.c (resolve_formal_arglist): Set it always_explicit.
7215 * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
7216 * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
7217 (g95_trans_array_bounds): Allow assumed shape arrays.
7218 (g95_trans_repack_array): Remove.
7219 (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
7220 * trans-decl.c (g95_build_qualified_array): Only ignore absent
7221 bounds for assumed size arrays.
7222 (g95_build_dummy_array_decl): Use descriptorless arrays.
7223 * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
7224 (g95_trans_pointer_assign): Fix typo.
7225 * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
7227 (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
7228 * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
7229 Also modify callers.
7230 * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
7232 2003-03-08 Paul Brook <paul@nowt.org>
7234 * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
7235 (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
7236 * resolve.c (compare_spec_to_ref): Allow full array sections.
7238 2003-03-08 Paul Brook <paul@nowt.org>
7240 * expr.c (g95_simplify_expr): Also simplify array index and
7241 substring expressions.
7242 * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
7243 * trans-array.c (g95_trans_array_bounds): New function.
7244 (g95_trans_auto_array_allocation): Use it.
7245 (g95_trans_assumed_size): Rewrite.
7246 * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
7247 (gfor_fndecl_repack): Remove.
7248 (g95_build_qualified_array): Handle absent upper bounds.
7249 (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
7250 (g95_get_symbol_decl): Update.
7251 (g95_build_intrinsic_function_decls): Initialize new decls.
7252 * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
7253 (gfor_fndecl_repack): Remove.
7254 * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
7255 * trans-types.c: (g95_build_array_type): Merge duplicated code..
7256 (g95_get_nodesc_array_type): Handle absent bounds.
7257 * trans-types.h (g95_get_nodesc_array_type): Declare.
7259 2003-03-04 Paul Brook <paul@nowt.org>
7261 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
7264 2003-03-02 Paul Brook <paul@nowt.org>
7266 * options.c (g95_init_options): Drfault to 1.
7267 (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
7268 * trans-array.c (g95_conv_array_data, g95_conv_array_base,
7269 g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
7270 Handle non-constant size automatic arrays.
7271 (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
7272 generic bound functions.
7273 (g95_trans_auto_array_allocation): Don't create a descriptor.
7274 (g95_trans_assumed_size): New function (broken).
7275 (g95_trans_dummy_array_bias): Remove unused var.
7276 * trans-array.h (g95_trans_assumed_size): Declare.
7277 * trans-decl.c (create_index_var): New fuction.
7278 (g95_build_qualified_array): New function.
7279 (g95_get_symbol_decl): Use it.
7280 (g95_trans_deferred_vars): Handle assumed shape seperately.
7281 * trans-types.c (get_element_type): Handle heap allocated arrays.
7282 (g95_is_nodesc_array): Include non-const size arrays.
7283 (g95_get_nodesc_array_type): Ditto.
7285 2003-02-23 Paul Brook <paul@nowt.org>
7287 * trans-array.c (g95_array_init_size): Should use stride, not size of
7290 2003-02-18 Paul Brook <paul@nowt.org>
7292 * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
7293 after intrinsic function check.
7295 2003-02-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7297 * io.c (match_io): Fix missing return value and remove useless
7299 * match.c (g95_match): Remove useless assignment.
7300 * module.c (parse_string): Remove useless post increment.
7301 * simplify.c (g95_simplify_verify): Remove useless assignment.
7303 2003-02-15 Paul Brook <paul@nowt.org>
7305 * expr.c (restricted_intrinsic): Handle bad values gracefully.
7306 * g95.h (symbol_attribute): Add referenced member.
7307 (g95_symbol): Add dummy_order member.
7308 (g95_set_sym_referenced): Declare.
7309 * match.c (g95_match_assignment, g95_match_call): Use it
7310 * primary.c (match_actual_arg, g95_match_rvalue,
7311 g95_match_variable): Ditto.
7312 * symbol.c (next_dummy_order): New variable.
7313 (g95_set_sym_referenced): New function.
7314 (check_done): New function.
7315 (g95_add_*): Use it.
7316 * trans-decl.c: Make formatting conform to GCC standards.
7317 (g95_defer_symbol_init): Add dummy variables in the right order.
7318 (g95_get_symbol_decl): Only accept referenced variables.
7319 (g95_create_module_variable): Module variables are always required.
7320 (generatr_local_decls): New function.
7321 (generate_local_vars): New function.
7322 (g95_generate_function_code): Use it.
7324 2003-02-13 Paul Brook <paul@nowt.org>
7326 * trans-decl.c (g95_conv_struct_cons): Remove.
7327 (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
7328 * trans-expr.c (g95_conv_structure): New function.
7329 (g95_conv_expr): Use it.
7331 2003-02-09 Paul Brook <paul@nowt.org>
7333 * trans-array.c (g95_array_init_size): Don't evaluate the linit
7334 expressions multiple times.
7335 (g95_trans_auto_arry_allocation): Use pointer not tmp.
7337 2003-02-08 Paul Brook <paul@nowt.org>
7339 * module.c (mio_symtree_ref): Declare as static.
7340 (mio_expr): Remove dead code.
7341 (read_module): Set the symtree link for fixups.
7342 * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
7343 (build_round_expr): ... to this.
7344 (g95_conv_intrinsic_aint): New function.
7345 (g95_conv_intrinsic_function): Use it.
7347 2003-02-08 Paul Brook <paul@nowt.org>
7349 * trans-array.c (g95_trans_array_constructor_value): Use the acutal
7350 offset after modificaton, not the increment expression.
7351 * dependency.c: Kill excess whitespace.
7353 2003-02-07 Sanjiv Gupta <sanjivg@noida.hcltech.com>
7355 * dependency.h: Remove some function declarations.
7356 * dependency.c (get_no_of_elements): Change this function not to
7358 * other: Add comments for all modified functions.
7360 2003-02-06 Paul Brook <paul@nowt.org>
7362 * g95spec.c (lang_specific_functions): Fix initializer warning.
7363 * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
7364 for structure type names.
7365 * trans-decl.c (g95_cons_structure_cons): New function.
7366 (g95_get_symbol_decl): Use it.
7367 * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
7370 2003-02-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7372 * resolve.c (compare_cases): Add const to casts.
7374 2003-01-30 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7376 * g95.h (g95_check_f): Change a1 to f1m.
7377 * intrinsic.c (add_sym_1m, check_specific,
7378 g95_intrinsic_func_interface): Use it.
7380 * module.c (init_pi_tree): Remove useless cast.
7381 (fp2): Fix argument type.
7383 * parse.c (parse_select_block): Add comment.
7385 2003-02-05 Toon Moene <toon@moene.indiv.nluug.nl>
7387 * lang-options.h: Fix warning involving C90 concatenated
7390 2003-02-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
7391 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7393 * io.c (format_asterisk): Complete initializer to kill warning.
7394 * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
7395 DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
7396 (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
7397 new defines to complete initializers. Kills all warnings.
7399 * Make-lang.in: Comment cleanup.
7401 2003-02-05 Paul Brook <paul@nowt.org>
7403 * array.c (g95_free_constructor): Handle NULL expressions.
7404 * resolve.c (resolve_structure_cons): Ditto.
7405 * decl.c (g95_match_null): New Function.
7406 (variable_decl): Use it.
7407 * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
7408 * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
7409 * trans-types.c (g95_set_decl_attributes): Remove empty function.
7411 2003-02-05 Paul Brook <paul@nowt.org>
7413 * trans.h (build1_v): New macro.
7414 (build_v): Remove pointless and incorrect prototype.
7415 * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
7416 * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
7418 2003-02-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
7420 * Make-lang.in (F95_OBJS): Remove one more dead file.
7422 2003-02-01 Paul Brook <paul@nowt.org>
7424 * lang-specs.h: Don't pass -ffixed-form to the linker.
7425 * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
7427 2003-02-01 Paul Brook <paul@nowt.org>
7429 * Make-lang.in (F95_OBJS): Remove dead files.
7430 * trans-array.c (g95_array_init_size): Do the right thing when
7432 * trans-decl.c (g95_generate_function_code): Initialize deffered
7433 symbol list before translating contained subroutines.
7434 * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
7435 scalar invariant values here...
7436 (g95_conv_variable, g95_conv_function_call): ... instead of here ...
7437 * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
7439 2003-01-29 Paul Brook <paul@nowt.org>
7441 * trans-array.c (g95_add_loop_code): Put pre code in the right block.
7442 (g95_walk_elemental_function_args): Reverse chains before adding.
7443 (g95_reverse_ss): Move about a bit.
7444 * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
7447 2003-01-28 Paul Brook <paul@nowt.org>
7449 * intrinsic.c (resolve_intrinsic): Use correct union member.
7450 * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
7452 * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
7453 use associated variables.
7454 * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
7455 * trans-expr.c (g95_conv_expr_present): ... to here.
7456 * trans.h: Declare it.
7457 * trans-types.c (g95_sym_type): Assume subroutine if not specified.
7459 2003-01-28 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7461 * array.c (expand_iterator): Suppress useless assignment.
7462 * decl.c (match_char_spec): Ditto.
7463 * io.c (match_io_iterator): Ditto.
7464 * primary.c (match_real_constant): Ditto.
7465 * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
7466 Ditto. Also, use g95_intrinsic_op not int for intrinsic operators.
7467 * matchexp.c (match_add_operand, match_level_5): Likewise.
7468 * module.c (parse_atom, find_enum): Likewise.
7469 * resolve.c: move #include <string.h>
7470 (resolve_select): Fix serious typo.
7472 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.n>
7474 * Make-lang.in: Don't build with broken tree-ssa-pre.
7476 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.nl>
7478 * resolve.c (resolve_index): Add a TODO.
7479 * symbol.c: Remove useless "#include <ctype.h>".
7481 2003-01-27 Paul Brook <paul@nowt.org>
7483 * check.c (check_rest): Allow different type kinds as an extension.
7484 * g95.h (g95_resolve_f): Add f1m.
7485 * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
7486 * intrinsic.h: Chenge prototypes for MIN and MAX.
7487 * iresolve.c (g95_resolve_minmax): New function.
7488 (g95_resolve_min, g95_resolve_max): Use it.
7489 * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
7491 (g95_conv_intrinsic_present): Fix logic.
7493 2003-01-27 Steven Bossche <s.bosscher@student.tudelft.nl>
7495 * g95.h (g95_case): Don't be a tree, be a double linked list.
7496 * match.c (match_case_selector): Remove redundant semantics check.
7497 Clean up a few goto's to make it a tiny little bit faster.
7498 * resolve.c (case_tree): Die.
7499 (compare_cases): Accept and compare unbounded cases too.
7500 (check_case_overlap): Don't build a tree. Instead, merge-sort the
7501 whole list of g95_cases passed from resolve_select.
7502 (sane_logical_select): Die.
7503 (check_case_expr): Return FAILURE if a CASE label is of the wrong
7505 (resolve_select): Fixup case expression for computed GOTOs, put it
7506 in expr, not expr2, for easier handing in the parse tree dumper and
7507 the code generator. Rewrite the rest of the function: Kill
7508 unreachable case labels and unreachable case blocks.
7509 * dump-parse-tree.c (g95_show_code_node): Always dump expr for
7510 an EXEC_SELECT, not case2 anymore.
7511 * trans-const.c (g95_conv_constant_to_tree): New function.
7512 (g95_conv_constant): Use it.
7513 * trans-const.h: Declare prototype for the new function.
7514 * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
7515 g95_trans_character_select): New static functions.
7516 (g95_trans_select): Rewrite.
7518 2003-01-26 Paul Brook <paul@nowt.org>
7520 * intrinsic.c (add_fnctions): Properly add dreal.
7521 * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
7522 (g95_conv_intrinsic_function): Use it.
7523 * trans-io.c (build_dt): Abort on internal files (unimplemented).
7525 2003-01-26 Paul Brook <paul@nowt.org>
7527 Widespread changes to the handling of symbols in expressions. These
7528 are now linked via g95_symtree nodes.
7529 * parse.c (g95_fixup_sibling symbols): New function.
7530 (parse_contained): Use it.
7531 * g95.h (symbol_attribute): Add contained. Indicates a symbol is a
7532 contained procedure that has bee correctly fixed up.
7533 (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
7535 2003-01-24 Paul Brook <paul@nowt.org>
7537 * trans-array.c (g95_walk_expr): Function result attributes are in
7539 * trans-expr.c (g95_conv_function_call,
7540 g95_trans_arrayfunc_assign): Ditto.
7541 * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
7543 2003-01-23 Steven Bosscher <s.bosscher@student.tudelft.nl>
7545 * expr.c (check_restricted): Fix error message.
7546 * symbol.c (free_st_labels): Plug memleak.
7548 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
7550 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
7551 reduce_binary_aa, reduce_binary, eval_intrinsic,
7552 eval_intrinsic_f2): Use typesafe prototypes for eval functions.
7553 * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
7554 for typesafe intrinsics helper functions.
7555 (g95_intrinsic_sym): Use them.
7556 * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
7557 add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
7558 add_sym_5, add_conv, resolve_intrinsic, do_simplify,
7559 check_specific, g95_intrinsic_func_interface,
7560 g95_intrinsic_sub_interface): Adjust all calls to intrinsics
7562 * trans-decl.c (g95_get_extern_function_decl): Likewise.
7563 * Make-lang.in: Don't disable warnings for strict prototypes
7564 any longer, everything is typesafe now.
7566 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
7568 * bbt.c (duplicate_node): Make static.
7569 * module.c (module_name): Make static.
7570 * scanner.c (include_dirs): Make static.
7572 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
7574 Hard coded _gfor_'s should not show up anymore.
7575 * g95.h (PREFIX): New macro.
7576 * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
7578 (g95_resolve_random_number): Likewise.
7579 * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
7580 * trans-io.c: Remove 'prefix' macro. Replace all uses with
7581 the new PREFIX macro from g95.h.
7583 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
7585 The troubles of forking... Andy implemented this just now too.
7586 Let's stick to that and keep the trees close.
7587 * g95.h (g95_st_label): 'format' member is now a g95_expr.
7588 * io.c: Revert previous changes.
7589 (g95_match_format): Match the format string as a character
7591 * match.h (g95_statement_label): Declare external.
7592 * parse.c: Revert previous changes.
7593 * symbol.c (g95_free_st_label): Free a g95_expr instead
7595 * trans-io.c: Revert previous changes.
7596 (build_dt): Use set_string to set the format string.
7598 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
7600 * io.c (format_string): Make non-static.
7601 (g95_match_format): Remember the format string.
7602 (terminate_io): Add I/O termination for empty I/O lists.
7603 * match.h: Declare external format_string.
7604 * parse.c (check_statement_label): Attack the format string
7605 to a format label for FORMAT statements.
7606 * trans-io.c (g95_add_field): Define prefix macro. Replace
7607 all uses of PREFIX define with a use of this macro.
7608 (build_dt): Implement formatted I/O for format labels.
7610 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
7612 * lang-options.h: Kill "-std=F".
7613 * options.c: Remove unimplemented "-std=F". Modify
7615 * misc.c (g95_terminal_width): New function.
7616 * error.c (g95_error_init_1): Use g95_terminal_width.
7617 * g95.h: Add prototype for g95_terminal_width, remove
7620 2003-01-19 Steven Bosscher <s.bosscher@student.tudelft.nl>
7622 * Make-lang.in: Fix typo.
7624 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
7626 * g95.h (struct g95_case): Remove unused cruft, new member
7627 'where' to keep track of the locus of the default case.
7628 * match.c (g95_match_case): Add locus to the current case.
7629 (match_case_selector): Likewise.
7630 * parse.c (parse_select_block): Move semantics check for
7631 multiple DEFAULT cases out of here to...
7632 * resolve.c (check_case_overlap): ...here. Return sooner
7634 (check_case_expr): Take two g95_cases now, use to sure the
7635 expression kinds are the same.
7636 (resolve_select): Cleanup.
7638 2003-01-18 Paul Brook <paul@nowt.org>
7640 * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
7641 * trans-decl.c (g95_set_symbol_decl): Handle non-array result
7643 (g95_get_extern_function_decl): Put decls in the correct context.
7645 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
7647 * trans-io.c: Port changes from Andy to set ERR flag.
7649 2003-01-17 Paul Brook <paul@nowt.org>
7651 * trans-array.c: Add various comments.
7652 (g95_ss_terminator): Declare as const.
7653 (g95_walk_expr): Remove first parameter and update all callers.
7654 (g95_walk_op_expr): Initialize scalar SS properly.
7655 * trans-array.h (g95_walk_expr): Update prototype.
7656 * trans-expr.c: Update for new g95_walk_expr.
7657 * trans-intrinsic.c: Ditto.
7658 * trans-io.c: Ditto.
7659 * trans.h: Various comments for SS chains.
7661 2003-01-17 Paul Brook <paul@nowt.org>
7663 * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
7665 * intrinsic.c (add_functions): Use them.
7666 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
7667 * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
7669 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
7671 Fallout of a small merge conflict:
7672 * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
7674 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
7676 * initrinsic.c: New add_sym_* functions for strong typing.
7677 (add_conv): Make prototype strict.
7678 * dump-parse-tree.c, dependency.c: Include config.h
7679 * resolve.c, trans-io.c: Fix typos.
7681 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
7683 * dump-parse-tree.c (g95_show_code_node): Show the
7684 condition for a computed GOTO that was transformed
7685 to a SELECT CASE construct.
7686 * resolve.c (check_case_overlap): Revert previous switch
7687 to treaps, it was too slow and didn't catch all trouble.
7688 (resolve_symbol): Be more flexible about module procedures.
7689 * symbol.c (check_conflict): Point to relevant section in
7690 the standard for dubious conflict. Allow procedure
7691 dummy arguments to be optional again.
7692 * trans-io (add_field): Rename to g95_add_field. Change
7694 * trans-stmt (trans_select): Handle unbounded cases for
7695 integer SELECT CASE constructs. Fix/add more comment.
7697 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
7699 * g95.h: Uses GCC's function attribute macros.
7700 * error.c, module.c, parse.c, g95.h: More function attributes.
7702 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
7704 * trans-decl.c (get_label_decl): Use TREE_LINENO instead
7705 of DECL_SOURCE_LINE, and TREE_FILENAME instead of
7708 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
7710 * f95-lang.c (pushdecl): Use TREE_LINENO instead of
7712 * trans.c (g95_trans_code): Use annotate_all_with_file_line
7713 instead of nowdead wrap_all_with_wfl.
7715 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
7717 * parse.c (g95_parse_file): In verbose mode, dump the parse tree
7718 before generating code, so we can still see it even if the code
7719 generation phase dies.
7721 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
7723 * decl.c (build_sym): Split out initialization expression parts...
7724 (add_init_expr_to_sym): ...to here.
7725 (variable_decl): Add the symbol following an attribute list to the
7726 symbol tree before parsing the optional initialization expression
7727 if the symbol is not of a derived type.
7728 * primary.c (g95_match_rvalue): Don't assume a symbol always has
7729 a value if it is a PARAMETER.
7731 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
7733 * misc.c: Don't #include <mcheck.h>
7734 * module.c: Ditto. Kill uses of mtrace, muntrace. If there
7735 ever was a glibc bug, then either this was never reported to
7736 glibc people, or it has been fixed for so long that there's
7737 no information you can find about it, anywhere.
7739 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
7742 * module.c (attr_bits, bt_types, array_spec_types):
7743 Switch 'const' and 'static'.
7744 * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
7746 GNU'ify source code:
7747 * trans-io.c: Numerous fixes, one fixed warning and a few
7748 TODO markers so that we don't forget about them.
7750 2003-01-13 Paul Brook <paul@nowt.org>
7752 * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
7753 * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
7755 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
7756 * match.c (g95_match_stop): Fix dumb == -> != error.
7758 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
7760 * dump-parse-tree.c (show_indent): Add line breaks. This
7761 whole dumping process needs cleanups.
7762 * f95-lang.c (g95_mark_addressable): Fix prototype to match
7763 the langhook. Fix 'return's accordingly.
7764 * g95-support.h: Adjust prototype.
7765 * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
7766 * lang-options.h: Add '-fsyntax-only'.
7767 * options.c (g95_init_options): Init 'no_backend'.
7768 (g95_parse_arg): Deal with '-fsyntax-only'.
7769 * parse.c (g95_parse_file): Do not generate code if 'no_backend'
7772 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
7774 * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
7775 arguments. Also make sure that if a symbol is marked INTRINSIC,
7776 an intrinsic with the symbol's name actually exists.
7777 (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
7778 Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
7779 ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
7781 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
7783 * resolve.c (resolve_contained_functions): Fix condition, don't
7784 throw internal_error if a child namespace has no name. Apparently
7785 this can be the case?
7787 2003-01-11 Paul Brook <paul@nowt.org>
7789 Port changes from Andy's tree:
7790 * g95.h (g95_code): Add stop_code.
7791 * match.c (g95_match_stop): Detter syntax checking.
7792 * resolve.c (resolve_generic_f0): Return match type.
7793 (resolve_generic_f): Remove dead/duplicated code.
7794 (resolve_specific_f): Ditto.
7795 * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
7796 * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
7797 * trans-stmt.c (g95_trans_stop): Handle new STOP format.
7799 2003-01-11 Paul Brook <paul@nowt.org>
7801 * trans-array.c: Various documentation/comment changes.
7802 * trans-stmt.c: Ditto.
7805 2003-01-10 Paul Brook <paul@nowt.org>
7807 * options.c/h: Add -fdump-parse-tree as alias of -v.
7809 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7811 * dump-parse-tree.c (g95_show_namespace): Fixed another
7812 typo. Sorry, it's Friday...
7814 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7817 * trans-array.c, trans-array.h, trans.c, trans-const.c,
7818 trans-const.h, trans-decl.c, trans-expr.c, trans.h
7819 trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
7820 trans-types.c: Fix bogus copyright years, add 2003.
7821 * trans-types.h: Give copyright header.
7823 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7825 * dump-parse-tree.c (g95_show_namespace): Fixed typo.
7826 * expr.c, options.c, scanner.c: Add some more 'const' markers.
7827 * intrinsic.c: Some constant strings moved to read-only memory.
7828 * io.c (format_asterisk): Move to...
7831 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7833 * dump-parse-tree.c (g95_show_namespace): Dump implicit
7834 types for ranges instead of per-letter. Indent the
7835 'CONTAINS' just like everything else.
7836 * resolve.c (resolve_contained_functions): Clarify comment.
7837 Explain non-obvious conditional expression. Improve
7838 diagnostics if tyoe cannot be resolved.
7839 Port semi-fix from Andy's tree:
7840 (was_declared): Move up before first use.
7841 (generic_sym, specific_sym): New functions. Code moved
7842 out if procedure_kind.
7843 (procedure_kind): Simplify using new functions.
7844 (resolve_generic_f): Make sure the functions we find in
7845 a parent namespace is generic.
7846 (resolve_specific_f): Ditto for specific functions.
7848 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7850 * trans-stmt.c, trans.c: Fix some code style issues. Add
7851 some more comment (but still not enough!).
7853 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7855 * symbol.c (flavors, procedures, intents, acces_types,
7856 access_types, ifsrc_types): Make const.
7857 * misc.c (g95_string2code): Make 'm' param 'const'.
7858 * module.c (find_enum, write_atom, mio_name): Make
7860 (attr_bits, bt_types, array_spec_types, array_ref_types,
7861 ref_types, expr_types): Make const.
7862 * g95.h: Adjust external decls.
7864 2003-01-09 Paul Brook <paul@nowt.org>
7866 * Testsuite: Add a load of new cases.
7868 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
7870 * Make-file.in: Add dependency on back end header files;
7871 a parallel build should work now.
7872 * f95-lang-c (lang_identifier): Remove bogus comment.
7873 (g95_be_parse_file): Fix prototype.
7874 (g95_init): Make static.
7875 (g95_finish): Make static.
7876 * error.c (g95_syntax_error): Kill. Make define in...
7877 * g95.h (g95_syntax_error): Define.
7878 (g95.options): Make 'source' member 'const'.
7879 * interface.c (g95_match_interface): Explain
7880 hard-to-read condition.
7881 (g95_match_end_interface): Ditto.
7882 * trans_const.c (g95_build_string_const): Make 's' parameter
7884 * trans_const.h: Adjust protoype accordingly.
7885 * trans-decl.c: Include tree-dump.h
7886 (g95_generate_function_code): Build fixes for recent changes
7887 in the tree-ssa branch.
7889 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
7891 * format.c: Kill, move code from here...
7893 * Make-lang.in: Adjust.
7896 * BUGS: Mention where to submit bugs. Move old content...
7897 * TODO: ...to here. New file.
7899 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
7900 Fix most warnings, and suppress the ones we can't fix for now.
7901 * Make-lang.in: Suppress warnings about bad proto's in g95.h,
7902 these warnings just clutter the screen and there's not much
7903 we can do about them for now anyway.
7904 * check.c, iresolve.c: Mark unused function parameters.
7905 * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
7906 they should be resolved before they get here.
7907 * error.c: Remove unused FILE *status_out.
7908 * f95-lang.c (g95_init): Remove bogus cast.
7909 * Many files: Make things 'const' where required.
7910 * g95.h: Fix prototypes for all modified functions above.
7911 (g95_options): Remove 'object' member.
7913 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
7915 * Make-file.in: Cleanup bogus targets. Add more comment.
7916 * lang-options.h: New option '-w'.
7917 * g95.h: add no_options field to struct g95_options.
7918 * options.c (g95_init_options): Default no_warnings to off.
7919 (g95_parse_arg): Recognise the '-w' switch and its alias,
7921 * error.c (g95_warning, g95_warning_now): Don't emit warning if
7922 no_warning option is set.
7923 * iresolve.c (g95_resolve_shape): Fix warning.
7925 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
7927 * primary.c (g95_next_string_char): Rename next_string_char, and
7928 make static. Adjust callers accordingly.
7929 * resolve.c (resolve_generic_f0): Return try, not match. Adjust
7930 callers accordingly.
7931 * g95.h: Split out all g95_match* functions to...
7932 * match.h: ...here. New file.
7933 * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
7934 matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
7936 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
7938 * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
7939 g95_merge_new_implicit): New functions.
7940 (g95_match_implicit_none, g95_match_implicit): Move from here...
7941 * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
7942 Modify to use the new functions in symbol.c.
7943 * g95.h: Add and move prototypes.
7945 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
7947 * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
7948 node compare function.
7949 (g95_insert_bbt): Likewise.
7950 (g95_insert_bbt_with_overlap): Likewise.
7951 (g95_delete_bbt): Likewise.
7952 (delete_treap): Likewise. Also fix a potential bug when calling it.
7953 * module.c (compare_pointers): Change proto to compare_fn.
7954 (compare_integers): Likewise.
7955 (compare_true_names): Likewise.
7956 (find_true_name): Adjust call to compare_true_names to match proto.
7957 (require_atom, write_atom, mio_name): Fix 'const' warnings.
7958 (init_pi_tree): Make compare a compare_fn instead of (int *).
7959 * resolve.c (compare_cases): Change proto to compare_fn.
7960 * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
7961 it static, and rename to compare_symtree.
7962 (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
7964 * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
7965 of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
7967 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
7968 * Make-lang.in: Fix spaces/tabs issues from previous patch.
7969 * patch.options: Blow away Paul's checkin mistake :-)
7970 * io.c (terminate_io): Fix memory leak (Arnaud).
7972 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
7974 * Make-lang.in: Teach about building DVI, info manual.
7975 * g95.texi: New file.
7977 2003-01-02 Paul Brook <paul@nowt.org>
7979 * trans-array.c (g95_reverse_ss): Make static and don't use.
7980 (g95_conv_ss_descriptor): Don't use g95_loopinfo
7981 (g95_conv_array_parameters): Modify for pointer assignments.
7982 (g95_walk_subexpr): New function.
7983 (g95_walk_expr*): Use it.
7984 * trans-array.h (g95_reverse_ss): Remove prototype.
7985 * trans-expr.c (g95_trans_pointer_assign): Implement.
7986 (Many): Set se.want_pointer before calling g95_conv_array_parameter.
7987 * trans-intrinsic.c: Sync with scalarizer changes.
7988 * trans-io.c: Ditto.
7990 2002-12-29 Paul Brook <paul@nowt.org>
7992 * trans-array.c: Document calling convention for arrays.
7994 2002-12-19 Paul Brook <paul@nowt.org>
7996 * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
7997 assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
7998 optional parameters for some intrinsics.
7999 (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
8000 * trans-expr.c (g95_conv_function_call): Pass NULL for absent
8001 optional parameters.
8002 * trans.h (g95_se): Add ignore_optional flag.
8004 2002-12-15 Paul Brook <paul@nowt.org>
8006 * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
8007 * trans-decl.c (g95_generate_function_code): Use TDI_original.
8009 2002-12-14 Paul Brook <paul@nowt.org>
8011 * trans-stmt.c (g95_trans_call): Use resolved symbol name.
8013 2002-12-12 Paul Brook <paul@nowt.org>
8015 * trans-array.c (g95_trans_array_constructor_subarray): Fully
8016 initialize the scalarizer.
8017 (various): Update to new format of g95_expr->value.constructor.
8019 2002-12-08 Paul Brook <paul@nowt.org>
8021 * trans-array.c (g95_put_offset_into_var): New function.
8022 (g95_trans_array_constructor_subarray): New function.
8023 (g95_trans_array_constructor_value): Use it.
8024 (g95_array_cons_size): Don't abort() on array components.
8026 2002-12-08 Paul Brook <paul@nowt.org>
8028 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
8029 * support.c: Update #includes.
8030 (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
8031 * trans-array.c: Update #includes.
8033 * trans-const.c: Ditto.
8034 * trans-io.c: Ditto.
8035 * trans-types.c: Ditto.
8036 (g95_init_types): Set size_type_node.
8037 * trans-decl.c: Update #includes.
8038 (gfor_fndecl_adjust{l,r}): Declare and initialize.
8039 * trans-stmt.c: Update #includes.
8040 (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
8041 (g95_trans_select): Fix check for unbounded ranges.
8042 * trans-expr.c: Update #includes.
8043 (g95_conv_string_tmp): New function.
8044 (g95_conv_concat_op): Use it.
8045 * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
8046 * Trans-intrisic.c: Update #includes.
8047 (g95_conv_intrinsic_strcmp): New function.
8048 (g95_conv_intrinsic_adjust): Ditto.
8049 (g95_conv_intrinsic_function: Use them.
8051 2002-11-30 Paul Brook <paul@nowt.org>
8053 * trans-array.c (g95_walk_function_expr): Handle non-array return by
8055 * trans-dec.c (g95_build_function_decl): Handle character return
8057 (g95_get_fake_result_decl): Ditto.
8058 (g95_trans_deferred_vars): Ditto.
8059 * trans-expr.c (g95_conv_function_call): Ditto.
8060 (g95_trans_arrayfunc_assign) Limit to array valued functions.
8061 * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
8062 (g95_conv_intrinsic_function): Use it.
8063 * trans-types.c (g95_sym_type): Handle functions returning strings.
8064 (g95_return_by_reference): Ditto.
8065 (g95_get_function_type): Ditto.
8067 2002-11-18 Paul Brook <paul@nowt.org>
8069 * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
8070 requires a temporary.
8071 (g95_trans_select): Handle computed gotos.
8072 * trans-types.c (g95_build_array_type): Warn about non-functional
8073 assumed shape arrays.
8074 * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
8076 * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
8077 (g95_conv_intrinsic_int): New function.
8078 (g95_conv_intrinsic_mod): New function.
8079 (g95_conv_intrinsic_ichar): New function.
8080 (g95_conv_intrinsic_function): Use them.
8081 (g95_conv_intrinsic_dim): Use g95_evaluate_now.
8083 2002-11-17 Toon Moene <toon@moene.indiv.nluug.nl>
8085 * trans-types.c (g95_build_array_type): Assumed
8086 sized arrays can have rank > 1.
8087 * trans.c (g95_trans_code): Remove erroneous
8088 warning about CONTINUE.
8089 * trans-expr.c (g95_conv_variable): Remove
8092 2002-11-15 Paul Brook <paul@nowt.org>
8094 * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
8096 2002-10-31 Paul Brook <paul@nowt.org>
8098 * f95-tree.c: Remove tree copying stuff that's now in gimple.c
8099 * trans-expr.c (g95_conv_component_ref): Handle character string
8101 (g95_conv_string_parameter): Ditto.
8102 * trans-types.c (g95_get_derived_type): Add length decl to caracter
8105 2002-10-10 Paul Brook <paul@nowt.org>
8107 * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
8108 * trans-expr.c (g95_conv_function_call): Remove unreliable return value
8110 * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
8111 (g95_conv_intrinsic_function): Handle size and shape intrinsics.
8112 (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
8113 * trans-types.c (pvoid_type_node): Declare and initialize.
8114 * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
8115 (g95_array_allocate): Fix when base==data.
8116 (g95_conv_array_parameter): Correctly handle reduced rank sections.
8117 * trans-io.c (g95_trans_write): Correctly handle string modifiers.
8119 2002-10-09 Paul Brook <paul@nowt.org>
8121 * (g95_conv_expr_reference): Handle character strings correctly.
8123 2002-10-07 Paul Brook <paul@nowt.org>
8125 (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
8127 * trans-array.c (g95_build_array_initializer): Remove.
8128 (g95_conv_array_initializer): New Function.
8129 (g95_trans_auto_arry_allocation): Cleanup.
8130 (g95_trans_init_character_array): Remove.
8131 * g95spec.c: Link in libgforbegin.
8132 * trans.c (g95_generate_code): Rename main function to MAIN__.
8133 (g95_create_var): New function.
8134 (g95_create_var_np): New function.
8135 (g95_evaluate_now): New function.
8136 (g95_start_block): New function.
8137 (g95_finish_block): New function.
8138 (g95_add_expr_to_block): New function.
8139 (g95_add_block_to_block): New function.
8140 * trans-expr.c (g95_conv_componen_ref): New function.
8141 * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
8142 (F95_OBJS): Add dependency.o.
8143 * f95-lang.c (g95_is_simple_stmt): Remove.
8144 * f95-tree.c (mark_not_simple): New function.
8145 (unshare_all_trees): New function.
8146 (create_tmp_var, create_tmp_alias_var): Remove.
8147 * support.c (declare_tmp_vars, tree_last_decl): Remove.
8148 * trans*: Convert to new IR using GENERIC trees. Don't bother about
8149 SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
8151 2002-10-01 Paul Brook <paul@nowt.org>
8153 * trans-array.c: Add support for descriptorless arrays.
8154 (g95_conv_array_data): New function.
8155 (g95_conv_array_base): New function.
8156 * trans-array.h: Declare these here.
8157 * trans-decl.c(g95_create_mopdule_variable): Perform variable
8158 initialization and creation here.
8159 (g95_create_module_vars): Instead of here.
8160 * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
8161 * trans-intrinsic.c: Ditto.
8162 * trans-types.c (g95_is_nodesc_array): New function.
8163 (g95_get_nodesc_array_type): New function.
8164 (g95_sym_type, g95_get_derived_type): Use them.
8165 * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
8167 2002-09-28 Paul Brook <paul@nowt.org>
8169 * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
8170 * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
8173 2002-09-24 Paul Brook <paul@nowt.org>
8175 * f95-lang.c (listify): Remove declaration.
8176 (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
8178 * f95-tree.c (get_name): New function.
8179 * trans.c (module_namespace): Remove.
8180 * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
8181 * trans-types.c: Ditto.
8183 2002-09-19 Paul Brook <paul@nowt.org>
8185 * trans-array.c (g95_get_array_cons_size): New Function.
8186 (g95_con_ss_startstride): Handle Array constructors.
8187 (g95_conv_loop_setup): Ditto.
8188 (g95_conv_array_parameter): Ditto.
8189 * tras-decl.c (g95_finish_var_decl): Make initializes variables
8192 2002-09-19 Paul Brook <paul@nowt.org>
8194 * trans.c (g95_simple_fold_tmp): Detect variables inside
8196 * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
8198 2002-09-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
8200 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
8202 2002-09-14 Paul Brook <paul@nowt.org>
8204 * trans.c (g95_create_module_variable): Move to trans-decl.c.
8205 * trans-const.c (g95_conv_string_init): New Function.
8206 * trans-const.h: Declare it.
8207 * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
8208 variables. Don't bail on intrinsic symbols.
8209 (get_extern_function_decl): Handle specific intrinsic functions.
8210 * trans-types.c (g95_sym_type): Dummy functions don't return
8212 * trans-array.c (g95_build_array_initializer): New Function.
8213 (g95_trans_auto_array_allocation): Build initializer for static decls.
8214 Don't use mpz_addmul, it's GMP4 only.
8216 2002-09-12 Paul Brook <paul@nowt.org>
8218 * trans-decl.c (g95_generate_code): Fix thinko with return variable.
8219 (g95_get_extern_function_decl, g95_build_function_decl): Mangle
8220 assembler names for module procedures.
8222 2002-09-11 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
8224 * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
8227 2002-09-10 Paul Brook <paul@nowt.org>
8229 * trans-array.c: Change format of G95_SS_TEMP strictures.
8230 (g95_check_fncall_dependancy): New function.
8231 (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
8233 * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
8235 (g95_build_function_decl): Don't assume result arrays are packed.
8236 (g95_trans-deferred-vars): Handle array result variables.
8237 (g95_generate_fuction_code): Clear saved_function_decls.
8238 * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
8240 (g95_trans_arrayfunc_assign): New function.
8241 (g95_trans_assignment): Use it.
8242 * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
8243 (g95_se): Add direct_byref.
8244 * trans-types.c: Use sym->result rather than sym where appropriate.
8245 * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
8246 Update other functions to use this.
8247 (g95_is_intrinsic_libcall): New function.
8248 (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
8249 (g95_walk_intrinsic_function): Ditto.
8251 2002-09-08 Paul Brook <paul@nowt.org>
8253 * trans-types.c: Change rank field to dtype field in array descriptor.
8254 * trans-array.c: Implement filling of dtype array descriptor field.
8255 * trans-intrinsic.c: Fix broken LEN intrinsic.
8257 2002-09-07 Paul Brook <paul@nowt.org>
8259 * trans-intrinsic.c: Remove outdated todo intrinsic list.
8260 (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
8261 (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
8263 2002-09-06 Paul Brook <paul@nowt.org>
8265 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
8266 (gt-f95-trans-types.h): Add dependancy information.
8267 * config-lang.in (gtfiles): Add trans-types.c
8268 * f95-lang.c (g95_be_parse_file): Pass error and warning counts
8269 back to top-level code.
8270 * trans-array.c, trans-types.c: Change format of array descriptor.
8271 (g95_conv_descriptor_dimension): New function.
8272 * trans-types.h (g95_conv_descriptor_rank): define.
8273 * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
8276 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
8278 * trans-array.c, trans-types.c: Add rank information to descriptor.
8280 2002-09-06 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
8282 * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
8284 2002-09-04 Paul Brook <paul@nowt.org>
8286 * f95-lang.c (g95_create_decls): New function.
8287 (g95_init): Move initialization of external decls to above, and call
8288 from g95_be_parse_file.
8289 * trans.c (g95_finish_stmt): Don't amputate the decl chain.
8290 * trans-types.c (g95_init_types): Always name integer and char types.
8291 (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
8293 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
8295 * Make-lang.in: Add options.c to F95_PARSER_OBJS
8297 2002-09-02 Paul Brook <paul@nowt.org>
8299 * g95_generate_code: Clear the attr for __fortran_main.
8300 * trans-types.c (g95_finish_type): New function.
8301 * g95_init_io_state_type: Use g95_finish_type.
8302 * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
8304 2002-09-01 Paul Brook <paul@nowt.org>
8306 * README.backend: Warn about the dangers of extra config.h files.
8307 Remove obsolete libgfor stuff.
8308 * config-lang.in: Add target-libgfor dependancy.
8309 * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
8311 2002-09-01 Toon Moene <toon@moene.indiv.nluug.nl>
8313 * g95_conv_mpz_to_tree: Free storage pointed to by q,
8316 2002-08-30 Paul Brook <paul@nowt.org>
8318 * trans-intrinsic.c (g95_conv_intrinsic_function,
8319 g95_walk_intrinsic_function): Added ANY and ALL.
8320 (g95_conv_intrinsic_anyall): New function.
8321 * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in