1 2005-10-19 Paul Thomas <pault@gcc.gnu.org>
4 * resolve.c (resolve_symbol): Correct error in check for
5 assumed size array with default initializer by testing
6 for arrayspec before dereferencing it.
8 2005-10-17 Paul Thomas <pault@gcc.gnu.org>
11 * gfortran.h: Primitive for gfc_is_formal_arg.
12 * resolve.c(gfc_is_formal_arg): New function to signal across
13 several function calls that formal argument lists are being
15 (resolve_formal_arglist): Set/reset the flag for gfc_is_formal_arg.
16 *expr.c(check_restricted): Add check, via gfc_is_formal_arg, if
17 symbol is part of an formal argument declaration.
20 * decl.c (add_init_expr_to_sym): Make a new character
21 length for each variable, when the expression is NULL
25 * match.c (recursive_stmt_fcn): New function that tests if
26 a statement function resurses through itself or other other
28 (gfc_match_st_function): Call recursive_stmt_fcn to check
29 if this is recursive and to raise error if so.
33 * resolve.c (resolve_symbol): Errors for assumed size arrays
34 with default initializer and for external objects with an
38 * decl.c (match_attr_spec): Prevent PUBLIC from being used
41 2005-10-16 Erik Edelmann <erik.edelmann@iki.fi>
44 * expr.c (check_inquiry): Add "len" to inquiry_function.
46 2005-10-14 Jakub Jelinek <jakub@redhat.com>
48 * primary.c (match_boz_constant): Add missing break after gfc_error.
50 2005-10-12 Paul Thomas <pault@gcc.gnu.org>
53 * trans-types.c (gfc_get_derived_type): Insert code to obtain backend
54 declaration for derived types, building if necessary. Return the
55 derived type if the fields have been built by this process. Otherwise,
56 continue as before but using the already obtained backend_decls for the
57 derived type components. Change the gcc_assert to act on the field.
59 2005-10-12 Paul Thomas <pault@gcc.gnu.org>
62 * decl.c (variable_decl): Make a new copy of the character
63 length for each variable, when the expression is not a
66 2005-10-12 Francois-Xavier Coudert <coudert@clipper.ens.fr>
68 * gfortran.h: Add bitmasks for different FPE traps. Add fpe
70 * invoke.texi: Document the new -ffpe-trap option.
71 * lang.opt: Add -ffpe-trap option.
72 * options.c (gfc_init_options): Initialize the FPE option.
73 (gfc_handle_fpe_trap_option): New function to parse the argument
74 of the -ffpe-trap option.
75 (gfc_handle_option): Add case for -ffpe-trap.
76 * trans-decl.c: Declare a tree for the set_fpe library function.
77 (gfc_build_builtin_function_decls): Build this tree.
78 (gfc_generate_function_code): Generate a call to set_fpe at
79 the beginning of the main program.
80 * trans.h: New tree for the set_fpe library function.
82 2005-10-12 Paul Thomas <pault@gcc.gnu.org>
86 * symbol.c (check_conflict): Prevent common variables and
87 function results from having the SAVE attribute,as required
90 2005-10-12 Paul Thomas <pault@gcc.gnu.org>
93 * resolve.c (resolve_symbol): Exclude use and host associated
94 symbols from the test for private objects in a public namelist.
96 2005-10-12 Jakub Jelinek <jakub@redhat.com>
98 * trans-common.c (build_field): Fix comment typo.
99 (create_common): Set backend_decl of COMMON or EQUIVALENCEd
100 variables to a VAR_DECL with the COMPONENT_REF in
101 DECL_HAS_VALUE_EXPR rather than COMPONENT_REF directly.
102 * f95-lang.c (gfc_expand_function): Emit debug info for
103 EQUIVALENCEd variables if the equiv union is going to be output.
105 2005-10-11 Steven G. Kargl <kargls@comcast.net>
108 * iresolve.c (gfc_resolve_aint, gfc_resolve_anint): Type conversion
111 2005-10-11 Jakub Jelinek <jakub@redhat.com>
113 * f95-lang.c (gfc_init_decl_processing): Initialize
116 2005-10-07 Erik Edelmann <erik.edelmann@iki.fi>
119 * resolve.c (find_array_spec): Search through the list of
120 components in the symbol of the type instead of the symbol of the
123 2005-10-05 Richard Guenther <rguenther@suse.de>
126 * parse.c (gfc_parse_file): Exit early for empty files.
128 2005-10-03 Steve Ellcey <sje@cup.hp.com>
130 * fortran/trans-types.c (gfc_init_kinds): Only pass float, double,
131 and long double floating point types through to Fortran compiler.
133 2005-10-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
136 * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long
137 double builtin function.
138 (gfc_init_builtin_functions): Add mfunc_longdouble,
139 mfunc_clongdouble and func_clongdouble_longdouble trees. Build
140 them for round, trunc, cabs, copysign and pow functions.
141 * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add
142 case for kind 10 and 16.
143 * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16,
144 exponent10 and exponent16.
145 (gfc_build_intrinsic_function_decls): Build nodes for int16,
146 real10, real16, complex10 and complex16 types. Build all possible
147 combinations for function _gfortran_pow_?n_?n. Build function
148 calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16.
149 * trans-expr.c (gfc_conv_power_op): Add case for integer(16),
150 real(10) and real(16).
151 * trans-intrinsic.c: Add suppport for long double builtin
152 functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION
154 (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and
156 (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl
157 and real16_decl in library functions.
158 (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex
160 (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16)
162 (gfc_conv_intrinsic_sign): Likewise.
163 (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind.
164 * trans-types.c (gfc_get_int_type, gfc_get_real_type,
165 gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in
166 the case of kinds not available.
167 * trans.h: Declare trees for cpowl10, cpowl16, ishftc16,
168 exponent10 and exponent16.
170 2005-10-01 Paul Thomas <pault@gcc.gnu.org>
179 * gfortran.h: Prototype for gfc_add_in_equivalence.
180 * match.c (gfc_match_equivalence): Make a structure component
181 an explicit,rather than a syntax, error in an equivalence
182 group. Call gfc_add_in_equivalence to add the constraints
183 imposed in check_conflict.
184 * resolve.c (resolve_symbol): Add constraints: No public
185 structures with private-type components and no public
186 procedures with private-type dummy arguments.
187 (resolve_equivalence_derived): Add constraint that prevents
188 a structure equivalence member from having a default
190 (sequence_type): New static function to determine whether an
191 object is default numeric, default character, non-default
192 or mixed sequence. Add corresponding enum typespec.
193 (resolve_equivalence): Add constraints to equivalence groups
194 or their members: No more than one initialized member and
195 that different types are not equivalenced for std=f95. All
196 the simple constraints have been moved to check_conflict.
197 * symbol.c (check_conflict): Simple equivalence constraints
198 added, including those removed from resolve_symbol.
199 (gfc_add_in_equivalence): New function to interface calls
200 match_equivalence to check_conflict.
202 2005-09-27 Jakub Jelinek <jakub@redhat.com>
205 * trans-common.c (build_equiv_decl): Add IS_SAVED argument.
206 If it is true, set TREE_STATIC on the decl.
207 (create_common): If any symbol in equivalence has SAVE attribute,
208 pass true as last argument to build_equiv_decl.
210 2005-09-24 Janne Blomqvist <jblomqvi@cc.hut.fi>
212 * trans-io.c (gfc_build_io_library_fndecls): Add entry
213 iocall_x_array for transfer_array.
214 (transfer_array_desc): New function.
215 (gfc_trans_transfer): Add code to call transfer_array_desc.
217 2005-09-26 Jakub Jelinek <jakub@redhat.com>
220 * symbol.c (gfc_is_var_automatic): Return true if character length
221 is non-constant rather than constant.
222 * resolve.c (gfc_resolve): Don't handle !gfc_option.flag_automatic
224 * options.c (gfc_post_options): Set gfc_option.flag_max_stack_var_size
225 to 0 for -fno-automatic.
227 2005-09-23 Paul Thomas <pault@gcc.gnu.org>
230 * module.c (mio_component_ref): Return if the symbol is NULL
231 and wait for another iteration during module reads.
232 (mio_symtree_ref): Suppress the writing of contained symbols,
233 when a symbol is available in the main namespace.
234 (read_module): Restrict scope of special treatment of contained
235 symbols to variables only and suppress redundant call to
238 2005-09-22 Steven G. Kargl <kargls@comcast.net>
241 * interface.c (check_interface1): Fix NULL dereference.
243 2005-09-22 Erik Edelmann <erik.edelmann@iki.fi>
246 * resolve.c (derived_inaccessible): New function.
247 (resolve_transfer): Use it to check for private
250 2005-09-22 Steven G. Kargl <kargls@comcast.net>
253 * intrinsic.c (add_function): Add IMAG, IMAGPART, and REALPART
255 * intrinsic.h: Prototypes for gfc_simplify_realpart and
256 gfc_resolve_realpart.
257 * intrinsic.texi: Document intrinsic procedures.
258 * simplify.c (gfc_simplify_realpart): New function.
259 * irseolve.c (gfc_resolve_realpart): New function.
261 2005-09-21 Erik Edelmann <erik.edelmann@iki.fi>
264 * trans-stmt.c (gfc_trans_deallocate): Check if the
265 object to be deallocated is an array by looking at
266 expr->rank instead of expr->symtree->n.sym->attr.dimension.
268 2005-09-20 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
271 * io.c (resolve_tag): Don't allow non-CHARACTER constants as formats.
272 (match_io): Fix usage of gfc_find_symbol.
274 2005-09-20 Jakub Jelinek <jakub@redhat.com>
277 * primary.c (match_actual_arg): Handle ENTRY the same way
280 2005-09-18 Francois-Xavier Coudert <coudert@clipper.ens.fr>
282 * Make-lang.in: Make check-fortran alias for check-gfortran.
284 2005-09-18 Andreas Jaeger <aj@suse.de>
286 * module.c (read_module): Add missed line from last patch.
288 2005-09-18 Erik Edelmann <erik.edelmann@iki.fi>
291 * resolve.c (resolve_symbol): Don't assign default
292 initializer to pointers.
294 2005-09-18 Paul Thomas <pault@gcc.gnu.org>
297 * module.c (read_module): Give symbols from module procedures
298 different true_name entries to those from the module proper.
300 2005-09-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
303 * arith.c (gfc_arith_error): Add translation support for error
305 * array.c (gfc_match_array_ref): Likewise.
306 (gfc_match_array_spec): Likewise.
307 * check.c (must_be): Add msgid convention to third argument.
308 (same_type_check): Add translation support for error message.
309 (rank_check): Likewise.
310 (kind_value_check): Likewise.
311 (gfc_check_associated): Correct typo.
312 (gfc_check_reshape): Add translation support for error message.
313 (gfc_check_spread): Likewise.
314 * error.c (error_printf): Add nocmsgid convention to argument.
315 (gfc_warning, gfc_notify_std, gfc_warning_now, gfc_warning_check)
316 (gfc_error, gfc_error_now): Likewise.
317 (gfc_status): Add cmsgid convention to argument.
318 * expr.c (gfc_extract_int): Add translation support for error
320 (gfc_check_conformance): Add msgid convention to argument.
321 (gfc_check_pointer_assign): Correct tabbing.
322 * gfortran.h: Include intl.h header. Remove prototype for gfc_article.
323 * gfortranspec.c: Include intl.h header.
324 (lang_specific_driver): Add translation support for --version.
325 * io.c (check_format): Add translation support for error message.
326 (format_item_1): Likewise.
327 (data_desc): Likewise.
328 * matchexp.c: Likewise.
329 * misc.c (gfc_article): Remove function.
330 * module.c (bad_module): Use msgid convention. Add translation support
332 (require_atom): Add translation support for error messages.
333 * parse.c (gfc_ascii_statement): Likewise.
334 (gfc_state_name): Likewise.
335 * primary.c (match_boz_constant): Reorganise error messages for
337 * resolve.c (resolve_entries): Likewise.
338 (resolve_operator): Add translation support for error messages.
339 (gfc_resolve_expr): Use msgid convention. Reorganise error messages
341 (resolve_symbol): Add translation support for error messages.
342 * symbol.c (gfc_add_procedure): Remove use of gfc_article function.
343 * trans-const.c (gfc_build_string_const): Use msgid convention.
345 2005-09-16 Paul Brook <paul@codesourcery.com>
348 * dependency.c (transform_sections): Divide by correct value.
351 2005-09-14 Paul Thomas <pault@gcc.gnu.org>
353 PR fortran/21875 Internal Unit Array I/O, NIST
354 * fortran/trans-io.c (gfc_build_io_library_fndecls): Add field for
355 array descriptor to IOPARM structure.
356 * fortran/trans-io.c (set_internal_unit): New function to generate code
357 to store the character (array) and the character length for an internal
359 * fortran/trans-io (build_dt): Use the new function set_internal_unit.
361 2005-09-14 Paul Thomas <pault@gcc.gnu.org>
364 * trans-array.c (gfc_trans_dummy_array_bias): correct the typo
365 which uses dim[i].upper for lbound, rather than dim[i].lower.
367 2005-09-13 Erik Edelmann <erik.edelmann@iki.fi>
370 * trans-expr.c (gfc_trans_arrayfunc_assign): Check value
371 of attr.elemental for specific function instead of generic name.
373 2005-09-13 Richard Sandiford <richard@codesourcery.com>
376 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Move initialization
377 of argse. Remove now-redundant want_pointer assignment.
378 * trans-array.c (gfc_conv_expr_descriptor): When not assigning to
379 a pointer, keep the original bounds of a full array reference.
381 2005-09-13 Richard Sandiford <richard@codesourcery.com>
384 * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift)
385 (gfc_resolve_pack, gfc_resolve_reshape, gfc_resolve_spread)
386 (gfc_resolve_transpose, gfc_resolve_unpack): Add "_char" to the name
387 for character-based operations.
388 (gfc_resolve_pack): Remove ATTRIBUTE_UNUSED from array argument.
389 (gfc_resolve_unpack): Copy the whole typespec from the vector.
390 * trans-array.c (gfc_conv_expr_descriptor): In the EXPR_FUNCTION
391 case, get the string length from the scalarization state.
393 2005-09-14 Francois-Xavier Coudert <coudert@clipper.ens.fr>
395 * Make-lang.in: Change targets prefixes from f95 to fortran.
396 * config-lang.in: Change language name to "fortran".
397 * lang.opt: Change language name to "fortran".
398 * options.c: Change CL_F95 to CL_Fortran.
400 2005-09-09 Thomas Koenig <Thomas.Koenig@online.de>
402 gfortran.texi: Document IOSTAT= specifier.
404 2005-09-09 Thomas Koenig <Thomas.Koenig@online.de>
406 * gfortran.h: Add iomsg to gfc_open, gfc_close, gfc_filepos,
407 gfc_inquire and gfc_dt.
408 * dump-parse-tree.c (gfc_show_code_node): Add iomsg
409 for open, close, file positioning, inquire and namelist.
410 * io.c (io_tag): Add tag_iomsg.
411 (resolve_tag): Add standards warning for iomsg.
412 (match_open_element): Add iomsg.
413 (gfc_free_open): Add iomsg.
414 (gfc_resolve_open): Add iomsg.
415 (gfc_free_close): Add iomsg.
416 (match_close_element): Add iomsg.
417 (gfc_resolve_close): Add iomsg.
418 (gfc_free_filepos): Add iomsg.
419 (match_file_element): Add iomsg.
420 (gfc_resolve_filepos): Add iostat and iomsg.
421 (match-dt_element): Add iomsg.
422 (gfc_free_dt): Add iomsg.
423 (gfc_resolve_dt): Add iomsg.
424 (gfc_free_inquire): Add iomsg.
425 (match_inquire_element): Add iomsg.
426 (gfc_resolve_inquire): Add iomsg.
427 * trans_io.c: Add ioparm_iomsg and ioparm_iomsg_len.
428 (gfc_build_io_library_fndecls): Add iomsg as last field.
429 (gfc_trans_open): Add iomsg.
430 (gfc_trans_close): Add iomsg.
431 (build_fileos): Call set_string for iomsg.
432 (gfc_trans_inquire): Add iomsg.
433 (build_dt): Add iomsg.
435 2005-09-09 Richard Sandiford <richard@codesourcery.com>
437 * match.h (gfc_match_equiv_variable): Declare.
439 2005-09-09 Richard Sandiford <richard@codesourcery.com>
442 * Makefile.in (fortran/trans-expr.o): Depend on dependency.h.
443 * dependency.h (gfc_ref_needs_temporary_p): Declare.
444 * dependency.c (gfc_ref_needs_temporary_p): New function.
445 (gfc_check_fncall_dependency): Use it instead of inlined check.
446 By so doing, take advantage of the fact that character substrings
447 within an array reference also need a temporary.
448 * trans.h (GFC_SS_VECTOR): Adjust comment.
449 * trans-array.c (gfc_free_ss): Remove GFC_SS_VECTOR case.
450 (gfc_set_vector_loop_bounds): New function.
451 (gfc_add_loop_ss_code): Call it after evaluating the subscripts of
452 a GFC_SS_SECTION. Deal with the GFC_SS_VECTOR case by evaluating
453 the vector expression and caching its descriptor for use within
455 (gfc_conv_array_index_ref, gfc_conv_vector_array_index): Delete.
456 (gfc_conv_array_index_offset): Handle scalar, vector and range
457 dimensions as separate cases of a switch statement. In the vector
458 case, use the loop variable to calculate a vector index and use the
459 referenced element as the dimension's index. Perform bounds checking
461 (gfc_conv_section_upper_bound): Return null for vector indexes.
462 (gfc_conv_section_startstride): Give vector indexes a start value
463 of 0 and a stride of 1.
464 (gfc_conv_ss_startstride): Adjust for new GFC_SS_VECTOR representation.
465 (gfc_conv_expr_descriptor): Expand comments. Generalize the
466 handling of the !want_pointer && !direct_byref case. Use
467 gfc_ref_needs_temporary_p to decide whether the variable case
469 (gfc_walk_variable_expr): Handle DIMEN_VECTOR by creating a
471 * trans-expr.c: Include dependency.h.
472 (gfc_trans_arrayfunc_assign): Fail if the target needs a temporary.
474 2005-09-09 Richard Sandiford <richard@codesourcery.com>
477 * trans.h (gfc_interface_sym_mapping, gfc_interface_mapping): Moved
479 (gfc_init_interface_mapping, gfc_free_interface_mapping)
480 (gfc_add_interface_mapping, gfc_finish_interface_mapping)
481 (gfc_apply_interface_mapping): Declare.
482 * trans-array.h (gfc_set_loop_bounds_from_array_spec): Declare.
483 (gfc_trans_allocate_temp_array): Add pre and post block arguments.
484 * trans-array.c (gfc_set_loop_bounds_from_array_spec): New function.
485 (gfc_trans_allocate_array_storage): Replace loop argument with
486 separate pre and post blocks.
487 (gfc_trans_allocate_temp_array): Add pre and post block arguments.
488 Update call to gfc_trans_allocate_array_storage.
489 (gfc_trans_array_constructor, gfc_conv_loop_setup): Adjust for new
490 interface to gfc_trans_allocate_temp_array.
491 * trans-expr.c (gfc_interface_sym_mapping, gfc_interface_mapping):
493 (gfc_init_interface_mapping, gfc_free_interface_mapping)
494 (gfc_add_interface_mapping, gfc_finish_interface_mapping)
495 (gfc_apply_interface_mapping): Make extern.
496 (gfc_conv_function_call): Build an interface mapping for array
497 return values too. Call gfc_set_loop_bounds_from_array_spec.
498 Adjust call to gfc_trans_allocate_temp_array so that code is
499 added to SE rather than LOOP.
501 2005-09-09 Richard Sandiford <richard@codesourcery.com>
504 * trans.h (gfor_fndecl_internal_realloc): Declare.
505 (gfor_fndecl_internal_realloc64): Declare.
506 * trans-decl.c (gfor_fndecl_internal_realloc): New variable.
507 (gfor_fndecl_internal_realloc64): New variable.
508 (gfc_build_builtin_function_decls): Initialize them.
509 * trans-array.h (gfc_trans_allocate_temp_array): Add a fourth argument.
510 * trans-array.c (gfc_trans_allocate_array_storage): Add an argument
511 to say whether the array can grow later. Don't allocate the array
512 on the stack if so. Don't call malloc for zero-sized arrays.
513 (gfc_trans_allocate_temp_array): Add a similar argument here.
514 Pass it along to gfc_trans_allocate_array_storage.
515 (gfc_get_iteration_count, gfc_grow_array): New functions.
516 (gfc_iterator_has_dynamic_bounds): New function.
517 (gfc_get_array_constructor_element_size): New function.
518 (gfc_get_array_constructor_size): New function.
519 (gfc_trans_array_ctor_element): Replace pointer argument with
521 (gfc_trans_array_constructor_subarray): Likewise. Take an extra
522 argument to say whether the variable-sized part of the constructor
523 must be allocated using realloc. Grow the array when this
525 (gfc_trans_array_constructor_value): Likewise.
526 (gfc_get_array_cons_size): Delete.
527 (gfc_trans_array_constructor): If the loop bound has not been set,
528 split the allocation into a static part and a dynamic part. Set
529 loop->to to the bounds for static part before allocating the
530 temporary. Adjust call to gfc_trans_array_constructor_value.
531 (gfc_conv_loop_setup): Allow any constructor to determine the
532 loop bounds. Check whether the constructor has a dynamic size
533 and prefer to use something else if so. Expect the loop bound
534 to be set later. Adjust call to gfc_trans_allocate_temp_array.
535 * trans-expr.c (gfc_conv_function_call): Adjust another call here.
537 2005-09-09 Paul Thomas <pault@gcc.gnu.org>
540 * module.c (find_use_name_n): Based on original
541 find_use_name. Either counts number of use names for a
542 given real name or returns use name n.
543 (find_use_name, number_use_names): Interfaces to the
544 function find_use_name_n.
545 (read_module): Add the logic and calls to these functions,
546 so that mutiple reuses of the same real name are loaded.
548 2005-09-09 Paul Thomas <pault@gcc.gnu.org>
555 * gfortran.h: Move definition of BLANK_COMMON_NAME from trans-
556 common.c so that it is accessible to module.c. Add common_head
557 field to gfc_symbol structure. Add field for the equivalence
558 name AND new attr field, in_equivalence.
559 * match.c (gfc_match_common, gfc_match_equivalence): In loops
560 that flag common block equivalences, emit an error if the
561 common blocks are different, using sym->common_head as the
562 common block identifier. Ensure that symbols that are equivalence
563 associated with a common block are marked as being in_common.
564 * module.c (write_blank_common): New.
565 (write_common): Use unmangled common block name.
566 (load_equiv): New function ported from g95.
567 (read_module): Call load_equiv.
568 (write_equiv): New function ported from g95. Correct
569 string referencing for gfc functions. Give module
570 equivalences a unique name.
571 (write_module): Call write_equiv and write_blank_common.
572 * primary.c (match_variable) Old gfc_match_variable, made
573 static and third argument provided to indicate if parent
574 namespace to be visited or not.
575 (gfc_match_variable) New. Interface to match_variable.
576 (gfc_match_equiv_variable) New. Interface to match_variable.
577 * trans-common.c (finish_equivalences): Provide the call
578 to create_common with a gfc_common_header so that
579 module equivalences are made external, rather than local.
580 (find_equivalences): Ensure that all members in common block
581 equivalences are marked as used. This prevents the subsequent
582 call to this function from making local unions.
583 * trans-decl.c (gfc_generate_function_code): Move the call to
584 gfc_generate_contained_functions to after the call to
585 gfc_trans_common so the use-associated, contained common
586 blocks produce the correct references.
587 (gfc_create_module_variable): Return for equivalenced symbols
588 with existing backend declaration.
590 2005-09-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
593 * match.c (gfc_match_common): Remove unnecessary / wrong special
594 cases for end-of-statement.
596 2005-09-08 Janne Blomqvist <jblomqvi@cc.hut.fi>
598 * gfortran.texi: Add section about implemented F2003 features.
600 2005-09-08 Richard Sandiford <richard@codesourcery.com>
603 * trans-array.c (gfc_add_loop_ss_code): Set ss->string_length in
604 the GFC_SS_FUNCTION case too.
605 * trans-expr.c (gfc_conv_function_val): Allow symbols to be bound
606 to function pointers as well as function decls.
607 (gfc_interface_sym_mapping, gfc_interface_mapping): New structures.
608 (gfc_init_interface_mapping, gfc_free_interface_mapping)
609 (gfc_get_interface_mapping_charlen, gfc_get_interface_mapping_array)
610 (gfc_set_interface_mapping_bounds, gfc_add_interface_mapping)
611 (gfc_finish_interface_mapping, gfc_apply_interface_mapping_to_cons)
612 (gfc_apply_interface_mapping_to_ref)
613 (gfc_apply_interface_mapping_to_expr)
614 (gfc_apply_interface_mapping): New functions.
615 (gfc_conv_function_call): Evaluate the arguments before working
616 out where the result should go. Make the null pointer case provide
617 the string length in parmse.string_length. Cope with non-constant
618 string lengths, using the above functions to evaluate such lengths.
619 Use a temporary typespec; don't assign to sym->cl->backend_decl.
620 Don't assign to se->string_length when returning a cached array
623 2005-09-08 Richard Sandiford <richard@codesourcery.com>
626 * trans-array.c (gfc_conv_array_ref): Call gfc_advance_se_ss_chain
627 after handling scalarized references. Make "indexse" inherit from
628 "se" when handling AR_ELEMENTs.
629 (gfc_walk_variable_expr): Add GFC_SS_SCALAR entries for each
630 substring or scalar reference that follows an array section.
631 * trans-expr.c (gfc_conv_variable): When called from within a
632 scalarization loop, start out with "ref" pointing to the scalarized
633 part of the reference. Don't call gfc_advance_se_ss_chain here.
635 2005-09-07 Richard Sandiford <richard@codesourcery.com>
638 * trans-expr.c (gfc_trans_pointer_assignment): Assign to a temporary
639 descriptor if the rhs is not a null pointer or variable.
641 2005-09-07 Thomas Koenig <Thomas.Koenig@online.de>
644 * symbol.c(check_conflict): Add conflict for parameter/save,
646 2005-09-06 Richard Sandiford <richard@codesourcery.com>
649 * simplify.c (gfc_simplify_transpose): Set the result's typespec from
650 the source, not the first element of the return value.
652 2005-09-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
655 * io.c (match_io): Correctly backup if PRINT followed by
656 symbol which is not a namelist. Force blank between PRINT
657 and namelist in free form.
659 2005-08-31 Francois-Xavier Coudert <coudert@clipper.ens.fr>
662 * gfortran.h (gfc_option_t): Add flag_automatic.
663 * invoke.texi: Document the -fno-automatic option.
664 * lang.opt: Add a -fautomatic option.
665 * options.c (gfc_init_options): Default for -fautomatic is on.
666 (gfc_handle_option): Add handling of -fautomatic option.
667 * resolve.c (gfc_resolve): When -fno-automatic is used, mark
668 needed variables as SAVE.
670 2005-08-27 Erik Edelmann <erik.edelmann@iki.fi>
672 * trans-array.c (gfc_trans_deferred_array): Fix comments.
674 2005-08-27 Erik Schnetter <schnetter@aei.mpg.de>
676 * primary.c (match_charkind_name): Fix typo in comment leading to
679 2005-08-25 Erik Edelmann <eedelman@acclab.helsinki.fi>
682 * symbol.c (find_special): Remove.
683 (build_sym, add_init_expr, attr_decl1): Remove calls to
684 find_special in favor of calls to gfc_get_symbol.
686 2005-08-24 Thomas Koenig <Thomas.Koenig@online.de>
689 * gfortran.h (symbol_attribute): Add noreturn to the structure.
690 (gfc_intrinsic_sym): Add noreturn to the structure.
691 * intrinsic.c (make_noreturn): New function.
692 (add_subroutines): Mark subroutines abort and exit as noreturn.
693 (gfc_intrinsic_sub_interface): Copy noreturn attribute from
694 isym to the resolved symbol.
695 * trans-decl.c (gfc_get_extern_function_decl): Set function
696 as VOLATILE (== noreturn) if the noreturn attribute is set.
698 2005-08-21 Steven G. Kargl <kargls@comcast.net>
700 * decl.c: Typo in comment.
702 2005-08-21 Steven G. Kargl <kargls@comcast.net>
704 * array.c: Bump GFC_MAX_AC_EXPAND from 100 to 65535.
706 2005-08-21 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
708 * gfortran.h (gfc_option_t): Remove source field. Add
710 (gfc_new_file): Remove arguments in prototype.
711 (gfc_source_file): Make 'const char *'.
712 * f95-lang.c (gfc_init): Use gfc_source_file instead of
713 gfc_option.source. Call gfc_new_file without arguments.
714 * invoke.texi: Document new options '-fd-lines-as-code' and
715 '-fd-lines-as-comment'.
716 * lang.opt: Add new options. Alphabetize.
717 * options.c (gfc_init_options): Initialize gfc_source_file instead
718 of gfc_option.source. Initialize gfc_option.flag_d_lines.
719 (form_from_filename): Move here from scanner.c. Make
720 'filename' argument 'const'.
721 (gfc_post_options): Set gfc_source_file. Determine source form.
722 Warn if 'd-lines*' are used in free form.
723 * scanner.c (gfc_source_file): Constify.
724 (skip_fixed_comments): Deal with d-lines.
725 (get_file): Constify argument 'name'.
726 (load_file): Constify argument 'filename'.
727 (form_from_filename): Moved to options.c.
728 (gfc_new_file): Remove arguments. Don't initialize
729 gfc_source_file, don't determine source form.
730 * trans-const.c (gfc_init_constants): Use gfc_source_file instead
731 of gfc_option.source.
733 2005-08-19 Steven G. Kargl <kargls@comcast.net>
736 * gfortran.h: Remove PATH_MAX definition.
737 * module.c (write_module, gfc_dump_module): Use alloca to allocate
739 * scanner.c (gfc_release_include_path, form_from_filename): Ditto.
741 2004-08-16 Huang Chun <chunhuang73@hotmail.com>
743 * trans-expr.c (gfc_conv_power_op): Evaluate the expression before
746 2005-08-14 Asher Langton <langton2@llnl.gov>
748 * parse.c (match): Enclose macro in do...while(0) and braces.
750 2005-08-14 Paul Thomas <pault@gcc.gnu.org>
753 * gfortran.texi: Document PRINT namelist.
755 2005-08-14 Paul Thomas <pault@gcc.gnu.org>
758 * io.c (match_io): Add code to implement PRINT namelist.
760 2005-08-14 Canqun Yang <canqun@nudt.edu.cn>
762 * trans-stmt.c (gfc_trans_arithmetic_if): Optimized in case of equal
765 2005-08-11 Francois-Xavier Coudert <coudert@clipper.ens.fr>
766 Steven Bosscher <stevenb@suse.de>
769 * gfortran.h: Add is_main_program member to symbol_attribute.
770 * trans-decl: Add a gfor_fndecl_set_std tree.
771 (gfc_build_builtin_function_decls): Create it.
772 (gfc_generate_function_code): Add this call at the beginning of
774 * trans.c (gfc_generate_code): Move main_program and attr.
775 * trans.h: Add declaration for gfor_fndecl_set_std.
777 2005-08-10 Thomas Koenig <Thomas.Koenig@online.de>
780 gfortran.h: Declare new function gfc_resolve_dim_arg.
781 resolve.c: New function gfc_resolve_dim_arg.
782 iresolve.c (gfc_resolve_all): Use gfc_resolve_dim_arg.
783 (gfc_resolve_any): Likewise.
784 (gfc_resolve_count): Likewise.
785 (gfc_resolve_cshift): Likewise. If the kind of shift is less
786 gfc_default_integer_kind, convert it to default integer type.
787 (gfc_resolve_eoshift): Likewise.
788 (gfc_resolve_maxloc): Use gfc_resolve_dim_arg.
789 (gfc_resolve_maxval): Likewise.
790 (gfc_resolve_minloc): Likewise.
791 (gfc_resolve_minval): Likewise.
792 (gfc_resolve_product): Likewise.
793 (gfc_resolve_spread): Likewise.
794 (gfc_resolve_sum): Likewise.
796 2005-08-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
798 * check.c (gfc_check_ttynam_sub, gfc_check_isatty): Add check
799 functions for new intrinsics TTYNAM and ISATTY.
800 * intrinsic.c (add_functions, add_subroutines): Add new
802 * intrinsic.h: Add prototypes for new check and resolve
804 * iresolve.c (gfc_resolve_isatty, gfc_resolve_ttynam_sub): New
805 resolve functions for intrinsics TTYNAM and ISATTY.
806 * gfortran.h (gfc_generic_isym_id): Add symbol for ISATTY.
807 * trans-intrinsic.c: Add case for GFC_ISYM_ISATTY.
809 2005-08-09 Jakub Jelinek <jakub@redhat.com>
811 * scanner.c (preprocessor_line): Don't write beyond the end of flag
814 2005-08-07 Janne Blomqvist <jblomqvi@cc.hut.fi>
817 * dump-parse-tree.c (gfc_show_code_node): Add case for FLUSH.
818 * gfortran.h: Add enums for FLUSH.
819 * io.c (gfc_free_filepos,match_file_element,match_filepos): Modify
820 comment appropriately. (gfc_match_flush): New function.
821 * match.c (gfc_match_if): Add match for flush.
822 * match.h: Add prototype.
823 * parse.c (decode_statement): Add flush to 'f' case.
824 (next_statement): Add case for flush. (gfc_ascii_statement): Likewise.
825 * resolve.c (resolve_code): Add flush case.
826 * st.c (gfc_free_statement): Add flush case.
827 * trans-io.c: Add prototype for flush.
828 (gfc_build_io_library_fndecls): Build fndecl for flush.
829 (gfc_trans_flush): New function.
830 * trans-stmt.h: Add prototype.
831 * trans.c (gfc_trans_code): Add case for flush.
833 2005-08-06 Francois-Xavier Coudert <coudert@clipper.ens.fr>
835 * primary.c (match_hollerith_constant): Fix typo.
837 2005-08-06 Kazu Hirata <kazu@codesourcery.com>
839 * decl.c, dump-parse-tree.c, gfortran.texi, intrinsic.texi,
840 invoke.texi, resolve.c, trans-array.c, trans-array.h,
841 trans-common.c, trans-expr.c, trans-io.c, trans.h: Fix
842 comment/doc typos. Follow spelling conventions.
844 2005-08-06 Jakub Jelinek <jakub@redhat.com>
848 * primary.c (match_varspec): If equiv_flag, don't look at sym's
849 attributes, call gfc_match_array_ref up to twice and don't do any
850 substring or component processing.
851 * resolve.c (resolve_equivalence): Transform REF_ARRAY into
852 REF_SUBSTRING or nothing if needed. Check that substrings
853 don't have zero length.
855 2005-08-05 Thomas Koenig <Thomas.Koenig@online.de>
857 * trans-expr.c (gfc_build_builtin_function_decls): Mark
858 stop_numeric and stop_string as non-returning.
860 2005-08-04 Paul Brook <paul@codesourcery.com>
862 * trans-expr.c (gfc_conv_expr, gfc_conv_expr_type): Update comments.
863 (gfc_conv_expr_lhs): Fix assertion.
864 (gfc_conv_expr_val): Merge post block. Set se.expr to new value.
866 2005-08-02 David Edelsohn <edelsohn@gnu.org>
869 * expr.c (simplify_parameter_variable): Do not copy the subobject
870 references if the expression value is a constant.
872 * expr.c (gfc_simplify_expr): Evaluate constant substrings.
874 2005-07-31 Jerry DeLisle <jvdelisle@verizon.net>
876 * intrinsic.texi: Add documentation for exponent, floor, and fnum and
877 fix description of ceiling in index.
879 2005-07-31 Steven Bosscher <stevenb@suse.de>
881 * trans-decl.c (gfc_build_builtin_function_decls): Give the internal
882 malloc functions the 'malloc' attribute. Give runtime_error the
883 'noreturn' attribute.
885 2005-07-31 Steven Bosscher <stevenb@suse.de>
887 * trans-stmt.c (gfc_trans_goto): Jump to the known label instead
888 of the assigned goto variable.
890 2005-07-29 Steven Bosscher <stevenb@suse.de>
892 * trans-types.h (gfc_array_range_type): Add missing GTY decl for this.
894 2005-07-28 Andrew Pinski <pinskia@physics.uc.edu>
896 * fortran/f95-lang.c (language_function): Remove
897 named_labels, shadowed_labels, returns_value, returns_abnormally,
898 warn_about_return_type, and extern_inline fields.
899 (named_labels): Remove variable.
900 (gfc_init_decl_processing): Remove setting of named_labels.
902 2005-07-27 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
905 * resolve.c (resolve_operator): Improve diagnostic for comparison
906 of logicals with invalid operator.
908 2005-07-25 Jakub Jelinek <jakub@redhat.com>
911 * data.c (gfc_assign_data_value_range): Call
912 create_character_initializer if last_ts is a character type.
914 2005-07-22 Manfred Hollstein <mh@suse.com>
916 * match.c (gfc_match_symbol): Fix uninitialised warnings.
917 * matchexp.c (gfc_match_expr): Likewise.
919 2005-07-20 Giovanni Bajo <giovannibajo@libero.it>
921 Make CONSTRUCTOR use VEC to store initializers.
922 * trans-array.c (gfc_build_null_descriptor,
923 gfc_trans_array_constructor_value, gfc_conv_array_initializer):
924 Update to cope with VEC in CONSTRUCTOR_ELTS.
925 * trans-common.c (create_common): Likewise.
926 * trans-expr.c (gfc_conv_structure): Likewise.
927 * trans-stmt.c (gfc_trans_character_select): Use
928 build_constructor_from_list instead of build_constructor.
930 2005-07-19 Paul Thomas <pault@gcc.gnu.org>
933 * resolve.c (resolve_symbol): A symbol with FL_UNKNOWN
934 is matched against interfaces in parent namespaces. If there
935 the symtree is set to point to the interface.
937 2005-07-16 David Edelsohn <edelsohn@gnu.org>
940 * decl.c (do_parm): Adjust character initializer to character length
941 of symbol before assigning.
943 2005-07-14 Steve Ellcey <sje@cup.hp.com>
945 * trans-types.c (MAX_REAL_KINDS): Increase from 4 to 5.
947 2005-07-14 Jakub Jelinek <jakub@redhat.com>
949 * gfortran.h (MAX_ERROR_MESSAGE): Remove.
950 (gfc_error_buf): Add allocated and index fields. Change message
951 field from array to a pointer.
952 * error.c (use_warning_buffer, error_ptr, warning_ptr): Remove.
953 (cur_error_buffer): New variable.
954 (error_char): Use cur_error_buffer->{message,index} instead of
955 {warning,error}_{buffer.message,ptr}. Reallocate message buffer
957 (gfc_warning, gfc_notify_std, gfc_error, gfc_error_now): Setup
958 cur_error_buffer and its index rather than {warning,error}_ptr
959 and use_warning_buffer.
960 (gfc_warning_check, gfc_error_check): Don't print anything if
962 (gfc_push_error): Allocate saved message with xstrdup.
963 (gfc_pop_error): Free saved message with gfc_free.
964 (gfc_free_error): New function.
965 * primary.c (match_complex_constant): Call gfc_free_error if
966 gfc_pop_error will not be called.
967 * match.c (gfc_match_st_function): Likewise.
970 * scanner.c (preprocessor_line): Don't treat flag 3 as the start of a new
971 file. Fix file left but not entered warning.
973 2005-07-14 Feng Wang <fengwang@nudt.edu.cn>
974 Steven G. Kargl <kargls@comcast.net>
976 * array.c (resolve_character_array_constructor): Allocate gfc_charlen
977 for the array and attach to namespace list for automatic deallocation.
979 2005-07-13 Andreas Schwab <schwab@suse.de>
981 * Make-lang.in (fortran/dependency.o): Depend on
982 $(GFORTRAN_TRANS_DEPS).
984 2005-07-11 Jakub Jelinek <jakub@redhat.com>
986 * trans-stmt.c (gfc_trans_forall_loop): Clear maskindex before
988 (gfc_trans_assign_need_temp, gfc_trans_pointer_assign_need_temp,
989 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_2):
990 Don't clear maskindexes here.
992 2005-07-08 Daniel Berlin <dberlin@dberlin.org>
994 * trans-decl.c (create_function_arglist): DECL_ARG_TYPE_AS_WRITTEN
997 2005-07-08 Jakub Jelinek <jakub@redhat.com>
999 * primary.c (gfc_match_rvalue): Handle ENTRY the same way
1002 2005-07-07 Jakub Jelinek <jakub@redhat.com>
1004 * scanner.c (load_line): Add pbuflen argument, don't make
1005 buflen static. If maxlen == 0 or preprocessor_flag,
1006 don't truncate at buflen, but at maxlen. In xrealloc add
1007 1 byte at the end for the terminating '\0'. Don't fill
1008 with spaces up to buflen, but gfc_option.fixed_line_length.
1009 (load_file): Adjust load_line caller. Add line_len variable.
1011 * scanner.c (preprocessor_line): Only set current_file->line when errors
1012 have not been encountered. Warn and don't crash if a file leave
1013 preprocessor line has no corresponding entering line. Formatting.
1015 2005-07-07 Steven Bosscher <stevenb@suse.de>
1017 * primary.c (match_hollerith_constant): Use int, not unsigned int,
1018 for the hollerith length. Fix indentation.
1020 2005-07-07 Feng Wang <fengwang@nudt.edu.cn>
1025 * arith.c (gfc_hollerith2int, gfc_hollerith2real,
1026 gfc_hollerith2complex, gfc_hollerith2character, gfc_hollerith2logical):
1028 (eval_intrinsic): Don't evaluate if Hollerith constant arguments exist.
1029 * arith.h (gfc_hollerith2int, gfc_hollerith2real,
1030 gfc_hollerith2complex, gfc_hollerith2character, gfc_hollerith2logical):
1032 * expr.c (free_expr0): Free memery allocated for Hollerith constant.
1033 (gfc_copy_expr): Allocate and copy string if Expr is from Hollerith.
1034 (gfc_check_assign): Enable conversion from Hollerith to other.
1035 * gfortran.h (bt): Add BT_HOLLERITH.
1036 (gfc_expr): Add from_H flag.
1037 * intrinsic.c (gfc_type_letter): Return 'h' for BT_HOLLERITH.
1038 (add_conversions): Add conversions from Hollerith constant to other.
1039 (do_simplify): Don't simplify if Hollerith constant arguments exist.
1040 * io.c (resolve_tag): Enable array in FORMAT tag under GFC_STD_GNU.
1041 * misc.c (gfc_basetype_name): Return "HOLLERITH" for BT_HOLLERITH.
1042 (gfc_type_name): Print "HOLLERITH" for BT_HOLLERITH.
1043 * primary.c (match_hollerith_constant): New function.
1044 (gfc_match_literal_constant): Add match Hollerith before Integer.
1045 * simplify.c (gfc_convert_constant): Add conversion from Hollerith
1047 * trans-const.c (gfc_conv_constant_to_tree): Use VIEW_CONVERT_EXPR to
1048 convert Hollerith constant to tree.
1049 * trans-io.c (gfc_convert_array_to_string): Get array's address and
1050 length to set string expr.
1051 (set_string): Deal with array assigned Hollerith constant and character
1053 * gfortran.texi: Document Hollerith constants as extention support.
1055 2005-07-07 Feng Wang <fengwang@nudt.edu.cn>
1058 * trans-array.c (gfc_trans_array_constructor_value): Fix index of data.
1060 2005-07-07 Jakub Jelinek <jakub@redhat.com>
1062 * decl.c (gfc_match_entry): Allow ENTRY without parentheses
1065 2005-07-03 Kazu Hirata <kazu@codesourcery.com>
1067 * gfortran.texi, intrinsic.texi: Fix typos.
1068 * symbol.c: Fix a comment typo.
1070 2005-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1072 * error.c (error_printf, error_print): Use ATTRIBUTE_GCC_GFC.
1073 * gfortran.h (ATTRIBUTE_GCC_GFC): New.
1074 (gfc_warning, gfc_warning_now, gfc_error, gfc_error_now,
1075 gfc_fatal_error, gfc_internal_error, gfc_notify_std): Use
1078 2005-07-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1081 * io.c (match_dt_element): Do not allow END tag in PRINT or
1084 2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
1086 * lang.opt: Remove "." from end of help texts.
1088 2005-07-01 Jerry DeLisle <jvdelisle@verizon.net>
1090 * gfortran.texi: Fix typos and grammar.
1091 * invoke.texi: Fix typos and grammar.
1092 * intrinsic.texi: Add documentaion for eoshift, epsilon, etime, and
1093 exit. Fixed alignment of text for dtime syntax. Fixed a few line
1096 2005-06-25 Jakub Jelinek <jakub@redhat.com>
1098 * trans-stmt.c (gfc_trans_forall_1): Prefer to use smaller logical
1099 type than boolean_type_node.
1101 2005-06-25 Kelley Cook <kcook@gcc.gnu.org>
1103 * all files: Update FSF address in copyright headers.
1105 2005-06-24 Jerry DeLisle <jvdelisle@verizon.net>
1108 * gfortran.h: Add symbols for new intrinsic functions.
1109 * intrinsic.c: Add new functions acosh, asinh, and atanh.
1110 * intrinsic.h: Add prototypes for the new functions.
1111 * iresolve.c (gfc_resolve_acosh): New function.
1112 (gfc_resolve_asinh): New function.
1113 (gfc_resolve_atanh): New function.
1114 * mathbuiltins.def: Add defines.
1115 * simplify.c (gfc_simplify_acosh): New function.
1116 (gfc_simplify_asinh): New function.
1117 (gfc_simplify_atanh): New function.
1119 2005-06-24 Feng Wang <fengwang@nudt.edu.cn>
1121 * simplify.c (gfc_simplify_modulo): Don't clear before get result.
1123 2005-06-22 Paul Brook <paul@codesourcery.com>
1126 * symbol.c (gfc_is_var_automatic): New function.
1127 (save_symbol): Use it.
1129 2005-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1130 Paul Thomas <pault@gcc.gnu.org>
1134 * module.c (mio_namelist): New function. Correct to set
1135 namelist_tail and to give error on renaming namelist by use
1137 (mio_symbol): Call mio_namelist.
1139 2005-06-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1141 * gfortran.h: Add flag_backslash compile-time option.
1142 * lang.opt: Add support for -fbackslash option.
1143 * options.c: Likewise.
1144 * primary.c: Implement behavior for -fno-backslash.
1145 * invoke.texi: Add doc for -fbackslash option.
1146 * gfortran.texi: Remove mention of -fno-backslash as a
1149 2005-06-20 Steven G. Kargl <kargls@comcast.net>
1153 * match.c (gfc_match_label): Detect duplicate labels.
1156 2005-06-20 Erik Edelmann <erik.edelmann@iki.fi>
1158 * intrinsic.c (check_intrinsic_standard): Fix spelling error
1159 in a warning message.
1161 2005-06-18 Erik Edelman <eedelman@acclab.helsinki.fi>
1162 Steven G. Kargl <kargls@comast.net>
1165 * primary.c (gfc_match_rvalue): expr_type can be EXPR_CONSTANT
1166 for an array; check that sym->as is NULL.
1169 2005-06-18 Steven G. Kargl <kargls@comcast.net>
1171 * intrinsic.c (gfc_intrinsic_func_interface): Enable errors for generic
1172 functions whose simplification routine return FAILURE.
1174 2005-06-13 Geoffrey Keating <geoffk@apple.com>
1176 * Make-lang.in (fortran.install-man): Doesn't depend on installdirs.
1177 (rule for installing f95.1 manpage): Does depend on installdirs.
1179 2005-06-13 Jakub Jelinek <jakub@redhat.com>
1182 * trans-stmt.c (gfc_trans_forall_loop): Only increment maskindex
1183 in the innermost loop.
1185 * trans-expr.c (gfc_conv_function_call): Return int instead of
1186 void. Use a local variable for has_alternate_specifier and
1187 return it. Avoid modification of function type's return value
1188 in place, since it may be shared.
1189 * trans.h (has_alternate_specifier): Remove.
1190 (gfc_conv_function_call): Change return type.
1191 * trans-stmt.c (has_alternate_specifier): Remove.
1192 (gfc_trans_call): Add a local has_alternate_specifier variable,
1193 set it from gfc_conv_function_call return value.
1195 2005-06-12 Richard Henderson <rth@redhat.com>
1197 * trans-array.c (gfc_conv_descriptor_data_get): Rename from
1198 gfc_conv_descriptor_data. Cast the result to the DATAPTR type.
1199 (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): New.
1200 (gfc_trans_allocate_array_storage): Use them.
1201 (gfc_array_allocate, gfc_array_deallocate): Likewise.
1202 (gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor): Likewise.
1203 (gfc_trans_deferred_array): Likewise.
1204 * trans-expr.c (gfc_conv_function_call): Likewise.
1205 (gfc_trans_subcomponent_assign): Likewise.
1206 (gfc_trans_pointer_assignment): Likewise.
1207 * trans-intrinsic.c (gfc_conv_allocated): Likewise.
1208 * trans-types.c (gfc_array_descriptor_base): New.
1209 (gfc_get_element_type): Use GFC_TYPE_ARRAY_DATAPTR_TYPE.
1210 (gfc_get_array_descriptor_base): Break out from ...
1211 (gfc_get_array_type_bounds): ... here. Create type variants.
1212 * trans-array.h (gfc_conv_descriptor_data_get): Declare.
1213 (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): Declare.
1215 2005-06-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1217 * trans-expr.c (gfc_conv_variable): POINTER results don't need f2c
1218 calling conventions. Look at sym instead of sym->result.
1219 * trans-types.c (gfc_sym_type): Remove workaround for frontend bug.
1220 Remove condition which is always false with workaround removed.
1221 (gfc_return_by_reference): Always look at sym, never at sym->result.
1223 2005-06-11 Steven G. Kargl <kargls@comcast.net>
1227 * trans-array.c (gfc_array_deallocate): pstat is new argument
1228 (gfc_array_allocate): update gfc_array_deallocate() call.
1229 (gfc_trans_deferred_array): ditto.
1230 * trans-array.h: update gfc_array_deallocate() prototype.
1231 * trans-decl.c (gfc_build_builtin_function_decls): update declaration
1232 * trans-stmt.c (gfc_trans_deallocate): Implement STAT= feature.
1234 2005-06-07 Jerry DeLisle <jvdelisle@verizon.net>
1236 * intrinsic.texi: Add documentation for dcmplx, digits,
1237 dim, idim, ddim, dot_product, dprod, dreal, and dtime.
1239 2005-06-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1242 * trans-array.c (gfc_trans_array_constructor_value): Slightly reorder.
1243 Generate correct exit condition in case of negative steps in
1246 * invoke.texi: Fix description of flags required for compatibility
1249 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1250 Erik Schnetter <schnetter@aei.mpg.de>
1253 * trans.c (gfc_get_backend_locus): Remove unnecessary adjustment,
1254 remove FIXME comment.
1256 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1258 * match.c (match_forall_iterator): Don't immediately give error if '='
1259 is not followed by an expression.
1261 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1262 Erik Edelmann <erik.edelmann@iki.fi>
1264 * array.c (gfc_match_array_constructor): Disallow empty array
1267 2005-06-03 Jerry DeLisle <jvdelisle@verizon.net>
1269 * fortran/intrinsic.texi: Add documentation for
1270 command_argument_count, conjg, dconjg, count,
1271 cpu_time, cshift, date_and_time, dble, dfloat.
1273 2005-06-01 Roger Sayle <roger@eyesopen.com>
1275 * intrinsic.c (add_conv): No longer take a "simplify" argument as
1276 its always gfc_convert_constant, instead take a "standard" argument.
1277 (add_conversions): Change all existing calls of add_conv to pass
1278 GFC_STD_F77 as appropriate. Additionally, if we're allowing GNU
1279 extensions support integer-logical and logical-integer conversions.
1280 (gfc_convert_type_warn): Warn about use the use of these conversions
1281 as a extension when appropriate, i.e. with -pedantic.
1282 * simplify.c (gfc_convert_constant): Add support for integer to
1283 logical and logical to integer conversions, using gfc_int2log and
1285 * arith.c (gfc_log2int, gfc_int2log): New functions.
1286 * arith.h (gfc_log2int, gfc_int2log): Prototype here.
1287 * gfortran.texi: Document this new GNU extension.
1289 2005-06-01 Paul Thomas <pault@gcc.gnu.org>
1291 * fortran/trans-expr.c (gfc_conv_variable): Clean up bracketting.
1292 * fortran/trans-expr.c (gfc_conv_function_call): Insert spaces.
1293 Correct comments and replace convert of integer_one_node with
1296 2005-06-01 Jakub Jelinek <jakub@redhat.com>
1299 * resolve.c (resolve_contained_fntype): Use sym->attr.untyped
1300 to avoid giving error multiple times.
1301 (resolve_entries): Don't error about BT_UNKNOWN here.
1302 (resolve_unknown_f): Capitalize IMPLICIT for consistency.
1303 (resolve_fntype): New function.
1304 (gfc_resolve): Call resolve_fntype.
1306 2005-06-01 Feng Wang <fengwang@nudt.edu.cn>
1309 * fortran/io.c (resolve_tag): Fix error message.
1311 2005-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1313 * fortran/trans-decl.c: Don't include errors.h.
1314 * fortran/Make-lang.in: Updates dependencies.
1316 2005-05-31 Paul Thomas <pault@gcc.gnu.org>
1321 * fortran/trans-array.c (gfc_conv_expr_descriptor): Obtain the
1322 string length from the expression typespec character length value
1323 and set temp_ss->stringlength and backend_decl. Obtain the
1324 tree expression from gfc_conv_expr rather than gfc_conv_expr_val.
1325 Dereference the expression to obtain the character.
1326 * fortran/trans-expr.c (gfc_conv_component_ref): Remove the
1327 dereference of scalar character pointer structure components.
1328 * fortran/trans-expr.c (gfc_trans_subarray_assign): Obtain the
1329 string length for the structure component from the component
1332 2005-05-30 Roger Sayle <roger@eyesopen.com>
1334 * gfortran.h (GFC_STD_LEGACY): New "standard" macro. Reindent.
1335 * options.c (gfc_init_options): By default, allow legacy extensions
1336 but warn about them.
1337 (gfc_post_options): Make -pedantic warn about legacy extensions
1338 even with -std=legacy.
1339 (gfc_handle_option): Make -std=gnu follow the default behaviour
1340 of warning about legacy extensions, but allowing them. Make the
1341 new -std=legacy accept everything and warn about nothing.
1342 * lang.opt (std=legacy): New F95 command line option.
1343 * invoke.texi: Document both -std=f2003 and -std=legacy.
1344 * gfortran.texi: Explain the two types of extensions and document
1345 how they are affected by the various -std= command line options.
1347 2005-05-30 Kazu Hirata <kazu@cs.umass.edu>
1349 * trans-expr.c: Remove trailing ^M.
1351 * trans-expr.c: Fix comment typos.
1353 2005-05-29 Paul Thomas <pault@gcc.gnu.org>
1361 * fortran/trans-array.c (gfc_conv_resolve_dependencies): Add string
1362 length to temp_ss for character pointer array assignments.
1363 * fortran/trans-expr.c (gfc_conv_variable): Correct errors in
1364 dereferencing of characters and character pointers.
1365 * fortran/trans-expr.c (gfc_conv_function_call): Provide string
1366 length as return argument for various kinds of handling of return.
1367 Return a char[]* temporary for character pointer functions and
1368 dereference the temporary upon return.
1370 2005-05-29 Janne Blomqvist <jblomqvi@vipunen.hut.fi>
1371 Steven G. Kargl <kargls@comcast.net>
1374 * io.c (gfc_match_inquire): Implement constraints on UNIT and FILE usage.
1376 2005-05-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1379 * io.c (format_item_1): Add check and extension warning for
1382 2005-05-28 Steven G. Kargl <kargls@comcast.net>
1384 * arith.c (gfc_arith_init_1): Fix off by one problem;
1385 (gfc_check_integer_range): Chop extra bits in subnormal numbers.
1387 2005-05-28 Jerry DeLisle <jvdelisle@verizon.net>
1388 Steven G. Kargl <kargls@comcast.net>
1390 * intrinsic.texi: added documentation for BIT_SIZE, BTEST, CHAR, CEILING
1393 2005-05-27 Steven G. Kargl <kargls@comcast.net>
1395 * trans-array.c (gfc_trans_deferred_array): Use build_int_cst to force
1396 like types in comparsion.
1398 2005-05-26 Kazu Hirata <kazu@cs.umass.edu>
1400 * data.c, parse.c, trans-array.c, trans-decl.c,
1401 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
1402 trans.h: Fix comment typos. Follow spelling conventions.
1404 2005-05-22 Roger Sayle <roger@eyesopen.com>
1406 * gfortran.texi: Document some more GNU extensions.
1408 2005-05-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1410 * error.c (gfc_warning): Fix typo in comment.
1412 2005-05-18 Thomas Koenig <Thomas.Koenig@online.de>
1415 * fortran/iresolve.c (gfc_resolve_reshape): Add
1416 gfc_type_letter (BT_COMPLEX) for complex to
1417 to resolved function name.
1419 2005-05-18 Erik Edelmann <erik.edelmann@iki.fi>
1421 * array.c (gfc_match_array_constructor): Support [ ... ]
1422 style array constructors.
1424 2005-05-18 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1426 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_TRUNC
1427 and BUILT_IN_TRUNCF instead of BUILT_IN_FLOOR and BUILT_IN_FLOORF.
1428 * trans-intrinsic.c (build_fix_expr): Change 'op' argument
1429 to correct enum type.
1430 (gfc_conv_intrinsic_aint): Likewise. Clarify comment in front of
1431 function. Add default case to switch, deal with FIX_TRUNC_EXPR
1432 instead of FIX_FLOOR_EXPR.
1434 2005-05-18 Feng Wang <fengwang@nudt.edu.cn>
1437 * trans-const.c (gfc_conv_const_charlen): Use gfc_charlen_type_node to
1438 build character length.
1440 2005-05-17 Zdenek Dvorak <dvorakz@suse.cz>
1442 * trans-types.c (gfc_array_range_type): New variable.
1443 (gfc_init_types): Initialize gfc_array_range_type.
1444 (gfc_get_array_type_bounds): Use gfc_array_range_type.
1446 2005-05-17 Jakub Jelinek <jakub@redhat.com>
1449 * trans-stmt.c (generate_loop_for_temp_to_lhs): Remove SIZE and COUNT2
1450 arguments. If LSS is gfc_ss_terminator, increment COUNT1 by 1, instead
1451 of incrementing COUNT2 and using COUNT1+COUNT2 increment COUNT1 and use
1453 (generate_loop_for_rhs_to_temp): Likewise.
1454 (compute_overall_iter_number): Add INNER_SIZE_BODY argument.
1455 It non-NULL, add it to body.
1456 (allocate_temp_for_forall_nest_1): New function, split from
1457 allocate_temp_for_forall_nest.
1458 (allocate_temp_for_forall_nest): Add INNER_SIZE_BODY argument,
1459 propagate it down to compute_overall_iter_number. Use
1460 allocate_temp_for_forall_nest_1.
1461 (gfc_trans_assign_need_temp): Remove COUNT2. Call
1462 compute_inner_temp_size into a new stmtblock_t. Adjust calls to
1463 allocate_temp_for_forall_nest, generate_loop_for_rhs_to_temp
1464 and generate_loop_for_temp_to_lhs.
1465 (gfc_trans_pointer_assign_need_temp): Adjust calls to
1466 allocate_temp_for_forall_nest.
1467 (gfc_evaluate_where_mask): Call compute_inner_temp_size into a new
1468 stmtblock_t. Call compute_overall_iter_number just once, then
1469 allocate_temp_for_forall_nest_1 twice with the same size.
1470 Initialize mask indexes if nested_forall_info != NULL.
1471 (gfc_trans_where_2): Initialize mask indexes before calling
1472 gfc_trans_nested_forall_loop.
1474 2005-05-15 Feng Wang <fengwang@nudt.edu.cn>
1475 Jerry DeLisle <jvdelisle@verizon.net>
1478 * trans-stmt.c (gfc_trans_label_assign): fix pointer type, to
1479 resolve ICE on assign of format label.
1480 * trans-io.c (set_string): add fold-convert to properly
1481 handle assigned format label in write.
1483 2005-05-13 Paul Brook <paul@codesourcery.com>
1485 * trans-stmt.c (gfc_trans_forall_1): Fix comment typo.
1487 2005-05-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1489 * trans-types.c (gfc_is_nodesc_array): Remove redundant check.
1491 2005-05-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1494 * io.c (check_format): Look for literal characters inside
1497 2005-05-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1499 * resolve.c (resolve_symbol): Copy 'pointer' and 'dimension'
1500 attribute from result symbol to function symbol.
1501 * trans-expr.c (gfc_conv_function_call): Look at sym->attr.dimension
1502 instead of sym->result->attr.dimension.
1504 2005-05-10 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1507 * gfortran.h (gfc_option): Add flag_f2c.
1508 * invoke.texi: Document '-ff2c' command line option. Adapt
1509 documentation for '-fno-second-underscore' and '-fno-underscoring'.
1510 * lang.opt (ff2c): New entry.
1511 * options.c (gfc-init_options): Set default calling convention
1512 to -fno-f2c. Mark -fsecond-underscore unset.
1513 (gfc_post_options): Set -fsecond-underscore if not explicitly set
1515 (handle_options): Set gfc_option.flag_f2c according to requested
1517 * trans-decl.c (gfc_get_extern_function_decl): Use special f2c
1518 intrinsics where necessary.
1519 (gfc_trans_deferred_vars): Change todo error to assertion.
1520 * trans-expr.c (gfc_conv_variable): Dereference access
1521 to hidden result argument.
1522 (gfc_conv_function_call): Add hidden result argument to argument
1523 list if f2c calling conventions requested. Slightly restructure
1524 tests. Convert result of default REAL function to requested type
1525 if f2c calling conventions are used. Dereference COMPLEX result
1527 * trans-types.c (gfc_sym_type): Return double for default REAL
1528 function if f2c cc are used.
1529 (gfc_return_by_reference): Slightly restructure logic. Return
1530 COMPLEX by reference depending on calling conventions.
1531 (gfc_get_function_type): Correctly make hidden result argument a
1532 pass-by-reference argument for COMPLEX. Remove old code which does
1533 this for derived types.
1535 2005-05-09 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1537 * match.c (gfc_match_return): Only require space after keyword when
1538 it is obligatory. Only give stdwarn to after matching is successful.
1539 * dump-parse-tree.c (gfc_show_symbol): Deal with alternate returns.
1541 2005-05-08 Kazu Hirata <kazu@cs.umass.edu>
1543 * intrinsic.texi: Fix typos.
1545 2005-05-07 Steven G. Kargl <kargls@comcast.net>
1547 * intrinsic.texi: Document ASSOCIATED and ATAN2. Update Bessel function
1548 description to include information about scalar arguments.
1550 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
1552 * Make-lang.in, dump-parse-tree.c, invoke.texi, lang.opt,
1553 match.h, trans-array.h: Update copyright.
1555 2005-04-29 Tom Tromey <tromey@redhat.com>
1557 * f95-lang.c (poplevel): Updated for change to build_block.
1559 2005-04-29 Jakub Jelinek <jakub@redhat.com>
1563 * trans-expr.c (gfc_conv_variable): Handle return values in functions
1564 with alternate entry points.
1565 * resolve.c (resolve_entries): Remove unnecessary string termination
1566 after snprintf. Set result of entry master.
1567 If all entries have the same type, set entry master's type
1568 to that common type, otherwise set mixed_entry_master attribute.
1569 * trans-types.c (gfc_get_mixed_entry_union): New function.
1570 (gfc_get_function_type): Use it for mixed_entry_master functions.
1571 * gfortran.h (symbol_attribute): Add mixed_entry_master bit.
1572 * decl.c (gfc_match_entry): Set entry->result properly for
1574 * trans-decl.c (gfc_get_symbol_decl): For entry_master, skip over
1576 (build_entry_thunks): Handle return values in entry thunks.
1577 Clear BT_CHARACTER's ts.cl->backend_decl, so that it is not
1578 shared between multiple contexts.
1579 (gfc_get_fake_result_decl): Use DECL_ARGUMENTS from
1580 current_function_decl instead of sym->backend_decl. Skip over
1581 entry master's entry id argument. For mixed_entry_master entries or
1582 their results, return a COMPONENT_REF of the fake result.
1583 (gfc_trans_deferred_vars): Don't warn about missing return value if
1584 at least one entry point uses RESULT.
1585 (gfc_generate_function_code): For entry master returning
1586 CHARACTER, copy ts.cl->backend_decl to all entry result syms.
1587 * trans-array.c (gfc_trans_dummy_array_bias): Don't consider return
1588 values optional just because they are in entry master.
1590 2005-04-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1592 * gfortran.h (gfc_namespace): Add seen_implicit_none field,
1593 Tobias forgot this in previous commit.
1595 2005-04-29 Paul Brook <paul@codesourcery.com>
1597 * trans-expr.c (gfc_conv_expr_present): Fix broken assert. Update
1600 2005-04-29 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1602 * gfortran.h (gfc_namespace): Add seen_implicit_none field.
1603 * symbol.c (gfc_set_implicit_none): Give error if there's a previous
1604 IMPLICIT NONE, set seen_implicit_none.
1605 (gfc_merge_new_implicit): Error if there's an IMPLICIT NONE statement.
1607 2005-04-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1609 * gfortran.h (gfc_gsymbol): Make name a const char *.
1610 * symbol.c (gfc_get_gsymbol): Allocate gsymbol name via
1613 2005-04-28 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1616 * resolve.c (resolve_actual_arglist): Issue an error if a statement
1617 functions is used as actual argument.
1619 2005-04-27 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1622 * interface.c (compare_parameter): Ignore type for EXPR_NULL
1623 only if type is BT_UNKNOWN.
1625 2005-04-25 Paul Brook <paul@codesourcery.com>
1626 Steven G. Kargl <kargls@comcast.net>
1629 * check.c (gfc_check_ichar_iachar): New function.
1630 * instinsic.h (gfc_check_ichar_iachar): Add prototype.
1631 * intrinsic.c (add_functions): Use it.
1632 * primary.c (match_varspec, gfc_match_rvalue): Clear incorrect
1633 character expression lengths.
1635 2005-04-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1638 * trans-common.c (translate_common): Cast offset and
1639 common_segment->offset to type int for warning message.
1641 2005-04-23 DJ Delorie <dj@redhat.com>
1643 * trans-decl.c: Adjust warning() callers.
1645 2005-04-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1647 * trans-const.c (gfc_conv_mpfr_to_tree): Use hexadecimal string as
1648 intermediate representation. Fix typo in comment.
1650 2005-04-21 Steven G. Kargl <kargls@comcast.net>
1652 * trans-const.c (gfc_conv_mpfr_to_tree): Remove unneeded computation;
1653 simplify logic; Add a gcc_assert.
1655 2005-04-19 Steven G. Kargl <kargls@comcast.net>
1657 * trans-const.c (gfc_conv_mpz_to_tree): Fix comment.
1659 2005-04-19 Arnaud Desitter <arnaud.desitter@ouce.ox.ac.uk>
1660 Steven G. Kargl <kargls@comcast.net>
1662 * invoke.texi: Update -Waliasing description
1664 2005-04-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1667 * resolve.c (resolve_variable): If e->symtree is not set, this
1668 ought to be a FAILURE, and not a segfault.
1670 2005-04-17 Paul Thomas <pault@gcc.gnu.org>
1677 * fortran/trans-io.c (gfc_build_io_library_fndecls): Create
1678 declaration for st_set_nml_var and st_set_nml_var_dim. Remove
1679 declarations of old namelist functions.
1680 (build_dt): Simplified call to transfer_namelist_element.
1681 (nml_get_addr_expr): Generates address expression for start of
1682 object data. New function.
1683 (nml_full_name): Qualified name for derived type components. New
1685 (transfer_namelist_element): Modified for calls to new functions
1686 and improved derived type handling.
1688 2005-04-17 Richard Guenther <rguenth@gcc.gnu.org>
1690 * scanner.c (gfc_next_char_literal): Reset truncation flag
1691 for lines ending in a comment for both fixed and free form.
1692 (load_line): Do not set truncated flag if only truncating
1695 2005-04-15 Richard Guenther <rguenth@gcc.gnu.org>
1698 * gfortran.h (gfc_linebuf): Add truncated field.
1699 * parse.c (next_statement): Handle warning for truncated
1701 * scanner.c (load_line): Return if line was truncated.
1702 No longer warn for truncated lines. Remove unused parameters.
1703 (load_file): Store load_line return value to linebuf.
1704 (gfc_error_recovery): Do not advance line at the end.
1706 2005-04-14 Steven G. Kargl <kargls@comcast.net>
1708 * gfortran.h (gfc_real_info): Add subnormal struct member.
1709 * arith.c (gfc_arith_init_1): Set it.
1710 (gfc_check_real_range): Use it.
1711 * simplify.c (gfc_simplify_nearest): Fix nearest(0.,1.).
1713 2005-04-12 Kazu Hirata <kazu@cs.umass.edu>
1715 * simplify.c: Fix a comment typo.
1717 2005-04-11 Richard Sandiford <rsandifo@redhat.com>
1719 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
1721 2005-04-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1723 * simplify.c (gfc_simplify_nearest): Overhaul.
1725 2005-04-10 Kazu Hirata <kazu@cs.umass.edu>
1727 * interface.c: Fix a comment typo.
1729 2005-04-10 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1731 * match.c (match_arithmetic_if): Arithmetic IF is obsolete in
1734 2005-04-09 Steven G. Kargl <kargls@comcast.net>
1736 * simplify.c (gfc_simplify_anint): Use mpfr_round()
1737 (gfc_simplify_dnint): ditto.
1738 (gfc_simplify_nint): ditto.
1740 2005-04-09 Andrew Pinski <pinskia@physics.uc.edu>
1743 * io.c (check_format): Allow an optional comma
1744 between descriptors.
1746 2005-04-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1748 * match.c (match_arithmetic_if): Remove gfc_ prefix and correct
1749 comment according to GNU coding style.
1750 (gfc_match_if): Remove gfc_ prefix in call to
1751 match_arithmetic_if.
1753 2005-04-08 Diego Novillo <dnovillo@redhat.com>
1755 * match.c (gfc_match_arithmetic_if): Declare static.
1757 2005-04-08 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1760 * match.c (gfc_match_arithmetic_if): New function to match an
1761 arithmetic IF statement.
1762 (gfc_match_if): Use gfc_match_arithmetic_if to match an
1763 arithmetic IF statement embedded in a simple IF statement.
1765 2005-04-07 Steven G. Kargl <kargls@comcast.net>
1767 * simplify.c (gfc_simplify_exponent): Fix exponent(tiny(x))
1769 2005-04-06 Steven G. Kargl <kargls@comcast.net>
1771 * invoke.texi: Remove documentation of -std=f90
1773 2005-04-06 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1775 * expr.c (gfc_check_assign): Don't allow NULL as rhs in a
1776 non-pointer assignment.
1778 2005-04-05 Feng Wang <fengwang@nudt.edu.cn>
1783 * array.c (resolve_character_array_constructor): New function. Set
1784 constant character array's character length.
1785 (gfc_resolve_array_constructor): Use it.
1786 * decl.c (add_init_expr_to_sym): Set symbol and initializer character
1788 (gfc_set_constant_character_len): New function. Set constant character
1789 expression according the given length.
1790 * match.h (gfc_set_constant_character_len): Add prototype.
1792 2005-04-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1794 * intrinsic.texi: BES?? functions are not in the f95 standard.
1796 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1798 * intrinsic.texi: Document COS, EXP, LOG, LOG10, SIN, SQRT, TAN.
1800 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1802 * intrinsic.texi: Document BESJ0, BESJ1, BESJN, BESY0, BESY1,
1803 BESYN, ATAN, COSH, ERF, ERC, SINH, TANH.
1805 2005-04-02 Steven G. Kargl <kargls@comcast.net>
1807 * intrinsic.texi: Document ALLOCATED, ANINT, ANY, ASIN; fix typos
1809 2005-04-01 Kazu Hirata <kazu@cs.umass.edu>
1811 * decl.c, f95-lang.c, interface.c, module.c, trans-stmt.c,
1812 trans.h: Fix comment typos.
1814 2005-03-29 Steven G. Kargl <kargls@comcast.net>
1816 * gfortran.h (option_t): Change d8, i8, r8 to flag_default_double,
1817 flag_default_integer, flag_default_real
1818 * invoke.texi: Update documentation
1819 * lang.opt: Remove d8, i8, r8 definitions; Add fdefault-double-8
1820 fdefault-integer-8, and fdefault-real-8 definitions.
1821 * options.c (gfc_init_options): Set option defaults
1822 (gfc_handle_option): Handle command line options.
1823 * trans-types.c (gfc_init_kinds): Use options.
1825 2005-03-29 Keith Besaw <kbesaw@us.ibm.com>
1827 * f95-lang.c (builtin_function): Process the attrs parameter
1828 and apply the "const" attribute to the builtin if found.
1830 2005-03-27 Steven G. Kargl <kargls@comcast.net>
1832 * intrinsic.texi: Document AIMAG, AINT, ALL
1834 2005-03-26 Steven G. Kargl <kargls@comcast.net>
1836 * arith.c (check_result): Fix illogical logic.
1838 2005-03-26 Canqun Yang <canqun@nudt.edu.cn>
1840 * trans-common.c (create_common): Build RECORD_NODE for common blocks
1841 contain no equivalence objects.
1842 (add_equivalences): New argument saw_equiv.
1843 (trans_common): New local variable saw_equiv.
1844 (finish_equivalences): Add a local variable dummy, Always pass true
1845 for the 3rd parameter to create_common.
1847 2005-03-25 Steven G. Kargl <kargls@comcast.net>
1849 * intrinsic.texi: Fix "make dvi"
1851 2005-03-24 Steven G. Kargl <kargls@comcast.net>
1853 * intrinsic.texi: New file.
1854 * gfortran.texi: Include it; white space change; fix typo.
1856 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
1858 * f95-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
1860 2005-03-23 Steven Bosscher <stevenb@suse.de>
1862 * convert.c (convert): Replace fold (buildN (...)) with fold_buildN.
1863 * trans-array.c (gfc_trans_allocate_array_storage,
1864 gfc_trans_allocate_temp_array gfc_trans_array_constructor_value,
1865 gfc_conv_array_index_ref, gfc_trans_array_bound_check,
1866 gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
1867 gfc_conv_array_ref, gfc_trans_preloop_setup, gfc_conv_ss_startstride,
1868 gfc_conv_loop_setup, gfc_array_init_size, gfc_trans_array_bounds,
1869 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
1870 gfc_conv_expr_descriptor): Likewise.
1871 * trans-expr.c (gfc_conv_powi, gfc_conv_string_tmp,
1872 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
1873 * trans-intrinsic.c (build_round_expr, gfc_conv_intrinsic_bound,
1874 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_sign,
1875 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
1876 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_bitop,
1877 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits,
1878 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_ishftc,
1879 gfc_conv_intrinsic_merge, prepare_arg_info,
1880 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_repeat): Likewise.
1881 * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do, gfc_trans_do_while,
1882 gfc_trans_forall_loop, gfc_do_allocate, generate_loop_for_temp_to_lhs,
1883 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
1884 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
1885 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_assign):
1887 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Likewise.
1888 * trans.c (gfc_add_modify_expr): Likewise.
1890 2005-03-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1892 * check.c (gfc_check_chdir, gfc_check_chdir_sub, gfc_check_kill,
1893 gfc_check_kill_sub, gfc_check_link, gfc_check_link_sub,
1894 gfc_check_symlnk, gfc_check_symlnk_sub, gfc_check_rename,
1895 gfc_check_rename_sub, gfc_check_sleep_sub, gfc_check_gerror,
1896 gfc_check_getlog, gfc_check_hostnm, gfc_check_hostnm_sub,
1897 gfc_check_perror): new functions to check newly implemented
1899 * gfortran.h: adding symbols for new intrinsics.
1900 * intrinsic.c (add_functions): adding new intrinsics.
1901 (add_subroutines): adding new intrinsics.
1902 * intrinsic.h: prototype for all checking and resolving
1904 * iresolve.c (gfc_resolve_chdir, gfc_resolve_chdir_sub,
1905 gfc_resolve_hostnm, gfc_resolve_ierrno, gfc_resolve_kill,
1906 gfc_resolve_link, gfc_resolve_rename, gfc_resolve_symlnk,
1907 gfc_resolve_time, gfc_resolve_time8, gfc_resolve_rename_sub,
1908 gfc_resolve_kill_sub, gfc_resolve_link_sub,
1909 gfc_resolve_symlnk_sub, gfc_resolve_sleep_sub,
1910 gfc_resolve_gerror, gfc_resolve_getlog, gfc_resolve_hostnm_sub,
1911 gfc_resolve_perror): new functions to resolve intrinsics.
1912 * trans-intrinsic.c (gfc_conv_intrinsic_function): add case
1915 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1917 * dump-parse-tree.c (gfc_show_expr): Dump name of namespace
1918 in which the variable is declared.
1921 * resolve.c (was_declared): Also check for dummy attribute.
1923 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1925 * gfortran.h (arith): Remove ARITH_0TO0.
1926 * arith.c (gfc_arith_error): Remove handling of ARITH_0TO0.
1927 (gfc_arith_power): Remove special casing of zero to integral
1930 2005-03-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1932 * Make-lang.in (fortran-warn): Remove -Wno-error.
1933 (expr.o-warn, resolve.o-warn, simplify.o-warn,
1934 trans-common.o-warn): Specify -Wno-error.
1936 2005-03-17 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1938 * trans-array.c (gfc_trans_static_array_pointer,
1939 get_array_ctor_var_strlen, gfc_conv_array_index_offset): Fix
1940 comment and formatting typos.
1942 2005-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1944 * invoke.texi: Fix typos.
1946 2005-03-15 Zack Weinberg <zack@codesourcery.com>
1948 * Make-lang.in (GFORTRAN_TEXI): Add gcc-vers.texi.
1950 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
1952 * trans-stmt.c (gfc_trans_label_assign): Don't set DECL_ARTIFICIAL flag
1953 to zero on label_tree.
1955 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
1958 * io.c (resolve_tag): Add checking on assigned label.
1959 (match_dt_format): Does not set symbol assign attribute.
1960 * match.c (gfc_match_goto):Does not set symbol assign attribute.
1961 * resolve.c (resolve_code): Add checking on assigned label.
1962 * trans-common.c (build_field): Deals with common variable assigned
1964 * trans-stmt.c (gfc_conv_label_variable): New function.
1965 (gfc_trans_label_assign): Use it.
1966 (gfc_trans_goto): Ditto.
1967 * trans-io.c (set_string): Ditto.
1968 * trans.h (gfc_conv_label_variable): Add prototype.
1970 2005-03-14 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1973 * symbol.c (check_conflict): A dummy argument can't be a statement
1976 2005-03-14 Zdenek Dvorak <dvorakz@suse.cz>
1978 * fortran/trans-intrinsic.c (gfc_conv_intrinsic_ishft): Convert
1979 the argument of the shift to the unsigned type.
1981 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1984 * resolve.c (gfc_resolve_index): Allow REAL indices as an extension.
1986 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1989 * resolve.c (gfc_resolve): Check if character lengths are
1990 specification expressions.
1992 2005-03-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1995 * trans-array.c (gfc_stack_space_left): Remove unused variable.
1996 (gfc_can_put_var_on_stack): Move to trans-decl.c, remove #if 0'ed
1998 * trans-array.h (gfc_stack_space_left, gfc_can_put_var_on_stack):
1999 Remove declaration / prototype.
2000 * trans-common.c (build_equiv_decl): Give union a name. Check if
2001 it can be put on the stack.
2002 * trans-decl.c (gfc_stack_space_left): Move function here.
2003 (gfc_build_qualified_array): Fix comment typo.
2004 * trans.h (gfc_put_var_on_stack): Add prototype.
2006 2005-03-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2008 * Make-lang.in (fortran-warn): Set to $(STRICT_WARN) -Wno-error.
2009 * decl.c, trans.c: Don't use C++ style comments.
2010 * gfortran.h (sym_flavor, procedure_type, sym_intent, gfc_access,
2011 ifsrc): Give names to enums and use ENUM_BITFIELD.
2012 (gfc_access): Remove trailing comma.
2014 2005-03-05 Steven G. Kargl <kargls@comcast.net>
2017 * primary.c (match_complex_constant): Mangled complex constant may
2018 be an implied do-loop. Give implied do-loop matcher a chance.
2020 2005-03-05 Steven G. Kargl <kargls@comcast.net>
2023 * resolve.c (compare_shapes): New function.
2024 (resolve_operator): Use it.
2026 2005-03-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2028 * trans-const.c (gfc_conv_constant_to_tree): Use correct tree
2029 type for COMPLEX constants.
2031 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2034 * trans-expr.c (gfc_conv_function_call): Correctly dereference
2035 argument from a pointer function also if it has a result clause.
2037 2005-03-04 Steven G. Kargl <kargls@comcast.net>
2039 * expr.c (gfc_copy_shape_excluding): Change && to ||.
2041 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2043 * trans-intrinsic.c (gfc_get_symbol_for_expr): Fix comment typo,
2046 2005-02-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2050 * simplify.c (gfc_simplify_bound): Rename to ...
2051 (simplify_bound): ... this and overhaul.
2053 2005-02-28 Steven G. Kargl <kargl@gcc.gnu.org>
2055 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): remove boolean argument.
2056 (gfc_conv_intrinsic_function): update function calls
2058 2005-02-27 Steven G. Kargl <kargl@gcc.gnu.org>
2061 * trans-types.c (gfc_max_integer_kind): Declare
2062 (gfc_init_kinds): Initialize it.
2063 * gfortran.h (gfc_max_integer_kind): extern it.
2064 * primary.c (match_boz_constant): Use it; remove gfortran extension
2065 of kind suffixes on BOZ literal constants
2068 2005-02-27 Steven G. Kargl <kargls@comcast.net>
2070 * arith.c (gfc_check_real_range): Remove multiple returns
2071 (check_result): New function.
2072 (gfc_arith_uminus,gfc_arith_plus,gfc_arith_times,
2073 gfc_arith_divide,gfc_arith_power,gfc_arith_minus): Use it.
2076 2005-02-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2078 * decl.c, resolve.c, trans-array.c, trans.h: Fix comment typo(s).
2081 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-meunchen.de>
2083 Unrevert previously reverted patch. Adding this fix:
2084 * module.c (find_true_name): Deal with NULL module.
2086 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2088 Revert yesterday's patch:
2089 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2091 * gfortran.h (gfc_component, gfc_actual_arglist, ...
2092 ... argument. Copy string instead of pointing to it.
2094 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2096 * gfortran.h (gfc_get_namespace): Add second argument to prototype.
2097 * intrinsic.c (gfc_intrinsic_init_1): Pass second argument to
2099 * module.c (mio_namespace_ref, load_needed): Likewise.
2100 * parse.c (parse_interface, parse_contained): Likewise. Here the
2101 correct second argument matters.
2102 * symbol.c (gfc_get_namespace): Add parent_types argument, only copy
2103 parent's implicit types if this is set.
2104 (gfc_symbol_init_2): Pass second argument to gfc_get_namespace.
2105 * trans-common.c (build_common_decl): Likewise.
2107 * gfortran.h (symbol_attribute): New 'untyped' field, fix comment
2109 * symbol.c (gfc_set_default_type): Issue error only once, by setting
2110 and checking 'untyped' attribute.
2112 * gfortran.h (gfc_expr): Move 'operator', 'op1', 'op2', and 'uop'
2113 fields into new struct 'op' inside the 'value' union.
2114 * arith.c (eval_intrinsic): Adapt all users.
2115 * dependency.c (gfc_check_dependency): Likewise.
2116 * dump-parse-tree.c (gfc_show_expr): Likewise.
2117 * expr.c (gfc_get_expr): Don't clear removed fields.
2118 (free_expr0, gfc_copy_expr, gfc_type_convert_binary,
2119 gfc_is_constant_expr, simplify_intrinsic_op, check_init_expr,
2120 check_intrinsic_op): Adapt to new field names.
2121 * interface.c (gfc_extend_expr): Likewise. Also explicitly
2122 nullify 'esym' and 'isym' fields of new function call.
2123 * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
2124 Adapt to renamed structure fields.
2125 * matchexp.c (build_node, match_level_1, match_expr): Likewise.
2126 * module.c (mio_expr): Likewise.
2127 * resolve.c (resolve_operator): Likewise.
2128 (gfc_find_forall_index): Likewise. Only look through operands
2129 if dealing with EXPR_OP
2130 * trans-array.c (gfc_walk_op_expr): Adapt to renamed fields.
2131 * trans-expr.c (gfc_conv_unary_op, gfc_conv_power_op,
2132 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
2135 * gfortran.h (gfc_component, gfc_actual_arglist, gfc_user_op): Make
2136 'name' a 'const char *'.
2137 (gfc_symbol): Likewise, also for 'module'.
2138 (gfc_symtree): Make 'name' a 'const char *'.
2139 (gfc_intrinsic_sym): Likewise, also for 'lib_name'.
2140 (gfc_get_gsymbol, gfc_find_gsymbol): Add 'const' qualifier to
2142 (gfc_intrinsic_symbol): Use 'gfc_get_string' instead of 'strcpy' to
2143 initialize 'SYM->module'.
2144 * check.c (gfc_check_minloc_maxloc, check_reduction): Check for NULL
2145 pointer instead of empty string.
2146 * dump-parse-tree.c (gfc_show_actual_arglist): Likewise.
2147 * interface.c (gfc_compare_types): Adapt check to account for possible
2149 (compare_actual_formal): Check for NULL pointer instead of empty
2151 * intrinsic.c (gfc_current_intrinsic, gfc_current_intrinsic_arg):
2152 Add 'const' qualifier.
2153 (conv_name): Return a heap allocated string.
2154 (find_conv): Add 'const' qualifier to 'target'.
2155 (add_sym): Use 'gfc_get_string' instead of 'strcpy'.
2156 (make_generic): Check for NULL pointer instead of empty string.
2157 (make_alias): Use 'gfc_get_string' instead of 'strcpy'.
2158 (add_conv): No need to strcpy result from 'conv_name'.
2159 (sort_actual): Check for NULL pointer instead of empty string.
2160 * intrinsic.h (gfc_current_intrinsic, gfc_current_intrinsic_arg):
2162 * module.c (compare_true_names): Compare pointers instead of strings
2163 for 'module' member.
2164 (find_true_name): Initialize string fields with gfc_get_string.
2165 (mio_pool_string): New function.
2166 (mio_internal_string): Adapt comment.
2167 (mio_component_ref, mio_component, mio_actual_arg): Use
2168 'mio_pool_string' instead of 'mio_internal_string'.
2169 (mio_symbol_interface): Add 'const' qualifier to string arguments.
2170 Add level of indirection. Use 'mio_pool_string' instead of
2171 'mio_internal_string'.
2172 (load_needed, read_module): Use 'gfc_get_string' instead of 'strcpy'.
2173 (write_common, write_symbol): Use 'mio_pool_string' instead of
2174 'mio_internal_string'.
2175 (write_symbol0, write_symbol1): Likewise, also check for NULL pointer
2176 instead of empty string.
2177 (write_operator, write_generic): Pass correct type variable to
2178 'mio_symbol_interface'.
2179 (write_symtree): Use 'mio_pool_string' instead of
2180 'mio_internal_string'.
2181 * primary.c (match_keyword_arg): Adapt check to possible
2182 case of NULL pointer. Use 'gfc_get_string' instead of 'strcpy'.
2183 * symbol.c (gfc_add_component, gfc_new_symtree, delete_symtree,
2184 gfc_get_uop, gfc_new_symbol): Use 'gfc_get_string' instead of
2186 (ambiguous_symbol): Check for NULL pointer instead of empty string.
2187 (gfc_find_gsymbol, gfc_get_gsymbol): Add 'const' qualifier on string
2189 * trans-array.c (gfc_trans_auto_array_allocation): Check for NULL
2190 pointer instead of empty string.
2191 * trans-decl.c (gfc_sym_mangled_identifier,
2192 gfc_sym_mangled_function_id, gfc_finish_var_decl, gfc_get_symbol_decl,
2193 gfc_get_symbol_decl): Likewise.
2194 * trans-io.c (gfc_new_nml_name_expr): Add 'const' qualifier to
2195 argument. Copy string instead of pointing to it.
2197 2005-02-23 Kazu Hirata <kazu@cs.umass.edu>
2199 * intrinsic.h, st.c: Update copyright.
2201 2005-02-20 Steven G. Kargl <kargls@comcast.net>
2203 * symbol.c: Typos in comments.
2205 2005-02-20 Steven G. Kargl <kargls@comcast.net>
2207 * expr.c (gfc_type_convert_binary): Typo in comment.
2209 2005-02-19 Steven G. Kargl <kargls@comcast.net>
2211 * check.c (gfc_check_selected_int_kind): New function.
2212 * intrinsic.h: Prototype it.
2213 * intrinsic.c (add_function): Use it.
2214 * simplify (gfc_simplify_ceiling,gfc_simplify_floor): Change
2215 BT_REAL to BT_INTEGER and use gfc_default_integer_kind.
2217 2005-02-19 Steven G. Kargl <kargls@comcast.net>
2219 * check.c (gfc_check_int): improve checking of optional kind
2220 * simplify.c (gfc_simplify_int): Change BT_REAL to BT_INTEGER
2222 2005-02-19 Steven G. Kargl <kargls@comcast.net>
2224 * check.c (gfc_check_achar): New function
2225 * intrinsic.h: Prototype it.
2226 * intrinsic.c (add_function): Use it.
2228 2005-02-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2230 * trans-stmt.c (generate_loop_for_temp_to_lhs,
2231 generate_loop_for_rhs_to_temp): Remove if whose condition is
2234 2005-02-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2236 * symbol.c (gfc_use_ha_derived): Remove, fold functionality into ...
2237 (gfc_use_derived): ... this function.
2239 2005-02-09 Richard Henderson <rth@redhat.com>
2241 * f95-lang.c (gfc_init_builtin_functions): Call
2242 build_common_builtin_nodes; do not define any functions handled
2245 2005-02-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2247 * expr.c (gfc_copy_expr): Don't copy 'op1' and 'op2' for
2249 (gfc_is_constant_expr): Check 'ref' to determine if substring
2250 reference is constant.
2251 (gfc_simplify_expr): Simplify 'ref' instead of 'op1' and 'op2'.
2252 (check_init_expr, check_restricted): Check 'ref' instead of 'op1'
2254 * module.c (mio_expr): Read / write 'ref' instead of 'op1' and 'op2'.
2256 2005-02-07 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2258 * gfortran.h (gfc_add_dimension, gfc_add_result, gfc_add_save,
2259 gfc_add_dummy, gfc_add_generic, gfc_add_in_common, gfc_add_data,
2260 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
2261 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
2262 gfc_add_procedure): Add argument.
2263 * array.c (gfc_set_array_spec), decl.c (var_element, get_proc_name,
2264 gfc_match_null, match_type_spec, match_attr_spec,
2265 gfc_match_formal_arglist, match_result, gfc_match_function_decl):
2266 Update callers to match.
2267 (gfc_match_entry) : Likewise, fix comment typo.
2268 (gfc_match_subroutine, attr_decl1, gfc_add_dimension,
2269 access_attr_decl, do_parm, gfc_match_save, gfc_match_modproc,
2270 gfc_match_derived_decl): Update callers.
2271 * interface.c (gfc_match_interface): Likewise.
2272 * match.c (gfc_match_label, gfc_add_flavor,
2273 gfc_match_call, gfc_match_common, gfc_match_block_data,
2274 gfc_match_namelist, gfc_match_module, gfc_match_st_function):
2276 * parse.c (parse_derived, parse_interface, parse_contained),
2277 primary.c (gfc_match_rvalue, gfc_match_variable): Likewise.
2278 * resolve.c (resolve_formal_arglist, resolve_entries): Update callers.
2279 * symbol.c (check_conflict, check_used): Add new 'name' argument,
2280 use when printing error message.
2281 (gfc_add_dimension, gfc_add_result, gfc_add_save, gfc_add_dummy,
2282 gfc_add_generic, gfc_add_in_common, gfc_add_data,
2283 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
2284 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
2285 gfc_add_procedure): Add new 'name' argument. Pass along to
2286 check_conflict and check_used.
2287 (gfc_add_allocatable, gfc_add_external, gfc_add_intrinsic,
2288 gfc_add_optional, gfc_add_pointer, gfc_add_target, gfc_add_elemental,
2289 gfc_add_pure, gfc_add_recursive, gfc_add_intent,
2290 gfc_add_explicit_interface, gfc_copy_attr): Pass NULL for new
2291 argument in calls to any of the modified functions.
2293 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
2295 * gfortran.texi: Don't give last update date.
2297 2006-01-30 Richard Henderson <rth@redhat.com>
2299 * options.c (gfc_init_options): Zero flag_errno_math.
2301 2005-01-29 Paul Brook <paul@codesourcery.com>
2304 * check.c (real_or_complex_check): New function.
2305 (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc): New functions.
2306 * intrinsic.c (add_functions): Use new check functions.
2307 * intrinsic.h (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc):
2310 2005-01-29 Steven G. Kargl <kargls@comcast.net>
2313 * expr.c (gfc_check_assign): Check for conformance of logical operands
2315 2004-01-27 Steven Bosscher <stevenb@suse.de>
2317 * trans-decl.c (gfc_build_label_decl): Set DECL_ARTIFICAL and
2318 TREE_USED for all labels.
2319 (gfc_trans_entry_master_switch): Use it instead of building a
2321 * trans-io.c (add_case): Likewise.
2322 * trans-stmt.c (gfc_trans_integer_select): Likewise.
2324 2004-01-23 Paul Brook <paul@codesourcery.com>
2325 Steven G. Kargl <kargls@comcast.net>
2328 * arith.c (gfc_convert_real): Remove sign handling.
2329 * primary.c (match_digits): Allow whitespace after initial sign.
2330 (match_real_const): Handle signs here. Allow whitespace after
2331 initial sign. Remove dead code.
2332 (match_const_complex_part): Remove.
2333 (match_complex_part): Use match_{real,integer}_const.
2334 (match_complex_constant): Cross-promote integer types.
2336 2005-01-23 James A. Morrison <phython@gcc.gnu.org>
2339 * iresolve.c (gfc_resolve_transpose): Resolve to transpose_c4 or
2340 transpose_c8 for complex types.
2342 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
2344 * data.c, dependency.c, f95-lang.c, io.c, trans-array.c,
2345 trans-decl.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
2346 trans-stmt.c, trans-types.c, trans.h: Fix comment typos.
2347 Follow spelling conventions.
2349 2005-01-22 Bud Davis <bdavis9659@comcast.net>
2352 * trans-io.c (gfc_trans_inquire): Added code to support
2355 2005-01-22 Steven G. Kargl <kargls@comcast.net>
2357 * intrinsic.c (make_alias): Add standard argument.
2358 (add_functions): Update make_alias calls.
2360 2005-01-22 Paul Brook <paul@codesourcery.com>
2362 * trans-expr.c (gfc_conv_function_call): Remove bogus TODO.
2364 2005-01-22 Paul Brook <paul@codesourcery.com>
2366 * gfortran.h (gfc_check_access): Add prototype.
2367 * match.c (gfc_match_namelist): Remove TODO.
2368 * module.c (check_access): Rename ...
2369 (gfc_check_access): ... to this. Boolify. Update callers.
2370 * resolve.c (resolve_symbol): Check for private objects in public
2373 2005-01-22 Paul Brook <paul@codesourcery.com>
2375 * primary.c (gfc_match_rvalue): Only apply implicit type if variable
2376 does not have an explicit type.
2377 (gfc_match_variable): Resolve implicit derived types in all cases.
2378 Resolve contained function types from their own namespace, not the
2380 * resolve.c (resolve_contained_fntype): Remove duplicate sym->result
2381 checking. Resolve from the contained namespace, not the parent.
2383 2005-01-22 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2386 * trans-const.c (gfc_conv_constant_to_tree): Give logical
2387 constants the correct type.
2390 * trans-io.c (ADD_STRING): Use gfc_charlen_type_node for string
2392 (gfc_build_io_library_fndecls): 'rec' and 'recl_in' are not
2395 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
2397 * arith.c, array.c, check.c, decl.c, expr.c, f95-lang.c,
2398 gfortran.h, interface.c, intrinsic.c, io.c, iresolve.c,
2399 match.c, matchexp.c, misc.c, module.c, options.c, parse.c,
2400 scanner.c, simplify.c, symbol.c, trans-array.c, trans-expr.c,
2401 trans-io.c, trans-stmt.c, trans.c: Update copyright.
2403 2005-01-17 Ira Rosen <irar@il.ibm.com>
2405 * f95-lang.c (gfc_init_builtin_functions): Call targetm.init_builtins.
2407 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2410 * error.c (error_char): Line-buffer errors / warnings.
2412 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2414 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Fix signed /
2415 unsigned issue. Use build_int_cst instead of converting
2416 integer_zero_node. Remove unnecessary conversion.
2418 * trans-types.c (gfc_get_character_type_len): : Use
2419 gfc_charlen_type_node as basic type for the range field.
2421 * trans-intrinsic.c (build_fixbound_expr,
2422 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_anyall,
2423 gfc_conv_intrinsic_count, gfc_conv_intrinsic_btest,
2424 gfc_conv_intrinsic_singlebitop): Use 'build_int_cst' instead
2425 of converting 'integer_zero_node' or 'integer_one_node'
2427 (gfc_conv_intrinsic_ishftc): Same, but store in local variable to
2429 (gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_rrspacing,
2430 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_iargc): Use
2431 'build_int_cst' instead of converting 'integer_zero_node' or
2432 'integer_one_node' respectively.
2434 * trans-intrinsic.c (gfc_conv_intrinsic_index,
2435 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove
2436 'gfc'-prefix from local variable, remove dead code, use correct
2437 type when inserting argument.
2439 * trans-intrinsic.c, trans-types.c: Update copyright years.
2441 2005-01-16 Steven G. Kargl <kargls@comcast.net>
2444 * resolve.c (check_case_overlap): Typo in comment.
2445 (validate_case_label_expr): Fix up kinds of case values
2446 (resolve_select): Properly handle kind mismatches.
2448 2004-01-16 Paul Brook <paul@codesourcery.com>
2451 * trans-common.c (translate_common): Remove duplicate function call.
2452 (finish_equivalences): Preserve alignment when biasing offsets.
2454 2005-01-15 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de
2456 * primary.c (check_digit): Call 'ISXDIGIT' instead of assuming
2457 ASCII-like character encoding.
2459 2005-01-14 Steven G. Kargl <kargls@comcast.net>
2461 * resolve.c (compare_case): Cleanup.
2463 2005-01-14 Steven G. Kargl <kargls@comcast.net>
2465 * resolve.c (compare_case): Give arguments correct type.
2467 2005-01-13 Kazu Hirata <kazu@cs.umass.edu>
2469 * iresolve.c, trans-common.c, trans-types.c: Fix comment
2472 2005-01-09 Paul Brook <paul@codesourcery.com>
2475 * trans-common.c (current_common, current_offset): Remove.
2476 (create_common): Add head argument.
2477 (align_segment): New function.
2478 (apply_segment_offset): New function.
2479 (translate_common): Merge code from new_segment. Handle alignment.
2480 (new_segment): Remove.
2481 (finish_equivalences): Ensure proper alignment.
2483 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2485 * trans-const.c: Don't include unused math.h.
2487 * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl,
2488 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_minmaxloc,
2489 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_len): Remove
2490 trailing whitespace.
2491 (prepare_arg_info): Fix formatting, indenting and remove trailing
2493 (gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_trim): Remove
2494 trailing whitespace.
2496 * arith.c (arctangent2, gfc_arith_init_1, gfc_arith_done_1,
2497 gfc_constant_result, gfc_range_check, gfc_arith_power,
2498 eval_type_intrinsic0, eval_intrinsic_f2, gfc_real2real,
2499 gfc_real2complex, gfc_complex2int, gfc_complex2real,
2500 gfc_complex2complex): Fix whitespace issues.
2501 * check.c (must_be, type_check, numeric_check, int_or_real_check,
2502 logical_array_check, array_check, scalar_check, nonoptional_check,
2503 variable_check, dim_check, check_a_kind, gfc_check_a_ikind,
2504 gfc_check_a_xkind, gfc_check_abs, gfc_check_all_any,
2505 gfc_check_allocated, gfc_check_a_p, gfc_check_besn,
2506 gfc_check_btest, gfc_check_char, gfc_check_cmplx, gfc_check_count,
2507 gfc_check_cshift, gfc_check_dcmplx, gfc_check_dble,
2508 gfc_check_digits, gfc_check_dot_product, gfc_check_eoshift,
2509 gfc_check_fnum, gfc_check_g77_math1, gfc_check_huge, gfc_check_i,
2510 gfc_check_iand, gfc_check_ibclr, gfc_check_ibits, gfc_check_ibset,
2511 gfc_check_idnint, gfc_check_ieor, gfc_check_index, gfc_check_int,
2512 gfc_check_ior, gfc_check_ishft, gfc_check_ishftc, gfc_check_kind,
2513 gfc_check_lbound, gfc_check_logical, min_max_args,
2514 gfc_check_min_max_integer, gfc_check_min_max_real,
2515 gfc_check_min_max_double, gfc_check_matmul,
2516 gfc_check_minval_maxval, gfc_check_merge, gfc_check_nearest,
2517 gfc_check_pack, gfc_check_precision, gfc_check_radix,
2518 gfc_check_range, gfc_check_real, gfc_check_repeat,
2519 gfc_check_scale, gfc_check_scan, gfc_check_selected_real_kind,
2520 gfc_check_set_exponent): Fix formatting issues.
2521 (gfc_check_size, gfc_check_sign): Alphabetize function order,
2522 remove whitespace-only line.
2523 (gfc_check_fstat, gfc_check_fstat_sub, gfc_check_stat,
2524 gfc_check_stat_sub, gfc_check_transfer, gfc_check_transpose,
2525 gfc_check_ubound, gfc_check_unpack, gfc_check_verify, gfc_check_x,
2526 gfc_check_cpu_time, gfc_check_date_and_time, gfc_check_mvbits,
2527 gfc_check_random_number, gfc_check_random_seed,
2528 gfc_check_second_sub, gfc_check_system_clock,
2529 gfc_check_getcwd_sub, gfc_check_exit, gfc_check_flush,
2530 gfc_check_umask, gfc_check_umask_sub, gfc_check_unlink,
2531 gfc_check_unlink_sub): Fix formatting issues.
2533 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2535 * gfortran.h: Remove outdated comment. Don't include stdio.h
2538 2005-01-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2540 * gfortranspec.c (lang_specific_driver): Change year to 2005 in
2541 output of 'gfortran --version'.
2543 2005-01-03 Steven G. Kargl <kargls@comcast.net>
2545 * arith.c: Add system.h; remove string.h
2551 * check.c: Remove stdlib.h and stdarg.h
2552 * error.c: Remove stdlib.h, stdarg.h, stdio.h, string.h
2553 * expr.c: Add system.h; remove stdarg.h, stdio.h, and string.h
2554 * f95-lang.c: Add system.h; remove stdio.h
2555 * interface.c: Add system.h; remove stdlib.h and string.h
2556 * intrinsic.c: Remove stdarg.h, stdio.h, and string.h
2557 * io.c: Remove string.h
2559 * match.c: Remove stdarg.h and string.h
2560 * misc.c: Update copyright; add system.h; remove stdlib.h,
2561 string.h, and sys/stat.h
2562 * module.c: Add system.h; remove string.h, stdio.h, errno.h,
2563 unistd.h, and time.h
2564 * option.c: Remove string.h and stdlib.h
2566 * scanner.c: Update copyright; add system.h; remove stdlib.h,
2567 stdio.h, string.h, and strings.h
2568 * symbol.c: Add system.h; remove stdlib.h, stdio.h, and string.h
2569 * trans-array.c: Remove stdio.h and gmp.h
2570 * trans-const.c: Ditto
2571 * trans-expr.c: Ditto
2573 * trans-stmt.c: Ditto
2575 * trans-intrinsic.c: Remove stdio.h and string.h
2577 2004-12-29 Steven G. Kargl <kargls@comcast.net>
2579 * gfortran.h (gfc_case): fix typo in comment.
2581 2004-12-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2583 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Change to
2584 logical shift. Call fold. Remove 0-bit shift shortcut.
2585 (gfc_conv_intrinsic_ishftc): Convert first argument to at least
2586 4 bytes bits. Convert 2nd and 3rd argument to 4 bytes. Convert
2587 result if width(arg 1) < 4 bytes. Call fold.
2590 * trans-intrinsic.c (gfc_conv_intrinsic_mod): Update comment
2591 in front of function to match the standard. Correct handling
2594 2004-12-27 Andrew Pinski <pinskia@physics.uc.edu>
2596 * trans-expr.c (gfc_conv_cst_int_power): Only check for
2597 flag_unsafe_math_optimizations if we have a float type.
2599 2004-12-23 Steven G. Kargl <kargls@comcast.net>
2601 * gfortran.texi: Fix typo.
2603 2004-12-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2605 * trans-intrinsic.c (build_fixbound_expr): Clarify comment, fix
2608 2004-12-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2611 * match.c (gfc_match_if): Don't explicitly skip optional whitespace.
2612 (gfc_match_nullify): Make sure that ')' is in front of the end of
2615 * scanner.c (skip_fixed_comments): Fix typo in comment preceding
2618 2004-12-14 Richard Henderson <rth@redhat.com>
2620 * gfortran.h (gfc_expr.function.name): Make const.
2621 (gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
2622 (gfc_get_string): Update prototype.
2623 * iresolve.c: Include tree.h.
2624 (string_node, HASH_SIZE, string_head, hash): Remove.
2625 (gfc_get_string): Use vsnprintf, get_identifier.
2626 (free_strings, gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
2627 * misc.c (gfc_init_1): Don't call gfc_iresolve_init_1.
2628 (gfc_done_1): Don't call gfc_iresolve_done_1.
2629 * module.c (mio_allocated_string): Take and return const char *,
2630 instead of modifying char**.
2631 (mio_expr): Update to match.
2632 * resolve.c (pure_function): Constify name argument.
2633 (resolve_function): Constify name.
2634 * trans-intrinsic.c (gfc_conv_intrinsic_function): Likewise.
2636 2004-12-12 Richard Henderson <rth@redhat.com>
2638 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
2639 gfc_resolve_cshift, gfc_resolve_dot_product, gfc_resolve_eoshift,
2640 gfc_resolve_matmul, gfc_resolve_maxloc, gfc_resolve_maxval,
2641 gfc_resolve_minloc, gfc_resolve_minval, gfc_resolve_pack,
2642 gfc_resolve_product, gfc_resolve_reshape, gfc_resolve_shape,
2643 gfc_resolve_spread, gfc_resolve_sum, gfc_resolve_transpose,
2644 gfc_resolve_unpack: Use PREFIX.
2646 2004-12-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2649 * match.c (gfc_match_common): Skip whitespace.
2651 2004-12-12 Steven G. Kargl <kargls@comcast.net>
2654 * check.c (gfc_check_iand, gfc_check_ibclr, gfc_check_ibits,
2655 gfc_check_ibset, gfc_check_ieor, gfc_check_ior): Remove default
2656 integer kind check; Issue error for -std=f95 when needed.
2657 * intrinsic.c (add_functions): Change ieor from GFC_STD_GNU to
2659 * iresolve.c (gfc_resolve_iand, gfc_resolve_ieor, gfc_resolve_ior):
2660 Promote arguments to same kind.
2662 2004-12-12 Steven G. Kargl <kargls@comcast.net>
2663 Paul Brook <paul@codesourcery.com>
2666 * resolve.c (gfc_resolve_iterator_expr): New function.
2667 (gfc_resolve_iterator): Use it. Add real_ok argument. Convert
2668 start, end and stride to correct type.
2669 (resolve_code): Pass extra argument.
2670 * array.c (resolve_array_list): Pass extra argument.
2671 * gfortran.h (gfc_resolve): Add prototype.
2672 * trans-stmt.c (gfc_trans_do): Remove redundant type conversions.
2673 Handle real type iterators.
2675 2004-12-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2678 * iresolve.c (gfc_resolve_scale): Convert 'I' argument if not of
2679 same kind as C's 'int'.
2680 (gfc_resolve_set_exponent): Convert 'I' argument if not of kind 4.
2682 2004-12-08 Richard Henderson <rth@redhat.com>
2684 * intrinsic.c (gfc_convert_type_warn): Propagate the input shape
2685 to the output expression.
2686 * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift): Suppress
2688 (gfc_resolve_reshape): Force convert SHAPE and ORDER parameters
2691 2004-12-08 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2694 * resolve.c (resolve_code): Impose correct restrictions on
2697 * decl.c (gfc_match_end): Use locus of END when eos is an error.
2699 2004-12-02 Steven G. Kargl <kargls@comcast.net>
2700 Paul Brook <paul@codesourcery.com>
2702 * check.c (gfc_check_flush, gfc_check_fnum): New functions.
2703 (gfc_check_fstat, gfc_check_fstat_sub): New functions.
2704 (gfc_check_stat, gfc_check_stat_sub): New functions.
2705 * gfortran.h (GFC_ISYM_FNUM,GFC_ISYM_FSTAT,GFC_ISYM_STAT): New symbols
2706 * intrinsic.c (add_functions,add_subroutines): Add flush, fnum,
2707 fstat, and stat to intrinsics symbol tables.
2708 * intrinsic.h (gfc_check_flush, gfc_resolve_stat_sub): Add prototypes.
2709 (gfc_resolve_fstat_sub, gfc_resolve_stat): Ditto.
2710 * iresolve.c (gfc_resolve_fnum, gfc_resolve_fstat): New functions.
2711 (gfc_resolve_stat, gfc_resolve_flush): New functions.
2712 (gfc_resolve_stat_sub,gfc_resolve_fstat_sub): New functions
2713 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add new intrinsics.
2715 2004-12-02 Steven G. Kargl <kargls@comcast.net>
2717 * intrinsic.c: Fix and add comments, fix function declarations
2718 (OPTIONAL,REQUIRED): New symbols
2719 (add_functions,add_subroutines): Use symbols
2720 (gmp.h): Remove unused include
2722 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
2724 * f95-lang.c, gfortranspec.c, trans-decl.c: Avoid ` as left quote
2727 2004-11-24 Steven Bosscher <stevenb@suse.de>
2729 * options.c (gfc_post_options): Don't clear flag_inline_functions.
2731 2004-11-20 Steven G. Kargl <kargls@comcast.net>
2733 * check.c (gfc_check_getcwd_sub): Fix seg fault.
2735 * check.c (gfc_check_exit,gfc_check_umask,gfc_check_umask_sub,
2736 gfc_check_unlink,gfc_check_unlink_sub): New functions
2737 * gfortran.h (GFC_ISYM_UMASK,GFC_ISYM_UNLINK): New symbols
2738 * intrinsic.c (add_functions,add_subroutines): Add umask, unlink,
2739 exit to intrinsics symbol tables.
2740 * intrinsic.h (gfc_check_umask,gfc_check_unlink,gfc_check_exit,
2741 gfc_check_umask_sub,gfc_check_unlink_sub,gfc_resolve_umask,
2742 gfc_resolve_unlink,gfc_resolve_exit,gfc_resolve_umask_sub,
2743 gfc_resolve_unlink_sub): Add and sort prototypes.
2744 * iresolve.c (gfc_resolve_umask,gfc_resolve_unlink,gfc_resolve_exit,
2745 gfc_resolve_umask_sub,gfc_resolve_unlink_sub): New functions
2746 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbols
2748 2004-11-16 Paul Brook <paul@codesourcery.com>
2751 * trans-array.c (gfc_trans_allocate_temp_array): Use gfc_get_dtype.
2752 (gfc_array_init_size, gfc_conv_expr_descriptor): Ditto.
2753 * trans-types.c (gfc_get_dtype): Accept array type rather than element
2755 (gfc_get_nodesc_array_type): Don't set GFC_TYPE_ARRAY_DTYPE.
2756 (gfc_get_array_type_bounds): Ditto.
2757 (gfc_get_derived_type): Recurse into derived type pointers.
2758 * trans-types.h (gfc_get_dtype): Add prototype.
2759 * trans.h (GFC_TYPE_ARRAY_DTYPE): Add comment.
2761 2004-11-15 Paul Brook <paul@codesourcery.com>
2763 * trans-types.c (gfc_get_dtype): Remove obsolete TODO.
2765 2004-11-10 Paul Brook <paul@codesourcery.com>
2768 * trans-expr.c (gfc_trans_subarray_assign): Free shape before ss.
2769 * trans-io.c (transfer_array_component): Ditto.
2771 2004-11-10 Paul Brook <paul@codesourcery.com>
2773 * invoke.texi: Fix typo.
2775 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
2777 * arith.c, array.c, decl.c, expr.c, f95-lang.c, gfortran.h,
2778 gfortranspec.c, interface.c, intrinsic.c, iresolve.c, match.c,
2779 module.c, parse.c, parse.h, primary.c, resolve.c, scanner.c,
2780 trans-array.c, trans-array.h, trans-expr.c, trans-intrinsic.c,
2781 trans-io.c, trans-stmt.c, trans.h: Fix comment formatting.
2783 2004-11-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2786 * io.c (resolve_tag): Tighten up exception for assigned FORMAT.
2788 2004-11-06 Kazu Hirata <kazu@cs.umass.edu>
2790 * gfortranspec.c: Replace GNU CC with GCC.
2792 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2794 * gfortranspec.c (lang_specific_driver): Change year to 2004.
2796 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2799 * trans-decl.c (create_function_arglist): Set DECL_ARTIFICIAL for
2802 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2805 * trans-decl.c (gfc_finish_var_decl): Don't declare arguments to
2806 module procedures as if they were module variables.
2808 2004-11-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2813 * module.c (write_symbol1): Set module_name for dummy arguments.
2815 2004-11-02 Paul Brook <paul@codesourcery.com>
2817 * intrinsic.c (check_intrinsic_standard): Include error locus.
2819 (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Pass
2820 locus to check_intrinsic_standard.
2822 2004-10-31 Janne Blomqvist <jblomqvi@cc.hut.fi>
2825 * gfortran.h: Change GFC_STD_* flags to more appropriate
2826 ones. (struct gfc_intrinsic_isym): Add field for standard. (struct
2827 gfc_option_t): Add field for warning about use of nonstandard
2829 * intrinsic.c (add_sym): Add parameter for standard version, check
2830 this against current standard.
2831 (add_sym_0): Pass standard parameter to add_sym.
2832 (add_sym_1, add_sym_0s, add_sym_1s, add_sym_1m, add_sym_2): Ditto.
2833 (add_sym_2s, add_sym_3, add_sym_3ml, add_sym_3red, add_sym_3s): Ditto.
2834 (add_sym_4, add_sym_4s, add_sym_5, add_sym_5s): Ditto.
2835 (make_generic): Add parameter for standard, check this
2836 against currently selected standard.
2837 (add_functions, add_subroutines): Add parameter to tell which
2838 standard an intrinsic belongs to.
2839 (check_intrinsic_standard): New function.
2840 (gfc_intrinsic_func_interface): Add call to check_intrinsic_standard.
2841 (gfc_intrinsic_sub_interface): Ditto.
2842 * lang.opt: Add Wnonstd-intrinsics option.
2843 * options.c (gfc_init_options): Change to use new GFC_STD_* flags,
2845 (set_Wall): Add warning about nonstd intrinsics.
2846 (gfc_handle_option): Change to use new GFC_STD_* flags,
2848 * invoke.texi: Update manual to include -Wnonstd-intrinsics.
2850 2004-10-30 Andrew Pinski <pinskia@physics.uc.edu>
2852 * f95-lang.c (lang_tree_node): Add chain_next to be the TREE_CHAIN.
2854 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2856 * simplify.c (twos_complement): Calculate mask in GMP arithmetic.
2858 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2860 * trans.c (gfc_trans_code): Set global locus after recursing. Fix
2863 2004-10-30 Canqun Yang <canqun@nudt.edu.cn>
2865 * check.c (gfc_check_rand): Allow missing optional argument.
2866 (gfc_check_irand): Ditto.
2867 * intrinsic.c (add_functions): Set arg optional flag for {i,}rand.
2869 2004-10-28 Scott Robert Ladd <scott.ladd@coyotegulch.com>
2871 PR fortran/13490, PR fortran/17912
2872 * gcc/fortran/gfortran.h: Added pedantic_min_int to gfc_integer_info
2873 * gcc/fortran/gfortran.h: Added ARITH_ASYMMETRIC to arith
2874 * gcc/fortran/arith.c: Added support for an "asymmetric integer"
2875 warning when compiling with pedantic.
2876 * gcc/fortran/arith.c: Set minimum integer values to reflect
2877 realities of two's complement signed integers. Added
2880 2004-10-17 Andrew Pinski <pinskia@physics.uc.edu>
2882 * Make-lang.in (F95_ADDITIONAL_OBJS): Kill.
2883 (f951): Do not depend on F95_ADDITIONAL_OBJS and don't
2886 2004-10-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2888 * trans-decl.c (generate_local_decl): Simplify logic, fix comment
2890 (gfc_generate_function_code): Fix formatting issue.
2892 2004-10-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2894 * module.c: Fix formatting issues.
2896 2004-10-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2898 * module.c (mio_interface_rest): Set where member of interface
2901 2004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
2904 * options.c (gfc_handle_option): Add break after handing the
2907 2004-10-08 Tobias Schlueter <tobias.shclueter@physik.uni-muenchen.de>
2909 * arith.c: Fix formatting issues.
2911 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2914 * resolve.c (resolve_operator): Use correct operator name in message.
2916 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2918 * primary.c (match_boz_constant): Allow kind parameter suffixes.
2919 Move standard warning further to the front.
2921 2004-10-07 Kazu Hirata <kazu@cs.umass.edu>
2923 * trans-stmt.c: Fix a comment typo.
2925 2004-10-07 Paul Brook <paul@codesourcery.com>
2928 * trans-array.c (gfc_trans_deferred_array): Leave use associated
2931 2004-10-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2934 * simplify.c (twos_complement): New function.
2935 (gfc_simplify_ishft, gfc_simplify_ishftc): Revise.
2937 * simplify.c (gfc_simplify_abs): Use mpfr_hypot for CABS.
2939 2004-10-06 Paul Brook <paul@codesourcery.com>
2941 * trans-stmt.c (gfc_trans_simple_do): New function.
2942 (gfc_trans_do): Use it. Evaluate iteration bounds before entering
2943 loop. Update comments.
2945 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2948 * iresolve.c (gfc_resolve_pack): Choose function depending if mask
2952 * intrinsic.c (add_sym_5): Remove.
2953 (add_subroutines): Add resolution function for MVBITS.
2954 * intrinsic.h (gfc_resolve_mvbits): Declare resolution function for
2956 * iresolve.c (gfc_resolve_mvbits): New function.
2957 (gfc_resolve_random_number): Remove empty line at end of function.
2959 * trans-const.c (gfc_build_cstring_const): New function.
2960 (gfc_init_cst): Use new function.
2961 * trans-const.h (gfc_build_cstring_const): Add prototype.
2962 * trans-io.c (set_string, set_error_locus): Use new function.
2963 * trans-stmt.c (gfc_trans_goto): Use new function.
2966 * parse.c (accept_statement): Don't treat END DO like END IF and
2968 (parse_do_block): Generate possible END DO label inside END DO
2972 * check.c (gfc_check_system_sub): New function.
2973 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SYSTEM.
2974 * intrinsic.c (add_functions): Add 'system'.
2975 (add_subroutines): Add 'system'.
2976 * intrinsic.h (gfc_check_etime_sub, gfc_check_getcwd_sub):
2977 Move prototypes to other suborutines.
2978 (gfc_check_system_sub, gfc_resolve_system, gfc_resolve_system_sub):
2980 (gfc_resolve_system_clock): Fix formatting of prototype.
2981 * iresolve.c (gfc_resolve_system, gfc_resolve_system_sub): New
2983 * trans-intrinsic.c (gfc_conv_intrinsic_function): Deal with
2986 2004-10-04 Erik Schnetter <schnetter@aei.mpg.de>
2988 * scanner.c (preprocessor_line): Accept preprocessor lines without
2989 file names. Check file names for closing quotes. Handle escaped
2990 quotes in file names.
2992 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2993 Paul Brook <paul@codesourcery.com>
2995 * trans-array.c (gfc_conv_expr_descriptor): Check for substriungs.
2996 Use gfc_get_expr_charlen.
2997 * trans-expr.c (gfc_get_expr_charlen): New function.
2998 * trans.h (gfc_get_expr_charlen): Add prototype.
3000 2004-10-04 Kazu Hirata <kazu@cs.umass.edu>
3002 * trans-intrinsic.c: Fix a comment typo.
3004 2004-10-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3006 * simplify.c (range_check): Remove blank line at beginning of function.
3007 (gfc_simplify_dint): Same at end of function.
3008 (gfc_simplify_exponent, gfc_simplify_fraction): Simplify calculations.
3009 (gfc_simplify_bound): Fix indentation.
3010 (gfc_simplify_log10): Simplify calculation.
3011 (gfc_simplify_min, gfc_simplify_max): Remove blank line at beginning
3013 (gfc_simplify_nearest): Same at end of function.
3014 (gfc_simplify_nint, gfc_simplify_idnint): Same at beginning of
3016 (gfc_simplify_rrspacing, gfc_simplify_set_exponent,
3017 gfc_simplify_spacing): Simplify calulations.
3019 2004-10-03 Feng Wang <fengwang@nudt.edu.cn>
3021 * trans-intrinsic.c: Fix comments on spacing and rrspacing
3022 (gfc_conv_intrinsic_rrspacing): Add fold on constant trees.
3024 2004-10-01 Jan Hubicka <jh@suse.cz>
3026 * f95-lang.c (gfc_expand_function): Update call of
3027 tree_rest_of_compilation.
3028 * trans-decl.c (gfc_generate_constructors): Likewise.
3030 2004-09-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3032 * trans-intrinsic.c: Comment fixes.
3034 2004-09-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3036 * decl.c (add_init_expr_to_sym, variable_decl): Comment fixes.
3038 2004-09-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3040 * trans-types.c (gfc_return_by_reference): Remove superfluous
3043 * intrinsic.h (gfc_resolve_getcwd): Update prototype.
3044 * iresolve.c (gfc_resolve_getcwd): Add second argument to function.
3047 * trans-expr.c (gfc_trans_arrayfunc_assign): Look at resolved
3048 function to determine return type.
3050 2004-09-20 Jan Hubicka <jh@suse.cz>
3052 * trans-decl.c (build_entry_thunks): Finalize the function; do not lower
3054 (gfc_generate_function_code): Likewise.
3056 2004-09-20 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3059 * simplify.c (gfc_simplify_reshape): Set shape of return value
3062 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
3063 Zack Weinberg <zack@codesourcery.com>
3065 * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class
3066 enumeration constants.
3068 2004-09-17 Paul Brook <paul@codesourcery.com>
3070 * gfortran.h (struct gfc_linebuf): Don't use C99 empty arrays.
3071 (gfc_linebuf_header_size): Define.
3072 * scanner.c (load_file): Use it.
3074 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
3076 * array.c, data.c, decl.c, dependency.c, error.c, f95-lang.c,
3077 interface.c, intrinsic.c, io.c, misc.c, module.c, parse.h,
3078 resolve.c, scanner.c, trans-array.c, trans-array.h,
3079 trans-common.c, trans-const.h, trans-decl.c, trans-expr.c,
3080 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
3081 trans.h: Fix comment typos. Follow spelling conventions.
3083 2004-09-16 Victor Leikehman <lei@il.ibm.com>
3086 * trans-io.c (transfer_array_component): New function.
3087 (transfer_expr): For array fields, call transfer_array_component.
3089 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
3091 * gfortran.texi: Fix a typo.
3093 2004-09-15 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
3095 * parse.c (eof_buf): Rename eof to eof_buf.
3096 (unexpected_eof): Same.
3097 (gfc_parse_file): Same.
3099 2004-09-15 Steven G. Kargl <kargls@comcast.net>
3101 * check.c (gfc_check_getcwd_sub): New function.
3102 * gfortran.h (GFC_ISYM_GETCWD): New symbol.
3103 * intrinsic.c (add_functions): Add function definition;
3105 * intrinsic.c (add_subroutines): Add subroutine definitions.
3106 * intrinsic.h: Add prototypes.
3107 * iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub):
3109 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol.
3111 2004-09-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3114 * module.c (write_symbol): Don't fill in module name here.
3115 (write_symbol0): Fill in here instead.
3117 2004-09-14 Kazu Hirata <kazu@cs.umass.edu>
3119 * data.c, decl.c, f95-lang.c, gfortran.h, match.c,
3120 trans-array.c, trans-common.c, trans-expr.c,
3121 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.h: Fix
3122 comment typos. Follow spelling conventions.
3124 2004-09-09 Paul Brook <paul@codesourcery.com>
3126 * scanner.c (get_file): Add ATTRIBUTE_UNUSED.
3128 2004-09-08 Paul Brook <paul@codesourcery.com>
3130 * array.c: Don't include assert.h.
3131 * data.c: Don't include assert.h. Replace assert and abort with
3132 gcc_assert and gcc_unreachable.
3133 * dependency.c: Ditto.
3134 * f95-lang.c: Ditto.
3135 * iresolve.c: Ditto.
3137 * simplify.c: Ditto.
3139 * trans-array.c: Ditto.
3140 * trans-common.c: Ditto.
3141 * trans-const.c: Ditto.
3142 * trans-decl.c: Ditto.
3143 * trans-expr.c: Ditto.
3144 * trans-intrinsic.c: Ditto.
3145 * trans-io.c: Ditto.
3146 * trans-stmt.c: Ditto.
3147 * trans-types.c: Ditto.
3150 2004-09-07 Per Bothner <per@bothner.com>
3151 Paul Brook <paul@codesourcery.com>
3153 * error.c (show_locus): Handle mapped locations.
3154 * f95-lang.c (gfc_be_parse_file): Initialize mapped locations.
3155 * gfortran.h: Include input.h.
3156 (struct gfc_linebuf): Use source_location.
3157 * scanner.c (get_file): Initialize linemap.
3158 (preprocessor_line): Pass extra argument to get_file.
3159 (load_file): Ditto. Setup linemap.
3160 (gfc_new_file): Handle mapped locations.
3161 * trans-common.c (build_field, build_equiv_decl, build_common_decl):
3162 Set decl source locations.
3163 (gfc_trans_common): Set blank common block location.
3164 * trans-decl.c (gfc_set_decl_location): New function.
3165 (gfc_get_label_decl, gfc_get_symbol_decl): Use it.
3166 (trans_function_start): Move call to gfc_set_backend_locus..
3167 (build_function_decl): ... to here.
3168 (build_entry_thunks): Set and restore the backend locus.
3169 (gfc_generate_constructors): Remove excess arguments to
3170 init_function_start.
3171 (gfc_generate_block_data): Add comments. Set the decl locus.
3172 * trans-io.c (set_error_locus): Handle mapped locations.
3173 * trans.c (gfc_get_backend_locus, gfc_get_backend_locus): Ditto.
3174 (gfc_trans_code): Use SET_EXPR_LOCATION.
3175 (gfc_generate_code): Override the location of the new symbol.
3176 * trans.h (gfc_set_decl_location): Add prototype.
3178 2004-08-31 Paul Brook <paul@codesourcery.com>
3180 * trans-types.c (gfc_type_for_mode): Return NULL for unknown modes.
3182 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3185 * trans-intrinsic.c (gfc_conv_intrinsic_merge): Do the right thing for
3188 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3193 * resolve.c (resolve_transfer): New function.
3194 (resolve_code): Call resolve_transfer in case of EXEC_TRANSFER.
3196 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3199 * trans-types.c (gfc_init_types): Make gfc_character1_type_node an
3202 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3204 * CONTRIB, NEWS, README, TODO: Remove obsolete files.
3206 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3209 * trans-types.c (gfc_return_by_reference): Remove TODO error,
3210 add comment pointing out possible issue WRT compatibility with g77.
3212 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3214 * trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace
3215 all occurences of 'gfc_strlen_type_node' by
3216 'gfc_charlen_type_node'.
3217 * trans-types.h: Same. Also update comment accordingly.
3219 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3221 * primary.c: Update copyright boilerplate to say GCC.
3222 * f95-lang.c: Change initial comment to say gfortran.
3224 2004-08-31 Paul Brook <paul@codesourcery.com>
3226 * trans-types.h: Add comments.
3227 (intmax_type_node, string_type_node, const_string_type_node): Remove.
3229 2004-08-30 Richard Henderson <rth@redhat.com>
3231 * Make-lang.in (fortran/f95-lang.o): Update dependencies.
3232 (fortran/trans-decl.o, fortran/trans-types.o): Likewise.
3233 * gfortran.h (gfc_integer_info): Add c_char, c_short, c_int,
3234 c_long, c_long_long.
3235 (gfc_logical_info): Add c_bool.
3236 (gfc_real_info): Add mode_precision, c_float, c_double, c_long_double.
3237 * trans-array.c (gfc_array_allocate): Use TYPE_PRECISION
3238 rather than gfc_int[48]_type_node for allocate choice.
3239 * trans-decl.c (gfc_build_intrinsic_function_decls): Cache
3240 local copies of some kind type nodes.
3241 (gfc_build_builtin_function_decls): Likewise.
3242 * trans-expr.c (gfc_conv_power_op): Likewise.
3243 * trans-intrinsic.c (gfc_conv_intrinsic_index,
3244 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify,
3245 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Likewise.
3246 * trans-stmt.c (gfc_trans_pause, gfc_trans_stop,
3247 gfc_trans_character_select, gfc_trans_allocate): Likewise.
3248 * trans-io.c (gfc_pint4_type_node): Move into ...
3249 (gfc_build_io_library_fndecls): ... here. Cache local copies of
3250 some kind type nodes.
3251 * trans-types.c (gfc_type_nodes): Remove.
3252 (gfc_character1_type_node, gfc_strlen_type_node): New.
3253 (gfc_integer_types, gfc_logical_types): New.
3254 (gfc_real_types, gfc_complex_types): New.
3255 (gfc_init_kinds): Fill in real mode_precision.
3256 (gfc_build_int_type, gfc_build_real_type): New.
3257 (gfc_build_complex_type, gfc_build_logical_type): New.
3258 (c_size_t_size): New.
3259 (gfc_init_types): Loop over kinds.
3260 (gfc_get_int_type, gfc_get_real_type): Use gfc_validate_kind.
3261 (gfc_get_complex_type, gfc_get_logical_type): Likewise.
3262 (gfc_get_character_type_len): Likewise.
3263 (gfc_type_for_size): Loop over kinds; use a reduced set of
3264 unsigned type nodes.
3265 (gfc_type_for_mode): Loop over kinds.
3266 (gfc_signed_or_unsigned_type): Use gfc_type_for_size.
3267 (gfc_unsigned_type, gfc_signed_type): Use gfc_signed_or_unsigned_type.
3268 * trans-types.h (F95_INT1_TYPE, F95_INT2_TYPE, F95_INT4_TYPE,
3269 F95_INT8_TYPE, F95_INT16_TYPE, F95_REAL4_TYPE, F95_REAL8_TYPE,
3270 F95_REAl16_TYPE, F95_COMPLEX4_TYPE, F95_COMPLEX8_TYPE,
3271 F95_COMPLEX16_TYPE, F95_LOGICAL1_TYPE, F95_LOGICAL2_TYPE,
3272 F95_LOGICAL4_TYPE, F95_LOGICAL8_TYPE, F95_LOGICAL16_TYPE,
3273 F95_CHARACTER1_TYPE, NUM_F95_TYPES, gfc_type_nodes,
3274 gfc_int1_type_node, gfc_int2_type_node, gfc_int4_type_node,
3275 gfc_int8_type_node, gfc_int16_type_node, gfc_real4_type_node,
3276 gfc_real8_type_node, gfc_real16_type_node, gfc_complex4_type_node,
3277 gfc_complex8_type_node, gfc_complex16_type_node,
3278 gfc_logical1_type_node, gfc_logical2_type_node,
3279 gfc_logical4_type_node, gfc_logical8_type_node,
3280 gfc_logical16_type_node, gfc_strlen_kind): Remove.
3281 (gfc_character1_type_node): Turn in to a variable.
3282 (gfc_strlen_type_node): Likewise.
3284 2004-08-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3286 * gfortran.h (gfc_namespace): Add new field is_block_data.
3287 * parse.c (accept_statement): Remove special handling for BLOCK DATA.
3288 (parse_block_data): Record BLOCK DATA name, set is_block_data field.
3289 * trans.c (gfc_generate_code): Handle BLOCK DATA units.
3290 * trans.h (gfc_generate_block_data): Add prototype.
3291 * trans-decl.c (gfc_generate_block_data): New function.
3293 2004-08-29 Richard Henderson <rth@redhat.com>
3295 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_export.
3296 * trans-types.c (gfc_init_kinds): Reject integer kinds larger
3297 than two HOST_WIDE_INT.
3299 2004-08-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3302 * decl.c (free_variable, free_value, gfc_free_data, var_list,
3303 var_element, top_var_list, match_data_constant, top_val_list,
3304 gfc_match_data): Move here from match.c.
3305 (match_old_style_init): New function.
3306 (variable_decl): Match old-style initialization.
3307 * expr.c (gfc_get_variable_expr): New function.
3308 * gfortran.h (gfc_get_variable_expr): Add prototype.
3309 * gfortran.texi: Start documentation for supported extensions.
3310 * match.c: Remove the functions moved to decl.c.
3311 * match.h (gfc_match_data): Move prototype to under decl.c.
3312 * symbol.c (gfc_find_sym_tree, gfc_find_symbol): Add/correct
3315 2004-08-29 Steven G. Kargl <kargls@comcast.net>
3316 Paul Brook <paul@codesourcery.com>
3318 * check.c (gfc_check_besn, gfc_check_g77_math1): New functions.
3319 * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Define.
3320 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
3321 (build_builtin_fntypes): New function.
3322 (gfc_init_builtin_functions): Use it.
3323 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_{J,Y}{0,1,N}
3324 and GFC_ISYM_ERF{,C}.
3325 (gfc_c_int_kind): Declare.
3326 * intrinsic.c (add_functions): Add [d]bes* and [d]erf*.
3327 * intrinsic.h (gfc_check_besn, gfc_check_g77_math1, gfc_resolve_besn,
3328 gfc_resolve_g77_math1): Add prototypes.
3329 * resolve.c (gfc_resolve_besn, gfc_resolve_g77_math1): New functions.
3330 * mathbuiltins.def: Add comment. Change third argument. Use
3331 DEFINE_MATH_BUILTIN_C. Add bessel and error functions.
3332 * trans-intrinsic.c (BUILT_IN_FUNCTION): Define.
3333 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
3334 * trans-types.c (gfc_c_int_kind): Declare.
3335 (gfc_init_kinds): Set it.
3337 2004-08-29 Steven G. Kargl <kargls@comcast.net>
3338 Paul Brook <paul@codesourcery.com>
3340 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
3341 (gfc_check_f, gfc_simplify_f): Add f0.
3342 * intrinsic.c (do_check): Call f0. Flatten.
3343 (add_sym_0): Fix prototype. Set f0.
3344 (add_functions): Add getgid, getgid and getuid.
3345 (resolve_intrinsic): Remove obsolete comment.
3346 (do_simplify): Call f0.
3347 * intrinsic.h (gfc_resolve_getgid, gfc_resolve_getpid,
3348 gfc_resolve_getuid): Add prototypes.
3349 * iresolve.c (gfc_resolve_getgid, gfc_resolve_getpid,
3350 gfc_resolve_getuid): New functions.
3351 * trans-intrinsic.c (gfc_conv_intrinsic_function): Handle
3354 2004-08-28 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3356 * error.c (gfc_error_init_1): Remove blank line in front of
3357 function body. Add missing blank.
3358 (gfc_buffer_error, error_char, error_string): Remove blank line in
3359 front of function body.
3360 (show_locus): Add comma in comment.
3361 (gfc_clear_warning, gfc_warning_check, gfc_clear_error,
3362 gfc_push_error, gfc_pop_error): Remove blank line in front of
3364 (gfc_get_errors): Typo fix in comment in front of function. Remove
3365 blank line in front of function body.
3367 2004-08-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3369 * gfortran.h (gfc_default_*_kind): Remove prototypes, add extern
3370 variable declaration of same name.
3371 * arith.c, check.c, decl.c, dump_parse_tree.c, expr.c,
3372 intrinsic.c, io.c, iresolve.c, match.c, options.c, primary.c,
3373 resolve.c, simplify.c, symbol.c, trans-const.c, trans-io.c:
3374 Replace all calls to gfc_default_*_kind with variable accesses.
3375 * trans-types.c: Same as above.
3376 (gfc_default_*_kind_1): Rename to gfc_default_*_kind, remove
3377 static qualifier. Replace all occurences.
3378 (gfc_default_*_kind): Remove functions.
3380 2004-08-26 Richard Henderson <rth@redhat.com>
3382 * arith.c: Include system.h, not real system headers.
3383 (MPZ_NULL, MPF_NULL, DEF_GFC_INTEGER_KIND, DEF_GFC_LOGICAL_KIND,
3384 DEF_GFC_REAL_KIND, GFC_SP_KIND, GFC_SP_PREC, GFC_SP_EMIN, GFC_SP_EMAX,
3385 GFC_DP_KIND, GFC_DP_PREC, GFC_DP_EMIN, GFC_DP_EMAX, GFC_QP_KIND,
3386 GFC_QP_PREC, GFC_QP_EMIN, GFC_QP_EMAX): Remove.
3387 (gfc_integer_kinds, gfc_logical_kinds, gfc_real_kinds,
3388 gfc_index_integer_kind, gfc_default_integer_kind,
3389 gfc_default_real_kind,gfc_default_double_kind,
3390 gfc_default_character_kind, gfc_default_logical_kind,
3391 gfc_default_complex_kind, validate_integer, validate_real,
3392 validate_logical, validate_character,
3393 gfc_validate_kind): Move to trans-types.c.
3394 (gfc_set_model_kind): Use gfc_validate_kind.
3395 (gfc_set_model): Just copy the current precision to default.
3396 (gfc_arith_init_1): Use mpfr precision 128 for integer setup.
3397 * f95-lang.c (gfc_init_decl_processing): Invoke gfc_init_kinds.
3398 * gfortran.h: Update file commentary.
3399 * trans-types.c (MAX_INT_KINDS, MAX_REAL_KINDS): New.
3400 (gfc_default_integer_kind_1, gfc_default_real_kind_1,
3401 gfc_default_double_kind_1, gfc_default_character_kind_1,
3402 gfc_default_logical_kind_1, gfc_default_complex_kind_1): New.
3403 (gfc_init_kinds): New.
3404 (gfc_init_types): Don't set gfc_index_integer_kind here.
3405 * trans-types.h (gfc_init_kinds): Declare.
3406 * doc/invoke.texi: Clarify DOUBLE PRECISION behaviour wrt -r8.
3408 2004-08-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3410 * check.c (gfc_check_atan2): New function.
3411 * intrinsic.c (add_functions): Use gfc_check_atan2 for ATAN2
3412 * intrinsic.h (gfc_check_atan2): Add prototype.
3414 2004-08-25 Richard Henderson <rth@redhat.com>
3416 * arith.c (gfc_validate_kind): Add may_fail argument; abort if
3417 false and we don't validate the kind.
3418 (gfc_check_integer_range, gfc_check_real_range): Update to match.
3419 * check.c (kind_check): Likewise.
3420 * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Likewise.
3421 (match_char_spec, match_logical_spec): Likewise.
3422 * gfortran.h (gfc_validate_kind): Likewise.
3423 * options.c (gfc_handle_option): Likewise.
3424 * primary.c (match_integer_constant, match_real_constant,
3425 match_string_constant, match_logical_constant,
3426 match_const_complex_part): Likewise.
3427 * simplify.c (get_kind, gfc_simplify_bit_size, gfc_simplify_digits,
3428 gfc_simplify_epsilon, gfc_simplify_huge, gfc_simplify_ibclr,
3429 gfc_simplify_ibset, gfc_simplify_ishft, gfc_simplify_ishftc,
3430 gfc_simplify_maxexponent, gfc_simplify_minexponent,
3431 gfc_simplify_nearest, gfc_simplify_not, gfc_simplify_precision,
3432 gfc_simplify_radix, gfc_simplify_range, gfc_simplify_rrspacing,
3433 gfc_simplify_scale, gfc_simplify_spacing, gfc_simplify_tan,
3434 gfc_simplify_tiny): Likewise.
3435 * trans-intrinsic.c (gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod,
3436 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
3437 prepare_arg_info): Likewise.
3439 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3441 * expr.c (gfc_check_assign): Add comment. Add new warning.
3442 * trans-expr.c (gfc_conv_function_call): Correctly dereference
3443 result of pointer valued function when not in pointer assignment.
3445 2004-08-25 Paul Brook <paul@codesourcery.com>
3447 * config-lang.in: Remove dead commented line.
3448 * module.c: Replace g95 with gfortran in comment.
3450 2004-08-25 Paul Brook <paul@codesourcery.com>
3453 * arith.c (gfc_mpfr_to_mpz): Workaround mpfr bug.
3455 2004-08-25 Paul Brook <paul@codesourcery.com>
3458 * trans-array.c (gfc_trans_allocate_temp_array): Remove
3459 string_length argument.
3460 (gfc_trans_array_ctor_element): New function.
3461 (gfc_trans_array_constructor_subarray): Use it.
3462 (gfc_trans_array_constructor_value): Ditto. Handle constant
3464 (get_array_ctor_var_strlen, get_array_ctor_strlen): New functions.
3465 (gfc_trans_array_constructor): Use them.
3466 (gfc_add_loop_ss_code): Update to new gfc_ss layout.
3467 (gfc_conv_ss_descriptor): Remember section string length.
3468 (gfc_conv_scalarized_array_ref): Ditto. Remove dead code.
3469 (gfc_conv_resolve_dependencies): Update to new gfc_ss layout.
3470 (gfc_conv_expr_descriptor): Ditto.
3471 (gfc_conv_loop_setup): Ditto. Spelling fixes.
3472 * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
3473 * trans-const.c (gfc_conv_constant): Update to new gfc_ss layout.
3474 * trans-expr.c (gfc_conv_component_ref): Turn error into ICE.
3475 (gfc_conv_variable): Set string_length from section.
3476 (gfc_conv_function_call): Remove extra argument.
3477 (gfc_conv_expr, gfc_conv_expr_reference): Update to new gfc_ss layout.
3478 * trans-types.c (gfc_get_character_type_len): New function.
3479 (gfc_get_character_type): Use it.
3480 (gfc_get_dtype): Return zero for internal types.
3481 * trans-types.h (gfc_get_character_type_len): Add prototype.
3482 * trans.h (struct gfc_ss): Move string_length out of union.
3484 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3486 * trans.h (build2_v, build3_v): New macros.
3488 * f95-lang.c (gfc_truthvalue_conversion): Use build2 instead of
3490 * trans-array.c (gfc_conv_descriptor_data,
3491 gfc_conv_descriptor_offset, gfc_conv_descriptor_dimension,
3492 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
3493 gfc_conv_descriptor_ubound, gfc_trans_allocate_array_storage,
3494 gfc_trans_allocate_temp_array,
3495 gfc_trans_array_constructor_subarray,
3496 gfc_trans_array_constructor_value, gfc_conv_array_index_ref,
3497 gfc_trans_array_bound_check, gfc_conv_array_index_offset,
3498 gfc_conv_scalarized_array_ref, gfc_conv_array_ref,
3499 gfc_conv_array_ref, gfc_trans_preloop_setup,
3500 gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
3501 gfc_conv_loop_setup, gfc_array_init_size,
3502 gfc_conv_array_initializer, gfc_trans_array_bounds,
3503 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
3504 gfc_conv_expr_descriptor, gfc_conv_array_parameter,
3505 gfc_trans_deferred_array): Use buildN and buildN_v macros instead
3506 of build and build_v as appropriate.
3507 * trans-common.c (create_common): Same.
3508 * trans-decl.c (gfc_trans_auto_character_variable,
3509 gfc_trans_entry_master_switch, gfc_generate_function_code): Same.
3510 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
3511 gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
3512 gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
3513 gfc_conv_expr_op, gfc_conv_function_call,
3514 gfc_trans_structure_assign): Same.
3515 * trans-intrinsic.c (build_fixbound_expr, build_round_expr,
3516 gfc_conv_intrinsic_aint, gfc_conv_intrinsic_bound,
3517 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
3518 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
3519 gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_minmax,
3520 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
3521 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_minmaxloc,
3522 gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
3523 gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_singlebitop,
3524 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
3525 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_strcmp,
3526 gfc_conv_allocated, gfc_conv_associated, prepare_arg_info,
3527 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
3528 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat,
3529 gfc_conv_intrinsic_iargc): Same.
3530 * trans-io.c (set_parameter_value, set_parameter_ref, set_string,
3531 set_flag, add_case, io_result, transfer_namelist_element,
3532 transfer_expr): Same.
3533 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_if_1,
3534 gfc_trans_arithmetic_if, gfc_trans_do, gfc_trans_do_while,
3535 gfc_trans_integer_select, gfc_trans_logical_select,
3536 gfc_trans_character_select, gfc_trans_forall_loop,
3537 gfc_trans_nested_forall_loop, gfc_do_allocate,
3538 generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
3539 compute_inner_temp_size, compute_overall_iter_number,
3540 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
3541 gfc_trans_forall_1, gfc_evaluate_where_mask,
3542 gfc_trans_where_assign, gfc_trans_allocate): Same.
3543 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Same.
3544 * trans.c (gfc_add_modify_expr, gfc_finish_block,
3545 gfc_build_array_ref, gfc_build_function_call,
3546 gfc_trans_runtime_check): Same.
3548 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3550 * trans-const.c (gfc_conv_mpz_to_tree): Change call to
3551 build_int_cst to build_int_cst_wide in accordance to Nathan's
3554 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
3556 * trans-array.c (gfc_trans_array_constructor_value): Adjust
3557 build_int_cst calls.
3558 * trans-const.c (gfc_build_string_const, gfc_init_constants,
3559 gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise.
3560 * trans-decl.c (gfc_get_symbol_decl, build_entry_thunks,
3561 gfc_trans_entry_master_switch): Likewise.
3562 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
3563 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
3564 * trans-io.c (add_case, set_error_locus,
3565 transfer_namelist_element, transfer_expr): Likewise.
3566 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
3567 gfc_trans_stop, gfc_trans_character_select): Likewise.
3568 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
3569 * trans.c (gfc_trans_runtime_check): Likewise.
3571 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3573 * trans-decl.c, trans-types.c: Add and remove blank lines as
3576 2004-08-24 Richard Henderson <rth@redhat.com>
3578 * trans-const.c (gfc_conv_mpz_to_tree): Fix 64-bit shift warning.
3580 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3582 * resolve.c (merge_argument_lists): Revert unintentionally
3585 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3587 * trans-decl.c (build_function_decl): Fix spelling in comment.
3588 (build_entry_thunks): Remove code with no function.
3589 (gfc_build_intrinsic_function_decls): Remove empty line.
3591 * resolve.c (resolve_entries): Fix a bunch of comment typos.
3593 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
3595 * f95-lang.c (gfc_init_decl_processing): Adjust
3596 build_common_tree_nodes call.
3598 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3600 * trans-types.c: Spelling and formatting fixes.
3602 2004-08-23 Richard Henderson <rth@redhat.com>
3604 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_getlimbn instead
3605 of going through an intermediate string. Fix 32/64 int/long bug.
3607 2004-08-23 Eric Christopher <echristo@redhat.com>
3609 * trans-types.c (gfc_type_for_mode): Remove VECTOR_TYPE_SUPPORTED_P
3610 usage. Use build_vector_type_for_mode for vector types.
3612 2004-08-22 Richard Henderson <rth@redhat.com>
3615 * data.c (find_con_by_offset): Search ordered list; handle
3616 elements with repeat counts.
3617 (gfc_assign_data_value_range): New.
3618 * gfortran.h (struct gfc_data_value): Make repeat unsigned.
3619 (gfc_assign_data_value_range): Declare.
3620 * match.c (top_val_list): Extract repeat count into a temporary.
3621 * resolve.c (values): Make left unsigned.
3622 (next_data_value): Don't decrement left.
3623 (check_data_variable): Use gfc_assign_data_value_range.
3625 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3627 * trans-const.c, trans-decl.c, trans-expr.c: Spelling fixes.
3629 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3631 * check.c (gfc_check_reduction): Rename to ...
3632 (check_reduction): ... this. Make static. Don't check type of
3634 (gfc_check_minval_maxval, gfc_check_prodcut_sum): New functions.
3635 * intrinsic.c (add_functions): Change MAXVAL, MINVAL, PRODUCT and
3636 SUM to use new check functions.
3637 (check_specific): Change logic to call new functions.
3638 * intrinsic.h (gfc_check_minval_maxval, gfc_check_product_sum):
3640 (gfc_check_reduction): Remove prototype.
3642 2004-08-20 Paul Brook <paul@codesourcery.com>
3643 Canqun Yang <canqun@nudt.edu.cn>
3646 * trans-array.c (gfc_conv_array_parameter): Pass correct pointer
3647 for automatic arrays.
3648 * trans-types.c (gfc_get_nodesc_array_type): Add comment.
3650 2004-08-19 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3654 * match.c (match_simple_forall, match_simple_where): Forward-declare.
3655 (gfc_match_if): Order statement list alphabetically, add WHERE and
3656 FORALL, remove double PAUSE.
3657 (gfc_match_simple_where, match_forall_header,
3658 gfc_match_simple_forall): New functions.
3659 (gfc_match_forall): Use match_forall_header.
3661 2004-08-19 Paul Brook <paul@codesourcery.com>
3664 * gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0.
3665 * symbol.c (gfc_clear_attr): Use memset.
3667 2004-08-19 Paul Brook <paul@codesourcery.com>
3671 * data.c (assign_substring_data_value): Remove.
3672 (create_character_intializer): New function.
3673 (gfc_assign_data_value): Track the typespec for the current
3674 subobject. Use create_character_intializer.
3676 2004-08-19 Erik Schnetter <schnetter@aei.mpg.de>
3679 * check.c (gfc_check_reduction): New function.
3680 (gfc_check_minval_maxval): Removed.
3681 (gfc_check_product): Removed.
3682 (gfc_check_sum): Removed.
3683 * intrinsic.h: Add/remove declarations for these.
3684 * gfortran.h: Add field f3red to union gfc_check_f.
3685 * intrinsic.c (add_sym_3red): New function.
3686 (add_functions): Register maxval, minval, product, and sum intrinsics
3687 through add_sym_3red.
3688 (check_specific): Handle f3red union field.
3689 * iresolve.c: Whitespace change.
3691 2004-08-18 Paul Brook <paul@codesourcery.com>
3693 * trans-types.c (gfc_sym_type): Use pointer types for optional args.
3695 2004-08-18 Victor Leikehman <lei@il.ibm.com>
3698 * trans-io.c (transfer_namelist_element): New. Recursively handle
3699 derived-type variables. Pass string lengths.
3700 (build_dt): Code moved to build_namelist, with some
3701 changes and additions.
3702 (gfc_build_io_library_fndecls): Declare the fifth
3703 argument in st_set_nml_var_char -- string_length.
3705 2004-08-17 Paul Brook <paul@codesourcery.com>
3706 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3709 * decl.c (get_proc_name): Update mystery comment.
3710 (gfc_match_entry): Check for errors earlier. Add entry point to list.
3711 * dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes.
3712 * gfortran.h (symbol_attribute): Add entry_master. Document entry.
3713 (struct gfc_entry_list): Define.
3714 (gfc_get_entry_list): Define.
3715 (struct gfc_namespace): Add refs and entries.
3716 (enum gfc_exec_op): Add EXEC_ENTRY.
3717 (struct gfc_code): Add ext.entry.
3718 * module.c (ab_attribute, attr_bits): Remove AB_ENTRY.
3719 (mio_symbol_attribute): Don't save/reture addr->entry.
3720 (mio_namespace_ref): Refcount namespaces.
3721 * parse.c (accept_statement): Handle ST_ENTRY.
3722 (gfc_fixup_sibling_symbols): Mark symbol as referenced.
3723 (parse_contained): Fixup sibling references to entry points
3724 after parsing the procedure body.
3725 * resolve.c (resolve_contained_fntype): New function.
3726 (merge_argument_lists, resolve_entries): New functions.
3727 (resolve_contained_functions): Use them.
3728 (resolve_code): Handle EXEC_ENTRY.
3729 (gfc_resolve): Call resolve_entries.
3730 * st.c (gfc_free_statement): Handle EXEC_ENTRY.
3731 * symbol.c (gfc_get_namespace): Refcount namespaces.
3732 (gfc_free_namespace): Ditto.
3733 * trans-array.c (gfc_trans_dummy_array_bias): Treat all args as
3734 optional when multiple entry points are present.
3735 * trans-decl.c (gfc_get_symbol_decl): Remove incorrect check.
3736 (gfc_get_extern_function_decl): Add assertion. Fix coment.
3737 (create_function_arglist, trans_function_start, build_entry_thunks):
3739 (gfc_build_function_decl): Rename ...
3740 (build_function_decl): ... to this.
3741 (gfc_create_function_decl): New function.
3742 (gfc_generate_contained_functions): Use it.
3743 (gfc_trans_entry_master_switch): New function.
3744 (gfc_generate_function_code): Use new functions.
3745 * trans-stmt.c (gfc_trans_entry): New function.
3746 * trans-stmt.h (gfc_trans_entry): Add prototype.
3747 * trans-types.c (gfc_get_function_type): Add entry point argument.
3748 * trans.c (gfc_trans_code): Handle EXEC_ENTRY.
3749 (gfc_generate_module_code): Call gfc_create_function_decl.
3750 * trans.h (gfc_build_function_decl): Remove.
3751 (gfc_create_function_decl): Add prototype.
3753 2004-08-15 Andrew Pinski <apinski@apple.com>
3756 * f95-lang.c (gfc_init_builtin_functions): Initialize the builtins
3757 for cabs{,f} and copysign{,f}.
3758 * trans-decl.c (gfor_fndecl_math_cabsf): Delete.
3759 (gfor_fndecl_math_cabs): Delete.
3760 (gfor_fndecl_math_sign4): Delete.
3761 (gfor_fndecl_math_sign8): Delete.
3762 (gfc_build_intrinsic_function_decls): Remove the
3763 initializing of cabs{,f} and copysign{,f} functions.
3764 * trans-intrinsic.c (gfc_conv_intrinsic_abs): Use the builtins
3765 instead of the functions definitions.
3766 (gfc_conv_intrinsic_sign): Likewise.
3767 * trans.h (gfor_fndecl_math_cabsf): Delete.
3768 (gfor_fndecl_math_cabs): Delete.
3769 (gfor_fndecl_math_sign4): Delete.
3770 (gfor_fndecl_math_sign8): Delete.
3772 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
3774 * trans-array.c (gfc_trans_array_constructor_value): Use
3776 * trans-const.c (gfc_build_string_const,
3777 gfc_init_constants, gfc_conv_mpz_to_tree,
3778 gfc_conv_constant_to_tree): Likewise.
3779 * trans-decl.c (gfc_get_symbol_decl): Likewise.
3780 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
3781 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
3782 * trans-io.c (add_case, set_error_locus, build_dt,
3783 transfer_expr): Likewise.
3784 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
3785 gfc_trans_stop, gfc_trans_character_select): Likewise.
3786 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
3787 * trans.c (gfc_trans_runtime_check): Likewise.
3789 2004-08-14 Paul Brook <paul@codesourcery.com>
3791 * trans-decl.c (gfc_build_function_decl): Remove dead code.
3793 2004-08-14 Paul Brook <paul@codesourcery.com>
3795 * trans-arry.c (gfc_trans_auto_array_allocation): Remove unused var.
3797 2004-08-13 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3799 * gfortran.h: Add comments.
3800 * parse.c (parse_contained): Fix comment typo.
3801 * resolve.c (was_declared): Ditto.
3804 2004-08-11 Paul Brook <paul@codeourcery.com>
3807 * intrinsic.c (add_functions): Add dfloat as an alias for dble.
3809 2004-08-10 Richard Henderson <rth@redhat.com>
3811 * f95-lang.c (gfc_init_builtin_functions): Remove
3812 __builtin_stack_alloc, add __builtin_alloca.
3813 * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR.
3814 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
3816 2004-08-10 Paul Brook <paul@codesourcery.com>
3818 * trans-io.c (transfer_expr): Handle pointters.
3820 2004-08-10 Paul Brook <paul@codesourcery.com>
3823 * trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT.
3824 (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta.
3825 (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary):
3826 Handle GFC_SS_COMPONENT.
3827 (gfc_conv_ss_startstride): Ditto. Set ss->shape.
3828 (gfc_conv_loop_setup): Tweak commends. Remove dead code.
3830 (gfc_conv_array_initializer): Call specific initializer routines.
3831 * trans-expr.c (gfc_trans_structure_assign): New function.
3832 (gfc_trans_subarray_assign): New function.
3833 (gfc_trans_subcomponent_assign): New fucntion
3834 (gfc_conv_structure): Use them.
3835 * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT.
3836 (gfc_ss): Add shape.
3838 2004-08-08 Victor Leikehman <lei@il.ibm.com>
3840 * simplify.c (gfc_simplify_shape): Bugfix.
3841 * expr.c (gfc_copy_shape_excluding): New function.
3842 * gfortran.h (gfc_get_shape): Bugfix.
3843 (gfc_copy_shape_excluding): Added declaration.
3844 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
3845 gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound,
3846 gfc_resolve_ubound, gfc_resolve_transpose): Added compile
3847 time resolution of shape.
3849 2004-08-06 Janne Blomqvist <jblomqvi@cc.hut.fi>
3851 * intrinsic.c (add_subroutines): Add getenv and
3852 get_environment_variable. (add_sym_5s): New function.
3853 * intrinsic.h (gfc_resolve_get_environment_variable): Add
3855 * iresolve.c (gfc_resolve_get_environment_variable): New
3858 2004-08-06 Feng Wang <fengwang@nudt.edu.cn>
3860 * f95-lang.c (gfc_init_builtin_functions): Fix the number of
3861 __builtin_pow[f] arguments.
3863 2004-08-06 Steven G. Kargl <kargls@comcast.net>
3865 * arith.c: Add #define for model numbers. Remove global GMP variables.
3866 (natural_logarithm,common_logarithm,exponential,sine,
3867 cosine,arctangent,hypercos,hypersine ): Remove.
3868 (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions.
3869 (arctangent2,gfc_arith_init_1,gfc_arith_done_1
3870 gfc_check_real_range, gfc_constant_result, gfc_range_check,
3871 gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times,
3872 gfc_arith_divide,complex_reciprocal,complex_pow_ui,
3873 gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real,
3874 gfc_convert_complex,gfc_int2real,gfc_int2complex,
3875 gfc_real2int,gfc_real2real,gfc_real2complex,
3876 gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP
3877 to MPFR, use new functions.
3878 * arith.h: Remove extern global variables.
3879 (natural_logarithm,common_logarithm,exponential, sine, cosine,
3880 arctangent,hypercos,hypersine): Remove prototypes.
3881 (arctangent2): Update prototype from GMP to MPFR.
3882 (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes.
3883 * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR.
3884 * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR.
3885 * gfortran.h (GFC_REAL_BITS): Remove.
3886 (arith): Add ARITH_NAN.
3887 Include mpfr.h. Define GFC_RND_MODE.
3888 Rename GCC_GFORTRAN_H GFC_GFC_H.
3889 (gfc_expr): Convert GMP to MPFR.
3890 * module.c: Add arith.h, correct type in comment.
3891 (mio_gmp_real): Convert GMP to MPFR.
3892 (mio_expr): Use gfc_set_model_kind().
3893 * primary.c: Update copyright date with 2004.
3894 (match_real_constant,match_const_complex_part): Convert GMP to MPFR.
3895 * simplify.c: Remove global GMP variables
3896 (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag,
3897 gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint,
3898 gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan,
3899 gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx,
3900 gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh,
3901 gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon,
3902 gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor,
3903 gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int,
3904 gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log,
3905 gfc_simplify_log10,simplify_min_max,gfc_simplify_mod,
3906 gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint,
3907 gfc_simplify_rrspacing,gfc_simplify_scale,
3908 gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin,
3909 gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt,
3910 gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny,
3911 gfc_simplify_init_1,gfc_simplify_done_1): Convert GMP to MPFR.
3913 * trans-const.c (gfc_conv_mpfr_to_tree): Rename from
3914 gfc_conv_mpf_to_tree. Convert it to use MPFR
3915 (gfc_conv_constant_to_tree): Use it.
3916 * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree().
3917 * trans-intrinsic.c: Add arith.h, remove gmp.h
3918 (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR.
3920 2004-08-06 Victor Leikehman <lei@il.ibm.com>
3921 Paul Brook <paul@codesourcery.com>
3923 * trans-array.c (gfc_trans_allocate_array_storage,
3924 gfc_trans_allocate_temp_array, gfc_add_loop_ss_code,
3925 gfc_conv_loop_setup): For functions, if the shape of the result
3926 is not known in compile-time, generate an empty array descriptor for
3927 the result and let the callee to allocate the memory.
3928 (gfc_trans_dummy_array_bias): Do nothing for pointers.
3929 (gfc_conv_expr_descriptor): Use function return values directly.
3930 * trans-expr.c (gfc_conv_function_call): Always add byref call
3932 (gfc_trans_pointer_assignment): Add comments.
3933 (gfc_trans_arrayfunc_assign): Don't chain on expression.
3935 2004-08-01 Roger Sayle <roger@eyesopen.com>
3937 * options.c (gfc_init_options): Don't warn about the use GNU
3938 extensions by default.
3939 (gfc_post_options): Warn about GNU extensions with -pedantic.
3940 (gfc_handle_option): Don't warn about GNU extensions with -std=gnu.
3942 2004-07-30 Richard Henderson <rth@redhat.com>
3944 * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL
3947 2004-07-25 Richard Henderson <rth@redhat.com>
3949 * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL
3950 and DECL_IGNORED_P on RESULT_DECL.
3951 (gfc_generate_constructors): Likewise.
3953 2004-07-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3956 * lang.opt (ffixed-line-length-none, ffixed-line-length-): New
3958 (ffixed-line-length-80, ffixed-line-length-132): Remove.
3959 * options.c (gfc_handle_options): Deal with changed options.
3960 * scanner.c (load_line): Change second arg to 'char **',
3961 allocate if pointing to NULL. Keep track of buffer's length.
3962 Adapt buffer size to overlong lines. Pad lines to full length
3964 (load_file): Adapt to new interface of load_line.
3966 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
3968 * trans.h (builtin_function): Declare.
3970 2004-07-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3973 (parts ported from g95)
3974 * parse.h (gfc_state_data): New field do_variable.
3975 (gfc_check_do_variable): Add prototype.
3976 * parse.c (push_state): Initialize field 'do_variable'.
3977 (gfc_check_do_variable): New function.
3978 (parse_do_block): Remember do iterator variable.
3979 (parse_file): Initialize field 'do_variable'.
3980 * match.c (gfc_match_assignment, gfc_match_do,
3981 gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate):
3982 Add previously missing checks.
3983 (gfc_match_return): Reformat error message.
3984 * io.c (match_out_tag): New function.
3985 (match_open_element, match_close_element,
3986 match_file_element, match_dt_element): Call match_out_tag
3987 instead of match_vtag where appropriate.
3988 (match_io_iterator, match_io_element): Add missing check.
3989 (match_io): Reformat error message.
3990 (match_inquire_element): Call match_out_tag where appropriate.
3992 * parse.c (gfc_check_do_variable): Fix error locus.
3994 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3997 * trans-decl.c (gfc_build_function_decl): Create a new chardecl
3998 for every assumed length character dummy argument.
4001 * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion.
4004 * simplify.c (gfc_simplify_bound): Copy the bound expression.
4006 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4009 * trans-array.c gfc_trans_g77_array,
4010 gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init
4011 for assumed length characters.
4012 (gfc_conv_expr_descriptor): Set se->string_length if dealing
4013 with a character expression.
4014 (gfc_cvonv_array_parameter): Pass string length when passing
4015 character array according to g77 conventions.
4017 2004-07-12 Paul Brook <paul@codesourcery.com>
4019 * expr.c (gfc_check_assign_symbol): Handle pointer assignments.
4020 * trans-array.c (gfc_trans_auto_array_allocation): Remove
4021 initialization code.
4022 * trans-common.c (create_common): Use gfc_conv_initializer.
4023 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer.
4024 * trans-expr.c (gfc_conv_initializer): New function.
4025 (gfc_conv_structure): Use it.
4026 * trans.h (gfc_conv_initializer): Add prototype.
4028 2004-07-11 Paul Brook <paul@codesourcery.com>
4031 * parse.c (gfc_fixup_sibling_symbols): Also look for untyped
4033 (parse_contained): Mark contained symbols as referenced.
4035 2004-07-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4038 * module.c (gfc_dump_module, gfc_use_module): Print locus
4039 when opening of module file fails.
4042 * io.c (match_io): Flag 'WRITE(...), ...' as extension.
4045 * match.c (gfc_match_program): A program name is obligatory.
4046 (gfc_match_return): RETURN in main program is an extension.
4047 (gfc_match_block_data): A space is required before a block data
4051 * primary.c (match_boz_constant): Call gfc_notify_std only if
4052 we actually have a non-standard boz-literal-constant.
4055 * expr.c (gfc_check_assign): Print ranks if incompatible. Issue
4056 warning if assigning NULL().
4058 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
4060 * f95-lang.c (set_block): Remove.
4061 (gfc_clear_binding_stack): New.
4062 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
4063 (struct binding_level): Remove block_created_by_back_end.
4064 (clear_binding_level): Likewise.
4065 (poplevel): Don't handle block_created_by_back_end.
4067 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4069 * trans-decl.c (gfc_create_module_variable): Nothing to do if
4070 symbol is in common, because we ...
4071 (gfc_generate_module_vars): Call gfc_trans_common.
4073 2004-07-10 Paul Brook <paul@codesourcery.com>
4075 * trans-array.c (gfc_build_null_descriptor): New function.
4076 (gfc_trans_static_array_pointer): Use it.
4077 * trans-array.h (gfc_build_null_descriptor): Add prototype.
4078 * trans-expr.c (gfc_conv_structure): Handle array pointers.
4080 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4083 * decl.c (gfc_match_save): Use-associated common block
4085 * gfortran.h (gfc_common_head): Add new field 'name'.
4086 Fix typo in comment after #endif.
4087 * match.c (gfc_get_common): Add new argument from_common,
4088 mangle name if flag is set, fill in new field in structure
4090 (match_common): Set new arg in call to gfc_get_common,
4091 use-associated common block doesn't collide.
4092 * match.h (gfc_get_common): Adapt prototype.
4093 * module.c (load_commons): Set new arg in call to
4095 * symbol.c (free_common_tree): New function.
4096 (gfc_free_namespace): Call new function.
4097 * trans-common.c (several functions): Remove argument
4098 'name', use name from gfc_common_head instead.
4100 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4102 * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
4103 and RHS match. Return early if the RHS is NULL().
4106 * match.c (match_common): Fix error reporting for used common.
4109 * trans-expr.c (gfc_conv_structure): Handle initialization
4110 of scalar pointer components.
4112 * parse.c (decode_statement): Fix matching of BLOCK DATA.
4114 * trans-decl.c (generate_local_decl): Remove workaround obsoleted
4115 by fix for PR 15481.
4117 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4119 * trans-common.c: Fix whitespace issues, make variable names
4121 (create_common): Additionally, make loop logic more obvious.
4123 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4124 Paul Brook <paul@codesourcery.com>
4127 * trans-common.c (calculate_length): Remove ...
4128 (get_segment_info): Merge into here. Save field type.
4129 (build_field): Use saved type.
4130 (create_common, new_condition, new_segment, finish_equivalences):
4131 Use new get_segment_info.
4132 * trans-types.c: Update comment.
4134 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4137 * moduele.c (mio_symbol): Don't I/O initial values unless
4138 symbol is a parameter.
4140 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4143 * resolve.c (resolve_symbol): Verify that the shape of a
4144 parameter array is not only explicit, but also constant.
4145 * array.c (gfc_is_compile_time_shape): New function.
4146 * gfortran.h (gfc_is_compile_time_shape): Add prototype.
4148 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4154 * module.c (write_symbol, write_symtree): Remove workaround.
4155 * primary.c (match_actual_arglist): Enhance comment.
4156 (gfc_match_rvalue): Handle function call with first argument
4157 a keyword argument correctly.
4158 * resolve.c (resolve_symbol): Change call to
4159 gfc_set_default_type to issue error if no implicit type
4161 * trans-decl.c (gfc_create_module_variable): Remove workaround.
4163 2004-07-08 Paul Brook <paul@codesourcery.com>
4165 * intrinsic.c (add_sym_4s): New function.
4166 (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
4168 2004-07-04 Janne Blomqvist <jblomqvi@cc.hut.fi>
4169 Paul Brook <paul@codesourcery.com>
4173 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
4174 GFC_ISYM_COMMAND_ARGUMENT_COUNT.
4175 * intrinsic.c (add_functions): Identify iargc. Add
4176 command_argument_count.
4177 (add_subroutines): Resolve getarg. Add get_command and
4178 get_command_argument.
4179 * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
4180 gfc_resolve_get_command_argument): Add prototypes.
4181 * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
4182 gfc_resolve_get_command_argument): New functions.
4183 * trans-decl.c (gfor_fndecl_iargc): New variable.
4184 (gfc_build_intrinsic_function_decls): Set it.
4185 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
4186 (gfc_conv_intrinsic_function): Use it.
4187 * trans.h (gfor_fndecl_iargc): Declare.
4189 2004-07-04 Matthias Klose <doko@debian.org>
4191 * Make-lang.in: Generate and install gfortran man page.
4192 * invoke.texi: Remove extra '@c man end'.
4194 2004-07-04 Richard Henderson <rth@redhat.com>
4196 * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
4198 2004-07-04 Paul Brook <paul@codesourcery.com>
4200 * decl.c (gfc_match_implicit_range): Don't use typespec.
4201 (gfc_match_implicit): Handle character selectors.
4202 * gfortran.h (gfc_set_implicit): Remove prototype.
4203 (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
4204 * parse.c (accept_statement): Don't call gfc_set_implicit.
4205 * symbol.c (new_ts): Remove.
4206 (gfc_set_implicit_none): Use same loop bounds as other functions.
4207 (gfc_set_implicit): Remove.
4208 (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
4209 (gfc_merge_new_implicit): Combine with gfc_set_implicit.
4211 2004-06-30 Richard Henderson <rth@redhat.com>
4213 * match.c (var_element): Remove unused variable.
4215 * trans-decl.c (gfc_generate_function_code): Don't set
4216 x_whole_function_mode_p.
4217 (gfc_generate_constructors): Likewise.
4219 2004-06-30 Richard Henderson <rth@redhat.com>
4221 * trans-decl.c (gfc_generate_function_code): Don't set
4222 immediate_size_expand.
4223 (gfc_generate_constructors): Likewise.
4225 2004-06-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4228 * decl.c (gfc_match_type_spec): Rename second argument to
4229 'implicit_flag', reverse meaning. Don't match_char_spec if
4230 'implicit_flag' is set. Rename to ...
4231 (match_type_spec): ... this.
4232 (gfc_match_implicit_none, match_implicit_range): Move here
4234 (gfc_match_implicit): Move here from match.c, try to
4235 match_char_len if match_implicit_range doesn't succeed for
4236 CHARACTER implicits. Call renamed fucntion match_type_spec.
4237 (gfc_match_data_decl, match_prefix): Call renamed function
4239 * match.c (gfc_match_implicit_none, match_implicit_range,
4240 gfc_match_implicit): Move to decl.c.
4241 * match.h (gfc_match_implicit_none, gfc_match_implicit):
4242 Move protoypes to section 'decl.c'.
4243 (gfc_match_type_spec): Remove prototype.
4245 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4247 * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
4250 2004-06-29 Steven Bosscher <stevenb@suse.de>
4252 Make sure types in assignments are compatible. Mostly mechanical.
4253 * trans-const.h (gfc_index_one_node): New define.
4254 * trans-array.c (gfc_trans_allocate_array_storage,
4255 gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
4256 gfc_trans_array_constructor_value, gfc_trans_array_constructor,
4257 gfc_conv_array_ubound, gfc_conv_array_ref,
4258 gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
4259 gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
4260 gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
4261 gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
4262 types in assignments, conversions and conditionals for expressions.
4263 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
4264 gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
4265 gfc_conv_function_call, gfc_trans_pointer_assignment,
4266 gfc_trans_scalar_assign): Likewise.
4267 * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
4268 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
4269 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
4270 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
4271 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
4272 gfc_conv_allocated, gfc_conv_associated,
4273 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
4274 * trans-io.c (set_string): Likewise.
4275 * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
4276 gfc_do_allocate, generate_loop_for_temp_to_lhs,
4277 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
4278 compute_overall_iter_number, gfc_trans_assign_need_temp,
4279 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
4280 gfc_evaluate_where_mask, gfc_trans_where_assign,
4281 gfc_trans_where_2): Likewise.
4282 * trans-types.c (gfc_get_character_type, gfc_build_array_type,
4283 gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
4285 * trans.c (gfc_add_modify_expr): Add sanity check that types
4286 for the lhs and rhs are the same for scalar assignments.
4288 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4290 * dump-parse-tree.c (show_common): New function.
4291 (gfc_show_namespace): Show commons.
4293 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4294 Andrew Vaught <andyv@firstinter.net>
4298 * decl.c (gfc_match_save): Adapt to new common structures,
4299 don't allow saving USE-associated common.
4300 * dump-parse-tree (gfc_show_attr): (saved_)common are not
4301 symbol attributes any longer.
4302 (gfc_show_symbol): Don't show old-style commons any longer.
4303 (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
4305 * gfortran.h (symbol_attribute): Remove common and saved_common
4307 (gfc_symbol): Remove common_head element.
4308 (gfc_common_head): New struct.
4309 (gfc_get_common_head): New macro.
4310 (gfc_symtree): Add field 'common' to union.
4311 (gfc_namespace): Add field 'common_root'; change type of field
4312 'blank_common' to blank_common.
4313 (gfc_add_data): New prototype.
4314 (gfc_traverse_symtree): Expect a symtree as first argument
4315 instead of namespace.
4316 * match.c (gfc_get_common): New function.
4317 (match_common_name): Change to take char * as argument, adapt,
4318 fix bug with empty name.
4319 (gfc_match_common): Adapt to new data structures. Disallow
4320 redeclaration of USE-associated COMMON-block. Fix bug with
4322 (var_element): Adapt to new common structures.
4323 * match.h (gfc_get_common): Declare.
4324 * module.c: Add 2004 to copyright years, add commons to module
4325 file layout description.
4326 (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
4327 for removed attributes.
4328 (mio_symbol): Adapt to new way of storing common relations.
4329 (load_commons): New function.
4330 (read_module): Skip common list on first pass, load_commons at
4332 (write_commons): New function.
4333 (write_module): Call write_commons().
4334 * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
4335 functions related to removed attributes.
4336 (gfc_add_data): New function.
4337 (gfc_clear_attr): Don't set removed attributes.
4338 (gfc_copy_attr): Don't copy removed attributes.
4339 (traverse_symtree): Remove.
4340 (gfc_traverse_symtree): Don't traverse symbol
4341 tree of the passed namespace, but require a symtree to be passed
4342 instead. Unify with traverse_symtree.
4343 (gfc_traverse_ns): Call gfc_traverse_symtree according to new
4345 (save_symbol): Remove setting of removed attribute.
4346 * trans-common.c (gfc_sym_mangled_common_id): Change to
4347 take 'char *' argument instead of 'gfc_symbol'.
4348 (build_common_decl, new_segment, translate_common): Adapt to new
4349 data structures, add new
4351 (create_common): Adapt to new data structures, add new
4352 argument name. Fix typo in intialization of derived types.
4353 (finish_equivalences): Add second argument in call to
4355 (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
4356 (gfc_trans_common): Adapt to new data structures.
4357 * trans-decl.c (gfc_create_module_variables): Remove test for
4360 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4362 * io.c: Add 2004 to copyright years.
4364 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4365 Andrew Vaught <andyv@firstinter.net>
4367 * gfortran.h (gfc_gsymbol): New typedef.
4368 (gfc_gsym_root): New variable.
4369 (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
4370 * parse.c (global_used): New function.
4371 (parse_block_data): Check for double empty BLOCK DATA,
4372 use global symbol table.
4373 (parse_module): Use global symbol table.
4374 (add_global_procedure, add_global_program): New functions.
4375 (gfc_parse_file): Use global symbol table.
4376 * symbol.c (gfc_gsym_root): New variable.
4377 (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
4380 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4382 * module.c (mio_gmp_real): Correct writing of negative numbers.
4384 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4387 * expr.c (check_intrinsic_op): Allow comparison of characters.
4390 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4391 Andrew Vaught <andyv@firstinter.net>
4393 * decl.c (contained_procedure): New function.
4394 (match_end): Verify correctness of END STATEMENT in
4397 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4398 Andrew Vaught <andyv@firstinter.net>
4401 * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
4402 (decode_statement): Enforce required space in free-form.
4404 2004-06-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4406 * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
4407 * trans-array.c (gfc_conv_descriptor_data): Add operand
4409 (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
4410 (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
4411 (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
4412 * trans-common.c (create_common): Likewise.
4413 * trans-expr.c (gfc_conv_component_ref): Likewise.
4414 * trans-io.c (set_parameter_value): Likewise.
4415 (set_parameter_ref, set_string, set_flag, io_result): Likewise.
4416 (transfer_expr): Likewise.
4417 * trans-decl.c (gfc_trans_auto_character_variable):
4418 Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
4419 (gfc_gimplify_function): New function.
4420 (gfc_generate_function-code): Properly handle nested functions.
4421 * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
4423 2004-06-22 Janne Blomqvist <jblomqvi@cc.hut.fi>
4426 * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
4427 (gfc_resolve_inquire): Resolve the iolength tag. Return
4428 SUCCESS at end of function if no failure has occured.
4429 * resolve.c (resolve_code): Resolve if iolength is encountered.
4430 * trans-io.c: (ioparm_iolength, iocall_iolength,
4431 iocall_iolength_done): New variables.
4432 (last_dt): Add IOLENGTH.
4433 (gfc_build_io_library_fndecls ): Set iolength related variables.
4434 (gfc_trans_iolength): Implement.
4435 (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
4437 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de
4440 * scanner.c (load_line): Don't truncate preprocessor lines.
4441 Reformat error message.
4442 (preprocessor_line): Issue warning in case of malformed
4445 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4447 * resolve.c (resolve_symbol): Add comment in function body.
4448 (check_data_variable): Change type of mark to ar_type, adapt code
4451 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4453 * array.c (gfc_insert_constructor): Avoid redundant call to
4454 mpz_comp. Add 2004 to copyright years.
4456 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
4458 * trans.h (stmtblock_t): Change has_scope to unsigned int.
4460 2004-06-20 Steven G. Kargl <kargls@comcast.net>
4462 * arith.c (gfc_range_check): correct complex underflow.
4464 2004-06-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4467 * match.c (match_case_selector): Call gfc_match_init_expr
4468 instead of gfc_match_expr.
4469 * resolve.c (validate_case_label_expr): No need to check for
4470 constant, since it wouldn't have been matched with the fix to
4473 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4476 * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
4479 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4482 * trans-deecl.c (generate_local_decl): Do not issue warning for
4483 unused variables if they're use associated.
4485 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4486 Andrew Vaught <andyv@firstinter.net>
4489 * gfortran.h (gfc_check_f): Add new field f3ml.
4490 * check.c (gfc_check_minloc_maxloc): Take argument list instead
4491 of individual arguments, reorder if necessary.
4492 * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
4493 * intrinsic.c (add_sym_3ml): New function.
4494 (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
4495 (check_specific): Catch special case MINLOC, MAXLOC.
4497 2004-06-14 Paul Brook <paul@codesourcery.com>
4499 * intrinsic.c (add_sym_2s): Use correct function types.
4501 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4503 * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize. Move data.c
4504 * data.c (gfc_get_section_index): Remove dependency on trans.h.
4506 2004-06-12 Steven G. Kargl <kargls@comcast.net>
4508 * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
4509 gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
4510 * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
4511 GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
4512 * trans-intrinsic.c: Use symbols.
4513 * intrinsic.c (add_sym_2s): New function.
4514 * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
4515 * intrinsic.h: Function prototypes.
4516 * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
4517 gfc_resolve_srand): New functions.
4519 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4522 * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
4523 contained procedure.
4525 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4528 * interface.c (compare_parameter, compare_actual_formal): Don't
4529 check types and array shapes for NULL()
4530 * trans-expr.c (conv_function_call): No double indirection for
4533 2004-06-09 Toon Moene <toon@moene.indiv.nluug.nl>
4535 * trans-expr.c (gfc_conv_cst_int_power): Compute
4536 x**(-n) by converting it to (1/x)**n instead of
4539 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4542 * module.c (write_symbol, write_symtree): Don't write symbols
4543 wrongly added to namespace.
4544 * trans-decl.c (gfc_create_module_variable): Don't create a
4545 backend decl for a symbol incorrectly added to namespace.
4547 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4550 * resolve.c (resolve_symbol): Verify that parameter array has an
4551 explicit shape. Fix typos and coding style issues in surrounding
4554 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4557 * gfortran.texi: The documentation doesn't contain infomration on
4558 how to report bugs, and shouldn't, so remove the line which
4561 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4563 * intrinsic.c (sort_actual): Keep track of type of missing
4564 arguments. (Missing from previous commit.)
4566 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4568 * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
4569 * interface.c (compare_actual_formal): Keep type of omitted
4571 * trans-expr.c (gfc_conv_function_call): Add string length
4572 argument for omitted string argument.
4574 2004-06-03 Paul Brook <paul@codesourcery.com>
4576 * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
4577 lists instead of compound expr chains.
4578 (gfc_trans_code): Annotate statement lists.
4580 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4582 * trans-array.c: Fix spelling in comments.
4584 2004-06-02 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4587 * data.c (assign_substring_data_value): New function.
4588 (gfc_assign_data_value): Call the new function if we're dealing
4589 with a substring LHS.
4591 2004-06-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4594 * gfortran.h (GFC_VERSION): Remove.
4595 * gfortran.texi (version-gfortran): Remove, replace by version-GCC
4598 2004-05-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4600 * trans-types.c: Fix spelling & layout in comments.
4602 2004-05-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4605 * trans-const.c (gfc_conv_string_init): Allow variable string
4606 length lower than initialization string length.
4608 2004-05-30 Paul Brook <paul@codesourcery.com>
4611 * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
4612 * trans-expr.c (gfc_trans_string_copy): New function.
4613 (gfc_conv_statement_function): Use them. Create temp vars. Enforce
4615 (gfc_conv_string_parameter): Use gfc_trans_string_copy.
4616 * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
4617 * trans.h (struct gfc_saved_var): Define.
4618 (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
4620 2004-05-30 Steven G. Kargl <kargls@comcast.net>
4622 * iresolve.c (gfc_resolve_random_number): Clean up conditional.
4624 2004-05-29 Steven G. Kargl <kargls@comcast.net>
4626 * simplify.c (gfc_simplify_log): Remove useless line of code.
4628 2004-05-29 Paul Brook <paul@codesourcery.com>
4630 * trans-common.c (find_equivalence): Find multiple rules.
4632 2004-05-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4634 * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
4635 (gfc_current_locus): Declare new global variable.
4636 * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
4637 (gfc_current_locus1): Rename ...
4638 (gfc_current_locus): ... to this.
4639 (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
4640 skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
4641 gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
4642 gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
4643 and gfc_current_locus(), respectively.
4644 * array.c (match_subscript, gfc_match_array_ref, match_array_list,
4645 match_array_cons_element, gfc_match_array_constructor):
4646 Read/modify gfc_current_locus instead of calling gfc_set_locus()
4647 and gfc_current_locus().
4648 * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
4649 match_attr_spec, gfc_match_function_decl, gfc_match_end,
4650 attr_decl1, gfc_match_save): Likewise.
4651 * error.c (error_print, gfc_internal_error): Likewise.
4652 * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
4653 * interface.c (gfc_add_interface): Likewise.
4654 * io.c (gfc_match_format, match_dt_format, match_dt_element,
4655 match_io_iterator, match_io): Likewise.
4656 * match.c (gfc_match_space, gfc_match_eos,
4657 gfc_match_small_literal_int, gfc_match_st_label,
4658 gfc_match_strings, gfc_match_name, gfc_match_iterator,
4659 gfc_match_char, gfc_match, gfc_match_assignment,
4660 gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
4661 gfc_match_nullify, gfc_match_call, match_implicit_range,
4662 gfc_match_implicit, gfc_match_data, match_case_selector,
4663 gfc_match_case, match_forall_iterator): Likewise.
4664 * matchexp.c (gfc_match_defined_op_name, next_operator,
4665 match_level_1, match_mult_operand, match_ext_mult_operand,
4666 match_add_operand, match_ext_add_operand, match_level_2,
4667 match_level_3, match_level_4, match_and_operand, match_or_operand,
4668 match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
4669 * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
4670 * parse.c (match_word, decode_statement, next_free, next_fixed,
4671 add_statement, verify_st_order, parse_if_block, gfc_parse_file):
4673 * primary.c (match_digits, match_integer_constant,
4674 match_boz_constant, match_real_constant, match_substring,
4675 next_string_char, match_charkind_name, match_string_constant,
4676 match_logical_constant, match_const_complex_part,
4677 match_complex_constant, match_actual_arg, match_keyword_arg,
4678 gfc_match_actual_arglist, gfc_match_structure_constructor,
4679 gfc_match_rvalue, gfc_match_variable): Likewise.
4680 * st.c (gfc_get_code): Likewise.
4681 * symbol.c (check_conflict, check_used, check_done,
4682 duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
4683 gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
4684 gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
4686 2004-05-26 Roger Sayle <roger@eyesopen.com>
4688 * io.c (format_asterisk): Silence compiler warnings by correcting
4689 the number of elements of a "locus" initializer.
4691 2004-05-25 Roger Sayle <roger@eyesopen.com>
4694 * matchexp.c: Allow unary operators after arithmetic operators
4696 (match_ext_mult_operand, match_ext_add_operand): New functions.
4697 (match_mult_operand): Tweak to call match_ext_mult_operand.
4698 (match_add_operand): Tweak to call match_ext_mult_operand.
4699 (match_level_2): Rearrange to call match_ext_add_operand.
4701 2004-05-25 Paul Brook <paul@codesourcery.com>
4703 * expr.c (check_inquiry): Remove bogus tests.
4705 2004-05-23 Paul Brook <paul@codesourcery.com>
4708 * expr.c (restricted_args): Remove redundant checks/argument.
4709 (external_spec_function): Update to match.
4710 (restricted_intrinsic): Rewrite.
4712 2004-05-23 Paul Brook <paul@codesourcery.com>
4713 Victor Leikehman <lei@haifasphere.co.il>
4715 * gfortran.h (struct gfc_symbol): Add equiv_built.
4716 * trans-common.c: Change int to HOST_WIDE_INT. Capitalize error
4718 (current_length): Remove.
4719 (add_segments): New function.
4720 (build_equiv_decl): Create initialized common blocks.
4721 (build_common_decl): Always add decl to bindings.
4722 (create_common): Create initializers.
4723 (find_segment_info): Reformat to match coding conventions.
4724 (new_condition): Use add_segments.
4725 (add_condition, find_equivalence, add_equivalences): Move iteration
4726 inside functions. Only process each segment once.
4727 (new_segment, finish_equivalences, translate_common): Simplify.
4729 2004-05-23 Steven G. Kargl <kargls@comcast.net>
4731 * check.c (gfc_check_random_seed): Issue for too many arguments.
4733 2004-05-22 Steven G. Kargl <kargls@comcast.net>
4735 * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
4737 2004-05-22 Paul Brook <paul@codesourcery.com>
4739 * dump-parse-tree.c (gfc_show_equiv): New function.
4740 (gfc_show_namespace): Use it.
4742 2004-05-22 Victor Leikehman <lei@haifasphere.co.il>
4745 * symbol.c (gfc_add_common): Disable checks to work around other more
4746 fundamental inadequacies.
4748 2004-05-22 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
4750 * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
4752 (gfc_build_function_decl): Likewise.
4754 2004-05-22 Steven G. Kargl <kargls@comcast.net>
4756 * check.c (gfc_check_system_clock): New function.
4757 * intrinsic.c (add_sym_3s): New function.
4758 (add_subroutines): Use it.
4759 * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
4761 * iresolve.c (gfc_resolve_system_clock): New function.
4763 2004-05-22 Steven G. Kargl <kargls@comcast.net>
4765 * invoke.texi: Document -Wunderflow and spell check.
4766 * lang.opt: Add Wunderflow.
4767 * gfortran.h (gfc_option_t): Add warn_underflow option.
4768 * options.c (gfc_init_options, set_Wall): Use it.
4769 * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
4770 * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
4771 gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
4772 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
4773 * arith.c (common_logarithm): Fix typo in comment.
4775 2004-05-21 Roger Sayle <roger@eyesopen.com>
4777 * io.c (check_format): As a GNU extension, allow the comma after a
4778 string literal to be optional in a format. Use gfc_notify_std to
4779 issue an error/warning as appropriate.
4781 2004-05-21 Roger Sayle <roger@eyesopen.com>
4783 * io.c (check_format): Use gfc_notify_std to determine whether to
4784 issue an error/warning for omitting the digits from the X format.
4786 2004-05-20 Roger Sayle <roger@eyesopen.com>
4788 * io.c (check_format): Allow the number before the X format to
4789 be optional when not -pedantic.
4791 2004-05-18 Feng Wang <fengwang@nudt.edu.cn>
4792 Paul Brook <paul@codesourcery.com>
4794 * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
4795 Create decls for __builtin_pow{,f}.
4796 * gfortran.h (PREFIX_LEN): Define.
4797 * trans-decl.c (gfor_fndecl_math_powi): Add.
4798 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
4799 (gfc_build_intrinsic_function_decls): Create decls for powi.
4800 * trans-expr.c (powi_table): Add.
4801 (gfc_conv_integer_power): Remove.
4802 (gfc_conv_powi): New function.
4803 (gfc_conv_cst_int_power): New function.
4804 (gfc_conv_power_op): Use new powi routines.
4805 * trans.h (struct gfc_powdecl_list): Add.
4806 (gfor_fndecl_math_powi): Add.
4807 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
4809 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4811 * trans.c, trans-decl.c: Fix comment typos.
4813 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4815 * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
4817 2004-05-18 Steve Kargl <kargls@comcast.net>
4819 * arith.c (gfc_int2complex): Fix incorrect range checking.
4821 2004-05-18 Paul Brook <paul@codesourcery.com>
4824 * decl.c (add_init_expr_to_sym): Remove incorrect check.
4825 (default_initializer): Move to expr.c.
4826 (variable_decl): Don't assign default initializer to variables.
4827 * expr.c (gfc_default_initializer): Move to here.
4828 * gfortran.h (gfc_default_initializer): Add prototype.
4829 * resolve.c (resolve_symbol): Check for illegal initializers.
4830 Assign default initializer.
4832 2004-05-17 Steve Kargl <kargls@comcast.net>
4834 * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
4836 2004-05-17 Steve Kargl <kargls@comcast.net>
4838 * arith.c (gfc_real2complex): Range checking wrong part of complex
4841 2004-05-16 Paul Brook <paul@codesourcery.com>
4843 * options.c (gfc_handle_module_path_options): Fix buffer overrun.
4845 2004-05-16 Paul Brook <paul@codesourcery.com>
4847 * arith.c (gfc_range_check): Fix logic error.
4849 2004-05-16 Steve Kargl <sgk@troutmask.apl.washington.edu>
4851 * arith.c: Fix comment typos.
4853 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4856 * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
4857 not initialized in a disallowed fashion.
4858 * match.c (gfc_match_common): Likewise.
4859 (var_element): Verify that variable is not in the blank COMMON,
4860 if it is in a common.
4862 2004-05-15 Joseph S. Myers <jsm@polyomino.org.uk>
4864 * Make-lang.in (f95.generated-manpages): Remove.
4865 (f95.srcextra): New.
4866 (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
4867 f95.maintainer-clean): Generate info and dvi files in objdir/doc.
4870 (f95.install-info): Remove.
4871 (install-info): New.
4873 2004-05-15 Victor Leikehman <lei@haifasphere.co.il>
4875 * decl.c (add_init_expr_to_sym): Check for variable size arrays.
4877 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4879 * primary.c (match_boz_constant): Use gfc_notify_std() for
4880 issuing a warning or an error.
4882 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4885 * primary.c (match_structure_constructor): Rename ...
4886 (gfc_match_structure_constructor): ... to this. Make non-static.
4887 (gfc_match_rvalue): Call renamed function.
4888 * match.h (gfc_match_structure_constructor): Declare.
4889 * match.c (gfc_match_data_constant): Handle structure
4892 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4896 * gfortran.h (gfc_linebuf): New typedef.
4898 (gfc_file): Revamped, use new gfc_linebuf.
4899 (locus): Revamped, use new types.
4900 (gfc_current_file): Remove.
4901 (gfc_current_form, gfc_source_file): New global variables.
4902 * match.c (gfc_match_space, gfc_match_strings): Use
4903 gfc_current_form to find source form.
4904 * module.c (gfc_dump_module): Use gfc_source_file when printing
4906 * error.c (show_locus, show_loci) Use new data structures to print
4908 * scanner.c (first_file, first_duplicated_file, gfc_current_file):
4910 (file_head, current_file, gfc_current_form, line_head, line_tail,
4911 gfc_current_locus1, gfc_source_file): New global variables.
4912 (gfc_scanner_init1): Set new global variables.
4913 (gfc_scanner_done1): Free new data structures.
4914 (gfc_current_locus): Return pointer to gfc_current_locus1.
4915 (gfc_set_locus): Set gfc_current_locus1.
4916 (gfc_at_eof): Set new variables.
4917 (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
4918 to new locus structure.
4919 (gfc_check_include): Remove.
4920 (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
4921 (gfc_skip_comments): Use gfc_current_form, find locus with
4923 (gfc_next_char): Use gfc_current_form.
4924 (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
4925 (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
4927 (get_file): New function.
4928 (preprocessor_line, include_line): New functions.
4929 (load_file): Move down, rewrite to match new data structures.
4930 (gfc_new_file): Rewrite to match new data structures.
4931 * parse.c (next_statement): Remove code which is now useless. Use
4932 gfc_source_form and gfc_source_file where appropriate.
4933 * trans-decl.c (gfc_get_label_decl): adapt to new data structures
4934 when determining locus of frontend code.
4935 * trans-io.c (set_error_locus): Same.
4936 * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
4937 * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
4939 (all): Add missing initializers.
4941 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4943 * Make-lang.in (trans-common.o): Remove redundant dependency.
4944 (data.c): Replace object file name ...
4945 (data.o): ... by the correct one.
4947 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4949 * dump-parse-tree.c (gfc_show_array_ref): Print colon only
4950 for ranges when dumping array references.
4952 2004-05-14 Victor Leikehman <lei@haifasphere.co.il>
4954 * decl.c (variable_decl): Always apply default initializer.
4956 2004-05-08 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
4959 * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
4960 handle zero correctly.
4962 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4964 * match.c (gfc_match): Eliminate dead code.
4966 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4968 * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
4969 Detect bad continuation line in fixed form sources.
4971 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4974 * iresolve.c (gfc_resolve_nearest): Add new function.
4975 * intrinsic.h: ... declare it here.
4976 * intrinsic.c (add_functions): ... add it as resolving function
4979 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4982 * match.c (gfc_match_do): Allow infinite loops with
4983 label-do-stmt. Do not enforce space after comma.
4985 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4988 * parse.c (parse_interface): Allow empty INTERFACE, remove
4991 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4993 * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
4994 decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
4995 expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
4996 intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
4997 matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
4998 primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
4999 trans-array.c, trans-array.h, trans-common.c, trans-const.c,
5000 trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
5001 trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
5002 trans-types.h, trans.c, trans.h: Update copyright years and
5004 * data.c: Likewise, also removed two whitespace-only lines.
5005 * gfortranspec.c, lang.opt: Update copyright years.
5007 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5010 * trans-decl.c (generate_local_decl): Don't warn for unused
5011 variables which are in common blocks.
5013 2004-05-13 Diego Novillo <dnovillo@redhat.com>
5015 * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
5016 trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
5017 trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
5019 2004-05-13 Victor Leikehman <lei@haifasphere.co.il>
5022 * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
5024 2004-05-13 Joseph S. Myers <jsm@polyomino.org.uk>
5026 * gfortran.texi: Use @table @emph instead of @itemize @emph.
5027 Remove "set DEVELOPMENT".
5028 (Compiling GFORTRAN): Remove.
5030 2004-05-09 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5032 * array.c (match_subscript, match_array_ref): Add comments
5033 explaining argument 'init'.
5034 * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
5035 trans-expr.c, trans.c: Fix some typos in comments.
5036 * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
5037 * primary.c (match_digits, match_integer_constant): Add comment
5038 explaining signflag.
5040 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5043 * primary.c: Include system.h and flags.h, needed for pedantic.
5044 (match_boz_constant): Allow "x" for hexadecimal constants, warn if
5047 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5050 * match.c (match_data_constant): Handle case where
5051 gfc_find_symbol sets sym to NULL
5053 2004-04-28 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5055 * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
5056 dependency on mathbuiltins.def
5058 2004-04-24 Victor Leikehman <lei@il.ibm.com>
5060 * trans-io.c (transfer_expr): Implemented recursive printing
5063 2004-04-24 Andrew Pinski <pinskia@physics.uc.edu>
5065 * gfortranspec.c: Do not include multilib.h.
5067 2004-04-24 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5069 * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
5070 2004 to copyright years.
5071 * trans-expr.c, trans-decl.c: Comment update, we now generate
5072 GENERIC, not SIMPLE. Add 2004 to copyright years.
5074 2004-04-24 Paul Brook <paul@codesourcery.com>
5076 * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
5078 2004-04-24 Feng Wang <fengwang@nudt.edu.cn>
5081 * arith.c (gfc_arith_divide): Fix complex divide.
5083 2004-04-23 Andrew Pinski <pinskia@physics.uc.edu>
5085 * gfortranspec.c: Include the target headers.
5087 2004-04-18 Feng Wang <fengwang@nudt.edu.cn>
5091 * arith.c (arctangent2): New function.
5092 * arith.h (arctangent2): Add function prototype.
5093 * simplify.c (gfc_simplify_atan2): Use it.
5094 (gfc_simplify_log): Use it.
5096 2004-04-12 Diego Novillo <dnovillo@redhat.com>
5098 * fortran/f95-lang.c (gfc_expand_stmt): Remove.
5099 (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
5101 2004-04-11 Bud Davis <bdavis9659@comcast.net>
5104 * trans-io.c (build_dt): Change REC to value.
5106 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
5109 * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
5110 the real value when converting mpf to string.
5112 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
5115 * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
5118 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
5121 * simplify.c (simplify_min_max): Convert the type of the result.
5123 2004-04-11 Paul Brook <paul@codesourcery.com>
5125 * gfortran.texi: Use full target triplet.
5127 2004-04-11 Paul Brook <paul@codesourcery.com>
5129 * Make-lang.in (GFORTRAN_TEXI): Set it.
5130 (fortran/dfortran.dvi): Use it. Add fortran to include paths.
5131 (fortran/gfortran.info): Ditto.
5132 * gfortran.texi: Major update.
5133 * invoke.texi: New file.
5135 2004-04-10 Paul Brook <paul@codesourcery.com>
5137 * trans-array.c (gfc_trans_allocate_temp_array,
5138 gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
5139 * trans-decl.c (gfc_build_dummy_array_decl,
5140 gfc_get_symbol_decl, gfc_build_function_decl,
5141 gfc_create_module_variable): Ditto.
5142 * trans-expr.c (gfc_conv_variable): Ditto.
5143 * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
5144 * trans.h (GFC_DECL_STRING): Remove.
5145 (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
5146 GFC_DECL_ASSIGN): Renumber flags.
5148 2004-04-05 Paul Brook <paul@codesourcery.com>
5152 * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
5154 * gfortran.h (struct gfc_charlen): Add backend_decl.
5155 * trans-array.c (gfc_trans_allocate_temp_array,
5156 gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
5157 (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
5158 Remove old, broken string handling.
5159 (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
5160 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
5161 gfc_trans_deferred_array): Handle character arrays.
5162 * trans-const.c (gfc_conv_const_charlen): New function.
5163 * trans-const.h (gfc_conv_const_charlen): Add prototype.
5164 * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
5166 (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
5167 (gfc_create_string_length): New function.
5168 (gfc_get_symbol_decl): Create lengths for character variables.
5169 (gfc_get_fake_result_decl): Ditto.
5170 (gfc_build_function_decl): Only set length for assumed length
5171 character arguments.
5172 (gfc_trans_dummy_character): New function.
5173 (gfc_trans_auto_character_variable): Rewrite.
5174 (gfc_trans_deferred_vars): Handle more types of character variable.
5175 (gfc_create_module_variable): String lengths have moved.
5176 (gfc_generate_function_code): Initialize deferred var chain earlier.
5177 * trans-expr.c (gfc_conv_init_string_length): Rename ...
5178 (gfc_trans_init_string_length): ... to this.
5179 (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
5180 gfc_conv_function_call): Update to new format for character variables.
5181 (gfc_conv_string_length): Remove.
5182 (gfc_conv_string_parameter): Update assertion.
5183 * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
5184 * trans-io.c (set_string): Use new macro names.
5185 * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
5186 * trans-types.c (gfc_get_character_type): Use existing length expr.
5187 (gfc_is_nodesc_array): Make public.
5188 (gfc_get_dtype_cst): Rename ...
5189 (gfc_get_dtype): ... to this. Handle unknown size arrays.
5190 (gfc_get_nodesc_array_type): Use new name.
5191 (gfc_sym_type): New character variable code.
5192 (gfc_get_derived_type): Ditto.
5193 (gfc_get_function_type): Evaluate character variable lengths.
5194 * trans-types.h (gfc_strlen_kind): Define.
5195 (gfc_is_nodesc_array): Add prototype.
5196 * trans.h: Update prototypes.
5197 (struct lang_type): Update comments.
5198 (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
5199 (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
5201 2004-04-04 Paul Brook <paul@codesourcery.com>
5203 * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
5204 * options.c (gfc_init.options, gfc_handle_option): Ditto.
5205 * trans-expr.c (gfc_conv_function_call): Ditto.
5206 * trans-types.c (gfc_is_nodesc_array): Ditto
5207 * lang.opt (fg77-calls): Remove.
5209 2004-04-04 Paul Brook <paul@codesourcery.com>
5211 * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
5212 (gfc_conv_descriptor_base): Rename ...
5213 (gfc_conv_descriptor_offset): ... to this.
5214 (gfc_trans_allocate_array_storage): Set offset to zero.
5215 (gfc_conv_array_base): Rename ...
5216 (gfc_conv_array_offset): ... to this.
5217 (gfc_conv_array_index_ref): Add offset parameter.
5218 (gfc_conv_array_ref): Include offset.
5219 (gfc_trans_preloop_setup): Use existing offset.
5220 (gfc_trans_allocate_temp_array, gfc_array_allocate,
5221 gfc_trans_auto_array_allocation, gfc_trans_g77_array,
5222 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
5223 gfc_conf_ss_descriptor): Set offset.
5224 * trans-array.h: Rename prototypes.
5225 * trans-const.h (gfc_index_zero_node): Define.
5226 * trans-decl.c (gfc_build_qualified_array): Change base to offset.
5227 * trans-types.c (gfc_get_array_type_bounds): Ditto.
5228 (gfc_get_nodesc_array_type): Calculate offset before upper bound.
5230 2004-03-25 Diego Novillo <dnovillo@redhat.com>
5232 * convert.c (convert): Don't handle WITH_RECORD_EXPR.
5234 2004-03-24 Bud Davis <bdavis9659@comcast.net>
5237 * arith.c (gfc_convert_integer,gfc_convert_real): Removed leading '+'
5238 before conversion by gmp library call.
5240 2004-03-24 Bud Davis <bdavis9659@comcast.net>
5243 * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
5245 2004-02-24 Richard Henderson <rth@redhat.com>
5247 * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
5249 2004-02-19 Loren J. Rittle <ljrittle@acm.org>
5251 * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
5252 (fortran/gfortran.info): ... to here.
5255 2004-02-16 Richard Henderson <rth@redhat.com>
5257 * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
5258 * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
5259 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
5260 (gfc_expand_function): Rename from expand_function_body, make static,
5261 don't do anything except invoke tree_rest_of_compilation.
5262 (gfc_be_parse_file): Invoke cgraph.
5263 (gfc_expand_decl): Remove.
5264 (gfc_init_builtin_functions): Add __builtin_init_trampoline and
5265 __builtin_adjust_trampoline.
5266 * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
5267 (gfc_finalize): New.
5268 (gfc_generate_function_code): Use it. Lower nested functions.
5269 * trans-expr.c (gfc_conv_function_call): Add static chain operand
5271 * trans.c (gfc_build_function_call): Likewise.
5272 * trans.h (expand_function_body): Remove.
5274 2004-02-15 Victor Leikehman <lei@il.ibm.com>
5277 * trans-decl.c (gfc_build_function_decl) For functions
5278 returning CHARACTER pass an extra length argument,
5279 following g77 calling conventions.
5280 * trans-types.c (gfc_get_function_type) Ditto.
5281 * trans-expr.c (gfc_conv_function_call) Ditto.
5283 2004-02-14 Paul Brook <paul@codesourcery.com>
5285 * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
5287 2004-02-12 Paul Brook <paul@nowt.org>
5291 2004-02-08 Steve Kargl <sgk@troutmask.apl.washington.edu>
5293 * gfortran.texi: Fix typos.
5295 2004-02-07 Bud Davis <bdavis9659@comcast.net>
5298 * intrinsic.c (add_conversions) Use logical conversion instead
5300 * trans-types.c (gfc_get_logical_type) implemented logical*1
5303 2004-01-17 Paul Brook <paul@codesourcery.com>
5305 * lang-specs.h: Remove %<fixed-form.
5307 2004-01-15 Toon Moene <toon@moene.indiv.nluug.nl>
5309 * lang-specs.h: Enable preprocessing of source files
5310 ending in .F, .fpp, .FPP, .F90 and .F95.
5312 2004-01-13 Toon Moene <toon@moene.indiv.nluug.nl>
5315 * lang-specs.h: Enable compilation of files ending
5316 in .f, .for and .FOR.
5318 2004-01-11 Paul Brook <paul@codesourcery.com>
5320 * trans-stmt.c (gfc_trans_if_1): New function.
5321 (gfc_trans_if): Use it.
5323 2004-01-11 Erik Schnetter <schnetter@uni-tuebingen.de>
5325 * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
5326 (gfc_option_t): Add max_identifier_length.
5327 * lang.opt: Add fmax-identifier-length.
5328 * match.c (parse_name): Use limit.
5329 * options.c (gfc_init_options): Set max_identifier_length.
5330 (gfc_handle_option): Ditto.
5332 2004-01-11 Feng Wang <fengwang@nudt.edu.cn>
5334 * intrinsic.c (add_functions): Add resolve function to dcmplx.
5335 * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
5336 * iresolve.c (gfc_resolve_dcmplx): New function.
5338 2004-01-10 Paul Brook <paul@codesourcery.com>
5340 * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
5341 * trans-types.c (gfc_sym_type): Handle external dummy procedures.
5342 (gfc_return_by_reference): Correct condition.
5343 (gfc_get_function_type): Ditto.
5345 2004-01-10 Paul Brook <paul@codesourcery.com>
5347 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
5350 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
5352 * iresolve.c: Use correct kind.
5354 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
5357 * trans-decl.c (gfc_create_module_variable): Output array valued
5360 2004-01-10 Paul Brook <paul@codesourcery.com>
5362 * resolve.c (resolve_branch): Get error message right way round.
5364 2004-01-10 Canqun Yang <canqun@nudt.edu.cn>
5366 * trans-array (gfc_conv_loop_setup): Adjust comment to track
5368 (gfc_array_allocate): Don't count size of element twice.
5370 2004-01-04 Paul Brook <paul@codesourcery.com>
5372 * lang.opt (i8, r8, std=*): Remove RejectNegative.
5374 2004-01-04 Paul Brook <paul@codesourcery.com>
5376 * error.c (gfc_notify_std): New function.
5377 * gfortran.h (gfc_notify_std): Declare.
5378 (GFC_STD_*): Define.
5379 (gfc_option_t): Add warn_std and allow_std.
5380 * intrinsic.c (gfc_init_expr_extensions): Fix logic.
5381 (gfc_intrinsic_func_interface): Use gfc_notify_std.
5382 * check.c (check_rest): Use gfc_notify_std.
5383 * match.c (gfc_match_pause): Ditto.
5384 (gfc_match_assign): Ditto.
5385 (gfc_match_goto): Ditto.
5386 * resolve.c (resolve_branch): Ditto.
5387 * lang.opt: Add std=<foo> and w.
5388 * options.c (gfc_init_options): Set allow_std and warn_std.
5389 (gfc_handle_option): Handle OPT_std_* and OPT_w.
5391 2004-01-01 Paul Brook <paul@codesourcery.com>
5393 * array.c (gfc_append_constructor): Take constructor, not expression.
5394 * data.c (struct gfc_expr_stack): Remove.
5395 (expr_stack): Remove.
5396 (find_con_by_offset): Rename from find_expr_in_con.
5397 (find_con_by_component): Rename from find_component_in_con.
5398 (gfc_get_expr_stack): Remove.
5399 (gfc_assign_data_value): Rewrite.
5400 (gfc_expr_push): Remove.
5401 (gfc_expr_pop): Remove.
5402 (gfc_advance_section): Rename from
5403 gfc_modify_index_and_calculate_offset. Handle unbounded sections.
5404 (gfc_get_section_index): Handle unbounded sections.
5405 * gfortran.h: Update prototypes.
5406 * resolve.c (check_data_variable): Array section maight not be the
5409 2004-01-01 Paul Brook <paul@codesourcery.com>
5412 * resolve.c (resolve_symbol): Allow assumed length function results.
5414 2004-01-01 Steve Kargl <sgk@troutmask.apl.washington.edu>
5416 * match.c (gfc_match_pause): Fix spelling.
5418 2004-01-01 Steven Bosscher <stevenb@suse.de>
5421 * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
5422 reference from the expression.
5424 2003-12-26 Feng Wang <fengwang@nudt.edu.cn>
5426 * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
5428 * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
5429 (gfc_exec_op): New EXEC_LABEL_ASSIGN.
5430 (symbol_attribute):New variable attribute: assign.
5431 * io.c (resolve_tag):Integer variable is allowed.
5432 (match_dt_format): Add ASSIGN statement. Set assign flag.
5433 * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
5434 (gfc_match_assign): Add ASSIGN statement. Set assign flag.
5435 (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
5436 * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
5437 (next_statement): Add ST_LABEL_ASSIGNMENT.
5438 (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
5439 * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
5440 (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
5441 * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
5442 * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
5443 assign. Put them into the stuct lang_decl.
5444 * trans-io.c (set_string): Add the assign statement.
5445 * trans-stmt.c (gfc_trans_label_assign): New function.
5446 (gfc_trans_goto): Translate ASSIGNED GOTO statement.
5447 * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
5448 * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
5449 * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
5450 (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
5451 (GFC_DECL_ASSIGN(node)): New macro to access flag.
5453 2003-12-31 Huang Chun <chunhuang73@hotmail.com>
5456 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
5459 2003-12-22 Toon Moene <toon@moene.indiv.nluug.nl>
5461 * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
5462 that arguments to subroutines/functions can't alias themselves, nor global
5465 2003-12-20 Steven Bosscher <stevenb@suse.de>
5467 * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
5468 * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
5470 2003-12-12 Huang Chun <chunhuang73@hotmail.com>
5472 * primary.c (match_substring): Fix substring bug for start point
5473 or end point is NULL.
5474 * trans-expr.c (gfc_conv_substring): Ditto
5475 * trans-types.c (gfc_sym_type): Get correct type of scalar
5476 character variables.
5477 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
5480 2003-12-10 Richard Henderson <rth@redhat.com>
5482 * options.c (gfc_post_options): Don't ever use rtl inlining.
5484 2003-12-05 Canqun Yang <canqun@nudt.edu.cn>
5486 * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
5487 * trans-equivalence.c: Remove.
5488 * trans-decl.c (gfc_get_symbol_decl): Update to match.
5489 (gfc_generate_function_code): Ditto.
5490 * trans-array.c (gfc_conv_array_parameter): Ditto.
5491 * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
5492 (F95_ADDITIONAL_OBJS): Add stor-layout.o
5493 * trans.h (gfc_trans_equivalence): Remove.
5494 * gfortran.h (struct gfc_equiv): Add used field.
5495 (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
5496 equiv_offset fields.
5498 2003-12-05 Richard Henderson <rth@redhat.com>
5500 * trans.c (gfc_build_addr_expr): New.
5501 (gfc_build_indirect_ref, gfc_build_array_ref): New.
5502 * trans.h: Declare them.
5503 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
5504 trans-stmt.c, trans.c (*): Use them.
5506 * f95-lang.c (gfc_post_options): Remove dead prototype.
5507 * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
5508 * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
5511 2003-12-01 Feng Wang <fengwang@nudt.edu.cn>
5513 * io.c (gfc_match_format): Check for missing format label.
5515 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
5518 * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
5519 from interfaces in modules.
5521 2003-11-30 Paul Brook <paul@nowt.org>
5523 * trans-array.c (gfc_trans_g77_array): Make non-static.
5524 (gfc_trans_assumed_size): Remove.
5525 (gfc_trans_dummy_array_bias): Explicitly free temporary.
5526 * trans-array.h (gfc_trans_g77_array): Add prototype.
5527 (gfc_trans_assumed_size): Remove.
5528 * trans-decls.c (gfor_fndecl_push_context): Remove.
5529 (gfor_fndecl_pop_context): Remove.
5530 (gfc_build_function)decls): Don't create them.
5531 (gfc_trans_deferred_vars): Update to match. Remove dead code.
5532 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
5534 2003-11-30 Kejia Zhao <kejia_zh@nudt.edu.cn>
5536 * trans-array.c (gfc_conv_array_parameter): Simplify
5537 array argument passing for array name actual argument.
5538 * trans-expr.c (gfc_conv_function_call): Ditto
5539 * trans-types.c (gfc_is_nodesc_array):Ditto.
5541 2003-11-30 Paul Brook <paul@nowt.org>
5543 * f95-lang.c (gfc_post_options): Move ...
5544 * options.c (gfc_post_options): .. to here. Handle inlining options.
5545 * gfortran.h (gfc_post_options): Add prototype.
5547 2003-11-28 Richard Henderson <rth@redhat.com>
5549 * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
5551 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
5553 * trans.h (has_alternate_specifier): New global variable.
5554 * match.c (gfc_match_call): Handle actual arguments associated with
5555 alternate return indicators.
5556 * trans-expr.c (gfc_conv_function_call): Ditto
5557 * trans-stmt.c (gfc_trans_call): Ditto
5558 (gfc_trans_return): Handle return statement with value.
5559 * trans-decl.c (gfc_generate_function_code): Handle functions with
5561 (gfc_get_fake_result_decl): Ditto
5562 * trans-types.c (gfc_get_function_type): Ditto
5563 * resolve.c (resolve_actual_arglist): Check alternate return indicators.
5564 (resolve_formal_arglist): Check asterisk dummy.
5566 2003-11-27 Paul Brook <paul@nowt.org>
5568 * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
5569 allocation interface.
5570 (gfc_conv_ array_parameter): Ditto.
5571 (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
5572 * trans-array.c: Update prototype.
5573 * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
5574 (gfc_trans_auto_character_variable): Use new memory alloc interface.
5575 * trans-expr.c (gfc_conv_string_tmp): Ditto.
5576 (gfc_conv_function_call): Use gfc_conv_string_tmp.
5577 * trans-stmt.c (gfc_do_allocate): Use new memory alloc interface.
5578 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
5579 * trans.h (gfc_ss_info): Remove unused pdata field.
5580 * trans.c (gfc_create_var_np): Change T to V.
5582 2003-11-26 Richard Henderson <rth@redhat.com>
5584 * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
5585 * trans-intrinsic.c (gfc_intrinsic_map): ... here. Add SCALE,
5586 FRACTION, NEAREST, SET_EXPONENT.
5587 (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
5588 Fix GTY marking. Remove unnecessary const's.
5589 (LIBM_FUNCTION): Rename from I_LIB.
5590 (LIBF_FUNCTION): New.
5591 (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
5592 conventions. Assume the expr signature is correct. Mark const.
5593 (gfc_conv_intrinsic_exponent): Use library functions.
5594 (gfc_conv_intrinsic_set_exponent): Remove.
5595 (gfc_conv_intrinsic_scale): Remove.
5596 (gfc_conv_intrinsic_nearest): Remove.
5597 (gfc_conv_intrinsic_fraction): Remove.
5598 (gfc_conv_intrinsic_function): Update.
5599 * trans-decl.c (gfor_fndecl_math_exponent4): New.
5600 (gfor_fndecl_math_exponent8): New.
5601 (gfc_build_intrinsic_function_decls): Set them.
5602 * trans.h: Declare them.
5604 2003-11-25 Canqun Yang <canqun@nudt.edu.cn>
5606 * trans-common.c (gfc_layout_global_equiv): Locate the error for
5607 underflow COMMON block.
5608 (gfc_trans_one_common): Fix bug for size of COMMON block containing
5609 EQUIVALENCE object. Also fix typo in an error message.
5611 2003-11-25 Diego Novillo <dnovillo@redhat.com>
5613 * Make-lang.in: Add check-gfortran to lang_checks.
5614 (check-f95): Alias for check-gfortran.
5616 2003-11-25 Jason Merrill <jason@redhat.com>
5618 * Make-lang.in (f95.tags): Create TAGS.sub files in each
5619 directory and TAGS files that include them for each front end.
5621 2003-11-24 Paul Brook <paul@nowt.org>
5624 * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
5626 2003-11-24 Paul Brook <paul@nowt.org>
5628 * expr.c (simplify_const_ref): Return SUCCESS for things we don't
5630 * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
5632 2003-11-24 Paul Brook <paul@nowt.org>
5635 * array.c (gfc_array_ref_shape): Handle elemental dimensions.
5636 * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
5638 2003-11-20 Richard Henderson <rth@redhat.com>
5640 * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
5641 (gfc_conv_array_base): Likewise.
5642 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
5643 * trans-expr.c (gfc_conv_string_tmp): Likewise.
5644 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
5645 * trans-stmt.c (gfc_trans_character_select): Likewise.
5647 2003-11-13 Paul Brook <paul@nowt.org>
5649 * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
5651 2003-11-13 Canqun Yang <canqun@nudt.edu.cn>
5653 * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
5654 (resolve_equivalence): New function.
5655 (resolve_equivalence_derived): New function.
5657 2003-11-12 Richard Henderson <rth@redhat.com>
5659 * trans.c (gfc_trans_code): Use annotate_with_locus instead of
5660 annotate_all_with_locus.
5662 2003-11-11 Canqun Yang <canqun@nudt.edu.cn>
5664 * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
5665 * trans-decl.c (gfc_finish_var_decl): Modified.
5667 2003-11-08 Paul Brook <paul@nowt.org>
5670 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
5673 2003-11-06 Paul Brook <paul@nowt.org>
5675 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
5677 2003-11-02 Canqun Yang <canqun@nudt.edu.cn>
5679 * match.c (gfc_match_stopcode): Assign '0' to stop_code.
5681 2003-10-27 Anthony Green <green@redhat.com>
5683 * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
5684 (f95.stagefeedback): Ditto.
5686 2003-10-27 Andrew Pinski <pinskia@physics.uc.edu>
5689 * Make-lang.in (f95.stageprofile): Add.
5690 (f95.stagefeedback): Add.
5692 2003-10-23 Richard Henderson <rth@redhat.com>
5694 * f96-lang.c (gfc_gimplify_expr): Remove.
5695 (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
5696 (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
5698 2003-10-23 Richard Henderson <rth@redhat.com>
5700 * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
5702 2003-10-20 Paul Brook <paul@nowt.org>
5704 * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
5705 * trans-stmt.c (gfc_trans_do_while): Ditto.
5707 2003-10-17 Paul Brook <paul@nowt.org>
5709 * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
5711 2003-10-17 Paul Brook <paul@nowt.org>
5713 * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
5715 2003-10-17 Feng Wang <wf_cs@yahoo.com>
5717 * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
5718 (gfc_resolve_minloc): Ditto.
5719 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
5720 Return the value after subtracting the lower bound.
5722 2003-10-16 Richard Henderson <rth@redhat.com>
5724 * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
5726 2003-10-16 Steven Bosscher <steven@gcc.gnu.org>
5728 * lang.c: Remove -M option for now, it's in the way for C.
5730 2003-10-14 Jason Merrill <jason@redhat.com>
5732 * Make-lang.in (f95.tags): New rule.
5734 2003-10-13 Richard Henderson <rth@redhat.com>
5736 * trans.c (gfc_trans_code): Use annotate_all_with_locus.
5738 2003-10-13 Paul Brook <paul@nowt.org>
5740 * trans-decl.c (generate_local_decl): Don't create junk variables.
5742 2003-10-13 Paul Brook <paul@nowt.org>
5744 * resolve.c (resolve_formal_arglist): Use function result decl in
5745 preference to function decl.
5747 2003-10-12 Richard Henderson <rth@redhat.com>
5749 * f95-lang.c (gfc_define_builtin): New const_p argument. Set
5750 TREE_READONLY. Update all callers.
5752 2003-10-12 Feng Wang <wf_cs@yahoo.com>
5754 * iresolve.c (gfc_resolve_cshift): Change to match implementation.
5755 * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
5756 (gfc_is_intrinsic_libcall): Add CSHIFT.
5758 2003-10-12 Richard Henderson <rth@redhat.com>
5760 * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
5761 (gfc_trans_array_constructor_value): Likewise.
5762 (gfc_conv_array_initializer): Likewise.
5763 * trans-stmt.c (gfc_trans_character_select): Likewise.
5765 2003-11-12 Kejia Zhao <kejia_zh@yahoo.com.cn>
5767 * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
5769 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
5771 * check.c (gfc_check_repeat): Check arguments are scalar.
5772 (gfc_check_trim): New function.
5773 * intrinsic.h (gfc_check_trim): Add prototype.
5774 * intrinsic.c (add_functions): Use it.
5775 * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
5777 * trans-decl.c: Ditto.
5778 (gfc_build_intrinsic_fucntion_decls): Set them.
5779 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
5780 (gfc_conv_intrinsic_trim): New function.
5781 (gfc_conv_intrinsic_repeat): New function.
5782 (gfc_conv_intrinsic_function): Use them.
5784 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
5786 * trans-types.c (gfc_sym_type): Handle result variables.
5788 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
5790 * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
5791 gfc_get_character_type.
5793 2003-10-11 Feng Wang <wf_cs@yahoo.com>
5795 * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
5797 2003-10-11 Paul Brook <paul@nowt.org>
5799 * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
5800 (gfc_resolve_dprod): New function.
5801 (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
5802 * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
5803 (gfc_resolve_dprod): Declare.
5804 * intrinsic.c (add_functions): Use them.
5805 * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
5807 2003-10-06 Richard Henderson <rth@redhat.com>
5809 * f95-lang.c (gfc_init_builtin_functions): Add clzll.
5810 * trans-intrinsic.c (call_builtin_clz): Use it.
5812 2003-10-05 Paul Brook <paul@nowt.org>
5814 * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
5815 * trans-decl.c (gfc_generate_function_code): Set
5816 cfun->function_end_locus.
5818 2003-09-24 Jason Merrill <jason@redhat.com>
5820 * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
5823 2003-09-21 Lifang Zeng <zlf605@hotmail.com>
5824 Paul Brook <paul@nowt.org>
5826 * Make-lang.in (F95_OBJS): Add fortran/data.o.
5827 * array.c (gfc_inser_constructor): New function.
5828 (gfc_get_constructor): New function.
5829 (gfc_free_constructor): Initialize offset and repeat.
5830 (iterator_stack): Remove.
5831 (expand_info): Add offset, component and repeat fields.
5832 (expand_constructor): Set them.
5833 (expand): Set new fields.
5834 (gfc_copy_constructor): Ditto. Avoid recursion.
5835 * gfortran.h: Add prototypes for new functions.
5836 (gfc_constructor): Add offset, component and repeat.
5837 (iteratio_stack): Move to here.
5838 * resolve.c (check_data_variable): Convert data values into variable
5840 (traverse_data_list): Build implicit loop chain.
5841 (gfc_resolve): Ditto.
5842 * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
5843 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
5844 * trans-expr.c (gfc_conv_structure): Handle array initializers.
5845 (gfc_conv_expr): Update to match.
5846 * trans.h (gfc_conv_structure): Declare.
5849 2003-09-20 Kejia Zhao <kejia_zh@yahoo.com.cn>
5851 * trans.h: Add declarations for gfor_fndecl_si_kind and
5852 gfor_fndecl_sr_kind.
5853 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
5854 * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
5855 (g95_conv_intrinsic_sr_kind): New function.
5856 (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
5859 2003-09-17 Lars Segerlund <Lars.Segerlund@comsys.se>
5861 * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
5862 instead of _4 and _8 as postfix for libgfortran calls.
5864 2003-09-16 Paul Brook <paul@nowt.org>
5866 * array.c (compare_bounds): New function.
5867 (gfc_compare_array_spec): Use it.
5869 2003-09-14 Paul Brook <paul@nowt.org>
5871 * primary.c (gfc_match_rvalue): Make sure sym->result is set.
5872 * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
5874 2003-09-14 Paul Brook <paul@nowt.org>
5876 * check.c (dim_rank_check): Allow assumed bounds if requested.
5877 (gfc_check_lbound): Call it.
5878 (gfc_check_ubound): Ditto.
5879 (gfc_check_size): Change to match.
5880 * simplify.c (gfc_simplify_bound): New function.
5881 (gfc_simplify_lbound): New function.
5882 (gfc_simplify_ubound): New function.
5883 * intrinsic.h: Declare them.
5884 * intrinsic.c (add_functions): Use them.
5886 2003-09-14 Paul Brook <paul@nowt.org>
5888 * io.c (format_lex): Initialize negative_flag.
5889 (check_format): Intialize repeat.
5890 * trans-io.c (gfc_new_nml_name_expr): Declare static.
5891 (gfc_new_var_expr): Ditto.
5893 2003-09-14 Paul Brook <paul@nowt.org>
5895 * trans-array.c (gfc_conv_array_initializer): Handle derived types.
5896 * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
5898 2003-09-12 Paul Brook <paul@nowt.org>
5900 * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
5902 2003-09-12 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
5904 * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
5905 for a correct expression.
5907 2003-09-10 Kejia Zhao <kejia_zh@yahoo.com.cn>
5909 * trans-intrinsic.c (real_compnt_info): New struct.
5910 (prepare_arg_info): New function.
5911 (gfc_conv_intrinsic_set_exponent): New function.
5912 (gfc_conv_intrinsic_scale): New function.
5913 (gfc_conv_intrinsic_nearest): New function.
5914 (gfc_conv_intrinsic_fraction): New function.
5915 (gfc_conv_intrinsic_exponent): New function.
5916 (gfc_conv_intrinsic_spacing): New function.
5917 (gfc_conv_intrinsic_rrspacing): New function.
5918 (gfc_conv_intrinsic_function): Use them.
5920 2003-08-24 XiaoQiang Zhang (zhangapache@yahoo.com>
5922 * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
5923 build_int_2 changed from (high, low) to (low, high).
5924 * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
5925 ioparm_namelist_read_mode, iocall_set_nml_val_int,
5926 iocall_set_nml_val_float, iocall_set_nml_val_char,
5927 iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
5928 (gfc_build_io_library_fndecls): Add variable initialization.
5929 (gfc_new_nml_name_expr, get_new_var_expr): New function.
5930 (build_dt): Add namelist support.
5931 * io.c (value): New variable.
5932 (check_format): Support FMT_H now.
5934 2003-09-07 Paul Brook <paul@nowt.org>
5936 * io.c (gfc_resolve_dt): Error if format label is not defined.
5938 2003-09-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
5940 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
5941 about case_switch's break. The other is about building the condition
5942 statement tree, which judges the argument in the range of the
5943 corresponding integer type.
5944 * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
5945 for the large values.
5947 2003-09-05 Paul Brook <paul@nowt.org>
5949 * f95-lang.c (expand_function_body): Gimplify the function.
5951 2003-09-04 Jeff Law <law@redhat.com>
5953 * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
5956 2003-09-04 Paul Brook <paul@nowt.org>
5958 * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
5959 (gfc_expand_stmt): New function.
5960 (LANG_HOOKS_RTL_EXPAND_STMT): Define.
5961 (expand_function_body): Use tree_rest_of_compilation.
5962 * trans-decl.c (gfc_generate_function_code): Don't free cfun.
5964 2003-09-03 Jeff Law <law@redhat.com>
5966 * f95-lang.c (gfc_init_builtin_functions): C arrays start at
5969 2003-08-30 Paul Brook <paul@nowt.org>
5971 * f95-lang.c (builtin_function): Remove #if 0 code.
5972 (gfc_define_builtin): New function.
5973 (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
5974 * mathbuiltins.def: New file.
5975 * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
5976 (gfc_intrinsic_map): Use mathbuiltins.def.
5977 (gfc_intrinsic_builtin_t): Remove.
5978 (gfc_build_intrinsic_lib_fndecls): Update.
5979 * trans-types.c (gfc_init_types): Remove redundant initilaization of
5980 signed_size_type_node.
5982 2003-08-29 Paul Brook <paul@nowt.org>
5984 * arith.c (gfc_real_kinds): Use correct minimum exponents.
5986 2003-08-22 Kejia Zhao <kejia_zh@yahoo.com.cn>
5988 * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
5989 (gfc_conv_intrinsic_function): Add MODULO.
5991 2003-08-22 Jason Merrill <jason@redhat.com>
5993 * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
5995 2003-08-22 Andreas Jaeger <aj@suse.de>
5997 * Make-lang.in (f95.install-common): Add DESTDIR support.
5998 * (f95.install-info): Likewise.
5999 (f95.uninstall): Likewise.
6001 2003-08-19 Diego Novillo <dnovillo@redhat.com>
6003 * trans-types.c (gfc_init_types): Initialize
6004 signed_size_type_node with size_type_node.
6006 2003-08-18 Paul Brook <paul@nowt.org>
6008 * dependency.c (gfc_dependency): New enum.
6009 (check_another_array_ref): Remove.
6010 (gfc_get_array_from_component): Remove.
6012 (get_range): Remove.
6013 (get_no_of_elements): Use mpz_t, not mpf_t.
6014 (transform_sections): New function.
6015 (gfc_check_range_range): Rename ...
6016 (gfc_check_section_vs_section): ... to this. Use new function.
6017 (gfc_is_inside_range): Rewrite to match.
6018 (gfc_check_element_vs_section): Ditto.
6019 (gfc_check_element_vs_element): Ditto.
6021 (gfc_dep_resolver): Ditto. Remove unused parameter.
6022 * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
6023 gfc_check_element_vs_element, gfc_is_inside_range,
6024 gfc_get_array_from_component): Remove prototypes for static functions.
6025 (gfc_dep_resolver): Update prototype.
6026 * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
6028 2003-08-15 Paul Brook <paul@nowt.org>
6030 * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
6031 return values to parent scope.
6032 (gfc_build_dummy_array_decl): Ditto.
6034 2003-08-14 Paul Brook <paul@nowt.org>
6036 * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
6037 size of the type, not the pointer.
6038 * resolve.c (resolve_symbol): Give more accurate error message.
6040 2003-08-10 Paul Brook <paul@nowt.org>
6042 * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
6044 2003-08-10 Paul Brook <paul@nowt.org>
6046 * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
6049 2003-08-10 Chun Huang <compiler@sohu.com>
6051 * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
6052 (resolve_symbol): Ditto.
6053 * trans-expr.c (gfc_conv_statement_function): New function.
6054 (gfc_conv_function_expr): Use it.
6056 2003-08-10 Paul Brook <paul@nowt.org>
6058 * trans-array.c (gfc_conv_ss_startstride): Handle functions.
6059 (walk_function_expr): Set section rank.
6060 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
6062 2003-08-10 Paul Brook <paul@nowt.org>
6064 * intrinsic.c (add_sym): Prefix names with correct string.
6065 (add_sym_0s): New function.
6066 (add_subroutines): Register abort.
6068 2003-08-10 Erik Schnetter <schnetter@uni-tuebingen.de>
6070 * gfortran.h: Introduce options to control the mangling.
6071 * lang.opt: Likewise.
6072 * options.c (gfc_init_options): Handle the options.
6073 * trans-common.c (gfc_sym_mangled_common_id): New function.
6074 (gfc_build_common_decl): Call it.
6075 * trans-decl.c (gfc_sym_mangled_function_id): New function.
6076 (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
6078 2003-08-09 Paul Brook <paul@nowt.org>
6080 * module.c (mio_symbol): Always ouput a namespace for formal args.
6081 (load_needed): Namespace now belong to their proper symbol.
6082 (gfc_dump_module): Change G95=>GFORTRAN.
6084 2003-08-05 Paul Brook <paul@nowt.org>
6086 * options.c: Force -fg77-calls.
6088 2003-08-02 Paul Brook <paul@nowt.org>
6090 * Makelang.in: Rename G95_* to GFORTRAN_*.
6091 * All sources: Rename G95_* to GFC_*.
6093 2003-08-01 Paul Brook <paul@nowt.org>
6095 * fortran/Make-lang.in: Use GMPLIBS.
6096 * fortran/config-lang.in: Set need_gmp.
6097 * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
6099 2003-07-27 Andreas Jaeger <aj@suse.de>
6101 * trans-decl.c (gfc_generate_constructors): Convert prototype to
6103 * trans-const.c (gfc_init_constants): Likewise.
6104 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
6106 * gfortranspec.c: Convert to ISO C90.
6107 (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
6109 2003-07-26 Paul Brook <paul@nowt.org>
6111 * lang.opt: Add -fdump-parse-tree.
6112 * options.c (gfc_handle_option): Ditto.
6113 * resolve.c (resolve_forall_iterators): Convert to proper type.
6114 * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
6116 2003-07-26 Paul Brook <paul@nowt.org>
6118 * Makefile.in: Add build dependencies on files common with rest of gcc.
6120 2003-07-26 Lifang Zeng <zlf605@hotmail.com>
6122 * trans.h: Declare g95_trans_pointer_assignment.
6123 * trans-expr.c (g95_trans_pointer_assignment): New function.
6124 (g95_trans_pointer_assign): Use it.
6125 * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
6126 (g95_trans_pointer_assign_need_temp): New function.
6128 2003-07-26 Paul Brook <paul@nowt.org>
6130 * gfortran.texi: Replace references to g95.
6132 2003-07-26 Paul Brook <paul@nowt.org>
6134 Rename g95_* to gfc_*.
6136 2003-07-25 Paul Brook <paul@nowt.org>
6138 * gfortran.h: Rename from g95.h.
6139 * trans-types.c (boolean_type_node, booelan_true_node,
6140 boolean_false_node): Remove.
6141 * trans-types.h: Ditto.
6143 2003-07-25 Chun Huang <compiler@sohu.com>
6145 * parse.c (accept_statement): Implement BLOCK DATA statement.
6146 * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
6149 2003-07-24 Lifang Zeng <zlf605@hotmail.com>
6151 * trans-stmt.c (temporary_list): Define.
6152 (g95_trans_assign_need_temp): New function.
6153 (g95_trans_forall_1): Modified for WHERE.
6154 (g95_trans_where_assign): Modified.
6155 (g95_trans_where_2): Modified.
6156 (g95_evaluate_where_mask): Modified.
6157 (g95_trans_where): Modified.
6158 (g95_get_temp_expr): Removed.
6159 (g95_add_to_where_stmt_list): Removed.
6160 (compute_overall_iter_number): Modified for WHERE.
6161 * trans.h: Remove where_stmt_list.
6163 2003-07-24 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6165 * lang.opt: Correct description of options -J and -M.
6167 2003-07-23 Steven Bosscher <steven@gcc.gnu.org>
6169 * lang.opt: Move help text to here.
6170 * lang-options.h: Remove.
6172 2003-07-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6173 * iresolve.c (g95_resolve_transpose): Proper variable in switch.
6174 * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
6177 2003-07-22 Steven Bosscher <steven@gcc.gnu.org>
6178 Paul Brook <paul@nowt.org>
6180 * check.c (check_rest): Use global pedantic flag.
6181 * io.c (data_desc): Ditto.
6182 * error.c (g95_warning, g95_warning_now): Use global flag.
6183 * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
6184 (expand_function_body): Update to new prototypes.
6185 (g95_init): Use new option names.
6186 * g95.h (g95_option_t): Standardize names.
6187 (g95_init_options, g95_handle_option): Update prototypes.
6188 * interface.c: Use new option names.
6195 * simplify.c: Ditto.
6197 * trans-array.c: Ditto.
6198 * trans-expr.c: Ditto.
6199 * trans-types.c: Ditto.
6200 * trans-decl.c: Ditto.
6201 (g95_build_library_function_decl): Remove obsolete VPARAMS.
6203 * options.c (g95_display_help): Remove.
6204 (g95_init_options): Convert to new scheme.
6206 (g95module_option): Ditto, rename from g95_parse_arg.
6207 (g95_handle_module_path_options): New function.
6208 * trans-equivalence.c: Fix error message.
6209 * lang.opt: Corrections.
6211 2003-07-21 Steven Bosscher <steven@gcc.gnu.org>
6213 * lang.opt: New file.
6215 2003-07-21 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6217 * decl.c (match_attr_spec): Set colon_seen.
6219 2003-07-14 Paul Brook <paul@nowt.org>
6221 * trans-array.c: Update comment.
6222 (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
6223 * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
6224 minmaxloc,minmaxval): Ditto.
6225 * trans-io.c (g95_trans_transfer): Ditto.
6226 * trans-stmt.c: Remove unneeded prototypes.
6227 (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
6228 (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
6229 (compute_inner_temp_size): Remove bits of dead code. Add comments.
6230 Don't share loopinfo.
6231 (compute_overall_iter_number): Declare as static.
6232 (allocate_temp_for_forall_nest): Ditto.
6233 (g95_trans_forall_1): Don't pass shared loopinfo.
6234 * trans.c (g95_start_block): Expand comment.
6236 2003-07-12 Paul Brook <paul@nowt.org>
6238 * arith.c (g95_index_integer_kind): Remove unused initializer.
6239 * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
6240 index by size of element.
6241 (generate_loop_for_rhs_to_temp): Ditto.
6242 (allocate_temp_for_forall_nest): Use element size, not index size.
6244 2003-07-11 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6246 * arith.c (g95_index_integer_kind): Add a TODO.
6247 * simplify.c (g95_simplify_nearest): Add a TODO.
6249 2003-07-09 Chun Huang <compiler@sohu.com>
6251 * trans.h: Add declarations for gfor_fndecl_string_scan and
6252 gfor_fndecl_string_verify.
6253 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
6254 * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
6255 (g95_conv_intrinsic_verify): New function.
6256 (g95_conv_intrinsic_function): Add SCAN and VERIFY.
6257 * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
6258 of parameter 'BACK=.TRUE.'
6260 2003-07-05 Lifang Zeng <zlf605@hotmail.com>
6262 * trans-stmt.c (iter_info, forall_info): Define.
6263 (g95_trans_forall_block): Remove.
6264 (g95_trans_forall_loop): Use forall info blocks.
6265 (g95_trans_nested_forall_loop): New function.
6266 (g95_do_allocate): Handle things other than logical masks.
6267 (generate_loop_for_temp_to_lhs): New function.
6268 (generate_loop_for_rsh_to_temp): New function.
6269 (compute_inner_temp_size): New function.
6270 (compute_overall_iter_number): New function.
6271 (allocate_temp_for_forall_nest): New function.
6272 (g95_trans_forall): Move body ...
6273 (g95_trans_forall_1): ... to here. Handle loops with temporaries.
6275 2003-07-02 Paul Brook <paul@nowt.org>
6277 * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
6278 in correct scope. Change callers to match.
6279 * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
6280 * iresolve.c (g95_resolve_reshape): Only use constant shapes.
6282 2003-07-02 Paul Brook <paul@nowt.org>
6284 * trans-array.c (g95_conv_loop_setup): Remove dead var. Use
6285 expression shape for all expressions.
6286 * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
6288 2003-07-03 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6290 * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
6291 g95_parse_arg), intrinsic.c (g95_convert_type): support of
6293 * intrinsic.c, g95.h: Add g95_convert_type_warn,
6294 * resolve.c (g95_resolve_index): Call it.
6296 2003-07-02 Paul Brook <paul@nowt.org>
6298 * iresolve.c (g95_resolve_reshape): Set expression shape.
6299 (g95_resolve_shape): Ditto.
6300 * simplify.c (g95_simplify_shape): Move common code outside condition.
6301 * trans-array.c (g95_conv_array_initializer): Teach it how to count.
6303 2003-07-01 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6305 * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
6308 2003-06-29 Paul Brook <paul@nowt.org>
6310 * array.c (g95_simplify_iterator_var): Don't bother with return value.
6311 * expr.c (find_array_element, find_component_ref): New functions.
6312 (remove_subobject_ref): New function.
6313 (simplify_const_ref): Use them. Rename from simplify_component_ref.
6314 (simplify_ref_chain): New function.
6315 (g95_simplify_expr): Use it. Simplify parameter variable subobjects.
6316 (g95_specification_expr): Simplify the expression.
6317 * resolve.c (resolve_operator): Check simplifications return code.
6318 (g95_resolve_expr): Ditto.
6320 2003-06-26 Paul Brook <paul@nowt.org>
6322 * expr.c (simplify_component_ref): New function.
6323 (g95_simplify_expr): Use it.
6324 * resolve.c (resolve_structure_cons): Handle references.
6326 2003-06-25 Paul Brook <paul@nowt.org>
6328 * trans-io.c (build_dt): Handle internal units.
6330 2003-06-25 Canqun Yang <canqun@yahoo.com.cn>
6332 * trans-common.c (g95_build_common_decl): Array index range starts at 0.
6333 (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
6334 Use g95_array_index_type instead of integer_type_node.
6335 (g95_build_common_decl, g95_set_common_master_type): Use
6336 g95_character1_type_node instead of char_type_node.
6337 * trans-equivalence.c (g95_layout_local_equiv): As above.
6339 2003-06-24 Steven G. Kargl <kargls@attbi.com>
6341 * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
6342 remove last remains of -fquiet.
6344 2003-06-22 Paul Brook <paul@nowt.org>
6346 * resolve.c (resolve_operator): Don't fail if we can't simplify.
6347 (g95_resolve_expr): Ditto.
6348 (resolce_code): Mark as static.
6349 * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
6350 gimplifer doesn't (yet).
6352 2003-06-20 Paul Brook <paul@nowt.org>
6354 * g95.h: Add ST_PAUSE and EXEC_PAUSE.
6355 * match.c (g95_match_if): Add ST_PAUSE.
6356 (g95_match_stopcode): New function.
6357 (g95_match_pause, g95_match_stop): Use it.
6358 * parse.c (g95_ascii_statement): Handle ST_PAUSE.
6359 (decode_stmt, next_statement, parse_executable): Ditto.
6360 * resolve.c (resolve_code): Ditto.
6361 * st.c (g95_free_statement): Ditto.
6362 * trans-stmt.c (g95_trans_pause): New function.
6363 * trans-stmt.h: Declare it.
6364 * trans.c (g95_trans_code): Use it.
6365 * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
6367 (g95_build_builtin_function_decls): Initialize them.
6369 * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
6371 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6373 * io.c (g95_match_open , g95_match_close, g95_match_inquire,
6374 match_filepos): Fix error handling.
6376 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6378 * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
6379 Add assertions on arguments.
6380 * resolve.c (expression_shape): Remove useless &.
6381 * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
6382 g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
6383 g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
6384 g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
6385 g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
6386 g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
6387 (g95_simplify_not, g95_simplify_scale): Add assertions.
6389 2003-06-15 Paul Brook <paul@nowt.org>
6391 Clean up stuff to work with the ssa optimizers.
6392 * convert.c (convert): Handle BOOLEAN_TYPEs.
6393 * f95-lang.c (g95_truthvalue_conversion): Implement.
6394 * trans-array.c (g95_trans_array_constructor_value): Group multiple
6396 * trans.h (g95_truthvalue_conversion): Declare.
6397 * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
6398 * trans-stmt.c (g95_trans_character_select): Don't create array
6399 assignments. Mark labels as indirect jump targets.
6400 * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
6401 (g95_get_dtype_cst): Handle LOGICAL types.
6403 2003-06-14 Paul Brook <paul@nowt.org>
6405 * f95-lang.c (g95_gimplify_expr): New function.
6406 * trans-array.c (g95_trans_array_constructor_value): Don't create
6408 (g95_conv_expr_descriptor): Rename simple->gimple.
6409 * trans-expr.c (conv_expr_op): Use proper logical operators.
6410 * trans-intrinsic.c (build_fixbound_expr): New function.
6411 (build_fix_expr): Ditto.
6412 (g95_conv_intinsic_aint): Use them. Use builtin functions.
6413 (g95_conv_intrinsic_function): Add FLOOR and CEILING.
6415 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6417 * array.c (g95_compare_array_spec): Remove unreachable code.
6418 * expr.c (g95_copy_expr): Likewise.
6419 * intrinsic.c (g95_convert_type): Likewise.
6420 * misc.c (g95_code2string): Likewise.
6421 * simplify.c (g95_simplify_ishft, g95_simplify_real,
6422 g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
6423 * trans-stmt.c (g95_trans_select): Likewise.
6424 * primary.c (extend_ref): Add an assertion.
6425 * simplify.c (g95_convert_constant): Add const.
6426 * intrinsic.h: Remove g95_check_x_ni.
6427 * f95-lang.c (g95_finish): Call g95_release_include_path.
6429 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6431 * resolve.c (resolve_contained_functions): Fix typo introduced on
6434 2003-06-09 Paul Brook <paul@nowt.org>
6436 * g95.h: Include system.h not hwint.h.
6437 * many: use safe-ctype.h not ctype.h. Change isalpha -> ISALPHA, etc.
6438 * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
6440 2003-06-09 Paul Brook <paul@nowt.org>
6442 * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
6443 * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
6444 * trans-decl.c (g95_add_decl_to_functions): Make non-static.
6445 (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
6446 (g95_generate_function_code): Translate COMMON and EQUIVALENCE
6448 * trans.h (g95_trans_equivalence, g95_trans_common,
6449 g95_add_decl_to_function): Declare.
6450 * trans-common.c, trans-equivalence.c: New files.
6452 2003-06-08 Steven Bosscher <steven@gcc.gnu.org>
6454 * intrinsic.c (g95_intrinsic_extension): Remove.
6455 (add_functions): Substitute g95_check_x for g95_check_x_ni
6457 (g95_init_expr_extensions): New function.
6458 (g95_intrinsic_func_interface): Use it.
6459 * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
6460 * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
6461 g95_check_precision, g95_check_present, g95_check_radix,
6462 g95_check_range, g95_check_selected_real_kind): Do not set
6463 g95_intrinsic_extension.
6464 (g95_check_x_ni): Remove now duplicate of g95_check_x.
6466 * expr.c (check_inquiry): Add FIXME, fixup some code style.
6468 2003-06-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6470 * g95.h (ref_type): Name this type explicitly.
6471 * module.c (MIO_NAME): Add specialisations of mio_name.
6472 (mio_symbol_attribute, mio_typespec, mio_array_ref,
6473 mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
6474 (ab_attribute): Name this type explicitly.
6475 (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
6477 2003-06-05 Kejia Zhao <kejia_zh@yahoo.com.cn>
6479 * trans-intrinsic.c (g95_conv_allocated): New function.
6480 (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
6482 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
6484 * f95-lang.c: Don't include g95-support.h
6485 (g95_mark_addressable): Add prototype.
6486 (g95_init_decl_processing): Remove C front end hack.
6487 * f95-tree.c: Remove file.
6488 * support.c: Remove file.
6489 * g95-support.h: Remove file.
6490 * trans-types.c (g95_init_types): Set up boolean
6491 type related tree nodes.
6492 * Make-lang.in: Remove rules for dead files and
6493 dependencies on them.
6495 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
6497 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
6498 C front end dependency. Also, convert.c does not depend on
6499 g95-support.h anymore.
6500 * convert.c: Don't include c-common.h and g95-support.h
6501 * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
6502 (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
6503 stmts_are_full_exprs_p, current_stmt_tree,
6504 current_scope_stmt_stack): Remove.
6505 * g95-support.h (unsigned_conversion_warning): Kill proto.
6506 (boolean_type_node, boolean_true_node, boolean_false_node):
6507 Don't define here. Instead, make then true tree nodes in
6509 * support.c (c_global_trees): Die, C front end, die!!!
6510 (g95_init_c_decl_hacks): Don't touch intmax_type_node,
6511 uintmax_type_node, string_type_node and const_string_type_node.
6512 (decl_constant_value, overflow_warning): Make static functions.
6513 They are in death row too, though.
6514 (default_conversion, c_expand_asm_operands): Remove.
6515 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
6516 trans.c: Don't include c-common.h.
6517 * trans-types.c (boolean_type_node, boolean_true_node,
6518 boolean_false_node): Make them real tree nodes.
6519 * trans-types.h (intmax_type_node, string_type_node,
6520 const_string_type_node): Hack to work around C dependencies
6521 in builtin-types.def.
6523 2003-06-04 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6525 * decl.c (decl_types): Add some iterators-like sentinels.
6526 * decl.c (match_attr_spec): Use them.
6527 Use "decl_types" instead of "int".
6528 Add cast in call to g95_match_strings.
6529 * dump-parse-tree.c (g95_show_namespace): Use "g95_intrinsic_op"
6531 * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
6532 (g95_interface_info): Use "g95_intrinsic_op".
6533 * dump-parse-tree.c (g95_show_namespace): Use them.
6534 * interface.c (g95_check_interfaces): Use them.
6535 * module.c (read_module, write_module): Use them.
6536 * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
6537 Use "g95_intrinsic_op".
6538 * interface.c (check_operator_interface): Use "g95_intrinsic_op".
6539 Add a default case in switch statement.
6540 * intrinsic.h (g95_generic_isym_id): Moved to...
6541 * g95.h (g95_generic_isym_id): here.
6542 (g95_intrinsic_sym): Use "g95_generic_isym_id".
6543 * intrinsic.c (make_generic): Use "g95_generice_isym_id".
6544 * trans-intrinsic.c (g95_intrinsic_map_t,
6545 g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
6546 * match.c (g95_match_intrinsic_op): Add cast in call to
6549 2003-06-03 Steven Bosscher <steven@gcc.gnu.org>
6551 * support.c (skip_evaluation, warn_conversion, lvalue_p,
6552 lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
6553 constant_fits_type_p, convert_and_check,
6554 unsigned_conversion_warning): Remove these ugly remnants
6555 we inherited from the C front end.
6556 (function_types_compatible): Remove '#if 0'-edcode.
6557 (build_modify_expr): Likewise.
6558 (convert_for_assignment): Don't use the deceased functions.
6559 The parameter fundecl is now unused.
6560 (decl_constant_value): Always just return decl. In fact
6561 this function is not used at present, but it might be in
6562 the future, when we start using the tree inliner.
6563 (overflow_warning, default_conversion, c_expand_asm_operands):
6564 Abort when these are called, they are part of the C type
6565 checking implementation and therefore poison to Fortran.
6567 2003-06-04 Steven Bosscher <steven@gcc.gnu.org>
6569 * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
6570 c-pretty-print.o and c-dump.o. Add a comment on why we
6571 depend on c-semantics.c.
6572 * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
6573 Don't use the C front end tree dumper hook to dump the
6574 language specific tree representation -- we don't have
6575 one. So instead, inherit the default langhook.
6577 2003-06-02 Paul Brook <paul@nowt.org>
6579 * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
6581 2003-06-02 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6583 * check.c (g95_check_associated): Use proper types. Remove
6584 extraneous argument in call to g95_error().
6586 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
6588 * resolve.c (resolve_operator): Make logical operands convert to the
6589 type with higher kind.
6591 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
6593 * check.c (g95_check_associated): Make sure both pointer and target has
6594 the same type and rank. Null pointer or array section with vector
6595 subscript as target are not allowed.
6596 * trans.h: Declare gfor_fndecl_associated.
6597 * trans-decl.c: (g95_build_builtin_function_decls): Initialize
6598 gfor_fndecl_associated.
6599 * trans-intrinsic.c (g95_conv_associated): New function.
6600 (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
6602 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
6604 * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
6605 according to POINTER itself rather than TARGET.
6606 (g95_conv_expr_descriptor): Make lbound start at 1.
6607 * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
6609 2003-06-01 Paul Brook <paul@nowt.org>
6611 * expr.c (g95_type_convert_binary): Make it match the standard.
6612 * g95.texi: Remove dead link.
6614 2003-06-01 Steven Bosscher <steven@gcc.gnu.org>
6616 * g95.texi: Cleanup somewhat in preparation for inclusion
6619 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6620 Canqun Yang <canqun@yahoo.com.cn>
6622 * resolve.c (compare_bound_int, resolve_where_shape): Proper return
6624 (g95_find_forall_index): Return proper value.
6625 (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
6626 compare the return value from g95_find_forall_index.
6628 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6629 * g95.h, io.c (g95_st_label): Remove "length".
6630 (g95_symtree): Remove "link".
6631 (g95_case): Remove "code".
6632 * arith.c, arith.h (g95_compare_string, g95_convert_integer,
6633 g95_convert_real): Make an argument pointer to const.
6634 * decl.c (colon_seen): Add a TODO.
6635 * interface.c (g95_compare_types): Fix typo.
6636 * interface.c (compare_interfaces): Preserve value of "p".
6637 * intrinsic.c (sort_actual): Remove "i".
6638 * match.c (g95_match_assign): Proper type in call to g95_match().
6639 * parse.c (next_free): Avoid duplicate call due to macro.
6640 * parse.c (check_statement_label): wrong type in call to g95_error.
6641 * primary.c (match_real_constant): Add a TODO.
6642 * resolve.c (resolve_select): Remove useless conditional.
6643 * simplify.c (g95_simplify_repeat): Proper assignment to
6644 "value.character.string".
6645 * simplify.c (g95_simplify_reshape): Wrong variable in call to
6648 2003-05-20 Canqun Yang <canqun@yahoo.com.cn>
6650 * trans-stmt.c: Remove unnecessary include file defaults.h.
6652 2003-05-19 Lifang Zeng <zlf605@hotmail.com>
6654 * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
6656 (g95_trans_forall): Allow arbitrary number of FORALL indexes and
6657 actual variables used as FORALL indexes.
6659 2003-05-15 Paul Brook <paul@nowt.org>
6661 * trans-array.c (g95_trans_static_array_pointer): Use
6663 (g95_trans_deferred_array): Initialize static array pointers.
6664 * trans-expr.c (g95_conv_function_call): Use formal arglist to
6665 correctly pass POINTER and absent CHARACTER arguments.
6667 2003-05-14 Lifang Zeng <zlf605@hotmail.com>
6669 * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
6670 (g95_resolve_forall_body): Resolve FORALL body.
6671 (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
6672 (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
6673 (g95_find_forall_index): Check whether the FORALL index appears in
6674 the expression or not.
6675 (resolve_code): Modified.
6677 2003-05-14 Paul Brook <paul@nowt.org>
6679 * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
6681 2003-05-13 Paul Brook <paul@nowt.org>
6683 * trans-types.c (g95_max_array_element_size): Now a tree node.
6684 (g95_init_types): Work out max size properly.
6685 (g95_get_dtype_cst): Modify to match.
6687 2003-05-11 Paul Brook <paul@nowt.org>
6689 * trans-io.c (add_case): Create a label decl for case labels.
6691 2003-05-11 Paul Brook <paul@nowt.org>
6693 * arith.c (g95_integer_index_kind): New variable.
6694 * f95-lang.c (g95_init): Move frontend initialization here ...
6695 (g95_post_options): ... from here.
6696 * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
6697 * intrinsic.c (add_functions): Use index kinds.
6698 * iresolve.c: Convert to index_kind where needed.
6699 * resolve.c (g95_resolve_index): Make public, use index_kind.
6700 (resolve_array_ref): Adjust to match.
6701 * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
6702 * trans-stmt.c: Ditto.
6703 * trans-types.c: Ditto.
6704 * trans-types.h (g95_array_index_kind): Remove declaration.
6705 * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
6707 2003-05-07 Paul Brook <paul@nowt.org>
6709 * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
6710 * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
6713 2003-05-07 Paul Brook <paul@nowt.org>
6715 * trans-array.c (trans_static_array_pointer,
6716 g95_trans_array_constructor_value, g95_conv_array_initializer,
6717 g95_conv_structure): CONSTRUCTOR nodes only have one operand.
6718 (g95_add_loop_ss_code): Convert subscripts to the correct type.
6719 * trans-stmt.c (g95_trans_character_select): Ditto.
6720 * trans-types.c (g95_init_types): Ditto.
6722 2003-05-07 Steven Bosscher <steven@gcc.gnu.org>
6724 * f95-lang.c (expand_function_body): Use input_line, not lineno.
6725 * trans-decl.c (g95_generate_function_code,
6726 g95_generate_constructors): Likewise.
6727 * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
6728 g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
6731 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
6732 * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
6733 with components point to the DERIVED type itself, and two DERIVED
6734 type with components point to each other.
6735 * trans-expr.c (g95_conv_componet_ref): Modified
6737 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
6738 * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
6740 (g95_trans_pointer_assign): Implement Nullify.
6742 2003-05-01 Paul Brook <paul@nowt.org>
6744 * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
6745 * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
6747 2003-05-01 Paul Brook <paul@nowr.org>
6749 * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
6750 trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
6753 2003-05-01 Canqun Yang <canqun@yahoo.com.cn>
6755 * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
6758 2003-04-28 Paul Brook <paul@nowt.org>
6760 * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
6761 as their kind suggests.
6762 (g95_resolve_reshape): Ditto.
6764 2003-04-28 Chun Huang <compiler@sohu.com>
6766 * trans-expr.c (g95_conv_substring_expr): New function.
6767 (g95_conv_expr): Use it.
6769 2003-04-28 Paul Brook <paul@nowt.org>
6771 * iresolve.c (g95_resolve_transpose): Make it match the
6773 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
6775 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
6777 * trans-types.c (g95_add_field_to_struct): New function to
6778 add a field to a UNION_TYPE or RECORD_TYPE.
6779 * trans-types.h (g95_add_field_to_struct): Prototype.
6780 (g95_get_derived_type): Use g95_add_field_to_struct to add
6782 * trans-io.c (g95_add_field): Remove.
6783 (ADD_FIELD): Use new g95_add_field_to_struct function.
6784 (ADD_STRING): Likewise.
6785 * trans-stmt.c (g95_trans_select): Likewise.
6786 (g95_add_field): Remove duplicated function.
6788 2003-04-18 Canqun Yang <canqun@yahoo.com.cn>
6790 Port implementation for CHARACTER SELECT from Andy's tree.
6791 * trans-stmt.c (g95_trans_character_select): Implement character
6792 select. (g95_add_field): New function.
6793 * trans-decl.c: Declare 'gfor_gndecl_select_string'.
6794 (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
6795 * g95.h (struct g95_case): Add field 'int n'.
6796 * trans.h: Declare 'gfor_fndecl_select_string'.
6798 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
6800 * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
6801 (g95_insert_bbd): Die on duplicates.
6802 * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
6804 2003-04-14 Steven Bosscher <steven@gcc.gnu.org>
6806 * g95.texi: Require GMP 4.0 -- like we actually
6807 do. Explain the testsuite and what-goes-where.
6808 Don't use undefined texinfo symbol. Break very
6809 long line. Remove finished item from the list
6812 2003-04-11 Canqun Yang <canqun@yahoo.com.cn>
6814 * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
6817 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
6819 * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
6820 (g95_trans_forall_body): New function.
6822 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
6824 * resolve.c (resove_where): New function.
6825 (resolve_where_shape): New function.
6826 (resolve_code): Add call to 'resolve_where'
6827 * trans-stmt.c (g95_trans_where): Modified.
6828 (g95_trans_where_2): New function.
6829 (g95_trans_where_assign): New function.
6830 (g95_evaluate_where_mask): New function.
6831 (g95_add_to_stmt_list): New function.
6832 (g95_get_temp_expr): New function.
6833 * trans.h (where_stmt_list): New structure.
6835 2003-04-10 Paul Brook <paul@nowt.org>
6837 * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
6838 (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
6840 2003-04-10 Steven Bosscher <steven@gcc.gnu.org>
6842 Update after mainline -> tree-ssa-branch merge.
6843 * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
6845 (g95_init): Update for new lang_hooks definition.
6846 (g95_post_options): New langhook.
6847 (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
6848 * scanner.c (g95_new_file): Comment update.
6850 2003-04-09 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6852 * g95.h, lang-options.h: Add -Wimplicit-interface.
6853 * options.c (g95_init_options, g95_parse_arg): Set it.
6854 * interface.c (check_intents): Warn about call with implicit
6856 * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
6859 2003-04-05 Paul Brook <paul@nowt.org>
6861 * iresolve.c (g95_resolve_spread): Don't resole based on type.
6862 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
6864 2003-03-29 Paul Brook <paul@nowt.org>
6866 * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
6867 (g95_resolve_unpack): Ditto.
6868 * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
6869 (g95_conv_intrinsic_function): Use it. Remove PACK and UNPACK.
6870 (g95_is_intrinsic_libcall): Add PACK and UNPACK.
6872 2003-03-25 Paul Brook <paul@nowt.org>
6874 * arith.c (g95_unary_user, g95_user): Remove dead functions.
6876 * array.c (g95_free_array_ref): Ditto.
6878 * symbol.c (g95_use_derived_tree): Ditto.
6879 * intrinsic.c (add_functions): Use simplification for SCALE.
6880 * primary.c (g95_match_rvalue): Test sym, not symtree.
6882 2003-03-25 Paul Brook <paul@nowt.org>
6884 * trans-decl.c (build_function_decl): Add parameter before it gets
6885 turned into a constant.
6886 * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
6887 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
6888 * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
6890 2003-03-22 Paul Brook <paul@nowt.org>
6892 * trans-array.c (g95_conv_array_initializer): Allow scalar
6894 * trans-decl.c (g95_finish_var_decl): Result variables are not
6896 * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
6897 (g95_conv_intrinsic_function): Use it.
6898 * trans-types.h (g95_type_spec): Remove dead declaration.
6900 2003-03-21 Paul Brook <paul@nowt.org>
6902 * trans-decl.c (g95_build_function_decl): Mark string parameters.
6904 2003-03-20 Paul Brook <paul@nowt.org>
6906 * trans-decl.c (g95_build_function_decl): Put character length
6907 parameters at the end of the function declaration.
6908 * trans-expr.c (g95_conv_function_call): Ditto.
6909 * trans-types.c (g95_get_function_type): Ditto.
6911 2003-03-20 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6913 * resolve.c (resolve_formal_arglist): Don't impose intent for
6914 procedure arguments of pure functions.
6915 (resolve_select): Remove redundant assignment.
6917 2003-03-19 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6919 * arith.c (validate_logical), g95.h, options.c (g95_init_options):
6921 * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
6922 * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
6924 * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
6926 * symbol.c (g95_add_type): Fix typo in comment.
6929 2003-03-16 Paul Brook <paul@nowt.org>
6931 * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
6932 * expr.c (g95_build_call): Remove.
6933 * f95-lang.c (puchdecl_top_level): New function.
6934 * g95.h (g95_code): Store resolved symbol, not just the name.
6935 * intrinsic.c (g95_intrinsic_namespace): New global namespace.
6936 (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
6937 (g95_get_intrinsic_sub_symbol): New function.
6938 * iresolve.c (g95_resolve_cpu_time): Use it.
6939 (g95_resolve_random_number): Ditto.
6940 * resolve.c: Set code->resolved_sym instead of code->sub_name.
6941 * trans-decl.c (g95_get_extern_function_decl): Give external decls
6942 the correct DECL_CONTEXT. Add global symbold to the global scope.
6943 * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
6946 2003-03-16 Paul Brook <paul@nowt.org>
6948 * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
6949 * options.c (g95_parse_arg): Ditto.
6950 * module.c (mio_symbol_attribute): Handle the always_explicit bit.
6951 * resolve.c (resolve_formal_arglist): The always_explicit sould be set
6952 for the procedure, not the parameter.
6953 * trans-array.c (g95_trans_g77_array): New function.
6954 (g95_trans_assumed_size): Use it.
6955 (g95_trans_dummy_array_bias): Ditto.
6956 (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
6957 (g95_conv_expr_descriptor): ... to here. Update callers.
6958 * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
6959 (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
6960 * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
6961 * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
6962 * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
6963 (g95_sym_type): Ditto.
6965 2003-03-15 Paul Brook <paul@nowt.org>
6967 * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
6969 * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
6971 2003-03-14 Paul Brook <paul@nowt.org>
6973 * trans-array.c (g95_array_is_packed): Remove.
6974 (g95_conv_array_base): Correctly handle all descriptorless cases.
6975 (g95_conv_array_stride): Use descriptorless strides.
6976 (g95_trans_dummy_array_bias): Don't always repack the array.
6977 (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
6979 * trans-types.c (g95_get_nodesc_array_type): Differentiate between
6980 dummy and non-dummy arrays...
6981 (g95_sym_type, g95_get_derived_type): ... like these.
6982 (g95_get_array_type_bounds): Allow discontiguous arrays.
6984 2003-03-12 Paul Brook <paul@nowt.org>
6986 * array.c (g95_resolve_array_spec): Fix comment.
6987 * g95.h (symbol_attributes): New flag always_explicit.
6988 * resolve.c (resolve_formal_arglist): Set it always_explicit.
6989 * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
6990 * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
6991 (g95_trans_array_bounds): Allow assumed shape arrays.
6992 (g95_trans_repack_array): Remove.
6993 (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
6994 * trans-decl.c (g95_build_qualified_array): Only ignore absent
6995 bounds for assumed size arrays.
6996 (g95_build_dummy_array_decl): Use descriptorless arrays.
6997 * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
6998 (g95_trans_pointer_assign): Fix typo.
6999 * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
7001 (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
7002 * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
7003 Also modify callers.
7004 * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
7006 2003-03-08 Paul Brook <paul@nowt.org>
7008 * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
7009 (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
7010 * resolve.c (compare_spec_to_ref): Allow full array sections.
7012 2003-03-08 Paul Brook <paul@nowt.org>
7014 * expr.c (g95_simplify_expr): Also simplify array index and
7015 substring expressions.
7016 * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
7017 * trans-array.c (g95_trans_array_bounds): New function.
7018 (g95_trans_auto_array_allocation): Use it.
7019 (g95_trans_assumed_size): Rewrite.
7020 * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
7021 (gfor_fndecl_repack): Remove.
7022 (g95_build_qualified_array): Handle absent upper bounds.
7023 (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
7024 (g95_get_symbol_decl): Update.
7025 (g95_build_intrinsic_function_decls): Initialize new decls.
7026 * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
7027 (gfor_fndecl_repack): Remove.
7028 * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
7029 * trans-types.c: (g95_build_array_type): Merge duplicated code..
7030 (g95_get_nodesc_array_type): Handle absent bounds.
7031 * trans-types.h (g95_get_nodesc_array_type): Declare.
7033 2003-03-04 Paul Brook <paul@nowt.org>
7035 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
7038 2003-03-02 Paul Brook <paul@nowt.org>
7040 * options.c (g95_init_options): Drfault to 1.
7041 (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
7042 * trans-array.c (g95_conv_array_data, g95_conv_array_base,
7043 g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
7044 Handle non-constant size automatic arrays.
7045 (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
7046 generic bound functions.
7047 (g95_trans_auto_array_allocation): Don't create a descriptor.
7048 (g95_trans_assumed_size): New function (broken).
7049 (g95_trans_dummy_array_bias): Remove unused var.
7050 * trans-array.h (g95_trans_assumed_size): Declare.
7051 * trans-decl.c (create_index_var): New fuction.
7052 (g95_build_qualified_array): New function.
7053 (g95_get_symbol_decl): Use it.
7054 (g95_trans_deferred_vars): Handle assumed shape seperately.
7055 * trans-types.c (get_element_type): Handle heap allocated arrays.
7056 (g95_is_nodesc_array): Include non-const size arrays.
7057 (g95_get_nodesc_array_type): Ditto.
7059 2003-02-23 Paul Brook <paul@nowt.org>
7061 * trans-array.c (g95_array_init_size): Should use stride, not size of
7064 2003-02-18 Paul Brook <paul@nowt.org>
7066 * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
7067 after intrinsic function check.
7069 2003-02-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7071 * io.c (match_io): Fix missing return value and remove useless
7073 * match.c (g95_match): Remove useless assignment.
7074 * module.c (parse_string): Remove useless post increment.
7075 * simplify.c (g95_simplify_verify): Remove useless assignment.
7077 2003-02-15 Paul Brook <paul@nowt.org>
7079 * expr.c (restricted_intrinsic): Handle bad values gracefully.
7080 * g95.h (symbol_attribute): Add referenced member.
7081 (g95_symbol): Add dummy_order member.
7082 (g95_set_sym_referenced): Declare.
7083 * match.c (g95_match_assignment, g95_match_call): Use it
7084 * primary.c (match_actual_arg, g95_match_rvalue,
7085 g95_match_variable): Ditto.
7086 * symbol.c (next_dummy_order): New variable.
7087 (g95_set_sym_referenced): New function.
7088 (check_done): New function.
7089 (g95_add_*): Use it.
7090 * trans-decl.c: Make formatting conform to GCC standards.
7091 (g95_defer_symbol_init): Add dummy variables in the right order.
7092 (g95_get_symbol_decl): Only accept referenced variables.
7093 (g95_create_module_variable): Module variables are always required.
7094 (generatr_local_decls): New function.
7095 (generate_local_vars): New function.
7096 (g95_generate_function_code): Use it.
7098 2003-02-13 Paul Brook <paul@nowt.org>
7100 * trans-decl.c (g95_conv_struct_cons): Remove.
7101 (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
7102 * trans-expr.c (g95_conv_structure): New function.
7103 (g95_conv_expr): Use it.
7105 2003-02-09 Paul Brook <paul@nowt.org>
7107 * trans-array.c (g95_array_init_size): Don't evaluate the linit
7108 expressions multiple times.
7109 (g95_trans_auto_arry_allocation): Use pointer not tmp.
7111 2003-02-08 Paul Brook <paul@nowt.org>
7113 * module.c (mio_symtree_ref): Declare as static.
7114 (mio_expr): Remove dead code.
7115 (read_module): Set the symtree link for fixups.
7116 * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
7117 (build_round_expr): ... to this.
7118 (g95_conv_intrinsic_aint): New function.
7119 (g95_conv_intrinsic_function): Use it.
7121 2003-02-08 Paul Brook <paul@nowt.org>
7123 * trans-array.c (g95_trans_array_constructor_value): Use the acutal
7124 offset after modificaton, not the increment expression.
7125 * dependency.c: Kill excess whitespace.
7127 2003-02-07 Sanjiv Gupta <sanjivg@noida.hcltech.com>
7129 * dependency.h: Remove some function declarations.
7130 * dependency.c (get_no_of_elements): Change this function not to
7132 * other: Add comments for all modified functions.
7134 2003-02-06 Paul Brook <paul@nowt.org>
7136 * g95spec.c (lang_specific_functions): Fix initializer warning.
7137 * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
7138 for structure type names.
7139 * trans-decl.c (g95_cons_structure_cons): New function.
7140 (g95_get_symbol_decl): Use it.
7141 * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
7144 2003-02-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7146 * resolve.c (compare_cases): Add const to casts.
7148 2003-01-30 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7150 * g95.h (g95_check_f): Change a1 to f1m.
7151 * intrinsic.c (add_sym_1m, check_specific,
7152 g95_intrinsic_func_interface): Use it.
7154 * module.c (init_pi_tree): Remove useless cast.
7155 (fp2): Fix argument type.
7157 * parse.c (parse_select_block): Add comment.
7159 2003-02-05 Toon Moene <toon@moene.indiv.nluug.nl>
7161 * lang-options.h: Fix warning involving C90 concatenated
7164 2003-02-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
7165 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7167 * io.c (format_asterisk): Complete initializer to kill warning.
7168 * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
7169 DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
7170 (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
7171 new defines to complete initializers. Kills all warnings.
7173 * Make-lang.in: Comment cleanup.
7175 2003-02-05 Paul Brook <paul@nowt.org>
7177 * array.c (g95_free_constructor): Handle NULL expressions.
7178 * resolve.c (resolve_structure_cons): Ditto.
7179 * decl.c (g95_match_null): New Function.
7180 (variable_decl): Use it.
7181 * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
7182 * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
7183 * trans-types.c (g95_set_decl_attributes): Remove empty function.
7185 2003-02-05 Paul Brook <paul@nowt.org>
7187 * trans.h (build1_v): New macro.
7188 (build_v): Remove pointless and incorrect prototype.
7189 * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
7190 * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
7192 2003-02-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
7194 * Make-lang.in (F95_OBJS): Remove one more dead file.
7196 2003-02-01 Paul Brook <paul@nowt.org>
7198 * lang-specs.h: Don't pass -ffixed-form to the linker.
7199 * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
7201 2003-02-01 Paul Brook <paul@nowt.org>
7203 * Make-lang.in (F95_OBJS): Remove dead files.
7204 * trans-array.c (g95_array_init_size): Do the right thing when
7206 * trans-decl.c (g95_generate_function_code): Initialize deffered
7207 symbol list before translating contained subroutines.
7208 * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
7209 scalar invariant values here...
7210 (g95_conv_variable, g95_conv_function_call): ... instead of here ...
7211 * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
7213 2003-01-29 Paul Brook <paul@nowt.org>
7215 * trans-array.c (g95_add_loop_code): Put pre code in the right block.
7216 (g95_walk_elemental_function_args): Reverse chains before adding.
7217 (g95_reverse_ss): Move about a bit.
7218 * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
7221 2003-01-28 Paul Brook <paul@nowt.org>
7223 * intrinsic.c (resolve_intrinsic): Use correct union member.
7224 * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
7226 * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
7227 use associated variables.
7228 * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
7229 * trans-expr.c (g95_conv_expr_present): ... to here.
7230 * trans.h: Declare it.
7231 * trans-types.c (g95_sym_type): Assume subroutine if not specified.
7233 2003-01-28 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7235 * array.c (expand_iterator): Suppress useless assignment.
7236 * decl.c (match_char_spec): Ditto.
7237 * io.c (match_io_iterator): Ditto.
7238 * primary.c (match_real_constant): Ditto.
7239 * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
7240 Ditto. Also, use g95_intrinsic_op not int for intrinsic operators.
7241 * matchexp.c (match_add_operand, match_level_5): Likewise.
7242 * module.c (parse_atom, find_enum): Likewise.
7243 * resolve.c: move #include <string.h>
7244 (resolve_select): Fix serious typo.
7246 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.n>
7248 * Make-lang.in: Don't build with broken tree-ssa-pre.
7250 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.nl>
7252 * resolve.c (resolve_index): Add a TODO.
7253 * symbol.c: Remove useless "#include <ctype.h>".
7255 2003-01-27 Paul Brook <paul@nowt.org>
7257 * check.c (check_rest): Allow different type kinds as an extension.
7258 * g95.h (g95_resolve_f): Add f1m.
7259 * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
7260 * intrinsic.h: Chenge prototypes for MIN and MAX.
7261 * iresolve.c (g95_resolve_minmax): New function.
7262 (g95_resolve_min, g95_resolve_max): Use it.
7263 * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
7265 (g95_conv_intrinsic_present): Fix logic.
7267 2003-01-27 Steven Bossche <s.bosscher@student.tudelft.nl>
7269 * g95.h (g95_case): Don't be a tree, be a double linked list.
7270 * match.c (match_case_selector): Remove redundant semantics check.
7271 Clean up a few goto's to make it a tiny little bit faster.
7272 * resolve.c (case_tree): Die.
7273 (compare_cases): Accept and compare unbounded cases too.
7274 (check_case_overlap): Don't build a tree. Instead, merge-sort the
7275 whole list of g95_cases passed from resolve_select.
7276 (sane_logical_select): Die.
7277 (check_case_expr): Return FAILURE if a CASE label is of the wrong
7279 (resolve_select): Fixup case expression for computed GOTOs, put it
7280 in expr, not expr2, for easier handing in the parse tree dumper and
7281 the code generator. Rewrite the rest of the function: Kill
7282 unreachable case labels and unreachable case blocks.
7283 * dump-parse-tree.c (g95_show_code_node): Always dump expr for
7284 an EXEC_SELECT, not case2 anymore.
7285 * trans-const.c (g95_conv_constant_to_tree): New function.
7286 (g95_conv_constant): Use it.
7287 * trans-const.h: Declare prototype for the new function.
7288 * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
7289 g95_trans_character_select): New static functions.
7290 (g95_trans_select): Rewrite.
7292 2003-01-26 Paul Brook <paul@nowt.org>
7294 * intrinsic.c (add_fnctions): Properly add dreal.
7295 * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
7296 (g95_conv_intrinsic_function): Use it.
7297 * trans-io.c (build_dt): Abort on internal files (unimplemented).
7299 2003-01-26 Paul Brook <paul@nowt.org>
7301 Widespread changes to the handling of symbols in expressions. These
7302 are now linked via g95_symtree nodes.
7303 * parse.c (g95_fixup_sibling symbols): New function.
7304 (parse_contained): Use it.
7305 * g95.h (symbol_attribute): Add contained. Indicates a symbol is a
7306 contained procedure that has bee correctly fixed up.
7307 (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
7309 2003-01-24 Paul Brook <paul@nowt.org>
7311 * trans-array.c (g95_walk_expr): Function result attributes are in
7313 * trans-expr.c (g95_conv_function_call,
7314 g95_trans_arrayfunc_assign): Ditto.
7315 * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
7317 2003-01-23 Steven Bosscher <s.bosscher@student.tudelft.nl>
7319 * expr.c (check_restricted): Fix error message.
7320 * symbol.c (free_st_labels): Plug memleak.
7322 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
7324 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
7325 reduce_binary_aa, reduce_binary, eval_intrinsic,
7326 eval_intrinsic_f2): Use typesafe prototypes for eval functions.
7327 * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
7328 for typesafe intrinsics helper functions.
7329 (g95_intrinsic_sym): Use them.
7330 * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
7331 add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
7332 add_sym_5, add_conv, resolve_intrinsic, do_simplify,
7333 check_specific, g95_intrinsic_func_interface,
7334 g95_intrinsic_sub_interface): Adjust all calls to intrinsics
7336 * trans-decl.c (g95_get_extern_function_decl): Likewise.
7337 * Make-lang.in: Don't disable warnings for strict prototypes
7338 any longer, everything is typesafe now.
7340 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
7342 * bbt.c (duplicate_node): Make static.
7343 * module.c (module_name): Make static.
7344 * scanner.c (include_dirs): Make static.
7346 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
7348 Hard coded _gfor_'s should not show up anymore.
7349 * g95.h (PREFIX): New macro.
7350 * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
7352 (g95_resolve_random_number): Likewise.
7353 * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
7354 * trans-io.c: Remove 'prefix' macro. Replace all uses with
7355 the new PREFIX macro from g95.h.
7357 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
7359 The troubles of forking... Andy implemented this just now too.
7360 Let's stick to that and keep the trees close.
7361 * g95.h (g95_st_label): 'format' member is now a g95_expr.
7362 * io.c: Revert previous changes.
7363 (g95_match_format): Match the format string as a character
7365 * match.h (g95_statement_label): Declare external.
7366 * parse.c: Revert previous changes.
7367 * symbol.c (g95_free_st_label): Free a g95_expr instead
7369 * trans-io.c: Revert previous changes.
7370 (build_dt): Use set_string to set the format string.
7372 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
7374 * io.c (format_string): Make non-static.
7375 (g95_match_format): Remember the format string.
7376 (terminate_io): Add I/O termination for empty I/O lists.
7377 * match.h: Declare external format_string.
7378 * parse.c (check_statement_label): Attack the format string
7379 to a format label for FORMAT statements.
7380 * trans-io.c (g95_add_field): Define prefix macro. Replace
7381 all uses of PREFIX define with a use of this macro.
7382 (build_dt): Implement formatted I/O for format labels.
7384 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
7386 * lang-options.h: Kill "-std=F".
7387 * options.c: Remove unimplemented "-std=F". Modify
7389 * misc.c (g95_terminal_width): New function.
7390 * error.c (g95_error_init_1): Use g95_terminal_width.
7391 * g95.h: Add prototype for g95_terminal_width, remove
7394 2003-01-19 Steven Bosscher <s.bosscher@student.tudelft.nl>
7396 * Make-lang.in: Fix typo.
7398 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
7400 * g95.h (struct g95_case): Remove unused cruft, new member
7401 'where' to keep track of the locus of the default case.
7402 * match.c (g95_match_case): Add locus to the current case.
7403 (match_case_selector): Likewise.
7404 * parse.c (parse_select_block): Move semantics check for
7405 multiple DEFAULT cases out of here to...
7406 * resolve.c (check_case_overlap): ...here. Return sooner
7408 (check_case_expr): Take two g95_cases now, use to sure the
7409 expression kinds are the same.
7410 (resolve_select): Cleanup.
7412 2003-01-18 Paul Brook <paul@nowt.org>
7414 * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
7415 * trans-decl.c (g95_set_symbol_decl): Handle non-array result
7417 (g95_get_extern_function_decl): Put decls in the correct context.
7419 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
7421 * trans-io.c: Port changes from Andy to set ERR flag.
7423 2003-01-17 Paul Brook <paul@nowt.org>
7425 * trans-array.c: Add various comments.
7426 (g95_ss_terminator): Declare as const.
7427 (g95_walk_expr): Remove first parameter and update all callers.
7428 (g95_walk_op_expr): Initialize scalar SS properly.
7429 * trans-array.h (g95_walk_expr): Update prototype.
7430 * trans-expr.c: Update for new g95_walk_expr.
7431 * trans-intrinsic.c: Ditto.
7432 * trans-io.c: Ditto.
7433 * trans.h: Various comments for SS chains.
7435 2003-01-17 Paul Brook <paul@nowt.org>
7437 * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
7439 * intrinsic.c (add_functions): Use them.
7440 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
7441 * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
7443 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
7445 Fallout of a small merge conflict:
7446 * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
7448 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
7450 * initrinsic.c: New add_sym_* functions for strong typing.
7451 (add_conv): Make prototype strict.
7452 * dump-parse-tree.c, dependency.c: Include config.h
7453 * resolve.c, trans-io.c: Fix typos.
7455 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
7457 * dump-parse-tree.c (g95_show_code_node): Show the
7458 condition for a computed GOTO that was transformed
7459 to a SELECT CASE construct.
7460 * resolve.c (check_case_overlap): Revert previous switch
7461 to treaps, it was too slow and didn't catch all trouble.
7462 (resolve_symbol): Be more flexible about module procedures.
7463 * symbol.c (check_conflict): Point to relevant section in
7464 the standard for dubious conflict. Allow procedure
7465 dummy arguments to be optional again.
7466 * trans-io (add_field): Rename to g95_add_field. Change
7468 * trans-stmt (trans_select): Handle unbounded cases for
7469 integer SELECT CASE constructs. Fix/add more comment.
7471 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
7473 * g95.h: Uses GCC's function attribute macros.
7474 * error.c, module.c, parse.c, g95.h: More function attributes.
7476 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
7478 * trans-decl.c (get_label_decl): Use TREE_LINENO instead
7479 of DECL_SOURCE_LINE, and TREE_FILENAME instead of
7482 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
7484 * f95-lang.c (pushdecl): Use TREE_LINENO instead of
7486 * trans.c (g95_trans_code): Use annotate_all_with_file_line
7487 instead of nowdead wrap_all_with_wfl.
7489 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
7491 * parse.c (g95_parse_file): In verbose mode, dump the parse tree
7492 before generating code, so we can still see it even if the code
7493 generation phase dies.
7495 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
7497 * decl.c (build_sym): Split out initialization expression parts...
7498 (add_init_expr_to_sym): ...to here.
7499 (variable_decl): Add the symbol following an attribute list to the
7500 symbol tree before parsing the optional initialization expression
7501 if the symbol is not of a derived type.
7502 * primary.c (g95_match_rvalue): Don't assume a symbol always has
7503 a value if it is a PARAMETER.
7505 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
7507 * misc.c: Don't #include <mcheck.h>
7508 * module.c: Ditto. Kill uses of mtrace, muntrace. If there
7509 ever was a glibc bug, then either this was never reported to
7510 glibc people, or it has been fixed for so long that there's
7511 no information you can find about it, anywhere.
7513 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
7516 * module.c (attr_bits, bt_types, array_spec_types):
7517 Switch 'const' and 'static'.
7518 * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
7520 GNU'ify source code:
7521 * trans-io.c: Numerous fixes, one fixed warning and a few
7522 TODO markers so that we don't forget about them.
7524 2003-01-13 Paul Brook <paul@nowt.org>
7526 * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
7527 * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
7529 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
7530 * match.c (g95_match_stop): Fix dumb == -> != error.
7532 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
7534 * dump-parse-tree.c (show_indent): Add line breaks. This
7535 whole dumping process needs cleanups.
7536 * f95-lang.c (g95_mark_addressable): Fix prototype to match
7537 the langhook. Fix 'return's accordingly.
7538 * g95-support.h: Adjust prototype.
7539 * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
7540 * lang-options.h: Add '-fsyntax-only'.
7541 * options.c (g95_init_options): Init 'no_backend'.
7542 (g95_parse_arg): Deal with '-fsyntax-only'.
7543 * parse.c (g95_parse_file): Do not generate code if 'no_backend'
7546 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
7548 * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
7549 arguments. Also make sure that if a symbol is marked INTRINSIC,
7550 an intrinsic with the symbol's name actually exists.
7551 (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
7552 Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
7553 ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
7555 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
7557 * resolve.c (resolve_contained_functions): Fix condition, don't
7558 throw internal_error if a child namespace has no name. Apparently
7559 this can be the case?
7561 2003-01-11 Paul Brook <paul@nowt.org>
7563 Port changes from Andy's tree:
7564 * g95.h (g95_code): Add stop_code.
7565 * match.c (g95_match_stop): Detter syntax checking.
7566 * resolve.c (resolve_generic_f0): Return match type.
7567 (resolve_generic_f): Remove dead/duplicated code.
7568 (resolve_specific_f): Ditto.
7569 * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
7570 * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
7571 * trans-stmt.c (g95_trans_stop): Handle new STOP format.
7573 2003-01-11 Paul Brook <paul@nowt.org>
7575 * trans-array.c: Various documentation/comment changes.
7576 * trans-stmt.c: Ditto.
7579 2003-01-10 Paul Brook <paul@nowt.org>
7581 * options.c/h: Add -fdump-parse-tree as alias of -v.
7583 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7585 * dump-parse-tree.c (g95_show_namespace): Fixed another
7586 typo. Sorry, it's Friday...
7588 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7591 * trans-array.c, trans-array.h, trans.c, trans-const.c,
7592 trans-const.h, trans-decl.c, trans-expr.c, trans.h
7593 trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
7594 trans-types.c: Fix bogus copyright years, add 2003.
7595 * trans-types.h: Give copyright header.
7597 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7599 * dump-parse-tree.c (g95_show_namespace): Fixed typo.
7600 * expr.c, options.c, scanner.c: Add some more 'const' markers.
7601 * intrinsic.c: Some constant strings moved to read-only memory.
7602 * io.c (format_asterisk): Move to...
7605 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7607 * dump-parse-tree.c (g95_show_namespace): Dump implicit
7608 types for ranges instead of per-letter. Indent the
7609 'CONTAINS' just like everything else.
7610 * resolve.c (resolve_contained_functions): Clarify comment.
7611 Explain non-obvious conditional expression. Improve
7612 diagnostics if tyoe cannot be resolved.
7613 Port semi-fix from Andy's tree:
7614 (was_declared): Move up before first use.
7615 (generic_sym, specific_sym): New functions. Code moved
7616 out if procedure_kind.
7617 (procedure_kind): Simplify using new functions.
7618 (resolve_generic_f): Make sure the functions we find in
7619 a parent namespace is generic.
7620 (resolve_specific_f): Ditto for specific functions.
7622 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7624 * trans-stmt.c, trans.c: Fix some code style issues. Add
7625 some more comment (but still not enough!).
7627 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7629 * symbol.c (flavors, procedures, intents, acces_types,
7630 access_types, ifsrc_types): Make const.
7631 * misc.c (g95_string2code): Make 'm' param 'const'.
7632 * module.c (find_enum, write_atom, mio_name): Make
7634 (attr_bits, bt_types, array_spec_types, array_ref_types,
7635 ref_types, expr_types): Make const.
7636 * g95.h: Adjust external decls.
7638 2003-01-09 Paul Brook <paul@nowt.org>
7640 * Testsuite: Add a load of new cases.
7642 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
7644 * Make-file.in: Add dependency on back end header files;
7645 a parallel build should work now.
7646 * f95-lang-c (lang_identifier): Remove bogus comment.
7647 (g95_be_parse_file): Fix prototype.
7648 (g95_init): Make static.
7649 (g95_finish): Make static.
7650 * error.c (g95_syntax_error): Kill. Make define in...
7651 * g95.h (g95_syntax_error): Define.
7652 (g95.options): Make 'source' member 'const'.
7653 * interface.c (g95_match_interface): Explain
7654 hard-to-read condition.
7655 (g95_match_end_interface): Ditto.
7656 * trans_const.c (g95_build_string_const): Make 's' parameter
7658 * trans_const.h: Adjust protoype accordingly.
7659 * trans-decl.c: Include tree-dump.h
7660 (g95_generate_function_code): Build fixes for recent changes
7661 in the tree-ssa branch.
7663 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
7665 * format.c: Kill, move code from here...
7667 * Make-lang.in: Adjust.
7670 * BUGS: Mention where to submit bugs. Move old content...
7671 * TODO: ...to here. New file.
7673 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
7674 Fix most warnings, and suppress the ones we can't fix for now.
7675 * Make-lang.in: Suppress warnings about bad proto's in g95.h,
7676 these warnings just clutter the screen and there's not much
7677 we can do about them for now anyway.
7678 * check.c, iresolve.c: Mark unused function parameters.
7679 * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
7680 they should be resolved before they get here.
7681 * error.c: Remove unused FILE *status_out.
7682 * f95-lang.c (g95_init): Remove bogus cast.
7683 * Many files: Make things 'const' where required.
7684 * g95.h: Fix prototypes for all modified functions above.
7685 (g95_options): Remove 'object' member.
7687 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
7689 * Make-file.in: Cleanup bogus targets. Add more comment.
7690 * lang-options.h: New option '-w'.
7691 * g95.h: add no_options field to struct g95_options.
7692 * options.c (g95_init_options): Default no_warnings to off.
7693 (g95_parse_arg): Recognise the '-w' switch and its alias,
7695 * error.c (g95_warning, g95_warning_now): Don't emit warning if
7696 no_warning option is set.
7697 * iresolve.c (g95_resolve_shape): Fix warning.
7699 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
7701 * primary.c (g95_next_string_char): Rename next_string_char, and
7702 make static. Adjust callers accordingly.
7703 * resolve.c (resolve_generic_f0): Return try, not match. Adjust
7704 callers accordingly.
7705 * g95.h: Split out all g95_match* functions to...
7706 * match.h: ...here. New file.
7707 * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
7708 matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
7710 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
7712 * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
7713 g95_merge_new_implicit): New functions.
7714 (g95_match_implicit_none, g95_match_implicit): Move from here...
7715 * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
7716 Modify to use the new functions in symbol.c.
7717 * g95.h: Add and move prototypes.
7719 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
7721 * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
7722 node compare function.
7723 (g95_insert_bbt): Likewise.
7724 (g95_insert_bbt_with_overlap): Likewise.
7725 (g95_delete_bbt): Likewise.
7726 (delete_treap): Likewise. Also fix a potential bug when calling it.
7727 * module.c (compare_pointers): Change proto to compare_fn.
7728 (compare_integers): Likewise.
7729 (compare_true_names): Likewise.
7730 (find_true_name): Adjust call to compare_true_names to match proto.
7731 (require_atom, write_atom, mio_name): Fix 'const' warnings.
7732 (init_pi_tree): Make compare a compare_fn instead of (int *).
7733 * resolve.c (compare_cases): Change proto to compare_fn.
7734 * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
7735 it static, and rename to compare_symtree.
7736 (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
7738 * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
7739 of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
7741 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
7742 * Make-lang.in: Fix spaces/tabs issues from previous patch.
7743 * patch.options: Blow away Paul's checkin mistake :-)
7744 * io.c (terminate_io): Fix memory leak (Arnaud).
7746 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
7748 * Make-lang.in: Teach about building DVI, info manual.
7749 * g95.texi: New file.
7751 2003-01-02 Paul Brook <paul@nowt.org>
7753 * trans-array.c (g95_reverse_ss): Make static and don't use.
7754 (g95_conv_ss_descriptor): Don't use g95_loopinfo
7755 (g95_conv_array_parameters): Modify for pointer assignments.
7756 (g95_walk_subexpr): New function.
7757 (g95_walk_expr*): Use it.
7758 * trans-array.h (g95_reverse_ss): Remove prototype.
7759 * trans-expr.c (g95_trans_pointer_assign): Implement.
7760 (Many): Set se.want_pointer before calling g95_conv_array_parameter.
7761 * trans-intrinsic.c: Sync with scalarizer changes.
7762 * trans-io.c: Ditto.
7764 2002-12-29 Paul Brook <paul@nowt.org>
7766 * trans-array.c: Document calling convention for arrays.
7768 2002-12-19 Paul Brook <paul@nowt.org>
7770 * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
7771 assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
7772 optional parameters for some intrinsics.
7773 (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
7774 * trans-expr.c (g95_conv_function_call): Pass NULL for absent
7775 optional parameters.
7776 * trans.h (g95_se): Add ignore_optional flag.
7778 2002-12-15 Paul Brook <paul@nowt.org>
7780 * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
7781 * trans-decl.c (g95_generate_function_code): Use TDI_original.
7783 2002-12-14 Paul Brook <paul@nowt.org>
7785 * trans-stmt.c (g95_trans_call): Use resolved symbol name.
7787 2002-12-12 Paul Brook <paul@nowt.org>
7789 * trans-array.c (g95_trans_array_constructor_subarray): Fully
7790 initialize the scalarizer.
7791 (various): Update to new format of g95_expr->value.constructor.
7793 2002-12-08 Paul Brook <paul@nowt.org>
7795 * trans-array.c (g95_put_offset_into_var): New function.
7796 (g95_trans_array_constructor_subarray): New function.
7797 (g95_trans_array_constructor_value): Use it.
7798 (g95_array_cons_size): Don't abort() on array components.
7800 2002-12-08 Paul Brook <paul@nowt.org>
7802 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
7803 * support.c: Update #includes.
7804 (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
7805 * trans-array.c: Update #includes.
7807 * trans-const.c: Ditto.
7808 * trans-io.c: Ditto.
7809 * trans-types.c: Ditto.
7810 (g95_init_types): Set size_type_node.
7811 * trans-decl.c: Update #includes.
7812 (gfor_fndecl_adjust{l,r}): Declare and initialize.
7813 * trans-stmt.c: Update #includes.
7814 (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
7815 (g95_trans_select): Fix check for unbounded ranges.
7816 * trans-expr.c: Update #includes.
7817 (g95_conv_string_tmp): New function.
7818 (g95_conv_concat_op): Use it.
7819 * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
7820 * Trans-intrisic.c: Update #includes.
7821 (g95_conv_intrinsic_strcmp): New function.
7822 (g95_conv_intrinsic_adjust): Ditto.
7823 (g95_conv_intrinsic_function: Use them.
7825 2002-11-30 Paul Brook <paul@nowt.org>
7827 * trans-array.c (g95_walk_function_expr): Handle non-array return by
7829 * trans-dec.c (g95_build_function_decl): Handle character return
7831 (g95_get_fake_result_decl): Ditto.
7832 (g95_trans_deferred_vars): Ditto.
7833 * trans-expr.c (g95_conv_function_call): Ditto.
7834 (g95_trans_arrayfunc_assign) Limit to array valued functions.
7835 * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
7836 (g95_conv_intrinsic_function): Use it.
7837 * trans-types.c (g95_sym_type): Handle functions returning strings.
7838 (g95_return_by_reference): Ditto.
7839 (g95_get_function_type): Ditto.
7841 2002-11-18 Paul Brook <paul@nowt.org>
7843 * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
7844 requires a temporary.
7845 (g95_trans_select): Handle computed gotos.
7846 * trans-types.c (g95_build_array_type): Warn about non-functional
7847 assumed shape arrays.
7848 * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
7850 * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
7851 (g95_conv_intrinsic_int): New function.
7852 (g95_conv_intrinsic_mod): New function.
7853 (g95_conv_intrinsic_ichar): New function.
7854 (g95_conv_intrinsic_function): Use them.
7855 (g95_conv_intrinsic_dim): Use g95_evaluate_now.
7857 2002-11-17 Toon Moene <toon@moene.indiv.nluug.nl>
7859 * trans-types.c (g95_build_array_type): Assumed
7860 sized arrays can have rank > 1.
7861 * trans.c (g95_trans_code): Remove erroneous
7862 warning about CONTINUE.
7863 * trans-expr.c (g95_conv_variable): Remove
7866 2002-11-15 Paul Brook <paul@nowt.org>
7868 * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
7870 2002-10-31 Paul Brook <paul@nowt.org>
7872 * f95-tree.c: Remove tree copying stuff that's now in gimple.c
7873 * trans-expr.c (g95_conv_component_ref): Handle character string
7875 (g95_conv_string_parameter): Ditto.
7876 * trans-types.c (g95_get_derived_type): Add length decl to caracter
7879 2002-10-10 Paul Brook <paul@nowt.org>
7881 * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
7882 * trans-expr.c (g95_conv_function_call): Remove unreliable return value
7884 * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
7885 (g95_conv_intrinsic_function): Handle size and shape intrinsics.
7886 (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
7887 * trans-types.c (pvoid_type_node): Declare and initialize.
7888 * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
7889 (g95_array_allocate): Fix when base==data.
7890 (g95_conv_array_parameter): Correctly handle reduced rank sections.
7891 * trans-io.c (g95_trans_write): Correctly handle string modifiers.
7893 2002-10-09 Paul Brook <paul@nowt.org>
7895 * (g95_conv_expr_reference): Handle character strings correctly.
7897 2002-10-07 Paul Brook <paul@nowt.org>
7899 (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
7901 * trans-array.c (g95_build_array_initializer): Remove.
7902 (g95_conv_array_initializer): New Function.
7903 (g95_trans_auto_arry_allocation): Cleanup.
7904 (g95_trans_init_character_array): Remove.
7905 * g95spec.c: Link in libgforbegin.
7906 * trans.c (g95_generate_code): Rename main function to MAIN__.
7907 (g95_create_var): New function.
7908 (g95_create_var_np): New function.
7909 (g95_evaluate_now): New function.
7910 (g95_start_block): New function.
7911 (g95_finish_block): New function.
7912 (g95_add_expr_to_block): New function.
7913 (g95_add_block_to_block): New function.
7914 * trans-expr.c (g95_conv_componen_ref): New function.
7915 * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
7916 (F95_OBJS): Add dependency.o.
7917 * f95-lang.c (g95_is_simple_stmt): Remove.
7918 * f95-tree.c (mark_not_simple): New function.
7919 (unshare_all_trees): New function.
7920 (create_tmp_var, create_tmp_alias_var): Remove.
7921 * support.c (declare_tmp_vars, tree_last_decl): Remove.
7922 * trans*: Convert to new IR using GENERIC trees. Don't bother about
7923 SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
7925 2002-10-01 Paul Brook <paul@nowt.org>
7927 * trans-array.c: Add support for descriptorless arrays.
7928 (g95_conv_array_data): New function.
7929 (g95_conv_array_base): New function.
7930 * trans-array.h: Declare these here.
7931 * trans-decl.c(g95_create_mopdule_variable): Perform variable
7932 initialization and creation here.
7933 (g95_create_module_vars): Instead of here.
7934 * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
7935 * trans-intrinsic.c: Ditto.
7936 * trans-types.c (g95_is_nodesc_array): New function.
7937 (g95_get_nodesc_array_type): New function.
7938 (g95_sym_type, g95_get_derived_type): Use them.
7939 * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
7941 2002-09-28 Paul Brook <paul@nowt.org>
7943 * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
7944 * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
7947 2002-09-24 Paul Brook <paul@nowt.org>
7949 * f95-lang.c (listify): Remove declaration.
7950 (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
7952 * f95-tree.c (get_name): New function.
7953 * trans.c (module_namespace): Remove.
7954 * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
7955 * trans-types.c: Ditto.
7957 2002-09-19 Paul Brook <paul@nowt.org>
7959 * trans-array.c (g95_get_array_cons_size): New Function.
7960 (g95_con_ss_startstride): Handle Array constructors.
7961 (g95_conv_loop_setup): Ditto.
7962 (g95_conv_array_parameter): Ditto.
7963 * tras-decl.c (g95_finish_var_decl): Make initializes variables
7966 2002-09-19 Paul Brook <paul@nowt.org>
7968 * trans.c (g95_simple_fold_tmp): Detect variables inside
7970 * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
7972 2002-09-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
7974 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
7976 2002-09-14 Paul Brook <paul@nowt.org>
7978 * trans.c (g95_create_module_variable): Move to trans-decl.c.
7979 * trans-const.c (g95_conv_string_init): New Function.
7980 * trans-const.h: Declare it.
7981 * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
7982 variables. Don't bail on intrinsic symbols.
7983 (get_extern_function_decl): Handle specific intrinsic functions.
7984 * trans-types.c (g95_sym_type): Dummy functions don't return
7986 * trans-array.c (g95_build_array_initializer): New Function.
7987 (g95_trans_auto_array_allocation): Build initializer for static decls.
7988 Don't use mpz_addmul, it's GMP4 only.
7990 2002-09-12 Paul Brook <paul@nowt.org>
7992 * trans-decl.c (g95_generate_code): Fix thinko with return variable.
7993 (g95_get_extern_function_decl, g95_build_function_decl): Mangle
7994 assembler names for module procedures.
7996 2002-09-11 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
7998 * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
8001 2002-09-10 Paul Brook <paul@nowt.org>
8003 * trans-array.c: Change format of G95_SS_TEMP strictures.
8004 (g95_check_fncall_dependancy): New function.
8005 (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
8007 * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
8009 (g95_build_function_decl): Don't assume result arrays are packed.
8010 (g95_trans-deferred-vars): Handle array result variables.
8011 (g95_generate_fuction_code): Clear saved_function_decls.
8012 * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
8014 (g95_trans_arrayfunc_assign): New function.
8015 (g95_trans_assignment): Use it.
8016 * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
8017 (g95_se): Add direct_byref.
8018 * trans-types.c: Use sym->result rather than sym where appropriate.
8019 * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
8020 Update other functions to use this.
8021 (g95_is_intrinsic_libcall): New function.
8022 (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
8023 (g95_walk_intrinsic_function): Ditto.
8025 2002-09-08 Paul Brook <paul@nowt.org>
8027 * trans-types.c: Change rank field to dtype field in array descriptor.
8028 * trans-array.c: Implement filling of dtype array descriptor field.
8029 * trans-intrinsic.c: Fix broken LEN intrinsic.
8031 2002-09-07 Paul Brook <paul@nowt.org>
8033 * trans-intrinsic.c: Remove outdated todo intrinsic list.
8034 (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
8035 (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
8037 2002-09-06 Paul Brook <paul@nowt.org>
8039 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
8040 (gt-f95-trans-types.h): Add dependancy information.
8041 * config-lang.in (gtfiles): Add trans-types.c
8042 * f95-lang.c (g95_be_parse_file): Pass error and warning counts
8043 back to top-level code.
8044 * trans-array.c, trans-types.c: Change format of array descriptor.
8045 (g95_conv_descriptor_dimension): New function.
8046 * trans-types.h (g95_conv_descriptor_rank): define.
8047 * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
8050 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
8052 * trans-array.c, trans-types.c: Add rank information to descriptor.
8054 2002-09-06 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
8056 * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
8058 2002-09-04 Paul Brook <paul@nowt.org>
8060 * f95-lang.c (g95_create_decls): New function.
8061 (g95_init): Move initialization of external decls to above, and call
8062 from g95_be_parse_file.
8063 * trans.c (g95_finish_stmt): Don't amputate the decl chain.
8064 * trans-types.c (g95_init_types): Always name integer and char types.
8065 (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
8067 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
8069 * Make-lang.in: Add options.c to F95_PARSER_OBJS
8071 2002-09-02 Paul Brook <paul@nowt.org>
8073 * g95_generate_code: Clear the attr for __fortran_main.
8074 * trans-types.c (g95_finish_type): New function.
8075 * g95_init_io_state_type: Use g95_finish_type.
8076 * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
8078 2002-09-01 Paul Brook <paul@nowt.org>
8080 * README.backend: Warn about the dangers of extra config.h files.
8081 Remove obsolete libgfor stuff.
8082 * config-lang.in: Add target-libgfor dependancy.
8083 * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
8085 2002-09-01 Toon Moene <toon@moene.indiv.nluug.nl>
8087 * g95_conv_mpz_to_tree: Free storage pointed to by q,
8090 2002-08-30 Paul Brook <paul@nowt.org>
8092 * trans-intrinsic.c (g95_conv_intrinsic_function,
8093 g95_walk_intrinsic_function): Added ANY and ALL.
8094 (g95_conv_intrinsic_anyall): New function.
8095 * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in