1 2007-07-12 Daniel Franke <franke.daniel@gmail.com>
4 * invoke.texi (-static-libgfortran): Document new option.
6 2007-07-12 Paul Thomas <pault@gcc.gnu.org>
10 * module.c (write_generic): Restore patch of 2007-07-10 and use
11 symbol name if there are no use names.
13 2007-07-12 Christopher D. Rickett <crickett@lanl.gov>
16 * decl.c (verify_c_interop_param): Require character string dummy
17 args to BIND(C) procedures to have length 1.
18 * resolve.c (resolve_fl_procedure): Modify parameter checking for
22 * resolve.c (gfc_iso_c_func_interface): Verify that a valid
23 expression is given as an argument to C_LOC and C_ASSOCIATED.
24 * trans-io.c (transfer_expr): Add argument for code block. Add
25 standards check to determine if an error message should be
26 reported for printing C_PTR or C_FUNPTR.
27 (transfer_array_component): Update arguments to transfer_expr.
28 (gfc_trans_transfer): Ditto.
30 * symbol.c (gen_cptr_param): Fix whitespace.
32 2007-07-12 Jakub Jelinek <jakub@redhat.com>
35 * trans.h (GFC_POINTER_TYPE_P): Define.
36 * trans-types.c (gfc_sym_type): Set it for types on attr->sym.pointer.
37 * trans-openmp.c (gfc_omp_privatize_by_reference): Return false
38 if GFC_POINTER_TYPE_P is set on the type.
40 2007-07-12 Richard Guenther <rguenther@suse.de>
42 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Convert
43 arguments to gfc_charlen_type_node.
44 * trans-io.c (gfc_convert_array_to_string): Convert type
45 size to gfc_array_index_type.
47 2007-07-12 Daniel Franke <franke.daniel@gmail.com>
51 * module.c: Reverted Paul's patch from 2007-07-10.
53 2007-07-11 Richard Guenther <rguenther@suse.de>
55 * trans-array.c (gfc_conv_array_parameter): Use correct
57 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use
58 correct types for POINTER_PLUS_EXPR.
59 * trans-stmt.c (gfc_trans_forall_loop): Use correct type
60 for integer one constant.
62 2007-07-10 Paul Thomas <pault@gcc.gnu.org>
65 * resolve.c (is_external_proc): New function. Adds test that
66 the symbol is not an intrinsic procedure.
67 * (resolve_function, resolve_call): Replace logical statements
68 with call to is_external_proc.
71 * simplify.c (gfc_simplify_transfer): If mold has rank, the
75 * module.c (write_generic): Write the local name of the
78 2007-07-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
81 * trans-array.c (gfc_trans_array_constructor): Mark offset field
83 * trans-decl.c (gfc_build_qualified_array): Mark lbound, ubound,
84 stride and size variables with TREE_NO_WARNING.
86 2007-07-09 Steven G. Kargl <kargl@gcc.gnu.org>
88 * trans-decl.c (set_tree_decl_type_code): Remove function.
89 (generate_local_decl): Remove reference to set_tree_decl_type_code.
91 2007-07-09 Daniel Franke <franke.daniel@gmail.com>
94 * trans-decl.c (generate_local_decl) Emit a warning if an unused
97 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
100 * module.c (gfc_match_use): Do not set an non-existant
101 intrinsic operator if a user-defined operator is found.
103 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
107 * trans-decl.c (generate_local_decl): Adjusted warning on unused
108 dummy arguments, tell middle-end not to emit additional warnings.
110 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
111 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
114 * gfortran.h (gfc_intrinsic_op): Added INTRINSIC_EQ_OS,
115 INTRINSIC_NE_OS, INTRINSIC_GT_OS, INTRINSIC_GE_OS,
116 INTRINSIC_LT_OS and INTRINSIC_LE_OS.
117 * arith.c (eval_intrinsic, eval_type_intrinsic0): Likewise.
118 * arith.h (gfc_eq, gfc_ne, gfc_gt, gfc_ge, gfc_lt, gfc_le):
119 Added gfc_intrinsic_op as third argument type.
120 * dump-parse-tree.c (gfc_show_expr): Account for new enum values.
121 * expr.c (simplify_intrinsic_op, check_intrinsic_op): Likewise.
122 * interface.c (check_operator_interface): Likewise.
123 (gfc_check_interfaces): Added cross-checks for FORTRAN 77 and
124 Fortran 90 style operators using new enum values.
125 (gfc_extend_expr): Likewise.
126 (gfc_add_interface): Likewise.
127 * match.c (intrinsic_operators): Distinguish FORTRAN 77 style
128 operators from Fortran 90 style operators using new enum values.
129 * matchexp.c (match_level_4): Account for new enum values.
130 * module.c (mio_expr): Likewise.
131 * resolve.c (resolve_operator): Deal with new enum values, fix
132 inconsistent error messages.
133 * trans-expr.c (gfc_conv_expr_op): Account for new enum values.
135 2007-07-08 Tobias Burnus <burnus@net-b.de>
138 * interface.c (get_expr_storage_size): Properly obtain lower bound.
139 (compare_actual_formal): Add space before parenthesis.
141 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
144 * resolve.c (resolve_fl_procedure): Added check for PRIVATE types
145 in PUBLIC interfaces.
147 2007-07-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
150 * decl.c (match_attr_spec): Don't return MATCH_ERROR if comma found and
151 gfc_match_bind_c does not return MATCH_YES.
153 2007-07-07 Kazu Hirata <kazu@codesourcery.com>
155 * decl.c, gfortran.h, interface.c, module.c, resolve.c,
156 trans-array.c, trans-decl.c: Fix comment typos. Follow
157 spelling conventions.
158 * intrinsic.texi: Fix typos. Follow spelling conventions.
160 2007-05-06 Daniel Franke <franke.daniel@gmail.com>
163 * symbol.c (save_status): New.
164 * gfortran.h (save_status): Added external declaration.
165 (check_conflict): Check for conflicting explicite SAVE statements
167 (gen_special_c_interop_ptr): Use SAVE_EXPLICIT constant.
168 * module.c (ab_attribute, attr_bits): Removed enumerator value
169 AB_SAVE for save attribute.
170 (mio_symbol_attribute): Import/export the full SAVE status,
171 removed usage of AB_SAVE.
172 * dump-parse-tree.c (gfc_show_attr): Dump full SAVE status.
173 * decl.c (add_init_expr_to_sym): Set SAVE_IMPLICIT only if not
176 2007-07-05 Daniel Franke <franke.daniel@gmail.com>
177 Tobias Burnus <burnus@net-b.de>
180 * gfortran.h (symbol_attribute): Change save attribute into an enum.
181 * decl.c (add_init_expr_to_sym): Set it to SAVE_IMPLICIT.
182 * symbol.c (gfc_add_save): Check for SAVE_EXPLICIT.
183 * resolve.c (resolve_fl_variable): Check for SAVE_EXPLICIT.
184 (resolve_symbol): Allow OMP threadprivate with
185 initialization SAVEd and save_all variable.
186 * trans-decl.c (gfc_finish_var_decl): Remove obsolete sym->value check.
188 2007-07-05 Paul Thomas <pault@gcc.gnu.org>
191 * match.c (gfc_match_call): Check, in all cases, that a symbol
192 is neither generic nor a subroutine before trying to add it as
196 * match.c (gfc_match_do): Reset the implied_index attribute.
198 2007-07-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
201 * trans-intrinsic.c (trans-intrinsic.c): Handle optional
202 arguments correctly for MIN and MAX intrinsics.
204 2007-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
207 * io.c (check_format): Always call gfc_error for errors.
208 (check_format_string): Change type of this function to try and
209 return the result of check_format.
210 (check_io_constraints): Return MATCH_ERROR if check_format_string
213 2007-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
216 * decl.c (get_proc_name): Include attr->mod_proc in check for error.
218 2007-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
221 * gfortran.h: Change type of gfc_assign_data_value from void to try.
222 * data.c (gfc_assign_data_value): Return FAILURE if error found.
223 * resolve.c (check_data_variable): If gfc_assign_data_value returns
224 failure, break out of loop and return failure.
226 2007-07-03 Christopher D. Rickett <crickett@lanl.gov>
229 * symbol.c (gen_cptr_param): Generate C_PTR and C_FUNPTR if necessary.
230 (build_formal_args): Pass intrinsic module symbol id to
233 2007-07-03 Tobias Burnus <burnus@net-b.de>
236 * resolve.c (resolve_common_blocks): New check function.
237 (resolve_types): Use it.
239 2007-07-03 Tobias Burnus <burnus@net-b.de>
242 * interface.c (get_sym_storage_size): New function.
243 (get_sym_storage_size): New function.
244 (compare_actual_formal): Enhance sequence association
245 support and improve checking.
247 2007-07-03 Janne Blomqvist <jb@gcc.gnu.org>
249 * trans-decl.c (gfc_build_builtin_function_decls): Mark
250 internal_realloc as a malloc function.
252 2007-07-03 Tobias Burnus <burnus@net-b.de>
255 * resolve.c (resolve_operator): Check for NULL as operand.
257 2007-07-02 Tobias Burnus <burnus@net-b.de>
259 * gfortran.texi (Fortran 2003): Add ISO Bind C.
260 * intrinsic.texi (C_ASSOCIATED,C_F_POINTER,C_F_PROCPOINTER,
261 C_FUNLOC,C_LOC): Document new ISO Bind C intrinsics.
263 2007-07-01 Christopher D. Rickett <crickett@lanl.gov>
265 * interface.c (gfc_compare_derived_types): Special case for comparing
266 derived types across namespaces.
267 (gfc_compare_types): Deal with BT_VOID.
268 (compare_parameter): Use BT_VOID to accept ISO C Binding pointers.
269 * trans-expr.c (gfc_conv_function_call): Remove setting parm_kind
271 (gfc_conv_initializer): Deal with ISO C Binding NULL_PTR and
273 (gfc_conv_expr): Convert expressions for ISO C Binding derived types.
274 * symbol.c (gfc_set_default_type): BIND(C) variables should not be
276 (check_conflict): Add BIND(C) and check for conflicts.
277 (gfc_add_explicit_interface): Whitespace.
278 (gfc_add_is_bind_c): New function.
279 (gfc_copy_attr): Use it.
280 (gfc_new_symbol): Initialize ISO C Binding objects.
281 (get_iso_c_binding_dt): New function.
282 (verify_bind_c_derived_type): Ditto.
283 (gen_special_c_interop_ptr): Ditto.
284 (add_formal_arg): Ditto.
285 (gen_cptr_param): Ditto.
286 (gen_fptr_param): Ditto.
287 (gen_shape_param): Ditto.
288 (add_proc_interface): Ditto.
289 (build_formal_args): Ditto.
290 (generate_isocbinding_symbol): Ditto.
291 (get_iso_c_sym): Ditto.
292 * decl.c (num_idents_on_line, has_name_equals): New variables.
293 (verify_c_interop_param): New function.
294 (build_sym): Finish binding labels and deal with COMMON blocks.
295 (add_init_expr_to_sym): Check if the initialized expression is
296 an iso_c_binding named constants
297 (variable_decl): Set ISO C Binding type_spec components.
298 (gfc_match_kind_spec): Check match for C interoperable kind.
299 (match_char_spec): Fix comment. Chnage gfc_match_small_int
300 to gfc_match_small_int_expr. Check for C interoperable kind.
301 (match_type_spec): Clear the current binding label.
302 (match_attr_spec): Add DECL_IS_BIND_C. If BIND(C) is found, use it
304 (set_binding_label): New function.
305 (set_com_block_bind_c): Ditto.
306 (verify_c_interop): Ditto.
307 (verify_com_block_vars_c_interop): Ditto.
308 (verify_bind_c_sym): Ditto.
309 (set_verify_bind_c_sym): Ditto.
310 (set_verify_bind_c_com_block): Ditto.
311 (get_bind_c_idents): Ditto.
312 (gfc_match_bind_c_stmt): Ditto.
313 (gfc_match_data_decl): Use num_idents_on_line.
314 (match_result): Deal with right paren in BIND(C).
315 (gfc_match_suffix): New function.
316 (gfc_match_function_decl): Use it. Code is re-arranged to deal with
317 ISO C Binding result clauses.
318 (gfc_match_subroutine): Deal with BIND(C).
319 (gfc_match_bind_c): New function.
320 (gfc_get_type_attr_spec): New function. Code is re-arranged in and
321 taken from gfc_match_derived_decl.
322 (gfc_match_derived_decl): Add check for BIND(C).
323 * trans-common.c: Forward declare gfc_get_common.
324 (gfc_sym_mangled_common_id): Change arg from 'const char *name' to
325 'gfc_common_head *com'. Check for ISO C Binding of the common block.
326 (build_common_decl): 'com->name' to 'com in SET_DECL_ASSEMBLER_NAME.
327 * gfortran.h: Add GFC_MAX_BINDING_LABEL_LEN
329 (sym_flavor): Add FL_VOID.
330 (iso_fortran_env_symbol, iso_c_binding_symbol, intmod_id): New enum
331 (CInteropKind_t): New struct.
332 (c_interop_kinds_table): Use it. Declare an array of structs.
333 (symbol_attribute): Add is_bind_c, is_c_interop, and is_iso_c
335 (gfc_typespec): Add is_c_interop; is_iso_c, and f90_type members.
336 (gfc_symbol): Add from_intmod, intmod_sym_id, binding_label, and
337 common_block members.
338 (gfc_common_head): Add binding_label and is_bind_c members.
339 (gfc_gsymbol): Add sym_name, mod_name, and binding_label members.
340 Add prototypes for get_c_kind, gfc_validate_c_kind,
341 gfc_check_any_c_kind, gfc_add_is_bind_c, gfc_add_value,
342 verify_c_interop, verify_c_interop_param, verify_bind_c_sym,
343 verify_bind_c_derived_type, verify_com_block_vars_c_interop,
344 generate_isocbinding_symbol, get_iso_c_sym, gfc_iso_c_sub_interface
345 * iso-c-binding.def: New file. This file contains the definitions
346 of the types provided by the Fortran 2003 ISO_C_BINDING intrinsic
348 * trans-const.c (gfc_conv_constant_to_tree): Deal with C_NULL_PTR
349 or C_NULL_FUNPTR expressions.
350 * expr.c (gfc_copy_expr): Add BT_VOID case. For BT_CHARACTER, the
351 ISO C Binding requires a minimum string length of 1 for '\0'.
352 * module.c (intmod_sym): New struct.
353 (pointer_info): Add binding_label member.
354 (write_atom): Set len to 0 for NULL pointers. Check for NULL p and *p.
355 (ab_attribute): Add AB_IS_BIND_C, AB_IS_C_INTEROP and AB_IS_ISO_C.
356 (attr_bits): Add "IS_BIND_C", "IS_C_INTEROP", and "IS_ISO_C".
357 (mio_symbol_attribute): Deal with ISO C Binding attributes.
358 (bt_types): Add "VOID".
359 (mio_typespec): Deal with ISO C Binding components.
360 (mio_namespace_ref): Add intmod variable.
361 (mio_symbol): Check for symbols from an intrinsic module.
362 (load_commons): Check for BIND(C) common block.
363 (read_module): Read binding_label and use it.
364 (write_common): Add label. Write BIND(C) info.
365 (write_blank_common): Blank commons are not BIND(C). Explicitly
367 (write_symbol): Deal with binding_label.
368 (sort_iso_c_rename_list): New function.
369 (import_iso_c_binding_module): Ditto.
370 (create_int_parameter): Add to args.
371 (use_iso_fortran_env_module): Adjust to deal with iso_c_binding
373 * trans-types.c (c_interop_kinds_table): new array of structs.
374 (gfc_validate_c_kind): New function.
375 (gfc_check_any_c_kind): Ditto.
376 (get_real_kind_from_node): Ditto.
377 (get_int_kind_from_node): Ditto.
378 (get_int_kind_from_width): Ditto.
379 (get_int_kind_from_minimal_width): Ditto.
380 (init_c_interop_kinds): Ditto.
381 (gfc_init_kinds): call init_c_interop_kinds.
382 (gfc_typenode_for_spec): Adjust for BT_VOID and ISO C Binding pointers.
383 Adjust handling of BT_DERIVED.
384 (gfc_sym_type): Whitespace.
385 (gfc_get_derived_type): Account for iso_c_binding derived types
386 * resolve.c (is_scalar_expr_ptr): New function.
387 (gfc_iso_c_func_interface): Ditto.
388 (resolve_function): Use gfc_iso_c_func_interface.
389 (set_name_and_label): New function.
390 (gfc_iso_c_sub_interface): Ditto.
391 (resolve_specific_s0): Use gfc_iso_c_sub_interface.
392 (resolve_bind_c_comms): New function.
393 (resolve_bind_c_derived_types): Ditto.
394 (gfc_verify_binding_labels): Ditto.
395 (resolve_fl_procedure): Check for ISO C interoperability.
396 (resolve_symbol): Check C interoperability.
397 (resolve_types): Walk the namespace. Check COMMON blocks.
398 * trans-decl.c (gfc_sym_mangled_identifier): Prevent the mangling
399 of identifiers that have an assigned binding label.
400 (gfc_sym_mangled_function_id): Use the binding label rather than
402 (gfc_finish_var_decl): Put variables that are BIND(C) into a common
403 segment of the object file, because this is what C would do.
404 (gfc_create_module_variable): Conver to proper types
405 (set_tree_decl_type_code): New function.
406 (generate_local_decl): Check dummy variables and derived types for
407 ISO C Binding attributes.
408 * match.c (gfc_match_small_int_expr): New function.
409 (gfc_match_name_C): Ditto.
410 (match_common_name): Deal with ISO C Binding in COMMON blocks
411 * trans-io.c (transfer_expr): Deal with C_NULL_PTR or C_NULL_FUNPTR
413 * match.h: Add prototypes for gfc_match_small_int_expr,
414 gfc_match_name_C, match_common_name, set_com_block_bind_c,
415 set_binding_label, set_verify_bind_c_sym,
416 set_verify_bind_c_com_block, get_bind_c_idents,
417 gfc_match_bind_c_stmt, gfc_match_suffix, gfc_match_bind_c,
418 gfc_get_type_attr_spec
419 * parse.c (decode_statement): Use gfc_match_bind_c_stmt
420 (parse_derived): Init *derived_sym = NULL, and gfc_current_block
421 later for valiadation.
422 * primary.c (got_delim): Set ISO C Binding components of ts.
423 (match_logical_constant): Ditto.
424 (match_complex_constant): Ditto.
425 (match_complex_constant): Ditto.
426 (gfc_match_rvalue): Check for existence of at least one arg for
427 C_LOC, C_FUNLOC, and C_ASSOCIATED.
428 * misc.c (gfc_clear_ts): Clear ISO C Bindoing components in ts.
429 (get_c_kind): New function.
431 2007-07-01 Janne Blomqvist <jb@gcc.gnu.org>
434 * trans-expr.c (gfc_conv_power_op): Use builtin_powi for
436 * f95-lang.c (gfc_init_builtin_functions): Add builtin_powi to the
439 2007-07-01 Janne Blomqvist <jb@gcc.gnu.org>
441 * trans.h: Remove decls for 64-bit allocation functions.
442 * trans-array.c (gfc_grow_array): Always pick the standard realloc
444 (gfc_array_allocate): Likewise.
445 * trans-decl.c: Remove trees for 64-bit allocation functions.
446 (gfc_build_builtin_function_decls): Don't build fndecls for 64-bit
447 allocations functions, use index_int_type for normal allocation
450 2007-06-30 Daniel Franke <franke.daniel@gmail.com>
453 * intrinsic.c (add_functions): Additional function types.
454 (gfc_convert_type_warn): Remove intrinsic-flag from
455 conversion functions.
456 * resolve.c (resolve_symbol): Added type checks to
457 explicitly defined intrinsics.
459 2007-06-30 Tobias Burnus <burnus@net-b.de>
462 * io.c (check_format): Allow zero to precede the
465 2007-06-30 Paul Thomas <pault@gcc.gnu.org>
468 * simplify.c (gfc_simplify_repeat): Add handling of character
469 literal for first argument.
471 2007-06-29 Daniel Franke <franke.daniel@gmail.com>
473 * resolve.c (resolve_operator): Added check whether a user
474 defined operator is available.
476 2007-06-29 Daniel Franke <franke.daniel@gmail.com>
478 * openmp.c (resolve_omp_clauses): Adjust error message to
479 better reflect the actual requirement.
481 2007-06-29 Tobias Burnus <burnus@net-b.de>
484 * io.c (format_lex): Fix FMT_ZERO.
485 (check_format,check_format_string,gfc_match_format,
486 check_io_constraints) Additional checking for READ.
488 2007-06-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
491 * lang.opt (static-libgfortran): New option.
492 * gfortranspec.c (ADD_ARG_LIBGFORTRAN): New macro.
493 (Option): Add OPTION_static and OPTION_static_libgfortran.
494 (lookup_option): Handle the new -static-libgfortran option.
495 (lang_specific_driver): Check whether -static is passed.
496 Handle the new -static-libgfortran option.
497 * options.c (gfc_handle_option): If -static-libgfortran is
498 passed and isn't supported on this configuration, error out.
500 2007-06-27 Daniel Franke <franke.daniel@gmail.com>
503 * openmp.c (resolve_omp_clauses): Emit error on allocatable
504 components in COPYIN, COPYPRIVATE, FIRSTPRIVATE and LASTPRIVATE
507 2007-06-25 Paul Thomas <pault@gcc.gnu.org>
510 * resolve.c (check_host_association): Return if the old symbol
511 is use associated. Introduce retval to reduce the number of
512 evaluations of the first-order return value.
515 * match.c (gfc_match_call): If a host associated symbol is not
516 a subroutine, build a new symtree/symbol in the current name
519 2007-06-24 Tobias Burnus <burnus@net-de>
522 * interface.c (gfc_compare_derived_types): Add access check.
523 * symbol.c (gfc_find_component): Ditto.
524 (gfc_set_component_attr,gfc_get_component_attr) Copy access state.
525 * dump-parse-tree.c (gfc_show_components): Dump access state.
526 * gfortran.h (struct gfc_component): Add gfc_access.
527 * module.c (mio_component): Add access state.
528 * (gfc_match_structure_constructor): Check for private access state.
530 2007-06-24 Paul Thomas <pault@gcc.gnu.org>
534 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Calculate
535 the offset between the loop counter and the position as
536 defined. Add the offset within the loop so that the mask acts
537 correctly. Do not advance the location on the basis that it
540 2007-06-22 Daniel Franke <franke.daniel@gmail.com>
543 * symbol.c (gfc_copy_attr): Emit errors for duplicate
544 EXTERNAL/INTRINSIC statements.
546 2007-06-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
549 * expr.c (gfc_check_assign): If the rvalue expression type is NULL_EXPR,
550 check to see if the lvalue has attribute pointer and data.
552 2007-06-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
555 * resolve.c (gfc_resolve_iterator_expr): Add check for REAL using
556 gfc_notify_standard. (gfc_resolve_iterator): Remove check.
557 (resolve_branch): Change "Obsolete" to "Deleted feature".
558 * io.c (resolve_tag): Ditto.
559 * match.c (gfc_match_pause, gfc_match_assign, gfc_match_goto): Ditto.
561 2007-06-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
564 * match.c (gfc_match_common): If the symbol value expression type is
565 NULL_EXPR, don't error if previously initialized.
567 2007-06-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
570 * decl.c (get_proc_name) Check symbol for generic interface
573 2007-06-20 Andrew Pinski <andrew_pinski@playstation.sony.com>
574 Richard Guenther <rguenther@suse.de>
577 * trans.c (gfc_build_addr_expr): Use the correct types.
579 2007-06-19 Paul Thomas <pault@gcc.gnu.org>
583 * resolve.c (resolve_code): Use gfc_impure_variable as a
584 condition for rejecting derived types with pointers, in pure
586 (gfc_impure_variable): Add test for dummy arguments of pure
587 procedures; any for functions and INTENT_IN for subroutines.
590 * data.c (gfc_assign_data_value): Change the ICE on an array
591 reference initializer not being an array into an error and
592 clear init to prevent a repetition of the error.
594 2007-06-17 Janne Blomqvist <jb@gcc.gnu.org>
596 * gfortran.texi: Add documentation for GFORTRAN_UNBUFFERED_n
597 environment variables. Fix documentation for
598 GFORTRAN_UNBUFFERED_ALL environment variable.
600 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
602 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use
603 POINTER_PLUS_EXPR instead of PLUS_EXPR for pointer addition.
604 * trans-expr.c (gfc_trans_string_copy): Create
605 POINTER_PLUS_EXPR instead of a PLUS_EXPR
608 2007-06-14 Paul Thomas <pault@gcc.gnu.org>
611 * trans-common.c (build_common_decl): If resizing of common
612 decl is needed, update the TREE_TYPE.
614 2007-06-13 Tobias Burnus <burnus@net-b.de>
617 * interface.c (has_vector_section): New.
618 (compare_actual_formal): Check for array sections with vector subscript.
620 2007-06-12 Dirk Mueller <dmueller@suse.de>
622 * trans-stmt.c (gfc_trans_call): fix gcc_assert to
623 a comparison, not an assignment.
625 2007-06-12 Paul Thomas <pault@gcc.gnu.org>
627 * trans-common.c (create_common): Initialize 'field_init'.
629 2007-06-12 Paul Thomas <pault@gcc.gnu.org>
633 * trans-common.c (get_init_field): New function.
634 (create_common): Call get_init_field for overlapping
635 initializers in equivalence blocks.
636 * resolve.c (resolve_equivalence_derived, resolve_equivalence):
637 Remove constraints on initializers in equivalence blocks.
638 * target-memory.c (expr_to_char, gfc_merge_initializers):
640 (encode_derived): Add the bit offset to the byte offset to get
641 the total offset to the field.
642 * target-memory.h : Add prototype for gfc_merge_initializers.
644 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
646 * trans-types.c (gfc_signed_type): Remove.
647 * trans-types.h (gfc_signed_type): Remove.
648 * f95-lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
650 2007-06-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
652 * trans-intrinsic.c: Revert Lee's 2007-06-04 patch.
654 2007-06-07 Steven G. Kargl <kargl@gcc.gnu.org>
655 Jerry DeLisle <jvdelisle@gcc.gnu.org>
658 * match.c (gfc_match_special_char): New function. Match special char.
660 * match.h: Add prototype.
661 * io.c (next_char): Use it.
662 * primary.c (next_string_char): Ditto.
664 2007-06-06 Steven G. Kargl <kargl@gcc.gnu.org>
666 * decl.c: Miscellaneous whitespace fixes.
668 * gfortran.h: Likewise.
669 * interface.c : Likewise.
673 * module.c: Likewise.
675 * resolve.c: Likewise.
676 * symbol.c: Likewise.
677 * trans-array.c: Likewise.
678 * trans-common.c: Likewise.
679 * trans-decl.c: Likewise.
680 * trans-intrinsic.c: Likewise.
681 * trans-io.c: Likewise.
682 * trans-stmt.c: Likewise.
683 * trans-types.c: Likewise.
685 2007-06-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
688 * parse.c (decode_statement): Don't call gfc_undo_symbols on MATCH_ERROR
689 for ST_FUNCTION since it is called in reject_statement.
690 (parse_contained): If error, loop back after reject_statement and try
691 again. Free the namespace if an error occured.
693 2007-06-04 Lee Millward <lee.millward@codesourcery.com>
695 * trans-intrinsic.c (gfc_conv_intrinsic_function_args): Adjust
696 to operate on a stack allocated array for the intrinsic arguments
697 instead of creating a TREE_LIST. Add two new parameters for the
698 array and the number of elements. Update all callers to allocate
699 an array of the correct length to pass in. Update comment.
700 (gfc_intrinsic_argument_list_length): New function.
701 (gfc_conv_intrinsic_mnimax): Call it.
702 (gfc_conv_intrinsic_merge): Likewise.
703 (gfc_conv_intrinsic_lib_function): Call it. Use new CALL_EXPR
705 (gfc_conv_intrinsic_cmplx): Likewise.
706 (gfc_conv_intrinsic_ctime): Likewise.
707 (gfc_covn_intrinsic_fdate): Likewise.
708 (gfc_conv_intrinsic_ttynam): Likewise.
709 (gfc_conv_intrinsic_ishftc): Likewise.
710 (gfc_conv_intrinsic_index): Likewise.
711 (gfc_conv_intrinsic_scan): Likewise.
712 (gfc_conv_intrinsic_verify): Likewise.
713 (gfc_conv_intrinsic_trim): Likewise.
714 (gfc_conv_intrinsic_aint): Use new CALL_EXPR constructors.
715 (gfc_conv_intrinsic_exponent): Likewise.
716 (gfc_conv_intrinsic_bound): Likewise.
717 (gfc_conv_intrinsic_abs): Likewise.
718 (gfc_conv_intrinsic_mod): Likewise.
719 (gfc_conv_intrinsic_sign): Likewise.
720 (gfc_conv_intrinsic_len): Likewise.
721 (gfc_conv_intrinsic_adjust): Likewise.
722 (gfc_conv_intrinsic_si_kind): Likewise.
724 2007-06-04 Steve Ellcey <sje@cup.hp.com>
726 * trans-array.c (gfc_conv_array_parameter): Initialize tmp.
728 2007-05-31 Richard Guenther <rguenther@suse.de>
730 * trans-expr.c (gfc_conv_expr_op): Use zero constant
731 that matches the lse type.
732 (gfc_trans_string_copy): Use sizetype zero constant.
733 * intrinsic.c (add_functions): The sizeof intrinsic has
735 * trans-types.c (gfc_get_dtype): Convert size to index
736 type before shifting.
737 * trans-array.c (gfc_trans_array_constructor_value): Use
738 index type for offset computation.
739 * trans-intrinsic.c (gfc_conv_associated): Use correct type
742 2007-05-31 Paul Thomas <pault@gcc.gnu.org>
745 * trans-array.c (gfc_trans_array_constructor): Treat the case
746 where the ss expression charlen is missing.
748 22007-05-31 Paul Thomas <pault@gcc.gnu.org>
751 * module.c (mio_symtree_ref): If an equivalence group member
752 is not used, give it a hidden symbol and set the pointer_info.
753 (load_equiv): Only free the equivalence if none of the members
756 2007-05-29 Daniel Franke <franke.daniel@gmail.com>
758 * gfortran.h: Renamed 'enum gfc_generic_isym_id' to 'enum gfc_isym_id',
759 added missing GFC_ISYM_* enumerators, ordered alphabetically.
760 (struct gfc_intrinsic_sym): Renamed 'generic_id' to 'id'.
761 (gfc_find_subroutine): New prototype.
762 * intrinsic.c (add_sym, add_sym_*): Added argument 'id' and changed all callers.
763 (find_subroutine): Renamed to 'gfc_find_subroutine', removed static.
764 * dependency.c: Changed usage of isym->generic_id to isym->id.
765 * openmp.c: Likewise.
766 * resolve.c: Likewise.
767 * trans-array.c: Likewise.
768 * trans-expr.c: Likewise.
769 * trans-intrinsic.c: Likewise.
770 * trans-openmp.c: Likewise.
772 2007-05-28 Tobias Schlüter <tobi@gcc.gnu.org>
774 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SIZEOF.
775 * intrinsic.c (add_functions): Add stuff for SIZEOF intrinsic.
776 * intrinsic.h (gfc_check_sizeof): Add prototype of ...
777 * check.c (gfc_check_sizeof): .. new function.
778 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): New function.
779 (gfc_conv_intrinsic_strcmp): Whitespace fix.
780 (gfc_conv_intrinsic_array_transfer): Remove double initialization,
781 use fold_build. where appropriate.
782 (gfc_conv_intrinsic_function): Add case for SIZEOF.
783 * intrinsic.texi: Add documentation for SIZEOF.
785 2007-05-28 Brooks Moses <brooks.moses@codesourcery.com>
787 * trans-array.c (gfc_conv_expr_descriptor): Edit comment.
789 2007-05-28 Brooks Moses <brooks.moses@codesourcery.com>
792 * target-memory.c (gfc_target_expr_size): Add handling
793 for size of BT_HOLLERITH variables.
794 * check.c (gfc_check_transfer): Reject BT_HOLLERITH
795 variables in MOLD argument of TRANSFER.
797 2007-05-28 Brooks Moses <brooks.moses@codesourcery.com>
799 * gfortran.h (gfc_expr): Remove from_H, add "representation"
801 * primary.c (match_hollerith_constant): Store the representation
802 of the Hollerith in representation, not in value.character.
803 * arith.c: Add dependency on target-memory.h.
804 (eval_intrinsic): Remove check for from_H.
805 (hollerith2representation): New function.
806 (gfc_hollerith2int): Determine value of the new constant.
807 (gfc_hollerith2real): Likewise.
808 (gfc_hollerith2complex): Likewise.
809 (gfc_hollerith2logical): Likewise.
810 (gfc_hollerith2character): Point both representation.string and
811 value.character.string at the value string.
812 * data.c (create_character_initializer): For BT_HOLLERITH
813 rvalues, get the value from the representation rather than
815 * expr.c (free_expr0): Update handling of BT_HOLLERITH values
816 and values with representation.string.
817 (gfc_copy_expr): Likewise.
818 * intrinsic.c (do_simplify): Remove special treatement of
819 variables resulting from Hollerith constants.
820 * dump-parse-trees.c (gfc_show_expr): Update handling of
822 * trans-const.c (gfc_conv_constant_to_tree): Replace from_H
823 check with check for representation.string; get Hollerith
824 representation from representation.string, not value.character.
825 * trans-expr.c (is_zero_initializer_p): Replace from_H check
826 with check for representation.string.
827 * trans-stmt.c (gfc_trans_integer_select): Use
828 gfc_conv_mpz_to_tree for case values, so as to avoid picking up
829 the memory representation if the case is given by a transfer
831 * target-memory.c (gfc_target_encode_expr): Use the known memory
832 representation rather than the value, if it exists.
833 (gfc_target_interpret_expr): Store the memory representation of
834 the interpreted expression as well as its value.
835 (interpret_integer): Move to gfc_interpret_integer, make
837 (interpret_float): Move to gfc_interpret_float, make non-static.
838 (interpret_complex): Move to gfc_interpret_complex, make
840 (interpret_logical): Move to gfc_interpret_logical, make
842 (interpret_character): Move to gfc_interpret_character, make
844 (interpret_derived): Move to gfc_interpret_derived, make
846 * target-memory.h: Add prototypes for newly-exported
847 gfc_interpret_* functions.
849 2007-05-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
852 * parse.c (next_statement): Warn for truncated lines if source is free
855 2007-05-27 Paul Thomas <pault@gcc.gnu.org>
856 Tobias Burnus <burnus@net-b.de>
859 * symbol.c (gfc_check_function_type): Copy dimensions of
861 * resolve.c (resolve_contained_fntype): Improve symbol output in
864 2007-05-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
867 * io.c (check_format): Add warning for H specifier in format.
869 2007-05-26 Tobias Burnus <burnus@net-b.de>
871 * gfortran.texi: Document the GFORTRAN_ERROR_DUMPCORE and
872 GFORTRAN_ERROR_BACKTRACE environment variables.
874 2007-05-26 Paul Thomas <pault@gcc.gnu.org>
877 * trans.h : Add no_function_call bitfield to gfc_se structure.
878 Add stmtblock_t argument to prototype of get_array_ctor_strlen.
879 * trans-array.c (get_array_ctor_all_strlen): New function.
880 (get_array_ctor_strlen): Add new stmtblock_t argument and call
881 new function for character elements that are not constants,
883 (gfc_conv_array_parameter): Call get_array_ctor_strlen to get
885 * trans-intrinsic (gfc_conv_intrinsic_len): Add new argument
886 to call of get_array_ctor_strlen.
888 2007-05-25 Kazu Hirata <kazu@codesourcery.com>
890 * intrinsic.texi: Fix typos.
892 2007-05-25 Paul Thomas <pault@gcc.gnu.org>
895 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Change
896 order in logic under EXPR_FUNCTION to handle functions with
899 2007-05-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
902 * array.c (spec_dimen_size): Test for correct BT_INTEGER type.
904 2007-05-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
907 * trans-expr.c (gfc_trans_zero_assign): Convert the result of
908 TYPE_SIZE_UNIT into a signed type.
909 (gfc_trans_array_copy): Likewise.
910 (gfc_trans_array_constructor_copy): Likewise.
911 * trans-array.c (gfc_trans_create_temp_array): Likewise.
912 (gfc_grow_array): Likewise.
913 (gfc_array_init_size): Likewise.
914 (gfc_duplicate_allocatable): Likewise.
915 * trans-stmt.c (allocate_temp_for_forall_nest_1): Likewise.
917 2007-05-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
920 * resolve.c (resolve_function): Don't call resolve_global_procedure if
921 there is no name. Delete duplicated statement in ELSE clause.
923 2007-05-22 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
926 * trans-array.c (gfc_trans_array_bound_check): Take extra argument to
927 indicate whether we should check the upper bound in that dimension.
928 (gfc_conv_array_index_offset): Check only the lower bound of the
929 last dimension for assumed-size arrays.
930 (gfc_conv_array_ref): Likewise.
931 (gfc_conv_ss_startstride): Likewise.
933 2007-05-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
934 Daniel Franke <franke.daniel@gmail.com>
937 * resolve.c (resolve_actual_arglist): Resolve actual argument after
938 being identified as variable.
940 2007-05-21 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
943 * trans-stmt.c (gfc_trans_do): Fix the value of loop variable
946 2007-05-21 H.J. Lu <hongjiu.lu@intel.com>
948 * trans-stmt.c (gfc_trans_do): Fix a typo in comment.
950 2007-05-21 Paul Thomas <pault@gcc.gnu.org>
954 * trans-array.c (gfc_conv_expr_descriptor): Obtain the stored
955 offset for non-descriptor, source arrays and correct for stride
956 not equal to one before writing to field of output descriptor.
958 2007-05-20 Daniel Franke <franke.daniel@gmail.com>
961 * check.c (check_rest): Improved argument conformance check and
962 fixed error message generation.
964 2007-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
967 * Make-lang.in: Remove use of -Wno-error for expr.o, resolve.o,
968 simplify.o and trans-common.o.
970 2007-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
973 * trans-array.c (gfc_trans_auto_array_allocation): Avoid
974 multiplication of mismatched types.
976 2007-05-18 Daniel Franke <franke.daniel@gmail.com>
979 * symbol.c (gfc_add_flavor): Add the NAME to error message if
982 2007-05-15 Daniel Franke <franke.daniel@gmail.com>
987 * intrinsic.c (check_specific): Check elemental intrinsics for
989 (add_functions): Fixed dummy argument names of BESJN and BESYN.
990 Fixed elemental status of MCLOCK and MCLOCK8.
991 * check.c (check_rest): Added check for array conformance.
992 (gfc_check_merge): Removed check for array conformance.
993 (gfc_check_besn): Removed check for scalarity.
994 * intrinsic.texi (CSHIFT, EOSHIFT): Fixed typos.
995 (BESJN, BESYN): Clarified documentation.
997 2007-05-17 Tobias Burnus <burnus@net-b.de>
999 * gfortran.texi (GFORTRAN_CONVERT_UNIT): Improve documentation.
1001 2007-05-16 Brooks Moses <brooks.moses@codesourcery.com>
1008 * target-memory.c: New file.
1009 * target-memory.h: New file.
1010 * simplify.c: Add #include "target-memory.h".
1011 (gfc_simplify_transfer): Implement constant-
1012 folding for TRANSFER intrinsic.
1013 * Make-lang.in: Add dependencies on new target-memory.* files.
1015 2007-05-15 Paul Brook <paul@codesourcery.com>
1017 * trans-types.c (gfc_type_for_size): Handle signed TImode.
1019 2007-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1022 * trans.h (gfor_fndecl_internal_malloc, gfor_fndecl_internal_malloc64,
1023 gfor_fndecl_internal_free): Remove prototypes.
1024 (gfor_fndecl_os_error, gfc_call_free, gfc_call_malloc): Add prototypes.
1025 * trans.c (gfc_call_malloc, gfc_call_free): New functions.
1026 * f95-lang.c (gfc_init_builtin_functions): Add __builtin_free
1027 and __builtin_malloc builtins.
1028 * trans-decl.c (gfor_fndecl_internal_malloc,
1029 gfor_fndecl_internal_malloc64, gfor_fndecl_internal_free): Remove.
1030 (gfor_fndecl_os_error): Add.
1031 (gfc_build_builtin_function_decls): Don't create internal_malloc,
1032 internal_malloc64 and internal_free library function declaration.
1033 Create os_error library call function declaration.
1034 * trans-array.c (gfc_trans_allocate_array_storage,
1035 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
1036 gfc_conv_array_parameter, gfc_duplicate_allocatable): Use
1037 gfc_call_malloc and gfc_call_free instead of building calls to
1038 internal_malloc and internal_free.
1039 * trans-expr.c (gfc_conv_string_tmp): Likewise.
1040 * trans-stmt.c (gfc_do_allocate, gfc_trans_assign_need_temp,
1041 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
1042 gfc_trans_where_2: Likewise.
1043 * trans-intrinsic.c (gfc_conv_intrinsic_ctime,
1044 gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam,
1045 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_trim): Likewise.
1047 2007-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1050 * trans-expr.c (gfc_conv_substring): Evaluate substring bounds
1053 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
1055 * f95-lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
1056 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Use unsigned_type_for
1057 instead of gfc_unsigned_type.
1058 * trans-stmt.c (gfc_trans_do): Use unsigned_type_for instead of
1060 * trans-types.c (gfc_unsigned_type): Remove.
1061 * trans-types.h (gfc_unsigned_type): Remove.
1063 2007-05-12 Paul Thomas <pault@gcc.gnu.org>
1066 * resolve.c (check_host_association): New function that detects
1067 incorrect host association and corrects it.
1068 (gfc_resolve_expr): Call the new function for variables and
1070 * match.h : Remove prototype for gfc_match_rvalue.
1071 * gfortran.h : Add prototype for gfc_match_rvalue.
1073 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
1076 * trans-expr.c (gfc_conv_function_call): Reduce indirection for
1077 direct assignments of recursive array valued functions.
1078 * primary.c (gfc_match_rvalue): Correct error for recursive
1079 function calls such that directly recursive calls of scalar
1080 function without an explicit result are disallowed.
1082 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
1085 * resolve.c (resolve_fl_namelist): It is not an error if the
1086 namelist element is the result variable of the enclosing
1087 function. Search for the symbol in current and all parent
1088 namespaces for a potential conflict.
1089 * symbol.c (check_conflict): Remove the conflict between
1090 'in_namelist' and 'FL_PROCEDURE' because the symbol info
1091 is not available to exclude function result variables.
1092 * trans-io.c (nml_get_addr_expr): Use the fake result decl
1093 if the symbol is an implicit result variable.
1095 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
1098 * decl.c (get_proc_name): If an entry has already been declared
1099 as a module procedure, pick up the symbol and the symtree and
1100 use them for the entry.
1102 2007-05-08 Paul Thomas <pault@gcc.gnu.org>
1105 * resolve.c (resolve_symbol): Remove the flagging mechanism from the
1106 formal namespace resolution and instead check that the formal
1107 namespace is not the current namespace.
1109 2007-05-08 Paul Thomas <pault@gcc.gnu.org>
1112 * trans-array.c (gfc_conv_array_parameter): Convert full array
1113 references to the result of the procedure enclusing the call.
1115 2007-05-08 Paul Thomas <pault@gcc.gnu.org>
1119 * decl.c (add_init_expr_to_sym): Expand a scalar initializer
1120 for a parameter array into an array expression with the right
1122 * array.c (spec_dimen_size): Remove static attribute.
1123 * gfortran.h : Prototype for spec_dimen_size.
1125 2007-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1128 * trans-stmt.c (gfc_trans_do): Handle large loop counts.
1130 2007-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1133 * simplify.c (gfc_simplify_new_line): NEW_LINE can be simplified
1134 even for non constant arguments.
1136 2007-05-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1137 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1140 * gfortran.h: Add runtime error codes from libgfortran.h. Define
1142 * trans.c (gfc_trans_runtime_check): Update the format of runtime error
1143 messages to match library runtime errors. Use call to new library
1144 function runtime_error_at().
1145 * trans.h: Add prototype for new function gfc_trans_io_runtime_check.
1146 Add declaration for library functions runtime_error_at and
1148 * trans_io.c (gfc_trans_io_runtime_check): New function.
1149 (set_parameter_value): Add error checking for UNIT numbers.
1150 (set_parameter_ref): Initialize the users variable to zero.
1151 (gfc_trans_open): Move setting of unit number to after setting of common
1152 flags so that runtime error trapping can be detected.
1153 (gfc_trans_close): Likewise. (build_filepos): Likewise.
1154 (gfc_trans_inquire): Likewise. (build_dt): Likewise.
1155 * trans-decl.c: Add declarations for runtime_error_at and
1156 generate_error. (gfc_build_builtin_function_decls): Build function
1157 declarations for runtime_error_at and generate_error.
1159 2007-05-06 Paul Thomas <pault@gcc.gnu.org>
1162 * resolve.c (resolve_fl_procedure): Resolve constant character
1165 2007-05-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1168 * decl.c (match_char_spec): Add check for invalid character lengths.
1170 2007-05-04 Brooks Moses <brooks.moses@codesourcery.com>
1172 * intrinsic.texi (CMPLX): Document result kind.
1173 (COMPLEX): Add documentation.
1175 2007-05-04 Daniel Franke <franke.daniel@gmail.com>
1178 * intrinsic.c (add_functions): Replaced calls to gfc_check_g77_math1
1179 by gfc_check_fn_r to avoid checks for scalarity.
1180 * check.c (gfc_check_besn): Removed check for scalarity.
1181 (gfc_check_g77_math1): Removed.
1182 * intrinsic.h (gfc_check_g77_math1): Removed.
1184 2007-05-04 Daniel Franke <franke.daniel@gmail.com>
1186 * check.c (gfc_check_fseek_sub): Fixed typo.
1188 2007-05-04 Daniel Franke <franke.daniel@gmail.com>
1191 * intrinsic.c (add_subroutines): Added FSEEK.
1192 * intrinsic.h (gfc_resolve_fseek_sub, gfc_check_fseek_sub): New.
1193 * iresolve.c (gfc_resolve_fseek_sub): New.
1194 * check.c (gfc_check_fseek_sub): New.
1195 * intrinsic.texi (FSEEK): Updated.
1197 2007-05-04 Tobias Burnus <burnus@net-b.de>
1200 * expr.c (gfc_check_pointer_assign): Check for NULL pointer.
1202 2007-05-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1205 * simplify.c (gfc_simplify_len): Only simplify integer lengths.
1207 2007-05-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1210 * simplify.c (gfc_simplify_repeat): Don't put function call with
1211 side effect in a gcc_assert().
1213 2007-05-04 Tobias Burnus <burnus@net-b.de>
1216 * interface.c (compare_actual_formal): Check character length.
1218 2007-05-01 Thomas Koenig <tkoenig@gcc.gnu.org>
1221 * dependency.c (gfc_full_array_ref_p): If the reference is
1222 to a single element, check that the array has a single
1223 element and that the correct element is referenced.
1225 2007-05-01 Daniel Franke <franke.daniel@gmail.com>
1227 * intrinsic.c (add_functions): Fixed ELEMENTAL specifications.
1228 (add_subroutines): Replaced magic numbers in function calls by
1229 ELEMENTAL and NOT_ELEMENTAL respectively.
1230 * intrinsic.texi (MVBITS): Changed class to elemental subroutine.
1231 (RANDOM_NUMBER): Changed class to subroutine.
1232 (HUGE, TINY): Changed class to inquiry function.
1234 2007-04-30 Brooks Moses <brooks.moses@codesourcery.com>
1236 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_get_double_int.
1237 (gfc_conv_tree_to_mpz): New function.
1238 (gfc_conv_mpfr_to_tree): Use real_from_mpfr.
1239 (gfc_conv_tree_to_mpfr): New function.
1240 * trans-const.h: (gfc_conv_tree_to_mpz): New prototype.
1241 (gfc_conv_tree_to_mpfr): New prototype.
1243 2007-04-30 Daniel Franke <franke.daniel@gmail.com>
1245 * intrinsic.texi (IERRNO): Changed class to non-elemental function.
1246 (LOG10): Removed COMPLEX as accepted argument type.
1247 (NEW_LINE): Changed class from elemental to inquiry function.
1248 (SIGN): Removed requirement of scalar arguments.
1249 (SNGL): Changed class to elemental function.
1251 2007-04-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1254 * simplify.c (simplify_bound_dim): New function.
1255 (simplify_bound): Use the above. Perform simplification of LBOUND
1256 and UBOUND when DIM argument is not present.
1258 2007-04-29 Daniel Franke <franke.daniel@gmail.com>
1260 * gfortran.texi: Cleaned up keyword index.
1261 * invoke.texi: Likewise.
1262 * intrinsic.texi: Likewise.
1264 2007-04-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1267 * scanner.c (load_file): Discard the byte order mark if one is
1268 found on the first non-preprocessor line of a file.
1270 2007-04-29 Paul Thomas <pault@gcc.gnu.org>
1273 * trans-array.c (gfc_conv_resolve_dependencies): Create a temp
1274 whenever a dependency is found.
1276 2007-04-28 Tobias Schlüter <tobi@gcc.gnu.org>
1278 * options.c (gfc_handle_option): Ensure requested free form line
1279 length is not too small.
1281 2007-04-27 Brooks Moses <brooks.moses@codesourcery.com>
1283 * intrinsic.texi (Transfer): Improve documentation.
1285 2007-04-27 Brooks Moses <brooks.moses@codesourcery.com>
1287 * gfortran.texi (Option Index): Add @samp as needed.
1289 2007-04-27 Daniel Franke <franke.daniel@gmail.com>
1291 * gfortran.texi: Added node and menu entry for an option index.
1292 * invoke.texi: Moved command line option related entries of the concept
1293 index to the option index.
1295 2007-04-27 Daniel Franke <franke.daniel@gmail.com>
1297 * intrinsic.texi (AND, FPUT, FPUTC, MODULO, OR, SET_EXPONENT,
1298 XOR): Fixed examples.
1300 2007-04-27 Daniel Franke <franke.daniel@gmail.com>
1302 * intrinsic.texi (PRODUCT, RESHAPE, SPACING, SPREAD, SUM,
1303 SYSTEM_CLOCK, TRANSFER, UNPACK): New.
1304 (DATE_AND_TIME, CPU_TIME, RRSPACING): Added cross references.
1306 2007-04-26 Daniel Franke <franke.daniel@gmail.com>
1308 * intrinsic.texi (NULL, PACK, PRESENT, REPEAT, SCAN, SHAPE,
1309 SIZE, TRANSPOSE, TRIM, VERIFY): New.
1310 (ADJUSTL, ADJUSTR, INDEX): Added cross references.
1311 (INT, INT2, INT8, LONG): Enabled section header.
1313 2007-04-25 Janne Blomqvist <jb@gcc.gnu.org>
1315 * module.c (module_char): Replace fgetc() with
1317 (write_char): Replace fputc() with putc().
1318 * scanner.c (load_line): Replace fgetc() with getc().
1319 (gfc_read_orig_filename): Likewise.
1321 2007-04-25 Tobias Burnus <burnus@net-b.de>
1324 * error.c (error_print): Fix %% support.
1325 * intrinsic.c (sort_actual): Improve error message.
1326 * resolve.c (resolve_actual_arglist): Allow %VAL for
1327 interfaces defined in the module declaration part.
1329 2007-04-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1332 * intrinsic.texi (GETLOG): Update documentation to reflect
1335 2007-04-24 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1338 * module.c (write_char): Add character to the MD5 buffer.
1339 (read_md5_from_module_file): New function.
1340 (gfc_dump_module): Compute MD5 for new module file. Call
1341 read_md5_from_module_file. Only overwrite old module file
1342 if the new MD5 is different.
1344 2007-04-23 Paul Thomas <pault@gcc.gnu.org>
1347 * resolve.c (resolve_symbol): Allow resolution of formal
1348 namespaces nested within formal namespaces coming from modules.
1351 * trans-expr.c (gfc_trans_assignment): Make the call to
1352 gfc_trans_zero_assign conditional on the lhs array ref being
1355 2007-04-23 Tobias Burnus <burnus@net-b.de>
1357 * primary.c (match_integer_constant): Mention -fno-range-check
1358 in the error message.
1360 2007-04-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1363 * scanner.c (load_line): Remove check for comment after ampersand and
1364 adjust tracking of ampersand.
1366 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
1368 * f95-lang.c (lang_tree_node): Use GENERIC_NEXT
1369 instead of checking GIMPLE_STMT_P in chain_next.
1371 2007-04-17 Tobias Schlüter <tobi@gcc.gnu.org>
1373 * trans-types.h (gfc_packed): New enum.
1374 (gfc_get_nodesc_array_type): Change prototype to use new enum.
1375 * trans-types.c (gfc_get_nodesc_array): Use gfc_packed for
1376 argument packed. Adapt all references to values accordingly.
1377 (gfc_sym_type): Use enum values in call to gfc_get_nodesc_array.
1378 (gfc_get_derived_type): Likewise.
1379 * trans-array.c (gfc_build_constant_array_constructor): Likewise.
1380 * trans-expr.c (gfc_get_interface_mapping_charlen): Changed packed
1381 argument to type gfc_packed.
1382 (gfc_add_interface_mapping): Use enum values in call to
1383 gfc_get_interface_mapping.
1384 * trans-decl.c (gfc_build_dummy_array_decl): Adapt to use enum
1385 values when determining packing.
1387 * trans-decl.c (gfc_finish_decl): Remove unused second argument
1388 'init'. Simplify code accordingly. Remove calls to
1389 gfc_fatal_error in favor of gcc_assert.
1390 (create_function_arglist): Remove second argument from calls to
1392 (gfc_trans_dummy_character): Likewise.
1394 * arith.h: Update copyright years.
1395 * dependency.h: Likewise.
1396 * gfortran.h: Likewise.
1397 * lang-specs.h: Likewise.
1398 * parse.h: Likewise.
1399 * symbol.c: Likewise.
1400 * trans.h: Likewise.
1401 * trans.c: Likewise.
1402 * trans-array.c: Likewise.
1403 * trans-common.c: Likewise.
1404 * trans-const.h: Likewise.
1405 * trans-const.c: Likewise.
1406 * trans-decl.c: Likewise.
1407 * trans-expr.c: Likewise.
1408 * trans-io.c: Likewise.
1409 * trans-openmp.c: Likewise.
1410 * trans-types.h: Likewise.
1411 * types.def: Likewise.
1413 2007-04-17 Tobias Schlüter <tobi@gcc.gnu.org>
1416 * decl.c (gfc_sym_mangled_identifier): Use capital letters in name
1418 (gfc_sym_mangled_function_id): Likewise.
1420 2007-04-15 Paul Thomas <pault@gcc.gnu.org>
1423 * primary.c (check_for_implicit_index): New function to check
1424 that a host associated variable is not an undeclared implied
1426 (gfc_match_rvalue, match_variable): Use it and reset the
1427 implied_index attribute.
1428 * gfortran.h : Add the implied_index field to symbol_attribute.
1429 * match.c (gfc_match_iterator): Mark the iterator variable
1430 with the new attribute.
1431 * decl.c (build_sym): Reset the new attribute.
1433 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
1435 * gfc-internals.texi: Fix typos.
1436 * simplify.c: Fix a comment typo.
1438 2007-04-14 Bernhard Fischer <aldot@gcc.gnu.org>
1440 * primary.c: Commentary typo fix; Add question about redundant (?)
1443 2007-04-14 Paul Thomas <pault@gcc.gnu.org>
1447 * expr.c (scalarize_intrinsic_call): New function to
1448 scalarize elemental intrinsic functions in initialization
1450 (check_init_expr): Detect elemental intrinsic functions
1451 in initalization expressions and call previous.
1453 2007-04-13 Tobias Burnus <burnus@net-b.de>
1456 * primary.c (match_variable): External functions
1459 2007-04-13 Paul Thomas <pault@gcc.gnu.org>
1462 * trans-types.c (copy_dt_decls_ifequal): Do not get pointer
1463 derived type components.
1465 2007-04-13 Tobias Schlüter <tobi@gcc.gnu.org>
1468 * resolve.c: Include obstack.h and bitmap.h. New variable
1470 (code_stack): Add tail and reachable_labels fields.
1471 (reachable_labels): New function.
1472 (resolve_branch): Rework to use new fields in code_stack.
1473 (resolve_code): Call reachable_labels.
1474 (resolve_codes): Allocate and free labels_obstack.
1476 2007-04-12 Tobias Schlüter <tobi@gcc.gnu.org>
1479 * decl.c (match_char_spec): Move check for negative CHARACTER
1481 * resolve.c (resolve_charlen): ... here.
1482 (resolve_types): Resolve CHARACTER lengths earlier.
1484 2007-04-12 Daniel Franke <franke.daniel@gmail.com>
1487 * intrinsic.texi (RANDOM_SEED, RANDOM_NUMBER): New.
1489 2007-04-12 Tobias Schlüter <tobi@gcc.gnu.org>
1492 * primary.c (gfc_variable_attr): Don't copy string length if it
1494 * resolve.c (resolve_code): Clarify error message.
1497 * decl.c (gfc_match_end): Also check for construct name in END
1498 FORALL and END WERE statements.
1499 * match.c (match_case_eos): Use uppercase for statement name in
1501 (match_elsewhere): Construct name may appear iff construct has a
1504 * trans-types.c: Update copyright years. Reformat long comment
1505 explaining array descriptor format. Remove obsolete mention of
1508 * arith.c (gfc_arith_uplus): Rename to ...
1509 (gfc_arith_identity): ... this.
1510 (gfc_parentheses): New function.
1511 (gfc_uplus): Adapt to renamed function.
1512 * arith.h (gfc_parentheses): Add prototype.
1513 * expr.c (gfc_copy_expr): Deal with INTRINSIC_PARENTHESES.
1514 (simplifiy_intrinsic_op): Treat INTRINSIC_UPLUS separately from
1515 INTRINSIC_PARENTHESES.
1517 2007-04-12 Tobias Burnus <burnus@net-b.de>
1520 * decl.c (match_attr_spec): Allow PRIVATE/PUBLIC
1521 attribute in type definitions.
1522 (gfc_match_private): Allow PRIVATE statement only
1523 in specification part of modules.
1524 (gfc_match_public): Ditto for PUBLIC.
1525 (gfc_match_derived_decl): Allow PRIVATE/PUBLIC attribute only in
1526 specificification part of modules.
1528 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
1531 * intrinsic.c (add_functions): Add ref. to gfc_resolve_achar.
1532 * intrinsic.h : Add prototype for gfc_resolve_achar.
1533 * iresolve.c (gfc_resolve_achar): New function.
1535 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
1538 * resolve.c (resolve_fl_variable): Set flag to 2 for automatic
1539 arrays. Make condition for automatic array error explicit.
1540 If a dummy, no error on an INTENT(OUT) derived type.
1542 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
1545 * expr.c (find_array_element): Correct arithmetic for rank > 1.
1547 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
1550 * check.c (numeric_check): If an expresson has not got a type,
1551 see if it is a symbol for which a default type applies.
1553 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
1556 * trans-decl.c (gfc_get_symbol_decl): Allow unreferenced use
1559 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
1562 * symbol.c (gfc_check_function_type): New function.
1563 * gfortran.h : Add prototype for previous.
1564 * parse.c (parse_progunit): Call it after parsing specification
1567 2007-04-05 Paul Thomas <pault@gcc.gnu.org>
1570 * trans-expr.c (gfc_conv_function_call): Give a dummy
1571 procedure the correct type if it has alternate returns.
1573 2007-04-05 Paul Thomas <pault@gcc.gnu.org>
1576 * decl.c (gfc_match_modproc): Go up to the top of the namespace
1577 tree to find the module namespace for gfc_get_symbol.
1579 2007-04-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1582 * fortran/gfortran.h (gfc_charlen_int_kind): New prototype.
1583 * fortran/trans-types.c (gfc_charlen_int_kind): New variable.
1584 (gfc_init_types): Define gfc_charlen_int_kind.
1585 * fortran/trans.h (gfor_fndecl_string_repeat): Remove prototype.
1586 * fortran/trans-decl.c (gfor_fndecl_string_repeat): Delete.
1587 (gfc_build_intrinsic_function_decls): Don't set
1588 gfor_fndecl_string_repeat.
1589 * fortran/trans-intrinsic.c (gfc_conv_intrinsic_repeat): Rewrite
1590 so that we don't have to call a library function.
1591 * fortran/simplify.c (gfc_simplify_repeat): Perform the necessary
1592 checks on the NCOPIES argument, and work with arbitrary size
1595 2007-03-31 Tobias Burnus <burnus@net-b.de>
1597 * intrinsic.c (add_functions): Fix name of dummy argument
1598 for new_line and exit intrinsic.
1600 2007-03-31 Paul Thomas <pault@gcc.gnu.org>
1603 * gfortran.texi: Add a section for the %VAL, %REF and %LOC
1606 2007-03-30 Rafael Avila de Espindola <espindola@google.com>
1608 * trans-types.c (gfc_signed_or_unsigned_type): Remove.
1609 (gfc_unsigned_type): Use get_signed_or_unsigned_type instead of
1610 gfc_signed_or_unsigned_type.
1611 (gfc_signed_type): Ditto.
1612 * trans-types.h (gfc_signed_or_unsigned_type): Remove.
1613 * f95-lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
1615 2007-03-30 Tobias Schlüter <tobi@gcc.gnu.org>
1617 * symbol.c (gfc_find_gsymbol): Simplify, don't unconditionally
1618 descend into all branches.
1620 2007-03-29 Tobias Schlüter <tobi@gcc.gnu.org>
1622 * intrinsic.c (conv_name): Let gfc_get_string handle the format.
1623 (find_conv): Compare pointers instead of calling strcmp.
1624 (find_sym): Likewise, but ensure that the compared pointer is in
1625 the global string table.
1627 2007-03-28 Tobias Schlüter <tobi@gcc.gnu.org>
1629 * gfc-internals.texi: Fix output filename. Merge type index into
1630 concept index. Start documentation of gfc_code structure.
1632 2007-03-26 Brooks Moses <brooks.moses@codesourcery.com>
1634 * gfc-internals.texi: New file,
1635 * Make-lang.in: Add rules to convert it to dvi, pdf, and info.
1637 2007-03-26 Brooks Moses <brooks.moses@codesourcery.com>
1639 * error.c (show_locus): Remove always-false test.
1641 2007-03-26 Brooks Moses <brooks.moses@codesourcery.com>
1643 * lang.opt: Minor edits to descriptions.
1645 2007-03-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1648 * fortran/interface.c (check_operator_interface): Implement
1649 the standard checks on user operators extending intrinsic operators.
1650 * fortran/resolve.c (resolve_operator): If the ranks of operators
1651 don't match, don't error out but try the user-defined ones first.
1653 2007-03-24 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1656 * expr.c (check_dimension): Fix logic of comparisons.
1658 2007-03-24 Paul Thomas <pault@gcc.gnu.org>
1661 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Return
1662 int result that is non-zero if the expression is the function
1663 result. Only the characteristics of the result expression
1664 can be used in a procedure interface, so simplify LEN in situ
1665 using its character length.
1669 * trans-expr.c (gfc_conv_function_call): Do not use
1670 gfc_conv_expr_reference for actual pointer function with formal
1671 target because a temporary is created that does not transfer
1672 the reference correctly. Do not indirect formal pointer
1673 functions since it is the function reference that is needed.
1675 2007-03-24 Brooks Moses <brooks.moses@codesourcery.com>
1677 * gfortran.h: Edit comments on GFC_STD_*.
1679 2007-03-23 Brooks Moses <brooks.moses@codesourcery.com>
1681 * invoke.texi: Misc. small typo fixes.
1682 (-Wcharacter-truncation): Add.
1683 (-Wnonstd-intrinsics): Correct spelling.
1685 (-fintrinsic-modules-path): Add.
1687 2007-03-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1690 * arith.c (complex_pow): Rewrite to handle large power.
1691 (gfc_arith_power): Handle large power in the real and integer
1694 2007-03-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1697 * trans-const.c (gfc_conv_mpz_to_tree): Allow integer constants
1698 larger than twice the width of a HOST_WIDE_INT.
1700 2006-03-22 Paul Thomas <pault@gcc.gnu.org>
1703 * trans-intrinsic.c (gfc_size_in_bytes): Remove function.
1704 (gfc_conv_intrinsic_array_transfer): Remove calls to previous.
1705 Explicitly extract TREE_TYPEs for source and mold. Use these
1706 to calculate length of source and mold, except for characters,
1707 where the se string_length is used. For mold, the TREE_TYPE is
1708 recalculated using gfc_get_character_type_len so that the
1709 result is correctly cast for character literals and substrings.
1710 Do not use gfc_typenode_for_spec for the final cast.
1712 2007-03-22 Tobias Schlüter <tobi@gcc.gnu.org>
1715 * decl.c (gfc_match_derived_decl): Reliably reject
1716 'doubleprecision' and 'doublecomplex' as type names.
1718 2007-03-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1721 * trans-expr.c (gfc_trans_init_string_length): Length should
1723 (gfc_conv_function_call): Likewise.
1725 2007-03-18 Paul Thomas <pault@gcc.gnu.org>
1729 * symbo.c : Add gfc_derived_types.
1730 (gfc_free_dt_list): Free derived type list gfc_derived_types.
1731 (gfc_free_namespace): Remove call to gfc_free_dt_list.
1732 (gfc_symbol_done_2): Call gfc_free_dt_list.
1733 * gfortran.h : Declare gfc_derived_types to be external. Remove
1734 derived types field from gfc_namespace.
1735 * resolve.c (resolve_fl_derived): Refer to gfc_derived types
1736 rather than namespace derived_types.
1737 (resolve_fntype): Remove special treatment for module
1738 derived type functions.
1739 * trans-types.c (gfc_get_derived_type): Remove search for like
1740 derived types. Finish by copying back end declaration to like
1741 derived types in the derived type list gfc_derived_types.
1743 2007-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1746 * trans-expr.c (gfc_conv_powi): Make n argument unsigned hwi.
1747 (gfc_conv_cst_int_power): Handle integer exponent with care,
1748 since it might be too large for us.
1750 2007-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1753 * invoke.texi: Fix typo.
1755 2007-03-16 Tobias Burnus <burnus@net-b.de>
1757 * trans-decl.c (gfc_generate_function_code): Use all arguments of
1760 2007-03-15 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1762 * gfortran.h (gfc_option_t): Add flag_backtrace field.
1763 * lang.opt: Add -fbacktrace option.
1764 * invoke.texi: Document the new option.
1765 * trans-decl.c (gfc_build_builtin_function_decls): Add new
1766 option to the call to set_std.
1767 * options.c (gfc_init_options, gfc_handle_option): Handle the
1770 2007-03-15 Tobias Burnus <burnus@gcc.gnu.org>
1771 Paul Thomas <pault@gcc.gnu.org>
1774 * decl.c (gfc_match_import): If the parent of the current name-
1775 space is null, try looking for an imported symbol in the parent
1776 of the proc_name interface.
1777 * resolve.c (resolve_fl_variable): Do not check for blocking of
1778 host association by a same symbol, if the symbol is in an
1781 2007-03-15 Paul Thomas <pault@gcc.gnu.org>
1784 * decl.c (match_data_constant): Before going on to try to match
1785 a name, try to match a structure component.
1789 * resolve.c (resolve_actual_arglist): Do not reject a generic
1790 actual argument if it has a same name specific interface.
1793 * trans-array.c (parse_interface): Do not nullify allocatable
1794 components if the symbol has the saved attribute.
1796 2007-03-14 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1798 * trans-array.c (gfc_trans_auto_array_allocation): Replace
1799 fold(convert()) by fold_convert().
1800 (gfc_duplicate_allocatable): Likewise.
1801 * trans-intrinsic.c (gfc_conv_intrinsic_dot_product): Use
1802 build_int_cst instead of converting an integer_zero_node
1805 2007-03-14 Jakub Jelinek <jakub@redhat.com>
1807 * module.c (mio_typespec): Don't look at ts->cl if not BT_CHARACTER.
1809 2007-03-13 Brooks Moses <brooks.moses@codesourcery.com>
1814 * intrinsics.texi (CHDIR): Fix argument names, note
1815 that STATUS must be a default integer.
1816 (CTIME): Fix argument names, note that RESULT must
1817 be a default integer.
1818 (EXIT): Note that STATUS must be a default integer.
1820 2007-03-13 Brooks Moses <brooks.moses@codesourcery.com>
1823 * intrinsic.texi: General whitespace cleanup, remove
1824 comment about missing intrinsics.
1825 (menu): Add lines for new entries listed below.
1826 (ACOSH): Mention specific function DACOSH, correct
1827 description phrasing.
1828 (ASINH): Mention specific function DASINH, correct
1829 description phrasing.
1830 (ATANH): Mention specific function DATANH, correct
1831 description phrasing.
1832 (COS): Add index entry for CCOS.
1833 (CPU_TIME): Correct "REAL" to "REAL(*)".
1834 (EXP): Add index entry for CEXP.
1835 (INT): Correct argument name to "A".
1839 (MAX): Add index entries for specific variants.
1840 (MCLOCK): New entry.
1841 (MCLOCK8): New entry.
1842 (SECNDS): Adjust to a more standard form.
1843 (SECOND): New entry.
1844 (TIME): Add cross-reference to MCLOCK.
1845 (TIME8): Add cross-reference to MCLOCK8.
1847 2007-03-11 Paul Thomas <pault@gcc.gnu.org>
1850 * parse.c (parse_interface): Use the default types from the
1851 formal namespace if a function or its result do not have a type
1852 after parsing the specification statements.
1854 2007-03-08 Brooks Moses <brooks.moses@codesourcery.com>
1856 * intrinsic.texi: (ICHAR) Improve internal I/O note.
1857 (ACHAR): Reference it.
1858 (CHAR): Reference it.
1859 (IACHAR): Reference it.
1861 2007-03-08 Brooks Moses <brooks.moses@codesourcery.com>
1863 * intrinsic.texi: (LINK) Document function form.
1869 2007-03-08 Brooks Moses <brooks.moses@codesourcery.com>
1871 * intrinsic.texi: minor typo fixes, removed prologue.
1872 (FSEEK): moved to correct place in alphabetical order.
1874 2007-03-08 Daniel Franke <franke.daniel@gmail.com>
1877 * check.c (gfc_check_alarm_sub): Added check for default integer
1878 kind of status argument.
1879 * iresolve.c (gfc_resolve_alarm_sub): Removed conversion of
1881 * intrinsic.texi (ALARM): Extended documentation.
1883 2007-03-08 Daniel Franke <franke.daniel@gmail.com>
1885 * intrinsic.texi (GERROR, ISATTY, TTYNAM): New.
1886 (ABORT, FLUSH, FNUM, IRAND, MALLOC, SIGNAL, SRAND): Fixed typo.
1887 * intrinsic.c (add_subroutines): Adjusted dummy argument names
1888 of GERROR and TTYNAM.
1890 2007-07-08 Tobias Burnus <burnus@net-b.de>
1892 * module.c (gfc_match_use): Support renaming of operators
1894 * gfortran.texi (Fortran 2003 Status): Document support of
1895 renaming of operators.
1897 2007-07-08 Tobias Burnus <burnus@net-b.de>
1900 * module.c (read_module): Always import module name as symbol.
1901 (gfc_match_use): Disallow module name in the only clause of
1904 2007-03-08 Paul Thomas <pault@gcc.gnu.org>
1907 * expr.c (find_array_section): Correct arithmetic for section
1910 2007-03-07 Brooks Moses <brooks.moses@codesourcery.com>
1912 * iresolve.c (gfc_resolve_ishftc): Correct s_kind value.
1914 2007-03-06 Daniel Franke <franke.daniel@gmail.com>
1916 PR documentation/30950
1917 * intrinsic.texi (AND, CPU_TIME): Fix dummy argument names.
1918 (FREE): Fix call syntax.
1920 2007-03-06 Brooks Moses <brooks.moses@codesourcery.com>
1922 * intrinsic.texi: Limit column widths to a total of .85.
1924 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
1926 * gfortran.texi (GFortran and G77): Rewrite completely.
1928 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
1930 * match.c (gfc_match_name): Expanded comment.
1932 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
1934 * gfortran.texi (Old-style kind specifications): Document
1935 special handling of old-style kind specifiers for COMPLEX.
1936 * decl.c (gfc_match_old_kind_spec): Document kind/bytesize
1937 assumptions for COMPLEX in comment.
1939 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
1942 * gfortranspec.c (lang_specific_driver): Update program
1943 name and copyright date.
1945 2007-03-03 Paul Thomas <pault@gcc.gnu.org>
1948 * check.c (dim_rank_check): The shape of subsections of
1949 assumed-size arrays is known.
1951 2007-03-02 Paul Thomas <pault@gcc.gnu.org>
1952 Tobias Burnus <burnus@net-b.de>
1955 * decl.c (gfc_match_entry): Remove erroneous entry result check.
1957 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
1959 * Make-lang.in: Add install-pdf target as copied from
1960 automake v1.10 rules.
1962 2007-03-01 Tobias Burnus <burnus@net-b.de>
1965 * trans-intrinsic.c (gfc_conv_intrinsic_size): Compare pointers.
1967 2007-02-28 Tobias Burnus <burnus@net-b.de>
1968 Paul Thomas <pault@gcc.gnu.org>
1972 * resolve.c (resolve_actual_arglist): Allow by-value
1973 arguments and non-default-kind for %VAL().
1974 * trans-expr.c (conv_arglist_function): Allow
1975 non-default-kind for %VAL().
1977 2007-02-28 Tobias Burnus <burnus@net-b.de>
1980 * primary.c (next_string_char): Correct reading a character
1981 after the delimiter.
1982 (match_string_constant): Print warning message only once.
1984 2007-02-27 Richard Guenther <rguenther@suse.de>
1986 * trans-array.c (structure_alloc_comps): Use correct type
1987 for null pointer constant.
1989 2007-02-26 Brooks Moses <brooks.moses@codesourcery.com>
1991 * gfortran.texi: Standardize title page, remove version number
1992 from copyright page.
1994 2007-02-26 Thomas Koenig <Thomas.Koenig@online.de>
1995 Paul Thomas <pault@gcc.gnu.org>
1998 * trans-intrinsic.c (gfc_conv_intrinsic_size):
1999 If dim is an optional argument, check for its
2000 presence and call size0 or size1, respectively.
2002 2007-02-23 Paul Thomas <pault@gcc.gnu.org>
2005 * resolve.c (has_default_initializer): New function.
2006 (resolve_fl_variable): Call has_default_initializer to determine if
2007 the derived type has a default initializer to its ultimate
2011 2007-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2013 * options.c (set_default_std_flags): New function to consolidate
2015 (gfc_init_options): Use new function.
2016 (gfc_handle_option): Use new function.
2018 2007-02-22 Brooks Moses <brooks.moses@codesourcery.com>
2020 * gfortran.texi (Old-style kind specifications): Document
2021 special handling of old-style kind specifiers for COMPLEX.
2022 * decl.c (gfc_match_old_kind_spec): Documented kind/bytesize
2023 assumptions in comment.
2025 2007-02-21 Bernhard Fischer <aldot@gcc.gnu.org>
2027 * parse.c (next_free): Gooble spaces after OpenMP sentinel.
2029 2007-02-20 Thomas Koenig <Thomas.Koenig@online.de>
2032 * match.c (gfc_match_iterator): Remove conflict between
2033 loop variable and pointer.
2035 2007-02-20 Tobias Burnus <burnus@net-b.de>
2038 * symbol.c (gfc_add_volatile): Allow to set VOLATILE
2039 attribute for host-associated variables.
2040 * gfortran.h (symbol_attribute): Save namespace
2041 where VOLATILE has been set.
2042 * trans-decl.c (gfc_finish_var_decl): Move variable
2043 declaration to the top.
2045 2007-02-20 Tobias Burnus <burnus@net-b.de>
2048 * resolve.c (resolve_symbol): Add character dummy VALUE check.
2050 2007-02-19 Thomas Koenig <Thomas.Koenig@online.de>
2053 * fortran/iresolve.c (gfc_resolve_maxloc): Remove coercion of
2054 argument to default integer.
2055 (gfc_resolve_minloc): Likewise.
2057 2007-02-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2060 * options.c (gfc_init_options): Relax warning level for obsolescent.
2061 * match.c (match_arithmetic_if): Change to obsolescent from deleted.
2062 (gfc_match_if): Same.
2064 2007-02-18 Roger Sayle <roger@eyesopen.com>
2066 * trans-array.c (gfc_build_constant_array_constructor): When the
2067 shape of the constructor is known, use that to construct the
2069 (gfc_trans_constant_array_constructor): Initialize the "info"
2070 information for all of the dimensions of the array constructor.
2071 (constant_array_constructor_loop_size): New function.
2072 (gfc_trans_array_constructor): Use it to determine whether a
2073 loop is suitable for "constant array constructor" optimization.
2075 * trans-intrinsic.c (gfc_conv_intrinsic_anyall): Use fold_build2
2076 instead of build2, to avoid conditions like "(a != b) != 0".
2078 2007-02-18 Roger Sayle <roger@eyesopen.com>
2079 Paul Thomas <pault@gcc.gnu.org>
2082 * match.c (match_forall_iterator): Use gfc_match_expr instead
2083 of gfc_match_variable to match the iterator variable. Return
2084 MATCH_NO if not a variable. Remove the reset of the symbol's
2087 2007-02-16 Tobias Burnus <burnus@net-b.de>
2090 * trans-decl.c (gfc_generate_function_code): Do not initialize
2091 pointers to derived components.
2093 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
2094 Brooks Moses <brooks.moses@codesourcery.com>
2095 Lee Millward <lee.millward@codesourcery.com>
2097 * trans-expr.c (gfc_conv_power_op): Use build_call_expr.
2098 (gfc_conv_string_tmp): Likewise.
2099 (gfc_conv_concat_op): Likewise.
2100 (gfc_build_compare_string): Likewise.
2101 (gfc_conv_function_call): Use build_call_list instead of build3.
2103 * trans-array.c (gfc_trans_allocate_array_storage): Use
2105 (gfc_grow_array): Likewise.
2106 (gfc_trans_array_ctor_element): Likewise.
2107 (gfc_trans_array_constructor_value): Likewise.
2108 (gfc_array_allocate): Likewise.
2109 (gfc_array_deallocate): Likewise.
2110 (gfc_trans_auto_array_allocation): Likewise.
2111 (gfc_trans_dummy_array_bias): Likewise.
2112 (gfc_conv_array_parameter): Likewise.
2113 (gfc_trans_dealloc_allocated): Likewise.
2114 (gfc_duplicate_allocatable): Likewise.
2116 * trans-openmp.c (gfc_trans_omp_barrier): Use build_call_expr.
2117 (gfc_trans_omp_flush): Likewise.
2119 * trans-stmt.c (gfc_conv_elementel_dependencies): Use build_call_expr.
2120 (gfc_trans_pause): Likewise.
2121 (gfc_trans_stop): Likewise.
2122 (gfc_trans_character_select): Likewise.
2123 (gfc_do_allocate): Likewise.
2124 (gfc_trans_assign_need_temp): Likewise.
2125 (gfc_trans_pointer_assign_need_temp): Likewise.
2126 (gfc_trans_forall_1): Likewise.
2127 (gfc_trans_where_2): Likewise.
2128 (gfc_trans_allocate): Likewise.
2129 (gfc_trans_deallocate): Likewise.
2131 * trans.c (gfc_trans_runtime_check): Use build_call_expr.
2133 * trans-io.c (gfc_trans_open): Use build_call_expr.
2134 (gfc_trans_close): Likewise.
2135 (build_filepos): Likewise.
2136 (gfc_trans_inquire): Likewise.
2137 (NML_FIRST_ARG): Delete.
2138 (NML_ADD_ARG): Delete.
2139 (transfer_namelist_element): Use build_call_expr.
2140 (build_dt): Likewise.
2141 (gfc_trans_dt_end): Likewise.
2142 (transfer_expr): Likewise.
2143 (transfer_array-desc): Likewise.
2145 * trans-decl.c (gfc_generate_function_code): Use build_call_expr.
2146 (gfc_generate_constructors): Likewise.
2148 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Use build_call_expr.
2149 (gfc_conv_intrinsic_fdate): Likewise.
2150 (gfc_conv_intrinsic_ttynam): Likewise.
2151 (gfc_conv_intrinsic_array_transfer): Likewise.
2152 (gfc_conv_associated): Likewise.
2153 (gfc_conv_intrinsic_si_kind): Likewise.
2154 (gfc_conv_intrinsic_trim): Likewise.
2155 (gfc_conv_intrinsic_repeat: Likewise.
2156 (gfc_conv_intrinsic_iargc): Likewise.
2158 2007-02-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2161 * scanner.c (gfc_next_char_literal): Add check for end of file after
2162 call to advance_line.
2164 2007-02-14 Steven G. Kargl <kargl@gcc.gnu.org>
2167 * primary.c (match_logical_constant): Return MATCH_ERROR on invalid
2170 2007-02-14 Steven G. Kargl <kargl@gcc.gnu.org>
2172 * misc.c (gfc_typename): Fix potential buffer overflow.
2174 2007-02-13 Paul Thomas <pault@gcc.gnu.org>
2177 * module.c (read_module): Set pointer_info to referenced if the
2178 symbol has no namespace.
2180 2007-02-12 Nick Clifton <nickc@redhat.com>
2182 * lang.opt: Add Warning attribute to warning options.
2184 2007-02-11 Daniel Franke <franke.daniel@gmail.com>
2186 * intrinsic.texi (HOSTNM): Fix typographical error in syntax.
2187 (SLEEP): Added section and documentation.
2189 2007-02-11 Tobias Schlüter <tobi@gcc.gnu.org>
2192 * decl.c (add_init_expr_to_sym): Remove ENUM specific code.
2193 (variable_decl): Likewise. Rewrap comment.
2194 (match_attr_spec): Remove ENUM specific code.
2195 (gfc_match_enum): Fix typo in error message.
2196 (enumerator_decl): New function.
2197 (gfc_match_enumerator_def): Use enumerator_decl instead of
2198 variable_decl. Adapt code accordingly.
2200 2007-02-11 Paul Thomas <pault@gcc.gnu.org>
2203 * module.c (find_symtree_for_symbol): New function to return
2204 a symtree that is not a "unique symtree" given a symbol.
2205 (read_module): Do not automatically set pointer_info to
2206 referenced because this inhibits the generation of a unique
2207 symtree. Recycle the existing symtree if possible by calling
2208 find_symtree_for_symbol.
2211 * decl.c (add_init_expr_to_sym): Make new charlen for an array
2212 constructor initializer.
2214 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
2216 * f95-lang.c (gfc_init_builtin_functions): Add __emutls_get_address
2217 and __emutls_register_common.
2218 * openmp.c (gfc_match_omp_threadprivate): Don't error if !have_tls.
2219 * trans-common.c (build_common_decl): Don't check have_tls.
2220 * trans-decl.c (gfc_finish_var_decl): Likewise.
2221 * types.def (BT_WORD, BT_FN_PTR_PTR): New.
2222 (BT_FN_VOID_PTR_WORD_WORD_PTR): New.
2224 2007-02-09 Tobias Burnus <burnus@net-b.de>
2227 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc,
2228 gfc_conv_intrinsic_minmaxval): Use HUGE-1 for most negative integer.
2230 2007-02-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2233 * trans-array.c (gfc_trans_create_temp_array): Remove use of the
2234 function argument. Always generate code for negative extent.
2236 * trans-array.h (gfc_trans_create_temp_array): Change prototype.
2237 * trans-expr.c (gfc_conv_function_call): Remove use of last argument
2238 of gfc_trans_create_temp_array.
2239 * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Likewise.
2240 * trans-stmt.c (gfc_conv_elemental_dependencies): Likewise.
2242 2007-02-08 Roger Sayle <roger@eyesopen.com>
2244 * trans-stmt.c (gfc_trans_forall_1): Optimize the cases where the
2245 mask expression is a compile-time constant (".true." or ".false.").
2247 2007-02-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2250 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Evaluate
2251 arguments only once. Generate check that NCOPIES argument is not
2254 2007-02-04 Steven G. Kargl <kargl@gcc.gnu.org>
2257 * fortran/invoke.texi: Update documentation.
2258 * fortran/options.c (gfc_post_options): Deal with tabs with -std=f2003
2261 2007-02-03 Kazu Hirata <kazu@codesourcery.com>
2263 * trans-array.c: Fix a comment typo.
2265 2007-02-03 Paul Thomas <pault@gcc.gnu.org>
2268 * array.c (match_array_element_spec): If the length of an array is
2269 negative, adjust the upper limit to make it zero length.
2272 * resolve.c (pure_function, resolve_function): Initialize name to
2273 null to clear up build warnings.
2274 (resolve_fl_variable): Look at components explicitly to check for
2275 default initializer, rather than using gfc_default_initializer.
2277 2007-02-02 Steven G. Kargl <kargl@gcc.gnu.org>
2280 * resolve.c (resolve_generic_f): Check for non-NULL sym.
2282 2007-02-02 Roger Sayle <roger@eyesopen.com>
2284 * trans.c (gfc_build_array_ref): Use STRIP_TYPE_NOPS to eliminate
2285 NON_LVALUE_EXPR nodes and useless type conversions.
2287 2007-02-02 Paul Thomas <pault@gcc.gnu.org>
2291 * trans-expr.c (gfc_conv_aliased_arg): Remove static attribute
2292 from function and make sure that substring lengths are
2294 (is_aliased_array): Remove static attribute.
2295 * trans.c : Add prototypes for gfc_conv_aliased_arg and
2297 * trans-io.c (set_internal_unit): Add the post block to the
2298 arguments of the function. Use is_aliased_array to check if
2299 temporary is needed; if so call gfc_conv_aliased_arg.
2300 (build_dt): Pass the post block to set_internal_unit and
2301 add to the block after all io activiy is done.
2303 2007-02-01 Roger Sayle <roger@eyesopen.com>
2305 * trans-array.c (gfc_conv_expr_descriptor): We don't need to use
2306 a temporary array to pass a constant non-character array constructor.
2307 Generalize the descriptor generation code to handle scalarizer
2308 "info" without an array reference.
2310 2007-02-01 Roger Sayle <roger@eyesopen.com>
2312 * dependency.c (gfc_check_dependency) <EXPR_ARRAY>: Implement
2313 dependency checking for array constructors.
2315 2007-02-01 Roger Sayle <roger@eyesopen.com>
2317 * trans-stmt.c (compute_overall_iter_number): Document function
2318 arguments. Generalize "unconditional forall nest with constant
2319 bounds" optimization to eliminate unconditional inner loops with
2322 2007-01-31 Tobias Burnus <burnus@net-b.de>
2325 * interface.c (compare_actual_formal): Check conformance between
2326 actual and VOLATILE dummy arguments.
2327 * symbol.c (gfc_add_volatile): Allow setting of VOLATILE
2328 multiple times in different scopes.
2329 * decl.c (gfc_match_volatile): Search symbol in host association.
2331 2007-01-31 Kazu Hirata <kazu@codesourcery.com>
2333 * simplify.c, trans-array.c: Fix comment typos.
2335 2007-01-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2337 * invoke.texi (Code Gen Options): Fix abbreviation typo.
2338 * intrinsic.texi (ACCESS, LSHIFT, RSHIFT): Fix typos.
2340 2007-01-30 Steve Ellcey <sje@cup.hp.com>
2343 * trans-types.c (gfc_get_function_type): Do not add void_type_node
2345 * trans-decl.c (create_function_arglist): Change assert.
2347 2007-01-29 Paul Thomas <pault@gcc.gnu.org>
2350 * module.c (read_module): If a symbol is excluded by an ONLY
2351 clause, check to see if there is a symtree already loaded. If
2352 so, attach the symtree to the pointer_info.
2354 2007-01-28 Thomas Koenig <Thomas.Koenig@online.de>
2357 * gfortran.h: Remove gfc_simplify_init_1.
2358 * arith.h: Remove third argument from gfc_compare_string.
2359 * arith.c (gfc_compare_expression): Remove third argument
2360 from call to gfc_compare_string.
2361 (gfc_compare_string): Remove third argument xcoll_table.
2362 Remove use of xcoll_table.
2363 * misc.c (gfc_init_1): Remove call to gfc_simplify_init_1.
2364 * simplify.c (ascii_table): Remove.
2365 (xascii_table): Likewise.
2366 (gfc_simplify_achar): ICE if extract_int fails. Remove use of
2367 ascii_table. Warn if -Wsurprising and value < 0 or > 127.
2368 (gfc_simplify_char): ICE if extract_int fails. Error if
2369 value < 0 or value > 255.
2370 (gfc_simplify_iachar): Remove use of xascii_table.
2371 Char values outside of 0..255 are an ICE.
2372 (gfc_simplify_lge): Remove use of xascii_table.
2373 (gfc_simplify_lgt): Likewise.
2374 (gfc_simplify_lle): Likewise.
2375 (gfc_simplify_llt): Likewise.
2376 (invert_table): Remove.
2377 (gfc_simplify_init_1): Remove.
2379 2007-01-27 Roger Sayle <roger@eyesopen.com>
2381 * trans-stmt.c (forall_info): Replace the next_nest and outer
2382 fields that previously implemented a doubly-linked list with a
2383 single prev_nest field (singly-linked list).
2384 (gfc_trans_nested_forall_loop): The nested_forall_info argument
2385 now denotes the innermost FORALL in the loop nest.
2386 (compute_overall_iter_number): Use prev_nest instead of next_nest.
2387 (gfc_trans_forall_1): Link/cons the new "info" to the head of the
2388 nested_forall_info linked list. Free the current "info" when done.
2390 2007-01-27 Paul Thomas <pault@gcc.gnu.org>
2393 * trans-expr.c (gfc_conv_operator_assign): New function.
2394 * trans.h : Add prototype for gfc_conv_operator_assign.
2395 * trans-stmt.c (gfc_trans_where_assign): Add a gfc_symbol for
2396 a potential operator assignment subroutine. If it is non-NULL
2397 call gfc_conv_operator_assign instead of the first assignment.
2398 ( gfc_trans_where_2): In the case of an operator assignment,
2399 extract the argument expressions from the code for the
2400 subroutine call and pass the symbol to gfc_trans_where_assign.
2401 resolve.c (resolve_where, gfc_resolve_where_code_in_forall,
2402 gfc_resolve_forall_body): Resolve the subroutine call for
2403 operator assignments.
2405 2007-01-26 Steven Bosscher <stevenb.gcc@gmail.com>
2406 Steven G. Kargl <kargl@gcc.gnu.org>
2409 * fortran/io.c (next_char): Deal with backslash escaped characters.
2410 Issue warnings in non -std=gnu cases.
2411 * fortran/primary.c (next_string_char): Issue warnings in non
2413 2007-01-26 Tobias Burnus <burnus@net-b.de>
2415 * lang-specs.h: Add support for .f03 and .F03 extensions.
2416 * gfortran.texi: Document .f03 extension.
2417 * options.c (form_from_filename): Recognize .f03.
2419 2007-01-25 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2422 * lang.opt (Wall): Remove RejectNegative.
2423 * options.c (gfc_handle_option): Wall can be disabled.
2424 (set_Wall): Add a parameter for disabling Wall.
2426 2007-01-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2429 * scanner.c (load_line): Remove check fot ctrl-z and don't gobble.
2431 2007-01-23 Paul Thomas <pault@gcc.gnu.org>
2434 * match.c (gfc_match_namelist): Add check for assumed size character
2435 in namelist and provide error if found.
2437 2007-01-21 Brooks Moses <brooks.moses@codesourcery.com>
2439 * intrinsic.texi (ACHAR): Added cross-references.
2440 (CHAR): Put cross-references in alphabetical order.
2441 (IACHAR): Added cross-references.
2442 (ICHAR): Added cross-references.
2444 2007-01-20 Brooks Moses <brooks.moses@codesourcery.com>
2446 * intrinsic.texi: Edited all "Syntax" examples to a consistent form.
2447 (MAXVAL): Corrected description of result characteristics.
2449 (UMASK): Added documentation.
2451 2007-01-20 Steven G. Kargl <kargl@gcc.gnu.org>
2453 * openmp.c, matchexp.c, module.c, scanner.c, resolve.c, st.c,
2454 parse.c, primary.c, options.c, misc.c, simplify.c: Next installment
2455 in the massive whitespace patch.
2457 2007-01-20 Roger Sayle <roger@eyesopen.com>
2459 * module.c (mio_array_ref): The dimen_type fields of an array ref
2460 are an enumerated type and can't be read/written directly with a
2461 call to mio_integer. Instead loop over and cast each element.
2463 2007-01-20 Roger Sayle <roger@eyesopen.com>
2465 * dependency.c (gfc_full_array_ref_p): Check that ref->next is NULL,
2466 i.e. that the ARRAY_REF doesn't mention components.
2467 * trans-array.c (gfc_constant_array_constructor_p): Export external
2468 function renamed from constant_array_constructor_p.
2469 (gfc_build_constant_array_constructor): Export.
2470 (gfc_trans_array_constructor): Update call to the renamed function
2471 constant_array_constructor_p.
2472 * trans-array.h (gfc_constant_array_constructor_p): Prototype here.
2473 (gfc_build_constant_array_constructor): Likewise.
2474 * trans-expr.c (gfc_build_memcpy_call): New helper function split
2475 out from gfc_trans_array_copy.
2476 (gfc_trans_array_copy): Use gfc_build_memcpy_call.
2477 (gfc_trans_array_constructor_copy): New function to optimize
2478 assigning an entire array from a constant array constructor.
2479 (gfc_trans_assignment): Call gfc_trans_array_constructor_copy
2482 2007-01-20 Roger Sayle <roger@eyesopen.com>
2484 * trans-intrinsic.c (gfc_conv_intrinsic_sign): New branchless
2485 implementation for the SIGN intrinsic with integral operands.
2486 (gfc_conv_intrinsic_minmax): Fix whitespace.
2488 2007-01-20 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2490 * gfortran.h (gfc_options_t): Add flag_allow_leading_underscore.
2491 * lang.opt: Add -fallow-leading-underscore.
2492 * match.c (gfc_match_name): Allow leading underscore in symbol
2493 name if -fallow-leading-underscore is used.
2494 * symbol.c (gfc_get_default_type): Add special case for symbol
2495 names beginning with an underscore.
2496 * trans-decl.c (gfc_get_extern_function_decl,
2497 gfc_build_intrinsic_function_decls): Add _gfortran prefix to
2498 library symbols selected_int_kind, selected_real_kind and
2500 * options.c (gfc_init_options, gfc_handle_option): Handle the
2501 new -fallow-leading-underscore option.
2503 2007-01-20 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2506 * options.c (gfc_handle_module_path_options): Path used in -J
2507 option is now added to the module search path.
2509 2007-01-20 Richard Guenther <rguenther@suse.de>
2512 * f95-lang.c (gfc_init_builtin_functions): Provide cbrt and
2513 cexpi builtins if we have TARGET_C99_FUNCTIONS. Provide
2514 sincos builtins if the target has sincos.
2516 2007-01-19 Brooks Moses <brooks.moses@codesourcery.com>
2518 * intrinsic.texi (MATMUL): Corrected a typo.
2519 (MAX): Separated @var arguments.
2520 (MIN): Separated @var arguments.
2522 2007-01-19 Brooks Moses <brooks.moses@codesourcery.com>
2524 * intrinsic.texi: general whitespace cleanup.
2525 (menu): Added TIME8, removed UNMASK.
2526 (AINT): Clarified argument requirement.
2527 (ANINT): Clarified argument requirement.
2528 (CEILING): Clarified argument requirement.
2529 (CHAR): Clarified argument requirement.
2530 (CMPLX): Clarified argument requirement.
2531 (DCMPLX): Clarified argument requirement.
2532 (FGET): Line rewrapping.
2533 (FLOOR): Clarified argument requirement.
2534 (GMTIME): Added documentation.
2535 (IAND): Added cross-reference.
2536 (IBCLR): Added cross-reference.
2537 (IBSET): Added cross-reference.
2538 (IEOR): Added cross-reference.
2539 (INT): Collapsed examples, clarified argument requirement.
2540 (IOR): Added cross-references.
2541 (LEN_TRIM): Corrected result kind.
2542 (LINK): Added cross-reference.
2543 (LLT): Removed "documentation pending".
2544 (LOGICAL): Added documentation.
2545 (LSHIFT): Added documentation.
2546 (LTIME): Added documentation.
2547 (MATMUL): Added documentation.
2548 (MAX): Added documentation.
2549 (MAXLOC): Added documentation.
2550 (MAXVAL): Added documentation.
2551 (MERGE): Added documentation.
2552 (MIN): Added documentation.
2553 (MINLOC): Added documentation.
2554 (MINVAL): Added documentation.
2555 (MVBITS): Moved to correct place, added documentation.
2556 (NOT): Added documentation.
2557 (PERROR): Added documentation.
2558 (RAN): Moved to correct place, added documentation.
2559 (REAL): Clarified argument requirement.
2560 (RENAME): Added documentation.
2561 (RSHIFT): Clarified argument requirement.
2562 (SIGN): Corrected table specification.
2563 (SYMLNK): Added documentation.
2564 (SYSTEM): Added documentation.
2565 (TIME): Added documentation.
2566 (TIME8): Added section and documentation.
2567 (UNMASK): Removed erroneous section.
2569 2007-01-18 H.J. Lu <hongjiu.lu@intel.com>
2571 * trans-stmt.c (compute_overall_iter_number): Fix a typo.
2573 2007-01-18 Roger Sayle <roger@eyesopen.com>
2575 * trans-expr.c (copyable_array_p): Consider user derived types without
2576 allocatable components to be copyable.
2578 2007-01-18 Roger Sayle <roger@eyesopen.com>
2580 * trans-stmt.c (compute_overall_iter_number): Enhance to precompute
2581 the number of interations in unconditional FORALL nests with constant
2584 2007-01-18 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2585 Tobias Burnus <burnus@net-b.de>
2588 * gfortran.h (gfc_option_t): Add flag_dump_core.
2589 * lang.opt: Add -fdump-core option.
2590 * invoke.texi: Document the new options.
2591 * trans-decl.c (gfc_build_builtin_function_decls): Add new
2592 options to the call to set_std.
2593 * options.c (gfc_init_options, gfc_handle_option): Set the
2596 2007-01-17 Paul Thomas <pault@gcc.gnu.org>
2599 * module.c (load_generic_interfaces): Make the marking of the
2600 symbol as ambiguous conditional on the module names being
2602 (write_generic): Ensure that the generic interface has a
2603 non-NULL module field.
2605 2007-01-16 Roger Sayle <roger@eyesopen.com>
2608 * trans-stmt.c (forall_info): Remove pmask field.
2609 (gfc_trans_forall_loop): Remove NVAR argument, instead assume that
2610 NVAR covers all the interation variables in the current forall_info.
2611 Add an extra OUTER parameter, which specified the loop header in
2612 which to place mask index initializations.
2613 (gfc_trans_nested_forall_loop): Remove NEST_FLAG argument.
2614 Change the semantics of MASK_FLAG to only control the mask in the
2616 (compute_overall_iter_number): Optimize the trivial case of a
2617 top-level loop having a constant number of iterations. Update
2618 call to gfc_trans_nested_forall_loop. Calculate the number of
2619 times the inner loop will be executed, not to size of the
2621 (allocate_temp_for_forall_nest_1): Reuse SIZE as BYTESIZE when
2622 sizeof(type) == 1. Tidy up.
2623 (gfc_trans_assign_need_temp): Remove NEST_FLAG argument from calls
2624 to gfc_trans_nested_forall_loop.
2625 (gfc_trans_pointer_assign_need_temp): Likewise.
2626 (gfc_trans_forall_1): Remove unused BYTESIZE, TMPVAR, SIZEVAR and
2627 LENVAR local variables. Split mask allocation into a separate
2628 hunk/pass from mask population. Use allocate_temp_for_forall_nest
2629 to allocate the FORALL mask with the correct size. Update calls
2630 to gfc_trans_nested_forall_loop.
2631 (gfc_evaluate_where_mask): Update call to
2632 gfc_trans_nested_forall_loop.
2633 (gfc_trans_where_2): Likewise.
2635 2007-01-15 Paul Thomas <pault@gcc.gnu.org>
2638 * trans-stmt.c (gfc_trans_call): If it does not have one, get
2639 a backend_decl for an alternate return.
2642 * resolve.c (pure_function): Statement functions are pure. Note
2643 that this will have to recurse to comply fully with F95.
2646 * resolve.c (resolve_function): Only a reference to the final
2647 dimension of an assumed size array is an error in an inquiry
2651 * resolve.c (resolve_function): Make sure that the function
2652 expression has a type.
2654 2007-01-14 Paul Thomas <pault@gcc.gnu.org>
2657 * trans-decl.c (gfc_sym_mangled_function_id): Module, external
2658 symbols must not have the module name prepended.
2660 2007-01-11 Thomas Koenig <Thomas.Koenig@online.de>
2663 * iresolve.c (gfc_resolve_maxloc): If the rank
2664 of the return array is nonzero and we process an
2665 integer array smaller than default kind, coerce
2666 the array to default integer.
2667 * iresolve.c (gfc_resolve_minloc): Likewise.
2669 2007-01-11 Brooks Moses <brooks.moses@codesourcery.com>
2671 * simplify.c: Update copyright to 2007.
2674 2007-01-11 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2677 * scanner.c (gfc_release_include_path): Free gfc_option.module_dir
2680 2007-01-09 Brooks Moses <brooks.moses@codesourcery.com>
2682 * simplify.c (gfc_simplify_ibclr): Fix POS comparison.
2683 (gfc_simplify_ibset): Same.
2685 2007-01-09 Brooks Moses <brooks.moses@codesourcery.com>
2689 * simplify.c (convert_mpz_to_unsigned): New function.
2690 (convert_mpz_to_signed): New function, largely based on
2692 (twos_complement): Removed.
2693 (gfc_simplify_ibclr): Add conversions to and from an
2694 unsigned representation before bit-twiddling.
2695 (gfc_simplify_ibset): Same.
2696 (gfc_simplify_ishftc): Add checks for overly large
2697 constant arguments, only check the third argument if
2698 it's present, carry over high bits into the result as
2699 appropriate, and perform the final conversion back to
2700 a signed representation using the correct sign bit.
2701 (gfc_simplify_not): Removed unnecessary masking.
2703 2007-01-09 Paul Thomas <pault@gcc.gnu.org>
2706 * resolve.c (resolve_code): Use the code->expr character length
2707 directly to set length of llen.
2709 2007-01-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2712 * lang.opt: Add Wcharacter_truncation option.
2713 * options.c (gfc_init_options): Initialize
2714 gfc_option.warn_character_truncation to zero.
2715 (gfc_handle_option): Add case for OPT_Wcharacter_truncation.
2717 2007-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
2719 * interface.c, intrinsic.c, gfortranspec.c, io.c, f95-lang.c,
2720 iresolve.c, match.c: Update Copyright years. Whitespace.
2722 2007-01-08 Richard Guenther <rguenther@suse.de>
2724 * trans-io.c (transfer_array_desc): Use build_int_cst instead
2727 2007-01-08 Roger Sayle <roger@eyesopen.com>
2729 * trans-array.c (constant_array_constructor_p): New function to
2730 determine whether an array constructor consists only of constant
2731 elements, and if so return it's size.
2732 (gfc_build_constant_array_constructor): Construct a statically
2733 initialized gfortran array for a given EXPR_ARRAY.
2734 (gfc_trans_constant_array_constructor): Efficiently scalarize
2735 a constant array constructor.
2736 (gfc_trans_array_constructor): Tidy up use of CONST_STRING.
2737 Special case scalarization of constant array constructors, all of
2738 whose elements are specified, using constant_array_constructor_p
2739 and gfc_trans_constant_array_constructor.
2740 (gfc_conv_scalarized_array_ref): Check whetger info->offset is zero
2741 before adding it to index, to avoid creating a NON_LVALUE_EXPR.
2743 2007-01-08 Kazu Hirata <kazu@codesourcery.com>
2745 gfortran.texi: Fix typos.
2747 2007-01-07 Steven G. Kargl <kargl@gcc.gnu.org>
2749 * decl.c, dump-parse-tree.c, error.c, data.c, expr.c, dependency.c,
2750 convert.c: Update Copyright dates. Fix whitespace.
2752 2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
2754 * data.c (gfc_assign_data_value): Fix whitespace.
2756 2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
2758 * trans-array.c (gfc_trans_create_temp_array, gfc_array_init_size):
2759 Commentary typo fix.
2761 2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
2764 * match.c (gfc_match_name): Print diagnostics for invalid
2767 2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
2769 * array.c: Fix whitespace in comment table.
2771 2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
2773 * array.c, bbt.c, check.c: Update copyright years. Whitespace.
2775 2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
2777 * arith.c: Update copyright years. Whitespace.
2779 2007-01-05 Roger Sayle <roger@eyesopen.com>
2781 * trans-expr.c (gfc_trans_assignment_1): New subroutine to scalarize
2782 array assignments split out from gfc_trans_assignment.
2783 (gfc_trans_array_copy): New function to implement array to array
2784 copies via calls to __builtin_memcpy.
2785 (copyable_array_p): New helper function to identify an array of
2786 simple/POD types, that may be copied/assigned using memcpy.
2787 (gfc_trans_assignment): Use gfc_trans_array_copy to handle simple
2788 whole array assignments considered suitable by copyable_array_p.
2789 Invoke gfc_trans_assignment_1 to perform the fallback scalarization.
2791 2007-01-05 Roger Sayle <roger@eyesopen.com>
2793 * trans-array.c (gfc_trans_array_constructor_value): Make the
2794 static const "data" array as TREE_READONLY.
2795 * trans-stmt.c (gfc_trans_character_select): Likewise.
2797 2007-01-05 Roger Sayle <roger@eyesopen.com>
2799 * trans-array.c (gfc_conv_loop_setup): Test whether the loop
2800 stride is one, to avoid fold_build2 introducing a useless
2801 NON_LVALUE_EXPR node.
2803 2007-01-05 Tobias Burnus <burnus@net-b.de>
2805 * symbol.c (check_conflict): Fix error message.
2807 2007-01-05 Paul Thomas <pault@gcc.gnu.org>
2810 * decl.c (gfc_in_match_data, gfc_set_in_match_data): New
2811 functions to signal that a DATA statement is being matched.
2812 (gfc_match_data): Call gfc_set_in_match_data on entry and on
2814 * gfortran.h : Add prototypes for above.
2815 * expr.c (check_init_expr): Avoid check on parameter or
2816 variable if gfc_in_match_data is true.
2817 (gfc_match_init_expr): Do not call error on non-reduction of
2818 expression if gfc_in_match_data is true.
2822 * decl.c (gfc_set_constant_character_len): Add boolean arg to
2823 flag array constructor resolution. Warn if string is being
2824 truncated. Standard dependent error if string is padded. Set
2825 new arg to false for all three calls to
2826 gfc_set_constant_character_len.
2827 * match.h : Add boolean arg to prototype for
2828 gfc_set_constant_character_len.
2829 * gfortran.h : Add warn_character_truncation to gfc_options.
2830 * options.c (set_Wall): Set warn_character_truncation if -Wall
2832 * resolve.c (resolve_code): Warn if rhs string in character
2833 assignment has to be truncated.
2834 * array.c (gfc_resolve_character_array_constructor): Set new
2835 argument to true for call to gfc_set_constant_character_len.
2837 2007-01-05 Tobias Burnus <burnus@net-b.de>
2840 * interface.c (compare_parameter_intent): New function.
2841 (check_intents): Support pointer intents.
2842 * symbol.c (check_conflict): Support pointer intents,
2843 better conflict_std message.
2844 * expr.c (gfc_check_assign,gfc_check_pointer_assign):
2845 Support pointer intents.
2846 * resolve.c (resolve_deallocate_expr,resolve_allocate_expr):
2847 Support pointer intents.
2849 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
2852 * check.c (gfc_check_kill_sub): Add checks for non-scalar
2855 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
2857 * intrinsic.texi: Minor cleanup, reflowing overlong
2858 paragraphs, and correcting whitespace.
2860 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
2862 * intrinsic.texi (LBOUND): Add documentation.
2863 (LGE): Add documentation.
2864 (LGT): Add documentation.
2865 (LINK): Add documentation.
2866 (LLE): Add documentation.
2867 (LLT): Add documentation.
2868 (LNBLNK): Add documentation.
2869 (UBOUND): Add documentation.
2870 (UNLINK): Add documentation.
2872 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
2874 * intrinsic.texi (IAND): Clarify argument specifications.
2875 (IBCLR): Add documentation.
2876 (IBITS): Add documentation.
2877 (IBSET): Add documentation.
2878 (IEOR): Add documentation.
2879 (IERRNO): Add documentation.
2880 (INDEX): Add documentation.
2881 (IOR): Add documentation.
2882 (ISHFT): Add documentation.
2883 (ISHFTC): Add documentation.
2884 (KILL): Add documentation.
2885 (LEN_TRIM): Add documentation.
2887 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
2890 * interface.c (compare_actual_formal): check for
2891 alternate returns when iterating over non-present
2894 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
2896 * invoke.texi: Update manpage copyright to include 2007.
2898 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
2900 * gfortran.texi: Update copyright to include 2007.
2901 * intrinsic.texi: Update copyright to include 2007.
2902 * invoke.texi: Update copyright to include 2007.
2904 2007-01-02 Tobias Burnus <burnus@net-b.de>
2905 Jakub Jelinek <jakub@redhat.com>
2908 * scanner.c (open_included_file): Revert patch.
2909 (gfc_open_included_file): Support absolute pathnames.
2910 (gfc_open_intrinsic_module): Support absolute pathnames.
2912 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
2914 * gfortran.texi (GNU Fortran and GCC): Rewrite
2916 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
2918 * gfortran.texi (Introduction): Lower "Part I:
2919 Introduction" to a chapter, renumber Parts II and III to
2921 * intrinsic.texi (Introduction): Rename to "Introduction
2922 to Intrinsics" to avoid conflict with the new chapter.
2924 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
2926 * intrinsic.texi (Introduction): Rewrite first paragraph.
2928 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
2930 * invoke.texi (OpenMP): Added index entry.
2931 * gfortran.texi (title page): Removed erroneous '*'.
2933 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
2935 * gfortran.texi (GFORTRAN_DEFAULT_RECL): Added units
2937 (Extensions): Miscellaneous minor rewriting and copyediting.
2938 (BOZ-literal constants): Renamed from Hexadecimal constants.
2939 (Hollerith constants support): Added explanation and
2940 suggestions for standard-conforming modern equivalents.
2942 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
2944 * intrinsic.texi: Improvements to index entries; change
2945 @findex entries to @cindex entries.
2946 * invoke.texi: Standardize and improve index entries.
2947 * gfortran.texi: Fix @code in one index entry.
2949 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
2951 * invoke.texi: Change @code-type macros to appropriate
2952 variants (@command, @option, etc.)
2953 * gfortran.texi: Same.
2955 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
2957 * intrinsic.texi: Various minor cleanups.
2959 2007-01-02 Steven G. Kargl <kargls@comcast.net>
2961 * trans-intrinsic.c (gfc_conv_intrinsic_ibits): Fix call to
2964 2007-01-02 Tobias Burnus <burnus@net-b.de>
2967 * scanner.c (open_included_file): Support full-path filenames.
2969 2007-01-02 Paul Thomas <pault@gcc.gnu.org>
2972 * interface.c (check_sym_interfaces): Remove call to
2973 resolve_global_procedure.
2974 gfortran.h : Remove prototype for resolve_global_procedure.
2975 resolve.c (resolve_global_procedure): Add static attribute
2976 to function declaration.
2978 2007-01-01 Steven G. Kargl <kargls@comcast.net>
2980 * ChangeLog: Copy to ...
2981 * ChangeLog-2006: here.