1 2008-10-30 Steven G. Kargl <kargls@comcast.net>
4 * fortran/arith.c (gfc_mpfr_to_mpz): Test for NaN and Inf values.
5 Remove stale comment and kludge code for MPFR 2.0.1 and older.
6 (gfc_real2int): Error on conversion of NaN or Inf.
7 (gfc_complex2int): Ditto.
8 * fortran/arith.h: Update mpfr_to_mpz prototype.
9 * fortran/simplify.c (gfc_simplify_ceiling, gfc_simplify_floor,
10 gfc_simplify_ifix, gfc_simplify_idint, simplify_nint): Update function
11 calls to include locus
13 2008-10-30 Mikael Morin <mikael.morin@tele2.fr>
16 * trans-array.c (gfc_trans_create_temp_array): If n is less
17 than the temporary dimension, assert that loop->from is
18 zero (reverts to earlier versions). If there is at least one
19 null loop->to[n], it is a callee allocated array so set the
20 size to NULL and break.
21 (gfc_trans_constant_array_constructor): Set the offset to zero.
22 (gfc_trans_array_constructor): Remove loop shifting around the
24 (gfc_conv_loop_setup): Prefer zero-based descriptors if
25 possible. Calculate the translation from loop variables to
26 array indices if an array constructor.
28 2008-10-30 Mikael Morin <mikael.morin@tele2.fr>
31 * trans-array.c (gfc_trans_create_temp_array): If size is NULL
32 use the array bounds for loop->to.
34 2008-10-28 Tobias Burnus <burnus@net-b.de>
36 * intrinsic.texi: Update OpenMP section for OMPv3.
38 2008-10-24 Jakub Jelinek <jakub@redhat.com>
40 * Make-lang.in (check-f95-subtargets, check-fortran-subtargets): New
41 aliases for check-gfortran-subtargets.
42 (lang_checks_parallelized): Add check-gfortran.
43 (check_gfortran_parallelize): New variable.
45 2008-10-19 Paul Thomas <pault@gcc.gnu.org>
48 * dependency.c (gfc_dep_resolver ): If we find equal array
49 element references, go on to the next reference.
51 2008-10-16 Daniel Kraft <d@domob.eu>
53 * resolve.c (resolve_elemental_actual): Handle calls to intrinsic
54 subroutines correctly.
56 2008-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
58 * simplify.c: Remove MPFR_VERSION_NUM(2,3,0) conditionals.
60 2008-10-12 Daniel Kraft <d@domob.eu>
63 * expr.c (gfc_expr_check_typed): Extend permission of untyped
64 expressions to both top-level variable and basic arithmetic expressions.
66 2008-10-12 Paul Thomas <pault@gcc.gnu.org>
69 * dependency.c (gfc_are_equivalenced_arrays): Look in symbol
70 namespace rather than current namespace, if it is available.
72 2008-10-12 Steven G. Kargl <kargls@comcast.net>
75 * fortran/resolve.c (resolve_fl_variable): Simplify the
76 initializer if there is one.
78 2008-10-11 Paul Thomas <pault@gcc.gnu.org>
81 * module.c (check_for_ambiguous): Remove redundant code.
83 2008-10-09 Daniel Kraft <d@domob.eu>
86 * gfortran.h (gfc_suppress_error): Removed from header.
87 (gfc_push_suppress_errors), (gfc_pop_suppress_errors): New methods.
88 * array.c (gfc_array_size): Use new gfc_push/pop_suppress_errors
89 instead of directly changing gfc_suppress_error.
90 * intrinsic.c (gfc_intrinsic_func_interface): Ditto.
91 (gfc_intrinsic_sub_interface): Ditto.
92 * error.c (suppress_errors): Made static from `gfc_suppress_error'.
93 (gfc_push_suppress_errors), (gfc_pop_suppress_errors): New methods.
94 (gfc_notify_std), (gfc_error): Use new static name of global.
95 * expr.c (check_arglist), (check_references): New methods.
96 (check_restricted): Check arglists and references of EXPR_FUNCTIONs
97 and EXPR_VARAIBALEs, respectively. Allow PARAMETER symbols.
99 2008-10-07 Jakub Jelinek <jakub@redhat.com>
101 * f95-lang.c (poplevel): Don't clear BLOCK_VARS if functionbody.
102 * trans-decl.c (gfc_build_qualified_array): Build accurate debug type
104 (build_entry_thunks, gfc_generate_function_code,
105 gfc_generate_constructors): Ensure DECL_SAVED_TREE is a BIND_EXPR
106 with DECL_INITIAL as its BLOCK.
108 2008-10-05 Paul Thomas <pault@gcc.gnu.org>
111 * gfortran.h : Add 'error' bit field to gfc_expr structure.
112 * expr.c (check_inquiry): When checking a restricted expression
113 check that arguments are either variables or restricted.
114 (check_restricted): Do not emit error if the expression has
115 'error' set. Clean up detection of host-associated variable.
117 2008-10-05 Daniel Kraft <d@domob.eu>
120 * gfortran.h (struct gfc_typebound_proc): New flag `error'.
121 * resolve.c (update_arglist_pass): Added assertion.
122 (update_compcall_arglist): Fail early for erraneous procedures to avoid
124 (resolve_typebound_generic_call): Ignore erraneous specific targets
125 and added assertions.
126 (resolve_typebound_procedure): Set new `error' flag.
128 2008-10-04 Paul Thomas <pault@gcc.gnu.org>
131 * module.c (load_equiv): Check the module before negating the
134 2008-10-02 Steven Bosscher <steven@gcc.gnu.org>
137 * intrinsic.c (add_functions): Add LEADZ and TRAILZ as generics.
138 * intrinsic.h (gfc_simplify_leadz, gfc_simplify_trailz): New protos.
139 * gfortran.h <enum gfc_isym_id>: (GFC_ISYM_LEADZ, GFC_ISYM_TRAILZ): New.
140 * f95-lang (gfc_init_builtin_functions): Add BUILT_IN_CLZ,
141 BUILT_IN_CLZL, BUILT_IN_CLZLL, BUILT_IN_CTZ, BUILT_IN_CTZL, and
143 * trans-intrinsic.c (gfc_conv_intrinsic_leadz,
144 gfc_conv_intrinsic_trails): New code-generation functions for LEADZ
145 and TRAILZ intrinsics.
146 (gfc_conv_intrinsic_function): Use them
147 * intrinsic.texi: Add documentation for LEADZ and TRAILZ.
148 * simplify.c (gfc_simplify_leadz, gfc_simplify_trailz): New functions.
150 2008-09-30 Janus Weil <janus@gcc.gnu.org>
153 * symbol.c (check_conflict): If a symbol in a COMMON block is a
154 procedure, it must be a procedure pointer.
155 (gfc_add_in_common): Symbols in COMMON blocks may be variables or
157 * trans-types.c (gfc_sym_type): Make procedure pointers in COMMON
160 2008-09-25 Jerry DeLisle <jvdelisle@gcc.gnu.org
163 * trans-io.c (build_dt): Revert previous patch..
164 * ioparm.def: Delete IOPARM_dt_f2003.
166 2008-09-25 Tobias Burnus <burnus@net-b.de>
169 * expr.c (gfc_check_pointer_assign): Allow assignment of
171 * match.c (gfc_match_assignment,gfc_match_pointer_assignment):
172 Remove unreachable code.
174 2008-09-24 Tobias Burnus <burnus@net-b.de>
176 * options.c (set_default_std_flags,gfc_init_options):
177 Add comment: keep in sync with libgfortran.
179 2008-09-24 Tobias Burnus <burnus@net-b.de>
182 * trans-array.c (gfc_trans_deferred_array): Don't auto-deallocate
185 2008-09-23 Daniel Kraft <d@domob.eu>
188 * gfortran.h (gfc_compare_actual_formal): Removed, made private.
189 (gfc_arglist_matches_symbol): New method.
190 * interface.c (compare_actual_formal): Made static.
191 (gfc_procedure_use): Use new name of compare_actual_formal.
192 (gfc_arglist_matches_symbol): New method.
193 (gfc_search_interface): Moved code partially to new
194 gfc_arglist_matches_symbol.
195 * resolve.c (resolve_typebound_generic_call): Resolve actual arglist
196 before checking against formal and use new gfc_arglist_matches_symbol
198 (resolve_compcall): Set type-spec of generated expression.
200 2008-09-23 Tobias Burnus <burnus@net-b.de>
203 * expr.c (gfc_check_pointer_assign): Add checks for pointer
206 2008-09-22 Jerry DeLisle <jvdelisle@gcc.gnu.org
209 * trans-io.c (gfc_build_io_library_fndecls): Bump pad size.
210 (build_dt): Set mask bit for IOPARM_dt_f2003.
211 * ioparm.def: Add IOPARM_dt_f2003.
213 2008-09-22 Janus Weil <janus@gcc.gnu.org>
216 * gfortran.h (gfc_option_t): New members flag_align_commons and
218 * lang.opt: New options falign-commons and Walign-commons.
219 * invoke.texi: Documentation for new options.
220 * options.c (gfc_init_options): Initialize new options.
221 (gfc_handle_options): Handle new options.
222 * trans-common.c (translate_common): Implement new options.
223 (gfc_trans_common): Set correct locus.
225 2008-09-21 Paul Thomas <pault@gcc.gnu.org>
228 * decl.c (scalarize_intrinsic_call): Both subroutines and
229 functions can give a true for get_proc_mame's last argument so
230 remove the &&gfc_current_ns->proc_name->attr.function.
231 resolve.c (resolve_actual_arglist): Add check for recursion by
232 reference to procedure as actual argument.
234 2008-09-21 Daniel Kraft <d@domob.eu>
237 * trans.h (gfc_conv_string_length): New argument `expr'.
238 * trans-expr.c (flatten_array_ctors_without_strlen): New method.
239 (gfc_conv_string_length): New argument `expr' that is used in a new
240 special case handling if cl->length is NULL.
241 (gfc_conv_subref_array_arg): Pass expr to gfc_conv_string_length.
242 * trans-array.c (gfc_conv_expr_descriptor): Ditto.
243 (gfc_trans_auto_array_allocation): Pass NULL as new expr.
244 (gfc_trans_g77_array), (gfc_trans_dummy_array_bias): Ditto.
245 (gfc_trans_deferred_array): Ditto.
246 (gfc_trans_array_constructor): Save and restore old values of globals
247 used for bounds checking.
248 * trans-decl.c (gfc_trans_dummy_character): Ditto.
249 (gfc_trans_auto_character_variable): Ditto.
251 2008-09-21 Daniel Kraft <d@domob.eu>
253 * decl.c (match_procedure_in_type): Changed misleading error message
254 for not yet implemented PROCEDURE(interface) syntax.
256 2008-09-18 Paul Thomas <pault@gcc.gnu.org>
259 * resolve.c (resolve_fl_variable_derived): Remove derived type
260 comparison for use associated derived types. Host association
261 of a derived type will not arise if there is a local derived type
262 whose use name is the same.
265 * match.c (gfc_match_call): Use the existing symbol even if
268 2008-09-18 Daniel Kraft <d@domob.eu>
271 * trans.h (gfc_trans_runtime_error): New method.
272 (gfc_trans_runtime_error_vararg): New method.
273 (gfc_allocate_array_with_status): New argument `expr' for locus/varname.
274 (gfc_deallocate_array_with_status): Ditto.
275 * trans-array.h (gfc_array_deallocate): Ditto.
276 * trans.c (gfc_trans_runtime_error): New method.
277 (gfc_trans_runtime_error_vararg): New method, moved parts of the code
278 from gfc_trans_runtime_check here.
279 (gfc_trans_runtime_error_check): Moved code partly to new method.
280 (gfc_call_malloc): Fix tab-indentation.
281 (gfc_allocate_array_with_status): New argument `expr' and call
282 gfc_trans_runtime_error for error reporting to include locus.
283 (gfc_deallocate_with_status): Ditto.
284 * trans-stmt.c (gfc_trans_deallocate): Pass expr as new argument.
285 * trans-array.c (gfc_array_allocate): Ditto.
286 (gfc_array_deallocate): New argument `expr', passed on.
287 (gfc_trans_dealloc_allocated): Pass NULL for expr.
288 * trans-openmp.c (gfc_omp_clause_default): Ditto.
290 2008-09-18 Paul Thomas <pault@gcc.gnu.org>
294 * module.c (check_for_ambiguous): New function to test loaded
295 symbol for ambiguity with fixup symbol.
296 (read_module): Call check_for_ambiguous.
297 (write_symtree): Do not write the symtree for symbols coming
298 from an interface body.
301 * resolve.c (count_specific_procs ): New function to count the
302 number of specific procedures with the same name as the generic
303 and emit appropriate errors for and actual argument reference.
304 (resolve_assumed_size_actual): Add new argument no_formal_args.
305 Correct logic around passing generic procedures as arguments.
306 Call count_specific_procs from two locations.
307 (resolve_function): Evaluate and pass no_formal_args.
308 (resolve call): The same and clean up a bit by using csym more
312 * symbol.c (gfc_add_access): Access can be updated if use
313 associated and not private.
315 2008-09-17 Jakub Jelinek <jakub@redhat.com>
318 * trans-stmt.c (gfc_trans_do): Optimize integer type non-simple
319 do loop initialization.
321 2008-09-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
322 Tobias Burnus <burnus@net.b.de>
325 * io.c (match_vtag): Add tag name to error message.
326 (match_out_tag): Cleanup whitespace.
327 (gfc_resolve_dt): Resolve id and async tags.
329 2008-09-13 Daniel Kraft <d@domob.eu>
332 * primary.c (gfc_match_varspec): Added missing type-spec clearing
333 after wrong implicit character typing.
335 2008-09-12 Richard Guenther <rguenther@suse.de>
337 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Use
338 build_fold_addr_expr to properly mark the argument
341 2008-09-11 Daniel Kraft <d@domob.eu>
344 * simplify.c (simplify_cmplx): Added linebreak to long line.
345 * target-memory.c (gfc_convert_boz): Fix indentation.
346 (gfc_interpret_float): Set mpfr precision to right value before
349 2008-09-10 H.J. Lu <hongjiu.lu@intel.com>
351 * expr.c (find_array_element): Reformat comment.
353 2008-09-10 H.J. Lu <hongjiu.lu@intel.com>
355 * expr.c (find_array_element): Reformat.
357 2008-09-10 Tobias Burnus <burnus@net-b.de>
360 * trans-decl.c (get_proc_pointer_decl): Fix -Wunused-variable.
362 2008-09-09 Daniel Kraft <d@domob.eu>
365 * resolve.c (expression_rank): Added assertion to guard against
366 EXPR_COMPCALL expressions.
367 (resolve_compcall): Set expression's rank from the target procedure's.
369 2008-09-09 Daniel Kraft <d@domob.eu>
372 * trans-array.c (gfc_conv_array_parameter): Added assertion that the
373 symbol has an array spec.
375 2008-09-08 Daniel Kraft <d@domob.eu>
378 * trans-expr.c (gfc_add_interface_mapping): Set new_sym->as.
379 (gfc_map_intrinsic_function): Added checks against NULL bounds in
382 2008-09-08 Tobias Burnus <burnus@net.b.de>
385 * symbol.c (gfc_set_default_type): Copy char len.
387 2008-09-06 Steven G. Kargl <kargls@comcast.net>
390 * fortran/resolve.c (resolve_function): Shortcircuit for SIZE and
391 UBOUND if 2nd argument is KIND.
393 2008-09-06 Steven G. Kargl <kargls@comcast.net>
396 * resolve.c (resolve_function): An intrinsic subroutine should not be
397 called as a function.
399 2008-09-05 Daniel Kraft <d@domob.eu>
402 * resolve.c (resolve_types): Restore gfc_current_ns on exit.
403 * symbol.c (gfc_save_all): Removed blank line.
405 2008-09-05 Daniel Kraft <d@domob.eu>
408 * primary.c (gfc_match_rvalue): Removed logic to handle implicit
409 typing to a derived-type if a component reference is found.
410 (gfc_match_varspec): Moved it here.
412 2008-09-04 Richard Guenther <rguenther@suse.de>
414 * trans-array.c (gfc_conv_array_parameter): Use correct types
415 in building COND_EXPRs.
416 * trans-expr.c (gfc_conv_missing_dummy): Likewise.
417 * trans-intrinsics.c (gfc_conv_intrinsic_merge): Likewise.
419 2008-09-04 Daniel Kraft <d@domob.eu>
422 * expr.c (simplify_const_ref): Update expression's character length
423 when pulling out a substring reference.
425 2008-09-04 Ian Lance Taylor <iant@google.com>
427 * symbol.c (generate_isocbinding_symbol): Compare
428 gfc_notification_std with ERROR rather than FAILURE.
429 * resolve.c (check_assumed_size_reference): Compare array type
430 with AR_FULL rather than DIMEN_ELEMENT.
431 (resolve_actual_arglist): Compare with EXPR_VARIABLE rather than
434 2008-09-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
437 * io.c (check_format): Allow specifying precision with g0 format.
439 2008-09-02 Daniel Kraft <d@domob.eu>
441 * gfortran.h (struct gfc_namespace): New member `implicit_loc'.
442 (gfc_add_abstract): New method.
443 * decl.c (gfc_get_type_attr_spec): Match ABSTRACT attribute.
444 (gfc_match_derived_decl): Copy abstract attribute in derived symbol.
445 * dump-parse-tree.c (show_attr): Show ABSTRACT attribute as `ABSTRACT'
446 only to allow for ABSTRACT types.
447 * parse.c (parse_interface): Use new gfc_add_abstract.
448 * primary.c (gfc_match_structure_constructor): Check that no ABSTRACT
450 * resolve.c (resolve_typespec_used): New method.
451 (resolve_fl_derived): Check type in respect to ABSTRACT attribute and
452 check that no component is of an ABSTRACT type.
453 (resolve_symbol): Check that no symbol is of an ABSTRACT type.
454 (resolve_types): Check IMPLICIT declarations for ABSTRACT types.
455 * symbol.c (gfc_merge_new_implicit): Remember loci of IMPLICIT's.
456 (gfc_add_abstract): New method.
458 2008-09-01 Daniel Kraft <d@domob.eu>
461 * module.c (read_module): Initialize use_only flag on used symbols.
463 2008-09-01 Daniel Kraft <d@domob.eu>
465 * gfc-internals.texi (F2003 OOP), (Type-bound Procedures): New chapter
466 and section to document the internals of type-bound procedures.
467 (gfc_expr): Document EXPR_COMPCALL.
468 * gfortran.h (struct gfc_expr): Remove unused `derived' from compcall.
469 * dump-parse-tree.c (show_compcall): New method.
470 (show_expr): Call it for EXPR_COMPCALL.
471 (show_typebound), (show_f2k_derived): New methods.
472 (show_symbol): Call show_f2k_derived.
473 (show_code_node): Handle EXEC_COMPCALL.
474 * primary.c (gfc_match_varspec): Don't initialize removed `derived' in
475 primary->value.compcall.
477 2008-08-31 Richard Guenther <rguenther@suse.de>
479 * trans-expr.c (gfc_trans_string_copy): Use the correct types
480 to compute slen and dlen.
482 2008-08-31 Daniel Kraft <d@domob.eu>
484 * gfortran.h (enum gfc_statement): New entry `ST_GENERIC'.
485 (struct gfc_tbp_generic): New type.
486 (struct gfc_typebound_proc): Removed `target' and added union with
487 `specific' and `generic' members; new members `overridden',
488 `subroutine', `function' and `is_generic'.
489 (struct gfc_expr): New members `derived' and `name' in compcall union
490 member and changed type of `tbp' to gfc_typebound_proc.
491 (gfc_compare_interfaces), (gfc_compare_actual_formal): Made public.
492 * match.h (gfc_typebound_default_access): New global.
493 (gfc_match_generic): New method.
494 * decl.c (gfc_match_generic): New method.
495 (match_binding_attributes): New argument `generic' and handle it.
496 (match_procedure_in_type): Mark matched binding as non-generic.
497 * interface.c (gfc_compare_interfaces): Made public.
498 (gfc_compare_actual_formal): Ditto.
499 (check_interface_1), (compare_parameter): Use new public names.
500 (gfc_procedure_use), (gfc_search_interface): Ditto.
501 * match.c (match_typebound_call): Set base-symbol referenced.
502 * module.c (binding_generic): New global array.
503 (current_f2k_derived): New global.
504 (mio_typebound_proc): Handle IO of GENERIC bindings.
505 (mio_f2k_derived): Record current f2k-namespace in current_f2k_derived.
506 * parse.c (decode_statement): Handle GENERIC statement.
507 (gfc_ascii_statement): Ditto.
508 (typebound_default_access), (set_typebound_default_access): Removed.
509 (gfc_typebound_default_access): New global.
510 (parse_derived_contains): New default-access implementation and handle
511 GENERIC statements encountered.
512 * primary.c (gfc_match_varspec): Adapted to new gfc_typebound_proc
513 structure and removed check for SUBROUTINE/FUNCTION from here.
514 * resolve.c (extract_compcall_passed_object): New method.
515 (update_compcall_arglist): Use it.
516 (resolve_typebound_static): Adapted to new gfc_typebound_proc structure.
517 (resolve_typebound_generic_call): New method.
518 (resolve_typebound_call): Check target is a SUBROUTINE and handle calls
520 (resolve_compcall): Ditto (check for target being FUNCTION).
521 (check_typebound_override): Handle GENERIC bindings.
522 (check_generic_tbp_ambiguity), (resolve_typebound_generic): New methods.
523 (resolve_typebound_procedure): Handle GENERIC bindings and set new
524 attributes subroutine, function and overridden in gfc_typebound_proc.
525 (resolve_fl_derived): Ensure extended type is resolved before the
527 * st.c (gfc_free_statement): Fix bug with free'ing EXEC_COMPCALL's.
528 * symbol.c (gfc_find_typebound_proc): Adapt for GENERIC changes.
530 2008-08-29 Jan Hubicka <jh@suse.cz>
532 * parse.c (parse_interface): Silence uninitialized var warning.
534 2008-08-29 Jakub Jelinek <jakub@redhat.com>
536 * trans.h (struct lang_type): Add span.
537 (GFC_TYPE_ARRAY_SPAN): Define.
538 * trans-decl.c (gfc_get_symbol_decl): For subref array pointers,
539 copy TREE_STATIC from decl to span instead of setting it
540 unconditionally, set DECL_ARTIFICIAL, fix type of initializer
541 and set GFC_TYPE_ARRAY_SPAN on decl's type.
542 * trans-types.c (gfc_get_array_descr_info): If
543 GFC_TYPE_ARRAY_SPAN is non-NULL, use it as element size.
545 * trans-decl.c (check_constant_initializer,
546 gfc_emit_parameter_debug_info): New functions.
547 (gfc_generate_module_vars, gfc_generate_function_code): Emit
548 PARAMETERs and unreferenced variables with initializers into
551 * gfortran.h (gfc_use_list): Add where field.
552 * module.c (use_locus): New static variable.
553 (gfc_match_use): Set it.
554 (gfc_use_module): Copy it to gfc_use_list's where field.
555 * trans-decl.c (gfc_generate_module_vars): Call gfc_trans_use_stmts.
556 (gfc_trans_use_stmts): Set backend locus before calling the debug
557 hook. Allow non-VAR_DECLs to be created even for non-external
558 module. Don't emit anything so far for renames from different
562 * trans-decl.c (create_function_arglist): Set DECL_BY_REFERENCE on
563 PARM_DECLs with pointer or reference type.
565 * trans-decl.c (gfc_build_qualified_array): Build non-flat
566 array type for debug info purposes.
570 * f95-lang.c (gfc_init_ts): New function.
571 (LANG_HOOKS_INIT_TS): Define.
572 * gfortran.h (gfc_use_rename): New type, moved from module.c.
573 (gfc_get_use_rename): New macro, moved from module.c.
574 (gfc_use_list): New type.
575 (gfc_get_use_list): New macro.
576 (gfc_namespace): Add use_stmts field.
577 (gfc_free_use_stmts): New prototype.
578 * Make-lang.in (fortran/trans-decl.o): Depend on debug.h.
579 * module.c (gfc_use_rename, gfc_get_use_rename): Moved to
581 (gfc_use_module): Chain the USE statement info to
583 (gfc_free_use_stmts): New function.
584 * symbol.c (gfc_free_namespace): Call gfc_free_use_stmts.
585 * trans.h (struct module_htab_entry): New type.
586 (gfc_find_module, gfc_module_add_decl): New functions.
587 * trans.c (gfc_generate_module_code): Create NAMESPACE_DECL for
588 the module, adjust DECL_CONTEXTs of module procedures and
589 call gfc_module_add_decl for them.
590 * trans-common.c (build_common_decl): Set DECL_IGNORED_P
591 on the common variable.
592 (create_common): Set DECL_IGNORED_P for use associated vars.
593 * trans-decl.c: Include debug.h.
594 (gfc_get_symbol_decl): Set DECL_IGNORED_P on use_assoc vars from
596 (build_function_decl): Allow current_function_decl's context
597 to be a NAMESPACE_DECL.
598 (module_htab, cur_module): New variables.
599 (module_htab_do_hash, module_htab_eq, module_htab_decls_hash,
600 module_htab_decls_eq, gfc_find_module, gfc_module_add_decl): New
602 (gfc_create_module_variable): Adjust DECL_CONTEXTs of module
603 variables and types and call gfc_module_add_decl for them.
604 (gfc_generate_module_vars): Temporarily set cur_module.
605 (gfc_trans_use_stmts): New function.
606 (gfc_generate_function_code): Call it.
607 (gfc_generate_block_data): Set DECL_IGNORED_P on decl.
608 * trans-types.c (gfc_get_derived_type): Adjust DECL_CONTEXT
609 and TYPE_CONTEXT of module derived types.
611 2008-08-28 Daniel Kraft <d@domob.eu>
613 * gfortran.h (enum expr_t): New value `EXPR_COMPCALL'.
614 (gfc_get_typebound_proc): New macro.
615 (struct gfc_expr): New union-member `compcall' for EXPR_COMPCALL.
616 (enum gfc_exec_op): New value `EXEC_COMPCALL'.
617 (gfc_find_typebound_proc): New argument.
618 (gfc_copy_ref), (gfc_match_varspec): Made public.
619 * decl.c (match_procedure_in_type): Use gfc_get_typebound_proc.
620 * expr.c (free_expr0), (gfc_copy_expr): Handle EXPR_COMPCALL.
621 (gfc_copy_ref): Made public and use new name.
622 (simplify_const_ref): Use new name of gfc_copy_ref.
623 (simplify_parameter_variable): Ditto.
624 (gfc_simplify_expr): gcc_unreachable for EXPR_COMPCALL.
625 * match.c (match_typebound_call): New method.
626 (gfc_match_call): Allow for CALL's to typebound procedures.
627 * module.c (binding_passing), (binding_overriding): New variables.
628 (expr_types): Add EXPR_COMPCALL.
629 (mio_expr): gcc_unreachable for EXPR_COMPCALL.
630 (mio_typebound_proc), (mio_typebound_symtree): New methods.
631 (mio_f2k_derived): Handle type-bound procedures.
632 * primary.c (gfc_match_varspec): Made public and parse trailing
633 references to type-bound procedures; new argument `sub_flag'.
634 (gfc_match_rvalue): New name and argument of gfc_match_varspec.
635 (match_variable): Ditto.
636 * resolve.c (update_arglist_pass): New method.
637 (update_compcall_arglist), (resolve_typebound_static): New methods.
638 (resolve_typebound_call), (resolve_compcall): New methods.
639 (gfc_resolve_expr): Handle EXPR_COMPCALL.
640 (resolve_code): Handle EXEC_COMPCALL.
641 (resolve_fl_derived): New argument to gfc_find_typebound_proc.
642 (resolve_typebound_procedure): Ditto and removed not-implemented error.
643 * st.c (gfc_free_statement): Handle EXEC_COMPCALL.
644 * symbol.c (gfc_find_typebound_proc): New argument `noaccess' and
645 implement access-checking.
646 * trans-expr.c (gfc_apply_interface_mapping_to_expr): gcc_unreachable
648 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Add missing break.
649 * trans-openmp.c (gfc_trans_omp_array_reduction): Add missing
650 intialization of ref->type.
652 2008-08-28 Janus Weil <janus@gcc.gnu.org>
655 * module.c (ab_attribute,attr_bits,mio_symbol_attribute): Take care of
656 saving attr.procedure and attr.proc_ptr to the module file.
658 2008-08-25 Daniel Kraft <d@domob.eu>
660 * gfortran.h (gfc_find_component): Add new arguments.
661 * parse.c (parse_derived_contains): Check if the derived-type containing
662 the CONTAINS section is SEQUENCE/BIND(C).
663 * resolve.c (resolve_typebound_procedure): Check for name collision with
665 (resolve_fl_derived): Check for name collision with inherited
666 type-bound procedures.
667 * symbol.c (gfc_find_component): New arguments `noaccess' and `silent'.
668 (gfc_add_component): Adapt for new arguments.
669 * primary.c (match_varspec), (gfc_match_structure_constructor): Ditto.
671 2008-08-24 Tobias Burnus <burnus@net-b.de>
674 * decl.c (verify_bind_c_sym): Reject array/string returning
677 2008-08-24 Tobias Burnus <burnus@net-b.de>
680 * trans-expr.c (gfc_conv_function_call): Add string_length
681 for character-returning bind(C) functions.
683 2008-08-24 Daniel Kraft <d@domob.eu>
685 * gfortran.h (gfc_typebound_proc): New struct.
686 (gfc_symtree): New member typebound.
687 (gfc_find_typebound_proc): Prototype for new method.
688 (gfc_get_derived_super_type): Prototype for new method.
689 * parse.h (gfc_compile_state): New state COMP_DERIVED_CONTAINS.
690 * decl.c (gfc_match_procedure): Handle PROCEDURE inside derived-type
692 (gfc_match_end): Handle new context COMP_DERIVED_CONTAINS.
693 (gfc_match_private): Ditto.
694 (match_binding_attributes), (match_procedure_in_type): New methods.
695 (gfc_match_final_decl): Rewrote to make use of new
696 COMP_DERIVED_CONTAINS parser state.
697 * parse.c (typebound_default_access): New global helper variable.
698 (set_typebound_default_access): New callback method.
699 (parse_derived_contains): New method.
700 (parse_derived): Extracted handling of CONTAINS to new parser state
701 and parse_derived_contains.
702 * resolve.c (resolve_bindings_derived), (resolve_bindings_result): New.
703 (check_typebound_override), (resolve_typebound_procedure): New methods.
704 (resolve_typebound_procedures): New method.
705 (resolve_fl_derived): Call new resolving method for typebound procs.
706 * symbol.c (gfc_new_symtree): Initialize new member typebound to NULL.
707 (gfc_find_typebound_proc): New method.
708 (gfc_get_derived_super_type): New method.
710 2008-08-23 Janus Weil <janus@gcc.gnu.org>
712 * gfortran.h (gfc_component): Add field "symbol_attribute attr", remove
713 fields "pointer", "allocatable", "dimension", "access".
714 Remove functions "gfc_set_component_attr" and "gfc_get_component_attr".
715 * interface.c (gfc_compare_derived_types): Ditto.
716 * trans-array.c (gfc_array_allocate,structure_alloc_comps): Ditto.
717 * trans-expr.c (gfc_conv_component_ref,gfc_trans_subcomponent_assign,
718 gfc_conv_structure): Ditto.
719 * symbol.c (gfc_find_component,free_components,gfc_set_component_attr,
720 gfc_get_component_attr,verify_bind_c_derived_type,
721 generate_isocbinding_symbol): Ditto.
722 * decl.c (build_struct): Ditto.
723 * dump-parse-tree.c (show_components): Ditto.
724 * trans-stmt.c (gfc_trans_deallocate): Ditto.
725 * expr.c (gfc_check_assign,gfc_check_pointer_assign,
726 gfc_default_initializer): Ditto.
727 * module.c (mio_component): Ditto.
728 * trans-types.c (copy_dt_decls_ifequal,gfc_get_derived_type): Ditto.
729 * resolve.c (has_default_initializer,resolve_structure_cons,
730 gfc_iso_c_func_interface,find_array_spec,resolve_ref,
731 resolve_deallocate_expr,resolve_allocate_expr,resolve_fl_derived,
732 resolve_equivalence_derived): Ditto.
733 * trans-io.c (transfer_expr): Ditto.
734 * parse.c (parse_derived): Ditto.
735 * dependency.c (gfc_check_dependency): Ditto.
736 * primary.c (gfc_variable_attr): Ditto.
738 2008-08-23 Tobias Burnus <burnus@net-b.de>
741 * arith.c (gfc_arith_concat): Fix concat of kind=4 strings.
743 2008-08-23 Tobias Burnus <burnus@net-b.de>
746 * target-memory.c (gfc_interpret_character): Support
749 2008-08-22 Daniel Kraft <d@domob.eu>
752 * symbol.c (gfc_add_type): Warn on -Wsurprising if a function-result
753 type is re-declared but neither -pedantic nor -std=f* is given and so
755 * invoke.texi (-Wsurprising): Document this new behaviour.
757 2008-08-22 Daniel Kraft <d@domob.eu>
759 * gfortran.h (in_prefix): Removed from this header.
760 * match.h (gfc_matching_prefix): Moved and renamed from `in_prefix'.
761 * decl.c (in_prefix): Removed from here.
762 (gfc_match_prefix): Use new name of `gfc_matching_prefix'.
763 * symbol.c (gfc_check_symbol_typed): Ditto.
764 * expr.c (check_typed_ns): New helper variable.
765 (expr_check_typed_help): New helper method.
766 (gfc_expr_check_typed): Rewrote to use gfc_traverse_expr to do the
767 work, fixing a minor problem.
768 * match.c (gfc_matching_prefix): New variable.
770 2008-08-22 Daniel Kraft <d@domob.eu>
774 * gfortran.h (in_prefix): New global.
775 (gfc_check_symbol_typed), (gfc_check_expr_typed): New methods.
776 * array.c (match_array_element_spec): Check that bounds-expressions
777 don't have symbols not-yet-typed in them.
778 * decl.c (var_element): Check that variable used is already typed.
779 (char_len_param_value): Check that expression does not contain
780 not-yet-typed symbols.
781 (in_prefix): New global.
782 (gfc_match_prefix): Record using `in_prefix' if we're at the moment
783 parsing a prefix or not.
784 * expr.c (gfc_expr_check_typed): New method.
785 * parse.c (verify_st_order): New argument to disable error output.
786 (check_function_result_typed): New helper method.
787 (parse_spec): Check that the function-result declaration, if given in
788 a prefix, contains no not-yet-typed symbols when the IMPLICIT rules are
790 * symbol.c (gfc_check_symbol_typed): Check that a symbol already has
791 a type associated to it, otherwise use the IMPLICIT rules or signal
794 2008-08-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
796 * f95-lang.c: Update all calls to pedwarn.
798 2008-08-18 Daniel Franke <franke.daniel@gmail.com>
801 * gfortran.texi: Document decision on include file handling in
804 2008-08-16 Tobias Burnus <burnus@net-b.de>
807 * libgfortran.h: Reduce GFC_MAX_DIMENSIONS to 7.
809 2008-08-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
812 * io.c (gfc_match_open): Enable UTF-8 in checks.
813 * simplify.c (gfc_simplify_selected_char_kind): Enable iso_10646.
815 2008-08-14 Janus Weil <janus@gcc.gnu.org>
818 * symbol.c (check_conflict): Move conflict checks for (procedure,save)
819 and (procedure,intent) to resolve_fl_procedure.
820 * resolve.c (resolve_fl_procedure): Ditto.
822 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
825 * f95-lang.c (gfc_mark_addressable): Use "pedwarn (0," instead of
828 2008-08-09 Paul Thomas <pault@gcc.gnu.org>
831 * symbol.c (gfc_add_extension): New function.
832 * decl.c (gfc_get_type_attr_spec): Call it.
833 (gfc_match_derived_decl): Set symbol extension attribute from
835 * gfortran.h : Add prototype for gfc_add_extension.
837 2008-08-08 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
840 * options.c (set_Wall): Replace set_Wunused by warn_unused.
842 2008-08-08 Daniel Kraft <d@domob.eu>
844 * gfortran.h (gfc_finalizer): Replaced member `procedure' by two
845 new members `proc_sym' and `proc_tree' to store the symtree after
847 (gfc_find_sym_in_symtree): Made public.
848 * decl.c (gfc_match_final_decl): Adapted for new member name.
849 * interface.c (gfc_find_sym_in_symtree): Made public.
850 (gfc_extend_expr), (gfc_extend_assign): Changed call accordingly.
851 * module.c (mio_finalizer), (mio_f2k_derived), (mio_full_f2k_derived):
852 New methods for module-file IO of f2k_derived.
853 (mio_symbol): Do IO of f2k_derived namespace.
854 * resolve.c (gfc_resolve_finalizers): Adapted for new member name and
855 finding the symtree for the symbol here.
856 * symbol.c (gfc_free_finalizer): Adapted for new members.
858 2008-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
860 * gfc-internals.texi: Update to GFDL 1.2. Do not list GPL as
862 * gfortran.texi: Likewise.
863 * intrinsic.texi: Do not list GPL as Invariant Section.
864 * invoke.texi: Likewise. Update copyright years.
866 2008-07-29 Paul Thomas <pault@gcc.gnu.org>
868 * trans-expr.c (conv_parent_component_references): New function
869 to build missing parent references.
870 (gfc_conv_variable): Call it
871 * symbol.c (gfc_add_component): Check that component name in a
872 derived type extension does not appear in parent.
873 (gfc_find_component): For a derived type extension, check if
874 the component appears in the parent derived type by calling
875 self. Separate errors for private components and private types.
876 * decl.c (match_data_constant): Add extra arg to call to
877 gfc_match_structure_constructor.
878 (check_extended_derived_type): New function to check that a
879 parent derived type exists and that it is OK for exension.
880 (gfc_get_type_attr_spec): Add extra argument 'name' and return
881 it if extends is specified.
882 (gfc_match_derived_decl): Match derived type extension and
883 build a first component of the parent derived type if OK. Add
884 the f2k namespace if not present.
885 * gfortran.h : Add the extension attribute.
886 * module.c : Handle attribute 'extension'.
887 * match.h : Modify prototypes for gfc_get_type_attr_spec and
888 gfc_match_structure_constructor.
889 * primary.c (build_actual_constructor): New function extracted
890 from gfc_match_structure_constructor and modified to call self
891 iteratively to build derived type extensions, when f2k named
893 (gfc_match_structure_constructor): Do not throw error for too
894 many components if a parent type is being handled. Use
895 gfc_find_component to generate errors for non-existent or
896 private components. Iteratively call self for derived type
897 extensions so that parent constructor is built. If extension
898 and components left over, throw error.
899 (gfc_match_rvalue): Add extra arg to call to
900 gfc_match_structure_constructor.
902 * trans-array.c (gfc_conv_resolve_dependencies): If lhs and rhs
903 are the same symbol, aliassing does not matter.
905 2008-07-29 Jan Hubicka <jh@suse.cz>
907 * options.c (gfc_post_options): Do not set flag_no_inline.
909 2008-07-29 Daniel Kraft <d@domob.eu>
912 * trans-intrinsic.c (conv_generic_with_optional_char_arg): New method
913 to append a string-length even if the string argument is missing, e.g.
915 (gfc_conv_intrinsic_function): Call the new method for EOSHIFT, PACK
918 2008-07-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
920 * gfortran.h (try): Remove macro. Replace try with gfc_try
931 * interface.c: Likewise.
932 * intrinsic.c: Likewise.
933 * intrinsic.h: Likewise.
938 * resolve.c: Likewise.
939 * scanner.c: Likewise.
940 * simplify.c: Likewise.
941 * symbol.c: Likewise.
942 * trans-openmp.c: Likewise.
943 * trans-types.c: Likewise.
945 2008-07-28 Tobias Burnus <burnus@net-b.de>
947 * Make-lang.in: Remove -Wno-* from fortran-warn.
949 2008-07-28 Richard Guenther <rguenther@suse.de>
951 Merge from gimple-tuples-branch.
953 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
955 * trans-expr.c: Include gimple.h instead of tree-gimple.h.
956 * trans-array.c: Same.
957 * trans-openmp.c: Same.
958 * trans-stmt.c: Same.
961 * trans-decl.c: Same.
962 * trans-intrinsic.c: Same.
963 * trans.c: Same. Include tree-iterator.h.
964 * Make-lang.in (trans.o): Depend on tree-iterator.h
966 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
968 * trans-array.h (gfc_conv_descriptor_data_set_internal):
969 Rename to gfc_conv_descriptor_data_set.
970 (gfc_conv_descriptor_data_set_tuples): Remove.
971 * trans-array.c (gfc_conv_descriptor_data_get): Rename
972 from gfc_conv_descriptor_data_set_internal.
973 Remove last argument to gfc_add_modify.
974 (gfc_trans_allocate_array_storage): Rename gfc_add_modify_expr to
976 (gfc_trans_create_temp_array): Same.
977 (gfc_conv_array_transpose): Same.
978 (gfc_grow_array): Same.
979 (gfc_put_offset_into_var): Same.
980 (gfc_trans_array_ctor_element): Same.
981 (gfc_trans_array_constructor_subarray): Same.
982 (gfc_trans_array_constructor_value): Same.
983 (gfc_trans_scalarized_loop_end): Same.
984 (gfc_array_init_size): Same.
985 (gfc_array_allocate): Same.
986 (gfc_trans_array_bounds): Same.
987 (gfc_trans_auto_array_allocation): Same.
988 (gfc_trans_g77_array): Same.
989 (gfc_trans_dummy_array_bias): Same.
990 (gfc_conv_expr_descriptor): Same.
991 (structure_alloc_comps): Same.
992 * trans-expr.c: Same.
993 * trans-openmp.c (gfc_omp_clause_default_ctor): Same.
994 Rename gfc_conv_descriptor_data_set_tuples to
995 gfc_conv_descriptor_data_set.
996 (gfc_omp_clause_copy_ctor): Change build_gimple_modify_stmt to
998 (gfc_omp_clause_assign_op): Same.
999 (gfc_trans_omp_array_reduction): Rename gfc_add_modify_expr to
1001 (gfc_trans_omp_atomic): Same.
1002 (gfc_trans_omp_do): Same. Change GIMPLE_MODIFY_STMT to MODIFY_EXPR.
1003 Rename gfc_add_modify_stmt to gfc_add_modify.
1004 * trans-stmt.c: Rename gfc_add_modify_expr to
1006 * trans.c: Rename gfc_add_modify_expr to
1008 (gfc_add_modify): Remove last argument.
1009 Rename GIMPLE_MODIFY_STMT to MODIFY_EXPR.
1010 * trans.h: Remove gfc_add_modify_expr, gfc_add_modify_stmt.
1011 Add prototype for gfc_add_modify.
1012 * f95-lang.c (union lang_tree_node): Rename GENERIC_NEXT to TREE_CHAIN.
1013 * trans-decl.c: Rename gfc_add_modify_stmt to gfc_add_modify.
1015 * trans-intrinsic.c: Same.
1017 2008-02-25 Aldy Hernandez <aldyh@redhat.com>
1019 * Make-lang.in (fortran-warn): Add -Wno-format.
1021 2008-02-19 Diego Novillo <dnovillo@google.com>
1023 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
1025 * fortran/Make-lang.in (fortran-warn): Remove.
1027 2007-11-22 Aldy Hernandez <aldyh@redhat.com>
1029 * trans-expr.c (gfc_trans_string_copy): Use "void *" when building a
1032 2007-11-10 Aldy Hernandez <aldyh@redhat.com>
1034 * Make-lang.in (fortran-warn): Set to -Wno-format.
1035 * trans.c (gfc_trans_code): Update comment to say GENERIC.
1036 Call tree_annotate_all_with_locus instead of annotate_all_with_locus.
1038 2008-07-27 Tobias Burnus <burnus@net-b.de>
1043 * trans.c (gfc_trans_runtime_check): Allow run-time warning besides
1045 * trans.h (gfc_trans_runtime_check): Update declaration.
1046 * trans-array.c (gfc_trans_array_ctor_element,gfc_trans_array_bound_check,
1047 gfc_conv_array_ref,gfc_conv_ss_startstride,gfc_trans_dummy_array_bias):
1048 Updated gfc_trans_runtime_check calls.
1049 (gfc_conv_array_parameter): Implement flag_check_array_temporaries,
1050 fix packing/unpacking for nonpresent optional actuals to optional
1052 * trans-array.h (gfc_conv_array_parameter): Update declaration.
1053 * trans-expr.c (gfc_conv_substring,gfc_trans_arrayfunc_assign,
1054 gfc_conv_function_call): Updated gfc_trans_runtime_check calls.
1055 (gfc_conv_function_call): Update gfc_conv_array_parameter calls.
1056 * trans-expr.c (gfc_trans_goto): Updated gfc_trans_runtime_check
1058 * trans-io.c (set_string,gfc_conv_intrinsic_repeat): Ditto.
1059 (gfc_conv_intrinsic_transfer,gfc_conv_intrinsic_loc): Same for
1060 gfc_conv_array_parameter.
1061 * trans-intrinsics.c (gfc_conv_intrinsic_bound): Ditto.
1062 * trans-decl.c (gfc_build_builtin_function_decls): Add
1063 gfor_fndecl_runtime_warning_at.
1064 * lang.opt: New option fcheck-array-temporaries.
1065 * gfortran.h (gfc_options): New flag_check_array_temporaries.
1066 * options.c (gfc_init_options, gfc_handle_option): Handle flag.
1067 * invoke.texi: New option fcheck-array-temporaries.
1069 2008-07-24 Jan Hubicka <jh@suse.cz>
1071 * fortran/options.c (gfc_post_options): Remove flag_unline_trees code.
1073 2008-07-24 Daniel Kraft <d@domob.eu>
1076 * lang.opt (Wnonstd-intrinsics): Removed option.
1077 (Wintrinsics-std), (Wintrinsic-shadow): New options.
1078 * invoke.texi (Option Summary): Removed -Wnonstd-intrinsics
1079 from the list and added -Wintrinsics-std and -Wintrinsic-shadow.
1080 (Error and Warning Options): Documented the new options and removed
1081 the documentation for -Wnonstd-intrinsics.
1082 * gfortran.h (gfc_option_t): New members warn_intrinsic_shadow and
1083 warn_intrinsics_std, removed warn_nonstd_intrinsics.
1084 (gfc_is_intrinsic): Renamed from gfc_intrinsic_name.
1085 (gfc_warn_intrinsic_shadow), (gfc_check_intrinsic_standard): New.
1086 * decl.c (match_procedure_decl): Replaced gfc_intrinsic_name by
1087 the new name gfc_is_intrinsic.
1088 (warn_intrinsic_shadow): New helper method.
1089 (gfc_match_function_decl), (gfc_match_subroutine): Call the new method
1090 warn_intrinsic_shadow to check the just-parsed procedure.
1091 * expr.c (check_init_expr): Call new gfc_is_intrinsic to check whether
1092 the function called is really an intrinsic in the selected standard.
1093 * intrinsic.c (gfc_is_intrinsic): Renamed from gfc_intrinsic_name and
1094 extended to take into account the selected standard settings when trying
1095 to find out whether a symbol is an intrinsic or not.
1096 (gfc_check_intrinsic_standard): Made public and extended.
1097 (gfc_intrinsic_func_interface), (gfc_intrinsic_sub_interface): Removed
1098 the calls to check_intrinsic_standard, this check now happens inside
1100 (gfc_warn_intrinsic_shadow): New method defined.
1101 * options.c (gfc_init_options): Initialize new warning flags to false
1102 and removed intialization of Wnonstd-intrinsics flag.
1103 (gfc_post_options): Removed logic for Wnonstd-intrinsics flag.
1104 (set_Wall): Set new warning flags and removed Wnonstd-intrinsics flag.
1105 (gfc_handle_option): Handle the new flags and removed handling of the
1106 old Wnonstd-intrinsics flag.
1107 * primary.c (gfc_match_rvalue): Replaced call to gfc_intrinsic_name by
1108 the new name gfc_is_intrinsic.
1109 * resolve.c (resolve_actual_arglist): Ditto.
1110 (resolve_generic_f), (resolve_unknown_f): Ditto.
1111 (is_external_proc): Ditto.
1112 (resolve_generic_s), (resolve_unknown_s): Ditto.
1113 (resolve_symbol): Ditto and ensure for symbols declared INTRINSIC that
1114 they are really available in the selected standard setting.
1116 2008-07-24 Daniel Kraft <d@domob.eu>
1118 * match.c (gfc_match): Add assertion to catch wrong calls trying to
1119 match upper-case characters.
1121 2008-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1124 * gfortran.h: Add "warn_array_temp" to gfc_option_t.
1125 * lang.opt: Add -Warray-temporaries.
1126 * invoke.texi: Document -Warray-temporaries
1127 * trans-array.h (gfc_trans_create_temp_array): Add argument of
1129 (gfc_conv_loop_setup): Likewise.
1130 * trans-array.c (gfc_trans_create_temp_array): If
1131 -Warray-temporaries is given and locus is present, warn about
1132 creation of array temporaries.
1133 (gfc_trans_array_constructor_subarray): Add locus to call
1134 of gfc_conv_loop_setup.
1135 (gfc_trans_array_constructor): Add where argument. Pass where
1136 argument to call of gfc_trans_create_temp_array.
1137 (gfc_add_loop_ss_code): Add where argument. Pass where argument
1138 to recursive call of gfc_add_loop_ss_code and to call of
1139 gfc_trans_array_constructor.
1140 (gfc_conv_loop_setup): Add where argument. Pass where argument
1141 to calls to gfc_add_loop_ss_code and to gfc_trans_create_temp_array.
1142 (gfc_conv_expr_descriptor): Pass location to call of
1143 gfc_conv_loop_setup.
1144 (gfc_conv_array_parameter): If -Warray-temporaries is given,
1145 warn about creation of temporary arrays.
1146 * trans-expr.c (gfc_conv_subref_array_arg): Add where argument
1147 to call to gfc_conv_loop_setup.
1148 (gfc_conv_function_call): Add where argument to call to
1149 gfc_trans_creat_temp_array.
1150 (gfc_trans_subarray_assign): Likewise.
1151 (gfc_trans_assignment_1): Add where argument to call to
1152 gfc_conv_loop_setup.
1153 * trans-stmt.c (gfc_conv_elemental_dependencies): Add where
1154 argument to call to gfc_trans_create_temp_array.
1155 (gfc_trans_call): Add where argument to call to gfc_conv_loop_setup.
1156 (generate_loop_for_temp_to_lhs): Likewise.
1157 (generate_loop_for_rhs_to_temp): Likewise.
1158 (compute_inner_temp_size): Likewise.
1159 (gfc_trans-pointer_assign_need_temp): Likewise.
1160 (gfc_evaluate_where_mask): Likewise.
1161 (gfc_trans_where_assign): Likewise.
1162 (gfc_trans_where_3): Likewise.
1163 * trans-io.c (transfer_srray_component): Add where argument
1164 to function. Add where argument to call to gfc_conv_loop_setup.
1165 (transfer_expr): Add where argument to call to
1166 transfer_array_component.
1167 (gfc_trans_transfer): Add where expression to call to
1168 gfc_conv_loop_setup.
1169 * trans-intrinsic.c (gfc_conv_intrinsic_anyall): Add
1170 where argument to call to gfc_conv_loop_setup.
1171 (gfc_conv_intrinsic_count): Likewise.
1172 (gfc_conv_intrinsic_arith): Likewise.
1173 (gfc_conv_intrinsic_dot_product): Likewise.
1174 (gfc_conv_intrinsic_minmaxloc): Likewise.
1175 (gfc_conv_intrinsic_minmaxval): Likewise.
1176 (gfc_conv_intrinsic_array_transfer): Warn about
1177 creation of temporary array.
1178 Add where argument to call to gfc_trans_create_temp_array.
1179 * options.c (gfc_init_options): Initialize gfc_option.warn_array_temp.
1180 (gfc_handle_option): Set gfc_option.warn_array_temp.
1182 2008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1185 * f95-lang.c (gfc_mark_addressable): All calls to pedwarn changed.
1187 2008-07-22 Daniel Kraft <d@domob.eu>
1190 * io.c (error_element), (format_locus): New static globals.
1191 (unexpected_element): Spelled out this message fully.
1192 (next_char): Keep track of locus when not MODE_STRING.
1193 (next_char_not_space): Remember last parsed element in error_element.
1194 (format_lex): Fix two indentation errors.
1195 (check_format): Use format_locus and possibly error_element for a
1196 slightly better error message on invalid format.
1197 (check_format_string): Set format_locus to start of the string
1198 expression used as format.
1200 2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1202 * expr.c (gfc_check_pointer_assign): Fix typo in string.
1203 * io.c (check_format): Fix typo in string. Fix comment typos.
1204 * parse.c (gfc_global_used): Likewise.
1205 * resolve.c (resolve_allocate_expr): Likewise.
1206 * symbol.c (gfc_set_default_type): Likewise.
1207 * arith.c: Fix typos in comments.
1208 * array.c: Likewise.
1211 * dependency.c: Likewise.
1212 * f95-lang.c: Likewise.
1213 * gfortran.h: Likewise.
1214 * matchexp.c: Likewise.
1215 * module.c: Likewise.
1216 * primary.c: Likewise.
1217 * scanner.c: Likewise.
1218 * trans-array.c: Likewise.
1219 * trans-common.c: Likewise.
1220 * trans-decl.c: Likewise.
1221 * trans-expr.c: Likewise.
1222 * trans-intrinsic.c: Likewise.
1223 * trans-types.c: Likewise.
1224 * trans.c: Likewise.
1225 * trans.h: Likewise.
1227 2008-07-19 Tobias Burnus <burnus@net-b.de>
1230 * matchexp.c (gfc_get_parentheses): Remove obsolete workaround,
1231 which caused the generation of wrong code.
1233 2008-07-19 Tobias Burnus <burnus@net-b.de>
1236 * scanner.c (load_file): Add argument to destinguish between
1237 true filename and displayed filename.
1238 (include_line,gfc_new_file): Adapt accordingly.
1240 2008-07-19 Tobias Burnus <burnus@net-b.de>
1242 * check.c (gfc_check_cshift,gfc_check_eoshift,gfc_check_unpack): Add rank
1243 checks for cshift's shift and eoshift's shift and boundary args.
1244 (gfc_check_unpack): Add rank and shape tests for unpack.
1246 2008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1248 * gfortran.h (new): Remove macro.
1249 * array.c (gfc_append_constructor, match_array_list,
1250 gfc_match_array_constructor): Likewise.
1251 * bbt.c (insert, gfc_insert_bbt): Likewise.
1252 * decl.c (var_element, top_var_list, top_val_list, gfc_match_data,
1253 get_proc_name): Likewise.
1254 * expr.c (gfc_copy_actual_arglist): Likewise.
1255 * interface.c (compare_actual_formal, check_new_interface,
1256 gfc_add_interface): Likewise.
1257 * intrinsic.c gfc_convert_type_warn, gfc_convert_chartype):
1259 * io.c (match_io_iterator, match_io_list): Likewise.
1260 * match.c (match_forall_header): Likewise.
1261 * matchexp.c (build_node): Likewise.
1262 * module.c (gfc_match_use): Likewise.
1263 * scanner.c (load_file): Likewise.
1264 * st.c (gfc_append_code): Likewise.
1265 * symbol.c (save_symbol_data, gfc_get_sym_tree, gfc_undo_symbols,
1266 gfc_commit_symbols): Likewise.
1267 * trans-common.c (build_field): Likewise.
1268 * trans-decl.c (gfc_finish_var_decl): Likewise.
1269 * trans-expr.c (gfc_free_interface_mapping,
1270 gfc_get_interface_mapping_charlen, gfc_add_interface_mapping,
1271 gfc_finish_interface_mapping,
1272 gfc_apply_interface_mapping_to_expr): Likewise.
1273 * trans.h (gfc_interface_sym_mapping): Likewise.
1275 2008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1277 * gfortran.h (operator): Remove macro.
1278 (gfc_namespace, gfc_expr): Avoid C++ keywords.
1279 * arith.c (eval_intrinsic, eval_intrinsic_f2, eval_intrinsic_f3):
1281 * decl.c (access_attr_decl): Likewise.
1282 * dependency.c (gfc_dep_compare_expr): Likewise.
1283 * dump-parse-tree.c (show_expr, show_uop, show_namespace):
1285 * expr.c (gfc_copy_expr, gfc_type_convert_binary,
1286 simplify_intrinsic_op, check_intrinsic_op): Likewise.
1287 * interface.c (fold_unary, gfc_match_generic_spec,
1288 gfc_match_interface, gfc_match_end_interface,
1289 check_operator_interface, check_uop_interfaces,
1290 gfc_check_interfaces, gfc_extend_expr, gfc_extend_assign,
1291 gfc_add_interface, gfc_current_interface_head,
1292 gfc_set_current_interface_head): Likewise.
1293 * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
1295 * matchexp.c (gfc_get_parentheses, build_node): Likewise.
1296 * module.c (gfc_use_rename, gfc_match_use, find_use_name_n,
1297 number_use_names, mio_expr, load_operator_interfaces, read_module,
1298 write_operator, write_module): Likewise.
1299 * openmp.c (resolve_omp_atomic): Likewise.
1300 * resolve.c (resolve_operator, gfc_resolve_character_operator,
1301 gfc_resolve_uops): Likewise.
1302 * symbol.c (free_uop_tree, gfc_free_namespace): Likewise.
1303 * trans-expr.c (gfc_conv_expr_op): Likewise.
1304 * trans-openmp.c (gfc_trans_omp_atomic): Likewise.
1306 2008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1308 * gfortran.h (protected): Remove macro.
1309 * dump-parse-tree.c (show_attr): Avoid C++ keywords.
1310 * expr.c (gfc_check_pointer_assign): Likewise.
1311 * interface.c (compare_parameter_protected): Likewise.
1312 * intrinsic.c (enum class, add_sym, add_sym_0, add_sym_1,
1313 add_sym_1s, add_sym_1m, add_sym_2, add_sym_2s, add_sym_3,
1314 add_sym_3ml, add_sym_3red, add_sym_3s, add_sym_4, add_sym_4s,
1315 add_sym_5s): Likewise.
1316 * match.c (gfc_match_assignment, gfc_match_pointer_assignment):
1318 * module.c (mio_symbol_attribute): Likewise.
1319 * primary.c (match_variable): Likewise.
1320 * resolve.c (resolve_equivalence): Likewise.
1321 * symbol.c (check_conflict, gfc_add_protected, gfc_copy_attr):
1323 * trans-types.c (gfc_get_array_type_bounds): Likewise.
1325 2008-07-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1327 * arith.c (eval_type_intrinsic0): Avoid C++ keywords.
1328 * gfortran.h (try, protected, operator, new): Likewise.
1330 2008-07-17 Tobias Burnus <burnus@net-b.de>
1334 * array.c (gfc_match_array_spec): Fix array-rank check.
1335 * resolve.c (resolve_fl_derived): Fix constentness check
1336 for the array dimensions.
1338 2008-07-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1340 * Make-lang.in (gfortranspec.o): Fix dependencies.
1342 2008-07-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1345 * io.c: Add error check for g0 edit descriptor followed by '.'.
1347 2008-07-12 Daniel Kraft <d@domob.eu>
1349 * resolve.c (resolve_fl_derived): Allow pointer components to empty
1350 derived types fixing a missing part of PR fortran/33221.
1352 2008-07-10 Daniel Kraft <d@domob.eu>
1354 * gfc-internals.texi (section gfc_expr): Created documentation about
1355 the gfc_expr internal data structure.
1357 2008-07-07 Thomas Koenig <tkoenig@gcc.gnu.org>
1360 * iresolve.c (gfc_resolve_product): Set shape of return
1362 (gfc_resolve_sum): Likewise.
1364 2008-07-07 Jakub Jelinek <jakub@redhat.com>
1367 * f95-lang.c (poplevel): Don't ever add subblocks to
1368 global_binding_level.
1370 2008-07-02 Janus Weil <janus@gcc.gnu.org>
1371 Tobias Burnus <burnus@net-b.de>
1372 Paul Thomas <pault@gcc.gnu.org>
1375 * gfortran.h (struct gfc_symbol): New member "proc_pointer".
1376 * check.c (gfc_check_associated,gfc_check_null): Implement
1378 * decl.c (match_procedure_decl): Ditto.
1379 * expr.c (gfc_check_pointer_assign,gfc_check_assign_symbol): Ditto.
1380 * interface.c (compare_actual_formal): Ditto.
1382 * match.c (gfc_match_pointer_assignment): Ditto.
1383 * parse.c (parse_interface): Ditto.
1384 * primary.c (gfc_match_rvalue,match_variable): Ditto.
1385 * resolve.c (resolve_fl_procedure): Ditto.
1386 * symbol.c (check_conflict,gfc_add_external,gfc_add_pointer,
1387 gfc_copy_attr,gen_fptr_param,build_formal_args): Ditto.
1388 * trans-decl.c (get_proc_pointer_decl,gfc_get_extern_function_decl,
1389 create_function_arglist): Ditto.
1390 * trans-expr.c (gfc_conv_variable,gfc_conv_function_val,
1391 gfc_conv_function_call,gfc_trans_pointer_assignment): Ditto.
1393 2008-07-02 Thomas Koenig <tkoenig@gcc.gnu.org>
1397 * iresolve.c (resolve_mask_arg): Don't convert mask to
1398 kind=1 logical if it is of that type already.
1400 2008-06-29 Thomas Koenig <tkoenig@gcc.gnu.org>
1403 * iresolve.c (gfc_resolve_matmul): Copy shapes
1406 2008-06-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1408 * invoke.texi: Add documentation for runtime behavior of
1411 2008-06-28 Daniel Kraft <d@domob.eu>
1413 * gfc-internals.texi (section gfc_code): Extended documentation about
1414 gfc_code in the internal datastructures chapter including details about
1415 how IF, DO and SELECT blocks look like and an example for how the
1416 block-chaining works.
1418 2008-06-25 Paul Thomas <pault@gcc.gnu.org>
1421 * interface.c (check_intents): Correct error where the actual
1422 arg was checked for a pointer argument, rather than the formal.
1424 2008-06-24 Paul Thomas <pault@gcc.gnu.org>
1427 * expr.c (gfc_check_assign): Change message and locus for
1428 error when conform == 0.
1430 2008-06-23 Jakub Jelinek <jakub@redhat.com>
1433 * cpp.c (cpp_define_builtins): Change _OPENMP value to 200805.
1435 2008-06-20 Laurynas Biveinis <laurynas.biveinis@gmail.com>
1436 Tobias Burnus <burnus@net-b.de>
1440 * scanner.c (preprocessor_line): do not call gfc_free for
1441 current_file->filename if it differs from filename.
1443 2008-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1445 * arith.c (hollerith2representation): Fix for -Wc++-compat.
1446 * array.c (gfc_get_constructor): Likewise.
1447 * decl.c (gfc_get_data_variable, gfc_get_data_value, gfc_get_data,
1448 create_enum_history, gfc_match_final_decl): Likewise.
1449 * error.c (error_char): Likewise.
1450 * expr.c (gfc_get_expr, gfc_copy_expr): Likewise.
1451 * gfortran.h (gfc_get_charlen, gfc_get_array_spec,
1452 gfc_get_component, gfc_get_formal_arglist, gfc_get_actual_arglist,
1453 gfc_get_namelist, gfc_get_omp_clauses, gfc_get_interface,
1454 gfc_get_common_head, gfc_get_dt_list, gfc_get_array_ref,
1455 gfc_get_ref, gfc_get_equiv, gfc_get_case, gfc_get_iterator,
1456 gfc_get_alloc, gfc_get_wide_string): Likewise.
1457 * interface.c (count_types_test): Likewise.
1458 * intrinsic.c (add_char_conversions, gfc_intrinsic_init_1):
1460 * io.c (gfc_match_open, gfc_match_close, match_filepos, match_io,
1461 gfc_match_inquire, gfc_match_wait): Likewise.
1462 * match.c (gfc_match, match_forall_iterator): Likewise.
1463 * module.c (gfc_get_pointer_info, gfc_get_use_rename, add_fixup,
1464 add_true_name, parse_string, write_atom, quote_string,
1465 mio_symtree_ref, mio_gmp_real, write_common_0): Likewise.
1466 * options.c (gfc_post_options): Likewise.
1467 * primary.c (match_integer_constant, match_hollerith_constant,
1468 match_boz_constant, match_real_constant,
1469 gfc_get_structure_ctor_component, gfc_match_structure_constructor): Likewise.
1470 * scanner.c (gfc_widechar_to_char, add_path_to_list,
1471 add_file_change, load_line, get_file, preprocessor_line,
1472 load_file, unescape_filename, gfc_read_orig_filename): Likewise.
1473 * simplify.c (gfc_simplify_ibits, gfc_simplify_ishft,
1474 gfc_simplify_ishftc): Likewise.
1475 * symbol.c (gfc_get_st_label, gfc_get_namespace, gfc_new_symtree,
1476 gfc_get_uop, gfc_new_symbol, save_symbol_data, gfc_get_gsymbol):
1478 * target-memory.c (gfc_target_interpret_expr): Likewise.
1479 * trans-const.c (gfc_build_wide_string_const): Likewise.
1480 * trans-expr.c (gfc_add_interface_mapping): Likewise.
1481 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
1482 gfc_conv_intrinsic_int, gfc_conv_intrinsic_lib_function,
1483 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_ctime,
1484 gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam,
1485 gfc_conv_intrinsic_minmax, gfc_conv_intrinsic_minmax_char,
1486 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_index_scan_verify,
1487 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_trim): Likewise.
1488 * trans.c (gfc_get_backend_locus): Likewise.
1489 * trans.h (gfc_get_ss): Likewise.
1491 2008-06-18 Daniel Kraft <d@domob.eu>
1493 PR fortran/36517, fortran/36492
1494 * array.c (gfc_resolve_character_array_constructor): Call
1495 gfc_set_constant_character_len with changed length-chec argument.
1496 * decl.c (gfc_set_constant_character_len): Changed array argument to
1497 be a generic length-checking argument that can be used for correct
1498 checking with typespec and in special cases where the should-be length
1499 is different from the target length.
1500 (build_struct): Call gfc_set_constant_character_len with changed length
1501 checking argument and introduced additional checks for exceptional
1502 conditions on invalid code.
1503 (add_init_expr_to_sym), (do_parm): Call gfc_set_constant_character_len
1504 with changed argument.
1505 * match.h (gfc_set_constant_character_len): Changed third argument to
1506 int for the should-be length rather than bool.
1508 2008-06-17 Daniel Kraft <d@domob.eu>
1511 * array.c (gfc_resolve_character_array_constructor): Check that all
1512 elements with constant character length have the same one rather than
1513 fixing it if no typespec is given, emit an error if they don't. Changed
1514 return type to "try" and return FAILURE for the case above.
1515 (gfc_resolve_array_constructor): Removed unneeded call to
1516 gfc_resolve_character_array_constructor in this function.
1517 * gfortran.h (gfc_resolve_character_array_constructor): Returns try.
1518 * trans-array.c (get_array_ctor_strlen): Return length of first element
1519 rather than last element.
1520 * resolve.c (gfc_resolve_expr): Handle FAILURE return from
1521 gfc_resolve_character_array_constructor.
1523 2008-06-17 Paul Thomas <pault@gcc.gnu.org>
1526 * resolve.c (add_dt_to_dt_list): New function.
1527 (resolve_fl_derived): Call new function for pointer components
1528 and when derived type resolved.
1530 2008-06-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1533 * trans-decl.c (gfc_generate_function_code): Add range_check to options
1536 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1538 * gfc-internals.texi: Expand TABs, drop indentation outside examples.
1539 * gfortran.texi: Likewise.
1540 * intrinsic.texi: Likewise.
1541 * invoke.texi: Likewise.
1543 2008-06-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1546 * trans-io.c (gfc_build_io_library_fndecls): Build declaration for
1547 transfer_character_wide which includes passing in the character kind to
1548 support wide character IO. (transfer_expr): If the kind == 4, create the
1549 argument and build the call.
1550 * gfortran.texi: Fix typo.
1552 2008-06-13 Tobias Burnus <burnus@net-b.de>
1555 * decl.c (do_parm): Handle init expression for len=*.
1557 2008-06-12 Tobias Burnus <burnus@net-b.de>
1560 * trans-intrinsic.c (gfc_conv_intrinsic_index_scan_verify):
1561 Fix passing of the BACK= argument.
1563 2008-06-10 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1565 * cpp.c: Add copyright notice.
1566 * cpp.h: Add copyright notice.
1568 2008-06-08 Janus Weil <janus@gcc.gnu.org>
1571 * decl.c (match_procedure_decl): Correctly recognize if the interface
1572 is an intrinsic procedure.
1574 2008-06-08 Tobias Burnus <burnus@net-b.de>
1577 * resolve.c (resolve_symbol): Copy more attributes for
1578 PROCEDUREs with interfaces.
1580 2008-06-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1584 * io.c (check_format): Add new error message for zero width.
1585 Use new error message for FMT_A and with READ, FMT_G. Allow
1586 FMT_G with WRITE except when -std=F95 and -std=F2003.
1588 2008-06-07 Tobias Burnus <burnus@net-b.de>
1591 * intrinsic.c (add_functions): Implement c_sizeof.
1592 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Do not
1593 create unneeded variable in the scalar case.
1594 * intrinsic.texi: Add C_SIZEOF documentation.
1596 2008-06-06 Tobias Burnus <burnus@net-b.de>
1598 * intrinsic.texi (BESSEL_J1): Fix BES(S)EL_J1 typo.
1600 2008-06-06 Jakub Jelinek <jakub@redhat.com>
1602 * scanner.c (skip_free_comments, skip_fixed_comments): Handle tabs.
1603 * parse.c (next_free): Allow tab after !$omp.
1604 (decode_omp_directive): Handle !$omp task, !$omp taskwait
1606 (case_executable): Add ST_OMP_TASKWAIT.
1607 (case_exec_markers): Add ST_OMP_TASK.
1608 (gfc_ascii_statement): Handle ST_OMP_TASK, ST_OMP_END_TASK and
1610 (parse_omp_structured_block, parse_executable): Handle ST_OMP_TASK.
1611 * gfortran.h (gfc_find_sym_in_expr): New prototype.
1612 (gfc_statement): Add ST_OMP_TASK, ST_OMP_END_TASK and ST_OMP_TASKWAIT.
1613 (gfc_omp_clauses): Add OMP_SCHED_AUTO to sched_kind,
1614 OMP_DEFAULT_FIRSTPRIVATE to default_sharing. Add collapse and
1616 (gfc_exec_op): Add EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
1617 * f95-lang.c (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1618 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP, LANG_HOOKS_OMP_CLAUSE_DTOR,
1619 LANG_HOOKS_OMP_PRIVATE_OUTER_REF): Define.
1620 * trans.h (gfc_omp_clause_default_ctor): Add another argument.
1621 (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
1622 gfc_omp_clause_dtor, gfc_omp_private_outer_ref): New prototypes.
1623 * types.def (BT_ULONGLONG, BT_PTR_ULONGLONG,
1624 BT_FN_BOOL_ULONGLONGPTR_ULONGLONGPTR,
1625 BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULLPTR_ULLPTR,
1626 BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULL_ULLPTR_ULLPTR,
1627 BT_FN_VOID_PTR_PTR, BT_PTR_FN_VOID_PTR_PTR,
1628 BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): New.
1629 (BT_BOOL): Use integer type with BOOL_TYPE_SIZE rather
1630 than boolean_type_node.
1631 * dump-parse-tree.c (gfc_show_omp_node): Handle EXEC_OMP_TASK,
1632 EXEC_OMP_TASKWAIT, OMP_SCHED_AUTO, OMP_DEFAULT_FIRSTPRIVATE,
1633 untied and collapse clauses.
1634 (gfc_show_code_node): Handle EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
1635 * trans.c (gfc_trans_code): Handle EXEC_OMP_TASK and
1637 * st.c (gfc_free_statement): Likewise.
1638 * resolve.c (gfc_resolve_blocks, resolve_code): Likewise.
1639 (find_sym_in_expr): Rename to...
1640 (gfc_find_sym_in_expr): ... this. No longer static.
1641 (resolve_allocate_expr, resolve_ordinary_assign): Adjust caller.
1642 * match.h (gfc_match_omp_task, gfc_match_omp_taskwait): New
1644 * openmp.c (resolve_omp_clauses): Allow allocatable arrays in
1645 firstprivate, lastprivate, reduction, copyprivate and copyin
1647 (omp_current_do_code): Made static.
1648 (omp_current_do_collapse): New variable.
1649 (gfc_resolve_omp_do_blocks): Compute omp_current_do_collapse,
1650 clear omp_current_do_code and omp_current_do_collapse on return.
1651 (gfc_resolve_do_iterator): Handle collapsed do loops.
1652 (resolve_omp_do): Likewise, diagnose errorneous collapsed do loops.
1653 (OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED): Define.
1654 (gfc_match_omp_clauses): Handle default (firstprivate),
1655 schedule (auto), untied and collapse (n) clauses.
1656 (OMP_DO_CLAUSES): Add OMP_CLAUSE_COLLAPSE.
1657 (OMP_TASK_CLAUSES): Define.
1658 (gfc_match_omp_task, gfc_match_omp_taskwait): New functions.
1659 * trans-openmp.c (gfc_omp_private_outer_ref): New function.
1660 (gfc_omp_clause_default_ctor): Add outer argument. For allocatable
1661 arrays allocate them with the bounds of the outer var if outer
1663 (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
1664 gfc_omp_clause_dtor): New functions.
1665 (gfc_trans_omp_array_reduction): If decl is allocatable array,
1666 allocate it with outer var's bounds in OMP_CLAUSE_REDUCTION_INIT
1667 and deallocate it in OMP_CLAUSE_REDUCTION_MERGE.
1668 (gfc_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
1669 for assumed-size arrays.
1670 (gfc_trans_omp_do): Add par_clauses argument. If dovar is
1671 present in lastprivate clause and do loop isn't simple,
1672 set OMP_CLAUSE_LASTPRIVATE_STMT. If dovar is present in
1673 parallel's lastprivate clause, change it to shared and add
1674 lastprivate clause to OMP_FOR_CLAUSES. Handle collapsed do loops.
1675 (gfc_trans_omp_directive): Adjust gfc_trans_omp_do callers.
1676 (gfc_trans_omp_parallel_do): Likewise. Move collapse clause to
1677 OMP_FOR from OMP_PARALLEL.
1678 (gfc_trans_omp_clauses): Handle OMP_SCHED_AUTO,
1679 OMP_DEFAULT_FIRSTPRIVATE, untied and collapse clauses.
1680 (gfc_trans_omp_task, gfc_trans_omp_taskwait): New functions.
1681 (gfc_trans_omp_directive): Handle EXEC_OMP_TASK and
1684 2008-06-04 Janus Weil <janus@gcc.gnu.org>
1688 * resolve.c (resolve_symbol): Correctly copy the interface for a
1689 PROCEDURE declaration.
1691 2008-06-02 Janus Weil <janus@gcc.gnu.org>
1694 * symbol.c (gfc_add_allocatable,gfc_add_dimension,
1695 gfc_add_explicit_interface): Added checks.
1696 * decl.c (attr_decl1): Added missing "var_locus".
1697 * parse.c (parse_interface): Checking for errors.
1699 2008-06-02 Daniel Kraft <d@domob.eu>
1701 * gfortran.h: New statement-type ST_FINAL for FINAL declarations.
1702 (struct gfc_symbol): New member f2k_derived.
1703 (struct gfc_namespace): New member finalizers, for use in the above
1704 mentioned f2k_derived namespace.
1705 (struct gfc_finalizer): New type defined for finalizers linked list.
1706 * match.h (gfc_match_final_decl): New function header.
1707 * decl.c (gfc_match_derived_decl): Create f2k_derived namespace on
1708 constructed symbol node.
1709 (gfc_match_final_decl): New function to match a FINAL declaration line.
1710 * parse.c (decode_statement): match-call for keyword FINAL.
1711 (parse_derived): Parse CONTAINS section and accept FINAL statements.
1712 * resolve.c (gfc_resolve_finalizers): New function to resolve (that is
1713 in this case, check) a list of finalizer procedures.
1714 (resolve_fl_derived): Call gfc_resolve_finalizers here.
1715 * symbol.c (gfc_get_namespace): Initialize new finalizers to NULL.
1716 (gfc_free_namespace): Free finalizers list.
1717 (gfc_new_symbol): Initialize new f2k_derived to NULL.
1718 (gfc_free_symbol): Free f2k_derived namespace.
1719 (gfc_free_finalizer): New function to free a single gfc_finalizer node.
1720 (gfc_free_finalizer_list): New function to free a linked list of
1721 gfc_finalizer nodes.
1723 2008-06-02 Daniel Franke <franke.daniel@gmail.com>
1727 * cpp.c (gfc_cpp_init): Do not initialize builtins if
1728 processing already preprocessed input.
1729 (gfc_cpp_preprocess): Finalize output with newline.
1731 2008-05-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1733 * intrinsic.texi: Revert wrong commit.
1735 2008-05-31 Steven G. Kargl <kargls@comcast.net>
1737 * arith.c (gfc_arith_init_1): Remove now unused r and c variables.
1738 Cleanup numerical inquiry function initialization.
1739 (gfc_arith_done_1): Replace multiple mpfr_clear() invocations with
1740 a single mpfr_clears().
1741 (gfc_check_real_range): Re-arrange logic to eliminate multiple
1742 unnecessary branching and assignments.
1743 (gfc_arith_times): Use mpfr_clears() in preference to multiple
1745 (gfc_arith_divide): Ditto.
1746 (complex_reciprocal): Eliminate now unused variables a, re, im.
1747 Cleanup the mpfr abuse. Use mpfr_clears() in preference to
1748 multiple mpfr_clear().
1749 (complex_pow): Fix comment whitespace. Use mpfr_clears() in
1750 preference to multiple mpfr_clear().
1751 * simplify.c (gfc_simplify_and): Remove blank line.
1752 (gfc_simplify_atan2): Move error checking earlier to eliminate
1753 a now unnecessay gfc_free_expr().
1754 (gfc_simplify_bessel_j0): Remove unnecessary gfc_set_model_kind().
1755 (gfc_simplify_bessel_j1): Ditto.
1756 (gfc_simplify_bessel_jn): Ditto.
1757 (gfc_simplify_bessel_y0): Ditto.
1758 (gfc_simplify_bessel_y1): Ditto.
1759 (gfc_simplify_bessel_yn): Ditto.
1760 (only_convert_cmplx_boz): Eliminate unnecessary duplicate code, and
1761 combine nested if statement rational expressions.
1762 (gfc_simplify_cos): Use mpfr_clears() in preference to multiple
1764 (gfc_simplify_exp): Ditto.
1765 (gfc_simplify_fraction): Move gfc_set_model_kind() to after the
1766 special case of 0. Use mpfr_clears() in preference to multiple
1768 (gfc_simplify_gamma): Eliminate unnecessary gfc_set_model_kind().
1769 (gfc_simplify_lgamma): Ditto.
1770 (gfc_simplify_log10): Ditto.
1771 (gfc_simplify_log): Move gfc_set_model_kind () inside switch
1772 statement. Use mpfr_clears() in preference to multiple mpfr_clear().
1773 (gfc_simplify_mod): Eliminate now unused variables quot, iquot,
1774 and term. Simplify the mpfr magic.
1775 (gfc_simplify_modulo): Ditto.
1776 (gfc_simplify_nearest): Eliminate unnecessary gfc_set_model_kind().
1777 (gfc_simplify_scale): Use mpfr_clears() in preference to multiple
1779 (gfc_simplify_sin): Ditto
1780 (gfc_simplify_sqrt): Ditto
1781 (gfc_simplify_set_exponent): Move gfc_set_model_kind() to after the
1782 special case of 0. Use mpfr_clears() in preference to multiple
1785 2008-05-29 Daniel Franke <franke.daniel@gmail.com>
1788 * Make-lang.in (F95_OBJS): Added dependency on FORTRAN_TARGET_OBJS.
1790 2008-05-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1792 * scanner.c (load_line): Add first_char argument. Don't call ungetc.
1793 (gfc_read_orig_filename): Adjust call to load_line. Don't call
1795 (load_file): Adjust call to load_line.
1797 2008-05-28 Janus Weil <janus@gcc.gnu.org>
1801 * interface.c (gfc_procedure_use): Enable argument checking for
1802 external procedures with explicit interface.
1803 * symbol.c (check_conflict): Fix conflict checking for externals.
1804 (copy_formal_args): Fix handling of arrays.
1805 * resolve.c (resolve_specific_f0, resolve_specific_s0): Fix handling
1807 * parse.c (parse_interface): Non-abstract INTERFACE statement implies
1810 2008-05-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1813 * intrinsic.c (gfc_convert_chartype): Don't mark conversion
1815 * trans-array.c (gfc_trans_array_ctor_element): Divide element
1816 size by the size of one character to obtain length.
1817 * iresolve.c (gfc_resolve_cshift): Call the _char4 variant when
1819 (gfc_resolve_eoshift): Likewise.
1820 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Minor beautification.
1821 (gfc_conv_intrinsic_fdate): Minor beautification.
1822 (gfc_conv_intrinsic_ttynam): Minor beautification.
1823 (gfc_conv_intrinsic_minmax_char): Allow all character kinds.
1824 (size_of_string_in_bytes): New function.
1825 (gfc_conv_intrinsic_size): Call size_of_string_in_bytes for
1826 character expressions.
1827 (gfc_conv_intrinsic_sizeof): Likewise.
1828 (gfc_conv_intrinsic_array_transfer): Likewise.
1829 (gfc_conv_intrinsic_trim): Allow all character kinds. Minor
1831 (gfc_conv_intrinsic_repeat): Fix comment typo.
1832 * simplify.c (gfc_convert_char_constant): Take care of conversion
1833 of array constructors.
1835 2008-05-27 Tobias Burnus <burnus@net-b.de>
1838 * trans-array.c (gfc_set_loop_bounds_from_array_spec):
1839 Add missing fold_convert.
1841 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
1843 * fortran/cpp.c (cpp_define_builtins): Remove usage of TARGET_* macros,
1844 added FIXME instead.
1846 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
1849 * lang.opt (A, C, CC, D, E, H, P, U, cpp, d, fworking-directory,
1850 imultilib, iprefix, iquote, isysroot, isystem, nocpp, nostdinc,
1851 o, undef, v): New options.
1852 * options.c (gfc_init_options): Also initialize preprocessor
1854 (gfc_post_options): Also handle post-initialization of preprocessor
1856 (gfc_handle_option): Check if option is a preprocessor option.
1857 If yes, let gfc_cpp_handle_option() handle the option.
1858 * lang-specs.h: Reorganized to handle new options.
1859 * scanner.c (gfc_new_file): Read temporary file instead of
1860 input source if preprocessing is enabled.
1861 * f95-lang.c (gfc_init): Initialize preprocessor.
1862 (gfc_finish): Clean up preprocessor.
1865 * Make-lang.in: Added new objects and dependencies.
1866 * gfortran.texi: Updated section "Preprocessing and
1867 conditional compilation".
1868 * invoke.texi: Added new section "Preprocessing Options",
1869 listed and documented the preprocessing options handled
1872 2008-05-25 Tobias Burnus <burnus@net-b.de>
1875 * trans-expr.c (gfc_conv_function_call): Remove library
1876 call for c_f_pointer with scalar Fortran pointers and for
1879 2008-05-21 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1882 * iresolve.c (check_charlen_present): Don't force the rank to 1.
1884 2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1887 * trans-expr.c (gfc_conv_string_tmp): Pick the correct type for
1888 the temporary variable.
1890 2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1892 * simplify.c (gfc_simplify_dble, gfc_simplify_real): Initialize
1893 result variable to avoid warnings.
1895 2008-05-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1897 * intrinsic.c (char_conversions, ncharconv): New static variables.
1898 (find_char_conv): New function.
1899 (add_functions): Add simplification functions for ADJUSTL and
1900 ADJUSTR. Don't check the kind of their argument. Add checking for
1901 LGE, LLE, LGT and LLT.
1902 (add_subroutines): Fix argument type for SLEEP. Fix argument name
1904 (add_char_conversions): New function.
1905 (gfc_intrinsic_init_1): Call add_char_conversions.
1906 (gfc_intrinsic_done_1): Free char_conversions.
1907 (check_arglist): Use kind == 0 as a signal that we don't want
1908 the kind value to be checked.
1909 (do_simplify): Also simplify character functions.
1910 (gfc_convert_chartype): New function
1911 * trans-array.c (gfc_trans_array_ctor_element): Don't force the
1912 use of default character type.
1913 (gfc_trans_array_constructor_value): Likewise.
1914 (get_array_ctor_var_strlen): Use integer kind to build an integer
1915 instead of a character kind!
1916 (gfc_build_constant_array_constructor): Don't force the use of
1917 default character type.
1918 (gfc_conv_loop_setup): Likewise.
1919 * trans-expr.c (gfc_conv_string_tmp): Don't force the use of
1920 default character type. Allocate enough memory for wide strings.
1921 (gfc_conv_concat_op): Make sure operand kind are the same.
1922 (string_to_single_character): Remove gfc_ prefix. Reindent.
1923 Don't force the use of default character type.
1924 (gfc_conv_scalar_char_value): Likewise.
1925 (gfc_build_compare_string): Call string_to_single_character.
1926 (fill_with_spaces): New function
1927 (gfc_trans_string_copy): Add kind arguments. Use them to deal
1928 with wide character kinds.
1929 (gfc_conv_statement_function): Whitespace fix. Call
1930 gfc_trans_string_copy with new kind arguments.
1931 (gfc_conv_substring_expr): Call gfc_build_wide_string_const
1932 instead of using gfc_widechar_to_char.
1933 (gfc_conv_string_parameter): Don't force the use of default
1935 (gfc_trans_scalar_assign): Pass kind args to gfc_trans_string_copy.
1936 * intrinsic.h (gfc_check_lge_lgt_lle_llt, gfc_convert_char_constant,
1937 gfc_resolve_adjustl, gfc_resolve_adjustr): New prototypes.
1938 * decl.c (gfc_set_constant_character_len): Don't assert the
1939 existence of a single character kind.
1940 * trans-array.h (gfc_trans_string_copy): New prototype.
1941 * gfortran.h (gfc_check_character_range, gfc_convert_chartype):
1943 * error.c (print_wide_char_into_buffer): New function lifting
1944 code from gfc_print_wide_char. Fix order to output '\x??' instead
1946 (gfc_print_wide_char): Call print_wide_char_into_buffer.
1947 (show_locus): Call print_wide_char_into_buffer with buffer local
1949 * trans-const.c (gfc_build_wide_string_const): New function.
1950 (gfc_conv_string_init): Deal with wide characters strings
1952 (gfc_conv_constant_to_tree): Call gfc_build_wide_string_const.
1953 * trans-stmt.c (gfc_trans_label_assign): Likewise.
1954 (gfc_trans_character_select): Deal with wide strings.
1955 * expr.c (gfc_check_assign): Allow conversion between character
1956 kinds on assignment.
1957 * trans-const.h (gfc_build_wide_string_const): New prototype.
1958 * trans-types.c (gfc_get_character_type_len_for_eltype,
1959 gfc_get_character_type_len): Create too variants of the old
1960 gfc_get_character_type_len, one getting kind argument and the
1961 other one directly taking a type tree.
1962 * trans.h (gfor_fndecl_select_string_char4,
1963 gfor_fndecl_convert_char1_to_char4,
1964 gfor_fndecl_convert_char4_to_char1): New prototypes.
1965 * trans-types.h (gfc_get_character_type_len_for_eltype): New
1967 * resolve.c (resolve_operator): Exit early when kind mismatches
1968 are detected, because that makes us issue an error message later.
1969 (validate_case_label_expr): Fix wording of error message.
1970 * iresolve.c (gfc_resolve_adjustl, gfc_resolve_adjustr): New
1972 (gfc_resolve_pack): Call _char4 variants of library function
1973 when dealing with wide characters.
1974 (gfc_resolve_reshape): Likewise.
1975 (gfc_resolve_spread): Likewise.
1976 (gfc_resolve_transpose): Likewise.
1977 (gfc_resolve_unpack): Likewise.
1978 * target-memory.c (size_character): Take character kind bit size
1979 correctly into account (not that it changes anything for now, but
1981 (gfc_encode_character): Added gfc_ prefix. Encoding each
1982 character of a string by calling native_encode_expr for the
1983 corresponding unsigned integer.
1984 (gfc_target_encode_expr): Add gfc_ prefix to encode_character.
1985 * trans-decl.c (gfc_build_intrinsic_function_decls): Build
1986 gfor_fndecl_select_string_char4, gfor_fndecl_convert_char1_to_char4
1987 and gfor_fndecl_convert_char4_to_char1.
1988 * target-memory.h (gfc_encode_character): New prototype.
1989 * arith.c (gfc_check_character_range): New function.
1990 (eval_intrinsic): Allow non-default character kinds.
1991 * check.c (gfc_check_access_func): Only allow default
1992 character kind arguments.
1993 (gfc_check_chdir): Likewise.
1994 (gfc_check_chdir_sub): Likewise.
1995 (gfc_check_chmod): Likewise.
1996 (gfc_check_chmod_sub): Likewise.
1997 (gfc_check_lge_lgt_lle_llt): New function.
1998 (gfc_check_link): Likewise.
1999 (gfc_check_link_sub): Likewise.
2000 (gfc_check_symlnk): Likewise.
2001 (gfc_check_symlnk_sub): Likewise.
2002 (gfc_check_rename): Likewise.
2003 (gfc_check_rename_sub): Likewise.
2004 (gfc_check_fgetputc_sub): Likewise.
2005 (gfc_check_fgetput_sub): Likewise.
2006 (gfc_check_stat): Likewise.
2007 (gfc_check_stat_sub): Likewise.
2008 (gfc_check_date_and_time): Likewise.
2009 (gfc_check_ctime_sub): Likewise.
2010 (gfc_check_fdate_sub): Likewise.
2011 (gfc_check_gerror): Likewise.
2012 (gfc_check_getcwd_sub): Likewise.
2013 (gfc_check_getarg): Likewise.
2014 (gfc_check_getlog): Likewise.
2015 (gfc_check_hostnm): Likewise.
2016 (gfc_check_hostnm_sub): Likewise.
2017 (gfc_check_ttynam_sub): Likewise.
2018 (gfc_check_perror): Likewise.
2019 (gfc_check_unlink): Likewise.
2020 (gfc_check_unlink_sub): Likewise.
2021 (gfc_check_system_sub): Likewise.
2022 * primary.c (got_delim): Perform correct character range checking
2024 * trans-intrinsic.c (gfc_conv_intrinsic_conversion): Generate
2025 calls to library functions convert_char4_to_char1 and
2026 convert_char1_to_char4 for character conversions.
2027 (gfc_conv_intrinsic_char): Allow all character kings.
2028 (gfc_conv_intrinsic_strcmp): Fix whitespace.
2029 (gfc_conv_intrinsic_repeat): Take care of all character kinds.
2030 * intrinsic.texi: For all GNU intrinsics accepting character
2031 arguments, mention that they're restricted to the default kind.
2032 * simplify.c (simplify_achar_char): New function.
2033 (gfc_simplify_achar, gfc_simplify_char): Call simplify_achar_char.
2034 gfc_simplify_ichar): Don't error out for wide characters.
2035 (gfc_convert_char_constant): New function.
2037 2008-05-18 Steven G. Kargl <kargls@comcast.net>
2040 * symbol.c (check_conflict): Issue errors for abuse of PUBLIC, PRIVATE,
2042 * resolve.c (gfc_verify_binding_labels): Fix NULL pointer dereference.
2044 2008-05-17 Tobias Burnus <burnus@net-b.de>
2046 * intrinsic.texi: Correct description of GET_COMMAND_ARGUMENT
2047 and GET_ENVIRONMENT_VARIABLE; fix keyword= name for GETENV,
2048 GETLOG, GMTIME, HOSTNM, IRAND, ITIME, KILL.
2049 Move LOG_GAMMA after LOG10.
2051 2008-05-17 Tobias Burnus <burnus@net-b.de>
2053 * intrinsic.c (add_functions): Change FLUSH(C) to FLUSH(UNIT).
2054 * intrinsic.texi: Change INTEGER(*) to INTEGER; fix keyword= name for
2055 ABS, ADJUSTL, AINT, ALLOCATED, ANINT, ASSOCIATED, C_ASSOCIATED,
2056 CEILING, DBLE, DFLOAT, DOT_PRODUCT, DREAL, FLOAT, FLOOR, GET_COMMAND.
2058 2008-05-16 Paul Thomas <pault@gcc.gnu.org>
2062 * trans-stmt.c (gfc_trans_where): Tighten up the dependency
2063 check for calling gfc_trans_where_3.
2066 * trans-stmt.c (gfc_trans_where_2): Set the mask size to zero
2067 if it is calculated to be negative.
2070 * trans-stmt.c (gfc_trans_where_3, gfc_trans_where_assign): Set
2071 ss->where for scalar right hand sides.
2072 * trans-array.c (gfc_add_loop_ss_code): If ss->where is set do
2073 not evaluate scalars outside the loop. Clean up whitespace.
2074 * trans.h : Add a bitfield 'where' to gfc_ss.
2076 2008-05-16 Tobias Burnus <burnus@net-b.de>
2078 * libgfortran.h: Increase GFC_MAX_DIMENSIONS to 15.
2079 * array.c (gfc_match_array_spec): Error with -std=f2003 if rank > 7.
2081 2008-04-16 Daniel Kraft <d@domob.eu>
2084 * gfortran.h: Added field "length_from_typespec" to gfc_charlength.
2085 * aray.c (gfc_match_array_constructor): Added code to parse typespec.
2086 (check_element_type, check_constructor_type, gfc_check_constructor_type):
2087 Extended to support explicit typespec on constructor.
2088 (gfc_resolve_character_array_constructor): Pad strings correctly for
2089 explicit, constant character length.
2090 * trans-array.c: New static global variable "typespec_chararray_ctor"
2091 (gfc_trans_array_constructor): New code to support explicit but dynamic
2094 2008-05-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2097 * decl.c (match_attr_spec): Check for matching pairs of parenthesis.
2098 * expr.c (gfc_specification_expr): Supplement the error message with the
2099 type that was found.
2100 * resolve.c (gfc_resolve_index): Likewise.
2101 * match.c (gfc_match_parens): Clarify error message with "at or before".
2102 (gfc_match_do): Check for matching pairs of parenthesis.
2104 2008-05-16 Tobias Burnus <burnus@net-b.de
2106 * intrinsic.texi: Write Fortran 77/90/95 instead of F77/90/95;
2107 add missing KIND argument to ACHAR and NINT; and state that
2108 the KIND argument is a F2003 extension for ACHAR, COUNT, IACHAR,
2109 ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND, VERIFY.
2111 2008-05-16 Daniel Kraft <d@domob.eu>
2113 * primary.c: New private structure "gfc_structure_ctor_component".
2114 (gfc_free_structure_ctor_component): New helper function.
2115 (gfc_match_structure_constructor): Extended largely to support named
2116 arguments and default initialization for structure constructors.
2118 2008-05-15 Steven G. Kargl <kargls@comcast.net>
2120 * simplify.c (gfc_simplify_dble, gfc_simplify_float,
2121 simplify_bound, gfc_simplify_nearest, gfc_simplify_real): Plug
2122 possible memory leaks.
2123 (gfc_simplify_reshape): Plug possible memory leaks and dereferencing
2126 2008-05-15 Steven G. Kargl <kargls@comcast.net>
2129 * simplify.c (gfc_simplify_int, gfc_simplify_intconv): Replaced hand
2130 rolled integer conversion with gfc_int2int, gfc_real2int, and
2132 (gfc_simplify_intconv): Renamed to simplify_intconv.
2134 2008-05-15 Steven G. Kargl, <kargl@comcast.net>
2135 * gfortran.dg/and_or_xor.f90: New test
2137 * fortran/simplify.c (gfc_simplify_and, gfc_simplify_or,
2138 gfc_simplify_xor): Don't range check logical results.
2140 2008-05-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2142 * trans-expr.c (gfc_conv_concat_op): Take care of nondefault
2144 (gfc_build_compare_string): Add kind argument and use it.
2145 (gfc_conv_statement_function): Fix indentation.
2146 * gfortran.h (gfc_character_info): New structure.
2147 (gfc_character_kinds): New array.
2148 * trans-types.c (gfc_character_kinds, gfc_character_types,
2149 gfc_pcharacter_types): New array.
2150 (gfc_init_kinds): Fill character kinds array.
2151 (validate_character): Take care of nondefault character kinds.
2152 (gfc_build_uint_type): New function.
2153 (gfc_init_types): Take care of nondefault character kinds.
2154 (gfc_get_char_type, gfc_get_pchar_type): New functions.
2155 (gfc_get_character_type_len): Use gfc_get_char_type.
2156 * trans.h (gfc_build_compare_string): Adjust prototype.
2157 (gfor_fndecl_compare_string_char4, gfor_fndecl_concat_string_char4,
2158 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
2159 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
2160 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
2161 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4): New
2163 * trans-types.h (gfc_get_char_type, gfc_get_pchar_type): New
2165 * trans-decl.c (gfor_fndecl_compare_string_char4,
2166 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
2167 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
2168 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
2169 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4,
2170 gfor_fndecl_concat_string_char4): New function decls.
2171 (gfc_build_intrinsic_function_decls): Define new *_char4 function
2173 * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char,
2174 gfc_conv_intrinsic_len_trim, gfc_conv_intrinsic_ichar,
2175 gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_trim,
2176 gfc_conv_intrinsic_function): Deal with nondefault character kinds.
2178 2008-05-15 Sa Liu <saliu@de.ibm.com>
2180 * iso-c-binding.def: Add standard parameter to macro NAMED_INTCST.
2181 All existing NAMED_INTCST definitions has standard GFC_STD_F2003,
2182 c_int128_t, c_int_least128_t and c_int_fast128_t are added as
2184 * iso-fortran-evn.def: Add standard parameter GFC_STD_F2003
2185 to macro NAMED_INTCST.
2186 * symbol.c (std_for_isocbinding_symbol): New helper function to
2187 return the standard that supports this isocbinding symbol.
2188 (generate_isocbinding_symbol): Do not generate GNU extension symbols
2189 if std=f2003. Add new parameter to NAMED_INTCST.
2190 * module.c (use_iso_fortran_env_module): Add new parameter to
2191 NAMED_INTCST and new field standard to struct intmod_sym.
2192 * gfortran.h: Add new parameter to NAMED_INTCST.
2193 * trans-types.c (init_c_interop_kinds): Add new parameter to
2195 * intrinsic.texi: Documented new types C_INT128_T, C_INT_LEASE128_T
2196 and C_INT_FAST128_T.
2198 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2201 * trans-decl.c (gfc_build_dummy_array_decl): Don't repack
2202 arrays that have the TARGET attribute.
2204 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2207 * simplify.c (only_convert_cmplx_boz): New function.
2208 (gfc_simplify_cmplx, gfc_simplify_complex, gfc_simplify_dcmplx):
2209 Call only_convert_cmplx_boz.
2211 2008-05-14 Paul Thomas <pault@gcc.gnu.org>
2214 * interface.c (compare_actual_formal): Do not check sizes if the
2215 actual is BT_PROCEDURE.
2217 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2220 * trans-array.c (gfc_conv_ss_startstride): Any negative size is
2221 the same as zero size.
2222 (gfc_conv_loop_setup): Fix size calculation.
2224 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2227 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Correctly
2228 handle zero-size sections.
2230 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2233 * scanner.c (preprocessor_line): Allocate enough memory for a
2236 2008-05-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2239 * target-memory.c (gfc_target_expr_size): Correctly treat
2241 (gfc_target_encode_expr): Likewise.
2242 (gfc_interpret_complex): Whitespace change.
2244 2008-05-11 Thomas Koenig <tkoenig@gcc.gnu.org>
2247 * trans.c (gfc_call_malloc): If size equals zero, allocate one
2248 byte; don't return a null pointer.
2250 2008-05-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2253 * module.c (quote_string): Fix sprintf format.
2255 2008-05-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2258 * module.c (quote_string, unquote_string,
2259 mio_allocated_wide_string): New functions.
2260 (mio_expr): Call mio_allocated_wide_string where needed.
2262 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
2264 * trans-decl.c (gfc_get_extern_function_decl, build_function_decl):
2265 Rename DECL_IS_PURE to DECL_PURE_P.
2267 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2269 * arith.c: (gfc_arith_concat, gfc_compare_string,
2270 gfc_compare_with_Cstring, hollerith2representation,
2271 gfc_hollerith2int, gfc_hollerith2real, gfc_hollerith2complex,
2272 gfc_hollerith2character, gfc_hollerith2logical): Use wide
2273 characters for character constants.
2274 * data.c (create_character_intializer): Likewise.
2275 * decl.c (gfc_set_constant_character_len): Likewise.
2276 * dump-parse-tree.c (show_char_const): Correctly dump wide
2278 error.c (print_wide_char): Rename into gfc_print_wide_char.
2279 (show_locus): Adapt to new prototype of gfc_print_wide_char.
2280 expr.c (free_expr0): Representation is now disjunct from
2281 character string value, so we always free it.
2282 (gfc_copy_expr, find_substring_ref, gfc_simplify_expr): Adapt
2283 to wide character strings.
2284 * gfortran.h (gfc_expr): Make value.character.string a wide string.
2285 (gfc_wide_toupper, gfc_wide_strncasecmp, gfc_wide_memset,
2286 gfc_widechar_to_char, gfc_char_to_widechar): New prototypes.
2287 (gfc_get_wide_string): New macro.
2288 (gfc_print_wide_char): New prototype.
2289 * io.c (format_string): Make a wide string.
2290 (next_char, gfc_match_format, compare_to_allowed_values,
2291 gfc_match_open): Deal with wide strings.
2292 * module.c (mio_expr): Convert between wide strings and ASCII ones.
2293 * primary.c (match_hollerith_constant, match_charkind_name):
2294 Handle wide strings.
2295 * resolve.c (build_default_init_expr): Likewise.
2296 * scanner.c (gfc_wide_toupper, gfc_wide_memset,
2297 gfc_char_to_widechar): New functions.
2298 (wide_strchr, gfc_widechar_to_char, gfc_wide_strncasecmp):
2299 Changes in prototypes.
2300 (gfc_define_undef_line, load_line, preprocessor_line,
2301 include_line, load_file, gfc_read_orig_filename): Handle wide
2303 * simplify.c (gfc_simplify_achar, gfc_simplify_adjustl,
2304 gfc_simplify_adjustr, gfc_simplify_char, gfc_simplify_iachar,
2305 gfc_simplify_ichar, simplify_min_max, gfc_simplify_new_line,
2306 gfc_simplify_repeat): Handle wide strings.
2307 (wide_strspn, wide_strcspn): New helper functions.
2308 (gfc_simplify_scan, gfc_simplify_trim, gfc_simplify_verify):
2309 Handle wide strings.
2310 * symbol.c (generate_isocbinding_symbol): Likewise.
2311 * target-memory.c (size_character, gfc_target_expr_size,
2312 encode_character, gfc_target_encode_expr, gfc_interpret_character,
2313 gfc_target_interpret_expr): Handle wide strings.
2314 * trans-const.c (gfc_conv_string_init): Lower wide strings to
2316 (gfc_conv_constant_to_tree): Likewise.
2317 * trans-expr.c (gfc_conv_substring_expr): Handle wide strings.
2318 * trans-io.c (gfc_new_nml_name_expr): Likewise.
2319 * trans-stmt.c (gfc_trans_label_assign): Likewise.
2321 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2323 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
2324 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
2325 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): Mark arguments
2326 with ATTRIBUTE_UNUSED.
2328 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2330 * check.c (gfc_check_sizeof): Switch to ATTRIBUTE_UNUSED.
2331 * simplify.c (gfc_simplify_lgamma): Likewise.
2333 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2335 * openmp.c (gfc_match_omp_eos): Use gfc_next_ascii_char and
2336 gfc_peek_ascii_char.
2337 * decl.c (gfc_match_kind_spec, gfc_match_type_spec,
2338 gfc_match_implicit_none, match_implicit_range, gfc_match_implicit,
2339 match_string_p, match_attr_spec, gfc_match_suffix,
2340 match_procedure_decl, gfc_match_entry, gfc_match_subroutine):
2342 * gfortran.h (gfc_char_t): New type.
2343 (gfc_linebuf): Make line member a gfc_char_t.
2344 (locus): Make nextc member a gfc_char_t.
2345 (gfc_wide_is_printable, gfc_wide_is_digit, gfc_wide_fits_in_byte,
2346 gfc_wide_tolower, gfc_wide_strlen, gfc_next_ascii_char,
2347 gfc_peek_ascii_char, gfc_check_digit): New prototypes.
2348 * error.c (print_wide_char): New function.
2349 (show_locus): Use print_wide_char and gfc_wide_strlen.
2350 * io.c (next_char): Use gfc_char_t type.
2351 (match_io): Use gfc_peek_ascii_char and gfc_next_ascii_char.
2352 * match.c (gfc_match_parens, gfc_match_eos,
2353 gfc_match_small_literal_int, gfc_match_name, gfc_match_name_C,
2354 gfc_match_intrinsic_op, gfc_match_char, gfc_match_return,
2355 gfc_match_common): Likewise.
2356 * match.h (gfc_match_special_char): Change prototype.
2357 * parse.c (decode_specification_statement, decode_statement,
2358 decode_omp_directive, next_free, next_fixed): Use
2359 gfc_peek_ascii_char and gfc_next_ascii_char.
2360 * primary.c (gfc_check_digit): Change name.
2361 (match_digits, match_hollerith_constant, match_boz_constant,
2362 match_real_constant, next_string_char, match_charkind_name,
2363 match_string_constant, match_logical_constant_string,
2364 match_complex_constant, match_actual_arg, match_varspec,
2365 gfc_match_rvalue, match_variable): Use gfc_peek_ascii_char and
2366 gfc_next_ascii_char.
2367 * scanner.c (gfc_wide_fits_in_byte, wide_is_ascii,
2368 gfc_wide_is_printable, gfc_wide_tolower, gfc_wide_is_digit,
2369 gfc_wide_is_digit, wide_atoi, gfc_wide_strlen, wide_strcpy,
2370 wide_strchr, widechar_to_char, wide_strncmp, wide_strncasecmp,
2371 gfc_next_ascii_char, gfc_peek_ascii_char):
2373 (next_char, gfc_define_undef_line, skip_free_comments,
2374 gfc_next_char_literal, gfc_next_char, gfc_peek_char,
2375 gfc_error_recovery, load_line, preprocessor_line, include_line,
2376 load_file, gfc_read_orig_filename): Use gfc_char_t for source
2377 characters and the {gfc_,}wide_* functions to manipulate wide
2380 2008-05-06 Tobias Burnus <burnus@net-b.de>
2383 * intrinsic.c (add_functions): Call gfc_simplify_bessel_*.
2384 * intrinsic.h: Add prototypes for gfc_simplify_bessel_*.
2385 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
2386 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
2387 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): New.
2389 2008-05-03 Janus Weil <jaydub66@gmail.com>
2391 * misc.c (gfc_clear_ts): Set interface to NULL.
2393 2008-05-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2396 * gfortran.h: Add extra_comma pointer to gfc_dt structure. Add iokind to
2397 gfc_expr value union. Add io_kind enum to here from io.c.
2398 * io.c (gfc_free_dt): Free extra_comma.
2399 (gfc_resolve_dt): If an extra comma was encountered and io_unit is type
2400 BT_CHARACTER, resolve to format_expr and set default unit. Error if
2401 io_kind is M_WRITE. (match_io): Match the extra comma and set new
2402 pointer, extra_comma.
2404 2008-05-01 Bud Davis <bdavis9659@sbcglobal.net>
2407 * simplify.c (gfc_simplify_index): Check for direction argument
2410 2008-05-01 Janus Weil <jaydub66@gmail.com>
2412 * gfortran.h (struct gfc_symbol): Moving "interface" member to
2413 gfc_typespec (plus fixing a small docu error).
2414 * interface.c (gfc_procedure_use): Ditto.
2415 * decl.c (match_procedure_decl): Ditto.
2416 * resolve.c (resolve_specific_f0,
2417 resolve_specific_f0, resolve_symbol): Ditto.
2419 2008-04-30 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2421 * intrinsic.c (add_functions): Add SELECTED_CHAR_KIND intrinsic.
2422 * intrinsic.h (gfc_check_selected_char_kind,
2423 gfc_simplify_selected_char_kind): New prototypes.
2424 * gfortran.h (gfc_isym_id): Add GFC_ISYM_SC_KIND.
2425 * trans.h (gfor_fndecl_sc_kind): New function decl.
2426 * trans-decl.c (gfor_fndecl_sc_kind): Build new decl.
2427 * arith.c (gfc_compare_with_Cstring): New function.
2428 * arith.h (gfc_compare_with_Cstring): New prototype.
2429 * check.c (gfc_check_selected_char_kind): New function.
2430 * primary.c (match_string_constant, match_kind_param): Mark
2431 symbols used as literal constant kind param as referenced.
2432 * trans-intrinsic.c (gfc_conv_intrinsic_sc_kind): New function.
2433 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_sc_kind.
2434 * intrinsic.texi (SELECTED_CHAR_KIND): Document new intrinsic.
2435 * simplify.c (gfc_simplify_selected_char_kind): New function.
2437 2008-04-28 Paul Thomas <pault@gcc.gnu.org>
2440 * module.c (find_symbol): Do not return a result for a symbol
2441 that has been renamed in another module.
2443 2008-04-26 George Helffrich <george@gcc.gnu.org>
2447 * trans-common.c (create_common): Add decl to function
2448 chain (if inside one) to preserve identifier scope in debug output.
2450 2008-04-25 Jan Hubicka <jh@suse.cz>
2452 * trans-decl.c (trans_function_start): Update.
2454 2008-04-25 Tobias Burnus <burnus@net-b.de>
2455 Daniel Franke <franke.daniel@gmail.com>
2458 * gfortranspec.c (lang_specific_driver): Deprecate
2459 -M option; fix ICE when "-M" is last argument and
2460 make "-M<dir>" work.
2461 * options.c (gfc_handle_module_path_options):
2462 Use -J instead of -M in error messages.
2463 * invoke.texi: Mark -M as depecated.
2465 2008-04-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2466 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2469 * trans-instrinsic.c (gfc_conv_intrinsic_minmaxloc): Correctly adjust
2470 loop counter offset.
2472 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
2474 * trans-expr.c (gfc_conv_structure): Don't set TREE_INVARIANT.
2475 * trans-array.c (gfc_build_null_descriptor): Don't set TREE_INVARIANT.
2476 (gfc_trans_array_constructor_value): Don't set TREE_INVARIANT.
2477 (gfc_build_constant_array_constructor): Don't set TREE_INVARIANT.
2478 (gfc_conv_array_initializer): Don't set TREE_INVARIANT.
2479 * trans-common.c (get_init_field): Don't set TREE_INVARIANT.
2480 (create_common): Don't set TREE_INVARIANT.
2481 * trans-stmt.c (gfc_trans_character_select): Don't set TREE_INVARIANT.
2482 * trans-decl.c (gfc_generate_function_code): Don't set TREE_INVARIANT.
2484 2008-04-21 Steve Ellcey <sje@cup.hp.com>
2486 * f95-lang.c (gfc_init_decl_processing): use ptr_mode instead of Pmode.
2488 2008-04-21 Daniel Franke <franke.daniel@gmail.com>
2491 * gfortranspec.c (lookup_option): Properly handle separated arguments
2492 in -J option, print missing argument message when necessary.
2494 2008-04-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2497 * scanner.c (skip_fixed_comments): Update continue_line when comment is
2498 detected. (gfc_next_char_literal): Likewise.
2500 2008-04-19 Paul Thomas <pault@gcc.gnu.org>
2505 * trans_array.c (gfc_trans_array_constructor): Temporarily
2506 realign loop, if loop->from is not zero, before creating
2507 the temporary array and provide an offset.
2510 * trans-decl.c (gfc_init_default_dt): Add gfc_ prefix to name
2511 and allow for NULL body. Change all references from
2512 init_default_dt to gfc_init_default_dt.
2513 * trans.h : Add prototype for gfc_init_default_dt.
2514 * trans-array.c (gfc_trans_deferred_vars): After nullification
2515 call gfc_init_default_dt for derived types with allocatable
2518 2008-04-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2521 * trans-common.c (create_common): Revert patch causing regression.
2523 2008-04-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2526 * iresolve.c (gfc_resolve_eoshift): Check for NULL symtree in test for
2527 optional argument attribute.
2529 2008-04-16 Paul Thomas <pault@gcc.gnu.org>
2532 * trans-intrinsic.c (gfc_conv_intrinsic_char): Even though KIND
2533 is not used, the argument must be converted.
2535 2008-04-16 Jakub Jelinek <jakub@redhat.com>
2538 * f95-lang.c (gfc_init_builtin_functions): Make sure
2539 BUILT_IN_SINCOS{,F,L} types aren't varargs.
2541 2008-04-15 Paul Thomas <pault@gcc.gnu.org>
2544 * expr.c (scalarize_intrinsic_call): Reorder identification of
2545 array argument so that if one is not found a segfault does not
2546 occur. Return FAILURE if all scalar arguments.
2548 2008-04-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2549 Tobias Burnus <burnus@net-b.de>
2552 * options.c (gfc_init_options): Set the default maximum continuation
2553 lines to 255 for both free and fixed form source for warnings.
2554 (gfc_handle_option): Set -std=f95 fixed form max continuations to 19 and
2555 the -std=f95 free form max continuations to 39 for warnings.
2556 * scanner.c (gfc_next_char_literal): Adjust the current_line number only
2557 if it is less than the current locus.
2559 2008-04-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2561 PR fortran/25829 28655
2562 * io.c (io_tag): Add new tags for decimal, encoding, asynchronous,
2563 round, sign, and id. (match_open_element): Match new tags.
2564 (gfc_resolve_open): Resolve new tags. (gfc_match_open): Enable encoding
2565 for DEFAULT only. Update error messages. (match_dt_element): Fix match
2566 tag for asynchronous. Update error messages. (gfc_free_inquire): Free
2567 new expressions. (match_inquire_element): Match new tags.
2568 (gfc_match_inquire): Add constraint for ID and PENDING.
2569 (gfc_resolve_inquire): Resolve new tags.
2570 * trans-io.c (gfc_trans_inquire): Clean up whitespace and fix setting of
2571 mask for ID parameter.
2572 * ioparm.def: Fix order of parameters for pending, round, and sign.
2573 NOTE: These must line up with the definitions in libgfortran/io/io.h. or
2576 2008-04-06 Paul Thomas <pault@gcc.gnu.org>
2579 * expr.c (scalarize_intrinsic_call): Identify which argument is
2580 an array and use that as the template.
2581 (check_init_expr): Remove tests that first argument is an array
2582 in the call to scalarize_intrinsic_call.
2584 2008-04-06 Tobias Schlüter <tobi@gcc.gnu.org>
2587 * io.c (io_tag): Add field 'value'. Split 'spec' field in
2589 (match_etag, match_vtag, match_ltag): Split parsing in two steps
2590 to give better error messages.
2592 2008-04-06 Tobias Burnus <burnus@net-b.de>
2594 * io.c (check_io_constraints): Add constrains. ID= requires
2595 asynchronous= and asynchronous= must be init expression.
2597 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2599 * f95-lang.c: Set LANG_HOOKS_NAME to "GNU Fortran".
2601 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2603 * dump-parse-tree.c: Use fprintf, fputs and fputc instead of
2604 gfc_status and gfc_status_char. Remove gfc_ prefix of the gfc_show_*
2605 functions and make them static. Add new gfc_dump_parse_tree
2607 * gfortran.h (gfc_option_t): Rename verbose into dump_parse_tree.
2608 (gfc_status, gfc_status_char): Delete prototypes.
2609 * error.c (gfc_status, gfc_status_char): Remove functions.
2610 * scanner.c (gfc_new_file): Use printf instead of gfc_status.
2611 * options.c (gfc_init_options): Rename verbose into dump_parse_tree.
2612 (gfc_handle_module_path_options): Use gfc_fatal_error instead of
2613 gfc_status and exit.
2614 (gfc_handle_option): Rename verbose into dump_parse_tree.
2615 * parse.c (gfc_parse_file): Use gfc_dump_parse_tree.
2617 2008-04-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2618 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2620 PR fortran/25829 28655
2621 * dump-parse-tree.c (gfc_show_code_node): Show new I/O parameters.
2622 * gfortran.h (gfc_statement): Add ST_WAIT enumerator.
2623 (gfc_open): Add pointers for decimal, encoding, round, sign,
2624 asynchronous. (gfc_inquire): Add pointers for asynchronous, decimal,
2625 encoding, pending, round, sign, size, id.
2626 (gfc_wait): New typedef struct. (gfc_dt): Add pointers for id, pos,
2627 asynchronous, blank, decimal, delim, pad, round, sign.
2628 (gfc_exec_op): Add EXEC_WAIT enumerator. (gfc_code): Add pointer for
2629 wait. (gfc_free_wait), (gfc_resolve_wait): New function prototypes.
2630 * trans-stmt.h (gfc_trans_wait): New function prototype.
2631 * trans.c (gfc_trans_code): Add case for EXEC_WAIT.
2632 * io.c (io_tag): Add new tags for DECIMAL, ENCODING, ROUND, SIGN,
2633 ASYCHRONOUS, ID. (match_open_element): Add matchers for new tags.
2634 (gfc_free_open): Free new pointers. (gfc_resolve_open): Resolve new
2635 tags. (gfc_resolve_open): Remove comment around check for allowed
2636 values and ASYNCHRONOUS, update it. Likewise for DECIMAL, ENCODING,
2637 ROUND, and SIGN. (match_dt_element): Add matching for new tags.
2638 (gfc_free_wait): New function. (gfc_resolve_wait): New function.
2639 (match_wait_element): New function. (gfc_match_wait): New function.
2640 * resolve.c (gfc_resolve_blocks): Add case for EXEC_WAIT.
2641 (resolve_code): Add case for EXEC_WAIT.
2642 * st.c (gfc_free_statement): Add case for EXEC_WAIT.
2643 * trans-io.c (ioparam_type): Add IOPARM_ptype_wait. (gfc_st_parameter):
2644 Add "wait" entry. (iocall): Add IOCALL_WAIT enumerator.
2645 (gfc_build_io_library_fndecls): Add function declaration for st_wait.
2646 (gfc_trans_open): Add mask bits for new I/O tags.
2647 (gfc_trans_inquire): Add mask bits for new I/O tags.
2648 (gfc_trans_wait): New translation function.
2649 (build_dt): Add mask bits for new I/O tags.
2650 * match.c (gfc_match_if) Add matcher for "wait".
2651 * match.h (gfc_match_wait): Prototype for new function.
2652 * ioparm.def: Add new I/O parameter definitions.
2653 * parse.c (decode_statement): Add match for "wait" statement.
2654 (next_statement): Add case for ST_WAIT. (gfc_ascii_statement): Same.
2656 2008-04-03 Jakub Jelinek <jakub@redhat.com>
2659 * openmp.c (resolve_omp_clauses): Diagnose if a clause symbol
2662 2008-04-03 Tom Tromey <tromey@redhat.com>
2664 * Make-lang.in (fortran_OBJS): New variable.
2666 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
2668 * f95-lang.c (insert_block): Kill.
2670 2008-04-01 George Helffrich <george@gcc.gnu.org>
2672 PR fortran/35154, fortran/23057
2673 * trans-common.c (create_common): Add decl to function
2674 chain to preserve identifier scope in debug output.
2676 2008-04-01 Joseph Myers <joseph@codesourcery.com>
2678 * gfortran.texi: Include gpl_v3.texi instead of gpl.texi
2679 * Make-lang.in (GFORTRAN_TEXI): Include gpl_v3.texi instead of
2682 2008-03-30 Paul Thomas <pault@gcc.gnu.org>
2685 * resolve.c (resolve_function, resolve_call): If the procedure
2686 is elemental do not look for noncopying intrinsics.
2688 2008-03-29 Paul Thomas <pault@gcc.gnu.org>
2691 * trans-array.c (gfc_array_init_size): Set 'size' zero if
2692 negative in one dimension.
2695 * trans-expr.c (gfc_trans_string_copy): Only assign a char
2696 directly if the lhs and rhs types are the same.
2698 2008-03-28 Daniel Franke <franke.daniel@gmail.com>
2699 Paul Richard Thomas <paul.richard.thomas@gmail.com>
2702 * primary.c (match_variable): Improved matching of function
2704 * resolve.c (resolve_allocate_deallocate): Removed checks if
2705 the actual argument for STAT is a variable.
2707 2008-03-28 Tobias Burnus <burnus@net-b.de>
2709 * symbol.c (gfc_get_default_type): Fix error message; option
2710 -fallow_leading_underscore should be -fallow-leading-underscore
2712 2008-03-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2715 * iresolve.c (gfc_resolve_cshift): Check for NULL symtree in test for
2716 optional argument attribute.
2718 2008-03-27 Tom Tromey <tromey@redhat.com>
2720 * Make-lang.in: Revert automatic dependency patch.
2722 2008-03-25 Tom Tromey <tromey@redhat.com>
2724 * Make-lang.in: Remove .o targets.
2725 (fortran_OBJS): New variable.
2726 (fortran/gfortranspec.o): Move to fortran/. Reduce to variable
2728 (GFORTRAN_D_OBJS): Update.
2729 (GFORTRAN_TRANS_DEPS): Remove.
2731 2008-03-24 Paul Thomas <pault@gcc.gnu.org>
2734 * resolve.c (resolve_structure_cons): It is an error to assign
2735 NULL to anything other than a pointer or allocatable component.
2738 * resolve.c (resolve_symbol): If the symbol is a derived type,
2739 resolve the derived type. If the symbol is a derived type
2740 function, ensure that the derived type is visible in the same
2741 namespace as the function.
2743 2008-03-23 Tobias Schlüter <tobi@gcc.gnu.org>
2745 * trans.h: Use fold_build in build1_v, build2_v and build3_v
2747 * trans-openmp.c (gfc_trans_omp_critical, gfc_trans_omp_single):
2748 Don't use build2_v macro.
2750 2008-03-19 Daniel Franke <franke.daniel@gmail.com>
2753 * interface.c (gfc_procedure_use): Check for keyworded arguments in
2754 procedures without explicit interfaces.
2756 2008-03-16 Paul Thomas <pault@gcc.gnu.org>
2759 * resolve.c (check_assumed_size_reference): Only visit the
2760 first reference and look directly at the highest dimension.
2762 2008-03-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2765 * trans-array.c (gfc_conv_array_index_offset): Remove unnecessary
2768 2008-03-15 Daniel Franke <franke.daniel@gmail.com>
2771 * resolve.c (resolve_branch): Less strict and pessimistic warning
2774 2008-03-11 Paolo Bonzini <bonzini@gnu.org>
2776 * f95-lang.c (LANG_HOOKS_CLEAR_BINDING_STACK): Delete.
2777 (gfc_be_parse_file): Call clear_binding_stack from here.
2778 (gfc_clear_binding_stack): Rename to clear_binding_stack.
2780 2008-03-09 Paul Thomas <pault@gcc.gnu.org>
2783 * module.c (mio_symtree_ref): After providing a symbol for a
2784 missing equivalence member, resolve and NULL the fixups.
2786 2008-03-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2788 * invoke.texi (Error and Warning Options): Document
2791 2008-03-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2794 * trans-array.c (gfc_conv_ss_startstride): Fix the logic to avoid
2795 checking bounds of absent optional arguments.
2797 2008-03-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2800 * intrinsic.c (add_functions): Add simplification routines for
2801 ERF, DERF, ERFC and DERFC.
2802 * decl.c (gfc_match_suffix, gfc_match_subroutine): Change GNU
2803 extensions into Fortran 2008 features.
2804 * intrinsic.h (gfc_simplify_erf, gfc_simplify_erfc): New
2806 * simplify.c (gfc_simplify_erf, gfc_simplify_erfc): New functions.
2808 2008-03-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2811 * intrinsic.c (add_functions): Modify intrinsics ACOSH, ASINH,
2812 ATANH, ERF, ERFC and GAMMA. Add intrinsics BESSEL_{J,Y}{0,1,N},
2813 ERFC_SCALED, LOG_GAMMA and HYPOT.
2814 * intrinsic.h (gfc_check_hypot, gfc_simplify_hypot,
2815 gfc_resolve_hypot): New prototypes.
2816 * mathbuiltins.def: Add HYPOT builtin. Make complex versions of
2817 ACOSH, ASINH and ATANH available.
2818 * gfortran.h (GFC_ISYM_ERFC_SCALED, GFC_ISYM_HYPOT): New values.
2819 * lang.opt: Add -std=f2008 option.
2820 * libgfortran.h: Define GFC_STD_F2008.
2821 * lang-specs.h: Add .f08 and .F08 file suffixes.
2822 * iresolve.c (gfc_resolve_hypot): New function.
2823 * parse.c (parse_contained): Allow empty CONTAINS for Fortran 2008.
2824 * check.c (gfc_check_hypot): New function.
2825 * trans-intrinsic.c (gfc_intrinsic_map): Define ERFC_SCALE builtin.
2826 * options.c (set_default_std_flags): Allow Fortran 2008 by default.
2827 (form_from_filename): Add .f08 suffix.
2828 (gfc_handle_option): Handle -std=f2008 option.
2829 * simplify.c (gfc_simplify_hypot): New function.
2830 * gfortran.texi: Document Fortran 2008 status and file extensions.
2831 * intrinsic.texi: Document new BESSEL_{J,Y}{0,1,N} intrinsics,
2832 as well as HYPOT and ERFC_SCALED. Update documentation of ERF,
2833 ERFC, GAMMA, LGAMMA, ASINH, ACOSH and ATANH.
2834 * invoke.texi: Document the new -std=f2008 option.
2836 2008-03-02 Jakub Jelinek <jakub@redhat.com>
2838 * gfortranspec.c (lang_specific_driver): Update copyright notice
2841 2008-02-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2844 * expr.c (find_array_element): Modify traversing the constructor to
2845 avoid trying to access NULL memory pointed to by next for the
2846 last element. (find_array_section): Exit while loop if cons->next is
2848 * trans-expr.c (gfc_conv_scalar_char_value): Initialize gfc_typespec.
2849 (gfc_conv_function_call): Same.
2850 * decl.c (gfc_match_implicit): Same.
2851 * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Same.
2853 2008-02-28 Daniel Franke <franke.daniel@gmail.com>
2858 * lang.opt: Added -Wreturn-type.
2859 * options.c (gfc_handle_option): Recognize -Wreturn-type.
2860 * trans-decl.c (gfc_trans_deferred_vars): Emit warnings for funtions
2861 where the result value is not set.
2862 (gfc_generate_function_code): Likewise.
2863 (generate_local_decl): Emit warnings for funtions whose RESULT
2864 variable is not set.
2866 2008-02-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2869 * trans-expr.c (gfc_conv_variable): Don't build indirect
2870 references when explicit interface is mandated.
2871 * resolve.c (resolve_formal_arglist): Set attr.always_explicit
2872 on the result symbol as well as the procedure symbol.
2874 2008-02-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2877 * trans.h: Remove prototypes for gfor_fndecl_math_exponent4,
2878 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
2879 gfor_fndecl_math_exponent16.
2880 * f95-lang.c (build_builtin_fntypes): Add new function types.
2881 (gfc_init_builtin_functions): Add new builtins for nextafter,
2882 frexp, ldexp, fabs, scalbn and inf.
2883 * iresolve.c (gfc_resolve_rrspacing): Don't add hidden arguments.
2884 (gfc_resolve_scale): Don't convert type of second argument.
2885 (gfc_resolve_set_exponent): Likewise.
2886 (gfc_resolve_size): Don't add hidden arguments.
2887 * trans-decl.c: Remove gfor_fndecl_math_exponent4,
2888 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
2889 gfor_fndecl_math_exponent16.
2890 * trans-intrinsic.c (gfc_intrinsic_map): Remove intrinsics
2891 for scalbn, fraction, nearest, rrspacing, set_exponent and
2893 (gfc_conv_intrinsic_exponent): Directly call frexp.
2894 (gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_nearest,
2895 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
2896 gfc_conv_intrinsic_scale, gfc_conv_intrinsic_set_exponent): New
2898 (gfc_conv_intrinsic_function): Use the new functions above.
2900 2008-02-26 Tobias Burnus <burnus@net-b.de>
2903 * interface.c (check_operator_interface): Show better line for error
2904 messages; fix constrains for user-defined assignment operators.
2905 (gfc_extend_assign): Fix constrains for user-defined assignment
2908 2008-02-26 Tom Tromey <tromey@redhat.com>
2910 * trans-io.c (set_error_locus): Remove old location code.
2911 * trans-decl.c (gfc_set_decl_location): Remove old location code.
2912 * f95-lang.c (gfc_init): Remove test of USE_MAPPED_LOCATION.
2913 * scanner.c (gfc_gobble_whitespace): Remove old location code.
2914 (get_file): Likewise.
2915 (preprocessor_line): Likewise.
2916 (load_file): Likewise.
2917 (gfc_new_file): Likewise.
2918 * trans.c (gfc_trans_runtime_check): Remove old location code.
2919 (gfc_get_backend_locus): Likewise.
2920 (gfc_set_backend_locus): Likewise.
2921 * data.c (gfc_assign_data_value): Remove old location code.
2922 * error.c (show_locus): Remove old location code.
2923 * gfortran.h (gfc_linebuf): Remove old location code.
2924 (gfc_linebuf_linenum): Remove old-location variant.
2926 2008-02-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2929 * trans-const.c (gfc_build_string_const): Don't call gettext.
2930 (gfc_build_localized_string_const): New function.
2931 * trans-const.h (gfc_build_localized_string_const): New prototype.
2932 * trans.c (gfc_trans_runtime_check): Use
2933 gfc_build_localized_string_const instead of gfc_build_string_const.
2934 (gfc_call_malloc): Likewise.
2935 (gfc_allocate_with_status): Likewise.
2936 (gfc_allocate_array_with_status): Likewise.
2937 (gfc_deallocate_with_status): Likewise.
2938 (gfc_call_realloc): Likewise.
2939 * trans-io.c (gfc_trans_io_runtime_check): Likewise.
2941 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
2943 * arith.c: Update copyright years.
2944 * arith.h: Likewise.
2945 * array.c: Likewise.
2947 * check.c: Likewise.
2951 * dependency.c: Likewise.
2952 * dependency.h: Likewise.
2953 * dump-parse-tree.c: Likewise.
2954 * error.c: Likewise.
2956 * gfc-internals.texi: Likewise.
2957 * gfortran.h: Likewise.
2958 * gfortran.texi: Likewise.
2959 * gfortranspec.c: Likewise.
2960 * interface.c: Likewise.
2961 * intrinsic.c: Likewise.
2962 * intrinsic.h: Likewise.
2963 * intrinsic.texi: Likewise.
2964 * invoke.texi: Likewise.
2966 * iresolve.c: Likewise.
2967 * iso-c-binding.def: Likewise.
2968 * iso-fortran-env.def: Likewise.
2969 * lang-specs.h: Likewise.
2970 * lang.opt: Likewise.
2971 * libgfortran.h: Likewise.
2972 * match.c: Likewise.
2973 * match.h: Likewise.
2974 * matchexp.c: Likewise.
2976 * module.c: Likewise.
2977 * openmp.c: Likewise.
2978 * options.c: Likewise.
2979 * parse.c: Likewise.
2980 * parse.h: Likewise.
2981 * primary.c: Likewise.
2982 * resolve.c: Likewise.
2983 * scanner.c: Likewise.
2984 * simplify.c: Likewise.
2986 * symbol.c: Likewise.
2987 * target-memory.c: Likewise.
2988 * target-memory.h: Likewise.
2989 * trans-array.h: Likewise.
2990 * trans-const.h: Likewise.
2991 * trans-stmt.h: Likewise.
2992 * trans-types.c: Likewise.
2993 * trans-types.h: Likewise.
2994 * types.def: Likewise.
2996 2008-02-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2999 * simplify.c (gfc_simplify_ibclr), (gfc_simplify_ibits),
3000 (gfc_simplify_ibset): Remove call to range_check.
3001 (simplify_cmplx), (gfc_simplify_dble), (gfc_simplify_float)
3002 (gfc_simplify_real): Add call gfc_clear_ts to initialize the
3003 temporary gfc_typspec variable.
3005 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
3007 * trans-array.c (gfc_conv_descriptor_data_get,
3008 gfc_conv_descriptor_data_set_internal,
3009 gfc_conv_descriptor_data_addr, gfc_conv_descriptor_offset,
3010 gfc_conv_descriptor_dtype, gfc_conv_descriptor_dimension,
3011 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
3012 gfc_conv_descriptor_ubound, gfc_trans_create_temp_array,
3013 gfc_conv_array_transpose, gfc_grow_array,
3014 gfc_trans_array_constructor_subarray,
3015 gfc_trans_array_constructor_value, gfc_trans_scalarized_loop_end,
3016 gfc_array_init_size, gfc_array_allocate, gfc_array_deallocate,
3017 gfc_conv_array_initializer, gfc_trans_array_bounds,
3018 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
3019 gfc_get_dataptr_offset, gfc_conv_array_parameter,
3020 gfc_trans_dealloc_allocated, get_full_array_size,
3021 gfc_duplicate_allocatable, structure_alloc_comps): Use fold_buildN
3023 * trans-expr.c (gfc_conv_expr_present, gfc_conv_missing_dummy,
3024 gfc_conv_component_ref, gfc_conv_cst_int_power,
3025 gfc_conv_function_call, gfc_trans_structur_assign): Likewise.
3026 * trans-common.c (create_common): Likewise.
3027 * trans-openmp.c (gfc_trans_omp_atomic, gfc_trans_omp_do):
3029 * trans-const.c (gfc_conv_constant_to_tree): Likewise.
3030 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_do,
3031 gfc_trans_integer_select, gfc_trans_character_select,
3032 gfc_trans_forall_loop, compute_overall_iter_number,
3033 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_allocate,
3034 gfc_trans_deallocate): Likewise.
3035 * trans.c (gfc_build_addr_expr, gfc_trans_runtime_check,
3036 gfc_allocate_with_status, gfc_allocate_array_with_status,
3037 gfc_deallocate_with_status): Likewise.
3038 * f95-lang.c (gfc_truthvalue_conversion): Likewise.
3039 * trans-io.c (set_parameter_const, set_parameter_value,
3040 set_parameter_ref, set_string, set_internal_unit, io_result,
3041 set_error_locus, nml_get_addr_expr, transfer_expr): Likewise.
3042 * trans-decl.c (gfc_build_qualified_array, build_entry_thunks,
3043 gfc_get_fake_result_decl, gfc_trans_auto_character_variable,
3044 gfc_generate_function_code): Likewise.
3045 * convert.c (convert): Likewise.
3046 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
3047 build_fixbound_expr, build_fix_expr, gfc_conv_intrinsic_aint,
3048 gfc_conv_intrinsic_int, gfc_conv_intrinsic_imagpart,
3049 gfc_conv_intrinsic_conjg, gfc_conv_intrinsic_abs,
3050 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
3051 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_dprod,
3052 gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
3053 gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax,
3054 gfc_conv_intrinsic_minmax_char, gfc_conv_intrinsic_count,
3055 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_dot_product,
3056 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
3057 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_not,
3058 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
3059 gfc_conv_intrinsic_ichar, gfc_conv_intrinsic_size,
3060 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
3061 gfc_conv_allocated, gfc_conv_associated, gfc_conv_intrinsic_trim,
3062 gfc_conv_intrinsic_repeat): Likewise.
3064 2008-02-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3067 * trans-expr.c (gfc_conv_power_op): Use BUILT_IN_CPOW{F,,L}.
3068 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_CPOW{F,,L}.
3069 * trans.h (gfor_fndecl_math_cpow, gfor_fndecl_math_cpowf,
3070 gfor_fndecl_math_cpowl10, gfor_fndecl_math_cpowl16): Remove.
3071 * trans-decl.c: Likewise.
3073 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3076 * expr.c (find_array_element): Modify traversing the constructor to
3077 avoid trying to access NULL memory pointed to by next for the
3078 last element. (find_array_section): Exit while loop if cons->next is
3081 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3084 * iresolve.c (resolve_mask_arg): Add gfc_clear_ts to initialize
3086 (gfc_resolve_aint): Likewise.
3087 (gfc_resolve_anint): Likewise.
3088 (gfc_resolve_besn): Likewise.
3089 (gfc_resolve_cshift): Likewise.
3090 (gfc_resolve_ctime): Likewise.
3091 (gfc_resolve_eoshift): Likewise.
3092 (gfc_resolve_index_func): Likewise.
3093 (gfc_resolve_isatty): Likewise.
3094 (gfc_resolve_malloc): Likewise.
3095 (gfc_resolve_rrspacing): Likewise.
3096 (gfc_resolve_scale): Likewise.
3097 (gfc_resolve_set_exponent): Likewise.
3098 (gfc_resolve_spacing): Likewise.
3099 (gfc_resolve_spacing): Likewise.
3100 (gfc_resolve_fgetc): Likewise.
3101 (gfc_resolve_fputc): Likewise.
3102 (gfc_resolve_ftell): Likewise.
3103 (gfc_resolve_ttynam): Likewise.
3104 (gfc_resolve_alarm_sub): Likewise.
3105 (gfc_resolve_mvbits): Likewise.
3106 (gfc_resolve_getarg): Likewise.
3107 (gfc_resolve_signal_sub): Likewise.
3108 (gfc_resolve_exit): Likewise.
3109 (gfc_resolve_flush): Likewise.
3110 (gfc_resolve_free): Likewise.
3111 (gfc_resolve_ctime_sub): Likewise.
3112 (gfc_resolve_fgetc_sub): Likewise.
3113 (gfc_resolve_fputc_sub): Likewise.
3114 (gfc_resolve_fseek_sub): Likewise.
3115 (gfc_resolve_ftell_sub): Likewise.
3116 (gfc_resolve_ttynam_sub): Likewise.
3118 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3120 * gfc-internals.texi: Fix typos and markup nits.
3121 * gfortran.texi: Likewise.
3122 * intrinsic.texi: Likewise.
3124 2008-02-21 Richard Guenther <rguenther@suse.de>
3126 * trans-expr.c (gfc_conv_expr_op): Expand INTRINSIC_PARENTHESES
3127 as unary PAREN_EXPR for real and complex typed expressions.
3128 (gfc_conv_unary_op): Fold the built tree.
3130 2008-02-20 Tobias Burnus <burnus@net-b.de>
3133 * match.c (gfc_match_name): Improve error message for '$'.
3135 2008-02-19 Daniel Franke <franke.daniel@gmail.com>
3138 * expr.c (gfc_check_pointer_assign): Add type and kind information
3139 to type-mismatch message.
3140 (gfc_check_assign): Unify error messages.
3142 2008-02-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3145 * gfortran.texi: Create new section for unimplemented extensions.
3146 Add "STRUCTURE and RECORD" and "ENCODE and DECODE statements".
3147 Remove "smaller projects" list. Fix a few typos.
3149 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3151 * intrinsic.texi: Rename INDEX node to avoid clashing with
3152 index.html on case-insensitive systems.
3154 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3157 * trans-expr.c (gfc_conv_function_call): Force evaluation of
3160 2008-02-10 Daniel Franke <franke.daniel@gmail.com>
3163 * lang.opt: Allow '-J<dir>' next to '-J <dir>',
3164 likewise '-I <dir>' and '-I<dir>'.
3166 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3169 * Make-lang.in (f951): Add $(GMPLIBS).
3171 2008-02-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3174 * trans-common.c (build_field): Mark fields as volatile when needed.
3176 2008-02-05 Tobias Burnus <burnus@net-b.de>
3179 * data.c (gfc_assign_data_value): Only free "size" if
3180 it has not already been freed.
3182 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
3185 * array.c (match_array_element_spec): Remove check for negative
3187 (gfc_resolve_array_spec): Add check for negative size.
3189 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
3192 * data.c (gfc_assign_data_value): Add bounds check for array
3195 2008-02-04 Daniel Franke <franke.daniel@gmail.com>
3197 * resolve.c (resolve_where): Fix typo.
3198 (gfc_resolve_where_code_in_forall): Likewise.
3200 2008-02-03 Paul Thomas <pault@gcc.gnu.org>
3203 * resolve.c (resolve_allocate_deallocate): New function.
3204 (resolve_code): Call it for allocate and deallocate.
3205 * match.c (gfc_match_allocate, gfc_match_deallocate) : Remove
3206 the checking of the STAT tag and put in above new function.
3207 * primary,c (match_variable): Do not fix flavor of host
3208 associated symbols yet if the type is not known.
3210 2008-01-31 Paul Thomas <pault@gcc.gnu.org>
3213 * expr.c (gfc_check_assign): It is an error to assign
3214 to a sibling procedure.
3216 2008-01-30 Paul Thomas <pault@gcc.gnu.org>
3219 * symbol.c (gfc_delete_symtree, gfc_undo_symbols): Rename
3220 delete_symtree to gfc_delete_symtree.
3221 * gfortran.h : Add prototype for gfc_delete_symtree.
3222 * module.c (load_generic_interfaces): Transfer symbol to a
3223 unique symtree and delete old symtree, instead of renaming.
3224 (read_module): The rsym and the found symbol are the same, so
3225 the found symtree can be deleted.
3228 * decl.c (match_char_spec): Remove the constraint on deferred
3229 matching of functions and free the length expression.
3230 delete_symtree to gfc_delete_symtree.
3231 (gfc_match_type_spec): Whitespace.
3232 (gfc_match_function_decl): Defer characteristic association for
3233 all types except BT_UNKNOWN.
3234 * parse.c (decode_specification_statement): Only derived type
3235 function matching is delayed to the end of specification.
3237 2008-01-28 Tobias Burnus <burnus@net-b.de>
3240 * simplify.c (gfc_simplify_shape): Simplify rank zero arrays.
3242 2008-01-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3245 * array.c (gfc_check_constructor_type): Revert clearing the expression.
3247 2008-01-26 Tobias Burnus <burnus@net-b.de>
3250 * trans-expr.c (gfc_conv_function_call): Don't call
3251 gfc_add_interface_mapping if the expression is NULL.
3253 2008-01-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3256 * trans-array.c (gfc_trans_create_temp_array): Remove call to
3257 gcc_assert (integer_zerop (loop->from[n])).
3259 2008-01-25 Daniel Franke <franke.daniel@gmail.com>
3262 * resolve.c (resolve_where): Added check if user-defined assignment
3263 operator is an elemental subroutine.
3264 (gfc_resolve_where_code_in_forall): Likewise.
3266 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
3270 * gfortran.h: Revert changes from 2008-01-17.
3271 * match.c: Likewise.
3272 * symbol.c: Likewise.
3273 (gfc_undo_symbols): Undo namespace changes related to common blocks.
3275 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
3278 * data.c (formalize_structure_cons): Skip formalization on
3281 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
3283 * gfortran.texi (OpenMP): Extended existing documentation.
3284 (contributors): Added major contributors of 2008 that were
3286 (proposed extensions): Removed implemented items.
3288 2008-01-24 Paul Thomas <pault@gcc.gnu.org>
3291 * parse.c (next_statement) : If ST_GET_FCN_CHARACTERISTICS is
3292 seen, check for a statement label and, if present, delete it
3293 and set the locus to the start of the statement.
3295 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
3298 * trans-io.c (gfc_trans_transfer): If the array reference in a
3299 read has a vector subscript, use gfc_conv_subref_array_arg to
3300 copy back the temporary.
3302 2008-01-22 Tobias Burnus <burnus@net-b.de>
3305 * interface.c (compare_actual_formal): Fix adding type
3306 to missing_arg_type for absent optional arguments.
3308 2008-01-22 Tobias Burnus <burnus@net-b.de>
3311 * parse.c (parse_spec): Change = into ==.
3313 2008-01-22 Daniel Franke <franke.daniel@gmail.com>
3316 * expr.c (check_elemental): Fix check for valid data types.
3318 2008-01-22 Tobias Burnus <burnus@net-b.de>
3321 * scanner.c (load_line): Support <tab><digit> continuation lines.
3322 * invoke.texi (-Wtabs): Document this.
3324 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
3327 * module.c (read_module): Set use_rename attribute.
3329 2007-01-21 Tobias Burnus <burnus@net-b.de>
3332 * interface.c (compare_parameter): Improved error message
3333 for arguments of same type and mismatched kinds.
3335 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
3338 * resolve.c (resolve_entries): Do not do an array bounds check
3339 if the result symbols are the same.
3342 * module.c (read_module) : Hide the symtree of the previous
3343 version of the symbol if this symbol is renamed.
3345 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
3348 * array.c (gfc_check_constructor_type): Clear the expression ts
3349 so that the checking starts from the deepest level of array
3351 * primary.c (match_varspec): If an unknown type is changed to
3352 default character and the attempt to match a substring fails,
3353 change it back to unknown.
3356 * trans-array.c (gfc_add_loop_ss_code) : If ss->string_length is
3357 NULL for an array constructor, use the cl.length expression to
3359 (gfc_conv_array_parameter): Change call to gfc_evaluate_now to
3362 2008-01-19 Thomas Koenig <tkoenig@gcc.gnu.org>
3366 * iresolve.c (gfc_resolve_all): Remove conversion of mask
3367 argument to kind=1 by removing call to resolve_mask_arg().
3368 (gfc_resolve_any): Likewise.
3370 2008-01-19 Tobias Burnus <burnus@net-b.de>
3373 * primary.c (match_variable): Handle FL_UNKNOWN without
3374 uneducated guessing.
3375 (match_variable): Improve error message.
3377 2008-01-18 Tobias Burnus <burnus@net-b.de>
3380 * interface.c (get_expr_storage_size): Return storage size
3381 for array element designators.
3382 (compare_actual_formal): Reject unequal string sizes for
3383 assumed-shape dummy arguments. And fix error message for
3384 array-sections with vector subscripts.
3386 2008-01-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3389 * simplify.c (is_constant_array_expr): New static function that returns
3390 true if the given expression is an array and is constant.
3391 (gfc_simplify_reshape): Use new function.
3393 2008-01-17 H.J. Lu <hongjiu.lu@intel.com>
3396 * symbol.c (free_common_tree): Renamed to ...
3397 (gfc_free_common_tree): This. Remove static.
3398 (gfc_free_namespace): Updated.
3400 * gfortran.h (gfc_free_common_tree): New.
3402 * match.c (gfc_match_common): Call gfc_free_common_tree () with
3403 gfc_current_ns->common_root and set gfc_current_ns->common_root
3404 to NULL on syntax error.
3406 2008-01-18 Richard Sandiford <rsandifo@nildram.co.uk>
3409 * trans-expr.c (gfc_conv_function_call): Use proper
3410 type for returned character pointers.
3412 2008-01-17 Paul Thomas <pault@gcc.gnu.org>
3417 * decl.c : Remove gfc_function_kind_locus and
3418 gfc_function_type_locus. Add gfc_matching_function.
3419 (match_char_length): If matching a function and the length
3420 does not match, return MATCH_YES and try again later.
3421 (gfc_match_kind_spec): The same.
3422 (match_char_kind): The same.
3423 (gfc_match_type_spec): The same for numeric and derived types.
3424 (match_prefix): Rename as gfc_match_prefix.
3425 (gfc_match_function_decl): Except for function valued character
3426 lengths, defer applying kind, type and charlen info until the
3427 end of specification block.
3428 gfortran.h (gfc_statement): Add ST_GET_FCN_CHARACTERISTICS.
3429 parse.c (decode_specification_statement): New function.
3430 (decode_statement): Call it when a function has kind = -1. Set
3431 and reset gfc_matching function, as function statement is being
3433 (match_deferred_characteristics): Simplify with a single call
3434 to gfc_match_prefix. Do appropriate error handling. In any
3435 case, make sure that kind = -1 is reset or corrected.
3436 (parse_spec): Call above on seeing ST_GET_FCN_CHARACTERISTICS.
3437 Throw an error if kind = -1 after last specification statement.
3438 parse.h : Prototype for gfc_match_prefix.
3440 2008-01-16 Tobias Burnus <burnus@net-b.de>
3443 * interface.c (compare_parameter): Allow AS_DEFERRED array
3444 elements and reject attr.pointer array elemenents.
3445 (get_expr_storage_size): Return storage size of elements of
3446 assumed-shape and pointer arrays.
3448 2008-01-15 Sebastian Pop <sebastian.pop@amd.com>
3450 * f95-lang.c (gfc_init_builtin_functions): Initialize GOMP builtins
3451 for flag_tree_parallelize_loops.
3453 2008-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
3456 * iresolve.c (gfc_resolve_all): Call resolve_mask_arg.
3457 (gfc_resolve_any): Likewise.
3458 (gfc_resolve_count): Likewise. Don't append kind of
3459 argument to function name.
3461 2008-01-13 Tobias Burnus <burnus@net-b.de>
3464 * resolve.c (resolve_actual_arglist): For expressions,
3465 also check for assume-sized arrays.
3466 * interface.c (compare_parameter): Move F2003 character checks
3467 here, print error messages here, reject elements of
3468 assumed-shape array as argument to dummy arrays.
3469 (compare_actual_formal): Update for the changes above.
3471 2008-01-13 Tobias Burnus <burnus@net-b.de>
3474 * decl.c (contained_procedure): Only check directly preceeding state.
3476 2008-01-13 Tobias Burnus <burnus@net-b.de>
3479 * check.c (gfc_check_shape): Accept array ranges of
3480 assumed-size arrays.
3482 2008-01-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3485 * match.c (gfc_match_name): Don't error if leading character is a '(',
3486 just return MATCH_NO.
3488 2008-01-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3491 * trans-io.c (create_dummy_iostat): Commit the symbol.
3493 2008-01-11 Paul Thomas <pault@gcc.gnu.org>
3496 * simplify.c (gfc_simplify_transfer): Return NULL if the size
3497 of the element is unavailable and only assign character length
3498 to the result, if 'mold' is constant.
3500 2008-01-10 Paul Thomas <pault@gcc.gnu.org>
3503 * trans-array.c (gfc_trans_array_ctor_element): Use gfc_trans_string_copy
3504 to assign strings and perform bounds checks on the string length.
3505 (get_array_ctor_strlen): Remove bounds checking.
3506 (gfc_trans_array_constructor): Initialize string length checking.
3507 * trans-array.h : Add prototype for gfc_trans_string_copy.
3509 2008-01-08 Richard Guenther <rguenther@suse.de>
3512 PR tree-optimization/34683
3513 * trans-types.c (gfc_get_array_type_bounds): Use an array type
3514 with known size for accesses if that is known.
3516 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
3519 * expr.c (find_array_element): Check that the array bounds are
3520 constant before using them. Use lower, as well as upper bound.
3521 (check_restricted): Allow implied index variable.
3523 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
3526 * trans_array.c (gfc_trans_deferred_array): Do not null the
3527 data pointer on entering scope, nor deallocate it on leaving
3528 scope, if the symbol has the 'save' attribute.
3531 * trans_decl.c (gfc_finish_var_decl): Derived types with
3532 allocatable components and an initializer must be TREE_STATIC.
3534 2008-01-07 Paul Thomas <pault@gcc.gnu.org>
3537 * module.c (write_generic): Rewrite completely.
3538 (write_module): Change call to write_generic.
3540 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3543 * scanner.c (load_line): Do not count ' ' as printable when checking for
3546 2008-01-06 Paul Thomas <pault@gcc.gnu.org>
3549 * module.c (load_needed): If the namespace has no proc_name
3550 give it the module symbol.
3552 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3555 * trans-expr.c (gfc_conv_missing_dummy): Use a temporary to type convert
3556 the dummy variable expression, test for NULL, and pass the variable
3557 address to the called function.
3559 2007-01-06 Tobias Burnus <burnus@net-b.de>
3562 * match.c (gfc_match_common): Remove blank common in
3564 * resolve.c (resolve_common_vars): New function.
3565 (resolve_common_blocks): Move checks to resolve_common_vars
3566 and invoke that function.
3567 (resolve_types): Call resolve_common_vars for blank commons.
3569 2008-01-06 Tobias Burnus <burnus@net-b.de>
3572 * resolve.c (resolve_equivalence_derived): Reject derived types with
3573 default initialization if equivalenced with COMMON variable.
3575 2008-01-06 Tobias Burnus <burnus@net-b.de>
3578 * io.c (check_io_constraints): Disallow unformatted I/O for
3581 2008-01-06 Tobias Burnus <burnus@net-b.de>
3584 * resolve.c (resolve_formal_arglist): Reject dummy procedure in
3585 ELEMENTAL functions.
3587 2008-01-06 Tobias Burnus <burnus@net-b.de>
3590 * interface.c (compare_actual_formal): Reject parameter
3591 actual to intent(out) dummy.
3593 2008-01-04 Tobias Burnus <burnus@net-b.de>
3596 * primary.c (match_varspec): Gobble whitespace before