1 2008-08-29 Jakub Jelinek <jakub@redhat.com>
3 * trans-decl.c (gfc_build_qualified_array): Build non-flat
4 array type for debug info purposes.
8 * f95-lang.c (gfc_init_ts): New function.
9 (LANG_HOOKS_INIT_TS): Define.
10 * gfortran.h (gfc_use_rename): New type, moved from module.c.
11 (gfc_get_use_rename): New macro, moved from module.c.
12 (gfc_use_list): New type.
13 (gfc_get_use_list): New macro.
14 (gfc_namespace): Add use_stmts field.
15 (gfc_free_use_stmts): New prototype.
16 * Make-lang.in (fortran/trans-decl.o): Depend on debug.h.
17 * module.c (gfc_use_rename, gfc_get_use_rename): Moved to
19 (gfc_use_module): Chain the USE statement info to
21 (gfc_free_use_stmts): New function.
22 * symbol.c (gfc_free_namespace): Call gfc_free_use_stmts.
23 * trans.h (struct module_htab_entry): New type.
24 (gfc_find_module, gfc_module_add_decl): New functions.
25 * trans.c (gfc_generate_module_code): Create NAMESPACE_DECL for
26 the module, adjust DECL_CONTEXTs of module procedures and
27 call gfc_module_add_decl for them.
28 * trans-common.c (build_common_decl): Set DECL_IGNORED_P
29 on the common variable.
30 (create_common): Set DECL_IGNORED_P for use associated vars.
31 * trans-decl.c: Include debug.h.
32 (gfc_get_symbol_decl): Set DECL_IGNORED_P on use_assoc vars from
34 (build_function_decl): Allow current_function_decl's context
35 to be a NAMESPACE_DECL.
36 (module_htab, cur_module): New variables.
37 (module_htab_do_hash, module_htab_eq, module_htab_decls_hash,
38 module_htab_decls_eq, gfc_find_module, gfc_module_add_decl): New
40 (gfc_create_module_variable): Adjust DECL_CONTEXTs of module
41 variables and types and call gfc_module_add_decl for them.
42 (gfc_generate_module_vars): Temporarily set cur_module.
43 (gfc_trans_use_stmts): New function.
44 (gfc_generate_function_code): Call it.
45 (gfc_generate_block_data): Set DECL_IGNORED_P on decl.
46 * trans-types.c (gfc_get_derived_type): Adjust DECL_CONTEXT
47 and TYPE_CONTEXT of module derived types.
49 2008-08-28 Daniel Kraft <d@domob.eu>
51 * gfortran.h (enum expr_t): New value `EXPR_COMPCALL'.
52 (gfc_get_typebound_proc): New macro.
53 (struct gfc_expr): New union-member `compcall' for EXPR_COMPCALL.
54 (enum gfc_exec_op): New value `EXEC_COMPCALL'.
55 (gfc_find_typebound_proc): New argument.
56 (gfc_copy_ref), (gfc_match_varspec): Made public.
57 * decl.c (match_procedure_in_type): Use gfc_get_typebound_proc.
58 * expr.c (free_expr0), (gfc_copy_expr): Handle EXPR_COMPCALL.
59 (gfc_copy_ref): Made public and use new name.
60 (simplify_const_ref): Use new name of gfc_copy_ref.
61 (simplify_parameter_variable): Ditto.
62 (gfc_simplify_expr): gcc_unreachable for EXPR_COMPCALL.
63 * match.c (match_typebound_call): New method.
64 (gfc_match_call): Allow for CALL's to typebound procedures.
65 * module.c (binding_passing), (binding_overriding): New variables.
66 (expr_types): Add EXPR_COMPCALL.
67 (mio_expr): gcc_unreachable for EXPR_COMPCALL.
68 (mio_typebound_proc), (mio_typebound_symtree): New methods.
69 (mio_f2k_derived): Handle type-bound procedures.
70 * primary.c (gfc_match_varspec): Made public and parse trailing
71 references to type-bound procedures; new argument `sub_flag'.
72 (gfc_match_rvalue): New name and argument of gfc_match_varspec.
73 (match_variable): Ditto.
74 * resolve.c (update_arglist_pass): New method.
75 (update_compcall_arglist), (resolve_typebound_static): New methods.
76 (resolve_typebound_call), (resolve_compcall): New methods.
77 (gfc_resolve_expr): Handle EXPR_COMPCALL.
78 (resolve_code): Handle EXEC_COMPCALL.
79 (resolve_fl_derived): New argument to gfc_find_typebound_proc.
80 (resolve_typebound_procedure): Ditto and removed not-implemented error.
81 * st.c (gfc_free_statement): Handle EXEC_COMPCALL.
82 * symbol.c (gfc_find_typebound_proc): New argument `noaccess' and
83 implement access-checking.
84 * trans-expr.c (gfc_apply_interface_mapping_to_expr): gcc_unreachable
86 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Add missing break.
87 * trans-openmp.c (gfc_trans_omp_array_reduction): Add missing
88 intialization of ref->type.
90 2008-08-28 Janus Weil <janus@gcc.gnu.org>
93 * module.c (ab_attribute,attr_bits,mio_symbol_attribute): Take care of
94 saving attr.procedure and attr.proc_ptr to the module file.
96 2008-08-25 Daniel Kraft <d@domob.eu>
98 * gfortran.h (gfc_find_component): Add new arguments.
99 * parse.c (parse_derived_contains): Check if the derived-type containing
100 the CONTAINS section is SEQUENCE/BIND(C).
101 * resolve.c (resolve_typebound_procedure): Check for name collision with
103 (resolve_fl_derived): Check for name collision with inherited
104 type-bound procedures.
105 * symbol.c (gfc_find_component): New arguments `noaccess' and `silent'.
106 (gfc_add_component): Adapt for new arguments.
107 * primary.c (match_varspec), (gfc_match_structure_constructor): Ditto.
109 2008-08-24 Tobias Burnus <burnus@net-b.de>
112 * decl.c (verify_bind_c_sym): Reject array/string returning
115 2008-08-24 Tobias Burnus <burnus@net-b.de>
118 * trans-expr.c (gfc_conv_function_call): Add string_length
119 for character-returning bind(C) functions.
121 2008-08-24 Daniel Kraft <d@domob.eu>
123 * gfortran.h (gfc_typebound_proc): New struct.
124 (gfc_symtree): New member typebound.
125 (gfc_find_typebound_proc): Prototype for new method.
126 (gfc_get_derived_super_type): Prototype for new method.
127 * parse.h (gfc_compile_state): New state COMP_DERIVED_CONTAINS.
128 * decl.c (gfc_match_procedure): Handle PROCEDURE inside derived-type
130 (gfc_match_end): Handle new context COMP_DERIVED_CONTAINS.
131 (gfc_match_private): Ditto.
132 (match_binding_attributes), (match_procedure_in_type): New methods.
133 (gfc_match_final_decl): Rewrote to make use of new
134 COMP_DERIVED_CONTAINS parser state.
135 * parse.c (typebound_default_access): New global helper variable.
136 (set_typebound_default_access): New callback method.
137 (parse_derived_contains): New method.
138 (parse_derived): Extracted handling of CONTAINS to new parser state
139 and parse_derived_contains.
140 * resolve.c (resolve_bindings_derived), (resolve_bindings_result): New.
141 (check_typebound_override), (resolve_typebound_procedure): New methods.
142 (resolve_typebound_procedures): New method.
143 (resolve_fl_derived): Call new resolving method for typebound procs.
144 * symbol.c (gfc_new_symtree): Initialize new member typebound to NULL.
145 (gfc_find_typebound_proc): New method.
146 (gfc_get_derived_super_type): New method.
148 2008-08-23 Janus Weil <janus@gcc.gnu.org>
150 * gfortran.h (gfc_component): Add field "symbol_attribute attr", remove
151 fields "pointer", "allocatable", "dimension", "access".
152 Remove functions "gfc_set_component_attr" and "gfc_get_component_attr".
153 * interface.c (gfc_compare_derived_types): Ditto.
154 * trans-array.c (gfc_array_allocate,structure_alloc_comps): Ditto.
155 * trans-expr.c (gfc_conv_component_ref,gfc_trans_subcomponent_assign,
156 gfc_conv_structure): Ditto.
157 * symbol.c (gfc_find_component,free_components,gfc_set_component_attr,
158 gfc_get_component_attr,verify_bind_c_derived_type,
159 generate_isocbinding_symbol): Ditto.
160 * decl.c (build_struct): Ditto.
161 * dump-parse-tree.c (show_components): Ditto.
162 * trans-stmt.c (gfc_trans_deallocate): Ditto.
163 * expr.c (gfc_check_assign,gfc_check_pointer_assign,
164 gfc_default_initializer): Ditto.
165 * module.c (mio_component): Ditto.
166 * trans-types.c (copy_dt_decls_ifequal,gfc_get_derived_type): Ditto.
167 * resolve.c (has_default_initializer,resolve_structure_cons,
168 gfc_iso_c_func_interface,find_array_spec,resolve_ref,
169 resolve_deallocate_expr,resolve_allocate_expr,resolve_fl_derived,
170 resolve_equivalence_derived): Ditto.
171 * trans-io.c (transfer_expr): Ditto.
172 * parse.c (parse_derived): Ditto.
173 * dependency.c (gfc_check_dependency): Ditto.
174 * primary.c (gfc_variable_attr): Ditto.
176 2008-08-23 Tobias Burnus <burnus@net-b.de>
179 * arith.c (gfc_arith_concat): Fix concat of kind=4 strings.
181 2008-08-23 Tobias Burnus <burnus@net-b.de>
184 * target-memory.c (gfc_interpret_character): Support
187 2008-08-22 Daniel Kraft <d@domob.eu>
190 * symbol.c (gfc_add_type): Warn on -Wsurprising if a function-result
191 type is re-declared but neither -pedantic nor -std=f* is given and so
193 * invoke.texi (-Wsurprising): Document this new behaviour.
195 2008-08-22 Daniel Kraft <d@domob.eu>
197 * gfortran.h (in_prefix): Removed from this header.
198 * match.h (gfc_matching_prefix): Moved and renamed from `in_prefix'.
199 * decl.c (in_prefix): Removed from here.
200 (gfc_match_prefix): Use new name of `gfc_matching_prefix'.
201 * symbol.c (gfc_check_symbol_typed): Ditto.
202 * expr.c (check_typed_ns): New helper variable.
203 (expr_check_typed_help): New helper method.
204 (gfc_expr_check_typed): Rewrote to use gfc_traverse_expr to do the
205 work, fixing a minor problem.
206 * match.c (gfc_matching_prefix): New variable.
208 2008-08-22 Daniel Kraft <d@domob.eu>
212 * gfortran.h (in_prefix): New global.
213 (gfc_check_symbol_typed), (gfc_check_expr_typed): New methods.
214 * array.c (match_array_element_spec): Check that bounds-expressions
215 don't have symbols not-yet-typed in them.
216 * decl.c (var_element): Check that variable used is already typed.
217 (char_len_param_value): Check that expression does not contain
218 not-yet-typed symbols.
219 (in_prefix): New global.
220 (gfc_match_prefix): Record using `in_prefix' if we're at the moment
221 parsing a prefix or not.
222 * expr.c (gfc_expr_check_typed): New method.
223 * parse.c (verify_st_order): New argument to disable error output.
224 (check_function_result_typed): New helper method.
225 (parse_spec): Check that the function-result declaration, if given in
226 a prefix, contains no not-yet-typed symbols when the IMPLICIT rules are
228 * symbol.c (gfc_check_symbol_typed): Check that a symbol already has
229 a type associated to it, otherwise use the IMPLICIT rules or signal
232 2008-08-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
234 * f95-lang.c: Update all calls to pedwarn.
236 2008-08-18 Daniel Franke <franke.daniel@gmail.com>
239 * gfortran.texi: Document decision on include file handling in
242 2008-08-16 Tobias Burnus <burnus@net-b.de>
245 * libgfortran.h: Reduce GFC_MAX_DIMENSIONS to 7.
247 2008-08-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
250 * io.c (gfc_match_open): Enable UTF-8 in checks.
251 * simplify.c (gfc_simplify_selected_char_kind): Enable iso_10646.
253 2008-08-14 Janus Weil <janus@gcc.gnu.org>
256 * symbol.c (check_conflict): Move conflict checks for (procedure,save)
257 and (procedure,intent) to resolve_fl_procedure.
258 * resolve.c (resolve_fl_procedure): Ditto.
260 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
263 * f95-lang.c (gfc_mark_addressable): Use "pedwarn (0," instead of
266 2008-08-09 Paul Thomas <pault@gcc.gnu.org>
269 * symbol.c (gfc_add_extension): New function.
270 * decl.c (gfc_get_type_attr_spec): Call it.
271 (gfc_match_derived_decl): Set symbol extension attribute from
273 * gfortran.h : Add prototype for gfc_add_extension.
275 2008-08-08 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
278 * options.c (set_Wall): Replace set_Wunused by warn_unused.
280 2008-08-08 Daniel Kraft <d@domob.eu>
282 * gfortran.h (gfc_finalizer): Replaced member `procedure' by two
283 new members `proc_sym' and `proc_tree' to store the symtree after
285 (gfc_find_sym_in_symtree): Made public.
286 * decl.c (gfc_match_final_decl): Adapted for new member name.
287 * interface.c (gfc_find_sym_in_symtree): Made public.
288 (gfc_extend_expr), (gfc_extend_assign): Changed call accordingly.
289 * module.c (mio_finalizer), (mio_f2k_derived), (mio_full_f2k_derived):
290 New methods for module-file IO of f2k_derived.
291 (mio_symbol): Do IO of f2k_derived namespace.
292 * resolve.c (gfc_resolve_finalizers): Adapted for new member name and
293 finding the symtree for the symbol here.
294 * symbol.c (gfc_free_finalizer): Adapted for new members.
296 2008-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
298 * gfc-internals.texi: Update to GFDL 1.2. Do not list GPL as
300 * gfortran.texi: Likewise.
301 * intrinsic.texi: Do not list GPL as Invariant Section.
302 * invoke.texi: Likewise. Update copyright years.
304 2008-07-29 Paul Thomas <pault@gcc.gnu.org>
306 * trans-expr.c (conv_parent_component_references): New function
307 to build missing parent references.
308 (gfc_conv_variable): Call it
309 * symbol.c (gfc_add_component): Check that component name in a
310 derived type extension does not appear in parent.
311 (gfc_find_component): For a derived type extension, check if
312 the component appears in the parent derived type by calling
313 self. Separate errors for private components and private types.
314 * decl.c (match_data_constant): Add extra arg to call to
315 gfc_match_structure_constructor.
316 (check_extended_derived_type): New function to check that a
317 parent derived type exists and that it is OK for exension.
318 (gfc_get_type_attr_spec): Add extra argument 'name' and return
319 it if extends is specified.
320 (gfc_match_derived_decl): Match derived type extension and
321 build a first component of the parent derived type if OK. Add
322 the f2k namespace if not present.
323 * gfortran.h : Add the extension attribute.
324 * module.c : Handle attribute 'extension'.
325 * match.h : Modify prototypes for gfc_get_type_attr_spec and
326 gfc_match_structure_constructor.
327 * primary.c (build_actual_constructor): New function extracted
328 from gfc_match_structure_constructor and modified to call self
329 iteratively to build derived type extensions, when f2k named
331 (gfc_match_structure_constructor): Do not throw error for too
332 many components if a parent type is being handled. Use
333 gfc_find_component to generate errors for non-existent or
334 private components. Iteratively call self for derived type
335 extensions so that parent constructor is built. If extension
336 and components left over, throw error.
337 (gfc_match_rvalue): Add extra arg to call to
338 gfc_match_structure_constructor.
340 * trans-array.c (gfc_conv_resolve_dependencies): If lhs and rhs
341 are the same symbol, aliassing does not matter.
343 2008-07-29 Jan Hubicka <jh@suse.cz>
345 * options.c (gfc_post_options): Do not set flag_no_inline.
347 2008-07-29 Daniel Kraft <d@domob.eu>
350 * trans-intrinsic.c (conv_generic_with_optional_char_arg): New method
351 to append a string-length even if the string argument is missing, e.g.
353 (gfc_conv_intrinsic_function): Call the new method for EOSHIFT, PACK
356 2008-07-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
358 * gfortran.h (try): Remove macro. Replace try with gfc_try
369 * interface.c: Likewise.
370 * intrinsic.c: Likewise.
371 * intrinsic.h: Likewise.
376 * resolve.c: Likewise.
377 * scanner.c: Likewise.
378 * simplify.c: Likewise.
379 * symbol.c: Likewise.
380 * trans-openmp.c: Likewise.
381 * trans-types.c: Likewise.
383 2008-07-28 Tobias Burnus <burnus@net-b.de>
385 * Make-lang.in: Remove -Wno-* from fortran-warn.
387 2008-07-28 Richard Guenther <rguenther@suse.de>
389 Merge from gimple-tuples-branch.
391 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
393 * trans-expr.c: Include gimple.h instead of tree-gimple.h.
394 * trans-array.c: Same.
395 * trans-openmp.c: Same.
396 * trans-stmt.c: Same.
399 * trans-decl.c: Same.
400 * trans-intrinsic.c: Same.
401 * trans.c: Same. Include tree-iterator.h.
402 * Make-lang.in (trans.o): Depend on tree-iterator.h
404 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
406 * trans-array.h (gfc_conv_descriptor_data_set_internal):
407 Rename to gfc_conv_descriptor_data_set.
408 (gfc_conv_descriptor_data_set_tuples): Remove.
409 * trans-array.c (gfc_conv_descriptor_data_get): Rename
410 from gfc_conv_descriptor_data_set_internal.
411 Remove last argument to gfc_add_modify.
412 (gfc_trans_allocate_array_storage): Rename gfc_add_modify_expr to
414 (gfc_trans_create_temp_array): Same.
415 (gfc_conv_array_transpose): Same.
416 (gfc_grow_array): Same.
417 (gfc_put_offset_into_var): Same.
418 (gfc_trans_array_ctor_element): Same.
419 (gfc_trans_array_constructor_subarray): Same.
420 (gfc_trans_array_constructor_value): Same.
421 (gfc_trans_scalarized_loop_end): Same.
422 (gfc_array_init_size): Same.
423 (gfc_array_allocate): Same.
424 (gfc_trans_array_bounds): Same.
425 (gfc_trans_auto_array_allocation): Same.
426 (gfc_trans_g77_array): Same.
427 (gfc_trans_dummy_array_bias): Same.
428 (gfc_conv_expr_descriptor): Same.
429 (structure_alloc_comps): Same.
430 * trans-expr.c: Same.
431 * trans-openmp.c (gfc_omp_clause_default_ctor): Same.
432 Rename gfc_conv_descriptor_data_set_tuples to
433 gfc_conv_descriptor_data_set.
434 (gfc_omp_clause_copy_ctor): Change build_gimple_modify_stmt to
436 (gfc_omp_clause_assign_op): Same.
437 (gfc_trans_omp_array_reduction): Rename gfc_add_modify_expr to
439 (gfc_trans_omp_atomic): Same.
440 (gfc_trans_omp_do): Same. Change GIMPLE_MODIFY_STMT to MODIFY_EXPR.
441 Rename gfc_add_modify_stmt to gfc_add_modify.
442 * trans-stmt.c: Rename gfc_add_modify_expr to
444 * trans.c: Rename gfc_add_modify_expr to
446 (gfc_add_modify): Remove last argument.
447 Rename GIMPLE_MODIFY_STMT to MODIFY_EXPR.
448 * trans.h: Remove gfc_add_modify_expr, gfc_add_modify_stmt.
449 Add prototype for gfc_add_modify.
450 * f95-lang.c (union lang_tree_node): Rename GENERIC_NEXT to TREE_CHAIN.
451 * trans-decl.c: Rename gfc_add_modify_stmt to gfc_add_modify.
453 * trans-intrinsic.c: Same.
455 2008-02-25 Aldy Hernandez <aldyh@redhat.com>
457 * Make-lang.in (fortran-warn): Add -Wno-format.
459 2008-02-19 Diego Novillo <dnovillo@google.com>
461 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
463 * fortran/Make-lang.in (fortran-warn): Remove.
465 2007-11-22 Aldy Hernandez <aldyh@redhat.com>
467 * trans-expr.c (gfc_trans_string_copy): Use "void *" when building a
470 2007-11-10 Aldy Hernandez <aldyh@redhat.com>
472 * Make-lang.in (fortran-warn): Set to -Wno-format.
473 * trans.c (gfc_trans_code): Update comment to say GENERIC.
474 Call tree_annotate_all_with_locus instead of annotate_all_with_locus.
476 2008-07-27 Tobias Burnus <burnus@net-b.de>
481 * trans.c (gfc_trans_runtime_check): Allow run-time warning besides
483 * trans.h (gfc_trans_runtime_check): Update declaration.
484 * trans-array.c (gfc_trans_array_ctor_element,gfc_trans_array_bound_check,
485 gfc_conv_array_ref,gfc_conv_ss_startstride,gfc_trans_dummy_array_bias):
486 Updated gfc_trans_runtime_check calls.
487 (gfc_conv_array_parameter): Implement flag_check_array_temporaries,
488 fix packing/unpacking for nonpresent optional actuals to optional
490 * trans-array.h (gfc_conv_array_parameter): Update declaration.
491 * trans-expr.c (gfc_conv_substring,gfc_trans_arrayfunc_assign,
492 gfc_conv_function_call): Updated gfc_trans_runtime_check calls.
493 (gfc_conv_function_call): Update gfc_conv_array_parameter calls.
494 * trans-expr.c (gfc_trans_goto): Updated gfc_trans_runtime_check
496 * trans-io.c (set_string,gfc_conv_intrinsic_repeat): Ditto.
497 (gfc_conv_intrinsic_transfer,gfc_conv_intrinsic_loc): Same for
498 gfc_conv_array_parameter.
499 * trans-intrinsics.c (gfc_conv_intrinsic_bound): Ditto.
500 * trans-decl.c (gfc_build_builtin_function_decls): Add
501 gfor_fndecl_runtime_warning_at.
502 * lang.opt: New option fcheck-array-temporaries.
503 * gfortran.h (gfc_options): New flag_check_array_temporaries.
504 * options.c (gfc_init_options, gfc_handle_option): Handle flag.
505 * invoke.texi: New option fcheck-array-temporaries.
507 2008-07-24 Jan Hubicka <jh@suse.cz>
509 * fortran/options.c (gfc_post_options): Remove flag_unline_trees code.
511 2008-07-24 Daniel Kraft <d@domob.eu>
514 * lang.opt (Wnonstd-intrinsics): Removed option.
515 (Wintrinsics-std), (Wintrinsic-shadow): New options.
516 * invoke.texi (Option Summary): Removed -Wnonstd-intrinsics
517 from the list and added -Wintrinsics-std and -Wintrinsic-shadow.
518 (Error and Warning Options): Documented the new options and removed
519 the documentation for -Wnonstd-intrinsics.
520 * gfortran.h (gfc_option_t): New members warn_intrinsic_shadow and
521 warn_intrinsics_std, removed warn_nonstd_intrinsics.
522 (gfc_is_intrinsic): Renamed from gfc_intrinsic_name.
523 (gfc_warn_intrinsic_shadow), (gfc_check_intrinsic_standard): New.
524 * decl.c (match_procedure_decl): Replaced gfc_intrinsic_name by
525 the new name gfc_is_intrinsic.
526 (warn_intrinsic_shadow): New helper method.
527 (gfc_match_function_decl), (gfc_match_subroutine): Call the new method
528 warn_intrinsic_shadow to check the just-parsed procedure.
529 * expr.c (check_init_expr): Call new gfc_is_intrinsic to check whether
530 the function called is really an intrinsic in the selected standard.
531 * intrinsic.c (gfc_is_intrinsic): Renamed from gfc_intrinsic_name and
532 extended to take into account the selected standard settings when trying
533 to find out whether a symbol is an intrinsic or not.
534 (gfc_check_intrinsic_standard): Made public and extended.
535 (gfc_intrinsic_func_interface), (gfc_intrinsic_sub_interface): Removed
536 the calls to check_intrinsic_standard, this check now happens inside
538 (gfc_warn_intrinsic_shadow): New method defined.
539 * options.c (gfc_init_options): Initialize new warning flags to false
540 and removed intialization of Wnonstd-intrinsics flag.
541 (gfc_post_options): Removed logic for Wnonstd-intrinsics flag.
542 (set_Wall): Set new warning flags and removed Wnonstd-intrinsics flag.
543 (gfc_handle_option): Handle the new flags and removed handling of the
544 old Wnonstd-intrinsics flag.
545 * primary.c (gfc_match_rvalue): Replaced call to gfc_intrinsic_name by
546 the new name gfc_is_intrinsic.
547 * resolve.c (resolve_actual_arglist): Ditto.
548 (resolve_generic_f), (resolve_unknown_f): Ditto.
549 (is_external_proc): Ditto.
550 (resolve_generic_s), (resolve_unknown_s): Ditto.
551 (resolve_symbol): Ditto and ensure for symbols declared INTRINSIC that
552 they are really available in the selected standard setting.
554 2008-07-24 Daniel Kraft <d@domob.eu>
556 * match.c (gfc_match): Add assertion to catch wrong calls trying to
557 match upper-case characters.
559 2008-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
562 * gfortran.h: Add "warn_array_temp" to gfc_option_t.
563 * lang.opt: Add -Warray-temporaries.
564 * invoke.texi: Document -Warray-temporaries
565 * trans-array.h (gfc_trans_create_temp_array): Add argument of
567 (gfc_conv_loop_setup): Likewise.
568 * trans-array.c (gfc_trans_create_temp_array): If
569 -Warray-temporaries is given and locus is present, warn about
570 creation of array temporaries.
571 (gfc_trans_array_constructor_subarray): Add locus to call
572 of gfc_conv_loop_setup.
573 (gfc_trans_array_constructor): Add where argument. Pass where
574 argument to call of gfc_trans_create_temp_array.
575 (gfc_add_loop_ss_code): Add where argument. Pass where argument
576 to recursive call of gfc_add_loop_ss_code and to call of
577 gfc_trans_array_constructor.
578 (gfc_conv_loop_setup): Add where argument. Pass where argument
579 to calls to gfc_add_loop_ss_code and to gfc_trans_create_temp_array.
580 (gfc_conv_expr_descriptor): Pass location to call of
582 (gfc_conv_array_parameter): If -Warray-temporaries is given,
583 warn about creation of temporary arrays.
584 * trans-expr.c (gfc_conv_subref_array_arg): Add where argument
585 to call to gfc_conv_loop_setup.
586 (gfc_conv_function_call): Add where argument to call to
587 gfc_trans_creat_temp_array.
588 (gfc_trans_subarray_assign): Likewise.
589 (gfc_trans_assignment_1): Add where argument to call to
591 * trans-stmt.c (gfc_conv_elemental_dependencies): Add where
592 argument to call to gfc_trans_create_temp_array.
593 (gfc_trans_call): Add where argument to call to gfc_conv_loop_setup.
594 (generate_loop_for_temp_to_lhs): Likewise.
595 (generate_loop_for_rhs_to_temp): Likewise.
596 (compute_inner_temp_size): Likewise.
597 (gfc_trans-pointer_assign_need_temp): Likewise.
598 (gfc_evaluate_where_mask): Likewise.
599 (gfc_trans_where_assign): Likewise.
600 (gfc_trans_where_3): Likewise.
601 * trans-io.c (transfer_srray_component): Add where argument
602 to function. Add where argument to call to gfc_conv_loop_setup.
603 (transfer_expr): Add where argument to call to
604 transfer_array_component.
605 (gfc_trans_transfer): Add where expression to call to
607 * trans-intrinsic.c (gfc_conv_intrinsic_anyall): Add
608 where argument to call to gfc_conv_loop_setup.
609 (gfc_conv_intrinsic_count): Likewise.
610 (gfc_conv_intrinsic_arith): Likewise.
611 (gfc_conv_intrinsic_dot_product): Likewise.
612 (gfc_conv_intrinsic_minmaxloc): Likewise.
613 (gfc_conv_intrinsic_minmaxval): Likewise.
614 (gfc_conv_intrinsic_array_transfer): Warn about
615 creation of temporary array.
616 Add where argument to call to gfc_trans_create_temp_array.
617 * options.c (gfc_init_options): Initialize gfc_option.warn_array_temp.
618 (gfc_handle_option): Set gfc_option.warn_array_temp.
620 2008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
623 * f95-lang.c (gfc_mark_addressable): All calls to pedwarn changed.
625 2008-07-22 Daniel Kraft <d@domob.eu>
628 * io.c (error_element), (format_locus): New static globals.
629 (unexpected_element): Spelled out this message fully.
630 (next_char): Keep track of locus when not MODE_STRING.
631 (next_char_not_space): Remember last parsed element in error_element.
632 (format_lex): Fix two indentation errors.
633 (check_format): Use format_locus and possibly error_element for a
634 slightly better error message on invalid format.
635 (check_format_string): Set format_locus to start of the string
636 expression used as format.
638 2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
640 * expr.c (gfc_check_pointer_assign): Fix typo in string.
641 * io.c (check_format): Fix typo in string. Fix comment typos.
642 * parse.c (gfc_global_used): Likewise.
643 * resolve.c (resolve_allocate_expr): Likewise.
644 * symbol.c (gfc_set_default_type): Likewise.
645 * arith.c: Fix typos in comments.
649 * dependency.c: Likewise.
650 * f95-lang.c: Likewise.
651 * gfortran.h: Likewise.
652 * matchexp.c: Likewise.
653 * module.c: Likewise.
654 * primary.c: Likewise.
655 * scanner.c: Likewise.
656 * trans-array.c: Likewise.
657 * trans-common.c: Likewise.
658 * trans-decl.c: Likewise.
659 * trans-expr.c: Likewise.
660 * trans-intrinsic.c: Likewise.
661 * trans-types.c: Likewise.
665 2008-07-19 Tobias Burnus <burnus@net-b.de>
668 * matchexp.c (gfc_get_parentheses): Remove obsolete workaround,
669 which caused the generation of wrong code.
671 2008-07-19 Tobias Burnus <burnus@net-b.de>
674 * scanner.c (load_file): Add argument to destinguish between
675 true filename and displayed filename.
676 (include_line,gfc_new_file): Adapt accordingly.
678 2008-07-19 Tobias Burnus <burnus@net-b.de>
680 * check.c (gfc_check_cshift,gfc_check_eoshift,gfc_check_unpack): Add rank
681 checks for cshift's shift and eoshift's shift and boundary args.
682 (gfc_check_unpack): Add rank and shape tests for unpack.
684 2008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
686 * gfortran.h (new): Remove macro.
687 * array.c (gfc_append_constructor, match_array_list,
688 gfc_match_array_constructor): Likewise.
689 * bbt.c (insert, gfc_insert_bbt): Likewise.
690 * decl.c (var_element, top_var_list, top_val_list, gfc_match_data,
691 get_proc_name): Likewise.
692 * expr.c (gfc_copy_actual_arglist): Likewise.
693 * interface.c (compare_actual_formal, check_new_interface,
694 gfc_add_interface): Likewise.
695 * intrinsic.c gfc_convert_type_warn, gfc_convert_chartype):
697 * io.c (match_io_iterator, match_io_list): Likewise.
698 * match.c (match_forall_header): Likewise.
699 * matchexp.c (build_node): Likewise.
700 * module.c (gfc_match_use): Likewise.
701 * scanner.c (load_file): Likewise.
702 * st.c (gfc_append_code): Likewise.
703 * symbol.c (save_symbol_data, gfc_get_sym_tree, gfc_undo_symbols,
704 gfc_commit_symbols): Likewise.
705 * trans-common.c (build_field): Likewise.
706 * trans-decl.c (gfc_finish_var_decl): Likewise.
707 * trans-expr.c (gfc_free_interface_mapping,
708 gfc_get_interface_mapping_charlen, gfc_add_interface_mapping,
709 gfc_finish_interface_mapping,
710 gfc_apply_interface_mapping_to_expr): Likewise.
711 * trans.h (gfc_interface_sym_mapping): Likewise.
713 2008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
715 * gfortran.h (operator): Remove macro.
716 (gfc_namespace, gfc_expr): Avoid C++ keywords.
717 * arith.c (eval_intrinsic, eval_intrinsic_f2, eval_intrinsic_f3):
719 * decl.c (access_attr_decl): Likewise.
720 * dependency.c (gfc_dep_compare_expr): Likewise.
721 * dump-parse-tree.c (show_expr, show_uop, show_namespace):
723 * expr.c (gfc_copy_expr, gfc_type_convert_binary,
724 simplify_intrinsic_op, check_intrinsic_op): Likewise.
725 * interface.c (fold_unary, gfc_match_generic_spec,
726 gfc_match_interface, gfc_match_end_interface,
727 check_operator_interface, check_uop_interfaces,
728 gfc_check_interfaces, gfc_extend_expr, gfc_extend_assign,
729 gfc_add_interface, gfc_current_interface_head,
730 gfc_set_current_interface_head): Likewise.
731 * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
733 * matchexp.c (gfc_get_parentheses, build_node): Likewise.
734 * module.c (gfc_use_rename, gfc_match_use, find_use_name_n,
735 number_use_names, mio_expr, load_operator_interfaces, read_module,
736 write_operator, write_module): Likewise.
737 * openmp.c (resolve_omp_atomic): Likewise.
738 * resolve.c (resolve_operator, gfc_resolve_character_operator,
739 gfc_resolve_uops): Likewise.
740 * symbol.c (free_uop_tree, gfc_free_namespace): Likewise.
741 * trans-expr.c (gfc_conv_expr_op): Likewise.
742 * trans-openmp.c (gfc_trans_omp_atomic): Likewise.
744 2008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
746 * gfortran.h (protected): Remove macro.
747 * dump-parse-tree.c (show_attr): Avoid C++ keywords.
748 * expr.c (gfc_check_pointer_assign): Likewise.
749 * interface.c (compare_parameter_protected): Likewise.
750 * intrinsic.c (enum class, add_sym, add_sym_0, add_sym_1,
751 add_sym_1s, add_sym_1m, add_sym_2, add_sym_2s, add_sym_3,
752 add_sym_3ml, add_sym_3red, add_sym_3s, add_sym_4, add_sym_4s,
753 add_sym_5s): Likewise.
754 * match.c (gfc_match_assignment, gfc_match_pointer_assignment):
756 * module.c (mio_symbol_attribute): Likewise.
757 * primary.c (match_variable): Likewise.
758 * resolve.c (resolve_equivalence): Likewise.
759 * symbol.c (check_conflict, gfc_add_protected, gfc_copy_attr):
761 * trans-types.c (gfc_get_array_type_bounds): Likewise.
763 2008-07-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
765 * arith.c (eval_type_intrinsic0): Avoid C++ keywords.
766 * gfortran.h (try, protected, operator, new): Likewise.
768 2008-07-17 Tobias Burnus <burnus@net-b.de>
772 * array.c (gfc_match_array_spec): Fix array-rank check.
773 * resolve.c (resolve_fl_derived): Fix constentness check
774 for the array dimensions.
776 2008-07-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
778 * Make-lang.in (gfortranspec.o): Fix dependencies.
780 2008-07-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
783 * io.c: Add error check for g0 edit descriptor followed by '.'.
785 2008-07-12 Daniel Kraft <d@domob.eu>
787 * resolve.c (resolve_fl_derived): Allow pointer components to empty
788 derived types fixing a missing part of PR fortran/33221.
790 2008-07-10 Daniel Kraft <d@domob.eu>
792 * gfc-internals.texi (section gfc_expr): Created documentation about
793 the gfc_expr internal data structure.
795 2008-07-07 Thomas Koenig <tkoenig@gcc.gnu.org>
798 * iresolve.c (gfc_resolve_product): Set shape of return
800 (gfc_resolve_sum): Likewise.
802 2008-07-07 Jakub Jelinek <jakub@redhat.com>
805 * f95-lang.c (poplevel): Don't ever add subblocks to
806 global_binding_level.
808 2008-07-02 Janus Weil <janus@gcc.gnu.org>
809 Tobias Burnus <burnus@net-b.de>
810 Paul Thomas <pault@gcc.gnu.org>
813 * gfortran.h (struct gfc_symbol): New member "proc_pointer".
814 * check.c (gfc_check_associated,gfc_check_null): Implement
816 * decl.c (match_procedure_decl): Ditto.
817 * expr.c (gfc_check_pointer_assign,gfc_check_assign_symbol): Ditto.
818 * interface.c (compare_actual_formal): Ditto.
820 * match.c (gfc_match_pointer_assignment): Ditto.
821 * parse.c (parse_interface): Ditto.
822 * primary.c (gfc_match_rvalue,match_variable): Ditto.
823 * resolve.c (resolve_fl_procedure): Ditto.
824 * symbol.c (check_conflict,gfc_add_external,gfc_add_pointer,
825 gfc_copy_attr,gen_fptr_param,build_formal_args): Ditto.
826 * trans-decl.c (get_proc_pointer_decl,gfc_get_extern_function_decl,
827 create_function_arglist): Ditto.
828 * trans-expr.c (gfc_conv_variable,gfc_conv_function_val,
829 gfc_conv_function_call,gfc_trans_pointer_assignment): Ditto.
831 2008-07-02 Thomas Koenig <tkoenig@gcc.gnu.org>
835 * iresolve.c (resolve_mask_arg): Don't convert mask to
836 kind=1 logical if it is of that type already.
838 2008-06-29 Thomas Koenig <tkoenig@gcc.gnu.org>
841 * iresolve.c (gfc_resolve_matmul): Copy shapes
844 2008-06-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
846 * invoke.texi: Add documentation for runtime behavior of
849 2008-06-28 Daniel Kraft <d@domob.eu>
851 * gfc-internals.texi (section gfc_code): Extended documentation about
852 gfc_code in the internal datastructures chapter including details about
853 how IF, DO and SELECT blocks look like and an example for how the
854 block-chaining works.
856 2008-06-25 Paul Thomas <pault@gcc.gnu.org>
859 * interface.c (check_intents): Correct error where the actual
860 arg was checked for a pointer argument, rather than the formal.
862 2008-06-24 Paul Thomas <pault@gcc.gnu.org>
865 * expr.c (gfc_check_assign): Change message and locus for
866 error when conform == 0.
868 2008-06-23 Jakub Jelinek <jakub@redhat.com>
871 * cpp.c (cpp_define_builtins): Change _OPENMP value to 200805.
873 2008-06-20 Laurynas Biveinis <laurynas.biveinis@gmail.com>
874 Tobias Burnus <burnus@net-b.de>
878 * scanner.c (preprocessor_line): do not call gfc_free for
879 current_file->filename if it differs from filename.
881 2008-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
883 * arith.c (hollerith2representation): Fix for -Wc++-compat.
884 * array.c (gfc_get_constructor): Likewise.
885 * decl.c (gfc_get_data_variable, gfc_get_data_value, gfc_get_data,
886 create_enum_history, gfc_match_final_decl): Likewise.
887 * error.c (error_char): Likewise.
888 * expr.c (gfc_get_expr, gfc_copy_expr): Likewise.
889 * gfortran.h (gfc_get_charlen, gfc_get_array_spec,
890 gfc_get_component, gfc_get_formal_arglist, gfc_get_actual_arglist,
891 gfc_get_namelist, gfc_get_omp_clauses, gfc_get_interface,
892 gfc_get_common_head, gfc_get_dt_list, gfc_get_array_ref,
893 gfc_get_ref, gfc_get_equiv, gfc_get_case, gfc_get_iterator,
894 gfc_get_alloc, gfc_get_wide_string): Likewise.
895 * interface.c (count_types_test): Likewise.
896 * intrinsic.c (add_char_conversions, gfc_intrinsic_init_1):
898 * io.c (gfc_match_open, gfc_match_close, match_filepos, match_io,
899 gfc_match_inquire, gfc_match_wait): Likewise.
900 * match.c (gfc_match, match_forall_iterator): Likewise.
901 * module.c (gfc_get_pointer_info, gfc_get_use_rename, add_fixup,
902 add_true_name, parse_string, write_atom, quote_string,
903 mio_symtree_ref, mio_gmp_real, write_common_0): Likewise.
904 * options.c (gfc_post_options): Likewise.
905 * primary.c (match_integer_constant, match_hollerith_constant,
906 match_boz_constant, match_real_constant,
907 gfc_get_structure_ctor_component, gfc_match_structure_constructor): Likewise.
908 * scanner.c (gfc_widechar_to_char, add_path_to_list,
909 add_file_change, load_line, get_file, preprocessor_line,
910 load_file, unescape_filename, gfc_read_orig_filename): Likewise.
911 * simplify.c (gfc_simplify_ibits, gfc_simplify_ishft,
912 gfc_simplify_ishftc): Likewise.
913 * symbol.c (gfc_get_st_label, gfc_get_namespace, gfc_new_symtree,
914 gfc_get_uop, gfc_new_symbol, save_symbol_data, gfc_get_gsymbol):
916 * target-memory.c (gfc_target_interpret_expr): Likewise.
917 * trans-const.c (gfc_build_wide_string_const): Likewise.
918 * trans-expr.c (gfc_add_interface_mapping): Likewise.
919 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
920 gfc_conv_intrinsic_int, gfc_conv_intrinsic_lib_function,
921 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_ctime,
922 gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam,
923 gfc_conv_intrinsic_minmax, gfc_conv_intrinsic_minmax_char,
924 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_index_scan_verify,
925 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_trim): Likewise.
926 * trans.c (gfc_get_backend_locus): Likewise.
927 * trans.h (gfc_get_ss): Likewise.
929 2008-06-18 Daniel Kraft <d@domob.eu>
931 PR fortran/36517, fortran/36492
932 * array.c (gfc_resolve_character_array_constructor): Call
933 gfc_set_constant_character_len with changed length-chec argument.
934 * decl.c (gfc_set_constant_character_len): Changed array argument to
935 be a generic length-checking argument that can be used for correct
936 checking with typespec and in special cases where the should-be length
937 is different from the target length.
938 (build_struct): Call gfc_set_constant_character_len with changed length
939 checking argument and introduced additional checks for exceptional
940 conditions on invalid code.
941 (add_init_expr_to_sym), (do_parm): Call gfc_set_constant_character_len
942 with changed argument.
943 * match.h (gfc_set_constant_character_len): Changed third argument to
944 int for the should-be length rather than bool.
946 2008-06-17 Daniel Kraft <d@domob.eu>
949 * array.c (gfc_resolve_character_array_constructor): Check that all
950 elements with constant character length have the same one rather than
951 fixing it if no typespec is given, emit an error if they don't. Changed
952 return type to "try" and return FAILURE for the case above.
953 (gfc_resolve_array_constructor): Removed unneeded call to
954 gfc_resolve_character_array_constructor in this function.
955 * gfortran.h (gfc_resolve_character_array_constructor): Returns try.
956 * trans-array.c (get_array_ctor_strlen): Return length of first element
957 rather than last element.
958 * resolve.c (gfc_resolve_expr): Handle FAILURE return from
959 gfc_resolve_character_array_constructor.
961 2008-06-17 Paul Thomas <pault@gcc.gnu.org>
964 * resolve.c (add_dt_to_dt_list): New function.
965 (resolve_fl_derived): Call new function for pointer components
966 and when derived type resolved.
968 2008-06-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
971 * trans-decl.c (gfc_generate_function_code): Add range_check to options
974 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
976 * gfc-internals.texi: Expand TABs, drop indentation outside examples.
977 * gfortran.texi: Likewise.
978 * intrinsic.texi: Likewise.
979 * invoke.texi: Likewise.
981 2008-06-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
984 * trans-io.c (gfc_build_io_library_fndecls): Build declaration for
985 transfer_character_wide which includes passing in the character kind to
986 support wide character IO. (transfer_expr): If the kind == 4, create the
987 argument and build the call.
988 * gfortran.texi: Fix typo.
990 2008-06-13 Tobias Burnus <burnus@net-b.de>
993 * decl.c (do_parm): Handle init expression for len=*.
995 2008-06-12 Tobias Burnus <burnus@net-b.de>
998 * trans-intrinsic.c (gfc_conv_intrinsic_index_scan_verify):
999 Fix passing of the BACK= argument.
1001 2008-06-10 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1003 * cpp.c: Add copyright notice.
1004 * cpp.h: Add copyright notice.
1006 2008-06-08 Janus Weil <janus@gcc.gnu.org>
1009 * decl.c (match_procedure_decl): Correctly recognize if the interface
1010 is an intrinsic procedure.
1012 2008-06-08 Tobias Burnus <burnus@net-b.de>
1015 * resolve.c (resolve_symbol): Copy more attributes for
1016 PROCEDUREs with interfaces.
1018 2008-06-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1022 * io.c (check_format): Add new error message for zero width.
1023 Use new error message for FMT_A and with READ, FMT_G. Allow
1024 FMT_G with WRITE except when -std=F95 and -std=F2003.
1026 2008-06-07 Tobias Burnus <burnus@net-b.de>
1029 * intrinsic.c (add_functions): Implement c_sizeof.
1030 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Do not
1031 create unneeded variable in the scalar case.
1032 * intrinsic.texi: Add C_SIZEOF documentation.
1034 2008-06-06 Tobias Burnus <burnus@net-b.de>
1036 * intrinsic.texi (BESSEL_J1): Fix BES(S)EL_J1 typo.
1038 2008-06-06 Jakub Jelinek <jakub@redhat.com>
1040 * scanner.c (skip_free_comments, skip_fixed_comments): Handle tabs.
1041 * parse.c (next_free): Allow tab after !$omp.
1042 (decode_omp_directive): Handle !$omp task, !$omp taskwait
1044 (case_executable): Add ST_OMP_TASKWAIT.
1045 (case_exec_markers): Add ST_OMP_TASK.
1046 (gfc_ascii_statement): Handle ST_OMP_TASK, ST_OMP_END_TASK and
1048 (parse_omp_structured_block, parse_executable): Handle ST_OMP_TASK.
1049 * gfortran.h (gfc_find_sym_in_expr): New prototype.
1050 (gfc_statement): Add ST_OMP_TASK, ST_OMP_END_TASK and ST_OMP_TASKWAIT.
1051 (gfc_omp_clauses): Add OMP_SCHED_AUTO to sched_kind,
1052 OMP_DEFAULT_FIRSTPRIVATE to default_sharing. Add collapse and
1054 (gfc_exec_op): Add EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
1055 * f95-lang.c (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1056 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP, LANG_HOOKS_OMP_CLAUSE_DTOR,
1057 LANG_HOOKS_OMP_PRIVATE_OUTER_REF): Define.
1058 * trans.h (gfc_omp_clause_default_ctor): Add another argument.
1059 (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
1060 gfc_omp_clause_dtor, gfc_omp_private_outer_ref): New prototypes.
1061 * types.def (BT_ULONGLONG, BT_PTR_ULONGLONG,
1062 BT_FN_BOOL_ULONGLONGPTR_ULONGLONGPTR,
1063 BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULLPTR_ULLPTR,
1064 BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULL_ULLPTR_ULLPTR,
1065 BT_FN_VOID_PTR_PTR, BT_PTR_FN_VOID_PTR_PTR,
1066 BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): New.
1067 (BT_BOOL): Use integer type with BOOL_TYPE_SIZE rather
1068 than boolean_type_node.
1069 * dump-parse-tree.c (gfc_show_omp_node): Handle EXEC_OMP_TASK,
1070 EXEC_OMP_TASKWAIT, OMP_SCHED_AUTO, OMP_DEFAULT_FIRSTPRIVATE,
1071 untied and collapse clauses.
1072 (gfc_show_code_node): Handle EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
1073 * trans.c (gfc_trans_code): Handle EXEC_OMP_TASK and
1075 * st.c (gfc_free_statement): Likewise.
1076 * resolve.c (gfc_resolve_blocks, resolve_code): Likewise.
1077 (find_sym_in_expr): Rename to...
1078 (gfc_find_sym_in_expr): ... this. No longer static.
1079 (resolve_allocate_expr, resolve_ordinary_assign): Adjust caller.
1080 * match.h (gfc_match_omp_task, gfc_match_omp_taskwait): New
1082 * openmp.c (resolve_omp_clauses): Allow allocatable arrays in
1083 firstprivate, lastprivate, reduction, copyprivate and copyin
1085 (omp_current_do_code): Made static.
1086 (omp_current_do_collapse): New variable.
1087 (gfc_resolve_omp_do_blocks): Compute omp_current_do_collapse,
1088 clear omp_current_do_code and omp_current_do_collapse on return.
1089 (gfc_resolve_do_iterator): Handle collapsed do loops.
1090 (resolve_omp_do): Likewise, diagnose errorneous collapsed do loops.
1091 (OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED): Define.
1092 (gfc_match_omp_clauses): Handle default (firstprivate),
1093 schedule (auto), untied and collapse (n) clauses.
1094 (OMP_DO_CLAUSES): Add OMP_CLAUSE_COLLAPSE.
1095 (OMP_TASK_CLAUSES): Define.
1096 (gfc_match_omp_task, gfc_match_omp_taskwait): New functions.
1097 * trans-openmp.c (gfc_omp_private_outer_ref): New function.
1098 (gfc_omp_clause_default_ctor): Add outer argument. For allocatable
1099 arrays allocate them with the bounds of the outer var if outer
1101 (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
1102 gfc_omp_clause_dtor): New functions.
1103 (gfc_trans_omp_array_reduction): If decl is allocatable array,
1104 allocate it with outer var's bounds in OMP_CLAUSE_REDUCTION_INIT
1105 and deallocate it in OMP_CLAUSE_REDUCTION_MERGE.
1106 (gfc_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
1107 for assumed-size arrays.
1108 (gfc_trans_omp_do): Add par_clauses argument. If dovar is
1109 present in lastprivate clause and do loop isn't simple,
1110 set OMP_CLAUSE_LASTPRIVATE_STMT. If dovar is present in
1111 parallel's lastprivate clause, change it to shared and add
1112 lastprivate clause to OMP_FOR_CLAUSES. Handle collapsed do loops.
1113 (gfc_trans_omp_directive): Adjust gfc_trans_omp_do callers.
1114 (gfc_trans_omp_parallel_do): Likewise. Move collapse clause to
1115 OMP_FOR from OMP_PARALLEL.
1116 (gfc_trans_omp_clauses): Handle OMP_SCHED_AUTO,
1117 OMP_DEFAULT_FIRSTPRIVATE, untied and collapse clauses.
1118 (gfc_trans_omp_task, gfc_trans_omp_taskwait): New functions.
1119 (gfc_trans_omp_directive): Handle EXEC_OMP_TASK and
1122 2008-06-04 Janus Weil <janus@gcc.gnu.org>
1126 * resolve.c (resolve_symbol): Correctly copy the interface for a
1127 PROCEDURE declaration.
1129 2008-06-02 Janus Weil <janus@gcc.gnu.org>
1132 * symbol.c (gfc_add_allocatable,gfc_add_dimension,
1133 gfc_add_explicit_interface): Added checks.
1134 * decl.c (attr_decl1): Added missing "var_locus".
1135 * parse.c (parse_interface): Checking for errors.
1137 2008-06-02 Daniel Kraft <d@domob.eu>
1139 * gfortran.h: New statement-type ST_FINAL for FINAL declarations.
1140 (struct gfc_symbol): New member f2k_derived.
1141 (struct gfc_namespace): New member finalizers, for use in the above
1142 mentioned f2k_derived namespace.
1143 (struct gfc_finalizer): New type defined for finalizers linked list.
1144 * match.h (gfc_match_final_decl): New function header.
1145 * decl.c (gfc_match_derived_decl): Create f2k_derived namespace on
1146 constructed symbol node.
1147 (gfc_match_final_decl): New function to match a FINAL declaration line.
1148 * parse.c (decode_statement): match-call for keyword FINAL.
1149 (parse_derived): Parse CONTAINS section and accept FINAL statements.
1150 * resolve.c (gfc_resolve_finalizers): New function to resolve (that is
1151 in this case, check) a list of finalizer procedures.
1152 (resolve_fl_derived): Call gfc_resolve_finalizers here.
1153 * symbol.c (gfc_get_namespace): Initialize new finalizers to NULL.
1154 (gfc_free_namespace): Free finalizers list.
1155 (gfc_new_symbol): Initialize new f2k_derived to NULL.
1156 (gfc_free_symbol): Free f2k_derived namespace.
1157 (gfc_free_finalizer): New function to free a single gfc_finalizer node.
1158 (gfc_free_finalizer_list): New function to free a linked list of
1159 gfc_finalizer nodes.
1161 2008-06-02 Daniel Franke <franke.daniel@gmail.com>
1165 * cpp.c (gfc_cpp_init): Do not initialize builtins if
1166 processing already preprocessed input.
1167 (gfc_cpp_preprocess): Finalize output with newline.
1169 2008-05-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1171 * intrinsic.texi: Revert wrong commit.
1173 2008-05-31 Steven G. Kargl <kargls@comcast.net>
1175 * arith.c (gfc_arith_init_1): Remove now unused r and c variables.
1176 Cleanup numerical inquiry function initialization.
1177 (gfc_arith_done_1): Replace multiple mpfr_clear() invocations with
1178 a single mpfr_clears().
1179 (gfc_check_real_range): Re-arrange logic to eliminate multiple
1180 unnecessary branching and assignments.
1181 (gfc_arith_times): Use mpfr_clears() in preference to multiple
1183 (gfc_arith_divide): Ditto.
1184 (complex_reciprocal): Eliminate now unused variables a, re, im.
1185 Cleanup the mpfr abuse. Use mpfr_clears() in preference to
1186 multiple mpfr_clear().
1187 (complex_pow): Fix comment whitespace. Use mpfr_clears() in
1188 preference to multiple mpfr_clear().
1189 * simplify.c (gfc_simplify_and): Remove blank line.
1190 (gfc_simplify_atan2): Move error checking earlier to eliminate
1191 a now unnecessay gfc_free_expr().
1192 (gfc_simplify_bessel_j0): Remove unnecessary gfc_set_model_kind().
1193 (gfc_simplify_bessel_j1): Ditto.
1194 (gfc_simplify_bessel_jn): Ditto.
1195 (gfc_simplify_bessel_y0): Ditto.
1196 (gfc_simplify_bessel_y1): Ditto.
1197 (gfc_simplify_bessel_yn): Ditto.
1198 (only_convert_cmplx_boz): Eliminate unnecessary duplicate code, and
1199 combine nested if statement rational expressions.
1200 (gfc_simplify_cos): Use mpfr_clears() in preference to multiple
1202 (gfc_simplify_exp): Ditto.
1203 (gfc_simplify_fraction): Move gfc_set_model_kind() to after the
1204 special case of 0. Use mpfr_clears() in preference to multiple
1206 (gfc_simplify_gamma): Eliminate unnecessary gfc_set_model_kind().
1207 (gfc_simplify_lgamma): Ditto.
1208 (gfc_simplify_log10): Ditto.
1209 (gfc_simplify_log): Move gfc_set_model_kind () inside switch
1210 statement. Use mpfr_clears() in preference to multiple mpfr_clear().
1211 (gfc_simplify_mod): Eliminate now unused variables quot, iquot,
1212 and term. Simplify the mpfr magic.
1213 (gfc_simplify_modulo): Ditto.
1214 (gfc_simplify_nearest): Eliminate unnecessary gfc_set_model_kind().
1215 (gfc_simplify_scale): Use mpfr_clears() in preference to multiple
1217 (gfc_simplify_sin): Ditto
1218 (gfc_simplify_sqrt): Ditto
1219 (gfc_simplify_set_exponent): Move gfc_set_model_kind() to after the
1220 special case of 0. Use mpfr_clears() in preference to multiple
1223 2008-05-29 Daniel Franke <franke.daniel@gmail.com>
1226 * Make-lang.in (F95_OBJS): Added dependency on FORTRAN_TARGET_OBJS.
1228 2008-05-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1230 * scanner.c (load_line): Add first_char argument. Don't call ungetc.
1231 (gfc_read_orig_filename): Adjust call to load_line. Don't call
1233 (load_file): Adjust call to load_line.
1235 2008-05-28 Janus Weil <janus@gcc.gnu.org>
1239 * interface.c (gfc_procedure_use): Enable argument checking for
1240 external procedures with explicit interface.
1241 * symbol.c (check_conflict): Fix conflict checking for externals.
1242 (copy_formal_args): Fix handling of arrays.
1243 * resolve.c (resolve_specific_f0, resolve_specific_s0): Fix handling
1245 * parse.c (parse_interface): Non-abstract INTERFACE statement implies
1248 2008-05-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1251 * intrinsic.c (gfc_convert_chartype): Don't mark conversion
1253 * trans-array.c (gfc_trans_array_ctor_element): Divide element
1254 size by the size of one character to obtain length.
1255 * iresolve.c (gfc_resolve_cshift): Call the _char4 variant when
1257 (gfc_resolve_eoshift): Likewise.
1258 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Minor beautification.
1259 (gfc_conv_intrinsic_fdate): Minor beautification.
1260 (gfc_conv_intrinsic_ttynam): Minor beautification.
1261 (gfc_conv_intrinsic_minmax_char): Allow all character kinds.
1262 (size_of_string_in_bytes): New function.
1263 (gfc_conv_intrinsic_size): Call size_of_string_in_bytes for
1264 character expressions.
1265 (gfc_conv_intrinsic_sizeof): Likewise.
1266 (gfc_conv_intrinsic_array_transfer): Likewise.
1267 (gfc_conv_intrinsic_trim): Allow all character kinds. Minor
1269 (gfc_conv_intrinsic_repeat): Fix comment typo.
1270 * simplify.c (gfc_convert_char_constant): Take care of conversion
1271 of array constructors.
1273 2008-05-27 Tobias Burnus <burnus@net-b.de>
1276 * trans-array.c (gfc_set_loop_bounds_from_array_spec):
1277 Add missing fold_convert.
1279 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
1281 * fortran/cpp.c (cpp_define_builtins): Remove usage of TARGET_* macros,
1282 added FIXME instead.
1284 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
1287 * lang.opt (A, C, CC, D, E, H, P, U, cpp, d, fworking-directory,
1288 imultilib, iprefix, iquote, isysroot, isystem, nocpp, nostdinc,
1289 o, undef, v): New options.
1290 * options.c (gfc_init_options): Also initialize preprocessor
1292 (gfc_post_options): Also handle post-initialization of preprocessor
1294 (gfc_handle_option): Check if option is a preprocessor option.
1295 If yes, let gfc_cpp_handle_option() handle the option.
1296 * lang-specs.h: Reorganized to handle new options.
1297 * scanner.c (gfc_new_file): Read temporary file instead of
1298 input source if preprocessing is enabled.
1299 * f95-lang.c (gfc_init): Initialize preprocessor.
1300 (gfc_finish): Clean up preprocessor.
1303 * Make-lang.in: Added new objects and dependencies.
1304 * gfortran.texi: Updated section "Preprocessing and
1305 conditional compilation".
1306 * invoke.texi: Added new section "Preprocessing Options",
1307 listed and documented the preprocessing options handled
1310 2008-05-25 Tobias Burnus <burnus@net-b.de>
1313 * trans-expr.c (gfc_conv_function_call): Remove library
1314 call for c_f_pointer with scalar Fortran pointers and for
1317 2008-05-21 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1320 * iresolve.c (check_charlen_present): Don't force the rank to 1.
1322 2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1325 * trans-expr.c (gfc_conv_string_tmp): Pick the correct type for
1326 the temporary variable.
1328 2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1330 * simplify.c (gfc_simplify_dble, gfc_simplify_real): Initialize
1331 result variable to avoid warnings.
1333 2008-05-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1335 * intrinsic.c (char_conversions, ncharconv): New static variables.
1336 (find_char_conv): New function.
1337 (add_functions): Add simplification functions for ADJUSTL and
1338 ADJUSTR. Don't check the kind of their argument. Add checking for
1339 LGE, LLE, LGT and LLT.
1340 (add_subroutines): Fix argument type for SLEEP. Fix argument name
1342 (add_char_conversions): New function.
1343 (gfc_intrinsic_init_1): Call add_char_conversions.
1344 (gfc_intrinsic_done_1): Free char_conversions.
1345 (check_arglist): Use kind == 0 as a signal that we don't want
1346 the kind value to be checked.
1347 (do_simplify): Also simplify character functions.
1348 (gfc_convert_chartype): New function
1349 * trans-array.c (gfc_trans_array_ctor_element): Don't force the
1350 use of default character type.
1351 (gfc_trans_array_constructor_value): Likewise.
1352 (get_array_ctor_var_strlen): Use integer kind to build an integer
1353 instead of a character kind!
1354 (gfc_build_constant_array_constructor): Don't force the use of
1355 default character type.
1356 (gfc_conv_loop_setup): Likewise.
1357 * trans-expr.c (gfc_conv_string_tmp): Don't force the use of
1358 default character type. Allocate enough memory for wide strings.
1359 (gfc_conv_concat_op): Make sure operand kind are the same.
1360 (string_to_single_character): Remove gfc_ prefix. Reindent.
1361 Don't force the use of default character type.
1362 (gfc_conv_scalar_char_value): Likewise.
1363 (gfc_build_compare_string): Call string_to_single_character.
1364 (fill_with_spaces): New function
1365 (gfc_trans_string_copy): Add kind arguments. Use them to deal
1366 with wide character kinds.
1367 (gfc_conv_statement_function): Whitespace fix. Call
1368 gfc_trans_string_copy with new kind arguments.
1369 (gfc_conv_substring_expr): Call gfc_build_wide_string_const
1370 instead of using gfc_widechar_to_char.
1371 (gfc_conv_string_parameter): Don't force the use of default
1373 (gfc_trans_scalar_assign): Pass kind args to gfc_trans_string_copy.
1374 * intrinsic.h (gfc_check_lge_lgt_lle_llt, gfc_convert_char_constant,
1375 gfc_resolve_adjustl, gfc_resolve_adjustr): New prototypes.
1376 * decl.c (gfc_set_constant_character_len): Don't assert the
1377 existence of a single character kind.
1378 * trans-array.h (gfc_trans_string_copy): New prototype.
1379 * gfortran.h (gfc_check_character_range, gfc_convert_chartype):
1381 * error.c (print_wide_char_into_buffer): New function lifting
1382 code from gfc_print_wide_char. Fix order to output '\x??' instead
1384 (gfc_print_wide_char): Call print_wide_char_into_buffer.
1385 (show_locus): Call print_wide_char_into_buffer with buffer local
1387 * trans-const.c (gfc_build_wide_string_const): New function.
1388 (gfc_conv_string_init): Deal with wide characters strings
1390 (gfc_conv_constant_to_tree): Call gfc_build_wide_string_const.
1391 * trans-stmt.c (gfc_trans_label_assign): Likewise.
1392 (gfc_trans_character_select): Deal with wide strings.
1393 * expr.c (gfc_check_assign): Allow conversion between character
1394 kinds on assignment.
1395 * trans-const.h (gfc_build_wide_string_const): New prototype.
1396 * trans-types.c (gfc_get_character_type_len_for_eltype,
1397 gfc_get_character_type_len): Create too variants of the old
1398 gfc_get_character_type_len, one getting kind argument and the
1399 other one directly taking a type tree.
1400 * trans.h (gfor_fndecl_select_string_char4,
1401 gfor_fndecl_convert_char1_to_char4,
1402 gfor_fndecl_convert_char4_to_char1): New prototypes.
1403 * trans-types.h (gfc_get_character_type_len_for_eltype): New
1405 * resolve.c (resolve_operator): Exit early when kind mismatches
1406 are detected, because that makes us issue an error message later.
1407 (validate_case_label_expr): Fix wording of error message.
1408 * iresolve.c (gfc_resolve_adjustl, gfc_resolve_adjustr): New
1410 (gfc_resolve_pack): Call _char4 variants of library function
1411 when dealing with wide characters.
1412 (gfc_resolve_reshape): Likewise.
1413 (gfc_resolve_spread): Likewise.
1414 (gfc_resolve_transpose): Likewise.
1415 (gfc_resolve_unpack): Likewise.
1416 * target-memory.c (size_character): Take character kind bit size
1417 correctly into account (not that it changes anything for now, but
1419 (gfc_encode_character): Added gfc_ prefix. Encoding each
1420 character of a string by calling native_encode_expr for the
1421 corresponding unsigned integer.
1422 (gfc_target_encode_expr): Add gfc_ prefix to encode_character.
1423 * trans-decl.c (gfc_build_intrinsic_function_decls): Build
1424 gfor_fndecl_select_string_char4, gfor_fndecl_convert_char1_to_char4
1425 and gfor_fndecl_convert_char4_to_char1.
1426 * target-memory.h (gfc_encode_character): New prototype.
1427 * arith.c (gfc_check_character_range): New function.
1428 (eval_intrinsic): Allow non-default character kinds.
1429 * check.c (gfc_check_access_func): Only allow default
1430 character kind arguments.
1431 (gfc_check_chdir): Likewise.
1432 (gfc_check_chdir_sub): Likewise.
1433 (gfc_check_chmod): Likewise.
1434 (gfc_check_chmod_sub): Likewise.
1435 (gfc_check_lge_lgt_lle_llt): New function.
1436 (gfc_check_link): Likewise.
1437 (gfc_check_link_sub): Likewise.
1438 (gfc_check_symlnk): Likewise.
1439 (gfc_check_symlnk_sub): Likewise.
1440 (gfc_check_rename): Likewise.
1441 (gfc_check_rename_sub): Likewise.
1442 (gfc_check_fgetputc_sub): Likewise.
1443 (gfc_check_fgetput_sub): Likewise.
1444 (gfc_check_stat): Likewise.
1445 (gfc_check_stat_sub): Likewise.
1446 (gfc_check_date_and_time): Likewise.
1447 (gfc_check_ctime_sub): Likewise.
1448 (gfc_check_fdate_sub): Likewise.
1449 (gfc_check_gerror): Likewise.
1450 (gfc_check_getcwd_sub): Likewise.
1451 (gfc_check_getarg): Likewise.
1452 (gfc_check_getlog): Likewise.
1453 (gfc_check_hostnm): Likewise.
1454 (gfc_check_hostnm_sub): Likewise.
1455 (gfc_check_ttynam_sub): Likewise.
1456 (gfc_check_perror): Likewise.
1457 (gfc_check_unlink): Likewise.
1458 (gfc_check_unlink_sub): Likewise.
1459 (gfc_check_system_sub): Likewise.
1460 * primary.c (got_delim): Perform correct character range checking
1462 * trans-intrinsic.c (gfc_conv_intrinsic_conversion): Generate
1463 calls to library functions convert_char4_to_char1 and
1464 convert_char1_to_char4 for character conversions.
1465 (gfc_conv_intrinsic_char): Allow all character kings.
1466 (gfc_conv_intrinsic_strcmp): Fix whitespace.
1467 (gfc_conv_intrinsic_repeat): Take care of all character kinds.
1468 * intrinsic.texi: For all GNU intrinsics accepting character
1469 arguments, mention that they're restricted to the default kind.
1470 * simplify.c (simplify_achar_char): New function.
1471 (gfc_simplify_achar, gfc_simplify_char): Call simplify_achar_char.
1472 gfc_simplify_ichar): Don't error out for wide characters.
1473 (gfc_convert_char_constant): New function.
1475 2008-05-18 Steven G. Kargl <kargls@comcast.net>
1478 * symbol.c (check_conflict): Issue errors for abuse of PUBLIC, PRIVATE,
1480 * resolve.c (gfc_verify_binding_labels): Fix NULL pointer dereference.
1482 2008-05-17 Tobias Burnus <burnus@net-b.de>
1484 * intrinsic.texi: Correct description of GET_COMMAND_ARGUMENT
1485 and GET_ENVIRONMENT_VARIABLE; fix keyword= name for GETENV,
1486 GETLOG, GMTIME, HOSTNM, IRAND, ITIME, KILL.
1487 Move LOG_GAMMA after LOG10.
1489 2008-05-17 Tobias Burnus <burnus@net-b.de>
1491 * intrinsic.c (add_functions): Change FLUSH(C) to FLUSH(UNIT).
1492 * intrinsic.texi: Change INTEGER(*) to INTEGER; fix keyword= name for
1493 ABS, ADJUSTL, AINT, ALLOCATED, ANINT, ASSOCIATED, C_ASSOCIATED,
1494 CEILING, DBLE, DFLOAT, DOT_PRODUCT, DREAL, FLOAT, FLOOR, GET_COMMAND.
1496 2008-05-16 Paul Thomas <pault@gcc.gnu.org>
1500 * trans-stmt.c (gfc_trans_where): Tighten up the dependency
1501 check for calling gfc_trans_where_3.
1504 * trans-stmt.c (gfc_trans_where_2): Set the mask size to zero
1505 if it is calculated to be negative.
1508 * trans-stmt.c (gfc_trans_where_3, gfc_trans_where_assign): Set
1509 ss->where for scalar right hand sides.
1510 * trans-array.c (gfc_add_loop_ss_code): If ss->where is set do
1511 not evaluate scalars outside the loop. Clean up whitespace.
1512 * trans.h : Add a bitfield 'where' to gfc_ss.
1514 2008-05-16 Tobias Burnus <burnus@net-b.de>
1516 * libgfortran.h: Increase GFC_MAX_DIMENSIONS to 15.
1517 * array.c (gfc_match_array_spec): Error with -std=f2003 if rank > 7.
1519 2008-04-16 Daniel Kraft <d@domob.eu>
1522 * gfortran.h: Added field "length_from_typespec" to gfc_charlength.
1523 * aray.c (gfc_match_array_constructor): Added code to parse typespec.
1524 (check_element_type, check_constructor_type, gfc_check_constructor_type):
1525 Extended to support explicit typespec on constructor.
1526 (gfc_resolve_character_array_constructor): Pad strings correctly for
1527 explicit, constant character length.
1528 * trans-array.c: New static global variable "typespec_chararray_ctor"
1529 (gfc_trans_array_constructor): New code to support explicit but dynamic
1532 2008-05-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1535 * decl.c (match_attr_spec): Check for matching pairs of parenthesis.
1536 * expr.c (gfc_specification_expr): Supplement the error message with the
1537 type that was found.
1538 * resolve.c (gfc_resolve_index): Likewise.
1539 * match.c (gfc_match_parens): Clarify error message with "at or before".
1540 (gfc_match_do): Check for matching pairs of parenthesis.
1542 2008-05-16 Tobias Burnus <burnus@net-b.de
1544 * intrinsic.texi: Write Fortran 77/90/95 instead of F77/90/95;
1545 add missing KIND argument to ACHAR and NINT; and state that
1546 the KIND argument is a F2003 extension for ACHAR, COUNT, IACHAR,
1547 ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND, VERIFY.
1549 2008-05-16 Daniel Kraft <d@domob.eu>
1551 * primary.c: New private structure "gfc_structure_ctor_component".
1552 (gfc_free_structure_ctor_component): New helper function.
1553 (gfc_match_structure_constructor): Extended largely to support named
1554 arguments and default initialization for structure constructors.
1556 2008-05-15 Steven G. Kargl <kargls@comcast.net>
1558 * simplify.c (gfc_simplify_dble, gfc_simplify_float,
1559 simplify_bound, gfc_simplify_nearest, gfc_simplify_real): Plug
1560 possible memory leaks.
1561 (gfc_simplify_reshape): Plug possible memory leaks and dereferencing
1564 2008-05-15 Steven G. Kargl <kargls@comcast.net>
1567 * simplify.c (gfc_simplify_int, gfc_simplify_intconv): Replaced hand
1568 rolled integer conversion with gfc_int2int, gfc_real2int, and
1570 (gfc_simplify_intconv): Renamed to simplify_intconv.
1572 2008-05-15 Steven G. Kargl, <kargl@comcast.net>
1573 * gfortran.dg/and_or_xor.f90: New test
1575 * fortran/simplify.c (gfc_simplify_and, gfc_simplify_or,
1576 gfc_simplify_xor): Don't range check logical results.
1578 2008-05-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1580 * trans-expr.c (gfc_conv_concat_op): Take care of nondefault
1582 (gfc_build_compare_string): Add kind argument and use it.
1583 (gfc_conv_statement_function): Fix indentation.
1584 * gfortran.h (gfc_character_info): New structure.
1585 (gfc_character_kinds): New array.
1586 * trans-types.c (gfc_character_kinds, gfc_character_types,
1587 gfc_pcharacter_types): New array.
1588 (gfc_init_kinds): Fill character kinds array.
1589 (validate_character): Take care of nondefault character kinds.
1590 (gfc_build_uint_type): New function.
1591 (gfc_init_types): Take care of nondefault character kinds.
1592 (gfc_get_char_type, gfc_get_pchar_type): New functions.
1593 (gfc_get_character_type_len): Use gfc_get_char_type.
1594 * trans.h (gfc_build_compare_string): Adjust prototype.
1595 (gfor_fndecl_compare_string_char4, gfor_fndecl_concat_string_char4,
1596 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
1597 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
1598 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
1599 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4): New
1601 * trans-types.h (gfc_get_char_type, gfc_get_pchar_type): New
1603 * trans-decl.c (gfor_fndecl_compare_string_char4,
1604 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
1605 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
1606 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
1607 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4,
1608 gfor_fndecl_concat_string_char4): New function decls.
1609 (gfc_build_intrinsic_function_decls): Define new *_char4 function
1611 * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char,
1612 gfc_conv_intrinsic_len_trim, gfc_conv_intrinsic_ichar,
1613 gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_trim,
1614 gfc_conv_intrinsic_function): Deal with nondefault character kinds.
1616 2008-05-15 Sa Liu <saliu@de.ibm.com>
1618 * iso-c-binding.def: Add standard parameter to macro NAMED_INTCST.
1619 All existing NAMED_INTCST definitions has standard GFC_STD_F2003,
1620 c_int128_t, c_int_least128_t and c_int_fast128_t are added as
1622 * iso-fortran-evn.def: Add standard parameter GFC_STD_F2003
1623 to macro NAMED_INTCST.
1624 * symbol.c (std_for_isocbinding_symbol): New helper function to
1625 return the standard that supports this isocbinding symbol.
1626 (generate_isocbinding_symbol): Do not generate GNU extension symbols
1627 if std=f2003. Add new parameter to NAMED_INTCST.
1628 * module.c (use_iso_fortran_env_module): Add new parameter to
1629 NAMED_INTCST and new field standard to struct intmod_sym.
1630 * gfortran.h: Add new parameter to NAMED_INTCST.
1631 * trans-types.c (init_c_interop_kinds): Add new parameter to
1633 * intrinsic.texi: Documented new types C_INT128_T, C_INT_LEASE128_T
1634 and C_INT_FAST128_T.
1636 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1639 * trans-decl.c (gfc_build_dummy_array_decl): Don't repack
1640 arrays that have the TARGET attribute.
1642 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1645 * simplify.c (only_convert_cmplx_boz): New function.
1646 (gfc_simplify_cmplx, gfc_simplify_complex, gfc_simplify_dcmplx):
1647 Call only_convert_cmplx_boz.
1649 2008-05-14 Paul Thomas <pault@gcc.gnu.org>
1652 * interface.c (compare_actual_formal): Do not check sizes if the
1653 actual is BT_PROCEDURE.
1655 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1658 * trans-array.c (gfc_conv_ss_startstride): Any negative size is
1659 the same as zero size.
1660 (gfc_conv_loop_setup): Fix size calculation.
1662 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1665 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Correctly
1666 handle zero-size sections.
1668 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1671 * scanner.c (preprocessor_line): Allocate enough memory for a
1674 2008-05-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1677 * target-memory.c (gfc_target_expr_size): Correctly treat
1679 (gfc_target_encode_expr): Likewise.
1680 (gfc_interpret_complex): Whitespace change.
1682 2008-05-11 Thomas Koenig <tkoenig@gcc.gnu.org>
1685 * trans.c (gfc_call_malloc): If size equals zero, allocate one
1686 byte; don't return a null pointer.
1688 2008-05-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1691 * module.c (quote_string): Fix sprintf format.
1693 2008-05-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1696 * module.c (quote_string, unquote_string,
1697 mio_allocated_wide_string): New functions.
1698 (mio_expr): Call mio_allocated_wide_string where needed.
1700 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
1702 * trans-decl.c (gfc_get_extern_function_decl, build_function_decl):
1703 Rename DECL_IS_PURE to DECL_PURE_P.
1705 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1707 * arith.c: (gfc_arith_concat, gfc_compare_string,
1708 gfc_compare_with_Cstring, hollerith2representation,
1709 gfc_hollerith2int, gfc_hollerith2real, gfc_hollerith2complex,
1710 gfc_hollerith2character, gfc_hollerith2logical): Use wide
1711 characters for character constants.
1712 * data.c (create_character_intializer): Likewise.
1713 * decl.c (gfc_set_constant_character_len): Likewise.
1714 * dump-parse-tree.c (show_char_const): Correctly dump wide
1716 error.c (print_wide_char): Rename into gfc_print_wide_char.
1717 (show_locus): Adapt to new prototype of gfc_print_wide_char.
1718 expr.c (free_expr0): Representation is now disjunct from
1719 character string value, so we always free it.
1720 (gfc_copy_expr, find_substring_ref, gfc_simplify_expr): Adapt
1721 to wide character strings.
1722 * gfortran.h (gfc_expr): Make value.character.string a wide string.
1723 (gfc_wide_toupper, gfc_wide_strncasecmp, gfc_wide_memset,
1724 gfc_widechar_to_char, gfc_char_to_widechar): New prototypes.
1725 (gfc_get_wide_string): New macro.
1726 (gfc_print_wide_char): New prototype.
1727 * io.c (format_string): Make a wide string.
1728 (next_char, gfc_match_format, compare_to_allowed_values,
1729 gfc_match_open): Deal with wide strings.
1730 * module.c (mio_expr): Convert between wide strings and ASCII ones.
1731 * primary.c (match_hollerith_constant, match_charkind_name):
1732 Handle wide strings.
1733 * resolve.c (build_default_init_expr): Likewise.
1734 * scanner.c (gfc_wide_toupper, gfc_wide_memset,
1735 gfc_char_to_widechar): New functions.
1736 (wide_strchr, gfc_widechar_to_char, gfc_wide_strncasecmp):
1737 Changes in prototypes.
1738 (gfc_define_undef_line, load_line, preprocessor_line,
1739 include_line, load_file, gfc_read_orig_filename): Handle wide
1741 * simplify.c (gfc_simplify_achar, gfc_simplify_adjustl,
1742 gfc_simplify_adjustr, gfc_simplify_char, gfc_simplify_iachar,
1743 gfc_simplify_ichar, simplify_min_max, gfc_simplify_new_line,
1744 gfc_simplify_repeat): Handle wide strings.
1745 (wide_strspn, wide_strcspn): New helper functions.
1746 (gfc_simplify_scan, gfc_simplify_trim, gfc_simplify_verify):
1747 Handle wide strings.
1748 * symbol.c (generate_isocbinding_symbol): Likewise.
1749 * target-memory.c (size_character, gfc_target_expr_size,
1750 encode_character, gfc_target_encode_expr, gfc_interpret_character,
1751 gfc_target_interpret_expr): Handle wide strings.
1752 * trans-const.c (gfc_conv_string_init): Lower wide strings to
1754 (gfc_conv_constant_to_tree): Likewise.
1755 * trans-expr.c (gfc_conv_substring_expr): Handle wide strings.
1756 * trans-io.c (gfc_new_nml_name_expr): Likewise.
1757 * trans-stmt.c (gfc_trans_label_assign): Likewise.
1759 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1761 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
1762 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
1763 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): Mark arguments
1764 with ATTRIBUTE_UNUSED.
1766 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1768 * check.c (gfc_check_sizeof): Switch to ATTRIBUTE_UNUSED.
1769 * simplify.c (gfc_simplify_lgamma): Likewise.
1771 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1773 * openmp.c (gfc_match_omp_eos): Use gfc_next_ascii_char and
1774 gfc_peek_ascii_char.
1775 * decl.c (gfc_match_kind_spec, gfc_match_type_spec,
1776 gfc_match_implicit_none, match_implicit_range, gfc_match_implicit,
1777 match_string_p, match_attr_spec, gfc_match_suffix,
1778 match_procedure_decl, gfc_match_entry, gfc_match_subroutine):
1780 * gfortran.h (gfc_char_t): New type.
1781 (gfc_linebuf): Make line member a gfc_char_t.
1782 (locus): Make nextc member a gfc_char_t.
1783 (gfc_wide_is_printable, gfc_wide_is_digit, gfc_wide_fits_in_byte,
1784 gfc_wide_tolower, gfc_wide_strlen, gfc_next_ascii_char,
1785 gfc_peek_ascii_char, gfc_check_digit): New prototypes.
1786 * error.c (print_wide_char): New function.
1787 (show_locus): Use print_wide_char and gfc_wide_strlen.
1788 * io.c (next_char): Use gfc_char_t type.
1789 (match_io): Use gfc_peek_ascii_char and gfc_next_ascii_char.
1790 * match.c (gfc_match_parens, gfc_match_eos,
1791 gfc_match_small_literal_int, gfc_match_name, gfc_match_name_C,
1792 gfc_match_intrinsic_op, gfc_match_char, gfc_match_return,
1793 gfc_match_common): Likewise.
1794 * match.h (gfc_match_special_char): Change prototype.
1795 * parse.c (decode_specification_statement, decode_statement,
1796 decode_omp_directive, next_free, next_fixed): Use
1797 gfc_peek_ascii_char and gfc_next_ascii_char.
1798 * primary.c (gfc_check_digit): Change name.
1799 (match_digits, match_hollerith_constant, match_boz_constant,
1800 match_real_constant, next_string_char, match_charkind_name,
1801 match_string_constant, match_logical_constant_string,
1802 match_complex_constant, match_actual_arg, match_varspec,
1803 gfc_match_rvalue, match_variable): Use gfc_peek_ascii_char and
1804 gfc_next_ascii_char.
1805 * scanner.c (gfc_wide_fits_in_byte, wide_is_ascii,
1806 gfc_wide_is_printable, gfc_wide_tolower, gfc_wide_is_digit,
1807 gfc_wide_is_digit, wide_atoi, gfc_wide_strlen, wide_strcpy,
1808 wide_strchr, widechar_to_char, wide_strncmp, wide_strncasecmp,
1809 gfc_next_ascii_char, gfc_peek_ascii_char):
1811 (next_char, gfc_define_undef_line, skip_free_comments,
1812 gfc_next_char_literal, gfc_next_char, gfc_peek_char,
1813 gfc_error_recovery, load_line, preprocessor_line, include_line,
1814 load_file, gfc_read_orig_filename): Use gfc_char_t for source
1815 characters and the {gfc_,}wide_* functions to manipulate wide
1818 2008-05-06 Tobias Burnus <burnus@net-b.de>
1821 * intrinsic.c (add_functions): Call gfc_simplify_bessel_*.
1822 * intrinsic.h: Add prototypes for gfc_simplify_bessel_*.
1823 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
1824 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
1825 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): New.
1827 2008-05-03 Janus Weil <jaydub66@gmail.com>
1829 * misc.c (gfc_clear_ts): Set interface to NULL.
1831 2008-05-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1834 * gfortran.h: Add extra_comma pointer to gfc_dt structure. Add iokind to
1835 gfc_expr value union. Add io_kind enum to here from io.c.
1836 * io.c (gfc_free_dt): Free extra_comma.
1837 (gfc_resolve_dt): If an extra comma was encountered and io_unit is type
1838 BT_CHARACTER, resolve to format_expr and set default unit. Error if
1839 io_kind is M_WRITE. (match_io): Match the extra comma and set new
1840 pointer, extra_comma.
1842 2008-05-01 Bud Davis <bdavis9659@sbcglobal.net>
1845 * simplify.c (gfc_simplify_index): Check for direction argument
1848 2008-05-01 Janus Weil <jaydub66@gmail.com>
1850 * gfortran.h (struct gfc_symbol): Moving "interface" member to
1851 gfc_typespec (plus fixing a small docu error).
1852 * interface.c (gfc_procedure_use): Ditto.
1853 * decl.c (match_procedure_decl): Ditto.
1854 * resolve.c (resolve_specific_f0,
1855 resolve_specific_f0, resolve_symbol): Ditto.
1857 2008-04-30 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1859 * intrinsic.c (add_functions): Add SELECTED_CHAR_KIND intrinsic.
1860 * intrinsic.h (gfc_check_selected_char_kind,
1861 gfc_simplify_selected_char_kind): New prototypes.
1862 * gfortran.h (gfc_isym_id): Add GFC_ISYM_SC_KIND.
1863 * trans.h (gfor_fndecl_sc_kind): New function decl.
1864 * trans-decl.c (gfor_fndecl_sc_kind): Build new decl.
1865 * arith.c (gfc_compare_with_Cstring): New function.
1866 * arith.h (gfc_compare_with_Cstring): New prototype.
1867 * check.c (gfc_check_selected_char_kind): New function.
1868 * primary.c (match_string_constant, match_kind_param): Mark
1869 symbols used as literal constant kind param as referenced.
1870 * trans-intrinsic.c (gfc_conv_intrinsic_sc_kind): New function.
1871 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_sc_kind.
1872 * intrinsic.texi (SELECTED_CHAR_KIND): Document new intrinsic.
1873 * simplify.c (gfc_simplify_selected_char_kind): New function.
1875 2008-04-28 Paul Thomas <pault@gcc.gnu.org>
1878 * module.c (find_symbol): Do not return a result for a symbol
1879 that has been renamed in another module.
1881 2008-04-26 George Helffrich <george@gcc.gnu.org>
1885 * trans-common.c (create_common): Add decl to function
1886 chain (if inside one) to preserve identifier scope in debug output.
1888 2008-04-25 Jan Hubicka <jh@suse.cz>
1890 * trans-decl.c (trans_function_start): Update.
1892 2008-04-25 Tobias Burnus <burnus@net-b.de>
1893 Daniel Franke <franke.daniel@gmail.com>
1896 * gfortranspec.c (lang_specific_driver): Deprecate
1897 -M option; fix ICE when "-M" is last argument and
1898 make "-M<dir>" work.
1899 * options.c (gfc_handle_module_path_options):
1900 Use -J instead of -M in error messages.
1901 * invoke.texi: Mark -M as depecated.
1903 2008-04-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1904 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1907 * trans-instrinsic.c (gfc_conv_intrinsic_minmaxloc): Correctly adjust
1908 loop counter offset.
1910 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1912 * trans-expr.c (gfc_conv_structure): Don't set TREE_INVARIANT.
1913 * trans-array.c (gfc_build_null_descriptor): Don't set TREE_INVARIANT.
1914 (gfc_trans_array_constructor_value): Don't set TREE_INVARIANT.
1915 (gfc_build_constant_array_constructor): Don't set TREE_INVARIANT.
1916 (gfc_conv_array_initializer): Don't set TREE_INVARIANT.
1917 * trans-common.c (get_init_field): Don't set TREE_INVARIANT.
1918 (create_common): Don't set TREE_INVARIANT.
1919 * trans-stmt.c (gfc_trans_character_select): Don't set TREE_INVARIANT.
1920 * trans-decl.c (gfc_generate_function_code): Don't set TREE_INVARIANT.
1922 2008-04-21 Steve Ellcey <sje@cup.hp.com>
1924 * f95-lang.c (gfc_init_decl_processing): use ptr_mode instead of Pmode.
1926 2008-04-21 Daniel Franke <franke.daniel@gmail.com>
1929 * gfortranspec.c (lookup_option): Properly handle separated arguments
1930 in -J option, print missing argument message when necessary.
1932 2008-04-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1935 * scanner.c (skip_fixed_comments): Update continue_line when comment is
1936 detected. (gfc_next_char_literal): Likewise.
1938 2008-04-19 Paul Thomas <pault@gcc.gnu.org>
1943 * trans_array.c (gfc_trans_array_constructor): Temporarily
1944 realign loop, if loop->from is not zero, before creating
1945 the temporary array and provide an offset.
1948 * trans-decl.c (gfc_init_default_dt): Add gfc_ prefix to name
1949 and allow for NULL body. Change all references from
1950 init_default_dt to gfc_init_default_dt.
1951 * trans.h : Add prototype for gfc_init_default_dt.
1952 * trans-array.c (gfc_trans_deferred_vars): After nullification
1953 call gfc_init_default_dt for derived types with allocatable
1956 2008-04-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1959 * trans-common.c (create_common): Revert patch causing regression.
1961 2008-04-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1964 * iresolve.c (gfc_resolve_eoshift): Check for NULL symtree in test for
1965 optional argument attribute.
1967 2008-04-16 Paul Thomas <pault@gcc.gnu.org>
1970 * trans-intrinsic.c (gfc_conv_intrinsic_char): Even though KIND
1971 is not used, the argument must be converted.
1973 2008-04-16 Jakub Jelinek <jakub@redhat.com>
1976 * f95-lang.c (gfc_init_builtin_functions): Make sure
1977 BUILT_IN_SINCOS{,F,L} types aren't varargs.
1979 2008-04-15 Paul Thomas <pault@gcc.gnu.org>
1982 * expr.c (scalarize_intrinsic_call): Reorder identification of
1983 array argument so that if one is not found a segfault does not
1984 occur. Return FAILURE if all scalar arguments.
1986 2008-04-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1987 Tobias Burnus <burnus@net-b.de>
1990 * options.c (gfc_init_options): Set the default maximum continuation
1991 lines to 255 for both free and fixed form source for warnings.
1992 (gfc_handle_option): Set -std=f95 fixed form max continuations to 19 and
1993 the -std=f95 free form max continuations to 39 for warnings.
1994 * scanner.c (gfc_next_char_literal): Adjust the current_line number only
1995 if it is less than the current locus.
1997 2008-04-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1999 PR fortran/25829 28655
2000 * io.c (io_tag): Add new tags for decimal, encoding, asynchronous,
2001 round, sign, and id. (match_open_element): Match new tags.
2002 (gfc_resolve_open): Resolve new tags. (gfc_match_open): Enable encoding
2003 for DEFAULT only. Update error messages. (match_dt_element): Fix match
2004 tag for asynchronous. Update error messages. (gfc_free_inquire): Free
2005 new expressions. (match_inquire_element): Match new tags.
2006 (gfc_match_inquire): Add constraint for ID and PENDING.
2007 (gfc_resolve_inquire): Resolve new tags.
2008 * trans-io.c (gfc_trans_inquire): Clean up whitespace and fix setting of
2009 mask for ID parameter.
2010 * ioparm.def: Fix order of parameters for pending, round, and sign.
2011 NOTE: These must line up with the definitions in libgfortran/io/io.h. or
2014 2008-04-06 Paul Thomas <pault@gcc.gnu.org>
2017 * expr.c (scalarize_intrinsic_call): Identify which argument is
2018 an array and use that as the template.
2019 (check_init_expr): Remove tests that first argument is an array
2020 in the call to scalarize_intrinsic_call.
2022 2008-04-06 Tobias Schlüter <tobi@gcc.gnu.org>
2025 * io.c (io_tag): Add field 'value'. Split 'spec' field in
2027 (match_etag, match_vtag, match_ltag): Split parsing in two steps
2028 to give better error messages.
2030 2008-04-06 Tobias Burnus <burnus@net-b.de>
2032 * io.c (check_io_constraints): Add constrains. ID= requires
2033 asynchronous= and asynchronous= must be init expression.
2035 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2037 * f95-lang.c: Set LANG_HOOKS_NAME to "GNU Fortran".
2039 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2041 * dump-parse-tree.c: Use fprintf, fputs and fputc instead of
2042 gfc_status and gfc_status_char. Remove gfc_ prefix of the gfc_show_*
2043 functions and make them static. Add new gfc_dump_parse_tree
2045 * gfortran.h (gfc_option_t): Rename verbose into dump_parse_tree.
2046 (gfc_status, gfc_status_char): Delete prototypes.
2047 * error.c (gfc_status, gfc_status_char): Remove functions.
2048 * scanner.c (gfc_new_file): Use printf instead of gfc_status.
2049 * options.c (gfc_init_options): Rename verbose into dump_parse_tree.
2050 (gfc_handle_module_path_options): Use gfc_fatal_error instead of
2051 gfc_status and exit.
2052 (gfc_handle_option): Rename verbose into dump_parse_tree.
2053 * parse.c (gfc_parse_file): Use gfc_dump_parse_tree.
2055 2008-04-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2056 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2058 PR fortran/25829 28655
2059 * dump-parse-tree.c (gfc_show_code_node): Show new I/O parameters.
2060 * gfortran.h (gfc_statement): Add ST_WAIT enumerator.
2061 (gfc_open): Add pointers for decimal, encoding, round, sign,
2062 asynchronous. (gfc_inquire): Add pointers for asynchronous, decimal,
2063 encoding, pending, round, sign, size, id.
2064 (gfc_wait): New typedef struct. (gfc_dt): Add pointers for id, pos,
2065 asynchronous, blank, decimal, delim, pad, round, sign.
2066 (gfc_exec_op): Add EXEC_WAIT enumerator. (gfc_code): Add pointer for
2067 wait. (gfc_free_wait), (gfc_resolve_wait): New function prototypes.
2068 * trans-stmt.h (gfc_trans_wait): New function prototype.
2069 * trans.c (gfc_trans_code): Add case for EXEC_WAIT.
2070 * io.c (io_tag): Add new tags for DECIMAL, ENCODING, ROUND, SIGN,
2071 ASYCHRONOUS, ID. (match_open_element): Add matchers for new tags.
2072 (gfc_free_open): Free new pointers. (gfc_resolve_open): Resolve new
2073 tags. (gfc_resolve_open): Remove comment around check for allowed
2074 values and ASYNCHRONOUS, update it. Likewise for DECIMAL, ENCODING,
2075 ROUND, and SIGN. (match_dt_element): Add matching for new tags.
2076 (gfc_free_wait): New function. (gfc_resolve_wait): New function.
2077 (match_wait_element): New function. (gfc_match_wait): New function.
2078 * resolve.c (gfc_resolve_blocks): Add case for EXEC_WAIT.
2079 (resolve_code): Add case for EXEC_WAIT.
2080 * st.c (gfc_free_statement): Add case for EXEC_WAIT.
2081 * trans-io.c (ioparam_type): Add IOPARM_ptype_wait. (gfc_st_parameter):
2082 Add "wait" entry. (iocall): Add IOCALL_WAIT enumerator.
2083 (gfc_build_io_library_fndecls): Add function declaration for st_wait.
2084 (gfc_trans_open): Add mask bits for new I/O tags.
2085 (gfc_trans_inquire): Add mask bits for new I/O tags.
2086 (gfc_trans_wait): New translation function.
2087 (build_dt): Add mask bits for new I/O tags.
2088 * match.c (gfc_match_if) Add matcher for "wait".
2089 * match.h (gfc_match_wait): Prototype for new function.
2090 * ioparm.def: Add new I/O parameter definitions.
2091 * parse.c (decode_statement): Add match for "wait" statement.
2092 (next_statement): Add case for ST_WAIT. (gfc_ascii_statement): Same.
2094 2008-04-03 Jakub Jelinek <jakub@redhat.com>
2097 * openmp.c (resolve_omp_clauses): Diagnose if a clause symbol
2100 2008-04-03 Tom Tromey <tromey@redhat.com>
2102 * Make-lang.in (fortran_OBJS): New variable.
2104 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
2106 * f95-lang.c (insert_block): Kill.
2108 2008-04-01 George Helffrich <george@gcc.gnu.org>
2110 PR fortran/35154, fortran/23057
2111 * trans-common.c (create_common): Add decl to function
2112 chain to preserve identifier scope in debug output.
2114 2008-04-01 Joseph Myers <joseph@codesourcery.com>
2116 * gfortran.texi: Include gpl_v3.texi instead of gpl.texi
2117 * Make-lang.in (GFORTRAN_TEXI): Include gpl_v3.texi instead of
2120 2008-03-30 Paul Thomas <pault@gcc.gnu.org>
2123 * resolve.c (resolve_function, resolve_call): If the procedure
2124 is elemental do not look for noncopying intrinsics.
2126 2008-03-29 Paul Thomas <pault@gcc.gnu.org>
2129 * trans-array.c (gfc_array_init_size): Set 'size' zero if
2130 negative in one dimension.
2133 * trans-expr.c (gfc_trans_string_copy): Only assign a char
2134 directly if the lhs and rhs types are the same.
2136 2008-03-28 Daniel Franke <franke.daniel@gmail.com>
2137 Paul Richard Thomas <paul.richard.thomas@gmail.com>
2140 * primary.c (match_variable): Improved matching of function
2142 * resolve.c (resolve_allocate_deallocate): Removed checks if
2143 the actual argument for STAT is a variable.
2145 2008-03-28 Tobias Burnus <burnus@net-b.de>
2147 * symbol.c (gfc_get_default_type): Fix error message; option
2148 -fallow_leading_underscore should be -fallow-leading-underscore
2150 2008-03-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2153 * iresolve.c (gfc_resolve_cshift): Check for NULL symtree in test for
2154 optional argument attribute.
2156 2008-03-27 Tom Tromey <tromey@redhat.com>
2158 * Make-lang.in: Revert automatic dependency patch.
2160 2008-03-25 Tom Tromey <tromey@redhat.com>
2162 * Make-lang.in: Remove .o targets.
2163 (fortran_OBJS): New variable.
2164 (fortran/gfortranspec.o): Move to fortran/. Reduce to variable
2166 (GFORTRAN_D_OBJS): Update.
2167 (GFORTRAN_TRANS_DEPS): Remove.
2169 2008-03-24 Paul Thomas <pault@gcc.gnu.org>
2172 * resolve.c (resolve_structure_cons): It is an error to assign
2173 NULL to anything other than a pointer or allocatable component.
2176 * resolve.c (resolve_symbol): If the symbol is a derived type,
2177 resolve the derived type. If the symbol is a derived type
2178 function, ensure that the derived type is visible in the same
2179 namespace as the function.
2181 2008-03-23 Tobias Schlüter <tobi@gcc.gnu.org>
2183 * trans.h: Use fold_build in build1_v, build2_v and build3_v
2185 * trans-openmp.c (gfc_trans_omp_critical, gfc_trans_omp_single):
2186 Don't use build2_v macro.
2188 2008-03-19 Daniel Franke <franke.daniel@gmail.com>
2191 * interface.c (gfc_procedure_use): Check for keyworded arguments in
2192 procedures without explicit interfaces.
2194 2008-03-16 Paul Thomas <pault@gcc.gnu.org>
2197 * resolve.c (check_assumed_size_reference): Only visit the
2198 first reference and look directly at the highest dimension.
2200 2008-03-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2203 * trans-array.c (gfc_conv_array_index_offset): Remove unnecessary
2206 2008-03-15 Daniel Franke <franke.daniel@gmail.com>
2209 * resolve.c (resolve_branch): Less strict and pessimistic warning
2212 2008-03-11 Paolo Bonzini <bonzini@gnu.org>
2214 * f95-lang.c (LANG_HOOKS_CLEAR_BINDING_STACK): Delete.
2215 (gfc_be_parse_file): Call clear_binding_stack from here.
2216 (gfc_clear_binding_stack): Rename to clear_binding_stack.
2218 2008-03-09 Paul Thomas <pault@gcc.gnu.org>
2221 * module.c (mio_symtree_ref): After providing a symbol for a
2222 missing equivalence member, resolve and NULL the fixups.
2224 2008-03-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2226 * invoke.texi (Error and Warning Options): Document
2229 2008-03-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2232 * trans-array.c (gfc_conv_ss_startstride): Fix the logic to avoid
2233 checking bounds of absent optional arguments.
2235 2008-03-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2238 * intrinsic.c (add_functions): Add simplification routines for
2239 ERF, DERF, ERFC and DERFC.
2240 * decl.c (gfc_match_suffix, gfc_match_subroutine): Change GNU
2241 extensions into Fortran 2008 features.
2242 * intrinsic.h (gfc_simplify_erf, gfc_simplify_erfc): New
2244 * simplify.c (gfc_simplify_erf, gfc_simplify_erfc): New functions.
2246 2008-03-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2249 * intrinsic.c (add_functions): Modify intrinsics ACOSH, ASINH,
2250 ATANH, ERF, ERFC and GAMMA. Add intrinsics BESSEL_{J,Y}{0,1,N},
2251 ERFC_SCALED, LOG_GAMMA and HYPOT.
2252 * intrinsic.h (gfc_check_hypot, gfc_simplify_hypot,
2253 gfc_resolve_hypot): New prototypes.
2254 * mathbuiltins.def: Add HYPOT builtin. Make complex versions of
2255 ACOSH, ASINH and ATANH available.
2256 * gfortran.h (GFC_ISYM_ERFC_SCALED, GFC_ISYM_HYPOT): New values.
2257 * lang.opt: Add -std=f2008 option.
2258 * libgfortran.h: Define GFC_STD_F2008.
2259 * lang-specs.h: Add .f08 and .F08 file suffixes.
2260 * iresolve.c (gfc_resolve_hypot): New function.
2261 * parse.c (parse_contained): Allow empty CONTAINS for Fortran 2008.
2262 * check.c (gfc_check_hypot): New function.
2263 * trans-intrinsic.c (gfc_intrinsic_map): Define ERFC_SCALE builtin.
2264 * options.c (set_default_std_flags): Allow Fortran 2008 by default.
2265 (form_from_filename): Add .f08 suffix.
2266 (gfc_handle_option): Handle -std=f2008 option.
2267 * simplify.c (gfc_simplify_hypot): New function.
2268 * gfortran.texi: Document Fortran 2008 status and file extensions.
2269 * intrinsic.texi: Document new BESSEL_{J,Y}{0,1,N} intrinsics,
2270 as well as HYPOT and ERFC_SCALED. Update documentation of ERF,
2271 ERFC, GAMMA, LGAMMA, ASINH, ACOSH and ATANH.
2272 * invoke.texi: Document the new -std=f2008 option.
2274 2008-03-02 Jakub Jelinek <jakub@redhat.com>
2276 * gfortranspec.c (lang_specific_driver): Update copyright notice
2279 2008-02-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2282 * expr.c (find_array_element): Modify traversing the constructor to
2283 avoid trying to access NULL memory pointed to by next for the
2284 last element. (find_array_section): Exit while loop if cons->next is
2286 * trans-expr.c (gfc_conv_scalar_char_value): Initialize gfc_typespec.
2287 (gfc_conv_function_call): Same.
2288 * decl.c (gfc_match_implicit): Same.
2289 * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Same.
2291 2008-02-28 Daniel Franke <franke.daniel@gmail.com>
2296 * lang.opt: Added -Wreturn-type.
2297 * options.c (gfc_handle_option): Recognize -Wreturn-type.
2298 * trans-decl.c (gfc_trans_deferred_vars): Emit warnings for funtions
2299 where the result value is not set.
2300 (gfc_generate_function_code): Likewise.
2301 (generate_local_decl): Emit warnings for funtions whose RESULT
2302 variable is not set.
2304 2008-02-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2307 * trans-expr.c (gfc_conv_variable): Don't build indirect
2308 references when explicit interface is mandated.
2309 * resolve.c (resolve_formal_arglist): Set attr.always_explicit
2310 on the result symbol as well as the procedure symbol.
2312 2008-02-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2315 * trans.h: Remove prototypes for gfor_fndecl_math_exponent4,
2316 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
2317 gfor_fndecl_math_exponent16.
2318 * f95-lang.c (build_builtin_fntypes): Add new function types.
2319 (gfc_init_builtin_functions): Add new builtins for nextafter,
2320 frexp, ldexp, fabs, scalbn and inf.
2321 * iresolve.c (gfc_resolve_rrspacing): Don't add hidden arguments.
2322 (gfc_resolve_scale): Don't convert type of second argument.
2323 (gfc_resolve_set_exponent): Likewise.
2324 (gfc_resolve_size): Don't add hidden arguments.
2325 * trans-decl.c: Remove gfor_fndecl_math_exponent4,
2326 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
2327 gfor_fndecl_math_exponent16.
2328 * trans-intrinsic.c (gfc_intrinsic_map): Remove intrinsics
2329 for scalbn, fraction, nearest, rrspacing, set_exponent and
2331 (gfc_conv_intrinsic_exponent): Directly call frexp.
2332 (gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_nearest,
2333 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
2334 gfc_conv_intrinsic_scale, gfc_conv_intrinsic_set_exponent): New
2336 (gfc_conv_intrinsic_function): Use the new functions above.
2338 2008-02-26 Tobias Burnus <burnus@net-b.de>
2341 * interface.c (check_operator_interface): Show better line for error
2342 messages; fix constrains for user-defined assignment operators.
2343 (gfc_extend_assign): Fix constrains for user-defined assignment
2346 2008-02-26 Tom Tromey <tromey@redhat.com>
2348 * trans-io.c (set_error_locus): Remove old location code.
2349 * trans-decl.c (gfc_set_decl_location): Remove old location code.
2350 * f95-lang.c (gfc_init): Remove test of USE_MAPPED_LOCATION.
2351 * scanner.c (gfc_gobble_whitespace): Remove old location code.
2352 (get_file): Likewise.
2353 (preprocessor_line): Likewise.
2354 (load_file): Likewise.
2355 (gfc_new_file): Likewise.
2356 * trans.c (gfc_trans_runtime_check): Remove old location code.
2357 (gfc_get_backend_locus): Likewise.
2358 (gfc_set_backend_locus): Likewise.
2359 * data.c (gfc_assign_data_value): Remove old location code.
2360 * error.c (show_locus): Remove old location code.
2361 * gfortran.h (gfc_linebuf): Remove old location code.
2362 (gfc_linebuf_linenum): Remove old-location variant.
2364 2008-02-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2367 * trans-const.c (gfc_build_string_const): Don't call gettext.
2368 (gfc_build_localized_string_const): New function.
2369 * trans-const.h (gfc_build_localized_string_const): New prototype.
2370 * trans.c (gfc_trans_runtime_check): Use
2371 gfc_build_localized_string_const instead of gfc_build_string_const.
2372 (gfc_call_malloc): Likewise.
2373 (gfc_allocate_with_status): Likewise.
2374 (gfc_allocate_array_with_status): Likewise.
2375 (gfc_deallocate_with_status): Likewise.
2376 (gfc_call_realloc): Likewise.
2377 * trans-io.c (gfc_trans_io_runtime_check): Likewise.
2379 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
2381 * arith.c: Update copyright years.
2382 * arith.h: Likewise.
2383 * array.c: Likewise.
2385 * check.c: Likewise.
2389 * dependency.c: Likewise.
2390 * dependency.h: Likewise.
2391 * dump-parse-tree.c: Likewise.
2392 * error.c: Likewise.
2394 * gfc-internals.texi: Likewise.
2395 * gfortran.h: Likewise.
2396 * gfortran.texi: Likewise.
2397 * gfortranspec.c: Likewise.
2398 * interface.c: Likewise.
2399 * intrinsic.c: Likewise.
2400 * intrinsic.h: Likewise.
2401 * intrinsic.texi: Likewise.
2402 * invoke.texi: Likewise.
2404 * iresolve.c: Likewise.
2405 * iso-c-binding.def: Likewise.
2406 * iso-fortran-env.def: Likewise.
2407 * lang-specs.h: Likewise.
2408 * lang.opt: Likewise.
2409 * libgfortran.h: Likewise.
2410 * match.c: Likewise.
2411 * match.h: Likewise.
2412 * matchexp.c: Likewise.
2414 * module.c: Likewise.
2415 * openmp.c: Likewise.
2416 * options.c: Likewise.
2417 * parse.c: Likewise.
2418 * parse.h: Likewise.
2419 * primary.c: Likewise.
2420 * resolve.c: Likewise.
2421 * scanner.c: Likewise.
2422 * simplify.c: Likewise.
2424 * symbol.c: Likewise.
2425 * target-memory.c: Likewise.
2426 * target-memory.h: Likewise.
2427 * trans-array.h: Likewise.
2428 * trans-const.h: Likewise.
2429 * trans-stmt.h: Likewise.
2430 * trans-types.c: Likewise.
2431 * trans-types.h: Likewise.
2432 * types.def: Likewise.
2434 2008-02-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2437 * simplify.c (gfc_simplify_ibclr), (gfc_simplify_ibits),
2438 (gfc_simplify_ibset): Remove call to range_check.
2439 (simplify_cmplx), (gfc_simplify_dble), (gfc_simplify_float)
2440 (gfc_simplify_real): Add call gfc_clear_ts to initialize the
2441 temporary gfc_typspec variable.
2443 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
2445 * trans-array.c (gfc_conv_descriptor_data_get,
2446 gfc_conv_descriptor_data_set_internal,
2447 gfc_conv_descriptor_data_addr, gfc_conv_descriptor_offset,
2448 gfc_conv_descriptor_dtype, gfc_conv_descriptor_dimension,
2449 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
2450 gfc_conv_descriptor_ubound, gfc_trans_create_temp_array,
2451 gfc_conv_array_transpose, gfc_grow_array,
2452 gfc_trans_array_constructor_subarray,
2453 gfc_trans_array_constructor_value, gfc_trans_scalarized_loop_end,
2454 gfc_array_init_size, gfc_array_allocate, gfc_array_deallocate,
2455 gfc_conv_array_initializer, gfc_trans_array_bounds,
2456 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
2457 gfc_get_dataptr_offset, gfc_conv_array_parameter,
2458 gfc_trans_dealloc_allocated, get_full_array_size,
2459 gfc_duplicate_allocatable, structure_alloc_comps): Use fold_buildN
2461 * trans-expr.c (gfc_conv_expr_present, gfc_conv_missing_dummy,
2462 gfc_conv_component_ref, gfc_conv_cst_int_power,
2463 gfc_conv_function_call, gfc_trans_structur_assign): Likewise.
2464 * trans-common.c (create_common): Likewise.
2465 * trans-openmp.c (gfc_trans_omp_atomic, gfc_trans_omp_do):
2467 * trans-const.c (gfc_conv_constant_to_tree): Likewise.
2468 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_do,
2469 gfc_trans_integer_select, gfc_trans_character_select,
2470 gfc_trans_forall_loop, compute_overall_iter_number,
2471 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_allocate,
2472 gfc_trans_deallocate): Likewise.
2473 * trans.c (gfc_build_addr_expr, gfc_trans_runtime_check,
2474 gfc_allocate_with_status, gfc_allocate_array_with_status,
2475 gfc_deallocate_with_status): Likewise.
2476 * f95-lang.c (gfc_truthvalue_conversion): Likewise.
2477 * trans-io.c (set_parameter_const, set_parameter_value,
2478 set_parameter_ref, set_string, set_internal_unit, io_result,
2479 set_error_locus, nml_get_addr_expr, transfer_expr): Likewise.
2480 * trans-decl.c (gfc_build_qualified_array, build_entry_thunks,
2481 gfc_get_fake_result_decl, gfc_trans_auto_character_variable,
2482 gfc_generate_function_code): Likewise.
2483 * convert.c (convert): Likewise.
2484 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
2485 build_fixbound_expr, build_fix_expr, gfc_conv_intrinsic_aint,
2486 gfc_conv_intrinsic_int, gfc_conv_intrinsic_imagpart,
2487 gfc_conv_intrinsic_conjg, gfc_conv_intrinsic_abs,
2488 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
2489 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_dprod,
2490 gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
2491 gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax,
2492 gfc_conv_intrinsic_minmax_char, gfc_conv_intrinsic_count,
2493 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_dot_product,
2494 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
2495 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_not,
2496 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
2497 gfc_conv_intrinsic_ichar, gfc_conv_intrinsic_size,
2498 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
2499 gfc_conv_allocated, gfc_conv_associated, gfc_conv_intrinsic_trim,
2500 gfc_conv_intrinsic_repeat): Likewise.
2502 2008-02-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2505 * trans-expr.c (gfc_conv_power_op): Use BUILT_IN_CPOW{F,,L}.
2506 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_CPOW{F,,L}.
2507 * trans.h (gfor_fndecl_math_cpow, gfor_fndecl_math_cpowf,
2508 gfor_fndecl_math_cpowl10, gfor_fndecl_math_cpowl16): Remove.
2509 * trans-decl.c: Likewise.
2511 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2514 * expr.c (find_array_element): Modify traversing the constructor to
2515 avoid trying to access NULL memory pointed to by next for the
2516 last element. (find_array_section): Exit while loop if cons->next is
2519 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2522 * iresolve.c (resolve_mask_arg): Add gfc_clear_ts to initialize
2524 (gfc_resolve_aint): Likewise.
2525 (gfc_resolve_anint): Likewise.
2526 (gfc_resolve_besn): Likewise.
2527 (gfc_resolve_cshift): Likewise.
2528 (gfc_resolve_ctime): Likewise.
2529 (gfc_resolve_eoshift): Likewise.
2530 (gfc_resolve_index_func): Likewise.
2531 (gfc_resolve_isatty): Likewise.
2532 (gfc_resolve_malloc): Likewise.
2533 (gfc_resolve_rrspacing): Likewise.
2534 (gfc_resolve_scale): Likewise.
2535 (gfc_resolve_set_exponent): Likewise.
2536 (gfc_resolve_spacing): Likewise.
2537 (gfc_resolve_spacing): Likewise.
2538 (gfc_resolve_fgetc): Likewise.
2539 (gfc_resolve_fputc): Likewise.
2540 (gfc_resolve_ftell): Likewise.
2541 (gfc_resolve_ttynam): Likewise.
2542 (gfc_resolve_alarm_sub): Likewise.
2543 (gfc_resolve_mvbits): Likewise.
2544 (gfc_resolve_getarg): Likewise.
2545 (gfc_resolve_signal_sub): Likewise.
2546 (gfc_resolve_exit): Likewise.
2547 (gfc_resolve_flush): Likewise.
2548 (gfc_resolve_free): Likewise.
2549 (gfc_resolve_ctime_sub): Likewise.
2550 (gfc_resolve_fgetc_sub): Likewise.
2551 (gfc_resolve_fputc_sub): Likewise.
2552 (gfc_resolve_fseek_sub): Likewise.
2553 (gfc_resolve_ftell_sub): Likewise.
2554 (gfc_resolve_ttynam_sub): Likewise.
2556 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2558 * gfc-internals.texi: Fix typos and markup nits.
2559 * gfortran.texi: Likewise.
2560 * intrinsic.texi: Likewise.
2562 2008-02-21 Richard Guenther <rguenther@suse.de>
2564 * trans-expr.c (gfc_conv_expr_op): Expand INTRINSIC_PARENTHESES
2565 as unary PAREN_EXPR for real and complex typed expressions.
2566 (gfc_conv_unary_op): Fold the built tree.
2568 2008-02-20 Tobias Burnus <burnus@net-b.de>
2571 * match.c (gfc_match_name): Improve error message for '$'.
2573 2008-02-19 Daniel Franke <franke.daniel@gmail.com>
2576 * expr.c (gfc_check_pointer_assign): Add type and kind information
2577 to type-mismatch message.
2578 (gfc_check_assign): Unify error messages.
2580 2008-02-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2583 * gfortran.texi: Create new section for unimplemented extensions.
2584 Add "STRUCTURE and RECORD" and "ENCODE and DECODE statements".
2585 Remove "smaller projects" list. Fix a few typos.
2587 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2589 * intrinsic.texi: Rename INDEX node to avoid clashing with
2590 index.html on case-insensitive systems.
2592 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2595 * trans-expr.c (gfc_conv_function_call): Force evaluation of
2598 2008-02-10 Daniel Franke <franke.daniel@gmail.com>
2601 * lang.opt: Allow '-J<dir>' next to '-J <dir>',
2602 likewise '-I <dir>' and '-I<dir>'.
2604 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2607 * Make-lang.in (f951): Add $(GMPLIBS).
2609 2008-02-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2612 * trans-common.c (build_field): Mark fields as volatile when needed.
2614 2008-02-05 Tobias Burnus <burnus@net-b.de>
2617 * data.c (gfc_assign_data_value): Only free "size" if
2618 it has not already been freed.
2620 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
2623 * array.c (match_array_element_spec): Remove check for negative
2625 (gfc_resolve_array_spec): Add check for negative size.
2627 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
2630 * data.c (gfc_assign_data_value): Add bounds check for array
2633 2008-02-04 Daniel Franke <franke.daniel@gmail.com>
2635 * resolve.c (resolve_where): Fix typo.
2636 (gfc_resolve_where_code_in_forall): Likewise.
2638 2008-02-03 Paul Thomas <pault@gcc.gnu.org>
2641 * resolve.c (resolve_allocate_deallocate): New function.
2642 (resolve_code): Call it for allocate and deallocate.
2643 * match.c (gfc_match_allocate, gfc_match_deallocate) : Remove
2644 the checking of the STAT tag and put in above new function.
2645 * primary,c (match_variable): Do not fix flavor of host
2646 associated symbols yet if the type is not known.
2648 2008-01-31 Paul Thomas <pault@gcc.gnu.org>
2651 * expr.c (gfc_check_assign): It is an error to assign
2652 to a sibling procedure.
2654 2008-01-30 Paul Thomas <pault@gcc.gnu.org>
2657 * symbol.c (gfc_delete_symtree, gfc_undo_symbols): Rename
2658 delete_symtree to gfc_delete_symtree.
2659 * gfortran.h : Add prototype for gfc_delete_symtree.
2660 * module.c (load_generic_interfaces): Transfer symbol to a
2661 unique symtree and delete old symtree, instead of renaming.
2662 (read_module): The rsym and the found symbol are the same, so
2663 the found symtree can be deleted.
2666 * decl.c (match_char_spec): Remove the constraint on deferred
2667 matching of functions and free the length expression.
2668 delete_symtree to gfc_delete_symtree.
2669 (gfc_match_type_spec): Whitespace.
2670 (gfc_match_function_decl): Defer characteristic association for
2671 all types except BT_UNKNOWN.
2672 * parse.c (decode_specification_statement): Only derived type
2673 function matching is delayed to the end of specification.
2675 2008-01-28 Tobias Burnus <burnus@net-b.de>
2678 * simplify.c (gfc_simplify_shape): Simplify rank zero arrays.
2680 2008-01-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2683 * array.c (gfc_check_constructor_type): Revert clearing the expression.
2685 2008-01-26 Tobias Burnus <burnus@net-b.de>
2688 * trans-expr.c (gfc_conv_function_call): Don't call
2689 gfc_add_interface_mapping if the expression is NULL.
2691 2008-01-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2694 * trans-array.c (gfc_trans_create_temp_array): Remove call to
2695 gcc_assert (integer_zerop (loop->from[n])).
2697 2008-01-25 Daniel Franke <franke.daniel@gmail.com>
2700 * resolve.c (resolve_where): Added check if user-defined assignment
2701 operator is an elemental subroutine.
2702 (gfc_resolve_where_code_in_forall): Likewise.
2704 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
2708 * gfortran.h: Revert changes from 2008-01-17.
2709 * match.c: Likewise.
2710 * symbol.c: Likewise.
2711 (gfc_undo_symbols): Undo namespace changes related to common blocks.
2713 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
2716 * data.c (formalize_structure_cons): Skip formalization on
2719 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
2721 * gfortran.texi (OpenMP): Extended existing documentation.
2722 (contributors): Added major contributors of 2008 that were
2724 (proposed extensions): Removed implemented items.
2726 2008-01-24 Paul Thomas <pault@gcc.gnu.org>
2729 * parse.c (next_statement) : If ST_GET_FCN_CHARACTERISTICS is
2730 seen, check for a statement label and, if present, delete it
2731 and set the locus to the start of the statement.
2733 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
2736 * trans-io.c (gfc_trans_transfer): If the array reference in a
2737 read has a vector subscript, use gfc_conv_subref_array_arg to
2738 copy back the temporary.
2740 2008-01-22 Tobias Burnus <burnus@net-b.de>
2743 * interface.c (compare_actual_formal): Fix adding type
2744 to missing_arg_type for absent optional arguments.
2746 2008-01-22 Tobias Burnus <burnus@net-b.de>
2749 * parse.c (parse_spec): Change = into ==.
2751 2008-01-22 Daniel Franke <franke.daniel@gmail.com>
2754 * expr.c (check_elemental): Fix check for valid data types.
2756 2008-01-22 Tobias Burnus <burnus@net-b.de>
2759 * scanner.c (load_line): Support <tab><digit> continuation lines.
2760 * invoke.texi (-Wtabs): Document this.
2762 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
2765 * module.c (read_module): Set use_rename attribute.
2767 2007-01-21 Tobias Burnus <burnus@net-b.de>
2770 * interface.c (compare_parameter): Improved error message
2771 for arguments of same type and mismatched kinds.
2773 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
2776 * resolve.c (resolve_entries): Do not do an array bounds check
2777 if the result symbols are the same.
2780 * module.c (read_module) : Hide the symtree of the previous
2781 version of the symbol if this symbol is renamed.
2783 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
2786 * array.c (gfc_check_constructor_type): Clear the expression ts
2787 so that the checking starts from the deepest level of array
2789 * primary.c (match_varspec): If an unknown type is changed to
2790 default character and the attempt to match a substring fails,
2791 change it back to unknown.
2794 * trans-array.c (gfc_add_loop_ss_code) : If ss->string_length is
2795 NULL for an array constructor, use the cl.length expression to
2797 (gfc_conv_array_parameter): Change call to gfc_evaluate_now to
2800 2008-01-19 Thomas Koenig <tkoenig@gcc.gnu.org>
2804 * iresolve.c (gfc_resolve_all): Remove conversion of mask
2805 argument to kind=1 by removing call to resolve_mask_arg().
2806 (gfc_resolve_any): Likewise.
2808 2008-01-19 Tobias Burnus <burnus@net-b.de>
2811 * primary.c (match_variable): Handle FL_UNKNOWN without
2812 uneducated guessing.
2813 (match_variable): Improve error message.
2815 2008-01-18 Tobias Burnus <burnus@net-b.de>
2818 * interface.c (get_expr_storage_size): Return storage size
2819 for array element designators.
2820 (compare_actual_formal): Reject unequal string sizes for
2821 assumed-shape dummy arguments. And fix error message for
2822 array-sections with vector subscripts.
2824 2008-01-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2827 * simplify.c (is_constant_array_expr): New static function that returns
2828 true if the given expression is an array and is constant.
2829 (gfc_simplify_reshape): Use new function.
2831 2008-01-17 H.J. Lu <hongjiu.lu@intel.com>
2834 * symbol.c (free_common_tree): Renamed to ...
2835 (gfc_free_common_tree): This. Remove static.
2836 (gfc_free_namespace): Updated.
2838 * gfortran.h (gfc_free_common_tree): New.
2840 * match.c (gfc_match_common): Call gfc_free_common_tree () with
2841 gfc_current_ns->common_root and set gfc_current_ns->common_root
2842 to NULL on syntax error.
2844 2008-01-18 Richard Sandiford <rsandifo@nildram.co.uk>
2847 * trans-expr.c (gfc_conv_function_call): Use proper
2848 type for returned character pointers.
2850 2008-01-17 Paul Thomas <pault@gcc.gnu.org>
2855 * decl.c : Remove gfc_function_kind_locus and
2856 gfc_function_type_locus. Add gfc_matching_function.
2857 (match_char_length): If matching a function and the length
2858 does not match, return MATCH_YES and try again later.
2859 (gfc_match_kind_spec): The same.
2860 (match_char_kind): The same.
2861 (gfc_match_type_spec): The same for numeric and derived types.
2862 (match_prefix): Rename as gfc_match_prefix.
2863 (gfc_match_function_decl): Except for function valued character
2864 lengths, defer applying kind, type and charlen info until the
2865 end of specification block.
2866 gfortran.h (gfc_statement): Add ST_GET_FCN_CHARACTERISTICS.
2867 parse.c (decode_specification_statement): New function.
2868 (decode_statement): Call it when a function has kind = -1. Set
2869 and reset gfc_matching function, as function statement is being
2871 (match_deferred_characteristics): Simplify with a single call
2872 to gfc_match_prefix. Do appropriate error handling. In any
2873 case, make sure that kind = -1 is reset or corrected.
2874 (parse_spec): Call above on seeing ST_GET_FCN_CHARACTERISTICS.
2875 Throw an error if kind = -1 after last specification statement.
2876 parse.h : Prototype for gfc_match_prefix.
2878 2008-01-16 Tobias Burnus <burnus@net-b.de>
2881 * interface.c (compare_parameter): Allow AS_DEFERRED array
2882 elements and reject attr.pointer array elemenents.
2883 (get_expr_storage_size): Return storage size of elements of
2884 assumed-shape and pointer arrays.
2886 2008-01-15 Sebastian Pop <sebastian.pop@amd.com>
2888 * f95-lang.c (gfc_init_builtin_functions): Initialize GOMP builtins
2889 for flag_tree_parallelize_loops.
2891 2008-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
2894 * iresolve.c (gfc_resolve_all): Call resolve_mask_arg.
2895 (gfc_resolve_any): Likewise.
2896 (gfc_resolve_count): Likewise. Don't append kind of
2897 argument to function name.
2899 2008-01-13 Tobias Burnus <burnus@net-b.de>
2902 * resolve.c (resolve_actual_arglist): For expressions,
2903 also check for assume-sized arrays.
2904 * interface.c (compare_parameter): Move F2003 character checks
2905 here, print error messages here, reject elements of
2906 assumed-shape array as argument to dummy arrays.
2907 (compare_actual_formal): Update for the changes above.
2909 2008-01-13 Tobias Burnus <burnus@net-b.de>
2912 * decl.c (contained_procedure): Only check directly preceeding state.
2914 2008-01-13 Tobias Burnus <burnus@net-b.de>
2917 * check.c (gfc_check_shape): Accept array ranges of
2918 assumed-size arrays.
2920 2008-01-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2923 * match.c (gfc_match_name): Don't error if leading character is a '(',
2924 just return MATCH_NO.
2926 2008-01-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2929 * trans-io.c (create_dummy_iostat): Commit the symbol.
2931 2008-01-11 Paul Thomas <pault@gcc.gnu.org>
2934 * simplify.c (gfc_simplify_transfer): Return NULL if the size
2935 of the element is unavailable and only assign character length
2936 to the result, if 'mold' is constant.
2938 2008-01-10 Paul Thomas <pault@gcc.gnu.org>
2941 * trans-array.c (gfc_trans_array_ctor_element): Use gfc_trans_string_copy
2942 to assign strings and perform bounds checks on the string length.
2943 (get_array_ctor_strlen): Remove bounds checking.
2944 (gfc_trans_array_constructor): Initialize string length checking.
2945 * trans-array.h : Add prototype for gfc_trans_string_copy.
2947 2008-01-08 Richard Guenther <rguenther@suse.de>
2950 PR tree-optimization/34683
2951 * trans-types.c (gfc_get_array_type_bounds): Use an array type
2952 with known size for accesses if that is known.
2954 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
2957 * expr.c (find_array_element): Check that the array bounds are
2958 constant before using them. Use lower, as well as upper bound.
2959 (check_restricted): Allow implied index variable.
2961 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
2964 * trans_array.c (gfc_trans_deferred_array): Do not null the
2965 data pointer on entering scope, nor deallocate it on leaving
2966 scope, if the symbol has the 'save' attribute.
2969 * trans_decl.c (gfc_finish_var_decl): Derived types with
2970 allocatable components and an initializer must be TREE_STATIC.
2972 2008-01-07 Paul Thomas <pault@gcc.gnu.org>
2975 * module.c (write_generic): Rewrite completely.
2976 (write_module): Change call to write_generic.
2978 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2981 * scanner.c (load_line): Do not count ' ' as printable when checking for
2984 2008-01-06 Paul Thomas <pault@gcc.gnu.org>
2987 * module.c (load_needed): If the namespace has no proc_name
2988 give it the module symbol.
2990 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2993 * trans-expr.c (gfc_conv_missing_dummy): Use a temporary to type convert
2994 the dummy variable expression, test for NULL, and pass the variable
2995 address to the called function.
2997 2007-01-06 Tobias Burnus <burnus@net-b.de>
3000 * match.c (gfc_match_common): Remove blank common in
3002 * resolve.c (resolve_common_vars): New function.
3003 (resolve_common_blocks): Move checks to resolve_common_vars
3004 and invoke that function.
3005 (resolve_types): Call resolve_common_vars for blank commons.
3007 2008-01-06 Tobias Burnus <burnus@net-b.de>
3010 * resolve.c (resolve_equivalence_derived): Reject derived types with
3011 default initialization if equivalenced with COMMON variable.
3013 2008-01-06 Tobias Burnus <burnus@net-b.de>
3016 * io.c (check_io_constraints): Disallow unformatted I/O for
3019 2008-01-06 Tobias Burnus <burnus@net-b.de>
3022 * resolve.c (resolve_formal_arglist): Reject dummy procedure in
3023 ELEMENTAL functions.
3025 2008-01-06 Tobias Burnus <burnus@net-b.de>
3028 * interface.c (compare_actual_formal): Reject parameter
3029 actual to intent(out) dummy.
3031 2008-01-04 Tobias Burnus <burnus@net-b.de>
3034 * primary.c (match_varspec): Gobble whitespace before