1 2008-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3 * simplify.c: Remove MPFR_VERSION_NUM(2,3,0) conditionals.
5 2008-10-12 Daniel Kraft <d@domob.eu>
8 * expr.c (gfc_expr_check_typed): Extend permission of untyped
9 expressions to both top-level variable and basic arithmetic expressions.
11 2008-10-12 Paul Thomas <pault@gcc.gnu.org>
14 * dependency.c (gfc_are_equivalenced_arrays): Look in symbol
15 namespace rather than current namespace, if it is available.
17 2008-10-12 Steven G. Kargl <kargls@comcast.net>
20 * fortran/resolve.c (resolve_fl_variable): Simplify the
21 initializer if there is one.
23 2008-10-11 Paul Thomas <pault@gcc.gnu.org>
26 * module.c (check_for_ambiguous): Remove redundant code.
28 2008-10-09 Daniel Kraft <d@domob.eu>
31 * gfortran.h (gfc_suppress_error): Removed from header.
32 (gfc_push_suppress_errors), (gfc_pop_suppress_errors): New methods.
33 * array.c (gfc_array_size): Use new gfc_push/pop_suppress_errors
34 instead of directly changing gfc_suppress_error.
35 * intrinsic.c (gfc_intrinsic_func_interface): Ditto.
36 (gfc_intrinsic_sub_interface): Ditto.
37 * error.c (suppress_errors): Made static from `gfc_suppress_error'.
38 (gfc_push_suppress_errors), (gfc_pop_suppress_errors): New methods.
39 (gfc_notify_std), (gfc_error): Use new static name of global.
40 * expr.c (check_arglist), (check_references): New methods.
41 (check_restricted): Check arglists and references of EXPR_FUNCTIONs
42 and EXPR_VARAIBALEs, respectively. Allow PARAMETER symbols.
44 2008-10-07 Jakub Jelinek <jakub@redhat.com>
46 * f95-lang.c (poplevel): Don't clear BLOCK_VARS if functionbody.
47 * trans-decl.c (gfc_build_qualified_array): Build accurate debug type
49 (build_entry_thunks, gfc_generate_function_code,
50 gfc_generate_constructors): Ensure DECL_SAVED_TREE is a BIND_EXPR
51 with DECL_INITIAL as its BLOCK.
53 2008-10-05 Paul Thomas <pault@gcc.gnu.org>
56 * gfortran.h : Add 'error' bit field to gfc_expr structure.
57 * expr.c (check_inquiry): When checking a restricted expression
58 check that arguments are either variables or restricted.
59 (check_restricted): Do not emit error if the expression has
60 'error' set. Clean up detection of host-associated variable.
62 2008-10-05 Daniel Kraft <d@domob.eu>
65 * gfortran.h (struct gfc_typebound_proc): New flag `error'.
66 * resolve.c (update_arglist_pass): Added assertion.
67 (update_compcall_arglist): Fail early for erraneous procedures to avoid
69 (resolve_typebound_generic_call): Ignore erraneous specific targets
71 (resolve_typebound_procedure): Set new `error' flag.
73 2008-10-04 Paul Thomas <pault@gcc.gnu.org>
76 * module.c (load_equiv): Check the module before negating the
79 2008-10-02 Steven Bosscher <steven@gcc.gnu.org>
82 * intrinsic.c (add_functions): Add LEADZ and TRAILZ as generics.
83 * intrinsic.h (gfc_simplify_leadz, gfc_simplify_trailz): New protos.
84 * gfortran.h <enum gfc_isym_id>: (GFC_ISYM_LEADZ, GFC_ISYM_TRAILZ): New.
85 * f95-lang (gfc_init_builtin_functions): Add BUILT_IN_CLZ,
86 BUILT_IN_CLZL, BUILT_IN_CLZLL, BUILT_IN_CTZ, BUILT_IN_CTZL, and
88 * trans-intrinsic.c (gfc_conv_intrinsic_leadz,
89 gfc_conv_intrinsic_trails): New code-generation functions for LEADZ
90 and TRAILZ intrinsics.
91 (gfc_conv_intrinsic_function): Use them
92 * intrinsic.texi: Add documentation for LEADZ and TRAILZ.
93 * simplify.c (gfc_simplify_leadz, gfc_simplify_trailz): New functions.
95 2008-09-30 Janus Weil <janus@gcc.gnu.org>
98 * symbol.c (check_conflict): If a symbol in a COMMON block is a
99 procedure, it must be a procedure pointer.
100 (gfc_add_in_common): Symbols in COMMON blocks may be variables or
102 * trans-types.c (gfc_sym_type): Make procedure pointers in COMMON
105 2008-09-25 Jerry DeLisle <jvdelisle@gcc.gnu.org
108 * trans-io.c (build_dt): Revert previous patch..
109 * ioparm.def: Delete IOPARM_dt_f2003.
111 2008-09-25 Tobias Burnus <burnus@net-b.de>
114 * expr.c (gfc_check_pointer_assign): Allow assignment of
116 * match.c (gfc_match_assignment,gfc_match_pointer_assignment):
117 Remove unreachable code.
119 2008-09-24 Tobias Burnus <burnus@net-b.de>
121 * options.c (set_default_std_flags,gfc_init_options):
122 Add comment: keep in sync with libgfortran.
124 2008-09-24 Tobias Burnus <burnus@net-b.de>
127 * trans-array.c (gfc_trans_deferred_array): Don't auto-deallocate
130 2008-09-23 Daniel Kraft <d@domob.eu>
133 * gfortran.h (gfc_compare_actual_formal): Removed, made private.
134 (gfc_arglist_matches_symbol): New method.
135 * interface.c (compare_actual_formal): Made static.
136 (gfc_procedure_use): Use new name of compare_actual_formal.
137 (gfc_arglist_matches_symbol): New method.
138 (gfc_search_interface): Moved code partially to new
139 gfc_arglist_matches_symbol.
140 * resolve.c (resolve_typebound_generic_call): Resolve actual arglist
141 before checking against formal and use new gfc_arglist_matches_symbol
143 (resolve_compcall): Set type-spec of generated expression.
145 2008-09-23 Tobias Burnus <burnus@net-b.de>
148 * expr.c (gfc_check_pointer_assign): Add checks for pointer
151 2008-09-22 Jerry DeLisle <jvdelisle@gcc.gnu.org
154 * trans-io.c (gfc_build_io_library_fndecls): Bump pad size.
155 (build_dt): Set mask bit for IOPARM_dt_f2003.
156 * ioparm.def: Add IOPARM_dt_f2003.
158 2008-09-22 Janus Weil <janus@gcc.gnu.org>
161 * gfortran.h (gfc_option_t): New members flag_align_commons and
163 * lang.opt: New options falign-commons and Walign-commons.
164 * invoke.texi: Documentation for new options.
165 * options.c (gfc_init_options): Initialize new options.
166 (gfc_handle_options): Handle new options.
167 * trans-common.c (translate_common): Implement new options.
168 (gfc_trans_common): Set correct locus.
170 2008-09-21 Paul Thomas <pault@gcc.gnu.org>
173 * decl.c (scalarize_intrinsic_call): Both subroutines and
174 functions can give a true for get_proc_mame's last argument so
175 remove the &&gfc_current_ns->proc_name->attr.function.
176 resolve.c (resolve_actual_arglist): Add check for recursion by
177 reference to procedure as actual argument.
179 2008-09-21 Daniel Kraft <d@domob.eu>
182 * trans.h (gfc_conv_string_length): New argument `expr'.
183 * trans-expr.c (flatten_array_ctors_without_strlen): New method.
184 (gfc_conv_string_length): New argument `expr' that is used in a new
185 special case handling if cl->length is NULL.
186 (gfc_conv_subref_array_arg): Pass expr to gfc_conv_string_length.
187 * trans-array.c (gfc_conv_expr_descriptor): Ditto.
188 (gfc_trans_auto_array_allocation): Pass NULL as new expr.
189 (gfc_trans_g77_array), (gfc_trans_dummy_array_bias): Ditto.
190 (gfc_trans_deferred_array): Ditto.
191 (gfc_trans_array_constructor): Save and restore old values of globals
192 used for bounds checking.
193 * trans-decl.c (gfc_trans_dummy_character): Ditto.
194 (gfc_trans_auto_character_variable): Ditto.
196 2008-09-21 Daniel Kraft <d@domob.eu>
198 * decl.c (match_procedure_in_type): Changed misleading error message
199 for not yet implemented PROCEDURE(interface) syntax.
201 2008-09-18 Paul Thomas <pault@gcc.gnu.org>
204 * resolve.c (resolve_fl_variable_derived): Remove derived type
205 comparison for use associated derived types. Host association
206 of a derived type will not arise if there is a local derived type
207 whose use name is the same.
210 * match.c (gfc_match_call): Use the existing symbol even if
213 2008-09-18 Daniel Kraft <d@domob.eu>
216 * trans.h (gfc_trans_runtime_error): New method.
217 (gfc_trans_runtime_error_vararg): New method.
218 (gfc_allocate_array_with_status): New argument `expr' for locus/varname.
219 (gfc_deallocate_array_with_status): Ditto.
220 * trans-array.h (gfc_array_deallocate): Ditto.
221 * trans.c (gfc_trans_runtime_error): New method.
222 (gfc_trans_runtime_error_vararg): New method, moved parts of the code
223 from gfc_trans_runtime_check here.
224 (gfc_trans_runtime_error_check): Moved code partly to new method.
225 (gfc_call_malloc): Fix tab-indentation.
226 (gfc_allocate_array_with_status): New argument `expr' and call
227 gfc_trans_runtime_error for error reporting to include locus.
228 (gfc_deallocate_with_status): Ditto.
229 * trans-stmt.c (gfc_trans_deallocate): Pass expr as new argument.
230 * trans-array.c (gfc_array_allocate): Ditto.
231 (gfc_array_deallocate): New argument `expr', passed on.
232 (gfc_trans_dealloc_allocated): Pass NULL for expr.
233 * trans-openmp.c (gfc_omp_clause_default): Ditto.
235 2008-09-18 Paul Thomas <pault@gcc.gnu.org>
239 * module.c (check_for_ambiguous): New function to test loaded
240 symbol for ambiguity with fixup symbol.
241 (read_module): Call check_for_ambiguous.
242 (write_symtree): Do not write the symtree for symbols coming
243 from an interface body.
246 * resolve.c (count_specific_procs ): New function to count the
247 number of specific procedures with the same name as the generic
248 and emit appropriate errors for and actual argument reference.
249 (resolve_assumed_size_actual): Add new argument no_formal_args.
250 Correct logic around passing generic procedures as arguments.
251 Call count_specific_procs from two locations.
252 (resolve_function): Evaluate and pass no_formal_args.
253 (resolve call): The same and clean up a bit by using csym more
257 * symbol.c (gfc_add_access): Access can be updated if use
258 associated and not private.
260 2008-09-17 Jakub Jelinek <jakub@redhat.com>
263 * trans-stmt.c (gfc_trans_do): Optimize integer type non-simple
264 do loop initialization.
266 2008-09-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
267 Tobias Burnus <burnus@net.b.de>
270 * io.c (match_vtag): Add tag name to error message.
271 (match_out_tag): Cleanup whitespace.
272 (gfc_resolve_dt): Resolve id and async tags.
274 2008-09-13 Daniel Kraft <d@domob.eu>
277 * primary.c (gfc_match_varspec): Added missing type-spec clearing
278 after wrong implicit character typing.
280 2008-09-12 Richard Guenther <rguenther@suse.de>
282 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Use
283 build_fold_addr_expr to properly mark the argument
286 2008-09-11 Daniel Kraft <d@domob.eu>
289 * simplify.c (simplify_cmplx): Added linebreak to long line.
290 * target-memory.c (gfc_convert_boz): Fix indentation.
291 (gfc_interpret_float): Set mpfr precision to right value before
294 2008-09-10 H.J. Lu <hongjiu.lu@intel.com>
296 * expr.c (find_array_element): Reformat comment.
298 2008-09-10 H.J. Lu <hongjiu.lu@intel.com>
300 * expr.c (find_array_element): Reformat.
302 2008-09-10 Tobias Burnus <burnus@net-b.de>
305 * trans-decl.c (get_proc_pointer_decl): Fix -Wunused-variable.
307 2008-09-09 Daniel Kraft <d@domob.eu>
310 * resolve.c (expression_rank): Added assertion to guard against
311 EXPR_COMPCALL expressions.
312 (resolve_compcall): Set expression's rank from the target procedure's.
314 2008-09-09 Daniel Kraft <d@domob.eu>
317 * trans-array.c (gfc_conv_array_parameter): Added assertion that the
318 symbol has an array spec.
320 2008-09-08 Daniel Kraft <d@domob.eu>
323 * trans-expr.c (gfc_add_interface_mapping): Set new_sym->as.
324 (gfc_map_intrinsic_function): Added checks against NULL bounds in
327 2008-09-08 Tobias Burnus <burnus@net.b.de>
330 * symbol.c (gfc_set_default_type): Copy char len.
332 2008-09-06 Steven G. Kargl <kargls@comcast.net>
335 * fortran/resolve.c (resolve_function): Shortcircuit for SIZE and
336 UBOUND if 2nd argument is KIND.
338 2008-09-06 Steven G. Kargl <kargls@comcast.net>
341 * resolve.c (resolve_function): An intrinsic subroutine should not be
342 called as a function.
344 2008-09-05 Daniel Kraft <d@domob.eu>
347 * resolve.c (resolve_types): Restore gfc_current_ns on exit.
348 * symbol.c (gfc_save_all): Removed blank line.
350 2008-09-05 Daniel Kraft <d@domob.eu>
353 * primary.c (gfc_match_rvalue): Removed logic to handle implicit
354 typing to a derived-type if a component reference is found.
355 (gfc_match_varspec): Moved it here.
357 2008-09-04 Richard Guenther <rguenther@suse.de>
359 * trans-array.c (gfc_conv_array_parameter): Use correct types
360 in building COND_EXPRs.
361 * trans-expr.c (gfc_conv_missing_dummy): Likewise.
362 * trans-intrinsics.c (gfc_conv_intrinsic_merge): Likewise.
364 2008-09-04 Daniel Kraft <d@domob.eu>
367 * expr.c (simplify_const_ref): Update expression's character length
368 when pulling out a substring reference.
370 2008-09-04 Ian Lance Taylor <iant@google.com>
372 * symbol.c (generate_isocbinding_symbol): Compare
373 gfc_notification_std with ERROR rather than FAILURE.
374 * resolve.c (check_assumed_size_reference): Compare array type
375 with AR_FULL rather than DIMEN_ELEMENT.
376 (resolve_actual_arglist): Compare with EXPR_VARIABLE rather than
379 2008-09-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
382 * io.c (check_format): Allow specifying precision with g0 format.
384 2008-09-02 Daniel Kraft <d@domob.eu>
386 * gfortran.h (struct gfc_namespace): New member `implicit_loc'.
387 (gfc_add_abstract): New method.
388 * decl.c (gfc_get_type_attr_spec): Match ABSTRACT attribute.
389 (gfc_match_derived_decl): Copy abstract attribute in derived symbol.
390 * dump-parse-tree.c (show_attr): Show ABSTRACT attribute as `ABSTRACT'
391 only to allow for ABSTRACT types.
392 * parse.c (parse_interface): Use new gfc_add_abstract.
393 * primary.c (gfc_match_structure_constructor): Check that no ABSTRACT
395 * resolve.c (resolve_typespec_used): New method.
396 (resolve_fl_derived): Check type in respect to ABSTRACT attribute and
397 check that no component is of an ABSTRACT type.
398 (resolve_symbol): Check that no symbol is of an ABSTRACT type.
399 (resolve_types): Check IMPLICIT declarations for ABSTRACT types.
400 * symbol.c (gfc_merge_new_implicit): Remember loci of IMPLICIT's.
401 (gfc_add_abstract): New method.
403 2008-09-01 Daniel Kraft <d@domob.eu>
406 * module.c (read_module): Initialize use_only flag on used symbols.
408 2008-09-01 Daniel Kraft <d@domob.eu>
410 * gfc-internals.texi (F2003 OOP), (Type-bound Procedures): New chapter
411 and section to document the internals of type-bound procedures.
412 (gfc_expr): Document EXPR_COMPCALL.
413 * gfortran.h (struct gfc_expr): Remove unused `derived' from compcall.
414 * dump-parse-tree.c (show_compcall): New method.
415 (show_expr): Call it for EXPR_COMPCALL.
416 (show_typebound), (show_f2k_derived): New methods.
417 (show_symbol): Call show_f2k_derived.
418 (show_code_node): Handle EXEC_COMPCALL.
419 * primary.c (gfc_match_varspec): Don't initialize removed `derived' in
420 primary->value.compcall.
422 2008-08-31 Richard Guenther <rguenther@suse.de>
424 * trans-expr.c (gfc_trans_string_copy): Use the correct types
425 to compute slen and dlen.
427 2008-08-31 Daniel Kraft <d@domob.eu>
429 * gfortran.h (enum gfc_statement): New entry `ST_GENERIC'.
430 (struct gfc_tbp_generic): New type.
431 (struct gfc_typebound_proc): Removed `target' and added union with
432 `specific' and `generic' members; new members `overridden',
433 `subroutine', `function' and `is_generic'.
434 (struct gfc_expr): New members `derived' and `name' in compcall union
435 member and changed type of `tbp' to gfc_typebound_proc.
436 (gfc_compare_interfaces), (gfc_compare_actual_formal): Made public.
437 * match.h (gfc_typebound_default_access): New global.
438 (gfc_match_generic): New method.
439 * decl.c (gfc_match_generic): New method.
440 (match_binding_attributes): New argument `generic' and handle it.
441 (match_procedure_in_type): Mark matched binding as non-generic.
442 * interface.c (gfc_compare_interfaces): Made public.
443 (gfc_compare_actual_formal): Ditto.
444 (check_interface_1), (compare_parameter): Use new public names.
445 (gfc_procedure_use), (gfc_search_interface): Ditto.
446 * match.c (match_typebound_call): Set base-symbol referenced.
447 * module.c (binding_generic): New global array.
448 (current_f2k_derived): New global.
449 (mio_typebound_proc): Handle IO of GENERIC bindings.
450 (mio_f2k_derived): Record current f2k-namespace in current_f2k_derived.
451 * parse.c (decode_statement): Handle GENERIC statement.
452 (gfc_ascii_statement): Ditto.
453 (typebound_default_access), (set_typebound_default_access): Removed.
454 (gfc_typebound_default_access): New global.
455 (parse_derived_contains): New default-access implementation and handle
456 GENERIC statements encountered.
457 * primary.c (gfc_match_varspec): Adapted to new gfc_typebound_proc
458 structure and removed check for SUBROUTINE/FUNCTION from here.
459 * resolve.c (extract_compcall_passed_object): New method.
460 (update_compcall_arglist): Use it.
461 (resolve_typebound_static): Adapted to new gfc_typebound_proc structure.
462 (resolve_typebound_generic_call): New method.
463 (resolve_typebound_call): Check target is a SUBROUTINE and handle calls
465 (resolve_compcall): Ditto (check for target being FUNCTION).
466 (check_typebound_override): Handle GENERIC bindings.
467 (check_generic_tbp_ambiguity), (resolve_typebound_generic): New methods.
468 (resolve_typebound_procedure): Handle GENERIC bindings and set new
469 attributes subroutine, function and overridden in gfc_typebound_proc.
470 (resolve_fl_derived): Ensure extended type is resolved before the
472 * st.c (gfc_free_statement): Fix bug with free'ing EXEC_COMPCALL's.
473 * symbol.c (gfc_find_typebound_proc): Adapt for GENERIC changes.
475 2008-08-29 Jan Hubicka <jh@suse.cz>
477 * parse.c (parse_interface): Silence uninitialized var warning.
479 2008-08-29 Jakub Jelinek <jakub@redhat.com>
481 * trans.h (struct lang_type): Add span.
482 (GFC_TYPE_ARRAY_SPAN): Define.
483 * trans-decl.c (gfc_get_symbol_decl): For subref array pointers,
484 copy TREE_STATIC from decl to span instead of setting it
485 unconditionally, set DECL_ARTIFICIAL, fix type of initializer
486 and set GFC_TYPE_ARRAY_SPAN on decl's type.
487 * trans-types.c (gfc_get_array_descr_info): If
488 GFC_TYPE_ARRAY_SPAN is non-NULL, use it as element size.
490 * trans-decl.c (check_constant_initializer,
491 gfc_emit_parameter_debug_info): New functions.
492 (gfc_generate_module_vars, gfc_generate_function_code): Emit
493 PARAMETERs and unreferenced variables with initializers into
496 * gfortran.h (gfc_use_list): Add where field.
497 * module.c (use_locus): New static variable.
498 (gfc_match_use): Set it.
499 (gfc_use_module): Copy it to gfc_use_list's where field.
500 * trans-decl.c (gfc_generate_module_vars): Call gfc_trans_use_stmts.
501 (gfc_trans_use_stmts): Set backend locus before calling the debug
502 hook. Allow non-VAR_DECLs to be created even for non-external
503 module. Don't emit anything so far for renames from different
507 * trans-decl.c (create_function_arglist): Set DECL_BY_REFERENCE on
508 PARM_DECLs with pointer or reference type.
510 * trans-decl.c (gfc_build_qualified_array): Build non-flat
511 array type for debug info purposes.
515 * f95-lang.c (gfc_init_ts): New function.
516 (LANG_HOOKS_INIT_TS): Define.
517 * gfortran.h (gfc_use_rename): New type, moved from module.c.
518 (gfc_get_use_rename): New macro, moved from module.c.
519 (gfc_use_list): New type.
520 (gfc_get_use_list): New macro.
521 (gfc_namespace): Add use_stmts field.
522 (gfc_free_use_stmts): New prototype.
523 * Make-lang.in (fortran/trans-decl.o): Depend on debug.h.
524 * module.c (gfc_use_rename, gfc_get_use_rename): Moved to
526 (gfc_use_module): Chain the USE statement info to
528 (gfc_free_use_stmts): New function.
529 * symbol.c (gfc_free_namespace): Call gfc_free_use_stmts.
530 * trans.h (struct module_htab_entry): New type.
531 (gfc_find_module, gfc_module_add_decl): New functions.
532 * trans.c (gfc_generate_module_code): Create NAMESPACE_DECL for
533 the module, adjust DECL_CONTEXTs of module procedures and
534 call gfc_module_add_decl for them.
535 * trans-common.c (build_common_decl): Set DECL_IGNORED_P
536 on the common variable.
537 (create_common): Set DECL_IGNORED_P for use associated vars.
538 * trans-decl.c: Include debug.h.
539 (gfc_get_symbol_decl): Set DECL_IGNORED_P on use_assoc vars from
541 (build_function_decl): Allow current_function_decl's context
542 to be a NAMESPACE_DECL.
543 (module_htab, cur_module): New variables.
544 (module_htab_do_hash, module_htab_eq, module_htab_decls_hash,
545 module_htab_decls_eq, gfc_find_module, gfc_module_add_decl): New
547 (gfc_create_module_variable): Adjust DECL_CONTEXTs of module
548 variables and types and call gfc_module_add_decl for them.
549 (gfc_generate_module_vars): Temporarily set cur_module.
550 (gfc_trans_use_stmts): New function.
551 (gfc_generate_function_code): Call it.
552 (gfc_generate_block_data): Set DECL_IGNORED_P on decl.
553 * trans-types.c (gfc_get_derived_type): Adjust DECL_CONTEXT
554 and TYPE_CONTEXT of module derived types.
556 2008-08-28 Daniel Kraft <d@domob.eu>
558 * gfortran.h (enum expr_t): New value `EXPR_COMPCALL'.
559 (gfc_get_typebound_proc): New macro.
560 (struct gfc_expr): New union-member `compcall' for EXPR_COMPCALL.
561 (enum gfc_exec_op): New value `EXEC_COMPCALL'.
562 (gfc_find_typebound_proc): New argument.
563 (gfc_copy_ref), (gfc_match_varspec): Made public.
564 * decl.c (match_procedure_in_type): Use gfc_get_typebound_proc.
565 * expr.c (free_expr0), (gfc_copy_expr): Handle EXPR_COMPCALL.
566 (gfc_copy_ref): Made public and use new name.
567 (simplify_const_ref): Use new name of gfc_copy_ref.
568 (simplify_parameter_variable): Ditto.
569 (gfc_simplify_expr): gcc_unreachable for EXPR_COMPCALL.
570 * match.c (match_typebound_call): New method.
571 (gfc_match_call): Allow for CALL's to typebound procedures.
572 * module.c (binding_passing), (binding_overriding): New variables.
573 (expr_types): Add EXPR_COMPCALL.
574 (mio_expr): gcc_unreachable for EXPR_COMPCALL.
575 (mio_typebound_proc), (mio_typebound_symtree): New methods.
576 (mio_f2k_derived): Handle type-bound procedures.
577 * primary.c (gfc_match_varspec): Made public and parse trailing
578 references to type-bound procedures; new argument `sub_flag'.
579 (gfc_match_rvalue): New name and argument of gfc_match_varspec.
580 (match_variable): Ditto.
581 * resolve.c (update_arglist_pass): New method.
582 (update_compcall_arglist), (resolve_typebound_static): New methods.
583 (resolve_typebound_call), (resolve_compcall): New methods.
584 (gfc_resolve_expr): Handle EXPR_COMPCALL.
585 (resolve_code): Handle EXEC_COMPCALL.
586 (resolve_fl_derived): New argument to gfc_find_typebound_proc.
587 (resolve_typebound_procedure): Ditto and removed not-implemented error.
588 * st.c (gfc_free_statement): Handle EXEC_COMPCALL.
589 * symbol.c (gfc_find_typebound_proc): New argument `noaccess' and
590 implement access-checking.
591 * trans-expr.c (gfc_apply_interface_mapping_to_expr): gcc_unreachable
593 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Add missing break.
594 * trans-openmp.c (gfc_trans_omp_array_reduction): Add missing
595 intialization of ref->type.
597 2008-08-28 Janus Weil <janus@gcc.gnu.org>
600 * module.c (ab_attribute,attr_bits,mio_symbol_attribute): Take care of
601 saving attr.procedure and attr.proc_ptr to the module file.
603 2008-08-25 Daniel Kraft <d@domob.eu>
605 * gfortran.h (gfc_find_component): Add new arguments.
606 * parse.c (parse_derived_contains): Check if the derived-type containing
607 the CONTAINS section is SEQUENCE/BIND(C).
608 * resolve.c (resolve_typebound_procedure): Check for name collision with
610 (resolve_fl_derived): Check for name collision with inherited
611 type-bound procedures.
612 * symbol.c (gfc_find_component): New arguments `noaccess' and `silent'.
613 (gfc_add_component): Adapt for new arguments.
614 * primary.c (match_varspec), (gfc_match_structure_constructor): Ditto.
616 2008-08-24 Tobias Burnus <burnus@net-b.de>
619 * decl.c (verify_bind_c_sym): Reject array/string returning
622 2008-08-24 Tobias Burnus <burnus@net-b.de>
625 * trans-expr.c (gfc_conv_function_call): Add string_length
626 for character-returning bind(C) functions.
628 2008-08-24 Daniel Kraft <d@domob.eu>
630 * gfortran.h (gfc_typebound_proc): New struct.
631 (gfc_symtree): New member typebound.
632 (gfc_find_typebound_proc): Prototype for new method.
633 (gfc_get_derived_super_type): Prototype for new method.
634 * parse.h (gfc_compile_state): New state COMP_DERIVED_CONTAINS.
635 * decl.c (gfc_match_procedure): Handle PROCEDURE inside derived-type
637 (gfc_match_end): Handle new context COMP_DERIVED_CONTAINS.
638 (gfc_match_private): Ditto.
639 (match_binding_attributes), (match_procedure_in_type): New methods.
640 (gfc_match_final_decl): Rewrote to make use of new
641 COMP_DERIVED_CONTAINS parser state.
642 * parse.c (typebound_default_access): New global helper variable.
643 (set_typebound_default_access): New callback method.
644 (parse_derived_contains): New method.
645 (parse_derived): Extracted handling of CONTAINS to new parser state
646 and parse_derived_contains.
647 * resolve.c (resolve_bindings_derived), (resolve_bindings_result): New.
648 (check_typebound_override), (resolve_typebound_procedure): New methods.
649 (resolve_typebound_procedures): New method.
650 (resolve_fl_derived): Call new resolving method for typebound procs.
651 * symbol.c (gfc_new_symtree): Initialize new member typebound to NULL.
652 (gfc_find_typebound_proc): New method.
653 (gfc_get_derived_super_type): New method.
655 2008-08-23 Janus Weil <janus@gcc.gnu.org>
657 * gfortran.h (gfc_component): Add field "symbol_attribute attr", remove
658 fields "pointer", "allocatable", "dimension", "access".
659 Remove functions "gfc_set_component_attr" and "gfc_get_component_attr".
660 * interface.c (gfc_compare_derived_types): Ditto.
661 * trans-array.c (gfc_array_allocate,structure_alloc_comps): Ditto.
662 * trans-expr.c (gfc_conv_component_ref,gfc_trans_subcomponent_assign,
663 gfc_conv_structure): Ditto.
664 * symbol.c (gfc_find_component,free_components,gfc_set_component_attr,
665 gfc_get_component_attr,verify_bind_c_derived_type,
666 generate_isocbinding_symbol): Ditto.
667 * decl.c (build_struct): Ditto.
668 * dump-parse-tree.c (show_components): Ditto.
669 * trans-stmt.c (gfc_trans_deallocate): Ditto.
670 * expr.c (gfc_check_assign,gfc_check_pointer_assign,
671 gfc_default_initializer): Ditto.
672 * module.c (mio_component): Ditto.
673 * trans-types.c (copy_dt_decls_ifequal,gfc_get_derived_type): Ditto.
674 * resolve.c (has_default_initializer,resolve_structure_cons,
675 gfc_iso_c_func_interface,find_array_spec,resolve_ref,
676 resolve_deallocate_expr,resolve_allocate_expr,resolve_fl_derived,
677 resolve_equivalence_derived): Ditto.
678 * trans-io.c (transfer_expr): Ditto.
679 * parse.c (parse_derived): Ditto.
680 * dependency.c (gfc_check_dependency): Ditto.
681 * primary.c (gfc_variable_attr): Ditto.
683 2008-08-23 Tobias Burnus <burnus@net-b.de>
686 * arith.c (gfc_arith_concat): Fix concat of kind=4 strings.
688 2008-08-23 Tobias Burnus <burnus@net-b.de>
691 * target-memory.c (gfc_interpret_character): Support
694 2008-08-22 Daniel Kraft <d@domob.eu>
697 * symbol.c (gfc_add_type): Warn on -Wsurprising if a function-result
698 type is re-declared but neither -pedantic nor -std=f* is given and so
700 * invoke.texi (-Wsurprising): Document this new behaviour.
702 2008-08-22 Daniel Kraft <d@domob.eu>
704 * gfortran.h (in_prefix): Removed from this header.
705 * match.h (gfc_matching_prefix): Moved and renamed from `in_prefix'.
706 * decl.c (in_prefix): Removed from here.
707 (gfc_match_prefix): Use new name of `gfc_matching_prefix'.
708 * symbol.c (gfc_check_symbol_typed): Ditto.
709 * expr.c (check_typed_ns): New helper variable.
710 (expr_check_typed_help): New helper method.
711 (gfc_expr_check_typed): Rewrote to use gfc_traverse_expr to do the
712 work, fixing a minor problem.
713 * match.c (gfc_matching_prefix): New variable.
715 2008-08-22 Daniel Kraft <d@domob.eu>
719 * gfortran.h (in_prefix): New global.
720 (gfc_check_symbol_typed), (gfc_check_expr_typed): New methods.
721 * array.c (match_array_element_spec): Check that bounds-expressions
722 don't have symbols not-yet-typed in them.
723 * decl.c (var_element): Check that variable used is already typed.
724 (char_len_param_value): Check that expression does not contain
725 not-yet-typed symbols.
726 (in_prefix): New global.
727 (gfc_match_prefix): Record using `in_prefix' if we're at the moment
728 parsing a prefix or not.
729 * expr.c (gfc_expr_check_typed): New method.
730 * parse.c (verify_st_order): New argument to disable error output.
731 (check_function_result_typed): New helper method.
732 (parse_spec): Check that the function-result declaration, if given in
733 a prefix, contains no not-yet-typed symbols when the IMPLICIT rules are
735 * symbol.c (gfc_check_symbol_typed): Check that a symbol already has
736 a type associated to it, otherwise use the IMPLICIT rules or signal
739 2008-08-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
741 * f95-lang.c: Update all calls to pedwarn.
743 2008-08-18 Daniel Franke <franke.daniel@gmail.com>
746 * gfortran.texi: Document decision on include file handling in
749 2008-08-16 Tobias Burnus <burnus@net-b.de>
752 * libgfortran.h: Reduce GFC_MAX_DIMENSIONS to 7.
754 2008-08-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
757 * io.c (gfc_match_open): Enable UTF-8 in checks.
758 * simplify.c (gfc_simplify_selected_char_kind): Enable iso_10646.
760 2008-08-14 Janus Weil <janus@gcc.gnu.org>
763 * symbol.c (check_conflict): Move conflict checks for (procedure,save)
764 and (procedure,intent) to resolve_fl_procedure.
765 * resolve.c (resolve_fl_procedure): Ditto.
767 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
770 * f95-lang.c (gfc_mark_addressable): Use "pedwarn (0," instead of
773 2008-08-09 Paul Thomas <pault@gcc.gnu.org>
776 * symbol.c (gfc_add_extension): New function.
777 * decl.c (gfc_get_type_attr_spec): Call it.
778 (gfc_match_derived_decl): Set symbol extension attribute from
780 * gfortran.h : Add prototype for gfc_add_extension.
782 2008-08-08 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
785 * options.c (set_Wall): Replace set_Wunused by warn_unused.
787 2008-08-08 Daniel Kraft <d@domob.eu>
789 * gfortran.h (gfc_finalizer): Replaced member `procedure' by two
790 new members `proc_sym' and `proc_tree' to store the symtree after
792 (gfc_find_sym_in_symtree): Made public.
793 * decl.c (gfc_match_final_decl): Adapted for new member name.
794 * interface.c (gfc_find_sym_in_symtree): Made public.
795 (gfc_extend_expr), (gfc_extend_assign): Changed call accordingly.
796 * module.c (mio_finalizer), (mio_f2k_derived), (mio_full_f2k_derived):
797 New methods for module-file IO of f2k_derived.
798 (mio_symbol): Do IO of f2k_derived namespace.
799 * resolve.c (gfc_resolve_finalizers): Adapted for new member name and
800 finding the symtree for the symbol here.
801 * symbol.c (gfc_free_finalizer): Adapted for new members.
803 2008-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
805 * gfc-internals.texi: Update to GFDL 1.2. Do not list GPL as
807 * gfortran.texi: Likewise.
808 * intrinsic.texi: Do not list GPL as Invariant Section.
809 * invoke.texi: Likewise. Update copyright years.
811 2008-07-29 Paul Thomas <pault@gcc.gnu.org>
813 * trans-expr.c (conv_parent_component_references): New function
814 to build missing parent references.
815 (gfc_conv_variable): Call it
816 * symbol.c (gfc_add_component): Check that component name in a
817 derived type extension does not appear in parent.
818 (gfc_find_component): For a derived type extension, check if
819 the component appears in the parent derived type by calling
820 self. Separate errors for private components and private types.
821 * decl.c (match_data_constant): Add extra arg to call to
822 gfc_match_structure_constructor.
823 (check_extended_derived_type): New function to check that a
824 parent derived type exists and that it is OK for exension.
825 (gfc_get_type_attr_spec): Add extra argument 'name' and return
826 it if extends is specified.
827 (gfc_match_derived_decl): Match derived type extension and
828 build a first component of the parent derived type if OK. Add
829 the f2k namespace if not present.
830 * gfortran.h : Add the extension attribute.
831 * module.c : Handle attribute 'extension'.
832 * match.h : Modify prototypes for gfc_get_type_attr_spec and
833 gfc_match_structure_constructor.
834 * primary.c (build_actual_constructor): New function extracted
835 from gfc_match_structure_constructor and modified to call self
836 iteratively to build derived type extensions, when f2k named
838 (gfc_match_structure_constructor): Do not throw error for too
839 many components if a parent type is being handled. Use
840 gfc_find_component to generate errors for non-existent or
841 private components. Iteratively call self for derived type
842 extensions so that parent constructor is built. If extension
843 and components left over, throw error.
844 (gfc_match_rvalue): Add extra arg to call to
845 gfc_match_structure_constructor.
847 * trans-array.c (gfc_conv_resolve_dependencies): If lhs and rhs
848 are the same symbol, aliassing does not matter.
850 2008-07-29 Jan Hubicka <jh@suse.cz>
852 * options.c (gfc_post_options): Do not set flag_no_inline.
854 2008-07-29 Daniel Kraft <d@domob.eu>
857 * trans-intrinsic.c (conv_generic_with_optional_char_arg): New method
858 to append a string-length even if the string argument is missing, e.g.
860 (gfc_conv_intrinsic_function): Call the new method for EOSHIFT, PACK
863 2008-07-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
865 * gfortran.h (try): Remove macro. Replace try with gfc_try
876 * interface.c: Likewise.
877 * intrinsic.c: Likewise.
878 * intrinsic.h: Likewise.
883 * resolve.c: Likewise.
884 * scanner.c: Likewise.
885 * simplify.c: Likewise.
886 * symbol.c: Likewise.
887 * trans-openmp.c: Likewise.
888 * trans-types.c: Likewise.
890 2008-07-28 Tobias Burnus <burnus@net-b.de>
892 * Make-lang.in: Remove -Wno-* from fortran-warn.
894 2008-07-28 Richard Guenther <rguenther@suse.de>
896 Merge from gimple-tuples-branch.
898 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
900 * trans-expr.c: Include gimple.h instead of tree-gimple.h.
901 * trans-array.c: Same.
902 * trans-openmp.c: Same.
903 * trans-stmt.c: Same.
906 * trans-decl.c: Same.
907 * trans-intrinsic.c: Same.
908 * trans.c: Same. Include tree-iterator.h.
909 * Make-lang.in (trans.o): Depend on tree-iterator.h
911 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
913 * trans-array.h (gfc_conv_descriptor_data_set_internal):
914 Rename to gfc_conv_descriptor_data_set.
915 (gfc_conv_descriptor_data_set_tuples): Remove.
916 * trans-array.c (gfc_conv_descriptor_data_get): Rename
917 from gfc_conv_descriptor_data_set_internal.
918 Remove last argument to gfc_add_modify.
919 (gfc_trans_allocate_array_storage): Rename gfc_add_modify_expr to
921 (gfc_trans_create_temp_array): Same.
922 (gfc_conv_array_transpose): Same.
923 (gfc_grow_array): Same.
924 (gfc_put_offset_into_var): Same.
925 (gfc_trans_array_ctor_element): Same.
926 (gfc_trans_array_constructor_subarray): Same.
927 (gfc_trans_array_constructor_value): Same.
928 (gfc_trans_scalarized_loop_end): Same.
929 (gfc_array_init_size): Same.
930 (gfc_array_allocate): Same.
931 (gfc_trans_array_bounds): Same.
932 (gfc_trans_auto_array_allocation): Same.
933 (gfc_trans_g77_array): Same.
934 (gfc_trans_dummy_array_bias): Same.
935 (gfc_conv_expr_descriptor): Same.
936 (structure_alloc_comps): Same.
937 * trans-expr.c: Same.
938 * trans-openmp.c (gfc_omp_clause_default_ctor): Same.
939 Rename gfc_conv_descriptor_data_set_tuples to
940 gfc_conv_descriptor_data_set.
941 (gfc_omp_clause_copy_ctor): Change build_gimple_modify_stmt to
943 (gfc_omp_clause_assign_op): Same.
944 (gfc_trans_omp_array_reduction): Rename gfc_add_modify_expr to
946 (gfc_trans_omp_atomic): Same.
947 (gfc_trans_omp_do): Same. Change GIMPLE_MODIFY_STMT to MODIFY_EXPR.
948 Rename gfc_add_modify_stmt to gfc_add_modify.
949 * trans-stmt.c: Rename gfc_add_modify_expr to
951 * trans.c: Rename gfc_add_modify_expr to
953 (gfc_add_modify): Remove last argument.
954 Rename GIMPLE_MODIFY_STMT to MODIFY_EXPR.
955 * trans.h: Remove gfc_add_modify_expr, gfc_add_modify_stmt.
956 Add prototype for gfc_add_modify.
957 * f95-lang.c (union lang_tree_node): Rename GENERIC_NEXT to TREE_CHAIN.
958 * trans-decl.c: Rename gfc_add_modify_stmt to gfc_add_modify.
960 * trans-intrinsic.c: Same.
962 2008-02-25 Aldy Hernandez <aldyh@redhat.com>
964 * Make-lang.in (fortran-warn): Add -Wno-format.
966 2008-02-19 Diego Novillo <dnovillo@google.com>
968 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
970 * fortran/Make-lang.in (fortran-warn): Remove.
972 2007-11-22 Aldy Hernandez <aldyh@redhat.com>
974 * trans-expr.c (gfc_trans_string_copy): Use "void *" when building a
977 2007-11-10 Aldy Hernandez <aldyh@redhat.com>
979 * Make-lang.in (fortran-warn): Set to -Wno-format.
980 * trans.c (gfc_trans_code): Update comment to say GENERIC.
981 Call tree_annotate_all_with_locus instead of annotate_all_with_locus.
983 2008-07-27 Tobias Burnus <burnus@net-b.de>
988 * trans.c (gfc_trans_runtime_check): Allow run-time warning besides
990 * trans.h (gfc_trans_runtime_check): Update declaration.
991 * trans-array.c (gfc_trans_array_ctor_element,gfc_trans_array_bound_check,
992 gfc_conv_array_ref,gfc_conv_ss_startstride,gfc_trans_dummy_array_bias):
993 Updated gfc_trans_runtime_check calls.
994 (gfc_conv_array_parameter): Implement flag_check_array_temporaries,
995 fix packing/unpacking for nonpresent optional actuals to optional
997 * trans-array.h (gfc_conv_array_parameter): Update declaration.
998 * trans-expr.c (gfc_conv_substring,gfc_trans_arrayfunc_assign,
999 gfc_conv_function_call): Updated gfc_trans_runtime_check calls.
1000 (gfc_conv_function_call): Update gfc_conv_array_parameter calls.
1001 * trans-expr.c (gfc_trans_goto): Updated gfc_trans_runtime_check
1003 * trans-io.c (set_string,gfc_conv_intrinsic_repeat): Ditto.
1004 (gfc_conv_intrinsic_transfer,gfc_conv_intrinsic_loc): Same for
1005 gfc_conv_array_parameter.
1006 * trans-intrinsics.c (gfc_conv_intrinsic_bound): Ditto.
1007 * trans-decl.c (gfc_build_builtin_function_decls): Add
1008 gfor_fndecl_runtime_warning_at.
1009 * lang.opt: New option fcheck-array-temporaries.
1010 * gfortran.h (gfc_options): New flag_check_array_temporaries.
1011 * options.c (gfc_init_options, gfc_handle_option): Handle flag.
1012 * invoke.texi: New option fcheck-array-temporaries.
1014 2008-07-24 Jan Hubicka <jh@suse.cz>
1016 * fortran/options.c (gfc_post_options): Remove flag_unline_trees code.
1018 2008-07-24 Daniel Kraft <d@domob.eu>
1021 * lang.opt (Wnonstd-intrinsics): Removed option.
1022 (Wintrinsics-std), (Wintrinsic-shadow): New options.
1023 * invoke.texi (Option Summary): Removed -Wnonstd-intrinsics
1024 from the list and added -Wintrinsics-std and -Wintrinsic-shadow.
1025 (Error and Warning Options): Documented the new options and removed
1026 the documentation for -Wnonstd-intrinsics.
1027 * gfortran.h (gfc_option_t): New members warn_intrinsic_shadow and
1028 warn_intrinsics_std, removed warn_nonstd_intrinsics.
1029 (gfc_is_intrinsic): Renamed from gfc_intrinsic_name.
1030 (gfc_warn_intrinsic_shadow), (gfc_check_intrinsic_standard): New.
1031 * decl.c (match_procedure_decl): Replaced gfc_intrinsic_name by
1032 the new name gfc_is_intrinsic.
1033 (warn_intrinsic_shadow): New helper method.
1034 (gfc_match_function_decl), (gfc_match_subroutine): Call the new method
1035 warn_intrinsic_shadow to check the just-parsed procedure.
1036 * expr.c (check_init_expr): Call new gfc_is_intrinsic to check whether
1037 the function called is really an intrinsic in the selected standard.
1038 * intrinsic.c (gfc_is_intrinsic): Renamed from gfc_intrinsic_name and
1039 extended to take into account the selected standard settings when trying
1040 to find out whether a symbol is an intrinsic or not.
1041 (gfc_check_intrinsic_standard): Made public and extended.
1042 (gfc_intrinsic_func_interface), (gfc_intrinsic_sub_interface): Removed
1043 the calls to check_intrinsic_standard, this check now happens inside
1045 (gfc_warn_intrinsic_shadow): New method defined.
1046 * options.c (gfc_init_options): Initialize new warning flags to false
1047 and removed intialization of Wnonstd-intrinsics flag.
1048 (gfc_post_options): Removed logic for Wnonstd-intrinsics flag.
1049 (set_Wall): Set new warning flags and removed Wnonstd-intrinsics flag.
1050 (gfc_handle_option): Handle the new flags and removed handling of the
1051 old Wnonstd-intrinsics flag.
1052 * primary.c (gfc_match_rvalue): Replaced call to gfc_intrinsic_name by
1053 the new name gfc_is_intrinsic.
1054 * resolve.c (resolve_actual_arglist): Ditto.
1055 (resolve_generic_f), (resolve_unknown_f): Ditto.
1056 (is_external_proc): Ditto.
1057 (resolve_generic_s), (resolve_unknown_s): Ditto.
1058 (resolve_symbol): Ditto and ensure for symbols declared INTRINSIC that
1059 they are really available in the selected standard setting.
1061 2008-07-24 Daniel Kraft <d@domob.eu>
1063 * match.c (gfc_match): Add assertion to catch wrong calls trying to
1064 match upper-case characters.
1066 2008-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1069 * gfortran.h: Add "warn_array_temp" to gfc_option_t.
1070 * lang.opt: Add -Warray-temporaries.
1071 * invoke.texi: Document -Warray-temporaries
1072 * trans-array.h (gfc_trans_create_temp_array): Add argument of
1074 (gfc_conv_loop_setup): Likewise.
1075 * trans-array.c (gfc_trans_create_temp_array): If
1076 -Warray-temporaries is given and locus is present, warn about
1077 creation of array temporaries.
1078 (gfc_trans_array_constructor_subarray): Add locus to call
1079 of gfc_conv_loop_setup.
1080 (gfc_trans_array_constructor): Add where argument. Pass where
1081 argument to call of gfc_trans_create_temp_array.
1082 (gfc_add_loop_ss_code): Add where argument. Pass where argument
1083 to recursive call of gfc_add_loop_ss_code and to call of
1084 gfc_trans_array_constructor.
1085 (gfc_conv_loop_setup): Add where argument. Pass where argument
1086 to calls to gfc_add_loop_ss_code and to gfc_trans_create_temp_array.
1087 (gfc_conv_expr_descriptor): Pass location to call of
1088 gfc_conv_loop_setup.
1089 (gfc_conv_array_parameter): If -Warray-temporaries is given,
1090 warn about creation of temporary arrays.
1091 * trans-expr.c (gfc_conv_subref_array_arg): Add where argument
1092 to call to gfc_conv_loop_setup.
1093 (gfc_conv_function_call): Add where argument to call to
1094 gfc_trans_creat_temp_array.
1095 (gfc_trans_subarray_assign): Likewise.
1096 (gfc_trans_assignment_1): Add where argument to call to
1097 gfc_conv_loop_setup.
1098 * trans-stmt.c (gfc_conv_elemental_dependencies): Add where
1099 argument to call to gfc_trans_create_temp_array.
1100 (gfc_trans_call): Add where argument to call to gfc_conv_loop_setup.
1101 (generate_loop_for_temp_to_lhs): Likewise.
1102 (generate_loop_for_rhs_to_temp): Likewise.
1103 (compute_inner_temp_size): Likewise.
1104 (gfc_trans-pointer_assign_need_temp): Likewise.
1105 (gfc_evaluate_where_mask): Likewise.
1106 (gfc_trans_where_assign): Likewise.
1107 (gfc_trans_where_3): Likewise.
1108 * trans-io.c (transfer_srray_component): Add where argument
1109 to function. Add where argument to call to gfc_conv_loop_setup.
1110 (transfer_expr): Add where argument to call to
1111 transfer_array_component.
1112 (gfc_trans_transfer): Add where expression to call to
1113 gfc_conv_loop_setup.
1114 * trans-intrinsic.c (gfc_conv_intrinsic_anyall): Add
1115 where argument to call to gfc_conv_loop_setup.
1116 (gfc_conv_intrinsic_count): Likewise.
1117 (gfc_conv_intrinsic_arith): Likewise.
1118 (gfc_conv_intrinsic_dot_product): Likewise.
1119 (gfc_conv_intrinsic_minmaxloc): Likewise.
1120 (gfc_conv_intrinsic_minmaxval): Likewise.
1121 (gfc_conv_intrinsic_array_transfer): Warn about
1122 creation of temporary array.
1123 Add where argument to call to gfc_trans_create_temp_array.
1124 * options.c (gfc_init_options): Initialize gfc_option.warn_array_temp.
1125 (gfc_handle_option): Set gfc_option.warn_array_temp.
1127 2008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1130 * f95-lang.c (gfc_mark_addressable): All calls to pedwarn changed.
1132 2008-07-22 Daniel Kraft <d@domob.eu>
1135 * io.c (error_element), (format_locus): New static globals.
1136 (unexpected_element): Spelled out this message fully.
1137 (next_char): Keep track of locus when not MODE_STRING.
1138 (next_char_not_space): Remember last parsed element in error_element.
1139 (format_lex): Fix two indentation errors.
1140 (check_format): Use format_locus and possibly error_element for a
1141 slightly better error message on invalid format.
1142 (check_format_string): Set format_locus to start of the string
1143 expression used as format.
1145 2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1147 * expr.c (gfc_check_pointer_assign): Fix typo in string.
1148 * io.c (check_format): Fix typo in string. Fix comment typos.
1149 * parse.c (gfc_global_used): Likewise.
1150 * resolve.c (resolve_allocate_expr): Likewise.
1151 * symbol.c (gfc_set_default_type): Likewise.
1152 * arith.c: Fix typos in comments.
1153 * array.c: Likewise.
1156 * dependency.c: Likewise.
1157 * f95-lang.c: Likewise.
1158 * gfortran.h: Likewise.
1159 * matchexp.c: Likewise.
1160 * module.c: Likewise.
1161 * primary.c: Likewise.
1162 * scanner.c: Likewise.
1163 * trans-array.c: Likewise.
1164 * trans-common.c: Likewise.
1165 * trans-decl.c: Likewise.
1166 * trans-expr.c: Likewise.
1167 * trans-intrinsic.c: Likewise.
1168 * trans-types.c: Likewise.
1169 * trans.c: Likewise.
1170 * trans.h: Likewise.
1172 2008-07-19 Tobias Burnus <burnus@net-b.de>
1175 * matchexp.c (gfc_get_parentheses): Remove obsolete workaround,
1176 which caused the generation of wrong code.
1178 2008-07-19 Tobias Burnus <burnus@net-b.de>
1181 * scanner.c (load_file): Add argument to destinguish between
1182 true filename and displayed filename.
1183 (include_line,gfc_new_file): Adapt accordingly.
1185 2008-07-19 Tobias Burnus <burnus@net-b.de>
1187 * check.c (gfc_check_cshift,gfc_check_eoshift,gfc_check_unpack): Add rank
1188 checks for cshift's shift and eoshift's shift and boundary args.
1189 (gfc_check_unpack): Add rank and shape tests for unpack.
1191 2008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1193 * gfortran.h (new): Remove macro.
1194 * array.c (gfc_append_constructor, match_array_list,
1195 gfc_match_array_constructor): Likewise.
1196 * bbt.c (insert, gfc_insert_bbt): Likewise.
1197 * decl.c (var_element, top_var_list, top_val_list, gfc_match_data,
1198 get_proc_name): Likewise.
1199 * expr.c (gfc_copy_actual_arglist): Likewise.
1200 * interface.c (compare_actual_formal, check_new_interface,
1201 gfc_add_interface): Likewise.
1202 * intrinsic.c gfc_convert_type_warn, gfc_convert_chartype):
1204 * io.c (match_io_iterator, match_io_list): Likewise.
1205 * match.c (match_forall_header): Likewise.
1206 * matchexp.c (build_node): Likewise.
1207 * module.c (gfc_match_use): Likewise.
1208 * scanner.c (load_file): Likewise.
1209 * st.c (gfc_append_code): Likewise.
1210 * symbol.c (save_symbol_data, gfc_get_sym_tree, gfc_undo_symbols,
1211 gfc_commit_symbols): Likewise.
1212 * trans-common.c (build_field): Likewise.
1213 * trans-decl.c (gfc_finish_var_decl): Likewise.
1214 * trans-expr.c (gfc_free_interface_mapping,
1215 gfc_get_interface_mapping_charlen, gfc_add_interface_mapping,
1216 gfc_finish_interface_mapping,
1217 gfc_apply_interface_mapping_to_expr): Likewise.
1218 * trans.h (gfc_interface_sym_mapping): Likewise.
1220 2008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1222 * gfortran.h (operator): Remove macro.
1223 (gfc_namespace, gfc_expr): Avoid C++ keywords.
1224 * arith.c (eval_intrinsic, eval_intrinsic_f2, eval_intrinsic_f3):
1226 * decl.c (access_attr_decl): Likewise.
1227 * dependency.c (gfc_dep_compare_expr): Likewise.
1228 * dump-parse-tree.c (show_expr, show_uop, show_namespace):
1230 * expr.c (gfc_copy_expr, gfc_type_convert_binary,
1231 simplify_intrinsic_op, check_intrinsic_op): Likewise.
1232 * interface.c (fold_unary, gfc_match_generic_spec,
1233 gfc_match_interface, gfc_match_end_interface,
1234 check_operator_interface, check_uop_interfaces,
1235 gfc_check_interfaces, gfc_extend_expr, gfc_extend_assign,
1236 gfc_add_interface, gfc_current_interface_head,
1237 gfc_set_current_interface_head): Likewise.
1238 * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
1240 * matchexp.c (gfc_get_parentheses, build_node): Likewise.
1241 * module.c (gfc_use_rename, gfc_match_use, find_use_name_n,
1242 number_use_names, mio_expr, load_operator_interfaces, read_module,
1243 write_operator, write_module): Likewise.
1244 * openmp.c (resolve_omp_atomic): Likewise.
1245 * resolve.c (resolve_operator, gfc_resolve_character_operator,
1246 gfc_resolve_uops): Likewise.
1247 * symbol.c (free_uop_tree, gfc_free_namespace): Likewise.
1248 * trans-expr.c (gfc_conv_expr_op): Likewise.
1249 * trans-openmp.c (gfc_trans_omp_atomic): Likewise.
1251 2008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1253 * gfortran.h (protected): Remove macro.
1254 * dump-parse-tree.c (show_attr): Avoid C++ keywords.
1255 * expr.c (gfc_check_pointer_assign): Likewise.
1256 * interface.c (compare_parameter_protected): Likewise.
1257 * intrinsic.c (enum class, add_sym, add_sym_0, add_sym_1,
1258 add_sym_1s, add_sym_1m, add_sym_2, add_sym_2s, add_sym_3,
1259 add_sym_3ml, add_sym_3red, add_sym_3s, add_sym_4, add_sym_4s,
1260 add_sym_5s): Likewise.
1261 * match.c (gfc_match_assignment, gfc_match_pointer_assignment):
1263 * module.c (mio_symbol_attribute): Likewise.
1264 * primary.c (match_variable): Likewise.
1265 * resolve.c (resolve_equivalence): Likewise.
1266 * symbol.c (check_conflict, gfc_add_protected, gfc_copy_attr):
1268 * trans-types.c (gfc_get_array_type_bounds): Likewise.
1270 2008-07-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1272 * arith.c (eval_type_intrinsic0): Avoid C++ keywords.
1273 * gfortran.h (try, protected, operator, new): Likewise.
1275 2008-07-17 Tobias Burnus <burnus@net-b.de>
1279 * array.c (gfc_match_array_spec): Fix array-rank check.
1280 * resolve.c (resolve_fl_derived): Fix constentness check
1281 for the array dimensions.
1283 2008-07-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1285 * Make-lang.in (gfortranspec.o): Fix dependencies.
1287 2008-07-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1290 * io.c: Add error check for g0 edit descriptor followed by '.'.
1292 2008-07-12 Daniel Kraft <d@domob.eu>
1294 * resolve.c (resolve_fl_derived): Allow pointer components to empty
1295 derived types fixing a missing part of PR fortran/33221.
1297 2008-07-10 Daniel Kraft <d@domob.eu>
1299 * gfc-internals.texi (section gfc_expr): Created documentation about
1300 the gfc_expr internal data structure.
1302 2008-07-07 Thomas Koenig <tkoenig@gcc.gnu.org>
1305 * iresolve.c (gfc_resolve_product): Set shape of return
1307 (gfc_resolve_sum): Likewise.
1309 2008-07-07 Jakub Jelinek <jakub@redhat.com>
1312 * f95-lang.c (poplevel): Don't ever add subblocks to
1313 global_binding_level.
1315 2008-07-02 Janus Weil <janus@gcc.gnu.org>
1316 Tobias Burnus <burnus@net-b.de>
1317 Paul Thomas <pault@gcc.gnu.org>
1320 * gfortran.h (struct gfc_symbol): New member "proc_pointer".
1321 * check.c (gfc_check_associated,gfc_check_null): Implement
1323 * decl.c (match_procedure_decl): Ditto.
1324 * expr.c (gfc_check_pointer_assign,gfc_check_assign_symbol): Ditto.
1325 * interface.c (compare_actual_formal): Ditto.
1327 * match.c (gfc_match_pointer_assignment): Ditto.
1328 * parse.c (parse_interface): Ditto.
1329 * primary.c (gfc_match_rvalue,match_variable): Ditto.
1330 * resolve.c (resolve_fl_procedure): Ditto.
1331 * symbol.c (check_conflict,gfc_add_external,gfc_add_pointer,
1332 gfc_copy_attr,gen_fptr_param,build_formal_args): Ditto.
1333 * trans-decl.c (get_proc_pointer_decl,gfc_get_extern_function_decl,
1334 create_function_arglist): Ditto.
1335 * trans-expr.c (gfc_conv_variable,gfc_conv_function_val,
1336 gfc_conv_function_call,gfc_trans_pointer_assignment): Ditto.
1338 2008-07-02 Thomas Koenig <tkoenig@gcc.gnu.org>
1342 * iresolve.c (resolve_mask_arg): Don't convert mask to
1343 kind=1 logical if it is of that type already.
1345 2008-06-29 Thomas Koenig <tkoenig@gcc.gnu.org>
1348 * iresolve.c (gfc_resolve_matmul): Copy shapes
1351 2008-06-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1353 * invoke.texi: Add documentation for runtime behavior of
1356 2008-06-28 Daniel Kraft <d@domob.eu>
1358 * gfc-internals.texi (section gfc_code): Extended documentation about
1359 gfc_code in the internal datastructures chapter including details about
1360 how IF, DO and SELECT blocks look like and an example for how the
1361 block-chaining works.
1363 2008-06-25 Paul Thomas <pault@gcc.gnu.org>
1366 * interface.c (check_intents): Correct error where the actual
1367 arg was checked for a pointer argument, rather than the formal.
1369 2008-06-24 Paul Thomas <pault@gcc.gnu.org>
1372 * expr.c (gfc_check_assign): Change message and locus for
1373 error when conform == 0.
1375 2008-06-23 Jakub Jelinek <jakub@redhat.com>
1378 * cpp.c (cpp_define_builtins): Change _OPENMP value to 200805.
1380 2008-06-20 Laurynas Biveinis <laurynas.biveinis@gmail.com>
1381 Tobias Burnus <burnus@net-b.de>
1385 * scanner.c (preprocessor_line): do not call gfc_free for
1386 current_file->filename if it differs from filename.
1388 2008-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1390 * arith.c (hollerith2representation): Fix for -Wc++-compat.
1391 * array.c (gfc_get_constructor): Likewise.
1392 * decl.c (gfc_get_data_variable, gfc_get_data_value, gfc_get_data,
1393 create_enum_history, gfc_match_final_decl): Likewise.
1394 * error.c (error_char): Likewise.
1395 * expr.c (gfc_get_expr, gfc_copy_expr): Likewise.
1396 * gfortran.h (gfc_get_charlen, gfc_get_array_spec,
1397 gfc_get_component, gfc_get_formal_arglist, gfc_get_actual_arglist,
1398 gfc_get_namelist, gfc_get_omp_clauses, gfc_get_interface,
1399 gfc_get_common_head, gfc_get_dt_list, gfc_get_array_ref,
1400 gfc_get_ref, gfc_get_equiv, gfc_get_case, gfc_get_iterator,
1401 gfc_get_alloc, gfc_get_wide_string): Likewise.
1402 * interface.c (count_types_test): Likewise.
1403 * intrinsic.c (add_char_conversions, gfc_intrinsic_init_1):
1405 * io.c (gfc_match_open, gfc_match_close, match_filepos, match_io,
1406 gfc_match_inquire, gfc_match_wait): Likewise.
1407 * match.c (gfc_match, match_forall_iterator): Likewise.
1408 * module.c (gfc_get_pointer_info, gfc_get_use_rename, add_fixup,
1409 add_true_name, parse_string, write_atom, quote_string,
1410 mio_symtree_ref, mio_gmp_real, write_common_0): Likewise.
1411 * options.c (gfc_post_options): Likewise.
1412 * primary.c (match_integer_constant, match_hollerith_constant,
1413 match_boz_constant, match_real_constant,
1414 gfc_get_structure_ctor_component, gfc_match_structure_constructor): Likewise.
1415 * scanner.c (gfc_widechar_to_char, add_path_to_list,
1416 add_file_change, load_line, get_file, preprocessor_line,
1417 load_file, unescape_filename, gfc_read_orig_filename): Likewise.
1418 * simplify.c (gfc_simplify_ibits, gfc_simplify_ishft,
1419 gfc_simplify_ishftc): Likewise.
1420 * symbol.c (gfc_get_st_label, gfc_get_namespace, gfc_new_symtree,
1421 gfc_get_uop, gfc_new_symbol, save_symbol_data, gfc_get_gsymbol):
1423 * target-memory.c (gfc_target_interpret_expr): Likewise.
1424 * trans-const.c (gfc_build_wide_string_const): Likewise.
1425 * trans-expr.c (gfc_add_interface_mapping): Likewise.
1426 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
1427 gfc_conv_intrinsic_int, gfc_conv_intrinsic_lib_function,
1428 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_ctime,
1429 gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam,
1430 gfc_conv_intrinsic_minmax, gfc_conv_intrinsic_minmax_char,
1431 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_index_scan_verify,
1432 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_trim): Likewise.
1433 * trans.c (gfc_get_backend_locus): Likewise.
1434 * trans.h (gfc_get_ss): Likewise.
1436 2008-06-18 Daniel Kraft <d@domob.eu>
1438 PR fortran/36517, fortran/36492
1439 * array.c (gfc_resolve_character_array_constructor): Call
1440 gfc_set_constant_character_len with changed length-chec argument.
1441 * decl.c (gfc_set_constant_character_len): Changed array argument to
1442 be a generic length-checking argument that can be used for correct
1443 checking with typespec and in special cases where the should-be length
1444 is different from the target length.
1445 (build_struct): Call gfc_set_constant_character_len with changed length
1446 checking argument and introduced additional checks for exceptional
1447 conditions on invalid code.
1448 (add_init_expr_to_sym), (do_parm): Call gfc_set_constant_character_len
1449 with changed argument.
1450 * match.h (gfc_set_constant_character_len): Changed third argument to
1451 int for the should-be length rather than bool.
1453 2008-06-17 Daniel Kraft <d@domob.eu>
1456 * array.c (gfc_resolve_character_array_constructor): Check that all
1457 elements with constant character length have the same one rather than
1458 fixing it if no typespec is given, emit an error if they don't. Changed
1459 return type to "try" and return FAILURE for the case above.
1460 (gfc_resolve_array_constructor): Removed unneeded call to
1461 gfc_resolve_character_array_constructor in this function.
1462 * gfortran.h (gfc_resolve_character_array_constructor): Returns try.
1463 * trans-array.c (get_array_ctor_strlen): Return length of first element
1464 rather than last element.
1465 * resolve.c (gfc_resolve_expr): Handle FAILURE return from
1466 gfc_resolve_character_array_constructor.
1468 2008-06-17 Paul Thomas <pault@gcc.gnu.org>
1471 * resolve.c (add_dt_to_dt_list): New function.
1472 (resolve_fl_derived): Call new function for pointer components
1473 and when derived type resolved.
1475 2008-06-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1478 * trans-decl.c (gfc_generate_function_code): Add range_check to options
1481 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1483 * gfc-internals.texi: Expand TABs, drop indentation outside examples.
1484 * gfortran.texi: Likewise.
1485 * intrinsic.texi: Likewise.
1486 * invoke.texi: Likewise.
1488 2008-06-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1491 * trans-io.c (gfc_build_io_library_fndecls): Build declaration for
1492 transfer_character_wide which includes passing in the character kind to
1493 support wide character IO. (transfer_expr): If the kind == 4, create the
1494 argument and build the call.
1495 * gfortran.texi: Fix typo.
1497 2008-06-13 Tobias Burnus <burnus@net-b.de>
1500 * decl.c (do_parm): Handle init expression for len=*.
1502 2008-06-12 Tobias Burnus <burnus@net-b.de>
1505 * trans-intrinsic.c (gfc_conv_intrinsic_index_scan_verify):
1506 Fix passing of the BACK= argument.
1508 2008-06-10 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1510 * cpp.c: Add copyright notice.
1511 * cpp.h: Add copyright notice.
1513 2008-06-08 Janus Weil <janus@gcc.gnu.org>
1516 * decl.c (match_procedure_decl): Correctly recognize if the interface
1517 is an intrinsic procedure.
1519 2008-06-08 Tobias Burnus <burnus@net-b.de>
1522 * resolve.c (resolve_symbol): Copy more attributes for
1523 PROCEDUREs with interfaces.
1525 2008-06-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1529 * io.c (check_format): Add new error message for zero width.
1530 Use new error message for FMT_A and with READ, FMT_G. Allow
1531 FMT_G with WRITE except when -std=F95 and -std=F2003.
1533 2008-06-07 Tobias Burnus <burnus@net-b.de>
1536 * intrinsic.c (add_functions): Implement c_sizeof.
1537 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Do not
1538 create unneeded variable in the scalar case.
1539 * intrinsic.texi: Add C_SIZEOF documentation.
1541 2008-06-06 Tobias Burnus <burnus@net-b.de>
1543 * intrinsic.texi (BESSEL_J1): Fix BES(S)EL_J1 typo.
1545 2008-06-06 Jakub Jelinek <jakub@redhat.com>
1547 * scanner.c (skip_free_comments, skip_fixed_comments): Handle tabs.
1548 * parse.c (next_free): Allow tab after !$omp.
1549 (decode_omp_directive): Handle !$omp task, !$omp taskwait
1551 (case_executable): Add ST_OMP_TASKWAIT.
1552 (case_exec_markers): Add ST_OMP_TASK.
1553 (gfc_ascii_statement): Handle ST_OMP_TASK, ST_OMP_END_TASK and
1555 (parse_omp_structured_block, parse_executable): Handle ST_OMP_TASK.
1556 * gfortran.h (gfc_find_sym_in_expr): New prototype.
1557 (gfc_statement): Add ST_OMP_TASK, ST_OMP_END_TASK and ST_OMP_TASKWAIT.
1558 (gfc_omp_clauses): Add OMP_SCHED_AUTO to sched_kind,
1559 OMP_DEFAULT_FIRSTPRIVATE to default_sharing. Add collapse and
1561 (gfc_exec_op): Add EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
1562 * f95-lang.c (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1563 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP, LANG_HOOKS_OMP_CLAUSE_DTOR,
1564 LANG_HOOKS_OMP_PRIVATE_OUTER_REF): Define.
1565 * trans.h (gfc_omp_clause_default_ctor): Add another argument.
1566 (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
1567 gfc_omp_clause_dtor, gfc_omp_private_outer_ref): New prototypes.
1568 * types.def (BT_ULONGLONG, BT_PTR_ULONGLONG,
1569 BT_FN_BOOL_ULONGLONGPTR_ULONGLONGPTR,
1570 BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULLPTR_ULLPTR,
1571 BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULL_ULLPTR_ULLPTR,
1572 BT_FN_VOID_PTR_PTR, BT_PTR_FN_VOID_PTR_PTR,
1573 BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): New.
1574 (BT_BOOL): Use integer type with BOOL_TYPE_SIZE rather
1575 than boolean_type_node.
1576 * dump-parse-tree.c (gfc_show_omp_node): Handle EXEC_OMP_TASK,
1577 EXEC_OMP_TASKWAIT, OMP_SCHED_AUTO, OMP_DEFAULT_FIRSTPRIVATE,
1578 untied and collapse clauses.
1579 (gfc_show_code_node): Handle EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
1580 * trans.c (gfc_trans_code): Handle EXEC_OMP_TASK and
1582 * st.c (gfc_free_statement): Likewise.
1583 * resolve.c (gfc_resolve_blocks, resolve_code): Likewise.
1584 (find_sym_in_expr): Rename to...
1585 (gfc_find_sym_in_expr): ... this. No longer static.
1586 (resolve_allocate_expr, resolve_ordinary_assign): Adjust caller.
1587 * match.h (gfc_match_omp_task, gfc_match_omp_taskwait): New
1589 * openmp.c (resolve_omp_clauses): Allow allocatable arrays in
1590 firstprivate, lastprivate, reduction, copyprivate and copyin
1592 (omp_current_do_code): Made static.
1593 (omp_current_do_collapse): New variable.
1594 (gfc_resolve_omp_do_blocks): Compute omp_current_do_collapse,
1595 clear omp_current_do_code and omp_current_do_collapse on return.
1596 (gfc_resolve_do_iterator): Handle collapsed do loops.
1597 (resolve_omp_do): Likewise, diagnose errorneous collapsed do loops.
1598 (OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED): Define.
1599 (gfc_match_omp_clauses): Handle default (firstprivate),
1600 schedule (auto), untied and collapse (n) clauses.
1601 (OMP_DO_CLAUSES): Add OMP_CLAUSE_COLLAPSE.
1602 (OMP_TASK_CLAUSES): Define.
1603 (gfc_match_omp_task, gfc_match_omp_taskwait): New functions.
1604 * trans-openmp.c (gfc_omp_private_outer_ref): New function.
1605 (gfc_omp_clause_default_ctor): Add outer argument. For allocatable
1606 arrays allocate them with the bounds of the outer var if outer
1608 (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
1609 gfc_omp_clause_dtor): New functions.
1610 (gfc_trans_omp_array_reduction): If decl is allocatable array,
1611 allocate it with outer var's bounds in OMP_CLAUSE_REDUCTION_INIT
1612 and deallocate it in OMP_CLAUSE_REDUCTION_MERGE.
1613 (gfc_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
1614 for assumed-size arrays.
1615 (gfc_trans_omp_do): Add par_clauses argument. If dovar is
1616 present in lastprivate clause and do loop isn't simple,
1617 set OMP_CLAUSE_LASTPRIVATE_STMT. If dovar is present in
1618 parallel's lastprivate clause, change it to shared and add
1619 lastprivate clause to OMP_FOR_CLAUSES. Handle collapsed do loops.
1620 (gfc_trans_omp_directive): Adjust gfc_trans_omp_do callers.
1621 (gfc_trans_omp_parallel_do): Likewise. Move collapse clause to
1622 OMP_FOR from OMP_PARALLEL.
1623 (gfc_trans_omp_clauses): Handle OMP_SCHED_AUTO,
1624 OMP_DEFAULT_FIRSTPRIVATE, untied and collapse clauses.
1625 (gfc_trans_omp_task, gfc_trans_omp_taskwait): New functions.
1626 (gfc_trans_omp_directive): Handle EXEC_OMP_TASK and
1629 2008-06-04 Janus Weil <janus@gcc.gnu.org>
1633 * resolve.c (resolve_symbol): Correctly copy the interface for a
1634 PROCEDURE declaration.
1636 2008-06-02 Janus Weil <janus@gcc.gnu.org>
1639 * symbol.c (gfc_add_allocatable,gfc_add_dimension,
1640 gfc_add_explicit_interface): Added checks.
1641 * decl.c (attr_decl1): Added missing "var_locus".
1642 * parse.c (parse_interface): Checking for errors.
1644 2008-06-02 Daniel Kraft <d@domob.eu>
1646 * gfortran.h: New statement-type ST_FINAL for FINAL declarations.
1647 (struct gfc_symbol): New member f2k_derived.
1648 (struct gfc_namespace): New member finalizers, for use in the above
1649 mentioned f2k_derived namespace.
1650 (struct gfc_finalizer): New type defined for finalizers linked list.
1651 * match.h (gfc_match_final_decl): New function header.
1652 * decl.c (gfc_match_derived_decl): Create f2k_derived namespace on
1653 constructed symbol node.
1654 (gfc_match_final_decl): New function to match a FINAL declaration line.
1655 * parse.c (decode_statement): match-call for keyword FINAL.
1656 (parse_derived): Parse CONTAINS section and accept FINAL statements.
1657 * resolve.c (gfc_resolve_finalizers): New function to resolve (that is
1658 in this case, check) a list of finalizer procedures.
1659 (resolve_fl_derived): Call gfc_resolve_finalizers here.
1660 * symbol.c (gfc_get_namespace): Initialize new finalizers to NULL.
1661 (gfc_free_namespace): Free finalizers list.
1662 (gfc_new_symbol): Initialize new f2k_derived to NULL.
1663 (gfc_free_symbol): Free f2k_derived namespace.
1664 (gfc_free_finalizer): New function to free a single gfc_finalizer node.
1665 (gfc_free_finalizer_list): New function to free a linked list of
1666 gfc_finalizer nodes.
1668 2008-06-02 Daniel Franke <franke.daniel@gmail.com>
1672 * cpp.c (gfc_cpp_init): Do not initialize builtins if
1673 processing already preprocessed input.
1674 (gfc_cpp_preprocess): Finalize output with newline.
1676 2008-05-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1678 * intrinsic.texi: Revert wrong commit.
1680 2008-05-31 Steven G. Kargl <kargls@comcast.net>
1682 * arith.c (gfc_arith_init_1): Remove now unused r and c variables.
1683 Cleanup numerical inquiry function initialization.
1684 (gfc_arith_done_1): Replace multiple mpfr_clear() invocations with
1685 a single mpfr_clears().
1686 (gfc_check_real_range): Re-arrange logic to eliminate multiple
1687 unnecessary branching and assignments.
1688 (gfc_arith_times): Use mpfr_clears() in preference to multiple
1690 (gfc_arith_divide): Ditto.
1691 (complex_reciprocal): Eliminate now unused variables a, re, im.
1692 Cleanup the mpfr abuse. Use mpfr_clears() in preference to
1693 multiple mpfr_clear().
1694 (complex_pow): Fix comment whitespace. Use mpfr_clears() in
1695 preference to multiple mpfr_clear().
1696 * simplify.c (gfc_simplify_and): Remove blank line.
1697 (gfc_simplify_atan2): Move error checking earlier to eliminate
1698 a now unnecessay gfc_free_expr().
1699 (gfc_simplify_bessel_j0): Remove unnecessary gfc_set_model_kind().
1700 (gfc_simplify_bessel_j1): Ditto.
1701 (gfc_simplify_bessel_jn): Ditto.
1702 (gfc_simplify_bessel_y0): Ditto.
1703 (gfc_simplify_bessel_y1): Ditto.
1704 (gfc_simplify_bessel_yn): Ditto.
1705 (only_convert_cmplx_boz): Eliminate unnecessary duplicate code, and
1706 combine nested if statement rational expressions.
1707 (gfc_simplify_cos): Use mpfr_clears() in preference to multiple
1709 (gfc_simplify_exp): Ditto.
1710 (gfc_simplify_fraction): Move gfc_set_model_kind() to after the
1711 special case of 0. Use mpfr_clears() in preference to multiple
1713 (gfc_simplify_gamma): Eliminate unnecessary gfc_set_model_kind().
1714 (gfc_simplify_lgamma): Ditto.
1715 (gfc_simplify_log10): Ditto.
1716 (gfc_simplify_log): Move gfc_set_model_kind () inside switch
1717 statement. Use mpfr_clears() in preference to multiple mpfr_clear().
1718 (gfc_simplify_mod): Eliminate now unused variables quot, iquot,
1719 and term. Simplify the mpfr magic.
1720 (gfc_simplify_modulo): Ditto.
1721 (gfc_simplify_nearest): Eliminate unnecessary gfc_set_model_kind().
1722 (gfc_simplify_scale): Use mpfr_clears() in preference to multiple
1724 (gfc_simplify_sin): Ditto
1725 (gfc_simplify_sqrt): Ditto
1726 (gfc_simplify_set_exponent): Move gfc_set_model_kind() to after the
1727 special case of 0. Use mpfr_clears() in preference to multiple
1730 2008-05-29 Daniel Franke <franke.daniel@gmail.com>
1733 * Make-lang.in (F95_OBJS): Added dependency on FORTRAN_TARGET_OBJS.
1735 2008-05-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1737 * scanner.c (load_line): Add first_char argument. Don't call ungetc.
1738 (gfc_read_orig_filename): Adjust call to load_line. Don't call
1740 (load_file): Adjust call to load_line.
1742 2008-05-28 Janus Weil <janus@gcc.gnu.org>
1746 * interface.c (gfc_procedure_use): Enable argument checking for
1747 external procedures with explicit interface.
1748 * symbol.c (check_conflict): Fix conflict checking for externals.
1749 (copy_formal_args): Fix handling of arrays.
1750 * resolve.c (resolve_specific_f0, resolve_specific_s0): Fix handling
1752 * parse.c (parse_interface): Non-abstract INTERFACE statement implies
1755 2008-05-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1758 * intrinsic.c (gfc_convert_chartype): Don't mark conversion
1760 * trans-array.c (gfc_trans_array_ctor_element): Divide element
1761 size by the size of one character to obtain length.
1762 * iresolve.c (gfc_resolve_cshift): Call the _char4 variant when
1764 (gfc_resolve_eoshift): Likewise.
1765 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Minor beautification.
1766 (gfc_conv_intrinsic_fdate): Minor beautification.
1767 (gfc_conv_intrinsic_ttynam): Minor beautification.
1768 (gfc_conv_intrinsic_minmax_char): Allow all character kinds.
1769 (size_of_string_in_bytes): New function.
1770 (gfc_conv_intrinsic_size): Call size_of_string_in_bytes for
1771 character expressions.
1772 (gfc_conv_intrinsic_sizeof): Likewise.
1773 (gfc_conv_intrinsic_array_transfer): Likewise.
1774 (gfc_conv_intrinsic_trim): Allow all character kinds. Minor
1776 (gfc_conv_intrinsic_repeat): Fix comment typo.
1777 * simplify.c (gfc_convert_char_constant): Take care of conversion
1778 of array constructors.
1780 2008-05-27 Tobias Burnus <burnus@net-b.de>
1783 * trans-array.c (gfc_set_loop_bounds_from_array_spec):
1784 Add missing fold_convert.
1786 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
1788 * fortran/cpp.c (cpp_define_builtins): Remove usage of TARGET_* macros,
1789 added FIXME instead.
1791 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
1794 * lang.opt (A, C, CC, D, E, H, P, U, cpp, d, fworking-directory,
1795 imultilib, iprefix, iquote, isysroot, isystem, nocpp, nostdinc,
1796 o, undef, v): New options.
1797 * options.c (gfc_init_options): Also initialize preprocessor
1799 (gfc_post_options): Also handle post-initialization of preprocessor
1801 (gfc_handle_option): Check if option is a preprocessor option.
1802 If yes, let gfc_cpp_handle_option() handle the option.
1803 * lang-specs.h: Reorganized to handle new options.
1804 * scanner.c (gfc_new_file): Read temporary file instead of
1805 input source if preprocessing is enabled.
1806 * f95-lang.c (gfc_init): Initialize preprocessor.
1807 (gfc_finish): Clean up preprocessor.
1810 * Make-lang.in: Added new objects and dependencies.
1811 * gfortran.texi: Updated section "Preprocessing and
1812 conditional compilation".
1813 * invoke.texi: Added new section "Preprocessing Options",
1814 listed and documented the preprocessing options handled
1817 2008-05-25 Tobias Burnus <burnus@net-b.de>
1820 * trans-expr.c (gfc_conv_function_call): Remove library
1821 call for c_f_pointer with scalar Fortran pointers and for
1824 2008-05-21 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1827 * iresolve.c (check_charlen_present): Don't force the rank to 1.
1829 2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1832 * trans-expr.c (gfc_conv_string_tmp): Pick the correct type for
1833 the temporary variable.
1835 2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1837 * simplify.c (gfc_simplify_dble, gfc_simplify_real): Initialize
1838 result variable to avoid warnings.
1840 2008-05-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1842 * intrinsic.c (char_conversions, ncharconv): New static variables.
1843 (find_char_conv): New function.
1844 (add_functions): Add simplification functions for ADJUSTL and
1845 ADJUSTR. Don't check the kind of their argument. Add checking for
1846 LGE, LLE, LGT and LLT.
1847 (add_subroutines): Fix argument type for SLEEP. Fix argument name
1849 (add_char_conversions): New function.
1850 (gfc_intrinsic_init_1): Call add_char_conversions.
1851 (gfc_intrinsic_done_1): Free char_conversions.
1852 (check_arglist): Use kind == 0 as a signal that we don't want
1853 the kind value to be checked.
1854 (do_simplify): Also simplify character functions.
1855 (gfc_convert_chartype): New function
1856 * trans-array.c (gfc_trans_array_ctor_element): Don't force the
1857 use of default character type.
1858 (gfc_trans_array_constructor_value): Likewise.
1859 (get_array_ctor_var_strlen): Use integer kind to build an integer
1860 instead of a character kind!
1861 (gfc_build_constant_array_constructor): Don't force the use of
1862 default character type.
1863 (gfc_conv_loop_setup): Likewise.
1864 * trans-expr.c (gfc_conv_string_tmp): Don't force the use of
1865 default character type. Allocate enough memory for wide strings.
1866 (gfc_conv_concat_op): Make sure operand kind are the same.
1867 (string_to_single_character): Remove gfc_ prefix. Reindent.
1868 Don't force the use of default character type.
1869 (gfc_conv_scalar_char_value): Likewise.
1870 (gfc_build_compare_string): Call string_to_single_character.
1871 (fill_with_spaces): New function
1872 (gfc_trans_string_copy): Add kind arguments. Use them to deal
1873 with wide character kinds.
1874 (gfc_conv_statement_function): Whitespace fix. Call
1875 gfc_trans_string_copy with new kind arguments.
1876 (gfc_conv_substring_expr): Call gfc_build_wide_string_const
1877 instead of using gfc_widechar_to_char.
1878 (gfc_conv_string_parameter): Don't force the use of default
1880 (gfc_trans_scalar_assign): Pass kind args to gfc_trans_string_copy.
1881 * intrinsic.h (gfc_check_lge_lgt_lle_llt, gfc_convert_char_constant,
1882 gfc_resolve_adjustl, gfc_resolve_adjustr): New prototypes.
1883 * decl.c (gfc_set_constant_character_len): Don't assert the
1884 existence of a single character kind.
1885 * trans-array.h (gfc_trans_string_copy): New prototype.
1886 * gfortran.h (gfc_check_character_range, gfc_convert_chartype):
1888 * error.c (print_wide_char_into_buffer): New function lifting
1889 code from gfc_print_wide_char. Fix order to output '\x??' instead
1891 (gfc_print_wide_char): Call print_wide_char_into_buffer.
1892 (show_locus): Call print_wide_char_into_buffer with buffer local
1894 * trans-const.c (gfc_build_wide_string_const): New function.
1895 (gfc_conv_string_init): Deal with wide characters strings
1897 (gfc_conv_constant_to_tree): Call gfc_build_wide_string_const.
1898 * trans-stmt.c (gfc_trans_label_assign): Likewise.
1899 (gfc_trans_character_select): Deal with wide strings.
1900 * expr.c (gfc_check_assign): Allow conversion between character
1901 kinds on assignment.
1902 * trans-const.h (gfc_build_wide_string_const): New prototype.
1903 * trans-types.c (gfc_get_character_type_len_for_eltype,
1904 gfc_get_character_type_len): Create too variants of the old
1905 gfc_get_character_type_len, one getting kind argument and the
1906 other one directly taking a type tree.
1907 * trans.h (gfor_fndecl_select_string_char4,
1908 gfor_fndecl_convert_char1_to_char4,
1909 gfor_fndecl_convert_char4_to_char1): New prototypes.
1910 * trans-types.h (gfc_get_character_type_len_for_eltype): New
1912 * resolve.c (resolve_operator): Exit early when kind mismatches
1913 are detected, because that makes us issue an error message later.
1914 (validate_case_label_expr): Fix wording of error message.
1915 * iresolve.c (gfc_resolve_adjustl, gfc_resolve_adjustr): New
1917 (gfc_resolve_pack): Call _char4 variants of library function
1918 when dealing with wide characters.
1919 (gfc_resolve_reshape): Likewise.
1920 (gfc_resolve_spread): Likewise.
1921 (gfc_resolve_transpose): Likewise.
1922 (gfc_resolve_unpack): Likewise.
1923 * target-memory.c (size_character): Take character kind bit size
1924 correctly into account (not that it changes anything for now, but
1926 (gfc_encode_character): Added gfc_ prefix. Encoding each
1927 character of a string by calling native_encode_expr for the
1928 corresponding unsigned integer.
1929 (gfc_target_encode_expr): Add gfc_ prefix to encode_character.
1930 * trans-decl.c (gfc_build_intrinsic_function_decls): Build
1931 gfor_fndecl_select_string_char4, gfor_fndecl_convert_char1_to_char4
1932 and gfor_fndecl_convert_char4_to_char1.
1933 * target-memory.h (gfc_encode_character): New prototype.
1934 * arith.c (gfc_check_character_range): New function.
1935 (eval_intrinsic): Allow non-default character kinds.
1936 * check.c (gfc_check_access_func): Only allow default
1937 character kind arguments.
1938 (gfc_check_chdir): Likewise.
1939 (gfc_check_chdir_sub): Likewise.
1940 (gfc_check_chmod): Likewise.
1941 (gfc_check_chmod_sub): Likewise.
1942 (gfc_check_lge_lgt_lle_llt): New function.
1943 (gfc_check_link): Likewise.
1944 (gfc_check_link_sub): Likewise.
1945 (gfc_check_symlnk): Likewise.
1946 (gfc_check_symlnk_sub): Likewise.
1947 (gfc_check_rename): Likewise.
1948 (gfc_check_rename_sub): Likewise.
1949 (gfc_check_fgetputc_sub): Likewise.
1950 (gfc_check_fgetput_sub): Likewise.
1951 (gfc_check_stat): Likewise.
1952 (gfc_check_stat_sub): Likewise.
1953 (gfc_check_date_and_time): Likewise.
1954 (gfc_check_ctime_sub): Likewise.
1955 (gfc_check_fdate_sub): Likewise.
1956 (gfc_check_gerror): Likewise.
1957 (gfc_check_getcwd_sub): Likewise.
1958 (gfc_check_getarg): Likewise.
1959 (gfc_check_getlog): Likewise.
1960 (gfc_check_hostnm): Likewise.
1961 (gfc_check_hostnm_sub): Likewise.
1962 (gfc_check_ttynam_sub): Likewise.
1963 (gfc_check_perror): Likewise.
1964 (gfc_check_unlink): Likewise.
1965 (gfc_check_unlink_sub): Likewise.
1966 (gfc_check_system_sub): Likewise.
1967 * primary.c (got_delim): Perform correct character range checking
1969 * trans-intrinsic.c (gfc_conv_intrinsic_conversion): Generate
1970 calls to library functions convert_char4_to_char1 and
1971 convert_char1_to_char4 for character conversions.
1972 (gfc_conv_intrinsic_char): Allow all character kings.
1973 (gfc_conv_intrinsic_strcmp): Fix whitespace.
1974 (gfc_conv_intrinsic_repeat): Take care of all character kinds.
1975 * intrinsic.texi: For all GNU intrinsics accepting character
1976 arguments, mention that they're restricted to the default kind.
1977 * simplify.c (simplify_achar_char): New function.
1978 (gfc_simplify_achar, gfc_simplify_char): Call simplify_achar_char.
1979 gfc_simplify_ichar): Don't error out for wide characters.
1980 (gfc_convert_char_constant): New function.
1982 2008-05-18 Steven G. Kargl <kargls@comcast.net>
1985 * symbol.c (check_conflict): Issue errors for abuse of PUBLIC, PRIVATE,
1987 * resolve.c (gfc_verify_binding_labels): Fix NULL pointer dereference.
1989 2008-05-17 Tobias Burnus <burnus@net-b.de>
1991 * intrinsic.texi: Correct description of GET_COMMAND_ARGUMENT
1992 and GET_ENVIRONMENT_VARIABLE; fix keyword= name for GETENV,
1993 GETLOG, GMTIME, HOSTNM, IRAND, ITIME, KILL.
1994 Move LOG_GAMMA after LOG10.
1996 2008-05-17 Tobias Burnus <burnus@net-b.de>
1998 * intrinsic.c (add_functions): Change FLUSH(C) to FLUSH(UNIT).
1999 * intrinsic.texi: Change INTEGER(*) to INTEGER; fix keyword= name for
2000 ABS, ADJUSTL, AINT, ALLOCATED, ANINT, ASSOCIATED, C_ASSOCIATED,
2001 CEILING, DBLE, DFLOAT, DOT_PRODUCT, DREAL, FLOAT, FLOOR, GET_COMMAND.
2003 2008-05-16 Paul Thomas <pault@gcc.gnu.org>
2007 * trans-stmt.c (gfc_trans_where): Tighten up the dependency
2008 check for calling gfc_trans_where_3.
2011 * trans-stmt.c (gfc_trans_where_2): Set the mask size to zero
2012 if it is calculated to be negative.
2015 * trans-stmt.c (gfc_trans_where_3, gfc_trans_where_assign): Set
2016 ss->where for scalar right hand sides.
2017 * trans-array.c (gfc_add_loop_ss_code): If ss->where is set do
2018 not evaluate scalars outside the loop. Clean up whitespace.
2019 * trans.h : Add a bitfield 'where' to gfc_ss.
2021 2008-05-16 Tobias Burnus <burnus@net-b.de>
2023 * libgfortran.h: Increase GFC_MAX_DIMENSIONS to 15.
2024 * array.c (gfc_match_array_spec): Error with -std=f2003 if rank > 7.
2026 2008-04-16 Daniel Kraft <d@domob.eu>
2029 * gfortran.h: Added field "length_from_typespec" to gfc_charlength.
2030 * aray.c (gfc_match_array_constructor): Added code to parse typespec.
2031 (check_element_type, check_constructor_type, gfc_check_constructor_type):
2032 Extended to support explicit typespec on constructor.
2033 (gfc_resolve_character_array_constructor): Pad strings correctly for
2034 explicit, constant character length.
2035 * trans-array.c: New static global variable "typespec_chararray_ctor"
2036 (gfc_trans_array_constructor): New code to support explicit but dynamic
2039 2008-05-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2042 * decl.c (match_attr_spec): Check for matching pairs of parenthesis.
2043 * expr.c (gfc_specification_expr): Supplement the error message with the
2044 type that was found.
2045 * resolve.c (gfc_resolve_index): Likewise.
2046 * match.c (gfc_match_parens): Clarify error message with "at or before".
2047 (gfc_match_do): Check for matching pairs of parenthesis.
2049 2008-05-16 Tobias Burnus <burnus@net-b.de
2051 * intrinsic.texi: Write Fortran 77/90/95 instead of F77/90/95;
2052 add missing KIND argument to ACHAR and NINT; and state that
2053 the KIND argument is a F2003 extension for ACHAR, COUNT, IACHAR,
2054 ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND, VERIFY.
2056 2008-05-16 Daniel Kraft <d@domob.eu>
2058 * primary.c: New private structure "gfc_structure_ctor_component".
2059 (gfc_free_structure_ctor_component): New helper function.
2060 (gfc_match_structure_constructor): Extended largely to support named
2061 arguments and default initialization for structure constructors.
2063 2008-05-15 Steven G. Kargl <kargls@comcast.net>
2065 * simplify.c (gfc_simplify_dble, gfc_simplify_float,
2066 simplify_bound, gfc_simplify_nearest, gfc_simplify_real): Plug
2067 possible memory leaks.
2068 (gfc_simplify_reshape): Plug possible memory leaks and dereferencing
2071 2008-05-15 Steven G. Kargl <kargls@comcast.net>
2074 * simplify.c (gfc_simplify_int, gfc_simplify_intconv): Replaced hand
2075 rolled integer conversion with gfc_int2int, gfc_real2int, and
2077 (gfc_simplify_intconv): Renamed to simplify_intconv.
2079 2008-05-15 Steven G. Kargl, <kargl@comcast.net>
2080 * gfortran.dg/and_or_xor.f90: New test
2082 * fortran/simplify.c (gfc_simplify_and, gfc_simplify_or,
2083 gfc_simplify_xor): Don't range check logical results.
2085 2008-05-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2087 * trans-expr.c (gfc_conv_concat_op): Take care of nondefault
2089 (gfc_build_compare_string): Add kind argument and use it.
2090 (gfc_conv_statement_function): Fix indentation.
2091 * gfortran.h (gfc_character_info): New structure.
2092 (gfc_character_kinds): New array.
2093 * trans-types.c (gfc_character_kinds, gfc_character_types,
2094 gfc_pcharacter_types): New array.
2095 (gfc_init_kinds): Fill character kinds array.
2096 (validate_character): Take care of nondefault character kinds.
2097 (gfc_build_uint_type): New function.
2098 (gfc_init_types): Take care of nondefault character kinds.
2099 (gfc_get_char_type, gfc_get_pchar_type): New functions.
2100 (gfc_get_character_type_len): Use gfc_get_char_type.
2101 * trans.h (gfc_build_compare_string): Adjust prototype.
2102 (gfor_fndecl_compare_string_char4, gfor_fndecl_concat_string_char4,
2103 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
2104 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
2105 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
2106 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4): New
2108 * trans-types.h (gfc_get_char_type, gfc_get_pchar_type): New
2110 * trans-decl.c (gfor_fndecl_compare_string_char4,
2111 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
2112 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
2113 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
2114 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4,
2115 gfor_fndecl_concat_string_char4): New function decls.
2116 (gfc_build_intrinsic_function_decls): Define new *_char4 function
2118 * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char,
2119 gfc_conv_intrinsic_len_trim, gfc_conv_intrinsic_ichar,
2120 gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_trim,
2121 gfc_conv_intrinsic_function): Deal with nondefault character kinds.
2123 2008-05-15 Sa Liu <saliu@de.ibm.com>
2125 * iso-c-binding.def: Add standard parameter to macro NAMED_INTCST.
2126 All existing NAMED_INTCST definitions has standard GFC_STD_F2003,
2127 c_int128_t, c_int_least128_t and c_int_fast128_t are added as
2129 * iso-fortran-evn.def: Add standard parameter GFC_STD_F2003
2130 to macro NAMED_INTCST.
2131 * symbol.c (std_for_isocbinding_symbol): New helper function to
2132 return the standard that supports this isocbinding symbol.
2133 (generate_isocbinding_symbol): Do not generate GNU extension symbols
2134 if std=f2003. Add new parameter to NAMED_INTCST.
2135 * module.c (use_iso_fortran_env_module): Add new parameter to
2136 NAMED_INTCST and new field standard to struct intmod_sym.
2137 * gfortran.h: Add new parameter to NAMED_INTCST.
2138 * trans-types.c (init_c_interop_kinds): Add new parameter to
2140 * intrinsic.texi: Documented new types C_INT128_T, C_INT_LEASE128_T
2141 and C_INT_FAST128_T.
2143 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2146 * trans-decl.c (gfc_build_dummy_array_decl): Don't repack
2147 arrays that have the TARGET attribute.
2149 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2152 * simplify.c (only_convert_cmplx_boz): New function.
2153 (gfc_simplify_cmplx, gfc_simplify_complex, gfc_simplify_dcmplx):
2154 Call only_convert_cmplx_boz.
2156 2008-05-14 Paul Thomas <pault@gcc.gnu.org>
2159 * interface.c (compare_actual_formal): Do not check sizes if the
2160 actual is BT_PROCEDURE.
2162 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2165 * trans-array.c (gfc_conv_ss_startstride): Any negative size is
2166 the same as zero size.
2167 (gfc_conv_loop_setup): Fix size calculation.
2169 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2172 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Correctly
2173 handle zero-size sections.
2175 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2178 * scanner.c (preprocessor_line): Allocate enough memory for a
2181 2008-05-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2184 * target-memory.c (gfc_target_expr_size): Correctly treat
2186 (gfc_target_encode_expr): Likewise.
2187 (gfc_interpret_complex): Whitespace change.
2189 2008-05-11 Thomas Koenig <tkoenig@gcc.gnu.org>
2192 * trans.c (gfc_call_malloc): If size equals zero, allocate one
2193 byte; don't return a null pointer.
2195 2008-05-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2198 * module.c (quote_string): Fix sprintf format.
2200 2008-05-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2203 * module.c (quote_string, unquote_string,
2204 mio_allocated_wide_string): New functions.
2205 (mio_expr): Call mio_allocated_wide_string where needed.
2207 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
2209 * trans-decl.c (gfc_get_extern_function_decl, build_function_decl):
2210 Rename DECL_IS_PURE to DECL_PURE_P.
2212 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2214 * arith.c: (gfc_arith_concat, gfc_compare_string,
2215 gfc_compare_with_Cstring, hollerith2representation,
2216 gfc_hollerith2int, gfc_hollerith2real, gfc_hollerith2complex,
2217 gfc_hollerith2character, gfc_hollerith2logical): Use wide
2218 characters for character constants.
2219 * data.c (create_character_intializer): Likewise.
2220 * decl.c (gfc_set_constant_character_len): Likewise.
2221 * dump-parse-tree.c (show_char_const): Correctly dump wide
2223 error.c (print_wide_char): Rename into gfc_print_wide_char.
2224 (show_locus): Adapt to new prototype of gfc_print_wide_char.
2225 expr.c (free_expr0): Representation is now disjunct from
2226 character string value, so we always free it.
2227 (gfc_copy_expr, find_substring_ref, gfc_simplify_expr): Adapt
2228 to wide character strings.
2229 * gfortran.h (gfc_expr): Make value.character.string a wide string.
2230 (gfc_wide_toupper, gfc_wide_strncasecmp, gfc_wide_memset,
2231 gfc_widechar_to_char, gfc_char_to_widechar): New prototypes.
2232 (gfc_get_wide_string): New macro.
2233 (gfc_print_wide_char): New prototype.
2234 * io.c (format_string): Make a wide string.
2235 (next_char, gfc_match_format, compare_to_allowed_values,
2236 gfc_match_open): Deal with wide strings.
2237 * module.c (mio_expr): Convert between wide strings and ASCII ones.
2238 * primary.c (match_hollerith_constant, match_charkind_name):
2239 Handle wide strings.
2240 * resolve.c (build_default_init_expr): Likewise.
2241 * scanner.c (gfc_wide_toupper, gfc_wide_memset,
2242 gfc_char_to_widechar): New functions.
2243 (wide_strchr, gfc_widechar_to_char, gfc_wide_strncasecmp):
2244 Changes in prototypes.
2245 (gfc_define_undef_line, load_line, preprocessor_line,
2246 include_line, load_file, gfc_read_orig_filename): Handle wide
2248 * simplify.c (gfc_simplify_achar, gfc_simplify_adjustl,
2249 gfc_simplify_adjustr, gfc_simplify_char, gfc_simplify_iachar,
2250 gfc_simplify_ichar, simplify_min_max, gfc_simplify_new_line,
2251 gfc_simplify_repeat): Handle wide strings.
2252 (wide_strspn, wide_strcspn): New helper functions.
2253 (gfc_simplify_scan, gfc_simplify_trim, gfc_simplify_verify):
2254 Handle wide strings.
2255 * symbol.c (generate_isocbinding_symbol): Likewise.
2256 * target-memory.c (size_character, gfc_target_expr_size,
2257 encode_character, gfc_target_encode_expr, gfc_interpret_character,
2258 gfc_target_interpret_expr): Handle wide strings.
2259 * trans-const.c (gfc_conv_string_init): Lower wide strings to
2261 (gfc_conv_constant_to_tree): Likewise.
2262 * trans-expr.c (gfc_conv_substring_expr): Handle wide strings.
2263 * trans-io.c (gfc_new_nml_name_expr): Likewise.
2264 * trans-stmt.c (gfc_trans_label_assign): Likewise.
2266 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2268 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
2269 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
2270 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): Mark arguments
2271 with ATTRIBUTE_UNUSED.
2273 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2275 * check.c (gfc_check_sizeof): Switch to ATTRIBUTE_UNUSED.
2276 * simplify.c (gfc_simplify_lgamma): Likewise.
2278 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2280 * openmp.c (gfc_match_omp_eos): Use gfc_next_ascii_char and
2281 gfc_peek_ascii_char.
2282 * decl.c (gfc_match_kind_spec, gfc_match_type_spec,
2283 gfc_match_implicit_none, match_implicit_range, gfc_match_implicit,
2284 match_string_p, match_attr_spec, gfc_match_suffix,
2285 match_procedure_decl, gfc_match_entry, gfc_match_subroutine):
2287 * gfortran.h (gfc_char_t): New type.
2288 (gfc_linebuf): Make line member a gfc_char_t.
2289 (locus): Make nextc member a gfc_char_t.
2290 (gfc_wide_is_printable, gfc_wide_is_digit, gfc_wide_fits_in_byte,
2291 gfc_wide_tolower, gfc_wide_strlen, gfc_next_ascii_char,
2292 gfc_peek_ascii_char, gfc_check_digit): New prototypes.
2293 * error.c (print_wide_char): New function.
2294 (show_locus): Use print_wide_char and gfc_wide_strlen.
2295 * io.c (next_char): Use gfc_char_t type.
2296 (match_io): Use gfc_peek_ascii_char and gfc_next_ascii_char.
2297 * match.c (gfc_match_parens, gfc_match_eos,
2298 gfc_match_small_literal_int, gfc_match_name, gfc_match_name_C,
2299 gfc_match_intrinsic_op, gfc_match_char, gfc_match_return,
2300 gfc_match_common): Likewise.
2301 * match.h (gfc_match_special_char): Change prototype.
2302 * parse.c (decode_specification_statement, decode_statement,
2303 decode_omp_directive, next_free, next_fixed): Use
2304 gfc_peek_ascii_char and gfc_next_ascii_char.
2305 * primary.c (gfc_check_digit): Change name.
2306 (match_digits, match_hollerith_constant, match_boz_constant,
2307 match_real_constant, next_string_char, match_charkind_name,
2308 match_string_constant, match_logical_constant_string,
2309 match_complex_constant, match_actual_arg, match_varspec,
2310 gfc_match_rvalue, match_variable): Use gfc_peek_ascii_char and
2311 gfc_next_ascii_char.
2312 * scanner.c (gfc_wide_fits_in_byte, wide_is_ascii,
2313 gfc_wide_is_printable, gfc_wide_tolower, gfc_wide_is_digit,
2314 gfc_wide_is_digit, wide_atoi, gfc_wide_strlen, wide_strcpy,
2315 wide_strchr, widechar_to_char, wide_strncmp, wide_strncasecmp,
2316 gfc_next_ascii_char, gfc_peek_ascii_char):
2318 (next_char, gfc_define_undef_line, skip_free_comments,
2319 gfc_next_char_literal, gfc_next_char, gfc_peek_char,
2320 gfc_error_recovery, load_line, preprocessor_line, include_line,
2321 load_file, gfc_read_orig_filename): Use gfc_char_t for source
2322 characters and the {gfc_,}wide_* functions to manipulate wide
2325 2008-05-06 Tobias Burnus <burnus@net-b.de>
2328 * intrinsic.c (add_functions): Call gfc_simplify_bessel_*.
2329 * intrinsic.h: Add prototypes for gfc_simplify_bessel_*.
2330 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
2331 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
2332 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): New.
2334 2008-05-03 Janus Weil <jaydub66@gmail.com>
2336 * misc.c (gfc_clear_ts): Set interface to NULL.
2338 2008-05-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2341 * gfortran.h: Add extra_comma pointer to gfc_dt structure. Add iokind to
2342 gfc_expr value union. Add io_kind enum to here from io.c.
2343 * io.c (gfc_free_dt): Free extra_comma.
2344 (gfc_resolve_dt): If an extra comma was encountered and io_unit is type
2345 BT_CHARACTER, resolve to format_expr and set default unit. Error if
2346 io_kind is M_WRITE. (match_io): Match the extra comma and set new
2347 pointer, extra_comma.
2349 2008-05-01 Bud Davis <bdavis9659@sbcglobal.net>
2352 * simplify.c (gfc_simplify_index): Check for direction argument
2355 2008-05-01 Janus Weil <jaydub66@gmail.com>
2357 * gfortran.h (struct gfc_symbol): Moving "interface" member to
2358 gfc_typespec (plus fixing a small docu error).
2359 * interface.c (gfc_procedure_use): Ditto.
2360 * decl.c (match_procedure_decl): Ditto.
2361 * resolve.c (resolve_specific_f0,
2362 resolve_specific_f0, resolve_symbol): Ditto.
2364 2008-04-30 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2366 * intrinsic.c (add_functions): Add SELECTED_CHAR_KIND intrinsic.
2367 * intrinsic.h (gfc_check_selected_char_kind,
2368 gfc_simplify_selected_char_kind): New prototypes.
2369 * gfortran.h (gfc_isym_id): Add GFC_ISYM_SC_KIND.
2370 * trans.h (gfor_fndecl_sc_kind): New function decl.
2371 * trans-decl.c (gfor_fndecl_sc_kind): Build new decl.
2372 * arith.c (gfc_compare_with_Cstring): New function.
2373 * arith.h (gfc_compare_with_Cstring): New prototype.
2374 * check.c (gfc_check_selected_char_kind): New function.
2375 * primary.c (match_string_constant, match_kind_param): Mark
2376 symbols used as literal constant kind param as referenced.
2377 * trans-intrinsic.c (gfc_conv_intrinsic_sc_kind): New function.
2378 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_sc_kind.
2379 * intrinsic.texi (SELECTED_CHAR_KIND): Document new intrinsic.
2380 * simplify.c (gfc_simplify_selected_char_kind): New function.
2382 2008-04-28 Paul Thomas <pault@gcc.gnu.org>
2385 * module.c (find_symbol): Do not return a result for a symbol
2386 that has been renamed in another module.
2388 2008-04-26 George Helffrich <george@gcc.gnu.org>
2392 * trans-common.c (create_common): Add decl to function
2393 chain (if inside one) to preserve identifier scope in debug output.
2395 2008-04-25 Jan Hubicka <jh@suse.cz>
2397 * trans-decl.c (trans_function_start): Update.
2399 2008-04-25 Tobias Burnus <burnus@net-b.de>
2400 Daniel Franke <franke.daniel@gmail.com>
2403 * gfortranspec.c (lang_specific_driver): Deprecate
2404 -M option; fix ICE when "-M" is last argument and
2405 make "-M<dir>" work.
2406 * options.c (gfc_handle_module_path_options):
2407 Use -J instead of -M in error messages.
2408 * invoke.texi: Mark -M as depecated.
2410 2008-04-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2411 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2414 * trans-instrinsic.c (gfc_conv_intrinsic_minmaxloc): Correctly adjust
2415 loop counter offset.
2417 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
2419 * trans-expr.c (gfc_conv_structure): Don't set TREE_INVARIANT.
2420 * trans-array.c (gfc_build_null_descriptor): Don't set TREE_INVARIANT.
2421 (gfc_trans_array_constructor_value): Don't set TREE_INVARIANT.
2422 (gfc_build_constant_array_constructor): Don't set TREE_INVARIANT.
2423 (gfc_conv_array_initializer): Don't set TREE_INVARIANT.
2424 * trans-common.c (get_init_field): Don't set TREE_INVARIANT.
2425 (create_common): Don't set TREE_INVARIANT.
2426 * trans-stmt.c (gfc_trans_character_select): Don't set TREE_INVARIANT.
2427 * trans-decl.c (gfc_generate_function_code): Don't set TREE_INVARIANT.
2429 2008-04-21 Steve Ellcey <sje@cup.hp.com>
2431 * f95-lang.c (gfc_init_decl_processing): use ptr_mode instead of Pmode.
2433 2008-04-21 Daniel Franke <franke.daniel@gmail.com>
2436 * gfortranspec.c (lookup_option): Properly handle separated arguments
2437 in -J option, print missing argument message when necessary.
2439 2008-04-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2442 * scanner.c (skip_fixed_comments): Update continue_line when comment is
2443 detected. (gfc_next_char_literal): Likewise.
2445 2008-04-19 Paul Thomas <pault@gcc.gnu.org>
2450 * trans_array.c (gfc_trans_array_constructor): Temporarily
2451 realign loop, if loop->from is not zero, before creating
2452 the temporary array and provide an offset.
2455 * trans-decl.c (gfc_init_default_dt): Add gfc_ prefix to name
2456 and allow for NULL body. Change all references from
2457 init_default_dt to gfc_init_default_dt.
2458 * trans.h : Add prototype for gfc_init_default_dt.
2459 * trans-array.c (gfc_trans_deferred_vars): After nullification
2460 call gfc_init_default_dt for derived types with allocatable
2463 2008-04-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2466 * trans-common.c (create_common): Revert patch causing regression.
2468 2008-04-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2471 * iresolve.c (gfc_resolve_eoshift): Check for NULL symtree in test for
2472 optional argument attribute.
2474 2008-04-16 Paul Thomas <pault@gcc.gnu.org>
2477 * trans-intrinsic.c (gfc_conv_intrinsic_char): Even though KIND
2478 is not used, the argument must be converted.
2480 2008-04-16 Jakub Jelinek <jakub@redhat.com>
2483 * f95-lang.c (gfc_init_builtin_functions): Make sure
2484 BUILT_IN_SINCOS{,F,L} types aren't varargs.
2486 2008-04-15 Paul Thomas <pault@gcc.gnu.org>
2489 * expr.c (scalarize_intrinsic_call): Reorder identification of
2490 array argument so that if one is not found a segfault does not
2491 occur. Return FAILURE if all scalar arguments.
2493 2008-04-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2494 Tobias Burnus <burnus@net-b.de>
2497 * options.c (gfc_init_options): Set the default maximum continuation
2498 lines to 255 for both free and fixed form source for warnings.
2499 (gfc_handle_option): Set -std=f95 fixed form max continuations to 19 and
2500 the -std=f95 free form max continuations to 39 for warnings.
2501 * scanner.c (gfc_next_char_literal): Adjust the current_line number only
2502 if it is less than the current locus.
2504 2008-04-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2506 PR fortran/25829 28655
2507 * io.c (io_tag): Add new tags for decimal, encoding, asynchronous,
2508 round, sign, and id. (match_open_element): Match new tags.
2509 (gfc_resolve_open): Resolve new tags. (gfc_match_open): Enable encoding
2510 for DEFAULT only. Update error messages. (match_dt_element): Fix match
2511 tag for asynchronous. Update error messages. (gfc_free_inquire): Free
2512 new expressions. (match_inquire_element): Match new tags.
2513 (gfc_match_inquire): Add constraint for ID and PENDING.
2514 (gfc_resolve_inquire): Resolve new tags.
2515 * trans-io.c (gfc_trans_inquire): Clean up whitespace and fix setting of
2516 mask for ID parameter.
2517 * ioparm.def: Fix order of parameters for pending, round, and sign.
2518 NOTE: These must line up with the definitions in libgfortran/io/io.h. or
2521 2008-04-06 Paul Thomas <pault@gcc.gnu.org>
2524 * expr.c (scalarize_intrinsic_call): Identify which argument is
2525 an array and use that as the template.
2526 (check_init_expr): Remove tests that first argument is an array
2527 in the call to scalarize_intrinsic_call.
2529 2008-04-06 Tobias Schlüter <tobi@gcc.gnu.org>
2532 * io.c (io_tag): Add field 'value'. Split 'spec' field in
2534 (match_etag, match_vtag, match_ltag): Split parsing in two steps
2535 to give better error messages.
2537 2008-04-06 Tobias Burnus <burnus@net-b.de>
2539 * io.c (check_io_constraints): Add constrains. ID= requires
2540 asynchronous= and asynchronous= must be init expression.
2542 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2544 * f95-lang.c: Set LANG_HOOKS_NAME to "GNU Fortran".
2546 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2548 * dump-parse-tree.c: Use fprintf, fputs and fputc instead of
2549 gfc_status and gfc_status_char. Remove gfc_ prefix of the gfc_show_*
2550 functions and make them static. Add new gfc_dump_parse_tree
2552 * gfortran.h (gfc_option_t): Rename verbose into dump_parse_tree.
2553 (gfc_status, gfc_status_char): Delete prototypes.
2554 * error.c (gfc_status, gfc_status_char): Remove functions.
2555 * scanner.c (gfc_new_file): Use printf instead of gfc_status.
2556 * options.c (gfc_init_options): Rename verbose into dump_parse_tree.
2557 (gfc_handle_module_path_options): Use gfc_fatal_error instead of
2558 gfc_status and exit.
2559 (gfc_handle_option): Rename verbose into dump_parse_tree.
2560 * parse.c (gfc_parse_file): Use gfc_dump_parse_tree.
2562 2008-04-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2563 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2565 PR fortran/25829 28655
2566 * dump-parse-tree.c (gfc_show_code_node): Show new I/O parameters.
2567 * gfortran.h (gfc_statement): Add ST_WAIT enumerator.
2568 (gfc_open): Add pointers for decimal, encoding, round, sign,
2569 asynchronous. (gfc_inquire): Add pointers for asynchronous, decimal,
2570 encoding, pending, round, sign, size, id.
2571 (gfc_wait): New typedef struct. (gfc_dt): Add pointers for id, pos,
2572 asynchronous, blank, decimal, delim, pad, round, sign.
2573 (gfc_exec_op): Add EXEC_WAIT enumerator. (gfc_code): Add pointer for
2574 wait. (gfc_free_wait), (gfc_resolve_wait): New function prototypes.
2575 * trans-stmt.h (gfc_trans_wait): New function prototype.
2576 * trans.c (gfc_trans_code): Add case for EXEC_WAIT.
2577 * io.c (io_tag): Add new tags for DECIMAL, ENCODING, ROUND, SIGN,
2578 ASYCHRONOUS, ID. (match_open_element): Add matchers for new tags.
2579 (gfc_free_open): Free new pointers. (gfc_resolve_open): Resolve new
2580 tags. (gfc_resolve_open): Remove comment around check for allowed
2581 values and ASYNCHRONOUS, update it. Likewise for DECIMAL, ENCODING,
2582 ROUND, and SIGN. (match_dt_element): Add matching for new tags.
2583 (gfc_free_wait): New function. (gfc_resolve_wait): New function.
2584 (match_wait_element): New function. (gfc_match_wait): New function.
2585 * resolve.c (gfc_resolve_blocks): Add case for EXEC_WAIT.
2586 (resolve_code): Add case for EXEC_WAIT.
2587 * st.c (gfc_free_statement): Add case for EXEC_WAIT.
2588 * trans-io.c (ioparam_type): Add IOPARM_ptype_wait. (gfc_st_parameter):
2589 Add "wait" entry. (iocall): Add IOCALL_WAIT enumerator.
2590 (gfc_build_io_library_fndecls): Add function declaration for st_wait.
2591 (gfc_trans_open): Add mask bits for new I/O tags.
2592 (gfc_trans_inquire): Add mask bits for new I/O tags.
2593 (gfc_trans_wait): New translation function.
2594 (build_dt): Add mask bits for new I/O tags.
2595 * match.c (gfc_match_if) Add matcher for "wait".
2596 * match.h (gfc_match_wait): Prototype for new function.
2597 * ioparm.def: Add new I/O parameter definitions.
2598 * parse.c (decode_statement): Add match for "wait" statement.
2599 (next_statement): Add case for ST_WAIT. (gfc_ascii_statement): Same.
2601 2008-04-03 Jakub Jelinek <jakub@redhat.com>
2604 * openmp.c (resolve_omp_clauses): Diagnose if a clause symbol
2607 2008-04-03 Tom Tromey <tromey@redhat.com>
2609 * Make-lang.in (fortran_OBJS): New variable.
2611 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
2613 * f95-lang.c (insert_block): Kill.
2615 2008-04-01 George Helffrich <george@gcc.gnu.org>
2617 PR fortran/35154, fortran/23057
2618 * trans-common.c (create_common): Add decl to function
2619 chain to preserve identifier scope in debug output.
2621 2008-04-01 Joseph Myers <joseph@codesourcery.com>
2623 * gfortran.texi: Include gpl_v3.texi instead of gpl.texi
2624 * Make-lang.in (GFORTRAN_TEXI): Include gpl_v3.texi instead of
2627 2008-03-30 Paul Thomas <pault@gcc.gnu.org>
2630 * resolve.c (resolve_function, resolve_call): If the procedure
2631 is elemental do not look for noncopying intrinsics.
2633 2008-03-29 Paul Thomas <pault@gcc.gnu.org>
2636 * trans-array.c (gfc_array_init_size): Set 'size' zero if
2637 negative in one dimension.
2640 * trans-expr.c (gfc_trans_string_copy): Only assign a char
2641 directly if the lhs and rhs types are the same.
2643 2008-03-28 Daniel Franke <franke.daniel@gmail.com>
2644 Paul Richard Thomas <paul.richard.thomas@gmail.com>
2647 * primary.c (match_variable): Improved matching of function
2649 * resolve.c (resolve_allocate_deallocate): Removed checks if
2650 the actual argument for STAT is a variable.
2652 2008-03-28 Tobias Burnus <burnus@net-b.de>
2654 * symbol.c (gfc_get_default_type): Fix error message; option
2655 -fallow_leading_underscore should be -fallow-leading-underscore
2657 2008-03-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2660 * iresolve.c (gfc_resolve_cshift): Check for NULL symtree in test for
2661 optional argument attribute.
2663 2008-03-27 Tom Tromey <tromey@redhat.com>
2665 * Make-lang.in: Revert automatic dependency patch.
2667 2008-03-25 Tom Tromey <tromey@redhat.com>
2669 * Make-lang.in: Remove .o targets.
2670 (fortran_OBJS): New variable.
2671 (fortran/gfortranspec.o): Move to fortran/. Reduce to variable
2673 (GFORTRAN_D_OBJS): Update.
2674 (GFORTRAN_TRANS_DEPS): Remove.
2676 2008-03-24 Paul Thomas <pault@gcc.gnu.org>
2679 * resolve.c (resolve_structure_cons): It is an error to assign
2680 NULL to anything other than a pointer or allocatable component.
2683 * resolve.c (resolve_symbol): If the symbol is a derived type,
2684 resolve the derived type. If the symbol is a derived type
2685 function, ensure that the derived type is visible in the same
2686 namespace as the function.
2688 2008-03-23 Tobias Schlüter <tobi@gcc.gnu.org>
2690 * trans.h: Use fold_build in build1_v, build2_v and build3_v
2692 * trans-openmp.c (gfc_trans_omp_critical, gfc_trans_omp_single):
2693 Don't use build2_v macro.
2695 2008-03-19 Daniel Franke <franke.daniel@gmail.com>
2698 * interface.c (gfc_procedure_use): Check for keyworded arguments in
2699 procedures without explicit interfaces.
2701 2008-03-16 Paul Thomas <pault@gcc.gnu.org>
2704 * resolve.c (check_assumed_size_reference): Only visit the
2705 first reference and look directly at the highest dimension.
2707 2008-03-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2710 * trans-array.c (gfc_conv_array_index_offset): Remove unnecessary
2713 2008-03-15 Daniel Franke <franke.daniel@gmail.com>
2716 * resolve.c (resolve_branch): Less strict and pessimistic warning
2719 2008-03-11 Paolo Bonzini <bonzini@gnu.org>
2721 * f95-lang.c (LANG_HOOKS_CLEAR_BINDING_STACK): Delete.
2722 (gfc_be_parse_file): Call clear_binding_stack from here.
2723 (gfc_clear_binding_stack): Rename to clear_binding_stack.
2725 2008-03-09 Paul Thomas <pault@gcc.gnu.org>
2728 * module.c (mio_symtree_ref): After providing a symbol for a
2729 missing equivalence member, resolve and NULL the fixups.
2731 2008-03-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2733 * invoke.texi (Error and Warning Options): Document
2736 2008-03-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2739 * trans-array.c (gfc_conv_ss_startstride): Fix the logic to avoid
2740 checking bounds of absent optional arguments.
2742 2008-03-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2745 * intrinsic.c (add_functions): Add simplification routines for
2746 ERF, DERF, ERFC and DERFC.
2747 * decl.c (gfc_match_suffix, gfc_match_subroutine): Change GNU
2748 extensions into Fortran 2008 features.
2749 * intrinsic.h (gfc_simplify_erf, gfc_simplify_erfc): New
2751 * simplify.c (gfc_simplify_erf, gfc_simplify_erfc): New functions.
2753 2008-03-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2756 * intrinsic.c (add_functions): Modify intrinsics ACOSH, ASINH,
2757 ATANH, ERF, ERFC and GAMMA. Add intrinsics BESSEL_{J,Y}{0,1,N},
2758 ERFC_SCALED, LOG_GAMMA and HYPOT.
2759 * intrinsic.h (gfc_check_hypot, gfc_simplify_hypot,
2760 gfc_resolve_hypot): New prototypes.
2761 * mathbuiltins.def: Add HYPOT builtin. Make complex versions of
2762 ACOSH, ASINH and ATANH available.
2763 * gfortran.h (GFC_ISYM_ERFC_SCALED, GFC_ISYM_HYPOT): New values.
2764 * lang.opt: Add -std=f2008 option.
2765 * libgfortran.h: Define GFC_STD_F2008.
2766 * lang-specs.h: Add .f08 and .F08 file suffixes.
2767 * iresolve.c (gfc_resolve_hypot): New function.
2768 * parse.c (parse_contained): Allow empty CONTAINS for Fortran 2008.
2769 * check.c (gfc_check_hypot): New function.
2770 * trans-intrinsic.c (gfc_intrinsic_map): Define ERFC_SCALE builtin.
2771 * options.c (set_default_std_flags): Allow Fortran 2008 by default.
2772 (form_from_filename): Add .f08 suffix.
2773 (gfc_handle_option): Handle -std=f2008 option.
2774 * simplify.c (gfc_simplify_hypot): New function.
2775 * gfortran.texi: Document Fortran 2008 status and file extensions.
2776 * intrinsic.texi: Document new BESSEL_{J,Y}{0,1,N} intrinsics,
2777 as well as HYPOT and ERFC_SCALED. Update documentation of ERF,
2778 ERFC, GAMMA, LGAMMA, ASINH, ACOSH and ATANH.
2779 * invoke.texi: Document the new -std=f2008 option.
2781 2008-03-02 Jakub Jelinek <jakub@redhat.com>
2783 * gfortranspec.c (lang_specific_driver): Update copyright notice
2786 2008-02-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2789 * expr.c (find_array_element): Modify traversing the constructor to
2790 avoid trying to access NULL memory pointed to by next for the
2791 last element. (find_array_section): Exit while loop if cons->next is
2793 * trans-expr.c (gfc_conv_scalar_char_value): Initialize gfc_typespec.
2794 (gfc_conv_function_call): Same.
2795 * decl.c (gfc_match_implicit): Same.
2796 * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Same.
2798 2008-02-28 Daniel Franke <franke.daniel@gmail.com>
2803 * lang.opt: Added -Wreturn-type.
2804 * options.c (gfc_handle_option): Recognize -Wreturn-type.
2805 * trans-decl.c (gfc_trans_deferred_vars): Emit warnings for funtions
2806 where the result value is not set.
2807 (gfc_generate_function_code): Likewise.
2808 (generate_local_decl): Emit warnings for funtions whose RESULT
2809 variable is not set.
2811 2008-02-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2814 * trans-expr.c (gfc_conv_variable): Don't build indirect
2815 references when explicit interface is mandated.
2816 * resolve.c (resolve_formal_arglist): Set attr.always_explicit
2817 on the result symbol as well as the procedure symbol.
2819 2008-02-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2822 * trans.h: Remove prototypes for gfor_fndecl_math_exponent4,
2823 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
2824 gfor_fndecl_math_exponent16.
2825 * f95-lang.c (build_builtin_fntypes): Add new function types.
2826 (gfc_init_builtin_functions): Add new builtins for nextafter,
2827 frexp, ldexp, fabs, scalbn and inf.
2828 * iresolve.c (gfc_resolve_rrspacing): Don't add hidden arguments.
2829 (gfc_resolve_scale): Don't convert type of second argument.
2830 (gfc_resolve_set_exponent): Likewise.
2831 (gfc_resolve_size): Don't add hidden arguments.
2832 * trans-decl.c: Remove gfor_fndecl_math_exponent4,
2833 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
2834 gfor_fndecl_math_exponent16.
2835 * trans-intrinsic.c (gfc_intrinsic_map): Remove intrinsics
2836 for scalbn, fraction, nearest, rrspacing, set_exponent and
2838 (gfc_conv_intrinsic_exponent): Directly call frexp.
2839 (gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_nearest,
2840 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
2841 gfc_conv_intrinsic_scale, gfc_conv_intrinsic_set_exponent): New
2843 (gfc_conv_intrinsic_function): Use the new functions above.
2845 2008-02-26 Tobias Burnus <burnus@net-b.de>
2848 * interface.c (check_operator_interface): Show better line for error
2849 messages; fix constrains for user-defined assignment operators.
2850 (gfc_extend_assign): Fix constrains for user-defined assignment
2853 2008-02-26 Tom Tromey <tromey@redhat.com>
2855 * trans-io.c (set_error_locus): Remove old location code.
2856 * trans-decl.c (gfc_set_decl_location): Remove old location code.
2857 * f95-lang.c (gfc_init): Remove test of USE_MAPPED_LOCATION.
2858 * scanner.c (gfc_gobble_whitespace): Remove old location code.
2859 (get_file): Likewise.
2860 (preprocessor_line): Likewise.
2861 (load_file): Likewise.
2862 (gfc_new_file): Likewise.
2863 * trans.c (gfc_trans_runtime_check): Remove old location code.
2864 (gfc_get_backend_locus): Likewise.
2865 (gfc_set_backend_locus): Likewise.
2866 * data.c (gfc_assign_data_value): Remove old location code.
2867 * error.c (show_locus): Remove old location code.
2868 * gfortran.h (gfc_linebuf): Remove old location code.
2869 (gfc_linebuf_linenum): Remove old-location variant.
2871 2008-02-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2874 * trans-const.c (gfc_build_string_const): Don't call gettext.
2875 (gfc_build_localized_string_const): New function.
2876 * trans-const.h (gfc_build_localized_string_const): New prototype.
2877 * trans.c (gfc_trans_runtime_check): Use
2878 gfc_build_localized_string_const instead of gfc_build_string_const.
2879 (gfc_call_malloc): Likewise.
2880 (gfc_allocate_with_status): Likewise.
2881 (gfc_allocate_array_with_status): Likewise.
2882 (gfc_deallocate_with_status): Likewise.
2883 (gfc_call_realloc): Likewise.
2884 * trans-io.c (gfc_trans_io_runtime_check): Likewise.
2886 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
2888 * arith.c: Update copyright years.
2889 * arith.h: Likewise.
2890 * array.c: Likewise.
2892 * check.c: Likewise.
2896 * dependency.c: Likewise.
2897 * dependency.h: Likewise.
2898 * dump-parse-tree.c: Likewise.
2899 * error.c: Likewise.
2901 * gfc-internals.texi: Likewise.
2902 * gfortran.h: Likewise.
2903 * gfortran.texi: Likewise.
2904 * gfortranspec.c: Likewise.
2905 * interface.c: Likewise.
2906 * intrinsic.c: Likewise.
2907 * intrinsic.h: Likewise.
2908 * intrinsic.texi: Likewise.
2909 * invoke.texi: Likewise.
2911 * iresolve.c: Likewise.
2912 * iso-c-binding.def: Likewise.
2913 * iso-fortran-env.def: Likewise.
2914 * lang-specs.h: Likewise.
2915 * lang.opt: Likewise.
2916 * libgfortran.h: Likewise.
2917 * match.c: Likewise.
2918 * match.h: Likewise.
2919 * matchexp.c: Likewise.
2921 * module.c: Likewise.
2922 * openmp.c: Likewise.
2923 * options.c: Likewise.
2924 * parse.c: Likewise.
2925 * parse.h: Likewise.
2926 * primary.c: Likewise.
2927 * resolve.c: Likewise.
2928 * scanner.c: Likewise.
2929 * simplify.c: Likewise.
2931 * symbol.c: Likewise.
2932 * target-memory.c: Likewise.
2933 * target-memory.h: Likewise.
2934 * trans-array.h: Likewise.
2935 * trans-const.h: Likewise.
2936 * trans-stmt.h: Likewise.
2937 * trans-types.c: Likewise.
2938 * trans-types.h: Likewise.
2939 * types.def: Likewise.
2941 2008-02-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2944 * simplify.c (gfc_simplify_ibclr), (gfc_simplify_ibits),
2945 (gfc_simplify_ibset): Remove call to range_check.
2946 (simplify_cmplx), (gfc_simplify_dble), (gfc_simplify_float)
2947 (gfc_simplify_real): Add call gfc_clear_ts to initialize the
2948 temporary gfc_typspec variable.
2950 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
2952 * trans-array.c (gfc_conv_descriptor_data_get,
2953 gfc_conv_descriptor_data_set_internal,
2954 gfc_conv_descriptor_data_addr, gfc_conv_descriptor_offset,
2955 gfc_conv_descriptor_dtype, gfc_conv_descriptor_dimension,
2956 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
2957 gfc_conv_descriptor_ubound, gfc_trans_create_temp_array,
2958 gfc_conv_array_transpose, gfc_grow_array,
2959 gfc_trans_array_constructor_subarray,
2960 gfc_trans_array_constructor_value, gfc_trans_scalarized_loop_end,
2961 gfc_array_init_size, gfc_array_allocate, gfc_array_deallocate,
2962 gfc_conv_array_initializer, gfc_trans_array_bounds,
2963 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
2964 gfc_get_dataptr_offset, gfc_conv_array_parameter,
2965 gfc_trans_dealloc_allocated, get_full_array_size,
2966 gfc_duplicate_allocatable, structure_alloc_comps): Use fold_buildN
2968 * trans-expr.c (gfc_conv_expr_present, gfc_conv_missing_dummy,
2969 gfc_conv_component_ref, gfc_conv_cst_int_power,
2970 gfc_conv_function_call, gfc_trans_structur_assign): Likewise.
2971 * trans-common.c (create_common): Likewise.
2972 * trans-openmp.c (gfc_trans_omp_atomic, gfc_trans_omp_do):
2974 * trans-const.c (gfc_conv_constant_to_tree): Likewise.
2975 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_do,
2976 gfc_trans_integer_select, gfc_trans_character_select,
2977 gfc_trans_forall_loop, compute_overall_iter_number,
2978 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_allocate,
2979 gfc_trans_deallocate): Likewise.
2980 * trans.c (gfc_build_addr_expr, gfc_trans_runtime_check,
2981 gfc_allocate_with_status, gfc_allocate_array_with_status,
2982 gfc_deallocate_with_status): Likewise.
2983 * f95-lang.c (gfc_truthvalue_conversion): Likewise.
2984 * trans-io.c (set_parameter_const, set_parameter_value,
2985 set_parameter_ref, set_string, set_internal_unit, io_result,
2986 set_error_locus, nml_get_addr_expr, transfer_expr): Likewise.
2987 * trans-decl.c (gfc_build_qualified_array, build_entry_thunks,
2988 gfc_get_fake_result_decl, gfc_trans_auto_character_variable,
2989 gfc_generate_function_code): Likewise.
2990 * convert.c (convert): Likewise.
2991 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
2992 build_fixbound_expr, build_fix_expr, gfc_conv_intrinsic_aint,
2993 gfc_conv_intrinsic_int, gfc_conv_intrinsic_imagpart,
2994 gfc_conv_intrinsic_conjg, gfc_conv_intrinsic_abs,
2995 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
2996 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_dprod,
2997 gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
2998 gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax,
2999 gfc_conv_intrinsic_minmax_char, gfc_conv_intrinsic_count,
3000 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_dot_product,
3001 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
3002 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_not,
3003 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
3004 gfc_conv_intrinsic_ichar, gfc_conv_intrinsic_size,
3005 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
3006 gfc_conv_allocated, gfc_conv_associated, gfc_conv_intrinsic_trim,
3007 gfc_conv_intrinsic_repeat): Likewise.
3009 2008-02-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3012 * trans-expr.c (gfc_conv_power_op): Use BUILT_IN_CPOW{F,,L}.
3013 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_CPOW{F,,L}.
3014 * trans.h (gfor_fndecl_math_cpow, gfor_fndecl_math_cpowf,
3015 gfor_fndecl_math_cpowl10, gfor_fndecl_math_cpowl16): Remove.
3016 * trans-decl.c: Likewise.
3018 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3021 * expr.c (find_array_element): Modify traversing the constructor to
3022 avoid trying to access NULL memory pointed to by next for the
3023 last element. (find_array_section): Exit while loop if cons->next is
3026 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3029 * iresolve.c (resolve_mask_arg): Add gfc_clear_ts to initialize
3031 (gfc_resolve_aint): Likewise.
3032 (gfc_resolve_anint): Likewise.
3033 (gfc_resolve_besn): Likewise.
3034 (gfc_resolve_cshift): Likewise.
3035 (gfc_resolve_ctime): Likewise.
3036 (gfc_resolve_eoshift): Likewise.
3037 (gfc_resolve_index_func): Likewise.
3038 (gfc_resolve_isatty): Likewise.
3039 (gfc_resolve_malloc): Likewise.
3040 (gfc_resolve_rrspacing): Likewise.
3041 (gfc_resolve_scale): Likewise.
3042 (gfc_resolve_set_exponent): Likewise.
3043 (gfc_resolve_spacing): Likewise.
3044 (gfc_resolve_spacing): Likewise.
3045 (gfc_resolve_fgetc): Likewise.
3046 (gfc_resolve_fputc): Likewise.
3047 (gfc_resolve_ftell): Likewise.
3048 (gfc_resolve_ttynam): Likewise.
3049 (gfc_resolve_alarm_sub): Likewise.
3050 (gfc_resolve_mvbits): Likewise.
3051 (gfc_resolve_getarg): Likewise.
3052 (gfc_resolve_signal_sub): Likewise.
3053 (gfc_resolve_exit): Likewise.
3054 (gfc_resolve_flush): Likewise.
3055 (gfc_resolve_free): Likewise.
3056 (gfc_resolve_ctime_sub): Likewise.
3057 (gfc_resolve_fgetc_sub): Likewise.
3058 (gfc_resolve_fputc_sub): Likewise.
3059 (gfc_resolve_fseek_sub): Likewise.
3060 (gfc_resolve_ftell_sub): Likewise.
3061 (gfc_resolve_ttynam_sub): Likewise.
3063 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3065 * gfc-internals.texi: Fix typos and markup nits.
3066 * gfortran.texi: Likewise.
3067 * intrinsic.texi: Likewise.
3069 2008-02-21 Richard Guenther <rguenther@suse.de>
3071 * trans-expr.c (gfc_conv_expr_op): Expand INTRINSIC_PARENTHESES
3072 as unary PAREN_EXPR for real and complex typed expressions.
3073 (gfc_conv_unary_op): Fold the built tree.
3075 2008-02-20 Tobias Burnus <burnus@net-b.de>
3078 * match.c (gfc_match_name): Improve error message for '$'.
3080 2008-02-19 Daniel Franke <franke.daniel@gmail.com>
3083 * expr.c (gfc_check_pointer_assign): Add type and kind information
3084 to type-mismatch message.
3085 (gfc_check_assign): Unify error messages.
3087 2008-02-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3090 * gfortran.texi: Create new section for unimplemented extensions.
3091 Add "STRUCTURE and RECORD" and "ENCODE and DECODE statements".
3092 Remove "smaller projects" list. Fix a few typos.
3094 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3096 * intrinsic.texi: Rename INDEX node to avoid clashing with
3097 index.html on case-insensitive systems.
3099 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3102 * trans-expr.c (gfc_conv_function_call): Force evaluation of
3105 2008-02-10 Daniel Franke <franke.daniel@gmail.com>
3108 * lang.opt: Allow '-J<dir>' next to '-J <dir>',
3109 likewise '-I <dir>' and '-I<dir>'.
3111 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3114 * Make-lang.in (f951): Add $(GMPLIBS).
3116 2008-02-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3119 * trans-common.c (build_field): Mark fields as volatile when needed.
3121 2008-02-05 Tobias Burnus <burnus@net-b.de>
3124 * data.c (gfc_assign_data_value): Only free "size" if
3125 it has not already been freed.
3127 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
3130 * array.c (match_array_element_spec): Remove check for negative
3132 (gfc_resolve_array_spec): Add check for negative size.
3134 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
3137 * data.c (gfc_assign_data_value): Add bounds check for array
3140 2008-02-04 Daniel Franke <franke.daniel@gmail.com>
3142 * resolve.c (resolve_where): Fix typo.
3143 (gfc_resolve_where_code_in_forall): Likewise.
3145 2008-02-03 Paul Thomas <pault@gcc.gnu.org>
3148 * resolve.c (resolve_allocate_deallocate): New function.
3149 (resolve_code): Call it for allocate and deallocate.
3150 * match.c (gfc_match_allocate, gfc_match_deallocate) : Remove
3151 the checking of the STAT tag and put in above new function.
3152 * primary,c (match_variable): Do not fix flavor of host
3153 associated symbols yet if the type is not known.
3155 2008-01-31 Paul Thomas <pault@gcc.gnu.org>
3158 * expr.c (gfc_check_assign): It is an error to assign
3159 to a sibling procedure.
3161 2008-01-30 Paul Thomas <pault@gcc.gnu.org>
3164 * symbol.c (gfc_delete_symtree, gfc_undo_symbols): Rename
3165 delete_symtree to gfc_delete_symtree.
3166 * gfortran.h : Add prototype for gfc_delete_symtree.
3167 * module.c (load_generic_interfaces): Transfer symbol to a
3168 unique symtree and delete old symtree, instead of renaming.
3169 (read_module): The rsym and the found symbol are the same, so
3170 the found symtree can be deleted.
3173 * decl.c (match_char_spec): Remove the constraint on deferred
3174 matching of functions and free the length expression.
3175 delete_symtree to gfc_delete_symtree.
3176 (gfc_match_type_spec): Whitespace.
3177 (gfc_match_function_decl): Defer characteristic association for
3178 all types except BT_UNKNOWN.
3179 * parse.c (decode_specification_statement): Only derived type
3180 function matching is delayed to the end of specification.
3182 2008-01-28 Tobias Burnus <burnus@net-b.de>
3185 * simplify.c (gfc_simplify_shape): Simplify rank zero arrays.
3187 2008-01-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3190 * array.c (gfc_check_constructor_type): Revert clearing the expression.
3192 2008-01-26 Tobias Burnus <burnus@net-b.de>
3195 * trans-expr.c (gfc_conv_function_call): Don't call
3196 gfc_add_interface_mapping if the expression is NULL.
3198 2008-01-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3201 * trans-array.c (gfc_trans_create_temp_array): Remove call to
3202 gcc_assert (integer_zerop (loop->from[n])).
3204 2008-01-25 Daniel Franke <franke.daniel@gmail.com>
3207 * resolve.c (resolve_where): Added check if user-defined assignment
3208 operator is an elemental subroutine.
3209 (gfc_resolve_where_code_in_forall): Likewise.
3211 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
3215 * gfortran.h: Revert changes from 2008-01-17.
3216 * match.c: Likewise.
3217 * symbol.c: Likewise.
3218 (gfc_undo_symbols): Undo namespace changes related to common blocks.
3220 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
3223 * data.c (formalize_structure_cons): Skip formalization on
3226 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
3228 * gfortran.texi (OpenMP): Extended existing documentation.
3229 (contributors): Added major contributors of 2008 that were
3231 (proposed extensions): Removed implemented items.
3233 2008-01-24 Paul Thomas <pault@gcc.gnu.org>
3236 * parse.c (next_statement) : If ST_GET_FCN_CHARACTERISTICS is
3237 seen, check for a statement label and, if present, delete it
3238 and set the locus to the start of the statement.
3240 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
3243 * trans-io.c (gfc_trans_transfer): If the array reference in a
3244 read has a vector subscript, use gfc_conv_subref_array_arg to
3245 copy back the temporary.
3247 2008-01-22 Tobias Burnus <burnus@net-b.de>
3250 * interface.c (compare_actual_formal): Fix adding type
3251 to missing_arg_type for absent optional arguments.
3253 2008-01-22 Tobias Burnus <burnus@net-b.de>
3256 * parse.c (parse_spec): Change = into ==.
3258 2008-01-22 Daniel Franke <franke.daniel@gmail.com>
3261 * expr.c (check_elemental): Fix check for valid data types.
3263 2008-01-22 Tobias Burnus <burnus@net-b.de>
3266 * scanner.c (load_line): Support <tab><digit> continuation lines.
3267 * invoke.texi (-Wtabs): Document this.
3269 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
3272 * module.c (read_module): Set use_rename attribute.
3274 2007-01-21 Tobias Burnus <burnus@net-b.de>
3277 * interface.c (compare_parameter): Improved error message
3278 for arguments of same type and mismatched kinds.
3280 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
3283 * resolve.c (resolve_entries): Do not do an array bounds check
3284 if the result symbols are the same.
3287 * module.c (read_module) : Hide the symtree of the previous
3288 version of the symbol if this symbol is renamed.
3290 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
3293 * array.c (gfc_check_constructor_type): Clear the expression ts
3294 so that the checking starts from the deepest level of array
3296 * primary.c (match_varspec): If an unknown type is changed to
3297 default character and the attempt to match a substring fails,
3298 change it back to unknown.
3301 * trans-array.c (gfc_add_loop_ss_code) : If ss->string_length is
3302 NULL for an array constructor, use the cl.length expression to
3304 (gfc_conv_array_parameter): Change call to gfc_evaluate_now to
3307 2008-01-19 Thomas Koenig <tkoenig@gcc.gnu.org>
3311 * iresolve.c (gfc_resolve_all): Remove conversion of mask
3312 argument to kind=1 by removing call to resolve_mask_arg().
3313 (gfc_resolve_any): Likewise.
3315 2008-01-19 Tobias Burnus <burnus@net-b.de>
3318 * primary.c (match_variable): Handle FL_UNKNOWN without
3319 uneducated guessing.
3320 (match_variable): Improve error message.
3322 2008-01-18 Tobias Burnus <burnus@net-b.de>
3325 * interface.c (get_expr_storage_size): Return storage size
3326 for array element designators.
3327 (compare_actual_formal): Reject unequal string sizes for
3328 assumed-shape dummy arguments. And fix error message for
3329 array-sections with vector subscripts.
3331 2008-01-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3334 * simplify.c (is_constant_array_expr): New static function that returns
3335 true if the given expression is an array and is constant.
3336 (gfc_simplify_reshape): Use new function.
3338 2008-01-17 H.J. Lu <hongjiu.lu@intel.com>
3341 * symbol.c (free_common_tree): Renamed to ...
3342 (gfc_free_common_tree): This. Remove static.
3343 (gfc_free_namespace): Updated.
3345 * gfortran.h (gfc_free_common_tree): New.
3347 * match.c (gfc_match_common): Call gfc_free_common_tree () with
3348 gfc_current_ns->common_root and set gfc_current_ns->common_root
3349 to NULL on syntax error.
3351 2008-01-18 Richard Sandiford <rsandifo@nildram.co.uk>
3354 * trans-expr.c (gfc_conv_function_call): Use proper
3355 type for returned character pointers.
3357 2008-01-17 Paul Thomas <pault@gcc.gnu.org>
3362 * decl.c : Remove gfc_function_kind_locus and
3363 gfc_function_type_locus. Add gfc_matching_function.
3364 (match_char_length): If matching a function and the length
3365 does not match, return MATCH_YES and try again later.
3366 (gfc_match_kind_spec): The same.
3367 (match_char_kind): The same.
3368 (gfc_match_type_spec): The same for numeric and derived types.
3369 (match_prefix): Rename as gfc_match_prefix.
3370 (gfc_match_function_decl): Except for function valued character
3371 lengths, defer applying kind, type and charlen info until the
3372 end of specification block.
3373 gfortran.h (gfc_statement): Add ST_GET_FCN_CHARACTERISTICS.
3374 parse.c (decode_specification_statement): New function.
3375 (decode_statement): Call it when a function has kind = -1. Set
3376 and reset gfc_matching function, as function statement is being
3378 (match_deferred_characteristics): Simplify with a single call
3379 to gfc_match_prefix. Do appropriate error handling. In any
3380 case, make sure that kind = -1 is reset or corrected.
3381 (parse_spec): Call above on seeing ST_GET_FCN_CHARACTERISTICS.
3382 Throw an error if kind = -1 after last specification statement.
3383 parse.h : Prototype for gfc_match_prefix.
3385 2008-01-16 Tobias Burnus <burnus@net-b.de>
3388 * interface.c (compare_parameter): Allow AS_DEFERRED array
3389 elements and reject attr.pointer array elemenents.
3390 (get_expr_storage_size): Return storage size of elements of
3391 assumed-shape and pointer arrays.
3393 2008-01-15 Sebastian Pop <sebastian.pop@amd.com>
3395 * f95-lang.c (gfc_init_builtin_functions): Initialize GOMP builtins
3396 for flag_tree_parallelize_loops.
3398 2008-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
3401 * iresolve.c (gfc_resolve_all): Call resolve_mask_arg.
3402 (gfc_resolve_any): Likewise.
3403 (gfc_resolve_count): Likewise. Don't append kind of
3404 argument to function name.
3406 2008-01-13 Tobias Burnus <burnus@net-b.de>
3409 * resolve.c (resolve_actual_arglist): For expressions,
3410 also check for assume-sized arrays.
3411 * interface.c (compare_parameter): Move F2003 character checks
3412 here, print error messages here, reject elements of
3413 assumed-shape array as argument to dummy arrays.
3414 (compare_actual_formal): Update for the changes above.
3416 2008-01-13 Tobias Burnus <burnus@net-b.de>
3419 * decl.c (contained_procedure): Only check directly preceeding state.
3421 2008-01-13 Tobias Burnus <burnus@net-b.de>
3424 * check.c (gfc_check_shape): Accept array ranges of
3425 assumed-size arrays.
3427 2008-01-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3430 * match.c (gfc_match_name): Don't error if leading character is a '(',
3431 just return MATCH_NO.
3433 2008-01-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3436 * trans-io.c (create_dummy_iostat): Commit the symbol.
3438 2008-01-11 Paul Thomas <pault@gcc.gnu.org>
3441 * simplify.c (gfc_simplify_transfer): Return NULL if the size
3442 of the element is unavailable and only assign character length
3443 to the result, if 'mold' is constant.
3445 2008-01-10 Paul Thomas <pault@gcc.gnu.org>
3448 * trans-array.c (gfc_trans_array_ctor_element): Use gfc_trans_string_copy
3449 to assign strings and perform bounds checks on the string length.
3450 (get_array_ctor_strlen): Remove bounds checking.
3451 (gfc_trans_array_constructor): Initialize string length checking.
3452 * trans-array.h : Add prototype for gfc_trans_string_copy.
3454 2008-01-08 Richard Guenther <rguenther@suse.de>
3457 PR tree-optimization/34683
3458 * trans-types.c (gfc_get_array_type_bounds): Use an array type
3459 with known size for accesses if that is known.
3461 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
3464 * expr.c (find_array_element): Check that the array bounds are
3465 constant before using them. Use lower, as well as upper bound.
3466 (check_restricted): Allow implied index variable.
3468 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
3471 * trans_array.c (gfc_trans_deferred_array): Do not null the
3472 data pointer on entering scope, nor deallocate it on leaving
3473 scope, if the symbol has the 'save' attribute.
3476 * trans_decl.c (gfc_finish_var_decl): Derived types with
3477 allocatable components and an initializer must be TREE_STATIC.
3479 2008-01-07 Paul Thomas <pault@gcc.gnu.org>
3482 * module.c (write_generic): Rewrite completely.
3483 (write_module): Change call to write_generic.
3485 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3488 * scanner.c (load_line): Do not count ' ' as printable when checking for
3491 2008-01-06 Paul Thomas <pault@gcc.gnu.org>
3494 * module.c (load_needed): If the namespace has no proc_name
3495 give it the module symbol.
3497 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3500 * trans-expr.c (gfc_conv_missing_dummy): Use a temporary to type convert
3501 the dummy variable expression, test for NULL, and pass the variable
3502 address to the called function.
3504 2007-01-06 Tobias Burnus <burnus@net-b.de>
3507 * match.c (gfc_match_common): Remove blank common in
3509 * resolve.c (resolve_common_vars): New function.
3510 (resolve_common_blocks): Move checks to resolve_common_vars
3511 and invoke that function.
3512 (resolve_types): Call resolve_common_vars for blank commons.
3514 2008-01-06 Tobias Burnus <burnus@net-b.de>
3517 * resolve.c (resolve_equivalence_derived): Reject derived types with
3518 default initialization if equivalenced with COMMON variable.
3520 2008-01-06 Tobias Burnus <burnus@net-b.de>
3523 * io.c (check_io_constraints): Disallow unformatted I/O for
3526 2008-01-06 Tobias Burnus <burnus@net-b.de>
3529 * resolve.c (resolve_formal_arglist): Reject dummy procedure in
3530 ELEMENTAL functions.
3532 2008-01-06 Tobias Burnus <burnus@net-b.de>
3535 * interface.c (compare_actual_formal): Reject parameter
3536 actual to intent(out) dummy.
3538 2008-01-04 Tobias Burnus <burnus@net-b.de>
3541 * primary.c (match_varspec): Gobble whitespace before