1 2005-10-28 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3 * check.c (gfc_check_alarm_sub, gfc_check_signal,
4 gfc_check_signal_sub): New functions.
5 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SIGNAL.
6 * intrinsic.c (add_functions): Add signal intrinsic.
7 (add_subroutines): Add signal and alarm intrinsics.
8 * intrinsic.texi: Document the new intrinsics.
9 * iresolve.c (gfc_resolve_signal, gfc_resolve_alarm_sub,
10 gfc_resolve_signal_sub): New functions.
11 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add case
13 * intrinsic.h: Add prototypes for gfc_check_alarm_sub,
14 gfc_check_signal, gfc_check_signal_sub, gfc_resolve_signal,
15 gfc_resolve_alarm_sub, gfc_resolve_signal_sub.
17 2005-10-28 Steven Bosscher <stevenb@suse.de>
20 * interface.c (gfc_match_end_interface): Fix typo in
21 INTERFACE_USER_OP case.
23 2005-10-26 Francois-Xavier Coudert <coudert@clipper.ens.fr>
26 * resolve.c (resolve_symbol): Remove the use of whynot, so that
27 error messages are not built from pieces.
29 2005-10-26 Paul Thomas <pault@gcc.gnu.org>
32 * decl.c (gfc_match_data_decl): Correct broken bit of code
33 that prevents undefined derived types from being used as
34 components of another derived type.
35 * resolve.c (resolve_symbol): Add backstop error when derived
36 type variables arrive here with a type that has no components.
38 2005-10-25 Jakub Jelinek <jakub@redhat.com>
40 * trans.h (gfc_conv_cray_pointee): Remove.
41 * trans-expr.c (gfc_conv_variable): Revert 2005-10-24 change.
42 * trans-array.c (gfc_conv_array_parameter): Likewise.
43 * trans-decl.c (gfc_conv_cray_pointee): Remove.
44 (gfc_finish_cray_pointee): New function.
45 (gfc_finish_var_decl): Use it. Don't return early for Cray
47 (gfc_create_module_variable): Revert 2005-10-24 change.
48 * decl.c (cray_pointer_decl): Update comment.
49 * gfortran.texi: Don't mention Cray pointees aren't visible in the
52 * symbol.c (check_conflict): Add conflict between cray_pointee
53 and in_common resp. in_equivalence.
54 * resolve.c (resolve_equivalence): Revert 2005-10-24 change.
56 * module.c (ab_attribute): Add AB_CRAY_POINTER and AB_CRAY_POINTEE.
57 (attr_bits): Likewise.
58 (mio_symbol_attribute): Save and restore cray_pointe{r,e} attributes.
59 (mio_symbol): For cray_pointee write/read cp_pointer reference.
61 2005-10-25 Feng Wang <fengwang@nudt.edu.cn>
64 * trans-decl.c (gfc_add_assign_aux_vars): New function. Add two
66 (gfc_get_symbol_decl): Use it when a variable, including dummy
67 argument, is assigned a label.
68 (gfc_trans_assign_aux_var): New function. Set initial value of
69 the auxiliary variable explicitly.
70 (gfc_trans_deferred_vars): Use it.
71 * trans-stmt.c (gfc_conv_label_variable): Handle dummy argument.
73 2005-10-24 Asher Langton <langton2@llnl.gov>
77 * check.c (gfc_check_loc): New function.
78 * decl.c (variable_decl): New variables cp_as and sym. Added a
79 check for variables that have already been declared as Cray
80 Pointers, so we can get the necessary attributes without adding
82 (attr_decl1): Added code to catch pointee symbols and "fix"
84 (cray_pointer_decl): New method.
85 (gfc_match_pointer): Added Cray pointer parsing code.
86 (gfc_mod_pointee_as): New method.
87 * expr.c (gfc_check_assign): Added a check to catch vector-type
88 assignments to pointees with an unspecified final dimension.
89 * gfortran.h: (GFC_ISYM_LOC): New.
90 (symbol_attribute): Added cray_pointer and cray_pointee bits.
91 (gfc_array_spec): Added cray_pointee and cp_was_assumed bools.
92 (gfc_symbol): Added gfc_symbol *cp_pointer.
93 (gfc_option): Added flag_cray_pointer.
94 (gfc_add_cray_pointee): Declare.
95 (gfc_add_cray_pointer ): Declare.
96 (gfc_mod_pointee_as): Declare.
97 * intrinsic.c (add_functions): Add code for loc() intrinsic.
98 * intrinsic.h (gfc_check_loc): Declare.
99 (gfc_resolve_loc): Declare.
100 * iresolve.c (gfc_resolve_loc): New.
101 * lang.opt: Added fcray-pointer flag.
102 * options.c (gfc_init_options): Initialized.
103 gfc_match_option.flag_cray_pointer.
104 (gfc_handle_option): Deal with -fcray-pointer.
105 * parse.c:(resolve_equivalence): Added code prohibiting Cray
106 pointees in equivalence statements.
107 * resolve.c (resolve_array_ref): Added code to prevent bounds
108 checking for Cray Pointee arrays.
109 (resolve_equivalence): Prohibited pointees in equivalence
111 * symbol.c (check_conflict): Added Cray pointer/pointee
113 (gfc_add_cray_pointer): New.
114 (gfc_add_cray_pointee): New.
115 (gfc_copy_attr): New code for Cray pointers and pointees.
116 * trans-array.c (gfc_trans_auto_array_allocation): Added code to
117 prevent space from being allocated for pointees.
118 (gfc_conv_array_parameter): Added code to catch pointees and
119 correctly set their base address.
120 * trans-decl.c (gfc_finish_var_decl): Added code to prevent
121 pointee declarations from making it to the back end.
122 (gfc_create_module_variable): Same.
123 * trans-expr.c (gfc_conv_variable): Added code to detect and
125 (gfc_conv_cray_pointee): New.
126 * trans-intrinsic.c (gfc_conv_intrinsic_loc): New.
127 (gfc_conv_intrinsic_function): Added entry point for loc
129 * trans.h (gfc_conv_cray_pointee): Declare.
131 * gfortran.texi: Added section on Cray pointers, removed Cray
132 pointers from list of proposed extensions.
133 * intrinsic.texi: Added documentation for loc intrinsic.
134 * invoke.texi: Documented -fcray-pointer flag.
136 2005-10-24 Asher Langton <langton2@llnl.gov>
138 * decl.c (gfc_match_save): Changed duplicate SAVE errors to
139 warnings in the absence of strict standard conformance
140 * symbol.c (gfc_add_save): Same.
142 2005-10-24 Francois-Xavier Coudert <coudert@clipper.ens.fr>
145 * arith.c (gfc_arith_error): Change message to include locus.
146 (check_result, eval_intrinsic, gfc_int2int, gfc_real2real,
147 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Use
148 the new gfc_arith_error.
149 (arith_error): Rewrite full error messages instead of building
151 * check.c (must_be): Removed.
152 (type_check, numeric_check, int_or_real_check, real_or_complex_check,
153 kind_check, double_check, logical_array_check, array_check,
154 scalar_check, same_type_check, rank_check, kind_value_check,
155 variable_check, gfc_check_allocated, gfc_check_associated,
156 gfc_check_cmplx, gfc_check_dcmplx, gfc_check_dot_product,
157 gfc_check_index, gfc_check_kind, gfc_check_matmul, gfc_check_null,
158 gfc_check_pack, gfc_check_precision, gfc_check_present,
159 gfc_check_spread): Rewrite full error messages instead of
160 building them from pieces.
161 * decl.c (gfc_match_entry): Rewrite full error messages instead
162 of building them from pieces.
163 * parse.c (gfc_state_name): Remove.
164 * parse.h: Remove prototype for gfc_state_name.
166 2005-10-23 Andrew Pinski <pinskia@physics.uc.edu>
169 * check.c (gfc_check_ichar_iachar): Move the code around so
170 that the check on the length is after check for
173 2005-10-23 Asher Langton <langton2@llnl.gov>
175 * decl.c (match_type_spec): Add a BYTE type as an extension.
177 2005-10-23 Paul Thomas <pault@gcc.gnu.org>
180 * trans-expr.c (gfc_trans_arrayfunc_assign): Return NULL
181 if there is a component ref during an array ref to force
182 use of temporary in assignment.
186 * fortran/iresolve.c (check_charlen_present): New function to
187 add a charlen to the typespec, in the case of constant
189 (gfc_resolve_merge, gfc_resolve_spread): Call.the above.
190 (gfc_resolve_spread): Make calls to library functions that
191 handle the case of the spread intrinsic with a scalar source.
193 2005-10-22 Erik Edelmann <eedelman@gcc.gnu.org>
196 * decl.c (variable_decl): Don't assign default initializers to
199 2005-10-21 Jakub Jelinek <jakub@redhat.com>
201 * interface.c (compare_actual_formal): Issue error when attempting
202 to pass an assumed-size array as assumed-shape array argument.
204 2005-10-20 Erik Edelmann <erik.edelmann@iki.fi>
207 * resolve.c (expr_to_initialize): New function.
208 (resolve_allocate_expr): Take current statement as new
209 argument. Add default initializers to variables of
210 derived types, if they need it.
211 (resolve_code): Provide current statement as argument to
212 resolve_allocate_expr().
214 2005-10-19 Paul Thomas <pault@gcc.gnu.org>
217 * resolve.c (resolve_symbol): Correct error in check for
218 assumed size array with default initializer by testing
219 for arrayspec before dereferencing it.
221 2005-10-17 Paul Thomas <pault@gcc.gnu.org>
224 * gfortran.h: Primitive for gfc_is_formal_arg.
225 * resolve.c(gfc_is_formal_arg): New function to signal across
226 several function calls that formal argument lists are being
228 (resolve_formal_arglist): Set/reset the flag for gfc_is_formal_arg.
229 *expr.c(check_restricted): Add check, via gfc_is_formal_arg, if
230 symbol is part of an formal argument declaration.
233 * decl.c (add_init_expr_to_sym): Make a new character
234 length for each variable, when the expression is NULL
238 * match.c (recursive_stmt_fcn): New function that tests if
239 a statement function resurses through itself or other other
241 (gfc_match_st_function): Call recursive_stmt_fcn to check
242 if this is recursive and to raise error if so.
246 * resolve.c (resolve_symbol): Errors for assumed size arrays
247 with default initializer and for external objects with an
251 * decl.c (match_attr_spec): Prevent PUBLIC from being used
254 2005-10-16 Erik Edelmann <erik.edelmann@iki.fi>
257 * expr.c (check_inquiry): Add "len" to inquiry_function.
259 2005-10-14 Jakub Jelinek <jakub@redhat.com>
261 * primary.c (match_boz_constant): Add missing break after gfc_error.
263 2005-10-12 Paul Thomas <pault@gcc.gnu.org>
266 * trans-types.c (gfc_get_derived_type): Insert code to obtain backend
267 declaration for derived types, building if necessary. Return the
268 derived type if the fields have been built by this process. Otherwise,
269 continue as before but using the already obtained backend_decls for the
270 derived type components. Change the gcc_assert to act on the field.
272 2005-10-12 Paul Thomas <pault@gcc.gnu.org>
275 * decl.c (variable_decl): Make a new copy of the character
276 length for each variable, when the expression is not a
279 2005-10-12 Francois-Xavier Coudert <coudert@clipper.ens.fr>
281 * gfortran.h: Add bitmasks for different FPE traps. Add fpe
283 * invoke.texi: Document the new -ffpe-trap option.
284 * lang.opt: Add -ffpe-trap option.
285 * options.c (gfc_init_options): Initialize the FPE option.
286 (gfc_handle_fpe_trap_option): New function to parse the argument
287 of the -ffpe-trap option.
288 (gfc_handle_option): Add case for -ffpe-trap.
289 * trans-decl.c: Declare a tree for the set_fpe library function.
290 (gfc_build_builtin_function_decls): Build this tree.
291 (gfc_generate_function_code): Generate a call to set_fpe at
292 the beginning of the main program.
293 * trans.h: New tree for the set_fpe library function.
295 2005-10-12 Paul Thomas <pault@gcc.gnu.org>
299 * symbol.c (check_conflict): Prevent common variables and
300 function results from having the SAVE attribute,as required
303 2005-10-12 Paul Thomas <pault@gcc.gnu.org>
306 * resolve.c (resolve_symbol): Exclude use and host associated
307 symbols from the test for private objects in a public namelist.
309 2005-10-12 Jakub Jelinek <jakub@redhat.com>
311 * trans-common.c (build_field): Fix comment typo.
312 (create_common): Set backend_decl of COMMON or EQUIVALENCEd
313 variables to a VAR_DECL with the COMPONENT_REF in
314 DECL_HAS_VALUE_EXPR rather than COMPONENT_REF directly.
315 * f95-lang.c (gfc_expand_function): Emit debug info for
316 EQUIVALENCEd variables if the equiv union is going to be output.
318 2005-10-11 Steven G. Kargl <kargls@comcast.net>
321 * iresolve.c (gfc_resolve_aint, gfc_resolve_anint): Type conversion
324 2005-10-11 Jakub Jelinek <jakub@redhat.com>
326 * f95-lang.c (gfc_init_decl_processing): Initialize
329 2005-10-07 Erik Edelmann <erik.edelmann@iki.fi>
332 * resolve.c (find_array_spec): Search through the list of
333 components in the symbol of the type instead of the symbol of the
336 2005-10-05 Richard Guenther <rguenther@suse.de>
339 * parse.c (gfc_parse_file): Exit early for empty files.
341 2005-10-03 Steve Ellcey <sje@cup.hp.com>
343 * fortran/trans-types.c (gfc_init_kinds): Only pass float, double,
344 and long double floating point types through to Fortran compiler.
346 2005-10-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
349 * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long
350 double builtin function.
351 (gfc_init_builtin_functions): Add mfunc_longdouble,
352 mfunc_clongdouble and func_clongdouble_longdouble trees. Build
353 them for round, trunc, cabs, copysign and pow functions.
354 * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add
355 case for kind 10 and 16.
356 * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16,
357 exponent10 and exponent16.
358 (gfc_build_intrinsic_function_decls): Build nodes for int16,
359 real10, real16, complex10 and complex16 types. Build all possible
360 combinations for function _gfortran_pow_?n_?n. Build function
361 calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16.
362 * trans-expr.c (gfc_conv_power_op): Add case for integer(16),
363 real(10) and real(16).
364 * trans-intrinsic.c: Add suppport for long double builtin
365 functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION
367 (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and
369 (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl
370 and real16_decl in library functions.
371 (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex
373 (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16)
375 (gfc_conv_intrinsic_sign): Likewise.
376 (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind.
377 * trans-types.c (gfc_get_int_type, gfc_get_real_type,
378 gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in
379 the case of kinds not available.
380 * trans.h: Declare trees for cpowl10, cpowl16, ishftc16,
381 exponent10 and exponent16.
383 2005-10-01 Paul Thomas <pault@gcc.gnu.org>
392 * gfortran.h: Prototype for gfc_add_in_equivalence.
393 * match.c (gfc_match_equivalence): Make a structure component
394 an explicit,rather than a syntax, error in an equivalence
395 group. Call gfc_add_in_equivalence to add the constraints
396 imposed in check_conflict.
397 * resolve.c (resolve_symbol): Add constraints: No public
398 structures with private-type components and no public
399 procedures with private-type dummy arguments.
400 (resolve_equivalence_derived): Add constraint that prevents
401 a structure equivalence member from having a default
403 (sequence_type): New static function to determine whether an
404 object is default numeric, default character, non-default
405 or mixed sequence. Add corresponding enum typespec.
406 (resolve_equivalence): Add constraints to equivalence groups
407 or their members: No more than one initialized member and
408 that different types are not equivalenced for std=f95. All
409 the simple constraints have been moved to check_conflict.
410 * symbol.c (check_conflict): Simple equivalence constraints
411 added, including those removed from resolve_symbol.
412 (gfc_add_in_equivalence): New function to interface calls
413 match_equivalence to check_conflict.
415 2005-09-27 Jakub Jelinek <jakub@redhat.com>
418 * trans-common.c (build_equiv_decl): Add IS_SAVED argument.
419 If it is true, set TREE_STATIC on the decl.
420 (create_common): If any symbol in equivalence has SAVE attribute,
421 pass true as last argument to build_equiv_decl.
423 2005-09-24 Janne Blomqvist <jblomqvi@cc.hut.fi>
425 * trans-io.c (gfc_build_io_library_fndecls): Add entry
426 iocall_x_array for transfer_array.
427 (transfer_array_desc): New function.
428 (gfc_trans_transfer): Add code to call transfer_array_desc.
430 2005-09-26 Jakub Jelinek <jakub@redhat.com>
433 * symbol.c (gfc_is_var_automatic): Return true if character length
434 is non-constant rather than constant.
435 * resolve.c (gfc_resolve): Don't handle !gfc_option.flag_automatic
437 * options.c (gfc_post_options): Set gfc_option.flag_max_stack_var_size
438 to 0 for -fno-automatic.
440 2005-09-23 Paul Thomas <pault@gcc.gnu.org>
443 * module.c (mio_component_ref): Return if the symbol is NULL
444 and wait for another iteration during module reads.
445 (mio_symtree_ref): Suppress the writing of contained symbols,
446 when a symbol is available in the main namespace.
447 (read_module): Restrict scope of special treatment of contained
448 symbols to variables only and suppress redundant call to
451 2005-09-22 Steven G. Kargl <kargls@comcast.net>
454 * interface.c (check_interface1): Fix NULL dereference.
456 2005-09-22 Erik Edelmann <erik.edelmann@iki.fi>
459 * resolve.c (derived_inaccessible): New function.
460 (resolve_transfer): Use it to check for private
463 2005-09-22 Steven G. Kargl <kargls@comcast.net>
466 * intrinsic.c (add_function): Add IMAG, IMAGPART, and REALPART
468 * intrinsic.h: Prototypes for gfc_simplify_realpart and
469 gfc_resolve_realpart.
470 * intrinsic.texi: Document intrinsic procedures.
471 * simplify.c (gfc_simplify_realpart): New function.
472 * irseolve.c (gfc_resolve_realpart): New function.
474 2005-09-21 Erik Edelmann <erik.edelmann@iki.fi>
477 * trans-stmt.c (gfc_trans_deallocate): Check if the
478 object to be deallocated is an array by looking at
479 expr->rank instead of expr->symtree->n.sym->attr.dimension.
481 2005-09-20 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
484 * io.c (resolve_tag): Don't allow non-CHARACTER constants as formats.
485 (match_io): Fix usage of gfc_find_symbol.
487 2005-09-20 Jakub Jelinek <jakub@redhat.com>
490 * primary.c (match_actual_arg): Handle ENTRY the same way
493 2005-09-18 Francois-Xavier Coudert <coudert@clipper.ens.fr>
495 * Make-lang.in: Make check-fortran alias for check-gfortran.
497 2005-09-18 Andreas Jaeger <aj@suse.de>
499 * module.c (read_module): Add missed line from last patch.
501 2005-09-18 Erik Edelmann <erik.edelmann@iki.fi>
504 * resolve.c (resolve_symbol): Don't assign default
505 initializer to pointers.
507 2005-09-18 Paul Thomas <pault@gcc.gnu.org>
510 * module.c (read_module): Give symbols from module procedures
511 different true_name entries to those from the module proper.
513 2005-09-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
516 * arith.c (gfc_arith_error): Add translation support for error
518 * array.c (gfc_match_array_ref): Likewise.
519 (gfc_match_array_spec): Likewise.
520 * check.c (must_be): Add msgid convention to third argument.
521 (same_type_check): Add translation support for error message.
522 (rank_check): Likewise.
523 (kind_value_check): Likewise.
524 (gfc_check_associated): Correct typo.
525 (gfc_check_reshape): Add translation support for error message.
526 (gfc_check_spread): Likewise.
527 * error.c (error_printf): Add nocmsgid convention to argument.
528 (gfc_warning, gfc_notify_std, gfc_warning_now, gfc_warning_check)
529 (gfc_error, gfc_error_now): Likewise.
530 (gfc_status): Add cmsgid convention to argument.
531 * expr.c (gfc_extract_int): Add translation support for error
533 (gfc_check_conformance): Add msgid convention to argument.
534 (gfc_check_pointer_assign): Correct tabbing.
535 * gfortran.h: Include intl.h header. Remove prototype for gfc_article.
536 * gfortranspec.c: Include intl.h header.
537 (lang_specific_driver): Add translation support for --version.
538 * io.c (check_format): Add translation support for error message.
539 (format_item_1): Likewise.
540 (data_desc): Likewise.
541 * matchexp.c: Likewise.
542 * misc.c (gfc_article): Remove function.
543 * module.c (bad_module): Use msgid convention. Add translation support
545 (require_atom): Add translation support for error messages.
546 * parse.c (gfc_ascii_statement): Likewise.
547 (gfc_state_name): Likewise.
548 * primary.c (match_boz_constant): Reorganise error messages for
550 * resolve.c (resolve_entries): Likewise.
551 (resolve_operator): Add translation support for error messages.
552 (gfc_resolve_expr): Use msgid convention. Reorganise error messages
554 (resolve_symbol): Add translation support for error messages.
555 * symbol.c (gfc_add_procedure): Remove use of gfc_article function.
556 * trans-const.c (gfc_build_string_const): Use msgid convention.
558 2005-09-16 Paul Brook <paul@codesourcery.com>
561 * dependency.c (transform_sections): Divide by correct value.
564 2005-09-14 Paul Thomas <pault@gcc.gnu.org>
566 PR fortran/21875 Internal Unit Array I/O, NIST
567 * fortran/trans-io.c (gfc_build_io_library_fndecls): Add field for
568 array descriptor to IOPARM structure.
569 * fortran/trans-io.c (set_internal_unit): New function to generate code
570 to store the character (array) and the character length for an internal
572 * fortran/trans-io (build_dt): Use the new function set_internal_unit.
574 2005-09-14 Paul Thomas <pault@gcc.gnu.org>
577 * trans-array.c (gfc_trans_dummy_array_bias): correct the typo
578 which uses dim[i].upper for lbound, rather than dim[i].lower.
580 2005-09-13 Erik Edelmann <erik.edelmann@iki.fi>
583 * trans-expr.c (gfc_trans_arrayfunc_assign): Check value
584 of attr.elemental for specific function instead of generic name.
586 2005-09-13 Richard Sandiford <richard@codesourcery.com>
589 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Move initialization
590 of argse. Remove now-redundant want_pointer assignment.
591 * trans-array.c (gfc_conv_expr_descriptor): When not assigning to
592 a pointer, keep the original bounds of a full array reference.
594 2005-09-13 Richard Sandiford <richard@codesourcery.com>
597 * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift)
598 (gfc_resolve_pack, gfc_resolve_reshape, gfc_resolve_spread)
599 (gfc_resolve_transpose, gfc_resolve_unpack): Add "_char" to the name
600 for character-based operations.
601 (gfc_resolve_pack): Remove ATTRIBUTE_UNUSED from array argument.
602 (gfc_resolve_unpack): Copy the whole typespec from the vector.
603 * trans-array.c (gfc_conv_expr_descriptor): In the EXPR_FUNCTION
604 case, get the string length from the scalarization state.
606 2005-09-14 Francois-Xavier Coudert <coudert@clipper.ens.fr>
608 * Make-lang.in: Change targets prefixes from f95 to fortran.
609 * config-lang.in: Change language name to "fortran".
610 * lang.opt: Change language name to "fortran".
611 * options.c: Change CL_F95 to CL_Fortran.
613 2005-09-09 Thomas Koenig <Thomas.Koenig@online.de>
615 gfortran.texi: Document IOSTAT= specifier.
617 2005-09-09 Thomas Koenig <Thomas.Koenig@online.de>
619 * gfortran.h: Add iomsg to gfc_open, gfc_close, gfc_filepos,
620 gfc_inquire and gfc_dt.
621 * dump-parse-tree.c (gfc_show_code_node): Add iomsg
622 for open, close, file positioning, inquire and namelist.
623 * io.c (io_tag): Add tag_iomsg.
624 (resolve_tag): Add standards warning for iomsg.
625 (match_open_element): Add iomsg.
626 (gfc_free_open): Add iomsg.
627 (gfc_resolve_open): Add iomsg.
628 (gfc_free_close): Add iomsg.
629 (match_close_element): Add iomsg.
630 (gfc_resolve_close): Add iomsg.
631 (gfc_free_filepos): Add iomsg.
632 (match_file_element): Add iomsg.
633 (gfc_resolve_filepos): Add iostat and iomsg.
634 (match-dt_element): Add iomsg.
635 (gfc_free_dt): Add iomsg.
636 (gfc_resolve_dt): Add iomsg.
637 (gfc_free_inquire): Add iomsg.
638 (match_inquire_element): Add iomsg.
639 (gfc_resolve_inquire): Add iomsg.
640 * trans_io.c: Add ioparm_iomsg and ioparm_iomsg_len.
641 (gfc_build_io_library_fndecls): Add iomsg as last field.
642 (gfc_trans_open): Add iomsg.
643 (gfc_trans_close): Add iomsg.
644 (build_fileos): Call set_string for iomsg.
645 (gfc_trans_inquire): Add iomsg.
646 (build_dt): Add iomsg.
648 2005-09-09 Richard Sandiford <richard@codesourcery.com>
650 * match.h (gfc_match_equiv_variable): Declare.
652 2005-09-09 Richard Sandiford <richard@codesourcery.com>
655 * Makefile.in (fortran/trans-expr.o): Depend on dependency.h.
656 * dependency.h (gfc_ref_needs_temporary_p): Declare.
657 * dependency.c (gfc_ref_needs_temporary_p): New function.
658 (gfc_check_fncall_dependency): Use it instead of inlined check.
659 By so doing, take advantage of the fact that character substrings
660 within an array reference also need a temporary.
661 * trans.h (GFC_SS_VECTOR): Adjust comment.
662 * trans-array.c (gfc_free_ss): Remove GFC_SS_VECTOR case.
663 (gfc_set_vector_loop_bounds): New function.
664 (gfc_add_loop_ss_code): Call it after evaluating the subscripts of
665 a GFC_SS_SECTION. Deal with the GFC_SS_VECTOR case by evaluating
666 the vector expression and caching its descriptor for use within
668 (gfc_conv_array_index_ref, gfc_conv_vector_array_index): Delete.
669 (gfc_conv_array_index_offset): Handle scalar, vector and range
670 dimensions as separate cases of a switch statement. In the vector
671 case, use the loop variable to calculate a vector index and use the
672 referenced element as the dimension's index. Perform bounds checking
674 (gfc_conv_section_upper_bound): Return null for vector indexes.
675 (gfc_conv_section_startstride): Give vector indexes a start value
676 of 0 and a stride of 1.
677 (gfc_conv_ss_startstride): Adjust for new GFC_SS_VECTOR representation.
678 (gfc_conv_expr_descriptor): Expand comments. Generalize the
679 handling of the !want_pointer && !direct_byref case. Use
680 gfc_ref_needs_temporary_p to decide whether the variable case
682 (gfc_walk_variable_expr): Handle DIMEN_VECTOR by creating a
684 * trans-expr.c: Include dependency.h.
685 (gfc_trans_arrayfunc_assign): Fail if the target needs a temporary.
687 2005-09-09 Richard Sandiford <richard@codesourcery.com>
690 * trans.h (gfc_interface_sym_mapping, gfc_interface_mapping): Moved
692 (gfc_init_interface_mapping, gfc_free_interface_mapping)
693 (gfc_add_interface_mapping, gfc_finish_interface_mapping)
694 (gfc_apply_interface_mapping): Declare.
695 * trans-array.h (gfc_set_loop_bounds_from_array_spec): Declare.
696 (gfc_trans_allocate_temp_array): Add pre and post block arguments.
697 * trans-array.c (gfc_set_loop_bounds_from_array_spec): New function.
698 (gfc_trans_allocate_array_storage): Replace loop argument with
699 separate pre and post blocks.
700 (gfc_trans_allocate_temp_array): Add pre and post block arguments.
701 Update call to gfc_trans_allocate_array_storage.
702 (gfc_trans_array_constructor, gfc_conv_loop_setup): Adjust for new
703 interface to gfc_trans_allocate_temp_array.
704 * trans-expr.c (gfc_interface_sym_mapping, gfc_interface_mapping):
706 (gfc_init_interface_mapping, gfc_free_interface_mapping)
707 (gfc_add_interface_mapping, gfc_finish_interface_mapping)
708 (gfc_apply_interface_mapping): Make extern.
709 (gfc_conv_function_call): Build an interface mapping for array
710 return values too. Call gfc_set_loop_bounds_from_array_spec.
711 Adjust call to gfc_trans_allocate_temp_array so that code is
712 added to SE rather than LOOP.
714 2005-09-09 Richard Sandiford <richard@codesourcery.com>
717 * trans.h (gfor_fndecl_internal_realloc): Declare.
718 (gfor_fndecl_internal_realloc64): Declare.
719 * trans-decl.c (gfor_fndecl_internal_realloc): New variable.
720 (gfor_fndecl_internal_realloc64): New variable.
721 (gfc_build_builtin_function_decls): Initialize them.
722 * trans-array.h (gfc_trans_allocate_temp_array): Add a fourth argument.
723 * trans-array.c (gfc_trans_allocate_array_storage): Add an argument
724 to say whether the array can grow later. Don't allocate the array
725 on the stack if so. Don't call malloc for zero-sized arrays.
726 (gfc_trans_allocate_temp_array): Add a similar argument here.
727 Pass it along to gfc_trans_allocate_array_storage.
728 (gfc_get_iteration_count, gfc_grow_array): New functions.
729 (gfc_iterator_has_dynamic_bounds): New function.
730 (gfc_get_array_constructor_element_size): New function.
731 (gfc_get_array_constructor_size): New function.
732 (gfc_trans_array_ctor_element): Replace pointer argument with
734 (gfc_trans_array_constructor_subarray): Likewise. Take an extra
735 argument to say whether the variable-sized part of the constructor
736 must be allocated using realloc. Grow the array when this
738 (gfc_trans_array_constructor_value): Likewise.
739 (gfc_get_array_cons_size): Delete.
740 (gfc_trans_array_constructor): If the loop bound has not been set,
741 split the allocation into a static part and a dynamic part. Set
742 loop->to to the bounds for static part before allocating the
743 temporary. Adjust call to gfc_trans_array_constructor_value.
744 (gfc_conv_loop_setup): Allow any constructor to determine the
745 loop bounds. Check whether the constructor has a dynamic size
746 and prefer to use something else if so. Expect the loop bound
747 to be set later. Adjust call to gfc_trans_allocate_temp_array.
748 * trans-expr.c (gfc_conv_function_call): Adjust another call here.
750 2005-09-09 Paul Thomas <pault@gcc.gnu.org>
753 * module.c (find_use_name_n): Based on original
754 find_use_name. Either counts number of use names for a
755 given real name or returns use name n.
756 (find_use_name, number_use_names): Interfaces to the
757 function find_use_name_n.
758 (read_module): Add the logic and calls to these functions,
759 so that mutiple reuses of the same real name are loaded.
761 2005-09-09 Paul Thomas <pault@gcc.gnu.org>
768 * gfortran.h: Move definition of BLANK_COMMON_NAME from trans-
769 common.c so that it is accessible to module.c. Add common_head
770 field to gfc_symbol structure. Add field for the equivalence
771 name AND new attr field, in_equivalence.
772 * match.c (gfc_match_common, gfc_match_equivalence): In loops
773 that flag common block equivalences, emit an error if the
774 common blocks are different, using sym->common_head as the
775 common block identifier. Ensure that symbols that are equivalence
776 associated with a common block are marked as being in_common.
777 * module.c (write_blank_common): New.
778 (write_common): Use unmangled common block name.
779 (load_equiv): New function ported from g95.
780 (read_module): Call load_equiv.
781 (write_equiv): New function ported from g95. Correct
782 string referencing for gfc functions. Give module
783 equivalences a unique name.
784 (write_module): Call write_equiv and write_blank_common.
785 * primary.c (match_variable) Old gfc_match_variable, made
786 static and third argument provided to indicate if parent
787 namespace to be visited or not.
788 (gfc_match_variable) New. Interface to match_variable.
789 (gfc_match_equiv_variable) New. Interface to match_variable.
790 * trans-common.c (finish_equivalences): Provide the call
791 to create_common with a gfc_common_header so that
792 module equivalences are made external, rather than local.
793 (find_equivalences): Ensure that all members in common block
794 equivalences are marked as used. This prevents the subsequent
795 call to this function from making local unions.
796 * trans-decl.c (gfc_generate_function_code): Move the call to
797 gfc_generate_contained_functions to after the call to
798 gfc_trans_common so the use-associated, contained common
799 blocks produce the correct references.
800 (gfc_create_module_variable): Return for equivalenced symbols
801 with existing backend declaration.
803 2005-09-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
806 * match.c (gfc_match_common): Remove unnecessary / wrong special
807 cases for end-of-statement.
809 2005-09-08 Janne Blomqvist <jblomqvi@cc.hut.fi>
811 * gfortran.texi: Add section about implemented F2003 features.
813 2005-09-08 Richard Sandiford <richard@codesourcery.com>
816 * trans-array.c (gfc_add_loop_ss_code): Set ss->string_length in
817 the GFC_SS_FUNCTION case too.
818 * trans-expr.c (gfc_conv_function_val): Allow symbols to be bound
819 to function pointers as well as function decls.
820 (gfc_interface_sym_mapping, gfc_interface_mapping): New structures.
821 (gfc_init_interface_mapping, gfc_free_interface_mapping)
822 (gfc_get_interface_mapping_charlen, gfc_get_interface_mapping_array)
823 (gfc_set_interface_mapping_bounds, gfc_add_interface_mapping)
824 (gfc_finish_interface_mapping, gfc_apply_interface_mapping_to_cons)
825 (gfc_apply_interface_mapping_to_ref)
826 (gfc_apply_interface_mapping_to_expr)
827 (gfc_apply_interface_mapping): New functions.
828 (gfc_conv_function_call): Evaluate the arguments before working
829 out where the result should go. Make the null pointer case provide
830 the string length in parmse.string_length. Cope with non-constant
831 string lengths, using the above functions to evaluate such lengths.
832 Use a temporary typespec; don't assign to sym->cl->backend_decl.
833 Don't assign to se->string_length when returning a cached array
836 2005-09-08 Richard Sandiford <richard@codesourcery.com>
839 * trans-array.c (gfc_conv_array_ref): Call gfc_advance_se_ss_chain
840 after handling scalarized references. Make "indexse" inherit from
841 "se" when handling AR_ELEMENTs.
842 (gfc_walk_variable_expr): Add GFC_SS_SCALAR entries for each
843 substring or scalar reference that follows an array section.
844 * trans-expr.c (gfc_conv_variable): When called from within a
845 scalarization loop, start out with "ref" pointing to the scalarized
846 part of the reference. Don't call gfc_advance_se_ss_chain here.
848 2005-09-07 Richard Sandiford <richard@codesourcery.com>
851 * trans-expr.c (gfc_trans_pointer_assignment): Assign to a temporary
852 descriptor if the rhs is not a null pointer or variable.
854 2005-09-07 Thomas Koenig <Thomas.Koenig@online.de>
857 * symbol.c(check_conflict): Add conflict for parameter/save,
859 2005-09-06 Richard Sandiford <richard@codesourcery.com>
862 * simplify.c (gfc_simplify_transpose): Set the result's typespec from
863 the source, not the first element of the return value.
865 2005-09-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
868 * io.c (match_io): Correctly backup if PRINT followed by
869 symbol which is not a namelist. Force blank between PRINT
870 and namelist in free form.
872 2005-08-31 Francois-Xavier Coudert <coudert@clipper.ens.fr>
875 * gfortran.h (gfc_option_t): Add flag_automatic.
876 * invoke.texi: Document the -fno-automatic option.
877 * lang.opt: Add a -fautomatic option.
878 * options.c (gfc_init_options): Default for -fautomatic is on.
879 (gfc_handle_option): Add handling of -fautomatic option.
880 * resolve.c (gfc_resolve): When -fno-automatic is used, mark
881 needed variables as SAVE.
883 2005-08-27 Erik Edelmann <erik.edelmann@iki.fi>
885 * trans-array.c (gfc_trans_deferred_array): Fix comments.
887 2005-08-27 Erik Schnetter <schnetter@aei.mpg.de>
889 * primary.c (match_charkind_name): Fix typo in comment leading to
892 2005-08-25 Erik Edelmann <eedelman@acclab.helsinki.fi>
895 * symbol.c (find_special): Remove.
896 (build_sym, add_init_expr, attr_decl1): Remove calls to
897 find_special in favor of calls to gfc_get_symbol.
899 2005-08-24 Thomas Koenig <Thomas.Koenig@online.de>
902 * gfortran.h (symbol_attribute): Add noreturn to the structure.
903 (gfc_intrinsic_sym): Add noreturn to the structure.
904 * intrinsic.c (make_noreturn): New function.
905 (add_subroutines): Mark subroutines abort and exit as noreturn.
906 (gfc_intrinsic_sub_interface): Copy noreturn attribute from
907 isym to the resolved symbol.
908 * trans-decl.c (gfc_get_extern_function_decl): Set function
909 as VOLATILE (== noreturn) if the noreturn attribute is set.
911 2005-08-21 Steven G. Kargl <kargls@comcast.net>
913 * decl.c: Typo in comment.
915 2005-08-21 Steven G. Kargl <kargls@comcast.net>
917 * array.c: Bump GFC_MAX_AC_EXPAND from 100 to 65535.
919 2005-08-21 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
921 * gfortran.h (gfc_option_t): Remove source field. Add
923 (gfc_new_file): Remove arguments in prototype.
924 (gfc_source_file): Make 'const char *'.
925 * f95-lang.c (gfc_init): Use gfc_source_file instead of
926 gfc_option.source. Call gfc_new_file without arguments.
927 * invoke.texi: Document new options '-fd-lines-as-code' and
928 '-fd-lines-as-comment'.
929 * lang.opt: Add new options. Alphabetize.
930 * options.c (gfc_init_options): Initialize gfc_source_file instead
931 of gfc_option.source. Initialize gfc_option.flag_d_lines.
932 (form_from_filename): Move here from scanner.c. Make
933 'filename' argument 'const'.
934 (gfc_post_options): Set gfc_source_file. Determine source form.
935 Warn if 'd-lines*' are used in free form.
936 * scanner.c (gfc_source_file): Constify.
937 (skip_fixed_comments): Deal with d-lines.
938 (get_file): Constify argument 'name'.
939 (load_file): Constify argument 'filename'.
940 (form_from_filename): Moved to options.c.
941 (gfc_new_file): Remove arguments. Don't initialize
942 gfc_source_file, don't determine source form.
943 * trans-const.c (gfc_init_constants): Use gfc_source_file instead
944 of gfc_option.source.
946 2005-08-19 Steven G. Kargl <kargls@comcast.net>
949 * gfortran.h: Remove PATH_MAX definition.
950 * module.c (write_module, gfc_dump_module): Use alloca to allocate
952 * scanner.c (gfc_release_include_path, form_from_filename): Ditto.
954 2004-08-16 Huang Chun <chunhuang73@hotmail.com>
956 * trans-expr.c (gfc_conv_power_op): Evaluate the expression before
959 2005-08-14 Asher Langton <langton2@llnl.gov>
961 * parse.c (match): Enclose macro in do...while(0) and braces.
963 2005-08-14 Paul Thomas <pault@gcc.gnu.org>
966 * gfortran.texi: Document PRINT namelist.
968 2005-08-14 Paul Thomas <pault@gcc.gnu.org>
971 * io.c (match_io): Add code to implement PRINT namelist.
973 2005-08-14 Canqun Yang <canqun@nudt.edu.cn>
975 * trans-stmt.c (gfc_trans_arithmetic_if): Optimized in case of equal
978 2005-08-11 Francois-Xavier Coudert <coudert@clipper.ens.fr>
979 Steven Bosscher <stevenb@suse.de>
982 * gfortran.h: Add is_main_program member to symbol_attribute.
983 * trans-decl: Add a gfor_fndecl_set_std tree.
984 (gfc_build_builtin_function_decls): Create it.
985 (gfc_generate_function_code): Add this call at the beginning of
987 * trans.c (gfc_generate_code): Move main_program and attr.
988 * trans.h: Add declaration for gfor_fndecl_set_std.
990 2005-08-10 Thomas Koenig <Thomas.Koenig@online.de>
993 gfortran.h: Declare new function gfc_resolve_dim_arg.
994 resolve.c: New function gfc_resolve_dim_arg.
995 iresolve.c (gfc_resolve_all): Use gfc_resolve_dim_arg.
996 (gfc_resolve_any): Likewise.
997 (gfc_resolve_count): Likewise.
998 (gfc_resolve_cshift): Likewise. If the kind of shift is less
999 gfc_default_integer_kind, convert it to default integer type.
1000 (gfc_resolve_eoshift): Likewise.
1001 (gfc_resolve_maxloc): Use gfc_resolve_dim_arg.
1002 (gfc_resolve_maxval): Likewise.
1003 (gfc_resolve_minloc): Likewise.
1004 (gfc_resolve_minval): Likewise.
1005 (gfc_resolve_product): Likewise.
1006 (gfc_resolve_spread): Likewise.
1007 (gfc_resolve_sum): Likewise.
1009 2005-08-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1011 * check.c (gfc_check_ttynam_sub, gfc_check_isatty): Add check
1012 functions for new intrinsics TTYNAM and ISATTY.
1013 * intrinsic.c (add_functions, add_subroutines): Add new
1015 * intrinsic.h: Add prototypes for new check and resolve
1017 * iresolve.c (gfc_resolve_isatty, gfc_resolve_ttynam_sub): New
1018 resolve functions for intrinsics TTYNAM and ISATTY.
1019 * gfortran.h (gfc_generic_isym_id): Add symbol for ISATTY.
1020 * trans-intrinsic.c: Add case for GFC_ISYM_ISATTY.
1022 2005-08-09 Jakub Jelinek <jakub@redhat.com>
1024 * scanner.c (preprocessor_line): Don't write beyond the end of flag
1027 2005-08-07 Janne Blomqvist <jblomqvi@cc.hut.fi>
1030 * dump-parse-tree.c (gfc_show_code_node): Add case for FLUSH.
1031 * gfortran.h: Add enums for FLUSH.
1032 * io.c (gfc_free_filepos,match_file_element,match_filepos): Modify
1033 comment appropriately. (gfc_match_flush): New function.
1034 * match.c (gfc_match_if): Add match for flush.
1035 * match.h: Add prototype.
1036 * parse.c (decode_statement): Add flush to 'f' case.
1037 (next_statement): Add case for flush. (gfc_ascii_statement): Likewise.
1038 * resolve.c (resolve_code): Add flush case.
1039 * st.c (gfc_free_statement): Add flush case.
1040 * trans-io.c: Add prototype for flush.
1041 (gfc_build_io_library_fndecls): Build fndecl for flush.
1042 (gfc_trans_flush): New function.
1043 * trans-stmt.h: Add prototype.
1044 * trans.c (gfc_trans_code): Add case for flush.
1046 2005-08-06 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1048 * primary.c (match_hollerith_constant): Fix typo.
1050 2005-08-06 Kazu Hirata <kazu@codesourcery.com>
1052 * decl.c, dump-parse-tree.c, gfortran.texi, intrinsic.texi,
1053 invoke.texi, resolve.c, trans-array.c, trans-array.h,
1054 trans-common.c, trans-expr.c, trans-io.c, trans.h: Fix
1055 comment/doc typos. Follow spelling conventions.
1057 2005-08-06 Jakub Jelinek <jakub@redhat.com>
1061 * primary.c (match_varspec): If equiv_flag, don't look at sym's
1062 attributes, call gfc_match_array_ref up to twice and don't do any
1063 substring or component processing.
1064 * resolve.c (resolve_equivalence): Transform REF_ARRAY into
1065 REF_SUBSTRING or nothing if needed. Check that substrings
1066 don't have zero length.
1068 2005-08-05 Thomas Koenig <Thomas.Koenig@online.de>
1070 * trans-expr.c (gfc_build_builtin_function_decls): Mark
1071 stop_numeric and stop_string as non-returning.
1073 2005-08-04 Paul Brook <paul@codesourcery.com>
1075 * trans-expr.c (gfc_conv_expr, gfc_conv_expr_type): Update comments.
1076 (gfc_conv_expr_lhs): Fix assertion.
1077 (gfc_conv_expr_val): Merge post block. Set se.expr to new value.
1079 2005-08-02 David Edelsohn <edelsohn@gnu.org>
1082 * expr.c (simplify_parameter_variable): Do not copy the subobject
1083 references if the expression value is a constant.
1085 * expr.c (gfc_simplify_expr): Evaluate constant substrings.
1087 2005-07-31 Jerry DeLisle <jvdelisle@verizon.net>
1089 * intrinsic.texi: Add documentation for exponent, floor, and fnum and
1090 fix description of ceiling in index.
1092 2005-07-31 Steven Bosscher <stevenb@suse.de>
1094 * trans-decl.c (gfc_build_builtin_function_decls): Give the internal
1095 malloc functions the 'malloc' attribute. Give runtime_error the
1096 'noreturn' attribute.
1098 2005-07-31 Steven Bosscher <stevenb@suse.de>
1100 * trans-stmt.c (gfc_trans_goto): Jump to the known label instead
1101 of the assigned goto variable.
1103 2005-07-29 Steven Bosscher <stevenb@suse.de>
1105 * trans-types.h (gfc_array_range_type): Add missing GTY decl for this.
1107 2005-07-28 Andrew Pinski <pinskia@physics.uc.edu>
1109 * fortran/f95-lang.c (language_function): Remove
1110 named_labels, shadowed_labels, returns_value, returns_abnormally,
1111 warn_about_return_type, and extern_inline fields.
1112 (named_labels): Remove variable.
1113 (gfc_init_decl_processing): Remove setting of named_labels.
1115 2005-07-27 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1118 * resolve.c (resolve_operator): Improve diagnostic for comparison
1119 of logicals with invalid operator.
1121 2005-07-25 Jakub Jelinek <jakub@redhat.com>
1124 * data.c (gfc_assign_data_value_range): Call
1125 create_character_initializer if last_ts is a character type.
1127 2005-07-22 Manfred Hollstein <mh@suse.com>
1129 * match.c (gfc_match_symbol): Fix uninitialised warnings.
1130 * matchexp.c (gfc_match_expr): Likewise.
1132 2005-07-20 Giovanni Bajo <giovannibajo@libero.it>
1134 Make CONSTRUCTOR use VEC to store initializers.
1135 * trans-array.c (gfc_build_null_descriptor,
1136 gfc_trans_array_constructor_value, gfc_conv_array_initializer):
1137 Update to cope with VEC in CONSTRUCTOR_ELTS.
1138 * trans-common.c (create_common): Likewise.
1139 * trans-expr.c (gfc_conv_structure): Likewise.
1140 * trans-stmt.c (gfc_trans_character_select): Use
1141 build_constructor_from_list instead of build_constructor.
1143 2005-07-19 Paul Thomas <pault@gcc.gnu.org>
1146 * resolve.c (resolve_symbol): A symbol with FL_UNKNOWN
1147 is matched against interfaces in parent namespaces. If there
1148 the symtree is set to point to the interface.
1150 2005-07-16 David Edelsohn <edelsohn@gnu.org>
1153 * decl.c (do_parm): Adjust character initializer to character length
1154 of symbol before assigning.
1156 2005-07-14 Steve Ellcey <sje@cup.hp.com>
1158 * trans-types.c (MAX_REAL_KINDS): Increase from 4 to 5.
1160 2005-07-14 Jakub Jelinek <jakub@redhat.com>
1162 * gfortran.h (MAX_ERROR_MESSAGE): Remove.
1163 (gfc_error_buf): Add allocated and index fields. Change message
1164 field from array to a pointer.
1165 * error.c (use_warning_buffer, error_ptr, warning_ptr): Remove.
1166 (cur_error_buffer): New variable.
1167 (error_char): Use cur_error_buffer->{message,index} instead of
1168 {warning,error}_{buffer.message,ptr}. Reallocate message buffer
1170 (gfc_warning, gfc_notify_std, gfc_error, gfc_error_now): Setup
1171 cur_error_buffer and its index rather than {warning,error}_ptr
1172 and use_warning_buffer.
1173 (gfc_warning_check, gfc_error_check): Don't print anything if
1175 (gfc_push_error): Allocate saved message with xstrdup.
1176 (gfc_pop_error): Free saved message with gfc_free.
1177 (gfc_free_error): New function.
1178 * primary.c (match_complex_constant): Call gfc_free_error if
1179 gfc_pop_error will not be called.
1180 * match.c (gfc_match_st_function): Likewise.
1183 * scanner.c (preprocessor_line): Don't treat flag 3 as the start of a new
1184 file. Fix file left but not entered warning.
1186 2005-07-14 Feng Wang <fengwang@nudt.edu.cn>
1187 Steven G. Kargl <kargls@comcast.net>
1189 * array.c (resolve_character_array_constructor): Allocate gfc_charlen
1190 for the array and attach to namespace list for automatic deallocation.
1192 2005-07-13 Andreas Schwab <schwab@suse.de>
1194 * Make-lang.in (fortran/dependency.o): Depend on
1195 $(GFORTRAN_TRANS_DEPS).
1197 2005-07-11 Jakub Jelinek <jakub@redhat.com>
1199 * trans-stmt.c (gfc_trans_forall_loop): Clear maskindex before
1201 (gfc_trans_assign_need_temp, gfc_trans_pointer_assign_need_temp,
1202 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_2):
1203 Don't clear maskindexes here.
1205 2005-07-08 Daniel Berlin <dberlin@dberlin.org>
1207 * trans-decl.c (create_function_arglist): DECL_ARG_TYPE_AS_WRITTEN
1210 2005-07-08 Jakub Jelinek <jakub@redhat.com>
1212 * primary.c (gfc_match_rvalue): Handle ENTRY the same way
1215 2005-07-07 Jakub Jelinek <jakub@redhat.com>
1217 * scanner.c (load_line): Add pbuflen argument, don't make
1218 buflen static. If maxlen == 0 or preprocessor_flag,
1219 don't truncate at buflen, but at maxlen. In xrealloc add
1220 1 byte at the end for the terminating '\0'. Don't fill
1221 with spaces up to buflen, but gfc_option.fixed_line_length.
1222 (load_file): Adjust load_line caller. Add line_len variable.
1224 * scanner.c (preprocessor_line): Only set current_file->line when errors
1225 have not been encountered. Warn and don't crash if a file leave
1226 preprocessor line has no corresponding entering line. Formatting.
1228 2005-07-07 Steven Bosscher <stevenb@suse.de>
1230 * primary.c (match_hollerith_constant): Use int, not unsigned int,
1231 for the hollerith length. Fix indentation.
1233 2005-07-07 Feng Wang <fengwang@nudt.edu.cn>
1238 * arith.c (gfc_hollerith2int, gfc_hollerith2real,
1239 gfc_hollerith2complex, gfc_hollerith2character, gfc_hollerith2logical):
1241 (eval_intrinsic): Don't evaluate if Hollerith constant arguments exist.
1242 * arith.h (gfc_hollerith2int, gfc_hollerith2real,
1243 gfc_hollerith2complex, gfc_hollerith2character, gfc_hollerith2logical):
1245 * expr.c (free_expr0): Free memery allocated for Hollerith constant.
1246 (gfc_copy_expr): Allocate and copy string if Expr is from Hollerith.
1247 (gfc_check_assign): Enable conversion from Hollerith to other.
1248 * gfortran.h (bt): Add BT_HOLLERITH.
1249 (gfc_expr): Add from_H flag.
1250 * intrinsic.c (gfc_type_letter): Return 'h' for BT_HOLLERITH.
1251 (add_conversions): Add conversions from Hollerith constant to other.
1252 (do_simplify): Don't simplify if Hollerith constant arguments exist.
1253 * io.c (resolve_tag): Enable array in FORMAT tag under GFC_STD_GNU.
1254 * misc.c (gfc_basetype_name): Return "HOLLERITH" for BT_HOLLERITH.
1255 (gfc_type_name): Print "HOLLERITH" for BT_HOLLERITH.
1256 * primary.c (match_hollerith_constant): New function.
1257 (gfc_match_literal_constant): Add match Hollerith before Integer.
1258 * simplify.c (gfc_convert_constant): Add conversion from Hollerith
1260 * trans-const.c (gfc_conv_constant_to_tree): Use VIEW_CONVERT_EXPR to
1261 convert Hollerith constant to tree.
1262 * trans-io.c (gfc_convert_array_to_string): Get array's address and
1263 length to set string expr.
1264 (set_string): Deal with array assigned Hollerith constant and character
1266 * gfortran.texi: Document Hollerith constants as extention support.
1268 2005-07-07 Feng Wang <fengwang@nudt.edu.cn>
1271 * trans-array.c (gfc_trans_array_constructor_value): Fix index of data.
1273 2005-07-07 Jakub Jelinek <jakub@redhat.com>
1275 * decl.c (gfc_match_entry): Allow ENTRY without parentheses
1278 2005-07-03 Kazu Hirata <kazu@codesourcery.com>
1280 * gfortran.texi, intrinsic.texi: Fix typos.
1281 * symbol.c: Fix a comment typo.
1283 2005-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1285 * error.c (error_printf, error_print): Use ATTRIBUTE_GCC_GFC.
1286 * gfortran.h (ATTRIBUTE_GCC_GFC): New.
1287 (gfc_warning, gfc_warning_now, gfc_error, gfc_error_now,
1288 gfc_fatal_error, gfc_internal_error, gfc_notify_std): Use
1291 2005-07-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1294 * io.c (match_dt_element): Do not allow END tag in PRINT or
1297 2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
1299 * lang.opt: Remove "." from end of help texts.
1301 2005-07-01 Jerry DeLisle <jvdelisle@verizon.net>
1303 * gfortran.texi: Fix typos and grammar.
1304 * invoke.texi: Fix typos and grammar.
1305 * intrinsic.texi: Add documentaion for eoshift, epsilon, etime, and
1306 exit. Fixed alignment of text for dtime syntax. Fixed a few line
1309 2005-06-25 Jakub Jelinek <jakub@redhat.com>
1311 * trans-stmt.c (gfc_trans_forall_1): Prefer to use smaller logical
1312 type than boolean_type_node.
1314 2005-06-25 Kelley Cook <kcook@gcc.gnu.org>
1316 * all files: Update FSF address in copyright headers.
1318 2005-06-24 Jerry DeLisle <jvdelisle@verizon.net>
1321 * gfortran.h: Add symbols for new intrinsic functions.
1322 * intrinsic.c: Add new functions acosh, asinh, and atanh.
1323 * intrinsic.h: Add prototypes for the new functions.
1324 * iresolve.c (gfc_resolve_acosh): New function.
1325 (gfc_resolve_asinh): New function.
1326 (gfc_resolve_atanh): New function.
1327 * mathbuiltins.def: Add defines.
1328 * simplify.c (gfc_simplify_acosh): New function.
1329 (gfc_simplify_asinh): New function.
1330 (gfc_simplify_atanh): New function.
1332 2005-06-24 Feng Wang <fengwang@nudt.edu.cn>
1334 * simplify.c (gfc_simplify_modulo): Don't clear before get result.
1336 2005-06-22 Paul Brook <paul@codesourcery.com>
1339 * symbol.c (gfc_is_var_automatic): New function.
1340 (save_symbol): Use it.
1342 2005-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1343 Paul Thomas <pault@gcc.gnu.org>
1347 * module.c (mio_namelist): New function. Correct to set
1348 namelist_tail and to give error on renaming namelist by use
1350 (mio_symbol): Call mio_namelist.
1352 2005-06-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1354 * gfortran.h: Add flag_backslash compile-time option.
1355 * lang.opt: Add support for -fbackslash option.
1356 * options.c: Likewise.
1357 * primary.c: Implement behavior for -fno-backslash.
1358 * invoke.texi: Add doc for -fbackslash option.
1359 * gfortran.texi: Remove mention of -fno-backslash as a
1362 2005-06-20 Steven G. Kargl <kargls@comcast.net>
1366 * match.c (gfc_match_label): Detect duplicate labels.
1369 2005-06-20 Erik Edelmann <erik.edelmann@iki.fi>
1371 * intrinsic.c (check_intrinsic_standard): Fix spelling error
1372 in a warning message.
1374 2005-06-18 Erik Edelman <eedelman@acclab.helsinki.fi>
1375 Steven G. Kargl <kargls@comast.net>
1378 * primary.c (gfc_match_rvalue): expr_type can be EXPR_CONSTANT
1379 for an array; check that sym->as is NULL.
1382 2005-06-18 Steven G. Kargl <kargls@comcast.net>
1384 * intrinsic.c (gfc_intrinsic_func_interface): Enable errors for generic
1385 functions whose simplification routine return FAILURE.
1387 2005-06-13 Geoffrey Keating <geoffk@apple.com>
1389 * Make-lang.in (fortran.install-man): Doesn't depend on installdirs.
1390 (rule for installing f95.1 manpage): Does depend on installdirs.
1392 2005-06-13 Jakub Jelinek <jakub@redhat.com>
1395 * trans-stmt.c (gfc_trans_forall_loop): Only increment maskindex
1396 in the innermost loop.
1398 * trans-expr.c (gfc_conv_function_call): Return int instead of
1399 void. Use a local variable for has_alternate_specifier and
1400 return it. Avoid modification of function type's return value
1401 in place, since it may be shared.
1402 * trans.h (has_alternate_specifier): Remove.
1403 (gfc_conv_function_call): Change return type.
1404 * trans-stmt.c (has_alternate_specifier): Remove.
1405 (gfc_trans_call): Add a local has_alternate_specifier variable,
1406 set it from gfc_conv_function_call return value.
1408 2005-06-12 Richard Henderson <rth@redhat.com>
1410 * trans-array.c (gfc_conv_descriptor_data_get): Rename from
1411 gfc_conv_descriptor_data. Cast the result to the DATAPTR type.
1412 (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): New.
1413 (gfc_trans_allocate_array_storage): Use them.
1414 (gfc_array_allocate, gfc_array_deallocate): Likewise.
1415 (gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor): Likewise.
1416 (gfc_trans_deferred_array): Likewise.
1417 * trans-expr.c (gfc_conv_function_call): Likewise.
1418 (gfc_trans_subcomponent_assign): Likewise.
1419 (gfc_trans_pointer_assignment): Likewise.
1420 * trans-intrinsic.c (gfc_conv_allocated): Likewise.
1421 * trans-types.c (gfc_array_descriptor_base): New.
1422 (gfc_get_element_type): Use GFC_TYPE_ARRAY_DATAPTR_TYPE.
1423 (gfc_get_array_descriptor_base): Break out from ...
1424 (gfc_get_array_type_bounds): ... here. Create type variants.
1425 * trans-array.h (gfc_conv_descriptor_data_get): Declare.
1426 (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): Declare.
1428 2005-06-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1430 * trans-expr.c (gfc_conv_variable): POINTER results don't need f2c
1431 calling conventions. Look at sym instead of sym->result.
1432 * trans-types.c (gfc_sym_type): Remove workaround for frontend bug.
1433 Remove condition which is always false with workaround removed.
1434 (gfc_return_by_reference): Always look at sym, never at sym->result.
1436 2005-06-11 Steven G. Kargl <kargls@comcast.net>
1440 * trans-array.c (gfc_array_deallocate): pstat is new argument
1441 (gfc_array_allocate): update gfc_array_deallocate() call.
1442 (gfc_trans_deferred_array): ditto.
1443 * trans-array.h: update gfc_array_deallocate() prototype.
1444 * trans-decl.c (gfc_build_builtin_function_decls): update declaration
1445 * trans-stmt.c (gfc_trans_deallocate): Implement STAT= feature.
1447 2005-06-07 Jerry DeLisle <jvdelisle@verizon.net>
1449 * intrinsic.texi: Add documentation for dcmplx, digits,
1450 dim, idim, ddim, dot_product, dprod, dreal, and dtime.
1452 2005-06-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1455 * trans-array.c (gfc_trans_array_constructor_value): Slightly reorder.
1456 Generate correct exit condition in case of negative steps in
1459 * invoke.texi: Fix description of flags required for compatibility
1462 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1463 Erik Schnetter <schnetter@aei.mpg.de>
1466 * trans.c (gfc_get_backend_locus): Remove unnecessary adjustment,
1467 remove FIXME comment.
1469 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1471 * match.c (match_forall_iterator): Don't immediately give error if '='
1472 is not followed by an expression.
1474 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1475 Erik Edelmann <erik.edelmann@iki.fi>
1477 * array.c (gfc_match_array_constructor): Disallow empty array
1480 2005-06-03 Jerry DeLisle <jvdelisle@verizon.net>
1482 * fortran/intrinsic.texi: Add documentation for
1483 command_argument_count, conjg, dconjg, count,
1484 cpu_time, cshift, date_and_time, dble, dfloat.
1486 2005-06-01 Roger Sayle <roger@eyesopen.com>
1488 * intrinsic.c (add_conv): No longer take a "simplify" argument as
1489 its always gfc_convert_constant, instead take a "standard" argument.
1490 (add_conversions): Change all existing calls of add_conv to pass
1491 GFC_STD_F77 as appropriate. Additionally, if we're allowing GNU
1492 extensions support integer-logical and logical-integer conversions.
1493 (gfc_convert_type_warn): Warn about use the use of these conversions
1494 as a extension when appropriate, i.e. with -pedantic.
1495 * simplify.c (gfc_convert_constant): Add support for integer to
1496 logical and logical to integer conversions, using gfc_int2log and
1498 * arith.c (gfc_log2int, gfc_int2log): New functions.
1499 * arith.h (gfc_log2int, gfc_int2log): Prototype here.
1500 * gfortran.texi: Document this new GNU extension.
1502 2005-06-01 Paul Thomas <pault@gcc.gnu.org>
1504 * fortran/trans-expr.c (gfc_conv_variable): Clean up bracketting.
1505 * fortran/trans-expr.c (gfc_conv_function_call): Insert spaces.
1506 Correct comments and replace convert of integer_one_node with
1509 2005-06-01 Jakub Jelinek <jakub@redhat.com>
1512 * resolve.c (resolve_contained_fntype): Use sym->attr.untyped
1513 to avoid giving error multiple times.
1514 (resolve_entries): Don't error about BT_UNKNOWN here.
1515 (resolve_unknown_f): Capitalize IMPLICIT for consistency.
1516 (resolve_fntype): New function.
1517 (gfc_resolve): Call resolve_fntype.
1519 2005-06-01 Feng Wang <fengwang@nudt.edu.cn>
1522 * fortran/io.c (resolve_tag): Fix error message.
1524 2005-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1526 * fortran/trans-decl.c: Don't include errors.h.
1527 * fortran/Make-lang.in: Updates dependencies.
1529 2005-05-31 Paul Thomas <pault@gcc.gnu.org>
1534 * fortran/trans-array.c (gfc_conv_expr_descriptor): Obtain the
1535 string length from the expression typespec character length value
1536 and set temp_ss->stringlength and backend_decl. Obtain the
1537 tree expression from gfc_conv_expr rather than gfc_conv_expr_val.
1538 Dereference the expression to obtain the character.
1539 * fortran/trans-expr.c (gfc_conv_component_ref): Remove the
1540 dereference of scalar character pointer structure components.
1541 * fortran/trans-expr.c (gfc_trans_subarray_assign): Obtain the
1542 string length for the structure component from the component
1545 2005-05-30 Roger Sayle <roger@eyesopen.com>
1547 * gfortran.h (GFC_STD_LEGACY): New "standard" macro. Reindent.
1548 * options.c (gfc_init_options): By default, allow legacy extensions
1549 but warn about them.
1550 (gfc_post_options): Make -pedantic warn about legacy extensions
1551 even with -std=legacy.
1552 (gfc_handle_option): Make -std=gnu follow the default behaviour
1553 of warning about legacy extensions, but allowing them. Make the
1554 new -std=legacy accept everything and warn about nothing.
1555 * lang.opt (std=legacy): New F95 command line option.
1556 * invoke.texi: Document both -std=f2003 and -std=legacy.
1557 * gfortran.texi: Explain the two types of extensions and document
1558 how they are affected by the various -std= command line options.
1560 2005-05-30 Kazu Hirata <kazu@cs.umass.edu>
1562 * trans-expr.c: Remove trailing ^M.
1564 * trans-expr.c: Fix comment typos.
1566 2005-05-29 Paul Thomas <pault@gcc.gnu.org>
1574 * fortran/trans-array.c (gfc_conv_resolve_dependencies): Add string
1575 length to temp_ss for character pointer array assignments.
1576 * fortran/trans-expr.c (gfc_conv_variable): Correct errors in
1577 dereferencing of characters and character pointers.
1578 * fortran/trans-expr.c (gfc_conv_function_call): Provide string
1579 length as return argument for various kinds of handling of return.
1580 Return a char[]* temporary for character pointer functions and
1581 dereference the temporary upon return.
1583 2005-05-29 Janne Blomqvist <jblomqvi@vipunen.hut.fi>
1584 Steven G. Kargl <kargls@comcast.net>
1587 * io.c (gfc_match_inquire): Implement constraints on UNIT and FILE usage.
1589 2005-05-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1592 * io.c (format_item_1): Add check and extension warning for
1595 2005-05-28 Steven G. Kargl <kargls@comcast.net>
1597 * arith.c (gfc_arith_init_1): Fix off by one problem;
1598 (gfc_check_integer_range): Chop extra bits in subnormal numbers.
1600 2005-05-28 Jerry DeLisle <jvdelisle@verizon.net>
1601 Steven G. Kargl <kargls@comcast.net>
1603 * intrinsic.texi: added documentation for BIT_SIZE, BTEST, CHAR, CEILING
1606 2005-05-27 Steven G. Kargl <kargls@comcast.net>
1608 * trans-array.c (gfc_trans_deferred_array): Use build_int_cst to force
1609 like types in comparsion.
1611 2005-05-26 Kazu Hirata <kazu@cs.umass.edu>
1613 * data.c, parse.c, trans-array.c, trans-decl.c,
1614 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
1615 trans.h: Fix comment typos. Follow spelling conventions.
1617 2005-05-22 Roger Sayle <roger@eyesopen.com>
1619 * gfortran.texi: Document some more GNU extensions.
1621 2005-05-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1623 * error.c (gfc_warning): Fix typo in comment.
1625 2005-05-18 Thomas Koenig <Thomas.Koenig@online.de>
1628 * fortran/iresolve.c (gfc_resolve_reshape): Add
1629 gfc_type_letter (BT_COMPLEX) for complex to
1630 to resolved function name.
1632 2005-05-18 Erik Edelmann <erik.edelmann@iki.fi>
1634 * array.c (gfc_match_array_constructor): Support [ ... ]
1635 style array constructors.
1637 2005-05-18 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1639 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_TRUNC
1640 and BUILT_IN_TRUNCF instead of BUILT_IN_FLOOR and BUILT_IN_FLOORF.
1641 * trans-intrinsic.c (build_fix_expr): Change 'op' argument
1642 to correct enum type.
1643 (gfc_conv_intrinsic_aint): Likewise. Clarify comment in front of
1644 function. Add default case to switch, deal with FIX_TRUNC_EXPR
1645 instead of FIX_FLOOR_EXPR.
1647 2005-05-18 Feng Wang <fengwang@nudt.edu.cn>
1650 * trans-const.c (gfc_conv_const_charlen): Use gfc_charlen_type_node to
1651 build character length.
1653 2005-05-17 Zdenek Dvorak <dvorakz@suse.cz>
1655 * trans-types.c (gfc_array_range_type): New variable.
1656 (gfc_init_types): Initialize gfc_array_range_type.
1657 (gfc_get_array_type_bounds): Use gfc_array_range_type.
1659 2005-05-17 Jakub Jelinek <jakub@redhat.com>
1662 * trans-stmt.c (generate_loop_for_temp_to_lhs): Remove SIZE and COUNT2
1663 arguments. If LSS is gfc_ss_terminator, increment COUNT1 by 1, instead
1664 of incrementing COUNT2 and using COUNT1+COUNT2 increment COUNT1 and use
1666 (generate_loop_for_rhs_to_temp): Likewise.
1667 (compute_overall_iter_number): Add INNER_SIZE_BODY argument.
1668 It non-NULL, add it to body.
1669 (allocate_temp_for_forall_nest_1): New function, split from
1670 allocate_temp_for_forall_nest.
1671 (allocate_temp_for_forall_nest): Add INNER_SIZE_BODY argument,
1672 propagate it down to compute_overall_iter_number. Use
1673 allocate_temp_for_forall_nest_1.
1674 (gfc_trans_assign_need_temp): Remove COUNT2. Call
1675 compute_inner_temp_size into a new stmtblock_t. Adjust calls to
1676 allocate_temp_for_forall_nest, generate_loop_for_rhs_to_temp
1677 and generate_loop_for_temp_to_lhs.
1678 (gfc_trans_pointer_assign_need_temp): Adjust calls to
1679 allocate_temp_for_forall_nest.
1680 (gfc_evaluate_where_mask): Call compute_inner_temp_size into a new
1681 stmtblock_t. Call compute_overall_iter_number just once, then
1682 allocate_temp_for_forall_nest_1 twice with the same size.
1683 Initialize mask indexes if nested_forall_info != NULL.
1684 (gfc_trans_where_2): Initialize mask indexes before calling
1685 gfc_trans_nested_forall_loop.
1687 2005-05-15 Feng Wang <fengwang@nudt.edu.cn>
1688 Jerry DeLisle <jvdelisle@verizon.net>
1691 * trans-stmt.c (gfc_trans_label_assign): fix pointer type, to
1692 resolve ICE on assign of format label.
1693 * trans-io.c (set_string): add fold-convert to properly
1694 handle assigned format label in write.
1696 2005-05-13 Paul Brook <paul@codesourcery.com>
1698 * trans-stmt.c (gfc_trans_forall_1): Fix comment typo.
1700 2005-05-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1702 * trans-types.c (gfc_is_nodesc_array): Remove redundant check.
1704 2005-05-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1707 * io.c (check_format): Look for literal characters inside
1710 2005-05-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1712 * resolve.c (resolve_symbol): Copy 'pointer' and 'dimension'
1713 attribute from result symbol to function symbol.
1714 * trans-expr.c (gfc_conv_function_call): Look at sym->attr.dimension
1715 instead of sym->result->attr.dimension.
1717 2005-05-10 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1720 * gfortran.h (gfc_option): Add flag_f2c.
1721 * invoke.texi: Document '-ff2c' command line option. Adapt
1722 documentation for '-fno-second-underscore' and '-fno-underscoring'.
1723 * lang.opt (ff2c): New entry.
1724 * options.c (gfc-init_options): Set default calling convention
1725 to -fno-f2c. Mark -fsecond-underscore unset.
1726 (gfc_post_options): Set -fsecond-underscore if not explicitly set
1728 (handle_options): Set gfc_option.flag_f2c according to requested
1730 * trans-decl.c (gfc_get_extern_function_decl): Use special f2c
1731 intrinsics where necessary.
1732 (gfc_trans_deferred_vars): Change todo error to assertion.
1733 * trans-expr.c (gfc_conv_variable): Dereference access
1734 to hidden result argument.
1735 (gfc_conv_function_call): Add hidden result argument to argument
1736 list if f2c calling conventions requested. Slightly restructure
1737 tests. Convert result of default REAL function to requested type
1738 if f2c calling conventions are used. Dereference COMPLEX result
1740 * trans-types.c (gfc_sym_type): Return double for default REAL
1741 function if f2c cc are used.
1742 (gfc_return_by_reference): Slightly restructure logic. Return
1743 COMPLEX by reference depending on calling conventions.
1744 (gfc_get_function_type): Correctly make hidden result argument a
1745 pass-by-reference argument for COMPLEX. Remove old code which does
1746 this for derived types.
1748 2005-05-09 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1750 * match.c (gfc_match_return): Only require space after keyword when
1751 it is obligatory. Only give stdwarn to after matching is successful.
1752 * dump-parse-tree.c (gfc_show_symbol): Deal with alternate returns.
1754 2005-05-08 Kazu Hirata <kazu@cs.umass.edu>
1756 * intrinsic.texi: Fix typos.
1758 2005-05-07 Steven G. Kargl <kargls@comcast.net>
1760 * intrinsic.texi: Document ASSOCIATED and ATAN2. Update Bessel function
1761 description to include information about scalar arguments.
1763 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
1765 * Make-lang.in, dump-parse-tree.c, invoke.texi, lang.opt,
1766 match.h, trans-array.h: Update copyright.
1768 2005-04-29 Tom Tromey <tromey@redhat.com>
1770 * f95-lang.c (poplevel): Updated for change to build_block.
1772 2005-04-29 Jakub Jelinek <jakub@redhat.com>
1776 * trans-expr.c (gfc_conv_variable): Handle return values in functions
1777 with alternate entry points.
1778 * resolve.c (resolve_entries): Remove unnecessary string termination
1779 after snprintf. Set result of entry master.
1780 If all entries have the same type, set entry master's type
1781 to that common type, otherwise set mixed_entry_master attribute.
1782 * trans-types.c (gfc_get_mixed_entry_union): New function.
1783 (gfc_get_function_type): Use it for mixed_entry_master functions.
1784 * gfortran.h (symbol_attribute): Add mixed_entry_master bit.
1785 * decl.c (gfc_match_entry): Set entry->result properly for
1787 * trans-decl.c (gfc_get_symbol_decl): For entry_master, skip over
1789 (build_entry_thunks): Handle return values in entry thunks.
1790 Clear BT_CHARACTER's ts.cl->backend_decl, so that it is not
1791 shared between multiple contexts.
1792 (gfc_get_fake_result_decl): Use DECL_ARGUMENTS from
1793 current_function_decl instead of sym->backend_decl. Skip over
1794 entry master's entry id argument. For mixed_entry_master entries or
1795 their results, return a COMPONENT_REF of the fake result.
1796 (gfc_trans_deferred_vars): Don't warn about missing return value if
1797 at least one entry point uses RESULT.
1798 (gfc_generate_function_code): For entry master returning
1799 CHARACTER, copy ts.cl->backend_decl to all entry result syms.
1800 * trans-array.c (gfc_trans_dummy_array_bias): Don't consider return
1801 values optional just because they are in entry master.
1803 2005-04-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1805 * gfortran.h (gfc_namespace): Add seen_implicit_none field,
1806 Tobias forgot this in previous commit.
1808 2005-04-29 Paul Brook <paul@codesourcery.com>
1810 * trans-expr.c (gfc_conv_expr_present): Fix broken assert. Update
1813 2005-04-29 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1815 * gfortran.h (gfc_namespace): Add seen_implicit_none field.
1816 * symbol.c (gfc_set_implicit_none): Give error if there's a previous
1817 IMPLICIT NONE, set seen_implicit_none.
1818 (gfc_merge_new_implicit): Error if there's an IMPLICIT NONE statement.
1820 2005-04-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1822 * gfortran.h (gfc_gsymbol): Make name a const char *.
1823 * symbol.c (gfc_get_gsymbol): Allocate gsymbol name via
1826 2005-04-28 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1829 * resolve.c (resolve_actual_arglist): Issue an error if a statement
1830 functions is used as actual argument.
1832 2005-04-27 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1835 * interface.c (compare_parameter): Ignore type for EXPR_NULL
1836 only if type is BT_UNKNOWN.
1838 2005-04-25 Paul Brook <paul@codesourcery.com>
1839 Steven G. Kargl <kargls@comcast.net>
1842 * check.c (gfc_check_ichar_iachar): New function.
1843 * instinsic.h (gfc_check_ichar_iachar): Add prototype.
1844 * intrinsic.c (add_functions): Use it.
1845 * primary.c (match_varspec, gfc_match_rvalue): Clear incorrect
1846 character expression lengths.
1848 2005-04-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1851 * trans-common.c (translate_common): Cast offset and
1852 common_segment->offset to type int for warning message.
1854 2005-04-23 DJ Delorie <dj@redhat.com>
1856 * trans-decl.c: Adjust warning() callers.
1858 2005-04-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1860 * trans-const.c (gfc_conv_mpfr_to_tree): Use hexadecimal string as
1861 intermediate representation. Fix typo in comment.
1863 2005-04-21 Steven G. Kargl <kargls@comcast.net>
1865 * trans-const.c (gfc_conv_mpfr_to_tree): Remove unneeded computation;
1866 simplify logic; Add a gcc_assert.
1868 2005-04-19 Steven G. Kargl <kargls@comcast.net>
1870 * trans-const.c (gfc_conv_mpz_to_tree): Fix comment.
1872 2005-04-19 Arnaud Desitter <arnaud.desitter@ouce.ox.ac.uk>
1873 Steven G. Kargl <kargls@comcast.net>
1875 * invoke.texi: Update -Waliasing description
1877 2005-04-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1880 * resolve.c (resolve_variable): If e->symtree is not set, this
1881 ought to be a FAILURE, and not a segfault.
1883 2005-04-17 Paul Thomas <pault@gcc.gnu.org>
1890 * fortran/trans-io.c (gfc_build_io_library_fndecls): Create
1891 declaration for st_set_nml_var and st_set_nml_var_dim. Remove
1892 declarations of old namelist functions.
1893 (build_dt): Simplified call to transfer_namelist_element.
1894 (nml_get_addr_expr): Generates address expression for start of
1895 object data. New function.
1896 (nml_full_name): Qualified name for derived type components. New
1898 (transfer_namelist_element): Modified for calls to new functions
1899 and improved derived type handling.
1901 2005-04-17 Richard Guenther <rguenth@gcc.gnu.org>
1903 * scanner.c (gfc_next_char_literal): Reset truncation flag
1904 for lines ending in a comment for both fixed and free form.
1905 (load_line): Do not set truncated flag if only truncating
1908 2005-04-15 Richard Guenther <rguenth@gcc.gnu.org>
1911 * gfortran.h (gfc_linebuf): Add truncated field.
1912 * parse.c (next_statement): Handle warning for truncated
1914 * scanner.c (load_line): Return if line was truncated.
1915 No longer warn for truncated lines. Remove unused parameters.
1916 (load_file): Store load_line return value to linebuf.
1917 (gfc_error_recovery): Do not advance line at the end.
1919 2005-04-14 Steven G. Kargl <kargls@comcast.net>
1921 * gfortran.h (gfc_real_info): Add subnormal struct member.
1922 * arith.c (gfc_arith_init_1): Set it.
1923 (gfc_check_real_range): Use it.
1924 * simplify.c (gfc_simplify_nearest): Fix nearest(0.,1.).
1926 2005-04-12 Kazu Hirata <kazu@cs.umass.edu>
1928 * simplify.c: Fix a comment typo.
1930 2005-04-11 Richard Sandiford <rsandifo@redhat.com>
1932 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
1934 2005-04-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1936 * simplify.c (gfc_simplify_nearest): Overhaul.
1938 2005-04-10 Kazu Hirata <kazu@cs.umass.edu>
1940 * interface.c: Fix a comment typo.
1942 2005-04-10 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1944 * match.c (match_arithmetic_if): Arithmetic IF is obsolete in
1947 2005-04-09 Steven G. Kargl <kargls@comcast.net>
1949 * simplify.c (gfc_simplify_anint): Use mpfr_round()
1950 (gfc_simplify_dnint): ditto.
1951 (gfc_simplify_nint): ditto.
1953 2005-04-09 Andrew Pinski <pinskia@physics.uc.edu>
1956 * io.c (check_format): Allow an optional comma
1957 between descriptors.
1959 2005-04-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1961 * match.c (match_arithmetic_if): Remove gfc_ prefix and correct
1962 comment according to GNU coding style.
1963 (gfc_match_if): Remove gfc_ prefix in call to
1964 match_arithmetic_if.
1966 2005-04-08 Diego Novillo <dnovillo@redhat.com>
1968 * match.c (gfc_match_arithmetic_if): Declare static.
1970 2005-04-08 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1973 * match.c (gfc_match_arithmetic_if): New function to match an
1974 arithmetic IF statement.
1975 (gfc_match_if): Use gfc_match_arithmetic_if to match an
1976 arithmetic IF statement embedded in a simple IF statement.
1978 2005-04-07 Steven G. Kargl <kargls@comcast.net>
1980 * simplify.c (gfc_simplify_exponent): Fix exponent(tiny(x))
1982 2005-04-06 Steven G. Kargl <kargls@comcast.net>
1984 * invoke.texi: Remove documentation of -std=f90
1986 2005-04-06 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1988 * expr.c (gfc_check_assign): Don't allow NULL as rhs in a
1989 non-pointer assignment.
1991 2005-04-05 Feng Wang <fengwang@nudt.edu.cn>
1996 * array.c (resolve_character_array_constructor): New function. Set
1997 constant character array's character length.
1998 (gfc_resolve_array_constructor): Use it.
1999 * decl.c (add_init_expr_to_sym): Set symbol and initializer character
2001 (gfc_set_constant_character_len): New function. Set constant character
2002 expression according the given length.
2003 * match.h (gfc_set_constant_character_len): Add prototype.
2005 2005-04-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2007 * intrinsic.texi: BES?? functions are not in the f95 standard.
2009 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2011 * intrinsic.texi: Document COS, EXP, LOG, LOG10, SIN, SQRT, TAN.
2013 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2015 * intrinsic.texi: Document BESJ0, BESJ1, BESJN, BESY0, BESY1,
2016 BESYN, ATAN, COSH, ERF, ERC, SINH, TANH.
2018 2005-04-02 Steven G. Kargl <kargls@comcast.net>
2020 * intrinsic.texi: Document ALLOCATED, ANINT, ANY, ASIN; fix typos
2022 2005-04-01 Kazu Hirata <kazu@cs.umass.edu>
2024 * decl.c, f95-lang.c, interface.c, module.c, trans-stmt.c,
2025 trans.h: Fix comment typos.
2027 2005-03-29 Steven G. Kargl <kargls@comcast.net>
2029 * gfortran.h (option_t): Change d8, i8, r8 to flag_default_double,
2030 flag_default_integer, flag_default_real
2031 * invoke.texi: Update documentation
2032 * lang.opt: Remove d8, i8, r8 definitions; Add fdefault-double-8
2033 fdefault-integer-8, and fdefault-real-8 definitions.
2034 * options.c (gfc_init_options): Set option defaults
2035 (gfc_handle_option): Handle command line options.
2036 * trans-types.c (gfc_init_kinds): Use options.
2038 2005-03-29 Keith Besaw <kbesaw@us.ibm.com>
2040 * f95-lang.c (builtin_function): Process the attrs parameter
2041 and apply the "const" attribute to the builtin if found.
2043 2005-03-27 Steven G. Kargl <kargls@comcast.net>
2045 * intrinsic.texi: Document AIMAG, AINT, ALL
2047 2005-03-26 Steven G. Kargl <kargls@comcast.net>
2049 * arith.c (check_result): Fix illogical logic.
2051 2005-03-26 Canqun Yang <canqun@nudt.edu.cn>
2053 * trans-common.c (create_common): Build RECORD_NODE for common blocks
2054 contain no equivalence objects.
2055 (add_equivalences): New argument saw_equiv.
2056 (trans_common): New local variable saw_equiv.
2057 (finish_equivalences): Add a local variable dummy, Always pass true
2058 for the 3rd parameter to create_common.
2060 2005-03-25 Steven G. Kargl <kargls@comcast.net>
2062 * intrinsic.texi: Fix "make dvi"
2064 2005-03-24 Steven G. Kargl <kargls@comcast.net>
2066 * intrinsic.texi: New file.
2067 * gfortran.texi: Include it; white space change; fix typo.
2069 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
2071 * f95-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
2073 2005-03-23 Steven Bosscher <stevenb@suse.de>
2075 * convert.c (convert): Replace fold (buildN (...)) with fold_buildN.
2076 * trans-array.c (gfc_trans_allocate_array_storage,
2077 gfc_trans_allocate_temp_array gfc_trans_array_constructor_value,
2078 gfc_conv_array_index_ref, gfc_trans_array_bound_check,
2079 gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
2080 gfc_conv_array_ref, gfc_trans_preloop_setup, gfc_conv_ss_startstride,
2081 gfc_conv_loop_setup, gfc_array_init_size, gfc_trans_array_bounds,
2082 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
2083 gfc_conv_expr_descriptor): Likewise.
2084 * trans-expr.c (gfc_conv_powi, gfc_conv_string_tmp,
2085 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
2086 * trans-intrinsic.c (build_round_expr, gfc_conv_intrinsic_bound,
2087 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_sign,
2088 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
2089 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_bitop,
2090 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits,
2091 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_ishftc,
2092 gfc_conv_intrinsic_merge, prepare_arg_info,
2093 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_repeat): Likewise.
2094 * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do, gfc_trans_do_while,
2095 gfc_trans_forall_loop, gfc_do_allocate, generate_loop_for_temp_to_lhs,
2096 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
2097 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
2098 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_assign):
2100 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Likewise.
2101 * trans.c (gfc_add_modify_expr): Likewise.
2103 2005-03-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2105 * check.c (gfc_check_chdir, gfc_check_chdir_sub, gfc_check_kill,
2106 gfc_check_kill_sub, gfc_check_link, gfc_check_link_sub,
2107 gfc_check_symlnk, gfc_check_symlnk_sub, gfc_check_rename,
2108 gfc_check_rename_sub, gfc_check_sleep_sub, gfc_check_gerror,
2109 gfc_check_getlog, gfc_check_hostnm, gfc_check_hostnm_sub,
2110 gfc_check_perror): new functions to check newly implemented
2112 * gfortran.h: adding symbols for new intrinsics.
2113 * intrinsic.c (add_functions): adding new intrinsics.
2114 (add_subroutines): adding new intrinsics.
2115 * intrinsic.h: prototype for all checking and resolving
2117 * iresolve.c (gfc_resolve_chdir, gfc_resolve_chdir_sub,
2118 gfc_resolve_hostnm, gfc_resolve_ierrno, gfc_resolve_kill,
2119 gfc_resolve_link, gfc_resolve_rename, gfc_resolve_symlnk,
2120 gfc_resolve_time, gfc_resolve_time8, gfc_resolve_rename_sub,
2121 gfc_resolve_kill_sub, gfc_resolve_link_sub,
2122 gfc_resolve_symlnk_sub, gfc_resolve_sleep_sub,
2123 gfc_resolve_gerror, gfc_resolve_getlog, gfc_resolve_hostnm_sub,
2124 gfc_resolve_perror): new functions to resolve intrinsics.
2125 * trans-intrinsic.c (gfc_conv_intrinsic_function): add case
2128 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2130 * dump-parse-tree.c (gfc_show_expr): Dump name of namespace
2131 in which the variable is declared.
2134 * resolve.c (was_declared): Also check for dummy attribute.
2136 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2138 * gfortran.h (arith): Remove ARITH_0TO0.
2139 * arith.c (gfc_arith_error): Remove handling of ARITH_0TO0.
2140 (gfc_arith_power): Remove special casing of zero to integral
2143 2005-03-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2145 * Make-lang.in (fortran-warn): Remove -Wno-error.
2146 (expr.o-warn, resolve.o-warn, simplify.o-warn,
2147 trans-common.o-warn): Specify -Wno-error.
2149 2005-03-17 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2151 * trans-array.c (gfc_trans_static_array_pointer,
2152 get_array_ctor_var_strlen, gfc_conv_array_index_offset): Fix
2153 comment and formatting typos.
2155 2005-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2157 * invoke.texi: Fix typos.
2159 2005-03-15 Zack Weinberg <zack@codesourcery.com>
2161 * Make-lang.in (GFORTRAN_TEXI): Add gcc-vers.texi.
2163 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
2165 * trans-stmt.c (gfc_trans_label_assign): Don't set DECL_ARTIFICIAL flag
2166 to zero on label_tree.
2168 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
2171 * io.c (resolve_tag): Add checking on assigned label.
2172 (match_dt_format): Does not set symbol assign attribute.
2173 * match.c (gfc_match_goto):Does not set symbol assign attribute.
2174 * resolve.c (resolve_code): Add checking on assigned label.
2175 * trans-common.c (build_field): Deals with common variable assigned
2177 * trans-stmt.c (gfc_conv_label_variable): New function.
2178 (gfc_trans_label_assign): Use it.
2179 (gfc_trans_goto): Ditto.
2180 * trans-io.c (set_string): Ditto.
2181 * trans.h (gfc_conv_label_variable): Add prototype.
2183 2005-03-14 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2186 * symbol.c (check_conflict): A dummy argument can't be a statement
2189 2005-03-14 Zdenek Dvorak <dvorakz@suse.cz>
2191 * fortran/trans-intrinsic.c (gfc_conv_intrinsic_ishft): Convert
2192 the argument of the shift to the unsigned type.
2194 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2197 * resolve.c (gfc_resolve_index): Allow REAL indices as an extension.
2199 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2202 * resolve.c (gfc_resolve): Check if character lengths are
2203 specification expressions.
2205 2005-03-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2208 * trans-array.c (gfc_stack_space_left): Remove unused variable.
2209 (gfc_can_put_var_on_stack): Move to trans-decl.c, remove #if 0'ed
2211 * trans-array.h (gfc_stack_space_left, gfc_can_put_var_on_stack):
2212 Remove declaration / prototype.
2213 * trans-common.c (build_equiv_decl): Give union a name. Check if
2214 it can be put on the stack.
2215 * trans-decl.c (gfc_stack_space_left): Move function here.
2216 (gfc_build_qualified_array): Fix comment typo.
2217 * trans.h (gfc_put_var_on_stack): Add prototype.
2219 2005-03-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2221 * Make-lang.in (fortran-warn): Set to $(STRICT_WARN) -Wno-error.
2222 * decl.c, trans.c: Don't use C++ style comments.
2223 * gfortran.h (sym_flavor, procedure_type, sym_intent, gfc_access,
2224 ifsrc): Give names to enums and use ENUM_BITFIELD.
2225 (gfc_access): Remove trailing comma.
2227 2005-03-05 Steven G. Kargl <kargls@comcast.net>
2230 * primary.c (match_complex_constant): Mangled complex constant may
2231 be an implied do-loop. Give implied do-loop matcher a chance.
2233 2005-03-05 Steven G. Kargl <kargls@comcast.net>
2236 * resolve.c (compare_shapes): New function.
2237 (resolve_operator): Use it.
2239 2005-03-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2241 * trans-const.c (gfc_conv_constant_to_tree): Use correct tree
2242 type for COMPLEX constants.
2244 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2247 * trans-expr.c (gfc_conv_function_call): Correctly dereference
2248 argument from a pointer function also if it has a result clause.
2250 2005-03-04 Steven G. Kargl <kargls@comcast.net>
2252 * expr.c (gfc_copy_shape_excluding): Change && to ||.
2254 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2256 * trans-intrinsic.c (gfc_get_symbol_for_expr): Fix comment typo,
2259 2005-02-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2263 * simplify.c (gfc_simplify_bound): Rename to ...
2264 (simplify_bound): ... this and overhaul.
2266 2005-02-28 Steven G. Kargl <kargl@gcc.gnu.org>
2268 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): remove boolean argument.
2269 (gfc_conv_intrinsic_function): update function calls
2271 2005-02-27 Steven G. Kargl <kargl@gcc.gnu.org>
2274 * trans-types.c (gfc_max_integer_kind): Declare
2275 (gfc_init_kinds): Initialize it.
2276 * gfortran.h (gfc_max_integer_kind): extern it.
2277 * primary.c (match_boz_constant): Use it; remove gfortran extension
2278 of kind suffixes on BOZ literal constants
2281 2005-02-27 Steven G. Kargl <kargls@comcast.net>
2283 * arith.c (gfc_check_real_range): Remove multiple returns
2284 (check_result): New function.
2285 (gfc_arith_uminus,gfc_arith_plus,gfc_arith_times,
2286 gfc_arith_divide,gfc_arith_power,gfc_arith_minus): Use it.
2289 2005-02-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2291 * decl.c, resolve.c, trans-array.c, trans.h: Fix comment typo(s).
2294 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-meunchen.de>
2296 Unrevert previously reverted patch. Adding this fix:
2297 * module.c (find_true_name): Deal with NULL module.
2299 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2301 Revert yesterday's patch:
2302 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2304 * gfortran.h (gfc_component, gfc_actual_arglist, ...
2305 ... argument. Copy string instead of pointing to it.
2307 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2309 * gfortran.h (gfc_get_namespace): Add second argument to prototype.
2310 * intrinsic.c (gfc_intrinsic_init_1): Pass second argument to
2312 * module.c (mio_namespace_ref, load_needed): Likewise.
2313 * parse.c (parse_interface, parse_contained): Likewise. Here the
2314 correct second argument matters.
2315 * symbol.c (gfc_get_namespace): Add parent_types argument, only copy
2316 parent's implicit types if this is set.
2317 (gfc_symbol_init_2): Pass second argument to gfc_get_namespace.
2318 * trans-common.c (build_common_decl): Likewise.
2320 * gfortran.h (symbol_attribute): New 'untyped' field, fix comment
2322 * symbol.c (gfc_set_default_type): Issue error only once, by setting
2323 and checking 'untyped' attribute.
2325 * gfortran.h (gfc_expr): Move 'operator', 'op1', 'op2', and 'uop'
2326 fields into new struct 'op' inside the 'value' union.
2327 * arith.c (eval_intrinsic): Adapt all users.
2328 * dependency.c (gfc_check_dependency): Likewise.
2329 * dump-parse-tree.c (gfc_show_expr): Likewise.
2330 * expr.c (gfc_get_expr): Don't clear removed fields.
2331 (free_expr0, gfc_copy_expr, gfc_type_convert_binary,
2332 gfc_is_constant_expr, simplify_intrinsic_op, check_init_expr,
2333 check_intrinsic_op): Adapt to new field names.
2334 * interface.c (gfc_extend_expr): Likewise. Also explicitly
2335 nullify 'esym' and 'isym' fields of new function call.
2336 * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
2337 Adapt to renamed structure fields.
2338 * matchexp.c (build_node, match_level_1, match_expr): Likewise.
2339 * module.c (mio_expr): Likewise.
2340 * resolve.c (resolve_operator): Likewise.
2341 (gfc_find_forall_index): Likewise. Only look through operands
2342 if dealing with EXPR_OP
2343 * trans-array.c (gfc_walk_op_expr): Adapt to renamed fields.
2344 * trans-expr.c (gfc_conv_unary_op, gfc_conv_power_op,
2345 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
2348 * gfortran.h (gfc_component, gfc_actual_arglist, gfc_user_op): Make
2349 'name' a 'const char *'.
2350 (gfc_symbol): Likewise, also for 'module'.
2351 (gfc_symtree): Make 'name' a 'const char *'.
2352 (gfc_intrinsic_sym): Likewise, also for 'lib_name'.
2353 (gfc_get_gsymbol, gfc_find_gsymbol): Add 'const' qualifier to
2355 (gfc_intrinsic_symbol): Use 'gfc_get_string' instead of 'strcpy' to
2356 initialize 'SYM->module'.
2357 * check.c (gfc_check_minloc_maxloc, check_reduction): Check for NULL
2358 pointer instead of empty string.
2359 * dump-parse-tree.c (gfc_show_actual_arglist): Likewise.
2360 * interface.c (gfc_compare_types): Adapt check to account for possible
2362 (compare_actual_formal): Check for NULL pointer instead of empty
2364 * intrinsic.c (gfc_current_intrinsic, gfc_current_intrinsic_arg):
2365 Add 'const' qualifier.
2366 (conv_name): Return a heap allocated string.
2367 (find_conv): Add 'const' qualifier to 'target'.
2368 (add_sym): Use 'gfc_get_string' instead of 'strcpy'.
2369 (make_generic): Check for NULL pointer instead of empty string.
2370 (make_alias): Use 'gfc_get_string' instead of 'strcpy'.
2371 (add_conv): No need to strcpy result from 'conv_name'.
2372 (sort_actual): Check for NULL pointer instead of empty string.
2373 * intrinsic.h (gfc_current_intrinsic, gfc_current_intrinsic_arg):
2375 * module.c (compare_true_names): Compare pointers instead of strings
2376 for 'module' member.
2377 (find_true_name): Initialize string fields with gfc_get_string.
2378 (mio_pool_string): New function.
2379 (mio_internal_string): Adapt comment.
2380 (mio_component_ref, mio_component, mio_actual_arg): Use
2381 'mio_pool_string' instead of 'mio_internal_string'.
2382 (mio_symbol_interface): Add 'const' qualifier to string arguments.
2383 Add level of indirection. Use 'mio_pool_string' instead of
2384 'mio_internal_string'.
2385 (load_needed, read_module): Use 'gfc_get_string' instead of 'strcpy'.
2386 (write_common, write_symbol): Use 'mio_pool_string' instead of
2387 'mio_internal_string'.
2388 (write_symbol0, write_symbol1): Likewise, also check for NULL pointer
2389 instead of empty string.
2390 (write_operator, write_generic): Pass correct type variable to
2391 'mio_symbol_interface'.
2392 (write_symtree): Use 'mio_pool_string' instead of
2393 'mio_internal_string'.
2394 * primary.c (match_keyword_arg): Adapt check to possible
2395 case of NULL pointer. Use 'gfc_get_string' instead of 'strcpy'.
2396 * symbol.c (gfc_add_component, gfc_new_symtree, delete_symtree,
2397 gfc_get_uop, gfc_new_symbol): Use 'gfc_get_string' instead of
2399 (ambiguous_symbol): Check for NULL pointer instead of empty string.
2400 (gfc_find_gsymbol, gfc_get_gsymbol): Add 'const' qualifier on string
2402 * trans-array.c (gfc_trans_auto_array_allocation): Check for NULL
2403 pointer instead of empty string.
2404 * trans-decl.c (gfc_sym_mangled_identifier,
2405 gfc_sym_mangled_function_id, gfc_finish_var_decl, gfc_get_symbol_decl,
2406 gfc_get_symbol_decl): Likewise.
2407 * trans-io.c (gfc_new_nml_name_expr): Add 'const' qualifier to
2408 argument. Copy string instead of pointing to it.
2410 2005-02-23 Kazu Hirata <kazu@cs.umass.edu>
2412 * intrinsic.h, st.c: Update copyright.
2414 2005-02-20 Steven G. Kargl <kargls@comcast.net>
2416 * symbol.c: Typos in comments.
2418 2005-02-20 Steven G. Kargl <kargls@comcast.net>
2420 * expr.c (gfc_type_convert_binary): Typo in comment.
2422 2005-02-19 Steven G. Kargl <kargls@comcast.net>
2424 * check.c (gfc_check_selected_int_kind): New function.
2425 * intrinsic.h: Prototype it.
2426 * intrinsic.c (add_function): Use it.
2427 * simplify (gfc_simplify_ceiling,gfc_simplify_floor): Change
2428 BT_REAL to BT_INTEGER and use gfc_default_integer_kind.
2430 2005-02-19 Steven G. Kargl <kargls@comcast.net>
2432 * check.c (gfc_check_int): improve checking of optional kind
2433 * simplify.c (gfc_simplify_int): Change BT_REAL to BT_INTEGER
2435 2005-02-19 Steven G. Kargl <kargls@comcast.net>
2437 * check.c (gfc_check_achar): New function
2438 * intrinsic.h: Prototype it.
2439 * intrinsic.c (add_function): Use it.
2441 2005-02-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2443 * trans-stmt.c (generate_loop_for_temp_to_lhs,
2444 generate_loop_for_rhs_to_temp): Remove if whose condition is
2447 2005-02-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2449 * symbol.c (gfc_use_ha_derived): Remove, fold functionality into ...
2450 (gfc_use_derived): ... this function.
2452 2005-02-09 Richard Henderson <rth@redhat.com>
2454 * f95-lang.c (gfc_init_builtin_functions): Call
2455 build_common_builtin_nodes; do not define any functions handled
2458 2005-02-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2460 * expr.c (gfc_copy_expr): Don't copy 'op1' and 'op2' for
2462 (gfc_is_constant_expr): Check 'ref' to determine if substring
2463 reference is constant.
2464 (gfc_simplify_expr): Simplify 'ref' instead of 'op1' and 'op2'.
2465 (check_init_expr, check_restricted): Check 'ref' instead of 'op1'
2467 * module.c (mio_expr): Read / write 'ref' instead of 'op1' and 'op2'.
2469 2005-02-07 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2471 * gfortran.h (gfc_add_dimension, gfc_add_result, gfc_add_save,
2472 gfc_add_dummy, gfc_add_generic, gfc_add_in_common, gfc_add_data,
2473 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
2474 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
2475 gfc_add_procedure): Add argument.
2476 * array.c (gfc_set_array_spec), decl.c (var_element, get_proc_name,
2477 gfc_match_null, match_type_spec, match_attr_spec,
2478 gfc_match_formal_arglist, match_result, gfc_match_function_decl):
2479 Update callers to match.
2480 (gfc_match_entry): Likewise, fix comment typo.
2481 (gfc_match_subroutine, attr_decl1, gfc_add_dimension,
2482 access_attr_decl, do_parm, gfc_match_save, gfc_match_modproc,
2483 gfc_match_derived_decl): Update callers.
2484 * interface.c (gfc_match_interface): Likewise.
2485 * match.c (gfc_match_label, gfc_add_flavor,
2486 gfc_match_call, gfc_match_common, gfc_match_block_data,
2487 gfc_match_namelist, gfc_match_module, gfc_match_st_function):
2489 * parse.c (parse_derived, parse_interface, parse_contained),
2490 primary.c (gfc_match_rvalue, gfc_match_variable): Likewise.
2491 * resolve.c (resolve_formal_arglist, resolve_entries): Update callers.
2492 * symbol.c (check_conflict, check_used): Add new 'name' argument,
2493 use when printing error message.
2494 (gfc_add_dimension, gfc_add_result, gfc_add_save, gfc_add_dummy,
2495 gfc_add_generic, gfc_add_in_common, gfc_add_data,
2496 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
2497 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
2498 gfc_add_procedure): Add new 'name' argument. Pass along to
2499 check_conflict and check_used.
2500 (gfc_add_allocatable, gfc_add_external, gfc_add_intrinsic,
2501 gfc_add_optional, gfc_add_pointer, gfc_add_target, gfc_add_elemental,
2502 gfc_add_pure, gfc_add_recursive, gfc_add_intent,
2503 gfc_add_explicit_interface, gfc_copy_attr): Pass NULL for new
2504 argument in calls to any of the modified functions.
2506 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
2508 * gfortran.texi: Don't give last update date.
2510 2006-01-30 Richard Henderson <rth@redhat.com>
2512 * options.c (gfc_init_options): Zero flag_errno_math.
2514 2005-01-29 Paul Brook <paul@codesourcery.com>
2517 * check.c (real_or_complex_check): New function.
2518 (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc): New functions.
2519 * intrinsic.c (add_functions): Use new check functions.
2520 * intrinsic.h (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc):
2523 2005-01-29 Steven G. Kargl <kargls@comcast.net>
2526 * expr.c (gfc_check_assign): Check for conformance of logical operands
2528 2004-01-27 Steven Bosscher <stevenb@suse.de>
2530 * trans-decl.c (gfc_build_label_decl): Set DECL_ARTIFICAL and
2531 TREE_USED for all labels.
2532 (gfc_trans_entry_master_switch): Use it instead of building a
2534 * trans-io.c (add_case): Likewise.
2535 * trans-stmt.c (gfc_trans_integer_select): Likewise.
2537 2004-01-23 Paul Brook <paul@codesourcery.com>
2538 Steven G. Kargl <kargls@comcast.net>
2541 * arith.c (gfc_convert_real): Remove sign handling.
2542 * primary.c (match_digits): Allow whitespace after initial sign.
2543 (match_real_const): Handle signs here. Allow whitespace after
2544 initial sign. Remove dead code.
2545 (match_const_complex_part): Remove.
2546 (match_complex_part): Use match_{real,integer}_const.
2547 (match_complex_constant): Cross-promote integer types.
2549 2005-01-23 James A. Morrison <phython@gcc.gnu.org>
2552 * iresolve.c (gfc_resolve_transpose): Resolve to transpose_c4 or
2553 transpose_c8 for complex types.
2555 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
2557 * data.c, dependency.c, f95-lang.c, io.c, trans-array.c,
2558 trans-decl.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
2559 trans-stmt.c, trans-types.c, trans.h: Fix comment typos.
2560 Follow spelling conventions.
2562 2005-01-22 Bud Davis <bdavis9659@comcast.net>
2565 * trans-io.c (gfc_trans_inquire): Added code to support
2568 2005-01-22 Steven G. Kargl <kargls@comcast.net>
2570 * intrinsic.c (make_alias): Add standard argument.
2571 (add_functions): Update make_alias calls.
2573 2005-01-22 Paul Brook <paul@codesourcery.com>
2575 * trans-expr.c (gfc_conv_function_call): Remove bogus TODO.
2577 2005-01-22 Paul Brook <paul@codesourcery.com>
2579 * gfortran.h (gfc_check_access): Add prototype.
2580 * match.c (gfc_match_namelist): Remove TODO.
2581 * module.c (check_access): Rename ...
2582 (gfc_check_access): ... to this. Boolify. Update callers.
2583 * resolve.c (resolve_symbol): Check for private objects in public
2586 2005-01-22 Paul Brook <paul@codesourcery.com>
2588 * primary.c (gfc_match_rvalue): Only apply implicit type if variable
2589 does not have an explicit type.
2590 (gfc_match_variable): Resolve implicit derived types in all cases.
2591 Resolve contained function types from their own namespace, not the
2593 * resolve.c (resolve_contained_fntype): Remove duplicate sym->result
2594 checking. Resolve from the contained namespace, not the parent.
2596 2005-01-22 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2599 * trans-const.c (gfc_conv_constant_to_tree): Give logical
2600 constants the correct type.
2603 * trans-io.c (ADD_STRING): Use gfc_charlen_type_node for string
2605 (gfc_build_io_library_fndecls): 'rec' and 'recl_in' are not
2608 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
2610 * arith.c, array.c, check.c, decl.c, expr.c, f95-lang.c,
2611 gfortran.h, interface.c, intrinsic.c, io.c, iresolve.c,
2612 match.c, matchexp.c, misc.c, module.c, options.c, parse.c,
2613 scanner.c, simplify.c, symbol.c, trans-array.c, trans-expr.c,
2614 trans-io.c, trans-stmt.c, trans.c: Update copyright.
2616 2005-01-17 Ira Rosen <irar@il.ibm.com>
2618 * f95-lang.c (gfc_init_builtin_functions): Call targetm.init_builtins.
2620 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2623 * error.c (error_char): Line-buffer errors / warnings.
2625 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2627 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Fix signed /
2628 unsigned issue. Use build_int_cst instead of converting
2629 integer_zero_node. Remove unnecessary conversion.
2631 * trans-types.c (gfc_get_character_type_len): Use
2632 gfc_charlen_type_node as basic type for the range field.
2634 * trans-intrinsic.c (build_fixbound_expr,
2635 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_anyall,
2636 gfc_conv_intrinsic_count, gfc_conv_intrinsic_btest,
2637 gfc_conv_intrinsic_singlebitop): Use 'build_int_cst' instead
2638 of converting 'integer_zero_node' or 'integer_one_node'
2640 (gfc_conv_intrinsic_ishftc): Same, but store in local variable to
2642 (gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_rrspacing,
2643 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_iargc): Use
2644 'build_int_cst' instead of converting 'integer_zero_node' or
2645 'integer_one_node' respectively.
2647 * trans-intrinsic.c (gfc_conv_intrinsic_index,
2648 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove
2649 'gfc'-prefix from local variable, remove dead code, use correct
2650 type when inserting argument.
2652 * trans-intrinsic.c, trans-types.c: Update copyright years.
2654 2005-01-16 Steven G. Kargl <kargls@comcast.net>
2657 * resolve.c (check_case_overlap): Typo in comment.
2658 (validate_case_label_expr): Fix up kinds of case values
2659 (resolve_select): Properly handle kind mismatches.
2661 2004-01-16 Paul Brook <paul@codesourcery.com>
2664 * trans-common.c (translate_common): Remove duplicate function call.
2665 (finish_equivalences): Preserve alignment when biasing offsets.
2667 2005-01-15 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de
2669 * primary.c (check_digit): Call 'ISXDIGIT' instead of assuming
2670 ASCII-like character encoding.
2672 2005-01-14 Steven G. Kargl <kargls@comcast.net>
2674 * resolve.c (compare_case): Cleanup.
2676 2005-01-14 Steven G. Kargl <kargls@comcast.net>
2678 * resolve.c (compare_case): Give arguments correct type.
2680 2005-01-13 Kazu Hirata <kazu@cs.umass.edu>
2682 * iresolve.c, trans-common.c, trans-types.c: Fix comment
2685 2005-01-09 Paul Brook <paul@codesourcery.com>
2688 * trans-common.c (current_common, current_offset): Remove.
2689 (create_common): Add head argument.
2690 (align_segment): New function.
2691 (apply_segment_offset): New function.
2692 (translate_common): Merge code from new_segment. Handle alignment.
2693 (new_segment): Remove.
2694 (finish_equivalences): Ensure proper alignment.
2696 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2698 * trans-const.c: Don't include unused math.h.
2700 * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl,
2701 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_minmaxloc,
2702 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_len): Remove
2703 trailing whitespace.
2704 (prepare_arg_info): Fix formatting, indenting and remove trailing
2706 (gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_trim): Remove
2707 trailing whitespace.
2709 * arith.c (arctangent2, gfc_arith_init_1, gfc_arith_done_1,
2710 gfc_constant_result, gfc_range_check, gfc_arith_power,
2711 eval_type_intrinsic0, eval_intrinsic_f2, gfc_real2real,
2712 gfc_real2complex, gfc_complex2int, gfc_complex2real,
2713 gfc_complex2complex): Fix whitespace issues.
2714 * check.c (must_be, type_check, numeric_check, int_or_real_check,
2715 logical_array_check, array_check, scalar_check, nonoptional_check,
2716 variable_check, dim_check, check_a_kind, gfc_check_a_ikind,
2717 gfc_check_a_xkind, gfc_check_abs, gfc_check_all_any,
2718 gfc_check_allocated, gfc_check_a_p, gfc_check_besn,
2719 gfc_check_btest, gfc_check_char, gfc_check_cmplx, gfc_check_count,
2720 gfc_check_cshift, gfc_check_dcmplx, gfc_check_dble,
2721 gfc_check_digits, gfc_check_dot_product, gfc_check_eoshift,
2722 gfc_check_fnum, gfc_check_g77_math1, gfc_check_huge, gfc_check_i,
2723 gfc_check_iand, gfc_check_ibclr, gfc_check_ibits, gfc_check_ibset,
2724 gfc_check_idnint, gfc_check_ieor, gfc_check_index, gfc_check_int,
2725 gfc_check_ior, gfc_check_ishft, gfc_check_ishftc, gfc_check_kind,
2726 gfc_check_lbound, gfc_check_logical, min_max_args,
2727 gfc_check_min_max_integer, gfc_check_min_max_real,
2728 gfc_check_min_max_double, gfc_check_matmul,
2729 gfc_check_minval_maxval, gfc_check_merge, gfc_check_nearest,
2730 gfc_check_pack, gfc_check_precision, gfc_check_radix,
2731 gfc_check_range, gfc_check_real, gfc_check_repeat,
2732 gfc_check_scale, gfc_check_scan, gfc_check_selected_real_kind,
2733 gfc_check_set_exponent): Fix formatting issues.
2734 (gfc_check_size, gfc_check_sign): Alphabetize function order,
2735 remove whitespace-only line.
2736 (gfc_check_fstat, gfc_check_fstat_sub, gfc_check_stat,
2737 gfc_check_stat_sub, gfc_check_transfer, gfc_check_transpose,
2738 gfc_check_ubound, gfc_check_unpack, gfc_check_verify, gfc_check_x,
2739 gfc_check_cpu_time, gfc_check_date_and_time, gfc_check_mvbits,
2740 gfc_check_random_number, gfc_check_random_seed,
2741 gfc_check_second_sub, gfc_check_system_clock,
2742 gfc_check_getcwd_sub, gfc_check_exit, gfc_check_flush,
2743 gfc_check_umask, gfc_check_umask_sub, gfc_check_unlink,
2744 gfc_check_unlink_sub): Fix formatting issues.
2746 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2748 * gfortran.h: Remove outdated comment. Don't include stdio.h
2751 2005-01-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2753 * gfortranspec.c (lang_specific_driver): Change year to 2005 in
2754 output of 'gfortran --version'.
2756 2005-01-03 Steven G. Kargl <kargls@comcast.net>
2758 * arith.c: Add system.h; remove string.h
2764 * check.c: Remove stdlib.h and stdarg.h
2765 * error.c: Remove stdlib.h, stdarg.h, stdio.h, string.h
2766 * expr.c: Add system.h; remove stdarg.h, stdio.h, and string.h
2767 * f95-lang.c: Add system.h; remove stdio.h
2768 * interface.c: Add system.h; remove stdlib.h and string.h
2769 * intrinsic.c: Remove stdarg.h, stdio.h, and string.h
2770 * io.c: Remove string.h
2772 * match.c: Remove stdarg.h and string.h
2773 * misc.c: Update copyright; add system.h; remove stdlib.h,
2774 string.h, and sys/stat.h
2775 * module.c: Add system.h; remove string.h, stdio.h, errno.h,
2776 unistd.h, and time.h
2777 * option.c: Remove string.h and stdlib.h
2779 * scanner.c: Update copyright; add system.h; remove stdlib.h,
2780 stdio.h, string.h, and strings.h
2781 * symbol.c: Add system.h; remove stdlib.h, stdio.h, and string.h
2782 * trans-array.c: Remove stdio.h and gmp.h
2783 * trans-const.c: Ditto
2784 * trans-expr.c: Ditto
2786 * trans-stmt.c: Ditto
2788 * trans-intrinsic.c: Remove stdio.h and string.h
2790 2004-12-29 Steven G. Kargl <kargls@comcast.net>
2792 * gfortran.h (gfc_case): fix typo in comment.
2794 2004-12-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2796 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Change to
2797 logical shift. Call fold. Remove 0-bit shift shortcut.
2798 (gfc_conv_intrinsic_ishftc): Convert first argument to at least
2799 4 bytes bits. Convert 2nd and 3rd argument to 4 bytes. Convert
2800 result if width(arg 1) < 4 bytes. Call fold.
2803 * trans-intrinsic.c (gfc_conv_intrinsic_mod): Update comment
2804 in front of function to match the standard. Correct handling
2807 2004-12-27 Andrew Pinski <pinskia@physics.uc.edu>
2809 * trans-expr.c (gfc_conv_cst_int_power): Only check for
2810 flag_unsafe_math_optimizations if we have a float type.
2812 2004-12-23 Steven G. Kargl <kargls@comcast.net>
2814 * gfortran.texi: Fix typo.
2816 2004-12-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2818 * trans-intrinsic.c (build_fixbound_expr): Clarify comment, fix
2821 2004-12-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2824 * match.c (gfc_match_if): Don't explicitly skip optional whitespace.
2825 (gfc_match_nullify): Make sure that ')' is in front of the end of
2828 * scanner.c (skip_fixed_comments): Fix typo in comment preceding
2831 2004-12-14 Richard Henderson <rth@redhat.com>
2833 * gfortran.h (gfc_expr.function.name): Make const.
2834 (gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
2835 (gfc_get_string): Update prototype.
2836 * iresolve.c: Include tree.h.
2837 (string_node, HASH_SIZE, string_head, hash): Remove.
2838 (gfc_get_string): Use vsnprintf, get_identifier.
2839 (free_strings, gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
2840 * misc.c (gfc_init_1): Don't call gfc_iresolve_init_1.
2841 (gfc_done_1): Don't call gfc_iresolve_done_1.
2842 * module.c (mio_allocated_string): Take and return const char *,
2843 instead of modifying char**.
2844 (mio_expr): Update to match.
2845 * resolve.c (pure_function): Constify name argument.
2846 (resolve_function): Constify name.
2847 * trans-intrinsic.c (gfc_conv_intrinsic_function): Likewise.
2849 2004-12-12 Richard Henderson <rth@redhat.com>
2851 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
2852 gfc_resolve_cshift, gfc_resolve_dot_product, gfc_resolve_eoshift,
2853 gfc_resolve_matmul, gfc_resolve_maxloc, gfc_resolve_maxval,
2854 gfc_resolve_minloc, gfc_resolve_minval, gfc_resolve_pack,
2855 gfc_resolve_product, gfc_resolve_reshape, gfc_resolve_shape,
2856 gfc_resolve_spread, gfc_resolve_sum, gfc_resolve_transpose,
2857 gfc_resolve_unpack: Use PREFIX.
2859 2004-12-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2862 * match.c (gfc_match_common): Skip whitespace.
2864 2004-12-12 Steven G. Kargl <kargls@comcast.net>
2867 * check.c (gfc_check_iand, gfc_check_ibclr, gfc_check_ibits,
2868 gfc_check_ibset, gfc_check_ieor, gfc_check_ior): Remove default
2869 integer kind check; Issue error for -std=f95 when needed.
2870 * intrinsic.c (add_functions): Change ieor from GFC_STD_GNU to
2872 * iresolve.c (gfc_resolve_iand, gfc_resolve_ieor, gfc_resolve_ior):
2873 Promote arguments to same kind.
2875 2004-12-12 Steven G. Kargl <kargls@comcast.net>
2876 Paul Brook <paul@codesourcery.com>
2879 * resolve.c (gfc_resolve_iterator_expr): New function.
2880 (gfc_resolve_iterator): Use it. Add real_ok argument. Convert
2881 start, end and stride to correct type.
2882 (resolve_code): Pass extra argument.
2883 * array.c (resolve_array_list): Pass extra argument.
2884 * gfortran.h (gfc_resolve): Add prototype.
2885 * trans-stmt.c (gfc_trans_do): Remove redundant type conversions.
2886 Handle real type iterators.
2888 2004-12-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2891 * iresolve.c (gfc_resolve_scale): Convert 'I' argument if not of
2892 same kind as C's 'int'.
2893 (gfc_resolve_set_exponent): Convert 'I' argument if not of kind 4.
2895 2004-12-08 Richard Henderson <rth@redhat.com>
2897 * intrinsic.c (gfc_convert_type_warn): Propagate the input shape
2898 to the output expression.
2899 * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift): Suppress
2901 (gfc_resolve_reshape): Force convert SHAPE and ORDER parameters
2904 2004-12-08 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2907 * resolve.c (resolve_code): Impose correct restrictions on
2910 * decl.c (gfc_match_end): Use locus of END when eos is an error.
2912 2004-12-02 Steven G. Kargl <kargls@comcast.net>
2913 Paul Brook <paul@codesourcery.com>
2915 * check.c (gfc_check_flush, gfc_check_fnum): New functions.
2916 (gfc_check_fstat, gfc_check_fstat_sub): New functions.
2917 (gfc_check_stat, gfc_check_stat_sub): New functions.
2918 * gfortran.h (GFC_ISYM_FNUM,GFC_ISYM_FSTAT,GFC_ISYM_STAT): New symbols
2919 * intrinsic.c (add_functions,add_subroutines): Add flush, fnum,
2920 fstat, and stat to intrinsics symbol tables.
2921 * intrinsic.h (gfc_check_flush, gfc_resolve_stat_sub): Add prototypes.
2922 (gfc_resolve_fstat_sub, gfc_resolve_stat): Ditto.
2923 * iresolve.c (gfc_resolve_fnum, gfc_resolve_fstat): New functions.
2924 (gfc_resolve_stat, gfc_resolve_flush): New functions.
2925 (gfc_resolve_stat_sub,gfc_resolve_fstat_sub): New functions
2926 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add new intrinsics.
2928 2004-12-02 Steven G. Kargl <kargls@comcast.net>
2930 * intrinsic.c: Fix and add comments, fix function declarations
2931 (OPTIONAL,REQUIRED): New symbols
2932 (add_functions,add_subroutines): Use symbols
2933 (gmp.h): Remove unused include
2935 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
2937 * f95-lang.c, gfortranspec.c, trans-decl.c: Avoid ` as left quote
2940 2004-11-24 Steven Bosscher <stevenb@suse.de>
2942 * options.c (gfc_post_options): Don't clear flag_inline_functions.
2944 2004-11-20 Steven G. Kargl <kargls@comcast.net>
2946 * check.c (gfc_check_getcwd_sub): Fix seg fault.
2948 * check.c (gfc_check_exit,gfc_check_umask,gfc_check_umask_sub,
2949 gfc_check_unlink,gfc_check_unlink_sub): New functions
2950 * gfortran.h (GFC_ISYM_UMASK,GFC_ISYM_UNLINK): New symbols
2951 * intrinsic.c (add_functions,add_subroutines): Add umask, unlink,
2952 exit to intrinsics symbol tables.
2953 * intrinsic.h (gfc_check_umask,gfc_check_unlink,gfc_check_exit,
2954 gfc_check_umask_sub,gfc_check_unlink_sub,gfc_resolve_umask,
2955 gfc_resolve_unlink,gfc_resolve_exit,gfc_resolve_umask_sub,
2956 gfc_resolve_unlink_sub): Add and sort prototypes.
2957 * iresolve.c (gfc_resolve_umask,gfc_resolve_unlink,gfc_resolve_exit,
2958 gfc_resolve_umask_sub,gfc_resolve_unlink_sub): New functions
2959 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbols
2961 2004-11-16 Paul Brook <paul@codesourcery.com>
2964 * trans-array.c (gfc_trans_allocate_temp_array): Use gfc_get_dtype.
2965 (gfc_array_init_size, gfc_conv_expr_descriptor): Ditto.
2966 * trans-types.c (gfc_get_dtype): Accept array type rather than element
2968 (gfc_get_nodesc_array_type): Don't set GFC_TYPE_ARRAY_DTYPE.
2969 (gfc_get_array_type_bounds): Ditto.
2970 (gfc_get_derived_type): Recurse into derived type pointers.
2971 * trans-types.h (gfc_get_dtype): Add prototype.
2972 * trans.h (GFC_TYPE_ARRAY_DTYPE): Add comment.
2974 2004-11-15 Paul Brook <paul@codesourcery.com>
2976 * trans-types.c (gfc_get_dtype): Remove obsolete TODO.
2978 2004-11-10 Paul Brook <paul@codesourcery.com>
2981 * trans-expr.c (gfc_trans_subarray_assign): Free shape before ss.
2982 * trans-io.c (transfer_array_component): Ditto.
2984 2004-11-10 Paul Brook <paul@codesourcery.com>
2986 * invoke.texi: Fix typo.
2988 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
2990 * arith.c, array.c, decl.c, expr.c, f95-lang.c, gfortran.h,
2991 gfortranspec.c, interface.c, intrinsic.c, iresolve.c, match.c,
2992 module.c, parse.c, parse.h, primary.c, resolve.c, scanner.c,
2993 trans-array.c, trans-array.h, trans-expr.c, trans-intrinsic.c,
2994 trans-io.c, trans-stmt.c, trans.h: Fix comment formatting.
2996 2004-11-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2999 * io.c (resolve_tag): Tighten up exception for assigned FORMAT.
3001 2004-11-06 Kazu Hirata <kazu@cs.umass.edu>
3003 * gfortranspec.c: Replace GNU CC with GCC.
3005 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3007 * gfortranspec.c (lang_specific_driver): Change year to 2004.
3009 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3012 * trans-decl.c (create_function_arglist): Set DECL_ARTIFICIAL for
3015 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3018 * trans-decl.c (gfc_finish_var_decl): Don't declare arguments to
3019 module procedures as if they were module variables.
3021 2004-11-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3026 * module.c (write_symbol1): Set module_name for dummy arguments.
3028 2004-11-02 Paul Brook <paul@codesourcery.com>
3030 * intrinsic.c (check_intrinsic_standard): Include error locus.
3032 (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Pass
3033 locus to check_intrinsic_standard.
3035 2004-10-31 Janne Blomqvist <jblomqvi@cc.hut.fi>
3038 * gfortran.h: Change GFC_STD_* flags to more appropriate
3039 ones. (struct gfc_intrinsic_isym): Add field for standard. (struct
3040 gfc_option_t): Add field for warning about use of nonstandard
3042 * intrinsic.c (add_sym): Add parameter for standard version, check
3043 this against current standard.
3044 (add_sym_0): Pass standard parameter to add_sym.
3045 (add_sym_1, add_sym_0s, add_sym_1s, add_sym_1m, add_sym_2): Ditto.
3046 (add_sym_2s, add_sym_3, add_sym_3ml, add_sym_3red, add_sym_3s): Ditto.
3047 (add_sym_4, add_sym_4s, add_sym_5, add_sym_5s): Ditto.
3048 (make_generic): Add parameter for standard, check this
3049 against currently selected standard.
3050 (add_functions, add_subroutines): Add parameter to tell which
3051 standard an intrinsic belongs to.
3052 (check_intrinsic_standard): New function.
3053 (gfc_intrinsic_func_interface): Add call to check_intrinsic_standard.
3054 (gfc_intrinsic_sub_interface): Ditto.
3055 * lang.opt: Add Wnonstd-intrinsics option.
3056 * options.c (gfc_init_options): Change to use new GFC_STD_* flags,
3058 (set_Wall): Add warning about nonstd intrinsics.
3059 (gfc_handle_option): Change to use new GFC_STD_* flags,
3061 * invoke.texi: Update manual to include -Wnonstd-intrinsics.
3063 2004-10-30 Andrew Pinski <pinskia@physics.uc.edu>
3065 * f95-lang.c (lang_tree_node): Add chain_next to be the TREE_CHAIN.
3067 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3069 * simplify.c (twos_complement): Calculate mask in GMP arithmetic.
3071 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3073 * trans.c (gfc_trans_code): Set global locus after recursing. Fix
3076 2004-10-30 Canqun Yang <canqun@nudt.edu.cn>
3078 * check.c (gfc_check_rand): Allow missing optional argument.
3079 (gfc_check_irand): Ditto.
3080 * intrinsic.c (add_functions): Set arg optional flag for {i,}rand.
3082 2004-10-28 Scott Robert Ladd <scott.ladd@coyotegulch.com>
3084 PR fortran/13490, PR fortran/17912
3085 * gcc/fortran/gfortran.h: Added pedantic_min_int to gfc_integer_info
3086 * gcc/fortran/gfortran.h: Added ARITH_ASYMMETRIC to arith
3087 * gcc/fortran/arith.c: Added support for an "asymmetric integer"
3088 warning when compiling with pedantic.
3089 * gcc/fortran/arith.c: Set minimum integer values to reflect
3090 realities of two's complement signed integers. Added
3093 2004-10-17 Andrew Pinski <pinskia@physics.uc.edu>
3095 * Make-lang.in (F95_ADDITIONAL_OBJS): Kill.
3096 (f951): Do not depend on F95_ADDITIONAL_OBJS and don't
3099 2004-10-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3101 * trans-decl.c (generate_local_decl): Simplify logic, fix comment
3103 (gfc_generate_function_code): Fix formatting issue.
3105 2004-10-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3107 * module.c: Fix formatting issues.
3109 2004-10-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3111 * module.c (mio_interface_rest): Set where member of interface
3114 2004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
3117 * options.c (gfc_handle_option): Add break after handing the
3120 2004-10-08 Tobias Schlueter <tobias.shclueter@physik.uni-muenchen.de>
3122 * arith.c: Fix formatting issues.
3124 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3127 * resolve.c (resolve_operator): Use correct operator name in message.
3129 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3131 * primary.c (match_boz_constant): Allow kind parameter suffixes.
3132 Move standard warning further to the front.
3134 2004-10-07 Kazu Hirata <kazu@cs.umass.edu>
3136 * trans-stmt.c: Fix a comment typo.
3138 2004-10-07 Paul Brook <paul@codesourcery.com>
3141 * trans-array.c (gfc_trans_deferred_array): Leave use associated
3144 2004-10-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3147 * simplify.c (twos_complement): New function.
3148 (gfc_simplify_ishft, gfc_simplify_ishftc): Revise.
3150 * simplify.c (gfc_simplify_abs): Use mpfr_hypot for CABS.
3152 2004-10-06 Paul Brook <paul@codesourcery.com>
3154 * trans-stmt.c (gfc_trans_simple_do): New function.
3155 (gfc_trans_do): Use it. Evaluate iteration bounds before entering
3156 loop. Update comments.
3158 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3161 * iresolve.c (gfc_resolve_pack): Choose function depending if mask
3165 * intrinsic.c (add_sym_5): Remove.
3166 (add_subroutines): Add resolution function for MVBITS.
3167 * intrinsic.h (gfc_resolve_mvbits): Declare resolution function for
3169 * iresolve.c (gfc_resolve_mvbits): New function.
3170 (gfc_resolve_random_number): Remove empty line at end of function.
3172 * trans-const.c (gfc_build_cstring_const): New function.
3173 (gfc_init_cst): Use new function.
3174 * trans-const.h (gfc_build_cstring_const): Add prototype.
3175 * trans-io.c (set_string, set_error_locus): Use new function.
3176 * trans-stmt.c (gfc_trans_goto): Use new function.
3179 * parse.c (accept_statement): Don't treat END DO like END IF and
3181 (parse_do_block): Generate possible END DO label inside END DO
3185 * check.c (gfc_check_system_sub): New function.
3186 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SYSTEM.
3187 * intrinsic.c (add_functions): Add 'system'.
3188 (add_subroutines): Add 'system'.
3189 * intrinsic.h (gfc_check_etime_sub, gfc_check_getcwd_sub):
3190 Move prototypes to other suborutines.
3191 (gfc_check_system_sub, gfc_resolve_system, gfc_resolve_system_sub):
3193 (gfc_resolve_system_clock): Fix formatting of prototype.
3194 * iresolve.c (gfc_resolve_system, gfc_resolve_system_sub): New
3196 * trans-intrinsic.c (gfc_conv_intrinsic_function): Deal with
3199 2004-10-04 Erik Schnetter <schnetter@aei.mpg.de>
3201 * scanner.c (preprocessor_line): Accept preprocessor lines without
3202 file names. Check file names for closing quotes. Handle escaped
3203 quotes in file names.
3205 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3206 Paul Brook <paul@codesourcery.com>
3208 * trans-array.c (gfc_conv_expr_descriptor): Check for substriungs.
3209 Use gfc_get_expr_charlen.
3210 * trans-expr.c (gfc_get_expr_charlen): New function.
3211 * trans.h (gfc_get_expr_charlen): Add prototype.
3213 2004-10-04 Kazu Hirata <kazu@cs.umass.edu>
3215 * trans-intrinsic.c: Fix a comment typo.
3217 2004-10-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3219 * simplify.c (range_check): Remove blank line at beginning of function.
3220 (gfc_simplify_dint): Same at end of function.
3221 (gfc_simplify_exponent, gfc_simplify_fraction): Simplify calculations.
3222 (gfc_simplify_bound): Fix indentation.
3223 (gfc_simplify_log10): Simplify calculation.
3224 (gfc_simplify_min, gfc_simplify_max): Remove blank line at beginning
3226 (gfc_simplify_nearest): Same at end of function.
3227 (gfc_simplify_nint, gfc_simplify_idnint): Same at beginning of
3229 (gfc_simplify_rrspacing, gfc_simplify_set_exponent,
3230 gfc_simplify_spacing): Simplify calulations.
3232 2004-10-03 Feng Wang <fengwang@nudt.edu.cn>
3234 * trans-intrinsic.c: Fix comments on spacing and rrspacing
3235 (gfc_conv_intrinsic_rrspacing): Add fold on constant trees.
3237 2004-10-01 Jan Hubicka <jh@suse.cz>
3239 * f95-lang.c (gfc_expand_function): Update call of
3240 tree_rest_of_compilation.
3241 * trans-decl.c (gfc_generate_constructors): Likewise.
3243 2004-09-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3245 * trans-intrinsic.c: Comment fixes.
3247 2004-09-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3249 * decl.c (add_init_expr_to_sym, variable_decl): Comment fixes.
3251 2004-09-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3253 * trans-types.c (gfc_return_by_reference): Remove superfluous
3256 * intrinsic.h (gfc_resolve_getcwd): Update prototype.
3257 * iresolve.c (gfc_resolve_getcwd): Add second argument to function.
3260 * trans-expr.c (gfc_trans_arrayfunc_assign): Look at resolved
3261 function to determine return type.
3263 2004-09-20 Jan Hubicka <jh@suse.cz>
3265 * trans-decl.c (build_entry_thunks): Finalize the function; do not lower
3267 (gfc_generate_function_code): Likewise.
3269 2004-09-20 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3272 * simplify.c (gfc_simplify_reshape): Set shape of return value
3275 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
3276 Zack Weinberg <zack@codesourcery.com>
3278 * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class
3279 enumeration constants.
3281 2004-09-17 Paul Brook <paul@codesourcery.com>
3283 * gfortran.h (struct gfc_linebuf): Don't use C99 empty arrays.
3284 (gfc_linebuf_header_size): Define.
3285 * scanner.c (load_file): Use it.
3287 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
3289 * array.c, data.c, decl.c, dependency.c, error.c, f95-lang.c,
3290 interface.c, intrinsic.c, io.c, misc.c, module.c, parse.h,
3291 resolve.c, scanner.c, trans-array.c, trans-array.h,
3292 trans-common.c, trans-const.h, trans-decl.c, trans-expr.c,
3293 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
3294 trans.h: Fix comment typos. Follow spelling conventions.
3296 2004-09-16 Victor Leikehman <lei@il.ibm.com>
3299 * trans-io.c (transfer_array_component): New function.
3300 (transfer_expr): For array fields, call transfer_array_component.
3302 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
3304 * gfortran.texi: Fix a typo.
3306 2004-09-15 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
3308 * parse.c (eof_buf): Rename eof to eof_buf.
3309 (unexpected_eof): Same.
3310 (gfc_parse_file): Same.
3312 2004-09-15 Steven G. Kargl <kargls@comcast.net>
3314 * check.c (gfc_check_getcwd_sub): New function.
3315 * gfortran.h (GFC_ISYM_GETCWD): New symbol.
3316 * intrinsic.c (add_functions): Add function definition;
3318 * intrinsic.c (add_subroutines): Add subroutine definitions.
3319 * intrinsic.h: Add prototypes.
3320 * iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub):
3322 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol.
3324 2004-09-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3327 * module.c (write_symbol): Don't fill in module name here.
3328 (write_symbol0): Fill in here instead.
3330 2004-09-14 Kazu Hirata <kazu@cs.umass.edu>
3332 * data.c, decl.c, f95-lang.c, gfortran.h, match.c,
3333 trans-array.c, trans-common.c, trans-expr.c,
3334 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.h: Fix
3335 comment typos. Follow spelling conventions.
3337 2004-09-09 Paul Brook <paul@codesourcery.com>
3339 * scanner.c (get_file): Add ATTRIBUTE_UNUSED.
3341 2004-09-08 Paul Brook <paul@codesourcery.com>
3343 * array.c: Don't include assert.h.
3344 * data.c: Don't include assert.h. Replace assert and abort with
3345 gcc_assert and gcc_unreachable.
3346 * dependency.c: Ditto.
3347 * f95-lang.c: Ditto.
3348 * iresolve.c: Ditto.
3350 * simplify.c: Ditto.
3352 * trans-array.c: Ditto.
3353 * trans-common.c: Ditto.
3354 * trans-const.c: Ditto.
3355 * trans-decl.c: Ditto.
3356 * trans-expr.c: Ditto.
3357 * trans-intrinsic.c: Ditto.
3358 * trans-io.c: Ditto.
3359 * trans-stmt.c: Ditto.
3360 * trans-types.c: Ditto.
3363 2004-09-07 Per Bothner <per@bothner.com>
3364 Paul Brook <paul@codesourcery.com>
3366 * error.c (show_locus): Handle mapped locations.
3367 * f95-lang.c (gfc_be_parse_file): Initialize mapped locations.
3368 * gfortran.h: Include input.h.
3369 (struct gfc_linebuf): Use source_location.
3370 * scanner.c (get_file): Initialize linemap.
3371 (preprocessor_line): Pass extra argument to get_file.
3372 (load_file): Ditto. Setup linemap.
3373 (gfc_new_file): Handle mapped locations.
3374 * trans-common.c (build_field, build_equiv_decl, build_common_decl):
3375 Set decl source locations.
3376 (gfc_trans_common): Set blank common block location.
3377 * trans-decl.c (gfc_set_decl_location): New function.
3378 (gfc_get_label_decl, gfc_get_symbol_decl): Use it.
3379 (trans_function_start): Move call to gfc_set_backend_locus..
3380 (build_function_decl): ... to here.
3381 (build_entry_thunks): Set and restore the backend locus.
3382 (gfc_generate_constructors): Remove excess arguments to
3383 init_function_start.
3384 (gfc_generate_block_data): Add comments. Set the decl locus.
3385 * trans-io.c (set_error_locus): Handle mapped locations.
3386 * trans.c (gfc_get_backend_locus, gfc_get_backend_locus): Ditto.
3387 (gfc_trans_code): Use SET_EXPR_LOCATION.
3388 (gfc_generate_code): Override the location of the new symbol.
3389 * trans.h (gfc_set_decl_location): Add prototype.
3391 2004-08-31 Paul Brook <paul@codesourcery.com>
3393 * trans-types.c (gfc_type_for_mode): Return NULL for unknown modes.
3395 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3398 * trans-intrinsic.c (gfc_conv_intrinsic_merge): Do the right thing for
3401 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3406 * resolve.c (resolve_transfer): New function.
3407 (resolve_code): Call resolve_transfer in case of EXEC_TRANSFER.
3409 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3412 * trans-types.c (gfc_init_types): Make gfc_character1_type_node an
3415 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3417 * CONTRIB, NEWS, README, TODO: Remove obsolete files.
3419 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3422 * trans-types.c (gfc_return_by_reference): Remove TODO error,
3423 add comment pointing out possible issue WRT compatibility with g77.
3425 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3427 * trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace
3428 all occurences of 'gfc_strlen_type_node' by
3429 'gfc_charlen_type_node'.
3430 * trans-types.h: Same. Also update comment accordingly.
3432 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3434 * primary.c: Update copyright boilerplate to say GCC.
3435 * f95-lang.c: Change initial comment to say gfortran.
3437 2004-08-31 Paul Brook <paul@codesourcery.com>
3439 * trans-types.h: Add comments.
3440 (intmax_type_node, string_type_node, const_string_type_node): Remove.
3442 2004-08-30 Richard Henderson <rth@redhat.com>
3444 * Make-lang.in (fortran/f95-lang.o): Update dependencies.
3445 (fortran/trans-decl.o, fortran/trans-types.o): Likewise.
3446 * gfortran.h (gfc_integer_info): Add c_char, c_short, c_int,
3447 c_long, c_long_long.
3448 (gfc_logical_info): Add c_bool.
3449 (gfc_real_info): Add mode_precision, c_float, c_double, c_long_double.
3450 * trans-array.c (gfc_array_allocate): Use TYPE_PRECISION
3451 rather than gfc_int[48]_type_node for allocate choice.
3452 * trans-decl.c (gfc_build_intrinsic_function_decls): Cache
3453 local copies of some kind type nodes.
3454 (gfc_build_builtin_function_decls): Likewise.
3455 * trans-expr.c (gfc_conv_power_op): Likewise.
3456 * trans-intrinsic.c (gfc_conv_intrinsic_index,
3457 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify,
3458 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Likewise.
3459 * trans-stmt.c (gfc_trans_pause, gfc_trans_stop,
3460 gfc_trans_character_select, gfc_trans_allocate): Likewise.
3461 * trans-io.c (gfc_pint4_type_node): Move into ...
3462 (gfc_build_io_library_fndecls): ... here. Cache local copies of
3463 some kind type nodes.
3464 * trans-types.c (gfc_type_nodes): Remove.
3465 (gfc_character1_type_node, gfc_strlen_type_node): New.
3466 (gfc_integer_types, gfc_logical_types): New.
3467 (gfc_real_types, gfc_complex_types): New.
3468 (gfc_init_kinds): Fill in real mode_precision.
3469 (gfc_build_int_type, gfc_build_real_type): New.
3470 (gfc_build_complex_type, gfc_build_logical_type): New.
3471 (c_size_t_size): New.
3472 (gfc_init_types): Loop over kinds.
3473 (gfc_get_int_type, gfc_get_real_type): Use gfc_validate_kind.
3474 (gfc_get_complex_type, gfc_get_logical_type): Likewise.
3475 (gfc_get_character_type_len): Likewise.
3476 (gfc_type_for_size): Loop over kinds; use a reduced set of
3477 unsigned type nodes.
3478 (gfc_type_for_mode): Loop over kinds.
3479 (gfc_signed_or_unsigned_type): Use gfc_type_for_size.
3480 (gfc_unsigned_type, gfc_signed_type): Use gfc_signed_or_unsigned_type.
3481 * trans-types.h (F95_INT1_TYPE, F95_INT2_TYPE, F95_INT4_TYPE,
3482 F95_INT8_TYPE, F95_INT16_TYPE, F95_REAL4_TYPE, F95_REAL8_TYPE,
3483 F95_REAl16_TYPE, F95_COMPLEX4_TYPE, F95_COMPLEX8_TYPE,
3484 F95_COMPLEX16_TYPE, F95_LOGICAL1_TYPE, F95_LOGICAL2_TYPE,
3485 F95_LOGICAL4_TYPE, F95_LOGICAL8_TYPE, F95_LOGICAL16_TYPE,
3486 F95_CHARACTER1_TYPE, NUM_F95_TYPES, gfc_type_nodes,
3487 gfc_int1_type_node, gfc_int2_type_node, gfc_int4_type_node,
3488 gfc_int8_type_node, gfc_int16_type_node, gfc_real4_type_node,
3489 gfc_real8_type_node, gfc_real16_type_node, gfc_complex4_type_node,
3490 gfc_complex8_type_node, gfc_complex16_type_node,
3491 gfc_logical1_type_node, gfc_logical2_type_node,
3492 gfc_logical4_type_node, gfc_logical8_type_node,
3493 gfc_logical16_type_node, gfc_strlen_kind): Remove.
3494 (gfc_character1_type_node): Turn in to a variable.
3495 (gfc_strlen_type_node): Likewise.
3497 2004-08-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3499 * gfortran.h (gfc_namespace): Add new field is_block_data.
3500 * parse.c (accept_statement): Remove special handling for BLOCK DATA.
3501 (parse_block_data): Record BLOCK DATA name, set is_block_data field.
3502 * trans.c (gfc_generate_code): Handle BLOCK DATA units.
3503 * trans.h (gfc_generate_block_data): Add prototype.
3504 * trans-decl.c (gfc_generate_block_data): New function.
3506 2004-08-29 Richard Henderson <rth@redhat.com>
3508 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_export.
3509 * trans-types.c (gfc_init_kinds): Reject integer kinds larger
3510 than two HOST_WIDE_INT.
3512 2004-08-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3515 * decl.c (free_variable, free_value, gfc_free_data, var_list,
3516 var_element, top_var_list, match_data_constant, top_val_list,
3517 gfc_match_data): Move here from match.c.
3518 (match_old_style_init): New function.
3519 (variable_decl): Match old-style initialization.
3520 * expr.c (gfc_get_variable_expr): New function.
3521 * gfortran.h (gfc_get_variable_expr): Add prototype.
3522 * gfortran.texi: Start documentation for supported extensions.
3523 * match.c: Remove the functions moved to decl.c.
3524 * match.h (gfc_match_data): Move prototype to under decl.c.
3525 * symbol.c (gfc_find_sym_tree, gfc_find_symbol): Add/correct
3528 2004-08-29 Steven G. Kargl <kargls@comcast.net>
3529 Paul Brook <paul@codesourcery.com>
3531 * check.c (gfc_check_besn, gfc_check_g77_math1): New functions.
3532 * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Define.
3533 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
3534 (build_builtin_fntypes): New function.
3535 (gfc_init_builtin_functions): Use it.
3536 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_{J,Y}{0,1,N}
3537 and GFC_ISYM_ERF{,C}.
3538 (gfc_c_int_kind): Declare.
3539 * intrinsic.c (add_functions): Add [d]bes* and [d]erf*.
3540 * intrinsic.h (gfc_check_besn, gfc_check_g77_math1, gfc_resolve_besn,
3541 gfc_resolve_g77_math1): Add prototypes.
3542 * resolve.c (gfc_resolve_besn, gfc_resolve_g77_math1): New functions.
3543 * mathbuiltins.def: Add comment. Change third argument. Use
3544 DEFINE_MATH_BUILTIN_C. Add bessel and error functions.
3545 * trans-intrinsic.c (BUILT_IN_FUNCTION): Define.
3546 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
3547 * trans-types.c (gfc_c_int_kind): Declare.
3548 (gfc_init_kinds): Set it.
3550 2004-08-29 Steven G. Kargl <kargls@comcast.net>
3551 Paul Brook <paul@codesourcery.com>
3553 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
3554 (gfc_check_f, gfc_simplify_f): Add f0.
3555 * intrinsic.c (do_check): Call f0. Flatten.
3556 (add_sym_0): Fix prototype. Set f0.
3557 (add_functions): Add getgid, getgid and getuid.
3558 (resolve_intrinsic): Remove obsolete comment.
3559 (do_simplify): Call f0.
3560 * intrinsic.h (gfc_resolve_getgid, gfc_resolve_getpid,
3561 gfc_resolve_getuid): Add prototypes.
3562 * iresolve.c (gfc_resolve_getgid, gfc_resolve_getpid,
3563 gfc_resolve_getuid): New functions.
3564 * trans-intrinsic.c (gfc_conv_intrinsic_function): Handle
3567 2004-08-28 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3569 * error.c (gfc_error_init_1): Remove blank line in front of
3570 function body. Add missing blank.
3571 (gfc_buffer_error, error_char, error_string): Remove blank line in
3572 front of function body.
3573 (show_locus): Add comma in comment.
3574 (gfc_clear_warning, gfc_warning_check, gfc_clear_error,
3575 gfc_push_error, gfc_pop_error): Remove blank line in front of
3577 (gfc_get_errors): Typo fix in comment in front of function. Remove
3578 blank line in front of function body.
3580 2004-08-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3582 * gfortran.h (gfc_default_*_kind): Remove prototypes, add extern
3583 variable declaration of same name.
3584 * arith.c, check.c, decl.c, dump_parse_tree.c, expr.c,
3585 intrinsic.c, io.c, iresolve.c, match.c, options.c, primary.c,
3586 resolve.c, simplify.c, symbol.c, trans-const.c, trans-io.c:
3587 Replace all calls to gfc_default_*_kind with variable accesses.
3588 * trans-types.c: Same as above.
3589 (gfc_default_*_kind_1): Rename to gfc_default_*_kind, remove
3590 static qualifier. Replace all occurences.
3591 (gfc_default_*_kind): Remove functions.
3593 2004-08-26 Richard Henderson <rth@redhat.com>
3595 * arith.c: Include system.h, not real system headers.
3596 (MPZ_NULL, MPF_NULL, DEF_GFC_INTEGER_KIND, DEF_GFC_LOGICAL_KIND,
3597 DEF_GFC_REAL_KIND, GFC_SP_KIND, GFC_SP_PREC, GFC_SP_EMIN, GFC_SP_EMAX,
3598 GFC_DP_KIND, GFC_DP_PREC, GFC_DP_EMIN, GFC_DP_EMAX, GFC_QP_KIND,
3599 GFC_QP_PREC, GFC_QP_EMIN, GFC_QP_EMAX): Remove.
3600 (gfc_integer_kinds, gfc_logical_kinds, gfc_real_kinds,
3601 gfc_index_integer_kind, gfc_default_integer_kind,
3602 gfc_default_real_kind,gfc_default_double_kind,
3603 gfc_default_character_kind, gfc_default_logical_kind,
3604 gfc_default_complex_kind, validate_integer, validate_real,
3605 validate_logical, validate_character,
3606 gfc_validate_kind): Move to trans-types.c.
3607 (gfc_set_model_kind): Use gfc_validate_kind.
3608 (gfc_set_model): Just copy the current precision to default.
3609 (gfc_arith_init_1): Use mpfr precision 128 for integer setup.
3610 * f95-lang.c (gfc_init_decl_processing): Invoke gfc_init_kinds.
3611 * gfortran.h: Update file commentary.
3612 * trans-types.c (MAX_INT_KINDS, MAX_REAL_KINDS): New.
3613 (gfc_default_integer_kind_1, gfc_default_real_kind_1,
3614 gfc_default_double_kind_1, gfc_default_character_kind_1,
3615 gfc_default_logical_kind_1, gfc_default_complex_kind_1): New.
3616 (gfc_init_kinds): New.
3617 (gfc_init_types): Don't set gfc_index_integer_kind here.
3618 * trans-types.h (gfc_init_kinds): Declare.
3619 * doc/invoke.texi: Clarify DOUBLE PRECISION behaviour wrt -r8.
3621 2004-08-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3623 * check.c (gfc_check_atan2): New function.
3624 * intrinsic.c (add_functions): Use gfc_check_atan2 for ATAN2
3625 * intrinsic.h (gfc_check_atan2): Add prototype.
3627 2004-08-25 Richard Henderson <rth@redhat.com>
3629 * arith.c (gfc_validate_kind): Add may_fail argument; abort if
3630 false and we don't validate the kind.
3631 (gfc_check_integer_range, gfc_check_real_range): Update to match.
3632 * check.c (kind_check): Likewise.
3633 * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Likewise.
3634 (match_char_spec, match_logical_spec): Likewise.
3635 * gfortran.h (gfc_validate_kind): Likewise.
3636 * options.c (gfc_handle_option): Likewise.
3637 * primary.c (match_integer_constant, match_real_constant,
3638 match_string_constant, match_logical_constant,
3639 match_const_complex_part): Likewise.
3640 * simplify.c (get_kind, gfc_simplify_bit_size, gfc_simplify_digits,
3641 gfc_simplify_epsilon, gfc_simplify_huge, gfc_simplify_ibclr,
3642 gfc_simplify_ibset, gfc_simplify_ishft, gfc_simplify_ishftc,
3643 gfc_simplify_maxexponent, gfc_simplify_minexponent,
3644 gfc_simplify_nearest, gfc_simplify_not, gfc_simplify_precision,
3645 gfc_simplify_radix, gfc_simplify_range, gfc_simplify_rrspacing,
3646 gfc_simplify_scale, gfc_simplify_spacing, gfc_simplify_tan,
3647 gfc_simplify_tiny): Likewise.
3648 * trans-intrinsic.c (gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod,
3649 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
3650 prepare_arg_info): Likewise.
3652 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3654 * expr.c (gfc_check_assign): Add comment. Add new warning.
3655 * trans-expr.c (gfc_conv_function_call): Correctly dereference
3656 result of pointer valued function when not in pointer assignment.
3658 2004-08-25 Paul Brook <paul@codesourcery.com>
3660 * config-lang.in: Remove dead commented line.
3661 * module.c: Replace g95 with gfortran in comment.
3663 2004-08-25 Paul Brook <paul@codesourcery.com>
3666 * arith.c (gfc_mpfr_to_mpz): Workaround mpfr bug.
3668 2004-08-25 Paul Brook <paul@codesourcery.com>
3671 * trans-array.c (gfc_trans_allocate_temp_array): Remove
3672 string_length argument.
3673 (gfc_trans_array_ctor_element): New function.
3674 (gfc_trans_array_constructor_subarray): Use it.
3675 (gfc_trans_array_constructor_value): Ditto. Handle constant
3677 (get_array_ctor_var_strlen, get_array_ctor_strlen): New functions.
3678 (gfc_trans_array_constructor): Use them.
3679 (gfc_add_loop_ss_code): Update to new gfc_ss layout.
3680 (gfc_conv_ss_descriptor): Remember section string length.
3681 (gfc_conv_scalarized_array_ref): Ditto. Remove dead code.
3682 (gfc_conv_resolve_dependencies): Update to new gfc_ss layout.
3683 (gfc_conv_expr_descriptor): Ditto.
3684 (gfc_conv_loop_setup): Ditto. Spelling fixes.
3685 * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
3686 * trans-const.c (gfc_conv_constant): Update to new gfc_ss layout.
3687 * trans-expr.c (gfc_conv_component_ref): Turn error into ICE.
3688 (gfc_conv_variable): Set string_length from section.
3689 (gfc_conv_function_call): Remove extra argument.
3690 (gfc_conv_expr, gfc_conv_expr_reference): Update to new gfc_ss layout.
3691 * trans-types.c (gfc_get_character_type_len): New function.
3692 (gfc_get_character_type): Use it.
3693 (gfc_get_dtype): Return zero for internal types.
3694 * trans-types.h (gfc_get_character_type_len): Add prototype.
3695 * trans.h (struct gfc_ss): Move string_length out of union.
3697 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3699 * trans.h (build2_v, build3_v): New macros.
3701 * f95-lang.c (gfc_truthvalue_conversion): Use build2 instead of
3703 * trans-array.c (gfc_conv_descriptor_data,
3704 gfc_conv_descriptor_offset, gfc_conv_descriptor_dimension,
3705 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
3706 gfc_conv_descriptor_ubound, gfc_trans_allocate_array_storage,
3707 gfc_trans_allocate_temp_array,
3708 gfc_trans_array_constructor_subarray,
3709 gfc_trans_array_constructor_value, gfc_conv_array_index_ref,
3710 gfc_trans_array_bound_check, gfc_conv_array_index_offset,
3711 gfc_conv_scalarized_array_ref, gfc_conv_array_ref,
3712 gfc_conv_array_ref, gfc_trans_preloop_setup,
3713 gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
3714 gfc_conv_loop_setup, gfc_array_init_size,
3715 gfc_conv_array_initializer, gfc_trans_array_bounds,
3716 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
3717 gfc_conv_expr_descriptor, gfc_conv_array_parameter,
3718 gfc_trans_deferred_array): Use buildN and buildN_v macros instead
3719 of build and build_v as appropriate.
3720 * trans-common.c (create_common): Same.
3721 * trans-decl.c (gfc_trans_auto_character_variable,
3722 gfc_trans_entry_master_switch, gfc_generate_function_code): Same.
3723 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
3724 gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
3725 gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
3726 gfc_conv_expr_op, gfc_conv_function_call,
3727 gfc_trans_structure_assign): Same.
3728 * trans-intrinsic.c (build_fixbound_expr, build_round_expr,
3729 gfc_conv_intrinsic_aint, gfc_conv_intrinsic_bound,
3730 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
3731 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
3732 gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_minmax,
3733 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
3734 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_minmaxloc,
3735 gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
3736 gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_singlebitop,
3737 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
3738 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_strcmp,
3739 gfc_conv_allocated, gfc_conv_associated, prepare_arg_info,
3740 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
3741 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat,
3742 gfc_conv_intrinsic_iargc): Same.
3743 * trans-io.c (set_parameter_value, set_parameter_ref, set_string,
3744 set_flag, add_case, io_result, transfer_namelist_element,
3745 transfer_expr): Same.
3746 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_if_1,
3747 gfc_trans_arithmetic_if, gfc_trans_do, gfc_trans_do_while,
3748 gfc_trans_integer_select, gfc_trans_logical_select,
3749 gfc_trans_character_select, gfc_trans_forall_loop,
3750 gfc_trans_nested_forall_loop, gfc_do_allocate,
3751 generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
3752 compute_inner_temp_size, compute_overall_iter_number,
3753 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
3754 gfc_trans_forall_1, gfc_evaluate_where_mask,
3755 gfc_trans_where_assign, gfc_trans_allocate): Same.
3756 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Same.
3757 * trans.c (gfc_add_modify_expr, gfc_finish_block,
3758 gfc_build_array_ref, gfc_build_function_call,
3759 gfc_trans_runtime_check): Same.
3761 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3763 * trans-const.c (gfc_conv_mpz_to_tree): Change call to
3764 build_int_cst to build_int_cst_wide in accordance to Nathan's
3767 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
3769 * trans-array.c (gfc_trans_array_constructor_value): Adjust
3770 build_int_cst calls.
3771 * trans-const.c (gfc_build_string_const, gfc_init_constants,
3772 gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise.
3773 * trans-decl.c (gfc_get_symbol_decl, build_entry_thunks,
3774 gfc_trans_entry_master_switch): Likewise.
3775 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
3776 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
3777 * trans-io.c (add_case, set_error_locus,
3778 transfer_namelist_element, transfer_expr): Likewise.
3779 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
3780 gfc_trans_stop, gfc_trans_character_select): Likewise.
3781 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
3782 * trans.c (gfc_trans_runtime_check): Likewise.
3784 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3786 * trans-decl.c, trans-types.c: Add and remove blank lines as
3789 2004-08-24 Richard Henderson <rth@redhat.com>
3791 * trans-const.c (gfc_conv_mpz_to_tree): Fix 64-bit shift warning.
3793 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3795 * resolve.c (merge_argument_lists): Revert unintentionally
3798 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3800 * trans-decl.c (build_function_decl): Fix spelling in comment.
3801 (build_entry_thunks): Remove code with no function.
3802 (gfc_build_intrinsic_function_decls): Remove empty line.
3804 * resolve.c (resolve_entries): Fix a bunch of comment typos.
3806 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
3808 * f95-lang.c (gfc_init_decl_processing): Adjust
3809 build_common_tree_nodes call.
3811 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3813 * trans-types.c: Spelling and formatting fixes.
3815 2004-08-23 Richard Henderson <rth@redhat.com>
3817 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_getlimbn instead
3818 of going through an intermediate string. Fix 32/64 int/long bug.
3820 2004-08-23 Eric Christopher <echristo@redhat.com>
3822 * trans-types.c (gfc_type_for_mode): Remove VECTOR_TYPE_SUPPORTED_P
3823 usage. Use build_vector_type_for_mode for vector types.
3825 2004-08-22 Richard Henderson <rth@redhat.com>
3828 * data.c (find_con_by_offset): Search ordered list; handle
3829 elements with repeat counts.
3830 (gfc_assign_data_value_range): New.
3831 * gfortran.h (struct gfc_data_value): Make repeat unsigned.
3832 (gfc_assign_data_value_range): Declare.
3833 * match.c (top_val_list): Extract repeat count into a temporary.
3834 * resolve.c (values): Make left unsigned.
3835 (next_data_value): Don't decrement left.
3836 (check_data_variable): Use gfc_assign_data_value_range.
3838 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3840 * trans-const.c, trans-decl.c, trans-expr.c: Spelling fixes.
3842 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3844 * check.c (gfc_check_reduction): Rename to ...
3845 (check_reduction): ... this. Make static. Don't check type of
3847 (gfc_check_minval_maxval, gfc_check_prodcut_sum): New functions.
3848 * intrinsic.c (add_functions): Change MAXVAL, MINVAL, PRODUCT and
3849 SUM to use new check functions.
3850 (check_specific): Change logic to call new functions.
3851 * intrinsic.h (gfc_check_minval_maxval, gfc_check_product_sum):
3853 (gfc_check_reduction): Remove prototype.
3855 2004-08-20 Paul Brook <paul@codesourcery.com>
3856 Canqun Yang <canqun@nudt.edu.cn>
3859 * trans-array.c (gfc_conv_array_parameter): Pass correct pointer
3860 for automatic arrays.
3861 * trans-types.c (gfc_get_nodesc_array_type): Add comment.
3863 2004-08-19 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3867 * match.c (match_simple_forall, match_simple_where): Forward-declare.
3868 (gfc_match_if): Order statement list alphabetically, add WHERE and
3869 FORALL, remove double PAUSE.
3870 (gfc_match_simple_where, match_forall_header,
3871 gfc_match_simple_forall): New functions.
3872 (gfc_match_forall): Use match_forall_header.
3874 2004-08-19 Paul Brook <paul@codesourcery.com>
3877 * gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0.
3878 * symbol.c (gfc_clear_attr): Use memset.
3880 2004-08-19 Paul Brook <paul@codesourcery.com>
3884 * data.c (assign_substring_data_value): Remove.
3885 (create_character_intializer): New function.
3886 (gfc_assign_data_value): Track the typespec for the current
3887 subobject. Use create_character_intializer.
3889 2004-08-19 Erik Schnetter <schnetter@aei.mpg.de>
3892 * check.c (gfc_check_reduction): New function.
3893 (gfc_check_minval_maxval): Removed.
3894 (gfc_check_product): Removed.
3895 (gfc_check_sum): Removed.
3896 * intrinsic.h: Add/remove declarations for these.
3897 * gfortran.h: Add field f3red to union gfc_check_f.
3898 * intrinsic.c (add_sym_3red): New function.
3899 (add_functions): Register maxval, minval, product, and sum intrinsics
3900 through add_sym_3red.
3901 (check_specific): Handle f3red union field.
3902 * iresolve.c: Whitespace change.
3904 2004-08-18 Paul Brook <paul@codesourcery.com>
3906 * trans-types.c (gfc_sym_type): Use pointer types for optional args.
3908 2004-08-18 Victor Leikehman <lei@il.ibm.com>
3911 * trans-io.c (transfer_namelist_element): New. Recursively handle
3912 derived-type variables. Pass string lengths.
3913 (build_dt): Code moved to build_namelist, with some
3914 changes and additions.
3915 (gfc_build_io_library_fndecls): Declare the fifth
3916 argument in st_set_nml_var_char -- string_length.
3918 2004-08-17 Paul Brook <paul@codesourcery.com>
3919 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3922 * decl.c (get_proc_name): Update mystery comment.
3923 (gfc_match_entry): Check for errors earlier. Add entry point to list.
3924 * dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes.
3925 * gfortran.h (symbol_attribute): Add entry_master. Document entry.
3926 (struct gfc_entry_list): Define.
3927 (gfc_get_entry_list): Define.
3928 (struct gfc_namespace): Add refs and entries.
3929 (enum gfc_exec_op): Add EXEC_ENTRY.
3930 (struct gfc_code): Add ext.entry.
3931 * module.c (ab_attribute, attr_bits): Remove AB_ENTRY.
3932 (mio_symbol_attribute): Don't save/reture addr->entry.
3933 (mio_namespace_ref): Refcount namespaces.
3934 * parse.c (accept_statement): Handle ST_ENTRY.
3935 (gfc_fixup_sibling_symbols): Mark symbol as referenced.
3936 (parse_contained): Fixup sibling references to entry points
3937 after parsing the procedure body.
3938 * resolve.c (resolve_contained_fntype): New function.
3939 (merge_argument_lists, resolve_entries): New functions.
3940 (resolve_contained_functions): Use them.
3941 (resolve_code): Handle EXEC_ENTRY.
3942 (gfc_resolve): Call resolve_entries.
3943 * st.c (gfc_free_statement): Handle EXEC_ENTRY.
3944 * symbol.c (gfc_get_namespace): Refcount namespaces.
3945 (gfc_free_namespace): Ditto.
3946 * trans-array.c (gfc_trans_dummy_array_bias): Treat all args as
3947 optional when multiple entry points are present.
3948 * trans-decl.c (gfc_get_symbol_decl): Remove incorrect check.
3949 (gfc_get_extern_function_decl): Add assertion. Fix coment.
3950 (create_function_arglist, trans_function_start, build_entry_thunks):
3952 (gfc_build_function_decl): Rename ...
3953 (build_function_decl): ... to this.
3954 (gfc_create_function_decl): New function.
3955 (gfc_generate_contained_functions): Use it.
3956 (gfc_trans_entry_master_switch): New function.
3957 (gfc_generate_function_code): Use new functions.
3958 * trans-stmt.c (gfc_trans_entry): New function.
3959 * trans-stmt.h (gfc_trans_entry): Add prototype.
3960 * trans-types.c (gfc_get_function_type): Add entry point argument.
3961 * trans.c (gfc_trans_code): Handle EXEC_ENTRY.
3962 (gfc_generate_module_code): Call gfc_create_function_decl.
3963 * trans.h (gfc_build_function_decl): Remove.
3964 (gfc_create_function_decl): Add prototype.
3966 2004-08-15 Andrew Pinski <apinski@apple.com>
3969 * f95-lang.c (gfc_init_builtin_functions): Initialize the builtins
3970 for cabs{,f} and copysign{,f}.
3971 * trans-decl.c (gfor_fndecl_math_cabsf): Delete.
3972 (gfor_fndecl_math_cabs): Delete.
3973 (gfor_fndecl_math_sign4): Delete.
3974 (gfor_fndecl_math_sign8): Delete.
3975 (gfc_build_intrinsic_function_decls): Remove the
3976 initializing of cabs{,f} and copysign{,f} functions.
3977 * trans-intrinsic.c (gfc_conv_intrinsic_abs): Use the builtins
3978 instead of the functions definitions.
3979 (gfc_conv_intrinsic_sign): Likewise.
3980 * trans.h (gfor_fndecl_math_cabsf): Delete.
3981 (gfor_fndecl_math_cabs): Delete.
3982 (gfor_fndecl_math_sign4): Delete.
3983 (gfor_fndecl_math_sign8): Delete.
3985 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
3987 * trans-array.c (gfc_trans_array_constructor_value): Use
3989 * trans-const.c (gfc_build_string_const,
3990 gfc_init_constants, gfc_conv_mpz_to_tree,
3991 gfc_conv_constant_to_tree): Likewise.
3992 * trans-decl.c (gfc_get_symbol_decl): Likewise.
3993 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
3994 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
3995 * trans-io.c (add_case, set_error_locus, build_dt,
3996 transfer_expr): Likewise.
3997 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
3998 gfc_trans_stop, gfc_trans_character_select): Likewise.
3999 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
4000 * trans.c (gfc_trans_runtime_check): Likewise.
4002 2004-08-14 Paul Brook <paul@codesourcery.com>
4004 * trans-decl.c (gfc_build_function_decl): Remove dead code.
4006 2004-08-14 Paul Brook <paul@codesourcery.com>
4008 * trans-arry.c (gfc_trans_auto_array_allocation): Remove unused var.
4010 2004-08-13 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4012 * gfortran.h: Add comments.
4013 * parse.c (parse_contained): Fix comment typo.
4014 * resolve.c (was_declared): Ditto.
4017 2004-08-11 Paul Brook <paul@codeourcery.com>
4020 * intrinsic.c (add_functions): Add dfloat as an alias for dble.
4022 2004-08-10 Richard Henderson <rth@redhat.com>
4024 * f95-lang.c (gfc_init_builtin_functions): Remove
4025 __builtin_stack_alloc, add __builtin_alloca.
4026 * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR.
4027 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
4029 2004-08-10 Paul Brook <paul@codesourcery.com>
4031 * trans-io.c (transfer_expr): Handle pointters.
4033 2004-08-10 Paul Brook <paul@codesourcery.com>
4036 * trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT.
4037 (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta.
4038 (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary):
4039 Handle GFC_SS_COMPONENT.
4040 (gfc_conv_ss_startstride): Ditto. Set ss->shape.
4041 (gfc_conv_loop_setup): Tweak commends. Remove dead code.
4043 (gfc_conv_array_initializer): Call specific initializer routines.
4044 * trans-expr.c (gfc_trans_structure_assign): New function.
4045 (gfc_trans_subarray_assign): New function.
4046 (gfc_trans_subcomponent_assign): New fucntion
4047 (gfc_conv_structure): Use them.
4048 * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT.
4049 (gfc_ss): Add shape.
4051 2004-08-08 Victor Leikehman <lei@il.ibm.com>
4053 * simplify.c (gfc_simplify_shape): Bugfix.
4054 * expr.c (gfc_copy_shape_excluding): New function.
4055 * gfortran.h (gfc_get_shape): Bugfix.
4056 (gfc_copy_shape_excluding): Added declaration.
4057 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
4058 gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound,
4059 gfc_resolve_ubound, gfc_resolve_transpose): Added compile
4060 time resolution of shape.
4062 2004-08-06 Janne Blomqvist <jblomqvi@cc.hut.fi>
4064 * intrinsic.c (add_subroutines): Add getenv and
4065 get_environment_variable. (add_sym_5s): New function.
4066 * intrinsic.h (gfc_resolve_get_environment_variable): Add
4068 * iresolve.c (gfc_resolve_get_environment_variable): New
4071 2004-08-06 Feng Wang <fengwang@nudt.edu.cn>
4073 * f95-lang.c (gfc_init_builtin_functions): Fix the number of
4074 __builtin_pow[f] arguments.
4076 2004-08-06 Steven G. Kargl <kargls@comcast.net>
4078 * arith.c: Add #define for model numbers. Remove global GMP variables.
4079 (natural_logarithm,common_logarithm,exponential,sine,
4080 cosine,arctangent,hypercos,hypersine ): Remove.
4081 (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions.
4082 (arctangent2,gfc_arith_init_1,gfc_arith_done_1
4083 gfc_check_real_range, gfc_constant_result, gfc_range_check,
4084 gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times,
4085 gfc_arith_divide,complex_reciprocal,complex_pow_ui,
4086 gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real,
4087 gfc_convert_complex,gfc_int2real,gfc_int2complex,
4088 gfc_real2int,gfc_real2real,gfc_real2complex,
4089 gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP
4090 to MPFR, use new functions.
4091 * arith.h: Remove extern global variables.
4092 (natural_logarithm,common_logarithm,exponential, sine, cosine,
4093 arctangent,hypercos,hypersine): Remove prototypes.
4094 (arctangent2): Update prototype from GMP to MPFR.
4095 (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes.
4096 * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR.
4097 * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR.
4098 * gfortran.h (GFC_REAL_BITS): Remove.
4099 (arith): Add ARITH_NAN.
4100 Include mpfr.h. Define GFC_RND_MODE.
4101 Rename GCC_GFORTRAN_H GFC_GFC_H.
4102 (gfc_expr): Convert GMP to MPFR.
4103 * module.c: Add arith.h, correct type in comment.
4104 (mio_gmp_real): Convert GMP to MPFR.
4105 (mio_expr): Use gfc_set_model_kind().
4106 * primary.c: Update copyright date with 2004.
4107 (match_real_constant,match_const_complex_part): Convert GMP to MPFR.
4108 * simplify.c: Remove global GMP variables
4109 (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag,
4110 gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint,
4111 gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan,
4112 gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx,
4113 gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh,
4114 gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon,
4115 gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor,
4116 gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int,
4117 gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log,
4118 gfc_simplify_log10,simplify_min_max,gfc_simplify_mod,
4119 gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint,
4120 gfc_simplify_rrspacing,gfc_simplify_scale,
4121 gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin,
4122 gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt,
4123 gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny,
4124 gfc_simplify_init_1,gfc_simplify_done_1): Convert GMP to MPFR.
4126 * trans-const.c (gfc_conv_mpfr_to_tree): Rename from
4127 gfc_conv_mpf_to_tree. Convert it to use MPFR
4128 (gfc_conv_constant_to_tree): Use it.
4129 * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree().
4130 * trans-intrinsic.c: Add arith.h, remove gmp.h
4131 (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR.
4133 2004-08-06 Victor Leikehman <lei@il.ibm.com>
4134 Paul Brook <paul@codesourcery.com>
4136 * trans-array.c (gfc_trans_allocate_array_storage,
4137 gfc_trans_allocate_temp_array, gfc_add_loop_ss_code,
4138 gfc_conv_loop_setup): For functions, if the shape of the result
4139 is not known in compile-time, generate an empty array descriptor for
4140 the result and let the callee to allocate the memory.
4141 (gfc_trans_dummy_array_bias): Do nothing for pointers.
4142 (gfc_conv_expr_descriptor): Use function return values directly.
4143 * trans-expr.c (gfc_conv_function_call): Always add byref call
4145 (gfc_trans_pointer_assignment): Add comments.
4146 (gfc_trans_arrayfunc_assign): Don't chain on expression.
4148 2004-08-01 Roger Sayle <roger@eyesopen.com>
4150 * options.c (gfc_init_options): Don't warn about the use GNU
4151 extensions by default.
4152 (gfc_post_options): Warn about GNU extensions with -pedantic.
4153 (gfc_handle_option): Don't warn about GNU extensions with -std=gnu.
4155 2004-07-30 Richard Henderson <rth@redhat.com>
4157 * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL
4160 2004-07-25 Richard Henderson <rth@redhat.com>
4162 * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL
4163 and DECL_IGNORED_P on RESULT_DECL.
4164 (gfc_generate_constructors): Likewise.
4166 2004-07-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4169 * lang.opt (ffixed-line-length-none, ffixed-line-length-): New
4171 (ffixed-line-length-80, ffixed-line-length-132): Remove.
4172 * options.c (gfc_handle_options): Deal with changed options.
4173 * scanner.c (load_line): Change second arg to 'char **',
4174 allocate if pointing to NULL. Keep track of buffer's length.
4175 Adapt buffer size to overlong lines. Pad lines to full length
4177 (load_file): Adapt to new interface of load_line.
4179 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
4181 * trans.h (builtin_function): Declare.
4183 2004-07-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4186 (parts ported from g95)
4187 * parse.h (gfc_state_data): New field do_variable.
4188 (gfc_check_do_variable): Add prototype.
4189 * parse.c (push_state): Initialize field 'do_variable'.
4190 (gfc_check_do_variable): New function.
4191 (parse_do_block): Remember do iterator variable.
4192 (parse_file): Initialize field 'do_variable'.
4193 * match.c (gfc_match_assignment, gfc_match_do,
4194 gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate):
4195 Add previously missing checks.
4196 (gfc_match_return): Reformat error message.
4197 * io.c (match_out_tag): New function.
4198 (match_open_element, match_close_element,
4199 match_file_element, match_dt_element): Call match_out_tag
4200 instead of match_vtag where appropriate.
4201 (match_io_iterator, match_io_element): Add missing check.
4202 (match_io): Reformat error message.
4203 (match_inquire_element): Call match_out_tag where appropriate.
4205 * parse.c (gfc_check_do_variable): Fix error locus.
4207 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4210 * trans-decl.c (gfc_build_function_decl): Create a new chardecl
4211 for every assumed length character dummy argument.
4214 * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion.
4217 * simplify.c (gfc_simplify_bound): Copy the bound expression.
4219 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4222 * trans-array.c gfc_trans_g77_array,
4223 gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init
4224 for assumed length characters.
4225 (gfc_conv_expr_descriptor): Set se->string_length if dealing
4226 with a character expression.
4227 (gfc_cvonv_array_parameter): Pass string length when passing
4228 character array according to g77 conventions.
4230 2004-07-12 Paul Brook <paul@codesourcery.com>
4232 * expr.c (gfc_check_assign_symbol): Handle pointer assignments.
4233 * trans-array.c (gfc_trans_auto_array_allocation): Remove
4234 initialization code.
4235 * trans-common.c (create_common): Use gfc_conv_initializer.
4236 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer.
4237 * trans-expr.c (gfc_conv_initializer): New function.
4238 (gfc_conv_structure): Use it.
4239 * trans.h (gfc_conv_initializer): Add prototype.
4241 2004-07-11 Paul Brook <paul@codesourcery.com>
4244 * parse.c (gfc_fixup_sibling_symbols): Also look for untyped
4246 (parse_contained): Mark contained symbols as referenced.
4248 2004-07-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4251 * module.c (gfc_dump_module, gfc_use_module): Print locus
4252 when opening of module file fails.
4255 * io.c (match_io): Flag 'WRITE(...), ...' as extension.
4258 * match.c (gfc_match_program): A program name is obligatory.
4259 (gfc_match_return): RETURN in main program is an extension.
4260 (gfc_match_block_data): A space is required before a block data
4264 * primary.c (match_boz_constant): Call gfc_notify_std only if
4265 we actually have a non-standard boz-literal-constant.
4268 * expr.c (gfc_check_assign): Print ranks if incompatible. Issue
4269 warning if assigning NULL().
4271 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
4273 * f95-lang.c (set_block): Remove.
4274 (gfc_clear_binding_stack): New.
4275 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
4276 (struct binding_level): Remove block_created_by_back_end.
4277 (clear_binding_level): Likewise.
4278 (poplevel): Don't handle block_created_by_back_end.
4280 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4282 * trans-decl.c (gfc_create_module_variable): Nothing to do if
4283 symbol is in common, because we ...
4284 (gfc_generate_module_vars): Call gfc_trans_common.
4286 2004-07-10 Paul Brook <paul@codesourcery.com>
4288 * trans-array.c (gfc_build_null_descriptor): New function.
4289 (gfc_trans_static_array_pointer): Use it.
4290 * trans-array.h (gfc_build_null_descriptor): Add prototype.
4291 * trans-expr.c (gfc_conv_structure): Handle array pointers.
4293 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4296 * decl.c (gfc_match_save): Use-associated common block
4298 * gfortran.h (gfc_common_head): Add new field 'name'.
4299 Fix typo in comment after #endif.
4300 * match.c (gfc_get_common): Add new argument from_common,
4301 mangle name if flag is set, fill in new field in structure
4303 (match_common): Set new arg in call to gfc_get_common,
4304 use-associated common block doesn't collide.
4305 * match.h (gfc_get_common): Adapt prototype.
4306 * module.c (load_commons): Set new arg in call to
4308 * symbol.c (free_common_tree): New function.
4309 (gfc_free_namespace): Call new function.
4310 * trans-common.c (several functions): Remove argument
4311 'name', use name from gfc_common_head instead.
4313 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4315 * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
4316 and RHS match. Return early if the RHS is NULL().
4319 * match.c (match_common): Fix error reporting for used common.
4322 * trans-expr.c (gfc_conv_structure): Handle initialization
4323 of scalar pointer components.
4325 * parse.c (decode_statement): Fix matching of BLOCK DATA.
4327 * trans-decl.c (generate_local_decl): Remove workaround obsoleted
4328 by fix for PR 15481.
4330 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4332 * trans-common.c: Fix whitespace issues, make variable names
4334 (create_common): Additionally, make loop logic more obvious.
4336 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4337 Paul Brook <paul@codesourcery.com>
4340 * trans-common.c (calculate_length): Remove ...
4341 (get_segment_info): Merge into here. Save field type.
4342 (build_field): Use saved type.
4343 (create_common, new_condition, new_segment, finish_equivalences):
4344 Use new get_segment_info.
4345 * trans-types.c: Update comment.
4347 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4350 * moduele.c (mio_symbol): Don't I/O initial values unless
4351 symbol is a parameter.
4353 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4356 * resolve.c (resolve_symbol): Verify that the shape of a
4357 parameter array is not only explicit, but also constant.
4358 * array.c (gfc_is_compile_time_shape): New function.
4359 * gfortran.h (gfc_is_compile_time_shape): Add prototype.
4361 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4367 * module.c (write_symbol, write_symtree): Remove workaround.
4368 * primary.c (match_actual_arglist): Enhance comment.
4369 (gfc_match_rvalue): Handle function call with first argument
4370 a keyword argument correctly.
4371 * resolve.c (resolve_symbol): Change call to
4372 gfc_set_default_type to issue error if no implicit type
4374 * trans-decl.c (gfc_create_module_variable): Remove workaround.
4376 2004-07-08 Paul Brook <paul@codesourcery.com>
4378 * intrinsic.c (add_sym_4s): New function.
4379 (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
4381 2004-07-04 Janne Blomqvist <jblomqvi@cc.hut.fi>
4382 Paul Brook <paul@codesourcery.com>
4386 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
4387 GFC_ISYM_COMMAND_ARGUMENT_COUNT.
4388 * intrinsic.c (add_functions): Identify iargc. Add
4389 command_argument_count.
4390 (add_subroutines): Resolve getarg. Add get_command and
4391 get_command_argument.
4392 * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
4393 gfc_resolve_get_command_argument): Add prototypes.
4394 * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
4395 gfc_resolve_get_command_argument): New functions.
4396 * trans-decl.c (gfor_fndecl_iargc): New variable.
4397 (gfc_build_intrinsic_function_decls): Set it.
4398 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
4399 (gfc_conv_intrinsic_function): Use it.
4400 * trans.h (gfor_fndecl_iargc): Declare.
4402 2004-07-04 Matthias Klose <doko@debian.org>
4404 * Make-lang.in: Generate and install gfortran man page.
4405 * invoke.texi: Remove extra '@c man end'.
4407 2004-07-04 Richard Henderson <rth@redhat.com>
4409 * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
4411 2004-07-04 Paul Brook <paul@codesourcery.com>
4413 * decl.c (gfc_match_implicit_range): Don't use typespec.
4414 (gfc_match_implicit): Handle character selectors.
4415 * gfortran.h (gfc_set_implicit): Remove prototype.
4416 (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
4417 * parse.c (accept_statement): Don't call gfc_set_implicit.
4418 * symbol.c (new_ts): Remove.
4419 (gfc_set_implicit_none): Use same loop bounds as other functions.
4420 (gfc_set_implicit): Remove.
4421 (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
4422 (gfc_merge_new_implicit): Combine with gfc_set_implicit.
4424 2004-06-30 Richard Henderson <rth@redhat.com>
4426 * match.c (var_element): Remove unused variable.
4428 * trans-decl.c (gfc_generate_function_code): Don't set
4429 x_whole_function_mode_p.
4430 (gfc_generate_constructors): Likewise.
4432 2004-06-30 Richard Henderson <rth@redhat.com>
4434 * trans-decl.c (gfc_generate_function_code): Don't set
4435 immediate_size_expand.
4436 (gfc_generate_constructors): Likewise.
4438 2004-06-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4441 * decl.c (gfc_match_type_spec): Rename second argument to
4442 'implicit_flag', reverse meaning. Don't match_char_spec if
4443 'implicit_flag' is set. Rename to ...
4444 (match_type_spec): ... this.
4445 (gfc_match_implicit_none, match_implicit_range): Move here
4447 (gfc_match_implicit): Move here from match.c, try to
4448 match_char_len if match_implicit_range doesn't succeed for
4449 CHARACTER implicits. Call renamed fucntion match_type_spec.
4450 (gfc_match_data_decl, match_prefix): Call renamed function
4452 * match.c (gfc_match_implicit_none, match_implicit_range,
4453 gfc_match_implicit): Move to decl.c.
4454 * match.h (gfc_match_implicit_none, gfc_match_implicit):
4455 Move protoypes to section 'decl.c'.
4456 (gfc_match_type_spec): Remove prototype.
4458 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4460 * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
4463 2004-06-29 Steven Bosscher <stevenb@suse.de>
4465 Make sure types in assignments are compatible. Mostly mechanical.
4466 * trans-const.h (gfc_index_one_node): New define.
4467 * trans-array.c (gfc_trans_allocate_array_storage,
4468 gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
4469 gfc_trans_array_constructor_value, gfc_trans_array_constructor,
4470 gfc_conv_array_ubound, gfc_conv_array_ref,
4471 gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
4472 gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
4473 gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
4474 gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
4475 types in assignments, conversions and conditionals for expressions.
4476 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
4477 gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
4478 gfc_conv_function_call, gfc_trans_pointer_assignment,
4479 gfc_trans_scalar_assign): Likewise.
4480 * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
4481 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
4482 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
4483 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
4484 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
4485 gfc_conv_allocated, gfc_conv_associated,
4486 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
4487 * trans-io.c (set_string): Likewise.
4488 * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
4489 gfc_do_allocate, generate_loop_for_temp_to_lhs,
4490 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
4491 compute_overall_iter_number, gfc_trans_assign_need_temp,
4492 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
4493 gfc_evaluate_where_mask, gfc_trans_where_assign,
4494 gfc_trans_where_2): Likewise.
4495 * trans-types.c (gfc_get_character_type, gfc_build_array_type,
4496 gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
4498 * trans.c (gfc_add_modify_expr): Add sanity check that types
4499 for the lhs and rhs are the same for scalar assignments.
4501 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4503 * dump-parse-tree.c (show_common): New function.
4504 (gfc_show_namespace): Show commons.
4506 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4507 Andrew Vaught <andyv@firstinter.net>
4511 * decl.c (gfc_match_save): Adapt to new common structures,
4512 don't allow saving USE-associated common.
4513 * dump-parse-tree (gfc_show_attr): (saved_)common are not
4514 symbol attributes any longer.
4515 (gfc_show_symbol): Don't show old-style commons any longer.
4516 (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
4518 * gfortran.h (symbol_attribute): Remove common and saved_common
4520 (gfc_symbol): Remove common_head element.
4521 (gfc_common_head): New struct.
4522 (gfc_get_common_head): New macro.
4523 (gfc_symtree): Add field 'common' to union.
4524 (gfc_namespace): Add field 'common_root'; change type of field
4525 'blank_common' to blank_common.
4526 (gfc_add_data): New prototype.
4527 (gfc_traverse_symtree): Expect a symtree as first argument
4528 instead of namespace.
4529 * match.c (gfc_get_common): New function.
4530 (match_common_name): Change to take char * as argument, adapt,
4531 fix bug with empty name.
4532 (gfc_match_common): Adapt to new data structures. Disallow
4533 redeclaration of USE-associated COMMON-block. Fix bug with
4535 (var_element): Adapt to new common structures.
4536 * match.h (gfc_get_common): Declare.
4537 * module.c: Add 2004 to copyright years, add commons to module
4538 file layout description.
4539 (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
4540 for removed attributes.
4541 (mio_symbol): Adapt to new way of storing common relations.
4542 (load_commons): New function.
4543 (read_module): Skip common list on first pass, load_commons at
4545 (write_commons): New function.
4546 (write_module): Call write_commons().
4547 * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
4548 functions related to removed attributes.
4549 (gfc_add_data): New function.
4550 (gfc_clear_attr): Don't set removed attributes.
4551 (gfc_copy_attr): Don't copy removed attributes.
4552 (traverse_symtree): Remove.
4553 (gfc_traverse_symtree): Don't traverse symbol
4554 tree of the passed namespace, but require a symtree to be passed
4555 instead. Unify with traverse_symtree.
4556 (gfc_traverse_ns): Call gfc_traverse_symtree according to new
4558 (save_symbol): Remove setting of removed attribute.
4559 * trans-common.c (gfc_sym_mangled_common_id): Change to
4560 take 'char *' argument instead of 'gfc_symbol'.
4561 (build_common_decl, new_segment, translate_common): Adapt to new
4562 data structures, add new
4564 (create_common): Adapt to new data structures, add new
4565 argument name. Fix typo in intialization of derived types.
4566 (finish_equivalences): Add second argument in call to
4568 (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
4569 (gfc_trans_common): Adapt to new data structures.
4570 * trans-decl.c (gfc_create_module_variables): Remove test for
4573 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4575 * io.c: Add 2004 to copyright years.
4577 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4578 Andrew Vaught <andyv@firstinter.net>
4580 * gfortran.h (gfc_gsymbol): New typedef.
4581 (gfc_gsym_root): New variable.
4582 (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
4583 * parse.c (global_used): New function.
4584 (parse_block_data): Check for double empty BLOCK DATA,
4585 use global symbol table.
4586 (parse_module): Use global symbol table.
4587 (add_global_procedure, add_global_program): New functions.
4588 (gfc_parse_file): Use global symbol table.
4589 * symbol.c (gfc_gsym_root): New variable.
4590 (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
4593 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4595 * module.c (mio_gmp_real): Correct writing of negative numbers.
4597 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4600 * expr.c (check_intrinsic_op): Allow comparison of characters.
4603 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4604 Andrew Vaught <andyv@firstinter.net>
4606 * decl.c (contained_procedure): New function.
4607 (match_end): Verify correctness of END STATEMENT in
4610 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4611 Andrew Vaught <andyv@firstinter.net>
4614 * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
4615 (decode_statement): Enforce required space in free-form.
4617 2004-06-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4619 * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
4620 * trans-array.c (gfc_conv_descriptor_data): Add operand
4622 (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
4623 (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
4624 (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
4625 * trans-common.c (create_common): Likewise.
4626 * trans-expr.c (gfc_conv_component_ref): Likewise.
4627 * trans-io.c (set_parameter_value): Likewise.
4628 (set_parameter_ref, set_string, set_flag, io_result): Likewise.
4629 (transfer_expr): Likewise.
4630 * trans-decl.c (gfc_trans_auto_character_variable):
4631 Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
4632 (gfc_gimplify_function): New function.
4633 (gfc_generate_function-code): Properly handle nested functions.
4634 * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
4636 2004-06-22 Janne Blomqvist <jblomqvi@cc.hut.fi>
4639 * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
4640 (gfc_resolve_inquire): Resolve the iolength tag. Return
4641 SUCCESS at end of function if no failure has occured.
4642 * resolve.c (resolve_code): Resolve if iolength is encountered.
4643 * trans-io.c: (ioparm_iolength, iocall_iolength,
4644 iocall_iolength_done): New variables.
4645 (last_dt): Add IOLENGTH.
4646 (gfc_build_io_library_fndecls ): Set iolength related variables.
4647 (gfc_trans_iolength): Implement.
4648 (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
4650 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de
4653 * scanner.c (load_line): Don't truncate preprocessor lines.
4654 Reformat error message.
4655 (preprocessor_line): Issue warning in case of malformed
4658 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4660 * resolve.c (resolve_symbol): Add comment in function body.
4661 (check_data_variable): Change type of mark to ar_type, adapt code
4664 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4666 * array.c (gfc_insert_constructor): Avoid redundant call to
4667 mpz_comp. Add 2004 to copyright years.
4669 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
4671 * trans.h (stmtblock_t): Change has_scope to unsigned int.
4673 2004-06-20 Steven G. Kargl <kargls@comcast.net>
4675 * arith.c (gfc_range_check): correct complex underflow.
4677 2004-06-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4680 * match.c (match_case_selector): Call gfc_match_init_expr
4681 instead of gfc_match_expr.
4682 * resolve.c (validate_case_label_expr): No need to check for
4683 constant, since it wouldn't have been matched with the fix to
4686 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4689 * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
4692 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4695 * trans-deecl.c (generate_local_decl): Do not issue warning for
4696 unused variables if they're use associated.
4698 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4699 Andrew Vaught <andyv@firstinter.net>
4702 * gfortran.h (gfc_check_f): Add new field f3ml.
4703 * check.c (gfc_check_minloc_maxloc): Take argument list instead
4704 of individual arguments, reorder if necessary.
4705 * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
4706 * intrinsic.c (add_sym_3ml): New function.
4707 (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
4708 (check_specific): Catch special case MINLOC, MAXLOC.
4710 2004-06-14 Paul Brook <paul@codesourcery.com>
4712 * intrinsic.c (add_sym_2s): Use correct function types.
4714 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4716 * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize. Move data.c
4717 * data.c (gfc_get_section_index): Remove dependency on trans.h.
4719 2004-06-12 Steven G. Kargl <kargls@comcast.net>
4721 * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
4722 gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
4723 * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
4724 GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
4725 * trans-intrinsic.c: Use symbols.
4726 * intrinsic.c (add_sym_2s): New function.
4727 * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
4728 * intrinsic.h: Function prototypes.
4729 * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
4730 gfc_resolve_srand): New functions.
4732 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4735 * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
4736 contained procedure.
4738 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4741 * interface.c (compare_parameter, compare_actual_formal): Don't
4742 check types and array shapes for NULL()
4743 * trans-expr.c (conv_function_call): No double indirection for
4746 2004-06-09 Toon Moene <toon@moene.indiv.nluug.nl>
4748 * trans-expr.c (gfc_conv_cst_int_power): Compute
4749 x**(-n) by converting it to (1/x)**n instead of
4752 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4755 * module.c (write_symbol, write_symtree): Don't write symbols
4756 wrongly added to namespace.
4757 * trans-decl.c (gfc_create_module_variable): Don't create a
4758 backend decl for a symbol incorrectly added to namespace.
4760 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4763 * resolve.c (resolve_symbol): Verify that parameter array has an
4764 explicit shape. Fix typos and coding style issues in surrounding
4767 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4770 * gfortran.texi: The documentation doesn't contain infomration on
4771 how to report bugs, and shouldn't, so remove the line which
4774 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4776 * intrinsic.c (sort_actual): Keep track of type of missing
4777 arguments. (Missing from previous commit.)
4779 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4781 * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
4782 * interface.c (compare_actual_formal): Keep type of omitted
4784 * trans-expr.c (gfc_conv_function_call): Add string length
4785 argument for omitted string argument.
4787 2004-06-03 Paul Brook <paul@codesourcery.com>
4789 * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
4790 lists instead of compound expr chains.
4791 (gfc_trans_code): Annotate statement lists.
4793 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4795 * trans-array.c: Fix spelling in comments.
4797 2004-06-02 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4800 * data.c (assign_substring_data_value): New function.
4801 (gfc_assign_data_value): Call the new function if we're dealing
4802 with a substring LHS.
4804 2004-06-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4807 * gfortran.h (GFC_VERSION): Remove.
4808 * gfortran.texi (version-gfortran): Remove, replace by version-GCC
4811 2004-05-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4813 * trans-types.c: Fix spelling & layout in comments.
4815 2004-05-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4818 * trans-const.c (gfc_conv_string_init): Allow variable string
4819 length lower than initialization string length.
4821 2004-05-30 Paul Brook <paul@codesourcery.com>
4824 * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
4825 * trans-expr.c (gfc_trans_string_copy): New function.
4826 (gfc_conv_statement_function): Use them. Create temp vars. Enforce
4828 (gfc_conv_string_parameter): Use gfc_trans_string_copy.
4829 * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
4830 * trans.h (struct gfc_saved_var): Define.
4831 (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
4833 2004-05-30 Steven G. Kargl <kargls@comcast.net>
4835 * iresolve.c (gfc_resolve_random_number): Clean up conditional.
4837 2004-05-29 Steven G. Kargl <kargls@comcast.net>
4839 * simplify.c (gfc_simplify_log): Remove useless line of code.
4841 2004-05-29 Paul Brook <paul@codesourcery.com>
4843 * trans-common.c (find_equivalence): Find multiple rules.
4845 2004-05-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4847 * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
4848 (gfc_current_locus): Declare new global variable.
4849 * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
4850 (gfc_current_locus1): Rename ...
4851 (gfc_current_locus): ... to this.
4852 (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
4853 skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
4854 gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
4855 gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
4856 and gfc_current_locus(), respectively.
4857 * array.c (match_subscript, gfc_match_array_ref, match_array_list,
4858 match_array_cons_element, gfc_match_array_constructor):
4859 Read/modify gfc_current_locus instead of calling gfc_set_locus()
4860 and gfc_current_locus().
4861 * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
4862 match_attr_spec, gfc_match_function_decl, gfc_match_end,
4863 attr_decl1, gfc_match_save): Likewise.
4864 * error.c (error_print, gfc_internal_error): Likewise.
4865 * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
4866 * interface.c (gfc_add_interface): Likewise.
4867 * io.c (gfc_match_format, match_dt_format, match_dt_element,
4868 match_io_iterator, match_io): Likewise.
4869 * match.c (gfc_match_space, gfc_match_eos,
4870 gfc_match_small_literal_int, gfc_match_st_label,
4871 gfc_match_strings, gfc_match_name, gfc_match_iterator,
4872 gfc_match_char, gfc_match, gfc_match_assignment,
4873 gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
4874 gfc_match_nullify, gfc_match_call, match_implicit_range,
4875 gfc_match_implicit, gfc_match_data, match_case_selector,
4876 gfc_match_case, match_forall_iterator): Likewise.
4877 * matchexp.c (gfc_match_defined_op_name, next_operator,
4878 match_level_1, match_mult_operand, match_ext_mult_operand,
4879 match_add_operand, match_ext_add_operand, match_level_2,
4880 match_level_3, match_level_4, match_and_operand, match_or_operand,
4881 match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
4882 * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
4883 * parse.c (match_word, decode_statement, next_free, next_fixed,
4884 add_statement, verify_st_order, parse_if_block, gfc_parse_file):
4886 * primary.c (match_digits, match_integer_constant,
4887 match_boz_constant, match_real_constant, match_substring,
4888 next_string_char, match_charkind_name, match_string_constant,
4889 match_logical_constant, match_const_complex_part,
4890 match_complex_constant, match_actual_arg, match_keyword_arg,
4891 gfc_match_actual_arglist, gfc_match_structure_constructor,
4892 gfc_match_rvalue, gfc_match_variable): Likewise.
4893 * st.c (gfc_get_code): Likewise.
4894 * symbol.c (check_conflict, check_used, check_done,
4895 duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
4896 gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
4897 gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
4899 2004-05-26 Roger Sayle <roger@eyesopen.com>
4901 * io.c (format_asterisk): Silence compiler warnings by correcting
4902 the number of elements of a "locus" initializer.
4904 2004-05-25 Roger Sayle <roger@eyesopen.com>
4907 * matchexp.c: Allow unary operators after arithmetic operators
4909 (match_ext_mult_operand, match_ext_add_operand): New functions.
4910 (match_mult_operand): Tweak to call match_ext_mult_operand.
4911 (match_add_operand): Tweak to call match_ext_mult_operand.
4912 (match_level_2): Rearrange to call match_ext_add_operand.
4914 2004-05-25 Paul Brook <paul@codesourcery.com>
4916 * expr.c (check_inquiry): Remove bogus tests.
4918 2004-05-23 Paul Brook <paul@codesourcery.com>
4921 * expr.c (restricted_args): Remove redundant checks/argument.
4922 (external_spec_function): Update to match.
4923 (restricted_intrinsic): Rewrite.
4925 2004-05-23 Paul Brook <paul@codesourcery.com>
4926 Victor Leikehman <lei@haifasphere.co.il>
4928 * gfortran.h (struct gfc_symbol): Add equiv_built.
4929 * trans-common.c: Change int to HOST_WIDE_INT. Capitalize error
4931 (current_length): Remove.
4932 (add_segments): New function.
4933 (build_equiv_decl): Create initialized common blocks.
4934 (build_common_decl): Always add decl to bindings.
4935 (create_common): Create initializers.
4936 (find_segment_info): Reformat to match coding conventions.
4937 (new_condition): Use add_segments.
4938 (add_condition, find_equivalence, add_equivalences): Move iteration
4939 inside functions. Only process each segment once.
4940 (new_segment, finish_equivalences, translate_common): Simplify.
4942 2004-05-23 Steven G. Kargl <kargls@comcast.net>
4944 * check.c (gfc_check_random_seed): Issue for too many arguments.
4946 2004-05-22 Steven G. Kargl <kargls@comcast.net>
4948 * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
4950 2004-05-22 Paul Brook <paul@codesourcery.com>
4952 * dump-parse-tree.c (gfc_show_equiv): New function.
4953 (gfc_show_namespace): Use it.
4955 2004-05-22 Victor Leikehman <lei@haifasphere.co.il>
4958 * symbol.c (gfc_add_common): Disable checks to work around other more
4959 fundamental inadequacies.
4961 2004-05-22 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
4963 * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
4965 (gfc_build_function_decl): Likewise.
4967 2004-05-22 Steven G. Kargl <kargls@comcast.net>
4969 * check.c (gfc_check_system_clock): New function.
4970 * intrinsic.c (add_sym_3s): New function.
4971 (add_subroutines): Use it.
4972 * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
4974 * iresolve.c (gfc_resolve_system_clock): New function.
4976 2004-05-22 Steven G. Kargl <kargls@comcast.net>
4978 * invoke.texi: Document -Wunderflow and spell check.
4979 * lang.opt: Add Wunderflow.
4980 * gfortran.h (gfc_option_t): Add warn_underflow option.
4981 * options.c (gfc_init_options, set_Wall): Use it.
4982 * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
4983 * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
4984 gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
4985 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
4986 * arith.c (common_logarithm): Fix typo in comment.
4988 2004-05-21 Roger Sayle <roger@eyesopen.com>
4990 * io.c (check_format): As a GNU extension, allow the comma after a
4991 string literal to be optional in a format. Use gfc_notify_std to
4992 issue an error/warning as appropriate.
4994 2004-05-21 Roger Sayle <roger@eyesopen.com>
4996 * io.c (check_format): Use gfc_notify_std to determine whether to
4997 issue an error/warning for omitting the digits from the X format.
4999 2004-05-20 Roger Sayle <roger@eyesopen.com>
5001 * io.c (check_format): Allow the number before the X format to
5002 be optional when not -pedantic.
5004 2004-05-18 Feng Wang <fengwang@nudt.edu.cn>
5005 Paul Brook <paul@codesourcery.com>
5007 * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
5008 Create decls for __builtin_pow{,f}.
5009 * gfortran.h (PREFIX_LEN): Define.
5010 * trans-decl.c (gfor_fndecl_math_powi): Add.
5011 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
5012 (gfc_build_intrinsic_function_decls): Create decls for powi.
5013 * trans-expr.c (powi_table): Add.
5014 (gfc_conv_integer_power): Remove.
5015 (gfc_conv_powi): New function.
5016 (gfc_conv_cst_int_power): New function.
5017 (gfc_conv_power_op): Use new powi routines.
5018 * trans.h (struct gfc_powdecl_list): Add.
5019 (gfor_fndecl_math_powi): Add.
5020 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
5022 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5024 * trans.c, trans-decl.c: Fix comment typos.
5026 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5028 * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
5030 2004-05-18 Steve Kargl <kargls@comcast.net>
5032 * arith.c (gfc_int2complex): Fix incorrect range checking.
5034 2004-05-18 Paul Brook <paul@codesourcery.com>
5037 * decl.c (add_init_expr_to_sym): Remove incorrect check.
5038 (default_initializer): Move to expr.c.
5039 (variable_decl): Don't assign default initializer to variables.
5040 * expr.c (gfc_default_initializer): Move to here.
5041 * gfortran.h (gfc_default_initializer): Add prototype.
5042 * resolve.c (resolve_symbol): Check for illegal initializers.
5043 Assign default initializer.
5045 2004-05-17 Steve Kargl <kargls@comcast.net>
5047 * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
5049 2004-05-17 Steve Kargl <kargls@comcast.net>
5051 * arith.c (gfc_real2complex): Range checking wrong part of complex
5054 2004-05-16 Paul Brook <paul@codesourcery.com>
5056 * options.c (gfc_handle_module_path_options): Fix buffer overrun.
5058 2004-05-16 Paul Brook <paul@codesourcery.com>
5060 * arith.c (gfc_range_check): Fix logic error.
5062 2004-05-16 Steve Kargl <sgk@troutmask.apl.washington.edu>
5064 * arith.c: Fix comment typos.
5066 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5069 * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
5070 not initialized in a disallowed fashion.
5071 * match.c (gfc_match_common): Likewise.
5072 (var_element): Verify that variable is not in the blank COMMON,
5073 if it is in a common.
5075 2004-05-15 Joseph S. Myers <jsm@polyomino.org.uk>
5077 * Make-lang.in (f95.generated-manpages): Remove.
5078 (f95.srcextra): New.
5079 (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
5080 f95.maintainer-clean): Generate info and dvi files in objdir/doc.
5083 (f95.install-info): Remove.
5084 (install-info): New.
5086 2004-05-15 Victor Leikehman <lei@haifasphere.co.il>
5088 * decl.c (add_init_expr_to_sym): Check for variable size arrays.
5090 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5092 * primary.c (match_boz_constant): Use gfc_notify_std() for
5093 issuing a warning or an error.
5095 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5098 * primary.c (match_structure_constructor): Rename ...
5099 (gfc_match_structure_constructor): ... to this. Make non-static.
5100 (gfc_match_rvalue): Call renamed function.
5101 * match.h (gfc_match_structure_constructor): Declare.
5102 * match.c (gfc_match_data_constant): Handle structure
5105 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5109 * gfortran.h (gfc_linebuf): New typedef.
5111 (gfc_file): Revamped, use new gfc_linebuf.
5112 (locus): Revamped, use new types.
5113 (gfc_current_file): Remove.
5114 (gfc_current_form, gfc_source_file): New global variables.
5115 * match.c (gfc_match_space, gfc_match_strings): Use
5116 gfc_current_form to find source form.
5117 * module.c (gfc_dump_module): Use gfc_source_file when printing
5119 * error.c (show_locus, show_loci) Use new data structures to print
5121 * scanner.c (first_file, first_duplicated_file, gfc_current_file):
5123 (file_head, current_file, gfc_current_form, line_head, line_tail,
5124 gfc_current_locus1, gfc_source_file): New global variables.
5125 (gfc_scanner_init1): Set new global variables.
5126 (gfc_scanner_done1): Free new data structures.
5127 (gfc_current_locus): Return pointer to gfc_current_locus1.
5128 (gfc_set_locus): Set gfc_current_locus1.
5129 (gfc_at_eof): Set new variables.
5130 (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
5131 to new locus structure.
5132 (gfc_check_include): Remove.
5133 (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
5134 (gfc_skip_comments): Use gfc_current_form, find locus with
5136 (gfc_next_char): Use gfc_current_form.
5137 (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
5138 (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
5140 (get_file): New function.
5141 (preprocessor_line, include_line): New functions.
5142 (load_file): Move down, rewrite to match new data structures.
5143 (gfc_new_file): Rewrite to match new data structures.
5144 * parse.c (next_statement): Remove code which is now useless. Use
5145 gfc_source_form and gfc_source_file where appropriate.
5146 * trans-decl.c (gfc_get_label_decl): adapt to new data structures
5147 when determining locus of frontend code.
5148 * trans-io.c (set_error_locus): Same.
5149 * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
5150 * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
5152 (all): Add missing initializers.
5154 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5156 * Make-lang.in (trans-common.o): Remove redundant dependency.
5157 (data.c): Replace object file name ...
5158 (data.o): ... by the correct one.
5160 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5162 * dump-parse-tree.c (gfc_show_array_ref): Print colon only
5163 for ranges when dumping array references.
5165 2004-05-14 Victor Leikehman <lei@haifasphere.co.il>
5167 * decl.c (variable_decl): Always apply default initializer.
5169 2004-05-08 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5172 * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
5173 handle zero correctly.
5175 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5177 * match.c (gfc_match): Eliminate dead code.
5179 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5181 * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
5182 Detect bad continuation line in fixed form sources.
5184 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5187 * iresolve.c (gfc_resolve_nearest): Add new function.
5188 * intrinsic.h: ... declare it here.
5189 * intrinsic.c (add_functions): ... add it as resolving function
5192 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5195 * match.c (gfc_match_do): Allow infinite loops with
5196 label-do-stmt. Do not enforce space after comma.
5198 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5201 * parse.c (parse_interface): Allow empty INTERFACE, remove
5204 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5206 * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
5207 decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
5208 expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
5209 intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
5210 matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
5211 primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
5212 trans-array.c, trans-array.h, trans-common.c, trans-const.c,
5213 trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
5214 trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
5215 trans-types.h, trans.c, trans.h: Update copyright years and
5217 * data.c: Likewise, also removed two whitespace-only lines.
5218 * gfortranspec.c, lang.opt: Update copyright years.
5220 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5223 * trans-decl.c (generate_local_decl): Don't warn for unused
5224 variables which are in common blocks.
5226 2004-05-13 Diego Novillo <dnovillo@redhat.com>
5228 * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
5229 trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
5230 trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
5232 2004-05-13 Victor Leikehman <lei@haifasphere.co.il>
5235 * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
5237 2004-05-13 Joseph S. Myers <jsm@polyomino.org.uk>
5239 * gfortran.texi: Use @table @emph instead of @itemize @emph.
5240 Remove "set DEVELOPMENT".
5241 (Compiling GFORTRAN): Remove.
5243 2004-05-09 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5245 * array.c (match_subscript, match_array_ref): Add comments
5246 explaining argument 'init'.
5247 * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
5248 trans-expr.c, trans.c: Fix some typos in comments.
5249 * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
5250 * primary.c (match_digits, match_integer_constant): Add comment
5251 explaining signflag.
5253 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5256 * primary.c: Include system.h and flags.h, needed for pedantic.
5257 (match_boz_constant): Allow "x" for hexadecimal constants, warn if
5260 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5263 * match.c (match_data_constant): Handle case where
5264 gfc_find_symbol sets sym to NULL
5266 2004-04-28 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5268 * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
5269 dependency on mathbuiltins.def
5271 2004-04-24 Victor Leikehman <lei@il.ibm.com>
5273 * trans-io.c (transfer_expr): Implemented recursive printing
5276 2004-04-24 Andrew Pinski <pinskia@physics.uc.edu>
5278 * gfortranspec.c: Do not include multilib.h.
5280 2004-04-24 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5282 * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
5283 2004 to copyright years.
5284 * trans-expr.c, trans-decl.c: Comment update, we now generate
5285 GENERIC, not SIMPLE. Add 2004 to copyright years.
5287 2004-04-24 Paul Brook <paul@codesourcery.com>
5289 * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
5291 2004-04-24 Feng Wang <fengwang@nudt.edu.cn>
5294 * arith.c (gfc_arith_divide): Fix complex divide.
5296 2004-04-23 Andrew Pinski <pinskia@physics.uc.edu>
5298 * gfortranspec.c: Include the target headers.
5300 2004-04-18 Feng Wang <fengwang@nudt.edu.cn>
5304 * arith.c (arctangent2): New function.
5305 * arith.h (arctangent2): Add function prototype.
5306 * simplify.c (gfc_simplify_atan2): Use it.
5307 (gfc_simplify_log): Use it.
5309 2004-04-12 Diego Novillo <dnovillo@redhat.com>
5311 * fortran/f95-lang.c (gfc_expand_stmt): Remove.
5312 (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
5314 2004-04-11 Bud Davis <bdavis9659@comcast.net>
5317 * trans-io.c (build_dt): Change REC to value.
5319 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
5322 * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
5323 the real value when converting mpf to string.
5325 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
5328 * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
5331 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
5334 * simplify.c (simplify_min_max): Convert the type of the result.
5336 2004-04-11 Paul Brook <paul@codesourcery.com>
5338 * gfortran.texi: Use full target triplet.
5340 2004-04-11 Paul Brook <paul@codesourcery.com>
5342 * Make-lang.in (GFORTRAN_TEXI): Set it.
5343 (fortran/dfortran.dvi): Use it. Add fortran to include paths.
5344 (fortran/gfortran.info): Ditto.
5345 * gfortran.texi: Major update.
5346 * invoke.texi: New file.
5348 2004-04-10 Paul Brook <paul@codesourcery.com>
5350 * trans-array.c (gfc_trans_allocate_temp_array,
5351 gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
5352 * trans-decl.c (gfc_build_dummy_array_decl,
5353 gfc_get_symbol_decl, gfc_build_function_decl,
5354 gfc_create_module_variable): Ditto.
5355 * trans-expr.c (gfc_conv_variable): Ditto.
5356 * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
5357 * trans.h (GFC_DECL_STRING): Remove.
5358 (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
5359 GFC_DECL_ASSIGN): Renumber flags.
5361 2004-04-05 Paul Brook <paul@codesourcery.com>
5365 * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
5367 * gfortran.h (struct gfc_charlen): Add backend_decl.
5368 * trans-array.c (gfc_trans_allocate_temp_array,
5369 gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
5370 (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
5371 Remove old, broken string handling.
5372 (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
5373 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
5374 gfc_trans_deferred_array): Handle character arrays.
5375 * trans-const.c (gfc_conv_const_charlen): New function.
5376 * trans-const.h (gfc_conv_const_charlen): Add prototype.
5377 * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
5379 (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
5380 (gfc_create_string_length): New function.
5381 (gfc_get_symbol_decl): Create lengths for character variables.
5382 (gfc_get_fake_result_decl): Ditto.
5383 (gfc_build_function_decl): Only set length for assumed length
5384 character arguments.
5385 (gfc_trans_dummy_character): New function.
5386 (gfc_trans_auto_character_variable): Rewrite.
5387 (gfc_trans_deferred_vars): Handle more types of character variable.
5388 (gfc_create_module_variable): String lengths have moved.
5389 (gfc_generate_function_code): Initialize deferred var chain earlier.
5390 * trans-expr.c (gfc_conv_init_string_length): Rename ...
5391 (gfc_trans_init_string_length): ... to this.
5392 (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
5393 gfc_conv_function_call): Update to new format for character variables.
5394 (gfc_conv_string_length): Remove.
5395 (gfc_conv_string_parameter): Update assertion.
5396 * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
5397 * trans-io.c (set_string): Use new macro names.
5398 * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
5399 * trans-types.c (gfc_get_character_type): Use existing length expr.
5400 (gfc_is_nodesc_array): Make public.
5401 (gfc_get_dtype_cst): Rename ...
5402 (gfc_get_dtype): ... to this. Handle unknown size arrays.
5403 (gfc_get_nodesc_array_type): Use new name.
5404 (gfc_sym_type): New character variable code.
5405 (gfc_get_derived_type): Ditto.
5406 (gfc_get_function_type): Evaluate character variable lengths.
5407 * trans-types.h (gfc_strlen_kind): Define.
5408 (gfc_is_nodesc_array): Add prototype.
5409 * trans.h: Update prototypes.
5410 (struct lang_type): Update comments.
5411 (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
5412 (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
5414 2004-04-04 Paul Brook <paul@codesourcery.com>
5416 * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
5417 * options.c (gfc_init.options, gfc_handle_option): Ditto.
5418 * trans-expr.c (gfc_conv_function_call): Ditto.
5419 * trans-types.c (gfc_is_nodesc_array): Ditto
5420 * lang.opt (fg77-calls): Remove.
5422 2004-04-04 Paul Brook <paul@codesourcery.com>
5424 * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
5425 (gfc_conv_descriptor_base): Rename ...
5426 (gfc_conv_descriptor_offset): ... to this.
5427 (gfc_trans_allocate_array_storage): Set offset to zero.
5428 (gfc_conv_array_base): Rename ...
5429 (gfc_conv_array_offset): ... to this.
5430 (gfc_conv_array_index_ref): Add offset parameter.
5431 (gfc_conv_array_ref): Include offset.
5432 (gfc_trans_preloop_setup): Use existing offset.
5433 (gfc_trans_allocate_temp_array, gfc_array_allocate,
5434 gfc_trans_auto_array_allocation, gfc_trans_g77_array,
5435 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
5436 gfc_conf_ss_descriptor): Set offset.
5437 * trans-array.h: Rename prototypes.
5438 * trans-const.h (gfc_index_zero_node): Define.
5439 * trans-decl.c (gfc_build_qualified_array): Change base to offset.
5440 * trans-types.c (gfc_get_array_type_bounds): Ditto.
5441 (gfc_get_nodesc_array_type): Calculate offset before upper bound.
5443 2004-03-25 Diego Novillo <dnovillo@redhat.com>
5445 * convert.c (convert): Don't handle WITH_RECORD_EXPR.
5447 2004-03-24 Bud Davis <bdavis9659@comcast.net>
5450 * arith.c (gfc_convert_integer,gfc_convert_real): Removed leading '+'
5451 before conversion by gmp library call.
5453 2004-03-24 Bud Davis <bdavis9659@comcast.net>
5456 * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
5458 2004-02-24 Richard Henderson <rth@redhat.com>
5460 * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
5462 2004-02-19 Loren J. Rittle <ljrittle@acm.org>
5464 * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
5465 (fortran/gfortran.info): ... to here.
5468 2004-02-16 Richard Henderson <rth@redhat.com>
5470 * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
5471 * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
5472 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
5473 (gfc_expand_function): Rename from expand_function_body, make static,
5474 don't do anything except invoke tree_rest_of_compilation.
5475 (gfc_be_parse_file): Invoke cgraph.
5476 (gfc_expand_decl): Remove.
5477 (gfc_init_builtin_functions): Add __builtin_init_trampoline and
5478 __builtin_adjust_trampoline.
5479 * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
5480 (gfc_finalize): New.
5481 (gfc_generate_function_code): Use it. Lower nested functions.
5482 * trans-expr.c (gfc_conv_function_call): Add static chain operand
5484 * trans.c (gfc_build_function_call): Likewise.
5485 * trans.h (expand_function_body): Remove.
5487 2004-02-15 Victor Leikehman <lei@il.ibm.com>
5490 * trans-decl.c (gfc_build_function_decl) For functions
5491 returning CHARACTER pass an extra length argument,
5492 following g77 calling conventions.
5493 * trans-types.c (gfc_get_function_type) Ditto.
5494 * trans-expr.c (gfc_conv_function_call) Ditto.
5496 2004-02-14 Paul Brook <paul@codesourcery.com>
5498 * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
5500 2004-02-12 Paul Brook <paul@nowt.org>
5504 2004-02-08 Steve Kargl <sgk@troutmask.apl.washington.edu>
5506 * gfortran.texi: Fix typos.
5508 2004-02-07 Bud Davis <bdavis9659@comcast.net>
5511 * intrinsic.c (add_conversions) Use logical conversion instead
5513 * trans-types.c (gfc_get_logical_type) implemented logical*1
5516 2004-01-17 Paul Brook <paul@codesourcery.com>
5518 * lang-specs.h: Remove %<fixed-form.
5520 2004-01-15 Toon Moene <toon@moene.indiv.nluug.nl>
5522 * lang-specs.h: Enable preprocessing of source files
5523 ending in .F, .fpp, .FPP, .F90 and .F95.
5525 2004-01-13 Toon Moene <toon@moene.indiv.nluug.nl>
5528 * lang-specs.h: Enable compilation of files ending
5529 in .f, .for and .FOR.
5531 2004-01-11 Paul Brook <paul@codesourcery.com>
5533 * trans-stmt.c (gfc_trans_if_1): New function.
5534 (gfc_trans_if): Use it.
5536 2004-01-11 Erik Schnetter <schnetter@uni-tuebingen.de>
5538 * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
5539 (gfc_option_t): Add max_identifier_length.
5540 * lang.opt: Add fmax-identifier-length.
5541 * match.c (parse_name): Use limit.
5542 * options.c (gfc_init_options): Set max_identifier_length.
5543 (gfc_handle_option): Ditto.
5545 2004-01-11 Feng Wang <fengwang@nudt.edu.cn>
5547 * intrinsic.c (add_functions): Add resolve function to dcmplx.
5548 * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
5549 * iresolve.c (gfc_resolve_dcmplx): New function.
5551 2004-01-10 Paul Brook <paul@codesourcery.com>
5553 * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
5554 * trans-types.c (gfc_sym_type): Handle external dummy procedures.
5555 (gfc_return_by_reference): Correct condition.
5556 (gfc_get_function_type): Ditto.
5558 2004-01-10 Paul Brook <paul@codesourcery.com>
5560 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
5563 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
5565 * iresolve.c: Use correct kind.
5567 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
5570 * trans-decl.c (gfc_create_module_variable): Output array valued
5573 2004-01-10 Paul Brook <paul@codesourcery.com>
5575 * resolve.c (resolve_branch): Get error message right way round.
5577 2004-01-10 Canqun Yang <canqun@nudt.edu.cn>
5579 * trans-array (gfc_conv_loop_setup): Adjust comment to track
5581 (gfc_array_allocate): Don't count size of element twice.
5583 2004-01-04 Paul Brook <paul@codesourcery.com>
5585 * lang.opt (i8, r8, std=*): Remove RejectNegative.
5587 2004-01-04 Paul Brook <paul@codesourcery.com>
5589 * error.c (gfc_notify_std): New function.
5590 * gfortran.h (gfc_notify_std): Declare.
5591 (GFC_STD_*): Define.
5592 (gfc_option_t): Add warn_std and allow_std.
5593 * intrinsic.c (gfc_init_expr_extensions): Fix logic.
5594 (gfc_intrinsic_func_interface): Use gfc_notify_std.
5595 * check.c (check_rest): Use gfc_notify_std.
5596 * match.c (gfc_match_pause): Ditto.
5597 (gfc_match_assign): Ditto.
5598 (gfc_match_goto): Ditto.
5599 * resolve.c (resolve_branch): Ditto.
5600 * lang.opt: Add std=<foo> and w.
5601 * options.c (gfc_init_options): Set allow_std and warn_std.
5602 (gfc_handle_option): Handle OPT_std_* and OPT_w.
5604 2004-01-01 Paul Brook <paul@codesourcery.com>
5606 * array.c (gfc_append_constructor): Take constructor, not expression.
5607 * data.c (struct gfc_expr_stack): Remove.
5608 (expr_stack): Remove.
5609 (find_con_by_offset): Rename from find_expr_in_con.
5610 (find_con_by_component): Rename from find_component_in_con.
5611 (gfc_get_expr_stack): Remove.
5612 (gfc_assign_data_value): Rewrite.
5613 (gfc_expr_push): Remove.
5614 (gfc_expr_pop): Remove.
5615 (gfc_advance_section): Rename from
5616 gfc_modify_index_and_calculate_offset. Handle unbounded sections.
5617 (gfc_get_section_index): Handle unbounded sections.
5618 * gfortran.h: Update prototypes.
5619 * resolve.c (check_data_variable): Array section maight not be the
5622 2004-01-01 Paul Brook <paul@codesourcery.com>
5625 * resolve.c (resolve_symbol): Allow assumed length function results.
5627 2004-01-01 Steve Kargl <sgk@troutmask.apl.washington.edu>
5629 * match.c (gfc_match_pause): Fix spelling.
5631 2004-01-01 Steven Bosscher <stevenb@suse.de>
5634 * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
5635 reference from the expression.
5637 2003-12-26 Feng Wang <fengwang@nudt.edu.cn>
5639 * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
5641 * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
5642 (gfc_exec_op): New EXEC_LABEL_ASSIGN.
5643 (symbol_attribute):New variable attribute: assign.
5644 * io.c (resolve_tag):Integer variable is allowed.
5645 (match_dt_format): Add ASSIGN statement. Set assign flag.
5646 * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
5647 (gfc_match_assign): Add ASSIGN statement. Set assign flag.
5648 (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
5649 * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
5650 (next_statement): Add ST_LABEL_ASSIGNMENT.
5651 (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
5652 * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
5653 (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
5654 * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
5655 * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
5656 assign. Put them into the stuct lang_decl.
5657 * trans-io.c (set_string): Add the assign statement.
5658 * trans-stmt.c (gfc_trans_label_assign): New function.
5659 (gfc_trans_goto): Translate ASSIGNED GOTO statement.
5660 * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
5661 * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
5662 * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
5663 (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
5664 (GFC_DECL_ASSIGN(node)): New macro to access flag.
5666 2003-12-31 Huang Chun <chunhuang73@hotmail.com>
5669 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
5672 2003-12-22 Toon Moene <toon@moene.indiv.nluug.nl>
5674 * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
5675 that arguments to subroutines/functions can't alias themselves, nor global
5678 2003-12-20 Steven Bosscher <stevenb@suse.de>
5680 * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
5681 * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
5683 2003-12-12 Huang Chun <chunhuang73@hotmail.com>
5685 * primary.c (match_substring): Fix substring bug for start point
5686 or end point is NULL.
5687 * trans-expr.c (gfc_conv_substring): Ditto
5688 * trans-types.c (gfc_sym_type): Get correct type of scalar
5689 character variables.
5690 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
5693 2003-12-10 Richard Henderson <rth@redhat.com>
5695 * options.c (gfc_post_options): Don't ever use rtl inlining.
5697 2003-12-05 Canqun Yang <canqun@nudt.edu.cn>
5699 * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
5700 * trans-equivalence.c: Remove.
5701 * trans-decl.c (gfc_get_symbol_decl): Update to match.
5702 (gfc_generate_function_code): Ditto.
5703 * trans-array.c (gfc_conv_array_parameter): Ditto.
5704 * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
5705 (F95_ADDITIONAL_OBJS): Add stor-layout.o
5706 * trans.h (gfc_trans_equivalence): Remove.
5707 * gfortran.h (struct gfc_equiv): Add used field.
5708 (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
5709 equiv_offset fields.
5711 2003-12-05 Richard Henderson <rth@redhat.com>
5713 * trans.c (gfc_build_addr_expr): New.
5714 (gfc_build_indirect_ref, gfc_build_array_ref): New.
5715 * trans.h: Declare them.
5716 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
5717 trans-stmt.c, trans.c (*): Use them.
5719 * f95-lang.c (gfc_post_options): Remove dead prototype.
5720 * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
5721 * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
5724 2003-12-01 Feng Wang <fengwang@nudt.edu.cn>
5726 * io.c (gfc_match_format): Check for missing format label.
5728 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
5731 * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
5732 from interfaces in modules.
5734 2003-11-30 Paul Brook <paul@nowt.org>
5736 * trans-array.c (gfc_trans_g77_array): Make non-static.
5737 (gfc_trans_assumed_size): Remove.
5738 (gfc_trans_dummy_array_bias): Explicitly free temporary.
5739 * trans-array.h (gfc_trans_g77_array): Add prototype.
5740 (gfc_trans_assumed_size): Remove.
5741 * trans-decls.c (gfor_fndecl_push_context): Remove.
5742 (gfor_fndecl_pop_context): Remove.
5743 (gfc_build_function)decls): Don't create them.
5744 (gfc_trans_deferred_vars): Update to match. Remove dead code.
5745 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
5747 2003-11-30 Kejia Zhao <kejia_zh@nudt.edu.cn>
5749 * trans-array.c (gfc_conv_array_parameter): Simplify
5750 array argument passing for array name actual argument.
5751 * trans-expr.c (gfc_conv_function_call): Ditto
5752 * trans-types.c (gfc_is_nodesc_array):Ditto.
5754 2003-11-30 Paul Brook <paul@nowt.org>
5756 * f95-lang.c (gfc_post_options): Move ...
5757 * options.c (gfc_post_options): .. to here. Handle inlining options.
5758 * gfortran.h (gfc_post_options): Add prototype.
5760 2003-11-28 Richard Henderson <rth@redhat.com>
5762 * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
5764 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
5766 * trans.h (has_alternate_specifier): New global variable.
5767 * match.c (gfc_match_call): Handle actual arguments associated with
5768 alternate return indicators.
5769 * trans-expr.c (gfc_conv_function_call): Ditto
5770 * trans-stmt.c (gfc_trans_call): Ditto
5771 (gfc_trans_return): Handle return statement with value.
5772 * trans-decl.c (gfc_generate_function_code): Handle functions with
5774 (gfc_get_fake_result_decl): Ditto
5775 * trans-types.c (gfc_get_function_type): Ditto
5776 * resolve.c (resolve_actual_arglist): Check alternate return indicators.
5777 (resolve_formal_arglist): Check asterisk dummy.
5779 2003-11-27 Paul Brook <paul@nowt.org>
5781 * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
5782 allocation interface.
5783 (gfc_conv_ array_parameter): Ditto.
5784 (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
5785 * trans-array.c: Update prototype.
5786 * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
5787 (gfc_trans_auto_character_variable): Use new memory alloc interface.
5788 * trans-expr.c (gfc_conv_string_tmp): Ditto.
5789 (gfc_conv_function_call): Use gfc_conv_string_tmp.
5790 * trans-stmt.c (gfc_do_allocate): Use new memory alloc interface.
5791 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
5792 * trans.h (gfc_ss_info): Remove unused pdata field.
5793 * trans.c (gfc_create_var_np): Change T to V.
5795 2003-11-26 Richard Henderson <rth@redhat.com>
5797 * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
5798 * trans-intrinsic.c (gfc_intrinsic_map): ... here. Add SCALE,
5799 FRACTION, NEAREST, SET_EXPONENT.
5800 (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
5801 Fix GTY marking. Remove unnecessary const's.
5802 (LIBM_FUNCTION): Rename from I_LIB.
5803 (LIBF_FUNCTION): New.
5804 (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
5805 conventions. Assume the expr signature is correct. Mark const.
5806 (gfc_conv_intrinsic_exponent): Use library functions.
5807 (gfc_conv_intrinsic_set_exponent): Remove.
5808 (gfc_conv_intrinsic_scale): Remove.
5809 (gfc_conv_intrinsic_nearest): Remove.
5810 (gfc_conv_intrinsic_fraction): Remove.
5811 (gfc_conv_intrinsic_function): Update.
5812 * trans-decl.c (gfor_fndecl_math_exponent4): New.
5813 (gfor_fndecl_math_exponent8): New.
5814 (gfc_build_intrinsic_function_decls): Set them.
5815 * trans.h: Declare them.
5817 2003-11-25 Canqun Yang <canqun@nudt.edu.cn>
5819 * trans-common.c (gfc_layout_global_equiv): Locate the error for
5820 underflow COMMON block.
5821 (gfc_trans_one_common): Fix bug for size of COMMON block containing
5822 EQUIVALENCE object. Also fix typo in an error message.
5824 2003-11-25 Diego Novillo <dnovillo@redhat.com>
5826 * Make-lang.in: Add check-gfortran to lang_checks.
5827 (check-f95): Alias for check-gfortran.
5829 2003-11-25 Jason Merrill <jason@redhat.com>
5831 * Make-lang.in (f95.tags): Create TAGS.sub files in each
5832 directory and TAGS files that include them for each front end.
5834 2003-11-24 Paul Brook <paul@nowt.org>
5837 * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
5839 2003-11-24 Paul Brook <paul@nowt.org>
5841 * expr.c (simplify_const_ref): Return SUCCESS for things we don't
5843 * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
5845 2003-11-24 Paul Brook <paul@nowt.org>
5848 * array.c (gfc_array_ref_shape): Handle elemental dimensions.
5849 * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
5851 2003-11-20 Richard Henderson <rth@redhat.com>
5853 * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
5854 (gfc_conv_array_base): Likewise.
5855 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
5856 * trans-expr.c (gfc_conv_string_tmp): Likewise.
5857 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
5858 * trans-stmt.c (gfc_trans_character_select): Likewise.
5860 2003-11-13 Paul Brook <paul@nowt.org>
5862 * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
5864 2003-11-13 Canqun Yang <canqun@nudt.edu.cn>
5866 * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
5867 (resolve_equivalence): New function.
5868 (resolve_equivalence_derived): New function.
5870 2003-11-12 Richard Henderson <rth@redhat.com>
5872 * trans.c (gfc_trans_code): Use annotate_with_locus instead of
5873 annotate_all_with_locus.
5875 2003-11-11 Canqun Yang <canqun@nudt.edu.cn>
5877 * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
5878 * trans-decl.c (gfc_finish_var_decl): Modified.
5880 2003-11-08 Paul Brook <paul@nowt.org>
5883 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
5886 2003-11-06 Paul Brook <paul@nowt.org>
5888 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
5890 2003-11-02 Canqun Yang <canqun@nudt.edu.cn>
5892 * match.c (gfc_match_stopcode): Assign '0' to stop_code.
5894 2003-10-27 Anthony Green <green@redhat.com>
5896 * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
5897 (f95.stagefeedback): Ditto.
5899 2003-10-27 Andrew Pinski <pinskia@physics.uc.edu>
5902 * Make-lang.in (f95.stageprofile): Add.
5903 (f95.stagefeedback): Add.
5905 2003-10-23 Richard Henderson <rth@redhat.com>
5907 * f96-lang.c (gfc_gimplify_expr): Remove.
5908 (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
5909 (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
5911 2003-10-23 Richard Henderson <rth@redhat.com>
5913 * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
5915 2003-10-20 Paul Brook <paul@nowt.org>
5917 * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
5918 * trans-stmt.c (gfc_trans_do_while): Ditto.
5920 2003-10-17 Paul Brook <paul@nowt.org>
5922 * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
5924 2003-10-17 Paul Brook <paul@nowt.org>
5926 * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
5928 2003-10-17 Feng Wang <wf_cs@yahoo.com>
5930 * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
5931 (gfc_resolve_minloc): Ditto.
5932 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
5933 Return the value after subtracting the lower bound.
5935 2003-10-16 Richard Henderson <rth@redhat.com>
5937 * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
5939 2003-10-16 Steven Bosscher <steven@gcc.gnu.org>
5941 * lang.c: Remove -M option for now, it's in the way for C.
5943 2003-10-14 Jason Merrill <jason@redhat.com>
5945 * Make-lang.in (f95.tags): New rule.
5947 2003-10-13 Richard Henderson <rth@redhat.com>
5949 * trans.c (gfc_trans_code): Use annotate_all_with_locus.
5951 2003-10-13 Paul Brook <paul@nowt.org>
5953 * trans-decl.c (generate_local_decl): Don't create junk variables.
5955 2003-10-13 Paul Brook <paul@nowt.org>
5957 * resolve.c (resolve_formal_arglist): Use function result decl in
5958 preference to function decl.
5960 2003-10-12 Richard Henderson <rth@redhat.com>
5962 * f95-lang.c (gfc_define_builtin): New const_p argument. Set
5963 TREE_READONLY. Update all callers.
5965 2003-10-12 Feng Wang <wf_cs@yahoo.com>
5967 * iresolve.c (gfc_resolve_cshift): Change to match implementation.
5968 * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
5969 (gfc_is_intrinsic_libcall): Add CSHIFT.
5971 2003-10-12 Richard Henderson <rth@redhat.com>
5973 * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
5974 (gfc_trans_array_constructor_value): Likewise.
5975 (gfc_conv_array_initializer): Likewise.
5976 * trans-stmt.c (gfc_trans_character_select): Likewise.
5978 2003-11-12 Kejia Zhao <kejia_zh@yahoo.com.cn>
5980 * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
5982 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
5984 * check.c (gfc_check_repeat): Check arguments are scalar.
5985 (gfc_check_trim): New function.
5986 * intrinsic.h (gfc_check_trim): Add prototype.
5987 * intrinsic.c (add_functions): Use it.
5988 * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
5990 * trans-decl.c: Ditto.
5991 (gfc_build_intrinsic_fucntion_decls): Set them.
5992 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
5993 (gfc_conv_intrinsic_trim): New function.
5994 (gfc_conv_intrinsic_repeat): New function.
5995 (gfc_conv_intrinsic_function): Use them.
5997 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
5999 * trans-types.c (gfc_sym_type): Handle result variables.
6001 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
6003 * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
6004 gfc_get_character_type.
6006 2003-10-11 Feng Wang <wf_cs@yahoo.com>
6008 * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
6010 2003-10-11 Paul Brook <paul@nowt.org>
6012 * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
6013 (gfc_resolve_dprod): New function.
6014 (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
6015 * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
6016 (gfc_resolve_dprod): Declare.
6017 * intrinsic.c (add_functions): Use them.
6018 * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
6020 2003-10-06 Richard Henderson <rth@redhat.com>
6022 * f95-lang.c (gfc_init_builtin_functions): Add clzll.
6023 * trans-intrinsic.c (call_builtin_clz): Use it.
6025 2003-10-05 Paul Brook <paul@nowt.org>
6027 * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
6028 * trans-decl.c (gfc_generate_function_code): Set
6029 cfun->function_end_locus.
6031 2003-09-24 Jason Merrill <jason@redhat.com>
6033 * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
6036 2003-09-21 Lifang Zeng <zlf605@hotmail.com>
6037 Paul Brook <paul@nowt.org>
6039 * Make-lang.in (F95_OBJS): Add fortran/data.o.
6040 * array.c (gfc_inser_constructor): New function.
6041 (gfc_get_constructor): New function.
6042 (gfc_free_constructor): Initialize offset and repeat.
6043 (iterator_stack): Remove.
6044 (expand_info): Add offset, component and repeat fields.
6045 (expand_constructor): Set them.
6046 (expand): Set new fields.
6047 (gfc_copy_constructor): Ditto. Avoid recursion.
6048 * gfortran.h: Add prototypes for new functions.
6049 (gfc_constructor): Add offset, component and repeat.
6050 (iteratio_stack): Move to here.
6051 * resolve.c (check_data_variable): Convert data values into variable
6053 (traverse_data_list): Build implicit loop chain.
6054 (gfc_resolve): Ditto.
6055 * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
6056 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
6057 * trans-expr.c (gfc_conv_structure): Handle array initializers.
6058 (gfc_conv_expr): Update to match.
6059 * trans.h (gfc_conv_structure): Declare.
6062 2003-09-20 Kejia Zhao <kejia_zh@yahoo.com.cn>
6064 * trans.h: Add declarations for gfor_fndecl_si_kind and
6065 gfor_fndecl_sr_kind.
6066 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
6067 * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
6068 (g95_conv_intrinsic_sr_kind): New function.
6069 (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
6072 2003-09-17 Lars Segerlund <Lars.Segerlund@comsys.se>
6074 * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
6075 instead of _4 and _8 as postfix for libgfortran calls.
6077 2003-09-16 Paul Brook <paul@nowt.org>
6079 * array.c (compare_bounds): New function.
6080 (gfc_compare_array_spec): Use it.
6082 2003-09-14 Paul Brook <paul@nowt.org>
6084 * primary.c (gfc_match_rvalue): Make sure sym->result is set.
6085 * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
6087 2003-09-14 Paul Brook <paul@nowt.org>
6089 * check.c (dim_rank_check): Allow assumed bounds if requested.
6090 (gfc_check_lbound): Call it.
6091 (gfc_check_ubound): Ditto.
6092 (gfc_check_size): Change to match.
6093 * simplify.c (gfc_simplify_bound): New function.
6094 (gfc_simplify_lbound): New function.
6095 (gfc_simplify_ubound): New function.
6096 * intrinsic.h: Declare them.
6097 * intrinsic.c (add_functions): Use them.
6099 2003-09-14 Paul Brook <paul@nowt.org>
6101 * io.c (format_lex): Initialize negative_flag.
6102 (check_format): Intialize repeat.
6103 * trans-io.c (gfc_new_nml_name_expr): Declare static.
6104 (gfc_new_var_expr): Ditto.
6106 2003-09-14 Paul Brook <paul@nowt.org>
6108 * trans-array.c (gfc_conv_array_initializer): Handle derived types.
6109 * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
6111 2003-09-12 Paul Brook <paul@nowt.org>
6113 * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
6115 2003-09-12 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
6117 * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
6118 for a correct expression.
6120 2003-09-10 Kejia Zhao <kejia_zh@yahoo.com.cn>
6122 * trans-intrinsic.c (real_compnt_info): New struct.
6123 (prepare_arg_info): New function.
6124 (gfc_conv_intrinsic_set_exponent): New function.
6125 (gfc_conv_intrinsic_scale): New function.
6126 (gfc_conv_intrinsic_nearest): New function.
6127 (gfc_conv_intrinsic_fraction): New function.
6128 (gfc_conv_intrinsic_exponent): New function.
6129 (gfc_conv_intrinsic_spacing): New function.
6130 (gfc_conv_intrinsic_rrspacing): New function.
6131 (gfc_conv_intrinsic_function): Use them.
6133 2003-08-24 XiaoQiang Zhang (zhangapache@yahoo.com>
6135 * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
6136 build_int_2 changed from (high, low) to (low, high).
6137 * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
6138 ioparm_namelist_read_mode, iocall_set_nml_val_int,
6139 iocall_set_nml_val_float, iocall_set_nml_val_char,
6140 iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
6141 (gfc_build_io_library_fndecls): Add variable initialization.
6142 (gfc_new_nml_name_expr, get_new_var_expr): New function.
6143 (build_dt): Add namelist support.
6144 * io.c (value): New variable.
6145 (check_format): Support FMT_H now.
6147 2003-09-07 Paul Brook <paul@nowt.org>
6149 * io.c (gfc_resolve_dt): Error if format label is not defined.
6151 2003-09-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
6153 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
6154 about case_switch's break. The other is about building the condition
6155 statement tree, which judges the argument in the range of the
6156 corresponding integer type.
6157 * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
6158 for the large values.
6160 2003-09-05 Paul Brook <paul@nowt.org>
6162 * f95-lang.c (expand_function_body): Gimplify the function.
6164 2003-09-04 Jeff Law <law@redhat.com>
6166 * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
6169 2003-09-04 Paul Brook <paul@nowt.org>
6171 * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
6172 (gfc_expand_stmt): New function.
6173 (LANG_HOOKS_RTL_EXPAND_STMT): Define.
6174 (expand_function_body): Use tree_rest_of_compilation.
6175 * trans-decl.c (gfc_generate_function_code): Don't free cfun.
6177 2003-09-03 Jeff Law <law@redhat.com>
6179 * f95-lang.c (gfc_init_builtin_functions): C arrays start at
6182 2003-08-30 Paul Brook <paul@nowt.org>
6184 * f95-lang.c (builtin_function): Remove #if 0 code.
6185 (gfc_define_builtin): New function.
6186 (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
6187 * mathbuiltins.def: New file.
6188 * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
6189 (gfc_intrinsic_map): Use mathbuiltins.def.
6190 (gfc_intrinsic_builtin_t): Remove.
6191 (gfc_build_intrinsic_lib_fndecls): Update.
6192 * trans-types.c (gfc_init_types): Remove redundant initilaization of
6193 signed_size_type_node.
6195 2003-08-29 Paul Brook <paul@nowt.org>
6197 * arith.c (gfc_real_kinds): Use correct minimum exponents.
6199 2003-08-22 Kejia Zhao <kejia_zh@yahoo.com.cn>
6201 * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
6202 (gfc_conv_intrinsic_function): Add MODULO.
6204 2003-08-22 Jason Merrill <jason@redhat.com>
6206 * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
6208 2003-08-22 Andreas Jaeger <aj@suse.de>
6210 * Make-lang.in (f95.install-common): Add DESTDIR support.
6211 * (f95.install-info): Likewise.
6212 (f95.uninstall): Likewise.
6214 2003-08-19 Diego Novillo <dnovillo@redhat.com>
6216 * trans-types.c (gfc_init_types): Initialize
6217 signed_size_type_node with size_type_node.
6219 2003-08-18 Paul Brook <paul@nowt.org>
6221 * dependency.c (gfc_dependency): New enum.
6222 (check_another_array_ref): Remove.
6223 (gfc_get_array_from_component): Remove.
6225 (get_range): Remove.
6226 (get_no_of_elements): Use mpz_t, not mpf_t.
6227 (transform_sections): New function.
6228 (gfc_check_range_range): Rename ...
6229 (gfc_check_section_vs_section): ... to this. Use new function.
6230 (gfc_is_inside_range): Rewrite to match.
6231 (gfc_check_element_vs_section): Ditto.
6232 (gfc_check_element_vs_element): Ditto.
6234 (gfc_dep_resolver): Ditto. Remove unused parameter.
6235 * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
6236 gfc_check_element_vs_element, gfc_is_inside_range,
6237 gfc_get_array_from_component): Remove prototypes for static functions.
6238 (gfc_dep_resolver): Update prototype.
6239 * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
6241 2003-08-15 Paul Brook <paul@nowt.org>
6243 * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
6244 return values to parent scope.
6245 (gfc_build_dummy_array_decl): Ditto.
6247 2003-08-14 Paul Brook <paul@nowt.org>
6249 * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
6250 size of the type, not the pointer.
6251 * resolve.c (resolve_symbol): Give more accurate error message.
6253 2003-08-10 Paul Brook <paul@nowt.org>
6255 * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
6257 2003-08-10 Paul Brook <paul@nowt.org>
6259 * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
6262 2003-08-10 Chun Huang <compiler@sohu.com>
6264 * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
6265 (resolve_symbol): Ditto.
6266 * trans-expr.c (gfc_conv_statement_function): New function.
6267 (gfc_conv_function_expr): Use it.
6269 2003-08-10 Paul Brook <paul@nowt.org>
6271 * trans-array.c (gfc_conv_ss_startstride): Handle functions.
6272 (walk_function_expr): Set section rank.
6273 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
6275 2003-08-10 Paul Brook <paul@nowt.org>
6277 * intrinsic.c (add_sym): Prefix names with correct string.
6278 (add_sym_0s): New function.
6279 (add_subroutines): Register abort.
6281 2003-08-10 Erik Schnetter <schnetter@uni-tuebingen.de>
6283 * gfortran.h: Introduce options to control the mangling.
6284 * lang.opt: Likewise.
6285 * options.c (gfc_init_options): Handle the options.
6286 * trans-common.c (gfc_sym_mangled_common_id): New function.
6287 (gfc_build_common_decl): Call it.
6288 * trans-decl.c (gfc_sym_mangled_function_id): New function.
6289 (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
6291 2003-08-09 Paul Brook <paul@nowt.org>
6293 * module.c (mio_symbol): Always ouput a namespace for formal args.
6294 (load_needed): Namespace now belong to their proper symbol.
6295 (gfc_dump_module): Change G95=>GFORTRAN.
6297 2003-08-05 Paul Brook <paul@nowt.org>
6299 * options.c: Force -fg77-calls.
6301 2003-08-02 Paul Brook <paul@nowt.org>
6303 * Makelang.in: Rename G95_* to GFORTRAN_*.
6304 * All sources: Rename G95_* to GFC_*.
6306 2003-08-01 Paul Brook <paul@nowt.org>
6308 * fortran/Make-lang.in: Use GMPLIBS.
6309 * fortran/config-lang.in: Set need_gmp.
6310 * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
6312 2003-07-27 Andreas Jaeger <aj@suse.de>
6314 * trans-decl.c (gfc_generate_constructors): Convert prototype to
6316 * trans-const.c (gfc_init_constants): Likewise.
6317 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
6319 * gfortranspec.c: Convert to ISO C90.
6320 (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
6322 2003-07-26 Paul Brook <paul@nowt.org>
6324 * lang.opt: Add -fdump-parse-tree.
6325 * options.c (gfc_handle_option): Ditto.
6326 * resolve.c (resolve_forall_iterators): Convert to proper type.
6327 * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
6329 2003-07-26 Paul Brook <paul@nowt.org>
6331 * Makefile.in: Add build dependencies on files common with rest of gcc.
6333 2003-07-26 Lifang Zeng <zlf605@hotmail.com>
6335 * trans.h: Declare g95_trans_pointer_assignment.
6336 * trans-expr.c (g95_trans_pointer_assignment): New function.
6337 (g95_trans_pointer_assign): Use it.
6338 * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
6339 (g95_trans_pointer_assign_need_temp): New function.
6341 2003-07-26 Paul Brook <paul@nowt.org>
6343 * gfortran.texi: Replace references to g95.
6345 2003-07-26 Paul Brook <paul@nowt.org>
6347 Rename g95_* to gfc_*.
6349 2003-07-25 Paul Brook <paul@nowt.org>
6351 * gfortran.h: Rename from g95.h.
6352 * trans-types.c (boolean_type_node, booelan_true_node,
6353 boolean_false_node): Remove.
6354 * trans-types.h: Ditto.
6356 2003-07-25 Chun Huang <compiler@sohu.com>
6358 * parse.c (accept_statement): Implement BLOCK DATA statement.
6359 * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
6362 2003-07-24 Lifang Zeng <zlf605@hotmail.com>
6364 * trans-stmt.c (temporary_list): Define.
6365 (g95_trans_assign_need_temp): New function.
6366 (g95_trans_forall_1): Modified for WHERE.
6367 (g95_trans_where_assign): Modified.
6368 (g95_trans_where_2): Modified.
6369 (g95_evaluate_where_mask): Modified.
6370 (g95_trans_where): Modified.
6371 (g95_get_temp_expr): Removed.
6372 (g95_add_to_where_stmt_list): Removed.
6373 (compute_overall_iter_number): Modified for WHERE.
6374 * trans.h: Remove where_stmt_list.
6376 2003-07-24 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6378 * lang.opt: Correct description of options -J and -M.
6380 2003-07-23 Steven Bosscher <steven@gcc.gnu.org>
6382 * lang.opt: Move help text to here.
6383 * lang-options.h: Remove.
6385 2003-07-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6386 * iresolve.c (g95_resolve_transpose): Proper variable in switch.
6387 * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
6390 2003-07-22 Steven Bosscher <steven@gcc.gnu.org>
6391 Paul Brook <paul@nowt.org>
6393 * check.c (check_rest): Use global pedantic flag.
6394 * io.c (data_desc): Ditto.
6395 * error.c (g95_warning, g95_warning_now): Use global flag.
6396 * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
6397 (expand_function_body): Update to new prototypes.
6398 (g95_init): Use new option names.
6399 * g95.h (g95_option_t): Standardize names.
6400 (g95_init_options, g95_handle_option): Update prototypes.
6401 * interface.c: Use new option names.
6408 * simplify.c: Ditto.
6410 * trans-array.c: Ditto.
6411 * trans-expr.c: Ditto.
6412 * trans-types.c: Ditto.
6413 * trans-decl.c: Ditto.
6414 (g95_build_library_function_decl): Remove obsolete VPARAMS.
6416 * options.c (g95_display_help): Remove.
6417 (g95_init_options): Convert to new scheme.
6419 (g95module_option): Ditto, rename from g95_parse_arg.
6420 (g95_handle_module_path_options): New function.
6421 * trans-equivalence.c: Fix error message.
6422 * lang.opt: Corrections.
6424 2003-07-21 Steven Bosscher <steven@gcc.gnu.org>
6426 * lang.opt: New file.
6428 2003-07-21 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6430 * decl.c (match_attr_spec): Set colon_seen.
6432 2003-07-14 Paul Brook <paul@nowt.org>
6434 * trans-array.c: Update comment.
6435 (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
6436 * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
6437 minmaxloc,minmaxval): Ditto.
6438 * trans-io.c (g95_trans_transfer): Ditto.
6439 * trans-stmt.c: Remove unneeded prototypes.
6440 (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
6441 (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
6442 (compute_inner_temp_size): Remove bits of dead code. Add comments.
6443 Don't share loopinfo.
6444 (compute_overall_iter_number): Declare as static.
6445 (allocate_temp_for_forall_nest): Ditto.
6446 (g95_trans_forall_1): Don't pass shared loopinfo.
6447 * trans.c (g95_start_block): Expand comment.
6449 2003-07-12 Paul Brook <paul@nowt.org>
6451 * arith.c (g95_index_integer_kind): Remove unused initializer.
6452 * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
6453 index by size of element.
6454 (generate_loop_for_rhs_to_temp): Ditto.
6455 (allocate_temp_for_forall_nest): Use element size, not index size.
6457 2003-07-11 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6459 * arith.c (g95_index_integer_kind): Add a TODO.
6460 * simplify.c (g95_simplify_nearest): Add a TODO.
6462 2003-07-09 Chun Huang <compiler@sohu.com>
6464 * trans.h: Add declarations for gfor_fndecl_string_scan and
6465 gfor_fndecl_string_verify.
6466 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
6467 * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
6468 (g95_conv_intrinsic_verify): New function.
6469 (g95_conv_intrinsic_function): Add SCAN and VERIFY.
6470 * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
6471 of parameter 'BACK=.TRUE.'
6473 2003-07-05 Lifang Zeng <zlf605@hotmail.com>
6475 * trans-stmt.c (iter_info, forall_info): Define.
6476 (g95_trans_forall_block): Remove.
6477 (g95_trans_forall_loop): Use forall info blocks.
6478 (g95_trans_nested_forall_loop): New function.
6479 (g95_do_allocate): Handle things other than logical masks.
6480 (generate_loop_for_temp_to_lhs): New function.
6481 (generate_loop_for_rsh_to_temp): New function.
6482 (compute_inner_temp_size): New function.
6483 (compute_overall_iter_number): New function.
6484 (allocate_temp_for_forall_nest): New function.
6485 (g95_trans_forall): Move body ...
6486 (g95_trans_forall_1): ... to here. Handle loops with temporaries.
6488 2003-07-02 Paul Brook <paul@nowt.org>
6490 * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
6491 in correct scope. Change callers to match.
6492 * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
6493 * iresolve.c (g95_resolve_reshape): Only use constant shapes.
6495 2003-07-02 Paul Brook <paul@nowt.org>
6497 * trans-array.c (g95_conv_loop_setup): Remove dead var. Use
6498 expression shape for all expressions.
6499 * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
6501 2003-07-03 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6503 * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
6504 g95_parse_arg), intrinsic.c (g95_convert_type): support of
6506 * intrinsic.c, g95.h: Add g95_convert_type_warn,
6507 * resolve.c (g95_resolve_index): Call it.
6509 2003-07-02 Paul Brook <paul@nowt.org>
6511 * iresolve.c (g95_resolve_reshape): Set expression shape.
6512 (g95_resolve_shape): Ditto.
6513 * simplify.c (g95_simplify_shape): Move common code outside condition.
6514 * trans-array.c (g95_conv_array_initializer): Teach it how to count.
6516 2003-07-01 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6518 * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
6521 2003-06-29 Paul Brook <paul@nowt.org>
6523 * array.c (g95_simplify_iterator_var): Don't bother with return value.
6524 * expr.c (find_array_element, find_component_ref): New functions.
6525 (remove_subobject_ref): New function.
6526 (simplify_const_ref): Use them. Rename from simplify_component_ref.
6527 (simplify_ref_chain): New function.
6528 (g95_simplify_expr): Use it. Simplify parameter variable subobjects.
6529 (g95_specification_expr): Simplify the expression.
6530 * resolve.c (resolve_operator): Check simplifications return code.
6531 (g95_resolve_expr): Ditto.
6533 2003-06-26 Paul Brook <paul@nowt.org>
6535 * expr.c (simplify_component_ref): New function.
6536 (g95_simplify_expr): Use it.
6537 * resolve.c (resolve_structure_cons): Handle references.
6539 2003-06-25 Paul Brook <paul@nowt.org>
6541 * trans-io.c (build_dt): Handle internal units.
6543 2003-06-25 Canqun Yang <canqun@yahoo.com.cn>
6545 * trans-common.c (g95_build_common_decl): Array index range starts at 0.
6546 (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
6547 Use g95_array_index_type instead of integer_type_node.
6548 (g95_build_common_decl, g95_set_common_master_type): Use
6549 g95_character1_type_node instead of char_type_node.
6550 * trans-equivalence.c (g95_layout_local_equiv): As above.
6552 2003-06-24 Steven G. Kargl <kargls@attbi.com>
6554 * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
6555 remove last remains of -fquiet.
6557 2003-06-22 Paul Brook <paul@nowt.org>
6559 * resolve.c (resolve_operator): Don't fail if we can't simplify.
6560 (g95_resolve_expr): Ditto.
6561 (resolce_code): Mark as static.
6562 * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
6563 gimplifer doesn't (yet).
6565 2003-06-20 Paul Brook <paul@nowt.org>
6567 * g95.h: Add ST_PAUSE and EXEC_PAUSE.
6568 * match.c (g95_match_if): Add ST_PAUSE.
6569 (g95_match_stopcode): New function.
6570 (g95_match_pause, g95_match_stop): Use it.
6571 * parse.c (g95_ascii_statement): Handle ST_PAUSE.
6572 (decode_stmt, next_statement, parse_executable): Ditto.
6573 * resolve.c (resolve_code): Ditto.
6574 * st.c (g95_free_statement): Ditto.
6575 * trans-stmt.c (g95_trans_pause): New function.
6576 * trans-stmt.h: Declare it.
6577 * trans.c (g95_trans_code): Use it.
6578 * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
6580 (g95_build_builtin_function_decls): Initialize them.
6582 * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
6584 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6586 * io.c (g95_match_open , g95_match_close, g95_match_inquire,
6587 match_filepos): Fix error handling.
6589 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6591 * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
6592 Add assertions on arguments.
6593 * resolve.c (expression_shape): Remove useless &.
6594 * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
6595 g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
6596 g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
6597 g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
6598 g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
6599 g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
6600 (g95_simplify_not, g95_simplify_scale): Add assertions.
6602 2003-06-15 Paul Brook <paul@nowt.org>
6604 Clean up stuff to work with the ssa optimizers.
6605 * convert.c (convert): Handle BOOLEAN_TYPEs.
6606 * f95-lang.c (g95_truthvalue_conversion): Implement.
6607 * trans-array.c (g95_trans_array_constructor_value): Group multiple
6609 * trans.h (g95_truthvalue_conversion): Declare.
6610 * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
6611 * trans-stmt.c (g95_trans_character_select): Don't create array
6612 assignments. Mark labels as indirect jump targets.
6613 * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
6614 (g95_get_dtype_cst): Handle LOGICAL types.
6616 2003-06-14 Paul Brook <paul@nowt.org>
6618 * f95-lang.c (g95_gimplify_expr): New function.
6619 * trans-array.c (g95_trans_array_constructor_value): Don't create
6621 (g95_conv_expr_descriptor): Rename simple->gimple.
6622 * trans-expr.c (conv_expr_op): Use proper logical operators.
6623 * trans-intrinsic.c (build_fixbound_expr): New function.
6624 (build_fix_expr): Ditto.
6625 (g95_conv_intinsic_aint): Use them. Use builtin functions.
6626 (g95_conv_intrinsic_function): Add FLOOR and CEILING.
6628 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6630 * array.c (g95_compare_array_spec): Remove unreachable code.
6631 * expr.c (g95_copy_expr): Likewise.
6632 * intrinsic.c (g95_convert_type): Likewise.
6633 * misc.c (g95_code2string): Likewise.
6634 * simplify.c (g95_simplify_ishft, g95_simplify_real,
6635 g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
6636 * trans-stmt.c (g95_trans_select): Likewise.
6637 * primary.c (extend_ref): Add an assertion.
6638 * simplify.c (g95_convert_constant): Add const.
6639 * intrinsic.h: Remove g95_check_x_ni.
6640 * f95-lang.c (g95_finish): Call g95_release_include_path.
6642 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6644 * resolve.c (resolve_contained_functions): Fix typo introduced on
6647 2003-06-09 Paul Brook <paul@nowt.org>
6649 * g95.h: Include system.h not hwint.h.
6650 * many: use safe-ctype.h not ctype.h. Change isalpha -> ISALPHA, etc.
6651 * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
6653 2003-06-09 Paul Brook <paul@nowt.org>
6655 * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
6656 * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
6657 * trans-decl.c (g95_add_decl_to_functions): Make non-static.
6658 (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
6659 (g95_generate_function_code): Translate COMMON and EQUIVALENCE
6661 * trans.h (g95_trans_equivalence, g95_trans_common,
6662 g95_add_decl_to_function): Declare.
6663 * trans-common.c, trans-equivalence.c: New files.
6665 2003-06-08 Steven Bosscher <steven@gcc.gnu.org>
6667 * intrinsic.c (g95_intrinsic_extension): Remove.
6668 (add_functions): Substitute g95_check_x for g95_check_x_ni
6670 (g95_init_expr_extensions): New function.
6671 (g95_intrinsic_func_interface): Use it.
6672 * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
6673 * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
6674 g95_check_precision, g95_check_present, g95_check_radix,
6675 g95_check_range, g95_check_selected_real_kind): Do not set
6676 g95_intrinsic_extension.
6677 (g95_check_x_ni): Remove now duplicate of g95_check_x.
6679 * expr.c (check_inquiry): Add FIXME, fixup some code style.
6681 2003-06-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6683 * g95.h (ref_type): Name this type explicitly.
6684 * module.c (MIO_NAME): Add specialisations of mio_name.
6685 (mio_symbol_attribute, mio_typespec, mio_array_ref,
6686 mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
6687 (ab_attribute): Name this type explicitly.
6688 (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
6690 2003-06-05 Kejia Zhao <kejia_zh@yahoo.com.cn>
6692 * trans-intrinsic.c (g95_conv_allocated): New function.
6693 (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
6695 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
6697 * f95-lang.c: Don't include g95-support.h
6698 (g95_mark_addressable): Add prototype.
6699 (g95_init_decl_processing): Remove C front end hack.
6700 * f95-tree.c: Remove file.
6701 * support.c: Remove file.
6702 * g95-support.h: Remove file.
6703 * trans-types.c (g95_init_types): Set up boolean
6704 type related tree nodes.
6705 * Make-lang.in: Remove rules for dead files and
6706 dependencies on them.
6708 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
6710 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
6711 C front end dependency. Also, convert.c does not depend on
6712 g95-support.h anymore.
6713 * convert.c: Don't include c-common.h and g95-support.h
6714 * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
6715 (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
6716 stmts_are_full_exprs_p, current_stmt_tree,
6717 current_scope_stmt_stack): Remove.
6718 * g95-support.h (unsigned_conversion_warning): Kill proto.
6719 (boolean_type_node, boolean_true_node, boolean_false_node):
6720 Don't define here. Instead, make then true tree nodes in
6722 * support.c (c_global_trees): Die, C front end, die!!!
6723 (g95_init_c_decl_hacks): Don't touch intmax_type_node,
6724 uintmax_type_node, string_type_node and const_string_type_node.
6725 (decl_constant_value, overflow_warning): Make static functions.
6726 They are in death row too, though.
6727 (default_conversion, c_expand_asm_operands): Remove.
6728 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
6729 trans.c: Don't include c-common.h.
6730 * trans-types.c (boolean_type_node, boolean_true_node,
6731 boolean_false_node): Make them real tree nodes.
6732 * trans-types.h (intmax_type_node, string_type_node,
6733 const_string_type_node): Hack to work around C dependencies
6734 in builtin-types.def.
6736 2003-06-04 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6738 * decl.c (decl_types): Add some iterators-like sentinels.
6739 * decl.c (match_attr_spec): Use them.
6740 Use "decl_types" instead of "int".
6741 Add cast in call to g95_match_strings.
6742 * dump-parse-tree.c (g95_show_namespace): Use "g95_intrinsic_op"
6744 * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
6745 (g95_interface_info): Use "g95_intrinsic_op".
6746 * dump-parse-tree.c (g95_show_namespace): Use them.
6747 * interface.c (g95_check_interfaces): Use them.
6748 * module.c (read_module, write_module): Use them.
6749 * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
6750 Use "g95_intrinsic_op".
6751 * interface.c (check_operator_interface): Use "g95_intrinsic_op".
6752 Add a default case in switch statement.
6753 * intrinsic.h (g95_generic_isym_id): Moved to...
6754 * g95.h (g95_generic_isym_id): here.
6755 (g95_intrinsic_sym): Use "g95_generic_isym_id".
6756 * intrinsic.c (make_generic): Use "g95_generice_isym_id".
6757 * trans-intrinsic.c (g95_intrinsic_map_t,
6758 g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
6759 * match.c (g95_match_intrinsic_op): Add cast in call to
6762 2003-06-03 Steven Bosscher <steven@gcc.gnu.org>
6764 * support.c (skip_evaluation, warn_conversion, lvalue_p,
6765 lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
6766 constant_fits_type_p, convert_and_check,
6767 unsigned_conversion_warning): Remove these ugly remnants
6768 we inherited from the C front end.
6769 (function_types_compatible): Remove '#if 0'-edcode.
6770 (build_modify_expr): Likewise.
6771 (convert_for_assignment): Don't use the deceased functions.
6772 The parameter fundecl is now unused.
6773 (decl_constant_value): Always just return decl. In fact
6774 this function is not used at present, but it might be in
6775 the future, when we start using the tree inliner.
6776 (overflow_warning, default_conversion, c_expand_asm_operands):
6777 Abort when these are called, they are part of the C type
6778 checking implementation and therefore poison to Fortran.
6780 2003-06-04 Steven Bosscher <steven@gcc.gnu.org>
6782 * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
6783 c-pretty-print.o and c-dump.o. Add a comment on why we
6784 depend on c-semantics.c.
6785 * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
6786 Don't use the C front end tree dumper hook to dump the
6787 language specific tree representation -- we don't have
6788 one. So instead, inherit the default langhook.
6790 2003-06-02 Paul Brook <paul@nowt.org>
6792 * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
6794 2003-06-02 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6796 * check.c (g95_check_associated): Use proper types. Remove
6797 extraneous argument in call to g95_error().
6799 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
6801 * resolve.c (resolve_operator): Make logical operands convert to the
6802 type with higher kind.
6804 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
6806 * check.c (g95_check_associated): Make sure both pointer and target has
6807 the same type and rank. Null pointer or array section with vector
6808 subscript as target are not allowed.
6809 * trans.h: Declare gfor_fndecl_associated.
6810 * trans-decl.c: (g95_build_builtin_function_decls): Initialize
6811 gfor_fndecl_associated.
6812 * trans-intrinsic.c (g95_conv_associated): New function.
6813 (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
6815 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
6817 * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
6818 according to POINTER itself rather than TARGET.
6819 (g95_conv_expr_descriptor): Make lbound start at 1.
6820 * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
6822 2003-06-01 Paul Brook <paul@nowt.org>
6824 * expr.c (g95_type_convert_binary): Make it match the standard.
6825 * g95.texi: Remove dead link.
6827 2003-06-01 Steven Bosscher <steven@gcc.gnu.org>
6829 * g95.texi: Cleanup somewhat in preparation for inclusion
6832 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6833 Canqun Yang <canqun@yahoo.com.cn>
6835 * resolve.c (compare_bound_int, resolve_where_shape): Proper return
6837 (g95_find_forall_index): Return proper value.
6838 (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
6839 compare the return value from g95_find_forall_index.
6841 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6842 * g95.h, io.c (g95_st_label): Remove "length".
6843 (g95_symtree): Remove "link".
6844 (g95_case): Remove "code".
6845 * arith.c, arith.h (g95_compare_string, g95_convert_integer,
6846 g95_convert_real): Make an argument pointer to const.
6847 * decl.c (colon_seen): Add a TODO.
6848 * interface.c (g95_compare_types): Fix typo.
6849 * interface.c (compare_interfaces): Preserve value of "p".
6850 * intrinsic.c (sort_actual): Remove "i".
6851 * match.c (g95_match_assign): Proper type in call to g95_match().
6852 * parse.c (next_free): Avoid duplicate call due to macro.
6853 * parse.c (check_statement_label): wrong type in call to g95_error.
6854 * primary.c (match_real_constant): Add a TODO.
6855 * resolve.c (resolve_select): Remove useless conditional.
6856 * simplify.c (g95_simplify_repeat): Proper assignment to
6857 "value.character.string".
6858 * simplify.c (g95_simplify_reshape): Wrong variable in call to
6861 2003-05-20 Canqun Yang <canqun@yahoo.com.cn>
6863 * trans-stmt.c: Remove unnecessary include file defaults.h.
6865 2003-05-19 Lifang Zeng <zlf605@hotmail.com>
6867 * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
6869 (g95_trans_forall): Allow arbitrary number of FORALL indexes and
6870 actual variables used as FORALL indexes.
6872 2003-05-15 Paul Brook <paul@nowt.org>
6874 * trans-array.c (g95_trans_static_array_pointer): Use
6876 (g95_trans_deferred_array): Initialize static array pointers.
6877 * trans-expr.c (g95_conv_function_call): Use formal arglist to
6878 correctly pass POINTER and absent CHARACTER arguments.
6880 2003-05-14 Lifang Zeng <zlf605@hotmail.com>
6882 * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
6883 (g95_resolve_forall_body): Resolve FORALL body.
6884 (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
6885 (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
6886 (g95_find_forall_index): Check whether the FORALL index appears in
6887 the expression or not.
6888 (resolve_code): Modified.
6890 2003-05-14 Paul Brook <paul@nowt.org>
6892 * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
6894 2003-05-13 Paul Brook <paul@nowt.org>
6896 * trans-types.c (g95_max_array_element_size): Now a tree node.
6897 (g95_init_types): Work out max size properly.
6898 (g95_get_dtype_cst): Modify to match.
6900 2003-05-11 Paul Brook <paul@nowt.org>
6902 * trans-io.c (add_case): Create a label decl for case labels.
6904 2003-05-11 Paul Brook <paul@nowt.org>
6906 * arith.c (g95_integer_index_kind): New variable.
6907 * f95-lang.c (g95_init): Move frontend initialization here ...
6908 (g95_post_options): ... from here.
6909 * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
6910 * intrinsic.c (add_functions): Use index kinds.
6911 * iresolve.c: Convert to index_kind where needed.
6912 * resolve.c (g95_resolve_index): Make public, use index_kind.
6913 (resolve_array_ref): Adjust to match.
6914 * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
6915 * trans-stmt.c: Ditto.
6916 * trans-types.c: Ditto.
6917 * trans-types.h (g95_array_index_kind): Remove declaration.
6918 * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
6920 2003-05-07 Paul Brook <paul@nowt.org>
6922 * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
6923 * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
6926 2003-05-07 Paul Brook <paul@nowt.org>
6928 * trans-array.c (trans_static_array_pointer,
6929 g95_trans_array_constructor_value, g95_conv_array_initializer,
6930 g95_conv_structure): CONSTRUCTOR nodes only have one operand.
6931 (g95_add_loop_ss_code): Convert subscripts to the correct type.
6932 * trans-stmt.c (g95_trans_character_select): Ditto.
6933 * trans-types.c (g95_init_types): Ditto.
6935 2003-05-07 Steven Bosscher <steven@gcc.gnu.org>
6937 * f95-lang.c (expand_function_body): Use input_line, not lineno.
6938 * trans-decl.c (g95_generate_function_code,
6939 g95_generate_constructors): Likewise.
6940 * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
6941 g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
6944 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
6945 * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
6946 with components point to the DERIVED type itself, and two DERIVED
6947 type with components point to each other.
6948 * trans-expr.c (g95_conv_componet_ref): Modified
6950 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
6951 * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
6953 (g95_trans_pointer_assign): Implement Nullify.
6955 2003-05-01 Paul Brook <paul@nowt.org>
6957 * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
6958 * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
6960 2003-05-01 Paul Brook <paul@nowr.org>
6962 * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
6963 trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
6966 2003-05-01 Canqun Yang <canqun@yahoo.com.cn>
6968 * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
6971 2003-04-28 Paul Brook <paul@nowt.org>
6973 * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
6974 as their kind suggests.
6975 (g95_resolve_reshape): Ditto.
6977 2003-04-28 Chun Huang <compiler@sohu.com>
6979 * trans-expr.c (g95_conv_substring_expr): New function.
6980 (g95_conv_expr): Use it.
6982 2003-04-28 Paul Brook <paul@nowt.org>
6984 * iresolve.c (g95_resolve_transpose): Make it match the
6986 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
6988 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
6990 * trans-types.c (g95_add_field_to_struct): New function to
6991 add a field to a UNION_TYPE or RECORD_TYPE.
6992 * trans-types.h (g95_add_field_to_struct): Prototype.
6993 (g95_get_derived_type): Use g95_add_field_to_struct to add
6995 * trans-io.c (g95_add_field): Remove.
6996 (ADD_FIELD): Use new g95_add_field_to_struct function.
6997 (ADD_STRING): Likewise.
6998 * trans-stmt.c (g95_trans_select): Likewise.
6999 (g95_add_field): Remove duplicated function.
7001 2003-04-18 Canqun Yang <canqun@yahoo.com.cn>
7003 Port implementation for CHARACTER SELECT from Andy's tree.
7004 * trans-stmt.c (g95_trans_character_select): Implement character
7005 select. (g95_add_field): New function.
7006 * trans-decl.c: Declare 'gfor_gndecl_select_string'.
7007 (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
7008 * g95.h (struct g95_case): Add field 'int n'.
7009 * trans.h: Declare 'gfor_fndecl_select_string'.
7011 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
7013 * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
7014 (g95_insert_bbd): Die on duplicates.
7015 * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
7017 2003-04-14 Steven Bosscher <steven@gcc.gnu.org>
7019 * g95.texi: Require GMP 4.0 -- like we actually
7020 do. Explain the testsuite and what-goes-where.
7021 Don't use undefined texinfo symbol. Break very
7022 long line. Remove finished item from the list
7025 2003-04-11 Canqun Yang <canqun@yahoo.com.cn>
7027 * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
7030 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
7032 * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
7033 (g95_trans_forall_body): New function.
7035 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
7037 * resolve.c (resove_where): New function.
7038 (resolve_where_shape): New function.
7039 (resolve_code): Add call to 'resolve_where'
7040 * trans-stmt.c (g95_trans_where): Modified.
7041 (g95_trans_where_2): New function.
7042 (g95_trans_where_assign): New function.
7043 (g95_evaluate_where_mask): New function.
7044 (g95_add_to_stmt_list): New function.
7045 (g95_get_temp_expr): New function.
7046 * trans.h (where_stmt_list): New structure.
7048 2003-04-10 Paul Brook <paul@nowt.org>
7050 * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
7051 (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
7053 2003-04-10 Steven Bosscher <steven@gcc.gnu.org>
7055 Update after mainline -> tree-ssa-branch merge.
7056 * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
7058 (g95_init): Update for new lang_hooks definition.
7059 (g95_post_options): New langhook.
7060 (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
7061 * scanner.c (g95_new_file): Comment update.
7063 2003-04-09 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7065 * g95.h, lang-options.h: Add -Wimplicit-interface.
7066 * options.c (g95_init_options, g95_parse_arg): Set it.
7067 * interface.c (check_intents): Warn about call with implicit
7069 * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
7072 2003-04-05 Paul Brook <paul@nowt.org>
7074 * iresolve.c (g95_resolve_spread): Don't resole based on type.
7075 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
7077 2003-03-29 Paul Brook <paul@nowt.org>
7079 * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
7080 (g95_resolve_unpack): Ditto.
7081 * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
7082 (g95_conv_intrinsic_function): Use it. Remove PACK and UNPACK.
7083 (g95_is_intrinsic_libcall): Add PACK and UNPACK.
7085 2003-03-25 Paul Brook <paul@nowt.org>
7087 * arith.c (g95_unary_user, g95_user): Remove dead functions.
7089 * array.c (g95_free_array_ref): Ditto.
7091 * symbol.c (g95_use_derived_tree): Ditto.
7092 * intrinsic.c (add_functions): Use simplification for SCALE.
7093 * primary.c (g95_match_rvalue): Test sym, not symtree.
7095 2003-03-25 Paul Brook <paul@nowt.org>
7097 * trans-decl.c (build_function_decl): Add parameter before it gets
7098 turned into a constant.
7099 * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
7100 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
7101 * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
7103 2003-03-22 Paul Brook <paul@nowt.org>
7105 * trans-array.c (g95_conv_array_initializer): Allow scalar
7107 * trans-decl.c (g95_finish_var_decl): Result variables are not
7109 * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
7110 (g95_conv_intrinsic_function): Use it.
7111 * trans-types.h (g95_type_spec): Remove dead declaration.
7113 2003-03-21 Paul Brook <paul@nowt.org>
7115 * trans-decl.c (g95_build_function_decl): Mark string parameters.
7117 2003-03-20 Paul Brook <paul@nowt.org>
7119 * trans-decl.c (g95_build_function_decl): Put character length
7120 parameters at the end of the function declaration.
7121 * trans-expr.c (g95_conv_function_call): Ditto.
7122 * trans-types.c (g95_get_function_type): Ditto.
7124 2003-03-20 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7126 * resolve.c (resolve_formal_arglist): Don't impose intent for
7127 procedure arguments of pure functions.
7128 (resolve_select): Remove redundant assignment.
7130 2003-03-19 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7132 * arith.c (validate_logical), g95.h, options.c (g95_init_options):
7134 * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
7135 * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
7137 * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
7139 * symbol.c (g95_add_type): Fix typo in comment.
7142 2003-03-16 Paul Brook <paul@nowt.org>
7144 * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
7145 * expr.c (g95_build_call): Remove.
7146 * f95-lang.c (puchdecl_top_level): New function.
7147 * g95.h (g95_code): Store resolved symbol, not just the name.
7148 * intrinsic.c (g95_intrinsic_namespace): New global namespace.
7149 (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
7150 (g95_get_intrinsic_sub_symbol): New function.
7151 * iresolve.c (g95_resolve_cpu_time): Use it.
7152 (g95_resolve_random_number): Ditto.
7153 * resolve.c: Set code->resolved_sym instead of code->sub_name.
7154 * trans-decl.c (g95_get_extern_function_decl): Give external decls
7155 the correct DECL_CONTEXT. Add global symbold to the global scope.
7156 * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
7159 2003-03-16 Paul Brook <paul@nowt.org>
7161 * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
7162 * options.c (g95_parse_arg): Ditto.
7163 * module.c (mio_symbol_attribute): Handle the always_explicit bit.
7164 * resolve.c (resolve_formal_arglist): The always_explicit sould be set
7165 for the procedure, not the parameter.
7166 * trans-array.c (g95_trans_g77_array): New function.
7167 (g95_trans_assumed_size): Use it.
7168 (g95_trans_dummy_array_bias): Ditto.
7169 (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
7170 (g95_conv_expr_descriptor): ... to here. Update callers.
7171 * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
7172 (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
7173 * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
7174 * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
7175 * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
7176 (g95_sym_type): Ditto.
7178 2003-03-15 Paul Brook <paul@nowt.org>
7180 * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
7182 * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
7184 2003-03-14 Paul Brook <paul@nowt.org>
7186 * trans-array.c (g95_array_is_packed): Remove.
7187 (g95_conv_array_base): Correctly handle all descriptorless cases.
7188 (g95_conv_array_stride): Use descriptorless strides.
7189 (g95_trans_dummy_array_bias): Don't always repack the array.
7190 (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
7192 * trans-types.c (g95_get_nodesc_array_type): Differentiate between
7193 dummy and non-dummy arrays...
7194 (g95_sym_type, g95_get_derived_type): ... like these.
7195 (g95_get_array_type_bounds): Allow discontiguous arrays.
7197 2003-03-12 Paul Brook <paul@nowt.org>
7199 * array.c (g95_resolve_array_spec): Fix comment.
7200 * g95.h (symbol_attributes): New flag always_explicit.
7201 * resolve.c (resolve_formal_arglist): Set it always_explicit.
7202 * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
7203 * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
7204 (g95_trans_array_bounds): Allow assumed shape arrays.
7205 (g95_trans_repack_array): Remove.
7206 (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
7207 * trans-decl.c (g95_build_qualified_array): Only ignore absent
7208 bounds for assumed size arrays.
7209 (g95_build_dummy_array_decl): Use descriptorless arrays.
7210 * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
7211 (g95_trans_pointer_assign): Fix typo.
7212 * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
7214 (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
7215 * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
7216 Also modify callers.
7217 * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
7219 2003-03-08 Paul Brook <paul@nowt.org>
7221 * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
7222 (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
7223 * resolve.c (compare_spec_to_ref): Allow full array sections.
7225 2003-03-08 Paul Brook <paul@nowt.org>
7227 * expr.c (g95_simplify_expr): Also simplify array index and
7228 substring expressions.
7229 * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
7230 * trans-array.c (g95_trans_array_bounds): New function.
7231 (g95_trans_auto_array_allocation): Use it.
7232 (g95_trans_assumed_size): Rewrite.
7233 * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
7234 (gfor_fndecl_repack): Remove.
7235 (g95_build_qualified_array): Handle absent upper bounds.
7236 (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
7237 (g95_get_symbol_decl): Update.
7238 (g95_build_intrinsic_function_decls): Initialize new decls.
7239 * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
7240 (gfor_fndecl_repack): Remove.
7241 * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
7242 * trans-types.c: (g95_build_array_type): Merge duplicated code..
7243 (g95_get_nodesc_array_type): Handle absent bounds.
7244 * trans-types.h (g95_get_nodesc_array_type): Declare.
7246 2003-03-04 Paul Brook <paul@nowt.org>
7248 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
7251 2003-03-02 Paul Brook <paul@nowt.org>
7253 * options.c (g95_init_options): Drfault to 1.
7254 (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
7255 * trans-array.c (g95_conv_array_data, g95_conv_array_base,
7256 g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
7257 Handle non-constant size automatic arrays.
7258 (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
7259 generic bound functions.
7260 (g95_trans_auto_array_allocation): Don't create a descriptor.
7261 (g95_trans_assumed_size): New function (broken).
7262 (g95_trans_dummy_array_bias): Remove unused var.
7263 * trans-array.h (g95_trans_assumed_size): Declare.
7264 * trans-decl.c (create_index_var): New fuction.
7265 (g95_build_qualified_array): New function.
7266 (g95_get_symbol_decl): Use it.
7267 (g95_trans_deferred_vars): Handle assumed shape seperately.
7268 * trans-types.c (get_element_type): Handle heap allocated arrays.
7269 (g95_is_nodesc_array): Include non-const size arrays.
7270 (g95_get_nodesc_array_type): Ditto.
7272 2003-02-23 Paul Brook <paul@nowt.org>
7274 * trans-array.c (g95_array_init_size): Should use stride, not size of
7277 2003-02-18 Paul Brook <paul@nowt.org>
7279 * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
7280 after intrinsic function check.
7282 2003-02-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7284 * io.c (match_io): Fix missing return value and remove useless
7286 * match.c (g95_match): Remove useless assignment.
7287 * module.c (parse_string): Remove useless post increment.
7288 * simplify.c (g95_simplify_verify): Remove useless assignment.
7290 2003-02-15 Paul Brook <paul@nowt.org>
7292 * expr.c (restricted_intrinsic): Handle bad values gracefully.
7293 * g95.h (symbol_attribute): Add referenced member.
7294 (g95_symbol): Add dummy_order member.
7295 (g95_set_sym_referenced): Declare.
7296 * match.c (g95_match_assignment, g95_match_call): Use it
7297 * primary.c (match_actual_arg, g95_match_rvalue,
7298 g95_match_variable): Ditto.
7299 * symbol.c (next_dummy_order): New variable.
7300 (g95_set_sym_referenced): New function.
7301 (check_done): New function.
7302 (g95_add_*): Use it.
7303 * trans-decl.c: Make formatting conform to GCC standards.
7304 (g95_defer_symbol_init): Add dummy variables in the right order.
7305 (g95_get_symbol_decl): Only accept referenced variables.
7306 (g95_create_module_variable): Module variables are always required.
7307 (generatr_local_decls): New function.
7308 (generate_local_vars): New function.
7309 (g95_generate_function_code): Use it.
7311 2003-02-13 Paul Brook <paul@nowt.org>
7313 * trans-decl.c (g95_conv_struct_cons): Remove.
7314 (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
7315 * trans-expr.c (g95_conv_structure): New function.
7316 (g95_conv_expr): Use it.
7318 2003-02-09 Paul Brook <paul@nowt.org>
7320 * trans-array.c (g95_array_init_size): Don't evaluate the linit
7321 expressions multiple times.
7322 (g95_trans_auto_arry_allocation): Use pointer not tmp.
7324 2003-02-08 Paul Brook <paul@nowt.org>
7326 * module.c (mio_symtree_ref): Declare as static.
7327 (mio_expr): Remove dead code.
7328 (read_module): Set the symtree link for fixups.
7329 * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
7330 (build_round_expr): ... to this.
7331 (g95_conv_intrinsic_aint): New function.
7332 (g95_conv_intrinsic_function): Use it.
7334 2003-02-08 Paul Brook <paul@nowt.org>
7336 * trans-array.c (g95_trans_array_constructor_value): Use the acutal
7337 offset after modificaton, not the increment expression.
7338 * dependency.c: Kill excess whitespace.
7340 2003-02-07 Sanjiv Gupta <sanjivg@noida.hcltech.com>
7342 * dependency.h: Remove some function declarations.
7343 * dependency.c (get_no_of_elements): Change this function not to
7345 * other: Add comments for all modified functions.
7347 2003-02-06 Paul Brook <paul@nowt.org>
7349 * g95spec.c (lang_specific_functions): Fix initializer warning.
7350 * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
7351 for structure type names.
7352 * trans-decl.c (g95_cons_structure_cons): New function.
7353 (g95_get_symbol_decl): Use it.
7354 * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
7357 2003-02-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7359 * resolve.c (compare_cases): Add const to casts.
7361 2003-01-30 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7363 * g95.h (g95_check_f): Change a1 to f1m.
7364 * intrinsic.c (add_sym_1m, check_specific,
7365 g95_intrinsic_func_interface): Use it.
7367 * module.c (init_pi_tree): Remove useless cast.
7368 (fp2): Fix argument type.
7370 * parse.c (parse_select_block): Add comment.
7372 2003-02-05 Toon Moene <toon@moene.indiv.nluug.nl>
7374 * lang-options.h: Fix warning involving C90 concatenated
7377 2003-02-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
7378 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7380 * io.c (format_asterisk): Complete initializer to kill warning.
7381 * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
7382 DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
7383 (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
7384 new defines to complete initializers. Kills all warnings.
7386 * Make-lang.in: Comment cleanup.
7388 2003-02-05 Paul Brook <paul@nowt.org>
7390 * array.c (g95_free_constructor): Handle NULL expressions.
7391 * resolve.c (resolve_structure_cons): Ditto.
7392 * decl.c (g95_match_null): New Function.
7393 (variable_decl): Use it.
7394 * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
7395 * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
7396 * trans-types.c (g95_set_decl_attributes): Remove empty function.
7398 2003-02-05 Paul Brook <paul@nowt.org>
7400 * trans.h (build1_v): New macro.
7401 (build_v): Remove pointless and incorrect prototype.
7402 * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
7403 * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
7405 2003-02-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
7407 * Make-lang.in (F95_OBJS): Remove one more dead file.
7409 2003-02-01 Paul Brook <paul@nowt.org>
7411 * lang-specs.h: Don't pass -ffixed-form to the linker.
7412 * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
7414 2003-02-01 Paul Brook <paul@nowt.org>
7416 * Make-lang.in (F95_OBJS): Remove dead files.
7417 * trans-array.c (g95_array_init_size): Do the right thing when
7419 * trans-decl.c (g95_generate_function_code): Initialize deffered
7420 symbol list before translating contained subroutines.
7421 * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
7422 scalar invariant values here...
7423 (g95_conv_variable, g95_conv_function_call): ... instead of here ...
7424 * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
7426 2003-01-29 Paul Brook <paul@nowt.org>
7428 * trans-array.c (g95_add_loop_code): Put pre code in the right block.
7429 (g95_walk_elemental_function_args): Reverse chains before adding.
7430 (g95_reverse_ss): Move about a bit.
7431 * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
7434 2003-01-28 Paul Brook <paul@nowt.org>
7436 * intrinsic.c (resolve_intrinsic): Use correct union member.
7437 * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
7439 * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
7440 use associated variables.
7441 * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
7442 * trans-expr.c (g95_conv_expr_present): ... to here.
7443 * trans.h: Declare it.
7444 * trans-types.c (g95_sym_type): Assume subroutine if not specified.
7446 2003-01-28 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7448 * array.c (expand_iterator): Suppress useless assignment.
7449 * decl.c (match_char_spec): Ditto.
7450 * io.c (match_io_iterator): Ditto.
7451 * primary.c (match_real_constant): Ditto.
7452 * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
7453 Ditto. Also, use g95_intrinsic_op not int for intrinsic operators.
7454 * matchexp.c (match_add_operand, match_level_5): Likewise.
7455 * module.c (parse_atom, find_enum): Likewise.
7456 * resolve.c: move #include <string.h>
7457 (resolve_select): Fix serious typo.
7459 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.n>
7461 * Make-lang.in: Don't build with broken tree-ssa-pre.
7463 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.nl>
7465 * resolve.c (resolve_index): Add a TODO.
7466 * symbol.c: Remove useless "#include <ctype.h>".
7468 2003-01-27 Paul Brook <paul@nowt.org>
7470 * check.c (check_rest): Allow different type kinds as an extension.
7471 * g95.h (g95_resolve_f): Add f1m.
7472 * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
7473 * intrinsic.h: Chenge prototypes for MIN and MAX.
7474 * iresolve.c (g95_resolve_minmax): New function.
7475 (g95_resolve_min, g95_resolve_max): Use it.
7476 * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
7478 (g95_conv_intrinsic_present): Fix logic.
7480 2003-01-27 Steven Bossche <s.bosscher@student.tudelft.nl>
7482 * g95.h (g95_case): Don't be a tree, be a double linked list.
7483 * match.c (match_case_selector): Remove redundant semantics check.
7484 Clean up a few goto's to make it a tiny little bit faster.
7485 * resolve.c (case_tree): Die.
7486 (compare_cases): Accept and compare unbounded cases too.
7487 (check_case_overlap): Don't build a tree. Instead, merge-sort the
7488 whole list of g95_cases passed from resolve_select.
7489 (sane_logical_select): Die.
7490 (check_case_expr): Return FAILURE if a CASE label is of the wrong
7492 (resolve_select): Fixup case expression for computed GOTOs, put it
7493 in expr, not expr2, for easier handing in the parse tree dumper and
7494 the code generator. Rewrite the rest of the function: Kill
7495 unreachable case labels and unreachable case blocks.
7496 * dump-parse-tree.c (g95_show_code_node): Always dump expr for
7497 an EXEC_SELECT, not case2 anymore.
7498 * trans-const.c (g95_conv_constant_to_tree): New function.
7499 (g95_conv_constant): Use it.
7500 * trans-const.h: Declare prototype for the new function.
7501 * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
7502 g95_trans_character_select): New static functions.
7503 (g95_trans_select): Rewrite.
7505 2003-01-26 Paul Brook <paul@nowt.org>
7507 * intrinsic.c (add_fnctions): Properly add dreal.
7508 * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
7509 (g95_conv_intrinsic_function): Use it.
7510 * trans-io.c (build_dt): Abort on internal files (unimplemented).
7512 2003-01-26 Paul Brook <paul@nowt.org>
7514 Widespread changes to the handling of symbols in expressions. These
7515 are now linked via g95_symtree nodes.
7516 * parse.c (g95_fixup_sibling symbols): New function.
7517 (parse_contained): Use it.
7518 * g95.h (symbol_attribute): Add contained. Indicates a symbol is a
7519 contained procedure that has bee correctly fixed up.
7520 (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
7522 2003-01-24 Paul Brook <paul@nowt.org>
7524 * trans-array.c (g95_walk_expr): Function result attributes are in
7526 * trans-expr.c (g95_conv_function_call,
7527 g95_trans_arrayfunc_assign): Ditto.
7528 * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
7530 2003-01-23 Steven Bosscher <s.bosscher@student.tudelft.nl>
7532 * expr.c (check_restricted): Fix error message.
7533 * symbol.c (free_st_labels): Plug memleak.
7535 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
7537 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
7538 reduce_binary_aa, reduce_binary, eval_intrinsic,
7539 eval_intrinsic_f2): Use typesafe prototypes for eval functions.
7540 * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
7541 for typesafe intrinsics helper functions.
7542 (g95_intrinsic_sym): Use them.
7543 * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
7544 add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
7545 add_sym_5, add_conv, resolve_intrinsic, do_simplify,
7546 check_specific, g95_intrinsic_func_interface,
7547 g95_intrinsic_sub_interface): Adjust all calls to intrinsics
7549 * trans-decl.c (g95_get_extern_function_decl): Likewise.
7550 * Make-lang.in: Don't disable warnings for strict prototypes
7551 any longer, everything is typesafe now.
7553 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
7555 * bbt.c (duplicate_node): Make static.
7556 * module.c (module_name): Make static.
7557 * scanner.c (include_dirs): Make static.
7559 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
7561 Hard coded _gfor_'s should not show up anymore.
7562 * g95.h (PREFIX): New macro.
7563 * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
7565 (g95_resolve_random_number): Likewise.
7566 * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
7567 * trans-io.c: Remove 'prefix' macro. Replace all uses with
7568 the new PREFIX macro from g95.h.
7570 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
7572 The troubles of forking... Andy implemented this just now too.
7573 Let's stick to that and keep the trees close.
7574 * g95.h (g95_st_label): 'format' member is now a g95_expr.
7575 * io.c: Revert previous changes.
7576 (g95_match_format): Match the format string as a character
7578 * match.h (g95_statement_label): Declare external.
7579 * parse.c: Revert previous changes.
7580 * symbol.c (g95_free_st_label): Free a g95_expr instead
7582 * trans-io.c: Revert previous changes.
7583 (build_dt): Use set_string to set the format string.
7585 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
7587 * io.c (format_string): Make non-static.
7588 (g95_match_format): Remember the format string.
7589 (terminate_io): Add I/O termination for empty I/O lists.
7590 * match.h: Declare external format_string.
7591 * parse.c (check_statement_label): Attack the format string
7592 to a format label for FORMAT statements.
7593 * trans-io.c (g95_add_field): Define prefix macro. Replace
7594 all uses of PREFIX define with a use of this macro.
7595 (build_dt): Implement formatted I/O for format labels.
7597 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
7599 * lang-options.h: Kill "-std=F".
7600 * options.c: Remove unimplemented "-std=F". Modify
7602 * misc.c (g95_terminal_width): New function.
7603 * error.c (g95_error_init_1): Use g95_terminal_width.
7604 * g95.h: Add prototype for g95_terminal_width, remove
7607 2003-01-19 Steven Bosscher <s.bosscher@student.tudelft.nl>
7609 * Make-lang.in: Fix typo.
7611 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
7613 * g95.h (struct g95_case): Remove unused cruft, new member
7614 'where' to keep track of the locus of the default case.
7615 * match.c (g95_match_case): Add locus to the current case.
7616 (match_case_selector): Likewise.
7617 * parse.c (parse_select_block): Move semantics check for
7618 multiple DEFAULT cases out of here to...
7619 * resolve.c (check_case_overlap): ...here. Return sooner
7621 (check_case_expr): Take two g95_cases now, use to sure the
7622 expression kinds are the same.
7623 (resolve_select): Cleanup.
7625 2003-01-18 Paul Brook <paul@nowt.org>
7627 * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
7628 * trans-decl.c (g95_set_symbol_decl): Handle non-array result
7630 (g95_get_extern_function_decl): Put decls in the correct context.
7632 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
7634 * trans-io.c: Port changes from Andy to set ERR flag.
7636 2003-01-17 Paul Brook <paul@nowt.org>
7638 * trans-array.c: Add various comments.
7639 (g95_ss_terminator): Declare as const.
7640 (g95_walk_expr): Remove first parameter and update all callers.
7641 (g95_walk_op_expr): Initialize scalar SS properly.
7642 * trans-array.h (g95_walk_expr): Update prototype.
7643 * trans-expr.c: Update for new g95_walk_expr.
7644 * trans-intrinsic.c: Ditto.
7645 * trans-io.c: Ditto.
7646 * trans.h: Various comments for SS chains.
7648 2003-01-17 Paul Brook <paul@nowt.org>
7650 * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
7652 * intrinsic.c (add_functions): Use them.
7653 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
7654 * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
7656 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
7658 Fallout of a small merge conflict:
7659 * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
7661 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
7663 * initrinsic.c: New add_sym_* functions for strong typing.
7664 (add_conv): Make prototype strict.
7665 * dump-parse-tree.c, dependency.c: Include config.h
7666 * resolve.c, trans-io.c: Fix typos.
7668 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
7670 * dump-parse-tree.c (g95_show_code_node): Show the
7671 condition for a computed GOTO that was transformed
7672 to a SELECT CASE construct.
7673 * resolve.c (check_case_overlap): Revert previous switch
7674 to treaps, it was too slow and didn't catch all trouble.
7675 (resolve_symbol): Be more flexible about module procedures.
7676 * symbol.c (check_conflict): Point to relevant section in
7677 the standard for dubious conflict. Allow procedure
7678 dummy arguments to be optional again.
7679 * trans-io (add_field): Rename to g95_add_field. Change
7681 * trans-stmt (trans_select): Handle unbounded cases for
7682 integer SELECT CASE constructs. Fix/add more comment.
7684 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
7686 * g95.h: Uses GCC's function attribute macros.
7687 * error.c, module.c, parse.c, g95.h: More function attributes.
7689 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
7691 * trans-decl.c (get_label_decl): Use TREE_LINENO instead
7692 of DECL_SOURCE_LINE, and TREE_FILENAME instead of
7695 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
7697 * f95-lang.c (pushdecl): Use TREE_LINENO instead of
7699 * trans.c (g95_trans_code): Use annotate_all_with_file_line
7700 instead of nowdead wrap_all_with_wfl.
7702 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
7704 * parse.c (g95_parse_file): In verbose mode, dump the parse tree
7705 before generating code, so we can still see it even if the code
7706 generation phase dies.
7708 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
7710 * decl.c (build_sym): Split out initialization expression parts...
7711 (add_init_expr_to_sym): ...to here.
7712 (variable_decl): Add the symbol following an attribute list to the
7713 symbol tree before parsing the optional initialization expression
7714 if the symbol is not of a derived type.
7715 * primary.c (g95_match_rvalue): Don't assume a symbol always has
7716 a value if it is a PARAMETER.
7718 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
7720 * misc.c: Don't #include <mcheck.h>
7721 * module.c: Ditto. Kill uses of mtrace, muntrace. If there
7722 ever was a glibc bug, then either this was never reported to
7723 glibc people, or it has been fixed for so long that there's
7724 no information you can find about it, anywhere.
7726 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
7729 * module.c (attr_bits, bt_types, array_spec_types):
7730 Switch 'const' and 'static'.
7731 * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
7733 GNU'ify source code:
7734 * trans-io.c: Numerous fixes, one fixed warning and a few
7735 TODO markers so that we don't forget about them.
7737 2003-01-13 Paul Brook <paul@nowt.org>
7739 * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
7740 * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
7742 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
7743 * match.c (g95_match_stop): Fix dumb == -> != error.
7745 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
7747 * dump-parse-tree.c (show_indent): Add line breaks. This
7748 whole dumping process needs cleanups.
7749 * f95-lang.c (g95_mark_addressable): Fix prototype to match
7750 the langhook. Fix 'return's accordingly.
7751 * g95-support.h: Adjust prototype.
7752 * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
7753 * lang-options.h: Add '-fsyntax-only'.
7754 * options.c (g95_init_options): Init 'no_backend'.
7755 (g95_parse_arg): Deal with '-fsyntax-only'.
7756 * parse.c (g95_parse_file): Do not generate code if 'no_backend'
7759 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
7761 * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
7762 arguments. Also make sure that if a symbol is marked INTRINSIC,
7763 an intrinsic with the symbol's name actually exists.
7764 (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
7765 Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
7766 ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
7768 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
7770 * resolve.c (resolve_contained_functions): Fix condition, don't
7771 throw internal_error if a child namespace has no name. Apparently
7772 this can be the case?
7774 2003-01-11 Paul Brook <paul@nowt.org>
7776 Port changes from Andy's tree:
7777 * g95.h (g95_code): Add stop_code.
7778 * match.c (g95_match_stop): Detter syntax checking.
7779 * resolve.c (resolve_generic_f0): Return match type.
7780 (resolve_generic_f): Remove dead/duplicated code.
7781 (resolve_specific_f): Ditto.
7782 * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
7783 * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
7784 * trans-stmt.c (g95_trans_stop): Handle new STOP format.
7786 2003-01-11 Paul Brook <paul@nowt.org>
7788 * trans-array.c: Various documentation/comment changes.
7789 * trans-stmt.c: Ditto.
7792 2003-01-10 Paul Brook <paul@nowt.org>
7794 * options.c/h: Add -fdump-parse-tree as alias of -v.
7796 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7798 * dump-parse-tree.c (g95_show_namespace): Fixed another
7799 typo. Sorry, it's Friday...
7801 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7804 * trans-array.c, trans-array.h, trans.c, trans-const.c,
7805 trans-const.h, trans-decl.c, trans-expr.c, trans.h
7806 trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
7807 trans-types.c: Fix bogus copyright years, add 2003.
7808 * trans-types.h: Give copyright header.
7810 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7812 * dump-parse-tree.c (g95_show_namespace): Fixed typo.
7813 * expr.c, options.c, scanner.c: Add some more 'const' markers.
7814 * intrinsic.c: Some constant strings moved to read-only memory.
7815 * io.c (format_asterisk): Move to...
7818 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7820 * dump-parse-tree.c (g95_show_namespace): Dump implicit
7821 types for ranges instead of per-letter. Indent the
7822 'CONTAINS' just like everything else.
7823 * resolve.c (resolve_contained_functions): Clarify comment.
7824 Explain non-obvious conditional expression. Improve
7825 diagnostics if tyoe cannot be resolved.
7826 Port semi-fix from Andy's tree:
7827 (was_declared): Move up before first use.
7828 (generic_sym, specific_sym): New functions. Code moved
7829 out if procedure_kind.
7830 (procedure_kind): Simplify using new functions.
7831 (resolve_generic_f): Make sure the functions we find in
7832 a parent namespace is generic.
7833 (resolve_specific_f): Ditto for specific functions.
7835 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7837 * trans-stmt.c, trans.c: Fix some code style issues. Add
7838 some more comment (but still not enough!).
7840 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7842 * symbol.c (flavors, procedures, intents, acces_types,
7843 access_types, ifsrc_types): Make const.
7844 * misc.c (g95_string2code): Make 'm' param 'const'.
7845 * module.c (find_enum, write_atom, mio_name): Make
7847 (attr_bits, bt_types, array_spec_types, array_ref_types,
7848 ref_types, expr_types): Make const.
7849 * g95.h: Adjust external decls.
7851 2003-01-09 Paul Brook <paul@nowt.org>
7853 * Testsuite: Add a load of new cases.
7855 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
7857 * Make-file.in: Add dependency on back end header files;
7858 a parallel build should work now.
7859 * f95-lang-c (lang_identifier): Remove bogus comment.
7860 (g95_be_parse_file): Fix prototype.
7861 (g95_init): Make static.
7862 (g95_finish): Make static.
7863 * error.c (g95_syntax_error): Kill. Make define in...
7864 * g95.h (g95_syntax_error): Define.
7865 (g95.options): Make 'source' member 'const'.
7866 * interface.c (g95_match_interface): Explain
7867 hard-to-read condition.
7868 (g95_match_end_interface): Ditto.
7869 * trans_const.c (g95_build_string_const): Make 's' parameter
7871 * trans_const.h: Adjust protoype accordingly.
7872 * trans-decl.c: Include tree-dump.h
7873 (g95_generate_function_code): Build fixes for recent changes
7874 in the tree-ssa branch.
7876 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
7878 * format.c: Kill, move code from here...
7880 * Make-lang.in: Adjust.
7883 * BUGS: Mention where to submit bugs. Move old content...
7884 * TODO: ...to here. New file.
7886 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
7887 Fix most warnings, and suppress the ones we can't fix for now.
7888 * Make-lang.in: Suppress warnings about bad proto's in g95.h,
7889 these warnings just clutter the screen and there's not much
7890 we can do about them for now anyway.
7891 * check.c, iresolve.c: Mark unused function parameters.
7892 * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
7893 they should be resolved before they get here.
7894 * error.c: Remove unused FILE *status_out.
7895 * f95-lang.c (g95_init): Remove bogus cast.
7896 * Many files: Make things 'const' where required.
7897 * g95.h: Fix prototypes for all modified functions above.
7898 (g95_options): Remove 'object' member.
7900 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
7902 * Make-file.in: Cleanup bogus targets. Add more comment.
7903 * lang-options.h: New option '-w'.
7904 * g95.h: add no_options field to struct g95_options.
7905 * options.c (g95_init_options): Default no_warnings to off.
7906 (g95_parse_arg): Recognise the '-w' switch and its alias,
7908 * error.c (g95_warning, g95_warning_now): Don't emit warning if
7909 no_warning option is set.
7910 * iresolve.c (g95_resolve_shape): Fix warning.
7912 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
7914 * primary.c (g95_next_string_char): Rename next_string_char, and
7915 make static. Adjust callers accordingly.
7916 * resolve.c (resolve_generic_f0): Return try, not match. Adjust
7917 callers accordingly.
7918 * g95.h: Split out all g95_match* functions to...
7919 * match.h: ...here. New file.
7920 * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
7921 matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
7923 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
7925 * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
7926 g95_merge_new_implicit): New functions.
7927 (g95_match_implicit_none, g95_match_implicit): Move from here...
7928 * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
7929 Modify to use the new functions in symbol.c.
7930 * g95.h: Add and move prototypes.
7932 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
7934 * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
7935 node compare function.
7936 (g95_insert_bbt): Likewise.
7937 (g95_insert_bbt_with_overlap): Likewise.
7938 (g95_delete_bbt): Likewise.
7939 (delete_treap): Likewise. Also fix a potential bug when calling it.
7940 * module.c (compare_pointers): Change proto to compare_fn.
7941 (compare_integers): Likewise.
7942 (compare_true_names): Likewise.
7943 (find_true_name): Adjust call to compare_true_names to match proto.
7944 (require_atom, write_atom, mio_name): Fix 'const' warnings.
7945 (init_pi_tree): Make compare a compare_fn instead of (int *).
7946 * resolve.c (compare_cases): Change proto to compare_fn.
7947 * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
7948 it static, and rename to compare_symtree.
7949 (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
7951 * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
7952 of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
7954 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
7955 * Make-lang.in: Fix spaces/tabs issues from previous patch.
7956 * patch.options: Blow away Paul's checkin mistake :-)
7957 * io.c (terminate_io): Fix memory leak (Arnaud).
7959 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
7961 * Make-lang.in: Teach about building DVI, info manual.
7962 * g95.texi: New file.
7964 2003-01-02 Paul Brook <paul@nowt.org>
7966 * trans-array.c (g95_reverse_ss): Make static and don't use.
7967 (g95_conv_ss_descriptor): Don't use g95_loopinfo
7968 (g95_conv_array_parameters): Modify for pointer assignments.
7969 (g95_walk_subexpr): New function.
7970 (g95_walk_expr*): Use it.
7971 * trans-array.h (g95_reverse_ss): Remove prototype.
7972 * trans-expr.c (g95_trans_pointer_assign): Implement.
7973 (Many): Set se.want_pointer before calling g95_conv_array_parameter.
7974 * trans-intrinsic.c: Sync with scalarizer changes.
7975 * trans-io.c: Ditto.
7977 2002-12-29 Paul Brook <paul@nowt.org>
7979 * trans-array.c: Document calling convention for arrays.
7981 2002-12-19 Paul Brook <paul@nowt.org>
7983 * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
7984 assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
7985 optional parameters for some intrinsics.
7986 (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
7987 * trans-expr.c (g95_conv_function_call): Pass NULL for absent
7988 optional parameters.
7989 * trans.h (g95_se): Add ignore_optional flag.
7991 2002-12-15 Paul Brook <paul@nowt.org>
7993 * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
7994 * trans-decl.c (g95_generate_function_code): Use TDI_original.
7996 2002-12-14 Paul Brook <paul@nowt.org>
7998 * trans-stmt.c (g95_trans_call): Use resolved symbol name.
8000 2002-12-12 Paul Brook <paul@nowt.org>
8002 * trans-array.c (g95_trans_array_constructor_subarray): Fully
8003 initialize the scalarizer.
8004 (various): Update to new format of g95_expr->value.constructor.
8006 2002-12-08 Paul Brook <paul@nowt.org>
8008 * trans-array.c (g95_put_offset_into_var): New function.
8009 (g95_trans_array_constructor_subarray): New function.
8010 (g95_trans_array_constructor_value): Use it.
8011 (g95_array_cons_size): Don't abort() on array components.
8013 2002-12-08 Paul Brook <paul@nowt.org>
8015 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
8016 * support.c: Update #includes.
8017 (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
8018 * trans-array.c: Update #includes.
8020 * trans-const.c: Ditto.
8021 * trans-io.c: Ditto.
8022 * trans-types.c: Ditto.
8023 (g95_init_types): Set size_type_node.
8024 * trans-decl.c: Update #includes.
8025 (gfor_fndecl_adjust{l,r}): Declare and initialize.
8026 * trans-stmt.c: Update #includes.
8027 (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
8028 (g95_trans_select): Fix check for unbounded ranges.
8029 * trans-expr.c: Update #includes.
8030 (g95_conv_string_tmp): New function.
8031 (g95_conv_concat_op): Use it.
8032 * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
8033 * Trans-intrisic.c: Update #includes.
8034 (g95_conv_intrinsic_strcmp): New function.
8035 (g95_conv_intrinsic_adjust): Ditto.
8036 (g95_conv_intrinsic_function: Use them.
8038 2002-11-30 Paul Brook <paul@nowt.org>
8040 * trans-array.c (g95_walk_function_expr): Handle non-array return by
8042 * trans-dec.c (g95_build_function_decl): Handle character return
8044 (g95_get_fake_result_decl): Ditto.
8045 (g95_trans_deferred_vars): Ditto.
8046 * trans-expr.c (g95_conv_function_call): Ditto.
8047 (g95_trans_arrayfunc_assign) Limit to array valued functions.
8048 * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
8049 (g95_conv_intrinsic_function): Use it.
8050 * trans-types.c (g95_sym_type): Handle functions returning strings.
8051 (g95_return_by_reference): Ditto.
8052 (g95_get_function_type): Ditto.
8054 2002-11-18 Paul Brook <paul@nowt.org>
8056 * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
8057 requires a temporary.
8058 (g95_trans_select): Handle computed gotos.
8059 * trans-types.c (g95_build_array_type): Warn about non-functional
8060 assumed shape arrays.
8061 * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
8063 * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
8064 (g95_conv_intrinsic_int): New function.
8065 (g95_conv_intrinsic_mod): New function.
8066 (g95_conv_intrinsic_ichar): New function.
8067 (g95_conv_intrinsic_function): Use them.
8068 (g95_conv_intrinsic_dim): Use g95_evaluate_now.
8070 2002-11-17 Toon Moene <toon@moene.indiv.nluug.nl>
8072 * trans-types.c (g95_build_array_type): Assumed
8073 sized arrays can have rank > 1.
8074 * trans.c (g95_trans_code): Remove erroneous
8075 warning about CONTINUE.
8076 * trans-expr.c (g95_conv_variable): Remove
8079 2002-11-15 Paul Brook <paul@nowt.org>
8081 * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
8083 2002-10-31 Paul Brook <paul@nowt.org>
8085 * f95-tree.c: Remove tree copying stuff that's now in gimple.c
8086 * trans-expr.c (g95_conv_component_ref): Handle character string
8088 (g95_conv_string_parameter): Ditto.
8089 * trans-types.c (g95_get_derived_type): Add length decl to caracter
8092 2002-10-10 Paul Brook <paul@nowt.org>
8094 * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
8095 * trans-expr.c (g95_conv_function_call): Remove unreliable return value
8097 * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
8098 (g95_conv_intrinsic_function): Handle size and shape intrinsics.
8099 (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
8100 * trans-types.c (pvoid_type_node): Declare and initialize.
8101 * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
8102 (g95_array_allocate): Fix when base==data.
8103 (g95_conv_array_parameter): Correctly handle reduced rank sections.
8104 * trans-io.c (g95_trans_write): Correctly handle string modifiers.
8106 2002-10-09 Paul Brook <paul@nowt.org>
8108 * (g95_conv_expr_reference): Handle character strings correctly.
8110 2002-10-07 Paul Brook <paul@nowt.org>
8112 (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
8114 * trans-array.c (g95_build_array_initializer): Remove.
8115 (g95_conv_array_initializer): New Function.
8116 (g95_trans_auto_arry_allocation): Cleanup.
8117 (g95_trans_init_character_array): Remove.
8118 * g95spec.c: Link in libgforbegin.
8119 * trans.c (g95_generate_code): Rename main function to MAIN__.
8120 (g95_create_var): New function.
8121 (g95_create_var_np): New function.
8122 (g95_evaluate_now): New function.
8123 (g95_start_block): New function.
8124 (g95_finish_block): New function.
8125 (g95_add_expr_to_block): New function.
8126 (g95_add_block_to_block): New function.
8127 * trans-expr.c (g95_conv_componen_ref): New function.
8128 * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
8129 (F95_OBJS): Add dependency.o.
8130 * f95-lang.c (g95_is_simple_stmt): Remove.
8131 * f95-tree.c (mark_not_simple): New function.
8132 (unshare_all_trees): New function.
8133 (create_tmp_var, create_tmp_alias_var): Remove.
8134 * support.c (declare_tmp_vars, tree_last_decl): Remove.
8135 * trans*: Convert to new IR using GENERIC trees. Don't bother about
8136 SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
8138 2002-10-01 Paul Brook <paul@nowt.org>
8140 * trans-array.c: Add support for descriptorless arrays.
8141 (g95_conv_array_data): New function.
8142 (g95_conv_array_base): New function.
8143 * trans-array.h: Declare these here.
8144 * trans-decl.c(g95_create_mopdule_variable): Perform variable
8145 initialization and creation here.
8146 (g95_create_module_vars): Instead of here.
8147 * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
8148 * trans-intrinsic.c: Ditto.
8149 * trans-types.c (g95_is_nodesc_array): New function.
8150 (g95_get_nodesc_array_type): New function.
8151 (g95_sym_type, g95_get_derived_type): Use them.
8152 * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
8154 2002-09-28 Paul Brook <paul@nowt.org>
8156 * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
8157 * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
8160 2002-09-24 Paul Brook <paul@nowt.org>
8162 * f95-lang.c (listify): Remove declaration.
8163 (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
8165 * f95-tree.c (get_name): New function.
8166 * trans.c (module_namespace): Remove.
8167 * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
8168 * trans-types.c: Ditto.
8170 2002-09-19 Paul Brook <paul@nowt.org>
8172 * trans-array.c (g95_get_array_cons_size): New Function.
8173 (g95_con_ss_startstride): Handle Array constructors.
8174 (g95_conv_loop_setup): Ditto.
8175 (g95_conv_array_parameter): Ditto.
8176 * tras-decl.c (g95_finish_var_decl): Make initializes variables
8179 2002-09-19 Paul Brook <paul@nowt.org>
8181 * trans.c (g95_simple_fold_tmp): Detect variables inside
8183 * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
8185 2002-09-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
8187 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
8189 2002-09-14 Paul Brook <paul@nowt.org>
8191 * trans.c (g95_create_module_variable): Move to trans-decl.c.
8192 * trans-const.c (g95_conv_string_init): New Function.
8193 * trans-const.h: Declare it.
8194 * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
8195 variables. Don't bail on intrinsic symbols.
8196 (get_extern_function_decl): Handle specific intrinsic functions.
8197 * trans-types.c (g95_sym_type): Dummy functions don't return
8199 * trans-array.c (g95_build_array_initializer): New Function.
8200 (g95_trans_auto_array_allocation): Build initializer for static decls.
8201 Don't use mpz_addmul, it's GMP4 only.
8203 2002-09-12 Paul Brook <paul@nowt.org>
8205 * trans-decl.c (g95_generate_code): Fix thinko with return variable.
8206 (g95_get_extern_function_decl, g95_build_function_decl): Mangle
8207 assembler names for module procedures.
8209 2002-09-11 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
8211 * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
8214 2002-09-10 Paul Brook <paul@nowt.org>
8216 * trans-array.c: Change format of G95_SS_TEMP strictures.
8217 (g95_check_fncall_dependancy): New function.
8218 (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
8220 * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
8222 (g95_build_function_decl): Don't assume result arrays are packed.
8223 (g95_trans-deferred-vars): Handle array result variables.
8224 (g95_generate_fuction_code): Clear saved_function_decls.
8225 * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
8227 (g95_trans_arrayfunc_assign): New function.
8228 (g95_trans_assignment): Use it.
8229 * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
8230 (g95_se): Add direct_byref.
8231 * trans-types.c: Use sym->result rather than sym where appropriate.
8232 * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
8233 Update other functions to use this.
8234 (g95_is_intrinsic_libcall): New function.
8235 (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
8236 (g95_walk_intrinsic_function): Ditto.
8238 2002-09-08 Paul Brook <paul@nowt.org>
8240 * trans-types.c: Change rank field to dtype field in array descriptor.
8241 * trans-array.c: Implement filling of dtype array descriptor field.
8242 * trans-intrinsic.c: Fix broken LEN intrinsic.
8244 2002-09-07 Paul Brook <paul@nowt.org>
8246 * trans-intrinsic.c: Remove outdated todo intrinsic list.
8247 (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
8248 (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
8250 2002-09-06 Paul Brook <paul@nowt.org>
8252 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
8253 (gt-f95-trans-types.h): Add dependancy information.
8254 * config-lang.in (gtfiles): Add trans-types.c
8255 * f95-lang.c (g95_be_parse_file): Pass error and warning counts
8256 back to top-level code.
8257 * trans-array.c, trans-types.c: Change format of array descriptor.
8258 (g95_conv_descriptor_dimension): New function.
8259 * trans-types.h (g95_conv_descriptor_rank): define.
8260 * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
8263 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
8265 * trans-array.c, trans-types.c: Add rank information to descriptor.
8267 2002-09-06 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
8269 * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
8271 2002-09-04 Paul Brook <paul@nowt.org>
8273 * f95-lang.c (g95_create_decls): New function.
8274 (g95_init): Move initialization of external decls to above, and call
8275 from g95_be_parse_file.
8276 * trans.c (g95_finish_stmt): Don't amputate the decl chain.
8277 * trans-types.c (g95_init_types): Always name integer and char types.
8278 (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
8280 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
8282 * Make-lang.in: Add options.c to F95_PARSER_OBJS
8284 2002-09-02 Paul Brook <paul@nowt.org>
8286 * g95_generate_code: Clear the attr for __fortran_main.
8287 * trans-types.c (g95_finish_type): New function.
8288 * g95_init_io_state_type: Use g95_finish_type.
8289 * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
8291 2002-09-01 Paul Brook <paul@nowt.org>
8293 * README.backend: Warn about the dangers of extra config.h files.
8294 Remove obsolete libgfor stuff.
8295 * config-lang.in: Add target-libgfor dependancy.
8296 * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
8298 2002-09-01 Toon Moene <toon@moene.indiv.nluug.nl>
8300 * g95_conv_mpz_to_tree: Free storage pointed to by q,
8303 2002-08-30 Paul Brook <paul@nowt.org>
8305 * trans-intrinsic.c (g95_conv_intrinsic_function,
8306 g95_walk_intrinsic_function): Added ANY and ALL.
8307 (g95_conv_intrinsic_anyall): New function.
8308 * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in