1 2008-08-25 Daniel Kraft <d@domob.eu>
3 * gfortran.h (gfc_find_component): Add new arguments.
4 * parse.c (parse_derived_contains): Check if the derived-type containing
5 the CONTAINS section is SEQUENCE/BIND(C).
6 * resolve.c (resolve_typebound_procedure): Check for name collision with
8 (resolve_fl_derived): Check for name collision with inherited
10 * symbol.c (gfc_find_component): New arguments `noaccess' and `silent'.
11 (gfc_add_component): Adapt for new arguments.
12 * primary.c (match_varspec), (gfc_match_structure_constructor): Ditto.
14 2008-08-24 Tobias Burnus <burnus@net-b.de>
17 * decl.c (verify_bind_c_sym): Reject array/string returning
20 2008-08-24 Tobias Burnus <burnus@net-b.de>
23 * trans-expr.c (gfc_conv_function_call): Add string_length
24 for character-returning bind(C) functions.
26 2008-08-24 Daniel Kraft <d@domob.eu>
28 * gfortran.h (gfc_typebound_proc): New struct.
29 (gfc_symtree): New member typebound.
30 (gfc_find_typebound_proc): Prototype for new method.
31 (gfc_get_derived_super_type): Prototype for new method.
32 * parse.h (gfc_compile_state): New state COMP_DERIVED_CONTAINS.
33 * decl.c (gfc_match_procedure): Handle PROCEDURE inside derived-type
35 (gfc_match_end): Handle new context COMP_DERIVED_CONTAINS.
36 (gfc_match_private): Ditto.
37 (match_binding_attributes), (match_procedure_in_type): New methods.
38 (gfc_match_final_decl): Rewrote to make use of new
39 COMP_DERIVED_CONTAINS parser state.
40 * parse.c (typebound_default_access): New global helper variable.
41 (set_typebound_default_access): New callback method.
42 (parse_derived_contains): New method.
43 (parse_derived): Extracted handling of CONTAINS to new parser state
44 and parse_derived_contains.
45 * resolve.c (resolve_bindings_derived), (resolve_bindings_result): New.
46 (check_typebound_override), (resolve_typebound_procedure): New methods.
47 (resolve_typebound_procedures): New method.
48 (resolve_fl_derived): Call new resolving method for typebound procs.
49 * symbol.c (gfc_new_symtree): Initialize new member typebound to NULL.
50 (gfc_find_typebound_proc): New method.
51 (gfc_get_derived_super_type): New method.
53 2008-08-23 Janus Weil <janus@gcc.gnu.org>
55 * gfortran.h (gfc_component): Add field "symbol_attribute attr", remove
56 fields "pointer", "allocatable", "dimension", "access".
57 Remove functions "gfc_set_component_attr" and "gfc_get_component_attr".
58 * interface.c (gfc_compare_derived_types): Ditto.
59 * trans-array.c (gfc_array_allocate,structure_alloc_comps): Ditto.
60 * trans-expr.c (gfc_conv_component_ref,gfc_trans_subcomponent_assign,
61 gfc_conv_structure): Ditto.
62 * symbol.c (gfc_find_component,free_components,gfc_set_component_attr,
63 gfc_get_component_attr,verify_bind_c_derived_type,
64 generate_isocbinding_symbol): Ditto.
65 * decl.c (build_struct): Ditto.
66 * dump-parse-tree.c (show_components): Ditto.
67 * trans-stmt.c (gfc_trans_deallocate): Ditto.
68 * expr.c (gfc_check_assign,gfc_check_pointer_assign,
69 gfc_default_initializer): Ditto.
70 * module.c (mio_component): Ditto.
71 * trans-types.c (copy_dt_decls_ifequal,gfc_get_derived_type): Ditto.
72 * resolve.c (has_default_initializer,resolve_structure_cons,
73 gfc_iso_c_func_interface,find_array_spec,resolve_ref,
74 resolve_deallocate_expr,resolve_allocate_expr,resolve_fl_derived,
75 resolve_equivalence_derived): Ditto.
76 * trans-io.c (transfer_expr): Ditto.
77 * parse.c (parse_derived): Ditto.
78 * dependency.c (gfc_check_dependency): Ditto.
79 * primary.c (gfc_variable_attr): Ditto.
81 2008-08-23 Tobias Burnus <burnus@net-b.de>
84 * arith.c (gfc_arith_concat): Fix concat of kind=4 strings.
86 2008-08-23 Tobias Burnus <burnus@net-b.de>
89 * target-memory.c (gfc_interpret_character): Support
92 2008-08-22 Daniel Kraft <d@domob.eu>
95 * symbol.c (gfc_add_type): Warn on -Wsurprising if a function-result
96 type is re-declared but neither -pedantic nor -std=f* is given and so
98 * invoke.texi (-Wsurprising): Document this new behaviour.
100 2008-08-22 Daniel Kraft <d@domob.eu>
102 * gfortran.h (in_prefix): Removed from this header.
103 * match.h (gfc_matching_prefix): Moved and renamed from `in_prefix'.
104 * decl.c (in_prefix): Removed from here.
105 (gfc_match_prefix): Use new name of `gfc_matching_prefix'.
106 * symbol.c (gfc_check_symbol_typed): Ditto.
107 * expr.c (check_typed_ns): New helper variable.
108 (expr_check_typed_help): New helper method.
109 (gfc_expr_check_typed): Rewrote to use gfc_traverse_expr to do the
110 work, fixing a minor problem.
111 * match.c (gfc_matching_prefix): New variable.
113 2008-08-22 Daniel Kraft <d@domob.eu>
117 * gfortran.h (in_prefix): New global.
118 (gfc_check_symbol_typed), (gfc_check_expr_typed): New methods.
119 * array.c (match_array_element_spec): Check that bounds-expressions
120 don't have symbols not-yet-typed in them.
121 * decl.c (var_element): Check that variable used is already typed.
122 (char_len_param_value): Check that expression does not contain
123 not-yet-typed symbols.
124 (in_prefix): New global.
125 (gfc_match_prefix): Record using `in_prefix' if we're at the moment
126 parsing a prefix or not.
127 * expr.c (gfc_expr_check_typed): New method.
128 * parse.c (verify_st_order): New argument to disable error output.
129 (check_function_result_typed): New helper method.
130 (parse_spec): Check that the function-result declaration, if given in
131 a prefix, contains no not-yet-typed symbols when the IMPLICIT rules are
133 * symbol.c (gfc_check_symbol_typed): Check that a symbol already has
134 a type associated to it, otherwise use the IMPLICIT rules or signal
137 2008-08-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
139 * f95-lang.c: Update all calls to pedwarn.
141 2008-08-18 Daniel Franke <franke.daniel@gmail.com>
144 * gfortran.texi: Document decision on include file handling in
147 2008-08-16 Tobias Burnus <burnus@net-b.de>
150 * libgfortran.h: Reduce GFC_MAX_DIMENSIONS to 7.
152 2008-08-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
155 * io.c (gfc_match_open): Enable UTF-8 in checks.
156 * simplify.c (gfc_simplify_selected_char_kind): Enable iso_10646.
158 2008-08-14 Janus Weil <janus@gcc.gnu.org>
161 * symbol.c (check_conflict): Move conflict checks for (procedure,save)
162 and (procedure,intent) to resolve_fl_procedure.
163 * resolve.c (resolve_fl_procedure): Ditto.
165 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
168 * f95-lang.c (gfc_mark_addressable): Use "pedwarn (0," instead of
171 2008-08-09 Paul Thomas <pault@gcc.gnu.org>
174 * symbol.c (gfc_add_extension): New function.
175 * decl.c (gfc_get_type_attr_spec): Call it.
176 (gfc_match_derived_decl): Set symbol extension attribute from
178 * gfortran.h : Add prototype for gfc_add_extension.
180 2008-08-08 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
183 * options.c (set_Wall): Replace set_Wunused by warn_unused.
185 2008-08-08 Daniel Kraft <d@domob.eu>
187 * gfortran.h (gfc_finalizer): Replaced member `procedure' by two
188 new members `proc_sym' and `proc_tree' to store the symtree after
190 (gfc_find_sym_in_symtree): Made public.
191 * decl.c (gfc_match_final_decl): Adapted for new member name.
192 * interface.c (gfc_find_sym_in_symtree): Made public.
193 (gfc_extend_expr), (gfc_extend_assign): Changed call accordingly.
194 * module.c (mio_finalizer), (mio_f2k_derived), (mio_full_f2k_derived):
195 New methods for module-file IO of f2k_derived.
196 (mio_symbol): Do IO of f2k_derived namespace.
197 * resolve.c (gfc_resolve_finalizers): Adapted for new member name and
198 finding the symtree for the symbol here.
199 * symbol.c (gfc_free_finalizer): Adapted for new members.
201 2008-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
203 * gfc-internals.texi: Update to GFDL 1.2. Do not list GPL as
205 * gfortran.texi: Likewise.
206 * intrinsic.texi: Do not list GPL as Invariant Section.
207 * invoke.texi: Likewise. Update copyright years.
209 2008-07-29 Paul Thomas <pault@gcc.gnu.org>
211 * trans-expr.c (conv_parent_component_references): New function
212 to build missing parent references.
213 (gfc_conv_variable): Call it
214 * symbol.c (gfc_add_component): Check that component name in a
215 derived type extension does not appear in parent.
216 (gfc_find_component): For a derived type extension, check if
217 the component appears in the parent derived type by calling
218 self. Separate errors for private components and private types.
219 * decl.c (match_data_constant): Add extra arg to call to
220 gfc_match_structure_constructor.
221 (check_extended_derived_type): New function to check that a
222 parent derived type exists and that it is OK for exension.
223 (gfc_get_type_attr_spec): Add extra argument 'name' and return
224 it if extends is specified.
225 (gfc_match_derived_decl): Match derived type extension and
226 build a first component of the parent derived type if OK. Add
227 the f2k namespace if not present.
228 * gfortran.h : Add the extension attribute.
229 * module.c : Handle attribute 'extension'.
230 * match.h : Modify prototypes for gfc_get_type_attr_spec and
231 gfc_match_structure_constructor.
232 * primary.c (build_actual_constructor): New function extracted
233 from gfc_match_structure_constructor and modified to call self
234 iteratively to build derived type extensions, when f2k named
236 (gfc_match_structure_constructor): Do not throw error for too
237 many components if a parent type is being handled. Use
238 gfc_find_component to generate errors for non-existent or
239 private components. Iteratively call self for derived type
240 extensions so that parent constructor is built. If extension
241 and components left over, throw error.
242 (gfc_match_rvalue): Add extra arg to call to
243 gfc_match_structure_constructor.
245 * trans-array.c (gfc_conv_resolve_dependencies): If lhs and rhs
246 are the same symbol, aliassing does not matter.
248 2008-07-29 Jan Hubicka <jh@suse.cz>
250 * options.c (gfc_post_options): Do not set flag_no_inline.
252 2008-07-29 Daniel Kraft <d@domob.eu>
255 * trans-intrinsic.c (conv_generic_with_optional_char_arg): New method
256 to append a string-length even if the string argument is missing, e.g.
258 (gfc_conv_intrinsic_function): Call the new method for EOSHIFT, PACK
261 2008-07-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
263 * gfortran.h (try): Remove macro. Replace try with gfc_try
274 * interface.c: Likewise.
275 * intrinsic.c: Likewise.
276 * intrinsic.h: Likewise.
281 * resolve.c: Likewise.
282 * scanner.c: Likewise.
283 * simplify.c: Likewise.
284 * symbol.c: Likewise.
285 * trans-openmp.c: Likewise.
286 * trans-types.c: Likewise.
288 2008-07-28 Tobias Burnus <burnus@net-b.de>
290 * Make-lang.in: Remove -Wno-* from fortran-warn.
292 2008-07-28 Richard Guenther <rguenther@suse.de>
294 Merge from gimple-tuples-branch.
296 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
298 * trans-expr.c: Include gimple.h instead of tree-gimple.h.
299 * trans-array.c: Same.
300 * trans-openmp.c: Same.
301 * trans-stmt.c: Same.
304 * trans-decl.c: Same.
305 * trans-intrinsic.c: Same.
306 * trans.c: Same. Include tree-iterator.h.
307 * Make-lang.in (trans.o): Depend on tree-iterator.h
309 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
311 * trans-array.h (gfc_conv_descriptor_data_set_internal):
312 Rename to gfc_conv_descriptor_data_set.
313 (gfc_conv_descriptor_data_set_tuples): Remove.
314 * trans-array.c (gfc_conv_descriptor_data_get): Rename
315 from gfc_conv_descriptor_data_set_internal.
316 Remove last argument to gfc_add_modify.
317 (gfc_trans_allocate_array_storage): Rename gfc_add_modify_expr to
319 (gfc_trans_create_temp_array): Same.
320 (gfc_conv_array_transpose): Same.
321 (gfc_grow_array): Same.
322 (gfc_put_offset_into_var): Same.
323 (gfc_trans_array_ctor_element): Same.
324 (gfc_trans_array_constructor_subarray): Same.
325 (gfc_trans_array_constructor_value): Same.
326 (gfc_trans_scalarized_loop_end): Same.
327 (gfc_array_init_size): Same.
328 (gfc_array_allocate): Same.
329 (gfc_trans_array_bounds): Same.
330 (gfc_trans_auto_array_allocation): Same.
331 (gfc_trans_g77_array): Same.
332 (gfc_trans_dummy_array_bias): Same.
333 (gfc_conv_expr_descriptor): Same.
334 (structure_alloc_comps): Same.
335 * trans-expr.c: Same.
336 * trans-openmp.c (gfc_omp_clause_default_ctor): Same.
337 Rename gfc_conv_descriptor_data_set_tuples to
338 gfc_conv_descriptor_data_set.
339 (gfc_omp_clause_copy_ctor): Change build_gimple_modify_stmt to
341 (gfc_omp_clause_assign_op): Same.
342 (gfc_trans_omp_array_reduction): Rename gfc_add_modify_expr to
344 (gfc_trans_omp_atomic): Same.
345 (gfc_trans_omp_do): Same. Change GIMPLE_MODIFY_STMT to MODIFY_EXPR.
346 Rename gfc_add_modify_stmt to gfc_add_modify.
347 * trans-stmt.c: Rename gfc_add_modify_expr to
349 * trans.c: Rename gfc_add_modify_expr to
351 (gfc_add_modify): Remove last argument.
352 Rename GIMPLE_MODIFY_STMT to MODIFY_EXPR.
353 * trans.h: Remove gfc_add_modify_expr, gfc_add_modify_stmt.
354 Add prototype for gfc_add_modify.
355 * f95-lang.c (union lang_tree_node): Rename GENERIC_NEXT to TREE_CHAIN.
356 * trans-decl.c: Rename gfc_add_modify_stmt to gfc_add_modify.
358 * trans-intrinsic.c: Same.
360 2008-02-25 Aldy Hernandez <aldyh@redhat.com>
362 * Make-lang.in (fortran-warn): Add -Wno-format.
364 2008-02-19 Diego Novillo <dnovillo@google.com>
366 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
368 * fortran/Make-lang.in (fortran-warn): Remove.
370 2007-11-22 Aldy Hernandez <aldyh@redhat.com>
372 * trans-expr.c (gfc_trans_string_copy): Use "void *" when building a
375 2007-11-10 Aldy Hernandez <aldyh@redhat.com>
377 * Make-lang.in (fortran-warn): Set to -Wno-format.
378 * trans.c (gfc_trans_code): Update comment to say GENERIC.
379 Call tree_annotate_all_with_locus instead of annotate_all_with_locus.
381 2008-07-27 Tobias Burnus <burnus@net-b.de>
386 * trans.c (gfc_trans_runtime_check): Allow run-time warning besides
388 * trans.h (gfc_trans_runtime_check): Update declaration.
389 * trans-array.c (gfc_trans_array_ctor_element,gfc_trans_array_bound_check,
390 gfc_conv_array_ref,gfc_conv_ss_startstride,gfc_trans_dummy_array_bias):
391 Updated gfc_trans_runtime_check calls.
392 (gfc_conv_array_parameter): Implement flag_check_array_temporaries,
393 fix packing/unpacking for nonpresent optional actuals to optional
395 * trans-array.h (gfc_conv_array_parameter): Update declaration.
396 * trans-expr.c (gfc_conv_substring,gfc_trans_arrayfunc_assign,
397 gfc_conv_function_call): Updated gfc_trans_runtime_check calls.
398 (gfc_conv_function_call): Update gfc_conv_array_parameter calls.
399 * trans-expr.c (gfc_trans_goto): Updated gfc_trans_runtime_check
401 * trans-io.c (set_string,gfc_conv_intrinsic_repeat): Ditto.
402 (gfc_conv_intrinsic_transfer,gfc_conv_intrinsic_loc): Same for
403 gfc_conv_array_parameter.
404 * trans-intrinsics.c (gfc_conv_intrinsic_bound): Ditto.
405 * trans-decl.c (gfc_build_builtin_function_decls): Add
406 gfor_fndecl_runtime_warning_at.
407 * lang.opt: New option fcheck-array-temporaries.
408 * gfortran.h (gfc_options): New flag_check_array_temporaries.
409 * options.c (gfc_init_options, gfc_handle_option): Handle flag.
410 * invoke.texi: New option fcheck-array-temporaries.
412 2008-07-24 Jan Hubicka <jh@suse.cz>
414 * fortran/options.c (gfc_post_options): Remove flag_unline_trees code.
416 2008-07-24 Daniel Kraft <d@domob.eu>
419 * lang.opt (Wnonstd-intrinsics): Removed option.
420 (Wintrinsics-std), (Wintrinsic-shadow): New options.
421 * invoke.texi (Option Summary): Removed -Wnonstd-intrinsics
422 from the list and added -Wintrinsics-std and -Wintrinsic-shadow.
423 (Error and Warning Options): Documented the new options and removed
424 the documentation for -Wnonstd-intrinsics.
425 * gfortran.h (gfc_option_t): New members warn_intrinsic_shadow and
426 warn_intrinsics_std, removed warn_nonstd_intrinsics.
427 (gfc_is_intrinsic): Renamed from gfc_intrinsic_name.
428 (gfc_warn_intrinsic_shadow), (gfc_check_intrinsic_standard): New.
429 * decl.c (match_procedure_decl): Replaced gfc_intrinsic_name by
430 the new name gfc_is_intrinsic.
431 (warn_intrinsic_shadow): New helper method.
432 (gfc_match_function_decl), (gfc_match_subroutine): Call the new method
433 warn_intrinsic_shadow to check the just-parsed procedure.
434 * expr.c (check_init_expr): Call new gfc_is_intrinsic to check whether
435 the function called is really an intrinsic in the selected standard.
436 * intrinsic.c (gfc_is_intrinsic): Renamed from gfc_intrinsic_name and
437 extended to take into account the selected standard settings when trying
438 to find out whether a symbol is an intrinsic or not.
439 (gfc_check_intrinsic_standard): Made public and extended.
440 (gfc_intrinsic_func_interface), (gfc_intrinsic_sub_interface): Removed
441 the calls to check_intrinsic_standard, this check now happens inside
443 (gfc_warn_intrinsic_shadow): New method defined.
444 * options.c (gfc_init_options): Initialize new warning flags to false
445 and removed intialization of Wnonstd-intrinsics flag.
446 (gfc_post_options): Removed logic for Wnonstd-intrinsics flag.
447 (set_Wall): Set new warning flags and removed Wnonstd-intrinsics flag.
448 (gfc_handle_option): Handle the new flags and removed handling of the
449 old Wnonstd-intrinsics flag.
450 * primary.c (gfc_match_rvalue): Replaced call to gfc_intrinsic_name by
451 the new name gfc_is_intrinsic.
452 * resolve.c (resolve_actual_arglist): Ditto.
453 (resolve_generic_f), (resolve_unknown_f): Ditto.
454 (is_external_proc): Ditto.
455 (resolve_generic_s), (resolve_unknown_s): Ditto.
456 (resolve_symbol): Ditto and ensure for symbols declared INTRINSIC that
457 they are really available in the selected standard setting.
459 2008-07-24 Daniel Kraft <d@domob.eu>
461 * match.c (gfc_match): Add assertion to catch wrong calls trying to
462 match upper-case characters.
464 2008-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
467 * gfortran.h: Add "warn_array_temp" to gfc_option_t.
468 * lang.opt: Add -Warray-temporaries.
469 * invoke.texi: Document -Warray-temporaries
470 * trans-array.h (gfc_trans_create_temp_array): Add argument of
472 (gfc_conv_loop_setup): Likewise.
473 * trans-array.c (gfc_trans_create_temp_array): If
474 -Warray-temporaries is given and locus is present, warn about
475 creation of array temporaries.
476 (gfc_trans_array_constructor_subarray): Add locus to call
477 of gfc_conv_loop_setup.
478 (gfc_trans_array_constructor): Add where argument. Pass where
479 argument to call of gfc_trans_create_temp_array.
480 (gfc_add_loop_ss_code): Add where argument. Pass where argument
481 to recursive call of gfc_add_loop_ss_code and to call of
482 gfc_trans_array_constructor.
483 (gfc_conv_loop_setup): Add where argument. Pass where argument
484 to calls to gfc_add_loop_ss_code and to gfc_trans_create_temp_array.
485 (gfc_conv_expr_descriptor): Pass location to call of
487 (gfc_conv_array_parameter): If -Warray-temporaries is given,
488 warn about creation of temporary arrays.
489 * trans-expr.c (gfc_conv_subref_array_arg): Add where argument
490 to call to gfc_conv_loop_setup.
491 (gfc_conv_function_call): Add where argument to call to
492 gfc_trans_creat_temp_array.
493 (gfc_trans_subarray_assign): Likewise.
494 (gfc_trans_assignment_1): Add where argument to call to
496 * trans-stmt.c (gfc_conv_elemental_dependencies): Add where
497 argument to call to gfc_trans_create_temp_array.
498 (gfc_trans_call): Add where argument to call to gfc_conv_loop_setup.
499 (generate_loop_for_temp_to_lhs): Likewise.
500 (generate_loop_for_rhs_to_temp): Likewise.
501 (compute_inner_temp_size): Likewise.
502 (gfc_trans-pointer_assign_need_temp): Likewise.
503 (gfc_evaluate_where_mask): Likewise.
504 (gfc_trans_where_assign): Likewise.
505 (gfc_trans_where_3): Likewise.
506 * trans-io.c (transfer_srray_component): Add where argument
507 to function. Add where argument to call to gfc_conv_loop_setup.
508 (transfer_expr): Add where argument to call to
509 transfer_array_component.
510 (gfc_trans_transfer): Add where expression to call to
512 * trans-intrinsic.c (gfc_conv_intrinsic_anyall): Add
513 where argument to call to gfc_conv_loop_setup.
514 (gfc_conv_intrinsic_count): Likewise.
515 (gfc_conv_intrinsic_arith): Likewise.
516 (gfc_conv_intrinsic_dot_product): Likewise.
517 (gfc_conv_intrinsic_minmaxloc): Likewise.
518 (gfc_conv_intrinsic_minmaxval): Likewise.
519 (gfc_conv_intrinsic_array_transfer): Warn about
520 creation of temporary array.
521 Add where argument to call to gfc_trans_create_temp_array.
522 * options.c (gfc_init_options): Initialize gfc_option.warn_array_temp.
523 (gfc_handle_option): Set gfc_option.warn_array_temp.
525 2008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
528 * f95-lang.c (gfc_mark_addressable): All calls to pedwarn changed.
530 2008-07-22 Daniel Kraft <d@domob.eu>
533 * io.c (error_element), (format_locus): New static globals.
534 (unexpected_element): Spelled out this message fully.
535 (next_char): Keep track of locus when not MODE_STRING.
536 (next_char_not_space): Remember last parsed element in error_element.
537 (format_lex): Fix two indentation errors.
538 (check_format): Use format_locus and possibly error_element for a
539 slightly better error message on invalid format.
540 (check_format_string): Set format_locus to start of the string
541 expression used as format.
543 2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
545 * expr.c (gfc_check_pointer_assign): Fix typo in string.
546 * io.c (check_format): Fix typo in string. Fix comment typos.
547 * parse.c (gfc_global_used): Likewise.
548 * resolve.c (resolve_allocate_expr): Likewise.
549 * symbol.c (gfc_set_default_type): Likewise.
550 * arith.c: Fix typos in comments.
554 * dependency.c: Likewise.
555 * f95-lang.c: Likewise.
556 * gfortran.h: Likewise.
557 * matchexp.c: Likewise.
558 * module.c: Likewise.
559 * primary.c: Likewise.
560 * scanner.c: Likewise.
561 * trans-array.c: Likewise.
562 * trans-common.c: Likewise.
563 * trans-decl.c: Likewise.
564 * trans-expr.c: Likewise.
565 * trans-intrinsic.c: Likewise.
566 * trans-types.c: Likewise.
570 2008-07-19 Tobias Burnus <burnus@net-b.de>
573 * matchexp.c (gfc_get_parentheses): Remove obsolete workaround,
574 which caused the generation of wrong code.
576 2008-07-19 Tobias Burnus <burnus@net-b.de>
579 * scanner.c (load_file): Add argument to destinguish between
580 true filename and displayed filename.
581 (include_line,gfc_new_file): Adapt accordingly.
583 2008-07-19 Tobias Burnus <burnus@net-b.de>
585 * check.c (gfc_check_cshift,gfc_check_eoshift,gfc_check_unpack): Add rank
586 checks for cshift's shift and eoshift's shift and boundary args.
587 (gfc_check_unpack): Add rank and shape tests for unpack.
589 2008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
591 * gfortran.h (new): Remove macro.
592 * array.c (gfc_append_constructor, match_array_list,
593 gfc_match_array_constructor): Likewise.
594 * bbt.c (insert, gfc_insert_bbt): Likewise.
595 * decl.c (var_element, top_var_list, top_val_list, gfc_match_data,
596 get_proc_name): Likewise.
597 * expr.c (gfc_copy_actual_arglist): Likewise.
598 * interface.c (compare_actual_formal, check_new_interface,
599 gfc_add_interface): Likewise.
600 * intrinsic.c gfc_convert_type_warn, gfc_convert_chartype):
602 * io.c (match_io_iterator, match_io_list): Likewise.
603 * match.c (match_forall_header): Likewise.
604 * matchexp.c (build_node): Likewise.
605 * module.c (gfc_match_use): Likewise.
606 * scanner.c (load_file): Likewise.
607 * st.c (gfc_append_code): Likewise.
608 * symbol.c (save_symbol_data, gfc_get_sym_tree, gfc_undo_symbols,
609 gfc_commit_symbols): Likewise.
610 * trans-common.c (build_field): Likewise.
611 * trans-decl.c (gfc_finish_var_decl): Likewise.
612 * trans-expr.c (gfc_free_interface_mapping,
613 gfc_get_interface_mapping_charlen, gfc_add_interface_mapping,
614 gfc_finish_interface_mapping,
615 gfc_apply_interface_mapping_to_expr): Likewise.
616 * trans.h (gfc_interface_sym_mapping): Likewise.
618 2008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
620 * gfortran.h (operator): Remove macro.
621 (gfc_namespace, gfc_expr): Avoid C++ keywords.
622 * arith.c (eval_intrinsic, eval_intrinsic_f2, eval_intrinsic_f3):
624 * decl.c (access_attr_decl): Likewise.
625 * dependency.c (gfc_dep_compare_expr): Likewise.
626 * dump-parse-tree.c (show_expr, show_uop, show_namespace):
628 * expr.c (gfc_copy_expr, gfc_type_convert_binary,
629 simplify_intrinsic_op, check_intrinsic_op): Likewise.
630 * interface.c (fold_unary, gfc_match_generic_spec,
631 gfc_match_interface, gfc_match_end_interface,
632 check_operator_interface, check_uop_interfaces,
633 gfc_check_interfaces, gfc_extend_expr, gfc_extend_assign,
634 gfc_add_interface, gfc_current_interface_head,
635 gfc_set_current_interface_head): Likewise.
636 * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
638 * matchexp.c (gfc_get_parentheses, build_node): Likewise.
639 * module.c (gfc_use_rename, gfc_match_use, find_use_name_n,
640 number_use_names, mio_expr, load_operator_interfaces, read_module,
641 write_operator, write_module): Likewise.
642 * openmp.c (resolve_omp_atomic): Likewise.
643 * resolve.c (resolve_operator, gfc_resolve_character_operator,
644 gfc_resolve_uops): Likewise.
645 * symbol.c (free_uop_tree, gfc_free_namespace): Likewise.
646 * trans-expr.c (gfc_conv_expr_op): Likewise.
647 * trans-openmp.c (gfc_trans_omp_atomic): Likewise.
649 2008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
651 * gfortran.h (protected): Remove macro.
652 * dump-parse-tree.c (show_attr): Avoid C++ keywords.
653 * expr.c (gfc_check_pointer_assign): Likewise.
654 * interface.c (compare_parameter_protected): Likewise.
655 * intrinsic.c (enum class, add_sym, add_sym_0, add_sym_1,
656 add_sym_1s, add_sym_1m, add_sym_2, add_sym_2s, add_sym_3,
657 add_sym_3ml, add_sym_3red, add_sym_3s, add_sym_4, add_sym_4s,
658 add_sym_5s): Likewise.
659 * match.c (gfc_match_assignment, gfc_match_pointer_assignment):
661 * module.c (mio_symbol_attribute): Likewise.
662 * primary.c (match_variable): Likewise.
663 * resolve.c (resolve_equivalence): Likewise.
664 * symbol.c (check_conflict, gfc_add_protected, gfc_copy_attr):
666 * trans-types.c (gfc_get_array_type_bounds): Likewise.
668 2008-07-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
670 * arith.c (eval_type_intrinsic0): Avoid C++ keywords.
671 * gfortran.h (try, protected, operator, new): Likewise.
673 2008-07-17 Tobias Burnus <burnus@net-b.de>
677 * array.c (gfc_match_array_spec): Fix array-rank check.
678 * resolve.c (resolve_fl_derived): Fix constentness check
679 for the array dimensions.
681 2008-07-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
683 * Make-lang.in (gfortranspec.o): Fix dependencies.
685 2008-07-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
688 * io.c: Add error check for g0 edit descriptor followed by '.'.
690 2008-07-12 Daniel Kraft <d@domob.eu>
692 * resolve.c (resolve_fl_derived): Allow pointer components to empty
693 derived types fixing a missing part of PR fortran/33221.
695 2008-07-10 Daniel Kraft <d@domob.eu>
697 * gfc-internals.texi (section gfc_expr): Created documentation about
698 the gfc_expr internal data structure.
700 2008-07-07 Thomas Koenig <tkoenig@gcc.gnu.org>
703 * iresolve.c (gfc_resolve_product): Set shape of return
705 (gfc_resolve_sum): Likewise.
707 2008-07-07 Jakub Jelinek <jakub@redhat.com>
710 * f95-lang.c (poplevel): Don't ever add subblocks to
711 global_binding_level.
713 2008-07-02 Janus Weil <janus@gcc.gnu.org>
714 Tobias Burnus <burnus@net-b.de>
715 Paul Thomas <pault@gcc.gnu.org>
718 * gfortran.h (struct gfc_symbol): New member "proc_pointer".
719 * check.c (gfc_check_associated,gfc_check_null): Implement
721 * decl.c (match_procedure_decl): Ditto.
722 * expr.c (gfc_check_pointer_assign,gfc_check_assign_symbol): Ditto.
723 * interface.c (compare_actual_formal): Ditto.
725 * match.c (gfc_match_pointer_assignment): Ditto.
726 * parse.c (parse_interface): Ditto.
727 * primary.c (gfc_match_rvalue,match_variable): Ditto.
728 * resolve.c (resolve_fl_procedure): Ditto.
729 * symbol.c (check_conflict,gfc_add_external,gfc_add_pointer,
730 gfc_copy_attr,gen_fptr_param,build_formal_args): Ditto.
731 * trans-decl.c (get_proc_pointer_decl,gfc_get_extern_function_decl,
732 create_function_arglist): Ditto.
733 * trans-expr.c (gfc_conv_variable,gfc_conv_function_val,
734 gfc_conv_function_call,gfc_trans_pointer_assignment): Ditto.
736 2008-07-02 Thomas Koenig <tkoenig@gcc.gnu.org>
740 * iresolve.c (resolve_mask_arg): Don't convert mask to
741 kind=1 logical if it is of that type already.
743 2008-06-29 Thomas Koenig <tkoenig@gcc.gnu.org>
746 * iresolve.c (gfc_resolve_matmul): Copy shapes
749 2008-06-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
751 * invoke.texi: Add documentation for runtime behavior of
754 2008-06-28 Daniel Kraft <d@domob.eu>
756 * gfc-internals.texi (section gfc_code): Extended documentation about
757 gfc_code in the internal datastructures chapter including details about
758 how IF, DO and SELECT blocks look like and an example for how the
759 block-chaining works.
761 2008-06-25 Paul Thomas <pault@gcc.gnu.org>
764 * interface.c (check_intents): Correct error where the actual
765 arg was checked for a pointer argument, rather than the formal.
767 2008-06-24 Paul Thomas <pault@gcc.gnu.org>
770 * expr.c (gfc_check_assign): Change message and locus for
771 error when conform == 0.
773 2008-06-23 Jakub Jelinek <jakub@redhat.com>
776 * cpp.c (cpp_define_builtins): Change _OPENMP value to 200805.
778 2008-06-20 Laurynas Biveinis <laurynas.biveinis@gmail.com>
779 Tobias Burnus <burnus@net-b.de>
783 * scanner.c (preprocessor_line): do not call gfc_free for
784 current_file->filename if it differs from filename.
786 2008-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
788 * arith.c (hollerith2representation): Fix for -Wc++-compat.
789 * array.c (gfc_get_constructor): Likewise.
790 * decl.c (gfc_get_data_variable, gfc_get_data_value, gfc_get_data,
791 create_enum_history, gfc_match_final_decl): Likewise.
792 * error.c (error_char): Likewise.
793 * expr.c (gfc_get_expr, gfc_copy_expr): Likewise.
794 * gfortran.h (gfc_get_charlen, gfc_get_array_spec,
795 gfc_get_component, gfc_get_formal_arglist, gfc_get_actual_arglist,
796 gfc_get_namelist, gfc_get_omp_clauses, gfc_get_interface,
797 gfc_get_common_head, gfc_get_dt_list, gfc_get_array_ref,
798 gfc_get_ref, gfc_get_equiv, gfc_get_case, gfc_get_iterator,
799 gfc_get_alloc, gfc_get_wide_string): Likewise.
800 * interface.c (count_types_test): Likewise.
801 * intrinsic.c (add_char_conversions, gfc_intrinsic_init_1):
803 * io.c (gfc_match_open, gfc_match_close, match_filepos, match_io,
804 gfc_match_inquire, gfc_match_wait): Likewise.
805 * match.c (gfc_match, match_forall_iterator): Likewise.
806 * module.c (gfc_get_pointer_info, gfc_get_use_rename, add_fixup,
807 add_true_name, parse_string, write_atom, quote_string,
808 mio_symtree_ref, mio_gmp_real, write_common_0): Likewise.
809 * options.c (gfc_post_options): Likewise.
810 * primary.c (match_integer_constant, match_hollerith_constant,
811 match_boz_constant, match_real_constant,
812 gfc_get_structure_ctor_component, gfc_match_structure_constructor): Likewise.
813 * scanner.c (gfc_widechar_to_char, add_path_to_list,
814 add_file_change, load_line, get_file, preprocessor_line,
815 load_file, unescape_filename, gfc_read_orig_filename): Likewise.
816 * simplify.c (gfc_simplify_ibits, gfc_simplify_ishft,
817 gfc_simplify_ishftc): Likewise.
818 * symbol.c (gfc_get_st_label, gfc_get_namespace, gfc_new_symtree,
819 gfc_get_uop, gfc_new_symbol, save_symbol_data, gfc_get_gsymbol):
821 * target-memory.c (gfc_target_interpret_expr): Likewise.
822 * trans-const.c (gfc_build_wide_string_const): Likewise.
823 * trans-expr.c (gfc_add_interface_mapping): Likewise.
824 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
825 gfc_conv_intrinsic_int, gfc_conv_intrinsic_lib_function,
826 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_ctime,
827 gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam,
828 gfc_conv_intrinsic_minmax, gfc_conv_intrinsic_minmax_char,
829 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_index_scan_verify,
830 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_trim): Likewise.
831 * trans.c (gfc_get_backend_locus): Likewise.
832 * trans.h (gfc_get_ss): Likewise.
834 2008-06-18 Daniel Kraft <d@domob.eu>
836 PR fortran/36517, fortran/36492
837 * array.c (gfc_resolve_character_array_constructor): Call
838 gfc_set_constant_character_len with changed length-chec argument.
839 * decl.c (gfc_set_constant_character_len): Changed array argument to
840 be a generic length-checking argument that can be used for correct
841 checking with typespec and in special cases where the should-be length
842 is different from the target length.
843 (build_struct): Call gfc_set_constant_character_len with changed length
844 checking argument and introduced additional checks for exceptional
845 conditions on invalid code.
846 (add_init_expr_to_sym), (do_parm): Call gfc_set_constant_character_len
847 with changed argument.
848 * match.h (gfc_set_constant_character_len): Changed third argument to
849 int for the should-be length rather than bool.
851 2008-06-17 Daniel Kraft <d@domob.eu>
854 * array.c (gfc_resolve_character_array_constructor): Check that all
855 elements with constant character length have the same one rather than
856 fixing it if no typespec is given, emit an error if they don't. Changed
857 return type to "try" and return FAILURE for the case above.
858 (gfc_resolve_array_constructor): Removed unneeded call to
859 gfc_resolve_character_array_constructor in this function.
860 * gfortran.h (gfc_resolve_character_array_constructor): Returns try.
861 * trans-array.c (get_array_ctor_strlen): Return length of first element
862 rather than last element.
863 * resolve.c (gfc_resolve_expr): Handle FAILURE return from
864 gfc_resolve_character_array_constructor.
866 2008-06-17 Paul Thomas <pault@gcc.gnu.org>
869 * resolve.c (add_dt_to_dt_list): New function.
870 (resolve_fl_derived): Call new function for pointer components
871 and when derived type resolved.
873 2008-06-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
876 * trans-decl.c (gfc_generate_function_code): Add range_check to options
879 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
881 * gfc-internals.texi: Expand TABs, drop indentation outside examples.
882 * gfortran.texi: Likewise.
883 * intrinsic.texi: Likewise.
884 * invoke.texi: Likewise.
886 2008-06-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
889 * trans-io.c (gfc_build_io_library_fndecls): Build declaration for
890 transfer_character_wide which includes passing in the character kind to
891 support wide character IO. (transfer_expr): If the kind == 4, create the
892 argument and build the call.
893 * gfortran.texi: Fix typo.
895 2008-06-13 Tobias Burnus <burnus@net-b.de>
898 * decl.c (do_parm): Handle init expression for len=*.
900 2008-06-12 Tobias Burnus <burnus@net-b.de>
903 * trans-intrinsic.c (gfc_conv_intrinsic_index_scan_verify):
904 Fix passing of the BACK= argument.
906 2008-06-10 Jerry DeLisle <jvdelisle@gcc.gnu.org>
908 * cpp.c: Add copyright notice.
909 * cpp.h: Add copyright notice.
911 2008-06-08 Janus Weil <janus@gcc.gnu.org>
914 * decl.c (match_procedure_decl): Correctly recognize if the interface
915 is an intrinsic procedure.
917 2008-06-08 Tobias Burnus <burnus@net-b.de>
920 * resolve.c (resolve_symbol): Copy more attributes for
921 PROCEDUREs with interfaces.
923 2008-06-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
927 * io.c (check_format): Add new error message for zero width.
928 Use new error message for FMT_A and with READ, FMT_G. Allow
929 FMT_G with WRITE except when -std=F95 and -std=F2003.
931 2008-06-07 Tobias Burnus <burnus@net-b.de>
934 * intrinsic.c (add_functions): Implement c_sizeof.
935 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Do not
936 create unneeded variable in the scalar case.
937 * intrinsic.texi: Add C_SIZEOF documentation.
939 2008-06-06 Tobias Burnus <burnus@net-b.de>
941 * intrinsic.texi (BESSEL_J1): Fix BES(S)EL_J1 typo.
943 2008-06-06 Jakub Jelinek <jakub@redhat.com>
945 * scanner.c (skip_free_comments, skip_fixed_comments): Handle tabs.
946 * parse.c (next_free): Allow tab after !$omp.
947 (decode_omp_directive): Handle !$omp task, !$omp taskwait
949 (case_executable): Add ST_OMP_TASKWAIT.
950 (case_exec_markers): Add ST_OMP_TASK.
951 (gfc_ascii_statement): Handle ST_OMP_TASK, ST_OMP_END_TASK and
953 (parse_omp_structured_block, parse_executable): Handle ST_OMP_TASK.
954 * gfortran.h (gfc_find_sym_in_expr): New prototype.
955 (gfc_statement): Add ST_OMP_TASK, ST_OMP_END_TASK and ST_OMP_TASKWAIT.
956 (gfc_omp_clauses): Add OMP_SCHED_AUTO to sched_kind,
957 OMP_DEFAULT_FIRSTPRIVATE to default_sharing. Add collapse and
959 (gfc_exec_op): Add EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
960 * f95-lang.c (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
961 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP, LANG_HOOKS_OMP_CLAUSE_DTOR,
962 LANG_HOOKS_OMP_PRIVATE_OUTER_REF): Define.
963 * trans.h (gfc_omp_clause_default_ctor): Add another argument.
964 (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
965 gfc_omp_clause_dtor, gfc_omp_private_outer_ref): New prototypes.
966 * types.def (BT_ULONGLONG, BT_PTR_ULONGLONG,
967 BT_FN_BOOL_ULONGLONGPTR_ULONGLONGPTR,
968 BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULLPTR_ULLPTR,
969 BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULL_ULLPTR_ULLPTR,
970 BT_FN_VOID_PTR_PTR, BT_PTR_FN_VOID_PTR_PTR,
971 BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): New.
972 (BT_BOOL): Use integer type with BOOL_TYPE_SIZE rather
973 than boolean_type_node.
974 * dump-parse-tree.c (gfc_show_omp_node): Handle EXEC_OMP_TASK,
975 EXEC_OMP_TASKWAIT, OMP_SCHED_AUTO, OMP_DEFAULT_FIRSTPRIVATE,
976 untied and collapse clauses.
977 (gfc_show_code_node): Handle EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
978 * trans.c (gfc_trans_code): Handle EXEC_OMP_TASK and
980 * st.c (gfc_free_statement): Likewise.
981 * resolve.c (gfc_resolve_blocks, resolve_code): Likewise.
982 (find_sym_in_expr): Rename to...
983 (gfc_find_sym_in_expr): ... this. No longer static.
984 (resolve_allocate_expr, resolve_ordinary_assign): Adjust caller.
985 * match.h (gfc_match_omp_task, gfc_match_omp_taskwait): New
987 * openmp.c (resolve_omp_clauses): Allow allocatable arrays in
988 firstprivate, lastprivate, reduction, copyprivate and copyin
990 (omp_current_do_code): Made static.
991 (omp_current_do_collapse): New variable.
992 (gfc_resolve_omp_do_blocks): Compute omp_current_do_collapse,
993 clear omp_current_do_code and omp_current_do_collapse on return.
994 (gfc_resolve_do_iterator): Handle collapsed do loops.
995 (resolve_omp_do): Likewise, diagnose errorneous collapsed do loops.
996 (OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED): Define.
997 (gfc_match_omp_clauses): Handle default (firstprivate),
998 schedule (auto), untied and collapse (n) clauses.
999 (OMP_DO_CLAUSES): Add OMP_CLAUSE_COLLAPSE.
1000 (OMP_TASK_CLAUSES): Define.
1001 (gfc_match_omp_task, gfc_match_omp_taskwait): New functions.
1002 * trans-openmp.c (gfc_omp_private_outer_ref): New function.
1003 (gfc_omp_clause_default_ctor): Add outer argument. For allocatable
1004 arrays allocate them with the bounds of the outer var if outer
1006 (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
1007 gfc_omp_clause_dtor): New functions.
1008 (gfc_trans_omp_array_reduction): If decl is allocatable array,
1009 allocate it with outer var's bounds in OMP_CLAUSE_REDUCTION_INIT
1010 and deallocate it in OMP_CLAUSE_REDUCTION_MERGE.
1011 (gfc_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
1012 for assumed-size arrays.
1013 (gfc_trans_omp_do): Add par_clauses argument. If dovar is
1014 present in lastprivate clause and do loop isn't simple,
1015 set OMP_CLAUSE_LASTPRIVATE_STMT. If dovar is present in
1016 parallel's lastprivate clause, change it to shared and add
1017 lastprivate clause to OMP_FOR_CLAUSES. Handle collapsed do loops.
1018 (gfc_trans_omp_directive): Adjust gfc_trans_omp_do callers.
1019 (gfc_trans_omp_parallel_do): Likewise. Move collapse clause to
1020 OMP_FOR from OMP_PARALLEL.
1021 (gfc_trans_omp_clauses): Handle OMP_SCHED_AUTO,
1022 OMP_DEFAULT_FIRSTPRIVATE, untied and collapse clauses.
1023 (gfc_trans_omp_task, gfc_trans_omp_taskwait): New functions.
1024 (gfc_trans_omp_directive): Handle EXEC_OMP_TASK and
1027 2008-06-04 Janus Weil <janus@gcc.gnu.org>
1031 * resolve.c (resolve_symbol): Correctly copy the interface for a
1032 PROCEDURE declaration.
1034 2008-06-02 Janus Weil <janus@gcc.gnu.org>
1037 * symbol.c (gfc_add_allocatable,gfc_add_dimension,
1038 gfc_add_explicit_interface): Added checks.
1039 * decl.c (attr_decl1): Added missing "var_locus".
1040 * parse.c (parse_interface): Checking for errors.
1042 2008-06-02 Daniel Kraft <d@domob.eu>
1044 * gfortran.h: New statement-type ST_FINAL for FINAL declarations.
1045 (struct gfc_symbol): New member f2k_derived.
1046 (struct gfc_namespace): New member finalizers, for use in the above
1047 mentioned f2k_derived namespace.
1048 (struct gfc_finalizer): New type defined for finalizers linked list.
1049 * match.h (gfc_match_final_decl): New function header.
1050 * decl.c (gfc_match_derived_decl): Create f2k_derived namespace on
1051 constructed symbol node.
1052 (gfc_match_final_decl): New function to match a FINAL declaration line.
1053 * parse.c (decode_statement): match-call for keyword FINAL.
1054 (parse_derived): Parse CONTAINS section and accept FINAL statements.
1055 * resolve.c (gfc_resolve_finalizers): New function to resolve (that is
1056 in this case, check) a list of finalizer procedures.
1057 (resolve_fl_derived): Call gfc_resolve_finalizers here.
1058 * symbol.c (gfc_get_namespace): Initialize new finalizers to NULL.
1059 (gfc_free_namespace): Free finalizers list.
1060 (gfc_new_symbol): Initialize new f2k_derived to NULL.
1061 (gfc_free_symbol): Free f2k_derived namespace.
1062 (gfc_free_finalizer): New function to free a single gfc_finalizer node.
1063 (gfc_free_finalizer_list): New function to free a linked list of
1064 gfc_finalizer nodes.
1066 2008-06-02 Daniel Franke <franke.daniel@gmail.com>
1070 * cpp.c (gfc_cpp_init): Do not initialize builtins if
1071 processing already preprocessed input.
1072 (gfc_cpp_preprocess): Finalize output with newline.
1074 2008-05-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1076 * intrinsic.texi: Revert wrong commit.
1078 2008-05-31 Steven G. Kargl <kargls@comcast.net>
1080 * arith.c (gfc_arith_init_1): Remove now unused r and c variables.
1081 Cleanup numerical inquiry function initialization.
1082 (gfc_arith_done_1): Replace multiple mpfr_clear() invocations with
1083 a single mpfr_clears().
1084 (gfc_check_real_range): Re-arrange logic to eliminate multiple
1085 unnecessary branching and assignments.
1086 (gfc_arith_times): Use mpfr_clears() in preference to multiple
1088 (gfc_arith_divide): Ditto.
1089 (complex_reciprocal): Eliminate now unused variables a, re, im.
1090 Cleanup the mpfr abuse. Use mpfr_clears() in preference to
1091 multiple mpfr_clear().
1092 (complex_pow): Fix comment whitespace. Use mpfr_clears() in
1093 preference to multiple mpfr_clear().
1094 * simplify.c (gfc_simplify_and): Remove blank line.
1095 (gfc_simplify_atan2): Move error checking earlier to eliminate
1096 a now unnecessay gfc_free_expr().
1097 (gfc_simplify_bessel_j0): Remove unnecessary gfc_set_model_kind().
1098 (gfc_simplify_bessel_j1): Ditto.
1099 (gfc_simplify_bessel_jn): Ditto.
1100 (gfc_simplify_bessel_y0): Ditto.
1101 (gfc_simplify_bessel_y1): Ditto.
1102 (gfc_simplify_bessel_yn): Ditto.
1103 (only_convert_cmplx_boz): Eliminate unnecessary duplicate code, and
1104 combine nested if statement rational expressions.
1105 (gfc_simplify_cos): Use mpfr_clears() in preference to multiple
1107 (gfc_simplify_exp): Ditto.
1108 (gfc_simplify_fraction): Move gfc_set_model_kind() to after the
1109 special case of 0. Use mpfr_clears() in preference to multiple
1111 (gfc_simplify_gamma): Eliminate unnecessary gfc_set_model_kind().
1112 (gfc_simplify_lgamma): Ditto.
1113 (gfc_simplify_log10): Ditto.
1114 (gfc_simplify_log): Move gfc_set_model_kind () inside switch
1115 statement. Use mpfr_clears() in preference to multiple mpfr_clear().
1116 (gfc_simplify_mod): Eliminate now unused variables quot, iquot,
1117 and term. Simplify the mpfr magic.
1118 (gfc_simplify_modulo): Ditto.
1119 (gfc_simplify_nearest): Eliminate unnecessary gfc_set_model_kind().
1120 (gfc_simplify_scale): Use mpfr_clears() in preference to multiple
1122 (gfc_simplify_sin): Ditto
1123 (gfc_simplify_sqrt): Ditto
1124 (gfc_simplify_set_exponent): Move gfc_set_model_kind() to after the
1125 special case of 0. Use mpfr_clears() in preference to multiple
1128 2008-05-29 Daniel Franke <franke.daniel@gmail.com>
1131 * Make-lang.in (F95_OBJS): Added dependency on FORTRAN_TARGET_OBJS.
1133 2008-05-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1135 * scanner.c (load_line): Add first_char argument. Don't call ungetc.
1136 (gfc_read_orig_filename): Adjust call to load_line. Don't call
1138 (load_file): Adjust call to load_line.
1140 2008-05-28 Janus Weil <janus@gcc.gnu.org>
1144 * interface.c (gfc_procedure_use): Enable argument checking for
1145 external procedures with explicit interface.
1146 * symbol.c (check_conflict): Fix conflict checking for externals.
1147 (copy_formal_args): Fix handling of arrays.
1148 * resolve.c (resolve_specific_f0, resolve_specific_s0): Fix handling
1150 * parse.c (parse_interface): Non-abstract INTERFACE statement implies
1153 2008-05-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1156 * intrinsic.c (gfc_convert_chartype): Don't mark conversion
1158 * trans-array.c (gfc_trans_array_ctor_element): Divide element
1159 size by the size of one character to obtain length.
1160 * iresolve.c (gfc_resolve_cshift): Call the _char4 variant when
1162 (gfc_resolve_eoshift): Likewise.
1163 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Minor beautification.
1164 (gfc_conv_intrinsic_fdate): Minor beautification.
1165 (gfc_conv_intrinsic_ttynam): Minor beautification.
1166 (gfc_conv_intrinsic_minmax_char): Allow all character kinds.
1167 (size_of_string_in_bytes): New function.
1168 (gfc_conv_intrinsic_size): Call size_of_string_in_bytes for
1169 character expressions.
1170 (gfc_conv_intrinsic_sizeof): Likewise.
1171 (gfc_conv_intrinsic_array_transfer): Likewise.
1172 (gfc_conv_intrinsic_trim): Allow all character kinds. Minor
1174 (gfc_conv_intrinsic_repeat): Fix comment typo.
1175 * simplify.c (gfc_convert_char_constant): Take care of conversion
1176 of array constructors.
1178 2008-05-27 Tobias Burnus <burnus@net-b.de>
1181 * trans-array.c (gfc_set_loop_bounds_from_array_spec):
1182 Add missing fold_convert.
1184 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
1186 * fortran/cpp.c (cpp_define_builtins): Remove usage of TARGET_* macros,
1187 added FIXME instead.
1189 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
1192 * lang.opt (A, C, CC, D, E, H, P, U, cpp, d, fworking-directory,
1193 imultilib, iprefix, iquote, isysroot, isystem, nocpp, nostdinc,
1194 o, undef, v): New options.
1195 * options.c (gfc_init_options): Also initialize preprocessor
1197 (gfc_post_options): Also handle post-initialization of preprocessor
1199 (gfc_handle_option): Check if option is a preprocessor option.
1200 If yes, let gfc_cpp_handle_option() handle the option.
1201 * lang-specs.h: Reorganized to handle new options.
1202 * scanner.c (gfc_new_file): Read temporary file instead of
1203 input source if preprocessing is enabled.
1204 * f95-lang.c (gfc_init): Initialize preprocessor.
1205 (gfc_finish): Clean up preprocessor.
1208 * Make-lang.in: Added new objects and dependencies.
1209 * gfortran.texi: Updated section "Preprocessing and
1210 conditional compilation".
1211 * invoke.texi: Added new section "Preprocessing Options",
1212 listed and documented the preprocessing options handled
1215 2008-05-25 Tobias Burnus <burnus@net-b.de>
1218 * trans-expr.c (gfc_conv_function_call): Remove library
1219 call for c_f_pointer with scalar Fortran pointers and for
1222 2008-05-21 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1225 * iresolve.c (check_charlen_present): Don't force the rank to 1.
1227 2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1230 * trans-expr.c (gfc_conv_string_tmp): Pick the correct type for
1231 the temporary variable.
1233 2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1235 * simplify.c (gfc_simplify_dble, gfc_simplify_real): Initialize
1236 result variable to avoid warnings.
1238 2008-05-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1240 * intrinsic.c (char_conversions, ncharconv): New static variables.
1241 (find_char_conv): New function.
1242 (add_functions): Add simplification functions for ADJUSTL and
1243 ADJUSTR. Don't check the kind of their argument. Add checking for
1244 LGE, LLE, LGT and LLT.
1245 (add_subroutines): Fix argument type for SLEEP. Fix argument name
1247 (add_char_conversions): New function.
1248 (gfc_intrinsic_init_1): Call add_char_conversions.
1249 (gfc_intrinsic_done_1): Free char_conversions.
1250 (check_arglist): Use kind == 0 as a signal that we don't want
1251 the kind value to be checked.
1252 (do_simplify): Also simplify character functions.
1253 (gfc_convert_chartype): New function
1254 * trans-array.c (gfc_trans_array_ctor_element): Don't force the
1255 use of default character type.
1256 (gfc_trans_array_constructor_value): Likewise.
1257 (get_array_ctor_var_strlen): Use integer kind to build an integer
1258 instead of a character kind!
1259 (gfc_build_constant_array_constructor): Don't force the use of
1260 default character type.
1261 (gfc_conv_loop_setup): Likewise.
1262 * trans-expr.c (gfc_conv_string_tmp): Don't force the use of
1263 default character type. Allocate enough memory for wide strings.
1264 (gfc_conv_concat_op): Make sure operand kind are the same.
1265 (string_to_single_character): Remove gfc_ prefix. Reindent.
1266 Don't force the use of default character type.
1267 (gfc_conv_scalar_char_value): Likewise.
1268 (gfc_build_compare_string): Call string_to_single_character.
1269 (fill_with_spaces): New function
1270 (gfc_trans_string_copy): Add kind arguments. Use them to deal
1271 with wide character kinds.
1272 (gfc_conv_statement_function): Whitespace fix. Call
1273 gfc_trans_string_copy with new kind arguments.
1274 (gfc_conv_substring_expr): Call gfc_build_wide_string_const
1275 instead of using gfc_widechar_to_char.
1276 (gfc_conv_string_parameter): Don't force the use of default
1278 (gfc_trans_scalar_assign): Pass kind args to gfc_trans_string_copy.
1279 * intrinsic.h (gfc_check_lge_lgt_lle_llt, gfc_convert_char_constant,
1280 gfc_resolve_adjustl, gfc_resolve_adjustr): New prototypes.
1281 * decl.c (gfc_set_constant_character_len): Don't assert the
1282 existence of a single character kind.
1283 * trans-array.h (gfc_trans_string_copy): New prototype.
1284 * gfortran.h (gfc_check_character_range, gfc_convert_chartype):
1286 * error.c (print_wide_char_into_buffer): New function lifting
1287 code from gfc_print_wide_char. Fix order to output '\x??' instead
1289 (gfc_print_wide_char): Call print_wide_char_into_buffer.
1290 (show_locus): Call print_wide_char_into_buffer with buffer local
1292 * trans-const.c (gfc_build_wide_string_const): New function.
1293 (gfc_conv_string_init): Deal with wide characters strings
1295 (gfc_conv_constant_to_tree): Call gfc_build_wide_string_const.
1296 * trans-stmt.c (gfc_trans_label_assign): Likewise.
1297 (gfc_trans_character_select): Deal with wide strings.
1298 * expr.c (gfc_check_assign): Allow conversion between character
1299 kinds on assignment.
1300 * trans-const.h (gfc_build_wide_string_const): New prototype.
1301 * trans-types.c (gfc_get_character_type_len_for_eltype,
1302 gfc_get_character_type_len): Create too variants of the old
1303 gfc_get_character_type_len, one getting kind argument and the
1304 other one directly taking a type tree.
1305 * trans.h (gfor_fndecl_select_string_char4,
1306 gfor_fndecl_convert_char1_to_char4,
1307 gfor_fndecl_convert_char4_to_char1): New prototypes.
1308 * trans-types.h (gfc_get_character_type_len_for_eltype): New
1310 * resolve.c (resolve_operator): Exit early when kind mismatches
1311 are detected, because that makes us issue an error message later.
1312 (validate_case_label_expr): Fix wording of error message.
1313 * iresolve.c (gfc_resolve_adjustl, gfc_resolve_adjustr): New
1315 (gfc_resolve_pack): Call _char4 variants of library function
1316 when dealing with wide characters.
1317 (gfc_resolve_reshape): Likewise.
1318 (gfc_resolve_spread): Likewise.
1319 (gfc_resolve_transpose): Likewise.
1320 (gfc_resolve_unpack): Likewise.
1321 * target-memory.c (size_character): Take character kind bit size
1322 correctly into account (not that it changes anything for now, but
1324 (gfc_encode_character): Added gfc_ prefix. Encoding each
1325 character of a string by calling native_encode_expr for the
1326 corresponding unsigned integer.
1327 (gfc_target_encode_expr): Add gfc_ prefix to encode_character.
1328 * trans-decl.c (gfc_build_intrinsic_function_decls): Build
1329 gfor_fndecl_select_string_char4, gfor_fndecl_convert_char1_to_char4
1330 and gfor_fndecl_convert_char4_to_char1.
1331 * target-memory.h (gfc_encode_character): New prototype.
1332 * arith.c (gfc_check_character_range): New function.
1333 (eval_intrinsic): Allow non-default character kinds.
1334 * check.c (gfc_check_access_func): Only allow default
1335 character kind arguments.
1336 (gfc_check_chdir): Likewise.
1337 (gfc_check_chdir_sub): Likewise.
1338 (gfc_check_chmod): Likewise.
1339 (gfc_check_chmod_sub): Likewise.
1340 (gfc_check_lge_lgt_lle_llt): New function.
1341 (gfc_check_link): Likewise.
1342 (gfc_check_link_sub): Likewise.
1343 (gfc_check_symlnk): Likewise.
1344 (gfc_check_symlnk_sub): Likewise.
1345 (gfc_check_rename): Likewise.
1346 (gfc_check_rename_sub): Likewise.
1347 (gfc_check_fgetputc_sub): Likewise.
1348 (gfc_check_fgetput_sub): Likewise.
1349 (gfc_check_stat): Likewise.
1350 (gfc_check_stat_sub): Likewise.
1351 (gfc_check_date_and_time): Likewise.
1352 (gfc_check_ctime_sub): Likewise.
1353 (gfc_check_fdate_sub): Likewise.
1354 (gfc_check_gerror): Likewise.
1355 (gfc_check_getcwd_sub): Likewise.
1356 (gfc_check_getarg): Likewise.
1357 (gfc_check_getlog): Likewise.
1358 (gfc_check_hostnm): Likewise.
1359 (gfc_check_hostnm_sub): Likewise.
1360 (gfc_check_ttynam_sub): Likewise.
1361 (gfc_check_perror): Likewise.
1362 (gfc_check_unlink): Likewise.
1363 (gfc_check_unlink_sub): Likewise.
1364 (gfc_check_system_sub): Likewise.
1365 * primary.c (got_delim): Perform correct character range checking
1367 * trans-intrinsic.c (gfc_conv_intrinsic_conversion): Generate
1368 calls to library functions convert_char4_to_char1 and
1369 convert_char1_to_char4 for character conversions.
1370 (gfc_conv_intrinsic_char): Allow all character kings.
1371 (gfc_conv_intrinsic_strcmp): Fix whitespace.
1372 (gfc_conv_intrinsic_repeat): Take care of all character kinds.
1373 * intrinsic.texi: For all GNU intrinsics accepting character
1374 arguments, mention that they're restricted to the default kind.
1375 * simplify.c (simplify_achar_char): New function.
1376 (gfc_simplify_achar, gfc_simplify_char): Call simplify_achar_char.
1377 gfc_simplify_ichar): Don't error out for wide characters.
1378 (gfc_convert_char_constant): New function.
1380 2008-05-18 Steven G. Kargl <kargls@comcast.net>
1383 * symbol.c (check_conflict): Issue errors for abuse of PUBLIC, PRIVATE,
1385 * resolve.c (gfc_verify_binding_labels): Fix NULL pointer dereference.
1387 2008-05-17 Tobias Burnus <burnus@net-b.de>
1389 * intrinsic.texi: Correct description of GET_COMMAND_ARGUMENT
1390 and GET_ENVIRONMENT_VARIABLE; fix keyword= name for GETENV,
1391 GETLOG, GMTIME, HOSTNM, IRAND, ITIME, KILL.
1392 Move LOG_GAMMA after LOG10.
1394 2008-05-17 Tobias Burnus <burnus@net-b.de>
1396 * intrinsic.c (add_functions): Change FLUSH(C) to FLUSH(UNIT).
1397 * intrinsic.texi: Change INTEGER(*) to INTEGER; fix keyword= name for
1398 ABS, ADJUSTL, AINT, ALLOCATED, ANINT, ASSOCIATED, C_ASSOCIATED,
1399 CEILING, DBLE, DFLOAT, DOT_PRODUCT, DREAL, FLOAT, FLOOR, GET_COMMAND.
1401 2008-05-16 Paul Thomas <pault@gcc.gnu.org>
1405 * trans-stmt.c (gfc_trans_where): Tighten up the dependency
1406 check for calling gfc_trans_where_3.
1409 * trans-stmt.c (gfc_trans_where_2): Set the mask size to zero
1410 if it is calculated to be negative.
1413 * trans-stmt.c (gfc_trans_where_3, gfc_trans_where_assign): Set
1414 ss->where for scalar right hand sides.
1415 * trans-array.c (gfc_add_loop_ss_code): If ss->where is set do
1416 not evaluate scalars outside the loop. Clean up whitespace.
1417 * trans.h : Add a bitfield 'where' to gfc_ss.
1419 2008-05-16 Tobias Burnus <burnus@net-b.de>
1421 * libgfortran.h: Increase GFC_MAX_DIMENSIONS to 15.
1422 * array.c (gfc_match_array_spec): Error with -std=f2003 if rank > 7.
1424 2008-04-16 Daniel Kraft <d@domob.eu>
1427 * gfortran.h: Added field "length_from_typespec" to gfc_charlength.
1428 * aray.c (gfc_match_array_constructor): Added code to parse typespec.
1429 (check_element_type, check_constructor_type, gfc_check_constructor_type):
1430 Extended to support explicit typespec on constructor.
1431 (gfc_resolve_character_array_constructor): Pad strings correctly for
1432 explicit, constant character length.
1433 * trans-array.c: New static global variable "typespec_chararray_ctor"
1434 (gfc_trans_array_constructor): New code to support explicit but dynamic
1437 2008-05-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1440 * decl.c (match_attr_spec): Check for matching pairs of parenthesis.
1441 * expr.c (gfc_specification_expr): Supplement the error message with the
1442 type that was found.
1443 * resolve.c (gfc_resolve_index): Likewise.
1444 * match.c (gfc_match_parens): Clarify error message with "at or before".
1445 (gfc_match_do): Check for matching pairs of parenthesis.
1447 2008-05-16 Tobias Burnus <burnus@net-b.de
1449 * intrinsic.texi: Write Fortran 77/90/95 instead of F77/90/95;
1450 add missing KIND argument to ACHAR and NINT; and state that
1451 the KIND argument is a F2003 extension for ACHAR, COUNT, IACHAR,
1452 ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND, VERIFY.
1454 2008-05-16 Daniel Kraft <d@domob.eu>
1456 * primary.c: New private structure "gfc_structure_ctor_component".
1457 (gfc_free_structure_ctor_component): New helper function.
1458 (gfc_match_structure_constructor): Extended largely to support named
1459 arguments and default initialization for structure constructors.
1461 2008-05-15 Steven G. Kargl <kargls@comcast.net>
1463 * simplify.c (gfc_simplify_dble, gfc_simplify_float,
1464 simplify_bound, gfc_simplify_nearest, gfc_simplify_real): Plug
1465 possible memory leaks.
1466 (gfc_simplify_reshape): Plug possible memory leaks and dereferencing
1469 2008-05-15 Steven G. Kargl <kargls@comcast.net>
1472 * simplify.c (gfc_simplify_int, gfc_simplify_intconv): Replaced hand
1473 rolled integer conversion with gfc_int2int, gfc_real2int, and
1475 (gfc_simplify_intconv): Renamed to simplify_intconv.
1477 2008-05-15 Steven G. Kargl, <kargl@comcast.net>
1478 * gfortran.dg/and_or_xor.f90: New test
1480 * fortran/simplify.c (gfc_simplify_and, gfc_simplify_or,
1481 gfc_simplify_xor): Don't range check logical results.
1483 2008-05-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1485 * trans-expr.c (gfc_conv_concat_op): Take care of nondefault
1487 (gfc_build_compare_string): Add kind argument and use it.
1488 (gfc_conv_statement_function): Fix indentation.
1489 * gfortran.h (gfc_character_info): New structure.
1490 (gfc_character_kinds): New array.
1491 * trans-types.c (gfc_character_kinds, gfc_character_types,
1492 gfc_pcharacter_types): New array.
1493 (gfc_init_kinds): Fill character kinds array.
1494 (validate_character): Take care of nondefault character kinds.
1495 (gfc_build_uint_type): New function.
1496 (gfc_init_types): Take care of nondefault character kinds.
1497 (gfc_get_char_type, gfc_get_pchar_type): New functions.
1498 (gfc_get_character_type_len): Use gfc_get_char_type.
1499 * trans.h (gfc_build_compare_string): Adjust prototype.
1500 (gfor_fndecl_compare_string_char4, gfor_fndecl_concat_string_char4,
1501 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
1502 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
1503 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
1504 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4): New
1506 * trans-types.h (gfc_get_char_type, gfc_get_pchar_type): New
1508 * trans-decl.c (gfor_fndecl_compare_string_char4,
1509 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
1510 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
1511 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
1512 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4,
1513 gfor_fndecl_concat_string_char4): New function decls.
1514 (gfc_build_intrinsic_function_decls): Define new *_char4 function
1516 * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char,
1517 gfc_conv_intrinsic_len_trim, gfc_conv_intrinsic_ichar,
1518 gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_trim,
1519 gfc_conv_intrinsic_function): Deal with nondefault character kinds.
1521 2008-05-15 Sa Liu <saliu@de.ibm.com>
1523 * iso-c-binding.def: Add standard parameter to macro NAMED_INTCST.
1524 All existing NAMED_INTCST definitions has standard GFC_STD_F2003,
1525 c_int128_t, c_int_least128_t and c_int_fast128_t are added as
1527 * iso-fortran-evn.def: Add standard parameter GFC_STD_F2003
1528 to macro NAMED_INTCST.
1529 * symbol.c (std_for_isocbinding_symbol): New helper function to
1530 return the standard that supports this isocbinding symbol.
1531 (generate_isocbinding_symbol): Do not generate GNU extension symbols
1532 if std=f2003. Add new parameter to NAMED_INTCST.
1533 * module.c (use_iso_fortran_env_module): Add new parameter to
1534 NAMED_INTCST and new field standard to struct intmod_sym.
1535 * gfortran.h: Add new parameter to NAMED_INTCST.
1536 * trans-types.c (init_c_interop_kinds): Add new parameter to
1538 * intrinsic.texi: Documented new types C_INT128_T, C_INT_LEASE128_T
1539 and C_INT_FAST128_T.
1541 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1544 * trans-decl.c (gfc_build_dummy_array_decl): Don't repack
1545 arrays that have the TARGET attribute.
1547 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1550 * simplify.c (only_convert_cmplx_boz): New function.
1551 (gfc_simplify_cmplx, gfc_simplify_complex, gfc_simplify_dcmplx):
1552 Call only_convert_cmplx_boz.
1554 2008-05-14 Paul Thomas <pault@gcc.gnu.org>
1557 * interface.c (compare_actual_formal): Do not check sizes if the
1558 actual is BT_PROCEDURE.
1560 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1563 * trans-array.c (gfc_conv_ss_startstride): Any negative size is
1564 the same as zero size.
1565 (gfc_conv_loop_setup): Fix size calculation.
1567 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1570 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Correctly
1571 handle zero-size sections.
1573 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1576 * scanner.c (preprocessor_line): Allocate enough memory for a
1579 2008-05-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1582 * target-memory.c (gfc_target_expr_size): Correctly treat
1584 (gfc_target_encode_expr): Likewise.
1585 (gfc_interpret_complex): Whitespace change.
1587 2008-05-11 Thomas Koenig <tkoenig@gcc.gnu.org>
1590 * trans.c (gfc_call_malloc): If size equals zero, allocate one
1591 byte; don't return a null pointer.
1593 2008-05-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1596 * module.c (quote_string): Fix sprintf format.
1598 2008-05-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1601 * module.c (quote_string, unquote_string,
1602 mio_allocated_wide_string): New functions.
1603 (mio_expr): Call mio_allocated_wide_string where needed.
1605 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
1607 * trans-decl.c (gfc_get_extern_function_decl, build_function_decl):
1608 Rename DECL_IS_PURE to DECL_PURE_P.
1610 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1612 * arith.c: (gfc_arith_concat, gfc_compare_string,
1613 gfc_compare_with_Cstring, hollerith2representation,
1614 gfc_hollerith2int, gfc_hollerith2real, gfc_hollerith2complex,
1615 gfc_hollerith2character, gfc_hollerith2logical): Use wide
1616 characters for character constants.
1617 * data.c (create_character_intializer): Likewise.
1618 * decl.c (gfc_set_constant_character_len): Likewise.
1619 * dump-parse-tree.c (show_char_const): Correctly dump wide
1621 error.c (print_wide_char): Rename into gfc_print_wide_char.
1622 (show_locus): Adapt to new prototype of gfc_print_wide_char.
1623 expr.c (free_expr0): Representation is now disjunct from
1624 character string value, so we always free it.
1625 (gfc_copy_expr, find_substring_ref, gfc_simplify_expr): Adapt
1626 to wide character strings.
1627 * gfortran.h (gfc_expr): Make value.character.string a wide string.
1628 (gfc_wide_toupper, gfc_wide_strncasecmp, gfc_wide_memset,
1629 gfc_widechar_to_char, gfc_char_to_widechar): New prototypes.
1630 (gfc_get_wide_string): New macro.
1631 (gfc_print_wide_char): New prototype.
1632 * io.c (format_string): Make a wide string.
1633 (next_char, gfc_match_format, compare_to_allowed_values,
1634 gfc_match_open): Deal with wide strings.
1635 * module.c (mio_expr): Convert between wide strings and ASCII ones.
1636 * primary.c (match_hollerith_constant, match_charkind_name):
1637 Handle wide strings.
1638 * resolve.c (build_default_init_expr): Likewise.
1639 * scanner.c (gfc_wide_toupper, gfc_wide_memset,
1640 gfc_char_to_widechar): New functions.
1641 (wide_strchr, gfc_widechar_to_char, gfc_wide_strncasecmp):
1642 Changes in prototypes.
1643 (gfc_define_undef_line, load_line, preprocessor_line,
1644 include_line, load_file, gfc_read_orig_filename): Handle wide
1646 * simplify.c (gfc_simplify_achar, gfc_simplify_adjustl,
1647 gfc_simplify_adjustr, gfc_simplify_char, gfc_simplify_iachar,
1648 gfc_simplify_ichar, simplify_min_max, gfc_simplify_new_line,
1649 gfc_simplify_repeat): Handle wide strings.
1650 (wide_strspn, wide_strcspn): New helper functions.
1651 (gfc_simplify_scan, gfc_simplify_trim, gfc_simplify_verify):
1652 Handle wide strings.
1653 * symbol.c (generate_isocbinding_symbol): Likewise.
1654 * target-memory.c (size_character, gfc_target_expr_size,
1655 encode_character, gfc_target_encode_expr, gfc_interpret_character,
1656 gfc_target_interpret_expr): Handle wide strings.
1657 * trans-const.c (gfc_conv_string_init): Lower wide strings to
1659 (gfc_conv_constant_to_tree): Likewise.
1660 * trans-expr.c (gfc_conv_substring_expr): Handle wide strings.
1661 * trans-io.c (gfc_new_nml_name_expr): Likewise.
1662 * trans-stmt.c (gfc_trans_label_assign): Likewise.
1664 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1666 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
1667 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
1668 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): Mark arguments
1669 with ATTRIBUTE_UNUSED.
1671 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1673 * check.c (gfc_check_sizeof): Switch to ATTRIBUTE_UNUSED.
1674 * simplify.c (gfc_simplify_lgamma): Likewise.
1676 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1678 * openmp.c (gfc_match_omp_eos): Use gfc_next_ascii_char and
1679 gfc_peek_ascii_char.
1680 * decl.c (gfc_match_kind_spec, gfc_match_type_spec,
1681 gfc_match_implicit_none, match_implicit_range, gfc_match_implicit,
1682 match_string_p, match_attr_spec, gfc_match_suffix,
1683 match_procedure_decl, gfc_match_entry, gfc_match_subroutine):
1685 * gfortran.h (gfc_char_t): New type.
1686 (gfc_linebuf): Make line member a gfc_char_t.
1687 (locus): Make nextc member a gfc_char_t.
1688 (gfc_wide_is_printable, gfc_wide_is_digit, gfc_wide_fits_in_byte,
1689 gfc_wide_tolower, gfc_wide_strlen, gfc_next_ascii_char,
1690 gfc_peek_ascii_char, gfc_check_digit): New prototypes.
1691 * error.c (print_wide_char): New function.
1692 (show_locus): Use print_wide_char and gfc_wide_strlen.
1693 * io.c (next_char): Use gfc_char_t type.
1694 (match_io): Use gfc_peek_ascii_char and gfc_next_ascii_char.
1695 * match.c (gfc_match_parens, gfc_match_eos,
1696 gfc_match_small_literal_int, gfc_match_name, gfc_match_name_C,
1697 gfc_match_intrinsic_op, gfc_match_char, gfc_match_return,
1698 gfc_match_common): Likewise.
1699 * match.h (gfc_match_special_char): Change prototype.
1700 * parse.c (decode_specification_statement, decode_statement,
1701 decode_omp_directive, next_free, next_fixed): Use
1702 gfc_peek_ascii_char and gfc_next_ascii_char.
1703 * primary.c (gfc_check_digit): Change name.
1704 (match_digits, match_hollerith_constant, match_boz_constant,
1705 match_real_constant, next_string_char, match_charkind_name,
1706 match_string_constant, match_logical_constant_string,
1707 match_complex_constant, match_actual_arg, match_varspec,
1708 gfc_match_rvalue, match_variable): Use gfc_peek_ascii_char and
1709 gfc_next_ascii_char.
1710 * scanner.c (gfc_wide_fits_in_byte, wide_is_ascii,
1711 gfc_wide_is_printable, gfc_wide_tolower, gfc_wide_is_digit,
1712 gfc_wide_is_digit, wide_atoi, gfc_wide_strlen, wide_strcpy,
1713 wide_strchr, widechar_to_char, wide_strncmp, wide_strncasecmp,
1714 gfc_next_ascii_char, gfc_peek_ascii_char):
1716 (next_char, gfc_define_undef_line, skip_free_comments,
1717 gfc_next_char_literal, gfc_next_char, gfc_peek_char,
1718 gfc_error_recovery, load_line, preprocessor_line, include_line,
1719 load_file, gfc_read_orig_filename): Use gfc_char_t for source
1720 characters and the {gfc_,}wide_* functions to manipulate wide
1723 2008-05-06 Tobias Burnus <burnus@net-b.de>
1726 * intrinsic.c (add_functions): Call gfc_simplify_bessel_*.
1727 * intrinsic.h: Add prototypes for gfc_simplify_bessel_*.
1728 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
1729 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
1730 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): New.
1732 2008-05-03 Janus Weil <jaydub66@gmail.com>
1734 * misc.c (gfc_clear_ts): Set interface to NULL.
1736 2008-05-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1739 * gfortran.h: Add extra_comma pointer to gfc_dt structure. Add iokind to
1740 gfc_expr value union. Add io_kind enum to here from io.c.
1741 * io.c (gfc_free_dt): Free extra_comma.
1742 (gfc_resolve_dt): If an extra comma was encountered and io_unit is type
1743 BT_CHARACTER, resolve to format_expr and set default unit. Error if
1744 io_kind is M_WRITE. (match_io): Match the extra comma and set new
1745 pointer, extra_comma.
1747 2008-05-01 Bud Davis <bdavis9659@sbcglobal.net>
1750 * simplify.c (gfc_simplify_index): Check for direction argument
1753 2008-05-01 Janus Weil <jaydub66@gmail.com>
1755 * gfortran.h (struct gfc_symbol): Moving "interface" member to
1756 gfc_typespec (plus fixing a small docu error).
1757 * interface.c (gfc_procedure_use): Ditto.
1758 * decl.c (match_procedure_decl): Ditto.
1759 * resolve.c (resolve_specific_f0,
1760 resolve_specific_f0, resolve_symbol): Ditto.
1762 2008-04-30 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1764 * intrinsic.c (add_functions): Add SELECTED_CHAR_KIND intrinsic.
1765 * intrinsic.h (gfc_check_selected_char_kind,
1766 gfc_simplify_selected_char_kind): New prototypes.
1767 * gfortran.h (gfc_isym_id): Add GFC_ISYM_SC_KIND.
1768 * trans.h (gfor_fndecl_sc_kind): New function decl.
1769 * trans-decl.c (gfor_fndecl_sc_kind): Build new decl.
1770 * arith.c (gfc_compare_with_Cstring): New function.
1771 * arith.h (gfc_compare_with_Cstring): New prototype.
1772 * check.c (gfc_check_selected_char_kind): New function.
1773 * primary.c (match_string_constant, match_kind_param): Mark
1774 symbols used as literal constant kind param as referenced.
1775 * trans-intrinsic.c (gfc_conv_intrinsic_sc_kind): New function.
1776 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_sc_kind.
1777 * intrinsic.texi (SELECTED_CHAR_KIND): Document new intrinsic.
1778 * simplify.c (gfc_simplify_selected_char_kind): New function.
1780 2008-04-28 Paul Thomas <pault@gcc.gnu.org>
1783 * module.c (find_symbol): Do not return a result for a symbol
1784 that has been renamed in another module.
1786 2008-04-26 George Helffrich <george@gcc.gnu.org>
1790 * trans-common.c (create_common): Add decl to function
1791 chain (if inside one) to preserve identifier scope in debug output.
1793 2008-04-25 Jan Hubicka <jh@suse.cz>
1795 * trans-decl.c (trans_function_start): Update.
1797 2008-04-25 Tobias Burnus <burnus@net-b.de>
1798 Daniel Franke <franke.daniel@gmail.com>
1801 * gfortranspec.c (lang_specific_driver): Deprecate
1802 -M option; fix ICE when "-M" is last argument and
1803 make "-M<dir>" work.
1804 * options.c (gfc_handle_module_path_options):
1805 Use -J instead of -M in error messages.
1806 * invoke.texi: Mark -M as depecated.
1808 2008-04-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1809 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1812 * trans-instrinsic.c (gfc_conv_intrinsic_minmaxloc): Correctly adjust
1813 loop counter offset.
1815 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1817 * trans-expr.c (gfc_conv_structure): Don't set TREE_INVARIANT.
1818 * trans-array.c (gfc_build_null_descriptor): Don't set TREE_INVARIANT.
1819 (gfc_trans_array_constructor_value): Don't set TREE_INVARIANT.
1820 (gfc_build_constant_array_constructor): Don't set TREE_INVARIANT.
1821 (gfc_conv_array_initializer): Don't set TREE_INVARIANT.
1822 * trans-common.c (get_init_field): Don't set TREE_INVARIANT.
1823 (create_common): Don't set TREE_INVARIANT.
1824 * trans-stmt.c (gfc_trans_character_select): Don't set TREE_INVARIANT.
1825 * trans-decl.c (gfc_generate_function_code): Don't set TREE_INVARIANT.
1827 2008-04-21 Steve Ellcey <sje@cup.hp.com>
1829 * f95-lang.c (gfc_init_decl_processing): use ptr_mode instead of Pmode.
1831 2008-04-21 Daniel Franke <franke.daniel@gmail.com>
1834 * gfortranspec.c (lookup_option): Properly handle separated arguments
1835 in -J option, print missing argument message when necessary.
1837 2008-04-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1840 * scanner.c (skip_fixed_comments): Update continue_line when comment is
1841 detected. (gfc_next_char_literal): Likewise.
1843 2008-04-19 Paul Thomas <pault@gcc.gnu.org>
1848 * trans_array.c (gfc_trans_array_constructor): Temporarily
1849 realign loop, if loop->from is not zero, before creating
1850 the temporary array and provide an offset.
1853 * trans-decl.c (gfc_init_default_dt): Add gfc_ prefix to name
1854 and allow for NULL body. Change all references from
1855 init_default_dt to gfc_init_default_dt.
1856 * trans.h : Add prototype for gfc_init_default_dt.
1857 * trans-array.c (gfc_trans_deferred_vars): After nullification
1858 call gfc_init_default_dt for derived types with allocatable
1861 2008-04-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1864 * trans-common.c (create_common): Revert patch causing regression.
1866 2008-04-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1869 * iresolve.c (gfc_resolve_eoshift): Check for NULL symtree in test for
1870 optional argument attribute.
1872 2008-04-16 Paul Thomas <pault@gcc.gnu.org>
1875 * trans-intrinsic.c (gfc_conv_intrinsic_char): Even though KIND
1876 is not used, the argument must be converted.
1878 2008-04-16 Jakub Jelinek <jakub@redhat.com>
1881 * f95-lang.c (gfc_init_builtin_functions): Make sure
1882 BUILT_IN_SINCOS{,F,L} types aren't varargs.
1884 2008-04-15 Paul Thomas <pault@gcc.gnu.org>
1887 * expr.c (scalarize_intrinsic_call): Reorder identification of
1888 array argument so that if one is not found a segfault does not
1889 occur. Return FAILURE if all scalar arguments.
1891 2008-04-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1892 Tobias Burnus <burnus@net-b.de>
1895 * options.c (gfc_init_options): Set the default maximum continuation
1896 lines to 255 for both free and fixed form source for warnings.
1897 (gfc_handle_option): Set -std=f95 fixed form max continuations to 19 and
1898 the -std=f95 free form max continuations to 39 for warnings.
1899 * scanner.c (gfc_next_char_literal): Adjust the current_line number only
1900 if it is less than the current locus.
1902 2008-04-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1904 PR fortran/25829 28655
1905 * io.c (io_tag): Add new tags for decimal, encoding, asynchronous,
1906 round, sign, and id. (match_open_element): Match new tags.
1907 (gfc_resolve_open): Resolve new tags. (gfc_match_open): Enable encoding
1908 for DEFAULT only. Update error messages. (match_dt_element): Fix match
1909 tag for asynchronous. Update error messages. (gfc_free_inquire): Free
1910 new expressions. (match_inquire_element): Match new tags.
1911 (gfc_match_inquire): Add constraint for ID and PENDING.
1912 (gfc_resolve_inquire): Resolve new tags.
1913 * trans-io.c (gfc_trans_inquire): Clean up whitespace and fix setting of
1914 mask for ID parameter.
1915 * ioparm.def: Fix order of parameters for pending, round, and sign.
1916 NOTE: These must line up with the definitions in libgfortran/io/io.h. or
1919 2008-04-06 Paul Thomas <pault@gcc.gnu.org>
1922 * expr.c (scalarize_intrinsic_call): Identify which argument is
1923 an array and use that as the template.
1924 (check_init_expr): Remove tests that first argument is an array
1925 in the call to scalarize_intrinsic_call.
1927 2008-04-06 Tobias Schlüter <tobi@gcc.gnu.org>
1930 * io.c (io_tag): Add field 'value'. Split 'spec' field in
1932 (match_etag, match_vtag, match_ltag): Split parsing in two steps
1933 to give better error messages.
1935 2008-04-06 Tobias Burnus <burnus@net-b.de>
1937 * io.c (check_io_constraints): Add constrains. ID= requires
1938 asynchronous= and asynchronous= must be init expression.
1940 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1942 * f95-lang.c: Set LANG_HOOKS_NAME to "GNU Fortran".
1944 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1946 * dump-parse-tree.c: Use fprintf, fputs and fputc instead of
1947 gfc_status and gfc_status_char. Remove gfc_ prefix of the gfc_show_*
1948 functions and make them static. Add new gfc_dump_parse_tree
1950 * gfortran.h (gfc_option_t): Rename verbose into dump_parse_tree.
1951 (gfc_status, gfc_status_char): Delete prototypes.
1952 * error.c (gfc_status, gfc_status_char): Remove functions.
1953 * scanner.c (gfc_new_file): Use printf instead of gfc_status.
1954 * options.c (gfc_init_options): Rename verbose into dump_parse_tree.
1955 (gfc_handle_module_path_options): Use gfc_fatal_error instead of
1956 gfc_status and exit.
1957 (gfc_handle_option): Rename verbose into dump_parse_tree.
1958 * parse.c (gfc_parse_file): Use gfc_dump_parse_tree.
1960 2008-04-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1961 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1963 PR fortran/25829 28655
1964 * dump-parse-tree.c (gfc_show_code_node): Show new I/O parameters.
1965 * gfortran.h (gfc_statement): Add ST_WAIT enumerator.
1966 (gfc_open): Add pointers for decimal, encoding, round, sign,
1967 asynchronous. (gfc_inquire): Add pointers for asynchronous, decimal,
1968 encoding, pending, round, sign, size, id.
1969 (gfc_wait): New typedef struct. (gfc_dt): Add pointers for id, pos,
1970 asynchronous, blank, decimal, delim, pad, round, sign.
1971 (gfc_exec_op): Add EXEC_WAIT enumerator. (gfc_code): Add pointer for
1972 wait. (gfc_free_wait), (gfc_resolve_wait): New function prototypes.
1973 * trans-stmt.h (gfc_trans_wait): New function prototype.
1974 * trans.c (gfc_trans_code): Add case for EXEC_WAIT.
1975 * io.c (io_tag): Add new tags for DECIMAL, ENCODING, ROUND, SIGN,
1976 ASYCHRONOUS, ID. (match_open_element): Add matchers for new tags.
1977 (gfc_free_open): Free new pointers. (gfc_resolve_open): Resolve new
1978 tags. (gfc_resolve_open): Remove comment around check for allowed
1979 values and ASYNCHRONOUS, update it. Likewise for DECIMAL, ENCODING,
1980 ROUND, and SIGN. (match_dt_element): Add matching for new tags.
1981 (gfc_free_wait): New function. (gfc_resolve_wait): New function.
1982 (match_wait_element): New function. (gfc_match_wait): New function.
1983 * resolve.c (gfc_resolve_blocks): Add case for EXEC_WAIT.
1984 (resolve_code): Add case for EXEC_WAIT.
1985 * st.c (gfc_free_statement): Add case for EXEC_WAIT.
1986 * trans-io.c (ioparam_type): Add IOPARM_ptype_wait. (gfc_st_parameter):
1987 Add "wait" entry. (iocall): Add IOCALL_WAIT enumerator.
1988 (gfc_build_io_library_fndecls): Add function declaration for st_wait.
1989 (gfc_trans_open): Add mask bits for new I/O tags.
1990 (gfc_trans_inquire): Add mask bits for new I/O tags.
1991 (gfc_trans_wait): New translation function.
1992 (build_dt): Add mask bits for new I/O tags.
1993 * match.c (gfc_match_if) Add matcher for "wait".
1994 * match.h (gfc_match_wait): Prototype for new function.
1995 * ioparm.def: Add new I/O parameter definitions.
1996 * parse.c (decode_statement): Add match for "wait" statement.
1997 (next_statement): Add case for ST_WAIT. (gfc_ascii_statement): Same.
1999 2008-04-03 Jakub Jelinek <jakub@redhat.com>
2002 * openmp.c (resolve_omp_clauses): Diagnose if a clause symbol
2005 2008-04-03 Tom Tromey <tromey@redhat.com>
2007 * Make-lang.in (fortran_OBJS): New variable.
2009 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
2011 * f95-lang.c (insert_block): Kill.
2013 2008-04-01 George Helffrich <george@gcc.gnu.org>
2015 PR fortran/35154, fortran/23057
2016 * trans-common.c (create_common): Add decl to function
2017 chain to preserve identifier scope in debug output.
2019 2008-04-01 Joseph Myers <joseph@codesourcery.com>
2021 * gfortran.texi: Include gpl_v3.texi instead of gpl.texi
2022 * Make-lang.in (GFORTRAN_TEXI): Include gpl_v3.texi instead of
2025 2008-03-30 Paul Thomas <pault@gcc.gnu.org>
2028 * resolve.c (resolve_function, resolve_call): If the procedure
2029 is elemental do not look for noncopying intrinsics.
2031 2008-03-29 Paul Thomas <pault@gcc.gnu.org>
2034 * trans-array.c (gfc_array_init_size): Set 'size' zero if
2035 negative in one dimension.
2038 * trans-expr.c (gfc_trans_string_copy): Only assign a char
2039 directly if the lhs and rhs types are the same.
2041 2008-03-28 Daniel Franke <franke.daniel@gmail.com>
2042 Paul Richard Thomas <paul.richard.thomas@gmail.com>
2045 * primary.c (match_variable): Improved matching of function
2047 * resolve.c (resolve_allocate_deallocate): Removed checks if
2048 the actual argument for STAT is a variable.
2050 2008-03-28 Tobias Burnus <burnus@net-b.de>
2052 * symbol.c (gfc_get_default_type): Fix error message; option
2053 -fallow_leading_underscore should be -fallow-leading-underscore
2055 2008-03-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2058 * iresolve.c (gfc_resolve_cshift): Check for NULL symtree in test for
2059 optional argument attribute.
2061 2008-03-27 Tom Tromey <tromey@redhat.com>
2063 * Make-lang.in: Revert automatic dependency patch.
2065 2008-03-25 Tom Tromey <tromey@redhat.com>
2067 * Make-lang.in: Remove .o targets.
2068 (fortran_OBJS): New variable.
2069 (fortran/gfortranspec.o): Move to fortran/. Reduce to variable
2071 (GFORTRAN_D_OBJS): Update.
2072 (GFORTRAN_TRANS_DEPS): Remove.
2074 2008-03-24 Paul Thomas <pault@gcc.gnu.org>
2077 * resolve.c (resolve_structure_cons): It is an error to assign
2078 NULL to anything other than a pointer or allocatable component.
2081 * resolve.c (resolve_symbol): If the symbol is a derived type,
2082 resolve the derived type. If the symbol is a derived type
2083 function, ensure that the derived type is visible in the same
2084 namespace as the function.
2086 2008-03-23 Tobias Schlüter <tobi@gcc.gnu.org>
2088 * trans.h: Use fold_build in build1_v, build2_v and build3_v
2090 * trans-openmp.c (gfc_trans_omp_critical, gfc_trans_omp_single):
2091 Don't use build2_v macro.
2093 2008-03-19 Daniel Franke <franke.daniel@gmail.com>
2096 * interface.c (gfc_procedure_use): Check for keyworded arguments in
2097 procedures without explicit interfaces.
2099 2008-03-16 Paul Thomas <pault@gcc.gnu.org>
2102 * resolve.c (check_assumed_size_reference): Only visit the
2103 first reference and look directly at the highest dimension.
2105 2008-03-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2108 * trans-array.c (gfc_conv_array_index_offset): Remove unnecessary
2111 2008-03-15 Daniel Franke <franke.daniel@gmail.com>
2114 * resolve.c (resolve_branch): Less strict and pessimistic warning
2117 2008-03-11 Paolo Bonzini <bonzini@gnu.org>
2119 * f95-lang.c (LANG_HOOKS_CLEAR_BINDING_STACK): Delete.
2120 (gfc_be_parse_file): Call clear_binding_stack from here.
2121 (gfc_clear_binding_stack): Rename to clear_binding_stack.
2123 2008-03-09 Paul Thomas <pault@gcc.gnu.org>
2126 * module.c (mio_symtree_ref): After providing a symbol for a
2127 missing equivalence member, resolve and NULL the fixups.
2129 2008-03-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2131 * invoke.texi (Error and Warning Options): Document
2134 2008-03-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2137 * trans-array.c (gfc_conv_ss_startstride): Fix the logic to avoid
2138 checking bounds of absent optional arguments.
2140 2008-03-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2143 * intrinsic.c (add_functions): Add simplification routines for
2144 ERF, DERF, ERFC and DERFC.
2145 * decl.c (gfc_match_suffix, gfc_match_subroutine): Change GNU
2146 extensions into Fortran 2008 features.
2147 * intrinsic.h (gfc_simplify_erf, gfc_simplify_erfc): New
2149 * simplify.c (gfc_simplify_erf, gfc_simplify_erfc): New functions.
2151 2008-03-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2154 * intrinsic.c (add_functions): Modify intrinsics ACOSH, ASINH,
2155 ATANH, ERF, ERFC and GAMMA. Add intrinsics BESSEL_{J,Y}{0,1,N},
2156 ERFC_SCALED, LOG_GAMMA and HYPOT.
2157 * intrinsic.h (gfc_check_hypot, gfc_simplify_hypot,
2158 gfc_resolve_hypot): New prototypes.
2159 * mathbuiltins.def: Add HYPOT builtin. Make complex versions of
2160 ACOSH, ASINH and ATANH available.
2161 * gfortran.h (GFC_ISYM_ERFC_SCALED, GFC_ISYM_HYPOT): New values.
2162 * lang.opt: Add -std=f2008 option.
2163 * libgfortran.h: Define GFC_STD_F2008.
2164 * lang-specs.h: Add .f08 and .F08 file suffixes.
2165 * iresolve.c (gfc_resolve_hypot): New function.
2166 * parse.c (parse_contained): Allow empty CONTAINS for Fortran 2008.
2167 * check.c (gfc_check_hypot): New function.
2168 * trans-intrinsic.c (gfc_intrinsic_map): Define ERFC_SCALE builtin.
2169 * options.c (set_default_std_flags): Allow Fortran 2008 by default.
2170 (form_from_filename): Add .f08 suffix.
2171 (gfc_handle_option): Handle -std=f2008 option.
2172 * simplify.c (gfc_simplify_hypot): New function.
2173 * gfortran.texi: Document Fortran 2008 status and file extensions.
2174 * intrinsic.texi: Document new BESSEL_{J,Y}{0,1,N} intrinsics,
2175 as well as HYPOT and ERFC_SCALED. Update documentation of ERF,
2176 ERFC, GAMMA, LGAMMA, ASINH, ACOSH and ATANH.
2177 * invoke.texi: Document the new -std=f2008 option.
2179 2008-03-02 Jakub Jelinek <jakub@redhat.com>
2181 * gfortranspec.c (lang_specific_driver): Update copyright notice
2184 2008-02-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2187 * expr.c (find_array_element): Modify traversing the constructor to
2188 avoid trying to access NULL memory pointed to by next for the
2189 last element. (find_array_section): Exit while loop if cons->next is
2191 * trans-expr.c (gfc_conv_scalar_char_value): Initialize gfc_typespec.
2192 (gfc_conv_function_call): Same.
2193 * decl.c (gfc_match_implicit): Same.
2194 * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Same.
2196 2008-02-28 Daniel Franke <franke.daniel@gmail.com>
2201 * lang.opt: Added -Wreturn-type.
2202 * options.c (gfc_handle_option): Recognize -Wreturn-type.
2203 * trans-decl.c (gfc_trans_deferred_vars): Emit warnings for funtions
2204 where the result value is not set.
2205 (gfc_generate_function_code): Likewise.
2206 (generate_local_decl): Emit warnings for funtions whose RESULT
2207 variable is not set.
2209 2008-02-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2212 * trans-expr.c (gfc_conv_variable): Don't build indirect
2213 references when explicit interface is mandated.
2214 * resolve.c (resolve_formal_arglist): Set attr.always_explicit
2215 on the result symbol as well as the procedure symbol.
2217 2008-02-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2220 * trans.h: Remove prototypes for gfor_fndecl_math_exponent4,
2221 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
2222 gfor_fndecl_math_exponent16.
2223 * f95-lang.c (build_builtin_fntypes): Add new function types.
2224 (gfc_init_builtin_functions): Add new builtins for nextafter,
2225 frexp, ldexp, fabs, scalbn and inf.
2226 * iresolve.c (gfc_resolve_rrspacing): Don't add hidden arguments.
2227 (gfc_resolve_scale): Don't convert type of second argument.
2228 (gfc_resolve_set_exponent): Likewise.
2229 (gfc_resolve_size): Don't add hidden arguments.
2230 * trans-decl.c: Remove gfor_fndecl_math_exponent4,
2231 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
2232 gfor_fndecl_math_exponent16.
2233 * trans-intrinsic.c (gfc_intrinsic_map): Remove intrinsics
2234 for scalbn, fraction, nearest, rrspacing, set_exponent and
2236 (gfc_conv_intrinsic_exponent): Directly call frexp.
2237 (gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_nearest,
2238 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
2239 gfc_conv_intrinsic_scale, gfc_conv_intrinsic_set_exponent): New
2241 (gfc_conv_intrinsic_function): Use the new functions above.
2243 2008-02-26 Tobias Burnus <burnus@net-b.de>
2246 * interface.c (check_operator_interface): Show better line for error
2247 messages; fix constrains for user-defined assignment operators.
2248 (gfc_extend_assign): Fix constrains for user-defined assignment
2251 2008-02-26 Tom Tromey <tromey@redhat.com>
2253 * trans-io.c (set_error_locus): Remove old location code.
2254 * trans-decl.c (gfc_set_decl_location): Remove old location code.
2255 * f95-lang.c (gfc_init): Remove test of USE_MAPPED_LOCATION.
2256 * scanner.c (gfc_gobble_whitespace): Remove old location code.
2257 (get_file): Likewise.
2258 (preprocessor_line): Likewise.
2259 (load_file): Likewise.
2260 (gfc_new_file): Likewise.
2261 * trans.c (gfc_trans_runtime_check): Remove old location code.
2262 (gfc_get_backend_locus): Likewise.
2263 (gfc_set_backend_locus): Likewise.
2264 * data.c (gfc_assign_data_value): Remove old location code.
2265 * error.c (show_locus): Remove old location code.
2266 * gfortran.h (gfc_linebuf): Remove old location code.
2267 (gfc_linebuf_linenum): Remove old-location variant.
2269 2008-02-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2272 * trans-const.c (gfc_build_string_const): Don't call gettext.
2273 (gfc_build_localized_string_const): New function.
2274 * trans-const.h (gfc_build_localized_string_const): New prototype.
2275 * trans.c (gfc_trans_runtime_check): Use
2276 gfc_build_localized_string_const instead of gfc_build_string_const.
2277 (gfc_call_malloc): Likewise.
2278 (gfc_allocate_with_status): Likewise.
2279 (gfc_allocate_array_with_status): Likewise.
2280 (gfc_deallocate_with_status): Likewise.
2281 (gfc_call_realloc): Likewise.
2282 * trans-io.c (gfc_trans_io_runtime_check): Likewise.
2284 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
2286 * arith.c: Update copyright years.
2287 * arith.h: Likewise.
2288 * array.c: Likewise.
2290 * check.c: Likewise.
2294 * dependency.c: Likewise.
2295 * dependency.h: Likewise.
2296 * dump-parse-tree.c: Likewise.
2297 * error.c: Likewise.
2299 * gfc-internals.texi: Likewise.
2300 * gfortran.h: Likewise.
2301 * gfortran.texi: Likewise.
2302 * gfortranspec.c: Likewise.
2303 * interface.c: Likewise.
2304 * intrinsic.c: Likewise.
2305 * intrinsic.h: Likewise.
2306 * intrinsic.texi: Likewise.
2307 * invoke.texi: Likewise.
2309 * iresolve.c: Likewise.
2310 * iso-c-binding.def: Likewise.
2311 * iso-fortran-env.def: Likewise.
2312 * lang-specs.h: Likewise.
2313 * lang.opt: Likewise.
2314 * libgfortran.h: Likewise.
2315 * match.c: Likewise.
2316 * match.h: Likewise.
2317 * matchexp.c: Likewise.
2319 * module.c: Likewise.
2320 * openmp.c: Likewise.
2321 * options.c: Likewise.
2322 * parse.c: Likewise.
2323 * parse.h: Likewise.
2324 * primary.c: Likewise.
2325 * resolve.c: Likewise.
2326 * scanner.c: Likewise.
2327 * simplify.c: Likewise.
2329 * symbol.c: Likewise.
2330 * target-memory.c: Likewise.
2331 * target-memory.h: Likewise.
2332 * trans-array.h: Likewise.
2333 * trans-const.h: Likewise.
2334 * trans-stmt.h: Likewise.
2335 * trans-types.c: Likewise.
2336 * trans-types.h: Likewise.
2337 * types.def: Likewise.
2339 2008-02-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2342 * simplify.c (gfc_simplify_ibclr), (gfc_simplify_ibits),
2343 (gfc_simplify_ibset): Remove call to range_check.
2344 (simplify_cmplx), (gfc_simplify_dble), (gfc_simplify_float)
2345 (gfc_simplify_real): Add call gfc_clear_ts to initialize the
2346 temporary gfc_typspec variable.
2348 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
2350 * trans-array.c (gfc_conv_descriptor_data_get,
2351 gfc_conv_descriptor_data_set_internal,
2352 gfc_conv_descriptor_data_addr, gfc_conv_descriptor_offset,
2353 gfc_conv_descriptor_dtype, gfc_conv_descriptor_dimension,
2354 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
2355 gfc_conv_descriptor_ubound, gfc_trans_create_temp_array,
2356 gfc_conv_array_transpose, gfc_grow_array,
2357 gfc_trans_array_constructor_subarray,
2358 gfc_trans_array_constructor_value, gfc_trans_scalarized_loop_end,
2359 gfc_array_init_size, gfc_array_allocate, gfc_array_deallocate,
2360 gfc_conv_array_initializer, gfc_trans_array_bounds,
2361 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
2362 gfc_get_dataptr_offset, gfc_conv_array_parameter,
2363 gfc_trans_dealloc_allocated, get_full_array_size,
2364 gfc_duplicate_allocatable, structure_alloc_comps): Use fold_buildN
2366 * trans-expr.c (gfc_conv_expr_present, gfc_conv_missing_dummy,
2367 gfc_conv_component_ref, gfc_conv_cst_int_power,
2368 gfc_conv_function_call, gfc_trans_structur_assign): Likewise.
2369 * trans-common.c (create_common): Likewise.
2370 * trans-openmp.c (gfc_trans_omp_atomic, gfc_trans_omp_do):
2372 * trans-const.c (gfc_conv_constant_to_tree): Likewise.
2373 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_do,
2374 gfc_trans_integer_select, gfc_trans_character_select,
2375 gfc_trans_forall_loop, compute_overall_iter_number,
2376 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_allocate,
2377 gfc_trans_deallocate): Likewise.
2378 * trans.c (gfc_build_addr_expr, gfc_trans_runtime_check,
2379 gfc_allocate_with_status, gfc_allocate_array_with_status,
2380 gfc_deallocate_with_status): Likewise.
2381 * f95-lang.c (gfc_truthvalue_conversion): Likewise.
2382 * trans-io.c (set_parameter_const, set_parameter_value,
2383 set_parameter_ref, set_string, set_internal_unit, io_result,
2384 set_error_locus, nml_get_addr_expr, transfer_expr): Likewise.
2385 * trans-decl.c (gfc_build_qualified_array, build_entry_thunks,
2386 gfc_get_fake_result_decl, gfc_trans_auto_character_variable,
2387 gfc_generate_function_code): Likewise.
2388 * convert.c (convert): Likewise.
2389 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
2390 build_fixbound_expr, build_fix_expr, gfc_conv_intrinsic_aint,
2391 gfc_conv_intrinsic_int, gfc_conv_intrinsic_imagpart,
2392 gfc_conv_intrinsic_conjg, gfc_conv_intrinsic_abs,
2393 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
2394 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_dprod,
2395 gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
2396 gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax,
2397 gfc_conv_intrinsic_minmax_char, gfc_conv_intrinsic_count,
2398 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_dot_product,
2399 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
2400 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_not,
2401 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
2402 gfc_conv_intrinsic_ichar, gfc_conv_intrinsic_size,
2403 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
2404 gfc_conv_allocated, gfc_conv_associated, gfc_conv_intrinsic_trim,
2405 gfc_conv_intrinsic_repeat): Likewise.
2407 2008-02-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2410 * trans-expr.c (gfc_conv_power_op): Use BUILT_IN_CPOW{F,,L}.
2411 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_CPOW{F,,L}.
2412 * trans.h (gfor_fndecl_math_cpow, gfor_fndecl_math_cpowf,
2413 gfor_fndecl_math_cpowl10, gfor_fndecl_math_cpowl16): Remove.
2414 * trans-decl.c: Likewise.
2416 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2419 * expr.c (find_array_element): Modify traversing the constructor to
2420 avoid trying to access NULL memory pointed to by next for the
2421 last element. (find_array_section): Exit while loop if cons->next is
2424 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2427 * iresolve.c (resolve_mask_arg): Add gfc_clear_ts to initialize
2429 (gfc_resolve_aint): Likewise.
2430 (gfc_resolve_anint): Likewise.
2431 (gfc_resolve_besn): Likewise.
2432 (gfc_resolve_cshift): Likewise.
2433 (gfc_resolve_ctime): Likewise.
2434 (gfc_resolve_eoshift): Likewise.
2435 (gfc_resolve_index_func): Likewise.
2436 (gfc_resolve_isatty): Likewise.
2437 (gfc_resolve_malloc): Likewise.
2438 (gfc_resolve_rrspacing): Likewise.
2439 (gfc_resolve_scale): Likewise.
2440 (gfc_resolve_set_exponent): Likewise.
2441 (gfc_resolve_spacing): Likewise.
2442 (gfc_resolve_spacing): Likewise.
2443 (gfc_resolve_fgetc): Likewise.
2444 (gfc_resolve_fputc): Likewise.
2445 (gfc_resolve_ftell): Likewise.
2446 (gfc_resolve_ttynam): Likewise.
2447 (gfc_resolve_alarm_sub): Likewise.
2448 (gfc_resolve_mvbits): Likewise.
2449 (gfc_resolve_getarg): Likewise.
2450 (gfc_resolve_signal_sub): Likewise.
2451 (gfc_resolve_exit): Likewise.
2452 (gfc_resolve_flush): Likewise.
2453 (gfc_resolve_free): Likewise.
2454 (gfc_resolve_ctime_sub): Likewise.
2455 (gfc_resolve_fgetc_sub): Likewise.
2456 (gfc_resolve_fputc_sub): Likewise.
2457 (gfc_resolve_fseek_sub): Likewise.
2458 (gfc_resolve_ftell_sub): Likewise.
2459 (gfc_resolve_ttynam_sub): Likewise.
2461 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2463 * gfc-internals.texi: Fix typos and markup nits.
2464 * gfortran.texi: Likewise.
2465 * intrinsic.texi: Likewise.
2467 2008-02-21 Richard Guenther <rguenther@suse.de>
2469 * trans-expr.c (gfc_conv_expr_op): Expand INTRINSIC_PARENTHESES
2470 as unary PAREN_EXPR for real and complex typed expressions.
2471 (gfc_conv_unary_op): Fold the built tree.
2473 2008-02-20 Tobias Burnus <burnus@net-b.de>
2476 * match.c (gfc_match_name): Improve error message for '$'.
2478 2008-02-19 Daniel Franke <franke.daniel@gmail.com>
2481 * expr.c (gfc_check_pointer_assign): Add type and kind information
2482 to type-mismatch message.
2483 (gfc_check_assign): Unify error messages.
2485 2008-02-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2488 * gfortran.texi: Create new section for unimplemented extensions.
2489 Add "STRUCTURE and RECORD" and "ENCODE and DECODE statements".
2490 Remove "smaller projects" list. Fix a few typos.
2492 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2494 * intrinsic.texi: Rename INDEX node to avoid clashing with
2495 index.html on case-insensitive systems.
2497 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2500 * trans-expr.c (gfc_conv_function_call): Force evaluation of
2503 2008-02-10 Daniel Franke <franke.daniel@gmail.com>
2506 * lang.opt: Allow '-J<dir>' next to '-J <dir>',
2507 likewise '-I <dir>' and '-I<dir>'.
2509 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2512 * Make-lang.in (f951): Add $(GMPLIBS).
2514 2008-02-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2517 * trans-common.c (build_field): Mark fields as volatile when needed.
2519 2008-02-05 Tobias Burnus <burnus@net-b.de>
2522 * data.c (gfc_assign_data_value): Only free "size" if
2523 it has not already been freed.
2525 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
2528 * array.c (match_array_element_spec): Remove check for negative
2530 (gfc_resolve_array_spec): Add check for negative size.
2532 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
2535 * data.c (gfc_assign_data_value): Add bounds check for array
2538 2008-02-04 Daniel Franke <franke.daniel@gmail.com>
2540 * resolve.c (resolve_where): Fix typo.
2541 (gfc_resolve_where_code_in_forall): Likewise.
2543 2008-02-03 Paul Thomas <pault@gcc.gnu.org>
2546 * resolve.c (resolve_allocate_deallocate): New function.
2547 (resolve_code): Call it for allocate and deallocate.
2548 * match.c (gfc_match_allocate, gfc_match_deallocate) : Remove
2549 the checking of the STAT tag and put in above new function.
2550 * primary,c (match_variable): Do not fix flavor of host
2551 associated symbols yet if the type is not known.
2553 2008-01-31 Paul Thomas <pault@gcc.gnu.org>
2556 * expr.c (gfc_check_assign): It is an error to assign
2557 to a sibling procedure.
2559 2008-01-30 Paul Thomas <pault@gcc.gnu.org>
2562 * symbol.c (gfc_delete_symtree, gfc_undo_symbols): Rename
2563 delete_symtree to gfc_delete_symtree.
2564 * gfortran.h : Add prototype for gfc_delete_symtree.
2565 * module.c (load_generic_interfaces): Transfer symbol to a
2566 unique symtree and delete old symtree, instead of renaming.
2567 (read_module): The rsym and the found symbol are the same, so
2568 the found symtree can be deleted.
2571 * decl.c (match_char_spec): Remove the constraint on deferred
2572 matching of functions and free the length expression.
2573 delete_symtree to gfc_delete_symtree.
2574 (gfc_match_type_spec): Whitespace.
2575 (gfc_match_function_decl): Defer characteristic association for
2576 all types except BT_UNKNOWN.
2577 * parse.c (decode_specification_statement): Only derived type
2578 function matching is delayed to the end of specification.
2580 2008-01-28 Tobias Burnus <burnus@net-b.de>
2583 * simplify.c (gfc_simplify_shape): Simplify rank zero arrays.
2585 2008-01-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2588 * array.c (gfc_check_constructor_type): Revert clearing the expression.
2590 2008-01-26 Tobias Burnus <burnus@net-b.de>
2593 * trans-expr.c (gfc_conv_function_call): Don't call
2594 gfc_add_interface_mapping if the expression is NULL.
2596 2008-01-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2599 * trans-array.c (gfc_trans_create_temp_array): Remove call to
2600 gcc_assert (integer_zerop (loop->from[n])).
2602 2008-01-25 Daniel Franke <franke.daniel@gmail.com>
2605 * resolve.c (resolve_where): Added check if user-defined assignment
2606 operator is an elemental subroutine.
2607 (gfc_resolve_where_code_in_forall): Likewise.
2609 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
2613 * gfortran.h: Revert changes from 2008-01-17.
2614 * match.c: Likewise.
2615 * symbol.c: Likewise.
2616 (gfc_undo_symbols): Undo namespace changes related to common blocks.
2618 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
2621 * data.c (formalize_structure_cons): Skip formalization on
2624 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
2626 * gfortran.texi (OpenMP): Extended existing documentation.
2627 (contributors): Added major contributors of 2008 that were
2629 (proposed extensions): Removed implemented items.
2631 2008-01-24 Paul Thomas <pault@gcc.gnu.org>
2634 * parse.c (next_statement) : If ST_GET_FCN_CHARACTERISTICS is
2635 seen, check for a statement label and, if present, delete it
2636 and set the locus to the start of the statement.
2638 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
2641 * trans-io.c (gfc_trans_transfer): If the array reference in a
2642 read has a vector subscript, use gfc_conv_subref_array_arg to
2643 copy back the temporary.
2645 2008-01-22 Tobias Burnus <burnus@net-b.de>
2648 * interface.c (compare_actual_formal): Fix adding type
2649 to missing_arg_type for absent optional arguments.
2651 2008-01-22 Tobias Burnus <burnus@net-b.de>
2654 * parse.c (parse_spec): Change = into ==.
2656 2008-01-22 Daniel Franke <franke.daniel@gmail.com>
2659 * expr.c (check_elemental): Fix check for valid data types.
2661 2008-01-22 Tobias Burnus <burnus@net-b.de>
2664 * scanner.c (load_line): Support <tab><digit> continuation lines.
2665 * invoke.texi (-Wtabs): Document this.
2667 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
2670 * module.c (read_module): Set use_rename attribute.
2672 2007-01-21 Tobias Burnus <burnus@net-b.de>
2675 * interface.c (compare_parameter): Improved error message
2676 for arguments of same type and mismatched kinds.
2678 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
2681 * resolve.c (resolve_entries): Do not do an array bounds check
2682 if the result symbols are the same.
2685 * module.c (read_module) : Hide the symtree of the previous
2686 version of the symbol if this symbol is renamed.
2688 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
2691 * array.c (gfc_check_constructor_type): Clear the expression ts
2692 so that the checking starts from the deepest level of array
2694 * primary.c (match_varspec): If an unknown type is changed to
2695 default character and the attempt to match a substring fails,
2696 change it back to unknown.
2699 * trans-array.c (gfc_add_loop_ss_code) : If ss->string_length is
2700 NULL for an array constructor, use the cl.length expression to
2702 (gfc_conv_array_parameter): Change call to gfc_evaluate_now to
2705 2008-01-19 Thomas Koenig <tkoenig@gcc.gnu.org>
2709 * iresolve.c (gfc_resolve_all): Remove conversion of mask
2710 argument to kind=1 by removing call to resolve_mask_arg().
2711 (gfc_resolve_any): Likewise.
2713 2008-01-19 Tobias Burnus <burnus@net-b.de>
2716 * primary.c (match_variable): Handle FL_UNKNOWN without
2717 uneducated guessing.
2718 (match_variable): Improve error message.
2720 2008-01-18 Tobias Burnus <burnus@net-b.de>
2723 * interface.c (get_expr_storage_size): Return storage size
2724 for array element designators.
2725 (compare_actual_formal): Reject unequal string sizes for
2726 assumed-shape dummy arguments. And fix error message for
2727 array-sections with vector subscripts.
2729 2008-01-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2732 * simplify.c (is_constant_array_expr): New static function that returns
2733 true if the given expression is an array and is constant.
2734 (gfc_simplify_reshape): Use new function.
2736 2008-01-17 H.J. Lu <hongjiu.lu@intel.com>
2739 * symbol.c (free_common_tree): Renamed to ...
2740 (gfc_free_common_tree): This. Remove static.
2741 (gfc_free_namespace): Updated.
2743 * gfortran.h (gfc_free_common_tree): New.
2745 * match.c (gfc_match_common): Call gfc_free_common_tree () with
2746 gfc_current_ns->common_root and set gfc_current_ns->common_root
2747 to NULL on syntax error.
2749 2008-01-18 Richard Sandiford <rsandifo@nildram.co.uk>
2752 * trans-expr.c (gfc_conv_function_call): Use proper
2753 type for returned character pointers.
2755 2008-01-17 Paul Thomas <pault@gcc.gnu.org>
2760 * decl.c : Remove gfc_function_kind_locus and
2761 gfc_function_type_locus. Add gfc_matching_function.
2762 (match_char_length): If matching a function and the length
2763 does not match, return MATCH_YES and try again later.
2764 (gfc_match_kind_spec): The same.
2765 (match_char_kind): The same.
2766 (gfc_match_type_spec): The same for numeric and derived types.
2767 (match_prefix): Rename as gfc_match_prefix.
2768 (gfc_match_function_decl): Except for function valued character
2769 lengths, defer applying kind, type and charlen info until the
2770 end of specification block.
2771 gfortran.h (gfc_statement): Add ST_GET_FCN_CHARACTERISTICS.
2772 parse.c (decode_specification_statement): New function.
2773 (decode_statement): Call it when a function has kind = -1. Set
2774 and reset gfc_matching function, as function statement is being
2776 (match_deferred_characteristics): Simplify with a single call
2777 to gfc_match_prefix. Do appropriate error handling. In any
2778 case, make sure that kind = -1 is reset or corrected.
2779 (parse_spec): Call above on seeing ST_GET_FCN_CHARACTERISTICS.
2780 Throw an error if kind = -1 after last specification statement.
2781 parse.h : Prototype for gfc_match_prefix.
2783 2008-01-16 Tobias Burnus <burnus@net-b.de>
2786 * interface.c (compare_parameter): Allow AS_DEFERRED array
2787 elements and reject attr.pointer array elemenents.
2788 (get_expr_storage_size): Return storage size of elements of
2789 assumed-shape and pointer arrays.
2791 2008-01-15 Sebastian Pop <sebastian.pop@amd.com>
2793 * f95-lang.c (gfc_init_builtin_functions): Initialize GOMP builtins
2794 for flag_tree_parallelize_loops.
2796 2008-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
2799 * iresolve.c (gfc_resolve_all): Call resolve_mask_arg.
2800 (gfc_resolve_any): Likewise.
2801 (gfc_resolve_count): Likewise. Don't append kind of
2802 argument to function name.
2804 2008-01-13 Tobias Burnus <burnus@net-b.de>
2807 * resolve.c (resolve_actual_arglist): For expressions,
2808 also check for assume-sized arrays.
2809 * interface.c (compare_parameter): Move F2003 character checks
2810 here, print error messages here, reject elements of
2811 assumed-shape array as argument to dummy arrays.
2812 (compare_actual_formal): Update for the changes above.
2814 2008-01-13 Tobias Burnus <burnus@net-b.de>
2817 * decl.c (contained_procedure): Only check directly preceeding state.
2819 2008-01-13 Tobias Burnus <burnus@net-b.de>
2822 * check.c (gfc_check_shape): Accept array ranges of
2823 assumed-size arrays.
2825 2008-01-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2828 * match.c (gfc_match_name): Don't error if leading character is a '(',
2829 just return MATCH_NO.
2831 2008-01-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2834 * trans-io.c (create_dummy_iostat): Commit the symbol.
2836 2008-01-11 Paul Thomas <pault@gcc.gnu.org>
2839 * simplify.c (gfc_simplify_transfer): Return NULL if the size
2840 of the element is unavailable and only assign character length
2841 to the result, if 'mold' is constant.
2843 2008-01-10 Paul Thomas <pault@gcc.gnu.org>
2846 * trans-array.c (gfc_trans_array_ctor_element): Use gfc_trans_string_copy
2847 to assign strings and perform bounds checks on the string length.
2848 (get_array_ctor_strlen): Remove bounds checking.
2849 (gfc_trans_array_constructor): Initialize string length checking.
2850 * trans-array.h : Add prototype for gfc_trans_string_copy.
2852 2008-01-08 Richard Guenther <rguenther@suse.de>
2855 PR tree-optimization/34683
2856 * trans-types.c (gfc_get_array_type_bounds): Use an array type
2857 with known size for accesses if that is known.
2859 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
2862 * expr.c (find_array_element): Check that the array bounds are
2863 constant before using them. Use lower, as well as upper bound.
2864 (check_restricted): Allow implied index variable.
2866 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
2869 * trans_array.c (gfc_trans_deferred_array): Do not null the
2870 data pointer on entering scope, nor deallocate it on leaving
2871 scope, if the symbol has the 'save' attribute.
2874 * trans_decl.c (gfc_finish_var_decl): Derived types with
2875 allocatable components and an initializer must be TREE_STATIC.
2877 2008-01-07 Paul Thomas <pault@gcc.gnu.org>
2880 * module.c (write_generic): Rewrite completely.
2881 (write_module): Change call to write_generic.
2883 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2886 * scanner.c (load_line): Do not count ' ' as printable when checking for
2889 2008-01-06 Paul Thomas <pault@gcc.gnu.org>
2892 * module.c (load_needed): If the namespace has no proc_name
2893 give it the module symbol.
2895 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2898 * trans-expr.c (gfc_conv_missing_dummy): Use a temporary to type convert
2899 the dummy variable expression, test for NULL, and pass the variable
2900 address to the called function.
2902 2007-01-06 Tobias Burnus <burnus@net-b.de>
2905 * match.c (gfc_match_common): Remove blank common in
2907 * resolve.c (resolve_common_vars): New function.
2908 (resolve_common_blocks): Move checks to resolve_common_vars
2909 and invoke that function.
2910 (resolve_types): Call resolve_common_vars for blank commons.
2912 2008-01-06 Tobias Burnus <burnus@net-b.de>
2915 * resolve.c (resolve_equivalence_derived): Reject derived types with
2916 default initialization if equivalenced with COMMON variable.
2918 2008-01-06 Tobias Burnus <burnus@net-b.de>
2921 * io.c (check_io_constraints): Disallow unformatted I/O for
2924 2008-01-06 Tobias Burnus <burnus@net-b.de>
2927 * resolve.c (resolve_formal_arglist): Reject dummy procedure in
2928 ELEMENTAL functions.
2930 2008-01-06 Tobias Burnus <burnus@net-b.de>
2933 * interface.c (compare_actual_formal): Reject parameter
2934 actual to intent(out) dummy.
2936 2008-01-04 Tobias Burnus <burnus@net-b.de>
2939 * primary.c (match_varspec): Gobble whitespace before