1 2005-10-28 Steven Bosscher <stevenb@suse.de>
4 * interface.c (gfc_match_end_interface): Fix typo in
5 INTERFACE_USER_OP case.
7 2005-10-26 Francois-Xavier Coudert <coudert@clipper.ens.fr>
10 * resolve.c (resolve_symbol): Remove the use of whynot, so that
11 error messages are not built from pieces.
13 2005-10-26 Paul Thomas <pault@gcc.gnu.org>
16 * decl.c (gfc_match_data_decl): Correct broken bit of code
17 that prevents undefined derived types from being used as
18 components of another derived type.
19 * resolve.c (resolve_symbol): Add backstop error when derived
20 type variables arrive here with a type that has no components.
22 2005-10-25 Jakub Jelinek <jakub@redhat.com>
24 * trans.h (gfc_conv_cray_pointee): Remove.
25 * trans-expr.c (gfc_conv_variable): Revert 2005-10-24 change.
26 * trans-array.c (gfc_conv_array_parameter): Likewise.
27 * trans-decl.c (gfc_conv_cray_pointee): Remove.
28 (gfc_finish_cray_pointee): New function.
29 (gfc_finish_var_decl): Use it. Don't return early for Cray
31 (gfc_create_module_variable): Revert 2005-10-24 change.
32 * decl.c (cray_pointer_decl): Update comment.
33 * gfortran.texi: Don't mention Cray pointees aren't visible in the
36 * symbol.c (check_conflict): Add conflict between cray_pointee
37 and in_common resp. in_equivalence.
38 * resolve.c (resolve_equivalence): Revert 2005-10-24 change.
40 * module.c (ab_attribute): Add AB_CRAY_POINTER and AB_CRAY_POINTEE.
41 (attr_bits): Likewise.
42 (mio_symbol_attribute): Save and restore cray_pointe{r,e} attributes.
43 (mio_symbol): For cray_pointee write/read cp_pointer reference.
45 2005-10-25 Feng Wang <fengwang@nudt.edu.cn>
48 * trans-decl.c (gfc_add_assign_aux_vars): New function. Add two
50 (gfc_get_symbol_decl): Use it when a variable, including dummy
51 argument, is assigned a label.
52 (gfc_trans_assign_aux_var): New function. Set initial value of
53 the auxiliary variable explicitly.
54 (gfc_trans_deferred_vars): Use it.
55 * trans-stmt.c (gfc_conv_label_variable): Handle dummy argument.
57 2005-10-24 Asher Langton <langton2@llnl.gov>
61 * check.c (gfc_check_loc): New function.
62 * decl.c (variable_decl): New variables cp_as and sym. Added a
63 check for variables that have already been declared as Cray
64 Pointers, so we can get the necessary attributes without adding
66 (attr_decl1): Added code to catch pointee symbols and "fix"
68 (cray_pointer_decl): New method.
69 (gfc_match_pointer): Added Cray pointer parsing code.
70 (gfc_mod_pointee_as): New method.
71 * expr.c (gfc_check_assign): Added a check to catch vector-type
72 assignments to pointees with an unspecified final dimension.
73 * gfortran.h: (GFC_ISYM_LOC): New.
74 (symbol_attribute): Added cray_pointer and cray_pointee bits.
75 (gfc_array_spec): Added cray_pointee and cp_was_assumed bools.
76 (gfc_symbol): Added gfc_symbol *cp_pointer.
77 (gfc_option): Added flag_cray_pointer.
78 (gfc_add_cray_pointee): Declare.
79 (gfc_add_cray_pointer ): Declare.
80 (gfc_mod_pointee_as): Declare.
81 * intrinsic.c (add_functions): Add code for loc() intrinsic.
82 * intrinsic.h (gfc_check_loc): Declare.
83 (gfc_resolve_loc): Declare.
84 * iresolve.c (gfc_resolve_loc): New.
85 * lang.opt: Added fcray-pointer flag.
86 * options.c (gfc_init_options): Initialized.
87 gfc_match_option.flag_cray_pointer.
88 (gfc_handle_option): Deal with -fcray-pointer.
89 * parse.c:(resolve_equivalence): Added code prohibiting Cray
90 pointees in equivalence statements.
91 * resolve.c (resolve_array_ref): Added code to prevent bounds
92 checking for Cray Pointee arrays.
93 (resolve_equivalence): Prohibited pointees in equivalence
95 * symbol.c (check_conflict): Added Cray pointer/pointee
97 (gfc_add_cray_pointer): New.
98 (gfc_add_cray_pointee): New.
99 (gfc_copy_attr): New code for Cray pointers and pointees.
100 * trans-array.c (gfc_trans_auto_array_allocation): Added code to
101 prevent space from being allocated for pointees.
102 (gfc_conv_array_parameter): Added code to catch pointees and
103 correctly set their base address.
104 * trans-decl.c (gfc_finish_var_decl): Added code to prevent
105 pointee declarations from making it to the back end.
106 (gfc_create_module_variable): Same.
107 * trans-expr.c (gfc_conv_variable): Added code to detect and
109 (gfc_conv_cray_pointee): New.
110 * trans-intrinsic.c (gfc_conv_intrinsic_loc): New.
111 (gfc_conv_intrinsic_function): Added entry point for loc
113 * trans.h (gfc_conv_cray_pointee): Declare.
115 * gfortran.texi: Added section on Cray pointers, removed Cray
116 pointers from list of proposed extensions.
117 * intrinsic.texi: Added documentation for loc intrinsic.
118 * invoke.texi: Documented -fcray-pointer flag.
120 2005-10-24 Asher Langton <langton2@llnl.gov>
122 * decl.c (gfc_match_save): Changed duplicate SAVE errors to
123 warnings in the absence of strict standard conformance
124 * symbol.c (gfc_add_save): Same.
126 2005-10-24 Francois-Xavier Coudert <coudert@clipper.ens.fr>
129 * arith.c (gfc_arith_error): Change message to include locus.
130 (check_result, eval_intrinsic, gfc_int2int, gfc_real2real,
131 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Use
132 the new gfc_arith_error.
133 (arith_error): Rewrite full error messages instead of building
135 * check.c (must_be): Removed.
136 (type_check, numeric_check, int_or_real_check, real_or_complex_check,
137 kind_check, double_check, logical_array_check, array_check,
138 scalar_check, same_type_check, rank_check, kind_value_check,
139 variable_check, gfc_check_allocated, gfc_check_associated,
140 gfc_check_cmplx, gfc_check_dcmplx, gfc_check_dot_product,
141 gfc_check_index, gfc_check_kind, gfc_check_matmul, gfc_check_null,
142 gfc_check_pack, gfc_check_precision, gfc_check_present,
143 gfc_check_spread): Rewrite full error messages instead of
144 building them from pieces.
145 * decl.c (gfc_match_entry): Rewrite full error messages instead
146 of building them from pieces.
147 * parse.c (gfc_state_name): Remove.
148 * parse.h: Remove prototype for gfc_state_name.
150 2005-10-23 Andrew Pinski <pinskia@physics.uc.edu>
153 * check.c (gfc_check_ichar_iachar): Move the code around so
154 that the check on the length is after check for
157 2005-10-23 Asher Langton <langton2@llnl.gov>
159 * decl.c (match_type_spec): Add a BYTE type as an extension.
161 2005-10-23 Paul Thomas <pault@gcc.gnu.org>
164 * trans-expr.c (gfc_trans_arrayfunc_assign): Return NULL
165 if there is a component ref during an array ref to force
166 use of temporary in assignment.
170 * fortran/iresolve.c (check_charlen_present): New function to
171 add a charlen to the typespec, in the case of constant
173 (gfc_resolve_merge, gfc_resolve_spread): Call.the above.
174 (gfc_resolve_spread): Make calls to library functions that
175 handle the case of the spread intrinsic with a scalar source.
177 2005-10-22 Erik Edelmann <eedelman@gcc.gnu.org>
180 * decl.c (variable_decl): Don't assign default initializers to
183 2005-10-21 Jakub Jelinek <jakub@redhat.com>
185 * interface.c (compare_actual_formal): Issue error when attempting
186 to pass an assumed-size array as assumed-shape array argument.
188 2005-10-20 Erik Edelmann <erik.edelmann@iki.fi>
191 * resolve.c (expr_to_initialize): New function.
192 (resolve_allocate_expr): Take current statement as new
193 argument. Add default initializers to variables of
194 derived types, if they need it.
195 (resolve_code): Provide current statement as argument to
196 resolve_allocate_expr().
198 2005-10-19 Paul Thomas <pault@gcc.gnu.org>
201 * resolve.c (resolve_symbol): Correct error in check for
202 assumed size array with default initializer by testing
203 for arrayspec before dereferencing it.
205 2005-10-17 Paul Thomas <pault@gcc.gnu.org>
208 * gfortran.h: Primitive for gfc_is_formal_arg.
209 * resolve.c(gfc_is_formal_arg): New function to signal across
210 several function calls that formal argument lists are being
212 (resolve_formal_arglist): Set/reset the flag for gfc_is_formal_arg.
213 *expr.c(check_restricted): Add check, via gfc_is_formal_arg, if
214 symbol is part of an formal argument declaration.
217 * decl.c (add_init_expr_to_sym): Make a new character
218 length for each variable, when the expression is NULL
222 * match.c (recursive_stmt_fcn): New function that tests if
223 a statement function resurses through itself or other other
225 (gfc_match_st_function): Call recursive_stmt_fcn to check
226 if this is recursive and to raise error if so.
230 * resolve.c (resolve_symbol): Errors for assumed size arrays
231 with default initializer and for external objects with an
235 * decl.c (match_attr_spec): Prevent PUBLIC from being used
238 2005-10-16 Erik Edelmann <erik.edelmann@iki.fi>
241 * expr.c (check_inquiry): Add "len" to inquiry_function.
243 2005-10-14 Jakub Jelinek <jakub@redhat.com>
245 * primary.c (match_boz_constant): Add missing break after gfc_error.
247 2005-10-12 Paul Thomas <pault@gcc.gnu.org>
250 * trans-types.c (gfc_get_derived_type): Insert code to obtain backend
251 declaration for derived types, building if necessary. Return the
252 derived type if the fields have been built by this process. Otherwise,
253 continue as before but using the already obtained backend_decls for the
254 derived type components. Change the gcc_assert to act on the field.
256 2005-10-12 Paul Thomas <pault@gcc.gnu.org>
259 * decl.c (variable_decl): Make a new copy of the character
260 length for each variable, when the expression is not a
263 2005-10-12 Francois-Xavier Coudert <coudert@clipper.ens.fr>
265 * gfortran.h: Add bitmasks for different FPE traps. Add fpe
267 * invoke.texi: Document the new -ffpe-trap option.
268 * lang.opt: Add -ffpe-trap option.
269 * options.c (gfc_init_options): Initialize the FPE option.
270 (gfc_handle_fpe_trap_option): New function to parse the argument
271 of the -ffpe-trap option.
272 (gfc_handle_option): Add case for -ffpe-trap.
273 * trans-decl.c: Declare a tree for the set_fpe library function.
274 (gfc_build_builtin_function_decls): Build this tree.
275 (gfc_generate_function_code): Generate a call to set_fpe at
276 the beginning of the main program.
277 * trans.h: New tree for the set_fpe library function.
279 2005-10-12 Paul Thomas <pault@gcc.gnu.org>
283 * symbol.c (check_conflict): Prevent common variables and
284 function results from having the SAVE attribute,as required
287 2005-10-12 Paul Thomas <pault@gcc.gnu.org>
290 * resolve.c (resolve_symbol): Exclude use and host associated
291 symbols from the test for private objects in a public namelist.
293 2005-10-12 Jakub Jelinek <jakub@redhat.com>
295 * trans-common.c (build_field): Fix comment typo.
296 (create_common): Set backend_decl of COMMON or EQUIVALENCEd
297 variables to a VAR_DECL with the COMPONENT_REF in
298 DECL_HAS_VALUE_EXPR rather than COMPONENT_REF directly.
299 * f95-lang.c (gfc_expand_function): Emit debug info for
300 EQUIVALENCEd variables if the equiv union is going to be output.
302 2005-10-11 Steven G. Kargl <kargls@comcast.net>
305 * iresolve.c (gfc_resolve_aint, gfc_resolve_anint): Type conversion
308 2005-10-11 Jakub Jelinek <jakub@redhat.com>
310 * f95-lang.c (gfc_init_decl_processing): Initialize
313 2005-10-07 Erik Edelmann <erik.edelmann@iki.fi>
316 * resolve.c (find_array_spec): Search through the list of
317 components in the symbol of the type instead of the symbol of the
320 2005-10-05 Richard Guenther <rguenther@suse.de>
323 * parse.c (gfc_parse_file): Exit early for empty files.
325 2005-10-03 Steve Ellcey <sje@cup.hp.com>
327 * fortran/trans-types.c (gfc_init_kinds): Only pass float, double,
328 and long double floating point types through to Fortran compiler.
330 2005-10-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
333 * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long
334 double builtin function.
335 (gfc_init_builtin_functions): Add mfunc_longdouble,
336 mfunc_clongdouble and func_clongdouble_longdouble trees. Build
337 them for round, trunc, cabs, copysign and pow functions.
338 * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add
339 case for kind 10 and 16.
340 * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16,
341 exponent10 and exponent16.
342 (gfc_build_intrinsic_function_decls): Build nodes for int16,
343 real10, real16, complex10 and complex16 types. Build all possible
344 combinations for function _gfortran_pow_?n_?n. Build function
345 calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16.
346 * trans-expr.c (gfc_conv_power_op): Add case for integer(16),
347 real(10) and real(16).
348 * trans-intrinsic.c: Add suppport for long double builtin
349 functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION
351 (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and
353 (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl
354 and real16_decl in library functions.
355 (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex
357 (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16)
359 (gfc_conv_intrinsic_sign): Likewise.
360 (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind.
361 * trans-types.c (gfc_get_int_type, gfc_get_real_type,
362 gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in
363 the case of kinds not available.
364 * trans.h: Declare trees for cpowl10, cpowl16, ishftc16,
365 exponent10 and exponent16.
367 2005-10-01 Paul Thomas <pault@gcc.gnu.org>
376 * gfortran.h: Prototype for gfc_add_in_equivalence.
377 * match.c (gfc_match_equivalence): Make a structure component
378 an explicit,rather than a syntax, error in an equivalence
379 group. Call gfc_add_in_equivalence to add the constraints
380 imposed in check_conflict.
381 * resolve.c (resolve_symbol): Add constraints: No public
382 structures with private-type components and no public
383 procedures with private-type dummy arguments.
384 (resolve_equivalence_derived): Add constraint that prevents
385 a structure equivalence member from having a default
387 (sequence_type): New static function to determine whether an
388 object is default numeric, default character, non-default
389 or mixed sequence. Add corresponding enum typespec.
390 (resolve_equivalence): Add constraints to equivalence groups
391 or their members: No more than one initialized member and
392 that different types are not equivalenced for std=f95. All
393 the simple constraints have been moved to check_conflict.
394 * symbol.c (check_conflict): Simple equivalence constraints
395 added, including those removed from resolve_symbol.
396 (gfc_add_in_equivalence): New function to interface calls
397 match_equivalence to check_conflict.
399 2005-09-27 Jakub Jelinek <jakub@redhat.com>
402 * trans-common.c (build_equiv_decl): Add IS_SAVED argument.
403 If it is true, set TREE_STATIC on the decl.
404 (create_common): If any symbol in equivalence has SAVE attribute,
405 pass true as last argument to build_equiv_decl.
407 2005-09-24 Janne Blomqvist <jblomqvi@cc.hut.fi>
409 * trans-io.c (gfc_build_io_library_fndecls): Add entry
410 iocall_x_array for transfer_array.
411 (transfer_array_desc): New function.
412 (gfc_trans_transfer): Add code to call transfer_array_desc.
414 2005-09-26 Jakub Jelinek <jakub@redhat.com>
417 * symbol.c (gfc_is_var_automatic): Return true if character length
418 is non-constant rather than constant.
419 * resolve.c (gfc_resolve): Don't handle !gfc_option.flag_automatic
421 * options.c (gfc_post_options): Set gfc_option.flag_max_stack_var_size
422 to 0 for -fno-automatic.
424 2005-09-23 Paul Thomas <pault@gcc.gnu.org>
427 * module.c (mio_component_ref): Return if the symbol is NULL
428 and wait for another iteration during module reads.
429 (mio_symtree_ref): Suppress the writing of contained symbols,
430 when a symbol is available in the main namespace.
431 (read_module): Restrict scope of special treatment of contained
432 symbols to variables only and suppress redundant call to
435 2005-09-22 Steven G. Kargl <kargls@comcast.net>
438 * interface.c (check_interface1): Fix NULL dereference.
440 2005-09-22 Erik Edelmann <erik.edelmann@iki.fi>
443 * resolve.c (derived_inaccessible): New function.
444 (resolve_transfer): Use it to check for private
447 2005-09-22 Steven G. Kargl <kargls@comcast.net>
450 * intrinsic.c (add_function): Add IMAG, IMAGPART, and REALPART
452 * intrinsic.h: Prototypes for gfc_simplify_realpart and
453 gfc_resolve_realpart.
454 * intrinsic.texi: Document intrinsic procedures.
455 * simplify.c (gfc_simplify_realpart): New function.
456 * irseolve.c (gfc_resolve_realpart): New function.
458 2005-09-21 Erik Edelmann <erik.edelmann@iki.fi>
461 * trans-stmt.c (gfc_trans_deallocate): Check if the
462 object to be deallocated is an array by looking at
463 expr->rank instead of expr->symtree->n.sym->attr.dimension.
465 2005-09-20 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
468 * io.c (resolve_tag): Don't allow non-CHARACTER constants as formats.
469 (match_io): Fix usage of gfc_find_symbol.
471 2005-09-20 Jakub Jelinek <jakub@redhat.com>
474 * primary.c (match_actual_arg): Handle ENTRY the same way
477 2005-09-18 Francois-Xavier Coudert <coudert@clipper.ens.fr>
479 * Make-lang.in: Make check-fortran alias for check-gfortran.
481 2005-09-18 Andreas Jaeger <aj@suse.de>
483 * module.c (read_module): Add missed line from last patch.
485 2005-09-18 Erik Edelmann <erik.edelmann@iki.fi>
488 * resolve.c (resolve_symbol): Don't assign default
489 initializer to pointers.
491 2005-09-18 Paul Thomas <pault@gcc.gnu.org>
494 * module.c (read_module): Give symbols from module procedures
495 different true_name entries to those from the module proper.
497 2005-09-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
500 * arith.c (gfc_arith_error): Add translation support for error
502 * array.c (gfc_match_array_ref): Likewise.
503 (gfc_match_array_spec): Likewise.
504 * check.c (must_be): Add msgid convention to third argument.
505 (same_type_check): Add translation support for error message.
506 (rank_check): Likewise.
507 (kind_value_check): Likewise.
508 (gfc_check_associated): Correct typo.
509 (gfc_check_reshape): Add translation support for error message.
510 (gfc_check_spread): Likewise.
511 * error.c (error_printf): Add nocmsgid convention to argument.
512 (gfc_warning, gfc_notify_std, gfc_warning_now, gfc_warning_check)
513 (gfc_error, gfc_error_now): Likewise.
514 (gfc_status): Add cmsgid convention to argument.
515 * expr.c (gfc_extract_int): Add translation support for error
517 (gfc_check_conformance): Add msgid convention to argument.
518 (gfc_check_pointer_assign): Correct tabbing.
519 * gfortran.h: Include intl.h header. Remove prototype for gfc_article.
520 * gfortranspec.c: Include intl.h header.
521 (lang_specific_driver): Add translation support for --version.
522 * io.c (check_format): Add translation support for error message.
523 (format_item_1): Likewise.
524 (data_desc): Likewise.
525 * matchexp.c: Likewise.
526 * misc.c (gfc_article): Remove function.
527 * module.c (bad_module): Use msgid convention. Add translation support
529 (require_atom): Add translation support for error messages.
530 * parse.c (gfc_ascii_statement): Likewise.
531 (gfc_state_name): Likewise.
532 * primary.c (match_boz_constant): Reorganise error messages for
534 * resolve.c (resolve_entries): Likewise.
535 (resolve_operator): Add translation support for error messages.
536 (gfc_resolve_expr): Use msgid convention. Reorganise error messages
538 (resolve_symbol): Add translation support for error messages.
539 * symbol.c (gfc_add_procedure): Remove use of gfc_article function.
540 * trans-const.c (gfc_build_string_const): Use msgid convention.
542 2005-09-16 Paul Brook <paul@codesourcery.com>
545 * dependency.c (transform_sections): Divide by correct value.
548 2005-09-14 Paul Thomas <pault@gcc.gnu.org>
550 PR fortran/21875 Internal Unit Array I/O, NIST
551 * fortran/trans-io.c (gfc_build_io_library_fndecls): Add field for
552 array descriptor to IOPARM structure.
553 * fortran/trans-io.c (set_internal_unit): New function to generate code
554 to store the character (array) and the character length for an internal
556 * fortran/trans-io (build_dt): Use the new function set_internal_unit.
558 2005-09-14 Paul Thomas <pault@gcc.gnu.org>
561 * trans-array.c (gfc_trans_dummy_array_bias): correct the typo
562 which uses dim[i].upper for lbound, rather than dim[i].lower.
564 2005-09-13 Erik Edelmann <erik.edelmann@iki.fi>
567 * trans-expr.c (gfc_trans_arrayfunc_assign): Check value
568 of attr.elemental for specific function instead of generic name.
570 2005-09-13 Richard Sandiford <richard@codesourcery.com>
573 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Move initialization
574 of argse. Remove now-redundant want_pointer assignment.
575 * trans-array.c (gfc_conv_expr_descriptor): When not assigning to
576 a pointer, keep the original bounds of a full array reference.
578 2005-09-13 Richard Sandiford <richard@codesourcery.com>
581 * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift)
582 (gfc_resolve_pack, gfc_resolve_reshape, gfc_resolve_spread)
583 (gfc_resolve_transpose, gfc_resolve_unpack): Add "_char" to the name
584 for character-based operations.
585 (gfc_resolve_pack): Remove ATTRIBUTE_UNUSED from array argument.
586 (gfc_resolve_unpack): Copy the whole typespec from the vector.
587 * trans-array.c (gfc_conv_expr_descriptor): In the EXPR_FUNCTION
588 case, get the string length from the scalarization state.
590 2005-09-14 Francois-Xavier Coudert <coudert@clipper.ens.fr>
592 * Make-lang.in: Change targets prefixes from f95 to fortran.
593 * config-lang.in: Change language name to "fortran".
594 * lang.opt: Change language name to "fortran".
595 * options.c: Change CL_F95 to CL_Fortran.
597 2005-09-09 Thomas Koenig <Thomas.Koenig@online.de>
599 gfortran.texi: Document IOSTAT= specifier.
601 2005-09-09 Thomas Koenig <Thomas.Koenig@online.de>
603 * gfortran.h: Add iomsg to gfc_open, gfc_close, gfc_filepos,
604 gfc_inquire and gfc_dt.
605 * dump-parse-tree.c (gfc_show_code_node): Add iomsg
606 for open, close, file positioning, inquire and namelist.
607 * io.c (io_tag): Add tag_iomsg.
608 (resolve_tag): Add standards warning for iomsg.
609 (match_open_element): Add iomsg.
610 (gfc_free_open): Add iomsg.
611 (gfc_resolve_open): Add iomsg.
612 (gfc_free_close): Add iomsg.
613 (match_close_element): Add iomsg.
614 (gfc_resolve_close): Add iomsg.
615 (gfc_free_filepos): Add iomsg.
616 (match_file_element): Add iomsg.
617 (gfc_resolve_filepos): Add iostat and iomsg.
618 (match-dt_element): Add iomsg.
619 (gfc_free_dt): Add iomsg.
620 (gfc_resolve_dt): Add iomsg.
621 (gfc_free_inquire): Add iomsg.
622 (match_inquire_element): Add iomsg.
623 (gfc_resolve_inquire): Add iomsg.
624 * trans_io.c: Add ioparm_iomsg and ioparm_iomsg_len.
625 (gfc_build_io_library_fndecls): Add iomsg as last field.
626 (gfc_trans_open): Add iomsg.
627 (gfc_trans_close): Add iomsg.
628 (build_fileos): Call set_string for iomsg.
629 (gfc_trans_inquire): Add iomsg.
630 (build_dt): Add iomsg.
632 2005-09-09 Richard Sandiford <richard@codesourcery.com>
634 * match.h (gfc_match_equiv_variable): Declare.
636 2005-09-09 Richard Sandiford <richard@codesourcery.com>
639 * Makefile.in (fortran/trans-expr.o): Depend on dependency.h.
640 * dependency.h (gfc_ref_needs_temporary_p): Declare.
641 * dependency.c (gfc_ref_needs_temporary_p): New function.
642 (gfc_check_fncall_dependency): Use it instead of inlined check.
643 By so doing, take advantage of the fact that character substrings
644 within an array reference also need a temporary.
645 * trans.h (GFC_SS_VECTOR): Adjust comment.
646 * trans-array.c (gfc_free_ss): Remove GFC_SS_VECTOR case.
647 (gfc_set_vector_loop_bounds): New function.
648 (gfc_add_loop_ss_code): Call it after evaluating the subscripts of
649 a GFC_SS_SECTION. Deal with the GFC_SS_VECTOR case by evaluating
650 the vector expression and caching its descriptor for use within
652 (gfc_conv_array_index_ref, gfc_conv_vector_array_index): Delete.
653 (gfc_conv_array_index_offset): Handle scalar, vector and range
654 dimensions as separate cases of a switch statement. In the vector
655 case, use the loop variable to calculate a vector index and use the
656 referenced element as the dimension's index. Perform bounds checking
658 (gfc_conv_section_upper_bound): Return null for vector indexes.
659 (gfc_conv_section_startstride): Give vector indexes a start value
660 of 0 and a stride of 1.
661 (gfc_conv_ss_startstride): Adjust for new GFC_SS_VECTOR representation.
662 (gfc_conv_expr_descriptor): Expand comments. Generalize the
663 handling of the !want_pointer && !direct_byref case. Use
664 gfc_ref_needs_temporary_p to decide whether the variable case
666 (gfc_walk_variable_expr): Handle DIMEN_VECTOR by creating a
668 * trans-expr.c: Include dependency.h.
669 (gfc_trans_arrayfunc_assign): Fail if the target needs a temporary.
671 2005-09-09 Richard Sandiford <richard@codesourcery.com>
674 * trans.h (gfc_interface_sym_mapping, gfc_interface_mapping): Moved
676 (gfc_init_interface_mapping, gfc_free_interface_mapping)
677 (gfc_add_interface_mapping, gfc_finish_interface_mapping)
678 (gfc_apply_interface_mapping): Declare.
679 * trans-array.h (gfc_set_loop_bounds_from_array_spec): Declare.
680 (gfc_trans_allocate_temp_array): Add pre and post block arguments.
681 * trans-array.c (gfc_set_loop_bounds_from_array_spec): New function.
682 (gfc_trans_allocate_array_storage): Replace loop argument with
683 separate pre and post blocks.
684 (gfc_trans_allocate_temp_array): Add pre and post block arguments.
685 Update call to gfc_trans_allocate_array_storage.
686 (gfc_trans_array_constructor, gfc_conv_loop_setup): Adjust for new
687 interface to gfc_trans_allocate_temp_array.
688 * trans-expr.c (gfc_interface_sym_mapping, gfc_interface_mapping):
690 (gfc_init_interface_mapping, gfc_free_interface_mapping)
691 (gfc_add_interface_mapping, gfc_finish_interface_mapping)
692 (gfc_apply_interface_mapping): Make extern.
693 (gfc_conv_function_call): Build an interface mapping for array
694 return values too. Call gfc_set_loop_bounds_from_array_spec.
695 Adjust call to gfc_trans_allocate_temp_array so that code is
696 added to SE rather than LOOP.
698 2005-09-09 Richard Sandiford <richard@codesourcery.com>
701 * trans.h (gfor_fndecl_internal_realloc): Declare.
702 (gfor_fndecl_internal_realloc64): Declare.
703 * trans-decl.c (gfor_fndecl_internal_realloc): New variable.
704 (gfor_fndecl_internal_realloc64): New variable.
705 (gfc_build_builtin_function_decls): Initialize them.
706 * trans-array.h (gfc_trans_allocate_temp_array): Add a fourth argument.
707 * trans-array.c (gfc_trans_allocate_array_storage): Add an argument
708 to say whether the array can grow later. Don't allocate the array
709 on the stack if so. Don't call malloc for zero-sized arrays.
710 (gfc_trans_allocate_temp_array): Add a similar argument here.
711 Pass it along to gfc_trans_allocate_array_storage.
712 (gfc_get_iteration_count, gfc_grow_array): New functions.
713 (gfc_iterator_has_dynamic_bounds): New function.
714 (gfc_get_array_constructor_element_size): New function.
715 (gfc_get_array_constructor_size): New function.
716 (gfc_trans_array_ctor_element): Replace pointer argument with
718 (gfc_trans_array_constructor_subarray): Likewise. Take an extra
719 argument to say whether the variable-sized part of the constructor
720 must be allocated using realloc. Grow the array when this
722 (gfc_trans_array_constructor_value): Likewise.
723 (gfc_get_array_cons_size): Delete.
724 (gfc_trans_array_constructor): If the loop bound has not been set,
725 split the allocation into a static part and a dynamic part. Set
726 loop->to to the bounds for static part before allocating the
727 temporary. Adjust call to gfc_trans_array_constructor_value.
728 (gfc_conv_loop_setup): Allow any constructor to determine the
729 loop bounds. Check whether the constructor has a dynamic size
730 and prefer to use something else if so. Expect the loop bound
731 to be set later. Adjust call to gfc_trans_allocate_temp_array.
732 * trans-expr.c (gfc_conv_function_call): Adjust another call here.
734 2005-09-09 Paul Thomas <pault@gcc.gnu.org>
737 * module.c (find_use_name_n): Based on original
738 find_use_name. Either counts number of use names for a
739 given real name or returns use name n.
740 (find_use_name, number_use_names): Interfaces to the
741 function find_use_name_n.
742 (read_module): Add the logic and calls to these functions,
743 so that mutiple reuses of the same real name are loaded.
745 2005-09-09 Paul Thomas <pault@gcc.gnu.org>
752 * gfortran.h: Move definition of BLANK_COMMON_NAME from trans-
753 common.c so that it is accessible to module.c. Add common_head
754 field to gfc_symbol structure. Add field for the equivalence
755 name AND new attr field, in_equivalence.
756 * match.c (gfc_match_common, gfc_match_equivalence): In loops
757 that flag common block equivalences, emit an error if the
758 common blocks are different, using sym->common_head as the
759 common block identifier. Ensure that symbols that are equivalence
760 associated with a common block are marked as being in_common.
761 * module.c (write_blank_common): New.
762 (write_common): Use unmangled common block name.
763 (load_equiv): New function ported from g95.
764 (read_module): Call load_equiv.
765 (write_equiv): New function ported from g95. Correct
766 string referencing for gfc functions. Give module
767 equivalences a unique name.
768 (write_module): Call write_equiv and write_blank_common.
769 * primary.c (match_variable) Old gfc_match_variable, made
770 static and third argument provided to indicate if parent
771 namespace to be visited or not.
772 (gfc_match_variable) New. Interface to match_variable.
773 (gfc_match_equiv_variable) New. Interface to match_variable.
774 * trans-common.c (finish_equivalences): Provide the call
775 to create_common with a gfc_common_header so that
776 module equivalences are made external, rather than local.
777 (find_equivalences): Ensure that all members in common block
778 equivalences are marked as used. This prevents the subsequent
779 call to this function from making local unions.
780 * trans-decl.c (gfc_generate_function_code): Move the call to
781 gfc_generate_contained_functions to after the call to
782 gfc_trans_common so the use-associated, contained common
783 blocks produce the correct references.
784 (gfc_create_module_variable): Return for equivalenced symbols
785 with existing backend declaration.
787 2005-09-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
790 * match.c (gfc_match_common): Remove unnecessary / wrong special
791 cases for end-of-statement.
793 2005-09-08 Janne Blomqvist <jblomqvi@cc.hut.fi>
795 * gfortran.texi: Add section about implemented F2003 features.
797 2005-09-08 Richard Sandiford <richard@codesourcery.com>
800 * trans-array.c (gfc_add_loop_ss_code): Set ss->string_length in
801 the GFC_SS_FUNCTION case too.
802 * trans-expr.c (gfc_conv_function_val): Allow symbols to be bound
803 to function pointers as well as function decls.
804 (gfc_interface_sym_mapping, gfc_interface_mapping): New structures.
805 (gfc_init_interface_mapping, gfc_free_interface_mapping)
806 (gfc_get_interface_mapping_charlen, gfc_get_interface_mapping_array)
807 (gfc_set_interface_mapping_bounds, gfc_add_interface_mapping)
808 (gfc_finish_interface_mapping, gfc_apply_interface_mapping_to_cons)
809 (gfc_apply_interface_mapping_to_ref)
810 (gfc_apply_interface_mapping_to_expr)
811 (gfc_apply_interface_mapping): New functions.
812 (gfc_conv_function_call): Evaluate the arguments before working
813 out where the result should go. Make the null pointer case provide
814 the string length in parmse.string_length. Cope with non-constant
815 string lengths, using the above functions to evaluate such lengths.
816 Use a temporary typespec; don't assign to sym->cl->backend_decl.
817 Don't assign to se->string_length when returning a cached array
820 2005-09-08 Richard Sandiford <richard@codesourcery.com>
823 * trans-array.c (gfc_conv_array_ref): Call gfc_advance_se_ss_chain
824 after handling scalarized references. Make "indexse" inherit from
825 "se" when handling AR_ELEMENTs.
826 (gfc_walk_variable_expr): Add GFC_SS_SCALAR entries for each
827 substring or scalar reference that follows an array section.
828 * trans-expr.c (gfc_conv_variable): When called from within a
829 scalarization loop, start out with "ref" pointing to the scalarized
830 part of the reference. Don't call gfc_advance_se_ss_chain here.
832 2005-09-07 Richard Sandiford <richard@codesourcery.com>
835 * trans-expr.c (gfc_trans_pointer_assignment): Assign to a temporary
836 descriptor if the rhs is not a null pointer or variable.
838 2005-09-07 Thomas Koenig <Thomas.Koenig@online.de>
841 * symbol.c(check_conflict): Add conflict for parameter/save,
843 2005-09-06 Richard Sandiford <richard@codesourcery.com>
846 * simplify.c (gfc_simplify_transpose): Set the result's typespec from
847 the source, not the first element of the return value.
849 2005-09-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
852 * io.c (match_io): Correctly backup if PRINT followed by
853 symbol which is not a namelist. Force blank between PRINT
854 and namelist in free form.
856 2005-08-31 Francois-Xavier Coudert <coudert@clipper.ens.fr>
859 * gfortran.h (gfc_option_t): Add flag_automatic.
860 * invoke.texi: Document the -fno-automatic option.
861 * lang.opt: Add a -fautomatic option.
862 * options.c (gfc_init_options): Default for -fautomatic is on.
863 (gfc_handle_option): Add handling of -fautomatic option.
864 * resolve.c (gfc_resolve): When -fno-automatic is used, mark
865 needed variables as SAVE.
867 2005-08-27 Erik Edelmann <erik.edelmann@iki.fi>
869 * trans-array.c (gfc_trans_deferred_array): Fix comments.
871 2005-08-27 Erik Schnetter <schnetter@aei.mpg.de>
873 * primary.c (match_charkind_name): Fix typo in comment leading to
876 2005-08-25 Erik Edelmann <eedelman@acclab.helsinki.fi>
879 * symbol.c (find_special): Remove.
880 (build_sym, add_init_expr, attr_decl1): Remove calls to
881 find_special in favor of calls to gfc_get_symbol.
883 2005-08-24 Thomas Koenig <Thomas.Koenig@online.de>
886 * gfortran.h (symbol_attribute): Add noreturn to the structure.
887 (gfc_intrinsic_sym): Add noreturn to the structure.
888 * intrinsic.c (make_noreturn): New function.
889 (add_subroutines): Mark subroutines abort and exit as noreturn.
890 (gfc_intrinsic_sub_interface): Copy noreturn attribute from
891 isym to the resolved symbol.
892 * trans-decl.c (gfc_get_extern_function_decl): Set function
893 as VOLATILE (== noreturn) if the noreturn attribute is set.
895 2005-08-21 Steven G. Kargl <kargls@comcast.net>
897 * decl.c: Typo in comment.
899 2005-08-21 Steven G. Kargl <kargls@comcast.net>
901 * array.c: Bump GFC_MAX_AC_EXPAND from 100 to 65535.
903 2005-08-21 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
905 * gfortran.h (gfc_option_t): Remove source field. Add
907 (gfc_new_file): Remove arguments in prototype.
908 (gfc_source_file): Make 'const char *'.
909 * f95-lang.c (gfc_init): Use gfc_source_file instead of
910 gfc_option.source. Call gfc_new_file without arguments.
911 * invoke.texi: Document new options '-fd-lines-as-code' and
912 '-fd-lines-as-comment'.
913 * lang.opt: Add new options. Alphabetize.
914 * options.c (gfc_init_options): Initialize gfc_source_file instead
915 of gfc_option.source. Initialize gfc_option.flag_d_lines.
916 (form_from_filename): Move here from scanner.c. Make
917 'filename' argument 'const'.
918 (gfc_post_options): Set gfc_source_file. Determine source form.
919 Warn if 'd-lines*' are used in free form.
920 * scanner.c (gfc_source_file): Constify.
921 (skip_fixed_comments): Deal with d-lines.
922 (get_file): Constify argument 'name'.
923 (load_file): Constify argument 'filename'.
924 (form_from_filename): Moved to options.c.
925 (gfc_new_file): Remove arguments. Don't initialize
926 gfc_source_file, don't determine source form.
927 * trans-const.c (gfc_init_constants): Use gfc_source_file instead
928 of gfc_option.source.
930 2005-08-19 Steven G. Kargl <kargls@comcast.net>
933 * gfortran.h: Remove PATH_MAX definition.
934 * module.c (write_module, gfc_dump_module): Use alloca to allocate
936 * scanner.c (gfc_release_include_path, form_from_filename): Ditto.
938 2004-08-16 Huang Chun <chunhuang73@hotmail.com>
940 * trans-expr.c (gfc_conv_power_op): Evaluate the expression before
943 2005-08-14 Asher Langton <langton2@llnl.gov>
945 * parse.c (match): Enclose macro in do...while(0) and braces.
947 2005-08-14 Paul Thomas <pault@gcc.gnu.org>
950 * gfortran.texi: Document PRINT namelist.
952 2005-08-14 Paul Thomas <pault@gcc.gnu.org>
955 * io.c (match_io): Add code to implement PRINT namelist.
957 2005-08-14 Canqun Yang <canqun@nudt.edu.cn>
959 * trans-stmt.c (gfc_trans_arithmetic_if): Optimized in case of equal
962 2005-08-11 Francois-Xavier Coudert <coudert@clipper.ens.fr>
963 Steven Bosscher <stevenb@suse.de>
966 * gfortran.h: Add is_main_program member to symbol_attribute.
967 * trans-decl: Add a gfor_fndecl_set_std tree.
968 (gfc_build_builtin_function_decls): Create it.
969 (gfc_generate_function_code): Add this call at the beginning of
971 * trans.c (gfc_generate_code): Move main_program and attr.
972 * trans.h: Add declaration for gfor_fndecl_set_std.
974 2005-08-10 Thomas Koenig <Thomas.Koenig@online.de>
977 gfortran.h: Declare new function gfc_resolve_dim_arg.
978 resolve.c: New function gfc_resolve_dim_arg.
979 iresolve.c (gfc_resolve_all): Use gfc_resolve_dim_arg.
980 (gfc_resolve_any): Likewise.
981 (gfc_resolve_count): Likewise.
982 (gfc_resolve_cshift): Likewise. If the kind of shift is less
983 gfc_default_integer_kind, convert it to default integer type.
984 (gfc_resolve_eoshift): Likewise.
985 (gfc_resolve_maxloc): Use gfc_resolve_dim_arg.
986 (gfc_resolve_maxval): Likewise.
987 (gfc_resolve_minloc): Likewise.
988 (gfc_resolve_minval): Likewise.
989 (gfc_resolve_product): Likewise.
990 (gfc_resolve_spread): Likewise.
991 (gfc_resolve_sum): Likewise.
993 2005-08-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
995 * check.c (gfc_check_ttynam_sub, gfc_check_isatty): Add check
996 functions for new intrinsics TTYNAM and ISATTY.
997 * intrinsic.c (add_functions, add_subroutines): Add new
999 * intrinsic.h: Add prototypes for new check and resolve
1001 * iresolve.c (gfc_resolve_isatty, gfc_resolve_ttynam_sub): New
1002 resolve functions for intrinsics TTYNAM and ISATTY.
1003 * gfortran.h (gfc_generic_isym_id): Add symbol for ISATTY.
1004 * trans-intrinsic.c: Add case for GFC_ISYM_ISATTY.
1006 2005-08-09 Jakub Jelinek <jakub@redhat.com>
1008 * scanner.c (preprocessor_line): Don't write beyond the end of flag
1011 2005-08-07 Janne Blomqvist <jblomqvi@cc.hut.fi>
1014 * dump-parse-tree.c (gfc_show_code_node): Add case for FLUSH.
1015 * gfortran.h: Add enums for FLUSH.
1016 * io.c (gfc_free_filepos,match_file_element,match_filepos): Modify
1017 comment appropriately. (gfc_match_flush): New function.
1018 * match.c (gfc_match_if): Add match for flush.
1019 * match.h: Add prototype.
1020 * parse.c (decode_statement): Add flush to 'f' case.
1021 (next_statement): Add case for flush. (gfc_ascii_statement): Likewise.
1022 * resolve.c (resolve_code): Add flush case.
1023 * st.c (gfc_free_statement): Add flush case.
1024 * trans-io.c: Add prototype for flush.
1025 (gfc_build_io_library_fndecls): Build fndecl for flush.
1026 (gfc_trans_flush): New function.
1027 * trans-stmt.h: Add prototype.
1028 * trans.c (gfc_trans_code): Add case for flush.
1030 2005-08-06 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1032 * primary.c (match_hollerith_constant): Fix typo.
1034 2005-08-06 Kazu Hirata <kazu@codesourcery.com>
1036 * decl.c, dump-parse-tree.c, gfortran.texi, intrinsic.texi,
1037 invoke.texi, resolve.c, trans-array.c, trans-array.h,
1038 trans-common.c, trans-expr.c, trans-io.c, trans.h: Fix
1039 comment/doc typos. Follow spelling conventions.
1041 2005-08-06 Jakub Jelinek <jakub@redhat.com>
1045 * primary.c (match_varspec): If equiv_flag, don't look at sym's
1046 attributes, call gfc_match_array_ref up to twice and don't do any
1047 substring or component processing.
1048 * resolve.c (resolve_equivalence): Transform REF_ARRAY into
1049 REF_SUBSTRING or nothing if needed. Check that substrings
1050 don't have zero length.
1052 2005-08-05 Thomas Koenig <Thomas.Koenig@online.de>
1054 * trans-expr.c (gfc_build_builtin_function_decls): Mark
1055 stop_numeric and stop_string as non-returning.
1057 2005-08-04 Paul Brook <paul@codesourcery.com>
1059 * trans-expr.c (gfc_conv_expr, gfc_conv_expr_type): Update comments.
1060 (gfc_conv_expr_lhs): Fix assertion.
1061 (gfc_conv_expr_val): Merge post block. Set se.expr to new value.
1063 2005-08-02 David Edelsohn <edelsohn@gnu.org>
1066 * expr.c (simplify_parameter_variable): Do not copy the subobject
1067 references if the expression value is a constant.
1069 * expr.c (gfc_simplify_expr): Evaluate constant substrings.
1071 2005-07-31 Jerry DeLisle <jvdelisle@verizon.net>
1073 * intrinsic.texi: Add documentation for exponent, floor, and fnum and
1074 fix description of ceiling in index.
1076 2005-07-31 Steven Bosscher <stevenb@suse.de>
1078 * trans-decl.c (gfc_build_builtin_function_decls): Give the internal
1079 malloc functions the 'malloc' attribute. Give runtime_error the
1080 'noreturn' attribute.
1082 2005-07-31 Steven Bosscher <stevenb@suse.de>
1084 * trans-stmt.c (gfc_trans_goto): Jump to the known label instead
1085 of the assigned goto variable.
1087 2005-07-29 Steven Bosscher <stevenb@suse.de>
1089 * trans-types.h (gfc_array_range_type): Add missing GTY decl for this.
1091 2005-07-28 Andrew Pinski <pinskia@physics.uc.edu>
1093 * fortran/f95-lang.c (language_function): Remove
1094 named_labels, shadowed_labels, returns_value, returns_abnormally,
1095 warn_about_return_type, and extern_inline fields.
1096 (named_labels): Remove variable.
1097 (gfc_init_decl_processing): Remove setting of named_labels.
1099 2005-07-27 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1102 * resolve.c (resolve_operator): Improve diagnostic for comparison
1103 of logicals with invalid operator.
1105 2005-07-25 Jakub Jelinek <jakub@redhat.com>
1108 * data.c (gfc_assign_data_value_range): Call
1109 create_character_initializer if last_ts is a character type.
1111 2005-07-22 Manfred Hollstein <mh@suse.com>
1113 * match.c (gfc_match_symbol): Fix uninitialised warnings.
1114 * matchexp.c (gfc_match_expr): Likewise.
1116 2005-07-20 Giovanni Bajo <giovannibajo@libero.it>
1118 Make CONSTRUCTOR use VEC to store initializers.
1119 * trans-array.c (gfc_build_null_descriptor,
1120 gfc_trans_array_constructor_value, gfc_conv_array_initializer):
1121 Update to cope with VEC in CONSTRUCTOR_ELTS.
1122 * trans-common.c (create_common): Likewise.
1123 * trans-expr.c (gfc_conv_structure): Likewise.
1124 * trans-stmt.c (gfc_trans_character_select): Use
1125 build_constructor_from_list instead of build_constructor.
1127 2005-07-19 Paul Thomas <pault@gcc.gnu.org>
1130 * resolve.c (resolve_symbol): A symbol with FL_UNKNOWN
1131 is matched against interfaces in parent namespaces. If there
1132 the symtree is set to point to the interface.
1134 2005-07-16 David Edelsohn <edelsohn@gnu.org>
1137 * decl.c (do_parm): Adjust character initializer to character length
1138 of symbol before assigning.
1140 2005-07-14 Steve Ellcey <sje@cup.hp.com>
1142 * trans-types.c (MAX_REAL_KINDS): Increase from 4 to 5.
1144 2005-07-14 Jakub Jelinek <jakub@redhat.com>
1146 * gfortran.h (MAX_ERROR_MESSAGE): Remove.
1147 (gfc_error_buf): Add allocated and index fields. Change message
1148 field from array to a pointer.
1149 * error.c (use_warning_buffer, error_ptr, warning_ptr): Remove.
1150 (cur_error_buffer): New variable.
1151 (error_char): Use cur_error_buffer->{message,index} instead of
1152 {warning,error}_{buffer.message,ptr}. Reallocate message buffer
1154 (gfc_warning, gfc_notify_std, gfc_error, gfc_error_now): Setup
1155 cur_error_buffer and its index rather than {warning,error}_ptr
1156 and use_warning_buffer.
1157 (gfc_warning_check, gfc_error_check): Don't print anything if
1159 (gfc_push_error): Allocate saved message with xstrdup.
1160 (gfc_pop_error): Free saved message with gfc_free.
1161 (gfc_free_error): New function.
1162 * primary.c (match_complex_constant): Call gfc_free_error if
1163 gfc_pop_error will not be called.
1164 * match.c (gfc_match_st_function): Likewise.
1167 * scanner.c (preprocessor_line): Don't treat flag 3 as the start of a new
1168 file. Fix file left but not entered warning.
1170 2005-07-14 Feng Wang <fengwang@nudt.edu.cn>
1171 Steven G. Kargl <kargls@comcast.net>
1173 * array.c (resolve_character_array_constructor): Allocate gfc_charlen
1174 for the array and attach to namespace list for automatic deallocation.
1176 2005-07-13 Andreas Schwab <schwab@suse.de>
1178 * Make-lang.in (fortran/dependency.o): Depend on
1179 $(GFORTRAN_TRANS_DEPS).
1181 2005-07-11 Jakub Jelinek <jakub@redhat.com>
1183 * trans-stmt.c (gfc_trans_forall_loop): Clear maskindex before
1185 (gfc_trans_assign_need_temp, gfc_trans_pointer_assign_need_temp,
1186 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_2):
1187 Don't clear maskindexes here.
1189 2005-07-08 Daniel Berlin <dberlin@dberlin.org>
1191 * trans-decl.c (create_function_arglist): DECL_ARG_TYPE_AS_WRITTEN
1194 2005-07-08 Jakub Jelinek <jakub@redhat.com>
1196 * primary.c (gfc_match_rvalue): Handle ENTRY the same way
1199 2005-07-07 Jakub Jelinek <jakub@redhat.com>
1201 * scanner.c (load_line): Add pbuflen argument, don't make
1202 buflen static. If maxlen == 0 or preprocessor_flag,
1203 don't truncate at buflen, but at maxlen. In xrealloc add
1204 1 byte at the end for the terminating '\0'. Don't fill
1205 with spaces up to buflen, but gfc_option.fixed_line_length.
1206 (load_file): Adjust load_line caller. Add line_len variable.
1208 * scanner.c (preprocessor_line): Only set current_file->line when errors
1209 have not been encountered. Warn and don't crash if a file leave
1210 preprocessor line has no corresponding entering line. Formatting.
1212 2005-07-07 Steven Bosscher <stevenb@suse.de>
1214 * primary.c (match_hollerith_constant): Use int, not unsigned int,
1215 for the hollerith length. Fix indentation.
1217 2005-07-07 Feng Wang <fengwang@nudt.edu.cn>
1222 * arith.c (gfc_hollerith2int, gfc_hollerith2real,
1223 gfc_hollerith2complex, gfc_hollerith2character, gfc_hollerith2logical):
1225 (eval_intrinsic): Don't evaluate if Hollerith constant arguments exist.
1226 * arith.h (gfc_hollerith2int, gfc_hollerith2real,
1227 gfc_hollerith2complex, gfc_hollerith2character, gfc_hollerith2logical):
1229 * expr.c (free_expr0): Free memery allocated for Hollerith constant.
1230 (gfc_copy_expr): Allocate and copy string if Expr is from Hollerith.
1231 (gfc_check_assign): Enable conversion from Hollerith to other.
1232 * gfortran.h (bt): Add BT_HOLLERITH.
1233 (gfc_expr): Add from_H flag.
1234 * intrinsic.c (gfc_type_letter): Return 'h' for BT_HOLLERITH.
1235 (add_conversions): Add conversions from Hollerith constant to other.
1236 (do_simplify): Don't simplify if Hollerith constant arguments exist.
1237 * io.c (resolve_tag): Enable array in FORMAT tag under GFC_STD_GNU.
1238 * misc.c (gfc_basetype_name): Return "HOLLERITH" for BT_HOLLERITH.
1239 (gfc_type_name): Print "HOLLERITH" for BT_HOLLERITH.
1240 * primary.c (match_hollerith_constant): New function.
1241 (gfc_match_literal_constant): Add match Hollerith before Integer.
1242 * simplify.c (gfc_convert_constant): Add conversion from Hollerith
1244 * trans-const.c (gfc_conv_constant_to_tree): Use VIEW_CONVERT_EXPR to
1245 convert Hollerith constant to tree.
1246 * trans-io.c (gfc_convert_array_to_string): Get array's address and
1247 length to set string expr.
1248 (set_string): Deal with array assigned Hollerith constant and character
1250 * gfortran.texi: Document Hollerith constants as extention support.
1252 2005-07-07 Feng Wang <fengwang@nudt.edu.cn>
1255 * trans-array.c (gfc_trans_array_constructor_value): Fix index of data.
1257 2005-07-07 Jakub Jelinek <jakub@redhat.com>
1259 * decl.c (gfc_match_entry): Allow ENTRY without parentheses
1262 2005-07-03 Kazu Hirata <kazu@codesourcery.com>
1264 * gfortran.texi, intrinsic.texi: Fix typos.
1265 * symbol.c: Fix a comment typo.
1267 2005-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1269 * error.c (error_printf, error_print): Use ATTRIBUTE_GCC_GFC.
1270 * gfortran.h (ATTRIBUTE_GCC_GFC): New.
1271 (gfc_warning, gfc_warning_now, gfc_error, gfc_error_now,
1272 gfc_fatal_error, gfc_internal_error, gfc_notify_std): Use
1275 2005-07-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1278 * io.c (match_dt_element): Do not allow END tag in PRINT or
1281 2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
1283 * lang.opt: Remove "." from end of help texts.
1285 2005-07-01 Jerry DeLisle <jvdelisle@verizon.net>
1287 * gfortran.texi: Fix typos and grammar.
1288 * invoke.texi: Fix typos and grammar.
1289 * intrinsic.texi: Add documentaion for eoshift, epsilon, etime, and
1290 exit. Fixed alignment of text for dtime syntax. Fixed a few line
1293 2005-06-25 Jakub Jelinek <jakub@redhat.com>
1295 * trans-stmt.c (gfc_trans_forall_1): Prefer to use smaller logical
1296 type than boolean_type_node.
1298 2005-06-25 Kelley Cook <kcook@gcc.gnu.org>
1300 * all files: Update FSF address in copyright headers.
1302 2005-06-24 Jerry DeLisle <jvdelisle@verizon.net>
1305 * gfortran.h: Add symbols for new intrinsic functions.
1306 * intrinsic.c: Add new functions acosh, asinh, and atanh.
1307 * intrinsic.h: Add prototypes for the new functions.
1308 * iresolve.c (gfc_resolve_acosh): New function.
1309 (gfc_resolve_asinh): New function.
1310 (gfc_resolve_atanh): New function.
1311 * mathbuiltins.def: Add defines.
1312 * simplify.c (gfc_simplify_acosh): New function.
1313 (gfc_simplify_asinh): New function.
1314 (gfc_simplify_atanh): New function.
1316 2005-06-24 Feng Wang <fengwang@nudt.edu.cn>
1318 * simplify.c (gfc_simplify_modulo): Don't clear before get result.
1320 2005-06-22 Paul Brook <paul@codesourcery.com>
1323 * symbol.c (gfc_is_var_automatic): New function.
1324 (save_symbol): Use it.
1326 2005-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1327 Paul Thomas <pault@gcc.gnu.org>
1331 * module.c (mio_namelist): New function. Correct to set
1332 namelist_tail and to give error on renaming namelist by use
1334 (mio_symbol): Call mio_namelist.
1336 2005-06-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1338 * gfortran.h: Add flag_backslash compile-time option.
1339 * lang.opt: Add support for -fbackslash option.
1340 * options.c: Likewise.
1341 * primary.c: Implement behavior for -fno-backslash.
1342 * invoke.texi: Add doc for -fbackslash option.
1343 * gfortran.texi: Remove mention of -fno-backslash as a
1346 2005-06-20 Steven G. Kargl <kargls@comcast.net>
1350 * match.c (gfc_match_label): Detect duplicate labels.
1353 2005-06-20 Erik Edelmann <erik.edelmann@iki.fi>
1355 * intrinsic.c (check_intrinsic_standard): Fix spelling error
1356 in a warning message.
1358 2005-06-18 Erik Edelman <eedelman@acclab.helsinki.fi>
1359 Steven G. Kargl <kargls@comast.net>
1362 * primary.c (gfc_match_rvalue): expr_type can be EXPR_CONSTANT
1363 for an array; check that sym->as is NULL.
1366 2005-06-18 Steven G. Kargl <kargls@comcast.net>
1368 * intrinsic.c (gfc_intrinsic_func_interface): Enable errors for generic
1369 functions whose simplification routine return FAILURE.
1371 2005-06-13 Geoffrey Keating <geoffk@apple.com>
1373 * Make-lang.in (fortran.install-man): Doesn't depend on installdirs.
1374 (rule for installing f95.1 manpage): Does depend on installdirs.
1376 2005-06-13 Jakub Jelinek <jakub@redhat.com>
1379 * trans-stmt.c (gfc_trans_forall_loop): Only increment maskindex
1380 in the innermost loop.
1382 * trans-expr.c (gfc_conv_function_call): Return int instead of
1383 void. Use a local variable for has_alternate_specifier and
1384 return it. Avoid modification of function type's return value
1385 in place, since it may be shared.
1386 * trans.h (has_alternate_specifier): Remove.
1387 (gfc_conv_function_call): Change return type.
1388 * trans-stmt.c (has_alternate_specifier): Remove.
1389 (gfc_trans_call): Add a local has_alternate_specifier variable,
1390 set it from gfc_conv_function_call return value.
1392 2005-06-12 Richard Henderson <rth@redhat.com>
1394 * trans-array.c (gfc_conv_descriptor_data_get): Rename from
1395 gfc_conv_descriptor_data. Cast the result to the DATAPTR type.
1396 (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): New.
1397 (gfc_trans_allocate_array_storage): Use them.
1398 (gfc_array_allocate, gfc_array_deallocate): Likewise.
1399 (gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor): Likewise.
1400 (gfc_trans_deferred_array): Likewise.
1401 * trans-expr.c (gfc_conv_function_call): Likewise.
1402 (gfc_trans_subcomponent_assign): Likewise.
1403 (gfc_trans_pointer_assignment): Likewise.
1404 * trans-intrinsic.c (gfc_conv_allocated): Likewise.
1405 * trans-types.c (gfc_array_descriptor_base): New.
1406 (gfc_get_element_type): Use GFC_TYPE_ARRAY_DATAPTR_TYPE.
1407 (gfc_get_array_descriptor_base): Break out from ...
1408 (gfc_get_array_type_bounds): ... here. Create type variants.
1409 * trans-array.h (gfc_conv_descriptor_data_get): Declare.
1410 (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): Declare.
1412 2005-06-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1414 * trans-expr.c (gfc_conv_variable): POINTER results don't need f2c
1415 calling conventions. Look at sym instead of sym->result.
1416 * trans-types.c (gfc_sym_type): Remove workaround for frontend bug.
1417 Remove condition which is always false with workaround removed.
1418 (gfc_return_by_reference): Always look at sym, never at sym->result.
1420 2005-06-11 Steven G. Kargl <kargls@comcast.net>
1424 * trans-array.c (gfc_array_deallocate): pstat is new argument
1425 (gfc_array_allocate): update gfc_array_deallocate() call.
1426 (gfc_trans_deferred_array): ditto.
1427 * trans-array.h: update gfc_array_deallocate() prototype.
1428 * trans-decl.c (gfc_build_builtin_function_decls): update declaration
1429 * trans-stmt.c (gfc_trans_deallocate): Implement STAT= feature.
1431 2005-06-07 Jerry DeLisle <jvdelisle@verizon.net>
1433 * intrinsic.texi: Add documentation for dcmplx, digits,
1434 dim, idim, ddim, dot_product, dprod, dreal, and dtime.
1436 2005-06-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1439 * trans-array.c (gfc_trans_array_constructor_value): Slightly reorder.
1440 Generate correct exit condition in case of negative steps in
1443 * invoke.texi: Fix description of flags required for compatibility
1446 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1447 Erik Schnetter <schnetter@aei.mpg.de>
1450 * trans.c (gfc_get_backend_locus): Remove unnecessary adjustment,
1451 remove FIXME comment.
1453 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1455 * match.c (match_forall_iterator): Don't immediately give error if '='
1456 is not followed by an expression.
1458 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1459 Erik Edelmann <erik.edelmann@iki.fi>
1461 * array.c (gfc_match_array_constructor): Disallow empty array
1464 2005-06-03 Jerry DeLisle <jvdelisle@verizon.net>
1466 * fortran/intrinsic.texi: Add documentation for
1467 command_argument_count, conjg, dconjg, count,
1468 cpu_time, cshift, date_and_time, dble, dfloat.
1470 2005-06-01 Roger Sayle <roger@eyesopen.com>
1472 * intrinsic.c (add_conv): No longer take a "simplify" argument as
1473 its always gfc_convert_constant, instead take a "standard" argument.
1474 (add_conversions): Change all existing calls of add_conv to pass
1475 GFC_STD_F77 as appropriate. Additionally, if we're allowing GNU
1476 extensions support integer-logical and logical-integer conversions.
1477 (gfc_convert_type_warn): Warn about use the use of these conversions
1478 as a extension when appropriate, i.e. with -pedantic.
1479 * simplify.c (gfc_convert_constant): Add support for integer to
1480 logical and logical to integer conversions, using gfc_int2log and
1482 * arith.c (gfc_log2int, gfc_int2log): New functions.
1483 * arith.h (gfc_log2int, gfc_int2log): Prototype here.
1484 * gfortran.texi: Document this new GNU extension.
1486 2005-06-01 Paul Thomas <pault@gcc.gnu.org>
1488 * fortran/trans-expr.c (gfc_conv_variable): Clean up bracketting.
1489 * fortran/trans-expr.c (gfc_conv_function_call): Insert spaces.
1490 Correct comments and replace convert of integer_one_node with
1493 2005-06-01 Jakub Jelinek <jakub@redhat.com>
1496 * resolve.c (resolve_contained_fntype): Use sym->attr.untyped
1497 to avoid giving error multiple times.
1498 (resolve_entries): Don't error about BT_UNKNOWN here.
1499 (resolve_unknown_f): Capitalize IMPLICIT for consistency.
1500 (resolve_fntype): New function.
1501 (gfc_resolve): Call resolve_fntype.
1503 2005-06-01 Feng Wang <fengwang@nudt.edu.cn>
1506 * fortran/io.c (resolve_tag): Fix error message.
1508 2005-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1510 * fortran/trans-decl.c: Don't include errors.h.
1511 * fortran/Make-lang.in: Updates dependencies.
1513 2005-05-31 Paul Thomas <pault@gcc.gnu.org>
1518 * fortran/trans-array.c (gfc_conv_expr_descriptor): Obtain the
1519 string length from the expression typespec character length value
1520 and set temp_ss->stringlength and backend_decl. Obtain the
1521 tree expression from gfc_conv_expr rather than gfc_conv_expr_val.
1522 Dereference the expression to obtain the character.
1523 * fortran/trans-expr.c (gfc_conv_component_ref): Remove the
1524 dereference of scalar character pointer structure components.
1525 * fortran/trans-expr.c (gfc_trans_subarray_assign): Obtain the
1526 string length for the structure component from the component
1529 2005-05-30 Roger Sayle <roger@eyesopen.com>
1531 * gfortran.h (GFC_STD_LEGACY): New "standard" macro. Reindent.
1532 * options.c (gfc_init_options): By default, allow legacy extensions
1533 but warn about them.
1534 (gfc_post_options): Make -pedantic warn about legacy extensions
1535 even with -std=legacy.
1536 (gfc_handle_option): Make -std=gnu follow the default behaviour
1537 of warning about legacy extensions, but allowing them. Make the
1538 new -std=legacy accept everything and warn about nothing.
1539 * lang.opt (std=legacy): New F95 command line option.
1540 * invoke.texi: Document both -std=f2003 and -std=legacy.
1541 * gfortran.texi: Explain the two types of extensions and document
1542 how they are affected by the various -std= command line options.
1544 2005-05-30 Kazu Hirata <kazu@cs.umass.edu>
1546 * trans-expr.c: Remove trailing ^M.
1548 * trans-expr.c: Fix comment typos.
1550 2005-05-29 Paul Thomas <pault@gcc.gnu.org>
1558 * fortran/trans-array.c (gfc_conv_resolve_dependencies): Add string
1559 length to temp_ss for character pointer array assignments.
1560 * fortran/trans-expr.c (gfc_conv_variable): Correct errors in
1561 dereferencing of characters and character pointers.
1562 * fortran/trans-expr.c (gfc_conv_function_call): Provide string
1563 length as return argument for various kinds of handling of return.
1564 Return a char[]* temporary for character pointer functions and
1565 dereference the temporary upon return.
1567 2005-05-29 Janne Blomqvist <jblomqvi@vipunen.hut.fi>
1568 Steven G. Kargl <kargls@comcast.net>
1571 * io.c (gfc_match_inquire): Implement constraints on UNIT and FILE usage.
1573 2005-05-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1576 * io.c (format_item_1): Add check and extension warning for
1579 2005-05-28 Steven G. Kargl <kargls@comcast.net>
1581 * arith.c (gfc_arith_init_1): Fix off by one problem;
1582 (gfc_check_integer_range): Chop extra bits in subnormal numbers.
1584 2005-05-28 Jerry DeLisle <jvdelisle@verizon.net>
1585 Steven G. Kargl <kargls@comcast.net>
1587 * intrinsic.texi: added documentation for BIT_SIZE, BTEST, CHAR, CEILING
1590 2005-05-27 Steven G. Kargl <kargls@comcast.net>
1592 * trans-array.c (gfc_trans_deferred_array): Use build_int_cst to force
1593 like types in comparsion.
1595 2005-05-26 Kazu Hirata <kazu@cs.umass.edu>
1597 * data.c, parse.c, trans-array.c, trans-decl.c,
1598 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
1599 trans.h: Fix comment typos. Follow spelling conventions.
1601 2005-05-22 Roger Sayle <roger@eyesopen.com>
1603 * gfortran.texi: Document some more GNU extensions.
1605 2005-05-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1607 * error.c (gfc_warning): Fix typo in comment.
1609 2005-05-18 Thomas Koenig <Thomas.Koenig@online.de>
1612 * fortran/iresolve.c (gfc_resolve_reshape): Add
1613 gfc_type_letter (BT_COMPLEX) for complex to
1614 to resolved function name.
1616 2005-05-18 Erik Edelmann <erik.edelmann@iki.fi>
1618 * array.c (gfc_match_array_constructor): Support [ ... ]
1619 style array constructors.
1621 2005-05-18 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1623 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_TRUNC
1624 and BUILT_IN_TRUNCF instead of BUILT_IN_FLOOR and BUILT_IN_FLOORF.
1625 * trans-intrinsic.c (build_fix_expr): Change 'op' argument
1626 to correct enum type.
1627 (gfc_conv_intrinsic_aint): Likewise. Clarify comment in front of
1628 function. Add default case to switch, deal with FIX_TRUNC_EXPR
1629 instead of FIX_FLOOR_EXPR.
1631 2005-05-18 Feng Wang <fengwang@nudt.edu.cn>
1634 * trans-const.c (gfc_conv_const_charlen): Use gfc_charlen_type_node to
1635 build character length.
1637 2005-05-17 Zdenek Dvorak <dvorakz@suse.cz>
1639 * trans-types.c (gfc_array_range_type): New variable.
1640 (gfc_init_types): Initialize gfc_array_range_type.
1641 (gfc_get_array_type_bounds): Use gfc_array_range_type.
1643 2005-05-17 Jakub Jelinek <jakub@redhat.com>
1646 * trans-stmt.c (generate_loop_for_temp_to_lhs): Remove SIZE and COUNT2
1647 arguments. If LSS is gfc_ss_terminator, increment COUNT1 by 1, instead
1648 of incrementing COUNT2 and using COUNT1+COUNT2 increment COUNT1 and use
1650 (generate_loop_for_rhs_to_temp): Likewise.
1651 (compute_overall_iter_number): Add INNER_SIZE_BODY argument.
1652 It non-NULL, add it to body.
1653 (allocate_temp_for_forall_nest_1): New function, split from
1654 allocate_temp_for_forall_nest.
1655 (allocate_temp_for_forall_nest): Add INNER_SIZE_BODY argument,
1656 propagate it down to compute_overall_iter_number. Use
1657 allocate_temp_for_forall_nest_1.
1658 (gfc_trans_assign_need_temp): Remove COUNT2. Call
1659 compute_inner_temp_size into a new stmtblock_t. Adjust calls to
1660 allocate_temp_for_forall_nest, generate_loop_for_rhs_to_temp
1661 and generate_loop_for_temp_to_lhs.
1662 (gfc_trans_pointer_assign_need_temp): Adjust calls to
1663 allocate_temp_for_forall_nest.
1664 (gfc_evaluate_where_mask): Call compute_inner_temp_size into a new
1665 stmtblock_t. Call compute_overall_iter_number just once, then
1666 allocate_temp_for_forall_nest_1 twice with the same size.
1667 Initialize mask indexes if nested_forall_info != NULL.
1668 (gfc_trans_where_2): Initialize mask indexes before calling
1669 gfc_trans_nested_forall_loop.
1671 2005-05-15 Feng Wang <fengwang@nudt.edu.cn>
1672 Jerry DeLisle <jvdelisle@verizon.net>
1675 * trans-stmt.c (gfc_trans_label_assign): fix pointer type, to
1676 resolve ICE on assign of format label.
1677 * trans-io.c (set_string): add fold-convert to properly
1678 handle assigned format label in write.
1680 2005-05-13 Paul Brook <paul@codesourcery.com>
1682 * trans-stmt.c (gfc_trans_forall_1): Fix comment typo.
1684 2005-05-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1686 * trans-types.c (gfc_is_nodesc_array): Remove redundant check.
1688 2005-05-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1691 * io.c (check_format): Look for literal characters inside
1694 2005-05-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1696 * resolve.c (resolve_symbol): Copy 'pointer' and 'dimension'
1697 attribute from result symbol to function symbol.
1698 * trans-expr.c (gfc_conv_function_call): Look at sym->attr.dimension
1699 instead of sym->result->attr.dimension.
1701 2005-05-10 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1704 * gfortran.h (gfc_option): Add flag_f2c.
1705 * invoke.texi: Document '-ff2c' command line option. Adapt
1706 documentation for '-fno-second-underscore' and '-fno-underscoring'.
1707 * lang.opt (ff2c): New entry.
1708 * options.c (gfc-init_options): Set default calling convention
1709 to -fno-f2c. Mark -fsecond-underscore unset.
1710 (gfc_post_options): Set -fsecond-underscore if not explicitly set
1712 (handle_options): Set gfc_option.flag_f2c according to requested
1714 * trans-decl.c (gfc_get_extern_function_decl): Use special f2c
1715 intrinsics where necessary.
1716 (gfc_trans_deferred_vars): Change todo error to assertion.
1717 * trans-expr.c (gfc_conv_variable): Dereference access
1718 to hidden result argument.
1719 (gfc_conv_function_call): Add hidden result argument to argument
1720 list if f2c calling conventions requested. Slightly restructure
1721 tests. Convert result of default REAL function to requested type
1722 if f2c calling conventions are used. Dereference COMPLEX result
1724 * trans-types.c (gfc_sym_type): Return double for default REAL
1725 function if f2c cc are used.
1726 (gfc_return_by_reference): Slightly restructure logic. Return
1727 COMPLEX by reference depending on calling conventions.
1728 (gfc_get_function_type): Correctly make hidden result argument a
1729 pass-by-reference argument for COMPLEX. Remove old code which does
1730 this for derived types.
1732 2005-05-09 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1734 * match.c (gfc_match_return): Only require space after keyword when
1735 it is obligatory. Only give stdwarn to after matching is successful.
1736 * dump-parse-tree.c (gfc_show_symbol): Deal with alternate returns.
1738 2005-05-08 Kazu Hirata <kazu@cs.umass.edu>
1740 * intrinsic.texi: Fix typos.
1742 2005-05-07 Steven G. Kargl <kargls@comcast.net>
1744 * intrinsic.texi: Document ASSOCIATED and ATAN2. Update Bessel function
1745 description to include information about scalar arguments.
1747 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
1749 * Make-lang.in, dump-parse-tree.c, invoke.texi, lang.opt,
1750 match.h, trans-array.h: Update copyright.
1752 2005-04-29 Tom Tromey <tromey@redhat.com>
1754 * f95-lang.c (poplevel): Updated for change to build_block.
1756 2005-04-29 Jakub Jelinek <jakub@redhat.com>
1760 * trans-expr.c (gfc_conv_variable): Handle return values in functions
1761 with alternate entry points.
1762 * resolve.c (resolve_entries): Remove unnecessary string termination
1763 after snprintf. Set result of entry master.
1764 If all entries have the same type, set entry master's type
1765 to that common type, otherwise set mixed_entry_master attribute.
1766 * trans-types.c (gfc_get_mixed_entry_union): New function.
1767 (gfc_get_function_type): Use it for mixed_entry_master functions.
1768 * gfortran.h (symbol_attribute): Add mixed_entry_master bit.
1769 * decl.c (gfc_match_entry): Set entry->result properly for
1771 * trans-decl.c (gfc_get_symbol_decl): For entry_master, skip over
1773 (build_entry_thunks): Handle return values in entry thunks.
1774 Clear BT_CHARACTER's ts.cl->backend_decl, so that it is not
1775 shared between multiple contexts.
1776 (gfc_get_fake_result_decl): Use DECL_ARGUMENTS from
1777 current_function_decl instead of sym->backend_decl. Skip over
1778 entry master's entry id argument. For mixed_entry_master entries or
1779 their results, return a COMPONENT_REF of the fake result.
1780 (gfc_trans_deferred_vars): Don't warn about missing return value if
1781 at least one entry point uses RESULT.
1782 (gfc_generate_function_code): For entry master returning
1783 CHARACTER, copy ts.cl->backend_decl to all entry result syms.
1784 * trans-array.c (gfc_trans_dummy_array_bias): Don't consider return
1785 values optional just because they are in entry master.
1787 2005-04-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1789 * gfortran.h (gfc_namespace): Add seen_implicit_none field,
1790 Tobias forgot this in previous commit.
1792 2005-04-29 Paul Brook <paul@codesourcery.com>
1794 * trans-expr.c (gfc_conv_expr_present): Fix broken assert. Update
1797 2005-04-29 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1799 * gfortran.h (gfc_namespace): Add seen_implicit_none field.
1800 * symbol.c (gfc_set_implicit_none): Give error if there's a previous
1801 IMPLICIT NONE, set seen_implicit_none.
1802 (gfc_merge_new_implicit): Error if there's an IMPLICIT NONE statement.
1804 2005-04-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1806 * gfortran.h (gfc_gsymbol): Make name a const char *.
1807 * symbol.c (gfc_get_gsymbol): Allocate gsymbol name via
1810 2005-04-28 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1813 * resolve.c (resolve_actual_arglist): Issue an error if a statement
1814 functions is used as actual argument.
1816 2005-04-27 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1819 * interface.c (compare_parameter): Ignore type for EXPR_NULL
1820 only if type is BT_UNKNOWN.
1822 2005-04-25 Paul Brook <paul@codesourcery.com>
1823 Steven G. Kargl <kargls@comcast.net>
1826 * check.c (gfc_check_ichar_iachar): New function.
1827 * instinsic.h (gfc_check_ichar_iachar): Add prototype.
1828 * intrinsic.c (add_functions): Use it.
1829 * primary.c (match_varspec, gfc_match_rvalue): Clear incorrect
1830 character expression lengths.
1832 2005-04-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1835 * trans-common.c (translate_common): Cast offset and
1836 common_segment->offset to type int for warning message.
1838 2005-04-23 DJ Delorie <dj@redhat.com>
1840 * trans-decl.c: Adjust warning() callers.
1842 2005-04-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1844 * trans-const.c (gfc_conv_mpfr_to_tree): Use hexadecimal string as
1845 intermediate representation. Fix typo in comment.
1847 2005-04-21 Steven G. Kargl <kargls@comcast.net>
1849 * trans-const.c (gfc_conv_mpfr_to_tree): Remove unneeded computation;
1850 simplify logic; Add a gcc_assert.
1852 2005-04-19 Steven G. Kargl <kargls@comcast.net>
1854 * trans-const.c (gfc_conv_mpz_to_tree): Fix comment.
1856 2005-04-19 Arnaud Desitter <arnaud.desitter@ouce.ox.ac.uk>
1857 Steven G. Kargl <kargls@comcast.net>
1859 * invoke.texi: Update -Waliasing description
1861 2005-04-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1864 * resolve.c (resolve_variable): If e->symtree is not set, this
1865 ought to be a FAILURE, and not a segfault.
1867 2005-04-17 Paul Thomas <pault@gcc.gnu.org>
1874 * fortran/trans-io.c (gfc_build_io_library_fndecls): Create
1875 declaration for st_set_nml_var and st_set_nml_var_dim. Remove
1876 declarations of old namelist functions.
1877 (build_dt): Simplified call to transfer_namelist_element.
1878 (nml_get_addr_expr): Generates address expression for start of
1879 object data. New function.
1880 (nml_full_name): Qualified name for derived type components. New
1882 (transfer_namelist_element): Modified for calls to new functions
1883 and improved derived type handling.
1885 2005-04-17 Richard Guenther <rguenth@gcc.gnu.org>
1887 * scanner.c (gfc_next_char_literal): Reset truncation flag
1888 for lines ending in a comment for both fixed and free form.
1889 (load_line): Do not set truncated flag if only truncating
1892 2005-04-15 Richard Guenther <rguenth@gcc.gnu.org>
1895 * gfortran.h (gfc_linebuf): Add truncated field.
1896 * parse.c (next_statement): Handle warning for truncated
1898 * scanner.c (load_line): Return if line was truncated.
1899 No longer warn for truncated lines. Remove unused parameters.
1900 (load_file): Store load_line return value to linebuf.
1901 (gfc_error_recovery): Do not advance line at the end.
1903 2005-04-14 Steven G. Kargl <kargls@comcast.net>
1905 * gfortran.h (gfc_real_info): Add subnormal struct member.
1906 * arith.c (gfc_arith_init_1): Set it.
1907 (gfc_check_real_range): Use it.
1908 * simplify.c (gfc_simplify_nearest): Fix nearest(0.,1.).
1910 2005-04-12 Kazu Hirata <kazu@cs.umass.edu>
1912 * simplify.c: Fix a comment typo.
1914 2005-04-11 Richard Sandiford <rsandifo@redhat.com>
1916 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
1918 2005-04-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1920 * simplify.c (gfc_simplify_nearest): Overhaul.
1922 2005-04-10 Kazu Hirata <kazu@cs.umass.edu>
1924 * interface.c: Fix a comment typo.
1926 2005-04-10 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1928 * match.c (match_arithmetic_if): Arithmetic IF is obsolete in
1931 2005-04-09 Steven G. Kargl <kargls@comcast.net>
1933 * simplify.c (gfc_simplify_anint): Use mpfr_round()
1934 (gfc_simplify_dnint): ditto.
1935 (gfc_simplify_nint): ditto.
1937 2005-04-09 Andrew Pinski <pinskia@physics.uc.edu>
1940 * io.c (check_format): Allow an optional comma
1941 between descriptors.
1943 2005-04-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1945 * match.c (match_arithmetic_if): Remove gfc_ prefix and correct
1946 comment according to GNU coding style.
1947 (gfc_match_if): Remove gfc_ prefix in call to
1948 match_arithmetic_if.
1950 2005-04-08 Diego Novillo <dnovillo@redhat.com>
1952 * match.c (gfc_match_arithmetic_if): Declare static.
1954 2005-04-08 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1957 * match.c (gfc_match_arithmetic_if): New function to match an
1958 arithmetic IF statement.
1959 (gfc_match_if): Use gfc_match_arithmetic_if to match an
1960 arithmetic IF statement embedded in a simple IF statement.
1962 2005-04-07 Steven G. Kargl <kargls@comcast.net>
1964 * simplify.c (gfc_simplify_exponent): Fix exponent(tiny(x))
1966 2005-04-06 Steven G. Kargl <kargls@comcast.net>
1968 * invoke.texi: Remove documentation of -std=f90
1970 2005-04-06 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1972 * expr.c (gfc_check_assign): Don't allow NULL as rhs in a
1973 non-pointer assignment.
1975 2005-04-05 Feng Wang <fengwang@nudt.edu.cn>
1980 * array.c (resolve_character_array_constructor): New function. Set
1981 constant character array's character length.
1982 (gfc_resolve_array_constructor): Use it.
1983 * decl.c (add_init_expr_to_sym): Set symbol and initializer character
1985 (gfc_set_constant_character_len): New function. Set constant character
1986 expression according the given length.
1987 * match.h (gfc_set_constant_character_len): Add prototype.
1989 2005-04-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1991 * intrinsic.texi: BES?? functions are not in the f95 standard.
1993 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1995 * intrinsic.texi: Document COS, EXP, LOG, LOG10, SIN, SQRT, TAN.
1997 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1999 * intrinsic.texi: Document BESJ0, BESJ1, BESJN, BESY0, BESY1,
2000 BESYN, ATAN, COSH, ERF, ERC, SINH, TANH.
2002 2005-04-02 Steven G. Kargl <kargls@comcast.net>
2004 * intrinsic.texi: Document ALLOCATED, ANINT, ANY, ASIN; fix typos
2006 2005-04-01 Kazu Hirata <kazu@cs.umass.edu>
2008 * decl.c, f95-lang.c, interface.c, module.c, trans-stmt.c,
2009 trans.h: Fix comment typos.
2011 2005-03-29 Steven G. Kargl <kargls@comcast.net>
2013 * gfortran.h (option_t): Change d8, i8, r8 to flag_default_double,
2014 flag_default_integer, flag_default_real
2015 * invoke.texi: Update documentation
2016 * lang.opt: Remove d8, i8, r8 definitions; Add fdefault-double-8
2017 fdefault-integer-8, and fdefault-real-8 definitions.
2018 * options.c (gfc_init_options): Set option defaults
2019 (gfc_handle_option): Handle command line options.
2020 * trans-types.c (gfc_init_kinds): Use options.
2022 2005-03-29 Keith Besaw <kbesaw@us.ibm.com>
2024 * f95-lang.c (builtin_function): Process the attrs parameter
2025 and apply the "const" attribute to the builtin if found.
2027 2005-03-27 Steven G. Kargl <kargls@comcast.net>
2029 * intrinsic.texi: Document AIMAG, AINT, ALL
2031 2005-03-26 Steven G. Kargl <kargls@comcast.net>
2033 * arith.c (check_result): Fix illogical logic.
2035 2005-03-26 Canqun Yang <canqun@nudt.edu.cn>
2037 * trans-common.c (create_common): Build RECORD_NODE for common blocks
2038 contain no equivalence objects.
2039 (add_equivalences): New argument saw_equiv.
2040 (trans_common): New local variable saw_equiv.
2041 (finish_equivalences): Add a local variable dummy, Always pass true
2042 for the 3rd parameter to create_common.
2044 2005-03-25 Steven G. Kargl <kargls@comcast.net>
2046 * intrinsic.texi: Fix "make dvi"
2048 2005-03-24 Steven G. Kargl <kargls@comcast.net>
2050 * intrinsic.texi: New file.
2051 * gfortran.texi: Include it; white space change; fix typo.
2053 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
2055 * f95-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
2057 2005-03-23 Steven Bosscher <stevenb@suse.de>
2059 * convert.c (convert): Replace fold (buildN (...)) with fold_buildN.
2060 * trans-array.c (gfc_trans_allocate_array_storage,
2061 gfc_trans_allocate_temp_array gfc_trans_array_constructor_value,
2062 gfc_conv_array_index_ref, gfc_trans_array_bound_check,
2063 gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
2064 gfc_conv_array_ref, gfc_trans_preloop_setup, gfc_conv_ss_startstride,
2065 gfc_conv_loop_setup, gfc_array_init_size, gfc_trans_array_bounds,
2066 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
2067 gfc_conv_expr_descriptor): Likewise.
2068 * trans-expr.c (gfc_conv_powi, gfc_conv_string_tmp,
2069 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
2070 * trans-intrinsic.c (build_round_expr, gfc_conv_intrinsic_bound,
2071 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_sign,
2072 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
2073 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_bitop,
2074 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits,
2075 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_ishftc,
2076 gfc_conv_intrinsic_merge, prepare_arg_info,
2077 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_repeat): Likewise.
2078 * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do, gfc_trans_do_while,
2079 gfc_trans_forall_loop, gfc_do_allocate, generate_loop_for_temp_to_lhs,
2080 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
2081 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
2082 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_assign):
2084 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Likewise.
2085 * trans.c (gfc_add_modify_expr): Likewise.
2087 2005-03-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2089 * check.c (gfc_check_chdir, gfc_check_chdir_sub, gfc_check_kill,
2090 gfc_check_kill_sub, gfc_check_link, gfc_check_link_sub,
2091 gfc_check_symlnk, gfc_check_symlnk_sub, gfc_check_rename,
2092 gfc_check_rename_sub, gfc_check_sleep_sub, gfc_check_gerror,
2093 gfc_check_getlog, gfc_check_hostnm, gfc_check_hostnm_sub,
2094 gfc_check_perror): new functions to check newly implemented
2096 * gfortran.h: adding symbols for new intrinsics.
2097 * intrinsic.c (add_functions): adding new intrinsics.
2098 (add_subroutines): adding new intrinsics.
2099 * intrinsic.h: prototype for all checking and resolving
2101 * iresolve.c (gfc_resolve_chdir, gfc_resolve_chdir_sub,
2102 gfc_resolve_hostnm, gfc_resolve_ierrno, gfc_resolve_kill,
2103 gfc_resolve_link, gfc_resolve_rename, gfc_resolve_symlnk,
2104 gfc_resolve_time, gfc_resolve_time8, gfc_resolve_rename_sub,
2105 gfc_resolve_kill_sub, gfc_resolve_link_sub,
2106 gfc_resolve_symlnk_sub, gfc_resolve_sleep_sub,
2107 gfc_resolve_gerror, gfc_resolve_getlog, gfc_resolve_hostnm_sub,
2108 gfc_resolve_perror): new functions to resolve intrinsics.
2109 * trans-intrinsic.c (gfc_conv_intrinsic_function): add case
2112 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2114 * dump-parse-tree.c (gfc_show_expr): Dump name of namespace
2115 in which the variable is declared.
2118 * resolve.c (was_declared): Also check for dummy attribute.
2120 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2122 * gfortran.h (arith): Remove ARITH_0TO0.
2123 * arith.c (gfc_arith_error): Remove handling of ARITH_0TO0.
2124 (gfc_arith_power): Remove special casing of zero to integral
2127 2005-03-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2129 * Make-lang.in (fortran-warn): Remove -Wno-error.
2130 (expr.o-warn, resolve.o-warn, simplify.o-warn,
2131 trans-common.o-warn): Specify -Wno-error.
2133 2005-03-17 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2135 * trans-array.c (gfc_trans_static_array_pointer,
2136 get_array_ctor_var_strlen, gfc_conv_array_index_offset): Fix
2137 comment and formatting typos.
2139 2005-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2141 * invoke.texi: Fix typos.
2143 2005-03-15 Zack Weinberg <zack@codesourcery.com>
2145 * Make-lang.in (GFORTRAN_TEXI): Add gcc-vers.texi.
2147 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
2149 * trans-stmt.c (gfc_trans_label_assign): Don't set DECL_ARTIFICIAL flag
2150 to zero on label_tree.
2152 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
2155 * io.c (resolve_tag): Add checking on assigned label.
2156 (match_dt_format): Does not set symbol assign attribute.
2157 * match.c (gfc_match_goto):Does not set symbol assign attribute.
2158 * resolve.c (resolve_code): Add checking on assigned label.
2159 * trans-common.c (build_field): Deals with common variable assigned
2161 * trans-stmt.c (gfc_conv_label_variable): New function.
2162 (gfc_trans_label_assign): Use it.
2163 (gfc_trans_goto): Ditto.
2164 * trans-io.c (set_string): Ditto.
2165 * trans.h (gfc_conv_label_variable): Add prototype.
2167 2005-03-14 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2170 * symbol.c (check_conflict): A dummy argument can't be a statement
2173 2005-03-14 Zdenek Dvorak <dvorakz@suse.cz>
2175 * fortran/trans-intrinsic.c (gfc_conv_intrinsic_ishft): Convert
2176 the argument of the shift to the unsigned type.
2178 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2181 * resolve.c (gfc_resolve_index): Allow REAL indices as an extension.
2183 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2186 * resolve.c (gfc_resolve): Check if character lengths are
2187 specification expressions.
2189 2005-03-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2192 * trans-array.c (gfc_stack_space_left): Remove unused variable.
2193 (gfc_can_put_var_on_stack): Move to trans-decl.c, remove #if 0'ed
2195 * trans-array.h (gfc_stack_space_left, gfc_can_put_var_on_stack):
2196 Remove declaration / prototype.
2197 * trans-common.c (build_equiv_decl): Give union a name. Check if
2198 it can be put on the stack.
2199 * trans-decl.c (gfc_stack_space_left): Move function here.
2200 (gfc_build_qualified_array): Fix comment typo.
2201 * trans.h (gfc_put_var_on_stack): Add prototype.
2203 2005-03-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2205 * Make-lang.in (fortran-warn): Set to $(STRICT_WARN) -Wno-error.
2206 * decl.c, trans.c: Don't use C++ style comments.
2207 * gfortran.h (sym_flavor, procedure_type, sym_intent, gfc_access,
2208 ifsrc): Give names to enums and use ENUM_BITFIELD.
2209 (gfc_access): Remove trailing comma.
2211 2005-03-05 Steven G. Kargl <kargls@comcast.net>
2214 * primary.c (match_complex_constant): Mangled complex constant may
2215 be an implied do-loop. Give implied do-loop matcher a chance.
2217 2005-03-05 Steven G. Kargl <kargls@comcast.net>
2220 * resolve.c (compare_shapes): New function.
2221 (resolve_operator): Use it.
2223 2005-03-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2225 * trans-const.c (gfc_conv_constant_to_tree): Use correct tree
2226 type for COMPLEX constants.
2228 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2231 * trans-expr.c (gfc_conv_function_call): Correctly dereference
2232 argument from a pointer function also if it has a result clause.
2234 2005-03-04 Steven G. Kargl <kargls@comcast.net>
2236 * expr.c (gfc_copy_shape_excluding): Change && to ||.
2238 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2240 * trans-intrinsic.c (gfc_get_symbol_for_expr): Fix comment typo,
2243 2005-02-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2247 * simplify.c (gfc_simplify_bound): Rename to ...
2248 (simplify_bound): ... this and overhaul.
2250 2005-02-28 Steven G. Kargl <kargl@gcc.gnu.org>
2252 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): remove boolean argument.
2253 (gfc_conv_intrinsic_function): update function calls
2255 2005-02-27 Steven G. Kargl <kargl@gcc.gnu.org>
2258 * trans-types.c (gfc_max_integer_kind): Declare
2259 (gfc_init_kinds): Initialize it.
2260 * gfortran.h (gfc_max_integer_kind): extern it.
2261 * primary.c (match_boz_constant): Use it; remove gfortran extension
2262 of kind suffixes on BOZ literal constants
2265 2005-02-27 Steven G. Kargl <kargls@comcast.net>
2267 * arith.c (gfc_check_real_range): Remove multiple returns
2268 (check_result): New function.
2269 (gfc_arith_uminus,gfc_arith_plus,gfc_arith_times,
2270 gfc_arith_divide,gfc_arith_power,gfc_arith_minus): Use it.
2273 2005-02-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2275 * decl.c, resolve.c, trans-array.c, trans.h: Fix comment typo(s).
2278 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-meunchen.de>
2280 Unrevert previously reverted patch. Adding this fix:
2281 * module.c (find_true_name): Deal with NULL module.
2283 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2285 Revert yesterday's patch:
2286 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2288 * gfortran.h (gfc_component, gfc_actual_arglist, ...
2289 ... argument. Copy string instead of pointing to it.
2291 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2293 * gfortran.h (gfc_get_namespace): Add second argument to prototype.
2294 * intrinsic.c (gfc_intrinsic_init_1): Pass second argument to
2296 * module.c (mio_namespace_ref, load_needed): Likewise.
2297 * parse.c (parse_interface, parse_contained): Likewise. Here the
2298 correct second argument matters.
2299 * symbol.c (gfc_get_namespace): Add parent_types argument, only copy
2300 parent's implicit types if this is set.
2301 (gfc_symbol_init_2): Pass second argument to gfc_get_namespace.
2302 * trans-common.c (build_common_decl): Likewise.
2304 * gfortran.h (symbol_attribute): New 'untyped' field, fix comment
2306 * symbol.c (gfc_set_default_type): Issue error only once, by setting
2307 and checking 'untyped' attribute.
2309 * gfortran.h (gfc_expr): Move 'operator', 'op1', 'op2', and 'uop'
2310 fields into new struct 'op' inside the 'value' union.
2311 * arith.c (eval_intrinsic): Adapt all users.
2312 * dependency.c (gfc_check_dependency): Likewise.
2313 * dump-parse-tree.c (gfc_show_expr): Likewise.
2314 * expr.c (gfc_get_expr): Don't clear removed fields.
2315 (free_expr0, gfc_copy_expr, gfc_type_convert_binary,
2316 gfc_is_constant_expr, simplify_intrinsic_op, check_init_expr,
2317 check_intrinsic_op): Adapt to new field names.
2318 * interface.c (gfc_extend_expr): Likewise. Also explicitly
2319 nullify 'esym' and 'isym' fields of new function call.
2320 * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
2321 Adapt to renamed structure fields.
2322 * matchexp.c (build_node, match_level_1, match_expr): Likewise.
2323 * module.c (mio_expr): Likewise.
2324 * resolve.c (resolve_operator): Likewise.
2325 (gfc_find_forall_index): Likewise. Only look through operands
2326 if dealing with EXPR_OP
2327 * trans-array.c (gfc_walk_op_expr): Adapt to renamed fields.
2328 * trans-expr.c (gfc_conv_unary_op, gfc_conv_power_op,
2329 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
2332 * gfortran.h (gfc_component, gfc_actual_arglist, gfc_user_op): Make
2333 'name' a 'const char *'.
2334 (gfc_symbol): Likewise, also for 'module'.
2335 (gfc_symtree): Make 'name' a 'const char *'.
2336 (gfc_intrinsic_sym): Likewise, also for 'lib_name'.
2337 (gfc_get_gsymbol, gfc_find_gsymbol): Add 'const' qualifier to
2339 (gfc_intrinsic_symbol): Use 'gfc_get_string' instead of 'strcpy' to
2340 initialize 'SYM->module'.
2341 * check.c (gfc_check_minloc_maxloc, check_reduction): Check for NULL
2342 pointer instead of empty string.
2343 * dump-parse-tree.c (gfc_show_actual_arglist): Likewise.
2344 * interface.c (gfc_compare_types): Adapt check to account for possible
2346 (compare_actual_formal): Check for NULL pointer instead of empty
2348 * intrinsic.c (gfc_current_intrinsic, gfc_current_intrinsic_arg):
2349 Add 'const' qualifier.
2350 (conv_name): Return a heap allocated string.
2351 (find_conv): Add 'const' qualifier to 'target'.
2352 (add_sym): Use 'gfc_get_string' instead of 'strcpy'.
2353 (make_generic): Check for NULL pointer instead of empty string.
2354 (make_alias): Use 'gfc_get_string' instead of 'strcpy'.
2355 (add_conv): No need to strcpy result from 'conv_name'.
2356 (sort_actual): Check for NULL pointer instead of empty string.
2357 * intrinsic.h (gfc_current_intrinsic, gfc_current_intrinsic_arg):
2359 * module.c (compare_true_names): Compare pointers instead of strings
2360 for 'module' member.
2361 (find_true_name): Initialize string fields with gfc_get_string.
2362 (mio_pool_string): New function.
2363 (mio_internal_string): Adapt comment.
2364 (mio_component_ref, mio_component, mio_actual_arg): Use
2365 'mio_pool_string' instead of 'mio_internal_string'.
2366 (mio_symbol_interface): Add 'const' qualifier to string arguments.
2367 Add level of indirection. Use 'mio_pool_string' instead of
2368 'mio_internal_string'.
2369 (load_needed, read_module): Use 'gfc_get_string' instead of 'strcpy'.
2370 (write_common, write_symbol): Use 'mio_pool_string' instead of
2371 'mio_internal_string'.
2372 (write_symbol0, write_symbol1): Likewise, also check for NULL pointer
2373 instead of empty string.
2374 (write_operator, write_generic): Pass correct type variable to
2375 'mio_symbol_interface'.
2376 (write_symtree): Use 'mio_pool_string' instead of
2377 'mio_internal_string'.
2378 * primary.c (match_keyword_arg): Adapt check to possible
2379 case of NULL pointer. Use 'gfc_get_string' instead of 'strcpy'.
2380 * symbol.c (gfc_add_component, gfc_new_symtree, delete_symtree,
2381 gfc_get_uop, gfc_new_symbol): Use 'gfc_get_string' instead of
2383 (ambiguous_symbol): Check for NULL pointer instead of empty string.
2384 (gfc_find_gsymbol, gfc_get_gsymbol): Add 'const' qualifier on string
2386 * trans-array.c (gfc_trans_auto_array_allocation): Check for NULL
2387 pointer instead of empty string.
2388 * trans-decl.c (gfc_sym_mangled_identifier,
2389 gfc_sym_mangled_function_id, gfc_finish_var_decl, gfc_get_symbol_decl,
2390 gfc_get_symbol_decl): Likewise.
2391 * trans-io.c (gfc_new_nml_name_expr): Add 'const' qualifier to
2392 argument. Copy string instead of pointing to it.
2394 2005-02-23 Kazu Hirata <kazu@cs.umass.edu>
2396 * intrinsic.h, st.c: Update copyright.
2398 2005-02-20 Steven G. Kargl <kargls@comcast.net>
2400 * symbol.c: Typos in comments.
2402 2005-02-20 Steven G. Kargl <kargls@comcast.net>
2404 * expr.c (gfc_type_convert_binary): Typo in comment.
2406 2005-02-19 Steven G. Kargl <kargls@comcast.net>
2408 * check.c (gfc_check_selected_int_kind): New function.
2409 * intrinsic.h: Prototype it.
2410 * intrinsic.c (add_function): Use it.
2411 * simplify (gfc_simplify_ceiling,gfc_simplify_floor): Change
2412 BT_REAL to BT_INTEGER and use gfc_default_integer_kind.
2414 2005-02-19 Steven G. Kargl <kargls@comcast.net>
2416 * check.c (gfc_check_int): improve checking of optional kind
2417 * simplify.c (gfc_simplify_int): Change BT_REAL to BT_INTEGER
2419 2005-02-19 Steven G. Kargl <kargls@comcast.net>
2421 * check.c (gfc_check_achar): New function
2422 * intrinsic.h: Prototype it.
2423 * intrinsic.c (add_function): Use it.
2425 2005-02-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2427 * trans-stmt.c (generate_loop_for_temp_to_lhs,
2428 generate_loop_for_rhs_to_temp): Remove if whose condition is
2431 2005-02-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2433 * symbol.c (gfc_use_ha_derived): Remove, fold functionality into ...
2434 (gfc_use_derived): ... this function.
2436 2005-02-09 Richard Henderson <rth@redhat.com>
2438 * f95-lang.c (gfc_init_builtin_functions): Call
2439 build_common_builtin_nodes; do not define any functions handled
2442 2005-02-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2444 * expr.c (gfc_copy_expr): Don't copy 'op1' and 'op2' for
2446 (gfc_is_constant_expr): Check 'ref' to determine if substring
2447 reference is constant.
2448 (gfc_simplify_expr): Simplify 'ref' instead of 'op1' and 'op2'.
2449 (check_init_expr, check_restricted): Check 'ref' instead of 'op1'
2451 * module.c (mio_expr): Read / write 'ref' instead of 'op1' and 'op2'.
2453 2005-02-07 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2455 * gfortran.h (gfc_add_dimension, gfc_add_result, gfc_add_save,
2456 gfc_add_dummy, gfc_add_generic, gfc_add_in_common, gfc_add_data,
2457 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
2458 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
2459 gfc_add_procedure): Add argument.
2460 * array.c (gfc_set_array_spec), decl.c (var_element, get_proc_name,
2461 gfc_match_null, match_type_spec, match_attr_spec,
2462 gfc_match_formal_arglist, match_result, gfc_match_function_decl):
2463 Update callers to match.
2464 (gfc_match_entry): Likewise, fix comment typo.
2465 (gfc_match_subroutine, attr_decl1, gfc_add_dimension,
2466 access_attr_decl, do_parm, gfc_match_save, gfc_match_modproc,
2467 gfc_match_derived_decl): Update callers.
2468 * interface.c (gfc_match_interface): Likewise.
2469 * match.c (gfc_match_label, gfc_add_flavor,
2470 gfc_match_call, gfc_match_common, gfc_match_block_data,
2471 gfc_match_namelist, gfc_match_module, gfc_match_st_function):
2473 * parse.c (parse_derived, parse_interface, parse_contained),
2474 primary.c (gfc_match_rvalue, gfc_match_variable): Likewise.
2475 * resolve.c (resolve_formal_arglist, resolve_entries): Update callers.
2476 * symbol.c (check_conflict, check_used): Add new 'name' argument,
2477 use when printing error message.
2478 (gfc_add_dimension, gfc_add_result, gfc_add_save, gfc_add_dummy,
2479 gfc_add_generic, gfc_add_in_common, gfc_add_data,
2480 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
2481 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
2482 gfc_add_procedure): Add new 'name' argument. Pass along to
2483 check_conflict and check_used.
2484 (gfc_add_allocatable, gfc_add_external, gfc_add_intrinsic,
2485 gfc_add_optional, gfc_add_pointer, gfc_add_target, gfc_add_elemental,
2486 gfc_add_pure, gfc_add_recursive, gfc_add_intent,
2487 gfc_add_explicit_interface, gfc_copy_attr): Pass NULL for new
2488 argument in calls to any of the modified functions.
2490 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
2492 * gfortran.texi: Don't give last update date.
2494 2006-01-30 Richard Henderson <rth@redhat.com>
2496 * options.c (gfc_init_options): Zero flag_errno_math.
2498 2005-01-29 Paul Brook <paul@codesourcery.com>
2501 * check.c (real_or_complex_check): New function.
2502 (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc): New functions.
2503 * intrinsic.c (add_functions): Use new check functions.
2504 * intrinsic.h (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc):
2507 2005-01-29 Steven G. Kargl <kargls@comcast.net>
2510 * expr.c (gfc_check_assign): Check for conformance of logical operands
2512 2004-01-27 Steven Bosscher <stevenb@suse.de>
2514 * trans-decl.c (gfc_build_label_decl): Set DECL_ARTIFICAL and
2515 TREE_USED for all labels.
2516 (gfc_trans_entry_master_switch): Use it instead of building a
2518 * trans-io.c (add_case): Likewise.
2519 * trans-stmt.c (gfc_trans_integer_select): Likewise.
2521 2004-01-23 Paul Brook <paul@codesourcery.com>
2522 Steven G. Kargl <kargls@comcast.net>
2525 * arith.c (gfc_convert_real): Remove sign handling.
2526 * primary.c (match_digits): Allow whitespace after initial sign.
2527 (match_real_const): Handle signs here. Allow whitespace after
2528 initial sign. Remove dead code.
2529 (match_const_complex_part): Remove.
2530 (match_complex_part): Use match_{real,integer}_const.
2531 (match_complex_constant): Cross-promote integer types.
2533 2005-01-23 James A. Morrison <phython@gcc.gnu.org>
2536 * iresolve.c (gfc_resolve_transpose): Resolve to transpose_c4 or
2537 transpose_c8 for complex types.
2539 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
2541 * data.c, dependency.c, f95-lang.c, io.c, trans-array.c,
2542 trans-decl.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
2543 trans-stmt.c, trans-types.c, trans.h: Fix comment typos.
2544 Follow spelling conventions.
2546 2005-01-22 Bud Davis <bdavis9659@comcast.net>
2549 * trans-io.c (gfc_trans_inquire): Added code to support
2552 2005-01-22 Steven G. Kargl <kargls@comcast.net>
2554 * intrinsic.c (make_alias): Add standard argument.
2555 (add_functions): Update make_alias calls.
2557 2005-01-22 Paul Brook <paul@codesourcery.com>
2559 * trans-expr.c (gfc_conv_function_call): Remove bogus TODO.
2561 2005-01-22 Paul Brook <paul@codesourcery.com>
2563 * gfortran.h (gfc_check_access): Add prototype.
2564 * match.c (gfc_match_namelist): Remove TODO.
2565 * module.c (check_access): Rename ...
2566 (gfc_check_access): ... to this. Boolify. Update callers.
2567 * resolve.c (resolve_symbol): Check for private objects in public
2570 2005-01-22 Paul Brook <paul@codesourcery.com>
2572 * primary.c (gfc_match_rvalue): Only apply implicit type if variable
2573 does not have an explicit type.
2574 (gfc_match_variable): Resolve implicit derived types in all cases.
2575 Resolve contained function types from their own namespace, not the
2577 * resolve.c (resolve_contained_fntype): Remove duplicate sym->result
2578 checking. Resolve from the contained namespace, not the parent.
2580 2005-01-22 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2583 * trans-const.c (gfc_conv_constant_to_tree): Give logical
2584 constants the correct type.
2587 * trans-io.c (ADD_STRING): Use gfc_charlen_type_node for string
2589 (gfc_build_io_library_fndecls): 'rec' and 'recl_in' are not
2592 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
2594 * arith.c, array.c, check.c, decl.c, expr.c, f95-lang.c,
2595 gfortran.h, interface.c, intrinsic.c, io.c, iresolve.c,
2596 match.c, matchexp.c, misc.c, module.c, options.c, parse.c,
2597 scanner.c, simplify.c, symbol.c, trans-array.c, trans-expr.c,
2598 trans-io.c, trans-stmt.c, trans.c: Update copyright.
2600 2005-01-17 Ira Rosen <irar@il.ibm.com>
2602 * f95-lang.c (gfc_init_builtin_functions): Call targetm.init_builtins.
2604 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2607 * error.c (error_char): Line-buffer errors / warnings.
2609 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2611 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Fix signed /
2612 unsigned issue. Use build_int_cst instead of converting
2613 integer_zero_node. Remove unnecessary conversion.
2615 * trans-types.c (gfc_get_character_type_len): Use
2616 gfc_charlen_type_node as basic type for the range field.
2618 * trans-intrinsic.c (build_fixbound_expr,
2619 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_anyall,
2620 gfc_conv_intrinsic_count, gfc_conv_intrinsic_btest,
2621 gfc_conv_intrinsic_singlebitop): Use 'build_int_cst' instead
2622 of converting 'integer_zero_node' or 'integer_one_node'
2624 (gfc_conv_intrinsic_ishftc): Same, but store in local variable to
2626 (gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_rrspacing,
2627 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_iargc): Use
2628 'build_int_cst' instead of converting 'integer_zero_node' or
2629 'integer_one_node' respectively.
2631 * trans-intrinsic.c (gfc_conv_intrinsic_index,
2632 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove
2633 'gfc'-prefix from local variable, remove dead code, use correct
2634 type when inserting argument.
2636 * trans-intrinsic.c, trans-types.c: Update copyright years.
2638 2005-01-16 Steven G. Kargl <kargls@comcast.net>
2641 * resolve.c (check_case_overlap): Typo in comment.
2642 (validate_case_label_expr): Fix up kinds of case values
2643 (resolve_select): Properly handle kind mismatches.
2645 2004-01-16 Paul Brook <paul@codesourcery.com>
2648 * trans-common.c (translate_common): Remove duplicate function call.
2649 (finish_equivalences): Preserve alignment when biasing offsets.
2651 2005-01-15 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de
2653 * primary.c (check_digit): Call 'ISXDIGIT' instead of assuming
2654 ASCII-like character encoding.
2656 2005-01-14 Steven G. Kargl <kargls@comcast.net>
2658 * resolve.c (compare_case): Cleanup.
2660 2005-01-14 Steven G. Kargl <kargls@comcast.net>
2662 * resolve.c (compare_case): Give arguments correct type.
2664 2005-01-13 Kazu Hirata <kazu@cs.umass.edu>
2666 * iresolve.c, trans-common.c, trans-types.c: Fix comment
2669 2005-01-09 Paul Brook <paul@codesourcery.com>
2672 * trans-common.c (current_common, current_offset): Remove.
2673 (create_common): Add head argument.
2674 (align_segment): New function.
2675 (apply_segment_offset): New function.
2676 (translate_common): Merge code from new_segment. Handle alignment.
2677 (new_segment): Remove.
2678 (finish_equivalences): Ensure proper alignment.
2680 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2682 * trans-const.c: Don't include unused math.h.
2684 * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl,
2685 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_minmaxloc,
2686 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_len): Remove
2687 trailing whitespace.
2688 (prepare_arg_info): Fix formatting, indenting and remove trailing
2690 (gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_trim): Remove
2691 trailing whitespace.
2693 * arith.c (arctangent2, gfc_arith_init_1, gfc_arith_done_1,
2694 gfc_constant_result, gfc_range_check, gfc_arith_power,
2695 eval_type_intrinsic0, eval_intrinsic_f2, gfc_real2real,
2696 gfc_real2complex, gfc_complex2int, gfc_complex2real,
2697 gfc_complex2complex): Fix whitespace issues.
2698 * check.c (must_be, type_check, numeric_check, int_or_real_check,
2699 logical_array_check, array_check, scalar_check, nonoptional_check,
2700 variable_check, dim_check, check_a_kind, gfc_check_a_ikind,
2701 gfc_check_a_xkind, gfc_check_abs, gfc_check_all_any,
2702 gfc_check_allocated, gfc_check_a_p, gfc_check_besn,
2703 gfc_check_btest, gfc_check_char, gfc_check_cmplx, gfc_check_count,
2704 gfc_check_cshift, gfc_check_dcmplx, gfc_check_dble,
2705 gfc_check_digits, gfc_check_dot_product, gfc_check_eoshift,
2706 gfc_check_fnum, gfc_check_g77_math1, gfc_check_huge, gfc_check_i,
2707 gfc_check_iand, gfc_check_ibclr, gfc_check_ibits, gfc_check_ibset,
2708 gfc_check_idnint, gfc_check_ieor, gfc_check_index, gfc_check_int,
2709 gfc_check_ior, gfc_check_ishft, gfc_check_ishftc, gfc_check_kind,
2710 gfc_check_lbound, gfc_check_logical, min_max_args,
2711 gfc_check_min_max_integer, gfc_check_min_max_real,
2712 gfc_check_min_max_double, gfc_check_matmul,
2713 gfc_check_minval_maxval, gfc_check_merge, gfc_check_nearest,
2714 gfc_check_pack, gfc_check_precision, gfc_check_radix,
2715 gfc_check_range, gfc_check_real, gfc_check_repeat,
2716 gfc_check_scale, gfc_check_scan, gfc_check_selected_real_kind,
2717 gfc_check_set_exponent): Fix formatting issues.
2718 (gfc_check_size, gfc_check_sign): Alphabetize function order,
2719 remove whitespace-only line.
2720 (gfc_check_fstat, gfc_check_fstat_sub, gfc_check_stat,
2721 gfc_check_stat_sub, gfc_check_transfer, gfc_check_transpose,
2722 gfc_check_ubound, gfc_check_unpack, gfc_check_verify, gfc_check_x,
2723 gfc_check_cpu_time, gfc_check_date_and_time, gfc_check_mvbits,
2724 gfc_check_random_number, gfc_check_random_seed,
2725 gfc_check_second_sub, gfc_check_system_clock,
2726 gfc_check_getcwd_sub, gfc_check_exit, gfc_check_flush,
2727 gfc_check_umask, gfc_check_umask_sub, gfc_check_unlink,
2728 gfc_check_unlink_sub): Fix formatting issues.
2730 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2732 * gfortran.h: Remove outdated comment. Don't include stdio.h
2735 2005-01-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2737 * gfortranspec.c (lang_specific_driver): Change year to 2005 in
2738 output of 'gfortran --version'.
2740 2005-01-03 Steven G. Kargl <kargls@comcast.net>
2742 * arith.c: Add system.h; remove string.h
2748 * check.c: Remove stdlib.h and stdarg.h
2749 * error.c: Remove stdlib.h, stdarg.h, stdio.h, string.h
2750 * expr.c: Add system.h; remove stdarg.h, stdio.h, and string.h
2751 * f95-lang.c: Add system.h; remove stdio.h
2752 * interface.c: Add system.h; remove stdlib.h and string.h
2753 * intrinsic.c: Remove stdarg.h, stdio.h, and string.h
2754 * io.c: Remove string.h
2756 * match.c: Remove stdarg.h and string.h
2757 * misc.c: Update copyright; add system.h; remove stdlib.h,
2758 string.h, and sys/stat.h
2759 * module.c: Add system.h; remove string.h, stdio.h, errno.h,
2760 unistd.h, and time.h
2761 * option.c: Remove string.h and stdlib.h
2763 * scanner.c: Update copyright; add system.h; remove stdlib.h,
2764 stdio.h, string.h, and strings.h
2765 * symbol.c: Add system.h; remove stdlib.h, stdio.h, and string.h
2766 * trans-array.c: Remove stdio.h and gmp.h
2767 * trans-const.c: Ditto
2768 * trans-expr.c: Ditto
2770 * trans-stmt.c: Ditto
2772 * trans-intrinsic.c: Remove stdio.h and string.h
2774 2004-12-29 Steven G. Kargl <kargls@comcast.net>
2776 * gfortran.h (gfc_case): fix typo in comment.
2778 2004-12-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2780 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Change to
2781 logical shift. Call fold. Remove 0-bit shift shortcut.
2782 (gfc_conv_intrinsic_ishftc): Convert first argument to at least
2783 4 bytes bits. Convert 2nd and 3rd argument to 4 bytes. Convert
2784 result if width(arg 1) < 4 bytes. Call fold.
2787 * trans-intrinsic.c (gfc_conv_intrinsic_mod): Update comment
2788 in front of function to match the standard. Correct handling
2791 2004-12-27 Andrew Pinski <pinskia@physics.uc.edu>
2793 * trans-expr.c (gfc_conv_cst_int_power): Only check for
2794 flag_unsafe_math_optimizations if we have a float type.
2796 2004-12-23 Steven G. Kargl <kargls@comcast.net>
2798 * gfortran.texi: Fix typo.
2800 2004-12-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2802 * trans-intrinsic.c (build_fixbound_expr): Clarify comment, fix
2805 2004-12-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2808 * match.c (gfc_match_if): Don't explicitly skip optional whitespace.
2809 (gfc_match_nullify): Make sure that ')' is in front of the end of
2812 * scanner.c (skip_fixed_comments): Fix typo in comment preceding
2815 2004-12-14 Richard Henderson <rth@redhat.com>
2817 * gfortran.h (gfc_expr.function.name): Make const.
2818 (gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
2819 (gfc_get_string): Update prototype.
2820 * iresolve.c: Include tree.h.
2821 (string_node, HASH_SIZE, string_head, hash): Remove.
2822 (gfc_get_string): Use vsnprintf, get_identifier.
2823 (free_strings, gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
2824 * misc.c (gfc_init_1): Don't call gfc_iresolve_init_1.
2825 (gfc_done_1): Don't call gfc_iresolve_done_1.
2826 * module.c (mio_allocated_string): Take and return const char *,
2827 instead of modifying char**.
2828 (mio_expr): Update to match.
2829 * resolve.c (pure_function): Constify name argument.
2830 (resolve_function): Constify name.
2831 * trans-intrinsic.c (gfc_conv_intrinsic_function): Likewise.
2833 2004-12-12 Richard Henderson <rth@redhat.com>
2835 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
2836 gfc_resolve_cshift, gfc_resolve_dot_product, gfc_resolve_eoshift,
2837 gfc_resolve_matmul, gfc_resolve_maxloc, gfc_resolve_maxval,
2838 gfc_resolve_minloc, gfc_resolve_minval, gfc_resolve_pack,
2839 gfc_resolve_product, gfc_resolve_reshape, gfc_resolve_shape,
2840 gfc_resolve_spread, gfc_resolve_sum, gfc_resolve_transpose,
2841 gfc_resolve_unpack: Use PREFIX.
2843 2004-12-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2846 * match.c (gfc_match_common): Skip whitespace.
2848 2004-12-12 Steven G. Kargl <kargls@comcast.net>
2851 * check.c (gfc_check_iand, gfc_check_ibclr, gfc_check_ibits,
2852 gfc_check_ibset, gfc_check_ieor, gfc_check_ior): Remove default
2853 integer kind check; Issue error for -std=f95 when needed.
2854 * intrinsic.c (add_functions): Change ieor from GFC_STD_GNU to
2856 * iresolve.c (gfc_resolve_iand, gfc_resolve_ieor, gfc_resolve_ior):
2857 Promote arguments to same kind.
2859 2004-12-12 Steven G. Kargl <kargls@comcast.net>
2860 Paul Brook <paul@codesourcery.com>
2863 * resolve.c (gfc_resolve_iterator_expr): New function.
2864 (gfc_resolve_iterator): Use it. Add real_ok argument. Convert
2865 start, end and stride to correct type.
2866 (resolve_code): Pass extra argument.
2867 * array.c (resolve_array_list): Pass extra argument.
2868 * gfortran.h (gfc_resolve): Add prototype.
2869 * trans-stmt.c (gfc_trans_do): Remove redundant type conversions.
2870 Handle real type iterators.
2872 2004-12-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2875 * iresolve.c (gfc_resolve_scale): Convert 'I' argument if not of
2876 same kind as C's 'int'.
2877 (gfc_resolve_set_exponent): Convert 'I' argument if not of kind 4.
2879 2004-12-08 Richard Henderson <rth@redhat.com>
2881 * intrinsic.c (gfc_convert_type_warn): Propagate the input shape
2882 to the output expression.
2883 * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift): Suppress
2885 (gfc_resolve_reshape): Force convert SHAPE and ORDER parameters
2888 2004-12-08 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2891 * resolve.c (resolve_code): Impose correct restrictions on
2894 * decl.c (gfc_match_end): Use locus of END when eos is an error.
2896 2004-12-02 Steven G. Kargl <kargls@comcast.net>
2897 Paul Brook <paul@codesourcery.com>
2899 * check.c (gfc_check_flush, gfc_check_fnum): New functions.
2900 (gfc_check_fstat, gfc_check_fstat_sub): New functions.
2901 (gfc_check_stat, gfc_check_stat_sub): New functions.
2902 * gfortran.h (GFC_ISYM_FNUM,GFC_ISYM_FSTAT,GFC_ISYM_STAT): New symbols
2903 * intrinsic.c (add_functions,add_subroutines): Add flush, fnum,
2904 fstat, and stat to intrinsics symbol tables.
2905 * intrinsic.h (gfc_check_flush, gfc_resolve_stat_sub): Add prototypes.
2906 (gfc_resolve_fstat_sub, gfc_resolve_stat): Ditto.
2907 * iresolve.c (gfc_resolve_fnum, gfc_resolve_fstat): New functions.
2908 (gfc_resolve_stat, gfc_resolve_flush): New functions.
2909 (gfc_resolve_stat_sub,gfc_resolve_fstat_sub): New functions
2910 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add new intrinsics.
2912 2004-12-02 Steven G. Kargl <kargls@comcast.net>
2914 * intrinsic.c: Fix and add comments, fix function declarations
2915 (OPTIONAL,REQUIRED): New symbols
2916 (add_functions,add_subroutines): Use symbols
2917 (gmp.h): Remove unused include
2919 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
2921 * f95-lang.c, gfortranspec.c, trans-decl.c: Avoid ` as left quote
2924 2004-11-24 Steven Bosscher <stevenb@suse.de>
2926 * options.c (gfc_post_options): Don't clear flag_inline_functions.
2928 2004-11-20 Steven G. Kargl <kargls@comcast.net>
2930 * check.c (gfc_check_getcwd_sub): Fix seg fault.
2932 * check.c (gfc_check_exit,gfc_check_umask,gfc_check_umask_sub,
2933 gfc_check_unlink,gfc_check_unlink_sub): New functions
2934 * gfortran.h (GFC_ISYM_UMASK,GFC_ISYM_UNLINK): New symbols
2935 * intrinsic.c (add_functions,add_subroutines): Add umask, unlink,
2936 exit to intrinsics symbol tables.
2937 * intrinsic.h (gfc_check_umask,gfc_check_unlink,gfc_check_exit,
2938 gfc_check_umask_sub,gfc_check_unlink_sub,gfc_resolve_umask,
2939 gfc_resolve_unlink,gfc_resolve_exit,gfc_resolve_umask_sub,
2940 gfc_resolve_unlink_sub): Add and sort prototypes.
2941 * iresolve.c (gfc_resolve_umask,gfc_resolve_unlink,gfc_resolve_exit,
2942 gfc_resolve_umask_sub,gfc_resolve_unlink_sub): New functions
2943 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbols
2945 2004-11-16 Paul Brook <paul@codesourcery.com>
2948 * trans-array.c (gfc_trans_allocate_temp_array): Use gfc_get_dtype.
2949 (gfc_array_init_size, gfc_conv_expr_descriptor): Ditto.
2950 * trans-types.c (gfc_get_dtype): Accept array type rather than element
2952 (gfc_get_nodesc_array_type): Don't set GFC_TYPE_ARRAY_DTYPE.
2953 (gfc_get_array_type_bounds): Ditto.
2954 (gfc_get_derived_type): Recurse into derived type pointers.
2955 * trans-types.h (gfc_get_dtype): Add prototype.
2956 * trans.h (GFC_TYPE_ARRAY_DTYPE): Add comment.
2958 2004-11-15 Paul Brook <paul@codesourcery.com>
2960 * trans-types.c (gfc_get_dtype): Remove obsolete TODO.
2962 2004-11-10 Paul Brook <paul@codesourcery.com>
2965 * trans-expr.c (gfc_trans_subarray_assign): Free shape before ss.
2966 * trans-io.c (transfer_array_component): Ditto.
2968 2004-11-10 Paul Brook <paul@codesourcery.com>
2970 * invoke.texi: Fix typo.
2972 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
2974 * arith.c, array.c, decl.c, expr.c, f95-lang.c, gfortran.h,
2975 gfortranspec.c, interface.c, intrinsic.c, iresolve.c, match.c,
2976 module.c, parse.c, parse.h, primary.c, resolve.c, scanner.c,
2977 trans-array.c, trans-array.h, trans-expr.c, trans-intrinsic.c,
2978 trans-io.c, trans-stmt.c, trans.h: Fix comment formatting.
2980 2004-11-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2983 * io.c (resolve_tag): Tighten up exception for assigned FORMAT.
2985 2004-11-06 Kazu Hirata <kazu@cs.umass.edu>
2987 * gfortranspec.c: Replace GNU CC with GCC.
2989 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2991 * gfortranspec.c (lang_specific_driver): Change year to 2004.
2993 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2996 * trans-decl.c (create_function_arglist): Set DECL_ARTIFICIAL for
2999 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3002 * trans-decl.c (gfc_finish_var_decl): Don't declare arguments to
3003 module procedures as if they were module variables.
3005 2004-11-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3010 * module.c (write_symbol1): Set module_name for dummy arguments.
3012 2004-11-02 Paul Brook <paul@codesourcery.com>
3014 * intrinsic.c (check_intrinsic_standard): Include error locus.
3016 (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Pass
3017 locus to check_intrinsic_standard.
3019 2004-10-31 Janne Blomqvist <jblomqvi@cc.hut.fi>
3022 * gfortran.h: Change GFC_STD_* flags to more appropriate
3023 ones. (struct gfc_intrinsic_isym): Add field for standard. (struct
3024 gfc_option_t): Add field for warning about use of nonstandard
3026 * intrinsic.c (add_sym): Add parameter for standard version, check
3027 this against current standard.
3028 (add_sym_0): Pass standard parameter to add_sym.
3029 (add_sym_1, add_sym_0s, add_sym_1s, add_sym_1m, add_sym_2): Ditto.
3030 (add_sym_2s, add_sym_3, add_sym_3ml, add_sym_3red, add_sym_3s): Ditto.
3031 (add_sym_4, add_sym_4s, add_sym_5, add_sym_5s): Ditto.
3032 (make_generic): Add parameter for standard, check this
3033 against currently selected standard.
3034 (add_functions, add_subroutines): Add parameter to tell which
3035 standard an intrinsic belongs to.
3036 (check_intrinsic_standard): New function.
3037 (gfc_intrinsic_func_interface): Add call to check_intrinsic_standard.
3038 (gfc_intrinsic_sub_interface): Ditto.
3039 * lang.opt: Add Wnonstd-intrinsics option.
3040 * options.c (gfc_init_options): Change to use new GFC_STD_* flags,
3042 (set_Wall): Add warning about nonstd intrinsics.
3043 (gfc_handle_option): Change to use new GFC_STD_* flags,
3045 * invoke.texi: Update manual to include -Wnonstd-intrinsics.
3047 2004-10-30 Andrew Pinski <pinskia@physics.uc.edu>
3049 * f95-lang.c (lang_tree_node): Add chain_next to be the TREE_CHAIN.
3051 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3053 * simplify.c (twos_complement): Calculate mask in GMP arithmetic.
3055 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3057 * trans.c (gfc_trans_code): Set global locus after recursing. Fix
3060 2004-10-30 Canqun Yang <canqun@nudt.edu.cn>
3062 * check.c (gfc_check_rand): Allow missing optional argument.
3063 (gfc_check_irand): Ditto.
3064 * intrinsic.c (add_functions): Set arg optional flag for {i,}rand.
3066 2004-10-28 Scott Robert Ladd <scott.ladd@coyotegulch.com>
3068 PR fortran/13490, PR fortran/17912
3069 * gcc/fortran/gfortran.h: Added pedantic_min_int to gfc_integer_info
3070 * gcc/fortran/gfortran.h: Added ARITH_ASYMMETRIC to arith
3071 * gcc/fortran/arith.c: Added support for an "asymmetric integer"
3072 warning when compiling with pedantic.
3073 * gcc/fortran/arith.c: Set minimum integer values to reflect
3074 realities of two's complement signed integers. Added
3077 2004-10-17 Andrew Pinski <pinskia@physics.uc.edu>
3079 * Make-lang.in (F95_ADDITIONAL_OBJS): Kill.
3080 (f951): Do not depend on F95_ADDITIONAL_OBJS and don't
3083 2004-10-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3085 * trans-decl.c (generate_local_decl): Simplify logic, fix comment
3087 (gfc_generate_function_code): Fix formatting issue.
3089 2004-10-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3091 * module.c: Fix formatting issues.
3093 2004-10-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3095 * module.c (mio_interface_rest): Set where member of interface
3098 2004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
3101 * options.c (gfc_handle_option): Add break after handing the
3104 2004-10-08 Tobias Schlueter <tobias.shclueter@physik.uni-muenchen.de>
3106 * arith.c: Fix formatting issues.
3108 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3111 * resolve.c (resolve_operator): Use correct operator name in message.
3113 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3115 * primary.c (match_boz_constant): Allow kind parameter suffixes.
3116 Move standard warning further to the front.
3118 2004-10-07 Kazu Hirata <kazu@cs.umass.edu>
3120 * trans-stmt.c: Fix a comment typo.
3122 2004-10-07 Paul Brook <paul@codesourcery.com>
3125 * trans-array.c (gfc_trans_deferred_array): Leave use associated
3128 2004-10-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3131 * simplify.c (twos_complement): New function.
3132 (gfc_simplify_ishft, gfc_simplify_ishftc): Revise.
3134 * simplify.c (gfc_simplify_abs): Use mpfr_hypot for CABS.
3136 2004-10-06 Paul Brook <paul@codesourcery.com>
3138 * trans-stmt.c (gfc_trans_simple_do): New function.
3139 (gfc_trans_do): Use it. Evaluate iteration bounds before entering
3140 loop. Update comments.
3142 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3145 * iresolve.c (gfc_resolve_pack): Choose function depending if mask
3149 * intrinsic.c (add_sym_5): Remove.
3150 (add_subroutines): Add resolution function for MVBITS.
3151 * intrinsic.h (gfc_resolve_mvbits): Declare resolution function for
3153 * iresolve.c (gfc_resolve_mvbits): New function.
3154 (gfc_resolve_random_number): Remove empty line at end of function.
3156 * trans-const.c (gfc_build_cstring_const): New function.
3157 (gfc_init_cst): Use new function.
3158 * trans-const.h (gfc_build_cstring_const): Add prototype.
3159 * trans-io.c (set_string, set_error_locus): Use new function.
3160 * trans-stmt.c (gfc_trans_goto): Use new function.
3163 * parse.c (accept_statement): Don't treat END DO like END IF and
3165 (parse_do_block): Generate possible END DO label inside END DO
3169 * check.c (gfc_check_system_sub): New function.
3170 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SYSTEM.
3171 * intrinsic.c (add_functions): Add 'system'.
3172 (add_subroutines): Add 'system'.
3173 * intrinsic.h (gfc_check_etime_sub, gfc_check_getcwd_sub):
3174 Move prototypes to other suborutines.
3175 (gfc_check_system_sub, gfc_resolve_system, gfc_resolve_system_sub):
3177 (gfc_resolve_system_clock): Fix formatting of prototype.
3178 * iresolve.c (gfc_resolve_system, gfc_resolve_system_sub): New
3180 * trans-intrinsic.c (gfc_conv_intrinsic_function): Deal with
3183 2004-10-04 Erik Schnetter <schnetter@aei.mpg.de>
3185 * scanner.c (preprocessor_line): Accept preprocessor lines without
3186 file names. Check file names for closing quotes. Handle escaped
3187 quotes in file names.
3189 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3190 Paul Brook <paul@codesourcery.com>
3192 * trans-array.c (gfc_conv_expr_descriptor): Check for substriungs.
3193 Use gfc_get_expr_charlen.
3194 * trans-expr.c (gfc_get_expr_charlen): New function.
3195 * trans.h (gfc_get_expr_charlen): Add prototype.
3197 2004-10-04 Kazu Hirata <kazu@cs.umass.edu>
3199 * trans-intrinsic.c: Fix a comment typo.
3201 2004-10-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3203 * simplify.c (range_check): Remove blank line at beginning of function.
3204 (gfc_simplify_dint): Same at end of function.
3205 (gfc_simplify_exponent, gfc_simplify_fraction): Simplify calculations.
3206 (gfc_simplify_bound): Fix indentation.
3207 (gfc_simplify_log10): Simplify calculation.
3208 (gfc_simplify_min, gfc_simplify_max): Remove blank line at beginning
3210 (gfc_simplify_nearest): Same at end of function.
3211 (gfc_simplify_nint, gfc_simplify_idnint): Same at beginning of
3213 (gfc_simplify_rrspacing, gfc_simplify_set_exponent,
3214 gfc_simplify_spacing): Simplify calulations.
3216 2004-10-03 Feng Wang <fengwang@nudt.edu.cn>
3218 * trans-intrinsic.c: Fix comments on spacing and rrspacing
3219 (gfc_conv_intrinsic_rrspacing): Add fold on constant trees.
3221 2004-10-01 Jan Hubicka <jh@suse.cz>
3223 * f95-lang.c (gfc_expand_function): Update call of
3224 tree_rest_of_compilation.
3225 * trans-decl.c (gfc_generate_constructors): Likewise.
3227 2004-09-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3229 * trans-intrinsic.c: Comment fixes.
3231 2004-09-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3233 * decl.c (add_init_expr_to_sym, variable_decl): Comment fixes.
3235 2004-09-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3237 * trans-types.c (gfc_return_by_reference): Remove superfluous
3240 * intrinsic.h (gfc_resolve_getcwd): Update prototype.
3241 * iresolve.c (gfc_resolve_getcwd): Add second argument to function.
3244 * trans-expr.c (gfc_trans_arrayfunc_assign): Look at resolved
3245 function to determine return type.
3247 2004-09-20 Jan Hubicka <jh@suse.cz>
3249 * trans-decl.c (build_entry_thunks): Finalize the function; do not lower
3251 (gfc_generate_function_code): Likewise.
3253 2004-09-20 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3256 * simplify.c (gfc_simplify_reshape): Set shape of return value
3259 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
3260 Zack Weinberg <zack@codesourcery.com>
3262 * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class
3263 enumeration constants.
3265 2004-09-17 Paul Brook <paul@codesourcery.com>
3267 * gfortran.h (struct gfc_linebuf): Don't use C99 empty arrays.
3268 (gfc_linebuf_header_size): Define.
3269 * scanner.c (load_file): Use it.
3271 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
3273 * array.c, data.c, decl.c, dependency.c, error.c, f95-lang.c,
3274 interface.c, intrinsic.c, io.c, misc.c, module.c, parse.h,
3275 resolve.c, scanner.c, trans-array.c, trans-array.h,
3276 trans-common.c, trans-const.h, trans-decl.c, trans-expr.c,
3277 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
3278 trans.h: Fix comment typos. Follow spelling conventions.
3280 2004-09-16 Victor Leikehman <lei@il.ibm.com>
3283 * trans-io.c (transfer_array_component): New function.
3284 (transfer_expr): For array fields, call transfer_array_component.
3286 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
3288 * gfortran.texi: Fix a typo.
3290 2004-09-15 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
3292 * parse.c (eof_buf): Rename eof to eof_buf.
3293 (unexpected_eof): Same.
3294 (gfc_parse_file): Same.
3296 2004-09-15 Steven G. Kargl <kargls@comcast.net>
3298 * check.c (gfc_check_getcwd_sub): New function.
3299 * gfortran.h (GFC_ISYM_GETCWD): New symbol.
3300 * intrinsic.c (add_functions): Add function definition;
3302 * intrinsic.c (add_subroutines): Add subroutine definitions.
3303 * intrinsic.h: Add prototypes.
3304 * iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub):
3306 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol.
3308 2004-09-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3311 * module.c (write_symbol): Don't fill in module name here.
3312 (write_symbol0): Fill in here instead.
3314 2004-09-14 Kazu Hirata <kazu@cs.umass.edu>
3316 * data.c, decl.c, f95-lang.c, gfortran.h, match.c,
3317 trans-array.c, trans-common.c, trans-expr.c,
3318 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.h: Fix
3319 comment typos. Follow spelling conventions.
3321 2004-09-09 Paul Brook <paul@codesourcery.com>
3323 * scanner.c (get_file): Add ATTRIBUTE_UNUSED.
3325 2004-09-08 Paul Brook <paul@codesourcery.com>
3327 * array.c: Don't include assert.h.
3328 * data.c: Don't include assert.h. Replace assert and abort with
3329 gcc_assert and gcc_unreachable.
3330 * dependency.c: Ditto.
3331 * f95-lang.c: Ditto.
3332 * iresolve.c: Ditto.
3334 * simplify.c: Ditto.
3336 * trans-array.c: Ditto.
3337 * trans-common.c: Ditto.
3338 * trans-const.c: Ditto.
3339 * trans-decl.c: Ditto.
3340 * trans-expr.c: Ditto.
3341 * trans-intrinsic.c: Ditto.
3342 * trans-io.c: Ditto.
3343 * trans-stmt.c: Ditto.
3344 * trans-types.c: Ditto.
3347 2004-09-07 Per Bothner <per@bothner.com>
3348 Paul Brook <paul@codesourcery.com>
3350 * error.c (show_locus): Handle mapped locations.
3351 * f95-lang.c (gfc_be_parse_file): Initialize mapped locations.
3352 * gfortran.h: Include input.h.
3353 (struct gfc_linebuf): Use source_location.
3354 * scanner.c (get_file): Initialize linemap.
3355 (preprocessor_line): Pass extra argument to get_file.
3356 (load_file): Ditto. Setup linemap.
3357 (gfc_new_file): Handle mapped locations.
3358 * trans-common.c (build_field, build_equiv_decl, build_common_decl):
3359 Set decl source locations.
3360 (gfc_trans_common): Set blank common block location.
3361 * trans-decl.c (gfc_set_decl_location): New function.
3362 (gfc_get_label_decl, gfc_get_symbol_decl): Use it.
3363 (trans_function_start): Move call to gfc_set_backend_locus..
3364 (build_function_decl): ... to here.
3365 (build_entry_thunks): Set and restore the backend locus.
3366 (gfc_generate_constructors): Remove excess arguments to
3367 init_function_start.
3368 (gfc_generate_block_data): Add comments. Set the decl locus.
3369 * trans-io.c (set_error_locus): Handle mapped locations.
3370 * trans.c (gfc_get_backend_locus, gfc_get_backend_locus): Ditto.
3371 (gfc_trans_code): Use SET_EXPR_LOCATION.
3372 (gfc_generate_code): Override the location of the new symbol.
3373 * trans.h (gfc_set_decl_location): Add prototype.
3375 2004-08-31 Paul Brook <paul@codesourcery.com>
3377 * trans-types.c (gfc_type_for_mode): Return NULL for unknown modes.
3379 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3382 * trans-intrinsic.c (gfc_conv_intrinsic_merge): Do the right thing for
3385 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3390 * resolve.c (resolve_transfer): New function.
3391 (resolve_code): Call resolve_transfer in case of EXEC_TRANSFER.
3393 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3396 * trans-types.c (gfc_init_types): Make gfc_character1_type_node an
3399 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3401 * CONTRIB, NEWS, README, TODO: Remove obsolete files.
3403 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3406 * trans-types.c (gfc_return_by_reference): Remove TODO error,
3407 add comment pointing out possible issue WRT compatibility with g77.
3409 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3411 * trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace
3412 all occurences of 'gfc_strlen_type_node' by
3413 'gfc_charlen_type_node'.
3414 * trans-types.h: Same. Also update comment accordingly.
3416 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3418 * primary.c: Update copyright boilerplate to say GCC.
3419 * f95-lang.c: Change initial comment to say gfortran.
3421 2004-08-31 Paul Brook <paul@codesourcery.com>
3423 * trans-types.h: Add comments.
3424 (intmax_type_node, string_type_node, const_string_type_node): Remove.
3426 2004-08-30 Richard Henderson <rth@redhat.com>
3428 * Make-lang.in (fortran/f95-lang.o): Update dependencies.
3429 (fortran/trans-decl.o, fortran/trans-types.o): Likewise.
3430 * gfortran.h (gfc_integer_info): Add c_char, c_short, c_int,
3431 c_long, c_long_long.
3432 (gfc_logical_info): Add c_bool.
3433 (gfc_real_info): Add mode_precision, c_float, c_double, c_long_double.
3434 * trans-array.c (gfc_array_allocate): Use TYPE_PRECISION
3435 rather than gfc_int[48]_type_node for allocate choice.
3436 * trans-decl.c (gfc_build_intrinsic_function_decls): Cache
3437 local copies of some kind type nodes.
3438 (gfc_build_builtin_function_decls): Likewise.
3439 * trans-expr.c (gfc_conv_power_op): Likewise.
3440 * trans-intrinsic.c (gfc_conv_intrinsic_index,
3441 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify,
3442 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Likewise.
3443 * trans-stmt.c (gfc_trans_pause, gfc_trans_stop,
3444 gfc_trans_character_select, gfc_trans_allocate): Likewise.
3445 * trans-io.c (gfc_pint4_type_node): Move into ...
3446 (gfc_build_io_library_fndecls): ... here. Cache local copies of
3447 some kind type nodes.
3448 * trans-types.c (gfc_type_nodes): Remove.
3449 (gfc_character1_type_node, gfc_strlen_type_node): New.
3450 (gfc_integer_types, gfc_logical_types): New.
3451 (gfc_real_types, gfc_complex_types): New.
3452 (gfc_init_kinds): Fill in real mode_precision.
3453 (gfc_build_int_type, gfc_build_real_type): New.
3454 (gfc_build_complex_type, gfc_build_logical_type): New.
3455 (c_size_t_size): New.
3456 (gfc_init_types): Loop over kinds.
3457 (gfc_get_int_type, gfc_get_real_type): Use gfc_validate_kind.
3458 (gfc_get_complex_type, gfc_get_logical_type): Likewise.
3459 (gfc_get_character_type_len): Likewise.
3460 (gfc_type_for_size): Loop over kinds; use a reduced set of
3461 unsigned type nodes.
3462 (gfc_type_for_mode): Loop over kinds.
3463 (gfc_signed_or_unsigned_type): Use gfc_type_for_size.
3464 (gfc_unsigned_type, gfc_signed_type): Use gfc_signed_or_unsigned_type.
3465 * trans-types.h (F95_INT1_TYPE, F95_INT2_TYPE, F95_INT4_TYPE,
3466 F95_INT8_TYPE, F95_INT16_TYPE, F95_REAL4_TYPE, F95_REAL8_TYPE,
3467 F95_REAl16_TYPE, F95_COMPLEX4_TYPE, F95_COMPLEX8_TYPE,
3468 F95_COMPLEX16_TYPE, F95_LOGICAL1_TYPE, F95_LOGICAL2_TYPE,
3469 F95_LOGICAL4_TYPE, F95_LOGICAL8_TYPE, F95_LOGICAL16_TYPE,
3470 F95_CHARACTER1_TYPE, NUM_F95_TYPES, gfc_type_nodes,
3471 gfc_int1_type_node, gfc_int2_type_node, gfc_int4_type_node,
3472 gfc_int8_type_node, gfc_int16_type_node, gfc_real4_type_node,
3473 gfc_real8_type_node, gfc_real16_type_node, gfc_complex4_type_node,
3474 gfc_complex8_type_node, gfc_complex16_type_node,
3475 gfc_logical1_type_node, gfc_logical2_type_node,
3476 gfc_logical4_type_node, gfc_logical8_type_node,
3477 gfc_logical16_type_node, gfc_strlen_kind): Remove.
3478 (gfc_character1_type_node): Turn in to a variable.
3479 (gfc_strlen_type_node): Likewise.
3481 2004-08-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3483 * gfortran.h (gfc_namespace): Add new field is_block_data.
3484 * parse.c (accept_statement): Remove special handling for BLOCK DATA.
3485 (parse_block_data): Record BLOCK DATA name, set is_block_data field.
3486 * trans.c (gfc_generate_code): Handle BLOCK DATA units.
3487 * trans.h (gfc_generate_block_data): Add prototype.
3488 * trans-decl.c (gfc_generate_block_data): New function.
3490 2004-08-29 Richard Henderson <rth@redhat.com>
3492 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_export.
3493 * trans-types.c (gfc_init_kinds): Reject integer kinds larger
3494 than two HOST_WIDE_INT.
3496 2004-08-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3499 * decl.c (free_variable, free_value, gfc_free_data, var_list,
3500 var_element, top_var_list, match_data_constant, top_val_list,
3501 gfc_match_data): Move here from match.c.
3502 (match_old_style_init): New function.
3503 (variable_decl): Match old-style initialization.
3504 * expr.c (gfc_get_variable_expr): New function.
3505 * gfortran.h (gfc_get_variable_expr): Add prototype.
3506 * gfortran.texi: Start documentation for supported extensions.
3507 * match.c: Remove the functions moved to decl.c.
3508 * match.h (gfc_match_data): Move prototype to under decl.c.
3509 * symbol.c (gfc_find_sym_tree, gfc_find_symbol): Add/correct
3512 2004-08-29 Steven G. Kargl <kargls@comcast.net>
3513 Paul Brook <paul@codesourcery.com>
3515 * check.c (gfc_check_besn, gfc_check_g77_math1): New functions.
3516 * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Define.
3517 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
3518 (build_builtin_fntypes): New function.
3519 (gfc_init_builtin_functions): Use it.
3520 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_{J,Y}{0,1,N}
3521 and GFC_ISYM_ERF{,C}.
3522 (gfc_c_int_kind): Declare.
3523 * intrinsic.c (add_functions): Add [d]bes* and [d]erf*.
3524 * intrinsic.h (gfc_check_besn, gfc_check_g77_math1, gfc_resolve_besn,
3525 gfc_resolve_g77_math1): Add prototypes.
3526 * resolve.c (gfc_resolve_besn, gfc_resolve_g77_math1): New functions.
3527 * mathbuiltins.def: Add comment. Change third argument. Use
3528 DEFINE_MATH_BUILTIN_C. Add bessel and error functions.
3529 * trans-intrinsic.c (BUILT_IN_FUNCTION): Define.
3530 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
3531 * trans-types.c (gfc_c_int_kind): Declare.
3532 (gfc_init_kinds): Set it.
3534 2004-08-29 Steven G. Kargl <kargls@comcast.net>
3535 Paul Brook <paul@codesourcery.com>
3537 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
3538 (gfc_check_f, gfc_simplify_f): Add f0.
3539 * intrinsic.c (do_check): Call f0. Flatten.
3540 (add_sym_0): Fix prototype. Set f0.
3541 (add_functions): Add getgid, getgid and getuid.
3542 (resolve_intrinsic): Remove obsolete comment.
3543 (do_simplify): Call f0.
3544 * intrinsic.h (gfc_resolve_getgid, gfc_resolve_getpid,
3545 gfc_resolve_getuid): Add prototypes.
3546 * iresolve.c (gfc_resolve_getgid, gfc_resolve_getpid,
3547 gfc_resolve_getuid): New functions.
3548 * trans-intrinsic.c (gfc_conv_intrinsic_function): Handle
3551 2004-08-28 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3553 * error.c (gfc_error_init_1): Remove blank line in front of
3554 function body. Add missing blank.
3555 (gfc_buffer_error, error_char, error_string): Remove blank line in
3556 front of function body.
3557 (show_locus): Add comma in comment.
3558 (gfc_clear_warning, gfc_warning_check, gfc_clear_error,
3559 gfc_push_error, gfc_pop_error): Remove blank line in front of
3561 (gfc_get_errors): Typo fix in comment in front of function. Remove
3562 blank line in front of function body.
3564 2004-08-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3566 * gfortran.h (gfc_default_*_kind): Remove prototypes, add extern
3567 variable declaration of same name.
3568 * arith.c, check.c, decl.c, dump_parse_tree.c, expr.c,
3569 intrinsic.c, io.c, iresolve.c, match.c, options.c, primary.c,
3570 resolve.c, simplify.c, symbol.c, trans-const.c, trans-io.c:
3571 Replace all calls to gfc_default_*_kind with variable accesses.
3572 * trans-types.c: Same as above.
3573 (gfc_default_*_kind_1): Rename to gfc_default_*_kind, remove
3574 static qualifier. Replace all occurences.
3575 (gfc_default_*_kind): Remove functions.
3577 2004-08-26 Richard Henderson <rth@redhat.com>
3579 * arith.c: Include system.h, not real system headers.
3580 (MPZ_NULL, MPF_NULL, DEF_GFC_INTEGER_KIND, DEF_GFC_LOGICAL_KIND,
3581 DEF_GFC_REAL_KIND, GFC_SP_KIND, GFC_SP_PREC, GFC_SP_EMIN, GFC_SP_EMAX,
3582 GFC_DP_KIND, GFC_DP_PREC, GFC_DP_EMIN, GFC_DP_EMAX, GFC_QP_KIND,
3583 GFC_QP_PREC, GFC_QP_EMIN, GFC_QP_EMAX): Remove.
3584 (gfc_integer_kinds, gfc_logical_kinds, gfc_real_kinds,
3585 gfc_index_integer_kind, gfc_default_integer_kind,
3586 gfc_default_real_kind,gfc_default_double_kind,
3587 gfc_default_character_kind, gfc_default_logical_kind,
3588 gfc_default_complex_kind, validate_integer, validate_real,
3589 validate_logical, validate_character,
3590 gfc_validate_kind): Move to trans-types.c.
3591 (gfc_set_model_kind): Use gfc_validate_kind.
3592 (gfc_set_model): Just copy the current precision to default.
3593 (gfc_arith_init_1): Use mpfr precision 128 for integer setup.
3594 * f95-lang.c (gfc_init_decl_processing): Invoke gfc_init_kinds.
3595 * gfortran.h: Update file commentary.
3596 * trans-types.c (MAX_INT_KINDS, MAX_REAL_KINDS): New.
3597 (gfc_default_integer_kind_1, gfc_default_real_kind_1,
3598 gfc_default_double_kind_1, gfc_default_character_kind_1,
3599 gfc_default_logical_kind_1, gfc_default_complex_kind_1): New.
3600 (gfc_init_kinds): New.
3601 (gfc_init_types): Don't set gfc_index_integer_kind here.
3602 * trans-types.h (gfc_init_kinds): Declare.
3603 * doc/invoke.texi: Clarify DOUBLE PRECISION behaviour wrt -r8.
3605 2004-08-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3607 * check.c (gfc_check_atan2): New function.
3608 * intrinsic.c (add_functions): Use gfc_check_atan2 for ATAN2
3609 * intrinsic.h (gfc_check_atan2): Add prototype.
3611 2004-08-25 Richard Henderson <rth@redhat.com>
3613 * arith.c (gfc_validate_kind): Add may_fail argument; abort if
3614 false and we don't validate the kind.
3615 (gfc_check_integer_range, gfc_check_real_range): Update to match.
3616 * check.c (kind_check): Likewise.
3617 * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Likewise.
3618 (match_char_spec, match_logical_spec): Likewise.
3619 * gfortran.h (gfc_validate_kind): Likewise.
3620 * options.c (gfc_handle_option): Likewise.
3621 * primary.c (match_integer_constant, match_real_constant,
3622 match_string_constant, match_logical_constant,
3623 match_const_complex_part): Likewise.
3624 * simplify.c (get_kind, gfc_simplify_bit_size, gfc_simplify_digits,
3625 gfc_simplify_epsilon, gfc_simplify_huge, gfc_simplify_ibclr,
3626 gfc_simplify_ibset, gfc_simplify_ishft, gfc_simplify_ishftc,
3627 gfc_simplify_maxexponent, gfc_simplify_minexponent,
3628 gfc_simplify_nearest, gfc_simplify_not, gfc_simplify_precision,
3629 gfc_simplify_radix, gfc_simplify_range, gfc_simplify_rrspacing,
3630 gfc_simplify_scale, gfc_simplify_spacing, gfc_simplify_tan,
3631 gfc_simplify_tiny): Likewise.
3632 * trans-intrinsic.c (gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod,
3633 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
3634 prepare_arg_info): Likewise.
3636 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3638 * expr.c (gfc_check_assign): Add comment. Add new warning.
3639 * trans-expr.c (gfc_conv_function_call): Correctly dereference
3640 result of pointer valued function when not in pointer assignment.
3642 2004-08-25 Paul Brook <paul@codesourcery.com>
3644 * config-lang.in: Remove dead commented line.
3645 * module.c: Replace g95 with gfortran in comment.
3647 2004-08-25 Paul Brook <paul@codesourcery.com>
3650 * arith.c (gfc_mpfr_to_mpz): Workaround mpfr bug.
3652 2004-08-25 Paul Brook <paul@codesourcery.com>
3655 * trans-array.c (gfc_trans_allocate_temp_array): Remove
3656 string_length argument.
3657 (gfc_trans_array_ctor_element): New function.
3658 (gfc_trans_array_constructor_subarray): Use it.
3659 (gfc_trans_array_constructor_value): Ditto. Handle constant
3661 (get_array_ctor_var_strlen, get_array_ctor_strlen): New functions.
3662 (gfc_trans_array_constructor): Use them.
3663 (gfc_add_loop_ss_code): Update to new gfc_ss layout.
3664 (gfc_conv_ss_descriptor): Remember section string length.
3665 (gfc_conv_scalarized_array_ref): Ditto. Remove dead code.
3666 (gfc_conv_resolve_dependencies): Update to new gfc_ss layout.
3667 (gfc_conv_expr_descriptor): Ditto.
3668 (gfc_conv_loop_setup): Ditto. Spelling fixes.
3669 * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
3670 * trans-const.c (gfc_conv_constant): Update to new gfc_ss layout.
3671 * trans-expr.c (gfc_conv_component_ref): Turn error into ICE.
3672 (gfc_conv_variable): Set string_length from section.
3673 (gfc_conv_function_call): Remove extra argument.
3674 (gfc_conv_expr, gfc_conv_expr_reference): Update to new gfc_ss layout.
3675 * trans-types.c (gfc_get_character_type_len): New function.
3676 (gfc_get_character_type): Use it.
3677 (gfc_get_dtype): Return zero for internal types.
3678 * trans-types.h (gfc_get_character_type_len): Add prototype.
3679 * trans.h (struct gfc_ss): Move string_length out of union.
3681 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3683 * trans.h (build2_v, build3_v): New macros.
3685 * f95-lang.c (gfc_truthvalue_conversion): Use build2 instead of
3687 * trans-array.c (gfc_conv_descriptor_data,
3688 gfc_conv_descriptor_offset, gfc_conv_descriptor_dimension,
3689 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
3690 gfc_conv_descriptor_ubound, gfc_trans_allocate_array_storage,
3691 gfc_trans_allocate_temp_array,
3692 gfc_trans_array_constructor_subarray,
3693 gfc_trans_array_constructor_value, gfc_conv_array_index_ref,
3694 gfc_trans_array_bound_check, gfc_conv_array_index_offset,
3695 gfc_conv_scalarized_array_ref, gfc_conv_array_ref,
3696 gfc_conv_array_ref, gfc_trans_preloop_setup,
3697 gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
3698 gfc_conv_loop_setup, gfc_array_init_size,
3699 gfc_conv_array_initializer, gfc_trans_array_bounds,
3700 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
3701 gfc_conv_expr_descriptor, gfc_conv_array_parameter,
3702 gfc_trans_deferred_array): Use buildN and buildN_v macros instead
3703 of build and build_v as appropriate.
3704 * trans-common.c (create_common): Same.
3705 * trans-decl.c (gfc_trans_auto_character_variable,
3706 gfc_trans_entry_master_switch, gfc_generate_function_code): Same.
3707 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
3708 gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
3709 gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
3710 gfc_conv_expr_op, gfc_conv_function_call,
3711 gfc_trans_structure_assign): Same.
3712 * trans-intrinsic.c (build_fixbound_expr, build_round_expr,
3713 gfc_conv_intrinsic_aint, gfc_conv_intrinsic_bound,
3714 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
3715 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
3716 gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_minmax,
3717 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
3718 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_minmaxloc,
3719 gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
3720 gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_singlebitop,
3721 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
3722 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_strcmp,
3723 gfc_conv_allocated, gfc_conv_associated, prepare_arg_info,
3724 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
3725 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat,
3726 gfc_conv_intrinsic_iargc): Same.
3727 * trans-io.c (set_parameter_value, set_parameter_ref, set_string,
3728 set_flag, add_case, io_result, transfer_namelist_element,
3729 transfer_expr): Same.
3730 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_if_1,
3731 gfc_trans_arithmetic_if, gfc_trans_do, gfc_trans_do_while,
3732 gfc_trans_integer_select, gfc_trans_logical_select,
3733 gfc_trans_character_select, gfc_trans_forall_loop,
3734 gfc_trans_nested_forall_loop, gfc_do_allocate,
3735 generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
3736 compute_inner_temp_size, compute_overall_iter_number,
3737 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
3738 gfc_trans_forall_1, gfc_evaluate_where_mask,
3739 gfc_trans_where_assign, gfc_trans_allocate): Same.
3740 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Same.
3741 * trans.c (gfc_add_modify_expr, gfc_finish_block,
3742 gfc_build_array_ref, gfc_build_function_call,
3743 gfc_trans_runtime_check): Same.
3745 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3747 * trans-const.c (gfc_conv_mpz_to_tree): Change call to
3748 build_int_cst to build_int_cst_wide in accordance to Nathan's
3751 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
3753 * trans-array.c (gfc_trans_array_constructor_value): Adjust
3754 build_int_cst calls.
3755 * trans-const.c (gfc_build_string_const, gfc_init_constants,
3756 gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise.
3757 * trans-decl.c (gfc_get_symbol_decl, build_entry_thunks,
3758 gfc_trans_entry_master_switch): Likewise.
3759 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
3760 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
3761 * trans-io.c (add_case, set_error_locus,
3762 transfer_namelist_element, transfer_expr): Likewise.
3763 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
3764 gfc_trans_stop, gfc_trans_character_select): Likewise.
3765 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
3766 * trans.c (gfc_trans_runtime_check): Likewise.
3768 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3770 * trans-decl.c, trans-types.c: Add and remove blank lines as
3773 2004-08-24 Richard Henderson <rth@redhat.com>
3775 * trans-const.c (gfc_conv_mpz_to_tree): Fix 64-bit shift warning.
3777 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3779 * resolve.c (merge_argument_lists): Revert unintentionally
3782 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3784 * trans-decl.c (build_function_decl): Fix spelling in comment.
3785 (build_entry_thunks): Remove code with no function.
3786 (gfc_build_intrinsic_function_decls): Remove empty line.
3788 * resolve.c (resolve_entries): Fix a bunch of comment typos.
3790 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
3792 * f95-lang.c (gfc_init_decl_processing): Adjust
3793 build_common_tree_nodes call.
3795 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3797 * trans-types.c: Spelling and formatting fixes.
3799 2004-08-23 Richard Henderson <rth@redhat.com>
3801 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_getlimbn instead
3802 of going through an intermediate string. Fix 32/64 int/long bug.
3804 2004-08-23 Eric Christopher <echristo@redhat.com>
3806 * trans-types.c (gfc_type_for_mode): Remove VECTOR_TYPE_SUPPORTED_P
3807 usage. Use build_vector_type_for_mode for vector types.
3809 2004-08-22 Richard Henderson <rth@redhat.com>
3812 * data.c (find_con_by_offset): Search ordered list; handle
3813 elements with repeat counts.
3814 (gfc_assign_data_value_range): New.
3815 * gfortran.h (struct gfc_data_value): Make repeat unsigned.
3816 (gfc_assign_data_value_range): Declare.
3817 * match.c (top_val_list): Extract repeat count into a temporary.
3818 * resolve.c (values): Make left unsigned.
3819 (next_data_value): Don't decrement left.
3820 (check_data_variable): Use gfc_assign_data_value_range.
3822 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3824 * trans-const.c, trans-decl.c, trans-expr.c: Spelling fixes.
3826 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3828 * check.c (gfc_check_reduction): Rename to ...
3829 (check_reduction): ... this. Make static. Don't check type of
3831 (gfc_check_minval_maxval, gfc_check_prodcut_sum): New functions.
3832 * intrinsic.c (add_functions): Change MAXVAL, MINVAL, PRODUCT and
3833 SUM to use new check functions.
3834 (check_specific): Change logic to call new functions.
3835 * intrinsic.h (gfc_check_minval_maxval, gfc_check_product_sum):
3837 (gfc_check_reduction): Remove prototype.
3839 2004-08-20 Paul Brook <paul@codesourcery.com>
3840 Canqun Yang <canqun@nudt.edu.cn>
3843 * trans-array.c (gfc_conv_array_parameter): Pass correct pointer
3844 for automatic arrays.
3845 * trans-types.c (gfc_get_nodesc_array_type): Add comment.
3847 2004-08-19 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3851 * match.c (match_simple_forall, match_simple_where): Forward-declare.
3852 (gfc_match_if): Order statement list alphabetically, add WHERE and
3853 FORALL, remove double PAUSE.
3854 (gfc_match_simple_where, match_forall_header,
3855 gfc_match_simple_forall): New functions.
3856 (gfc_match_forall): Use match_forall_header.
3858 2004-08-19 Paul Brook <paul@codesourcery.com>
3861 * gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0.
3862 * symbol.c (gfc_clear_attr): Use memset.
3864 2004-08-19 Paul Brook <paul@codesourcery.com>
3868 * data.c (assign_substring_data_value): Remove.
3869 (create_character_intializer): New function.
3870 (gfc_assign_data_value): Track the typespec for the current
3871 subobject. Use create_character_intializer.
3873 2004-08-19 Erik Schnetter <schnetter@aei.mpg.de>
3876 * check.c (gfc_check_reduction): New function.
3877 (gfc_check_minval_maxval): Removed.
3878 (gfc_check_product): Removed.
3879 (gfc_check_sum): Removed.
3880 * intrinsic.h: Add/remove declarations for these.
3881 * gfortran.h: Add field f3red to union gfc_check_f.
3882 * intrinsic.c (add_sym_3red): New function.
3883 (add_functions): Register maxval, minval, product, and sum intrinsics
3884 through add_sym_3red.
3885 (check_specific): Handle f3red union field.
3886 * iresolve.c: Whitespace change.
3888 2004-08-18 Paul Brook <paul@codesourcery.com>
3890 * trans-types.c (gfc_sym_type): Use pointer types for optional args.
3892 2004-08-18 Victor Leikehman <lei@il.ibm.com>
3895 * trans-io.c (transfer_namelist_element): New. Recursively handle
3896 derived-type variables. Pass string lengths.
3897 (build_dt): Code moved to build_namelist, with some
3898 changes and additions.
3899 (gfc_build_io_library_fndecls): Declare the fifth
3900 argument in st_set_nml_var_char -- string_length.
3902 2004-08-17 Paul Brook <paul@codesourcery.com>
3903 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3906 * decl.c (get_proc_name): Update mystery comment.
3907 (gfc_match_entry): Check for errors earlier. Add entry point to list.
3908 * dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes.
3909 * gfortran.h (symbol_attribute): Add entry_master. Document entry.
3910 (struct gfc_entry_list): Define.
3911 (gfc_get_entry_list): Define.
3912 (struct gfc_namespace): Add refs and entries.
3913 (enum gfc_exec_op): Add EXEC_ENTRY.
3914 (struct gfc_code): Add ext.entry.
3915 * module.c (ab_attribute, attr_bits): Remove AB_ENTRY.
3916 (mio_symbol_attribute): Don't save/reture addr->entry.
3917 (mio_namespace_ref): Refcount namespaces.
3918 * parse.c (accept_statement): Handle ST_ENTRY.
3919 (gfc_fixup_sibling_symbols): Mark symbol as referenced.
3920 (parse_contained): Fixup sibling references to entry points
3921 after parsing the procedure body.
3922 * resolve.c (resolve_contained_fntype): New function.
3923 (merge_argument_lists, resolve_entries): New functions.
3924 (resolve_contained_functions): Use them.
3925 (resolve_code): Handle EXEC_ENTRY.
3926 (gfc_resolve): Call resolve_entries.
3927 * st.c (gfc_free_statement): Handle EXEC_ENTRY.
3928 * symbol.c (gfc_get_namespace): Refcount namespaces.
3929 (gfc_free_namespace): Ditto.
3930 * trans-array.c (gfc_trans_dummy_array_bias): Treat all args as
3931 optional when multiple entry points are present.
3932 * trans-decl.c (gfc_get_symbol_decl): Remove incorrect check.
3933 (gfc_get_extern_function_decl): Add assertion. Fix coment.
3934 (create_function_arglist, trans_function_start, build_entry_thunks):
3936 (gfc_build_function_decl): Rename ...
3937 (build_function_decl): ... to this.
3938 (gfc_create_function_decl): New function.
3939 (gfc_generate_contained_functions): Use it.
3940 (gfc_trans_entry_master_switch): New function.
3941 (gfc_generate_function_code): Use new functions.
3942 * trans-stmt.c (gfc_trans_entry): New function.
3943 * trans-stmt.h (gfc_trans_entry): Add prototype.
3944 * trans-types.c (gfc_get_function_type): Add entry point argument.
3945 * trans.c (gfc_trans_code): Handle EXEC_ENTRY.
3946 (gfc_generate_module_code): Call gfc_create_function_decl.
3947 * trans.h (gfc_build_function_decl): Remove.
3948 (gfc_create_function_decl): Add prototype.
3950 2004-08-15 Andrew Pinski <apinski@apple.com>
3953 * f95-lang.c (gfc_init_builtin_functions): Initialize the builtins
3954 for cabs{,f} and copysign{,f}.
3955 * trans-decl.c (gfor_fndecl_math_cabsf): Delete.
3956 (gfor_fndecl_math_cabs): Delete.
3957 (gfor_fndecl_math_sign4): Delete.
3958 (gfor_fndecl_math_sign8): Delete.
3959 (gfc_build_intrinsic_function_decls): Remove the
3960 initializing of cabs{,f} and copysign{,f} functions.
3961 * trans-intrinsic.c (gfc_conv_intrinsic_abs): Use the builtins
3962 instead of the functions definitions.
3963 (gfc_conv_intrinsic_sign): Likewise.
3964 * trans.h (gfor_fndecl_math_cabsf): Delete.
3965 (gfor_fndecl_math_cabs): Delete.
3966 (gfor_fndecl_math_sign4): Delete.
3967 (gfor_fndecl_math_sign8): Delete.
3969 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
3971 * trans-array.c (gfc_trans_array_constructor_value): Use
3973 * trans-const.c (gfc_build_string_const,
3974 gfc_init_constants, gfc_conv_mpz_to_tree,
3975 gfc_conv_constant_to_tree): Likewise.
3976 * trans-decl.c (gfc_get_symbol_decl): Likewise.
3977 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
3978 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
3979 * trans-io.c (add_case, set_error_locus, build_dt,
3980 transfer_expr): Likewise.
3981 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
3982 gfc_trans_stop, gfc_trans_character_select): Likewise.
3983 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
3984 * trans.c (gfc_trans_runtime_check): Likewise.
3986 2004-08-14 Paul Brook <paul@codesourcery.com>
3988 * trans-decl.c (gfc_build_function_decl): Remove dead code.
3990 2004-08-14 Paul Brook <paul@codesourcery.com>
3992 * trans-arry.c (gfc_trans_auto_array_allocation): Remove unused var.
3994 2004-08-13 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3996 * gfortran.h: Add comments.
3997 * parse.c (parse_contained): Fix comment typo.
3998 * resolve.c (was_declared): Ditto.
4001 2004-08-11 Paul Brook <paul@codeourcery.com>
4004 * intrinsic.c (add_functions): Add dfloat as an alias for dble.
4006 2004-08-10 Richard Henderson <rth@redhat.com>
4008 * f95-lang.c (gfc_init_builtin_functions): Remove
4009 __builtin_stack_alloc, add __builtin_alloca.
4010 * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR.
4011 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
4013 2004-08-10 Paul Brook <paul@codesourcery.com>
4015 * trans-io.c (transfer_expr): Handle pointters.
4017 2004-08-10 Paul Brook <paul@codesourcery.com>
4020 * trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT.
4021 (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta.
4022 (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary):
4023 Handle GFC_SS_COMPONENT.
4024 (gfc_conv_ss_startstride): Ditto. Set ss->shape.
4025 (gfc_conv_loop_setup): Tweak commends. Remove dead code.
4027 (gfc_conv_array_initializer): Call specific initializer routines.
4028 * trans-expr.c (gfc_trans_structure_assign): New function.
4029 (gfc_trans_subarray_assign): New function.
4030 (gfc_trans_subcomponent_assign): New fucntion
4031 (gfc_conv_structure): Use them.
4032 * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT.
4033 (gfc_ss): Add shape.
4035 2004-08-08 Victor Leikehman <lei@il.ibm.com>
4037 * simplify.c (gfc_simplify_shape): Bugfix.
4038 * expr.c (gfc_copy_shape_excluding): New function.
4039 * gfortran.h (gfc_get_shape): Bugfix.
4040 (gfc_copy_shape_excluding): Added declaration.
4041 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
4042 gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound,
4043 gfc_resolve_ubound, gfc_resolve_transpose): Added compile
4044 time resolution of shape.
4046 2004-08-06 Janne Blomqvist <jblomqvi@cc.hut.fi>
4048 * intrinsic.c (add_subroutines): Add getenv and
4049 get_environment_variable. (add_sym_5s): New function.
4050 * intrinsic.h (gfc_resolve_get_environment_variable): Add
4052 * iresolve.c (gfc_resolve_get_environment_variable): New
4055 2004-08-06 Feng Wang <fengwang@nudt.edu.cn>
4057 * f95-lang.c (gfc_init_builtin_functions): Fix the number of
4058 __builtin_pow[f] arguments.
4060 2004-08-06 Steven G. Kargl <kargls@comcast.net>
4062 * arith.c: Add #define for model numbers. Remove global GMP variables.
4063 (natural_logarithm,common_logarithm,exponential,sine,
4064 cosine,arctangent,hypercos,hypersine ): Remove.
4065 (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions.
4066 (arctangent2,gfc_arith_init_1,gfc_arith_done_1
4067 gfc_check_real_range, gfc_constant_result, gfc_range_check,
4068 gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times,
4069 gfc_arith_divide,complex_reciprocal,complex_pow_ui,
4070 gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real,
4071 gfc_convert_complex,gfc_int2real,gfc_int2complex,
4072 gfc_real2int,gfc_real2real,gfc_real2complex,
4073 gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP
4074 to MPFR, use new functions.
4075 * arith.h: Remove extern global variables.
4076 (natural_logarithm,common_logarithm,exponential, sine, cosine,
4077 arctangent,hypercos,hypersine): Remove prototypes.
4078 (arctangent2): Update prototype from GMP to MPFR.
4079 (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes.
4080 * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR.
4081 * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR.
4082 * gfortran.h (GFC_REAL_BITS): Remove.
4083 (arith): Add ARITH_NAN.
4084 Include mpfr.h. Define GFC_RND_MODE.
4085 Rename GCC_GFORTRAN_H GFC_GFC_H.
4086 (gfc_expr): Convert GMP to MPFR.
4087 * module.c: Add arith.h, correct type in comment.
4088 (mio_gmp_real): Convert GMP to MPFR.
4089 (mio_expr): Use gfc_set_model_kind().
4090 * primary.c: Update copyright date with 2004.
4091 (match_real_constant,match_const_complex_part): Convert GMP to MPFR.
4092 * simplify.c: Remove global GMP variables
4093 (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag,
4094 gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint,
4095 gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan,
4096 gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx,
4097 gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh,
4098 gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon,
4099 gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor,
4100 gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int,
4101 gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log,
4102 gfc_simplify_log10,simplify_min_max,gfc_simplify_mod,
4103 gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint,
4104 gfc_simplify_rrspacing,gfc_simplify_scale,
4105 gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin,
4106 gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt,
4107 gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny,
4108 gfc_simplify_init_1,gfc_simplify_done_1): Convert GMP to MPFR.
4110 * trans-const.c (gfc_conv_mpfr_to_tree): Rename from
4111 gfc_conv_mpf_to_tree. Convert it to use MPFR
4112 (gfc_conv_constant_to_tree): Use it.
4113 * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree().
4114 * trans-intrinsic.c: Add arith.h, remove gmp.h
4115 (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR.
4117 2004-08-06 Victor Leikehman <lei@il.ibm.com>
4118 Paul Brook <paul@codesourcery.com>
4120 * trans-array.c (gfc_trans_allocate_array_storage,
4121 gfc_trans_allocate_temp_array, gfc_add_loop_ss_code,
4122 gfc_conv_loop_setup): For functions, if the shape of the result
4123 is not known in compile-time, generate an empty array descriptor for
4124 the result and let the callee to allocate the memory.
4125 (gfc_trans_dummy_array_bias): Do nothing for pointers.
4126 (gfc_conv_expr_descriptor): Use function return values directly.
4127 * trans-expr.c (gfc_conv_function_call): Always add byref call
4129 (gfc_trans_pointer_assignment): Add comments.
4130 (gfc_trans_arrayfunc_assign): Don't chain on expression.
4132 2004-08-01 Roger Sayle <roger@eyesopen.com>
4134 * options.c (gfc_init_options): Don't warn about the use GNU
4135 extensions by default.
4136 (gfc_post_options): Warn about GNU extensions with -pedantic.
4137 (gfc_handle_option): Don't warn about GNU extensions with -std=gnu.
4139 2004-07-30 Richard Henderson <rth@redhat.com>
4141 * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL
4144 2004-07-25 Richard Henderson <rth@redhat.com>
4146 * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL
4147 and DECL_IGNORED_P on RESULT_DECL.
4148 (gfc_generate_constructors): Likewise.
4150 2004-07-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4153 * lang.opt (ffixed-line-length-none, ffixed-line-length-): New
4155 (ffixed-line-length-80, ffixed-line-length-132): Remove.
4156 * options.c (gfc_handle_options): Deal with changed options.
4157 * scanner.c (load_line): Change second arg to 'char **',
4158 allocate if pointing to NULL. Keep track of buffer's length.
4159 Adapt buffer size to overlong lines. Pad lines to full length
4161 (load_file): Adapt to new interface of load_line.
4163 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
4165 * trans.h (builtin_function): Declare.
4167 2004-07-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4170 (parts ported from g95)
4171 * parse.h (gfc_state_data): New field do_variable.
4172 (gfc_check_do_variable): Add prototype.
4173 * parse.c (push_state): Initialize field 'do_variable'.
4174 (gfc_check_do_variable): New function.
4175 (parse_do_block): Remember do iterator variable.
4176 (parse_file): Initialize field 'do_variable'.
4177 * match.c (gfc_match_assignment, gfc_match_do,
4178 gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate):
4179 Add previously missing checks.
4180 (gfc_match_return): Reformat error message.
4181 * io.c (match_out_tag): New function.
4182 (match_open_element, match_close_element,
4183 match_file_element, match_dt_element): Call match_out_tag
4184 instead of match_vtag where appropriate.
4185 (match_io_iterator, match_io_element): Add missing check.
4186 (match_io): Reformat error message.
4187 (match_inquire_element): Call match_out_tag where appropriate.
4189 * parse.c (gfc_check_do_variable): Fix error locus.
4191 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4194 * trans-decl.c (gfc_build_function_decl): Create a new chardecl
4195 for every assumed length character dummy argument.
4198 * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion.
4201 * simplify.c (gfc_simplify_bound): Copy the bound expression.
4203 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4206 * trans-array.c gfc_trans_g77_array,
4207 gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init
4208 for assumed length characters.
4209 (gfc_conv_expr_descriptor): Set se->string_length if dealing
4210 with a character expression.
4211 (gfc_cvonv_array_parameter): Pass string length when passing
4212 character array according to g77 conventions.
4214 2004-07-12 Paul Brook <paul@codesourcery.com>
4216 * expr.c (gfc_check_assign_symbol): Handle pointer assignments.
4217 * trans-array.c (gfc_trans_auto_array_allocation): Remove
4218 initialization code.
4219 * trans-common.c (create_common): Use gfc_conv_initializer.
4220 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer.
4221 * trans-expr.c (gfc_conv_initializer): New function.
4222 (gfc_conv_structure): Use it.
4223 * trans.h (gfc_conv_initializer): Add prototype.
4225 2004-07-11 Paul Brook <paul@codesourcery.com>
4228 * parse.c (gfc_fixup_sibling_symbols): Also look for untyped
4230 (parse_contained): Mark contained symbols as referenced.
4232 2004-07-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4235 * module.c (gfc_dump_module, gfc_use_module): Print locus
4236 when opening of module file fails.
4239 * io.c (match_io): Flag 'WRITE(...), ...' as extension.
4242 * match.c (gfc_match_program): A program name is obligatory.
4243 (gfc_match_return): RETURN in main program is an extension.
4244 (gfc_match_block_data): A space is required before a block data
4248 * primary.c (match_boz_constant): Call gfc_notify_std only if
4249 we actually have a non-standard boz-literal-constant.
4252 * expr.c (gfc_check_assign): Print ranks if incompatible. Issue
4253 warning if assigning NULL().
4255 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
4257 * f95-lang.c (set_block): Remove.
4258 (gfc_clear_binding_stack): New.
4259 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
4260 (struct binding_level): Remove block_created_by_back_end.
4261 (clear_binding_level): Likewise.
4262 (poplevel): Don't handle block_created_by_back_end.
4264 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4266 * trans-decl.c (gfc_create_module_variable): Nothing to do if
4267 symbol is in common, because we ...
4268 (gfc_generate_module_vars): Call gfc_trans_common.
4270 2004-07-10 Paul Brook <paul@codesourcery.com>
4272 * trans-array.c (gfc_build_null_descriptor): New function.
4273 (gfc_trans_static_array_pointer): Use it.
4274 * trans-array.h (gfc_build_null_descriptor): Add prototype.
4275 * trans-expr.c (gfc_conv_structure): Handle array pointers.
4277 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4280 * decl.c (gfc_match_save): Use-associated common block
4282 * gfortran.h (gfc_common_head): Add new field 'name'.
4283 Fix typo in comment after #endif.
4284 * match.c (gfc_get_common): Add new argument from_common,
4285 mangle name if flag is set, fill in new field in structure
4287 (match_common): Set new arg in call to gfc_get_common,
4288 use-associated common block doesn't collide.
4289 * match.h (gfc_get_common): Adapt prototype.
4290 * module.c (load_commons): Set new arg in call to
4292 * symbol.c (free_common_tree): New function.
4293 (gfc_free_namespace): Call new function.
4294 * trans-common.c (several functions): Remove argument
4295 'name', use name from gfc_common_head instead.
4297 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4299 * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
4300 and RHS match. Return early if the RHS is NULL().
4303 * match.c (match_common): Fix error reporting for used common.
4306 * trans-expr.c (gfc_conv_structure): Handle initialization
4307 of scalar pointer components.
4309 * parse.c (decode_statement): Fix matching of BLOCK DATA.
4311 * trans-decl.c (generate_local_decl): Remove workaround obsoleted
4312 by fix for PR 15481.
4314 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4316 * trans-common.c: Fix whitespace issues, make variable names
4318 (create_common): Additionally, make loop logic more obvious.
4320 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4321 Paul Brook <paul@codesourcery.com>
4324 * trans-common.c (calculate_length): Remove ...
4325 (get_segment_info): Merge into here. Save field type.
4326 (build_field): Use saved type.
4327 (create_common, new_condition, new_segment, finish_equivalences):
4328 Use new get_segment_info.
4329 * trans-types.c: Update comment.
4331 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4334 * moduele.c (mio_symbol): Don't I/O initial values unless
4335 symbol is a parameter.
4337 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4340 * resolve.c (resolve_symbol): Verify that the shape of a
4341 parameter array is not only explicit, but also constant.
4342 * array.c (gfc_is_compile_time_shape): New function.
4343 * gfortran.h (gfc_is_compile_time_shape): Add prototype.
4345 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4351 * module.c (write_symbol, write_symtree): Remove workaround.
4352 * primary.c (match_actual_arglist): Enhance comment.
4353 (gfc_match_rvalue): Handle function call with first argument
4354 a keyword argument correctly.
4355 * resolve.c (resolve_symbol): Change call to
4356 gfc_set_default_type to issue error if no implicit type
4358 * trans-decl.c (gfc_create_module_variable): Remove workaround.
4360 2004-07-08 Paul Brook <paul@codesourcery.com>
4362 * intrinsic.c (add_sym_4s): New function.
4363 (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
4365 2004-07-04 Janne Blomqvist <jblomqvi@cc.hut.fi>
4366 Paul Brook <paul@codesourcery.com>
4370 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
4371 GFC_ISYM_COMMAND_ARGUMENT_COUNT.
4372 * intrinsic.c (add_functions): Identify iargc. Add
4373 command_argument_count.
4374 (add_subroutines): Resolve getarg. Add get_command and
4375 get_command_argument.
4376 * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
4377 gfc_resolve_get_command_argument): Add prototypes.
4378 * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
4379 gfc_resolve_get_command_argument): New functions.
4380 * trans-decl.c (gfor_fndecl_iargc): New variable.
4381 (gfc_build_intrinsic_function_decls): Set it.
4382 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
4383 (gfc_conv_intrinsic_function): Use it.
4384 * trans.h (gfor_fndecl_iargc): Declare.
4386 2004-07-04 Matthias Klose <doko@debian.org>
4388 * Make-lang.in: Generate and install gfortran man page.
4389 * invoke.texi: Remove extra '@c man end'.
4391 2004-07-04 Richard Henderson <rth@redhat.com>
4393 * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
4395 2004-07-04 Paul Brook <paul@codesourcery.com>
4397 * decl.c (gfc_match_implicit_range): Don't use typespec.
4398 (gfc_match_implicit): Handle character selectors.
4399 * gfortran.h (gfc_set_implicit): Remove prototype.
4400 (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
4401 * parse.c (accept_statement): Don't call gfc_set_implicit.
4402 * symbol.c (new_ts): Remove.
4403 (gfc_set_implicit_none): Use same loop bounds as other functions.
4404 (gfc_set_implicit): Remove.
4405 (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
4406 (gfc_merge_new_implicit): Combine with gfc_set_implicit.
4408 2004-06-30 Richard Henderson <rth@redhat.com>
4410 * match.c (var_element): Remove unused variable.
4412 * trans-decl.c (gfc_generate_function_code): Don't set
4413 x_whole_function_mode_p.
4414 (gfc_generate_constructors): Likewise.
4416 2004-06-30 Richard Henderson <rth@redhat.com>
4418 * trans-decl.c (gfc_generate_function_code): Don't set
4419 immediate_size_expand.
4420 (gfc_generate_constructors): Likewise.
4422 2004-06-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4425 * decl.c (gfc_match_type_spec): Rename second argument to
4426 'implicit_flag', reverse meaning. Don't match_char_spec if
4427 'implicit_flag' is set. Rename to ...
4428 (match_type_spec): ... this.
4429 (gfc_match_implicit_none, match_implicit_range): Move here
4431 (gfc_match_implicit): Move here from match.c, try to
4432 match_char_len if match_implicit_range doesn't succeed for
4433 CHARACTER implicits. Call renamed fucntion match_type_spec.
4434 (gfc_match_data_decl, match_prefix): Call renamed function
4436 * match.c (gfc_match_implicit_none, match_implicit_range,
4437 gfc_match_implicit): Move to decl.c.
4438 * match.h (gfc_match_implicit_none, gfc_match_implicit):
4439 Move protoypes to section 'decl.c'.
4440 (gfc_match_type_spec): Remove prototype.
4442 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4444 * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
4447 2004-06-29 Steven Bosscher <stevenb@suse.de>
4449 Make sure types in assignments are compatible. Mostly mechanical.
4450 * trans-const.h (gfc_index_one_node): New define.
4451 * trans-array.c (gfc_trans_allocate_array_storage,
4452 gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
4453 gfc_trans_array_constructor_value, gfc_trans_array_constructor,
4454 gfc_conv_array_ubound, gfc_conv_array_ref,
4455 gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
4456 gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
4457 gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
4458 gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
4459 types in assignments, conversions and conditionals for expressions.
4460 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
4461 gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
4462 gfc_conv_function_call, gfc_trans_pointer_assignment,
4463 gfc_trans_scalar_assign): Likewise.
4464 * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
4465 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
4466 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
4467 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
4468 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
4469 gfc_conv_allocated, gfc_conv_associated,
4470 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
4471 * trans-io.c (set_string): Likewise.
4472 * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
4473 gfc_do_allocate, generate_loop_for_temp_to_lhs,
4474 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
4475 compute_overall_iter_number, gfc_trans_assign_need_temp,
4476 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
4477 gfc_evaluate_where_mask, gfc_trans_where_assign,
4478 gfc_trans_where_2): Likewise.
4479 * trans-types.c (gfc_get_character_type, gfc_build_array_type,
4480 gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
4482 * trans.c (gfc_add_modify_expr): Add sanity check that types
4483 for the lhs and rhs are the same for scalar assignments.
4485 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4487 * dump-parse-tree.c (show_common): New function.
4488 (gfc_show_namespace): Show commons.
4490 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4491 Andrew Vaught <andyv@firstinter.net>
4495 * decl.c (gfc_match_save): Adapt to new common structures,
4496 don't allow saving USE-associated common.
4497 * dump-parse-tree (gfc_show_attr): (saved_)common are not
4498 symbol attributes any longer.
4499 (gfc_show_symbol): Don't show old-style commons any longer.
4500 (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
4502 * gfortran.h (symbol_attribute): Remove common and saved_common
4504 (gfc_symbol): Remove common_head element.
4505 (gfc_common_head): New struct.
4506 (gfc_get_common_head): New macro.
4507 (gfc_symtree): Add field 'common' to union.
4508 (gfc_namespace): Add field 'common_root'; change type of field
4509 'blank_common' to blank_common.
4510 (gfc_add_data): New prototype.
4511 (gfc_traverse_symtree): Expect a symtree as first argument
4512 instead of namespace.
4513 * match.c (gfc_get_common): New function.
4514 (match_common_name): Change to take char * as argument, adapt,
4515 fix bug with empty name.
4516 (gfc_match_common): Adapt to new data structures. Disallow
4517 redeclaration of USE-associated COMMON-block. Fix bug with
4519 (var_element): Adapt to new common structures.
4520 * match.h (gfc_get_common): Declare.
4521 * module.c: Add 2004 to copyright years, add commons to module
4522 file layout description.
4523 (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
4524 for removed attributes.
4525 (mio_symbol): Adapt to new way of storing common relations.
4526 (load_commons): New function.
4527 (read_module): Skip common list on first pass, load_commons at
4529 (write_commons): New function.
4530 (write_module): Call write_commons().
4531 * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
4532 functions related to removed attributes.
4533 (gfc_add_data): New function.
4534 (gfc_clear_attr): Don't set removed attributes.
4535 (gfc_copy_attr): Don't copy removed attributes.
4536 (traverse_symtree): Remove.
4537 (gfc_traverse_symtree): Don't traverse symbol
4538 tree of the passed namespace, but require a symtree to be passed
4539 instead. Unify with traverse_symtree.
4540 (gfc_traverse_ns): Call gfc_traverse_symtree according to new
4542 (save_symbol): Remove setting of removed attribute.
4543 * trans-common.c (gfc_sym_mangled_common_id): Change to
4544 take 'char *' argument instead of 'gfc_symbol'.
4545 (build_common_decl, new_segment, translate_common): Adapt to new
4546 data structures, add new
4548 (create_common): Adapt to new data structures, add new
4549 argument name. Fix typo in intialization of derived types.
4550 (finish_equivalences): Add second argument in call to
4552 (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
4553 (gfc_trans_common): Adapt to new data structures.
4554 * trans-decl.c (gfc_create_module_variables): Remove test for
4557 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4559 * io.c: Add 2004 to copyright years.
4561 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4562 Andrew Vaught <andyv@firstinter.net>
4564 * gfortran.h (gfc_gsymbol): New typedef.
4565 (gfc_gsym_root): New variable.
4566 (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
4567 * parse.c (global_used): New function.
4568 (parse_block_data): Check for double empty BLOCK DATA,
4569 use global symbol table.
4570 (parse_module): Use global symbol table.
4571 (add_global_procedure, add_global_program): New functions.
4572 (gfc_parse_file): Use global symbol table.
4573 * symbol.c (gfc_gsym_root): New variable.
4574 (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
4577 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4579 * module.c (mio_gmp_real): Correct writing of negative numbers.
4581 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4584 * expr.c (check_intrinsic_op): Allow comparison of characters.
4587 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4588 Andrew Vaught <andyv@firstinter.net>
4590 * decl.c (contained_procedure): New function.
4591 (match_end): Verify correctness of END STATEMENT in
4594 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4595 Andrew Vaught <andyv@firstinter.net>
4598 * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
4599 (decode_statement): Enforce required space in free-form.
4601 2004-06-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4603 * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
4604 * trans-array.c (gfc_conv_descriptor_data): Add operand
4606 (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
4607 (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
4608 (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
4609 * trans-common.c (create_common): Likewise.
4610 * trans-expr.c (gfc_conv_component_ref): Likewise.
4611 * trans-io.c (set_parameter_value): Likewise.
4612 (set_parameter_ref, set_string, set_flag, io_result): Likewise.
4613 (transfer_expr): Likewise.
4614 * trans-decl.c (gfc_trans_auto_character_variable):
4615 Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
4616 (gfc_gimplify_function): New function.
4617 (gfc_generate_function-code): Properly handle nested functions.
4618 * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
4620 2004-06-22 Janne Blomqvist <jblomqvi@cc.hut.fi>
4623 * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
4624 (gfc_resolve_inquire): Resolve the iolength tag. Return
4625 SUCCESS at end of function if no failure has occured.
4626 * resolve.c (resolve_code): Resolve if iolength is encountered.
4627 * trans-io.c: (ioparm_iolength, iocall_iolength,
4628 iocall_iolength_done): New variables.
4629 (last_dt): Add IOLENGTH.
4630 (gfc_build_io_library_fndecls ): Set iolength related variables.
4631 (gfc_trans_iolength): Implement.
4632 (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
4634 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de
4637 * scanner.c (load_line): Don't truncate preprocessor lines.
4638 Reformat error message.
4639 (preprocessor_line): Issue warning in case of malformed
4642 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4644 * resolve.c (resolve_symbol): Add comment in function body.
4645 (check_data_variable): Change type of mark to ar_type, adapt code
4648 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4650 * array.c (gfc_insert_constructor): Avoid redundant call to
4651 mpz_comp. Add 2004 to copyright years.
4653 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
4655 * trans.h (stmtblock_t): Change has_scope to unsigned int.
4657 2004-06-20 Steven G. Kargl <kargls@comcast.net>
4659 * arith.c (gfc_range_check): correct complex underflow.
4661 2004-06-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4664 * match.c (match_case_selector): Call gfc_match_init_expr
4665 instead of gfc_match_expr.
4666 * resolve.c (validate_case_label_expr): No need to check for
4667 constant, since it wouldn't have been matched with the fix to
4670 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4673 * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
4676 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4679 * trans-deecl.c (generate_local_decl): Do not issue warning for
4680 unused variables if they're use associated.
4682 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4683 Andrew Vaught <andyv@firstinter.net>
4686 * gfortran.h (gfc_check_f): Add new field f3ml.
4687 * check.c (gfc_check_minloc_maxloc): Take argument list instead
4688 of individual arguments, reorder if necessary.
4689 * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
4690 * intrinsic.c (add_sym_3ml): New function.
4691 (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
4692 (check_specific): Catch special case MINLOC, MAXLOC.
4694 2004-06-14 Paul Brook <paul@codesourcery.com>
4696 * intrinsic.c (add_sym_2s): Use correct function types.
4698 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4700 * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize. Move data.c
4701 * data.c (gfc_get_section_index): Remove dependency on trans.h.
4703 2004-06-12 Steven G. Kargl <kargls@comcast.net>
4705 * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
4706 gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
4707 * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
4708 GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
4709 * trans-intrinsic.c: Use symbols.
4710 * intrinsic.c (add_sym_2s): New function.
4711 * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
4712 * intrinsic.h: Function prototypes.
4713 * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
4714 gfc_resolve_srand): New functions.
4716 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4719 * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
4720 contained procedure.
4722 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4725 * interface.c (compare_parameter, compare_actual_formal): Don't
4726 check types and array shapes for NULL()
4727 * trans-expr.c (conv_function_call): No double indirection for
4730 2004-06-09 Toon Moene <toon@moene.indiv.nluug.nl>
4732 * trans-expr.c (gfc_conv_cst_int_power): Compute
4733 x**(-n) by converting it to (1/x)**n instead of
4736 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4739 * module.c (write_symbol, write_symtree): Don't write symbols
4740 wrongly added to namespace.
4741 * trans-decl.c (gfc_create_module_variable): Don't create a
4742 backend decl for a symbol incorrectly added to namespace.
4744 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4747 * resolve.c (resolve_symbol): Verify that parameter array has an
4748 explicit shape. Fix typos and coding style issues in surrounding
4751 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4754 * gfortran.texi: The documentation doesn't contain infomration on
4755 how to report bugs, and shouldn't, so remove the line which
4758 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4760 * intrinsic.c (sort_actual): Keep track of type of missing
4761 arguments. (Missing from previous commit.)
4763 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4765 * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
4766 * interface.c (compare_actual_formal): Keep type of omitted
4768 * trans-expr.c (gfc_conv_function_call): Add string length
4769 argument for omitted string argument.
4771 2004-06-03 Paul Brook <paul@codesourcery.com>
4773 * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
4774 lists instead of compound expr chains.
4775 (gfc_trans_code): Annotate statement lists.
4777 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4779 * trans-array.c: Fix spelling in comments.
4781 2004-06-02 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4784 * data.c (assign_substring_data_value): New function.
4785 (gfc_assign_data_value): Call the new function if we're dealing
4786 with a substring LHS.
4788 2004-06-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4791 * gfortran.h (GFC_VERSION): Remove.
4792 * gfortran.texi (version-gfortran): Remove, replace by version-GCC
4795 2004-05-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4797 * trans-types.c: Fix spelling & layout in comments.
4799 2004-05-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4802 * trans-const.c (gfc_conv_string_init): Allow variable string
4803 length lower than initialization string length.
4805 2004-05-30 Paul Brook <paul@codesourcery.com>
4808 * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
4809 * trans-expr.c (gfc_trans_string_copy): New function.
4810 (gfc_conv_statement_function): Use them. Create temp vars. Enforce
4812 (gfc_conv_string_parameter): Use gfc_trans_string_copy.
4813 * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
4814 * trans.h (struct gfc_saved_var): Define.
4815 (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
4817 2004-05-30 Steven G. Kargl <kargls@comcast.net>
4819 * iresolve.c (gfc_resolve_random_number): Clean up conditional.
4821 2004-05-29 Steven G. Kargl <kargls@comcast.net>
4823 * simplify.c (gfc_simplify_log): Remove useless line of code.
4825 2004-05-29 Paul Brook <paul@codesourcery.com>
4827 * trans-common.c (find_equivalence): Find multiple rules.
4829 2004-05-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4831 * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
4832 (gfc_current_locus): Declare new global variable.
4833 * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
4834 (gfc_current_locus1): Rename ...
4835 (gfc_current_locus): ... to this.
4836 (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
4837 skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
4838 gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
4839 gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
4840 and gfc_current_locus(), respectively.
4841 * array.c (match_subscript, gfc_match_array_ref, match_array_list,
4842 match_array_cons_element, gfc_match_array_constructor):
4843 Read/modify gfc_current_locus instead of calling gfc_set_locus()
4844 and gfc_current_locus().
4845 * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
4846 match_attr_spec, gfc_match_function_decl, gfc_match_end,
4847 attr_decl1, gfc_match_save): Likewise.
4848 * error.c (error_print, gfc_internal_error): Likewise.
4849 * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
4850 * interface.c (gfc_add_interface): Likewise.
4851 * io.c (gfc_match_format, match_dt_format, match_dt_element,
4852 match_io_iterator, match_io): Likewise.
4853 * match.c (gfc_match_space, gfc_match_eos,
4854 gfc_match_small_literal_int, gfc_match_st_label,
4855 gfc_match_strings, gfc_match_name, gfc_match_iterator,
4856 gfc_match_char, gfc_match, gfc_match_assignment,
4857 gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
4858 gfc_match_nullify, gfc_match_call, match_implicit_range,
4859 gfc_match_implicit, gfc_match_data, match_case_selector,
4860 gfc_match_case, match_forall_iterator): Likewise.
4861 * matchexp.c (gfc_match_defined_op_name, next_operator,
4862 match_level_1, match_mult_operand, match_ext_mult_operand,
4863 match_add_operand, match_ext_add_operand, match_level_2,
4864 match_level_3, match_level_4, match_and_operand, match_or_operand,
4865 match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
4866 * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
4867 * parse.c (match_word, decode_statement, next_free, next_fixed,
4868 add_statement, verify_st_order, parse_if_block, gfc_parse_file):
4870 * primary.c (match_digits, match_integer_constant,
4871 match_boz_constant, match_real_constant, match_substring,
4872 next_string_char, match_charkind_name, match_string_constant,
4873 match_logical_constant, match_const_complex_part,
4874 match_complex_constant, match_actual_arg, match_keyword_arg,
4875 gfc_match_actual_arglist, gfc_match_structure_constructor,
4876 gfc_match_rvalue, gfc_match_variable): Likewise.
4877 * st.c (gfc_get_code): Likewise.
4878 * symbol.c (check_conflict, check_used, check_done,
4879 duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
4880 gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
4881 gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
4883 2004-05-26 Roger Sayle <roger@eyesopen.com>
4885 * io.c (format_asterisk): Silence compiler warnings by correcting
4886 the number of elements of a "locus" initializer.
4888 2004-05-25 Roger Sayle <roger@eyesopen.com>
4891 * matchexp.c: Allow unary operators after arithmetic operators
4893 (match_ext_mult_operand, match_ext_add_operand): New functions.
4894 (match_mult_operand): Tweak to call match_ext_mult_operand.
4895 (match_add_operand): Tweak to call match_ext_mult_operand.
4896 (match_level_2): Rearrange to call match_ext_add_operand.
4898 2004-05-25 Paul Brook <paul@codesourcery.com>
4900 * expr.c (check_inquiry): Remove bogus tests.
4902 2004-05-23 Paul Brook <paul@codesourcery.com>
4905 * expr.c (restricted_args): Remove redundant checks/argument.
4906 (external_spec_function): Update to match.
4907 (restricted_intrinsic): Rewrite.
4909 2004-05-23 Paul Brook <paul@codesourcery.com>
4910 Victor Leikehman <lei@haifasphere.co.il>
4912 * gfortran.h (struct gfc_symbol): Add equiv_built.
4913 * trans-common.c: Change int to HOST_WIDE_INT. Capitalize error
4915 (current_length): Remove.
4916 (add_segments): New function.
4917 (build_equiv_decl): Create initialized common blocks.
4918 (build_common_decl): Always add decl to bindings.
4919 (create_common): Create initializers.
4920 (find_segment_info): Reformat to match coding conventions.
4921 (new_condition): Use add_segments.
4922 (add_condition, find_equivalence, add_equivalences): Move iteration
4923 inside functions. Only process each segment once.
4924 (new_segment, finish_equivalences, translate_common): Simplify.
4926 2004-05-23 Steven G. Kargl <kargls@comcast.net>
4928 * check.c (gfc_check_random_seed): Issue for too many arguments.
4930 2004-05-22 Steven G. Kargl <kargls@comcast.net>
4932 * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
4934 2004-05-22 Paul Brook <paul@codesourcery.com>
4936 * dump-parse-tree.c (gfc_show_equiv): New function.
4937 (gfc_show_namespace): Use it.
4939 2004-05-22 Victor Leikehman <lei@haifasphere.co.il>
4942 * symbol.c (gfc_add_common): Disable checks to work around other more
4943 fundamental inadequacies.
4945 2004-05-22 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
4947 * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
4949 (gfc_build_function_decl): Likewise.
4951 2004-05-22 Steven G. Kargl <kargls@comcast.net>
4953 * check.c (gfc_check_system_clock): New function.
4954 * intrinsic.c (add_sym_3s): New function.
4955 (add_subroutines): Use it.
4956 * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
4958 * iresolve.c (gfc_resolve_system_clock): New function.
4960 2004-05-22 Steven G. Kargl <kargls@comcast.net>
4962 * invoke.texi: Document -Wunderflow and spell check.
4963 * lang.opt: Add Wunderflow.
4964 * gfortran.h (gfc_option_t): Add warn_underflow option.
4965 * options.c (gfc_init_options, set_Wall): Use it.
4966 * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
4967 * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
4968 gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
4969 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
4970 * arith.c (common_logarithm): Fix typo in comment.
4972 2004-05-21 Roger Sayle <roger@eyesopen.com>
4974 * io.c (check_format): As a GNU extension, allow the comma after a
4975 string literal to be optional in a format. Use gfc_notify_std to
4976 issue an error/warning as appropriate.
4978 2004-05-21 Roger Sayle <roger@eyesopen.com>
4980 * io.c (check_format): Use gfc_notify_std to determine whether to
4981 issue an error/warning for omitting the digits from the X format.
4983 2004-05-20 Roger Sayle <roger@eyesopen.com>
4985 * io.c (check_format): Allow the number before the X format to
4986 be optional when not -pedantic.
4988 2004-05-18 Feng Wang <fengwang@nudt.edu.cn>
4989 Paul Brook <paul@codesourcery.com>
4991 * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
4992 Create decls for __builtin_pow{,f}.
4993 * gfortran.h (PREFIX_LEN): Define.
4994 * trans-decl.c (gfor_fndecl_math_powi): Add.
4995 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
4996 (gfc_build_intrinsic_function_decls): Create decls for powi.
4997 * trans-expr.c (powi_table): Add.
4998 (gfc_conv_integer_power): Remove.
4999 (gfc_conv_powi): New function.
5000 (gfc_conv_cst_int_power): New function.
5001 (gfc_conv_power_op): Use new powi routines.
5002 * trans.h (struct gfc_powdecl_list): Add.
5003 (gfor_fndecl_math_powi): Add.
5004 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
5006 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5008 * trans.c, trans-decl.c: Fix comment typos.
5010 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5012 * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
5014 2004-05-18 Steve Kargl <kargls@comcast.net>
5016 * arith.c (gfc_int2complex): Fix incorrect range checking.
5018 2004-05-18 Paul Brook <paul@codesourcery.com>
5021 * decl.c (add_init_expr_to_sym): Remove incorrect check.
5022 (default_initializer): Move to expr.c.
5023 (variable_decl): Don't assign default initializer to variables.
5024 * expr.c (gfc_default_initializer): Move to here.
5025 * gfortran.h (gfc_default_initializer): Add prototype.
5026 * resolve.c (resolve_symbol): Check for illegal initializers.
5027 Assign default initializer.
5029 2004-05-17 Steve Kargl <kargls@comcast.net>
5031 * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
5033 2004-05-17 Steve Kargl <kargls@comcast.net>
5035 * arith.c (gfc_real2complex): Range checking wrong part of complex
5038 2004-05-16 Paul Brook <paul@codesourcery.com>
5040 * options.c (gfc_handle_module_path_options): Fix buffer overrun.
5042 2004-05-16 Paul Brook <paul@codesourcery.com>
5044 * arith.c (gfc_range_check): Fix logic error.
5046 2004-05-16 Steve Kargl <sgk@troutmask.apl.washington.edu>
5048 * arith.c: Fix comment typos.
5050 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5053 * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
5054 not initialized in a disallowed fashion.
5055 * match.c (gfc_match_common): Likewise.
5056 (var_element): Verify that variable is not in the blank COMMON,
5057 if it is in a common.
5059 2004-05-15 Joseph S. Myers <jsm@polyomino.org.uk>
5061 * Make-lang.in (f95.generated-manpages): Remove.
5062 (f95.srcextra): New.
5063 (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
5064 f95.maintainer-clean): Generate info and dvi files in objdir/doc.
5067 (f95.install-info): Remove.
5068 (install-info): New.
5070 2004-05-15 Victor Leikehman <lei@haifasphere.co.il>
5072 * decl.c (add_init_expr_to_sym): Check for variable size arrays.
5074 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5076 * primary.c (match_boz_constant): Use gfc_notify_std() for
5077 issuing a warning or an error.
5079 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5082 * primary.c (match_structure_constructor): Rename ...
5083 (gfc_match_structure_constructor): ... to this. Make non-static.
5084 (gfc_match_rvalue): Call renamed function.
5085 * match.h (gfc_match_structure_constructor): Declare.
5086 * match.c (gfc_match_data_constant): Handle structure
5089 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5093 * gfortran.h (gfc_linebuf): New typedef.
5095 (gfc_file): Revamped, use new gfc_linebuf.
5096 (locus): Revamped, use new types.
5097 (gfc_current_file): Remove.
5098 (gfc_current_form, gfc_source_file): New global variables.
5099 * match.c (gfc_match_space, gfc_match_strings): Use
5100 gfc_current_form to find source form.
5101 * module.c (gfc_dump_module): Use gfc_source_file when printing
5103 * error.c (show_locus, show_loci) Use new data structures to print
5105 * scanner.c (first_file, first_duplicated_file, gfc_current_file):
5107 (file_head, current_file, gfc_current_form, line_head, line_tail,
5108 gfc_current_locus1, gfc_source_file): New global variables.
5109 (gfc_scanner_init1): Set new global variables.
5110 (gfc_scanner_done1): Free new data structures.
5111 (gfc_current_locus): Return pointer to gfc_current_locus1.
5112 (gfc_set_locus): Set gfc_current_locus1.
5113 (gfc_at_eof): Set new variables.
5114 (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
5115 to new locus structure.
5116 (gfc_check_include): Remove.
5117 (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
5118 (gfc_skip_comments): Use gfc_current_form, find locus with
5120 (gfc_next_char): Use gfc_current_form.
5121 (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
5122 (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
5124 (get_file): New function.
5125 (preprocessor_line, include_line): New functions.
5126 (load_file): Move down, rewrite to match new data structures.
5127 (gfc_new_file): Rewrite to match new data structures.
5128 * parse.c (next_statement): Remove code which is now useless. Use
5129 gfc_source_form and gfc_source_file where appropriate.
5130 * trans-decl.c (gfc_get_label_decl): adapt to new data structures
5131 when determining locus of frontend code.
5132 * trans-io.c (set_error_locus): Same.
5133 * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
5134 * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
5136 (all): Add missing initializers.
5138 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5140 * Make-lang.in (trans-common.o): Remove redundant dependency.
5141 (data.c): Replace object file name ...
5142 (data.o): ... by the correct one.
5144 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5146 * dump-parse-tree.c (gfc_show_array_ref): Print colon only
5147 for ranges when dumping array references.
5149 2004-05-14 Victor Leikehman <lei@haifasphere.co.il>
5151 * decl.c (variable_decl): Always apply default initializer.
5153 2004-05-08 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5156 * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
5157 handle zero correctly.
5159 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5161 * match.c (gfc_match): Eliminate dead code.
5163 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5165 * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
5166 Detect bad continuation line in fixed form sources.
5168 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5171 * iresolve.c (gfc_resolve_nearest): Add new function.
5172 * intrinsic.h: ... declare it here.
5173 * intrinsic.c (add_functions): ... add it as resolving function
5176 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5179 * match.c (gfc_match_do): Allow infinite loops with
5180 label-do-stmt. Do not enforce space after comma.
5182 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5185 * parse.c (parse_interface): Allow empty INTERFACE, remove
5188 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5190 * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
5191 decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
5192 expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
5193 intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
5194 matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
5195 primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
5196 trans-array.c, trans-array.h, trans-common.c, trans-const.c,
5197 trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
5198 trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
5199 trans-types.h, trans.c, trans.h: Update copyright years and
5201 * data.c: Likewise, also removed two whitespace-only lines.
5202 * gfortranspec.c, lang.opt: Update copyright years.
5204 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5207 * trans-decl.c (generate_local_decl): Don't warn for unused
5208 variables which are in common blocks.
5210 2004-05-13 Diego Novillo <dnovillo@redhat.com>
5212 * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
5213 trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
5214 trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
5216 2004-05-13 Victor Leikehman <lei@haifasphere.co.il>
5219 * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
5221 2004-05-13 Joseph S. Myers <jsm@polyomino.org.uk>
5223 * gfortran.texi: Use @table @emph instead of @itemize @emph.
5224 Remove "set DEVELOPMENT".
5225 (Compiling GFORTRAN): Remove.
5227 2004-05-09 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5229 * array.c (match_subscript, match_array_ref): Add comments
5230 explaining argument 'init'.
5231 * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
5232 trans-expr.c, trans.c: Fix some typos in comments.
5233 * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
5234 * primary.c (match_digits, match_integer_constant): Add comment
5235 explaining signflag.
5237 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5240 * primary.c: Include system.h and flags.h, needed for pedantic.
5241 (match_boz_constant): Allow "x" for hexadecimal constants, warn if
5244 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5247 * match.c (match_data_constant): Handle case where
5248 gfc_find_symbol sets sym to NULL
5250 2004-04-28 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5252 * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
5253 dependency on mathbuiltins.def
5255 2004-04-24 Victor Leikehman <lei@il.ibm.com>
5257 * trans-io.c (transfer_expr): Implemented recursive printing
5260 2004-04-24 Andrew Pinski <pinskia@physics.uc.edu>
5262 * gfortranspec.c: Do not include multilib.h.
5264 2004-04-24 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5266 * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
5267 2004 to copyright years.
5268 * trans-expr.c, trans-decl.c: Comment update, we now generate
5269 GENERIC, not SIMPLE. Add 2004 to copyright years.
5271 2004-04-24 Paul Brook <paul@codesourcery.com>
5273 * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
5275 2004-04-24 Feng Wang <fengwang@nudt.edu.cn>
5278 * arith.c (gfc_arith_divide): Fix complex divide.
5280 2004-04-23 Andrew Pinski <pinskia@physics.uc.edu>
5282 * gfortranspec.c: Include the target headers.
5284 2004-04-18 Feng Wang <fengwang@nudt.edu.cn>
5288 * arith.c (arctangent2): New function.
5289 * arith.h (arctangent2): Add function prototype.
5290 * simplify.c (gfc_simplify_atan2): Use it.
5291 (gfc_simplify_log): Use it.
5293 2004-04-12 Diego Novillo <dnovillo@redhat.com>
5295 * fortran/f95-lang.c (gfc_expand_stmt): Remove.
5296 (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
5298 2004-04-11 Bud Davis <bdavis9659@comcast.net>
5301 * trans-io.c (build_dt): Change REC to value.
5303 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
5306 * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
5307 the real value when converting mpf to string.
5309 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
5312 * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
5315 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
5318 * simplify.c (simplify_min_max): Convert the type of the result.
5320 2004-04-11 Paul Brook <paul@codesourcery.com>
5322 * gfortran.texi: Use full target triplet.
5324 2004-04-11 Paul Brook <paul@codesourcery.com>
5326 * Make-lang.in (GFORTRAN_TEXI): Set it.
5327 (fortran/dfortran.dvi): Use it. Add fortran to include paths.
5328 (fortran/gfortran.info): Ditto.
5329 * gfortran.texi: Major update.
5330 * invoke.texi: New file.
5332 2004-04-10 Paul Brook <paul@codesourcery.com>
5334 * trans-array.c (gfc_trans_allocate_temp_array,
5335 gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
5336 * trans-decl.c (gfc_build_dummy_array_decl,
5337 gfc_get_symbol_decl, gfc_build_function_decl,
5338 gfc_create_module_variable): Ditto.
5339 * trans-expr.c (gfc_conv_variable): Ditto.
5340 * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
5341 * trans.h (GFC_DECL_STRING): Remove.
5342 (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
5343 GFC_DECL_ASSIGN): Renumber flags.
5345 2004-04-05 Paul Brook <paul@codesourcery.com>
5349 * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
5351 * gfortran.h (struct gfc_charlen): Add backend_decl.
5352 * trans-array.c (gfc_trans_allocate_temp_array,
5353 gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
5354 (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
5355 Remove old, broken string handling.
5356 (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
5357 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
5358 gfc_trans_deferred_array): Handle character arrays.
5359 * trans-const.c (gfc_conv_const_charlen): New function.
5360 * trans-const.h (gfc_conv_const_charlen): Add prototype.
5361 * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
5363 (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
5364 (gfc_create_string_length): New function.
5365 (gfc_get_symbol_decl): Create lengths for character variables.
5366 (gfc_get_fake_result_decl): Ditto.
5367 (gfc_build_function_decl): Only set length for assumed length
5368 character arguments.
5369 (gfc_trans_dummy_character): New function.
5370 (gfc_trans_auto_character_variable): Rewrite.
5371 (gfc_trans_deferred_vars): Handle more types of character variable.
5372 (gfc_create_module_variable): String lengths have moved.
5373 (gfc_generate_function_code): Initialize deferred var chain earlier.
5374 * trans-expr.c (gfc_conv_init_string_length): Rename ...
5375 (gfc_trans_init_string_length): ... to this.
5376 (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
5377 gfc_conv_function_call): Update to new format for character variables.
5378 (gfc_conv_string_length): Remove.
5379 (gfc_conv_string_parameter): Update assertion.
5380 * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
5381 * trans-io.c (set_string): Use new macro names.
5382 * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
5383 * trans-types.c (gfc_get_character_type): Use existing length expr.
5384 (gfc_is_nodesc_array): Make public.
5385 (gfc_get_dtype_cst): Rename ...
5386 (gfc_get_dtype): ... to this. Handle unknown size arrays.
5387 (gfc_get_nodesc_array_type): Use new name.
5388 (gfc_sym_type): New character variable code.
5389 (gfc_get_derived_type): Ditto.
5390 (gfc_get_function_type): Evaluate character variable lengths.
5391 * trans-types.h (gfc_strlen_kind): Define.
5392 (gfc_is_nodesc_array): Add prototype.
5393 * trans.h: Update prototypes.
5394 (struct lang_type): Update comments.
5395 (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
5396 (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
5398 2004-04-04 Paul Brook <paul@codesourcery.com>
5400 * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
5401 * options.c (gfc_init.options, gfc_handle_option): Ditto.
5402 * trans-expr.c (gfc_conv_function_call): Ditto.
5403 * trans-types.c (gfc_is_nodesc_array): Ditto
5404 * lang.opt (fg77-calls): Remove.
5406 2004-04-04 Paul Brook <paul@codesourcery.com>
5408 * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
5409 (gfc_conv_descriptor_base): Rename ...
5410 (gfc_conv_descriptor_offset): ... to this.
5411 (gfc_trans_allocate_array_storage): Set offset to zero.
5412 (gfc_conv_array_base): Rename ...
5413 (gfc_conv_array_offset): ... to this.
5414 (gfc_conv_array_index_ref): Add offset parameter.
5415 (gfc_conv_array_ref): Include offset.
5416 (gfc_trans_preloop_setup): Use existing offset.
5417 (gfc_trans_allocate_temp_array, gfc_array_allocate,
5418 gfc_trans_auto_array_allocation, gfc_trans_g77_array,
5419 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
5420 gfc_conf_ss_descriptor): Set offset.
5421 * trans-array.h: Rename prototypes.
5422 * trans-const.h (gfc_index_zero_node): Define.
5423 * trans-decl.c (gfc_build_qualified_array): Change base to offset.
5424 * trans-types.c (gfc_get_array_type_bounds): Ditto.
5425 (gfc_get_nodesc_array_type): Calculate offset before upper bound.
5427 2004-03-25 Diego Novillo <dnovillo@redhat.com>
5429 * convert.c (convert): Don't handle WITH_RECORD_EXPR.
5431 2004-03-24 Bud Davis <bdavis9659@comcast.net>
5434 * arith.c (gfc_convert_integer,gfc_convert_real): Removed leading '+'
5435 before conversion by gmp library call.
5437 2004-03-24 Bud Davis <bdavis9659@comcast.net>
5440 * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
5442 2004-02-24 Richard Henderson <rth@redhat.com>
5444 * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
5446 2004-02-19 Loren J. Rittle <ljrittle@acm.org>
5448 * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
5449 (fortran/gfortran.info): ... to here.
5452 2004-02-16 Richard Henderson <rth@redhat.com>
5454 * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
5455 * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
5456 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
5457 (gfc_expand_function): Rename from expand_function_body, make static,
5458 don't do anything except invoke tree_rest_of_compilation.
5459 (gfc_be_parse_file): Invoke cgraph.
5460 (gfc_expand_decl): Remove.
5461 (gfc_init_builtin_functions): Add __builtin_init_trampoline and
5462 __builtin_adjust_trampoline.
5463 * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
5464 (gfc_finalize): New.
5465 (gfc_generate_function_code): Use it. Lower nested functions.
5466 * trans-expr.c (gfc_conv_function_call): Add static chain operand
5468 * trans.c (gfc_build_function_call): Likewise.
5469 * trans.h (expand_function_body): Remove.
5471 2004-02-15 Victor Leikehman <lei@il.ibm.com>
5474 * trans-decl.c (gfc_build_function_decl) For functions
5475 returning CHARACTER pass an extra length argument,
5476 following g77 calling conventions.
5477 * trans-types.c (gfc_get_function_type) Ditto.
5478 * trans-expr.c (gfc_conv_function_call) Ditto.
5480 2004-02-14 Paul Brook <paul@codesourcery.com>
5482 * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
5484 2004-02-12 Paul Brook <paul@nowt.org>
5488 2004-02-08 Steve Kargl <sgk@troutmask.apl.washington.edu>
5490 * gfortran.texi: Fix typos.
5492 2004-02-07 Bud Davis <bdavis9659@comcast.net>
5495 * intrinsic.c (add_conversions) Use logical conversion instead
5497 * trans-types.c (gfc_get_logical_type) implemented logical*1
5500 2004-01-17 Paul Brook <paul@codesourcery.com>
5502 * lang-specs.h: Remove %<fixed-form.
5504 2004-01-15 Toon Moene <toon@moene.indiv.nluug.nl>
5506 * lang-specs.h: Enable preprocessing of source files
5507 ending in .F, .fpp, .FPP, .F90 and .F95.
5509 2004-01-13 Toon Moene <toon@moene.indiv.nluug.nl>
5512 * lang-specs.h: Enable compilation of files ending
5513 in .f, .for and .FOR.
5515 2004-01-11 Paul Brook <paul@codesourcery.com>
5517 * trans-stmt.c (gfc_trans_if_1): New function.
5518 (gfc_trans_if): Use it.
5520 2004-01-11 Erik Schnetter <schnetter@uni-tuebingen.de>
5522 * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
5523 (gfc_option_t): Add max_identifier_length.
5524 * lang.opt: Add fmax-identifier-length.
5525 * match.c (parse_name): Use limit.
5526 * options.c (gfc_init_options): Set max_identifier_length.
5527 (gfc_handle_option): Ditto.
5529 2004-01-11 Feng Wang <fengwang@nudt.edu.cn>
5531 * intrinsic.c (add_functions): Add resolve function to dcmplx.
5532 * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
5533 * iresolve.c (gfc_resolve_dcmplx): New function.
5535 2004-01-10 Paul Brook <paul@codesourcery.com>
5537 * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
5538 * trans-types.c (gfc_sym_type): Handle external dummy procedures.
5539 (gfc_return_by_reference): Correct condition.
5540 (gfc_get_function_type): Ditto.
5542 2004-01-10 Paul Brook <paul@codesourcery.com>
5544 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
5547 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
5549 * iresolve.c: Use correct kind.
5551 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
5554 * trans-decl.c (gfc_create_module_variable): Output array valued
5557 2004-01-10 Paul Brook <paul@codesourcery.com>
5559 * resolve.c (resolve_branch): Get error message right way round.
5561 2004-01-10 Canqun Yang <canqun@nudt.edu.cn>
5563 * trans-array (gfc_conv_loop_setup): Adjust comment to track
5565 (gfc_array_allocate): Don't count size of element twice.
5567 2004-01-04 Paul Brook <paul@codesourcery.com>
5569 * lang.opt (i8, r8, std=*): Remove RejectNegative.
5571 2004-01-04 Paul Brook <paul@codesourcery.com>
5573 * error.c (gfc_notify_std): New function.
5574 * gfortran.h (gfc_notify_std): Declare.
5575 (GFC_STD_*): Define.
5576 (gfc_option_t): Add warn_std and allow_std.
5577 * intrinsic.c (gfc_init_expr_extensions): Fix logic.
5578 (gfc_intrinsic_func_interface): Use gfc_notify_std.
5579 * check.c (check_rest): Use gfc_notify_std.
5580 * match.c (gfc_match_pause): Ditto.
5581 (gfc_match_assign): Ditto.
5582 (gfc_match_goto): Ditto.
5583 * resolve.c (resolve_branch): Ditto.
5584 * lang.opt: Add std=<foo> and w.
5585 * options.c (gfc_init_options): Set allow_std and warn_std.
5586 (gfc_handle_option): Handle OPT_std_* and OPT_w.
5588 2004-01-01 Paul Brook <paul@codesourcery.com>
5590 * array.c (gfc_append_constructor): Take constructor, not expression.
5591 * data.c (struct gfc_expr_stack): Remove.
5592 (expr_stack): Remove.
5593 (find_con_by_offset): Rename from find_expr_in_con.
5594 (find_con_by_component): Rename from find_component_in_con.
5595 (gfc_get_expr_stack): Remove.
5596 (gfc_assign_data_value): Rewrite.
5597 (gfc_expr_push): Remove.
5598 (gfc_expr_pop): Remove.
5599 (gfc_advance_section): Rename from
5600 gfc_modify_index_and_calculate_offset. Handle unbounded sections.
5601 (gfc_get_section_index): Handle unbounded sections.
5602 * gfortran.h: Update prototypes.
5603 * resolve.c (check_data_variable): Array section maight not be the
5606 2004-01-01 Paul Brook <paul@codesourcery.com>
5609 * resolve.c (resolve_symbol): Allow assumed length function results.
5611 2004-01-01 Steve Kargl <sgk@troutmask.apl.washington.edu>
5613 * match.c (gfc_match_pause): Fix spelling.
5615 2004-01-01 Steven Bosscher <stevenb@suse.de>
5618 * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
5619 reference from the expression.
5621 2003-12-26 Feng Wang <fengwang@nudt.edu.cn>
5623 * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
5625 * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
5626 (gfc_exec_op): New EXEC_LABEL_ASSIGN.
5627 (symbol_attribute):New variable attribute: assign.
5628 * io.c (resolve_tag):Integer variable is allowed.
5629 (match_dt_format): Add ASSIGN statement. Set assign flag.
5630 * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
5631 (gfc_match_assign): Add ASSIGN statement. Set assign flag.
5632 (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
5633 * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
5634 (next_statement): Add ST_LABEL_ASSIGNMENT.
5635 (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
5636 * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
5637 (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
5638 * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
5639 * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
5640 assign. Put them into the stuct lang_decl.
5641 * trans-io.c (set_string): Add the assign statement.
5642 * trans-stmt.c (gfc_trans_label_assign): New function.
5643 (gfc_trans_goto): Translate ASSIGNED GOTO statement.
5644 * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
5645 * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
5646 * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
5647 (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
5648 (GFC_DECL_ASSIGN(node)): New macro to access flag.
5650 2003-12-31 Huang Chun <chunhuang73@hotmail.com>
5653 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
5656 2003-12-22 Toon Moene <toon@moene.indiv.nluug.nl>
5658 * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
5659 that arguments to subroutines/functions can't alias themselves, nor global
5662 2003-12-20 Steven Bosscher <stevenb@suse.de>
5664 * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
5665 * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
5667 2003-12-12 Huang Chun <chunhuang73@hotmail.com>
5669 * primary.c (match_substring): Fix substring bug for start point
5670 or end point is NULL.
5671 * trans-expr.c (gfc_conv_substring): Ditto
5672 * trans-types.c (gfc_sym_type): Get correct type of scalar
5673 character variables.
5674 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
5677 2003-12-10 Richard Henderson <rth@redhat.com>
5679 * options.c (gfc_post_options): Don't ever use rtl inlining.
5681 2003-12-05 Canqun Yang <canqun@nudt.edu.cn>
5683 * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
5684 * trans-equivalence.c: Remove.
5685 * trans-decl.c (gfc_get_symbol_decl): Update to match.
5686 (gfc_generate_function_code): Ditto.
5687 * trans-array.c (gfc_conv_array_parameter): Ditto.
5688 * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
5689 (F95_ADDITIONAL_OBJS): Add stor-layout.o
5690 * trans.h (gfc_trans_equivalence): Remove.
5691 * gfortran.h (struct gfc_equiv): Add used field.
5692 (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
5693 equiv_offset fields.
5695 2003-12-05 Richard Henderson <rth@redhat.com>
5697 * trans.c (gfc_build_addr_expr): New.
5698 (gfc_build_indirect_ref, gfc_build_array_ref): New.
5699 * trans.h: Declare them.
5700 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
5701 trans-stmt.c, trans.c (*): Use them.
5703 * f95-lang.c (gfc_post_options): Remove dead prototype.
5704 * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
5705 * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
5708 2003-12-01 Feng Wang <fengwang@nudt.edu.cn>
5710 * io.c (gfc_match_format): Check for missing format label.
5712 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
5715 * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
5716 from interfaces in modules.
5718 2003-11-30 Paul Brook <paul@nowt.org>
5720 * trans-array.c (gfc_trans_g77_array): Make non-static.
5721 (gfc_trans_assumed_size): Remove.
5722 (gfc_trans_dummy_array_bias): Explicitly free temporary.
5723 * trans-array.h (gfc_trans_g77_array): Add prototype.
5724 (gfc_trans_assumed_size): Remove.
5725 * trans-decls.c (gfor_fndecl_push_context): Remove.
5726 (gfor_fndecl_pop_context): Remove.
5727 (gfc_build_function)decls): Don't create them.
5728 (gfc_trans_deferred_vars): Update to match. Remove dead code.
5729 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
5731 2003-11-30 Kejia Zhao <kejia_zh@nudt.edu.cn>
5733 * trans-array.c (gfc_conv_array_parameter): Simplify
5734 array argument passing for array name actual argument.
5735 * trans-expr.c (gfc_conv_function_call): Ditto
5736 * trans-types.c (gfc_is_nodesc_array):Ditto.
5738 2003-11-30 Paul Brook <paul@nowt.org>
5740 * f95-lang.c (gfc_post_options): Move ...
5741 * options.c (gfc_post_options): .. to here. Handle inlining options.
5742 * gfortran.h (gfc_post_options): Add prototype.
5744 2003-11-28 Richard Henderson <rth@redhat.com>
5746 * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
5748 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
5750 * trans.h (has_alternate_specifier): New global variable.
5751 * match.c (gfc_match_call): Handle actual arguments associated with
5752 alternate return indicators.
5753 * trans-expr.c (gfc_conv_function_call): Ditto
5754 * trans-stmt.c (gfc_trans_call): Ditto
5755 (gfc_trans_return): Handle return statement with value.
5756 * trans-decl.c (gfc_generate_function_code): Handle functions with
5758 (gfc_get_fake_result_decl): Ditto
5759 * trans-types.c (gfc_get_function_type): Ditto
5760 * resolve.c (resolve_actual_arglist): Check alternate return indicators.
5761 (resolve_formal_arglist): Check asterisk dummy.
5763 2003-11-27 Paul Brook <paul@nowt.org>
5765 * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
5766 allocation interface.
5767 (gfc_conv_ array_parameter): Ditto.
5768 (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
5769 * trans-array.c: Update prototype.
5770 * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
5771 (gfc_trans_auto_character_variable): Use new memory alloc interface.
5772 * trans-expr.c (gfc_conv_string_tmp): Ditto.
5773 (gfc_conv_function_call): Use gfc_conv_string_tmp.
5774 * trans-stmt.c (gfc_do_allocate): Use new memory alloc interface.
5775 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
5776 * trans.h (gfc_ss_info): Remove unused pdata field.
5777 * trans.c (gfc_create_var_np): Change T to V.
5779 2003-11-26 Richard Henderson <rth@redhat.com>
5781 * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
5782 * trans-intrinsic.c (gfc_intrinsic_map): ... here. Add SCALE,
5783 FRACTION, NEAREST, SET_EXPONENT.
5784 (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
5785 Fix GTY marking. Remove unnecessary const's.
5786 (LIBM_FUNCTION): Rename from I_LIB.
5787 (LIBF_FUNCTION): New.
5788 (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
5789 conventions. Assume the expr signature is correct. Mark const.
5790 (gfc_conv_intrinsic_exponent): Use library functions.
5791 (gfc_conv_intrinsic_set_exponent): Remove.
5792 (gfc_conv_intrinsic_scale): Remove.
5793 (gfc_conv_intrinsic_nearest): Remove.
5794 (gfc_conv_intrinsic_fraction): Remove.
5795 (gfc_conv_intrinsic_function): Update.
5796 * trans-decl.c (gfor_fndecl_math_exponent4): New.
5797 (gfor_fndecl_math_exponent8): New.
5798 (gfc_build_intrinsic_function_decls): Set them.
5799 * trans.h: Declare them.
5801 2003-11-25 Canqun Yang <canqun@nudt.edu.cn>
5803 * trans-common.c (gfc_layout_global_equiv): Locate the error for
5804 underflow COMMON block.
5805 (gfc_trans_one_common): Fix bug for size of COMMON block containing
5806 EQUIVALENCE object. Also fix typo in an error message.
5808 2003-11-25 Diego Novillo <dnovillo@redhat.com>
5810 * Make-lang.in: Add check-gfortran to lang_checks.
5811 (check-f95): Alias for check-gfortran.
5813 2003-11-25 Jason Merrill <jason@redhat.com>
5815 * Make-lang.in (f95.tags): Create TAGS.sub files in each
5816 directory and TAGS files that include them for each front end.
5818 2003-11-24 Paul Brook <paul@nowt.org>
5821 * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
5823 2003-11-24 Paul Brook <paul@nowt.org>
5825 * expr.c (simplify_const_ref): Return SUCCESS for things we don't
5827 * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
5829 2003-11-24 Paul Brook <paul@nowt.org>
5832 * array.c (gfc_array_ref_shape): Handle elemental dimensions.
5833 * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
5835 2003-11-20 Richard Henderson <rth@redhat.com>
5837 * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
5838 (gfc_conv_array_base): Likewise.
5839 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
5840 * trans-expr.c (gfc_conv_string_tmp): Likewise.
5841 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
5842 * trans-stmt.c (gfc_trans_character_select): Likewise.
5844 2003-11-13 Paul Brook <paul@nowt.org>
5846 * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
5848 2003-11-13 Canqun Yang <canqun@nudt.edu.cn>
5850 * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
5851 (resolve_equivalence): New function.
5852 (resolve_equivalence_derived): New function.
5854 2003-11-12 Richard Henderson <rth@redhat.com>
5856 * trans.c (gfc_trans_code): Use annotate_with_locus instead of
5857 annotate_all_with_locus.
5859 2003-11-11 Canqun Yang <canqun@nudt.edu.cn>
5861 * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
5862 * trans-decl.c (gfc_finish_var_decl): Modified.
5864 2003-11-08 Paul Brook <paul@nowt.org>
5867 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
5870 2003-11-06 Paul Brook <paul@nowt.org>
5872 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
5874 2003-11-02 Canqun Yang <canqun@nudt.edu.cn>
5876 * match.c (gfc_match_stopcode): Assign '0' to stop_code.
5878 2003-10-27 Anthony Green <green@redhat.com>
5880 * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
5881 (f95.stagefeedback): Ditto.
5883 2003-10-27 Andrew Pinski <pinskia@physics.uc.edu>
5886 * Make-lang.in (f95.stageprofile): Add.
5887 (f95.stagefeedback): Add.
5889 2003-10-23 Richard Henderson <rth@redhat.com>
5891 * f96-lang.c (gfc_gimplify_expr): Remove.
5892 (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
5893 (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
5895 2003-10-23 Richard Henderson <rth@redhat.com>
5897 * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
5899 2003-10-20 Paul Brook <paul@nowt.org>
5901 * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
5902 * trans-stmt.c (gfc_trans_do_while): Ditto.
5904 2003-10-17 Paul Brook <paul@nowt.org>
5906 * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
5908 2003-10-17 Paul Brook <paul@nowt.org>
5910 * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
5912 2003-10-17 Feng Wang <wf_cs@yahoo.com>
5914 * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
5915 (gfc_resolve_minloc): Ditto.
5916 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
5917 Return the value after subtracting the lower bound.
5919 2003-10-16 Richard Henderson <rth@redhat.com>
5921 * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
5923 2003-10-16 Steven Bosscher <steven@gcc.gnu.org>
5925 * lang.c: Remove -M option for now, it's in the way for C.
5927 2003-10-14 Jason Merrill <jason@redhat.com>
5929 * Make-lang.in (f95.tags): New rule.
5931 2003-10-13 Richard Henderson <rth@redhat.com>
5933 * trans.c (gfc_trans_code): Use annotate_all_with_locus.
5935 2003-10-13 Paul Brook <paul@nowt.org>
5937 * trans-decl.c (generate_local_decl): Don't create junk variables.
5939 2003-10-13 Paul Brook <paul@nowt.org>
5941 * resolve.c (resolve_formal_arglist): Use function result decl in
5942 preference to function decl.
5944 2003-10-12 Richard Henderson <rth@redhat.com>
5946 * f95-lang.c (gfc_define_builtin): New const_p argument. Set
5947 TREE_READONLY. Update all callers.
5949 2003-10-12 Feng Wang <wf_cs@yahoo.com>
5951 * iresolve.c (gfc_resolve_cshift): Change to match implementation.
5952 * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
5953 (gfc_is_intrinsic_libcall): Add CSHIFT.
5955 2003-10-12 Richard Henderson <rth@redhat.com>
5957 * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
5958 (gfc_trans_array_constructor_value): Likewise.
5959 (gfc_conv_array_initializer): Likewise.
5960 * trans-stmt.c (gfc_trans_character_select): Likewise.
5962 2003-11-12 Kejia Zhao <kejia_zh@yahoo.com.cn>
5964 * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
5966 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
5968 * check.c (gfc_check_repeat): Check arguments are scalar.
5969 (gfc_check_trim): New function.
5970 * intrinsic.h (gfc_check_trim): Add prototype.
5971 * intrinsic.c (add_functions): Use it.
5972 * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
5974 * trans-decl.c: Ditto.
5975 (gfc_build_intrinsic_fucntion_decls): Set them.
5976 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
5977 (gfc_conv_intrinsic_trim): New function.
5978 (gfc_conv_intrinsic_repeat): New function.
5979 (gfc_conv_intrinsic_function): Use them.
5981 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
5983 * trans-types.c (gfc_sym_type): Handle result variables.
5985 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
5987 * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
5988 gfc_get_character_type.
5990 2003-10-11 Feng Wang <wf_cs@yahoo.com>
5992 * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
5994 2003-10-11 Paul Brook <paul@nowt.org>
5996 * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
5997 (gfc_resolve_dprod): New function.
5998 (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
5999 * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
6000 (gfc_resolve_dprod): Declare.
6001 * intrinsic.c (add_functions): Use them.
6002 * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
6004 2003-10-06 Richard Henderson <rth@redhat.com>
6006 * f95-lang.c (gfc_init_builtin_functions): Add clzll.
6007 * trans-intrinsic.c (call_builtin_clz): Use it.
6009 2003-10-05 Paul Brook <paul@nowt.org>
6011 * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
6012 * trans-decl.c (gfc_generate_function_code): Set
6013 cfun->function_end_locus.
6015 2003-09-24 Jason Merrill <jason@redhat.com>
6017 * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
6020 2003-09-21 Lifang Zeng <zlf605@hotmail.com>
6021 Paul Brook <paul@nowt.org>
6023 * Make-lang.in (F95_OBJS): Add fortran/data.o.
6024 * array.c (gfc_inser_constructor): New function.
6025 (gfc_get_constructor): New function.
6026 (gfc_free_constructor): Initialize offset and repeat.
6027 (iterator_stack): Remove.
6028 (expand_info): Add offset, component and repeat fields.
6029 (expand_constructor): Set them.
6030 (expand): Set new fields.
6031 (gfc_copy_constructor): Ditto. Avoid recursion.
6032 * gfortran.h: Add prototypes for new functions.
6033 (gfc_constructor): Add offset, component and repeat.
6034 (iteratio_stack): Move to here.
6035 * resolve.c (check_data_variable): Convert data values into variable
6037 (traverse_data_list): Build implicit loop chain.
6038 (gfc_resolve): Ditto.
6039 * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
6040 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
6041 * trans-expr.c (gfc_conv_structure): Handle array initializers.
6042 (gfc_conv_expr): Update to match.
6043 * trans.h (gfc_conv_structure): Declare.
6046 2003-09-20 Kejia Zhao <kejia_zh@yahoo.com.cn>
6048 * trans.h: Add declarations for gfor_fndecl_si_kind and
6049 gfor_fndecl_sr_kind.
6050 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
6051 * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
6052 (g95_conv_intrinsic_sr_kind): New function.
6053 (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
6056 2003-09-17 Lars Segerlund <Lars.Segerlund@comsys.se>
6058 * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
6059 instead of _4 and _8 as postfix for libgfortran calls.
6061 2003-09-16 Paul Brook <paul@nowt.org>
6063 * array.c (compare_bounds): New function.
6064 (gfc_compare_array_spec): Use it.
6066 2003-09-14 Paul Brook <paul@nowt.org>
6068 * primary.c (gfc_match_rvalue): Make sure sym->result is set.
6069 * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
6071 2003-09-14 Paul Brook <paul@nowt.org>
6073 * check.c (dim_rank_check): Allow assumed bounds if requested.
6074 (gfc_check_lbound): Call it.
6075 (gfc_check_ubound): Ditto.
6076 (gfc_check_size): Change to match.
6077 * simplify.c (gfc_simplify_bound): New function.
6078 (gfc_simplify_lbound): New function.
6079 (gfc_simplify_ubound): New function.
6080 * intrinsic.h: Declare them.
6081 * intrinsic.c (add_functions): Use them.
6083 2003-09-14 Paul Brook <paul@nowt.org>
6085 * io.c (format_lex): Initialize negative_flag.
6086 (check_format): Intialize repeat.
6087 * trans-io.c (gfc_new_nml_name_expr): Declare static.
6088 (gfc_new_var_expr): Ditto.
6090 2003-09-14 Paul Brook <paul@nowt.org>
6092 * trans-array.c (gfc_conv_array_initializer): Handle derived types.
6093 * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
6095 2003-09-12 Paul Brook <paul@nowt.org>
6097 * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
6099 2003-09-12 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
6101 * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
6102 for a correct expression.
6104 2003-09-10 Kejia Zhao <kejia_zh@yahoo.com.cn>
6106 * trans-intrinsic.c (real_compnt_info): New struct.
6107 (prepare_arg_info): New function.
6108 (gfc_conv_intrinsic_set_exponent): New function.
6109 (gfc_conv_intrinsic_scale): New function.
6110 (gfc_conv_intrinsic_nearest): New function.
6111 (gfc_conv_intrinsic_fraction): New function.
6112 (gfc_conv_intrinsic_exponent): New function.
6113 (gfc_conv_intrinsic_spacing): New function.
6114 (gfc_conv_intrinsic_rrspacing): New function.
6115 (gfc_conv_intrinsic_function): Use them.
6117 2003-08-24 XiaoQiang Zhang (zhangapache@yahoo.com>
6119 * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
6120 build_int_2 changed from (high, low) to (low, high).
6121 * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
6122 ioparm_namelist_read_mode, iocall_set_nml_val_int,
6123 iocall_set_nml_val_float, iocall_set_nml_val_char,
6124 iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
6125 (gfc_build_io_library_fndecls): Add variable initialization.
6126 (gfc_new_nml_name_expr, get_new_var_expr): New function.
6127 (build_dt): Add namelist support.
6128 * io.c (value): New variable.
6129 (check_format): Support FMT_H now.
6131 2003-09-07 Paul Brook <paul@nowt.org>
6133 * io.c (gfc_resolve_dt): Error if format label is not defined.
6135 2003-09-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
6137 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
6138 about case_switch's break. The other is about building the condition
6139 statement tree, which judges the argument in the range of the
6140 corresponding integer type.
6141 * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
6142 for the large values.
6144 2003-09-05 Paul Brook <paul@nowt.org>
6146 * f95-lang.c (expand_function_body): Gimplify the function.
6148 2003-09-04 Jeff Law <law@redhat.com>
6150 * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
6153 2003-09-04 Paul Brook <paul@nowt.org>
6155 * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
6156 (gfc_expand_stmt): New function.
6157 (LANG_HOOKS_RTL_EXPAND_STMT): Define.
6158 (expand_function_body): Use tree_rest_of_compilation.
6159 * trans-decl.c (gfc_generate_function_code): Don't free cfun.
6161 2003-09-03 Jeff Law <law@redhat.com>
6163 * f95-lang.c (gfc_init_builtin_functions): C arrays start at
6166 2003-08-30 Paul Brook <paul@nowt.org>
6168 * f95-lang.c (builtin_function): Remove #if 0 code.
6169 (gfc_define_builtin): New function.
6170 (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
6171 * mathbuiltins.def: New file.
6172 * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
6173 (gfc_intrinsic_map): Use mathbuiltins.def.
6174 (gfc_intrinsic_builtin_t): Remove.
6175 (gfc_build_intrinsic_lib_fndecls): Update.
6176 * trans-types.c (gfc_init_types): Remove redundant initilaization of
6177 signed_size_type_node.
6179 2003-08-29 Paul Brook <paul@nowt.org>
6181 * arith.c (gfc_real_kinds): Use correct minimum exponents.
6183 2003-08-22 Kejia Zhao <kejia_zh@yahoo.com.cn>
6185 * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
6186 (gfc_conv_intrinsic_function): Add MODULO.
6188 2003-08-22 Jason Merrill <jason@redhat.com>
6190 * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
6192 2003-08-22 Andreas Jaeger <aj@suse.de>
6194 * Make-lang.in (f95.install-common): Add DESTDIR support.
6195 * (f95.install-info): Likewise.
6196 (f95.uninstall): Likewise.
6198 2003-08-19 Diego Novillo <dnovillo@redhat.com>
6200 * trans-types.c (gfc_init_types): Initialize
6201 signed_size_type_node with size_type_node.
6203 2003-08-18 Paul Brook <paul@nowt.org>
6205 * dependency.c (gfc_dependency): New enum.
6206 (check_another_array_ref): Remove.
6207 (gfc_get_array_from_component): Remove.
6209 (get_range): Remove.
6210 (get_no_of_elements): Use mpz_t, not mpf_t.
6211 (transform_sections): New function.
6212 (gfc_check_range_range): Rename ...
6213 (gfc_check_section_vs_section): ... to this. Use new function.
6214 (gfc_is_inside_range): Rewrite to match.
6215 (gfc_check_element_vs_section): Ditto.
6216 (gfc_check_element_vs_element): Ditto.
6218 (gfc_dep_resolver): Ditto. Remove unused parameter.
6219 * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
6220 gfc_check_element_vs_element, gfc_is_inside_range,
6221 gfc_get_array_from_component): Remove prototypes for static functions.
6222 (gfc_dep_resolver): Update prototype.
6223 * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
6225 2003-08-15 Paul Brook <paul@nowt.org>
6227 * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
6228 return values to parent scope.
6229 (gfc_build_dummy_array_decl): Ditto.
6231 2003-08-14 Paul Brook <paul@nowt.org>
6233 * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
6234 size of the type, not the pointer.
6235 * resolve.c (resolve_symbol): Give more accurate error message.
6237 2003-08-10 Paul Brook <paul@nowt.org>
6239 * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
6241 2003-08-10 Paul Brook <paul@nowt.org>
6243 * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
6246 2003-08-10 Chun Huang <compiler@sohu.com>
6248 * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
6249 (resolve_symbol): Ditto.
6250 * trans-expr.c (gfc_conv_statement_function): New function.
6251 (gfc_conv_function_expr): Use it.
6253 2003-08-10 Paul Brook <paul@nowt.org>
6255 * trans-array.c (gfc_conv_ss_startstride): Handle functions.
6256 (walk_function_expr): Set section rank.
6257 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
6259 2003-08-10 Paul Brook <paul@nowt.org>
6261 * intrinsic.c (add_sym): Prefix names with correct string.
6262 (add_sym_0s): New function.
6263 (add_subroutines): Register abort.
6265 2003-08-10 Erik Schnetter <schnetter@uni-tuebingen.de>
6267 * gfortran.h: Introduce options to control the mangling.
6268 * lang.opt: Likewise.
6269 * options.c (gfc_init_options): Handle the options.
6270 * trans-common.c (gfc_sym_mangled_common_id): New function.
6271 (gfc_build_common_decl): Call it.
6272 * trans-decl.c (gfc_sym_mangled_function_id): New function.
6273 (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
6275 2003-08-09 Paul Brook <paul@nowt.org>
6277 * module.c (mio_symbol): Always ouput a namespace for formal args.
6278 (load_needed): Namespace now belong to their proper symbol.
6279 (gfc_dump_module): Change G95=>GFORTRAN.
6281 2003-08-05 Paul Brook <paul@nowt.org>
6283 * options.c: Force -fg77-calls.
6285 2003-08-02 Paul Brook <paul@nowt.org>
6287 * Makelang.in: Rename G95_* to GFORTRAN_*.
6288 * All sources: Rename G95_* to GFC_*.
6290 2003-08-01 Paul Brook <paul@nowt.org>
6292 * fortran/Make-lang.in: Use GMPLIBS.
6293 * fortran/config-lang.in: Set need_gmp.
6294 * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
6296 2003-07-27 Andreas Jaeger <aj@suse.de>
6298 * trans-decl.c (gfc_generate_constructors): Convert prototype to
6300 * trans-const.c (gfc_init_constants): Likewise.
6301 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
6303 * gfortranspec.c: Convert to ISO C90.
6304 (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
6306 2003-07-26 Paul Brook <paul@nowt.org>
6308 * lang.opt: Add -fdump-parse-tree.
6309 * options.c (gfc_handle_option): Ditto.
6310 * resolve.c (resolve_forall_iterators): Convert to proper type.
6311 * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
6313 2003-07-26 Paul Brook <paul@nowt.org>
6315 * Makefile.in: Add build dependencies on files common with rest of gcc.
6317 2003-07-26 Lifang Zeng <zlf605@hotmail.com>
6319 * trans.h: Declare g95_trans_pointer_assignment.
6320 * trans-expr.c (g95_trans_pointer_assignment): New function.
6321 (g95_trans_pointer_assign): Use it.
6322 * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
6323 (g95_trans_pointer_assign_need_temp): New function.
6325 2003-07-26 Paul Brook <paul@nowt.org>
6327 * gfortran.texi: Replace references to g95.
6329 2003-07-26 Paul Brook <paul@nowt.org>
6331 Rename g95_* to gfc_*.
6333 2003-07-25 Paul Brook <paul@nowt.org>
6335 * gfortran.h: Rename from g95.h.
6336 * trans-types.c (boolean_type_node, booelan_true_node,
6337 boolean_false_node): Remove.
6338 * trans-types.h: Ditto.
6340 2003-07-25 Chun Huang <compiler@sohu.com>
6342 * parse.c (accept_statement): Implement BLOCK DATA statement.
6343 * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
6346 2003-07-24 Lifang Zeng <zlf605@hotmail.com>
6348 * trans-stmt.c (temporary_list): Define.
6349 (g95_trans_assign_need_temp): New function.
6350 (g95_trans_forall_1): Modified for WHERE.
6351 (g95_trans_where_assign): Modified.
6352 (g95_trans_where_2): Modified.
6353 (g95_evaluate_where_mask): Modified.
6354 (g95_trans_where): Modified.
6355 (g95_get_temp_expr): Removed.
6356 (g95_add_to_where_stmt_list): Removed.
6357 (compute_overall_iter_number): Modified for WHERE.
6358 * trans.h: Remove where_stmt_list.
6360 2003-07-24 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6362 * lang.opt: Correct description of options -J and -M.
6364 2003-07-23 Steven Bosscher <steven@gcc.gnu.org>
6366 * lang.opt: Move help text to here.
6367 * lang-options.h: Remove.
6369 2003-07-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6370 * iresolve.c (g95_resolve_transpose): Proper variable in switch.
6371 * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
6374 2003-07-22 Steven Bosscher <steven@gcc.gnu.org>
6375 Paul Brook <paul@nowt.org>
6377 * check.c (check_rest): Use global pedantic flag.
6378 * io.c (data_desc): Ditto.
6379 * error.c (g95_warning, g95_warning_now): Use global flag.
6380 * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
6381 (expand_function_body): Update to new prototypes.
6382 (g95_init): Use new option names.
6383 * g95.h (g95_option_t): Standardize names.
6384 (g95_init_options, g95_handle_option): Update prototypes.
6385 * interface.c: Use new option names.
6392 * simplify.c: Ditto.
6394 * trans-array.c: Ditto.
6395 * trans-expr.c: Ditto.
6396 * trans-types.c: Ditto.
6397 * trans-decl.c: Ditto.
6398 (g95_build_library_function_decl): Remove obsolete VPARAMS.
6400 * options.c (g95_display_help): Remove.
6401 (g95_init_options): Convert to new scheme.
6403 (g95module_option): Ditto, rename from g95_parse_arg.
6404 (g95_handle_module_path_options): New function.
6405 * trans-equivalence.c: Fix error message.
6406 * lang.opt: Corrections.
6408 2003-07-21 Steven Bosscher <steven@gcc.gnu.org>
6410 * lang.opt: New file.
6412 2003-07-21 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6414 * decl.c (match_attr_spec): Set colon_seen.
6416 2003-07-14 Paul Brook <paul@nowt.org>
6418 * trans-array.c: Update comment.
6419 (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
6420 * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
6421 minmaxloc,minmaxval): Ditto.
6422 * trans-io.c (g95_trans_transfer): Ditto.
6423 * trans-stmt.c: Remove unneeded prototypes.
6424 (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
6425 (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
6426 (compute_inner_temp_size): Remove bits of dead code. Add comments.
6427 Don't share loopinfo.
6428 (compute_overall_iter_number): Declare as static.
6429 (allocate_temp_for_forall_nest): Ditto.
6430 (g95_trans_forall_1): Don't pass shared loopinfo.
6431 * trans.c (g95_start_block): Expand comment.
6433 2003-07-12 Paul Brook <paul@nowt.org>
6435 * arith.c (g95_index_integer_kind): Remove unused initializer.
6436 * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
6437 index by size of element.
6438 (generate_loop_for_rhs_to_temp): Ditto.
6439 (allocate_temp_for_forall_nest): Use element size, not index size.
6441 2003-07-11 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6443 * arith.c (g95_index_integer_kind): Add a TODO.
6444 * simplify.c (g95_simplify_nearest): Add a TODO.
6446 2003-07-09 Chun Huang <compiler@sohu.com>
6448 * trans.h: Add declarations for gfor_fndecl_string_scan and
6449 gfor_fndecl_string_verify.
6450 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
6451 * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
6452 (g95_conv_intrinsic_verify): New function.
6453 (g95_conv_intrinsic_function): Add SCAN and VERIFY.
6454 * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
6455 of parameter 'BACK=.TRUE.'
6457 2003-07-05 Lifang Zeng <zlf605@hotmail.com>
6459 * trans-stmt.c (iter_info, forall_info): Define.
6460 (g95_trans_forall_block): Remove.
6461 (g95_trans_forall_loop): Use forall info blocks.
6462 (g95_trans_nested_forall_loop): New function.
6463 (g95_do_allocate): Handle things other than logical masks.
6464 (generate_loop_for_temp_to_lhs): New function.
6465 (generate_loop_for_rsh_to_temp): New function.
6466 (compute_inner_temp_size): New function.
6467 (compute_overall_iter_number): New function.
6468 (allocate_temp_for_forall_nest): New function.
6469 (g95_trans_forall): Move body ...
6470 (g95_trans_forall_1): ... to here. Handle loops with temporaries.
6472 2003-07-02 Paul Brook <paul@nowt.org>
6474 * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
6475 in correct scope. Change callers to match.
6476 * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
6477 * iresolve.c (g95_resolve_reshape): Only use constant shapes.
6479 2003-07-02 Paul Brook <paul@nowt.org>
6481 * trans-array.c (g95_conv_loop_setup): Remove dead var. Use
6482 expression shape for all expressions.
6483 * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
6485 2003-07-03 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6487 * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
6488 g95_parse_arg), intrinsic.c (g95_convert_type): support of
6490 * intrinsic.c, g95.h: Add g95_convert_type_warn,
6491 * resolve.c (g95_resolve_index): Call it.
6493 2003-07-02 Paul Brook <paul@nowt.org>
6495 * iresolve.c (g95_resolve_reshape): Set expression shape.
6496 (g95_resolve_shape): Ditto.
6497 * simplify.c (g95_simplify_shape): Move common code outside condition.
6498 * trans-array.c (g95_conv_array_initializer): Teach it how to count.
6500 2003-07-01 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6502 * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
6505 2003-06-29 Paul Brook <paul@nowt.org>
6507 * array.c (g95_simplify_iterator_var): Don't bother with return value.
6508 * expr.c (find_array_element, find_component_ref): New functions.
6509 (remove_subobject_ref): New function.
6510 (simplify_const_ref): Use them. Rename from simplify_component_ref.
6511 (simplify_ref_chain): New function.
6512 (g95_simplify_expr): Use it. Simplify parameter variable subobjects.
6513 (g95_specification_expr): Simplify the expression.
6514 * resolve.c (resolve_operator): Check simplifications return code.
6515 (g95_resolve_expr): Ditto.
6517 2003-06-26 Paul Brook <paul@nowt.org>
6519 * expr.c (simplify_component_ref): New function.
6520 (g95_simplify_expr): Use it.
6521 * resolve.c (resolve_structure_cons): Handle references.
6523 2003-06-25 Paul Brook <paul@nowt.org>
6525 * trans-io.c (build_dt): Handle internal units.
6527 2003-06-25 Canqun Yang <canqun@yahoo.com.cn>
6529 * trans-common.c (g95_build_common_decl): Array index range starts at 0.
6530 (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
6531 Use g95_array_index_type instead of integer_type_node.
6532 (g95_build_common_decl, g95_set_common_master_type): Use
6533 g95_character1_type_node instead of char_type_node.
6534 * trans-equivalence.c (g95_layout_local_equiv): As above.
6536 2003-06-24 Steven G. Kargl <kargls@attbi.com>
6538 * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
6539 remove last remains of -fquiet.
6541 2003-06-22 Paul Brook <paul@nowt.org>
6543 * resolve.c (resolve_operator): Don't fail if we can't simplify.
6544 (g95_resolve_expr): Ditto.
6545 (resolce_code): Mark as static.
6546 * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
6547 gimplifer doesn't (yet).
6549 2003-06-20 Paul Brook <paul@nowt.org>
6551 * g95.h: Add ST_PAUSE and EXEC_PAUSE.
6552 * match.c (g95_match_if): Add ST_PAUSE.
6553 (g95_match_stopcode): New function.
6554 (g95_match_pause, g95_match_stop): Use it.
6555 * parse.c (g95_ascii_statement): Handle ST_PAUSE.
6556 (decode_stmt, next_statement, parse_executable): Ditto.
6557 * resolve.c (resolve_code): Ditto.
6558 * st.c (g95_free_statement): Ditto.
6559 * trans-stmt.c (g95_trans_pause): New function.
6560 * trans-stmt.h: Declare it.
6561 * trans.c (g95_trans_code): Use it.
6562 * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
6564 (g95_build_builtin_function_decls): Initialize them.
6566 * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
6568 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6570 * io.c (g95_match_open , g95_match_close, g95_match_inquire,
6571 match_filepos): Fix error handling.
6573 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6575 * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
6576 Add assertions on arguments.
6577 * resolve.c (expression_shape): Remove useless &.
6578 * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
6579 g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
6580 g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
6581 g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
6582 g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
6583 g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
6584 (g95_simplify_not, g95_simplify_scale): Add assertions.
6586 2003-06-15 Paul Brook <paul@nowt.org>
6588 Clean up stuff to work with the ssa optimizers.
6589 * convert.c (convert): Handle BOOLEAN_TYPEs.
6590 * f95-lang.c (g95_truthvalue_conversion): Implement.
6591 * trans-array.c (g95_trans_array_constructor_value): Group multiple
6593 * trans.h (g95_truthvalue_conversion): Declare.
6594 * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
6595 * trans-stmt.c (g95_trans_character_select): Don't create array
6596 assignments. Mark labels as indirect jump targets.
6597 * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
6598 (g95_get_dtype_cst): Handle LOGICAL types.
6600 2003-06-14 Paul Brook <paul@nowt.org>
6602 * f95-lang.c (g95_gimplify_expr): New function.
6603 * trans-array.c (g95_trans_array_constructor_value): Don't create
6605 (g95_conv_expr_descriptor): Rename simple->gimple.
6606 * trans-expr.c (conv_expr_op): Use proper logical operators.
6607 * trans-intrinsic.c (build_fixbound_expr): New function.
6608 (build_fix_expr): Ditto.
6609 (g95_conv_intinsic_aint): Use them. Use builtin functions.
6610 (g95_conv_intrinsic_function): Add FLOOR and CEILING.
6612 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6614 * array.c (g95_compare_array_spec): Remove unreachable code.
6615 * expr.c (g95_copy_expr): Likewise.
6616 * intrinsic.c (g95_convert_type): Likewise.
6617 * misc.c (g95_code2string): Likewise.
6618 * simplify.c (g95_simplify_ishft, g95_simplify_real,
6619 g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
6620 * trans-stmt.c (g95_trans_select): Likewise.
6621 * primary.c (extend_ref): Add an assertion.
6622 * simplify.c (g95_convert_constant): Add const.
6623 * intrinsic.h: Remove g95_check_x_ni.
6624 * f95-lang.c (g95_finish): Call g95_release_include_path.
6626 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6628 * resolve.c (resolve_contained_functions): Fix typo introduced on
6631 2003-06-09 Paul Brook <paul@nowt.org>
6633 * g95.h: Include system.h not hwint.h.
6634 * many: use safe-ctype.h not ctype.h. Change isalpha -> ISALPHA, etc.
6635 * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
6637 2003-06-09 Paul Brook <paul@nowt.org>
6639 * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
6640 * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
6641 * trans-decl.c (g95_add_decl_to_functions): Make non-static.
6642 (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
6643 (g95_generate_function_code): Translate COMMON and EQUIVALENCE
6645 * trans.h (g95_trans_equivalence, g95_trans_common,
6646 g95_add_decl_to_function): Declare.
6647 * trans-common.c, trans-equivalence.c: New files.
6649 2003-06-08 Steven Bosscher <steven@gcc.gnu.org>
6651 * intrinsic.c (g95_intrinsic_extension): Remove.
6652 (add_functions): Substitute g95_check_x for g95_check_x_ni
6654 (g95_init_expr_extensions): New function.
6655 (g95_intrinsic_func_interface): Use it.
6656 * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
6657 * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
6658 g95_check_precision, g95_check_present, g95_check_radix,
6659 g95_check_range, g95_check_selected_real_kind): Do not set
6660 g95_intrinsic_extension.
6661 (g95_check_x_ni): Remove now duplicate of g95_check_x.
6663 * expr.c (check_inquiry): Add FIXME, fixup some code style.
6665 2003-06-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6667 * g95.h (ref_type): Name this type explicitly.
6668 * module.c (MIO_NAME): Add specialisations of mio_name.
6669 (mio_symbol_attribute, mio_typespec, mio_array_ref,
6670 mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
6671 (ab_attribute): Name this type explicitly.
6672 (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
6674 2003-06-05 Kejia Zhao <kejia_zh@yahoo.com.cn>
6676 * trans-intrinsic.c (g95_conv_allocated): New function.
6677 (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
6679 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
6681 * f95-lang.c: Don't include g95-support.h
6682 (g95_mark_addressable): Add prototype.
6683 (g95_init_decl_processing): Remove C front end hack.
6684 * f95-tree.c: Remove file.
6685 * support.c: Remove file.
6686 * g95-support.h: Remove file.
6687 * trans-types.c (g95_init_types): Set up boolean
6688 type related tree nodes.
6689 * Make-lang.in: Remove rules for dead files and
6690 dependencies on them.
6692 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
6694 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
6695 C front end dependency. Also, convert.c does not depend on
6696 g95-support.h anymore.
6697 * convert.c: Don't include c-common.h and g95-support.h
6698 * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
6699 (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
6700 stmts_are_full_exprs_p, current_stmt_tree,
6701 current_scope_stmt_stack): Remove.
6702 * g95-support.h (unsigned_conversion_warning): Kill proto.
6703 (boolean_type_node, boolean_true_node, boolean_false_node):
6704 Don't define here. Instead, make then true tree nodes in
6706 * support.c (c_global_trees): Die, C front end, die!!!
6707 (g95_init_c_decl_hacks): Don't touch intmax_type_node,
6708 uintmax_type_node, string_type_node and const_string_type_node.
6709 (decl_constant_value, overflow_warning): Make static functions.
6710 They are in death row too, though.
6711 (default_conversion, c_expand_asm_operands): Remove.
6712 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
6713 trans.c: Don't include c-common.h.
6714 * trans-types.c (boolean_type_node, boolean_true_node,
6715 boolean_false_node): Make them real tree nodes.
6716 * trans-types.h (intmax_type_node, string_type_node,
6717 const_string_type_node): Hack to work around C dependencies
6718 in builtin-types.def.
6720 2003-06-04 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6722 * decl.c (decl_types): Add some iterators-like sentinels.
6723 * decl.c (match_attr_spec): Use them.
6724 Use "decl_types" instead of "int".
6725 Add cast in call to g95_match_strings.
6726 * dump-parse-tree.c (g95_show_namespace): Use "g95_intrinsic_op"
6728 * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
6729 (g95_interface_info): Use "g95_intrinsic_op".
6730 * dump-parse-tree.c (g95_show_namespace): Use them.
6731 * interface.c (g95_check_interfaces): Use them.
6732 * module.c (read_module, write_module): Use them.
6733 * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
6734 Use "g95_intrinsic_op".
6735 * interface.c (check_operator_interface): Use "g95_intrinsic_op".
6736 Add a default case in switch statement.
6737 * intrinsic.h (g95_generic_isym_id): Moved to...
6738 * g95.h (g95_generic_isym_id): here.
6739 (g95_intrinsic_sym): Use "g95_generic_isym_id".
6740 * intrinsic.c (make_generic): Use "g95_generice_isym_id".
6741 * trans-intrinsic.c (g95_intrinsic_map_t,
6742 g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
6743 * match.c (g95_match_intrinsic_op): Add cast in call to
6746 2003-06-03 Steven Bosscher <steven@gcc.gnu.org>
6748 * support.c (skip_evaluation, warn_conversion, lvalue_p,
6749 lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
6750 constant_fits_type_p, convert_and_check,
6751 unsigned_conversion_warning): Remove these ugly remnants
6752 we inherited from the C front end.
6753 (function_types_compatible): Remove '#if 0'-edcode.
6754 (build_modify_expr): Likewise.
6755 (convert_for_assignment): Don't use the deceased functions.
6756 The parameter fundecl is now unused.
6757 (decl_constant_value): Always just return decl. In fact
6758 this function is not used at present, but it might be in
6759 the future, when we start using the tree inliner.
6760 (overflow_warning, default_conversion, c_expand_asm_operands):
6761 Abort when these are called, they are part of the C type
6762 checking implementation and therefore poison to Fortran.
6764 2003-06-04 Steven Bosscher <steven@gcc.gnu.org>
6766 * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
6767 c-pretty-print.o and c-dump.o. Add a comment on why we
6768 depend on c-semantics.c.
6769 * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
6770 Don't use the C front end tree dumper hook to dump the
6771 language specific tree representation -- we don't have
6772 one. So instead, inherit the default langhook.
6774 2003-06-02 Paul Brook <paul@nowt.org>
6776 * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
6778 2003-06-02 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6780 * check.c (g95_check_associated): Use proper types. Remove
6781 extraneous argument in call to g95_error().
6783 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
6785 * resolve.c (resolve_operator): Make logical operands convert to the
6786 type with higher kind.
6788 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
6790 * check.c (g95_check_associated): Make sure both pointer and target has
6791 the same type and rank. Null pointer or array section with vector
6792 subscript as target are not allowed.
6793 * trans.h: Declare gfor_fndecl_associated.
6794 * trans-decl.c: (g95_build_builtin_function_decls): Initialize
6795 gfor_fndecl_associated.
6796 * trans-intrinsic.c (g95_conv_associated): New function.
6797 (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
6799 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
6801 * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
6802 according to POINTER itself rather than TARGET.
6803 (g95_conv_expr_descriptor): Make lbound start at 1.
6804 * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
6806 2003-06-01 Paul Brook <paul@nowt.org>
6808 * expr.c (g95_type_convert_binary): Make it match the standard.
6809 * g95.texi: Remove dead link.
6811 2003-06-01 Steven Bosscher <steven@gcc.gnu.org>
6813 * g95.texi: Cleanup somewhat in preparation for inclusion
6816 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6817 Canqun Yang <canqun@yahoo.com.cn>
6819 * resolve.c (compare_bound_int, resolve_where_shape): Proper return
6821 (g95_find_forall_index): Return proper value.
6822 (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
6823 compare the return value from g95_find_forall_index.
6825 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6826 * g95.h, io.c (g95_st_label): Remove "length".
6827 (g95_symtree): Remove "link".
6828 (g95_case): Remove "code".
6829 * arith.c, arith.h (g95_compare_string, g95_convert_integer,
6830 g95_convert_real): Make an argument pointer to const.
6831 * decl.c (colon_seen): Add a TODO.
6832 * interface.c (g95_compare_types): Fix typo.
6833 * interface.c (compare_interfaces): Preserve value of "p".
6834 * intrinsic.c (sort_actual): Remove "i".
6835 * match.c (g95_match_assign): Proper type in call to g95_match().
6836 * parse.c (next_free): Avoid duplicate call due to macro.
6837 * parse.c (check_statement_label): wrong type in call to g95_error.
6838 * primary.c (match_real_constant): Add a TODO.
6839 * resolve.c (resolve_select): Remove useless conditional.
6840 * simplify.c (g95_simplify_repeat): Proper assignment to
6841 "value.character.string".
6842 * simplify.c (g95_simplify_reshape): Wrong variable in call to
6845 2003-05-20 Canqun Yang <canqun@yahoo.com.cn>
6847 * trans-stmt.c: Remove unnecessary include file defaults.h.
6849 2003-05-19 Lifang Zeng <zlf605@hotmail.com>
6851 * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
6853 (g95_trans_forall): Allow arbitrary number of FORALL indexes and
6854 actual variables used as FORALL indexes.
6856 2003-05-15 Paul Brook <paul@nowt.org>
6858 * trans-array.c (g95_trans_static_array_pointer): Use
6860 (g95_trans_deferred_array): Initialize static array pointers.
6861 * trans-expr.c (g95_conv_function_call): Use formal arglist to
6862 correctly pass POINTER and absent CHARACTER arguments.
6864 2003-05-14 Lifang Zeng <zlf605@hotmail.com>
6866 * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
6867 (g95_resolve_forall_body): Resolve FORALL body.
6868 (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
6869 (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
6870 (g95_find_forall_index): Check whether the FORALL index appears in
6871 the expression or not.
6872 (resolve_code): Modified.
6874 2003-05-14 Paul Brook <paul@nowt.org>
6876 * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
6878 2003-05-13 Paul Brook <paul@nowt.org>
6880 * trans-types.c (g95_max_array_element_size): Now a tree node.
6881 (g95_init_types): Work out max size properly.
6882 (g95_get_dtype_cst): Modify to match.
6884 2003-05-11 Paul Brook <paul@nowt.org>
6886 * trans-io.c (add_case): Create a label decl for case labels.
6888 2003-05-11 Paul Brook <paul@nowt.org>
6890 * arith.c (g95_integer_index_kind): New variable.
6891 * f95-lang.c (g95_init): Move frontend initialization here ...
6892 (g95_post_options): ... from here.
6893 * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
6894 * intrinsic.c (add_functions): Use index kinds.
6895 * iresolve.c: Convert to index_kind where needed.
6896 * resolve.c (g95_resolve_index): Make public, use index_kind.
6897 (resolve_array_ref): Adjust to match.
6898 * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
6899 * trans-stmt.c: Ditto.
6900 * trans-types.c: Ditto.
6901 * trans-types.h (g95_array_index_kind): Remove declaration.
6902 * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
6904 2003-05-07 Paul Brook <paul@nowt.org>
6906 * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
6907 * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
6910 2003-05-07 Paul Brook <paul@nowt.org>
6912 * trans-array.c (trans_static_array_pointer,
6913 g95_trans_array_constructor_value, g95_conv_array_initializer,
6914 g95_conv_structure): CONSTRUCTOR nodes only have one operand.
6915 (g95_add_loop_ss_code): Convert subscripts to the correct type.
6916 * trans-stmt.c (g95_trans_character_select): Ditto.
6917 * trans-types.c (g95_init_types): Ditto.
6919 2003-05-07 Steven Bosscher <steven@gcc.gnu.org>
6921 * f95-lang.c (expand_function_body): Use input_line, not lineno.
6922 * trans-decl.c (g95_generate_function_code,
6923 g95_generate_constructors): Likewise.
6924 * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
6925 g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
6928 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
6929 * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
6930 with components point to the DERIVED type itself, and two DERIVED
6931 type with components point to each other.
6932 * trans-expr.c (g95_conv_componet_ref): Modified
6934 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
6935 * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
6937 (g95_trans_pointer_assign): Implement Nullify.
6939 2003-05-01 Paul Brook <paul@nowt.org>
6941 * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
6942 * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
6944 2003-05-01 Paul Brook <paul@nowr.org>
6946 * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
6947 trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
6950 2003-05-01 Canqun Yang <canqun@yahoo.com.cn>
6952 * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
6955 2003-04-28 Paul Brook <paul@nowt.org>
6957 * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
6958 as their kind suggests.
6959 (g95_resolve_reshape): Ditto.
6961 2003-04-28 Chun Huang <compiler@sohu.com>
6963 * trans-expr.c (g95_conv_substring_expr): New function.
6964 (g95_conv_expr): Use it.
6966 2003-04-28 Paul Brook <paul@nowt.org>
6968 * iresolve.c (g95_resolve_transpose): Make it match the
6970 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
6972 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
6974 * trans-types.c (g95_add_field_to_struct): New function to
6975 add a field to a UNION_TYPE or RECORD_TYPE.
6976 * trans-types.h (g95_add_field_to_struct): Prototype.
6977 (g95_get_derived_type): Use g95_add_field_to_struct to add
6979 * trans-io.c (g95_add_field): Remove.
6980 (ADD_FIELD): Use new g95_add_field_to_struct function.
6981 (ADD_STRING): Likewise.
6982 * trans-stmt.c (g95_trans_select): Likewise.
6983 (g95_add_field): Remove duplicated function.
6985 2003-04-18 Canqun Yang <canqun@yahoo.com.cn>
6987 Port implementation for CHARACTER SELECT from Andy's tree.
6988 * trans-stmt.c (g95_trans_character_select): Implement character
6989 select. (g95_add_field): New function.
6990 * trans-decl.c: Declare 'gfor_gndecl_select_string'.
6991 (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
6992 * g95.h (struct g95_case): Add field 'int n'.
6993 * trans.h: Declare 'gfor_fndecl_select_string'.
6995 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
6997 * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
6998 (g95_insert_bbd): Die on duplicates.
6999 * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
7001 2003-04-14 Steven Bosscher <steven@gcc.gnu.org>
7003 * g95.texi: Require GMP 4.0 -- like we actually
7004 do. Explain the testsuite and what-goes-where.
7005 Don't use undefined texinfo symbol. Break very
7006 long line. Remove finished item from the list
7009 2003-04-11 Canqun Yang <canqun@yahoo.com.cn>
7011 * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
7014 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
7016 * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
7017 (g95_trans_forall_body): New function.
7019 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
7021 * resolve.c (resove_where): New function.
7022 (resolve_where_shape): New function.
7023 (resolve_code): Add call to 'resolve_where'
7024 * trans-stmt.c (g95_trans_where): Modified.
7025 (g95_trans_where_2): New function.
7026 (g95_trans_where_assign): New function.
7027 (g95_evaluate_where_mask): New function.
7028 (g95_add_to_stmt_list): New function.
7029 (g95_get_temp_expr): New function.
7030 * trans.h (where_stmt_list): New structure.
7032 2003-04-10 Paul Brook <paul@nowt.org>
7034 * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
7035 (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
7037 2003-04-10 Steven Bosscher <steven@gcc.gnu.org>
7039 Update after mainline -> tree-ssa-branch merge.
7040 * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
7042 (g95_init): Update for new lang_hooks definition.
7043 (g95_post_options): New langhook.
7044 (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
7045 * scanner.c (g95_new_file): Comment update.
7047 2003-04-09 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7049 * g95.h, lang-options.h: Add -Wimplicit-interface.
7050 * options.c (g95_init_options, g95_parse_arg): Set it.
7051 * interface.c (check_intents): Warn about call with implicit
7053 * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
7056 2003-04-05 Paul Brook <paul@nowt.org>
7058 * iresolve.c (g95_resolve_spread): Don't resole based on type.
7059 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
7061 2003-03-29 Paul Brook <paul@nowt.org>
7063 * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
7064 (g95_resolve_unpack): Ditto.
7065 * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
7066 (g95_conv_intrinsic_function): Use it. Remove PACK and UNPACK.
7067 (g95_is_intrinsic_libcall): Add PACK and UNPACK.
7069 2003-03-25 Paul Brook <paul@nowt.org>
7071 * arith.c (g95_unary_user, g95_user): Remove dead functions.
7073 * array.c (g95_free_array_ref): Ditto.
7075 * symbol.c (g95_use_derived_tree): Ditto.
7076 * intrinsic.c (add_functions): Use simplification for SCALE.
7077 * primary.c (g95_match_rvalue): Test sym, not symtree.
7079 2003-03-25 Paul Brook <paul@nowt.org>
7081 * trans-decl.c (build_function_decl): Add parameter before it gets
7082 turned into a constant.
7083 * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
7084 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
7085 * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
7087 2003-03-22 Paul Brook <paul@nowt.org>
7089 * trans-array.c (g95_conv_array_initializer): Allow scalar
7091 * trans-decl.c (g95_finish_var_decl): Result variables are not
7093 * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
7094 (g95_conv_intrinsic_function): Use it.
7095 * trans-types.h (g95_type_spec): Remove dead declaration.
7097 2003-03-21 Paul Brook <paul@nowt.org>
7099 * trans-decl.c (g95_build_function_decl): Mark string parameters.
7101 2003-03-20 Paul Brook <paul@nowt.org>
7103 * trans-decl.c (g95_build_function_decl): Put character length
7104 parameters at the end of the function declaration.
7105 * trans-expr.c (g95_conv_function_call): Ditto.
7106 * trans-types.c (g95_get_function_type): Ditto.
7108 2003-03-20 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7110 * resolve.c (resolve_formal_arglist): Don't impose intent for
7111 procedure arguments of pure functions.
7112 (resolve_select): Remove redundant assignment.
7114 2003-03-19 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7116 * arith.c (validate_logical), g95.h, options.c (g95_init_options):
7118 * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
7119 * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
7121 * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
7123 * symbol.c (g95_add_type): Fix typo in comment.
7126 2003-03-16 Paul Brook <paul@nowt.org>
7128 * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
7129 * expr.c (g95_build_call): Remove.
7130 * f95-lang.c (puchdecl_top_level): New function.
7131 * g95.h (g95_code): Store resolved symbol, not just the name.
7132 * intrinsic.c (g95_intrinsic_namespace): New global namespace.
7133 (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
7134 (g95_get_intrinsic_sub_symbol): New function.
7135 * iresolve.c (g95_resolve_cpu_time): Use it.
7136 (g95_resolve_random_number): Ditto.
7137 * resolve.c: Set code->resolved_sym instead of code->sub_name.
7138 * trans-decl.c (g95_get_extern_function_decl): Give external decls
7139 the correct DECL_CONTEXT. Add global symbold to the global scope.
7140 * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
7143 2003-03-16 Paul Brook <paul@nowt.org>
7145 * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
7146 * options.c (g95_parse_arg): Ditto.
7147 * module.c (mio_symbol_attribute): Handle the always_explicit bit.
7148 * resolve.c (resolve_formal_arglist): The always_explicit sould be set
7149 for the procedure, not the parameter.
7150 * trans-array.c (g95_trans_g77_array): New function.
7151 (g95_trans_assumed_size): Use it.
7152 (g95_trans_dummy_array_bias): Ditto.
7153 (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
7154 (g95_conv_expr_descriptor): ... to here. Update callers.
7155 * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
7156 (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
7157 * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
7158 * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
7159 * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
7160 (g95_sym_type): Ditto.
7162 2003-03-15 Paul Brook <paul@nowt.org>
7164 * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
7166 * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
7168 2003-03-14 Paul Brook <paul@nowt.org>
7170 * trans-array.c (g95_array_is_packed): Remove.
7171 (g95_conv_array_base): Correctly handle all descriptorless cases.
7172 (g95_conv_array_stride): Use descriptorless strides.
7173 (g95_trans_dummy_array_bias): Don't always repack the array.
7174 (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
7176 * trans-types.c (g95_get_nodesc_array_type): Differentiate between
7177 dummy and non-dummy arrays...
7178 (g95_sym_type, g95_get_derived_type): ... like these.
7179 (g95_get_array_type_bounds): Allow discontiguous arrays.
7181 2003-03-12 Paul Brook <paul@nowt.org>
7183 * array.c (g95_resolve_array_spec): Fix comment.
7184 * g95.h (symbol_attributes): New flag always_explicit.
7185 * resolve.c (resolve_formal_arglist): Set it always_explicit.
7186 * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
7187 * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
7188 (g95_trans_array_bounds): Allow assumed shape arrays.
7189 (g95_trans_repack_array): Remove.
7190 (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
7191 * trans-decl.c (g95_build_qualified_array): Only ignore absent
7192 bounds for assumed size arrays.
7193 (g95_build_dummy_array_decl): Use descriptorless arrays.
7194 * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
7195 (g95_trans_pointer_assign): Fix typo.
7196 * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
7198 (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
7199 * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
7200 Also modify callers.
7201 * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
7203 2003-03-08 Paul Brook <paul@nowt.org>
7205 * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
7206 (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
7207 * resolve.c (compare_spec_to_ref): Allow full array sections.
7209 2003-03-08 Paul Brook <paul@nowt.org>
7211 * expr.c (g95_simplify_expr): Also simplify array index and
7212 substring expressions.
7213 * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
7214 * trans-array.c (g95_trans_array_bounds): New function.
7215 (g95_trans_auto_array_allocation): Use it.
7216 (g95_trans_assumed_size): Rewrite.
7217 * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
7218 (gfor_fndecl_repack): Remove.
7219 (g95_build_qualified_array): Handle absent upper bounds.
7220 (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
7221 (g95_get_symbol_decl): Update.
7222 (g95_build_intrinsic_function_decls): Initialize new decls.
7223 * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
7224 (gfor_fndecl_repack): Remove.
7225 * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
7226 * trans-types.c: (g95_build_array_type): Merge duplicated code..
7227 (g95_get_nodesc_array_type): Handle absent bounds.
7228 * trans-types.h (g95_get_nodesc_array_type): Declare.
7230 2003-03-04 Paul Brook <paul@nowt.org>
7232 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
7235 2003-03-02 Paul Brook <paul@nowt.org>
7237 * options.c (g95_init_options): Drfault to 1.
7238 (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
7239 * trans-array.c (g95_conv_array_data, g95_conv_array_base,
7240 g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
7241 Handle non-constant size automatic arrays.
7242 (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
7243 generic bound functions.
7244 (g95_trans_auto_array_allocation): Don't create a descriptor.
7245 (g95_trans_assumed_size): New function (broken).
7246 (g95_trans_dummy_array_bias): Remove unused var.
7247 * trans-array.h (g95_trans_assumed_size): Declare.
7248 * trans-decl.c (create_index_var): New fuction.
7249 (g95_build_qualified_array): New function.
7250 (g95_get_symbol_decl): Use it.
7251 (g95_trans_deferred_vars): Handle assumed shape seperately.
7252 * trans-types.c (get_element_type): Handle heap allocated arrays.
7253 (g95_is_nodesc_array): Include non-const size arrays.
7254 (g95_get_nodesc_array_type): Ditto.
7256 2003-02-23 Paul Brook <paul@nowt.org>
7258 * trans-array.c (g95_array_init_size): Should use stride, not size of
7261 2003-02-18 Paul Brook <paul@nowt.org>
7263 * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
7264 after intrinsic function check.
7266 2003-02-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7268 * io.c (match_io): Fix missing return value and remove useless
7270 * match.c (g95_match): Remove useless assignment.
7271 * module.c (parse_string): Remove useless post increment.
7272 * simplify.c (g95_simplify_verify): Remove useless assignment.
7274 2003-02-15 Paul Brook <paul@nowt.org>
7276 * expr.c (restricted_intrinsic): Handle bad values gracefully.
7277 * g95.h (symbol_attribute): Add referenced member.
7278 (g95_symbol): Add dummy_order member.
7279 (g95_set_sym_referenced): Declare.
7280 * match.c (g95_match_assignment, g95_match_call): Use it
7281 * primary.c (match_actual_arg, g95_match_rvalue,
7282 g95_match_variable): Ditto.
7283 * symbol.c (next_dummy_order): New variable.
7284 (g95_set_sym_referenced): New function.
7285 (check_done): New function.
7286 (g95_add_*): Use it.
7287 * trans-decl.c: Make formatting conform to GCC standards.
7288 (g95_defer_symbol_init): Add dummy variables in the right order.
7289 (g95_get_symbol_decl): Only accept referenced variables.
7290 (g95_create_module_variable): Module variables are always required.
7291 (generatr_local_decls): New function.
7292 (generate_local_vars): New function.
7293 (g95_generate_function_code): Use it.
7295 2003-02-13 Paul Brook <paul@nowt.org>
7297 * trans-decl.c (g95_conv_struct_cons): Remove.
7298 (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
7299 * trans-expr.c (g95_conv_structure): New function.
7300 (g95_conv_expr): Use it.
7302 2003-02-09 Paul Brook <paul@nowt.org>
7304 * trans-array.c (g95_array_init_size): Don't evaluate the linit
7305 expressions multiple times.
7306 (g95_trans_auto_arry_allocation): Use pointer not tmp.
7308 2003-02-08 Paul Brook <paul@nowt.org>
7310 * module.c (mio_symtree_ref): Declare as static.
7311 (mio_expr): Remove dead code.
7312 (read_module): Set the symtree link for fixups.
7313 * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
7314 (build_round_expr): ... to this.
7315 (g95_conv_intrinsic_aint): New function.
7316 (g95_conv_intrinsic_function): Use it.
7318 2003-02-08 Paul Brook <paul@nowt.org>
7320 * trans-array.c (g95_trans_array_constructor_value): Use the acutal
7321 offset after modificaton, not the increment expression.
7322 * dependency.c: Kill excess whitespace.
7324 2003-02-07 Sanjiv Gupta <sanjivg@noida.hcltech.com>
7326 * dependency.h: Remove some function declarations.
7327 * dependency.c (get_no_of_elements): Change this function not to
7329 * other: Add comments for all modified functions.
7331 2003-02-06 Paul Brook <paul@nowt.org>
7333 * g95spec.c (lang_specific_functions): Fix initializer warning.
7334 * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
7335 for structure type names.
7336 * trans-decl.c (g95_cons_structure_cons): New function.
7337 (g95_get_symbol_decl): Use it.
7338 * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
7341 2003-02-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7343 * resolve.c (compare_cases): Add const to casts.
7345 2003-01-30 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7347 * g95.h (g95_check_f): Change a1 to f1m.
7348 * intrinsic.c (add_sym_1m, check_specific,
7349 g95_intrinsic_func_interface): Use it.
7351 * module.c (init_pi_tree): Remove useless cast.
7352 (fp2): Fix argument type.
7354 * parse.c (parse_select_block): Add comment.
7356 2003-02-05 Toon Moene <toon@moene.indiv.nluug.nl>
7358 * lang-options.h: Fix warning involving C90 concatenated
7361 2003-02-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
7362 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7364 * io.c (format_asterisk): Complete initializer to kill warning.
7365 * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
7366 DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
7367 (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
7368 new defines to complete initializers. Kills all warnings.
7370 * Make-lang.in: Comment cleanup.
7372 2003-02-05 Paul Brook <paul@nowt.org>
7374 * array.c (g95_free_constructor): Handle NULL expressions.
7375 * resolve.c (resolve_structure_cons): Ditto.
7376 * decl.c (g95_match_null): New Function.
7377 (variable_decl): Use it.
7378 * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
7379 * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
7380 * trans-types.c (g95_set_decl_attributes): Remove empty function.
7382 2003-02-05 Paul Brook <paul@nowt.org>
7384 * trans.h (build1_v): New macro.
7385 (build_v): Remove pointless and incorrect prototype.
7386 * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
7387 * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
7389 2003-02-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
7391 * Make-lang.in (F95_OBJS): Remove one more dead file.
7393 2003-02-01 Paul Brook <paul@nowt.org>
7395 * lang-specs.h: Don't pass -ffixed-form to the linker.
7396 * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
7398 2003-02-01 Paul Brook <paul@nowt.org>
7400 * Make-lang.in (F95_OBJS): Remove dead files.
7401 * trans-array.c (g95_array_init_size): Do the right thing when
7403 * trans-decl.c (g95_generate_function_code): Initialize deffered
7404 symbol list before translating contained subroutines.
7405 * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
7406 scalar invariant values here...
7407 (g95_conv_variable, g95_conv_function_call): ... instead of here ...
7408 * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
7410 2003-01-29 Paul Brook <paul@nowt.org>
7412 * trans-array.c (g95_add_loop_code): Put pre code in the right block.
7413 (g95_walk_elemental_function_args): Reverse chains before adding.
7414 (g95_reverse_ss): Move about a bit.
7415 * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
7418 2003-01-28 Paul Brook <paul@nowt.org>
7420 * intrinsic.c (resolve_intrinsic): Use correct union member.
7421 * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
7423 * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
7424 use associated variables.
7425 * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
7426 * trans-expr.c (g95_conv_expr_present): ... to here.
7427 * trans.h: Declare it.
7428 * trans-types.c (g95_sym_type): Assume subroutine if not specified.
7430 2003-01-28 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7432 * array.c (expand_iterator): Suppress useless assignment.
7433 * decl.c (match_char_spec): Ditto.
7434 * io.c (match_io_iterator): Ditto.
7435 * primary.c (match_real_constant): Ditto.
7436 * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
7437 Ditto. Also, use g95_intrinsic_op not int for intrinsic operators.
7438 * matchexp.c (match_add_operand, match_level_5): Likewise.
7439 * module.c (parse_atom, find_enum): Likewise.
7440 * resolve.c: move #include <string.h>
7441 (resolve_select): Fix serious typo.
7443 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.n>
7445 * Make-lang.in: Don't build with broken tree-ssa-pre.
7447 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.nl>
7449 * resolve.c (resolve_index): Add a TODO.
7450 * symbol.c: Remove useless "#include <ctype.h>".
7452 2003-01-27 Paul Brook <paul@nowt.org>
7454 * check.c (check_rest): Allow different type kinds as an extension.
7455 * g95.h (g95_resolve_f): Add f1m.
7456 * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
7457 * intrinsic.h: Chenge prototypes for MIN and MAX.
7458 * iresolve.c (g95_resolve_minmax): New function.
7459 (g95_resolve_min, g95_resolve_max): Use it.
7460 * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
7462 (g95_conv_intrinsic_present): Fix logic.
7464 2003-01-27 Steven Bossche <s.bosscher@student.tudelft.nl>
7466 * g95.h (g95_case): Don't be a tree, be a double linked list.
7467 * match.c (match_case_selector): Remove redundant semantics check.
7468 Clean up a few goto's to make it a tiny little bit faster.
7469 * resolve.c (case_tree): Die.
7470 (compare_cases): Accept and compare unbounded cases too.
7471 (check_case_overlap): Don't build a tree. Instead, merge-sort the
7472 whole list of g95_cases passed from resolve_select.
7473 (sane_logical_select): Die.
7474 (check_case_expr): Return FAILURE if a CASE label is of the wrong
7476 (resolve_select): Fixup case expression for computed GOTOs, put it
7477 in expr, not expr2, for easier handing in the parse tree dumper and
7478 the code generator. Rewrite the rest of the function: Kill
7479 unreachable case labels and unreachable case blocks.
7480 * dump-parse-tree.c (g95_show_code_node): Always dump expr for
7481 an EXEC_SELECT, not case2 anymore.
7482 * trans-const.c (g95_conv_constant_to_tree): New function.
7483 (g95_conv_constant): Use it.
7484 * trans-const.h: Declare prototype for the new function.
7485 * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
7486 g95_trans_character_select): New static functions.
7487 (g95_trans_select): Rewrite.
7489 2003-01-26 Paul Brook <paul@nowt.org>
7491 * intrinsic.c (add_fnctions): Properly add dreal.
7492 * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
7493 (g95_conv_intrinsic_function): Use it.
7494 * trans-io.c (build_dt): Abort on internal files (unimplemented).
7496 2003-01-26 Paul Brook <paul@nowt.org>
7498 Widespread changes to the handling of symbols in expressions. These
7499 are now linked via g95_symtree nodes.
7500 * parse.c (g95_fixup_sibling symbols): New function.
7501 (parse_contained): Use it.
7502 * g95.h (symbol_attribute): Add contained. Indicates a symbol is a
7503 contained procedure that has bee correctly fixed up.
7504 (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
7506 2003-01-24 Paul Brook <paul@nowt.org>
7508 * trans-array.c (g95_walk_expr): Function result attributes are in
7510 * trans-expr.c (g95_conv_function_call,
7511 g95_trans_arrayfunc_assign): Ditto.
7512 * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
7514 2003-01-23 Steven Bosscher <s.bosscher@student.tudelft.nl>
7516 * expr.c (check_restricted): Fix error message.
7517 * symbol.c (free_st_labels): Plug memleak.
7519 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
7521 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
7522 reduce_binary_aa, reduce_binary, eval_intrinsic,
7523 eval_intrinsic_f2): Use typesafe prototypes for eval functions.
7524 * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
7525 for typesafe intrinsics helper functions.
7526 (g95_intrinsic_sym): Use them.
7527 * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
7528 add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
7529 add_sym_5, add_conv, resolve_intrinsic, do_simplify,
7530 check_specific, g95_intrinsic_func_interface,
7531 g95_intrinsic_sub_interface): Adjust all calls to intrinsics
7533 * trans-decl.c (g95_get_extern_function_decl): Likewise.
7534 * Make-lang.in: Don't disable warnings for strict prototypes
7535 any longer, everything is typesafe now.
7537 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
7539 * bbt.c (duplicate_node): Make static.
7540 * module.c (module_name): Make static.
7541 * scanner.c (include_dirs): Make static.
7543 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
7545 Hard coded _gfor_'s should not show up anymore.
7546 * g95.h (PREFIX): New macro.
7547 * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
7549 (g95_resolve_random_number): Likewise.
7550 * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
7551 * trans-io.c: Remove 'prefix' macro. Replace all uses with
7552 the new PREFIX macro from g95.h.
7554 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
7556 The troubles of forking... Andy implemented this just now too.
7557 Let's stick to that and keep the trees close.
7558 * g95.h (g95_st_label): 'format' member is now a g95_expr.
7559 * io.c: Revert previous changes.
7560 (g95_match_format): Match the format string as a character
7562 * match.h (g95_statement_label): Declare external.
7563 * parse.c: Revert previous changes.
7564 * symbol.c (g95_free_st_label): Free a g95_expr instead
7566 * trans-io.c: Revert previous changes.
7567 (build_dt): Use set_string to set the format string.
7569 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
7571 * io.c (format_string): Make non-static.
7572 (g95_match_format): Remember the format string.
7573 (terminate_io): Add I/O termination for empty I/O lists.
7574 * match.h: Declare external format_string.
7575 * parse.c (check_statement_label): Attack the format string
7576 to a format label for FORMAT statements.
7577 * trans-io.c (g95_add_field): Define prefix macro. Replace
7578 all uses of PREFIX define with a use of this macro.
7579 (build_dt): Implement formatted I/O for format labels.
7581 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
7583 * lang-options.h: Kill "-std=F".
7584 * options.c: Remove unimplemented "-std=F". Modify
7586 * misc.c (g95_terminal_width): New function.
7587 * error.c (g95_error_init_1): Use g95_terminal_width.
7588 * g95.h: Add prototype for g95_terminal_width, remove
7591 2003-01-19 Steven Bosscher <s.bosscher@student.tudelft.nl>
7593 * Make-lang.in: Fix typo.
7595 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
7597 * g95.h (struct g95_case): Remove unused cruft, new member
7598 'where' to keep track of the locus of the default case.
7599 * match.c (g95_match_case): Add locus to the current case.
7600 (match_case_selector): Likewise.
7601 * parse.c (parse_select_block): Move semantics check for
7602 multiple DEFAULT cases out of here to...
7603 * resolve.c (check_case_overlap): ...here. Return sooner
7605 (check_case_expr): Take two g95_cases now, use to sure the
7606 expression kinds are the same.
7607 (resolve_select): Cleanup.
7609 2003-01-18 Paul Brook <paul@nowt.org>
7611 * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
7612 * trans-decl.c (g95_set_symbol_decl): Handle non-array result
7614 (g95_get_extern_function_decl): Put decls in the correct context.
7616 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
7618 * trans-io.c: Port changes from Andy to set ERR flag.
7620 2003-01-17 Paul Brook <paul@nowt.org>
7622 * trans-array.c: Add various comments.
7623 (g95_ss_terminator): Declare as const.
7624 (g95_walk_expr): Remove first parameter and update all callers.
7625 (g95_walk_op_expr): Initialize scalar SS properly.
7626 * trans-array.h (g95_walk_expr): Update prototype.
7627 * trans-expr.c: Update for new g95_walk_expr.
7628 * trans-intrinsic.c: Ditto.
7629 * trans-io.c: Ditto.
7630 * trans.h: Various comments for SS chains.
7632 2003-01-17 Paul Brook <paul@nowt.org>
7634 * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
7636 * intrinsic.c (add_functions): Use them.
7637 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
7638 * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
7640 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
7642 Fallout of a small merge conflict:
7643 * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
7645 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
7647 * initrinsic.c: New add_sym_* functions for strong typing.
7648 (add_conv): Make prototype strict.
7649 * dump-parse-tree.c, dependency.c: Include config.h
7650 * resolve.c, trans-io.c: Fix typos.
7652 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
7654 * dump-parse-tree.c (g95_show_code_node): Show the
7655 condition for a computed GOTO that was transformed
7656 to a SELECT CASE construct.
7657 * resolve.c (check_case_overlap): Revert previous switch
7658 to treaps, it was too slow and didn't catch all trouble.
7659 (resolve_symbol): Be more flexible about module procedures.
7660 * symbol.c (check_conflict): Point to relevant section in
7661 the standard for dubious conflict. Allow procedure
7662 dummy arguments to be optional again.
7663 * trans-io (add_field): Rename to g95_add_field. Change
7665 * trans-stmt (trans_select): Handle unbounded cases for
7666 integer SELECT CASE constructs. Fix/add more comment.
7668 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
7670 * g95.h: Uses GCC's function attribute macros.
7671 * error.c, module.c, parse.c, g95.h: More function attributes.
7673 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
7675 * trans-decl.c (get_label_decl): Use TREE_LINENO instead
7676 of DECL_SOURCE_LINE, and TREE_FILENAME instead of
7679 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
7681 * f95-lang.c (pushdecl): Use TREE_LINENO instead of
7683 * trans.c (g95_trans_code): Use annotate_all_with_file_line
7684 instead of nowdead wrap_all_with_wfl.
7686 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
7688 * parse.c (g95_parse_file): In verbose mode, dump the parse tree
7689 before generating code, so we can still see it even if the code
7690 generation phase dies.
7692 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
7694 * decl.c (build_sym): Split out initialization expression parts...
7695 (add_init_expr_to_sym): ...to here.
7696 (variable_decl): Add the symbol following an attribute list to the
7697 symbol tree before parsing the optional initialization expression
7698 if the symbol is not of a derived type.
7699 * primary.c (g95_match_rvalue): Don't assume a symbol always has
7700 a value if it is a PARAMETER.
7702 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
7704 * misc.c: Don't #include <mcheck.h>
7705 * module.c: Ditto. Kill uses of mtrace, muntrace. If there
7706 ever was a glibc bug, then either this was never reported to
7707 glibc people, or it has been fixed for so long that there's
7708 no information you can find about it, anywhere.
7710 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
7713 * module.c (attr_bits, bt_types, array_spec_types):
7714 Switch 'const' and 'static'.
7715 * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
7717 GNU'ify source code:
7718 * trans-io.c: Numerous fixes, one fixed warning and a few
7719 TODO markers so that we don't forget about them.
7721 2003-01-13 Paul Brook <paul@nowt.org>
7723 * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
7724 * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
7726 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
7727 * match.c (g95_match_stop): Fix dumb == -> != error.
7729 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
7731 * dump-parse-tree.c (show_indent): Add line breaks. This
7732 whole dumping process needs cleanups.
7733 * f95-lang.c (g95_mark_addressable): Fix prototype to match
7734 the langhook. Fix 'return's accordingly.
7735 * g95-support.h: Adjust prototype.
7736 * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
7737 * lang-options.h: Add '-fsyntax-only'.
7738 * options.c (g95_init_options): Init 'no_backend'.
7739 (g95_parse_arg): Deal with '-fsyntax-only'.
7740 * parse.c (g95_parse_file): Do not generate code if 'no_backend'
7743 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
7745 * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
7746 arguments. Also make sure that if a symbol is marked INTRINSIC,
7747 an intrinsic with the symbol's name actually exists.
7748 (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
7749 Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
7750 ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
7752 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
7754 * resolve.c (resolve_contained_functions): Fix condition, don't
7755 throw internal_error if a child namespace has no name. Apparently
7756 this can be the case?
7758 2003-01-11 Paul Brook <paul@nowt.org>
7760 Port changes from Andy's tree:
7761 * g95.h (g95_code): Add stop_code.
7762 * match.c (g95_match_stop): Detter syntax checking.
7763 * resolve.c (resolve_generic_f0): Return match type.
7764 (resolve_generic_f): Remove dead/duplicated code.
7765 (resolve_specific_f): Ditto.
7766 * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
7767 * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
7768 * trans-stmt.c (g95_trans_stop): Handle new STOP format.
7770 2003-01-11 Paul Brook <paul@nowt.org>
7772 * trans-array.c: Various documentation/comment changes.
7773 * trans-stmt.c: Ditto.
7776 2003-01-10 Paul Brook <paul@nowt.org>
7778 * options.c/h: Add -fdump-parse-tree as alias of -v.
7780 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7782 * dump-parse-tree.c (g95_show_namespace): Fixed another
7783 typo. Sorry, it's Friday...
7785 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7788 * trans-array.c, trans-array.h, trans.c, trans-const.c,
7789 trans-const.h, trans-decl.c, trans-expr.c, trans.h
7790 trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
7791 trans-types.c: Fix bogus copyright years, add 2003.
7792 * trans-types.h: Give copyright header.
7794 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7796 * dump-parse-tree.c (g95_show_namespace): Fixed typo.
7797 * expr.c, options.c, scanner.c: Add some more 'const' markers.
7798 * intrinsic.c: Some constant strings moved to read-only memory.
7799 * io.c (format_asterisk): Move to...
7802 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7804 * dump-parse-tree.c (g95_show_namespace): Dump implicit
7805 types for ranges instead of per-letter. Indent the
7806 'CONTAINS' just like everything else.
7807 * resolve.c (resolve_contained_functions): Clarify comment.
7808 Explain non-obvious conditional expression. Improve
7809 diagnostics if tyoe cannot be resolved.
7810 Port semi-fix from Andy's tree:
7811 (was_declared): Move up before first use.
7812 (generic_sym, specific_sym): New functions. Code moved
7813 out if procedure_kind.
7814 (procedure_kind): Simplify using new functions.
7815 (resolve_generic_f): Make sure the functions we find in
7816 a parent namespace is generic.
7817 (resolve_specific_f): Ditto for specific functions.
7819 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7821 * trans-stmt.c, trans.c: Fix some code style issues. Add
7822 some more comment (but still not enough!).
7824 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7826 * symbol.c (flavors, procedures, intents, acces_types,
7827 access_types, ifsrc_types): Make const.
7828 * misc.c (g95_string2code): Make 'm' param 'const'.
7829 * module.c (find_enum, write_atom, mio_name): Make
7831 (attr_bits, bt_types, array_spec_types, array_ref_types,
7832 ref_types, expr_types): Make const.
7833 * g95.h: Adjust external decls.
7835 2003-01-09 Paul Brook <paul@nowt.org>
7837 * Testsuite: Add a load of new cases.
7839 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
7841 * Make-file.in: Add dependency on back end header files;
7842 a parallel build should work now.
7843 * f95-lang-c (lang_identifier): Remove bogus comment.
7844 (g95_be_parse_file): Fix prototype.
7845 (g95_init): Make static.
7846 (g95_finish): Make static.
7847 * error.c (g95_syntax_error): Kill. Make define in...
7848 * g95.h (g95_syntax_error): Define.
7849 (g95.options): Make 'source' member 'const'.
7850 * interface.c (g95_match_interface): Explain
7851 hard-to-read condition.
7852 (g95_match_end_interface): Ditto.
7853 * trans_const.c (g95_build_string_const): Make 's' parameter
7855 * trans_const.h: Adjust protoype accordingly.
7856 * trans-decl.c: Include tree-dump.h
7857 (g95_generate_function_code): Build fixes for recent changes
7858 in the tree-ssa branch.
7860 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
7862 * format.c: Kill, move code from here...
7864 * Make-lang.in: Adjust.
7867 * BUGS: Mention where to submit bugs. Move old content...
7868 * TODO: ...to here. New file.
7870 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
7871 Fix most warnings, and suppress the ones we can't fix for now.
7872 * Make-lang.in: Suppress warnings about bad proto's in g95.h,
7873 these warnings just clutter the screen and there's not much
7874 we can do about them for now anyway.
7875 * check.c, iresolve.c: Mark unused function parameters.
7876 * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
7877 they should be resolved before they get here.
7878 * error.c: Remove unused FILE *status_out.
7879 * f95-lang.c (g95_init): Remove bogus cast.
7880 * Many files: Make things 'const' where required.
7881 * g95.h: Fix prototypes for all modified functions above.
7882 (g95_options): Remove 'object' member.
7884 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
7886 * Make-file.in: Cleanup bogus targets. Add more comment.
7887 * lang-options.h: New option '-w'.
7888 * g95.h: add no_options field to struct g95_options.
7889 * options.c (g95_init_options): Default no_warnings to off.
7890 (g95_parse_arg): Recognise the '-w' switch and its alias,
7892 * error.c (g95_warning, g95_warning_now): Don't emit warning if
7893 no_warning option is set.
7894 * iresolve.c (g95_resolve_shape): Fix warning.
7896 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
7898 * primary.c (g95_next_string_char): Rename next_string_char, and
7899 make static. Adjust callers accordingly.
7900 * resolve.c (resolve_generic_f0): Return try, not match. Adjust
7901 callers accordingly.
7902 * g95.h: Split out all g95_match* functions to...
7903 * match.h: ...here. New file.
7904 * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
7905 matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
7907 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
7909 * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
7910 g95_merge_new_implicit): New functions.
7911 (g95_match_implicit_none, g95_match_implicit): Move from here...
7912 * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
7913 Modify to use the new functions in symbol.c.
7914 * g95.h: Add and move prototypes.
7916 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
7918 * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
7919 node compare function.
7920 (g95_insert_bbt): Likewise.
7921 (g95_insert_bbt_with_overlap): Likewise.
7922 (g95_delete_bbt): Likewise.
7923 (delete_treap): Likewise. Also fix a potential bug when calling it.
7924 * module.c (compare_pointers): Change proto to compare_fn.
7925 (compare_integers): Likewise.
7926 (compare_true_names): Likewise.
7927 (find_true_name): Adjust call to compare_true_names to match proto.
7928 (require_atom, write_atom, mio_name): Fix 'const' warnings.
7929 (init_pi_tree): Make compare a compare_fn instead of (int *).
7930 * resolve.c (compare_cases): Change proto to compare_fn.
7931 * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
7932 it static, and rename to compare_symtree.
7933 (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
7935 * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
7936 of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
7938 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
7939 * Make-lang.in: Fix spaces/tabs issues from previous patch.
7940 * patch.options: Blow away Paul's checkin mistake :-)
7941 * io.c (terminate_io): Fix memory leak (Arnaud).
7943 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
7945 * Make-lang.in: Teach about building DVI, info manual.
7946 * g95.texi: New file.
7948 2003-01-02 Paul Brook <paul@nowt.org>
7950 * trans-array.c (g95_reverse_ss): Make static and don't use.
7951 (g95_conv_ss_descriptor): Don't use g95_loopinfo
7952 (g95_conv_array_parameters): Modify for pointer assignments.
7953 (g95_walk_subexpr): New function.
7954 (g95_walk_expr*): Use it.
7955 * trans-array.h (g95_reverse_ss): Remove prototype.
7956 * trans-expr.c (g95_trans_pointer_assign): Implement.
7957 (Many): Set se.want_pointer before calling g95_conv_array_parameter.
7958 * trans-intrinsic.c: Sync with scalarizer changes.
7959 * trans-io.c: Ditto.
7961 2002-12-29 Paul Brook <paul@nowt.org>
7963 * trans-array.c: Document calling convention for arrays.
7965 2002-12-19 Paul Brook <paul@nowt.org>
7967 * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
7968 assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
7969 optional parameters for some intrinsics.
7970 (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
7971 * trans-expr.c (g95_conv_function_call): Pass NULL for absent
7972 optional parameters.
7973 * trans.h (g95_se): Add ignore_optional flag.
7975 2002-12-15 Paul Brook <paul@nowt.org>
7977 * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
7978 * trans-decl.c (g95_generate_function_code): Use TDI_original.
7980 2002-12-14 Paul Brook <paul@nowt.org>
7982 * trans-stmt.c (g95_trans_call): Use resolved symbol name.
7984 2002-12-12 Paul Brook <paul@nowt.org>
7986 * trans-array.c (g95_trans_array_constructor_subarray): Fully
7987 initialize the scalarizer.
7988 (various): Update to new format of g95_expr->value.constructor.
7990 2002-12-08 Paul Brook <paul@nowt.org>
7992 * trans-array.c (g95_put_offset_into_var): New function.
7993 (g95_trans_array_constructor_subarray): New function.
7994 (g95_trans_array_constructor_value): Use it.
7995 (g95_array_cons_size): Don't abort() on array components.
7997 2002-12-08 Paul Brook <paul@nowt.org>
7999 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
8000 * support.c: Update #includes.
8001 (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
8002 * trans-array.c: Update #includes.
8004 * trans-const.c: Ditto.
8005 * trans-io.c: Ditto.
8006 * trans-types.c: Ditto.
8007 (g95_init_types): Set size_type_node.
8008 * trans-decl.c: Update #includes.
8009 (gfor_fndecl_adjust{l,r}): Declare and initialize.
8010 * trans-stmt.c: Update #includes.
8011 (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
8012 (g95_trans_select): Fix check for unbounded ranges.
8013 * trans-expr.c: Update #includes.
8014 (g95_conv_string_tmp): New function.
8015 (g95_conv_concat_op): Use it.
8016 * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
8017 * Trans-intrisic.c: Update #includes.
8018 (g95_conv_intrinsic_strcmp): New function.
8019 (g95_conv_intrinsic_adjust): Ditto.
8020 (g95_conv_intrinsic_function: Use them.
8022 2002-11-30 Paul Brook <paul@nowt.org>
8024 * trans-array.c (g95_walk_function_expr): Handle non-array return by
8026 * trans-dec.c (g95_build_function_decl): Handle character return
8028 (g95_get_fake_result_decl): Ditto.
8029 (g95_trans_deferred_vars): Ditto.
8030 * trans-expr.c (g95_conv_function_call): Ditto.
8031 (g95_trans_arrayfunc_assign) Limit to array valued functions.
8032 * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
8033 (g95_conv_intrinsic_function): Use it.
8034 * trans-types.c (g95_sym_type): Handle functions returning strings.
8035 (g95_return_by_reference): Ditto.
8036 (g95_get_function_type): Ditto.
8038 2002-11-18 Paul Brook <paul@nowt.org>
8040 * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
8041 requires a temporary.
8042 (g95_trans_select): Handle computed gotos.
8043 * trans-types.c (g95_build_array_type): Warn about non-functional
8044 assumed shape arrays.
8045 * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
8047 * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
8048 (g95_conv_intrinsic_int): New function.
8049 (g95_conv_intrinsic_mod): New function.
8050 (g95_conv_intrinsic_ichar): New function.
8051 (g95_conv_intrinsic_function): Use them.
8052 (g95_conv_intrinsic_dim): Use g95_evaluate_now.
8054 2002-11-17 Toon Moene <toon@moene.indiv.nluug.nl>
8056 * trans-types.c (g95_build_array_type): Assumed
8057 sized arrays can have rank > 1.
8058 * trans.c (g95_trans_code): Remove erroneous
8059 warning about CONTINUE.
8060 * trans-expr.c (g95_conv_variable): Remove
8063 2002-11-15 Paul Brook <paul@nowt.org>
8065 * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
8067 2002-10-31 Paul Brook <paul@nowt.org>
8069 * f95-tree.c: Remove tree copying stuff that's now in gimple.c
8070 * trans-expr.c (g95_conv_component_ref): Handle character string
8072 (g95_conv_string_parameter): Ditto.
8073 * trans-types.c (g95_get_derived_type): Add length decl to caracter
8076 2002-10-10 Paul Brook <paul@nowt.org>
8078 * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
8079 * trans-expr.c (g95_conv_function_call): Remove unreliable return value
8081 * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
8082 (g95_conv_intrinsic_function): Handle size and shape intrinsics.
8083 (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
8084 * trans-types.c (pvoid_type_node): Declare and initialize.
8085 * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
8086 (g95_array_allocate): Fix when base==data.
8087 (g95_conv_array_parameter): Correctly handle reduced rank sections.
8088 * trans-io.c (g95_trans_write): Correctly handle string modifiers.
8090 2002-10-09 Paul Brook <paul@nowt.org>
8092 * (g95_conv_expr_reference): Handle character strings correctly.
8094 2002-10-07 Paul Brook <paul@nowt.org>
8096 (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
8098 * trans-array.c (g95_build_array_initializer): Remove.
8099 (g95_conv_array_initializer): New Function.
8100 (g95_trans_auto_arry_allocation): Cleanup.
8101 (g95_trans_init_character_array): Remove.
8102 * g95spec.c: Link in libgforbegin.
8103 * trans.c (g95_generate_code): Rename main function to MAIN__.
8104 (g95_create_var): New function.
8105 (g95_create_var_np): New function.
8106 (g95_evaluate_now): New function.
8107 (g95_start_block): New function.
8108 (g95_finish_block): New function.
8109 (g95_add_expr_to_block): New function.
8110 (g95_add_block_to_block): New function.
8111 * trans-expr.c (g95_conv_componen_ref): New function.
8112 * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
8113 (F95_OBJS): Add dependency.o.
8114 * f95-lang.c (g95_is_simple_stmt): Remove.
8115 * f95-tree.c (mark_not_simple): New function.
8116 (unshare_all_trees): New function.
8117 (create_tmp_var, create_tmp_alias_var): Remove.
8118 * support.c (declare_tmp_vars, tree_last_decl): Remove.
8119 * trans*: Convert to new IR using GENERIC trees. Don't bother about
8120 SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
8122 2002-10-01 Paul Brook <paul@nowt.org>
8124 * trans-array.c: Add support for descriptorless arrays.
8125 (g95_conv_array_data): New function.
8126 (g95_conv_array_base): New function.
8127 * trans-array.h: Declare these here.
8128 * trans-decl.c(g95_create_mopdule_variable): Perform variable
8129 initialization and creation here.
8130 (g95_create_module_vars): Instead of here.
8131 * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
8132 * trans-intrinsic.c: Ditto.
8133 * trans-types.c (g95_is_nodesc_array): New function.
8134 (g95_get_nodesc_array_type): New function.
8135 (g95_sym_type, g95_get_derived_type): Use them.
8136 * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
8138 2002-09-28 Paul Brook <paul@nowt.org>
8140 * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
8141 * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
8144 2002-09-24 Paul Brook <paul@nowt.org>
8146 * f95-lang.c (listify): Remove declaration.
8147 (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
8149 * f95-tree.c (get_name): New function.
8150 * trans.c (module_namespace): Remove.
8151 * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
8152 * trans-types.c: Ditto.
8154 2002-09-19 Paul Brook <paul@nowt.org>
8156 * trans-array.c (g95_get_array_cons_size): New Function.
8157 (g95_con_ss_startstride): Handle Array constructors.
8158 (g95_conv_loop_setup): Ditto.
8159 (g95_conv_array_parameter): Ditto.
8160 * tras-decl.c (g95_finish_var_decl): Make initializes variables
8163 2002-09-19 Paul Brook <paul@nowt.org>
8165 * trans.c (g95_simple_fold_tmp): Detect variables inside
8167 * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
8169 2002-09-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
8171 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
8173 2002-09-14 Paul Brook <paul@nowt.org>
8175 * trans.c (g95_create_module_variable): Move to trans-decl.c.
8176 * trans-const.c (g95_conv_string_init): New Function.
8177 * trans-const.h: Declare it.
8178 * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
8179 variables. Don't bail on intrinsic symbols.
8180 (get_extern_function_decl): Handle specific intrinsic functions.
8181 * trans-types.c (g95_sym_type): Dummy functions don't return
8183 * trans-array.c (g95_build_array_initializer): New Function.
8184 (g95_trans_auto_array_allocation): Build initializer for static decls.
8185 Don't use mpz_addmul, it's GMP4 only.
8187 2002-09-12 Paul Brook <paul@nowt.org>
8189 * trans-decl.c (g95_generate_code): Fix thinko with return variable.
8190 (g95_get_extern_function_decl, g95_build_function_decl): Mangle
8191 assembler names for module procedures.
8193 2002-09-11 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
8195 * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
8198 2002-09-10 Paul Brook <paul@nowt.org>
8200 * trans-array.c: Change format of G95_SS_TEMP strictures.
8201 (g95_check_fncall_dependancy): New function.
8202 (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
8204 * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
8206 (g95_build_function_decl): Don't assume result arrays are packed.
8207 (g95_trans-deferred-vars): Handle array result variables.
8208 (g95_generate_fuction_code): Clear saved_function_decls.
8209 * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
8211 (g95_trans_arrayfunc_assign): New function.
8212 (g95_trans_assignment): Use it.
8213 * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
8214 (g95_se): Add direct_byref.
8215 * trans-types.c: Use sym->result rather than sym where appropriate.
8216 * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
8217 Update other functions to use this.
8218 (g95_is_intrinsic_libcall): New function.
8219 (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
8220 (g95_walk_intrinsic_function): Ditto.
8222 2002-09-08 Paul Brook <paul@nowt.org>
8224 * trans-types.c: Change rank field to dtype field in array descriptor.
8225 * trans-array.c: Implement filling of dtype array descriptor field.
8226 * trans-intrinsic.c: Fix broken LEN intrinsic.
8228 2002-09-07 Paul Brook <paul@nowt.org>
8230 * trans-intrinsic.c: Remove outdated todo intrinsic list.
8231 (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
8232 (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
8234 2002-09-06 Paul Brook <paul@nowt.org>
8236 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
8237 (gt-f95-trans-types.h): Add dependancy information.
8238 * config-lang.in (gtfiles): Add trans-types.c
8239 * f95-lang.c (g95_be_parse_file): Pass error and warning counts
8240 back to top-level code.
8241 * trans-array.c, trans-types.c: Change format of array descriptor.
8242 (g95_conv_descriptor_dimension): New function.
8243 * trans-types.h (g95_conv_descriptor_rank): define.
8244 * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
8247 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
8249 * trans-array.c, trans-types.c: Add rank information to descriptor.
8251 2002-09-06 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
8253 * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
8255 2002-09-04 Paul Brook <paul@nowt.org>
8257 * f95-lang.c (g95_create_decls): New function.
8258 (g95_init): Move initialization of external decls to above, and call
8259 from g95_be_parse_file.
8260 * trans.c (g95_finish_stmt): Don't amputate the decl chain.
8261 * trans-types.c (g95_init_types): Always name integer and char types.
8262 (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
8264 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
8266 * Make-lang.in: Add options.c to F95_PARSER_OBJS
8268 2002-09-02 Paul Brook <paul@nowt.org>
8270 * g95_generate_code: Clear the attr for __fortran_main.
8271 * trans-types.c (g95_finish_type): New function.
8272 * g95_init_io_state_type: Use g95_finish_type.
8273 * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
8275 2002-09-01 Paul Brook <paul@nowt.org>
8277 * README.backend: Warn about the dangers of extra config.h files.
8278 Remove obsolete libgfor stuff.
8279 * config-lang.in: Add target-libgfor dependancy.
8280 * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
8282 2002-09-01 Toon Moene <toon@moene.indiv.nluug.nl>
8284 * g95_conv_mpz_to_tree: Free storage pointed to by q,
8287 2002-08-30 Paul Brook <paul@nowt.org>
8289 * trans-intrinsic.c (g95_conv_intrinsic_function,
8290 g95_walk_intrinsic_function): Added ANY and ALL.
8291 (g95_conv_intrinsic_anyall): New function.
8292 * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in