1 2005-10-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
4 * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long
5 double builtin function.
6 (gfc_init_builtin_functions): Add mfunc_longdouble,
7 mfunc_clongdouble and func_clongdouble_longdouble trees. Build
8 them for round, trunc, cabs, copysign and pow functions.
9 * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add
10 case for kind 10 and 16.
11 * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16,
12 exponent10 and exponent16.
13 (gfc_build_intrinsic_function_decls): Build nodes for int16,
14 real10, real16, complex10 and complex16 types. Build all possible
15 combinations for function _gfortran_pow_?n_?n. Build function
16 calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16.
17 * trans-expr.c (gfc_conv_power_op): Add case for integer(16),
18 real(10) and real(16).
19 * trans-intrinsic.c: Add suppport for long double builtin
20 functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION
22 (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and
24 (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl
25 and real16_decl in library functions.
26 (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex
28 (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16)
30 (gfc_conv_intrinsic_sign): Likewise.
31 (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind.
32 * trans-types.c (gfc_get_int_type, gfc_get_real_type,
33 gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in
34 the case of kinds not available.
35 * trans.h: Declare trees for cpowl10, cpowl16, ishftc16,
36 exponent10 and exponent16.
38 2005-10-01 Paul Thomas <pault@gcc.gnu.org>
47 * gfortran.h: Prototype for gfc_add_in_equivalence.
48 * match.c (gfc_match_equivalence): Make a structure component
49 an explicit,rather than a syntax, error in an equivalence
50 group. Call gfc_add_in_equivalence to add the constraints
51 imposed in check_conflict.
52 * resolve.c (resolve_symbol): Add constraints: No public
53 structures with private-type components and no public
54 procedures with private-type dummy arguments.
55 (resolve_equivalence_derived): Add constraint that prevents
56 a structure equivalence member from having a default
58 (sequence_type): New static function to determine whether an
59 object is default numeric, default character, non-default
60 or mixed sequence. Add corresponding enum typespec.
61 (resolve_equivalence): Add constraints to equivalence groups
62 or their members: No more than one initialized member and
63 that different types are not equivalenced for std=f95. All
64 the simple constraints have been moved to check_conflict.
65 * symbol.c (check_conflict): Simple equivalence constraints
66 added, including those removed from resolve_symbol.
67 (gfc_add_in_equivalence): New function to interface calls
68 match_equivalence to check_conflict.
70 2005-09-27 Jakub Jelinek <jakub@redhat.com>
73 * trans-common.c (build_equiv_decl): Add IS_SAVED argument.
74 If it is true, set TREE_STATIC on the decl.
75 (create_common): If any symbol in equivalence has SAVE attribute,
76 pass true as last argument to build_equiv_decl.
78 2005-09-24 Janne Blomqvist <jblomqvi@cc.hut.fi>
80 * trans-io.c (gfc_build_io_library_fndecls): Add entry
81 iocall_x_array for transfer_array.
82 (transfer_array_desc): New function.
83 (gfc_trans_transfer): Add code to call transfer_array_desc.
85 2005-09-26 Jakub Jelinek <jakub@redhat.com>
88 * symbol.c (gfc_is_var_automatic): Return true if character length
89 is non-constant rather than constant.
90 * resolve.c (gfc_resolve): Don't handle !gfc_option.flag_automatic
92 * options.c (gfc_post_options): Set gfc_option.flag_max_stack_var_size
93 to 0 for -fno-automatic.
95 2005-09-23 Paul Thomas <pault@gcc.gnu.org>
98 * module.c (mio_component_ref): Return if the symbol is NULL
99 and wait for another iteration during module reads.
100 (mio_symtree_ref): Suppress the writing of contained symbols,
101 when a symbol is available in the main namespace.
102 (read_module): Restrict scope of special treatment of contained
103 symbols to variables only and suppress redundant call to
106 2005-09-22 Steven G. Kargl <kargls@comcast.net>
109 * interface.c (check_interface1): Fix NULL dereference.
111 2005-09-22 Erik Edelmann <erik.edelmann@iki.fi>
114 * resolve.c (derived_inaccessible): New function.
115 (resolve_transfer): Use it to check for private
118 2005-09-22 Steven G. Kargl <kargls@comcast.net>
121 * intrinsic.c (add_function): Add IMAG, IMAGPART, and REALPART
123 * intrinsic.h: Prototypes for gfc_simplify_realpart and
124 gfc_resolve_realpart.
125 * intrinsic.texi: Document intrinsic procedures.
126 * simplify.c (gfc_simplify_realpart): New function.
127 * irseolve.c (gfc_resolve_realpart): New function.
129 2005-09-21 Erik Edelmann <erik.edelmann@iki.fi>
132 * trans-stmt.c (gfc_trans_deallocate): Check if the
133 object to be deallocated is an array by looking at
134 expr->rank instead of expr->symtree->n.sym->attr.dimension.
136 2005-09-20 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
139 * io.c (resolve_tag): Don't allow non-CHARACTER constants as formats.
140 (match_io): Fix usage of gfc_find_symbol.
142 2005-09-20 Jakub Jelinek <jakub@redhat.com>
145 * primary.c (match_actual_arg): Handle ENTRY the same way
148 2005-09-18 Francois-Xavier Coudert <coudert@clipper.ens.fr>
150 * Make-lang.in: Make check-fortran alias for check-gfortran.
152 2005-09-18 Andreas Jaeger <aj@suse.de>
154 * module.c (read_module): Add missed line from last patch.
156 2005-09-18 Erik Edelmann <erik.edelmann@iki.fi>
159 * resolve.c (resolve_symbol): Don't assign default
160 initializer to pointers.
162 2005-09-18 Paul Thomas <pault@gcc.gnu.org>
165 * module.c (read_module): Give symbols from module procedures
166 different true_name entries to those from the module proper.
168 2005-09-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
171 * arith.c (gfc_arith_error): Add translation support for error
173 * array.c (gfc_match_array_ref): Likewise.
174 (gfc_match_array_spec): Likewise.
175 * check.c (must_be): Add msgid convention to third argument.
176 (same_type_check): Add translation support for error message.
177 (rank_check): Likewise.
178 (kind_value_check): Likewise.
179 (gfc_check_associated): Correct typo.
180 (gfc_check_reshape): Add translation support for error message.
181 (gfc_check_spread): Likewise.
182 * error.c (error_printf): Add nocmsgid convention to argument.
183 (gfc_warning, gfc_notify_std, gfc_warning_now, gfc_warning_check)
184 (gfc_error, gfc_error_now): Likewise.
185 (gfc_status): Add cmsgid convention to argument.
186 * expr.c (gfc_extract_int): Add translation support for error
188 (gfc_check_conformance): Add msgid convention to argument.
189 (gfc_check_pointer_assign): Correct tabbing.
190 * gfortran.h: Include intl.h header. Remove prototype for gfc_article.
191 * gfortranspec.c: Include intl.h header.
192 (lang_specific_driver): Add translation support for --version.
193 * io.c (check_format): Add translation support for error message.
194 (format_item_1): Likewise.
195 (data_desc): Likewise.
196 * matchexp.c: Likewise.
197 * misc.c (gfc_article): Remove function.
198 * module.c (bad_module): Use msgid convention. Add translation support
200 (require_atom): Add translation support for error messages.
201 * parse.c (gfc_ascii_statement): Likewise.
202 (gfc_state_name): Likewise.
203 * primary.c (match_boz_constant): Reorganise error messages for
205 * resolve.c (resolve_entries): Likewise.
206 (resolve_operator): Add translation support for error messages.
207 (gfc_resolve_expr): Use msgid convention. Reorganise error messages
209 (resolve_symbol): Add translation support for error messages.
210 * symbol.c (gfc_add_procedure): Remove use of gfc_article function.
211 * trans-const.c (gfc_build_string_const): Use msgid convention.
213 2005-09-16 Paul Brook <paul@codesourcery.com>
216 * dependency.c (transform_sections): Divide by correct value.
219 2005-09-14 Paul Thomas <pault@gcc.gnu.org>
221 PR fortran/21875 Internal Unit Array I/O, NIST
222 * fortran/trans-io.c (gfc_build_io_library_fndecls): Add field for
223 array descriptor to IOPARM structure.
224 * fortran/trans-io.c (set_internal_unit): New function to generate code
225 to store the character (array) and the character length for an internal
227 * fortran/trans-io (build_dt): Use the new function set_internal_unit.
229 2005-09-14 Paul Thomas <pault@gcc.gnu.org>
232 * trans-array.c (gfc_trans_dummy_array_bias): correct the typo
233 which uses dim[i].upper for lbound, rather than dim[i].lower.
235 2005-09-13 Erik Edelmann <erik.edelmann@iki.fi>
238 * trans-expr.c (gfc_trans_arrayfunc_assign): Check value
239 of attr.elemental for specific function instead of generic name.
241 2005-09-13 Richard Sandiford <richard@codesourcery.com>
244 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Move initialization
245 of argse. Remove now-redundant want_pointer assignment.
246 * trans-array.c (gfc_conv_expr_descriptor): When not assigning to
247 a pointer, keep the original bounds of a full array reference.
249 2005-09-13 Richard Sandiford <richard@codesourcery.com>
252 * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift)
253 (gfc_resolve_pack, gfc_resolve_reshape, gfc_resolve_spread)
254 (gfc_resolve_transpose, gfc_resolve_unpack): Add "_char" to the name
255 for character-based operations.
256 (gfc_resolve_pack): Remove ATTRIBUTE_UNUSED from array argument.
257 (gfc_resolve_unpack): Copy the whole typespec from the vector.
258 * trans-array.c (gfc_conv_expr_descriptor): In the EXPR_FUNCTION
259 case, get the string length from the scalarization state.
261 2005-09-14 Francois-Xavier Coudert <coudert@clipper.ens.fr>
263 * Make-lang.in: Change targets prefixes from f95 to fortran.
264 * config-lang.in: Change language name to "fortran".
265 * lang.opt: Change language name to "fortran".
266 * options.c: Change CL_F95 to CL_Fortran.
268 2005-09-09 Thomas Koenig <Thomas.Koenig@online.de>
270 gfortran.texi: Document IOSTAT= specifier.
272 2005-09-09 Thomas Koenig <Thomas.Koenig@online.de>
274 * gfortran.h: Add iomsg to gfc_open, gfc_close, gfc_filepos,
275 gfc_inquire and gfc_dt.
276 * dump-parse-tree.c (gfc_show_code_node): Add iomsg
277 for open, close, file positioning, inquire and namelist.
278 * io.c (io_tag): Add tag_iomsg.
279 (resolve_tag): Add standards warning for iomsg.
280 (match_open_element): Add iomsg.
281 (gfc_free_open): Add iomsg.
282 (gfc_resolve_open): Add iomsg.
283 (gfc_free_close): Add iomsg.
284 (match_close_element): Add iomsg.
285 (gfc_resolve_close): Add iomsg.
286 (gfc_free_filepos): Add iomsg.
287 (match_file_element): Add iomsg.
288 (gfc_resolve_filepos): Add iostat and iomsg.
289 (match-dt_element): Add iomsg.
290 (gfc_free_dt): Add iomsg.
291 (gfc_resolve_dt): Add iomsg.
292 (gfc_free_inquire): Add iomsg.
293 (match_inquire_element): Add iomsg.
294 (gfc_resolve_inquire): Add iomsg.
295 * trans_io.c: Add ioparm_iomsg and ioparm_iomsg_len.
296 (gfc_build_io_library_fndecls): Add iomsg as last field.
297 (gfc_trans_open): Add iomsg.
298 (gfc_trans_close): Add iomsg.
299 (build_fileos): Call set_string for iomsg.
300 (gfc_trans_inquire): Add iomsg.
301 (build_dt): Add iomsg.
303 2005-09-09 Richard Sandiford <richard@codesourcery.com>
305 * match.h (gfc_match_equiv_variable): Declare.
307 2005-09-09 Richard Sandiford <richard@codesourcery.com>
310 * Makefile.in (fortran/trans-expr.o): Depend on dependency.h.
311 * dependency.h (gfc_ref_needs_temporary_p): Declare.
312 * dependency.c (gfc_ref_needs_temporary_p): New function.
313 (gfc_check_fncall_dependency): Use it instead of inlined check.
314 By so doing, take advantage of the fact that character substrings
315 within an array reference also need a temporary.
316 * trans.h (GFC_SS_VECTOR): Adjust comment.
317 * trans-array.c (gfc_free_ss): Remove GFC_SS_VECTOR case.
318 (gfc_set_vector_loop_bounds): New function.
319 (gfc_add_loop_ss_code): Call it after evaluating the subscripts of
320 a GFC_SS_SECTION. Deal with the GFC_SS_VECTOR case by evaluating
321 the vector expression and caching its descriptor for use within
323 (gfc_conv_array_index_ref, gfc_conv_vector_array_index): Delete.
324 (gfc_conv_array_index_offset): Handle scalar, vector and range
325 dimensions as separate cases of a switch statement. In the vector
326 case, use the loop variable to calculate a vector index and use the
327 referenced element as the dimension's index. Perform bounds checking
329 (gfc_conv_section_upper_bound): Return null for vector indexes.
330 (gfc_conv_section_startstride): Give vector indexes a start value
331 of 0 and a stride of 1.
332 (gfc_conv_ss_startstride): Adjust for new GFC_SS_VECTOR representation.
333 (gfc_conv_expr_descriptor): Expand comments. Generalize the
334 handling of the !want_pointer && !direct_byref case. Use
335 gfc_ref_needs_temporary_p to decide whether the variable case
337 (gfc_walk_variable_expr): Handle DIMEN_VECTOR by creating a
339 * trans-expr.c: Include dependency.h.
340 (gfc_trans_arrayfunc_assign): Fail if the target needs a temporary.
342 2005-09-09 Richard Sandiford <richard@codesourcery.com>
345 * trans.h (gfc_interface_sym_mapping, gfc_interface_mapping): Moved
347 (gfc_init_interface_mapping, gfc_free_interface_mapping)
348 (gfc_add_interface_mapping, gfc_finish_interface_mapping)
349 (gfc_apply_interface_mapping): Declare.
350 * trans-array.h (gfc_set_loop_bounds_from_array_spec): Declare.
351 (gfc_trans_allocate_temp_array): Add pre and post block arguments.
352 * trans-array.c (gfc_set_loop_bounds_from_array_spec): New function.
353 (gfc_trans_allocate_array_storage): Replace loop argument with
354 separate pre and post blocks.
355 (gfc_trans_allocate_temp_array): Add pre and post block arguments.
356 Update call to gfc_trans_allocate_array_storage.
357 (gfc_trans_array_constructor, gfc_conv_loop_setup): Adjust for new
358 interface to gfc_trans_allocate_temp_array.
359 * trans-expr.c (gfc_interface_sym_mapping, gfc_interface_mapping):
361 (gfc_init_interface_mapping, gfc_free_interface_mapping)
362 (gfc_add_interface_mapping, gfc_finish_interface_mapping)
363 (gfc_apply_interface_mapping): Make extern.
364 (gfc_conv_function_call): Build an interface mapping for array
365 return values too. Call gfc_set_loop_bounds_from_array_spec.
366 Adjust call to gfc_trans_allocate_temp_array so that code is
367 added to SE rather than LOOP.
369 2005-09-09 Richard Sandiford <richard@codesourcery.com>
372 * trans.h (gfor_fndecl_internal_realloc): Declare.
373 (gfor_fndecl_internal_realloc64): Declare.
374 * trans-decl.c (gfor_fndecl_internal_realloc): New variable.
375 (gfor_fndecl_internal_realloc64): New variable.
376 (gfc_build_builtin_function_decls): Initialize them.
377 * trans-array.h (gfc_trans_allocate_temp_array): Add a fourth argument.
378 * trans-array.c (gfc_trans_allocate_array_storage): Add an argument
379 to say whether the array can grow later. Don't allocate the array
380 on the stack if so. Don't call malloc for zero-sized arrays.
381 (gfc_trans_allocate_temp_array): Add a similar argument here.
382 Pass it along to gfc_trans_allocate_array_storage.
383 (gfc_get_iteration_count, gfc_grow_array): New functions.
384 (gfc_iterator_has_dynamic_bounds): New function.
385 (gfc_get_array_constructor_element_size): New function.
386 (gfc_get_array_constructor_size): New function.
387 (gfc_trans_array_ctor_element): Replace pointer argument with
389 (gfc_trans_array_constructor_subarray): Likewise. Take an extra
390 argument to say whether the variable-sized part of the constructor
391 must be allocated using realloc. Grow the array when this
393 (gfc_trans_array_constructor_value): Likewise.
394 (gfc_get_array_cons_size): Delete.
395 (gfc_trans_array_constructor): If the loop bound has not been set,
396 split the allocation into a static part and a dynamic part. Set
397 loop->to to the bounds for static part before allocating the
398 temporary. Adjust call to gfc_trans_array_constructor_value.
399 (gfc_conv_loop_setup): Allow any constructor to determine the
400 loop bounds. Check whether the constructor has a dynamic size
401 and prefer to use something else if so. Expect the loop bound
402 to be set later. Adjust call to gfc_trans_allocate_temp_array.
403 * trans-expr.c (gfc_conv_function_call): Adjust another call here.
405 2005-09-09 Paul Thomas <pault@gcc.gnu.org>
408 * module.c (find_use_name_n): Based on original
409 find_use_name. Either counts number of use names for a
410 given real name or returns use name n.
411 (find_use_name, number_use_names): Interfaces to the
412 function find_use_name_n.
413 (read_module): Add the logic and calls to these functions,
414 so that mutiple reuses of the same real name are loaded.
416 2005-09-09 Paul Thomas <pault@gcc.gnu.org>
423 * gfortran.h: Move definition of BLANK_COMMON_NAME from trans-
424 common.c so that it is accessible to module.c. Add common_head
425 field to gfc_symbol structure. Add field for the equivalence
426 name AND new attr field, in_equivalence.
427 * match.c (gfc_match_common, gfc_match_equivalence): In loops
428 that flag common block equivalences, emit an error if the
429 common blocks are different, using sym->common_head as the
430 common block identifier. Ensure that symbols that are equivalence
431 associated with a common block are marked as being in_common.
432 * module.c (write_blank_common): New.
433 (write_common): Use unmangled common block name.
434 (load_equiv): New function ported from g95.
435 (read_module): Call load_equiv.
436 (write_equiv): New function ported from g95. Correct
437 string referencing for gfc functions. Give module
438 equivalences a unique name.
439 (write_module): Call write_equiv and write_blank_common.
440 * primary.c (match_variable) Old gfc_match_variable, made
441 static and third argument provided to indicate if parent
442 namespace to be visited or not.
443 (gfc_match_variable) New. Interface to match_variable.
444 (gfc_match_equiv_variable) New. Interface to match_variable.
445 * trans-common.c (finish_equivalences): Provide the call
446 to create_common with a gfc_common_header so that
447 module equivalences are made external, rather than local.
448 (find_equivalences): Ensure that all members in common block
449 equivalences are marked as used. This prevents the subsequent
450 call to this function from making local unions.
451 * trans-decl.c (gfc_generate_function_code): Move the call to
452 gfc_generate_contained_functions to after the call to
453 gfc_trans_common so the use-associated, contained common
454 blocks produce the correct references.
455 (gfc_create_module_variable): Return for equivalenced symbols
456 with existing backend declaration.
458 2005-09-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
461 * match.c (gfc_match_common): Remove unnecessary / wrong special
462 cases for end-of-statement.
464 2005-09-08 Janne Blomqvist <jblomqvi@cc.hut.fi>
466 * gfortran.texi: Add section about implemented F2003 features.
468 2005-09-08 Richard Sandiford <richard@codesourcery.com>
471 * trans-array.c (gfc_add_loop_ss_code): Set ss->string_length in
472 the GFC_SS_FUNCTION case too.
473 * trans-expr.c (gfc_conv_function_val): Allow symbols to be bound
474 to function pointers as well as function decls.
475 (gfc_interface_sym_mapping, gfc_interface_mapping): New structures.
476 (gfc_init_interface_mapping, gfc_free_interface_mapping)
477 (gfc_get_interface_mapping_charlen, gfc_get_interface_mapping_array)
478 (gfc_set_interface_mapping_bounds, gfc_add_interface_mapping)
479 (gfc_finish_interface_mapping, gfc_apply_interface_mapping_to_cons)
480 (gfc_apply_interface_mapping_to_ref)
481 (gfc_apply_interface_mapping_to_expr)
482 (gfc_apply_interface_mapping): New functions.
483 (gfc_conv_function_call): Evaluate the arguments before working
484 out where the result should go. Make the null pointer case provide
485 the string length in parmse.string_length. Cope with non-constant
486 string lengths, using the above functions to evaluate such lengths.
487 Use a temporary typespec; don't assign to sym->cl->backend_decl.
488 Don't assign to se->string_length when returning a cached array
491 2005-09-08 Richard Sandiford <richard@codesourcery.com>
494 * trans-array.c (gfc_conv_array_ref): Call gfc_advance_se_ss_chain
495 after handling scalarized references. Make "indexse" inherit from
496 "se" when handling AR_ELEMENTs.
497 (gfc_walk_variable_expr): Add GFC_SS_SCALAR entries for each
498 substring or scalar reference that follows an array section.
499 * trans-expr.c (gfc_conv_variable): When called from within a
500 scalarization loop, start out with "ref" pointing to the scalarized
501 part of the reference. Don't call gfc_advance_se_ss_chain here.
503 2005-09-07 Richard Sandiford <richard@codesourcery.com>
506 * trans-expr.c (gfc_trans_pointer_assignment): Assign to a temporary
507 descriptor if the rhs is not a null pointer or variable.
509 2005-09-07 Thomas Koenig <Thomas.Koenig@online.de>
512 * symbol.c(check_conflict): Add conflict for parameter/save,
514 2005-09-06 Richard Sandiford <richard@codesourcery.com>
517 * simplify.c (gfc_simplify_transpose): Set the result's typespec from
518 the source, not the first element of the return value.
520 2005-09-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
523 * io.c (match_io): Correctly backup if PRINT followed by
524 symbol which is not a namelist. Force blank between PRINT
525 and namelist in free form.
527 2005-08-31 Francois-Xavier Coudert <coudert@clipper.ens.fr>
530 * gfortran.h (gfc_option_t): Add flag_automatic.
531 * invoke.texi: Document the -fno-automatic option.
532 * lang.opt: Add a -fautomatic option.
533 * options.c (gfc_init_options): Default for -fautomatic is on.
534 (gfc_handle_option): Add handling of -fautomatic option.
535 * resolve.c (gfc_resolve): When -fno-automatic is used, mark
536 needed variables as SAVE.
538 2005-08-27 Erik Edelmann <erik.edelmann@iki.fi>
540 * trans-array.c (gfc_trans_deferred_array): Fix comments.
542 2005-08-27 Erik Schnetter <schnetter@aei.mpg.de>
544 * primary.c (match_charkind_name): Fix typo in comment leading to
547 2005-08-25 Erik Edelmann <eedelman@acclab.helsinki.fi>
550 * symbol.c (find_special): Remove.
551 (build_sym, add_init_expr, attr_decl1): Remove calls to
552 find_special in favor of calls to gfc_get_symbol.
554 2005-08-24 Thomas Koenig <Thomas.Koenig@online.de>
557 * gfortran.h (symbol_attribute): Add noreturn to the structure.
558 (gfc_intrinsic_sym): Add noreturn to the structure.
559 * intrinsic.c (make_noreturn): New function.
560 (add_subroutines): Mark subroutines abort and exit as noreturn.
561 (gfc_intrinsic_sub_interface): Copy noreturn attribute from
562 isym to the resolved symbol.
563 * trans-decl.c (gfc_get_extern_function_decl): Set function
564 as VOLATILE (== noreturn) if the noreturn attribute is set.
566 2005-08-21 Steven G. Kargl <kargls@comcast.net>
568 * decl.c: Typo in comment.
570 2005-08-21 Steven G. Kargl <kargls@comcast.net>
572 * array.c: Bump GFC_MAX_AC_EXPAND from 100 to 65535.
574 2005-08-21 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
576 * gfortran.h (gfc_option_t): Remove source field. Add
578 (gfc_new_file): Remove arguments in prototype.
579 (gfc_source_file): Make 'const char *'.
580 * f95-lang.c (gfc_init): Use gfc_source_file instead of
581 gfc_option.source. Call gfc_new_file without arguments.
582 * invoke.texi: Document new options '-fd-lines-as-code' and
583 '-fd-lines-as-comment'.
584 * lang.opt: Add new options. Alphabetize.
585 * options.c (gfc_init_options): Initialize gfc_source_file instead
586 of gfc_option.source. Initialize gfc_option.flag_d_lines.
587 (form_from_filename): Move here from scanner.c. Make
588 'filename' argument 'const'.
589 (gfc_post_options): Set gfc_source_file. Determine source form.
590 Warn if 'd-lines*' are used in free form.
591 * scanner.c (gfc_source_file): Constify.
592 (skip_fixed_comments): Deal with d-lines.
593 (get_file): Constify argument 'name'.
594 (load_file): Constify argument 'filename'.
595 (form_from_filename): Moved to options.c.
596 (gfc_new_file): Remove arguments. Don't initialize
597 gfc_source_file, don't determine source form.
598 * trans-const.c (gfc_init_constants): Use gfc_source_file instead
599 of gfc_option.source.
601 2005-08-19 Steven G. Kargl <kargls@comcast.net>
604 * gfortran.h: Remove PATH_MAX definition.
605 * module.c (write_module, gfc_dump_module): Use alloca to allocate
607 * scanner.c (gfc_release_include_path, form_from_filename): Ditto.
609 2004-08-16 Huang Chun <chunhuang73@hotmail.com>
611 * trans-expr.c (gfc_conv_power_op): Evaluate the expression before
614 2005-08-14 Asher Langton <langton2@llnl.gov>
616 * parse.c (match): Enclose macro in do...while(0) and braces.
618 2005-08-14 Paul Thomas <pault@gcc.gnu.org>
621 * gfortran.texi: Document PRINT namelist.
623 2005-08-14 Paul Thomas <pault@gcc.gnu.org>
626 * io.c (match_io): Add code to implement PRINT namelist.
628 2005-08-14 Canqun Yang <canqun@nudt.edu.cn>
630 * trans-stmt.c (gfc_trans_arithmetic_if): Optimized in case of equal
633 2005-08-11 Francois-Xavier Coudert <coudert@clipper.ens.fr>
634 Steven Bosscher <stevenb@suse.de>
637 * gfortran.h: Add is_main_program member to symbol_attribute.
638 * trans-decl: Add a gfor_fndecl_set_std tree.
639 (gfc_build_builtin_function_decls): Create it.
640 (gfc_generate_function_code): Add this call at the beginning of
642 * trans.c (gfc_generate_code): Move main_program and attr.
643 * trans.h: Add declaration for gfor_fndecl_set_std.
645 2005-08-10 Thomas Koenig <Thomas.Koenig@online.de>
648 gfortran.h: Declare new function gfc_resolve_dim_arg.
649 resolve.c: New function gfc_resolve_dim_arg.
650 iresolve.c (gfc_resolve_all): Use gfc_resolve_dim_arg.
651 (gfc_resolve_any): Likewise.
652 (gfc_resolve_count): Likewise.
653 (gfc_resolve_cshift): Likewise. If the kind of shift is less
654 gfc_default_integer_kind, convert it to default integer type.
655 (gfc_resolve_eoshift): Likewise.
656 (gfc_resolve_maxloc): Use gfc_resolve_dim_arg.
657 (gfc_resolve_maxval): Likewise.
658 (gfc_resolve_minloc): Likewise.
659 (gfc_resolve_minval): Likewise.
660 (gfc_resolve_product): Likewise.
661 (gfc_resolve_spread): Likewise.
662 (gfc_resolve_sum): Likewise.
664 2005-08-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
666 * check.c (gfc_check_ttynam_sub, gfc_check_isatty): Add check
667 functions for new intrinsics TTYNAM and ISATTY.
668 * intrinsic.c (add_functions, add_subroutines): Add new
670 * intrinsic.h: Add prototypes for new check and resolve
672 * iresolve.c (gfc_resolve_isatty, gfc_resolve_ttynam_sub): New
673 resolve functions for intrinsics TTYNAM and ISATTY.
674 * gfortran.h (gfc_generic_isym_id): Add symbol for ISATTY.
675 * trans-intrinsic.c: Add case for GFC_ISYM_ISATTY.
677 2005-08-09 Jakub Jelinek <jakub@redhat.com>
679 * scanner.c (preprocessor_line): Don't write beyond the end of flag
682 2005-08-07 Janne Blomqvist <jblomqvi@cc.hut.fi>
685 * dump-parse-tree.c (gfc_show_code_node): Add case for FLUSH.
686 * gfortran.h: Add enums for FLUSH.
687 * io.c (gfc_free_filepos,match_file_element,match_filepos): Modify
688 comment appropriately. (gfc_match_flush): New function.
689 * match.c (gfc_match_if): Add match for flush.
690 * match.h: Add prototype.
691 * parse.c (decode_statement): Add flush to 'f' case.
692 (next_statement): Add case for flush. (gfc_ascii_statement): Likewise.
693 * resolve.c (resolve_code): Add flush case.
694 * st.c (gfc_free_statement): Add flush case.
695 * trans-io.c: Add prototype for flush.
696 (gfc_build_io_library_fndecls): Build fndecl for flush.
697 (gfc_trans_flush): New function.
698 * trans-stmt.h: Add prototype.
699 * trans.c (gfc_trans_code): Add case for flush.
701 2005-08-06 Francois-Xavier Coudert <coudert@clipper.ens.fr>
703 * primary.c (match_hollerith_constant): Fix typo.
705 2005-08-06 Kazu Hirata <kazu@codesourcery.com>
707 * decl.c, dump-parse-tree.c, gfortran.texi, intrinsic.texi,
708 invoke.texi, resolve.c, trans-array.c, trans-array.h,
709 trans-common.c, trans-expr.c, trans-io.c, trans.h: Fix
710 comment/doc typos. Follow spelling conventions.
712 2005-08-06 Jakub Jelinek <jakub@redhat.com>
716 * primary.c (match_varspec): If equiv_flag, don't look at sym's
717 attributes, call gfc_match_array_ref up to twice and don't do any
718 substring or component processing.
719 * resolve.c (resolve_equivalence): Transform REF_ARRAY into
720 REF_SUBSTRING or nothing if needed. Check that substrings
721 don't have zero length.
723 2005-08-05 Thomas Koenig <Thomas.Koenig@online.de>
725 * trans-expr.c (gfc_build_builtin_function_decls): Mark
726 stop_numeric and stop_string as non-returning.
728 2005-08-04 Paul Brook <paul@codesourcery.com>
730 * trans-expr.c (gfc_conv_expr, gfc_conv_expr_type): Update comments.
731 (gfc_conv_expr_lhs): Fix assertion.
732 (gfc_conv_expr_val): Merge post block. Set se.expr to new value.
734 2005-08-02 David Edelsohn <edelsohn@gnu.org>
737 * expr.c (simplify_parameter_variable): Do not copy the subobject
738 references if the expression value is a constant.
740 * expr.c (gfc_simplify_expr): Evaluate constant substrings.
742 2005-07-31 Jerry DeLisle <jvdelisle@verizon.net>
744 * intrinsic.texi: Add documentation for exponent, floor, and fnum and
745 fix description of ceiling in index.
747 2005-07-31 Steven Bosscher <stevenb@suse.de>
749 * trans-decl.c (gfc_build_builtin_function_decls): Give the internal
750 malloc functions the 'malloc' attribute. Give runtime_error the
751 'noreturn' attribute.
753 2005-07-31 Steven Bosscher <stevenb@suse.de>
755 * trans-stmt.c (gfc_trans_goto): Jump to the known label instead
756 of the assigned goto variable.
758 2005-07-29 Steven Bosscher <stevenb@suse.de>
760 * trans-types.h (gfc_array_range_type): Add missing GTY decl for this.
762 2005-07-28 Andrew Pinski <pinskia@physics.uc.edu>
764 * fortran/f95-lang.c (language_function): Remove
765 named_labels, shadowed_labels, returns_value, returns_abnormally,
766 warn_about_return_type, and extern_inline fields.
767 (named_labels): Remove variable.
768 (gfc_init_decl_processing): Remove setting of named_labels.
770 2005-07-27 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
773 * resolve.c (resolve_operator): Improve diagnostic for comparison
774 of logicals with invalid operator.
776 2005-07-25 Jakub Jelinek <jakub@redhat.com>
779 * data.c (gfc_assign_data_value_range): Call
780 create_character_initializer if last_ts is a character type.
782 2005-07-22 Manfred Hollstein <mh@suse.com>
784 * match.c (gfc_match_symbol): Fix uninitialised warnings.
785 * matchexp.c (gfc_match_expr): Likewise.
787 2005-07-20 Giovanni Bajo <giovannibajo@libero.it>
789 Make CONSTRUCTOR use VEC to store initializers.
790 * trans-array.c (gfc_build_null_descriptor,
791 gfc_trans_array_constructor_value, gfc_conv_array_initializer):
792 Update to cope with VEC in CONSTRUCTOR_ELTS.
793 * trans-common.c (create_common): Likewise.
794 * trans-expr.c (gfc_conv_structure): Likewise.
795 * trans-stmt.c (gfc_trans_character_select): Use
796 build_constructor_from_list instead of build_constructor.
798 2005-07-19 Paul Thomas <pault@gcc.gnu.org>
801 * resolve.c (resolve_symbol): A symbol with FL_UNKNOWN
802 is matched against interfaces in parent namespaces. If there
803 the symtree is set to point to the interface.
805 2005-07-16 David Edelsohn <edelsohn@gnu.org>
808 * decl.c (do_parm): Adjust character initializer to character length
809 of symbol before assigning.
811 2005-07-14 Steve Ellcey <sje@cup.hp.com>
813 * trans-types.c (MAX_REAL_KINDS): Increase from 4 to 5.
815 2005-07-14 Jakub Jelinek <jakub@redhat.com>
817 * gfortran.h (MAX_ERROR_MESSAGE): Remove.
818 (gfc_error_buf): Add allocated and index fields. Change message
819 field from array to a pointer.
820 * error.c (use_warning_buffer, error_ptr, warning_ptr): Remove.
821 (cur_error_buffer): New variable.
822 (error_char): Use cur_error_buffer->{message,index} instead of
823 {warning,error}_{buffer.message,ptr}. Reallocate message buffer
825 (gfc_warning, gfc_notify_std, gfc_error, gfc_error_now): Setup
826 cur_error_buffer and its index rather than {warning,error}_ptr
827 and use_warning_buffer.
828 (gfc_warning_check, gfc_error_check): Don't print anything if
830 (gfc_push_error): Allocate saved message with xstrdup.
831 (gfc_pop_error): Free saved message with gfc_free.
832 (gfc_free_error): New function.
833 * primary.c (match_complex_constant): Call gfc_free_error if
834 gfc_pop_error will not be called.
835 * match.c (gfc_match_st_function): Likewise.
838 * scanner.c (preprocessor_line): Don't treat flag 3 as the start of a new
839 file. Fix file left but not entered warning.
841 2005-07-14 Feng Wang <fengwang@nudt.edu.cn>
842 Steven G. Kargl <kargls@comcast.net>
844 * array.c (resolve_character_array_constructor): Allocate gfc_charlen
845 for the array and attach to namespace list for automatic deallocation.
847 2005-07-13 Andreas Schwab <schwab@suse.de>
849 * Make-lang.in (fortran/dependency.o): Depend on
850 $(GFORTRAN_TRANS_DEPS).
852 2005-07-11 Jakub Jelinek <jakub@redhat.com>
854 * trans-stmt.c (gfc_trans_forall_loop): Clear maskindex before
856 (gfc_trans_assign_need_temp, gfc_trans_pointer_assign_need_temp,
857 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_2):
858 Don't clear maskindexes here.
860 2005-07-08 Daniel Berlin <dberlin@dberlin.org>
862 * trans-decl.c (create_function_arglist): DECL_ARG_TYPE_AS_WRITTEN
865 2005-07-08 Jakub Jelinek <jakub@redhat.com>
867 * primary.c (gfc_match_rvalue): Handle ENTRY the same way
870 2005-07-07 Jakub Jelinek <jakub@redhat.com>
872 * scanner.c (load_line): Add pbuflen argument, don't make
873 buflen static. If maxlen == 0 or preprocessor_flag,
874 don't truncate at buflen, but at maxlen. In xrealloc add
875 1 byte at the end for the terminating '\0'. Don't fill
876 with spaces up to buflen, but gfc_option.fixed_line_length.
877 (load_file): Adjust load_line caller. Add line_len variable.
879 * scanner.c (preprocessor_line): Only set current_file->line when errors
880 have not been encountered. Warn and don't crash if a file leave
881 preprocessor line has no corresponding entering line. Formatting.
883 2005-07-07 Steven Bosscher <stevenb@suse.de>
885 * primary.c (match_hollerith_constant): Use int, not unsigned int,
886 for the hollerith length. Fix indentation.
888 2005-07-07 Feng Wang <fengwang@nudt.edu.cn>
893 * arith.c (gfc_hollerith2int, gfc_hollerith2real,
894 gfc_hollerith2complex, gfc_hollerith2character, gfc_hollerith2logical):
896 (eval_intrinsic): Don't evaluate if Hollerith constant arguments exist.
897 * arith.h (gfc_hollerith2int, gfc_hollerith2real,
898 gfc_hollerith2complex, gfc_hollerith2character, gfc_hollerith2logical):
900 * expr.c (free_expr0): Free memery allocated for Hollerith constant.
901 (gfc_copy_expr): Allocate and copy string if Expr is from Hollerith.
902 (gfc_check_assign): Enable conversion from Hollerith to other.
903 * gfortran.h (bt): Add BT_HOLLERITH.
904 (gfc_expr): Add from_H flag.
905 * intrinsic.c (gfc_type_letter): Return 'h' for BT_HOLLERITH.
906 (add_conversions): Add conversions from Hollerith constant to other.
907 (do_simplify): Don't simplify if Hollerith constant arguments exist.
908 * io.c (resolve_tag): Enable array in FORMAT tag under GFC_STD_GNU.
909 * misc.c (gfc_basetype_name): Return "HOLLERITH" for BT_HOLLERITH.
910 (gfc_type_name): Print "HOLLERITH" for BT_HOLLERITH.
911 * primary.c (match_hollerith_constant): New function.
912 (gfc_match_literal_constant): Add match Hollerith before Integer.
913 * simplify.c (gfc_convert_constant): Add conversion from Hollerith
915 * trans-const.c (gfc_conv_constant_to_tree): Use VIEW_CONVERT_EXPR to
916 convert Hollerith constant to tree.
917 * trans-io.c (gfc_convert_array_to_string): Get array's address and
918 length to set string expr.
919 (set_string): Deal with array assigned Hollerith constant and character
921 * gfortran.texi: Document Hollerith constants as extention support.
923 2005-07-07 Feng Wang <fengwang@nudt.edu.cn>
926 * trans-array.c (gfc_trans_array_constructor_value): Fix index of data.
928 2005-07-07 Jakub Jelinek <jakub@redhat.com>
930 * decl.c (gfc_match_entry): Allow ENTRY without parentheses
933 2005-07-03 Kazu Hirata <kazu@codesourcery.com>
935 * gfortran.texi, intrinsic.texi: Fix typos.
936 * symbol.c: Fix a comment typo.
938 2005-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
940 * error.c (error_printf, error_print): Use ATTRIBUTE_GCC_GFC.
941 * gfortran.h (ATTRIBUTE_GCC_GFC): New.
942 (gfc_warning, gfc_warning_now, gfc_error, gfc_error_now,
943 gfc_fatal_error, gfc_internal_error, gfc_notify_std): Use
946 2005-07-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
949 * io.c (match_dt_element): Do not allow END tag in PRINT or
952 2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
954 * lang.opt: Remove "." from end of help texts.
956 2005-07-01 Jerry DeLisle <jvdelisle@verizon.net>
958 * gfortran.texi: Fix typos and grammar.
959 * invoke.texi: Fix typos and grammar.
960 * intrinsic.texi: Add documentaion for eoshift, epsilon, etime, and
961 exit. Fixed alignment of text for dtime syntax. Fixed a few line
964 2005-06-25 Jakub Jelinek <jakub@redhat.com>
966 * trans-stmt.c (gfc_trans_forall_1): Prefer to use smaller logical
967 type than boolean_type_node.
969 2005-06-25 Kelley Cook <kcook@gcc.gnu.org>
971 * all files: Update FSF address in copyright headers.
973 2005-06-24 Jerry DeLisle <jvdelisle@verizon.net>
976 * gfortran.h: Add symbols for new intrinsic functions.
977 * intrinsic.c: Add new functions acosh, asinh, and atanh.
978 * intrinsic.h: Add prototypes for the new functions.
979 * iresolve.c (gfc_resolve_acosh): New function.
980 (gfc_resolve_asinh): New function.
981 (gfc_resolve_atanh): New function.
982 * mathbuiltins.def: Add defines.
983 * simplify.c (gfc_simplify_acosh): New function.
984 (gfc_simplify_asinh): New function.
985 (gfc_simplify_atanh): New function.
987 2005-06-24 Feng Wang <fengwang@nudt.edu.cn>
989 * simplify.c (gfc_simplify_modulo): Don't clear before get result.
991 2005-06-22 Paul Brook <paul@codesourcery.com>
994 * symbol.c (gfc_is_var_automatic): New function.
995 (save_symbol): Use it.
997 2005-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
998 Paul Thomas <pault@gcc.gnu.org>
1002 * module.c (mio_namelist): New function. Correct to set
1003 namelist_tail and to give error on renaming namelist by use
1005 (mio_symbol): Call mio_namelist.
1007 2005-06-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1009 * gfortran.h: Add flag_backslash compile-time option.
1010 * lang.opt: Add support for -fbackslash option.
1011 * options.c: Likewise.
1012 * primary.c: Implement behavior for -fno-backslash.
1013 * invoke.texi: Add doc for -fbackslash option.
1014 * gfortran.texi: Remove mention of -fno-backslash as a
1017 2005-06-20 Steven G. Kargl <kargls@comcast.net>
1021 * match.c (gfc_match_label): Detect duplicate labels.
1024 2005-06-20 Erik Edelmann <erik.edelmann@iki.fi>
1026 * intrinsic.c (check_intrinsic_standard): Fix spelling error
1027 in a warning message.
1029 2005-06-18 Erik Edelman <eedelman@acclab.helsinki.fi>
1030 Steven G. Kargl <kargls@comast.net>
1033 * primary.c (gfc_match_rvalue): expr_type can be EXPR_CONSTANT
1034 for an array; check that sym->as is NULL.
1037 2005-06-18 Steven G. Kargl <kargls@comcast.net>
1039 * intrinsic.c (gfc_intrinsic_func_interface): Enable errors for generic
1040 functions whose simplification routine return FAILURE.
1042 2005-06-13 Geoffrey Keating <geoffk@apple.com>
1044 * Make-lang.in (fortran.install-man): Doesn't depend on installdirs.
1045 (rule for installing f95.1 manpage): Does depend on installdirs.
1047 2005-06-13 Jakub Jelinek <jakub@redhat.com>
1050 * trans-stmt.c (gfc_trans_forall_loop): Only increment maskindex
1051 in the innermost loop.
1053 * trans-expr.c (gfc_conv_function_call): Return int instead of
1054 void. Use a local variable for has_alternate_specifier and
1055 return it. Avoid modification of function type's return value
1056 in place, since it may be shared.
1057 * trans.h (has_alternate_specifier): Remove.
1058 (gfc_conv_function_call): Change return type.
1059 * trans-stmt.c (has_alternate_specifier): Remove.
1060 (gfc_trans_call): Add a local has_alternate_specifier variable,
1061 set it from gfc_conv_function_call return value.
1063 2005-06-12 Richard Henderson <rth@redhat.com>
1065 * trans-array.c (gfc_conv_descriptor_data_get): Rename from
1066 gfc_conv_descriptor_data. Cast the result to the DATAPTR type.
1067 (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): New.
1068 (gfc_trans_allocate_array_storage): Use them.
1069 (gfc_array_allocate, gfc_array_deallocate): Likewise.
1070 (gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor): Likewise.
1071 (gfc_trans_deferred_array): Likewise.
1072 * trans-expr.c (gfc_conv_function_call): Likewise.
1073 (gfc_trans_subcomponent_assign): Likewise.
1074 (gfc_trans_pointer_assignment): Likewise.
1075 * trans-intrinsic.c (gfc_conv_allocated): Likewise.
1076 * trans-types.c (gfc_array_descriptor_base): New.
1077 (gfc_get_element_type): Use GFC_TYPE_ARRAY_DATAPTR_TYPE.
1078 (gfc_get_array_descriptor_base): Break out from ...
1079 (gfc_get_array_type_bounds): ... here. Create type variants.
1080 * trans-array.h (gfc_conv_descriptor_data_get): Declare.
1081 (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): Declare.
1083 2005-06-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1085 * trans-expr.c (gfc_conv_variable): POINTER results don't need f2c
1086 calling conventions. Look at sym instead of sym->result.
1087 * trans-types.c (gfc_sym_type): Remove workaround for frontend bug.
1088 Remove condition which is always false with workaround removed.
1089 (gfc_return_by_reference): Always look at sym, never at sym->result.
1091 2005-06-11 Steven G. Kargl <kargls@comcast.net>
1095 * trans-array.c (gfc_array_deallocate): pstat is new argument
1096 (gfc_array_allocate): update gfc_array_deallocate() call.
1097 (gfc_trans_deferred_array): ditto.
1098 * trans-array.h: update gfc_array_deallocate() prototype.
1099 * trans-decl.c (gfc_build_builtin_function_decls): update declaration
1100 * trans-stmt.c (gfc_trans_deallocate): Implement STAT= feature.
1102 2005-06-07 Jerry DeLisle <jvdelisle@verizon.net>
1104 * intrinsic.texi: Add documentation for dcmplx, digits,
1105 dim, idim, ddim, dot_product, dprod, dreal, and dtime.
1107 2005-06-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1110 * trans-array.c (gfc_trans_array_constructor_value): Slightly reorder.
1111 Generate correct exit condition in case of negative steps in
1114 * invoke.texi: Fix description of flags required for compatibility
1117 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1118 Erik Schnetter <schnetter@aei.mpg.de>
1121 * trans.c (gfc_get_backend_locus): Remove unnecessary adjustment,
1122 remove FIXME comment.
1124 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1126 * match.c (match_forall_iterator): Don't immediately give error if '='
1127 is not followed by an expression.
1129 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1130 Erik Edelmann <erik.edelmann@iki.fi>
1132 * array.c (gfc_match_array_constructor): Disallow empty array
1135 2005-06-03 Jerry DeLisle <jvdelisle@verizon.net>
1137 * fortran/intrinsic.texi: Add documentation for
1138 command_argument_count, conjg, dconjg, count,
1139 cpu_time, cshift, date_and_time, dble, dfloat.
1141 2005-06-01 Roger Sayle <roger@eyesopen.com>
1143 * intrinsic.c (add_conv): No longer take a "simplify" argument as
1144 its always gfc_convert_constant, instead take a "standard" argument.
1145 (add_conversions): Change all existing calls of add_conv to pass
1146 GFC_STD_F77 as appropriate. Additionally, if we're allowing GNU
1147 extensions support integer-logical and logical-integer conversions.
1148 (gfc_convert_type_warn): Warn about use the use of these conversions
1149 as a extension when appropriate, i.e. with -pedantic.
1150 * simplify.c (gfc_convert_constant): Add support for integer to
1151 logical and logical to integer conversions, using gfc_int2log and
1153 * arith.c (gfc_log2int, gfc_int2log): New functions.
1154 * arith.h (gfc_log2int, gfc_int2log): Prototype here.
1155 * gfortran.texi: Document this new GNU extension.
1157 2005-06-01 Paul Thomas <pault@gcc.gnu.org>
1159 * fortran/trans-expr.c (gfc_conv_variable): Clean up bracketting.
1160 * fortran/trans-expr.c (gfc_conv_function_call): Insert spaces.
1161 Correct comments and replace convert of integer_one_node with
1164 2005-06-01 Jakub Jelinek <jakub@redhat.com>
1167 * resolve.c (resolve_contained_fntype): Use sym->attr.untyped
1168 to avoid giving error multiple times.
1169 (resolve_entries): Don't error about BT_UNKNOWN here.
1170 (resolve_unknown_f): Capitalize IMPLICIT for consistency.
1171 (resolve_fntype): New function.
1172 (gfc_resolve): Call resolve_fntype.
1174 2005-06-01 Feng Wang <fengwang@nudt.edu.cn>
1177 * fortran/io.c (resolve_tag): Fix error message.
1179 2005-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1181 * fortran/trans-decl.c: Don't include errors.h.
1182 * fortran/Make-lang.in: Updates dependencies.
1184 2005-05-31 Paul Thomas <pault@gcc.gnu.org>
1189 * fortran/trans-array.c (gfc_conv_expr_descriptor): Obtain the
1190 string length from the expression typespec character length value
1191 and set temp_ss->stringlength and backend_decl. Obtain the
1192 tree expression from gfc_conv_expr rather than gfc_conv_expr_val.
1193 Dereference the expression to obtain the character.
1194 * fortran/trans-expr.c (gfc_conv_component_ref): Remove the
1195 dereference of scalar character pointer structure components.
1196 * fortran/trans-expr.c (gfc_trans_subarray_assign): Obtain the
1197 string length for the structure component from the component
1200 2005-05-30 Roger Sayle <roger@eyesopen.com>
1202 * gfortran.h (GFC_STD_LEGACY): New "standard" macro. Reindent.
1203 * options.c (gfc_init_options): By default, allow legacy extensions
1204 but warn about them.
1205 (gfc_post_options): Make -pedantic warn about legacy extensions
1206 even with -std=legacy.
1207 (gfc_handle_option): Make -std=gnu follow the default behaviour
1208 of warning about legacy extensions, but allowing them. Make the
1209 new -std=legacy accept everything and warn about nothing.
1210 * lang.opt (std=legacy): New F95 command line option.
1211 * invoke.texi: Document both -std=f2003 and -std=legacy.
1212 * gfortran.texi: Explain the two types of extensions and document
1213 how they are affected by the various -std= command line options.
1215 2005-05-30 Kazu Hirata <kazu@cs.umass.edu>
1217 * trans-expr.c: Remove trailing ^M.
1219 * trans-expr.c: Fix comment typos.
1221 2005-05-29 Paul Thomas <pault@gcc.gnu.org>
1229 * fortran/trans-array.c (gfc_conv_resolve_dependencies): Add string
1230 length to temp_ss for character pointer array assignments.
1231 * fortran/trans-expr.c (gfc_conv_variable): Correct errors in
1232 dereferencing of characters and character pointers.
1233 * fortran/trans-expr.c (gfc_conv_function_call): Provide string
1234 length as return argument for various kinds of handling of return.
1235 Return a char[]* temporary for character pointer functions and
1236 dereference the temporary upon return.
1238 2005-05-29 Janne Blomqvist <jblomqvi@vipunen.hut.fi>
1239 Steven G. Kargl <kargls@comcast.net>
1242 * io.c (gfc_match_inquire): Implement constraints on UNIT and FILE usage.
1244 2005-05-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1247 * io.c (format_item_1): Add check and extension warning for
1250 2005-05-28 Steven G. Kargl <kargls@comcast.net>
1252 * arith.c (gfc_arith_init_1): Fix off by one problem;
1253 (gfc_check_integer_range): Chop extra bits in subnormal numbers.
1255 2005-05-28 Jerry DeLisle <jvdelisle@verizon.net>
1256 Steven G. Kargl <kargls@comcast.net>
1258 * intrinsic.texi: added documentation for BIT_SIZE, BTEST, CHAR, CEILING
1261 2005-05-27 Steven G. Kargl <kargls@comcast.net>
1263 * trans-array.c (gfc_trans_deferred_array): Use build_int_cst to force
1264 like types in comparsion.
1266 2005-05-26 Kazu Hirata <kazu@cs.umass.edu>
1268 * data.c, parse.c, trans-array.c, trans-decl.c,
1269 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
1270 trans.h: Fix comment typos. Follow spelling conventions.
1272 2005-05-22 Roger Sayle <roger@eyesopen.com>
1274 * gfortran.texi: Document some more GNU extensions.
1276 2005-05-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1278 * error.c (gfc_warning): Fix typo in comment.
1280 2005-05-18 Thomas Koenig <Thomas.Koenig@online.de>
1283 * fortran/iresolve.c (gfc_resolve_reshape): Add
1284 gfc_type_letter (BT_COMPLEX) for complex to
1285 to resolved function name.
1287 2005-05-18 Erik Edelmann <erik.edelmann@iki.fi>
1289 * array.c (gfc_match_array_constructor): Support [ ... ]
1290 style array constructors.
1292 2005-05-18 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1294 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_TRUNC
1295 and BUILT_IN_TRUNCF instead of BUILT_IN_FLOOR and BUILT_IN_FLOORF.
1296 * trans-intrinsic.c (build_fix_expr): Change 'op' argument
1297 to correct enum type.
1298 (gfc_conv_intrinsic_aint): Likewise. Clarify comment in front of
1299 function. Add default case to switch, deal with FIX_TRUNC_EXPR
1300 instead of FIX_FLOOR_EXPR.
1302 2005-05-18 Feng Wang <fengwang@nudt.edu.cn>
1305 * trans-const.c (gfc_conv_const_charlen): Use gfc_charlen_type_node to
1306 build character length.
1308 2005-05-17 Zdenek Dvorak <dvorakz@suse.cz>
1310 * trans-types.c (gfc_array_range_type): New variable.
1311 (gfc_init_types): Initialize gfc_array_range_type.
1312 (gfc_get_array_type_bounds): Use gfc_array_range_type.
1314 2005-05-17 Jakub Jelinek <jakub@redhat.com>
1317 * trans-stmt.c (generate_loop_for_temp_to_lhs): Remove SIZE and COUNT2
1318 arguments. If LSS is gfc_ss_terminator, increment COUNT1 by 1, instead
1319 of incrementing COUNT2 and using COUNT1+COUNT2 increment COUNT1 and use
1321 (generate_loop_for_rhs_to_temp): Likewise.
1322 (compute_overall_iter_number): Add INNER_SIZE_BODY argument.
1323 It non-NULL, add it to body.
1324 (allocate_temp_for_forall_nest_1): New function, split from
1325 allocate_temp_for_forall_nest.
1326 (allocate_temp_for_forall_nest): Add INNER_SIZE_BODY argument,
1327 propagate it down to compute_overall_iter_number. Use
1328 allocate_temp_for_forall_nest_1.
1329 (gfc_trans_assign_need_temp): Remove COUNT2. Call
1330 compute_inner_temp_size into a new stmtblock_t. Adjust calls to
1331 allocate_temp_for_forall_nest, generate_loop_for_rhs_to_temp
1332 and generate_loop_for_temp_to_lhs.
1333 (gfc_trans_pointer_assign_need_temp): Adjust calls to
1334 allocate_temp_for_forall_nest.
1335 (gfc_evaluate_where_mask): Call compute_inner_temp_size into a new
1336 stmtblock_t. Call compute_overall_iter_number just once, then
1337 allocate_temp_for_forall_nest_1 twice with the same size.
1338 Initialize mask indexes if nested_forall_info != NULL.
1339 (gfc_trans_where_2): Initialize mask indexes before calling
1340 gfc_trans_nested_forall_loop.
1342 2005-05-15 Feng Wang <fengwang@nudt.edu.cn>
1343 Jerry DeLisle <jvdelisle@verizon.net>
1346 * trans-stmt.c (gfc_trans_label_assign): fix pointer type, to
1347 resolve ICE on assign of format label.
1348 * trans-io.c (set_string): add fold-convert to properly
1349 handle assigned format label in write.
1351 2005-05-13 Paul Brook <paul@codesourcery.com>
1353 * trans-stmt.c (gfc_trans_forall_1): Fix comment typo.
1355 2005-05-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1357 * trans-types.c (gfc_is_nodesc_array): Remove redundant check.
1359 2005-05-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1362 * io.c (check_format): Look for literal characters inside
1365 2005-05-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1367 * resolve.c (resolve_symbol): Copy 'pointer' and 'dimension'
1368 attribute from result symbol to function symbol.
1369 * trans-expr.c (gfc_conv_function_call): Look at sym->attr.dimension
1370 instead of sym->result->attr.dimension.
1372 2005-05-10 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1375 * gfortran.h (gfc_option): Add flag_f2c.
1376 * invoke.texi: Document '-ff2c' command line option. Adapt
1377 documentation for '-fno-second-underscore' and '-fno-underscoring'.
1378 * lang.opt (ff2c): New entry.
1379 * options.c (gfc-init_options): Set default calling convention
1380 to -fno-f2c. Mark -fsecond-underscore unset.
1381 (gfc_post_options): Set -fsecond-underscore if not explicitly set
1383 (handle_options): Set gfc_option.flag_f2c according to requested
1385 * trans-decl.c (gfc_get_extern_function_decl): Use special f2c
1386 intrinsics where necessary.
1387 (gfc_trans_deferred_vars): Change todo error to assertion.
1388 * trans-expr.c (gfc_conv_variable): Dereference access
1389 to hidden result argument.
1390 (gfc_conv_function_call): Add hidden result argument to argument
1391 list if f2c calling conventions requested. Slightly restructure
1392 tests. Convert result of default REAL function to requested type
1393 if f2c calling conventions are used. Dereference COMPLEX result
1395 * trans-types.c (gfc_sym_type): Return double for default REAL
1396 function if f2c cc are used.
1397 (gfc_return_by_reference): Slightly restructure logic. Return
1398 COMPLEX by reference depending on calling conventions.
1399 (gfc_get_function_type): Correctly make hidden result argument a
1400 pass-by-reference argument for COMPLEX. Remove old code which does
1401 this for derived types.
1403 2005-05-09 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1405 * match.c (gfc_match_return): Only require space after keyword when
1406 it is obligatory. Only give stdwarn to after matching is successful.
1407 * dump-parse-tree.c (gfc_show_symbol): Deal with alternate returns.
1409 2005-05-08 Kazu Hirata <kazu@cs.umass.edu>
1411 * intrinsic.texi: Fix typos.
1413 2005-05-07 Steven G. Kargl <kargls@comcast.net>
1415 * intrinsic.texi: Document ASSOCIATED and ATAN2. Update Bessel function
1416 description to include information about scalar arguments.
1418 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
1420 * Make-lang.in, dump-parse-tree.c, invoke.texi, lang.opt,
1421 match.h, trans-array.h: Update copyright.
1423 2005-04-29 Tom Tromey <tromey@redhat.com>
1425 * f95-lang.c (poplevel): Updated for change to build_block.
1427 2005-04-29 Jakub Jelinek <jakub@redhat.com>
1431 * trans-expr.c (gfc_conv_variable): Handle return values in functions
1432 with alternate entry points.
1433 * resolve.c (resolve_entries): Remove unnecessary string termination
1434 after snprintf. Set result of entry master.
1435 If all entries have the same type, set entry master's type
1436 to that common type, otherwise set mixed_entry_master attribute.
1437 * trans-types.c (gfc_get_mixed_entry_union): New function.
1438 (gfc_get_function_type): Use it for mixed_entry_master functions.
1439 * gfortran.h (symbol_attribute): Add mixed_entry_master bit.
1440 * decl.c (gfc_match_entry): Set entry->result properly for
1442 * trans-decl.c (gfc_get_symbol_decl): For entry_master, skip over
1444 (build_entry_thunks): Handle return values in entry thunks.
1445 Clear BT_CHARACTER's ts.cl->backend_decl, so that it is not
1446 shared between multiple contexts.
1447 (gfc_get_fake_result_decl): Use DECL_ARGUMENTS from
1448 current_function_decl instead of sym->backend_decl. Skip over
1449 entry master's entry id argument. For mixed_entry_master entries or
1450 their results, return a COMPONENT_REF of the fake result.
1451 (gfc_trans_deferred_vars): Don't warn about missing return value if
1452 at least one entry point uses RESULT.
1453 (gfc_generate_function_code): For entry master returning
1454 CHARACTER, copy ts.cl->backend_decl to all entry result syms.
1455 * trans-array.c (gfc_trans_dummy_array_bias): Don't consider return
1456 values optional just because they are in entry master.
1458 2005-04-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1460 * gfortran.h (gfc_namespace): Add seen_implicit_none field,
1461 Tobias forgot this in previous commit.
1463 2005-04-29 Paul Brook <paul@codesourcery.com>
1465 * trans-expr.c (gfc_conv_expr_present): Fix broken assert. Update
1468 2005-04-29 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1470 * gfortran.h (gfc_namespace): Add seen_implicit_none field.
1471 * symbol.c (gfc_set_implicit_none): Give error if there's a previous
1472 IMPLICIT NONE, set seen_implicit_none.
1473 (gfc_merge_new_implicit): Error if there's an IMPLICIT NONE statement.
1475 2005-04-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1477 * gfortran.h (gfc_gsymbol): Make name a const char *.
1478 * symbol.c (gfc_get_gsymbol): Allocate gsymbol name via
1481 2005-04-28 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1484 * resolve.c (resolve_actual_arglist): Issue an error if a statement
1485 functions is used as actual argument.
1487 2005-04-27 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1490 * interface.c (compare_parameter): Ignore type for EXPR_NULL
1491 only if type is BT_UNKNOWN.
1493 2005-04-25 Paul Brook <paul@codesourcery.com>
1494 Steven G. Kargl <kargls@comcast.net>
1497 * check.c (gfc_check_ichar_iachar): New function.
1498 * instinsic.h (gfc_check_ichar_iachar): Add prototype.
1499 * intrinsic.c (add_functions): Use it.
1500 * primary.c (match_varspec, gfc_match_rvalue): Clear incorrect
1501 character expression lengths.
1503 2005-04-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1506 * trans-common.c (translate_common): Cast offset and
1507 common_segment->offset to type int for warning message.
1509 2005-04-23 DJ Delorie <dj@redhat.com>
1511 * trans-decl.c: Adjust warning() callers.
1513 2005-04-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1515 * trans-const.c (gfc_conv_mpfr_to_tree): Use hexadecimal string as
1516 intermediate representation. Fix typo in comment.
1518 2005-04-21 Steven G. Kargl <kargls@comcast.net>
1520 * trans-const.c (gfc_conv_mpfr_to_tree): Remove unneeded computation;
1521 simplify logic; Add a gcc_assert.
1523 2005-04-19 Steven G. Kargl <kargls@comcast.net>
1525 * trans-const.c (gfc_conv_mpz_to_tree): Fix comment.
1527 2005-04-19 Arnaud Desitter <arnaud.desitter@ouce.ox.ac.uk>
1528 Steven G. Kargl <kargls@comcast.net>
1530 * invoke.texi: Update -Waliasing description
1532 2005-04-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1535 * resolve.c (resolve_variable): If e->symtree is not set, this
1536 ought to be a FAILURE, and not a segfault.
1538 2005-04-17 Paul Thomas <pault@gcc.gnu.org>
1545 * fortran/trans-io.c (gfc_build_io_library_fndecls): Create
1546 declaration for st_set_nml_var and st_set_nml_var_dim. Remove
1547 declarations of old namelist functions.
1548 (build_dt): Simplified call to transfer_namelist_element.
1549 (nml_get_addr_expr): Generates address expression for start of
1550 object data. New function.
1551 (nml_full_name): Qualified name for derived type components. New
1553 (transfer_namelist_element): Modified for calls to new functions
1554 and improved derived type handling.
1556 2005-04-17 Richard Guenther <rguenth@gcc.gnu.org>
1558 * scanner.c (gfc_next_char_literal): Reset truncation flag
1559 for lines ending in a comment for both fixed and free form.
1560 (load_line): Do not set truncated flag if only truncating
1563 2005-04-15 Richard Guenther <rguenth@gcc.gnu.org>
1566 * gfortran.h (gfc_linebuf): Add truncated field.
1567 * parse.c (next_statement): Handle warning for truncated
1569 * scanner.c (load_line): Return if line was truncated.
1570 No longer warn for truncated lines. Remove unused parameters.
1571 (load_file): Store load_line return value to linebuf.
1572 (gfc_error_recovery): Do not advance line at the end.
1574 2005-04-14 Steven G. Kargl <kargls@comcast.net>
1576 * gfortran.h (gfc_real_info): Add subnormal struct member.
1577 * arith.c (gfc_arith_init_1): Set it.
1578 (gfc_check_real_range): Use it.
1579 * simplify.c (gfc_simplify_nearest): Fix nearest(0.,1.).
1581 2005-04-12 Kazu Hirata <kazu@cs.umass.edu>
1583 * simplify.c: Fix a comment typo.
1585 2005-04-11 Richard Sandiford <rsandifo@redhat.com>
1587 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
1589 2005-04-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1591 * simplify.c (gfc_simplify_nearest): Overhaul.
1593 2005-04-10 Kazu Hirata <kazu@cs.umass.edu>
1595 * interface.c: Fix a comment typo.
1597 2005-04-10 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1599 * match.c (match_arithmetic_if): Arithmetic IF is obsolete in
1602 2005-04-09 Steven G. Kargl <kargls@comcast.net>
1604 * simplify.c (gfc_simplify_anint): Use mpfr_round()
1605 (gfc_simplify_dnint): ditto.
1606 (gfc_simplify_nint): ditto.
1608 2005-04-09 Andrew Pinski <pinskia@physics.uc.edu>
1611 * io.c (check_format): Allow an optional comma
1612 between descriptors.
1614 2005-04-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1616 * match.c (match_arithmetic_if): Remove gfc_ prefix and correct
1617 comment according to GNU coding style.
1618 (gfc_match_if): Remove gfc_ prefix in call to
1619 match_arithmetic_if.
1621 2005-04-08 Diego Novillo <dnovillo@redhat.com>
1623 * match.c (gfc_match_arithmetic_if): Declare static.
1625 2005-04-08 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1628 * match.c (gfc_match_arithmetic_if): New function to match an
1629 arithmetic IF statement.
1630 (gfc_match_if): Use gfc_match_arithmetic_if to match an
1631 arithmetic IF statement embedded in a simple IF statement.
1633 2005-04-07 Steven G. Kargl <kargls@comcast.net>
1635 * simplify.c (gfc_simplify_exponent): Fix exponent(tiny(x))
1637 2005-04-06 Steven G. Kargl <kargls@comcast.net>
1639 * invoke.texi: Remove documentation of -std=f90
1641 2005-04-06 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1643 * expr.c (gfc_check_assign): Don't allow NULL as rhs in a
1644 non-pointer assignment.
1646 2005-04-05 Feng Wang <fengwang@nudt.edu.cn>
1651 * array.c (resolve_character_array_constructor): New function. Set
1652 constant character array's character length.
1653 (gfc_resolve_array_constructor): Use it.
1654 * decl.c (add_init_expr_to_sym): Set symbol and initializer character
1656 (gfc_set_constant_character_len): New function. Set constant character
1657 expression according the given length.
1658 * match.h (gfc_set_constant_character_len): Add prototype.
1660 2005-04-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1662 * intrinsic.texi: BES?? functions are not in the f95 standard.
1664 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1666 * intrinsic.texi: Document COS, EXP, LOG, LOG10, SIN, SQRT, TAN.
1668 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1670 * intrinsic.texi: Document BESJ0, BESJ1, BESJN, BESY0, BESY1,
1671 BESYN, ATAN, COSH, ERF, ERC, SINH, TANH.
1673 2005-04-02 Steven G. Kargl <kargls@comcast.net>
1675 * intrinsic.texi: Document ALLOCATED, ANINT, ANY, ASIN; fix typos
1677 2005-04-01 Kazu Hirata <kazu@cs.umass.edu>
1679 * decl.c, f95-lang.c, interface.c, module.c, trans-stmt.c,
1680 trans.h: Fix comment typos.
1682 2005-03-29 Steven G. Kargl <kargls@comcast.net>
1684 * gfortran.h (option_t): Change d8, i8, r8 to flag_default_double,
1685 flag_default_integer, flag_default_real
1686 * invoke.texi: Update documentation
1687 * lang.opt: Remove d8, i8, r8 definitions; Add fdefault-double-8
1688 fdefault-integer-8, and fdefault-real-8 definitions.
1689 * options.c (gfc_init_options): Set option defaults
1690 (gfc_handle_option): Handle command line options.
1691 * trans-types.c (gfc_init_kinds): Use options.
1693 2005-03-29 Keith Besaw <kbesaw@us.ibm.com>
1695 * f95-lang.c (builtin_function): Process the attrs parameter
1696 and apply the "const" attribute to the builtin if found.
1698 2005-03-27 Steven G. Kargl <kargls@comcast.net>
1700 * intrinsic.texi: Document AIMAG, AINT, ALL
1702 2005-03-26 Steven G. Kargl <kargls@comcast.net>
1704 * arith.c (check_result): Fix illogical logic.
1706 2005-03-26 Canqun Yang <canqun@nudt.edu.cn>
1708 * trans-common.c (create_common): Build RECORD_NODE for common blocks
1709 contain no equivalence objects.
1710 (add_equivalences): New argument saw_equiv.
1711 (trans_common): New local variable saw_equiv.
1712 (finish_equivalences): Add a local variable dummy, Always pass true
1713 for the 3rd parameter to create_common.
1715 2005-03-25 Steven G. Kargl <kargls@comcast.net>
1717 * intrinsic.texi: Fix "make dvi"
1719 2005-03-24 Steven G. Kargl <kargls@comcast.net>
1721 * intrinsic.texi: New file.
1722 * gfortran.texi: Include it; white space change; fix typo.
1724 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
1726 * f95-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
1728 2005-03-23 Steven Bosscher <stevenb@suse.de>
1730 * convert.c (convert): Replace fold (buildN (...)) with fold_buildN.
1731 * trans-array.c (gfc_trans_allocate_array_storage,
1732 gfc_trans_allocate_temp_array gfc_trans_array_constructor_value,
1733 gfc_conv_array_index_ref, gfc_trans_array_bound_check,
1734 gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
1735 gfc_conv_array_ref, gfc_trans_preloop_setup, gfc_conv_ss_startstride,
1736 gfc_conv_loop_setup, gfc_array_init_size, gfc_trans_array_bounds,
1737 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
1738 gfc_conv_expr_descriptor): Likewise.
1739 * trans-expr.c (gfc_conv_powi, gfc_conv_string_tmp,
1740 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
1741 * trans-intrinsic.c (build_round_expr, gfc_conv_intrinsic_bound,
1742 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_sign,
1743 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
1744 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_bitop,
1745 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits,
1746 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_ishftc,
1747 gfc_conv_intrinsic_merge, prepare_arg_info,
1748 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_repeat): Likewise.
1749 * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do, gfc_trans_do_while,
1750 gfc_trans_forall_loop, gfc_do_allocate, generate_loop_for_temp_to_lhs,
1751 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
1752 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
1753 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_assign):
1755 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Likewise.
1756 * trans.c (gfc_add_modify_expr): Likewise.
1758 2005-03-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1760 * check.c (gfc_check_chdir, gfc_check_chdir_sub, gfc_check_kill,
1761 gfc_check_kill_sub, gfc_check_link, gfc_check_link_sub,
1762 gfc_check_symlnk, gfc_check_symlnk_sub, gfc_check_rename,
1763 gfc_check_rename_sub, gfc_check_sleep_sub, gfc_check_gerror,
1764 gfc_check_getlog, gfc_check_hostnm, gfc_check_hostnm_sub,
1765 gfc_check_perror): new functions to check newly implemented
1767 * gfortran.h: adding symbols for new intrinsics.
1768 * intrinsic.c (add_functions): adding new intrinsics.
1769 (add_subroutines): adding new intrinsics.
1770 * intrinsic.h: prototype for all checking and resolving
1772 * iresolve.c (gfc_resolve_chdir, gfc_resolve_chdir_sub,
1773 gfc_resolve_hostnm, gfc_resolve_ierrno, gfc_resolve_kill,
1774 gfc_resolve_link, gfc_resolve_rename, gfc_resolve_symlnk,
1775 gfc_resolve_time, gfc_resolve_time8, gfc_resolve_rename_sub,
1776 gfc_resolve_kill_sub, gfc_resolve_link_sub,
1777 gfc_resolve_symlnk_sub, gfc_resolve_sleep_sub,
1778 gfc_resolve_gerror, gfc_resolve_getlog, gfc_resolve_hostnm_sub,
1779 gfc_resolve_perror): new functions to resolve intrinsics.
1780 * trans-intrinsic.c (gfc_conv_intrinsic_function): add case
1783 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1785 * dump-parse-tree.c (gfc_show_expr): Dump name of namespace
1786 in which the variable is declared.
1789 * resolve.c (was_declared): Also check for dummy attribute.
1791 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1793 * gfortran.h (arith): Remove ARITH_0TO0.
1794 * arith.c (gfc_arith_error): Remove handling of ARITH_0TO0.
1795 (gfc_arith_power): Remove special casing of zero to integral
1798 2005-03-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1800 * Make-lang.in (fortran-warn): Remove -Wno-error.
1801 (expr.o-warn, resolve.o-warn, simplify.o-warn,
1802 trans-common.o-warn): Specify -Wno-error.
1804 2005-03-17 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1806 * trans-array.c (gfc_trans_static_array_pointer,
1807 get_array_ctor_var_strlen, gfc_conv_array_index_offset): Fix
1808 comment and formatting typos.
1810 2005-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1812 * invoke.texi: Fix typos.
1814 2005-03-15 Zack Weinberg <zack@codesourcery.com>
1816 * Make-lang.in (GFORTRAN_TEXI): Add gcc-vers.texi.
1818 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
1820 * trans-stmt.c (gfc_trans_label_assign): Don't set DECL_ARTIFICIAL flag
1821 to zero on label_tree.
1823 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
1826 * io.c (resolve_tag): Add checking on assigned label.
1827 (match_dt_format): Does not set symbol assign attribute.
1828 * match.c (gfc_match_goto):Does not set symbol assign attribute.
1829 * resolve.c (resolve_code): Add checking on assigned label.
1830 * trans-common.c (build_field): Deals with common variable assigned
1832 * trans-stmt.c (gfc_conv_label_variable): New function.
1833 (gfc_trans_label_assign): Use it.
1834 (gfc_trans_goto): Ditto.
1835 * trans-io.c (set_string): Ditto.
1836 * trans.h (gfc_conv_label_variable): Add prototype.
1838 2005-03-14 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1841 * symbol.c (check_conflict): A dummy argument can't be a statement
1844 2005-03-14 Zdenek Dvorak <dvorakz@suse.cz>
1846 * fortran/trans-intrinsic.c (gfc_conv_intrinsic_ishft): Convert
1847 the argument of the shift to the unsigned type.
1849 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1852 * resolve.c (gfc_resolve_index): Allow REAL indices as an extension.
1854 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1857 * resolve.c (gfc_resolve): Check if character lengths are
1858 specification expressions.
1860 2005-03-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1863 * trans-array.c (gfc_stack_space_left): Remove unused variable.
1864 (gfc_can_put_var_on_stack): Move to trans-decl.c, remove #if 0'ed
1866 * trans-array.h (gfc_stack_space_left, gfc_can_put_var_on_stack):
1867 Remove declaration / prototype.
1868 * trans-common.c (build_equiv_decl): Give union a name. Check if
1869 it can be put on the stack.
1870 * trans-decl.c (gfc_stack_space_left): Move function here.
1871 (gfc_build_qualified_array): Fix comment typo.
1872 * trans.h (gfc_put_var_on_stack): Add prototype.
1874 2005-03-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1876 * Make-lang.in (fortran-warn): Set to $(STRICT_WARN) -Wno-error.
1877 * decl.c, trans.c: Don't use C++ style comments.
1878 * gfortran.h (sym_flavor, procedure_type, sym_intent, gfc_access,
1879 ifsrc): Give names to enums and use ENUM_BITFIELD.
1880 (gfc_access): Remove trailing comma.
1882 2005-03-05 Steven G. Kargl <kargls@comcast.net>
1885 * primary.c (match_complex_constant): Mangled complex constant may
1886 be an implied do-loop. Give implied do-loop matcher a chance.
1888 2005-03-05 Steven G. Kargl <kargls@comcast.net>
1891 * resolve.c (compare_shapes): New function.
1892 (resolve_operator): Use it.
1894 2005-03-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1896 * trans-const.c (gfc_conv_constant_to_tree): Use correct tree
1897 type for COMPLEX constants.
1899 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1902 * trans-expr.c (gfc_conv_function_call): Correctly dereference
1903 argument from a pointer function also if it has a result clause.
1905 2005-03-04 Steven G. Kargl <kargls@comcast.net>
1907 * expr.c (gfc_copy_shape_excluding): Change && to ||.
1909 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1911 * trans-intrinsic.c (gfc_get_symbol_for_expr): Fix comment typo,
1914 2005-02-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1918 * simplify.c (gfc_simplify_bound): Rename to ...
1919 (simplify_bound): ... this and overhaul.
1921 2005-02-28 Steven G. Kargl <kargl@gcc.gnu.org>
1923 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): remove boolean argument.
1924 (gfc_conv_intrinsic_function): update function calls
1926 2005-02-27 Steven G. Kargl <kargl@gcc.gnu.org>
1929 * trans-types.c (gfc_max_integer_kind): Declare
1930 (gfc_init_kinds): Initialize it.
1931 * gfortran.h (gfc_max_integer_kind): extern it.
1932 * primary.c (match_boz_constant): Use it; remove gfortran extension
1933 of kind suffixes on BOZ literal constants
1936 2005-02-27 Steven G. Kargl <kargls@comcast.net>
1938 * arith.c (gfc_check_real_range): Remove multiple returns
1939 (check_result): New function.
1940 (gfc_arith_uminus,gfc_arith_plus,gfc_arith_times,
1941 gfc_arith_divide,gfc_arith_power,gfc_arith_minus): Use it.
1944 2005-02-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1946 * decl.c, resolve.c, trans-array.c, trans.h: Fix comment typo(s).
1949 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-meunchen.de>
1951 Unrevert previously reverted patch. Adding this fix:
1952 * module.c (find_true_name): Deal with NULL module.
1954 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1956 Revert yesterday's patch:
1957 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1959 * gfortran.h (gfc_component, gfc_actual_arglist, ...
1960 ... argument. Copy string instead of pointing to it.
1962 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1964 * gfortran.h (gfc_get_namespace): Add second argument to prototype.
1965 * intrinsic.c (gfc_intrinsic_init_1): Pass second argument to
1967 * module.c (mio_namespace_ref, load_needed): Likewise.
1968 * parse.c (parse_interface, parse_contained): Likewise. Here the
1969 correct second argument matters.
1970 * symbol.c (gfc_get_namespace): Add parent_types argument, only copy
1971 parent's implicit types if this is set.
1972 (gfc_symbol_init_2): Pass second argument to gfc_get_namespace.
1973 * trans-common.c (build_common_decl): Likewise.
1975 * gfortran.h (symbol_attribute): New 'untyped' field, fix comment
1977 * symbol.c (gfc_set_default_type): Issue error only once, by setting
1978 and checking 'untyped' attribute.
1980 * gfortran.h (gfc_expr): Move 'operator', 'op1', 'op2', and 'uop'
1981 fields into new struct 'op' inside the 'value' union.
1982 * arith.c (eval_intrinsic): Adapt all users.
1983 * dependency.c (gfc_check_dependency): Likewise.
1984 * dump-parse-tree.c (gfc_show_expr): Likewise.
1985 * expr.c (gfc_get_expr): Don't clear removed fields.
1986 (free_expr0, gfc_copy_expr, gfc_type_convert_binary,
1987 gfc_is_constant_expr, simplify_intrinsic_op, check_init_expr,
1988 check_intrinsic_op): Adapt to new field names.
1989 * interface.c (gfc_extend_expr): Likewise. Also explicitly
1990 nullify 'esym' and 'isym' fields of new function call.
1991 * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
1992 Adapt to renamed structure fields.
1993 * matchexp.c (build_node, match_level_1, match_expr): Likewise.
1994 * module.c (mio_expr): Likewise.
1995 * resolve.c (resolve_operator): Likewise.
1996 (gfc_find_forall_index): Likewise. Only look through operands
1997 if dealing with EXPR_OP
1998 * trans-array.c (gfc_walk_op_expr): Adapt to renamed fields.
1999 * trans-expr.c (gfc_conv_unary_op, gfc_conv_power_op,
2000 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
2003 * gfortran.h (gfc_component, gfc_actual_arglist, gfc_user_op): Make
2004 'name' a 'const char *'.
2005 (gfc_symbol): Likewise, also for 'module'.
2006 (gfc_symtree): Make 'name' a 'const char *'.
2007 (gfc_intrinsic_sym): Likewise, also for 'lib_name'.
2008 (gfc_get_gsymbol, gfc_find_gsymbol): Add 'const' qualifier to
2010 (gfc_intrinsic_symbol): Use 'gfc_get_string' instead of 'strcpy' to
2011 initialize 'SYM->module'.
2012 * check.c (gfc_check_minloc_maxloc, check_reduction): Check for NULL
2013 pointer instead of empty string.
2014 * dump-parse-tree.c (gfc_show_actual_arglist): Likewise.
2015 * interface.c (gfc_compare_types): Adapt check to account for possible
2017 (compare_actual_formal): Check for NULL pointer instead of empty
2019 * intrinsic.c (gfc_current_intrinsic, gfc_current_intrinsic_arg):
2020 Add 'const' qualifier.
2021 (conv_name): Return a heap allocated string.
2022 (find_conv): Add 'const' qualifier to 'target'.
2023 (add_sym): Use 'gfc_get_string' instead of 'strcpy'.
2024 (make_generic): Check for NULL pointer instead of empty string.
2025 (make_alias): Use 'gfc_get_string' instead of 'strcpy'.
2026 (add_conv): No need to strcpy result from 'conv_name'.
2027 (sort_actual): Check for NULL pointer instead of empty string.
2028 * intrinsic.h (gfc_current_intrinsic, gfc_current_intrinsic_arg):
2030 * module.c (compare_true_names): Compare pointers instead of strings
2031 for 'module' member.
2032 (find_true_name): Initialize string fields with gfc_get_string.
2033 (mio_pool_string): New function.
2034 (mio_internal_string): Adapt comment.
2035 (mio_component_ref, mio_component, mio_actual_arg): Use
2036 'mio_pool_string' instead of 'mio_internal_string'.
2037 (mio_symbol_interface): Add 'const' qualifier to string arguments.
2038 Add level of indirection. Use 'mio_pool_string' instead of
2039 'mio_internal_string'.
2040 (load_needed, read_module): Use 'gfc_get_string' instead of 'strcpy'.
2041 (write_common, write_symbol): Use 'mio_pool_string' instead of
2042 'mio_internal_string'.
2043 (write_symbol0, write_symbol1): Likewise, also check for NULL pointer
2044 instead of empty string.
2045 (write_operator, write_generic): Pass correct type variable to
2046 'mio_symbol_interface'.
2047 (write_symtree): Use 'mio_pool_string' instead of
2048 'mio_internal_string'.
2049 * primary.c (match_keyword_arg): Adapt check to possible
2050 case of NULL pointer. Use 'gfc_get_string' instead of 'strcpy'.
2051 * symbol.c (gfc_add_component, gfc_new_symtree, delete_symtree,
2052 gfc_get_uop, gfc_new_symbol): Use 'gfc_get_string' instead of
2054 (ambiguous_symbol): Check for NULL pointer instead of empty string.
2055 (gfc_find_gsymbol, gfc_get_gsymbol): Add 'const' qualifier on string
2057 * trans-array.c (gfc_trans_auto_array_allocation): Check for NULL
2058 pointer instead of empty string.
2059 * trans-decl.c (gfc_sym_mangled_identifier,
2060 gfc_sym_mangled_function_id, gfc_finish_var_decl, gfc_get_symbol_decl,
2061 gfc_get_symbol_decl): Likewise.
2062 * trans-io.c (gfc_new_nml_name_expr): Add 'const' qualifier to
2063 argument. Copy string instead of pointing to it.
2065 2005-02-23 Kazu Hirata <kazu@cs.umass.edu>
2067 * intrinsic.h, st.c: Update copyright.
2069 2005-02-20 Steven G. Kargl <kargls@comcast.net>
2071 * symbol.c: Typos in comments.
2073 2005-02-20 Steven G. Kargl <kargls@comcast.net>
2075 * expr.c (gfc_type_convert_binary): Typo in comment.
2077 2005-02-19 Steven G. Kargl <kargls@comcast.net>
2079 * check.c (gfc_check_selected_int_kind): New function.
2080 * intrinsic.h: Prototype it.
2081 * intrinsic.c (add_function): Use it.
2082 * simplify (gfc_simplify_ceiling,gfc_simplify_floor): Change
2083 BT_REAL to BT_INTEGER and use gfc_default_integer_kind.
2085 2005-02-19 Steven G. Kargl <kargls@comcast.net>
2087 * check.c (gfc_check_int): improve checking of optional kind
2088 * simplify.c (gfc_simplify_int): Change BT_REAL to BT_INTEGER
2090 2005-02-19 Steven G. Kargl <kargls@comcast.net>
2092 * check.c (gfc_check_achar): New function
2093 * intrinsic.h: Prototype it.
2094 * intrinsic.c (add_function): Use it.
2096 2005-02-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2098 * trans-stmt.c (generate_loop_for_temp_to_lhs,
2099 generate_loop_for_rhs_to_temp): Remove if whose condition is
2102 2005-02-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2104 * symbol.c (gfc_use_ha_derived): Remove, fold functionality into ...
2105 (gfc_use_derived): ... this function.
2107 2005-02-09 Richard Henderson <rth@redhat.com>
2109 * f95-lang.c (gfc_init_builtin_functions): Call
2110 build_common_builtin_nodes; do not define any functions handled
2113 2005-02-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2115 * expr.c (gfc_copy_expr): Don't copy 'op1' and 'op2' for
2117 (gfc_is_constant_expr): Check 'ref' to determine if substring
2118 reference is constant.
2119 (gfc_simplify_expr): Simplify 'ref' instead of 'op1' and 'op2'.
2120 (check_init_expr, check_restricted): Check 'ref' instead of 'op1'
2122 * module.c (mio_expr): Read / write 'ref' instead of 'op1' and 'op2'.
2124 2005-02-07 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2126 * gfortran.h (gfc_add_dimension, gfc_add_result, gfc_add_save,
2127 gfc_add_dummy, gfc_add_generic, gfc_add_in_common, gfc_add_data,
2128 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
2129 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
2130 gfc_add_procedure): Add argument.
2131 * array.c (gfc_set_array_spec), decl.c (var_element, get_proc_name,
2132 gfc_match_null, match_type_spec, match_attr_spec,
2133 gfc_match_formal_arglist, match_result, gfc_match_function_decl):
2134 Update callers to match.
2135 (gfc_match_entry) : Likewise, fix comment typo.
2136 (gfc_match_subroutine, attr_decl1, gfc_add_dimension,
2137 access_attr_decl, do_parm, gfc_match_save, gfc_match_modproc,
2138 gfc_match_derived_decl): Update callers.
2139 * interface.c (gfc_match_interface): Likewise.
2140 * match.c (gfc_match_label, gfc_add_flavor,
2141 gfc_match_call, gfc_match_common, gfc_match_block_data,
2142 gfc_match_namelist, gfc_match_module, gfc_match_st_function):
2144 * parse.c (parse_derived, parse_interface, parse_contained),
2145 primary.c (gfc_match_rvalue, gfc_match_variable): Likewise.
2146 * resolve.c (resolve_formal_arglist, resolve_entries): Update callers.
2147 * symbol.c (check_conflict, check_used): Add new 'name' argument,
2148 use when printing error message.
2149 (gfc_add_dimension, gfc_add_result, gfc_add_save, gfc_add_dummy,
2150 gfc_add_generic, gfc_add_in_common, gfc_add_data,
2151 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
2152 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
2153 gfc_add_procedure): Add new 'name' argument. Pass along to
2154 check_conflict and check_used.
2155 (gfc_add_allocatable, gfc_add_external, gfc_add_intrinsic,
2156 gfc_add_optional, gfc_add_pointer, gfc_add_target, gfc_add_elemental,
2157 gfc_add_pure, gfc_add_recursive, gfc_add_intent,
2158 gfc_add_explicit_interface, gfc_copy_attr): Pass NULL for new
2159 argument in calls to any of the modified functions.
2161 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
2163 * gfortran.texi: Don't give last update date.
2165 2006-01-30 Richard Henderson <rth@redhat.com>
2167 * options.c (gfc_init_options): Zero flag_errno_math.
2169 2005-01-29 Paul Brook <paul@codesourcery.com>
2172 * check.c (real_or_complex_check): New function.
2173 (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc): New functions.
2174 * intrinsic.c (add_functions): Use new check functions.
2175 * intrinsic.h (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc):
2178 2005-01-29 Steven G. Kargl <kargls@comcast.net>
2181 * expr.c (gfc_check_assign): Check for conformance of logical operands
2183 2004-01-27 Steven Bosscher <stevenb@suse.de>
2185 * trans-decl.c (gfc_build_label_decl): Set DECL_ARTIFICAL and
2186 TREE_USED for all labels.
2187 (gfc_trans_entry_master_switch): Use it instead of building a
2189 * trans-io.c (add_case): Likewise.
2190 * trans-stmt.c (gfc_trans_integer_select): Likewise.
2192 2004-01-23 Paul Brook <paul@codesourcery.com>
2193 Steven G. Kargl <kargls@comcast.net>
2196 * arith.c (gfc_convert_real): Remove sign handling.
2197 * primary.c (match_digits): Allow whitespace after initial sign.
2198 (match_real_const): Handle signs here. Allow whitespace after
2199 initial sign. Remove dead code.
2200 (match_const_complex_part): Remove.
2201 (match_complex_part): Use match_{real,integer}_const.
2202 (match_complex_constant): Cross-promote integer types.
2204 2005-01-23 James A. Morrison <phython@gcc.gnu.org>
2207 * iresolve.c (gfc_resolve_transpose): Resolve to transpose_c4 or
2208 transpose_c8 for complex types.
2210 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
2212 * data.c, dependency.c, f95-lang.c, io.c, trans-array.c,
2213 trans-decl.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
2214 trans-stmt.c, trans-types.c, trans.h: Fix comment typos.
2215 Follow spelling conventions.
2217 2005-01-22 Bud Davis <bdavis9659@comcast.net>
2220 * trans-io.c (gfc_trans_inquire): Added code to support
2223 2005-01-22 Steven G. Kargl <kargls@comcast.net>
2225 * intrinsic.c (make_alias): Add standard argument.
2226 (add_functions): Update make_alias calls.
2228 2005-01-22 Paul Brook <paul@codesourcery.com>
2230 * trans-expr.c (gfc_conv_function_call): Remove bogus TODO.
2232 2005-01-22 Paul Brook <paul@codesourcery.com>
2234 * gfortran.h (gfc_check_access): Add prototype.
2235 * match.c (gfc_match_namelist): Remove TODO.
2236 * module.c (check_access): Rename ...
2237 (gfc_check_access): ... to this. Boolify. Update callers.
2238 * resolve.c (resolve_symbol): Check for private objects in public
2241 2005-01-22 Paul Brook <paul@codesourcery.com>
2243 * primary.c (gfc_match_rvalue): Only apply implicit type if variable
2244 does not have an explicit type.
2245 (gfc_match_variable): Resolve implicit derived types in all cases.
2246 Resolve contained function types from their own namespace, not the
2248 * resolve.c (resolve_contained_fntype): Remove duplicate sym->result
2249 checking. Resolve from the contained namespace, not the parent.
2251 2005-01-22 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2254 * trans-const.c (gfc_conv_constant_to_tree): Give logical
2255 constants the correct type.
2258 * trans-io.c (ADD_STRING): Use gfc_charlen_type_node for string
2260 (gfc_build_io_library_fndecls): 'rec' and 'recl_in' are not
2263 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
2265 * arith.c, array.c, check.c, decl.c, expr.c, f95-lang.c,
2266 gfortran.h, interface.c, intrinsic.c, io.c, iresolve.c,
2267 match.c, matchexp.c, misc.c, module.c, options.c, parse.c,
2268 scanner.c, simplify.c, symbol.c, trans-array.c, trans-expr.c,
2269 trans-io.c, trans-stmt.c, trans.c: Update copyright.
2271 2005-01-17 Ira Rosen <irar@il.ibm.com>
2273 * f95-lang.c (gfc_init_builtin_functions): Call targetm.init_builtins.
2275 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2278 * error.c (error_char): Line-buffer errors / warnings.
2280 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2282 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Fix signed /
2283 unsigned issue. Use build_int_cst instead of converting
2284 integer_zero_node. Remove unnecessary conversion.
2286 * trans-types.c (gfc_get_character_type_len): : Use
2287 gfc_charlen_type_node as basic type for the range field.
2289 * trans-intrinsic.c (build_fixbound_expr,
2290 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_anyall,
2291 gfc_conv_intrinsic_count, gfc_conv_intrinsic_btest,
2292 gfc_conv_intrinsic_singlebitop): Use 'build_int_cst' instead
2293 of converting 'integer_zero_node' or 'integer_one_node'
2295 (gfc_conv_intrinsic_ishftc): Same, but store in local variable to
2297 (gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_rrspacing,
2298 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_iargc): Use
2299 'build_int_cst' instead of converting 'integer_zero_node' or
2300 'integer_one_node' respectively.
2302 * trans-intrinsic.c (gfc_conv_intrinsic_index,
2303 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove
2304 'gfc'-prefix from local variable, remove dead code, use correct
2305 type when inserting argument.
2307 * trans-intrinsic.c, trans-types.c: Update copyright years.
2309 2005-01-16 Steven G. Kargl <kargls@comcast.net>
2312 * resolve.c (check_case_overlap): Typo in comment.
2313 (validate_case_label_expr): Fix up kinds of case values
2314 (resolve_select): Properly handle kind mismatches.
2316 2004-01-16 Paul Brook <paul@codesourcery.com>
2319 * trans-common.c (translate_common): Remove duplicate function call.
2320 (finish_equivalences): Preserve alignment when biasing offsets.
2322 2005-01-15 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de
2324 * primary.c (check_digit): Call 'ISXDIGIT' instead of assuming
2325 ASCII-like character encoding.
2327 2005-01-14 Steven G. Kargl <kargls@comcast.net>
2329 * resolve.c (compare_case): Cleanup.
2331 2005-01-14 Steven G. Kargl <kargls@comcast.net>
2333 * resolve.c (compare_case): Give arguments correct type.
2335 2005-01-13 Kazu Hirata <kazu@cs.umass.edu>
2337 * iresolve.c, trans-common.c, trans-types.c: Fix comment
2340 2005-01-09 Paul Brook <paul@codesourcery.com>
2343 * trans-common.c (current_common, current_offset): Remove.
2344 (create_common): Add head argument.
2345 (align_segment): New function.
2346 (apply_segment_offset): New function.
2347 (translate_common): Merge code from new_segment. Handle alignment.
2348 (new_segment): Remove.
2349 (finish_equivalences): Ensure proper alignment.
2351 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2353 * trans-const.c: Don't include unused math.h.
2355 * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl,
2356 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_minmaxloc,
2357 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_len): Remove
2358 trailing whitespace.
2359 (prepare_arg_info): Fix formatting, indenting and remove trailing
2361 (gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_trim): Remove
2362 trailing whitespace.
2364 * arith.c (arctangent2, gfc_arith_init_1, gfc_arith_done_1,
2365 gfc_constant_result, gfc_range_check, gfc_arith_power,
2366 eval_type_intrinsic0, eval_intrinsic_f2, gfc_real2real,
2367 gfc_real2complex, gfc_complex2int, gfc_complex2real,
2368 gfc_complex2complex): Fix whitespace issues.
2369 * check.c (must_be, type_check, numeric_check, int_or_real_check,
2370 logical_array_check, array_check, scalar_check, nonoptional_check,
2371 variable_check, dim_check, check_a_kind, gfc_check_a_ikind,
2372 gfc_check_a_xkind, gfc_check_abs, gfc_check_all_any,
2373 gfc_check_allocated, gfc_check_a_p, gfc_check_besn,
2374 gfc_check_btest, gfc_check_char, gfc_check_cmplx, gfc_check_count,
2375 gfc_check_cshift, gfc_check_dcmplx, gfc_check_dble,
2376 gfc_check_digits, gfc_check_dot_product, gfc_check_eoshift,
2377 gfc_check_fnum, gfc_check_g77_math1, gfc_check_huge, gfc_check_i,
2378 gfc_check_iand, gfc_check_ibclr, gfc_check_ibits, gfc_check_ibset,
2379 gfc_check_idnint, gfc_check_ieor, gfc_check_index, gfc_check_int,
2380 gfc_check_ior, gfc_check_ishft, gfc_check_ishftc, gfc_check_kind,
2381 gfc_check_lbound, gfc_check_logical, min_max_args,
2382 gfc_check_min_max_integer, gfc_check_min_max_real,
2383 gfc_check_min_max_double, gfc_check_matmul,
2384 gfc_check_minval_maxval, gfc_check_merge, gfc_check_nearest,
2385 gfc_check_pack, gfc_check_precision, gfc_check_radix,
2386 gfc_check_range, gfc_check_real, gfc_check_repeat,
2387 gfc_check_scale, gfc_check_scan, gfc_check_selected_real_kind,
2388 gfc_check_set_exponent): Fix formatting issues.
2389 (gfc_check_size, gfc_check_sign): Alphabetize function order,
2390 remove whitespace-only line.
2391 (gfc_check_fstat, gfc_check_fstat_sub, gfc_check_stat,
2392 gfc_check_stat_sub, gfc_check_transfer, gfc_check_transpose,
2393 gfc_check_ubound, gfc_check_unpack, gfc_check_verify, gfc_check_x,
2394 gfc_check_cpu_time, gfc_check_date_and_time, gfc_check_mvbits,
2395 gfc_check_random_number, gfc_check_random_seed,
2396 gfc_check_second_sub, gfc_check_system_clock,
2397 gfc_check_getcwd_sub, gfc_check_exit, gfc_check_flush,
2398 gfc_check_umask, gfc_check_umask_sub, gfc_check_unlink,
2399 gfc_check_unlink_sub): Fix formatting issues.
2401 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2403 * gfortran.h: Remove outdated comment. Don't include stdio.h
2406 2005-01-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2408 * gfortranspec.c (lang_specific_driver): Change year to 2005 in
2409 output of 'gfortran --version'.
2411 2005-01-03 Steven G. Kargl <kargls@comcast.net>
2413 * arith.c: Add system.h; remove string.h
2419 * check.c: Remove stdlib.h and stdarg.h
2420 * error.c: Remove stdlib.h, stdarg.h, stdio.h, string.h
2421 * expr.c: Add system.h; remove stdarg.h, stdio.h, and string.h
2422 * f95-lang.c: Add system.h; remove stdio.h
2423 * interface.c: Add system.h; remove stdlib.h and string.h
2424 * intrinsic.c: Remove stdarg.h, stdio.h, and string.h
2425 * io.c: Remove string.h
2427 * match.c: Remove stdarg.h and string.h
2428 * misc.c: Update copyright; add system.h; remove stdlib.h,
2429 string.h, and sys/stat.h
2430 * module.c: Add system.h; remove string.h, stdio.h, errno.h,
2431 unistd.h, and time.h
2432 * option.c: Remove string.h and stdlib.h
2434 * scanner.c: Update copyright; add system.h; remove stdlib.h,
2435 stdio.h, string.h, and strings.h
2436 * symbol.c: Add system.h; remove stdlib.h, stdio.h, and string.h
2437 * trans-array.c: Remove stdio.h and gmp.h
2438 * trans-const.c: Ditto
2439 * trans-expr.c: Ditto
2441 * trans-stmt.c: Ditto
2443 * trans-intrinsic.c: Remove stdio.h and string.h
2445 2004-12-29 Steven G. Kargl <kargls@comcast.net>
2447 * gfortran.h (gfc_case): fix typo in comment.
2449 2004-12-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2451 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Change to
2452 logical shift. Call fold. Remove 0-bit shift shortcut.
2453 (gfc_conv_intrinsic_ishftc): Convert first argument to at least
2454 4 bytes bits. Convert 2nd and 3rd argument to 4 bytes. Convert
2455 result if width(arg 1) < 4 bytes. Call fold.
2458 * trans-intrinsic.c (gfc_conv_intrinsic_mod): Update comment
2459 in front of function to match the standard. Correct handling
2462 2004-12-27 Andrew Pinski <pinskia@physics.uc.edu>
2464 * trans-expr.c (gfc_conv_cst_int_power): Only check for
2465 flag_unsafe_math_optimizations if we have a float type.
2467 2004-12-23 Steven G. Kargl <kargls@comcast.net>
2469 * gfortran.texi: Fix typo.
2471 2004-12-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2473 * trans-intrinsic.c (build_fixbound_expr): Clarify comment, fix
2476 2004-12-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2479 * match.c (gfc_match_if): Don't explicitly skip optional whitespace.
2480 (gfc_match_nullify): Make sure that ')' is in front of the end of
2483 * scanner.c (skip_fixed_comments): Fix typo in comment preceding
2486 2004-12-14 Richard Henderson <rth@redhat.com>
2488 * gfortran.h (gfc_expr.function.name): Make const.
2489 (gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
2490 (gfc_get_string): Update prototype.
2491 * iresolve.c: Include tree.h.
2492 (string_node, HASH_SIZE, string_head, hash): Remove.
2493 (gfc_get_string): Use vsnprintf, get_identifier.
2494 (free_strings, gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
2495 * misc.c (gfc_init_1): Don't call gfc_iresolve_init_1.
2496 (gfc_done_1): Don't call gfc_iresolve_done_1.
2497 * module.c (mio_allocated_string): Take and return const char *,
2498 instead of modifying char**.
2499 (mio_expr): Update to match.
2500 * resolve.c (pure_function): Constify name argument.
2501 (resolve_function): Constify name.
2502 * trans-intrinsic.c (gfc_conv_intrinsic_function): Likewise.
2504 2004-12-12 Richard Henderson <rth@redhat.com>
2506 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
2507 gfc_resolve_cshift, gfc_resolve_dot_product, gfc_resolve_eoshift,
2508 gfc_resolve_matmul, gfc_resolve_maxloc, gfc_resolve_maxval,
2509 gfc_resolve_minloc, gfc_resolve_minval, gfc_resolve_pack,
2510 gfc_resolve_product, gfc_resolve_reshape, gfc_resolve_shape,
2511 gfc_resolve_spread, gfc_resolve_sum, gfc_resolve_transpose,
2512 gfc_resolve_unpack: Use PREFIX.
2514 2004-12-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2517 * match.c (gfc_match_common): Skip whitespace.
2519 2004-12-12 Steven G. Kargl <kargls@comcast.net>
2522 * check.c (gfc_check_iand, gfc_check_ibclr, gfc_check_ibits,
2523 gfc_check_ibset, gfc_check_ieor, gfc_check_ior): Remove default
2524 integer kind check; Issue error for -std=f95 when needed.
2525 * intrinsic.c (add_functions): Change ieor from GFC_STD_GNU to
2527 * iresolve.c (gfc_resolve_iand, gfc_resolve_ieor, gfc_resolve_ior):
2528 Promote arguments to same kind.
2530 2004-12-12 Steven G. Kargl <kargls@comcast.net>
2531 Paul Brook <paul@codesourcery.com>
2534 * resolve.c (gfc_resolve_iterator_expr): New function.
2535 (gfc_resolve_iterator): Use it. Add real_ok argument. Convert
2536 start, end and stride to correct type.
2537 (resolve_code): Pass extra argument.
2538 * array.c (resolve_array_list): Pass extra argument.
2539 * gfortran.h (gfc_resolve): Add prototype.
2540 * trans-stmt.c (gfc_trans_do): Remove redundant type conversions.
2541 Handle real type iterators.
2543 2004-12-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2546 * iresolve.c (gfc_resolve_scale): Convert 'I' argument if not of
2547 same kind as C's 'int'.
2548 (gfc_resolve_set_exponent): Convert 'I' argument if not of kind 4.
2550 2004-12-08 Richard Henderson <rth@redhat.com>
2552 * intrinsic.c (gfc_convert_type_warn): Propagate the input shape
2553 to the output expression.
2554 * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift): Suppress
2556 (gfc_resolve_reshape): Force convert SHAPE and ORDER parameters
2559 2004-12-08 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2562 * resolve.c (resolve_code): Impose correct restrictions on
2565 * decl.c (gfc_match_end): Use locus of END when eos is an error.
2567 2004-12-02 Steven G. Kargl <kargls@comcast.net>
2568 Paul Brook <paul@codesourcery.com>
2570 * check.c (gfc_check_flush, gfc_check_fnum): New functions.
2571 (gfc_check_fstat, gfc_check_fstat_sub): New functions.
2572 (gfc_check_stat, gfc_check_stat_sub): New functions.
2573 * gfortran.h (GFC_ISYM_FNUM,GFC_ISYM_FSTAT,GFC_ISYM_STAT): New symbols
2574 * intrinsic.c (add_functions,add_subroutines): Add flush, fnum,
2575 fstat, and stat to intrinsics symbol tables.
2576 * intrinsic.h (gfc_check_flush, gfc_resolve_stat_sub): Add prototypes.
2577 (gfc_resolve_fstat_sub, gfc_resolve_stat): Ditto.
2578 * iresolve.c (gfc_resolve_fnum, gfc_resolve_fstat): New functions.
2579 (gfc_resolve_stat, gfc_resolve_flush): New functions.
2580 (gfc_resolve_stat_sub,gfc_resolve_fstat_sub): New functions
2581 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add new intrinsics.
2583 2004-12-02 Steven G. Kargl <kargls@comcast.net>
2585 * intrinsic.c: Fix and add comments, fix function declarations
2586 (OPTIONAL,REQUIRED): New symbols
2587 (add_functions,add_subroutines): Use symbols
2588 (gmp.h): Remove unused include
2590 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
2592 * f95-lang.c, gfortranspec.c, trans-decl.c: Avoid ` as left quote
2595 2004-11-24 Steven Bosscher <stevenb@suse.de>
2597 * options.c (gfc_post_options): Don't clear flag_inline_functions.
2599 2004-11-20 Steven G. Kargl <kargls@comcast.net>
2601 * check.c (gfc_check_getcwd_sub): Fix seg fault.
2603 * check.c (gfc_check_exit,gfc_check_umask,gfc_check_umask_sub,
2604 gfc_check_unlink,gfc_check_unlink_sub): New functions
2605 * gfortran.h (GFC_ISYM_UMASK,GFC_ISYM_UNLINK): New symbols
2606 * intrinsic.c (add_functions,add_subroutines): Add umask, unlink,
2607 exit to intrinsics symbol tables.
2608 * intrinsic.h (gfc_check_umask,gfc_check_unlink,gfc_check_exit,
2609 gfc_check_umask_sub,gfc_check_unlink_sub,gfc_resolve_umask,
2610 gfc_resolve_unlink,gfc_resolve_exit,gfc_resolve_umask_sub,
2611 gfc_resolve_unlink_sub): Add and sort prototypes.
2612 * iresolve.c (gfc_resolve_umask,gfc_resolve_unlink,gfc_resolve_exit,
2613 gfc_resolve_umask_sub,gfc_resolve_unlink_sub): New functions
2614 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbols
2616 2004-11-16 Paul Brook <paul@codesourcery.com>
2619 * trans-array.c (gfc_trans_allocate_temp_array): Use gfc_get_dtype.
2620 (gfc_array_init_size, gfc_conv_expr_descriptor): Ditto.
2621 * trans-types.c (gfc_get_dtype): Accept array type rather than element
2623 (gfc_get_nodesc_array_type): Don't set GFC_TYPE_ARRAY_DTYPE.
2624 (gfc_get_array_type_bounds): Ditto.
2625 (gfc_get_derived_type): Recurse into derived type pointers.
2626 * trans-types.h (gfc_get_dtype): Add prototype.
2627 * trans.h (GFC_TYPE_ARRAY_DTYPE): Add comment.
2629 2004-11-15 Paul Brook <paul@codesourcery.com>
2631 * trans-types.c (gfc_get_dtype): Remove obsolete TODO.
2633 2004-11-10 Paul Brook <paul@codesourcery.com>
2636 * trans-expr.c (gfc_trans_subarray_assign): Free shape before ss.
2637 * trans-io.c (transfer_array_component): Ditto.
2639 2004-11-10 Paul Brook <paul@codesourcery.com>
2641 * invoke.texi: Fix typo.
2643 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
2645 * arith.c, array.c, decl.c, expr.c, f95-lang.c, gfortran.h,
2646 gfortranspec.c, interface.c, intrinsic.c, iresolve.c, match.c,
2647 module.c, parse.c, parse.h, primary.c, resolve.c, scanner.c,
2648 trans-array.c, trans-array.h, trans-expr.c, trans-intrinsic.c,
2649 trans-io.c, trans-stmt.c, trans.h: Fix comment formatting.
2651 2004-11-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2654 * io.c (resolve_tag): Tighten up exception for assigned FORMAT.
2656 2004-11-06 Kazu Hirata <kazu@cs.umass.edu>
2658 * gfortranspec.c: Replace GNU CC with GCC.
2660 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2662 * gfortranspec.c (lang_specific_driver): Change year to 2004.
2664 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2667 * trans-decl.c (create_function_arglist): Set DECL_ARTIFICIAL for
2670 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2673 * trans-decl.c (gfc_finish_var_decl): Don't declare arguments to
2674 module procedures as if they were module variables.
2676 2004-11-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2681 * module.c (write_symbol1): Set module_name for dummy arguments.
2683 2004-11-02 Paul Brook <paul@codesourcery.com>
2685 * intrinsic.c (check_intrinsic_standard): Include error locus.
2687 (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Pass
2688 locus to check_intrinsic_standard.
2690 2004-10-31 Janne Blomqvist <jblomqvi@cc.hut.fi>
2693 * gfortran.h: Change GFC_STD_* flags to more appropriate
2694 ones. (struct gfc_intrinsic_isym): Add field for standard. (struct
2695 gfc_option_t): Add field for warning about use of nonstandard
2697 * intrinsic.c (add_sym): Add parameter for standard version, check
2698 this against current standard.
2699 (add_sym_0): Pass standard parameter to add_sym.
2700 (add_sym_1, add_sym_0s, add_sym_1s, add_sym_1m, add_sym_2): Ditto.
2701 (add_sym_2s, add_sym_3, add_sym_3ml, add_sym_3red, add_sym_3s): Ditto.
2702 (add_sym_4, add_sym_4s, add_sym_5, add_sym_5s): Ditto.
2703 (make_generic): Add parameter for standard, check this
2704 against currently selected standard.
2705 (add_functions, add_subroutines): Add parameter to tell which
2706 standard an intrinsic belongs to.
2707 (check_intrinsic_standard): New function.
2708 (gfc_intrinsic_func_interface): Add call to check_intrinsic_standard.
2709 (gfc_intrinsic_sub_interface): Ditto.
2710 * lang.opt: Add Wnonstd-intrinsics option.
2711 * options.c (gfc_init_options): Change to use new GFC_STD_* flags,
2713 (set_Wall): Add warning about nonstd intrinsics.
2714 (gfc_handle_option): Change to use new GFC_STD_* flags,
2716 * invoke.texi: Update manual to include -Wnonstd-intrinsics.
2718 2004-10-30 Andrew Pinski <pinskia@physics.uc.edu>
2720 * f95-lang.c (lang_tree_node): Add chain_next to be the TREE_CHAIN.
2722 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2724 * simplify.c (twos_complement): Calculate mask in GMP arithmetic.
2726 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2728 * trans.c (gfc_trans_code): Set global locus after recursing. Fix
2731 2004-10-30 Canqun Yang <canqun@nudt.edu.cn>
2733 * check.c (gfc_check_rand): Allow missing optional argument.
2734 (gfc_check_irand): Ditto.
2735 * intrinsic.c (add_functions): Set arg optional flag for {i,}rand.
2737 2004-10-28 Scott Robert Ladd <scott.ladd@coyotegulch.com>
2739 PR fortran/13490, PR fortran/17912
2740 * gcc/fortran/gfortran.h: Added pedantic_min_int to gfc_integer_info
2741 * gcc/fortran/gfortran.h: Added ARITH_ASYMMETRIC to arith
2742 * gcc/fortran/arith.c: Added support for an "asymmetric integer"
2743 warning when compiling with pedantic.
2744 * gcc/fortran/arith.c: Set minimum integer values to reflect
2745 realities of two's complement signed integers. Added
2748 2004-10-17 Andrew Pinski <pinskia@physics.uc.edu>
2750 * Make-lang.in (F95_ADDITIONAL_OBJS): Kill.
2751 (f951): Do not depend on F95_ADDITIONAL_OBJS and don't
2754 2004-10-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2756 * trans-decl.c (generate_local_decl): Simplify logic, fix comment
2758 (gfc_generate_function_code): Fix formatting issue.
2760 2004-10-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2762 * module.c: Fix formatting issues.
2764 2004-10-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2766 * module.c (mio_interface_rest): Set where member of interface
2769 2004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
2772 * options.c (gfc_handle_option): Add break after handing the
2775 2004-10-08 Tobias Schlueter <tobias.shclueter@physik.uni-muenchen.de>
2777 * arith.c: Fix formatting issues.
2779 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2782 * resolve.c (resolve_operator): Use correct operator name in message.
2784 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2786 * primary.c (match_boz_constant): Allow kind parameter suffixes.
2787 Move standard warning further to the front.
2789 2004-10-07 Kazu Hirata <kazu@cs.umass.edu>
2791 * trans-stmt.c: Fix a comment typo.
2793 2004-10-07 Paul Brook <paul@codesourcery.com>
2796 * trans-array.c (gfc_trans_deferred_array): Leave use associated
2799 2004-10-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2802 * simplify.c (twos_complement): New function.
2803 (gfc_simplify_ishft, gfc_simplify_ishftc): Revise.
2805 * simplify.c (gfc_simplify_abs): Use mpfr_hypot for CABS.
2807 2004-10-06 Paul Brook <paul@codesourcery.com>
2809 * trans-stmt.c (gfc_trans_simple_do): New function.
2810 (gfc_trans_do): Use it. Evaluate iteration bounds before entering
2811 loop. Update comments.
2813 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2816 * iresolve.c (gfc_resolve_pack): Choose function depending if mask
2820 * intrinsic.c (add_sym_5): Remove.
2821 (add_subroutines): Add resolution function for MVBITS.
2822 * intrinsic.h (gfc_resolve_mvbits): Declare resolution function for
2824 * iresolve.c (gfc_resolve_mvbits): New function.
2825 (gfc_resolve_random_number): Remove empty line at end of function.
2827 * trans-const.c (gfc_build_cstring_const): New function.
2828 (gfc_init_cst): Use new function.
2829 * trans-const.h (gfc_build_cstring_const): Add prototype.
2830 * trans-io.c (set_string, set_error_locus): Use new function.
2831 * trans-stmt.c (gfc_trans_goto): Use new function.
2834 * parse.c (accept_statement): Don't treat END DO like END IF and
2836 (parse_do_block): Generate possible END DO label inside END DO
2840 * check.c (gfc_check_system_sub): New function.
2841 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SYSTEM.
2842 * intrinsic.c (add_functions): Add 'system'.
2843 (add_subroutines): Add 'system'.
2844 * intrinsic.h (gfc_check_etime_sub, gfc_check_getcwd_sub):
2845 Move prototypes to other suborutines.
2846 (gfc_check_system_sub, gfc_resolve_system, gfc_resolve_system_sub):
2848 (gfc_resolve_system_clock): Fix formatting of prototype.
2849 * iresolve.c (gfc_resolve_system, gfc_resolve_system_sub): New
2851 * trans-intrinsic.c (gfc_conv_intrinsic_function): Deal with
2854 2004-10-04 Erik Schnetter <schnetter@aei.mpg.de>
2856 * scanner.c (preprocessor_line): Accept preprocessor lines without
2857 file names. Check file names for closing quotes. Handle escaped
2858 quotes in file names.
2860 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2861 Paul Brook <paul@codesourcery.com>
2863 * trans-array.c (gfc_conv_expr_descriptor): Check for substriungs.
2864 Use gfc_get_expr_charlen.
2865 * trans-expr.c (gfc_get_expr_charlen): New function.
2866 * trans.h (gfc_get_expr_charlen): Add prototype.
2868 2004-10-04 Kazu Hirata <kazu@cs.umass.edu>
2870 * trans-intrinsic.c: Fix a comment typo.
2872 2004-10-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2874 * simplify.c (range_check): Remove blank line at beginning of function.
2875 (gfc_simplify_dint): Same at end of function.
2876 (gfc_simplify_exponent, gfc_simplify_fraction): Simplify calculations.
2877 (gfc_simplify_bound): Fix indentation.
2878 (gfc_simplify_log10): Simplify calculation.
2879 (gfc_simplify_min, gfc_simplify_max): Remove blank line at beginning
2881 (gfc_simplify_nearest): Same at end of function.
2882 (gfc_simplify_nint, gfc_simplify_idnint): Same at beginning of
2884 (gfc_simplify_rrspacing, gfc_simplify_set_exponent,
2885 gfc_simplify_spacing): Simplify calulations.
2887 2004-10-03 Feng Wang <fengwang@nudt.edu.cn>
2889 * trans-intrinsic.c: Fix comments on spacing and rrspacing
2890 (gfc_conv_intrinsic_rrspacing): Add fold on constant trees.
2892 2004-10-01 Jan Hubicka <jh@suse.cz>
2894 * f95-lang.c (gfc_expand_function): Update call of
2895 tree_rest_of_compilation.
2896 * trans-decl.c (gfc_generate_constructors): Likewise.
2898 2004-09-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2900 * trans-intrinsic.c: Comment fixes.
2902 2004-09-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2904 * decl.c (add_init_expr_to_sym, variable_decl): Comment fixes.
2906 2004-09-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2908 * trans-types.c (gfc_return_by_reference): Remove superfluous
2911 * intrinsic.h (gfc_resolve_getcwd): Update prototype.
2912 * iresolve.c (gfc_resolve_getcwd): Add second argument to function.
2915 * trans-expr.c (gfc_trans_arrayfunc_assign): Look at resolved
2916 function to determine return type.
2918 2004-09-20 Jan Hubicka <jh@suse.cz>
2920 * trans-decl.c (build_entry_thunks): Finalize the function; do not lower
2922 (gfc_generate_function_code): Likewise.
2924 2004-09-20 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2927 * simplify.c (gfc_simplify_reshape): Set shape of return value
2930 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
2931 Zack Weinberg <zack@codesourcery.com>
2933 * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class
2934 enumeration constants.
2936 2004-09-17 Paul Brook <paul@codesourcery.com>
2938 * gfortran.h (struct gfc_linebuf): Don't use C99 empty arrays.
2939 (gfc_linebuf_header_size): Define.
2940 * scanner.c (load_file): Use it.
2942 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
2944 * array.c, data.c, decl.c, dependency.c, error.c, f95-lang.c,
2945 interface.c, intrinsic.c, io.c, misc.c, module.c, parse.h,
2946 resolve.c, scanner.c, trans-array.c, trans-array.h,
2947 trans-common.c, trans-const.h, trans-decl.c, trans-expr.c,
2948 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
2949 trans.h: Fix comment typos. Follow spelling conventions.
2951 2004-09-16 Victor Leikehman <lei@il.ibm.com>
2954 * trans-io.c (transfer_array_component): New function.
2955 (transfer_expr): For array fields, call transfer_array_component.
2957 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
2959 * gfortran.texi: Fix a typo.
2961 2004-09-15 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
2963 * parse.c (eof_buf): Rename eof to eof_buf.
2964 (unexpected_eof): Same.
2965 (gfc_parse_file): Same.
2967 2004-09-15 Steven G. Kargl <kargls@comcast.net>
2969 * check.c (gfc_check_getcwd_sub): New function.
2970 * gfortran.h (GFC_ISYM_GETCWD): New symbol.
2971 * intrinsic.c (add_functions): Add function definition;
2973 * intrinsic.c (add_subroutines): Add subroutine definitions.
2974 * intrinsic.h: Add prototypes.
2975 * iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub):
2977 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol.
2979 2004-09-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2982 * module.c (write_symbol): Don't fill in module name here.
2983 (write_symbol0): Fill in here instead.
2985 2004-09-14 Kazu Hirata <kazu@cs.umass.edu>
2987 * data.c, decl.c, f95-lang.c, gfortran.h, match.c,
2988 trans-array.c, trans-common.c, trans-expr.c,
2989 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.h: Fix
2990 comment typos. Follow spelling conventions.
2992 2004-09-09 Paul Brook <paul@codesourcery.com>
2994 * scanner.c (get_file): Add ATTRIBUTE_UNUSED.
2996 2004-09-08 Paul Brook <paul@codesourcery.com>
2998 * array.c: Don't include assert.h.
2999 * data.c: Don't include assert.h. Replace assert and abort with
3000 gcc_assert and gcc_unreachable.
3001 * dependency.c: Ditto.
3002 * f95-lang.c: Ditto.
3003 * iresolve.c: Ditto.
3005 * simplify.c: Ditto.
3007 * trans-array.c: Ditto.
3008 * trans-common.c: Ditto.
3009 * trans-const.c: Ditto.
3010 * trans-decl.c: Ditto.
3011 * trans-expr.c: Ditto.
3012 * trans-intrinsic.c: Ditto.
3013 * trans-io.c: Ditto.
3014 * trans-stmt.c: Ditto.
3015 * trans-types.c: Ditto.
3018 2004-09-07 Per Bothner <per@bothner.com>
3019 Paul Brook <paul@codesourcery.com>
3021 * error.c (show_locus): Handle mapped locations.
3022 * f95-lang.c (gfc_be_parse_file): Initialize mapped locations.
3023 * gfortran.h: Include input.h.
3024 (struct gfc_linebuf): Use source_location.
3025 * scanner.c (get_file): Initialize linemap.
3026 (preprocessor_line): Pass extra argument to get_file.
3027 (load_file): Ditto. Setup linemap.
3028 (gfc_new_file): Handle mapped locations.
3029 * trans-common.c (build_field, build_equiv_decl, build_common_decl):
3030 Set decl source locations.
3031 (gfc_trans_common): Set blank common block location.
3032 * trans-decl.c (gfc_set_decl_location): New function.
3033 (gfc_get_label_decl, gfc_get_symbol_decl): Use it.
3034 (trans_function_start): Move call to gfc_set_backend_locus..
3035 (build_function_decl): ... to here.
3036 (build_entry_thunks): Set and restore the backend locus.
3037 (gfc_generate_constructors): Remove excess arguments to
3038 init_function_start.
3039 (gfc_generate_block_data): Add comments. Set the decl locus.
3040 * trans-io.c (set_error_locus): Handle mapped locations.
3041 * trans.c (gfc_get_backend_locus, gfc_get_backend_locus): Ditto.
3042 (gfc_trans_code): Use SET_EXPR_LOCATION.
3043 (gfc_generate_code): Override the location of the new symbol.
3044 * trans.h (gfc_set_decl_location): Add prototype.
3046 2004-08-31 Paul Brook <paul@codesourcery.com>
3048 * trans-types.c (gfc_type_for_mode): Return NULL for unknown modes.
3050 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3053 * trans-intrinsic.c (gfc_conv_intrinsic_merge): Do the right thing for
3056 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3061 * resolve.c (resolve_transfer): New function.
3062 (resolve_code): Call resolve_transfer in case of EXEC_TRANSFER.
3064 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3067 * trans-types.c (gfc_init_types): Make gfc_character1_type_node an
3070 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3072 * CONTRIB, NEWS, README, TODO: Remove obsolete files.
3074 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3077 * trans-types.c (gfc_return_by_reference): Remove TODO error,
3078 add comment pointing out possible issue WRT compatibility with g77.
3080 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3082 * trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace
3083 all occurences of 'gfc_strlen_type_node' by
3084 'gfc_charlen_type_node'.
3085 * trans-types.h: Same. Also update comment accordingly.
3087 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3089 * primary.c: Update copyright boilerplate to say GCC.
3090 * f95-lang.c: Change initial comment to say gfortran.
3092 2004-08-31 Paul Brook <paul@codesourcery.com>
3094 * trans-types.h: Add comments.
3095 (intmax_type_node, string_type_node, const_string_type_node): Remove.
3097 2004-08-30 Richard Henderson <rth@redhat.com>
3099 * Make-lang.in (fortran/f95-lang.o): Update dependencies.
3100 (fortran/trans-decl.o, fortran/trans-types.o): Likewise.
3101 * gfortran.h (gfc_integer_info): Add c_char, c_short, c_int,
3102 c_long, c_long_long.
3103 (gfc_logical_info): Add c_bool.
3104 (gfc_real_info): Add mode_precision, c_float, c_double, c_long_double.
3105 * trans-array.c (gfc_array_allocate): Use TYPE_PRECISION
3106 rather than gfc_int[48]_type_node for allocate choice.
3107 * trans-decl.c (gfc_build_intrinsic_function_decls): Cache
3108 local copies of some kind type nodes.
3109 (gfc_build_builtin_function_decls): Likewise.
3110 * trans-expr.c (gfc_conv_power_op): Likewise.
3111 * trans-intrinsic.c (gfc_conv_intrinsic_index,
3112 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify,
3113 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Likewise.
3114 * trans-stmt.c (gfc_trans_pause, gfc_trans_stop,
3115 gfc_trans_character_select, gfc_trans_allocate): Likewise.
3116 * trans-io.c (gfc_pint4_type_node): Move into ...
3117 (gfc_build_io_library_fndecls): ... here. Cache local copies of
3118 some kind type nodes.
3119 * trans-types.c (gfc_type_nodes): Remove.
3120 (gfc_character1_type_node, gfc_strlen_type_node): New.
3121 (gfc_integer_types, gfc_logical_types): New.
3122 (gfc_real_types, gfc_complex_types): New.
3123 (gfc_init_kinds): Fill in real mode_precision.
3124 (gfc_build_int_type, gfc_build_real_type): New.
3125 (gfc_build_complex_type, gfc_build_logical_type): New.
3126 (c_size_t_size): New.
3127 (gfc_init_types): Loop over kinds.
3128 (gfc_get_int_type, gfc_get_real_type): Use gfc_validate_kind.
3129 (gfc_get_complex_type, gfc_get_logical_type): Likewise.
3130 (gfc_get_character_type_len): Likewise.
3131 (gfc_type_for_size): Loop over kinds; use a reduced set of
3132 unsigned type nodes.
3133 (gfc_type_for_mode): Loop over kinds.
3134 (gfc_signed_or_unsigned_type): Use gfc_type_for_size.
3135 (gfc_unsigned_type, gfc_signed_type): Use gfc_signed_or_unsigned_type.
3136 * trans-types.h (F95_INT1_TYPE, F95_INT2_TYPE, F95_INT4_TYPE,
3137 F95_INT8_TYPE, F95_INT16_TYPE, F95_REAL4_TYPE, F95_REAL8_TYPE,
3138 F95_REAl16_TYPE, F95_COMPLEX4_TYPE, F95_COMPLEX8_TYPE,
3139 F95_COMPLEX16_TYPE, F95_LOGICAL1_TYPE, F95_LOGICAL2_TYPE,
3140 F95_LOGICAL4_TYPE, F95_LOGICAL8_TYPE, F95_LOGICAL16_TYPE,
3141 F95_CHARACTER1_TYPE, NUM_F95_TYPES, gfc_type_nodes,
3142 gfc_int1_type_node, gfc_int2_type_node, gfc_int4_type_node,
3143 gfc_int8_type_node, gfc_int16_type_node, gfc_real4_type_node,
3144 gfc_real8_type_node, gfc_real16_type_node, gfc_complex4_type_node,
3145 gfc_complex8_type_node, gfc_complex16_type_node,
3146 gfc_logical1_type_node, gfc_logical2_type_node,
3147 gfc_logical4_type_node, gfc_logical8_type_node,
3148 gfc_logical16_type_node, gfc_strlen_kind): Remove.
3149 (gfc_character1_type_node): Turn in to a variable.
3150 (gfc_strlen_type_node): Likewise.
3152 2004-08-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3154 * gfortran.h (gfc_namespace): Add new field is_block_data.
3155 * parse.c (accept_statement): Remove special handling for BLOCK DATA.
3156 (parse_block_data): Record BLOCK DATA name, set is_block_data field.
3157 * trans.c (gfc_generate_code): Handle BLOCK DATA units.
3158 * trans.h (gfc_generate_block_data): Add prototype.
3159 * trans-decl.c (gfc_generate_block_data): New function.
3161 2004-08-29 Richard Henderson <rth@redhat.com>
3163 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_export.
3164 * trans-types.c (gfc_init_kinds): Reject integer kinds larger
3165 than two HOST_WIDE_INT.
3167 2004-08-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3170 * decl.c (free_variable, free_value, gfc_free_data, var_list,
3171 var_element, top_var_list, match_data_constant, top_val_list,
3172 gfc_match_data): Move here from match.c.
3173 (match_old_style_init): New function.
3174 (variable_decl): Match old-style initialization.
3175 * expr.c (gfc_get_variable_expr): New function.
3176 * gfortran.h (gfc_get_variable_expr): Add prototype.
3177 * gfortran.texi: Start documentation for supported extensions.
3178 * match.c: Remove the functions moved to decl.c.
3179 * match.h (gfc_match_data): Move prototype to under decl.c.
3180 * symbol.c (gfc_find_sym_tree, gfc_find_symbol): Add/correct
3183 2004-08-29 Steven G. Kargl <kargls@comcast.net>
3184 Paul Brook <paul@codesourcery.com>
3186 * check.c (gfc_check_besn, gfc_check_g77_math1): New functions.
3187 * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Define.
3188 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
3189 (build_builtin_fntypes): New function.
3190 (gfc_init_builtin_functions): Use it.
3191 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_{J,Y}{0,1,N}
3192 and GFC_ISYM_ERF{,C}.
3193 (gfc_c_int_kind): Declare.
3194 * intrinsic.c (add_functions): Add [d]bes* and [d]erf*.
3195 * intrinsic.h (gfc_check_besn, gfc_check_g77_math1, gfc_resolve_besn,
3196 gfc_resolve_g77_math1): Add prototypes.
3197 * resolve.c (gfc_resolve_besn, gfc_resolve_g77_math1): New functions.
3198 * mathbuiltins.def: Add comment. Change third argument. Use
3199 DEFINE_MATH_BUILTIN_C. Add bessel and error functions.
3200 * trans-intrinsic.c (BUILT_IN_FUNCTION): Define.
3201 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
3202 * trans-types.c (gfc_c_int_kind): Declare.
3203 (gfc_init_kinds): Set it.
3205 2004-08-29 Steven G. Kargl <kargls@comcast.net>
3206 Paul Brook <paul@codesourcery.com>
3208 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
3209 (gfc_check_f, gfc_simplify_f): Add f0.
3210 * intrinsic.c (do_check): Call f0. Flatten.
3211 (add_sym_0): Fix prototype. Set f0.
3212 (add_functions): Add getgid, getgid and getuid.
3213 (resolve_intrinsic): Remove obsolete comment.
3214 (do_simplify): Call f0.
3215 * intrinsic.h (gfc_resolve_getgid, gfc_resolve_getpid,
3216 gfc_resolve_getuid): Add prototypes.
3217 * iresolve.c (gfc_resolve_getgid, gfc_resolve_getpid,
3218 gfc_resolve_getuid): New functions.
3219 * trans-intrinsic.c (gfc_conv_intrinsic_function): Handle
3222 2004-08-28 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3224 * error.c (gfc_error_init_1): Remove blank line in front of
3225 function body. Add missing blank.
3226 (gfc_buffer_error, error_char, error_string): Remove blank line in
3227 front of function body.
3228 (show_locus): Add comma in comment.
3229 (gfc_clear_warning, gfc_warning_check, gfc_clear_error,
3230 gfc_push_error, gfc_pop_error): Remove blank line in front of
3232 (gfc_get_errors): Typo fix in comment in front of function. Remove
3233 blank line in front of function body.
3235 2004-08-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3237 * gfortran.h (gfc_default_*_kind): Remove prototypes, add extern
3238 variable declaration of same name.
3239 * arith.c, check.c, decl.c, dump_parse_tree.c, expr.c,
3240 intrinsic.c, io.c, iresolve.c, match.c, options.c, primary.c,
3241 resolve.c, simplify.c, symbol.c, trans-const.c, trans-io.c:
3242 Replace all calls to gfc_default_*_kind with variable accesses.
3243 * trans-types.c: Same as above.
3244 (gfc_default_*_kind_1): Rename to gfc_default_*_kind, remove
3245 static qualifier. Replace all occurences.
3246 (gfc_default_*_kind): Remove functions.
3248 2004-08-26 Richard Henderson <rth@redhat.com>
3250 * arith.c: Include system.h, not real system headers.
3251 (MPZ_NULL, MPF_NULL, DEF_GFC_INTEGER_KIND, DEF_GFC_LOGICAL_KIND,
3252 DEF_GFC_REAL_KIND, GFC_SP_KIND, GFC_SP_PREC, GFC_SP_EMIN, GFC_SP_EMAX,
3253 GFC_DP_KIND, GFC_DP_PREC, GFC_DP_EMIN, GFC_DP_EMAX, GFC_QP_KIND,
3254 GFC_QP_PREC, GFC_QP_EMIN, GFC_QP_EMAX): Remove.
3255 (gfc_integer_kinds, gfc_logical_kinds, gfc_real_kinds,
3256 gfc_index_integer_kind, gfc_default_integer_kind,
3257 gfc_default_real_kind,gfc_default_double_kind,
3258 gfc_default_character_kind, gfc_default_logical_kind,
3259 gfc_default_complex_kind, validate_integer, validate_real,
3260 validate_logical, validate_character,
3261 gfc_validate_kind): Move to trans-types.c.
3262 (gfc_set_model_kind): Use gfc_validate_kind.
3263 (gfc_set_model): Just copy the current precision to default.
3264 (gfc_arith_init_1): Use mpfr precision 128 for integer setup.
3265 * f95-lang.c (gfc_init_decl_processing): Invoke gfc_init_kinds.
3266 * gfortran.h: Update file commentary.
3267 * trans-types.c (MAX_INT_KINDS, MAX_REAL_KINDS): New.
3268 (gfc_default_integer_kind_1, gfc_default_real_kind_1,
3269 gfc_default_double_kind_1, gfc_default_character_kind_1,
3270 gfc_default_logical_kind_1, gfc_default_complex_kind_1): New.
3271 (gfc_init_kinds): New.
3272 (gfc_init_types): Don't set gfc_index_integer_kind here.
3273 * trans-types.h (gfc_init_kinds): Declare.
3274 * doc/invoke.texi: Clarify DOUBLE PRECISION behaviour wrt -r8.
3276 2004-08-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3278 * check.c (gfc_check_atan2): New function.
3279 * intrinsic.c (add_functions): Use gfc_check_atan2 for ATAN2
3280 * intrinsic.h (gfc_check_atan2): Add prototype.
3282 2004-08-25 Richard Henderson <rth@redhat.com>
3284 * arith.c (gfc_validate_kind): Add may_fail argument; abort if
3285 false and we don't validate the kind.
3286 (gfc_check_integer_range, gfc_check_real_range): Update to match.
3287 * check.c (kind_check): Likewise.
3288 * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Likewise.
3289 (match_char_spec, match_logical_spec): Likewise.
3290 * gfortran.h (gfc_validate_kind): Likewise.
3291 * options.c (gfc_handle_option): Likewise.
3292 * primary.c (match_integer_constant, match_real_constant,
3293 match_string_constant, match_logical_constant,
3294 match_const_complex_part): Likewise.
3295 * simplify.c (get_kind, gfc_simplify_bit_size, gfc_simplify_digits,
3296 gfc_simplify_epsilon, gfc_simplify_huge, gfc_simplify_ibclr,
3297 gfc_simplify_ibset, gfc_simplify_ishft, gfc_simplify_ishftc,
3298 gfc_simplify_maxexponent, gfc_simplify_minexponent,
3299 gfc_simplify_nearest, gfc_simplify_not, gfc_simplify_precision,
3300 gfc_simplify_radix, gfc_simplify_range, gfc_simplify_rrspacing,
3301 gfc_simplify_scale, gfc_simplify_spacing, gfc_simplify_tan,
3302 gfc_simplify_tiny): Likewise.
3303 * trans-intrinsic.c (gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod,
3304 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
3305 prepare_arg_info): Likewise.
3307 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3309 * expr.c (gfc_check_assign): Add comment. Add new warning.
3310 * trans-expr.c (gfc_conv_function_call): Correctly dereference
3311 result of pointer valued function when not in pointer assignment.
3313 2004-08-25 Paul Brook <paul@codesourcery.com>
3315 * config-lang.in: Remove dead commented line.
3316 * module.c: Replace g95 with gfortran in comment.
3318 2004-08-25 Paul Brook <paul@codesourcery.com>
3321 * arith.c (gfc_mpfr_to_mpz): Workaround mpfr bug.
3323 2004-08-25 Paul Brook <paul@codesourcery.com>
3326 * trans-array.c (gfc_trans_allocate_temp_array): Remove
3327 string_length argument.
3328 (gfc_trans_array_ctor_element): New function.
3329 (gfc_trans_array_constructor_subarray): Use it.
3330 (gfc_trans_array_constructor_value): Ditto. Handle constant
3332 (get_array_ctor_var_strlen, get_array_ctor_strlen): New functions.
3333 (gfc_trans_array_constructor): Use them.
3334 (gfc_add_loop_ss_code): Update to new gfc_ss layout.
3335 (gfc_conv_ss_descriptor): Remember section string length.
3336 (gfc_conv_scalarized_array_ref): Ditto. Remove dead code.
3337 (gfc_conv_resolve_dependencies): Update to new gfc_ss layout.
3338 (gfc_conv_expr_descriptor): Ditto.
3339 (gfc_conv_loop_setup): Ditto. Spelling fixes.
3340 * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
3341 * trans-const.c (gfc_conv_constant): Update to new gfc_ss layout.
3342 * trans-expr.c (gfc_conv_component_ref): Turn error into ICE.
3343 (gfc_conv_variable): Set string_length from section.
3344 (gfc_conv_function_call): Remove extra argument.
3345 (gfc_conv_expr, gfc_conv_expr_reference): Update to new gfc_ss layout.
3346 * trans-types.c (gfc_get_character_type_len): New function.
3347 (gfc_get_character_type): Use it.
3348 (gfc_get_dtype): Return zero for internal types.
3349 * trans-types.h (gfc_get_character_type_len): Add prototype.
3350 * trans.h (struct gfc_ss): Move string_length out of union.
3352 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3354 * trans.h (build2_v, build3_v): New macros.
3356 * f95-lang.c (gfc_truthvalue_conversion): Use build2 instead of
3358 * trans-array.c (gfc_conv_descriptor_data,
3359 gfc_conv_descriptor_offset, gfc_conv_descriptor_dimension,
3360 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
3361 gfc_conv_descriptor_ubound, gfc_trans_allocate_array_storage,
3362 gfc_trans_allocate_temp_array,
3363 gfc_trans_array_constructor_subarray,
3364 gfc_trans_array_constructor_value, gfc_conv_array_index_ref,
3365 gfc_trans_array_bound_check, gfc_conv_array_index_offset,
3366 gfc_conv_scalarized_array_ref, gfc_conv_array_ref,
3367 gfc_conv_array_ref, gfc_trans_preloop_setup,
3368 gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
3369 gfc_conv_loop_setup, gfc_array_init_size,
3370 gfc_conv_array_initializer, gfc_trans_array_bounds,
3371 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
3372 gfc_conv_expr_descriptor, gfc_conv_array_parameter,
3373 gfc_trans_deferred_array): Use buildN and buildN_v macros instead
3374 of build and build_v as appropriate.
3375 * trans-common.c (create_common): Same.
3376 * trans-decl.c (gfc_trans_auto_character_variable,
3377 gfc_trans_entry_master_switch, gfc_generate_function_code): Same.
3378 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
3379 gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
3380 gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
3381 gfc_conv_expr_op, gfc_conv_function_call,
3382 gfc_trans_structure_assign): Same.
3383 * trans-intrinsic.c (build_fixbound_expr, build_round_expr,
3384 gfc_conv_intrinsic_aint, gfc_conv_intrinsic_bound,
3385 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
3386 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
3387 gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_minmax,
3388 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
3389 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_minmaxloc,
3390 gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
3391 gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_singlebitop,
3392 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
3393 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_strcmp,
3394 gfc_conv_allocated, gfc_conv_associated, prepare_arg_info,
3395 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
3396 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat,
3397 gfc_conv_intrinsic_iargc): Same.
3398 * trans-io.c (set_parameter_value, set_parameter_ref, set_string,
3399 set_flag, add_case, io_result, transfer_namelist_element,
3400 transfer_expr): Same.
3401 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_if_1,
3402 gfc_trans_arithmetic_if, gfc_trans_do, gfc_trans_do_while,
3403 gfc_trans_integer_select, gfc_trans_logical_select,
3404 gfc_trans_character_select, gfc_trans_forall_loop,
3405 gfc_trans_nested_forall_loop, gfc_do_allocate,
3406 generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
3407 compute_inner_temp_size, compute_overall_iter_number,
3408 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
3409 gfc_trans_forall_1, gfc_evaluate_where_mask,
3410 gfc_trans_where_assign, gfc_trans_allocate): Same.
3411 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Same.
3412 * trans.c (gfc_add_modify_expr, gfc_finish_block,
3413 gfc_build_array_ref, gfc_build_function_call,
3414 gfc_trans_runtime_check): Same.
3416 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3418 * trans-const.c (gfc_conv_mpz_to_tree): Change call to
3419 build_int_cst to build_int_cst_wide in accordance to Nathan's
3422 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
3424 * trans-array.c (gfc_trans_array_constructor_value): Adjust
3425 build_int_cst calls.
3426 * trans-const.c (gfc_build_string_const, gfc_init_constants,
3427 gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise.
3428 * trans-decl.c (gfc_get_symbol_decl, build_entry_thunks,
3429 gfc_trans_entry_master_switch): Likewise.
3430 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
3431 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
3432 * trans-io.c (add_case, set_error_locus,
3433 transfer_namelist_element, transfer_expr): Likewise.
3434 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
3435 gfc_trans_stop, gfc_trans_character_select): Likewise.
3436 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
3437 * trans.c (gfc_trans_runtime_check): Likewise.
3439 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3441 * trans-decl.c, trans-types.c: Add and remove blank lines as
3444 2004-08-24 Richard Henderson <rth@redhat.com>
3446 * trans-const.c (gfc_conv_mpz_to_tree): Fix 64-bit shift warning.
3448 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3450 * resolve.c (merge_argument_lists): Revert unintentionally
3453 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3455 * trans-decl.c (build_function_decl): Fix spelling in comment.
3456 (build_entry_thunks): Remove code with no function.
3457 (gfc_build_intrinsic_function_decls): Remove empty line.
3459 * resolve.c (resolve_entries): Fix a bunch of comment typos.
3461 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
3463 * f95-lang.c (gfc_init_decl_processing): Adjust
3464 build_common_tree_nodes call.
3466 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3468 * trans-types.c: Spelling and formatting fixes.
3470 2004-08-23 Richard Henderson <rth@redhat.com>
3472 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_getlimbn instead
3473 of going through an intermediate string. Fix 32/64 int/long bug.
3475 2004-08-23 Eric Christopher <echristo@redhat.com>
3477 * trans-types.c (gfc_type_for_mode): Remove VECTOR_TYPE_SUPPORTED_P
3478 usage. Use build_vector_type_for_mode for vector types.
3480 2004-08-22 Richard Henderson <rth@redhat.com>
3483 * data.c (find_con_by_offset): Search ordered list; handle
3484 elements with repeat counts.
3485 (gfc_assign_data_value_range): New.
3486 * gfortran.h (struct gfc_data_value): Make repeat unsigned.
3487 (gfc_assign_data_value_range): Declare.
3488 * match.c (top_val_list): Extract repeat count into a temporary.
3489 * resolve.c (values): Make left unsigned.
3490 (next_data_value): Don't decrement left.
3491 (check_data_variable): Use gfc_assign_data_value_range.
3493 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3495 * trans-const.c, trans-decl.c, trans-expr.c: Spelling fixes.
3497 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3499 * check.c (gfc_check_reduction): Rename to ...
3500 (check_reduction): ... this. Make static. Don't check type of
3502 (gfc_check_minval_maxval, gfc_check_prodcut_sum): New functions.
3503 * intrinsic.c (add_functions): Change MAXVAL, MINVAL, PRODUCT and
3504 SUM to use new check functions.
3505 (check_specific): Change logic to call new functions.
3506 * intrinsic.h (gfc_check_minval_maxval, gfc_check_product_sum):
3508 (gfc_check_reduction): Remove prototype.
3510 2004-08-20 Paul Brook <paul@codesourcery.com>
3511 Canqun Yang <canqun@nudt.edu.cn>
3514 * trans-array.c (gfc_conv_array_parameter): Pass correct pointer
3515 for automatic arrays.
3516 * trans-types.c (gfc_get_nodesc_array_type): Add comment.
3518 2004-08-19 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3522 * match.c (match_simple_forall, match_simple_where): Forward-declare.
3523 (gfc_match_if): Order statement list alphabetically, add WHERE and
3524 FORALL, remove double PAUSE.
3525 (gfc_match_simple_where, match_forall_header,
3526 gfc_match_simple_forall): New functions.
3527 (gfc_match_forall): Use match_forall_header.
3529 2004-08-19 Paul Brook <paul@codesourcery.com>
3532 * gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0.
3533 * symbol.c (gfc_clear_attr): Use memset.
3535 2004-08-19 Paul Brook <paul@codesourcery.com>
3539 * data.c (assign_substring_data_value): Remove.
3540 (create_character_intializer): New function.
3541 (gfc_assign_data_value): Track the typespec for the current
3542 subobject. Use create_character_intializer.
3544 2004-08-19 Erik Schnetter <schnetter@aei.mpg.de>
3547 * check.c (gfc_check_reduction): New function.
3548 (gfc_check_minval_maxval): Removed.
3549 (gfc_check_product): Removed.
3550 (gfc_check_sum): Removed.
3551 * intrinsic.h: Add/remove declarations for these.
3552 * gfortran.h: Add field f3red to union gfc_check_f.
3553 * intrinsic.c (add_sym_3red): New function.
3554 (add_functions): Register maxval, minval, product, and sum intrinsics
3555 through add_sym_3red.
3556 (check_specific): Handle f3red union field.
3557 * iresolve.c: Whitespace change.
3559 2004-08-18 Paul Brook <paul@codesourcery.com>
3561 * trans-types.c (gfc_sym_type): Use pointer types for optional args.
3563 2004-08-18 Victor Leikehman <lei@il.ibm.com>
3566 * trans-io.c (transfer_namelist_element): New. Recursively handle
3567 derived-type variables. Pass string lengths.
3568 (build_dt): Code moved to build_namelist, with some
3569 changes and additions.
3570 (gfc_build_io_library_fndecls): Declare the fifth
3571 argument in st_set_nml_var_char -- string_length.
3573 2004-08-17 Paul Brook <paul@codesourcery.com>
3574 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3577 * decl.c (get_proc_name): Update mystery comment.
3578 (gfc_match_entry): Check for errors earlier. Add entry point to list.
3579 * dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes.
3580 * gfortran.h (symbol_attribute): Add entry_master. Document entry.
3581 (struct gfc_entry_list): Define.
3582 (gfc_get_entry_list): Define.
3583 (struct gfc_namespace): Add refs and entries.
3584 (enum gfc_exec_op): Add EXEC_ENTRY.
3585 (struct gfc_code): Add ext.entry.
3586 * module.c (ab_attribute, attr_bits): Remove AB_ENTRY.
3587 (mio_symbol_attribute): Don't save/reture addr->entry.
3588 (mio_namespace_ref): Refcount namespaces.
3589 * parse.c (accept_statement): Handle ST_ENTRY.
3590 (gfc_fixup_sibling_symbols): Mark symbol as referenced.
3591 (parse_contained): Fixup sibling references to entry points
3592 after parsing the procedure body.
3593 * resolve.c (resolve_contained_fntype): New function.
3594 (merge_argument_lists, resolve_entries): New functions.
3595 (resolve_contained_functions): Use them.
3596 (resolve_code): Handle EXEC_ENTRY.
3597 (gfc_resolve): Call resolve_entries.
3598 * st.c (gfc_free_statement): Handle EXEC_ENTRY.
3599 * symbol.c (gfc_get_namespace): Refcount namespaces.
3600 (gfc_free_namespace): Ditto.
3601 * trans-array.c (gfc_trans_dummy_array_bias): Treat all args as
3602 optional when multiple entry points are present.
3603 * trans-decl.c (gfc_get_symbol_decl): Remove incorrect check.
3604 (gfc_get_extern_function_decl): Add assertion. Fix coment.
3605 (create_function_arglist, trans_function_start, build_entry_thunks):
3607 (gfc_build_function_decl): Rename ...
3608 (build_function_decl): ... to this.
3609 (gfc_create_function_decl): New function.
3610 (gfc_generate_contained_functions): Use it.
3611 (gfc_trans_entry_master_switch): New function.
3612 (gfc_generate_function_code): Use new functions.
3613 * trans-stmt.c (gfc_trans_entry): New function.
3614 * trans-stmt.h (gfc_trans_entry): Add prototype.
3615 * trans-types.c (gfc_get_function_type): Add entry point argument.
3616 * trans.c (gfc_trans_code): Handle EXEC_ENTRY.
3617 (gfc_generate_module_code): Call gfc_create_function_decl.
3618 * trans.h (gfc_build_function_decl): Remove.
3619 (gfc_create_function_decl): Add prototype.
3621 2004-08-15 Andrew Pinski <apinski@apple.com>
3624 * f95-lang.c (gfc_init_builtin_functions): Initialize the builtins
3625 for cabs{,f} and copysign{,f}.
3626 * trans-decl.c (gfor_fndecl_math_cabsf): Delete.
3627 (gfor_fndecl_math_cabs): Delete.
3628 (gfor_fndecl_math_sign4): Delete.
3629 (gfor_fndecl_math_sign8): Delete.
3630 (gfc_build_intrinsic_function_decls): Remove the
3631 initializing of cabs{,f} and copysign{,f} functions.
3632 * trans-intrinsic.c (gfc_conv_intrinsic_abs): Use the builtins
3633 instead of the functions definitions.
3634 (gfc_conv_intrinsic_sign): Likewise.
3635 * trans.h (gfor_fndecl_math_cabsf): Delete.
3636 (gfor_fndecl_math_cabs): Delete.
3637 (gfor_fndecl_math_sign4): Delete.
3638 (gfor_fndecl_math_sign8): Delete.
3640 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
3642 * trans-array.c (gfc_trans_array_constructor_value): Use
3644 * trans-const.c (gfc_build_string_const,
3645 gfc_init_constants, gfc_conv_mpz_to_tree,
3646 gfc_conv_constant_to_tree): Likewise.
3647 * trans-decl.c (gfc_get_symbol_decl): Likewise.
3648 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
3649 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
3650 * trans-io.c (add_case, set_error_locus, build_dt,
3651 transfer_expr): Likewise.
3652 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
3653 gfc_trans_stop, gfc_trans_character_select): Likewise.
3654 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
3655 * trans.c (gfc_trans_runtime_check): Likewise.
3657 2004-08-14 Paul Brook <paul@codesourcery.com>
3659 * trans-decl.c (gfc_build_function_decl): Remove dead code.
3661 2004-08-14 Paul Brook <paul@codesourcery.com>
3663 * trans-arry.c (gfc_trans_auto_array_allocation): Remove unused var.
3665 2004-08-13 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3667 * gfortran.h: Add comments.
3668 * parse.c (parse_contained): Fix comment typo.
3669 * resolve.c (was_declared): Ditto.
3672 2004-08-11 Paul Brook <paul@codeourcery.com>
3675 * intrinsic.c (add_functions): Add dfloat as an alias for dble.
3677 2004-08-10 Richard Henderson <rth@redhat.com>
3679 * f95-lang.c (gfc_init_builtin_functions): Remove
3680 __builtin_stack_alloc, add __builtin_alloca.
3681 * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR.
3682 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
3684 2004-08-10 Paul Brook <paul@codesourcery.com>
3686 * trans-io.c (transfer_expr): Handle pointters.
3688 2004-08-10 Paul Brook <paul@codesourcery.com>
3691 * trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT.
3692 (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta.
3693 (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary):
3694 Handle GFC_SS_COMPONENT.
3695 (gfc_conv_ss_startstride): Ditto. Set ss->shape.
3696 (gfc_conv_loop_setup): Tweak commends. Remove dead code.
3698 (gfc_conv_array_initializer): Call specific initializer routines.
3699 * trans-expr.c (gfc_trans_structure_assign): New function.
3700 (gfc_trans_subarray_assign): New function.
3701 (gfc_trans_subcomponent_assign): New fucntion
3702 (gfc_conv_structure): Use them.
3703 * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT.
3704 (gfc_ss): Add shape.
3706 2004-08-08 Victor Leikehman <lei@il.ibm.com>
3708 * simplify.c (gfc_simplify_shape): Bugfix.
3709 * expr.c (gfc_copy_shape_excluding): New function.
3710 * gfortran.h (gfc_get_shape): Bugfix.
3711 (gfc_copy_shape_excluding): Added declaration.
3712 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
3713 gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound,
3714 gfc_resolve_ubound, gfc_resolve_transpose): Added compile
3715 time resolution of shape.
3717 2004-08-06 Janne Blomqvist <jblomqvi@cc.hut.fi>
3719 * intrinsic.c (add_subroutines): Add getenv and
3720 get_environment_variable. (add_sym_5s): New function.
3721 * intrinsic.h (gfc_resolve_get_environment_variable): Add
3723 * iresolve.c (gfc_resolve_get_environment_variable): New
3726 2004-08-06 Feng Wang <fengwang@nudt.edu.cn>
3728 * f95-lang.c (gfc_init_builtin_functions): Fix the number of
3729 __builtin_pow[f] arguments.
3731 2004-08-06 Steven G. Kargl <kargls@comcast.net>
3733 * arith.c: Add #define for model numbers. Remove global GMP variables.
3734 (natural_logarithm,common_logarithm,exponential,sine,
3735 cosine,arctangent,hypercos,hypersine ): Remove.
3736 (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions.
3737 (arctangent2,gfc_arith_init_1,gfc_arith_done_1
3738 gfc_check_real_range, gfc_constant_result, gfc_range_check,
3739 gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times,
3740 gfc_arith_divide,complex_reciprocal,complex_pow_ui,
3741 gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real,
3742 gfc_convert_complex,gfc_int2real,gfc_int2complex,
3743 gfc_real2int,gfc_real2real,gfc_real2complex,
3744 gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP
3745 to MPFR, use new functions.
3746 * arith.h: Remove extern global variables.
3747 (natural_logarithm,common_logarithm,exponential, sine, cosine,
3748 arctangent,hypercos,hypersine): Remove prototypes.
3749 (arctangent2): Update prototype from GMP to MPFR.
3750 (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes.
3751 * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR.
3752 * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR.
3753 * gfortran.h (GFC_REAL_BITS): Remove.
3754 (arith): Add ARITH_NAN.
3755 Include mpfr.h. Define GFC_RND_MODE.
3756 Rename GCC_GFORTRAN_H GFC_GFC_H.
3757 (gfc_expr): Convert GMP to MPFR.
3758 * module.c: Add arith.h, correct type in comment.
3759 (mio_gmp_real): Convert GMP to MPFR.
3760 (mio_expr): Use gfc_set_model_kind().
3761 * primary.c: Update copyright date with 2004.
3762 (match_real_constant,match_const_complex_part): Convert GMP to MPFR.
3763 * simplify.c: Remove global GMP variables
3764 (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag,
3765 gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint,
3766 gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan,
3767 gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx,
3768 gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh,
3769 gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon,
3770 gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor,
3771 gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int,
3772 gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log,
3773 gfc_simplify_log10,simplify_min_max,gfc_simplify_mod,
3774 gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint,
3775 gfc_simplify_rrspacing,gfc_simplify_scale,
3776 gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin,
3777 gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt,
3778 gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny,
3779 gfc_simplify_init_1,gfc_simplify_done_1): Convert GMP to MPFR.
3781 * trans-const.c (gfc_conv_mpfr_to_tree): Rename from
3782 gfc_conv_mpf_to_tree. Convert it to use MPFR
3783 (gfc_conv_constant_to_tree): Use it.
3784 * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree().
3785 * trans-intrinsic.c: Add arith.h, remove gmp.h
3786 (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR.
3788 2004-08-06 Victor Leikehman <lei@il.ibm.com>
3789 Paul Brook <paul@codesourcery.com>
3791 * trans-array.c (gfc_trans_allocate_array_storage,
3792 gfc_trans_allocate_temp_array, gfc_add_loop_ss_code,
3793 gfc_conv_loop_setup): For functions, if the shape of the result
3794 is not known in compile-time, generate an empty array descriptor for
3795 the result and let the callee to allocate the memory.
3796 (gfc_trans_dummy_array_bias): Do nothing for pointers.
3797 (gfc_conv_expr_descriptor): Use function return values directly.
3798 * trans-expr.c (gfc_conv_function_call): Always add byref call
3800 (gfc_trans_pointer_assignment): Add comments.
3801 (gfc_trans_arrayfunc_assign): Don't chain on expression.
3803 2004-08-01 Roger Sayle <roger@eyesopen.com>
3805 * options.c (gfc_init_options): Don't warn about the use GNU
3806 extensions by default.
3807 (gfc_post_options): Warn about GNU extensions with -pedantic.
3808 (gfc_handle_option): Don't warn about GNU extensions with -std=gnu.
3810 2004-07-30 Richard Henderson <rth@redhat.com>
3812 * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL
3815 2004-07-25 Richard Henderson <rth@redhat.com>
3817 * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL
3818 and DECL_IGNORED_P on RESULT_DECL.
3819 (gfc_generate_constructors): Likewise.
3821 2004-07-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3824 * lang.opt (ffixed-line-length-none, ffixed-line-length-): New
3826 (ffixed-line-length-80, ffixed-line-length-132): Remove.
3827 * options.c (gfc_handle_options): Deal with changed options.
3828 * scanner.c (load_line): Change second arg to 'char **',
3829 allocate if pointing to NULL. Keep track of buffer's length.
3830 Adapt buffer size to overlong lines. Pad lines to full length
3832 (load_file): Adapt to new interface of load_line.
3834 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
3836 * trans.h (builtin_function): Declare.
3838 2004-07-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3841 (parts ported from g95)
3842 * parse.h (gfc_state_data): New field do_variable.
3843 (gfc_check_do_variable): Add prototype.
3844 * parse.c (push_state): Initialize field 'do_variable'.
3845 (gfc_check_do_variable): New function.
3846 (parse_do_block): Remember do iterator variable.
3847 (parse_file): Initialize field 'do_variable'.
3848 * match.c (gfc_match_assignment, gfc_match_do,
3849 gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate):
3850 Add previously missing checks.
3851 (gfc_match_return): Reformat error message.
3852 * io.c (match_out_tag): New function.
3853 (match_open_element, match_close_element,
3854 match_file_element, match_dt_element): Call match_out_tag
3855 instead of match_vtag where appropriate.
3856 (match_io_iterator, match_io_element): Add missing check.
3857 (match_io): Reformat error message.
3858 (match_inquire_element): Call match_out_tag where appropriate.
3860 * parse.c (gfc_check_do_variable): Fix error locus.
3862 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3865 * trans-decl.c (gfc_build_function_decl): Create a new chardecl
3866 for every assumed length character dummy argument.
3869 * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion.
3872 * simplify.c (gfc_simplify_bound): Copy the bound expression.
3874 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3877 * trans-array.c gfc_trans_g77_array,
3878 gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init
3879 for assumed length characters.
3880 (gfc_conv_expr_descriptor): Set se->string_length if dealing
3881 with a character expression.
3882 (gfc_cvonv_array_parameter): Pass string length when passing
3883 character array according to g77 conventions.
3885 2004-07-12 Paul Brook <paul@codesourcery.com>
3887 * expr.c (gfc_check_assign_symbol): Handle pointer assignments.
3888 * trans-array.c (gfc_trans_auto_array_allocation): Remove
3889 initialization code.
3890 * trans-common.c (create_common): Use gfc_conv_initializer.
3891 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer.
3892 * trans-expr.c (gfc_conv_initializer): New function.
3893 (gfc_conv_structure): Use it.
3894 * trans.h (gfc_conv_initializer): Add prototype.
3896 2004-07-11 Paul Brook <paul@codesourcery.com>
3899 * parse.c (gfc_fixup_sibling_symbols): Also look for untyped
3901 (parse_contained): Mark contained symbols as referenced.
3903 2004-07-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3906 * module.c (gfc_dump_module, gfc_use_module): Print locus
3907 when opening of module file fails.
3910 * io.c (match_io): Flag 'WRITE(...), ...' as extension.
3913 * match.c (gfc_match_program): A program name is obligatory.
3914 (gfc_match_return): RETURN in main program is an extension.
3915 (gfc_match_block_data): A space is required before a block data
3919 * primary.c (match_boz_constant): Call gfc_notify_std only if
3920 we actually have a non-standard boz-literal-constant.
3923 * expr.c (gfc_check_assign): Print ranks if incompatible. Issue
3924 warning if assigning NULL().
3926 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
3928 * f95-lang.c (set_block): Remove.
3929 (gfc_clear_binding_stack): New.
3930 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
3931 (struct binding_level): Remove block_created_by_back_end.
3932 (clear_binding_level): Likewise.
3933 (poplevel): Don't handle block_created_by_back_end.
3935 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3937 * trans-decl.c (gfc_create_module_variable): Nothing to do if
3938 symbol is in common, because we ...
3939 (gfc_generate_module_vars): Call gfc_trans_common.
3941 2004-07-10 Paul Brook <paul@codesourcery.com>
3943 * trans-array.c (gfc_build_null_descriptor): New function.
3944 (gfc_trans_static_array_pointer): Use it.
3945 * trans-array.h (gfc_build_null_descriptor): Add prototype.
3946 * trans-expr.c (gfc_conv_structure): Handle array pointers.
3948 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3951 * decl.c (gfc_match_save): Use-associated common block
3953 * gfortran.h (gfc_common_head): Add new field 'name'.
3954 Fix typo in comment after #endif.
3955 * match.c (gfc_get_common): Add new argument from_common,
3956 mangle name if flag is set, fill in new field in structure
3958 (match_common): Set new arg in call to gfc_get_common,
3959 use-associated common block doesn't collide.
3960 * match.h (gfc_get_common): Adapt prototype.
3961 * module.c (load_commons): Set new arg in call to
3963 * symbol.c (free_common_tree): New function.
3964 (gfc_free_namespace): Call new function.
3965 * trans-common.c (several functions): Remove argument
3966 'name', use name from gfc_common_head instead.
3968 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3970 * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
3971 and RHS match. Return early if the RHS is NULL().
3974 * match.c (match_common): Fix error reporting for used common.
3977 * trans-expr.c (gfc_conv_structure): Handle initialization
3978 of scalar pointer components.
3980 * parse.c (decode_statement): Fix matching of BLOCK DATA.
3982 * trans-decl.c (generate_local_decl): Remove workaround obsoleted
3983 by fix for PR 15481.
3985 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3987 * trans-common.c: Fix whitespace issues, make variable names
3989 (create_common): Additionally, make loop logic more obvious.
3991 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3992 Paul Brook <paul@codesourcery.com>
3995 * trans-common.c (calculate_length): Remove ...
3996 (get_segment_info): Merge into here. Save field type.
3997 (build_field): Use saved type.
3998 (create_common, new_condition, new_segment, finish_equivalences):
3999 Use new get_segment_info.
4000 * trans-types.c: Update comment.
4002 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4005 * moduele.c (mio_symbol): Don't I/O initial values unless
4006 symbol is a parameter.
4008 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4011 * resolve.c (resolve_symbol): Verify that the shape of a
4012 parameter array is not only explicit, but also constant.
4013 * array.c (gfc_is_compile_time_shape): New function.
4014 * gfortran.h (gfc_is_compile_time_shape): Add prototype.
4016 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4022 * module.c (write_symbol, write_symtree): Remove workaround.
4023 * primary.c (match_actual_arglist): Enhance comment.
4024 (gfc_match_rvalue): Handle function call with first argument
4025 a keyword argument correctly.
4026 * resolve.c (resolve_symbol): Change call to
4027 gfc_set_default_type to issue error if no implicit type
4029 * trans-decl.c (gfc_create_module_variable): Remove workaround.
4031 2004-07-08 Paul Brook <paul@codesourcery.com>
4033 * intrinsic.c (add_sym_4s): New function.
4034 (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
4036 2004-07-04 Janne Blomqvist <jblomqvi@cc.hut.fi>
4037 Paul Brook <paul@codesourcery.com>
4041 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
4042 GFC_ISYM_COMMAND_ARGUMENT_COUNT.
4043 * intrinsic.c (add_functions): Identify iargc. Add
4044 command_argument_count.
4045 (add_subroutines): Resolve getarg. Add get_command and
4046 get_command_argument.
4047 * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
4048 gfc_resolve_get_command_argument): Add prototypes.
4049 * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
4050 gfc_resolve_get_command_argument): New functions.
4051 * trans-decl.c (gfor_fndecl_iargc): New variable.
4052 (gfc_build_intrinsic_function_decls): Set it.
4053 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
4054 (gfc_conv_intrinsic_function): Use it.
4055 * trans.h (gfor_fndecl_iargc): Declare.
4057 2004-07-04 Matthias Klose <doko@debian.org>
4059 * Make-lang.in: Generate and install gfortran man page.
4060 * invoke.texi: Remove extra '@c man end'.
4062 2004-07-04 Richard Henderson <rth@redhat.com>
4064 * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
4066 2004-07-04 Paul Brook <paul@codesourcery.com>
4068 * decl.c (gfc_match_implicit_range): Don't use typespec.
4069 (gfc_match_implicit): Handle character selectors.
4070 * gfortran.h (gfc_set_implicit): Remove prototype.
4071 (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
4072 * parse.c (accept_statement): Don't call gfc_set_implicit.
4073 * symbol.c (new_ts): Remove.
4074 (gfc_set_implicit_none): Use same loop bounds as other functions.
4075 (gfc_set_implicit): Remove.
4076 (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
4077 (gfc_merge_new_implicit): Combine with gfc_set_implicit.
4079 2004-06-30 Richard Henderson <rth@redhat.com>
4081 * match.c (var_element): Remove unused variable.
4083 * trans-decl.c (gfc_generate_function_code): Don't set
4084 x_whole_function_mode_p.
4085 (gfc_generate_constructors): Likewise.
4087 2004-06-30 Richard Henderson <rth@redhat.com>
4089 * trans-decl.c (gfc_generate_function_code): Don't set
4090 immediate_size_expand.
4091 (gfc_generate_constructors): Likewise.
4093 2004-06-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4096 * decl.c (gfc_match_type_spec): Rename second argument to
4097 'implicit_flag', reverse meaning. Don't match_char_spec if
4098 'implicit_flag' is set. Rename to ...
4099 (match_type_spec): ... this.
4100 (gfc_match_implicit_none, match_implicit_range): Move here
4102 (gfc_match_implicit): Move here from match.c, try to
4103 match_char_len if match_implicit_range doesn't succeed for
4104 CHARACTER implicits. Call renamed fucntion match_type_spec.
4105 (gfc_match_data_decl, match_prefix): Call renamed function
4107 * match.c (gfc_match_implicit_none, match_implicit_range,
4108 gfc_match_implicit): Move to decl.c.
4109 * match.h (gfc_match_implicit_none, gfc_match_implicit):
4110 Move protoypes to section 'decl.c'.
4111 (gfc_match_type_spec): Remove prototype.
4113 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4115 * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
4118 2004-06-29 Steven Bosscher <stevenb@suse.de>
4120 Make sure types in assignments are compatible. Mostly mechanical.
4121 * trans-const.h (gfc_index_one_node): New define.
4122 * trans-array.c (gfc_trans_allocate_array_storage,
4123 gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
4124 gfc_trans_array_constructor_value, gfc_trans_array_constructor,
4125 gfc_conv_array_ubound, gfc_conv_array_ref,
4126 gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
4127 gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
4128 gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
4129 gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
4130 types in assignments, conversions and conditionals for expressions.
4131 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
4132 gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
4133 gfc_conv_function_call, gfc_trans_pointer_assignment,
4134 gfc_trans_scalar_assign): Likewise.
4135 * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
4136 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
4137 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
4138 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
4139 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
4140 gfc_conv_allocated, gfc_conv_associated,
4141 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
4142 * trans-io.c (set_string): Likewise.
4143 * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
4144 gfc_do_allocate, generate_loop_for_temp_to_lhs,
4145 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
4146 compute_overall_iter_number, gfc_trans_assign_need_temp,
4147 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
4148 gfc_evaluate_where_mask, gfc_trans_where_assign,
4149 gfc_trans_where_2): Likewise.
4150 * trans-types.c (gfc_get_character_type, gfc_build_array_type,
4151 gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
4153 * trans.c (gfc_add_modify_expr): Add sanity check that types
4154 for the lhs and rhs are the same for scalar assignments.
4156 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4158 * dump-parse-tree.c (show_common): New function.
4159 (gfc_show_namespace): Show commons.
4161 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4162 Andrew Vaught <andyv@firstinter.net>
4166 * decl.c (gfc_match_save): Adapt to new common structures,
4167 don't allow saving USE-associated common.
4168 * dump-parse-tree (gfc_show_attr): (saved_)common are not
4169 symbol attributes any longer.
4170 (gfc_show_symbol): Don't show old-style commons any longer.
4171 (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
4173 * gfortran.h (symbol_attribute): Remove common and saved_common
4175 (gfc_symbol): Remove common_head element.
4176 (gfc_common_head): New struct.
4177 (gfc_get_common_head): New macro.
4178 (gfc_symtree): Add field 'common' to union.
4179 (gfc_namespace): Add field 'common_root'; change type of field
4180 'blank_common' to blank_common.
4181 (gfc_add_data): New prototype.
4182 (gfc_traverse_symtree): Expect a symtree as first argument
4183 instead of namespace.
4184 * match.c (gfc_get_common): New function.
4185 (match_common_name): Change to take char * as argument, adapt,
4186 fix bug with empty name.
4187 (gfc_match_common): Adapt to new data structures. Disallow
4188 redeclaration of USE-associated COMMON-block. Fix bug with
4190 (var_element): Adapt to new common structures.
4191 * match.h (gfc_get_common): Declare.
4192 * module.c: Add 2004 to copyright years, add commons to module
4193 file layout description.
4194 (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
4195 for removed attributes.
4196 (mio_symbol): Adapt to new way of storing common relations.
4197 (load_commons): New function.
4198 (read_module): Skip common list on first pass, load_commons at
4200 (write_commons): New function.
4201 (write_module): Call write_commons().
4202 * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
4203 functions related to removed attributes.
4204 (gfc_add_data): New function.
4205 (gfc_clear_attr): Don't set removed attributes.
4206 (gfc_copy_attr): Don't copy removed attributes.
4207 (traverse_symtree): Remove.
4208 (gfc_traverse_symtree): Don't traverse symbol
4209 tree of the passed namespace, but require a symtree to be passed
4210 instead. Unify with traverse_symtree.
4211 (gfc_traverse_ns): Call gfc_traverse_symtree according to new
4213 (save_symbol): Remove setting of removed attribute.
4214 * trans-common.c (gfc_sym_mangled_common_id): Change to
4215 take 'char *' argument instead of 'gfc_symbol'.
4216 (build_common_decl, new_segment, translate_common): Adapt to new
4217 data structures, add new
4219 (create_common): Adapt to new data structures, add new
4220 argument name. Fix typo in intialization of derived types.
4221 (finish_equivalences): Add second argument in call to
4223 (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
4224 (gfc_trans_common): Adapt to new data structures.
4225 * trans-decl.c (gfc_create_module_variables): Remove test for
4228 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4230 * io.c: Add 2004 to copyright years.
4232 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4233 Andrew Vaught <andyv@firstinter.net>
4235 * gfortran.h (gfc_gsymbol): New typedef.
4236 (gfc_gsym_root): New variable.
4237 (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
4238 * parse.c (global_used): New function.
4239 (parse_block_data): Check for double empty BLOCK DATA,
4240 use global symbol table.
4241 (parse_module): Use global symbol table.
4242 (add_global_procedure, add_global_program): New functions.
4243 (gfc_parse_file): Use global symbol table.
4244 * symbol.c (gfc_gsym_root): New variable.
4245 (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
4248 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4250 * module.c (mio_gmp_real): Correct writing of negative numbers.
4252 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4255 * expr.c (check_intrinsic_op): Allow comparison of characters.
4258 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4259 Andrew Vaught <andyv@firstinter.net>
4261 * decl.c (contained_procedure): New function.
4262 (match_end): Verify correctness of END STATEMENT in
4265 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4266 Andrew Vaught <andyv@firstinter.net>
4269 * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
4270 (decode_statement): Enforce required space in free-form.
4272 2004-06-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4274 * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
4275 * trans-array.c (gfc_conv_descriptor_data): Add operand
4277 (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
4278 (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
4279 (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
4280 * trans-common.c (create_common): Likewise.
4281 * trans-expr.c (gfc_conv_component_ref): Likewise.
4282 * trans-io.c (set_parameter_value): Likewise.
4283 (set_parameter_ref, set_string, set_flag, io_result): Likewise.
4284 (transfer_expr): Likewise.
4285 * trans-decl.c (gfc_trans_auto_character_variable):
4286 Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
4287 (gfc_gimplify_function): New function.
4288 (gfc_generate_function-code): Properly handle nested functions.
4289 * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
4291 2004-06-22 Janne Blomqvist <jblomqvi@cc.hut.fi>
4294 * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
4295 (gfc_resolve_inquire): Resolve the iolength tag. Return
4296 SUCCESS at end of function if no failure has occured.
4297 * resolve.c (resolve_code): Resolve if iolength is encountered.
4298 * trans-io.c: (ioparm_iolength, iocall_iolength,
4299 iocall_iolength_done): New variables.
4300 (last_dt): Add IOLENGTH.
4301 (gfc_build_io_library_fndecls ): Set iolength related variables.
4302 (gfc_trans_iolength): Implement.
4303 (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
4305 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de
4308 * scanner.c (load_line): Don't truncate preprocessor lines.
4309 Reformat error message.
4310 (preprocessor_line): Issue warning in case of malformed
4313 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4315 * resolve.c (resolve_symbol): Add comment in function body.
4316 (check_data_variable): Change type of mark to ar_type, adapt code
4319 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4321 * array.c (gfc_insert_constructor): Avoid redundant call to
4322 mpz_comp. Add 2004 to copyright years.
4324 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
4326 * trans.h (stmtblock_t): Change has_scope to unsigned int.
4328 2004-06-20 Steven G. Kargl <kargls@comcast.net>
4330 * arith.c (gfc_range_check): correct complex underflow.
4332 2004-06-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4335 * match.c (match_case_selector): Call gfc_match_init_expr
4336 instead of gfc_match_expr.
4337 * resolve.c (validate_case_label_expr): No need to check for
4338 constant, since it wouldn't have been matched with the fix to
4341 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4344 * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
4347 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4350 * trans-deecl.c (generate_local_decl): Do not issue warning for
4351 unused variables if they're use associated.
4353 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4354 Andrew Vaught <andyv@firstinter.net>
4357 * gfortran.h (gfc_check_f): Add new field f3ml.
4358 * check.c (gfc_check_minloc_maxloc): Take argument list instead
4359 of individual arguments, reorder if necessary.
4360 * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
4361 * intrinsic.c (add_sym_3ml): New function.
4362 (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
4363 (check_specific): Catch special case MINLOC, MAXLOC.
4365 2004-06-14 Paul Brook <paul@codesourcery.com>
4367 * intrinsic.c (add_sym_2s): Use correct function types.
4369 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4371 * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize. Move data.c
4372 * data.c (gfc_get_section_index): Remove dependency on trans.h.
4374 2004-06-12 Steven G. Kargl <kargls@comcast.net>
4376 * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
4377 gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
4378 * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
4379 GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
4380 * trans-intrinsic.c: Use symbols.
4381 * intrinsic.c (add_sym_2s): New function.
4382 * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
4383 * intrinsic.h: Function prototypes.
4384 * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
4385 gfc_resolve_srand): New functions.
4387 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4390 * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
4391 contained procedure.
4393 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4396 * interface.c (compare_parameter, compare_actual_formal): Don't
4397 check types and array shapes for NULL()
4398 * trans-expr.c (conv_function_call): No double indirection for
4401 2004-06-09 Toon Moene <toon@moene.indiv.nluug.nl>
4403 * trans-expr.c (gfc_conv_cst_int_power): Compute
4404 x**(-n) by converting it to (1/x)**n instead of
4407 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4410 * module.c (write_symbol, write_symtree): Don't write symbols
4411 wrongly added to namespace.
4412 * trans-decl.c (gfc_create_module_variable): Don't create a
4413 backend decl for a symbol incorrectly added to namespace.
4415 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4418 * resolve.c (resolve_symbol): Verify that parameter array has an
4419 explicit shape. Fix typos and coding style issues in surrounding
4422 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4425 * gfortran.texi: The documentation doesn't contain infomration on
4426 how to report bugs, and shouldn't, so remove the line which
4429 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4431 * intrinsic.c (sort_actual): Keep track of type of missing
4432 arguments. (Missing from previous commit.)
4434 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4436 * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
4437 * interface.c (compare_actual_formal): Keep type of omitted
4439 * trans-expr.c (gfc_conv_function_call): Add string length
4440 argument for omitted string argument.
4442 2004-06-03 Paul Brook <paul@codesourcery.com>
4444 * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
4445 lists instead of compound expr chains.
4446 (gfc_trans_code): Annotate statement lists.
4448 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4450 * trans-array.c: Fix spelling in comments.
4452 2004-06-02 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4455 * data.c (assign_substring_data_value): New function.
4456 (gfc_assign_data_value): Call the new function if we're dealing
4457 with a substring LHS.
4459 2004-06-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4462 * gfortran.h (GFC_VERSION): Remove.
4463 * gfortran.texi (version-gfortran): Remove, replace by version-GCC
4466 2004-05-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4468 * trans-types.c: Fix spelling & layout in comments.
4470 2004-05-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4473 * trans-const.c (gfc_conv_string_init): Allow variable string
4474 length lower than initialization string length.
4476 2004-05-30 Paul Brook <paul@codesourcery.com>
4479 * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
4480 * trans-expr.c (gfc_trans_string_copy): New function.
4481 (gfc_conv_statement_function): Use them. Create temp vars. Enforce
4483 (gfc_conv_string_parameter): Use gfc_trans_string_copy.
4484 * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
4485 * trans.h (struct gfc_saved_var): Define.
4486 (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
4488 2004-05-30 Steven G. Kargl <kargls@comcast.net>
4490 * iresolve.c (gfc_resolve_random_number): Clean up conditional.
4492 2004-05-29 Steven G. Kargl <kargls@comcast.net>
4494 * simplify.c (gfc_simplify_log): Remove useless line of code.
4496 2004-05-29 Paul Brook <paul@codesourcery.com>
4498 * trans-common.c (find_equivalence): Find multiple rules.
4500 2004-05-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4502 * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
4503 (gfc_current_locus): Declare new global variable.
4504 * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
4505 (gfc_current_locus1): Rename ...
4506 (gfc_current_locus): ... to this.
4507 (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
4508 skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
4509 gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
4510 gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
4511 and gfc_current_locus(), respectively.
4512 * array.c (match_subscript, gfc_match_array_ref, match_array_list,
4513 match_array_cons_element, gfc_match_array_constructor):
4514 Read/modify gfc_current_locus instead of calling gfc_set_locus()
4515 and gfc_current_locus().
4516 * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
4517 match_attr_spec, gfc_match_function_decl, gfc_match_end,
4518 attr_decl1, gfc_match_save): Likewise.
4519 * error.c (error_print, gfc_internal_error): Likewise.
4520 * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
4521 * interface.c (gfc_add_interface): Likewise.
4522 * io.c (gfc_match_format, match_dt_format, match_dt_element,
4523 match_io_iterator, match_io): Likewise.
4524 * match.c (gfc_match_space, gfc_match_eos,
4525 gfc_match_small_literal_int, gfc_match_st_label,
4526 gfc_match_strings, gfc_match_name, gfc_match_iterator,
4527 gfc_match_char, gfc_match, gfc_match_assignment,
4528 gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
4529 gfc_match_nullify, gfc_match_call, match_implicit_range,
4530 gfc_match_implicit, gfc_match_data, match_case_selector,
4531 gfc_match_case, match_forall_iterator): Likewise.
4532 * matchexp.c (gfc_match_defined_op_name, next_operator,
4533 match_level_1, match_mult_operand, match_ext_mult_operand,
4534 match_add_operand, match_ext_add_operand, match_level_2,
4535 match_level_3, match_level_4, match_and_operand, match_or_operand,
4536 match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
4537 * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
4538 * parse.c (match_word, decode_statement, next_free, next_fixed,
4539 add_statement, verify_st_order, parse_if_block, gfc_parse_file):
4541 * primary.c (match_digits, match_integer_constant,
4542 match_boz_constant, match_real_constant, match_substring,
4543 next_string_char, match_charkind_name, match_string_constant,
4544 match_logical_constant, match_const_complex_part,
4545 match_complex_constant, match_actual_arg, match_keyword_arg,
4546 gfc_match_actual_arglist, gfc_match_structure_constructor,
4547 gfc_match_rvalue, gfc_match_variable): Likewise.
4548 * st.c (gfc_get_code): Likewise.
4549 * symbol.c (check_conflict, check_used, check_done,
4550 duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
4551 gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
4552 gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
4554 2004-05-26 Roger Sayle <roger@eyesopen.com>
4556 * io.c (format_asterisk): Silence compiler warnings by correcting
4557 the number of elements of a "locus" initializer.
4559 2004-05-25 Roger Sayle <roger@eyesopen.com>
4562 * matchexp.c: Allow unary operators after arithmetic operators
4564 (match_ext_mult_operand, match_ext_add_operand): New functions.
4565 (match_mult_operand): Tweak to call match_ext_mult_operand.
4566 (match_add_operand): Tweak to call match_ext_mult_operand.
4567 (match_level_2): Rearrange to call match_ext_add_operand.
4569 2004-05-25 Paul Brook <paul@codesourcery.com>
4571 * expr.c (check_inquiry): Remove bogus tests.
4573 2004-05-23 Paul Brook <paul@codesourcery.com>
4576 * expr.c (restricted_args): Remove redundant checks/argument.
4577 (external_spec_function): Update to match.
4578 (restricted_intrinsic): Rewrite.
4580 2004-05-23 Paul Brook <paul@codesourcery.com>
4581 Victor Leikehman <lei@haifasphere.co.il>
4583 * gfortran.h (struct gfc_symbol): Add equiv_built.
4584 * trans-common.c: Change int to HOST_WIDE_INT. Capitalize error
4586 (current_length): Remove.
4587 (add_segments): New function.
4588 (build_equiv_decl): Create initialized common blocks.
4589 (build_common_decl): Always add decl to bindings.
4590 (create_common): Create initializers.
4591 (find_segment_info): Reformat to match coding conventions.
4592 (new_condition): Use add_segments.
4593 (add_condition, find_equivalence, add_equivalences): Move iteration
4594 inside functions. Only process each segment once.
4595 (new_segment, finish_equivalences, translate_common): Simplify.
4597 2004-05-23 Steven G. Kargl <kargls@comcast.net>
4599 * check.c (gfc_check_random_seed): Issue for too many arguments.
4601 2004-05-22 Steven G. Kargl <kargls@comcast.net>
4603 * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
4605 2004-05-22 Paul Brook <paul@codesourcery.com>
4607 * dump-parse-tree.c (gfc_show_equiv): New function.
4608 (gfc_show_namespace): Use it.
4610 2004-05-22 Victor Leikehman <lei@haifasphere.co.il>
4613 * symbol.c (gfc_add_common): Disable checks to work around other more
4614 fundamental inadequacies.
4616 2004-05-22 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
4618 * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
4620 (gfc_build_function_decl): Likewise.
4622 2004-05-22 Steven G. Kargl <kargls@comcast.net>
4624 * check.c (gfc_check_system_clock): New function.
4625 * intrinsic.c (add_sym_3s): New function.
4626 (add_subroutines): Use it.
4627 * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
4629 * iresolve.c (gfc_resolve_system_clock): New function.
4631 2004-05-22 Steven G. Kargl <kargls@comcast.net>
4633 * invoke.texi: Document -Wunderflow and spell check.
4634 * lang.opt: Add Wunderflow.
4635 * gfortran.h (gfc_option_t): Add warn_underflow option.
4636 * options.c (gfc_init_options, set_Wall): Use it.
4637 * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
4638 * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
4639 gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
4640 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
4641 * arith.c (common_logarithm): Fix typo in comment.
4643 2004-05-21 Roger Sayle <roger@eyesopen.com>
4645 * io.c (check_format): As a GNU extension, allow the comma after a
4646 string literal to be optional in a format. Use gfc_notify_std to
4647 issue an error/warning as appropriate.
4649 2004-05-21 Roger Sayle <roger@eyesopen.com>
4651 * io.c (check_format): Use gfc_notify_std to determine whether to
4652 issue an error/warning for omitting the digits from the X format.
4654 2004-05-20 Roger Sayle <roger@eyesopen.com>
4656 * io.c (check_format): Allow the number before the X format to
4657 be optional when not -pedantic.
4659 2004-05-18 Feng Wang <fengwang@nudt.edu.cn>
4660 Paul Brook <paul@codesourcery.com>
4662 * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
4663 Create decls for __builtin_pow{,f}.
4664 * gfortran.h (PREFIX_LEN): Define.
4665 * trans-decl.c (gfor_fndecl_math_powi): Add.
4666 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
4667 (gfc_build_intrinsic_function_decls): Create decls for powi.
4668 * trans-expr.c (powi_table): Add.
4669 (gfc_conv_integer_power): Remove.
4670 (gfc_conv_powi): New function.
4671 (gfc_conv_cst_int_power): New function.
4672 (gfc_conv_power_op): Use new powi routines.
4673 * trans.h (struct gfc_powdecl_list): Add.
4674 (gfor_fndecl_math_powi): Add.
4675 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
4677 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4679 * trans.c, trans-decl.c: Fix comment typos.
4681 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4683 * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
4685 2004-05-18 Steve Kargl <kargls@comcast.net>
4687 * arith.c (gfc_int2complex): Fix incorrect range checking.
4689 2004-05-18 Paul Brook <paul@codesourcery.com>
4692 * decl.c (add_init_expr_to_sym): Remove incorrect check.
4693 (default_initializer): Move to expr.c.
4694 (variable_decl): Don't assign default initializer to variables.
4695 * expr.c (gfc_default_initializer): Move to here.
4696 * gfortran.h (gfc_default_initializer): Add prototype.
4697 * resolve.c (resolve_symbol): Check for illegal initializers.
4698 Assign default initializer.
4700 2004-05-17 Steve Kargl <kargls@comcast.net>
4702 * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
4704 2004-05-17 Steve Kargl <kargls@comcast.net>
4706 * arith.c (gfc_real2complex): Range checking wrong part of complex
4709 2004-05-16 Paul Brook <paul@codesourcery.com>
4711 * options.c (gfc_handle_module_path_options): Fix buffer overrun.
4713 2004-05-16 Paul Brook <paul@codesourcery.com>
4715 * arith.c (gfc_range_check): Fix logic error.
4717 2004-05-16 Steve Kargl <sgk@troutmask.apl.washington.edu>
4719 * arith.c: Fix comment typos.
4721 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4724 * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
4725 not initialized in a disallowed fashion.
4726 * match.c (gfc_match_common): Likewise.
4727 (var_element): Verify that variable is not in the blank COMMON,
4728 if it is in a common.
4730 2004-05-15 Joseph S. Myers <jsm@polyomino.org.uk>
4732 * Make-lang.in (f95.generated-manpages): Remove.
4733 (f95.srcextra): New.
4734 (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
4735 f95.maintainer-clean): Generate info and dvi files in objdir/doc.
4738 (f95.install-info): Remove.
4739 (install-info): New.
4741 2004-05-15 Victor Leikehman <lei@haifasphere.co.il>
4743 * decl.c (add_init_expr_to_sym): Check for variable size arrays.
4745 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4747 * primary.c (match_boz_constant): Use gfc_notify_std() for
4748 issuing a warning or an error.
4750 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4753 * primary.c (match_structure_constructor): Rename ...
4754 (gfc_match_structure_constructor): ... to this. Make non-static.
4755 (gfc_match_rvalue): Call renamed function.
4756 * match.h (gfc_match_structure_constructor): Declare.
4757 * match.c (gfc_match_data_constant): Handle structure
4760 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4764 * gfortran.h (gfc_linebuf): New typedef.
4766 (gfc_file): Revamped, use new gfc_linebuf.
4767 (locus): Revamped, use new types.
4768 (gfc_current_file): Remove.
4769 (gfc_current_form, gfc_source_file): New global variables.
4770 * match.c (gfc_match_space, gfc_match_strings): Use
4771 gfc_current_form to find source form.
4772 * module.c (gfc_dump_module): Use gfc_source_file when printing
4774 * error.c (show_locus, show_loci) Use new data structures to print
4776 * scanner.c (first_file, first_duplicated_file, gfc_current_file):
4778 (file_head, current_file, gfc_current_form, line_head, line_tail,
4779 gfc_current_locus1, gfc_source_file): New global variables.
4780 (gfc_scanner_init1): Set new global variables.
4781 (gfc_scanner_done1): Free new data structures.
4782 (gfc_current_locus): Return pointer to gfc_current_locus1.
4783 (gfc_set_locus): Set gfc_current_locus1.
4784 (gfc_at_eof): Set new variables.
4785 (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
4786 to new locus structure.
4787 (gfc_check_include): Remove.
4788 (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
4789 (gfc_skip_comments): Use gfc_current_form, find locus with
4791 (gfc_next_char): Use gfc_current_form.
4792 (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
4793 (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
4795 (get_file): New function.
4796 (preprocessor_line, include_line): New functions.
4797 (load_file): Move down, rewrite to match new data structures.
4798 (gfc_new_file): Rewrite to match new data structures.
4799 * parse.c (next_statement): Remove code which is now useless. Use
4800 gfc_source_form and gfc_source_file where appropriate.
4801 * trans-decl.c (gfc_get_label_decl): adapt to new data structures
4802 when determining locus of frontend code.
4803 * trans-io.c (set_error_locus): Same.
4804 * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
4805 * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
4807 (all): Add missing initializers.
4809 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4811 * Make-lang.in (trans-common.o): Remove redundant dependency.
4812 (data.c): Replace object file name ...
4813 (data.o): ... by the correct one.
4815 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4817 * dump-parse-tree.c (gfc_show_array_ref): Print colon only
4818 for ranges when dumping array references.
4820 2004-05-14 Victor Leikehman <lei@haifasphere.co.il>
4822 * decl.c (variable_decl): Always apply default initializer.
4824 2004-05-08 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
4827 * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
4828 handle zero correctly.
4830 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4832 * match.c (gfc_match): Eliminate dead code.
4834 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4836 * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
4837 Detect bad continuation line in fixed form sources.
4839 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4842 * iresolve.c (gfc_resolve_nearest): Add new function.
4843 * intrinsic.h: ... declare it here.
4844 * intrinsic.c (add_functions): ... add it as resolving function
4847 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4850 * match.c (gfc_match_do): Allow infinite loops with
4851 label-do-stmt. Do not enforce space after comma.
4853 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4856 * parse.c (parse_interface): Allow empty INTERFACE, remove
4859 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4861 * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
4862 decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
4863 expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
4864 intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
4865 matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
4866 primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
4867 trans-array.c, trans-array.h, trans-common.c, trans-const.c,
4868 trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
4869 trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
4870 trans-types.h, trans.c, trans.h: Update copyright years and
4872 * data.c: Likewise, also removed two whitespace-only lines.
4873 * gfortranspec.c, lang.opt: Update copyright years.
4875 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4878 * trans-decl.c (generate_local_decl): Don't warn for unused
4879 variables which are in common blocks.
4881 2004-05-13 Diego Novillo <dnovillo@redhat.com>
4883 * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
4884 trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
4885 trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
4887 2004-05-13 Victor Leikehman <lei@haifasphere.co.il>
4890 * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
4892 2004-05-13 Joseph S. Myers <jsm@polyomino.org.uk>
4894 * gfortran.texi: Use @table @emph instead of @itemize @emph.
4895 Remove "set DEVELOPMENT".
4896 (Compiling GFORTRAN): Remove.
4898 2004-05-09 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
4900 * array.c (match_subscript, match_array_ref): Add comments
4901 explaining argument 'init'.
4902 * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
4903 trans-expr.c, trans.c: Fix some typos in comments.
4904 * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
4905 * primary.c (match_digits, match_integer_constant): Add comment
4906 explaining signflag.
4908 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
4911 * primary.c: Include system.h and flags.h, needed for pedantic.
4912 (match_boz_constant): Allow "x" for hexadecimal constants, warn if
4915 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
4918 * match.c (match_data_constant): Handle case where
4919 gfc_find_symbol sets sym to NULL
4921 2004-04-28 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
4923 * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
4924 dependency on mathbuiltins.def
4926 2004-04-24 Victor Leikehman <lei@il.ibm.com>
4928 * trans-io.c (transfer_expr): Implemented recursive printing
4931 2004-04-24 Andrew Pinski <pinskia@physics.uc.edu>
4933 * gfortranspec.c: Do not include multilib.h.
4935 2004-04-24 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
4937 * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
4938 2004 to copyright years.
4939 * trans-expr.c, trans-decl.c: Comment update, we now generate
4940 GENERIC, not SIMPLE. Add 2004 to copyright years.
4942 2004-04-24 Paul Brook <paul@codesourcery.com>
4944 * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
4946 2004-04-24 Feng Wang <fengwang@nudt.edu.cn>
4949 * arith.c (gfc_arith_divide): Fix complex divide.
4951 2004-04-23 Andrew Pinski <pinskia@physics.uc.edu>
4953 * gfortranspec.c: Include the target headers.
4955 2004-04-18 Feng Wang <fengwang@nudt.edu.cn>
4959 * arith.c (arctangent2): New function.
4960 * arith.h (arctangent2): Add function prototype.
4961 * simplify.c (gfc_simplify_atan2): Use it.
4962 (gfc_simplify_log): Use it.
4964 2004-04-12 Diego Novillo <dnovillo@redhat.com>
4966 * fortran/f95-lang.c (gfc_expand_stmt): Remove.
4967 (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
4969 2004-04-11 Bud Davis <bdavis9659@comcast.net>
4972 * trans-io.c (build_dt): Change REC to value.
4974 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
4977 * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
4978 the real value when converting mpf to string.
4980 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
4983 * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
4986 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
4989 * simplify.c (simplify_min_max): Convert the type of the result.
4991 2004-04-11 Paul Brook <paul@codesourcery.com>
4993 * gfortran.texi: Use full target triplet.
4995 2004-04-11 Paul Brook <paul@codesourcery.com>
4997 * Make-lang.in (GFORTRAN_TEXI): Set it.
4998 (fortran/dfortran.dvi): Use it. Add fortran to include paths.
4999 (fortran/gfortran.info): Ditto.
5000 * gfortran.texi: Major update.
5001 * invoke.texi: New file.
5003 2004-04-10 Paul Brook <paul@codesourcery.com>
5005 * trans-array.c (gfc_trans_allocate_temp_array,
5006 gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
5007 * trans-decl.c (gfc_build_dummy_array_decl,
5008 gfc_get_symbol_decl, gfc_build_function_decl,
5009 gfc_create_module_variable): Ditto.
5010 * trans-expr.c (gfc_conv_variable): Ditto.
5011 * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
5012 * trans.h (GFC_DECL_STRING): Remove.
5013 (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
5014 GFC_DECL_ASSIGN): Renumber flags.
5016 2004-04-05 Paul Brook <paul@codesourcery.com>
5020 * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
5022 * gfortran.h (struct gfc_charlen): Add backend_decl.
5023 * trans-array.c (gfc_trans_allocate_temp_array,
5024 gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
5025 (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
5026 Remove old, broken string handling.
5027 (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
5028 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
5029 gfc_trans_deferred_array): Handle character arrays.
5030 * trans-const.c (gfc_conv_const_charlen): New function.
5031 * trans-const.h (gfc_conv_const_charlen): Add prototype.
5032 * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
5034 (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
5035 (gfc_create_string_length): New function.
5036 (gfc_get_symbol_decl): Create lengths for character variables.
5037 (gfc_get_fake_result_decl): Ditto.
5038 (gfc_build_function_decl): Only set length for assumed length
5039 character arguments.
5040 (gfc_trans_dummy_character): New function.
5041 (gfc_trans_auto_character_variable): Rewrite.
5042 (gfc_trans_deferred_vars): Handle more types of character variable.
5043 (gfc_create_module_variable): String lengths have moved.
5044 (gfc_generate_function_code): Initialize deferred var chain earlier.
5045 * trans-expr.c (gfc_conv_init_string_length): Rename ...
5046 (gfc_trans_init_string_length): ... to this.
5047 (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
5048 gfc_conv_function_call): Update to new format for character variables.
5049 (gfc_conv_string_length): Remove.
5050 (gfc_conv_string_parameter): Update assertion.
5051 * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
5052 * trans-io.c (set_string): Use new macro names.
5053 * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
5054 * trans-types.c (gfc_get_character_type): Use existing length expr.
5055 (gfc_is_nodesc_array): Make public.
5056 (gfc_get_dtype_cst): Rename ...
5057 (gfc_get_dtype): ... to this. Handle unknown size arrays.
5058 (gfc_get_nodesc_array_type): Use new name.
5059 (gfc_sym_type): New character variable code.
5060 (gfc_get_derived_type): Ditto.
5061 (gfc_get_function_type): Evaluate character variable lengths.
5062 * trans-types.h (gfc_strlen_kind): Define.
5063 (gfc_is_nodesc_array): Add prototype.
5064 * trans.h: Update prototypes.
5065 (struct lang_type): Update comments.
5066 (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
5067 (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
5069 2004-04-04 Paul Brook <paul@codesourcery.com>
5071 * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
5072 * options.c (gfc_init.options, gfc_handle_option): Ditto.
5073 * trans-expr.c (gfc_conv_function_call): Ditto.
5074 * trans-types.c (gfc_is_nodesc_array): Ditto
5075 * lang.opt (fg77-calls): Remove.
5077 2004-04-04 Paul Brook <paul@codesourcery.com>
5079 * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
5080 (gfc_conv_descriptor_base): Rename ...
5081 (gfc_conv_descriptor_offset): ... to this.
5082 (gfc_trans_allocate_array_storage): Set offset to zero.
5083 (gfc_conv_array_base): Rename ...
5084 (gfc_conv_array_offset): ... to this.
5085 (gfc_conv_array_index_ref): Add offset parameter.
5086 (gfc_conv_array_ref): Include offset.
5087 (gfc_trans_preloop_setup): Use existing offset.
5088 (gfc_trans_allocate_temp_array, gfc_array_allocate,
5089 gfc_trans_auto_array_allocation, gfc_trans_g77_array,
5090 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
5091 gfc_conf_ss_descriptor): Set offset.
5092 * trans-array.h: Rename prototypes.
5093 * trans-const.h (gfc_index_zero_node): Define.
5094 * trans-decl.c (gfc_build_qualified_array): Change base to offset.
5095 * trans-types.c (gfc_get_array_type_bounds): Ditto.
5096 (gfc_get_nodesc_array_type): Calculate offset before upper bound.
5098 2004-03-25 Diego Novillo <dnovillo@redhat.com>
5100 * convert.c (convert): Don't handle WITH_RECORD_EXPR.
5102 2004-03-24 Bud Davis <bdavis9659@comcast.net>
5105 * arith.c (gfc_convert_integer,gfc_convert_real): Removed leading '+'
5106 before conversion by gmp library call.
5108 2004-03-24 Bud Davis <bdavis9659@comcast.net>
5111 * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
5113 2004-02-24 Richard Henderson <rth@redhat.com>
5115 * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
5117 2004-02-19 Loren J. Rittle <ljrittle@acm.org>
5119 * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
5120 (fortran/gfortran.info): ... to here.
5123 2004-02-16 Richard Henderson <rth@redhat.com>
5125 * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
5126 * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
5127 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
5128 (gfc_expand_function): Rename from expand_function_body, make static,
5129 don't do anything except invoke tree_rest_of_compilation.
5130 (gfc_be_parse_file): Invoke cgraph.
5131 (gfc_expand_decl): Remove.
5132 (gfc_init_builtin_functions): Add __builtin_init_trampoline and
5133 __builtin_adjust_trampoline.
5134 * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
5135 (gfc_finalize): New.
5136 (gfc_generate_function_code): Use it. Lower nested functions.
5137 * trans-expr.c (gfc_conv_function_call): Add static chain operand
5139 * trans.c (gfc_build_function_call): Likewise.
5140 * trans.h (expand_function_body): Remove.
5142 2004-02-15 Victor Leikehman <lei@il.ibm.com>
5145 * trans-decl.c (gfc_build_function_decl) For functions
5146 returning CHARACTER pass an extra length argument,
5147 following g77 calling conventions.
5148 * trans-types.c (gfc_get_function_type) Ditto.
5149 * trans-expr.c (gfc_conv_function_call) Ditto.
5151 2004-02-14 Paul Brook <paul@codesourcery.com>
5153 * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
5155 2004-02-12 Paul Brook <paul@nowt.org>
5159 2004-02-08 Steve Kargl <sgk@troutmask.apl.washington.edu>
5161 * gfortran.texi: Fix typos.
5163 2004-02-07 Bud Davis <bdavis9659@comcast.net>
5166 * intrinsic.c (add_conversions) Use logical conversion instead
5168 * trans-types.c (gfc_get_logical_type) implemented logical*1
5171 2004-01-17 Paul Brook <paul@codesourcery.com>
5173 * lang-specs.h: Remove %<fixed-form.
5175 2004-01-15 Toon Moene <toon@moene.indiv.nluug.nl>
5177 * lang-specs.h: Enable preprocessing of source files
5178 ending in .F, .fpp, .FPP, .F90 and .F95.
5180 2004-01-13 Toon Moene <toon@moene.indiv.nluug.nl>
5183 * lang-specs.h: Enable compilation of files ending
5184 in .f, .for and .FOR.
5186 2004-01-11 Paul Brook <paul@codesourcery.com>
5188 * trans-stmt.c (gfc_trans_if_1): New function.
5189 (gfc_trans_if): Use it.
5191 2004-01-11 Erik Schnetter <schnetter@uni-tuebingen.de>
5193 * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
5194 (gfc_option_t): Add max_identifier_length.
5195 * lang.opt: Add fmax-identifier-length.
5196 * match.c (parse_name): Use limit.
5197 * options.c (gfc_init_options): Set max_identifier_length.
5198 (gfc_handle_option): Ditto.
5200 2004-01-11 Feng Wang <fengwang@nudt.edu.cn>
5202 * intrinsic.c (add_functions): Add resolve function to dcmplx.
5203 * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
5204 * iresolve.c (gfc_resolve_dcmplx): New function.
5206 2004-01-10 Paul Brook <paul@codesourcery.com>
5208 * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
5209 * trans-types.c (gfc_sym_type): Handle external dummy procedures.
5210 (gfc_return_by_reference): Correct condition.
5211 (gfc_get_function_type): Ditto.
5213 2004-01-10 Paul Brook <paul@codesourcery.com>
5215 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
5218 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
5220 * iresolve.c: Use correct kind.
5222 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
5225 * trans-decl.c (gfc_create_module_variable): Output array valued
5228 2004-01-10 Paul Brook <paul@codesourcery.com>
5230 * resolve.c (resolve_branch): Get error message right way round.
5232 2004-01-10 Canqun Yang <canqun@nudt.edu.cn>
5234 * trans-array (gfc_conv_loop_setup): Adjust comment to track
5236 (gfc_array_allocate): Don't count size of element twice.
5238 2004-01-04 Paul Brook <paul@codesourcery.com>
5240 * lang.opt (i8, r8, std=*): Remove RejectNegative.
5242 2004-01-04 Paul Brook <paul@codesourcery.com>
5244 * error.c (gfc_notify_std): New function.
5245 * gfortran.h (gfc_notify_std): Declare.
5246 (GFC_STD_*): Define.
5247 (gfc_option_t): Add warn_std and allow_std.
5248 * intrinsic.c (gfc_init_expr_extensions): Fix logic.
5249 (gfc_intrinsic_func_interface): Use gfc_notify_std.
5250 * check.c (check_rest): Use gfc_notify_std.
5251 * match.c (gfc_match_pause): Ditto.
5252 (gfc_match_assign): Ditto.
5253 (gfc_match_goto): Ditto.
5254 * resolve.c (resolve_branch): Ditto.
5255 * lang.opt: Add std=<foo> and w.
5256 * options.c (gfc_init_options): Set allow_std and warn_std.
5257 (gfc_handle_option): Handle OPT_std_* and OPT_w.
5259 2004-01-01 Paul Brook <paul@codesourcery.com>
5261 * array.c (gfc_append_constructor): Take constructor, not expression.
5262 * data.c (struct gfc_expr_stack): Remove.
5263 (expr_stack): Remove.
5264 (find_con_by_offset): Rename from find_expr_in_con.
5265 (find_con_by_component): Rename from find_component_in_con.
5266 (gfc_get_expr_stack): Remove.
5267 (gfc_assign_data_value): Rewrite.
5268 (gfc_expr_push): Remove.
5269 (gfc_expr_pop): Remove.
5270 (gfc_advance_section): Rename from
5271 gfc_modify_index_and_calculate_offset. Handle unbounded sections.
5272 (gfc_get_section_index): Handle unbounded sections.
5273 * gfortran.h: Update prototypes.
5274 * resolve.c (check_data_variable): Array section maight not be the
5277 2004-01-01 Paul Brook <paul@codesourcery.com>
5280 * resolve.c (resolve_symbol): Allow assumed length function results.
5282 2004-01-01 Steve Kargl <sgk@troutmask.apl.washington.edu>
5284 * match.c (gfc_match_pause): Fix spelling.
5286 2004-01-01 Steven Bosscher <stevenb@suse.de>
5289 * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
5290 reference from the expression.
5292 2003-12-26 Feng Wang <fengwang@nudt.edu.cn>
5294 * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
5296 * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
5297 (gfc_exec_op): New EXEC_LABEL_ASSIGN.
5298 (symbol_attribute):New variable attribute: assign.
5299 * io.c (resolve_tag):Integer variable is allowed.
5300 (match_dt_format): Add ASSIGN statement. Set assign flag.
5301 * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
5302 (gfc_match_assign): Add ASSIGN statement. Set assign flag.
5303 (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
5304 * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
5305 (next_statement): Add ST_LABEL_ASSIGNMENT.
5306 (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
5307 * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
5308 (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
5309 * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
5310 * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
5311 assign. Put them into the stuct lang_decl.
5312 * trans-io.c (set_string): Add the assign statement.
5313 * trans-stmt.c (gfc_trans_label_assign): New function.
5314 (gfc_trans_goto): Translate ASSIGNED GOTO statement.
5315 * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
5316 * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
5317 * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
5318 (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
5319 (GFC_DECL_ASSIGN(node)): New macro to access flag.
5321 2003-12-31 Huang Chun <chunhuang73@hotmail.com>
5324 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
5327 2003-12-22 Toon Moene <toon@moene.indiv.nluug.nl>
5329 * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
5330 that arguments to subroutines/functions can't alias themselves, nor global
5333 2003-12-20 Steven Bosscher <stevenb@suse.de>
5335 * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
5336 * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
5338 2003-12-12 Huang Chun <chunhuang73@hotmail.com>
5340 * primary.c (match_substring): Fix substring bug for start point
5341 or end point is NULL.
5342 * trans-expr.c (gfc_conv_substring): Ditto
5343 * trans-types.c (gfc_sym_type): Get correct type of scalar
5344 character variables.
5345 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
5348 2003-12-10 Richard Henderson <rth@redhat.com>
5350 * options.c (gfc_post_options): Don't ever use rtl inlining.
5352 2003-12-05 Canqun Yang <canqun@nudt.edu.cn>
5354 * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
5355 * trans-equivalence.c: Remove.
5356 * trans-decl.c (gfc_get_symbol_decl): Update to match.
5357 (gfc_generate_function_code): Ditto.
5358 * trans-array.c (gfc_conv_array_parameter): Ditto.
5359 * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
5360 (F95_ADDITIONAL_OBJS): Add stor-layout.o
5361 * trans.h (gfc_trans_equivalence): Remove.
5362 * gfortran.h (struct gfc_equiv): Add used field.
5363 (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
5364 equiv_offset fields.
5366 2003-12-05 Richard Henderson <rth@redhat.com>
5368 * trans.c (gfc_build_addr_expr): New.
5369 (gfc_build_indirect_ref, gfc_build_array_ref): New.
5370 * trans.h: Declare them.
5371 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
5372 trans-stmt.c, trans.c (*): Use them.
5374 * f95-lang.c (gfc_post_options): Remove dead prototype.
5375 * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
5376 * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
5379 2003-12-01 Feng Wang <fengwang@nudt.edu.cn>
5381 * io.c (gfc_match_format): Check for missing format label.
5383 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
5386 * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
5387 from interfaces in modules.
5389 2003-11-30 Paul Brook <paul@nowt.org>
5391 * trans-array.c (gfc_trans_g77_array): Make non-static.
5392 (gfc_trans_assumed_size): Remove.
5393 (gfc_trans_dummy_array_bias): Explicitly free temporary.
5394 * trans-array.h (gfc_trans_g77_array): Add prototype.
5395 (gfc_trans_assumed_size): Remove.
5396 * trans-decls.c (gfor_fndecl_push_context): Remove.
5397 (gfor_fndecl_pop_context): Remove.
5398 (gfc_build_function)decls): Don't create them.
5399 (gfc_trans_deferred_vars): Update to match. Remove dead code.
5400 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
5402 2003-11-30 Kejia Zhao <kejia_zh@nudt.edu.cn>
5404 * trans-array.c (gfc_conv_array_parameter): Simplify
5405 array argument passing for array name actual argument.
5406 * trans-expr.c (gfc_conv_function_call): Ditto
5407 * trans-types.c (gfc_is_nodesc_array):Ditto.
5409 2003-11-30 Paul Brook <paul@nowt.org>
5411 * f95-lang.c (gfc_post_options): Move ...
5412 * options.c (gfc_post_options): .. to here. Handle inlining options.
5413 * gfortran.h (gfc_post_options): Add prototype.
5415 2003-11-28 Richard Henderson <rth@redhat.com>
5417 * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
5419 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
5421 * trans.h (has_alternate_specifier): New global variable.
5422 * match.c (gfc_match_call): Handle actual arguments associated with
5423 alternate return indicators.
5424 * trans-expr.c (gfc_conv_function_call): Ditto
5425 * trans-stmt.c (gfc_trans_call): Ditto
5426 (gfc_trans_return): Handle return statement with value.
5427 * trans-decl.c (gfc_generate_function_code): Handle functions with
5429 (gfc_get_fake_result_decl): Ditto
5430 * trans-types.c (gfc_get_function_type): Ditto
5431 * resolve.c (resolve_actual_arglist): Check alternate return indicators.
5432 (resolve_formal_arglist): Check asterisk dummy.
5434 2003-11-27 Paul Brook <paul@nowt.org>
5436 * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
5437 allocation interface.
5438 (gfc_conv_ array_parameter): Ditto.
5439 (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
5440 * trans-array.c: Update prototype.
5441 * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
5442 (gfc_trans_auto_character_variable): Use new memory alloc interface.
5443 * trans-expr.c (gfc_conv_string_tmp): Ditto.
5444 (gfc_conv_function_call): Use gfc_conv_string_tmp.
5445 * trans-stmt.c (gfc_do_allocate): Use new memory alloc interface.
5446 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
5447 * trans.h (gfc_ss_info): Remove unused pdata field.
5448 * trans.c (gfc_create_var_np): Change T to V.
5450 2003-11-26 Richard Henderson <rth@redhat.com>
5452 * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
5453 * trans-intrinsic.c (gfc_intrinsic_map): ... here. Add SCALE,
5454 FRACTION, NEAREST, SET_EXPONENT.
5455 (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
5456 Fix GTY marking. Remove unnecessary const's.
5457 (LIBM_FUNCTION): Rename from I_LIB.
5458 (LIBF_FUNCTION): New.
5459 (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
5460 conventions. Assume the expr signature is correct. Mark const.
5461 (gfc_conv_intrinsic_exponent): Use library functions.
5462 (gfc_conv_intrinsic_set_exponent): Remove.
5463 (gfc_conv_intrinsic_scale): Remove.
5464 (gfc_conv_intrinsic_nearest): Remove.
5465 (gfc_conv_intrinsic_fraction): Remove.
5466 (gfc_conv_intrinsic_function): Update.
5467 * trans-decl.c (gfor_fndecl_math_exponent4): New.
5468 (gfor_fndecl_math_exponent8): New.
5469 (gfc_build_intrinsic_function_decls): Set them.
5470 * trans.h: Declare them.
5472 2003-11-25 Canqun Yang <canqun@nudt.edu.cn>
5474 * trans-common.c (gfc_layout_global_equiv): Locate the error for
5475 underflow COMMON block.
5476 (gfc_trans_one_common): Fix bug for size of COMMON block containing
5477 EQUIVALENCE object. Also fix typo in an error message.
5479 2003-11-25 Diego Novillo <dnovillo@redhat.com>
5481 * Make-lang.in: Add check-gfortran to lang_checks.
5482 (check-f95): Alias for check-gfortran.
5484 2003-11-25 Jason Merrill <jason@redhat.com>
5486 * Make-lang.in (f95.tags): Create TAGS.sub files in each
5487 directory and TAGS files that include them for each front end.
5489 2003-11-24 Paul Brook <paul@nowt.org>
5492 * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
5494 2003-11-24 Paul Brook <paul@nowt.org>
5496 * expr.c (simplify_const_ref): Return SUCCESS for things we don't
5498 * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
5500 2003-11-24 Paul Brook <paul@nowt.org>
5503 * array.c (gfc_array_ref_shape): Handle elemental dimensions.
5504 * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
5506 2003-11-20 Richard Henderson <rth@redhat.com>
5508 * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
5509 (gfc_conv_array_base): Likewise.
5510 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
5511 * trans-expr.c (gfc_conv_string_tmp): Likewise.
5512 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
5513 * trans-stmt.c (gfc_trans_character_select): Likewise.
5515 2003-11-13 Paul Brook <paul@nowt.org>
5517 * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
5519 2003-11-13 Canqun Yang <canqun@nudt.edu.cn>
5521 * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
5522 (resolve_equivalence): New function.
5523 (resolve_equivalence_derived): New function.
5525 2003-11-12 Richard Henderson <rth@redhat.com>
5527 * trans.c (gfc_trans_code): Use annotate_with_locus instead of
5528 annotate_all_with_locus.
5530 2003-11-11 Canqun Yang <canqun@nudt.edu.cn>
5532 * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
5533 * trans-decl.c (gfc_finish_var_decl): Modified.
5535 2003-11-08 Paul Brook <paul@nowt.org>
5538 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
5541 2003-11-06 Paul Brook <paul@nowt.org>
5543 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
5545 2003-11-02 Canqun Yang <canqun@nudt.edu.cn>
5547 * match.c (gfc_match_stopcode): Assign '0' to stop_code.
5549 2003-10-27 Anthony Green <green@redhat.com>
5551 * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
5552 (f95.stagefeedback): Ditto.
5554 2003-10-27 Andrew Pinski <pinskia@physics.uc.edu>
5557 * Make-lang.in (f95.stageprofile): Add.
5558 (f95.stagefeedback): Add.
5560 2003-10-23 Richard Henderson <rth@redhat.com>
5562 * f96-lang.c (gfc_gimplify_expr): Remove.
5563 (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
5564 (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
5566 2003-10-23 Richard Henderson <rth@redhat.com>
5568 * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
5570 2003-10-20 Paul Brook <paul@nowt.org>
5572 * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
5573 * trans-stmt.c (gfc_trans_do_while): Ditto.
5575 2003-10-17 Paul Brook <paul@nowt.org>
5577 * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
5579 2003-10-17 Paul Brook <paul@nowt.org>
5581 * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
5583 2003-10-17 Feng Wang <wf_cs@yahoo.com>
5585 * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
5586 (gfc_resolve_minloc): Ditto.
5587 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
5588 Return the value after subtracting the lower bound.
5590 2003-10-16 Richard Henderson <rth@redhat.com>
5592 * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
5594 2003-10-16 Steven Bosscher <steven@gcc.gnu.org>
5596 * lang.c: Remove -M option for now, it's in the way for C.
5598 2003-10-14 Jason Merrill <jason@redhat.com>
5600 * Make-lang.in (f95.tags): New rule.
5602 2003-10-13 Richard Henderson <rth@redhat.com>
5604 * trans.c (gfc_trans_code): Use annotate_all_with_locus.
5606 2003-10-13 Paul Brook <paul@nowt.org>
5608 * trans-decl.c (generate_local_decl): Don't create junk variables.
5610 2003-10-13 Paul Brook <paul@nowt.org>
5612 * resolve.c (resolve_formal_arglist): Use function result decl in
5613 preference to function decl.
5615 2003-10-12 Richard Henderson <rth@redhat.com>
5617 * f95-lang.c (gfc_define_builtin): New const_p argument. Set
5618 TREE_READONLY. Update all callers.
5620 2003-10-12 Feng Wang <wf_cs@yahoo.com>
5622 * iresolve.c (gfc_resolve_cshift): Change to match implementation.
5623 * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
5624 (gfc_is_intrinsic_libcall): Add CSHIFT.
5626 2003-10-12 Richard Henderson <rth@redhat.com>
5628 * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
5629 (gfc_trans_array_constructor_value): Likewise.
5630 (gfc_conv_array_initializer): Likewise.
5631 * trans-stmt.c (gfc_trans_character_select): Likewise.
5633 2003-11-12 Kejia Zhao <kejia_zh@yahoo.com.cn>
5635 * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
5637 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
5639 * check.c (gfc_check_repeat): Check arguments are scalar.
5640 (gfc_check_trim): New function.
5641 * intrinsic.h (gfc_check_trim): Add prototype.
5642 * intrinsic.c (add_functions): Use it.
5643 * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
5645 * trans-decl.c: Ditto.
5646 (gfc_build_intrinsic_fucntion_decls): Set them.
5647 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
5648 (gfc_conv_intrinsic_trim): New function.
5649 (gfc_conv_intrinsic_repeat): New function.
5650 (gfc_conv_intrinsic_function): Use them.
5652 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
5654 * trans-types.c (gfc_sym_type): Handle result variables.
5656 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
5658 * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
5659 gfc_get_character_type.
5661 2003-10-11 Feng Wang <wf_cs@yahoo.com>
5663 * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
5665 2003-10-11 Paul Brook <paul@nowt.org>
5667 * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
5668 (gfc_resolve_dprod): New function.
5669 (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
5670 * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
5671 (gfc_resolve_dprod): Declare.
5672 * intrinsic.c (add_functions): Use them.
5673 * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
5675 2003-10-06 Richard Henderson <rth@redhat.com>
5677 * f95-lang.c (gfc_init_builtin_functions): Add clzll.
5678 * trans-intrinsic.c (call_builtin_clz): Use it.
5680 2003-10-05 Paul Brook <paul@nowt.org>
5682 * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
5683 * trans-decl.c (gfc_generate_function_code): Set
5684 cfun->function_end_locus.
5686 2003-09-24 Jason Merrill <jason@redhat.com>
5688 * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
5691 2003-09-21 Lifang Zeng <zlf605@hotmail.com>
5692 Paul Brook <paul@nowt.org>
5694 * Make-lang.in (F95_OBJS): Add fortran/data.o.
5695 * array.c (gfc_inser_constructor): New function.
5696 (gfc_get_constructor): New function.
5697 (gfc_free_constructor): Initialize offset and repeat.
5698 (iterator_stack): Remove.
5699 (expand_info): Add offset, component and repeat fields.
5700 (expand_constructor): Set them.
5701 (expand): Set new fields.
5702 (gfc_copy_constructor): Ditto. Avoid recursion.
5703 * gfortran.h: Add prototypes for new functions.
5704 (gfc_constructor): Add offset, component and repeat.
5705 (iteratio_stack): Move to here.
5706 * resolve.c (check_data_variable): Convert data values into variable
5708 (traverse_data_list): Build implicit loop chain.
5709 (gfc_resolve): Ditto.
5710 * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
5711 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
5712 * trans-expr.c (gfc_conv_structure): Handle array initializers.
5713 (gfc_conv_expr): Update to match.
5714 * trans.h (gfc_conv_structure): Declare.
5717 2003-09-20 Kejia Zhao <kejia_zh@yahoo.com.cn>
5719 * trans.h: Add declarations for gfor_fndecl_si_kind and
5720 gfor_fndecl_sr_kind.
5721 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
5722 * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
5723 (g95_conv_intrinsic_sr_kind): New function.
5724 (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
5727 2003-09-17 Lars Segerlund <Lars.Segerlund@comsys.se>
5729 * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
5730 instead of _4 and _8 as postfix for libgfortran calls.
5732 2003-09-16 Paul Brook <paul@nowt.org>
5734 * array.c (compare_bounds): New function.
5735 (gfc_compare_array_spec): Use it.
5737 2003-09-14 Paul Brook <paul@nowt.org>
5739 * primary.c (gfc_match_rvalue): Make sure sym->result is set.
5740 * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
5742 2003-09-14 Paul Brook <paul@nowt.org>
5744 * check.c (dim_rank_check): Allow assumed bounds if requested.
5745 (gfc_check_lbound): Call it.
5746 (gfc_check_ubound): Ditto.
5747 (gfc_check_size): Change to match.
5748 * simplify.c (gfc_simplify_bound): New function.
5749 (gfc_simplify_lbound): New function.
5750 (gfc_simplify_ubound): New function.
5751 * intrinsic.h: Declare them.
5752 * intrinsic.c (add_functions): Use them.
5754 2003-09-14 Paul Brook <paul@nowt.org>
5756 * io.c (format_lex): Initialize negative_flag.
5757 (check_format): Intialize repeat.
5758 * trans-io.c (gfc_new_nml_name_expr): Declare static.
5759 (gfc_new_var_expr): Ditto.
5761 2003-09-14 Paul Brook <paul@nowt.org>
5763 * trans-array.c (gfc_conv_array_initializer): Handle derived types.
5764 * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
5766 2003-09-12 Paul Brook <paul@nowt.org>
5768 * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
5770 2003-09-12 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
5772 * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
5773 for a correct expression.
5775 2003-09-10 Kejia Zhao <kejia_zh@yahoo.com.cn>
5777 * trans-intrinsic.c (real_compnt_info): New struct.
5778 (prepare_arg_info): New function.
5779 (gfc_conv_intrinsic_set_exponent): New function.
5780 (gfc_conv_intrinsic_scale): New function.
5781 (gfc_conv_intrinsic_nearest): New function.
5782 (gfc_conv_intrinsic_fraction): New function.
5783 (gfc_conv_intrinsic_exponent): New function.
5784 (gfc_conv_intrinsic_spacing): New function.
5785 (gfc_conv_intrinsic_rrspacing): New function.
5786 (gfc_conv_intrinsic_function): Use them.
5788 2003-08-24 XiaoQiang Zhang (zhangapache@yahoo.com>
5790 * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
5791 build_int_2 changed from (high, low) to (low, high).
5792 * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
5793 ioparm_namelist_read_mode, iocall_set_nml_val_int,
5794 iocall_set_nml_val_float, iocall_set_nml_val_char,
5795 iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
5796 (gfc_build_io_library_fndecls): Add variable initialization.
5797 (gfc_new_nml_name_expr, get_new_var_expr): New function.
5798 (build_dt): Add namelist support.
5799 * io.c (value): New variable.
5800 (check_format): Support FMT_H now.
5802 2003-09-07 Paul Brook <paul@nowt.org>
5804 * io.c (gfc_resolve_dt): Error if format label is not defined.
5806 2003-09-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
5808 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
5809 about case_switch's break. The other is about building the condition
5810 statement tree, which judges the argument in the range of the
5811 corresponding integer type.
5812 * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
5813 for the large values.
5815 2003-09-05 Paul Brook <paul@nowt.org>
5817 * f95-lang.c (expand_function_body): Gimplify the function.
5819 2003-09-04 Jeff Law <law@redhat.com>
5821 * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
5824 2003-09-04 Paul Brook <paul@nowt.org>
5826 * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
5827 (gfc_expand_stmt): New function.
5828 (LANG_HOOKS_RTL_EXPAND_STMT): Define.
5829 (expand_function_body): Use tree_rest_of_compilation.
5830 * trans-decl.c (gfc_generate_function_code): Don't free cfun.
5832 2003-09-03 Jeff Law <law@redhat.com>
5834 * f95-lang.c (gfc_init_builtin_functions): C arrays start at
5837 2003-08-30 Paul Brook <paul@nowt.org>
5839 * f95-lang.c (builtin_function): Remove #if 0 code.
5840 (gfc_define_builtin): New function.
5841 (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
5842 * mathbuiltins.def: New file.
5843 * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
5844 (gfc_intrinsic_map): Use mathbuiltins.def.
5845 (gfc_intrinsic_builtin_t): Remove.
5846 (gfc_build_intrinsic_lib_fndecls): Update.
5847 * trans-types.c (gfc_init_types): Remove redundant initilaization of
5848 signed_size_type_node.
5850 2003-08-29 Paul Brook <paul@nowt.org>
5852 * arith.c (gfc_real_kinds): Use correct minimum exponents.
5854 2003-08-22 Kejia Zhao <kejia_zh@yahoo.com.cn>
5856 * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
5857 (gfc_conv_intrinsic_function): Add MODULO.
5859 2003-08-22 Jason Merrill <jason@redhat.com>
5861 * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
5863 2003-08-22 Andreas Jaeger <aj@suse.de>
5865 * Make-lang.in (f95.install-common): Add DESTDIR support.
5866 * (f95.install-info): Likewise.
5867 (f95.uninstall): Likewise.
5869 2003-08-19 Diego Novillo <dnovillo@redhat.com>
5871 * trans-types.c (gfc_init_types): Initialize
5872 signed_size_type_node with size_type_node.
5874 2003-08-18 Paul Brook <paul@nowt.org>
5876 * dependency.c (gfc_dependency): New enum.
5877 (check_another_array_ref): Remove.
5878 (gfc_get_array_from_component): Remove.
5880 (get_range): Remove.
5881 (get_no_of_elements): Use mpz_t, not mpf_t.
5882 (transform_sections): New function.
5883 (gfc_check_range_range): Rename ...
5884 (gfc_check_section_vs_section): ... to this. Use new function.
5885 (gfc_is_inside_range): Rewrite to match.
5886 (gfc_check_element_vs_section): Ditto.
5887 (gfc_check_element_vs_element): Ditto.
5889 (gfc_dep_resolver): Ditto. Remove unused parameter.
5890 * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
5891 gfc_check_element_vs_element, gfc_is_inside_range,
5892 gfc_get_array_from_component): Remove prototypes for static functions.
5893 (gfc_dep_resolver): Update prototype.
5894 * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
5896 2003-08-15 Paul Brook <paul@nowt.org>
5898 * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
5899 return values to parent scope.
5900 (gfc_build_dummy_array_decl): Ditto.
5902 2003-08-14 Paul Brook <paul@nowt.org>
5904 * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
5905 size of the type, not the pointer.
5906 * resolve.c (resolve_symbol): Give more accurate error message.
5908 2003-08-10 Paul Brook <paul@nowt.org>
5910 * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
5912 2003-08-10 Paul Brook <paul@nowt.org>
5914 * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
5917 2003-08-10 Chun Huang <compiler@sohu.com>
5919 * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
5920 (resolve_symbol): Ditto.
5921 * trans-expr.c (gfc_conv_statement_function): New function.
5922 (gfc_conv_function_expr): Use it.
5924 2003-08-10 Paul Brook <paul@nowt.org>
5926 * trans-array.c (gfc_conv_ss_startstride): Handle functions.
5927 (walk_function_expr): Set section rank.
5928 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
5930 2003-08-10 Paul Brook <paul@nowt.org>
5932 * intrinsic.c (add_sym): Prefix names with correct string.
5933 (add_sym_0s): New function.
5934 (add_subroutines): Register abort.
5936 2003-08-10 Erik Schnetter <schnetter@uni-tuebingen.de>
5938 * gfortran.h: Introduce options to control the mangling.
5939 * lang.opt: Likewise.
5940 * options.c (gfc_init_options): Handle the options.
5941 * trans-common.c (gfc_sym_mangled_common_id): New function.
5942 (gfc_build_common_decl): Call it.
5943 * trans-decl.c (gfc_sym_mangled_function_id): New function.
5944 (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
5946 2003-08-09 Paul Brook <paul@nowt.org>
5948 * module.c (mio_symbol): Always ouput a namespace for formal args.
5949 (load_needed): Namespace now belong to their proper symbol.
5950 (gfc_dump_module): Change G95=>GFORTRAN.
5952 2003-08-05 Paul Brook <paul@nowt.org>
5954 * options.c: Force -fg77-calls.
5956 2003-08-02 Paul Brook <paul@nowt.org>
5958 * Makelang.in: Rename G95_* to GFORTRAN_*.
5959 * All sources: Rename G95_* to GFC_*.
5961 2003-08-01 Paul Brook <paul@nowt.org>
5963 * fortran/Make-lang.in: Use GMPLIBS.
5964 * fortran/config-lang.in: Set need_gmp.
5965 * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
5967 2003-07-27 Andreas Jaeger <aj@suse.de>
5969 * trans-decl.c (gfc_generate_constructors): Convert prototype to
5971 * trans-const.c (gfc_init_constants): Likewise.
5972 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
5974 * gfortranspec.c: Convert to ISO C90.
5975 (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
5977 2003-07-26 Paul Brook <paul@nowt.org>
5979 * lang.opt: Add -fdump-parse-tree.
5980 * options.c (gfc_handle_option): Ditto.
5981 * resolve.c (resolve_forall_iterators): Convert to proper type.
5982 * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
5984 2003-07-26 Paul Brook <paul@nowt.org>
5986 * Makefile.in: Add build dependencies on files common with rest of gcc.
5988 2003-07-26 Lifang Zeng <zlf605@hotmail.com>
5990 * trans.h: Declare g95_trans_pointer_assignment.
5991 * trans-expr.c (g95_trans_pointer_assignment): New function.
5992 (g95_trans_pointer_assign): Use it.
5993 * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
5994 (g95_trans_pointer_assign_need_temp): New function.
5996 2003-07-26 Paul Brook <paul@nowt.org>
5998 * gfortran.texi: Replace references to g95.
6000 2003-07-26 Paul Brook <paul@nowt.org>
6002 Rename g95_* to gfc_*.
6004 2003-07-25 Paul Brook <paul@nowt.org>
6006 * gfortran.h: Rename from g95.h.
6007 * trans-types.c (boolean_type_node, booelan_true_node,
6008 boolean_false_node): Remove.
6009 * trans-types.h: Ditto.
6011 2003-07-25 Chun Huang <compiler@sohu.com>
6013 * parse.c (accept_statement): Implement BLOCK DATA statement.
6014 * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
6017 2003-07-24 Lifang Zeng <zlf605@hotmail.com>
6019 * trans-stmt.c (temporary_list): Define.
6020 (g95_trans_assign_need_temp): New function.
6021 (g95_trans_forall_1): Modified for WHERE.
6022 (g95_trans_where_assign): Modified.
6023 (g95_trans_where_2): Modified.
6024 (g95_evaluate_where_mask): Modified.
6025 (g95_trans_where): Modified.
6026 (g95_get_temp_expr): Removed.
6027 (g95_add_to_where_stmt_list): Removed.
6028 (compute_overall_iter_number): Modified for WHERE.
6029 * trans.h: Remove where_stmt_list.
6031 2003-07-24 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6033 * lang.opt: Correct description of options -J and -M.
6035 2003-07-23 Steven Bosscher <steven@gcc.gnu.org>
6037 * lang.opt: Move help text to here.
6038 * lang-options.h: Remove.
6040 2003-07-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6041 * iresolve.c (g95_resolve_transpose): Proper variable in switch.
6042 * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
6045 2003-07-22 Steven Bosscher <steven@gcc.gnu.org>
6046 Paul Brook <paul@nowt.org>
6048 * check.c (check_rest): Use global pedantic flag.
6049 * io.c (data_desc): Ditto.
6050 * error.c (g95_warning, g95_warning_now): Use global flag.
6051 * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
6052 (expand_function_body): Update to new prototypes.
6053 (g95_init): Use new option names.
6054 * g95.h (g95_option_t): Standardize names.
6055 (g95_init_options, g95_handle_option): Update prototypes.
6056 * interface.c: Use new option names.
6063 * simplify.c: Ditto.
6065 * trans-array.c: Ditto.
6066 * trans-expr.c: Ditto.
6067 * trans-types.c: Ditto.
6068 * trans-decl.c: Ditto.
6069 (g95_build_library_function_decl): Remove obsolete VPARAMS.
6071 * options.c (g95_display_help): Remove.
6072 (g95_init_options): Convert to new scheme.
6074 (g95module_option): Ditto, rename from g95_parse_arg.
6075 (g95_handle_module_path_options): New function.
6076 * trans-equivalence.c: Fix error message.
6077 * lang.opt: Corrections.
6079 2003-07-21 Steven Bosscher <steven@gcc.gnu.org>
6081 * lang.opt: New file.
6083 2003-07-21 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6085 * decl.c (match_attr_spec): Set colon_seen.
6087 2003-07-14 Paul Brook <paul@nowt.org>
6089 * trans-array.c: Update comment.
6090 (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
6091 * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
6092 minmaxloc,minmaxval): Ditto.
6093 * trans-io.c (g95_trans_transfer): Ditto.
6094 * trans-stmt.c: Remove unneeded prototypes.
6095 (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
6096 (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
6097 (compute_inner_temp_size): Remove bits of dead code. Add comments.
6098 Don't share loopinfo.
6099 (compute_overall_iter_number): Declare as static.
6100 (allocate_temp_for_forall_nest): Ditto.
6101 (g95_trans_forall_1): Don't pass shared loopinfo.
6102 * trans.c (g95_start_block): Expand comment.
6104 2003-07-12 Paul Brook <paul@nowt.org>
6106 * arith.c (g95_index_integer_kind): Remove unused initializer.
6107 * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
6108 index by size of element.
6109 (generate_loop_for_rhs_to_temp): Ditto.
6110 (allocate_temp_for_forall_nest): Use element size, not index size.
6112 2003-07-11 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6114 * arith.c (g95_index_integer_kind): Add a TODO.
6115 * simplify.c (g95_simplify_nearest): Add a TODO.
6117 2003-07-09 Chun Huang <compiler@sohu.com>
6119 * trans.h: Add declarations for gfor_fndecl_string_scan and
6120 gfor_fndecl_string_verify.
6121 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
6122 * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
6123 (g95_conv_intrinsic_verify): New function.
6124 (g95_conv_intrinsic_function): Add SCAN and VERIFY.
6125 * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
6126 of parameter 'BACK=.TRUE.'
6128 2003-07-05 Lifang Zeng <zlf605@hotmail.com>
6130 * trans-stmt.c (iter_info, forall_info): Define.
6131 (g95_trans_forall_block): Remove.
6132 (g95_trans_forall_loop): Use forall info blocks.
6133 (g95_trans_nested_forall_loop): New function.
6134 (g95_do_allocate): Handle things other than logical masks.
6135 (generate_loop_for_temp_to_lhs): New function.
6136 (generate_loop_for_rsh_to_temp): New function.
6137 (compute_inner_temp_size): New function.
6138 (compute_overall_iter_number): New function.
6139 (allocate_temp_for_forall_nest): New function.
6140 (g95_trans_forall): Move body ...
6141 (g95_trans_forall_1): ... to here. Handle loops with temporaries.
6143 2003-07-02 Paul Brook <paul@nowt.org>
6145 * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
6146 in correct scope. Change callers to match.
6147 * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
6148 * iresolve.c (g95_resolve_reshape): Only use constant shapes.
6150 2003-07-02 Paul Brook <paul@nowt.org>
6152 * trans-array.c (g95_conv_loop_setup): Remove dead var. Use
6153 expression shape for all expressions.
6154 * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
6156 2003-07-03 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6158 * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
6159 g95_parse_arg), intrinsic.c (g95_convert_type): support of
6161 * intrinsic.c, g95.h: Add g95_convert_type_warn,
6162 * resolve.c (g95_resolve_index): Call it.
6164 2003-07-02 Paul Brook <paul@nowt.org>
6166 * iresolve.c (g95_resolve_reshape): Set expression shape.
6167 (g95_resolve_shape): Ditto.
6168 * simplify.c (g95_simplify_shape): Move common code outside condition.
6169 * trans-array.c (g95_conv_array_initializer): Teach it how to count.
6171 2003-07-01 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6173 * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
6176 2003-06-29 Paul Brook <paul@nowt.org>
6178 * array.c (g95_simplify_iterator_var): Don't bother with return value.
6179 * expr.c (find_array_element, find_component_ref): New functions.
6180 (remove_subobject_ref): New function.
6181 (simplify_const_ref): Use them. Rename from simplify_component_ref.
6182 (simplify_ref_chain): New function.
6183 (g95_simplify_expr): Use it. Simplify parameter variable subobjects.
6184 (g95_specification_expr): Simplify the expression.
6185 * resolve.c (resolve_operator): Check simplifications return code.
6186 (g95_resolve_expr): Ditto.
6188 2003-06-26 Paul Brook <paul@nowt.org>
6190 * expr.c (simplify_component_ref): New function.
6191 (g95_simplify_expr): Use it.
6192 * resolve.c (resolve_structure_cons): Handle references.
6194 2003-06-25 Paul Brook <paul@nowt.org>
6196 * trans-io.c (build_dt): Handle internal units.
6198 2003-06-25 Canqun Yang <canqun@yahoo.com.cn>
6200 * trans-common.c (g95_build_common_decl): Array index range starts at 0.
6201 (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
6202 Use g95_array_index_type instead of integer_type_node.
6203 (g95_build_common_decl, g95_set_common_master_type): Use
6204 g95_character1_type_node instead of char_type_node.
6205 * trans-equivalence.c (g95_layout_local_equiv): As above.
6207 2003-06-24 Steven G. Kargl <kargls@attbi.com>
6209 * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
6210 remove last remains of -fquiet.
6212 2003-06-22 Paul Brook <paul@nowt.org>
6214 * resolve.c (resolve_operator): Don't fail if we can't simplify.
6215 (g95_resolve_expr): Ditto.
6216 (resolce_code): Mark as static.
6217 * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
6218 gimplifer doesn't (yet).
6220 2003-06-20 Paul Brook <paul@nowt.org>
6222 * g95.h: Add ST_PAUSE and EXEC_PAUSE.
6223 * match.c (g95_match_if): Add ST_PAUSE.
6224 (g95_match_stopcode): New function.
6225 (g95_match_pause, g95_match_stop): Use it.
6226 * parse.c (g95_ascii_statement): Handle ST_PAUSE.
6227 (decode_stmt, next_statement, parse_executable): Ditto.
6228 * resolve.c (resolve_code): Ditto.
6229 * st.c (g95_free_statement): Ditto.
6230 * trans-stmt.c (g95_trans_pause): New function.
6231 * trans-stmt.h: Declare it.
6232 * trans.c (g95_trans_code): Use it.
6233 * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
6235 (g95_build_builtin_function_decls): Initialize them.
6237 * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
6239 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6241 * io.c (g95_match_open , g95_match_close, g95_match_inquire,
6242 match_filepos): Fix error handling.
6244 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6246 * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
6247 Add assertions on arguments.
6248 * resolve.c (expression_shape): Remove useless &.
6249 * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
6250 g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
6251 g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
6252 g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
6253 g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
6254 g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
6255 (g95_simplify_not, g95_simplify_scale): Add assertions.
6257 2003-06-15 Paul Brook <paul@nowt.org>
6259 Clean up stuff to work with the ssa optimizers.
6260 * convert.c (convert): Handle BOOLEAN_TYPEs.
6261 * f95-lang.c (g95_truthvalue_conversion): Implement.
6262 * trans-array.c (g95_trans_array_constructor_value): Group multiple
6264 * trans.h (g95_truthvalue_conversion): Declare.
6265 * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
6266 * trans-stmt.c (g95_trans_character_select): Don't create array
6267 assignments. Mark labels as indirect jump targets.
6268 * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
6269 (g95_get_dtype_cst): Handle LOGICAL types.
6271 2003-06-14 Paul Brook <paul@nowt.org>
6273 * f95-lang.c (g95_gimplify_expr): New function.
6274 * trans-array.c (g95_trans_array_constructor_value): Don't create
6276 (g95_conv_expr_descriptor): Rename simple->gimple.
6277 * trans-expr.c (conv_expr_op): Use proper logical operators.
6278 * trans-intrinsic.c (build_fixbound_expr): New function.
6279 (build_fix_expr): Ditto.
6280 (g95_conv_intinsic_aint): Use them. Use builtin functions.
6281 (g95_conv_intrinsic_function): Add FLOOR and CEILING.
6283 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6285 * array.c (g95_compare_array_spec): Remove unreachable code.
6286 * expr.c (g95_copy_expr): Likewise.
6287 * intrinsic.c (g95_convert_type): Likewise.
6288 * misc.c (g95_code2string): Likewise.
6289 * simplify.c (g95_simplify_ishft, g95_simplify_real,
6290 g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
6291 * trans-stmt.c (g95_trans_select): Likewise.
6292 * primary.c (extend_ref): Add an assertion.
6293 * simplify.c (g95_convert_constant): Add const.
6294 * intrinsic.h: Remove g95_check_x_ni.
6295 * f95-lang.c (g95_finish): Call g95_release_include_path.
6297 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6299 * resolve.c (resolve_contained_functions): Fix typo introduced on
6302 2003-06-09 Paul Brook <paul@nowt.org>
6304 * g95.h: Include system.h not hwint.h.
6305 * many: use safe-ctype.h not ctype.h. Change isalpha -> ISALPHA, etc.
6306 * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
6308 2003-06-09 Paul Brook <paul@nowt.org>
6310 * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
6311 * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
6312 * trans-decl.c (g95_add_decl_to_functions): Make non-static.
6313 (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
6314 (g95_generate_function_code): Translate COMMON and EQUIVALENCE
6316 * trans.h (g95_trans_equivalence, g95_trans_common,
6317 g95_add_decl_to_function): Declare.
6318 * trans-common.c, trans-equivalence.c: New files.
6320 2003-06-08 Steven Bosscher <steven@gcc.gnu.org>
6322 * intrinsic.c (g95_intrinsic_extension): Remove.
6323 (add_functions): Substitute g95_check_x for g95_check_x_ni
6325 (g95_init_expr_extensions): New function.
6326 (g95_intrinsic_func_interface): Use it.
6327 * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
6328 * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
6329 g95_check_precision, g95_check_present, g95_check_radix,
6330 g95_check_range, g95_check_selected_real_kind): Do not set
6331 g95_intrinsic_extension.
6332 (g95_check_x_ni): Remove now duplicate of g95_check_x.
6334 * expr.c (check_inquiry): Add FIXME, fixup some code style.
6336 2003-06-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6338 * g95.h (ref_type): Name this type explicitly.
6339 * module.c (MIO_NAME): Add specialisations of mio_name.
6340 (mio_symbol_attribute, mio_typespec, mio_array_ref,
6341 mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
6342 (ab_attribute): Name this type explicitly.
6343 (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
6345 2003-06-05 Kejia Zhao <kejia_zh@yahoo.com.cn>
6347 * trans-intrinsic.c (g95_conv_allocated): New function.
6348 (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
6350 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
6352 * f95-lang.c: Don't include g95-support.h
6353 (g95_mark_addressable): Add prototype.
6354 (g95_init_decl_processing): Remove C front end hack.
6355 * f95-tree.c: Remove file.
6356 * support.c: Remove file.
6357 * g95-support.h: Remove file.
6358 * trans-types.c (g95_init_types): Set up boolean
6359 type related tree nodes.
6360 * Make-lang.in: Remove rules for dead files and
6361 dependencies on them.
6363 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
6365 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
6366 C front end dependency. Also, convert.c does not depend on
6367 g95-support.h anymore.
6368 * convert.c: Don't include c-common.h and g95-support.h
6369 * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
6370 (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
6371 stmts_are_full_exprs_p, current_stmt_tree,
6372 current_scope_stmt_stack): Remove.
6373 * g95-support.h (unsigned_conversion_warning): Kill proto.
6374 (boolean_type_node, boolean_true_node, boolean_false_node):
6375 Don't define here. Instead, make then true tree nodes in
6377 * support.c (c_global_trees): Die, C front end, die!!!
6378 (g95_init_c_decl_hacks): Don't touch intmax_type_node,
6379 uintmax_type_node, string_type_node and const_string_type_node.
6380 (decl_constant_value, overflow_warning): Make static functions.
6381 They are in death row too, though.
6382 (default_conversion, c_expand_asm_operands): Remove.
6383 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
6384 trans.c: Don't include c-common.h.
6385 * trans-types.c (boolean_type_node, boolean_true_node,
6386 boolean_false_node): Make them real tree nodes.
6387 * trans-types.h (intmax_type_node, string_type_node,
6388 const_string_type_node): Hack to work around C dependencies
6389 in builtin-types.def.
6391 2003-06-04 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6393 * decl.c (decl_types): Add some iterators-like sentinels.
6394 * decl.c (match_attr_spec): Use them.
6395 Use "decl_types" instead of "int".
6396 Add cast in call to g95_match_strings.
6397 * dump-parse-tree.c (g95_show_namespace): Use "g95_intrinsic_op"
6399 * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
6400 (g95_interface_info): Use "g95_intrinsic_op".
6401 * dump-parse-tree.c (g95_show_namespace): Use them.
6402 * interface.c (g95_check_interfaces): Use them.
6403 * module.c (read_module, write_module): Use them.
6404 * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
6405 Use "g95_intrinsic_op".
6406 * interface.c (check_operator_interface): Use "g95_intrinsic_op".
6407 Add a default case in switch statement.
6408 * intrinsic.h (g95_generic_isym_id): Moved to...
6409 * g95.h (g95_generic_isym_id): here.
6410 (g95_intrinsic_sym): Use "g95_generic_isym_id".
6411 * intrinsic.c (make_generic): Use "g95_generice_isym_id".
6412 * trans-intrinsic.c (g95_intrinsic_map_t,
6413 g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
6414 * match.c (g95_match_intrinsic_op): Add cast in call to
6417 2003-06-03 Steven Bosscher <steven@gcc.gnu.org>
6419 * support.c (skip_evaluation, warn_conversion, lvalue_p,
6420 lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
6421 constant_fits_type_p, convert_and_check,
6422 unsigned_conversion_warning): Remove these ugly remnants
6423 we inherited from the C front end.
6424 (function_types_compatible): Remove '#if 0'-edcode.
6425 (build_modify_expr): Likewise.
6426 (convert_for_assignment): Don't use the deceased functions.
6427 The parameter fundecl is now unused.
6428 (decl_constant_value): Always just return decl. In fact
6429 this function is not used at present, but it might be in
6430 the future, when we start using the tree inliner.
6431 (overflow_warning, default_conversion, c_expand_asm_operands):
6432 Abort when these are called, they are part of the C type
6433 checking implementation and therefore poison to Fortran.
6435 2003-06-04 Steven Bosscher <steven@gcc.gnu.org>
6437 * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
6438 c-pretty-print.o and c-dump.o. Add a comment on why we
6439 depend on c-semantics.c.
6440 * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
6441 Don't use the C front end tree dumper hook to dump the
6442 language specific tree representation -- we don't have
6443 one. So instead, inherit the default langhook.
6445 2003-06-02 Paul Brook <paul@nowt.org>
6447 * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
6449 2003-06-02 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6451 * check.c (g95_check_associated): Use proper types. Remove
6452 extraneous argument in call to g95_error().
6454 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
6456 * resolve.c (resolve_operator): Make logical operands convert to the
6457 type with higher kind.
6459 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
6461 * check.c (g95_check_associated): Make sure both pointer and target has
6462 the same type and rank. Null pointer or array section with vector
6463 subscript as target are not allowed.
6464 * trans.h: Declare gfor_fndecl_associated.
6465 * trans-decl.c: (g95_build_builtin_function_decls): Initialize
6466 gfor_fndecl_associated.
6467 * trans-intrinsic.c (g95_conv_associated): New function.
6468 (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
6470 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
6472 * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
6473 according to POINTER itself rather than TARGET.
6474 (g95_conv_expr_descriptor): Make lbound start at 1.
6475 * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
6477 2003-06-01 Paul Brook <paul@nowt.org>
6479 * expr.c (g95_type_convert_binary): Make it match the standard.
6480 * g95.texi: Remove dead link.
6482 2003-06-01 Steven Bosscher <steven@gcc.gnu.org>
6484 * g95.texi: Cleanup somewhat in preparation for inclusion
6487 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6488 Canqun Yang <canqun@yahoo.com.cn>
6490 * resolve.c (compare_bound_int, resolve_where_shape): Proper return
6492 (g95_find_forall_index): Return proper value.
6493 (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
6494 compare the return value from g95_find_forall_index.
6496 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6497 * g95.h, io.c (g95_st_label): Remove "length".
6498 (g95_symtree): Remove "link".
6499 (g95_case): Remove "code".
6500 * arith.c, arith.h (g95_compare_string, g95_convert_integer,
6501 g95_convert_real): Make an argument pointer to const.
6502 * decl.c (colon_seen): Add a TODO.
6503 * interface.c (g95_compare_types): Fix typo.
6504 * interface.c (compare_interfaces): Preserve value of "p".
6505 * intrinsic.c (sort_actual): Remove "i".
6506 * match.c (g95_match_assign): Proper type in call to g95_match().
6507 * parse.c (next_free): Avoid duplicate call due to macro.
6508 * parse.c (check_statement_label): wrong type in call to g95_error.
6509 * primary.c (match_real_constant): Add a TODO.
6510 * resolve.c (resolve_select): Remove useless conditional.
6511 * simplify.c (g95_simplify_repeat): Proper assignment to
6512 "value.character.string".
6513 * simplify.c (g95_simplify_reshape): Wrong variable in call to
6516 2003-05-20 Canqun Yang <canqun@yahoo.com.cn>
6518 * trans-stmt.c: Remove unnecessary include file defaults.h.
6520 2003-05-19 Lifang Zeng <zlf605@hotmail.com>
6522 * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
6524 (g95_trans_forall): Allow arbitrary number of FORALL indexes and
6525 actual variables used as FORALL indexes.
6527 2003-05-15 Paul Brook <paul@nowt.org>
6529 * trans-array.c (g95_trans_static_array_pointer): Use
6531 (g95_trans_deferred_array): Initialize static array pointers.
6532 * trans-expr.c (g95_conv_function_call): Use formal arglist to
6533 correctly pass POINTER and absent CHARACTER arguments.
6535 2003-05-14 Lifang Zeng <zlf605@hotmail.com>
6537 * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
6538 (g95_resolve_forall_body): Resolve FORALL body.
6539 (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
6540 (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
6541 (g95_find_forall_index): Check whether the FORALL index appears in
6542 the expression or not.
6543 (resolve_code): Modified.
6545 2003-05-14 Paul Brook <paul@nowt.org>
6547 * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
6549 2003-05-13 Paul Brook <paul@nowt.org>
6551 * trans-types.c (g95_max_array_element_size): Now a tree node.
6552 (g95_init_types): Work out max size properly.
6553 (g95_get_dtype_cst): Modify to match.
6555 2003-05-11 Paul Brook <paul@nowt.org>
6557 * trans-io.c (add_case): Create a label decl for case labels.
6559 2003-05-11 Paul Brook <paul@nowt.org>
6561 * arith.c (g95_integer_index_kind): New variable.
6562 * f95-lang.c (g95_init): Move frontend initialization here ...
6563 (g95_post_options): ... from here.
6564 * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
6565 * intrinsic.c (add_functions): Use index kinds.
6566 * iresolve.c: Convert to index_kind where needed.
6567 * resolve.c (g95_resolve_index): Make public, use index_kind.
6568 (resolve_array_ref): Adjust to match.
6569 * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
6570 * trans-stmt.c: Ditto.
6571 * trans-types.c: Ditto.
6572 * trans-types.h (g95_array_index_kind): Remove declaration.
6573 * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
6575 2003-05-07 Paul Brook <paul@nowt.org>
6577 * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
6578 * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
6581 2003-05-07 Paul Brook <paul@nowt.org>
6583 * trans-array.c (trans_static_array_pointer,
6584 g95_trans_array_constructor_value, g95_conv_array_initializer,
6585 g95_conv_structure): CONSTRUCTOR nodes only have one operand.
6586 (g95_add_loop_ss_code): Convert subscripts to the correct type.
6587 * trans-stmt.c (g95_trans_character_select): Ditto.
6588 * trans-types.c (g95_init_types): Ditto.
6590 2003-05-07 Steven Bosscher <steven@gcc.gnu.org>
6592 * f95-lang.c (expand_function_body): Use input_line, not lineno.
6593 * trans-decl.c (g95_generate_function_code,
6594 g95_generate_constructors): Likewise.
6595 * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
6596 g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
6599 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
6600 * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
6601 with components point to the DERIVED type itself, and two DERIVED
6602 type with components point to each other.
6603 * trans-expr.c (g95_conv_componet_ref): Modified
6605 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
6606 * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
6608 (g95_trans_pointer_assign): Implement Nullify.
6610 2003-05-01 Paul Brook <paul@nowt.org>
6612 * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
6613 * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
6615 2003-05-01 Paul Brook <paul@nowr.org>
6617 * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
6618 trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
6621 2003-05-01 Canqun Yang <canqun@yahoo.com.cn>
6623 * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
6626 2003-04-28 Paul Brook <paul@nowt.org>
6628 * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
6629 as their kind suggests.
6630 (g95_resolve_reshape): Ditto.
6632 2003-04-28 Chun Huang <compiler@sohu.com>
6634 * trans-expr.c (g95_conv_substring_expr): New function.
6635 (g95_conv_expr): Use it.
6637 2003-04-28 Paul Brook <paul@nowt.org>
6639 * iresolve.c (g95_resolve_transpose): Make it match the
6641 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
6643 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
6645 * trans-types.c (g95_add_field_to_struct): New function to
6646 add a field to a UNION_TYPE or RECORD_TYPE.
6647 * trans-types.h (g95_add_field_to_struct): Prototype.
6648 (g95_get_derived_type): Use g95_add_field_to_struct to add
6650 * trans-io.c (g95_add_field): Remove.
6651 (ADD_FIELD): Use new g95_add_field_to_struct function.
6652 (ADD_STRING): Likewise.
6653 * trans-stmt.c (g95_trans_select): Likewise.
6654 (g95_add_field): Remove duplicated function.
6656 2003-04-18 Canqun Yang <canqun@yahoo.com.cn>
6658 Port implementation for CHARACTER SELECT from Andy's tree.
6659 * trans-stmt.c (g95_trans_character_select): Implement character
6660 select. (g95_add_field): New function.
6661 * trans-decl.c: Declare 'gfor_gndecl_select_string'.
6662 (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
6663 * g95.h (struct g95_case): Add field 'int n'.
6664 * trans.h: Declare 'gfor_fndecl_select_string'.
6666 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
6668 * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
6669 (g95_insert_bbd): Die on duplicates.
6670 * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
6672 2003-04-14 Steven Bosscher <steven@gcc.gnu.org>
6674 * g95.texi: Require GMP 4.0 -- like we actually
6675 do. Explain the testsuite and what-goes-where.
6676 Don't use undefined texinfo symbol. Break very
6677 long line. Remove finished item from the list
6680 2003-04-11 Canqun Yang <canqun@yahoo.com.cn>
6682 * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
6685 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
6687 * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
6688 (g95_trans_forall_body): New function.
6690 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
6692 * resolve.c (resove_where): New function.
6693 (resolve_where_shape): New function.
6694 (resolve_code): Add call to 'resolve_where'
6695 * trans-stmt.c (g95_trans_where): Modified.
6696 (g95_trans_where_2): New function.
6697 (g95_trans_where_assign): New function.
6698 (g95_evaluate_where_mask): New function.
6699 (g95_add_to_stmt_list): New function.
6700 (g95_get_temp_expr): New function.
6701 * trans.h (where_stmt_list): New structure.
6703 2003-04-10 Paul Brook <paul@nowt.org>
6705 * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
6706 (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
6708 2003-04-10 Steven Bosscher <steven@gcc.gnu.org>
6710 Update after mainline -> tree-ssa-branch merge.
6711 * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
6713 (g95_init): Update for new lang_hooks definition.
6714 (g95_post_options): New langhook.
6715 (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
6716 * scanner.c (g95_new_file): Comment update.
6718 2003-04-09 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6720 * g95.h, lang-options.h: Add -Wimplicit-interface.
6721 * options.c (g95_init_options, g95_parse_arg): Set it.
6722 * interface.c (check_intents): Warn about call with implicit
6724 * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
6727 2003-04-05 Paul Brook <paul@nowt.org>
6729 * iresolve.c (g95_resolve_spread): Don't resole based on type.
6730 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
6732 2003-03-29 Paul Brook <paul@nowt.org>
6734 * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
6735 (g95_resolve_unpack): Ditto.
6736 * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
6737 (g95_conv_intrinsic_function): Use it. Remove PACK and UNPACK.
6738 (g95_is_intrinsic_libcall): Add PACK and UNPACK.
6740 2003-03-25 Paul Brook <paul@nowt.org>
6742 * arith.c (g95_unary_user, g95_user): Remove dead functions.
6744 * array.c (g95_free_array_ref): Ditto.
6746 * symbol.c (g95_use_derived_tree): Ditto.
6747 * intrinsic.c (add_functions): Use simplification for SCALE.
6748 * primary.c (g95_match_rvalue): Test sym, not symtree.
6750 2003-03-25 Paul Brook <paul@nowt.org>
6752 * trans-decl.c (build_function_decl): Add parameter before it gets
6753 turned into a constant.
6754 * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
6755 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
6756 * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
6758 2003-03-22 Paul Brook <paul@nowt.org>
6760 * trans-array.c (g95_conv_array_initializer): Allow scalar
6762 * trans-decl.c (g95_finish_var_decl): Result variables are not
6764 * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
6765 (g95_conv_intrinsic_function): Use it.
6766 * trans-types.h (g95_type_spec): Remove dead declaration.
6768 2003-03-21 Paul Brook <paul@nowt.org>
6770 * trans-decl.c (g95_build_function_decl): Mark string parameters.
6772 2003-03-20 Paul Brook <paul@nowt.org>
6774 * trans-decl.c (g95_build_function_decl): Put character length
6775 parameters at the end of the function declaration.
6776 * trans-expr.c (g95_conv_function_call): Ditto.
6777 * trans-types.c (g95_get_function_type): Ditto.
6779 2003-03-20 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6781 * resolve.c (resolve_formal_arglist): Don't impose intent for
6782 procedure arguments of pure functions.
6783 (resolve_select): Remove redundant assignment.
6785 2003-03-19 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6787 * arith.c (validate_logical), g95.h, options.c (g95_init_options):
6789 * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
6790 * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
6792 * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
6794 * symbol.c (g95_add_type): Fix typo in comment.
6797 2003-03-16 Paul Brook <paul@nowt.org>
6799 * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
6800 * expr.c (g95_build_call): Remove.
6801 * f95-lang.c (puchdecl_top_level): New function.
6802 * g95.h (g95_code): Store resolved symbol, not just the name.
6803 * intrinsic.c (g95_intrinsic_namespace): New global namespace.
6804 (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
6805 (g95_get_intrinsic_sub_symbol): New function.
6806 * iresolve.c (g95_resolve_cpu_time): Use it.
6807 (g95_resolve_random_number): Ditto.
6808 * resolve.c: Set code->resolved_sym instead of code->sub_name.
6809 * trans-decl.c (g95_get_extern_function_decl): Give external decls
6810 the correct DECL_CONTEXT. Add global symbold to the global scope.
6811 * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
6814 2003-03-16 Paul Brook <paul@nowt.org>
6816 * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
6817 * options.c (g95_parse_arg): Ditto.
6818 * module.c (mio_symbol_attribute): Handle the always_explicit bit.
6819 * resolve.c (resolve_formal_arglist): The always_explicit sould be set
6820 for the procedure, not the parameter.
6821 * trans-array.c (g95_trans_g77_array): New function.
6822 (g95_trans_assumed_size): Use it.
6823 (g95_trans_dummy_array_bias): Ditto.
6824 (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
6825 (g95_conv_expr_descriptor): ... to here. Update callers.
6826 * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
6827 (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
6828 * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
6829 * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
6830 * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
6831 (g95_sym_type): Ditto.
6833 2003-03-15 Paul Brook <paul@nowt.org>
6835 * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
6837 * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
6839 2003-03-14 Paul Brook <paul@nowt.org>
6841 * trans-array.c (g95_array_is_packed): Remove.
6842 (g95_conv_array_base): Correctly handle all descriptorless cases.
6843 (g95_conv_array_stride): Use descriptorless strides.
6844 (g95_trans_dummy_array_bias): Don't always repack the array.
6845 (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
6847 * trans-types.c (g95_get_nodesc_array_type): Differentiate between
6848 dummy and non-dummy arrays...
6849 (g95_sym_type, g95_get_derived_type): ... like these.
6850 (g95_get_array_type_bounds): Allow discontiguous arrays.
6852 2003-03-12 Paul Brook <paul@nowt.org>
6854 * array.c (g95_resolve_array_spec): Fix comment.
6855 * g95.h (symbol_attributes): New flag always_explicit.
6856 * resolve.c (resolve_formal_arglist): Set it always_explicit.
6857 * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
6858 * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
6859 (g95_trans_array_bounds): Allow assumed shape arrays.
6860 (g95_trans_repack_array): Remove.
6861 (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
6862 * trans-decl.c (g95_build_qualified_array): Only ignore absent
6863 bounds for assumed size arrays.
6864 (g95_build_dummy_array_decl): Use descriptorless arrays.
6865 * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
6866 (g95_trans_pointer_assign): Fix typo.
6867 * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
6869 (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
6870 * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
6871 Also modify callers.
6872 * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
6874 2003-03-08 Paul Brook <paul@nowt.org>
6876 * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
6877 (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
6878 * resolve.c (compare_spec_to_ref): Allow full array sections.
6880 2003-03-08 Paul Brook <paul@nowt.org>
6882 * expr.c (g95_simplify_expr): Also simplify array index and
6883 substring expressions.
6884 * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
6885 * trans-array.c (g95_trans_array_bounds): New function.
6886 (g95_trans_auto_array_allocation): Use it.
6887 (g95_trans_assumed_size): Rewrite.
6888 * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
6889 (gfor_fndecl_repack): Remove.
6890 (g95_build_qualified_array): Handle absent upper bounds.
6891 (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
6892 (g95_get_symbol_decl): Update.
6893 (g95_build_intrinsic_function_decls): Initialize new decls.
6894 * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
6895 (gfor_fndecl_repack): Remove.
6896 * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
6897 * trans-types.c: (g95_build_array_type): Merge duplicated code..
6898 (g95_get_nodesc_array_type): Handle absent bounds.
6899 * trans-types.h (g95_get_nodesc_array_type): Declare.
6901 2003-03-04 Paul Brook <paul@nowt.org>
6903 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
6906 2003-03-02 Paul Brook <paul@nowt.org>
6908 * options.c (g95_init_options): Drfault to 1.
6909 (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
6910 * trans-array.c (g95_conv_array_data, g95_conv_array_base,
6911 g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
6912 Handle non-constant size automatic arrays.
6913 (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
6914 generic bound functions.
6915 (g95_trans_auto_array_allocation): Don't create a descriptor.
6916 (g95_trans_assumed_size): New function (broken).
6917 (g95_trans_dummy_array_bias): Remove unused var.
6918 * trans-array.h (g95_trans_assumed_size): Declare.
6919 * trans-decl.c (create_index_var): New fuction.
6920 (g95_build_qualified_array): New function.
6921 (g95_get_symbol_decl): Use it.
6922 (g95_trans_deferred_vars): Handle assumed shape seperately.
6923 * trans-types.c (get_element_type): Handle heap allocated arrays.
6924 (g95_is_nodesc_array): Include non-const size arrays.
6925 (g95_get_nodesc_array_type): Ditto.
6927 2003-02-23 Paul Brook <paul@nowt.org>
6929 * trans-array.c (g95_array_init_size): Should use stride, not size of
6932 2003-02-18 Paul Brook <paul@nowt.org>
6934 * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
6935 after intrinsic function check.
6937 2003-02-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6939 * io.c (match_io): Fix missing return value and remove useless
6941 * match.c (g95_match): Remove useless assignment.
6942 * module.c (parse_string): Remove useless post increment.
6943 * simplify.c (g95_simplify_verify): Remove useless assignment.
6945 2003-02-15 Paul Brook <paul@nowt.org>
6947 * expr.c (restricted_intrinsic): Handle bad values gracefully.
6948 * g95.h (symbol_attribute): Add referenced member.
6949 (g95_symbol): Add dummy_order member.
6950 (g95_set_sym_referenced): Declare.
6951 * match.c (g95_match_assignment, g95_match_call): Use it
6952 * primary.c (match_actual_arg, g95_match_rvalue,
6953 g95_match_variable): Ditto.
6954 * symbol.c (next_dummy_order): New variable.
6955 (g95_set_sym_referenced): New function.
6956 (check_done): New function.
6957 (g95_add_*): Use it.
6958 * trans-decl.c: Make formatting conform to GCC standards.
6959 (g95_defer_symbol_init): Add dummy variables in the right order.
6960 (g95_get_symbol_decl): Only accept referenced variables.
6961 (g95_create_module_variable): Module variables are always required.
6962 (generatr_local_decls): New function.
6963 (generate_local_vars): New function.
6964 (g95_generate_function_code): Use it.
6966 2003-02-13 Paul Brook <paul@nowt.org>
6968 * trans-decl.c (g95_conv_struct_cons): Remove.
6969 (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
6970 * trans-expr.c (g95_conv_structure): New function.
6971 (g95_conv_expr): Use it.
6973 2003-02-09 Paul Brook <paul@nowt.org>
6975 * trans-array.c (g95_array_init_size): Don't evaluate the linit
6976 expressions multiple times.
6977 (g95_trans_auto_arry_allocation): Use pointer not tmp.
6979 2003-02-08 Paul Brook <paul@nowt.org>
6981 * module.c (mio_symtree_ref): Declare as static.
6982 (mio_expr): Remove dead code.
6983 (read_module): Set the symtree link for fixups.
6984 * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
6985 (build_round_expr): ... to this.
6986 (g95_conv_intrinsic_aint): New function.
6987 (g95_conv_intrinsic_function): Use it.
6989 2003-02-08 Paul Brook <paul@nowt.org>
6991 * trans-array.c (g95_trans_array_constructor_value): Use the acutal
6992 offset after modificaton, not the increment expression.
6993 * dependency.c: Kill excess whitespace.
6995 2003-02-07 Sanjiv Gupta <sanjivg@noida.hcltech.com>
6997 * dependency.h: Remove some function declarations.
6998 * dependency.c (get_no_of_elements): Change this function not to
7000 * other: Add comments for all modified functions.
7002 2003-02-06 Paul Brook <paul@nowt.org>
7004 * g95spec.c (lang_specific_functions): Fix initializer warning.
7005 * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
7006 for structure type names.
7007 * trans-decl.c (g95_cons_structure_cons): New function.
7008 (g95_get_symbol_decl): Use it.
7009 * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
7012 2003-02-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7014 * resolve.c (compare_cases): Add const to casts.
7016 2003-01-30 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7018 * g95.h (g95_check_f): Change a1 to f1m.
7019 * intrinsic.c (add_sym_1m, check_specific,
7020 g95_intrinsic_func_interface): Use it.
7022 * module.c (init_pi_tree): Remove useless cast.
7023 (fp2): Fix argument type.
7025 * parse.c (parse_select_block): Add comment.
7027 2003-02-05 Toon Moene <toon@moene.indiv.nluug.nl>
7029 * lang-options.h: Fix warning involving C90 concatenated
7032 2003-02-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
7033 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7035 * io.c (format_asterisk): Complete initializer to kill warning.
7036 * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
7037 DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
7038 (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
7039 new defines to complete initializers. Kills all warnings.
7041 * Make-lang.in: Comment cleanup.
7043 2003-02-05 Paul Brook <paul@nowt.org>
7045 * array.c (g95_free_constructor): Handle NULL expressions.
7046 * resolve.c (resolve_structure_cons): Ditto.
7047 * decl.c (g95_match_null): New Function.
7048 (variable_decl): Use it.
7049 * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
7050 * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
7051 * trans-types.c (g95_set_decl_attributes): Remove empty function.
7053 2003-02-05 Paul Brook <paul@nowt.org>
7055 * trans.h (build1_v): New macro.
7056 (build_v): Remove pointless and incorrect prototype.
7057 * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
7058 * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
7060 2003-02-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
7062 * Make-lang.in (F95_OBJS): Remove one more dead file.
7064 2003-02-01 Paul Brook <paul@nowt.org>
7066 * lang-specs.h: Don't pass -ffixed-form to the linker.
7067 * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
7069 2003-02-01 Paul Brook <paul@nowt.org>
7071 * Make-lang.in (F95_OBJS): Remove dead files.
7072 * trans-array.c (g95_array_init_size): Do the right thing when
7074 * trans-decl.c (g95_generate_function_code): Initialize deffered
7075 symbol list before translating contained subroutines.
7076 * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
7077 scalar invariant values here...
7078 (g95_conv_variable, g95_conv_function_call): ... instead of here ...
7079 * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
7081 2003-01-29 Paul Brook <paul@nowt.org>
7083 * trans-array.c (g95_add_loop_code): Put pre code in the right block.
7084 (g95_walk_elemental_function_args): Reverse chains before adding.
7085 (g95_reverse_ss): Move about a bit.
7086 * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
7089 2003-01-28 Paul Brook <paul@nowt.org>
7091 * intrinsic.c (resolve_intrinsic): Use correct union member.
7092 * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
7094 * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
7095 use associated variables.
7096 * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
7097 * trans-expr.c (g95_conv_expr_present): ... to here.
7098 * trans.h: Declare it.
7099 * trans-types.c (g95_sym_type): Assume subroutine if not specified.
7101 2003-01-28 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7103 * array.c (expand_iterator): Suppress useless assignment.
7104 * decl.c (match_char_spec): Ditto.
7105 * io.c (match_io_iterator): Ditto.
7106 * primary.c (match_real_constant): Ditto.
7107 * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
7108 Ditto. Also, use g95_intrinsic_op not int for intrinsic operators.
7109 * matchexp.c (match_add_operand, match_level_5): Likewise.
7110 * module.c (parse_atom, find_enum): Likewise.
7111 * resolve.c: move #include <string.h>
7112 (resolve_select): Fix serious typo.
7114 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.n>
7116 * Make-lang.in: Don't build with broken tree-ssa-pre.
7118 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.nl>
7120 * resolve.c (resolve_index): Add a TODO.
7121 * symbol.c: Remove useless "#include <ctype.h>".
7123 2003-01-27 Paul Brook <paul@nowt.org>
7125 * check.c (check_rest): Allow different type kinds as an extension.
7126 * g95.h (g95_resolve_f): Add f1m.
7127 * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
7128 * intrinsic.h: Chenge prototypes for MIN and MAX.
7129 * iresolve.c (g95_resolve_minmax): New function.
7130 (g95_resolve_min, g95_resolve_max): Use it.
7131 * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
7133 (g95_conv_intrinsic_present): Fix logic.
7135 2003-01-27 Steven Bossche <s.bosscher@student.tudelft.nl>
7137 * g95.h (g95_case): Don't be a tree, be a double linked list.
7138 * match.c (match_case_selector): Remove redundant semantics check.
7139 Clean up a few goto's to make it a tiny little bit faster.
7140 * resolve.c (case_tree): Die.
7141 (compare_cases): Accept and compare unbounded cases too.
7142 (check_case_overlap): Don't build a tree. Instead, merge-sort the
7143 whole list of g95_cases passed from resolve_select.
7144 (sane_logical_select): Die.
7145 (check_case_expr): Return FAILURE if a CASE label is of the wrong
7147 (resolve_select): Fixup case expression for computed GOTOs, put it
7148 in expr, not expr2, for easier handing in the parse tree dumper and
7149 the code generator. Rewrite the rest of the function: Kill
7150 unreachable case labels and unreachable case blocks.
7151 * dump-parse-tree.c (g95_show_code_node): Always dump expr for
7152 an EXEC_SELECT, not case2 anymore.
7153 * trans-const.c (g95_conv_constant_to_tree): New function.
7154 (g95_conv_constant): Use it.
7155 * trans-const.h: Declare prototype for the new function.
7156 * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
7157 g95_trans_character_select): New static functions.
7158 (g95_trans_select): Rewrite.
7160 2003-01-26 Paul Brook <paul@nowt.org>
7162 * intrinsic.c (add_fnctions): Properly add dreal.
7163 * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
7164 (g95_conv_intrinsic_function): Use it.
7165 * trans-io.c (build_dt): Abort on internal files (unimplemented).
7167 2003-01-26 Paul Brook <paul@nowt.org>
7169 Widespread changes to the handling of symbols in expressions. These
7170 are now linked via g95_symtree nodes.
7171 * parse.c (g95_fixup_sibling symbols): New function.
7172 (parse_contained): Use it.
7173 * g95.h (symbol_attribute): Add contained. Indicates a symbol is a
7174 contained procedure that has bee correctly fixed up.
7175 (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
7177 2003-01-24 Paul Brook <paul@nowt.org>
7179 * trans-array.c (g95_walk_expr): Function result attributes are in
7181 * trans-expr.c (g95_conv_function_call,
7182 g95_trans_arrayfunc_assign): Ditto.
7183 * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
7185 2003-01-23 Steven Bosscher <s.bosscher@student.tudelft.nl>
7187 * expr.c (check_restricted): Fix error message.
7188 * symbol.c (free_st_labels): Plug memleak.
7190 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
7192 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
7193 reduce_binary_aa, reduce_binary, eval_intrinsic,
7194 eval_intrinsic_f2): Use typesafe prototypes for eval functions.
7195 * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
7196 for typesafe intrinsics helper functions.
7197 (g95_intrinsic_sym): Use them.
7198 * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
7199 add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
7200 add_sym_5, add_conv, resolve_intrinsic, do_simplify,
7201 check_specific, g95_intrinsic_func_interface,
7202 g95_intrinsic_sub_interface): Adjust all calls to intrinsics
7204 * trans-decl.c (g95_get_extern_function_decl): Likewise.
7205 * Make-lang.in: Don't disable warnings for strict prototypes
7206 any longer, everything is typesafe now.
7208 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
7210 * bbt.c (duplicate_node): Make static.
7211 * module.c (module_name): Make static.
7212 * scanner.c (include_dirs): Make static.
7214 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
7216 Hard coded _gfor_'s should not show up anymore.
7217 * g95.h (PREFIX): New macro.
7218 * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
7220 (g95_resolve_random_number): Likewise.
7221 * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
7222 * trans-io.c: Remove 'prefix' macro. Replace all uses with
7223 the new PREFIX macro from g95.h.
7225 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
7227 The troubles of forking... Andy implemented this just now too.
7228 Let's stick to that and keep the trees close.
7229 * g95.h (g95_st_label): 'format' member is now a g95_expr.
7230 * io.c: Revert previous changes.
7231 (g95_match_format): Match the format string as a character
7233 * match.h (g95_statement_label): Declare external.
7234 * parse.c: Revert previous changes.
7235 * symbol.c (g95_free_st_label): Free a g95_expr instead
7237 * trans-io.c: Revert previous changes.
7238 (build_dt): Use set_string to set the format string.
7240 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
7242 * io.c (format_string): Make non-static.
7243 (g95_match_format): Remember the format string.
7244 (terminate_io): Add I/O termination for empty I/O lists.
7245 * match.h: Declare external format_string.
7246 * parse.c (check_statement_label): Attack the format string
7247 to a format label for FORMAT statements.
7248 * trans-io.c (g95_add_field): Define prefix macro. Replace
7249 all uses of PREFIX define with a use of this macro.
7250 (build_dt): Implement formatted I/O for format labels.
7252 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
7254 * lang-options.h: Kill "-std=F".
7255 * options.c: Remove unimplemented "-std=F". Modify
7257 * misc.c (g95_terminal_width): New function.
7258 * error.c (g95_error_init_1): Use g95_terminal_width.
7259 * g95.h: Add prototype for g95_terminal_width, remove
7262 2003-01-19 Steven Bosscher <s.bosscher@student.tudelft.nl>
7264 * Make-lang.in: Fix typo.
7266 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
7268 * g95.h (struct g95_case): Remove unused cruft, new member
7269 'where' to keep track of the locus of the default case.
7270 * match.c (g95_match_case): Add locus to the current case.
7271 (match_case_selector): Likewise.
7272 * parse.c (parse_select_block): Move semantics check for
7273 multiple DEFAULT cases out of here to...
7274 * resolve.c (check_case_overlap): ...here. Return sooner
7276 (check_case_expr): Take two g95_cases now, use to sure the
7277 expression kinds are the same.
7278 (resolve_select): Cleanup.
7280 2003-01-18 Paul Brook <paul@nowt.org>
7282 * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
7283 * trans-decl.c (g95_set_symbol_decl): Handle non-array result
7285 (g95_get_extern_function_decl): Put decls in the correct context.
7287 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
7289 * trans-io.c: Port changes from Andy to set ERR flag.
7291 2003-01-17 Paul Brook <paul@nowt.org>
7293 * trans-array.c: Add various comments.
7294 (g95_ss_terminator): Declare as const.
7295 (g95_walk_expr): Remove first parameter and update all callers.
7296 (g95_walk_op_expr): Initialize scalar SS properly.
7297 * trans-array.h (g95_walk_expr): Update prototype.
7298 * trans-expr.c: Update for new g95_walk_expr.
7299 * trans-intrinsic.c: Ditto.
7300 * trans-io.c: Ditto.
7301 * trans.h: Various comments for SS chains.
7303 2003-01-17 Paul Brook <paul@nowt.org>
7305 * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
7307 * intrinsic.c (add_functions): Use them.
7308 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
7309 * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
7311 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
7313 Fallout of a small merge conflict:
7314 * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
7316 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
7318 * initrinsic.c: New add_sym_* functions for strong typing.
7319 (add_conv): Make prototype strict.
7320 * dump-parse-tree.c, dependency.c: Include config.h
7321 * resolve.c, trans-io.c: Fix typos.
7323 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
7325 * dump-parse-tree.c (g95_show_code_node): Show the
7326 condition for a computed GOTO that was transformed
7327 to a SELECT CASE construct.
7328 * resolve.c (check_case_overlap): Revert previous switch
7329 to treaps, it was too slow and didn't catch all trouble.
7330 (resolve_symbol): Be more flexible about module procedures.
7331 * symbol.c (check_conflict): Point to relevant section in
7332 the standard for dubious conflict. Allow procedure
7333 dummy arguments to be optional again.
7334 * trans-io (add_field): Rename to g95_add_field. Change
7336 * trans-stmt (trans_select): Handle unbounded cases for
7337 integer SELECT CASE constructs. Fix/add more comment.
7339 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
7341 * g95.h: Uses GCC's function attribute macros.
7342 * error.c, module.c, parse.c, g95.h: More function attributes.
7344 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
7346 * trans-decl.c (get_label_decl): Use TREE_LINENO instead
7347 of DECL_SOURCE_LINE, and TREE_FILENAME instead of
7350 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
7352 * f95-lang.c (pushdecl): Use TREE_LINENO instead of
7354 * trans.c (g95_trans_code): Use annotate_all_with_file_line
7355 instead of nowdead wrap_all_with_wfl.
7357 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
7359 * parse.c (g95_parse_file): In verbose mode, dump the parse tree
7360 before generating code, so we can still see it even if the code
7361 generation phase dies.
7363 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
7365 * decl.c (build_sym): Split out initialization expression parts...
7366 (add_init_expr_to_sym): ...to here.
7367 (variable_decl): Add the symbol following an attribute list to the
7368 symbol tree before parsing the optional initialization expression
7369 if the symbol is not of a derived type.
7370 * primary.c (g95_match_rvalue): Don't assume a symbol always has
7371 a value if it is a PARAMETER.
7373 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
7375 * misc.c: Don't #include <mcheck.h>
7376 * module.c: Ditto. Kill uses of mtrace, muntrace. If there
7377 ever was a glibc bug, then either this was never reported to
7378 glibc people, or it has been fixed for so long that there's
7379 no information you can find about it, anywhere.
7381 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
7384 * module.c (attr_bits, bt_types, array_spec_types):
7385 Switch 'const' and 'static'.
7386 * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
7388 GNU'ify source code:
7389 * trans-io.c: Numerous fixes, one fixed warning and a few
7390 TODO markers so that we don't forget about them.
7392 2003-01-13 Paul Brook <paul@nowt.org>
7394 * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
7395 * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
7397 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
7398 * match.c (g95_match_stop): Fix dumb == -> != error.
7400 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
7402 * dump-parse-tree.c (show_indent): Add line breaks. This
7403 whole dumping process needs cleanups.
7404 * f95-lang.c (g95_mark_addressable): Fix prototype to match
7405 the langhook. Fix 'return's accordingly.
7406 * g95-support.h: Adjust prototype.
7407 * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
7408 * lang-options.h: Add '-fsyntax-only'.
7409 * options.c (g95_init_options): Init 'no_backend'.
7410 (g95_parse_arg): Deal with '-fsyntax-only'.
7411 * parse.c (g95_parse_file): Do not generate code if 'no_backend'
7414 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
7416 * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
7417 arguments. Also make sure that if a symbol is marked INTRINSIC,
7418 an intrinsic with the symbol's name actually exists.
7419 (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
7420 Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
7421 ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
7423 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
7425 * resolve.c (resolve_contained_functions): Fix condition, don't
7426 throw internal_error if a child namespace has no name. Apparently
7427 this can be the case?
7429 2003-01-11 Paul Brook <paul@nowt.org>
7431 Port changes from Andy's tree:
7432 * g95.h (g95_code): Add stop_code.
7433 * match.c (g95_match_stop): Detter syntax checking.
7434 * resolve.c (resolve_generic_f0): Return match type.
7435 (resolve_generic_f): Remove dead/duplicated code.
7436 (resolve_specific_f): Ditto.
7437 * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
7438 * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
7439 * trans-stmt.c (g95_trans_stop): Handle new STOP format.
7441 2003-01-11 Paul Brook <paul@nowt.org>
7443 * trans-array.c: Various documentation/comment changes.
7444 * trans-stmt.c: Ditto.
7447 2003-01-10 Paul Brook <paul@nowt.org>
7449 * options.c/h: Add -fdump-parse-tree as alias of -v.
7451 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7453 * dump-parse-tree.c (g95_show_namespace): Fixed another
7454 typo. Sorry, it's Friday...
7456 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7459 * trans-array.c, trans-array.h, trans.c, trans-const.c,
7460 trans-const.h, trans-decl.c, trans-expr.c, trans.h
7461 trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
7462 trans-types.c: Fix bogus copyright years, add 2003.
7463 * trans-types.h: Give copyright header.
7465 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7467 * dump-parse-tree.c (g95_show_namespace): Fixed typo.
7468 * expr.c, options.c, scanner.c: Add some more 'const' markers.
7469 * intrinsic.c: Some constant strings moved to read-only memory.
7470 * io.c (format_asterisk): Move to...
7473 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7475 * dump-parse-tree.c (g95_show_namespace): Dump implicit
7476 types for ranges instead of per-letter. Indent the
7477 'CONTAINS' just like everything else.
7478 * resolve.c (resolve_contained_functions): Clarify comment.
7479 Explain non-obvious conditional expression. Improve
7480 diagnostics if tyoe cannot be resolved.
7481 Port semi-fix from Andy's tree:
7482 (was_declared): Move up before first use.
7483 (generic_sym, specific_sym): New functions. Code moved
7484 out if procedure_kind.
7485 (procedure_kind): Simplify using new functions.
7486 (resolve_generic_f): Make sure the functions we find in
7487 a parent namespace is generic.
7488 (resolve_specific_f): Ditto for specific functions.
7490 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7492 * trans-stmt.c, trans.c: Fix some code style issues. Add
7493 some more comment (but still not enough!).
7495 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7497 * symbol.c (flavors, procedures, intents, acces_types,
7498 access_types, ifsrc_types): Make const.
7499 * misc.c (g95_string2code): Make 'm' param 'const'.
7500 * module.c (find_enum, write_atom, mio_name): Make
7502 (attr_bits, bt_types, array_spec_types, array_ref_types,
7503 ref_types, expr_types): Make const.
7504 * g95.h: Adjust external decls.
7506 2003-01-09 Paul Brook <paul@nowt.org>
7508 * Testsuite: Add a load of new cases.
7510 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
7512 * Make-file.in: Add dependency on back end header files;
7513 a parallel build should work now.
7514 * f95-lang-c (lang_identifier): Remove bogus comment.
7515 (g95_be_parse_file): Fix prototype.
7516 (g95_init): Make static.
7517 (g95_finish): Make static.
7518 * error.c (g95_syntax_error): Kill. Make define in...
7519 * g95.h (g95_syntax_error): Define.
7520 (g95.options): Make 'source' member 'const'.
7521 * interface.c (g95_match_interface): Explain
7522 hard-to-read condition.
7523 (g95_match_end_interface): Ditto.
7524 * trans_const.c (g95_build_string_const): Make 's' parameter
7526 * trans_const.h: Adjust protoype accordingly.
7527 * trans-decl.c: Include tree-dump.h
7528 (g95_generate_function_code): Build fixes for recent changes
7529 in the tree-ssa branch.
7531 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
7533 * format.c: Kill, move code from here...
7535 * Make-lang.in: Adjust.
7538 * BUGS: Mention where to submit bugs. Move old content...
7539 * TODO: ...to here. New file.
7541 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
7542 Fix most warnings, and suppress the ones we can't fix for now.
7543 * Make-lang.in: Suppress warnings about bad proto's in g95.h,
7544 these warnings just clutter the screen and there's not much
7545 we can do about them for now anyway.
7546 * check.c, iresolve.c: Mark unused function parameters.
7547 * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
7548 they should be resolved before they get here.
7549 * error.c: Remove unused FILE *status_out.
7550 * f95-lang.c (g95_init): Remove bogus cast.
7551 * Many files: Make things 'const' where required.
7552 * g95.h: Fix prototypes for all modified functions above.
7553 (g95_options): Remove 'object' member.
7555 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
7557 * Make-file.in: Cleanup bogus targets. Add more comment.
7558 * lang-options.h: New option '-w'.
7559 * g95.h: add no_options field to struct g95_options.
7560 * options.c (g95_init_options): Default no_warnings to off.
7561 (g95_parse_arg): Recognise the '-w' switch and its alias,
7563 * error.c (g95_warning, g95_warning_now): Don't emit warning if
7564 no_warning option is set.
7565 * iresolve.c (g95_resolve_shape): Fix warning.
7567 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
7569 * primary.c (g95_next_string_char): Rename next_string_char, and
7570 make static. Adjust callers accordingly.
7571 * resolve.c (resolve_generic_f0): Return try, not match. Adjust
7572 callers accordingly.
7573 * g95.h: Split out all g95_match* functions to...
7574 * match.h: ...here. New file.
7575 * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
7576 matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
7578 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
7580 * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
7581 g95_merge_new_implicit): New functions.
7582 (g95_match_implicit_none, g95_match_implicit): Move from here...
7583 * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
7584 Modify to use the new functions in symbol.c.
7585 * g95.h: Add and move prototypes.
7587 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
7589 * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
7590 node compare function.
7591 (g95_insert_bbt): Likewise.
7592 (g95_insert_bbt_with_overlap): Likewise.
7593 (g95_delete_bbt): Likewise.
7594 (delete_treap): Likewise. Also fix a potential bug when calling it.
7595 * module.c (compare_pointers): Change proto to compare_fn.
7596 (compare_integers): Likewise.
7597 (compare_true_names): Likewise.
7598 (find_true_name): Adjust call to compare_true_names to match proto.
7599 (require_atom, write_atom, mio_name): Fix 'const' warnings.
7600 (init_pi_tree): Make compare a compare_fn instead of (int *).
7601 * resolve.c (compare_cases): Change proto to compare_fn.
7602 * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
7603 it static, and rename to compare_symtree.
7604 (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
7606 * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
7607 of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
7609 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
7610 * Make-lang.in: Fix spaces/tabs issues from previous patch.
7611 * patch.options: Blow away Paul's checkin mistake :-)
7612 * io.c (terminate_io): Fix memory leak (Arnaud).
7614 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
7616 * Make-lang.in: Teach about building DVI, info manual.
7617 * g95.texi: New file.
7619 2003-01-02 Paul Brook <paul@nowt.org>
7621 * trans-array.c (g95_reverse_ss): Make static and don't use.
7622 (g95_conv_ss_descriptor): Don't use g95_loopinfo
7623 (g95_conv_array_parameters): Modify for pointer assignments.
7624 (g95_walk_subexpr): New function.
7625 (g95_walk_expr*): Use it.
7626 * trans-array.h (g95_reverse_ss): Remove prototype.
7627 * trans-expr.c (g95_trans_pointer_assign): Implement.
7628 (Many): Set se.want_pointer before calling g95_conv_array_parameter.
7629 * trans-intrinsic.c: Sync with scalarizer changes.
7630 * trans-io.c: Ditto.
7632 2002-12-29 Paul Brook <paul@nowt.org>
7634 * trans-array.c: Document calling convention for arrays.
7636 2002-12-19 Paul Brook <paul@nowt.org>
7638 * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
7639 assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
7640 optional parameters for some intrinsics.
7641 (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
7642 * trans-expr.c (g95_conv_function_call): Pass NULL for absent
7643 optional parameters.
7644 * trans.h (g95_se): Add ignore_optional flag.
7646 2002-12-15 Paul Brook <paul@nowt.org>
7648 * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
7649 * trans-decl.c (g95_generate_function_code): Use TDI_original.
7651 2002-12-14 Paul Brook <paul@nowt.org>
7653 * trans-stmt.c (g95_trans_call): Use resolved symbol name.
7655 2002-12-12 Paul Brook <paul@nowt.org>
7657 * trans-array.c (g95_trans_array_constructor_subarray): Fully
7658 initialize the scalarizer.
7659 (various): Update to new format of g95_expr->value.constructor.
7661 2002-12-08 Paul Brook <paul@nowt.org>
7663 * trans-array.c (g95_put_offset_into_var): New function.
7664 (g95_trans_array_constructor_subarray): New function.
7665 (g95_trans_array_constructor_value): Use it.
7666 (g95_array_cons_size): Don't abort() on array components.
7668 2002-12-08 Paul Brook <paul@nowt.org>
7670 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
7671 * support.c: Update #includes.
7672 (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
7673 * trans-array.c: Update #includes.
7675 * trans-const.c: Ditto.
7676 * trans-io.c: Ditto.
7677 * trans-types.c: Ditto.
7678 (g95_init_types): Set size_type_node.
7679 * trans-decl.c: Update #includes.
7680 (gfor_fndecl_adjust{l,r}): Declare and initialize.
7681 * trans-stmt.c: Update #includes.
7682 (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
7683 (g95_trans_select): Fix check for unbounded ranges.
7684 * trans-expr.c: Update #includes.
7685 (g95_conv_string_tmp): New function.
7686 (g95_conv_concat_op): Use it.
7687 * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
7688 * Trans-intrisic.c: Update #includes.
7689 (g95_conv_intrinsic_strcmp): New function.
7690 (g95_conv_intrinsic_adjust): Ditto.
7691 (g95_conv_intrinsic_function: Use them.
7693 2002-11-30 Paul Brook <paul@nowt.org>
7695 * trans-array.c (g95_walk_function_expr): Handle non-array return by
7697 * trans-dec.c (g95_build_function_decl): Handle character return
7699 (g95_get_fake_result_decl): Ditto.
7700 (g95_trans_deferred_vars): Ditto.
7701 * trans-expr.c (g95_conv_function_call): Ditto.
7702 (g95_trans_arrayfunc_assign) Limit to array valued functions.
7703 * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
7704 (g95_conv_intrinsic_function): Use it.
7705 * trans-types.c (g95_sym_type): Handle functions returning strings.
7706 (g95_return_by_reference): Ditto.
7707 (g95_get_function_type): Ditto.
7709 2002-11-18 Paul Brook <paul@nowt.org>
7711 * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
7712 requires a temporary.
7713 (g95_trans_select): Handle computed gotos.
7714 * trans-types.c (g95_build_array_type): Warn about non-functional
7715 assumed shape arrays.
7716 * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
7718 * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
7719 (g95_conv_intrinsic_int): New function.
7720 (g95_conv_intrinsic_mod): New function.
7721 (g95_conv_intrinsic_ichar): New function.
7722 (g95_conv_intrinsic_function): Use them.
7723 (g95_conv_intrinsic_dim): Use g95_evaluate_now.
7725 2002-11-17 Toon Moene <toon@moene.indiv.nluug.nl>
7727 * trans-types.c (g95_build_array_type): Assumed
7728 sized arrays can have rank > 1.
7729 * trans.c (g95_trans_code): Remove erroneous
7730 warning about CONTINUE.
7731 * trans-expr.c (g95_conv_variable): Remove
7734 2002-11-15 Paul Brook <paul@nowt.org>
7736 * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
7738 2002-10-31 Paul Brook <paul@nowt.org>
7740 * f95-tree.c: Remove tree copying stuff that's now in gimple.c
7741 * trans-expr.c (g95_conv_component_ref): Handle character string
7743 (g95_conv_string_parameter): Ditto.
7744 * trans-types.c (g95_get_derived_type): Add length decl to caracter
7747 2002-10-10 Paul Brook <paul@nowt.org>
7749 * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
7750 * trans-expr.c (g95_conv_function_call): Remove unreliable return value
7752 * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
7753 (g95_conv_intrinsic_function): Handle size and shape intrinsics.
7754 (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
7755 * trans-types.c (pvoid_type_node): Declare and initialize.
7756 * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
7757 (g95_array_allocate): Fix when base==data.
7758 (g95_conv_array_parameter): Correctly handle reduced rank sections.
7759 * trans-io.c (g95_trans_write): Correctly handle string modifiers.
7761 2002-10-09 Paul Brook <paul@nowt.org>
7763 * (g95_conv_expr_reference): Handle character strings correctly.
7765 2002-10-07 Paul Brook <paul@nowt.org>
7767 (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
7769 * trans-array.c (g95_build_array_initializer): Remove.
7770 (g95_conv_array_initializer): New Function.
7771 (g95_trans_auto_arry_allocation): Cleanup.
7772 (g95_trans_init_character_array): Remove.
7773 * g95spec.c: Link in libgforbegin.
7774 * trans.c (g95_generate_code): Rename main function to MAIN__.
7775 (g95_create_var): New function.
7776 (g95_create_var_np): New function.
7777 (g95_evaluate_now): New function.
7778 (g95_start_block): New function.
7779 (g95_finish_block): New function.
7780 (g95_add_expr_to_block): New function.
7781 (g95_add_block_to_block): New function.
7782 * trans-expr.c (g95_conv_componen_ref): New function.
7783 * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
7784 (F95_OBJS): Add dependency.o.
7785 * f95-lang.c (g95_is_simple_stmt): Remove.
7786 * f95-tree.c (mark_not_simple): New function.
7787 (unshare_all_trees): New function.
7788 (create_tmp_var, create_tmp_alias_var): Remove.
7789 * support.c (declare_tmp_vars, tree_last_decl): Remove.
7790 * trans*: Convert to new IR using GENERIC trees. Don't bother about
7791 SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
7793 2002-10-01 Paul Brook <paul@nowt.org>
7795 * trans-array.c: Add support for descriptorless arrays.
7796 (g95_conv_array_data): New function.
7797 (g95_conv_array_base): New function.
7798 * trans-array.h: Declare these here.
7799 * trans-decl.c(g95_create_mopdule_variable): Perform variable
7800 initialization and creation here.
7801 (g95_create_module_vars): Instead of here.
7802 * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
7803 * trans-intrinsic.c: Ditto.
7804 * trans-types.c (g95_is_nodesc_array): New function.
7805 (g95_get_nodesc_array_type): New function.
7806 (g95_sym_type, g95_get_derived_type): Use them.
7807 * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
7809 2002-09-28 Paul Brook <paul@nowt.org>
7811 * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
7812 * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
7815 2002-09-24 Paul Brook <paul@nowt.org>
7817 * f95-lang.c (listify): Remove declaration.
7818 (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
7820 * f95-tree.c (get_name): New function.
7821 * trans.c (module_namespace): Remove.
7822 * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
7823 * trans-types.c: Ditto.
7825 2002-09-19 Paul Brook <paul@nowt.org>
7827 * trans-array.c (g95_get_array_cons_size): New Function.
7828 (g95_con_ss_startstride): Handle Array constructors.
7829 (g95_conv_loop_setup): Ditto.
7830 (g95_conv_array_parameter): Ditto.
7831 * tras-decl.c (g95_finish_var_decl): Make initializes variables
7834 2002-09-19 Paul Brook <paul@nowt.org>
7836 * trans.c (g95_simple_fold_tmp): Detect variables inside
7838 * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
7840 2002-09-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
7842 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
7844 2002-09-14 Paul Brook <paul@nowt.org>
7846 * trans.c (g95_create_module_variable): Move to trans-decl.c.
7847 * trans-const.c (g95_conv_string_init): New Function.
7848 * trans-const.h: Declare it.
7849 * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
7850 variables. Don't bail on intrinsic symbols.
7851 (get_extern_function_decl): Handle specific intrinsic functions.
7852 * trans-types.c (g95_sym_type): Dummy functions don't return
7854 * trans-array.c (g95_build_array_initializer): New Function.
7855 (g95_trans_auto_array_allocation): Build initializer for static decls.
7856 Don't use mpz_addmul, it's GMP4 only.
7858 2002-09-12 Paul Brook <paul@nowt.org>
7860 * trans-decl.c (g95_generate_code): Fix thinko with return variable.
7861 (g95_get_extern_function_decl, g95_build_function_decl): Mangle
7862 assembler names for module procedures.
7864 2002-09-11 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
7866 * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
7869 2002-09-10 Paul Brook <paul@nowt.org>
7871 * trans-array.c: Change format of G95_SS_TEMP strictures.
7872 (g95_check_fncall_dependancy): New function.
7873 (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
7875 * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
7877 (g95_build_function_decl): Don't assume result arrays are packed.
7878 (g95_trans-deferred-vars): Handle array result variables.
7879 (g95_generate_fuction_code): Clear saved_function_decls.
7880 * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
7882 (g95_trans_arrayfunc_assign): New function.
7883 (g95_trans_assignment): Use it.
7884 * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
7885 (g95_se): Add direct_byref.
7886 * trans-types.c: Use sym->result rather than sym where appropriate.
7887 * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
7888 Update other functions to use this.
7889 (g95_is_intrinsic_libcall): New function.
7890 (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
7891 (g95_walk_intrinsic_function): Ditto.
7893 2002-09-08 Paul Brook <paul@nowt.org>
7895 * trans-types.c: Change rank field to dtype field in array descriptor.
7896 * trans-array.c: Implement filling of dtype array descriptor field.
7897 * trans-intrinsic.c: Fix broken LEN intrinsic.
7899 2002-09-07 Paul Brook <paul@nowt.org>
7901 * trans-intrinsic.c: Remove outdated todo intrinsic list.
7902 (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
7903 (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
7905 2002-09-06 Paul Brook <paul@nowt.org>
7907 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
7908 (gt-f95-trans-types.h): Add dependancy information.
7909 * config-lang.in (gtfiles): Add trans-types.c
7910 * f95-lang.c (g95_be_parse_file): Pass error and warning counts
7911 back to top-level code.
7912 * trans-array.c, trans-types.c: Change format of array descriptor.
7913 (g95_conv_descriptor_dimension): New function.
7914 * trans-types.h (g95_conv_descriptor_rank): define.
7915 * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
7918 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
7920 * trans-array.c, trans-types.c: Add rank information to descriptor.
7922 2002-09-06 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
7924 * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
7926 2002-09-04 Paul Brook <paul@nowt.org>
7928 * f95-lang.c (g95_create_decls): New function.
7929 (g95_init): Move initialization of external decls to above, and call
7930 from g95_be_parse_file.
7931 * trans.c (g95_finish_stmt): Don't amputate the decl chain.
7932 * trans-types.c (g95_init_types): Always name integer and char types.
7933 (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
7935 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
7937 * Make-lang.in: Add options.c to F95_PARSER_OBJS
7939 2002-09-02 Paul Brook <paul@nowt.org>
7941 * g95_generate_code: Clear the attr for __fortran_main.
7942 * trans-types.c (g95_finish_type): New function.
7943 * g95_init_io_state_type: Use g95_finish_type.
7944 * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
7946 2002-09-01 Paul Brook <paul@nowt.org>
7948 * README.backend: Warn about the dangers of extra config.h files.
7949 Remove obsolete libgfor stuff.
7950 * config-lang.in: Add target-libgfor dependancy.
7951 * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
7953 2002-09-01 Toon Moene <toon@moene.indiv.nluug.nl>
7955 * g95_conv_mpz_to_tree: Free storage pointed to by q,
7958 2002-08-30 Paul Brook <paul@nowt.org>
7960 * trans-intrinsic.c (g95_conv_intrinsic_function,
7961 g95_walk_intrinsic_function): Added ANY and ALL.
7962 (g95_conv_intrinsic_anyall): New function.
7963 * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in