1 2008-08-24 Tobias Burnus <burnus@net-b.de>
4 * decl.c (verify_bind_c_sym): Reject array/string returning
7 2008-08-24 Tobias Burnus <burnus@net-b.de>
10 * trans-expr.c (gfc_conv_function_call): Add string_length
11 for character-returning bind(C) functions.
13 2008-08-24 Daniel Kraft <d@domob.eu>
15 * gfortran.h (gfc_typebound_proc): New struct.
16 (gfc_symtree): New member typebound.
17 (gfc_find_typebound_proc): Prototype for new method.
18 (gfc_get_derived_super_type): Prototype for new method.
19 * parse.h (gfc_compile_state): New state COMP_DERIVED_CONTAINS.
20 * decl.c (gfc_match_procedure): Handle PROCEDURE inside derived-type
22 (gfc_match_end): Handle new context COMP_DERIVED_CONTAINS.
23 (gfc_match_private): Ditto.
24 (match_binding_attributes), (match_procedure_in_type): New methods.
25 (gfc_match_final_decl): Rewrote to make use of new
26 COMP_DERIVED_CONTAINS parser state.
27 * parse.c (typebound_default_access): New global helper variable.
28 (set_typebound_default_access): New callback method.
29 (parse_derived_contains): New method.
30 (parse_derived): Extracted handling of CONTAINS to new parser state
31 and parse_derived_contains.
32 * resolve.c (resolve_bindings_derived), (resolve_bindings_result): New.
33 (check_typebound_override), (resolve_typebound_procedure): New methods.
34 (resolve_typebound_procedures): New method.
35 (resolve_fl_derived): Call new resolving method for typebound procs.
36 * symbol.c (gfc_new_symtree): Initialize new member typebound to NULL.
37 (gfc_find_typebound_proc): New method.
38 (gfc_get_derived_super_type): New method.
40 2008-08-23 Janus Weil <janus@gcc.gnu.org>
42 * gfortran.h (gfc_component): Add field "symbol_attribute attr", remove
43 fields "pointer", "allocatable", "dimension", "access".
44 Remove functions "gfc_set_component_attr" and "gfc_get_component_attr".
45 * interface.c (gfc_compare_derived_types): Ditto.
46 * trans-array.c (gfc_array_allocate,structure_alloc_comps): Ditto.
47 * trans-expr.c (gfc_conv_component_ref,gfc_trans_subcomponent_assign,
48 gfc_conv_structure): Ditto.
49 * symbol.c (gfc_find_component,free_components,gfc_set_component_attr,
50 gfc_get_component_attr,verify_bind_c_derived_type,
51 generate_isocbinding_symbol): Ditto.
52 * decl.c (build_struct): Ditto.
53 * dump-parse-tree.c (show_components): Ditto.
54 * trans-stmt.c (gfc_trans_deallocate): Ditto.
55 * expr.c (gfc_check_assign,gfc_check_pointer_assign,
56 gfc_default_initializer): Ditto.
57 * module.c (mio_component): Ditto.
58 * trans-types.c (copy_dt_decls_ifequal,gfc_get_derived_type): Ditto.
59 * resolve.c (has_default_initializer,resolve_structure_cons,
60 gfc_iso_c_func_interface,find_array_spec,resolve_ref,
61 resolve_deallocate_expr,resolve_allocate_expr,resolve_fl_derived,
62 resolve_equivalence_derived): Ditto.
63 * trans-io.c (transfer_expr): Ditto.
64 * parse.c (parse_derived): Ditto.
65 * dependency.c (gfc_check_dependency): Ditto.
66 * primary.c (gfc_variable_attr): Ditto.
68 2008-08-23 Tobias Burnus <burnus@net-b.de>
71 * arith.c (gfc_arith_concat): Fix concat of kind=4 strings.
73 2008-08-23 Tobias Burnus <burnus@net-b.de>
76 * target-memory.c (gfc_interpret_character): Support
79 2008-08-22 Daniel Kraft <d@domob.eu>
82 * symbol.c (gfc_add_type): Warn on -Wsurprising if a function-result
83 type is re-declared but neither -pedantic nor -std=f* is given and so
85 * invoke.texi (-Wsurprising): Document this new behaviour.
87 2008-08-22 Daniel Kraft <d@domob.eu>
89 * gfortran.h (in_prefix): Removed from this header.
90 * match.h (gfc_matching_prefix): Moved and renamed from `in_prefix'.
91 * decl.c (in_prefix): Removed from here.
92 (gfc_match_prefix): Use new name of `gfc_matching_prefix'.
93 * symbol.c (gfc_check_symbol_typed): Ditto.
94 * expr.c (check_typed_ns): New helper variable.
95 (expr_check_typed_help): New helper method.
96 (gfc_expr_check_typed): Rewrote to use gfc_traverse_expr to do the
97 work, fixing a minor problem.
98 * match.c (gfc_matching_prefix): New variable.
100 2008-08-22 Daniel Kraft <d@domob.eu>
104 * gfortran.h (in_prefix): New global.
105 (gfc_check_symbol_typed), (gfc_check_expr_typed): New methods.
106 * array.c (match_array_element_spec): Check that bounds-expressions
107 don't have symbols not-yet-typed in them.
108 * decl.c (var_element): Check that variable used is already typed.
109 (char_len_param_value): Check that expression does not contain
110 not-yet-typed symbols.
111 (in_prefix): New global.
112 (gfc_match_prefix): Record using `in_prefix' if we're at the moment
113 parsing a prefix or not.
114 * expr.c (gfc_expr_check_typed): New method.
115 * parse.c (verify_st_order): New argument to disable error output.
116 (check_function_result_typed): New helper method.
117 (parse_spec): Check that the function-result declaration, if given in
118 a prefix, contains no not-yet-typed symbols when the IMPLICIT rules are
120 * symbol.c (gfc_check_symbol_typed): Check that a symbol already has
121 a type associated to it, otherwise use the IMPLICIT rules or signal
124 2008-08-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
126 * f95-lang.c: Update all calls to pedwarn.
128 2008-08-18 Daniel Franke <franke.daniel@gmail.com>
131 * gfortran.texi: Document decision on include file handling in
134 2008-08-16 Tobias Burnus <burnus@net-b.de>
137 * libgfortran.h: Reduce GFC_MAX_DIMENSIONS to 7.
139 2008-08-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
142 * io.c (gfc_match_open): Enable UTF-8 in checks.
143 * simplify.c (gfc_simplify_selected_char_kind): Enable iso_10646.
145 2008-08-14 Janus Weil <janus@gcc.gnu.org>
148 * symbol.c (check_conflict): Move conflict checks for (procedure,save)
149 and (procedure,intent) to resolve_fl_procedure.
150 * resolve.c (resolve_fl_procedure): Ditto.
152 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
155 * f95-lang.c (gfc_mark_addressable): Use "pedwarn (0," instead of
158 2008-08-09 Paul Thomas <pault@gcc.gnu.org>
161 * symbol.c (gfc_add_extension): New function.
162 * decl.c (gfc_get_type_attr_spec): Call it.
163 (gfc_match_derived_decl): Set symbol extension attribute from
165 * gfortran.h : Add prototype for gfc_add_extension.
167 2008-08-08 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
170 * options.c (set_Wall): Replace set_Wunused by warn_unused.
172 2008-08-08 Daniel Kraft <d@domob.eu>
174 * gfortran.h (gfc_finalizer): Replaced member `procedure' by two
175 new members `proc_sym' and `proc_tree' to store the symtree after
177 (gfc_find_sym_in_symtree): Made public.
178 * decl.c (gfc_match_final_decl): Adapted for new member name.
179 * interface.c (gfc_find_sym_in_symtree): Made public.
180 (gfc_extend_expr), (gfc_extend_assign): Changed call accordingly.
181 * module.c (mio_finalizer), (mio_f2k_derived), (mio_full_f2k_derived):
182 New methods for module-file IO of f2k_derived.
183 (mio_symbol): Do IO of f2k_derived namespace.
184 * resolve.c (gfc_resolve_finalizers): Adapted for new member name and
185 finding the symtree for the symbol here.
186 * symbol.c (gfc_free_finalizer): Adapted for new members.
188 2008-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
190 * gfc-internals.texi: Update to GFDL 1.2. Do not list GPL as
192 * gfortran.texi: Likewise.
193 * intrinsic.texi: Do not list GPL as Invariant Section.
194 * invoke.texi: Likewise. Update copyright years.
196 2008-07-29 Paul Thomas <pault@gcc.gnu.org>
198 * trans-expr.c (conv_parent_component_references): New function
199 to build missing parent references.
200 (gfc_conv_variable): Call it
201 * symbol.c (gfc_add_component): Check that component name in a
202 derived type extension does not appear in parent.
203 (gfc_find_component): For a derived type extension, check if
204 the component appears in the parent derived type by calling
205 self. Separate errors for private components and private types.
206 * decl.c (match_data_constant): Add extra arg to call to
207 gfc_match_structure_constructor.
208 (check_extended_derived_type): New function to check that a
209 parent derived type exists and that it is OK for exension.
210 (gfc_get_type_attr_spec): Add extra argument 'name' and return
211 it if extends is specified.
212 (gfc_match_derived_decl): Match derived type extension and
213 build a first component of the parent derived type if OK. Add
214 the f2k namespace if not present.
215 * gfortran.h : Add the extension attribute.
216 * module.c : Handle attribute 'extension'.
217 * match.h : Modify prototypes for gfc_get_type_attr_spec and
218 gfc_match_structure_constructor.
219 * primary.c (build_actual_constructor): New function extracted
220 from gfc_match_structure_constructor and modified to call self
221 iteratively to build derived type extensions, when f2k named
223 (gfc_match_structure_constructor): Do not throw error for too
224 many components if a parent type is being handled. Use
225 gfc_find_component to generate errors for non-existent or
226 private components. Iteratively call self for derived type
227 extensions so that parent constructor is built. If extension
228 and components left over, throw error.
229 (gfc_match_rvalue): Add extra arg to call to
230 gfc_match_structure_constructor.
232 * trans-array.c (gfc_conv_resolve_dependencies): If lhs and rhs
233 are the same symbol, aliassing does not matter.
235 2008-07-29 Jan Hubicka <jh@suse.cz>
237 * options.c (gfc_post_options): Do not set flag_no_inline.
239 2008-07-29 Daniel Kraft <d@domob.eu>
242 * trans-intrinsic.c (conv_generic_with_optional_char_arg): New method
243 to append a string-length even if the string argument is missing, e.g.
245 (gfc_conv_intrinsic_function): Call the new method for EOSHIFT, PACK
248 2008-07-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
250 * gfortran.h (try): Remove macro. Replace try with gfc_try
261 * interface.c: Likewise.
262 * intrinsic.c: Likewise.
263 * intrinsic.h: Likewise.
268 * resolve.c: Likewise.
269 * scanner.c: Likewise.
270 * simplify.c: Likewise.
271 * symbol.c: Likewise.
272 * trans-openmp.c: Likewise.
273 * trans-types.c: Likewise.
275 2008-07-28 Tobias Burnus <burnus@net-b.de>
277 * Make-lang.in: Remove -Wno-* from fortran-warn.
279 2008-07-28 Richard Guenther <rguenther@suse.de>
281 Merge from gimple-tuples-branch.
283 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
285 * trans-expr.c: Include gimple.h instead of tree-gimple.h.
286 * trans-array.c: Same.
287 * trans-openmp.c: Same.
288 * trans-stmt.c: Same.
291 * trans-decl.c: Same.
292 * trans-intrinsic.c: Same.
293 * trans.c: Same. Include tree-iterator.h.
294 * Make-lang.in (trans.o): Depend on tree-iterator.h
296 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
298 * trans-array.h (gfc_conv_descriptor_data_set_internal):
299 Rename to gfc_conv_descriptor_data_set.
300 (gfc_conv_descriptor_data_set_tuples): Remove.
301 * trans-array.c (gfc_conv_descriptor_data_get): Rename
302 from gfc_conv_descriptor_data_set_internal.
303 Remove last argument to gfc_add_modify.
304 (gfc_trans_allocate_array_storage): Rename gfc_add_modify_expr to
306 (gfc_trans_create_temp_array): Same.
307 (gfc_conv_array_transpose): Same.
308 (gfc_grow_array): Same.
309 (gfc_put_offset_into_var): Same.
310 (gfc_trans_array_ctor_element): Same.
311 (gfc_trans_array_constructor_subarray): Same.
312 (gfc_trans_array_constructor_value): Same.
313 (gfc_trans_scalarized_loop_end): Same.
314 (gfc_array_init_size): Same.
315 (gfc_array_allocate): Same.
316 (gfc_trans_array_bounds): Same.
317 (gfc_trans_auto_array_allocation): Same.
318 (gfc_trans_g77_array): Same.
319 (gfc_trans_dummy_array_bias): Same.
320 (gfc_conv_expr_descriptor): Same.
321 (structure_alloc_comps): Same.
322 * trans-expr.c: Same.
323 * trans-openmp.c (gfc_omp_clause_default_ctor): Same.
324 Rename gfc_conv_descriptor_data_set_tuples to
325 gfc_conv_descriptor_data_set.
326 (gfc_omp_clause_copy_ctor): Change build_gimple_modify_stmt to
328 (gfc_omp_clause_assign_op): Same.
329 (gfc_trans_omp_array_reduction): Rename gfc_add_modify_expr to
331 (gfc_trans_omp_atomic): Same.
332 (gfc_trans_omp_do): Same. Change GIMPLE_MODIFY_STMT to MODIFY_EXPR.
333 Rename gfc_add_modify_stmt to gfc_add_modify.
334 * trans-stmt.c: Rename gfc_add_modify_expr to
336 * trans.c: Rename gfc_add_modify_expr to
338 (gfc_add_modify): Remove last argument.
339 Rename GIMPLE_MODIFY_STMT to MODIFY_EXPR.
340 * trans.h: Remove gfc_add_modify_expr, gfc_add_modify_stmt.
341 Add prototype for gfc_add_modify.
342 * f95-lang.c (union lang_tree_node): Rename GENERIC_NEXT to TREE_CHAIN.
343 * trans-decl.c: Rename gfc_add_modify_stmt to gfc_add_modify.
345 * trans-intrinsic.c: Same.
347 2008-02-25 Aldy Hernandez <aldyh@redhat.com>
349 * Make-lang.in (fortran-warn): Add -Wno-format.
351 2008-02-19 Diego Novillo <dnovillo@google.com>
353 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
355 * fortran/Make-lang.in (fortran-warn): Remove.
357 2007-11-22 Aldy Hernandez <aldyh@redhat.com>
359 * trans-expr.c (gfc_trans_string_copy): Use "void *" when building a
362 2007-11-10 Aldy Hernandez <aldyh@redhat.com>
364 * Make-lang.in (fortran-warn): Set to -Wno-format.
365 * trans.c (gfc_trans_code): Update comment to say GENERIC.
366 Call tree_annotate_all_with_locus instead of annotate_all_with_locus.
368 2008-07-27 Tobias Burnus <burnus@net-b.de>
373 * trans.c (gfc_trans_runtime_check): Allow run-time warning besides
375 * trans.h (gfc_trans_runtime_check): Update declaration.
376 * trans-array.c (gfc_trans_array_ctor_element,gfc_trans_array_bound_check,
377 gfc_conv_array_ref,gfc_conv_ss_startstride,gfc_trans_dummy_array_bias):
378 Updated gfc_trans_runtime_check calls.
379 (gfc_conv_array_parameter): Implement flag_check_array_temporaries,
380 fix packing/unpacking for nonpresent optional actuals to optional
382 * trans-array.h (gfc_conv_array_parameter): Update declaration.
383 * trans-expr.c (gfc_conv_substring,gfc_trans_arrayfunc_assign,
384 gfc_conv_function_call): Updated gfc_trans_runtime_check calls.
385 (gfc_conv_function_call): Update gfc_conv_array_parameter calls.
386 * trans-expr.c (gfc_trans_goto): Updated gfc_trans_runtime_check
388 * trans-io.c (set_string,gfc_conv_intrinsic_repeat): Ditto.
389 (gfc_conv_intrinsic_transfer,gfc_conv_intrinsic_loc): Same for
390 gfc_conv_array_parameter.
391 * trans-intrinsics.c (gfc_conv_intrinsic_bound): Ditto.
392 * trans-decl.c (gfc_build_builtin_function_decls): Add
393 gfor_fndecl_runtime_warning_at.
394 * lang.opt: New option fcheck-array-temporaries.
395 * gfortran.h (gfc_options): New flag_check_array_temporaries.
396 * options.c (gfc_init_options, gfc_handle_option): Handle flag.
397 * invoke.texi: New option fcheck-array-temporaries.
399 2008-07-24 Jan Hubicka <jh@suse.cz>
401 * fortran/options.c (gfc_post_options): Remove flag_unline_trees code.
403 2008-07-24 Daniel Kraft <d@domob.eu>
406 * lang.opt (Wnonstd-intrinsics): Removed option.
407 (Wintrinsics-std), (Wintrinsic-shadow): New options.
408 * invoke.texi (Option Summary): Removed -Wnonstd-intrinsics
409 from the list and added -Wintrinsics-std and -Wintrinsic-shadow.
410 (Error and Warning Options): Documented the new options and removed
411 the documentation for -Wnonstd-intrinsics.
412 * gfortran.h (gfc_option_t): New members warn_intrinsic_shadow and
413 warn_intrinsics_std, removed warn_nonstd_intrinsics.
414 (gfc_is_intrinsic): Renamed from gfc_intrinsic_name.
415 (gfc_warn_intrinsic_shadow), (gfc_check_intrinsic_standard): New.
416 * decl.c (match_procedure_decl): Replaced gfc_intrinsic_name by
417 the new name gfc_is_intrinsic.
418 (warn_intrinsic_shadow): New helper method.
419 (gfc_match_function_decl), (gfc_match_subroutine): Call the new method
420 warn_intrinsic_shadow to check the just-parsed procedure.
421 * expr.c (check_init_expr): Call new gfc_is_intrinsic to check whether
422 the function called is really an intrinsic in the selected standard.
423 * intrinsic.c (gfc_is_intrinsic): Renamed from gfc_intrinsic_name and
424 extended to take into account the selected standard settings when trying
425 to find out whether a symbol is an intrinsic or not.
426 (gfc_check_intrinsic_standard): Made public and extended.
427 (gfc_intrinsic_func_interface), (gfc_intrinsic_sub_interface): Removed
428 the calls to check_intrinsic_standard, this check now happens inside
430 (gfc_warn_intrinsic_shadow): New method defined.
431 * options.c (gfc_init_options): Initialize new warning flags to false
432 and removed intialization of Wnonstd-intrinsics flag.
433 (gfc_post_options): Removed logic for Wnonstd-intrinsics flag.
434 (set_Wall): Set new warning flags and removed Wnonstd-intrinsics flag.
435 (gfc_handle_option): Handle the new flags and removed handling of the
436 old Wnonstd-intrinsics flag.
437 * primary.c (gfc_match_rvalue): Replaced call to gfc_intrinsic_name by
438 the new name gfc_is_intrinsic.
439 * resolve.c (resolve_actual_arglist): Ditto.
440 (resolve_generic_f), (resolve_unknown_f): Ditto.
441 (is_external_proc): Ditto.
442 (resolve_generic_s), (resolve_unknown_s): Ditto.
443 (resolve_symbol): Ditto and ensure for symbols declared INTRINSIC that
444 they are really available in the selected standard setting.
446 2008-07-24 Daniel Kraft <d@domob.eu>
448 * match.c (gfc_match): Add assertion to catch wrong calls trying to
449 match upper-case characters.
451 2008-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
454 * gfortran.h: Add "warn_array_temp" to gfc_option_t.
455 * lang.opt: Add -Warray-temporaries.
456 * invoke.texi: Document -Warray-temporaries
457 * trans-array.h (gfc_trans_create_temp_array): Add argument of
459 (gfc_conv_loop_setup): Likewise.
460 * trans-array.c (gfc_trans_create_temp_array): If
461 -Warray-temporaries is given and locus is present, warn about
462 creation of array temporaries.
463 (gfc_trans_array_constructor_subarray): Add locus to call
464 of gfc_conv_loop_setup.
465 (gfc_trans_array_constructor): Add where argument. Pass where
466 argument to call of gfc_trans_create_temp_array.
467 (gfc_add_loop_ss_code): Add where argument. Pass where argument
468 to recursive call of gfc_add_loop_ss_code and to call of
469 gfc_trans_array_constructor.
470 (gfc_conv_loop_setup): Add where argument. Pass where argument
471 to calls to gfc_add_loop_ss_code and to gfc_trans_create_temp_array.
472 (gfc_conv_expr_descriptor): Pass location to call of
474 (gfc_conv_array_parameter): If -Warray-temporaries is given,
475 warn about creation of temporary arrays.
476 * trans-expr.c (gfc_conv_subref_array_arg): Add where argument
477 to call to gfc_conv_loop_setup.
478 (gfc_conv_function_call): Add where argument to call to
479 gfc_trans_creat_temp_array.
480 (gfc_trans_subarray_assign): Likewise.
481 (gfc_trans_assignment_1): Add where argument to call to
483 * trans-stmt.c (gfc_conv_elemental_dependencies): Add where
484 argument to call to gfc_trans_create_temp_array.
485 (gfc_trans_call): Add where argument to call to gfc_conv_loop_setup.
486 (generate_loop_for_temp_to_lhs): Likewise.
487 (generate_loop_for_rhs_to_temp): Likewise.
488 (compute_inner_temp_size): Likewise.
489 (gfc_trans-pointer_assign_need_temp): Likewise.
490 (gfc_evaluate_where_mask): Likewise.
491 (gfc_trans_where_assign): Likewise.
492 (gfc_trans_where_3): Likewise.
493 * trans-io.c (transfer_srray_component): Add where argument
494 to function. Add where argument to call to gfc_conv_loop_setup.
495 (transfer_expr): Add where argument to call to
496 transfer_array_component.
497 (gfc_trans_transfer): Add where expression to call to
499 * trans-intrinsic.c (gfc_conv_intrinsic_anyall): Add
500 where argument to call to gfc_conv_loop_setup.
501 (gfc_conv_intrinsic_count): Likewise.
502 (gfc_conv_intrinsic_arith): Likewise.
503 (gfc_conv_intrinsic_dot_product): Likewise.
504 (gfc_conv_intrinsic_minmaxloc): Likewise.
505 (gfc_conv_intrinsic_minmaxval): Likewise.
506 (gfc_conv_intrinsic_array_transfer): Warn about
507 creation of temporary array.
508 Add where argument to call to gfc_trans_create_temp_array.
509 * options.c (gfc_init_options): Initialize gfc_option.warn_array_temp.
510 (gfc_handle_option): Set gfc_option.warn_array_temp.
512 2008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
515 * f95-lang.c (gfc_mark_addressable): All calls to pedwarn changed.
517 2008-07-22 Daniel Kraft <d@domob.eu>
520 * io.c (error_element), (format_locus): New static globals.
521 (unexpected_element): Spelled out this message fully.
522 (next_char): Keep track of locus when not MODE_STRING.
523 (next_char_not_space): Remember last parsed element in error_element.
524 (format_lex): Fix two indentation errors.
525 (check_format): Use format_locus and possibly error_element for a
526 slightly better error message on invalid format.
527 (check_format_string): Set format_locus to start of the string
528 expression used as format.
530 2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
532 * expr.c (gfc_check_pointer_assign): Fix typo in string.
533 * io.c (check_format): Fix typo in string. Fix comment typos.
534 * parse.c (gfc_global_used): Likewise.
535 * resolve.c (resolve_allocate_expr): Likewise.
536 * symbol.c (gfc_set_default_type): Likewise.
537 * arith.c: Fix typos in comments.
541 * dependency.c: Likewise.
542 * f95-lang.c: Likewise.
543 * gfortran.h: Likewise.
544 * matchexp.c: Likewise.
545 * module.c: Likewise.
546 * primary.c: Likewise.
547 * scanner.c: Likewise.
548 * trans-array.c: Likewise.
549 * trans-common.c: Likewise.
550 * trans-decl.c: Likewise.
551 * trans-expr.c: Likewise.
552 * trans-intrinsic.c: Likewise.
553 * trans-types.c: Likewise.
557 2008-07-19 Tobias Burnus <burnus@net-b.de>
560 * matchexp.c (gfc_get_parentheses): Remove obsolete workaround,
561 which caused the generation of wrong code.
563 2008-07-19 Tobias Burnus <burnus@net-b.de>
566 * scanner.c (load_file): Add argument to destinguish between
567 true filename and displayed filename.
568 (include_line,gfc_new_file): Adapt accordingly.
570 2008-07-19 Tobias Burnus <burnus@net-b.de>
572 * check.c (gfc_check_cshift,gfc_check_eoshift,gfc_check_unpack): Add rank
573 checks for cshift's shift and eoshift's shift and boundary args.
574 (gfc_check_unpack): Add rank and shape tests for unpack.
576 2008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
578 * gfortran.h (new): Remove macro.
579 * array.c (gfc_append_constructor, match_array_list,
580 gfc_match_array_constructor): Likewise.
581 * bbt.c (insert, gfc_insert_bbt): Likewise.
582 * decl.c (var_element, top_var_list, top_val_list, gfc_match_data,
583 get_proc_name): Likewise.
584 * expr.c (gfc_copy_actual_arglist): Likewise.
585 * interface.c (compare_actual_formal, check_new_interface,
586 gfc_add_interface): Likewise.
587 * intrinsic.c gfc_convert_type_warn, gfc_convert_chartype):
589 * io.c (match_io_iterator, match_io_list): Likewise.
590 * match.c (match_forall_header): Likewise.
591 * matchexp.c (build_node): Likewise.
592 * module.c (gfc_match_use): Likewise.
593 * scanner.c (load_file): Likewise.
594 * st.c (gfc_append_code): Likewise.
595 * symbol.c (save_symbol_data, gfc_get_sym_tree, gfc_undo_symbols,
596 gfc_commit_symbols): Likewise.
597 * trans-common.c (build_field): Likewise.
598 * trans-decl.c (gfc_finish_var_decl): Likewise.
599 * trans-expr.c (gfc_free_interface_mapping,
600 gfc_get_interface_mapping_charlen, gfc_add_interface_mapping,
601 gfc_finish_interface_mapping,
602 gfc_apply_interface_mapping_to_expr): Likewise.
603 * trans.h (gfc_interface_sym_mapping): Likewise.
605 2008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
607 * gfortran.h (operator): Remove macro.
608 (gfc_namespace, gfc_expr): Avoid C++ keywords.
609 * arith.c (eval_intrinsic, eval_intrinsic_f2, eval_intrinsic_f3):
611 * decl.c (access_attr_decl): Likewise.
612 * dependency.c (gfc_dep_compare_expr): Likewise.
613 * dump-parse-tree.c (show_expr, show_uop, show_namespace):
615 * expr.c (gfc_copy_expr, gfc_type_convert_binary,
616 simplify_intrinsic_op, check_intrinsic_op): Likewise.
617 * interface.c (fold_unary, gfc_match_generic_spec,
618 gfc_match_interface, gfc_match_end_interface,
619 check_operator_interface, check_uop_interfaces,
620 gfc_check_interfaces, gfc_extend_expr, gfc_extend_assign,
621 gfc_add_interface, gfc_current_interface_head,
622 gfc_set_current_interface_head): Likewise.
623 * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
625 * matchexp.c (gfc_get_parentheses, build_node): Likewise.
626 * module.c (gfc_use_rename, gfc_match_use, find_use_name_n,
627 number_use_names, mio_expr, load_operator_interfaces, read_module,
628 write_operator, write_module): Likewise.
629 * openmp.c (resolve_omp_atomic): Likewise.
630 * resolve.c (resolve_operator, gfc_resolve_character_operator,
631 gfc_resolve_uops): Likewise.
632 * symbol.c (free_uop_tree, gfc_free_namespace): Likewise.
633 * trans-expr.c (gfc_conv_expr_op): Likewise.
634 * trans-openmp.c (gfc_trans_omp_atomic): Likewise.
636 2008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
638 * gfortran.h (protected): Remove macro.
639 * dump-parse-tree.c (show_attr): Avoid C++ keywords.
640 * expr.c (gfc_check_pointer_assign): Likewise.
641 * interface.c (compare_parameter_protected): Likewise.
642 * intrinsic.c (enum class, add_sym, add_sym_0, add_sym_1,
643 add_sym_1s, add_sym_1m, add_sym_2, add_sym_2s, add_sym_3,
644 add_sym_3ml, add_sym_3red, add_sym_3s, add_sym_4, add_sym_4s,
645 add_sym_5s): Likewise.
646 * match.c (gfc_match_assignment, gfc_match_pointer_assignment):
648 * module.c (mio_symbol_attribute): Likewise.
649 * primary.c (match_variable): Likewise.
650 * resolve.c (resolve_equivalence): Likewise.
651 * symbol.c (check_conflict, gfc_add_protected, gfc_copy_attr):
653 * trans-types.c (gfc_get_array_type_bounds): Likewise.
655 2008-07-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
657 * arith.c (eval_type_intrinsic0): Avoid C++ keywords.
658 * gfortran.h (try, protected, operator, new): Likewise.
660 2008-07-17 Tobias Burnus <burnus@net-b.de>
664 * array.c (gfc_match_array_spec): Fix array-rank check.
665 * resolve.c (resolve_fl_derived): Fix constentness check
666 for the array dimensions.
668 2008-07-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
670 * Make-lang.in (gfortranspec.o): Fix dependencies.
672 2008-07-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
675 * io.c: Add error check for g0 edit descriptor followed by '.'.
677 2008-07-12 Daniel Kraft <d@domob.eu>
679 * resolve.c (resolve_fl_derived): Allow pointer components to empty
680 derived types fixing a missing part of PR fortran/33221.
682 2008-07-10 Daniel Kraft <d@domob.eu>
684 * gfc-internals.texi (section gfc_expr): Created documentation about
685 the gfc_expr internal data structure.
687 2008-07-07 Thomas Koenig <tkoenig@gcc.gnu.org>
690 * iresolve.c (gfc_resolve_product): Set shape of return
692 (gfc_resolve_sum): Likewise.
694 2008-07-07 Jakub Jelinek <jakub@redhat.com>
697 * f95-lang.c (poplevel): Don't ever add subblocks to
698 global_binding_level.
700 2008-07-02 Janus Weil <janus@gcc.gnu.org>
701 Tobias Burnus <burnus@net-b.de>
702 Paul Thomas <pault@gcc.gnu.org>
705 * gfortran.h (struct gfc_symbol): New member "proc_pointer".
706 * check.c (gfc_check_associated,gfc_check_null): Implement
708 * decl.c (match_procedure_decl): Ditto.
709 * expr.c (gfc_check_pointer_assign,gfc_check_assign_symbol): Ditto.
710 * interface.c (compare_actual_formal): Ditto.
712 * match.c (gfc_match_pointer_assignment): Ditto.
713 * parse.c (parse_interface): Ditto.
714 * primary.c (gfc_match_rvalue,match_variable): Ditto.
715 * resolve.c (resolve_fl_procedure): Ditto.
716 * symbol.c (check_conflict,gfc_add_external,gfc_add_pointer,
717 gfc_copy_attr,gen_fptr_param,build_formal_args): Ditto.
718 * trans-decl.c (get_proc_pointer_decl,gfc_get_extern_function_decl,
719 create_function_arglist): Ditto.
720 * trans-expr.c (gfc_conv_variable,gfc_conv_function_val,
721 gfc_conv_function_call,gfc_trans_pointer_assignment): Ditto.
723 2008-07-02 Thomas Koenig <tkoenig@gcc.gnu.org>
727 * iresolve.c (resolve_mask_arg): Don't convert mask to
728 kind=1 logical if it is of that type already.
730 2008-06-29 Thomas Koenig <tkoenig@gcc.gnu.org>
733 * iresolve.c (gfc_resolve_matmul): Copy shapes
736 2008-06-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
738 * invoke.texi: Add documentation for runtime behavior of
741 2008-06-28 Daniel Kraft <d@domob.eu>
743 * gfc-internals.texi (section gfc_code): Extended documentation about
744 gfc_code in the internal datastructures chapter including details about
745 how IF, DO and SELECT blocks look like and an example for how the
746 block-chaining works.
748 2008-06-25 Paul Thomas <pault@gcc.gnu.org>
751 * interface.c (check_intents): Correct error where the actual
752 arg was checked for a pointer argument, rather than the formal.
754 2008-06-24 Paul Thomas <pault@gcc.gnu.org>
757 * expr.c (gfc_check_assign): Change message and locus for
758 error when conform == 0.
760 2008-06-23 Jakub Jelinek <jakub@redhat.com>
763 * cpp.c (cpp_define_builtins): Change _OPENMP value to 200805.
765 2008-06-20 Laurynas Biveinis <laurynas.biveinis@gmail.com>
766 Tobias Burnus <burnus@net-b.de>
770 * scanner.c (preprocessor_line): do not call gfc_free for
771 current_file->filename if it differs from filename.
773 2008-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
775 * arith.c (hollerith2representation): Fix for -Wc++-compat.
776 * array.c (gfc_get_constructor): Likewise.
777 * decl.c (gfc_get_data_variable, gfc_get_data_value, gfc_get_data,
778 create_enum_history, gfc_match_final_decl): Likewise.
779 * error.c (error_char): Likewise.
780 * expr.c (gfc_get_expr, gfc_copy_expr): Likewise.
781 * gfortran.h (gfc_get_charlen, gfc_get_array_spec,
782 gfc_get_component, gfc_get_formal_arglist, gfc_get_actual_arglist,
783 gfc_get_namelist, gfc_get_omp_clauses, gfc_get_interface,
784 gfc_get_common_head, gfc_get_dt_list, gfc_get_array_ref,
785 gfc_get_ref, gfc_get_equiv, gfc_get_case, gfc_get_iterator,
786 gfc_get_alloc, gfc_get_wide_string): Likewise.
787 * interface.c (count_types_test): Likewise.
788 * intrinsic.c (add_char_conversions, gfc_intrinsic_init_1):
790 * io.c (gfc_match_open, gfc_match_close, match_filepos, match_io,
791 gfc_match_inquire, gfc_match_wait): Likewise.
792 * match.c (gfc_match, match_forall_iterator): Likewise.
793 * module.c (gfc_get_pointer_info, gfc_get_use_rename, add_fixup,
794 add_true_name, parse_string, write_atom, quote_string,
795 mio_symtree_ref, mio_gmp_real, write_common_0): Likewise.
796 * options.c (gfc_post_options): Likewise.
797 * primary.c (match_integer_constant, match_hollerith_constant,
798 match_boz_constant, match_real_constant,
799 gfc_get_structure_ctor_component, gfc_match_structure_constructor): Likewise.
800 * scanner.c (gfc_widechar_to_char, add_path_to_list,
801 add_file_change, load_line, get_file, preprocessor_line,
802 load_file, unescape_filename, gfc_read_orig_filename): Likewise.
803 * simplify.c (gfc_simplify_ibits, gfc_simplify_ishft,
804 gfc_simplify_ishftc): Likewise.
805 * symbol.c (gfc_get_st_label, gfc_get_namespace, gfc_new_symtree,
806 gfc_get_uop, gfc_new_symbol, save_symbol_data, gfc_get_gsymbol):
808 * target-memory.c (gfc_target_interpret_expr): Likewise.
809 * trans-const.c (gfc_build_wide_string_const): Likewise.
810 * trans-expr.c (gfc_add_interface_mapping): Likewise.
811 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
812 gfc_conv_intrinsic_int, gfc_conv_intrinsic_lib_function,
813 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_ctime,
814 gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam,
815 gfc_conv_intrinsic_minmax, gfc_conv_intrinsic_minmax_char,
816 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_index_scan_verify,
817 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_trim): Likewise.
818 * trans.c (gfc_get_backend_locus): Likewise.
819 * trans.h (gfc_get_ss): Likewise.
821 2008-06-18 Daniel Kraft <d@domob.eu>
823 PR fortran/36517, fortran/36492
824 * array.c (gfc_resolve_character_array_constructor): Call
825 gfc_set_constant_character_len with changed length-chec argument.
826 * decl.c (gfc_set_constant_character_len): Changed array argument to
827 be a generic length-checking argument that can be used for correct
828 checking with typespec and in special cases where the should-be length
829 is different from the target length.
830 (build_struct): Call gfc_set_constant_character_len with changed length
831 checking argument and introduced additional checks for exceptional
832 conditions on invalid code.
833 (add_init_expr_to_sym), (do_parm): Call gfc_set_constant_character_len
834 with changed argument.
835 * match.h (gfc_set_constant_character_len): Changed third argument to
836 int for the should-be length rather than bool.
838 2008-06-17 Daniel Kraft <d@domob.eu>
841 * array.c (gfc_resolve_character_array_constructor): Check that all
842 elements with constant character length have the same one rather than
843 fixing it if no typespec is given, emit an error if they don't. Changed
844 return type to "try" and return FAILURE for the case above.
845 (gfc_resolve_array_constructor): Removed unneeded call to
846 gfc_resolve_character_array_constructor in this function.
847 * gfortran.h (gfc_resolve_character_array_constructor): Returns try.
848 * trans-array.c (get_array_ctor_strlen): Return length of first element
849 rather than last element.
850 * resolve.c (gfc_resolve_expr): Handle FAILURE return from
851 gfc_resolve_character_array_constructor.
853 2008-06-17 Paul Thomas <pault@gcc.gnu.org>
856 * resolve.c (add_dt_to_dt_list): New function.
857 (resolve_fl_derived): Call new function for pointer components
858 and when derived type resolved.
860 2008-06-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
863 * trans-decl.c (gfc_generate_function_code): Add range_check to options
866 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
868 * gfc-internals.texi: Expand TABs, drop indentation outside examples.
869 * gfortran.texi: Likewise.
870 * intrinsic.texi: Likewise.
871 * invoke.texi: Likewise.
873 2008-06-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
876 * trans-io.c (gfc_build_io_library_fndecls): Build declaration for
877 transfer_character_wide which includes passing in the character kind to
878 support wide character IO. (transfer_expr): If the kind == 4, create the
879 argument and build the call.
880 * gfortran.texi: Fix typo.
882 2008-06-13 Tobias Burnus <burnus@net-b.de>
885 * decl.c (do_parm): Handle init expression for len=*.
887 2008-06-12 Tobias Burnus <burnus@net-b.de>
890 * trans-intrinsic.c (gfc_conv_intrinsic_index_scan_verify):
891 Fix passing of the BACK= argument.
893 2008-06-10 Jerry DeLisle <jvdelisle@gcc.gnu.org>
895 * cpp.c: Add copyright notice.
896 * cpp.h: Add copyright notice.
898 2008-06-08 Janus Weil <janus@gcc.gnu.org>
901 * decl.c (match_procedure_decl): Correctly recognize if the interface
902 is an intrinsic procedure.
904 2008-06-08 Tobias Burnus <burnus@net-b.de>
907 * resolve.c (resolve_symbol): Copy more attributes for
908 PROCEDUREs with interfaces.
910 2008-06-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
914 * io.c (check_format): Add new error message for zero width.
915 Use new error message for FMT_A and with READ, FMT_G. Allow
916 FMT_G with WRITE except when -std=F95 and -std=F2003.
918 2008-06-07 Tobias Burnus <burnus@net-b.de>
921 * intrinsic.c (add_functions): Implement c_sizeof.
922 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Do not
923 create unneeded variable in the scalar case.
924 * intrinsic.texi: Add C_SIZEOF documentation.
926 2008-06-06 Tobias Burnus <burnus@net-b.de>
928 * intrinsic.texi (BESSEL_J1): Fix BES(S)EL_J1 typo.
930 2008-06-06 Jakub Jelinek <jakub@redhat.com>
932 * scanner.c (skip_free_comments, skip_fixed_comments): Handle tabs.
933 * parse.c (next_free): Allow tab after !$omp.
934 (decode_omp_directive): Handle !$omp task, !$omp taskwait
936 (case_executable): Add ST_OMP_TASKWAIT.
937 (case_exec_markers): Add ST_OMP_TASK.
938 (gfc_ascii_statement): Handle ST_OMP_TASK, ST_OMP_END_TASK and
940 (parse_omp_structured_block, parse_executable): Handle ST_OMP_TASK.
941 * gfortran.h (gfc_find_sym_in_expr): New prototype.
942 (gfc_statement): Add ST_OMP_TASK, ST_OMP_END_TASK and ST_OMP_TASKWAIT.
943 (gfc_omp_clauses): Add OMP_SCHED_AUTO to sched_kind,
944 OMP_DEFAULT_FIRSTPRIVATE to default_sharing. Add collapse and
946 (gfc_exec_op): Add EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
947 * f95-lang.c (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
948 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP, LANG_HOOKS_OMP_CLAUSE_DTOR,
949 LANG_HOOKS_OMP_PRIVATE_OUTER_REF): Define.
950 * trans.h (gfc_omp_clause_default_ctor): Add another argument.
951 (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
952 gfc_omp_clause_dtor, gfc_omp_private_outer_ref): New prototypes.
953 * types.def (BT_ULONGLONG, BT_PTR_ULONGLONG,
954 BT_FN_BOOL_ULONGLONGPTR_ULONGLONGPTR,
955 BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULLPTR_ULLPTR,
956 BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULL_ULLPTR_ULLPTR,
957 BT_FN_VOID_PTR_PTR, BT_PTR_FN_VOID_PTR_PTR,
958 BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): New.
959 (BT_BOOL): Use integer type with BOOL_TYPE_SIZE rather
960 than boolean_type_node.
961 * dump-parse-tree.c (gfc_show_omp_node): Handle EXEC_OMP_TASK,
962 EXEC_OMP_TASKWAIT, OMP_SCHED_AUTO, OMP_DEFAULT_FIRSTPRIVATE,
963 untied and collapse clauses.
964 (gfc_show_code_node): Handle EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
965 * trans.c (gfc_trans_code): Handle EXEC_OMP_TASK and
967 * st.c (gfc_free_statement): Likewise.
968 * resolve.c (gfc_resolve_blocks, resolve_code): Likewise.
969 (find_sym_in_expr): Rename to...
970 (gfc_find_sym_in_expr): ... this. No longer static.
971 (resolve_allocate_expr, resolve_ordinary_assign): Adjust caller.
972 * match.h (gfc_match_omp_task, gfc_match_omp_taskwait): New
974 * openmp.c (resolve_omp_clauses): Allow allocatable arrays in
975 firstprivate, lastprivate, reduction, copyprivate and copyin
977 (omp_current_do_code): Made static.
978 (omp_current_do_collapse): New variable.
979 (gfc_resolve_omp_do_blocks): Compute omp_current_do_collapse,
980 clear omp_current_do_code and omp_current_do_collapse on return.
981 (gfc_resolve_do_iterator): Handle collapsed do loops.
982 (resolve_omp_do): Likewise, diagnose errorneous collapsed do loops.
983 (OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED): Define.
984 (gfc_match_omp_clauses): Handle default (firstprivate),
985 schedule (auto), untied and collapse (n) clauses.
986 (OMP_DO_CLAUSES): Add OMP_CLAUSE_COLLAPSE.
987 (OMP_TASK_CLAUSES): Define.
988 (gfc_match_omp_task, gfc_match_omp_taskwait): New functions.
989 * trans-openmp.c (gfc_omp_private_outer_ref): New function.
990 (gfc_omp_clause_default_ctor): Add outer argument. For allocatable
991 arrays allocate them with the bounds of the outer var if outer
993 (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
994 gfc_omp_clause_dtor): New functions.
995 (gfc_trans_omp_array_reduction): If decl is allocatable array,
996 allocate it with outer var's bounds in OMP_CLAUSE_REDUCTION_INIT
997 and deallocate it in OMP_CLAUSE_REDUCTION_MERGE.
998 (gfc_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
999 for assumed-size arrays.
1000 (gfc_trans_omp_do): Add par_clauses argument. If dovar is
1001 present in lastprivate clause and do loop isn't simple,
1002 set OMP_CLAUSE_LASTPRIVATE_STMT. If dovar is present in
1003 parallel's lastprivate clause, change it to shared and add
1004 lastprivate clause to OMP_FOR_CLAUSES. Handle collapsed do loops.
1005 (gfc_trans_omp_directive): Adjust gfc_trans_omp_do callers.
1006 (gfc_trans_omp_parallel_do): Likewise. Move collapse clause to
1007 OMP_FOR from OMP_PARALLEL.
1008 (gfc_trans_omp_clauses): Handle OMP_SCHED_AUTO,
1009 OMP_DEFAULT_FIRSTPRIVATE, untied and collapse clauses.
1010 (gfc_trans_omp_task, gfc_trans_omp_taskwait): New functions.
1011 (gfc_trans_omp_directive): Handle EXEC_OMP_TASK and
1014 2008-06-04 Janus Weil <janus@gcc.gnu.org>
1018 * resolve.c (resolve_symbol): Correctly copy the interface for a
1019 PROCEDURE declaration.
1021 2008-06-02 Janus Weil <janus@gcc.gnu.org>
1024 * symbol.c (gfc_add_allocatable,gfc_add_dimension,
1025 gfc_add_explicit_interface): Added checks.
1026 * decl.c (attr_decl1): Added missing "var_locus".
1027 * parse.c (parse_interface): Checking for errors.
1029 2008-06-02 Daniel Kraft <d@domob.eu>
1031 * gfortran.h: New statement-type ST_FINAL for FINAL declarations.
1032 (struct gfc_symbol): New member f2k_derived.
1033 (struct gfc_namespace): New member finalizers, for use in the above
1034 mentioned f2k_derived namespace.
1035 (struct gfc_finalizer): New type defined for finalizers linked list.
1036 * match.h (gfc_match_final_decl): New function header.
1037 * decl.c (gfc_match_derived_decl): Create f2k_derived namespace on
1038 constructed symbol node.
1039 (gfc_match_final_decl): New function to match a FINAL declaration line.
1040 * parse.c (decode_statement): match-call for keyword FINAL.
1041 (parse_derived): Parse CONTAINS section and accept FINAL statements.
1042 * resolve.c (gfc_resolve_finalizers): New function to resolve (that is
1043 in this case, check) a list of finalizer procedures.
1044 (resolve_fl_derived): Call gfc_resolve_finalizers here.
1045 * symbol.c (gfc_get_namespace): Initialize new finalizers to NULL.
1046 (gfc_free_namespace): Free finalizers list.
1047 (gfc_new_symbol): Initialize new f2k_derived to NULL.
1048 (gfc_free_symbol): Free f2k_derived namespace.
1049 (gfc_free_finalizer): New function to free a single gfc_finalizer node.
1050 (gfc_free_finalizer_list): New function to free a linked list of
1051 gfc_finalizer nodes.
1053 2008-06-02 Daniel Franke <franke.daniel@gmail.com>
1057 * cpp.c (gfc_cpp_init): Do not initialize builtins if
1058 processing already preprocessed input.
1059 (gfc_cpp_preprocess): Finalize output with newline.
1061 2008-05-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1063 * intrinsic.texi: Revert wrong commit.
1065 2008-05-31 Steven G. Kargl <kargls@comcast.net>
1067 * arith.c (gfc_arith_init_1): Remove now unused r and c variables.
1068 Cleanup numerical inquiry function initialization.
1069 (gfc_arith_done_1): Replace multiple mpfr_clear() invocations with
1070 a single mpfr_clears().
1071 (gfc_check_real_range): Re-arrange logic to eliminate multiple
1072 unnecessary branching and assignments.
1073 (gfc_arith_times): Use mpfr_clears() in preference to multiple
1075 (gfc_arith_divide): Ditto.
1076 (complex_reciprocal): Eliminate now unused variables a, re, im.
1077 Cleanup the mpfr abuse. Use mpfr_clears() in preference to
1078 multiple mpfr_clear().
1079 (complex_pow): Fix comment whitespace. Use mpfr_clears() in
1080 preference to multiple mpfr_clear().
1081 * simplify.c (gfc_simplify_and): Remove blank line.
1082 (gfc_simplify_atan2): Move error checking earlier to eliminate
1083 a now unnecessay gfc_free_expr().
1084 (gfc_simplify_bessel_j0): Remove unnecessary gfc_set_model_kind().
1085 (gfc_simplify_bessel_j1): Ditto.
1086 (gfc_simplify_bessel_jn): Ditto.
1087 (gfc_simplify_bessel_y0): Ditto.
1088 (gfc_simplify_bessel_y1): Ditto.
1089 (gfc_simplify_bessel_yn): Ditto.
1090 (only_convert_cmplx_boz): Eliminate unnecessary duplicate code, and
1091 combine nested if statement rational expressions.
1092 (gfc_simplify_cos): Use mpfr_clears() in preference to multiple
1094 (gfc_simplify_exp): Ditto.
1095 (gfc_simplify_fraction): Move gfc_set_model_kind() to after the
1096 special case of 0. Use mpfr_clears() in preference to multiple
1098 (gfc_simplify_gamma): Eliminate unnecessary gfc_set_model_kind().
1099 (gfc_simplify_lgamma): Ditto.
1100 (gfc_simplify_log10): Ditto.
1101 (gfc_simplify_log): Move gfc_set_model_kind () inside switch
1102 statement. Use mpfr_clears() in preference to multiple mpfr_clear().
1103 (gfc_simplify_mod): Eliminate now unused variables quot, iquot,
1104 and term. Simplify the mpfr magic.
1105 (gfc_simplify_modulo): Ditto.
1106 (gfc_simplify_nearest): Eliminate unnecessary gfc_set_model_kind().
1107 (gfc_simplify_scale): Use mpfr_clears() in preference to multiple
1109 (gfc_simplify_sin): Ditto
1110 (gfc_simplify_sqrt): Ditto
1111 (gfc_simplify_set_exponent): Move gfc_set_model_kind() to after the
1112 special case of 0. Use mpfr_clears() in preference to multiple
1115 2008-05-29 Daniel Franke <franke.daniel@gmail.com>
1118 * Make-lang.in (F95_OBJS): Added dependency on FORTRAN_TARGET_OBJS.
1120 2008-05-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1122 * scanner.c (load_line): Add first_char argument. Don't call ungetc.
1123 (gfc_read_orig_filename): Adjust call to load_line. Don't call
1125 (load_file): Adjust call to load_line.
1127 2008-05-28 Janus Weil <janus@gcc.gnu.org>
1131 * interface.c (gfc_procedure_use): Enable argument checking for
1132 external procedures with explicit interface.
1133 * symbol.c (check_conflict): Fix conflict checking for externals.
1134 (copy_formal_args): Fix handling of arrays.
1135 * resolve.c (resolve_specific_f0, resolve_specific_s0): Fix handling
1137 * parse.c (parse_interface): Non-abstract INTERFACE statement implies
1140 2008-05-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1143 * intrinsic.c (gfc_convert_chartype): Don't mark conversion
1145 * trans-array.c (gfc_trans_array_ctor_element): Divide element
1146 size by the size of one character to obtain length.
1147 * iresolve.c (gfc_resolve_cshift): Call the _char4 variant when
1149 (gfc_resolve_eoshift): Likewise.
1150 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Minor beautification.
1151 (gfc_conv_intrinsic_fdate): Minor beautification.
1152 (gfc_conv_intrinsic_ttynam): Minor beautification.
1153 (gfc_conv_intrinsic_minmax_char): Allow all character kinds.
1154 (size_of_string_in_bytes): New function.
1155 (gfc_conv_intrinsic_size): Call size_of_string_in_bytes for
1156 character expressions.
1157 (gfc_conv_intrinsic_sizeof): Likewise.
1158 (gfc_conv_intrinsic_array_transfer): Likewise.
1159 (gfc_conv_intrinsic_trim): Allow all character kinds. Minor
1161 (gfc_conv_intrinsic_repeat): Fix comment typo.
1162 * simplify.c (gfc_convert_char_constant): Take care of conversion
1163 of array constructors.
1165 2008-05-27 Tobias Burnus <burnus@net-b.de>
1168 * trans-array.c (gfc_set_loop_bounds_from_array_spec):
1169 Add missing fold_convert.
1171 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
1173 * fortran/cpp.c (cpp_define_builtins): Remove usage of TARGET_* macros,
1174 added FIXME instead.
1176 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
1179 * lang.opt (A, C, CC, D, E, H, P, U, cpp, d, fworking-directory,
1180 imultilib, iprefix, iquote, isysroot, isystem, nocpp, nostdinc,
1181 o, undef, v): New options.
1182 * options.c (gfc_init_options): Also initialize preprocessor
1184 (gfc_post_options): Also handle post-initialization of preprocessor
1186 (gfc_handle_option): Check if option is a preprocessor option.
1187 If yes, let gfc_cpp_handle_option() handle the option.
1188 * lang-specs.h: Reorganized to handle new options.
1189 * scanner.c (gfc_new_file): Read temporary file instead of
1190 input source if preprocessing is enabled.
1191 * f95-lang.c (gfc_init): Initialize preprocessor.
1192 (gfc_finish): Clean up preprocessor.
1195 * Make-lang.in: Added new objects and dependencies.
1196 * gfortran.texi: Updated section "Preprocessing and
1197 conditional compilation".
1198 * invoke.texi: Added new section "Preprocessing Options",
1199 listed and documented the preprocessing options handled
1202 2008-05-25 Tobias Burnus <burnus@net-b.de>
1205 * trans-expr.c (gfc_conv_function_call): Remove library
1206 call for c_f_pointer with scalar Fortran pointers and for
1209 2008-05-21 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1212 * iresolve.c (check_charlen_present): Don't force the rank to 1.
1214 2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1217 * trans-expr.c (gfc_conv_string_tmp): Pick the correct type for
1218 the temporary variable.
1220 2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1222 * simplify.c (gfc_simplify_dble, gfc_simplify_real): Initialize
1223 result variable to avoid warnings.
1225 2008-05-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1227 * intrinsic.c (char_conversions, ncharconv): New static variables.
1228 (find_char_conv): New function.
1229 (add_functions): Add simplification functions for ADJUSTL and
1230 ADJUSTR. Don't check the kind of their argument. Add checking for
1231 LGE, LLE, LGT and LLT.
1232 (add_subroutines): Fix argument type for SLEEP. Fix argument name
1234 (add_char_conversions): New function.
1235 (gfc_intrinsic_init_1): Call add_char_conversions.
1236 (gfc_intrinsic_done_1): Free char_conversions.
1237 (check_arglist): Use kind == 0 as a signal that we don't want
1238 the kind value to be checked.
1239 (do_simplify): Also simplify character functions.
1240 (gfc_convert_chartype): New function
1241 * trans-array.c (gfc_trans_array_ctor_element): Don't force the
1242 use of default character type.
1243 (gfc_trans_array_constructor_value): Likewise.
1244 (get_array_ctor_var_strlen): Use integer kind to build an integer
1245 instead of a character kind!
1246 (gfc_build_constant_array_constructor): Don't force the use of
1247 default character type.
1248 (gfc_conv_loop_setup): Likewise.
1249 * trans-expr.c (gfc_conv_string_tmp): Don't force the use of
1250 default character type. Allocate enough memory for wide strings.
1251 (gfc_conv_concat_op): Make sure operand kind are the same.
1252 (string_to_single_character): Remove gfc_ prefix. Reindent.
1253 Don't force the use of default character type.
1254 (gfc_conv_scalar_char_value): Likewise.
1255 (gfc_build_compare_string): Call string_to_single_character.
1256 (fill_with_spaces): New function
1257 (gfc_trans_string_copy): Add kind arguments. Use them to deal
1258 with wide character kinds.
1259 (gfc_conv_statement_function): Whitespace fix. Call
1260 gfc_trans_string_copy with new kind arguments.
1261 (gfc_conv_substring_expr): Call gfc_build_wide_string_const
1262 instead of using gfc_widechar_to_char.
1263 (gfc_conv_string_parameter): Don't force the use of default
1265 (gfc_trans_scalar_assign): Pass kind args to gfc_trans_string_copy.
1266 * intrinsic.h (gfc_check_lge_lgt_lle_llt, gfc_convert_char_constant,
1267 gfc_resolve_adjustl, gfc_resolve_adjustr): New prototypes.
1268 * decl.c (gfc_set_constant_character_len): Don't assert the
1269 existence of a single character kind.
1270 * trans-array.h (gfc_trans_string_copy): New prototype.
1271 * gfortran.h (gfc_check_character_range, gfc_convert_chartype):
1273 * error.c (print_wide_char_into_buffer): New function lifting
1274 code from gfc_print_wide_char. Fix order to output '\x??' instead
1276 (gfc_print_wide_char): Call print_wide_char_into_buffer.
1277 (show_locus): Call print_wide_char_into_buffer with buffer local
1279 * trans-const.c (gfc_build_wide_string_const): New function.
1280 (gfc_conv_string_init): Deal with wide characters strings
1282 (gfc_conv_constant_to_tree): Call gfc_build_wide_string_const.
1283 * trans-stmt.c (gfc_trans_label_assign): Likewise.
1284 (gfc_trans_character_select): Deal with wide strings.
1285 * expr.c (gfc_check_assign): Allow conversion between character
1286 kinds on assignment.
1287 * trans-const.h (gfc_build_wide_string_const): New prototype.
1288 * trans-types.c (gfc_get_character_type_len_for_eltype,
1289 gfc_get_character_type_len): Create too variants of the old
1290 gfc_get_character_type_len, one getting kind argument and the
1291 other one directly taking a type tree.
1292 * trans.h (gfor_fndecl_select_string_char4,
1293 gfor_fndecl_convert_char1_to_char4,
1294 gfor_fndecl_convert_char4_to_char1): New prototypes.
1295 * trans-types.h (gfc_get_character_type_len_for_eltype): New
1297 * resolve.c (resolve_operator): Exit early when kind mismatches
1298 are detected, because that makes us issue an error message later.
1299 (validate_case_label_expr): Fix wording of error message.
1300 * iresolve.c (gfc_resolve_adjustl, gfc_resolve_adjustr): New
1302 (gfc_resolve_pack): Call _char4 variants of library function
1303 when dealing with wide characters.
1304 (gfc_resolve_reshape): Likewise.
1305 (gfc_resolve_spread): Likewise.
1306 (gfc_resolve_transpose): Likewise.
1307 (gfc_resolve_unpack): Likewise.
1308 * target-memory.c (size_character): Take character kind bit size
1309 correctly into account (not that it changes anything for now, but
1311 (gfc_encode_character): Added gfc_ prefix. Encoding each
1312 character of a string by calling native_encode_expr for the
1313 corresponding unsigned integer.
1314 (gfc_target_encode_expr): Add gfc_ prefix to encode_character.
1315 * trans-decl.c (gfc_build_intrinsic_function_decls): Build
1316 gfor_fndecl_select_string_char4, gfor_fndecl_convert_char1_to_char4
1317 and gfor_fndecl_convert_char4_to_char1.
1318 * target-memory.h (gfc_encode_character): New prototype.
1319 * arith.c (gfc_check_character_range): New function.
1320 (eval_intrinsic): Allow non-default character kinds.
1321 * check.c (gfc_check_access_func): Only allow default
1322 character kind arguments.
1323 (gfc_check_chdir): Likewise.
1324 (gfc_check_chdir_sub): Likewise.
1325 (gfc_check_chmod): Likewise.
1326 (gfc_check_chmod_sub): Likewise.
1327 (gfc_check_lge_lgt_lle_llt): New function.
1328 (gfc_check_link): Likewise.
1329 (gfc_check_link_sub): Likewise.
1330 (gfc_check_symlnk): Likewise.
1331 (gfc_check_symlnk_sub): Likewise.
1332 (gfc_check_rename): Likewise.
1333 (gfc_check_rename_sub): Likewise.
1334 (gfc_check_fgetputc_sub): Likewise.
1335 (gfc_check_fgetput_sub): Likewise.
1336 (gfc_check_stat): Likewise.
1337 (gfc_check_stat_sub): Likewise.
1338 (gfc_check_date_and_time): Likewise.
1339 (gfc_check_ctime_sub): Likewise.
1340 (gfc_check_fdate_sub): Likewise.
1341 (gfc_check_gerror): Likewise.
1342 (gfc_check_getcwd_sub): Likewise.
1343 (gfc_check_getarg): Likewise.
1344 (gfc_check_getlog): Likewise.
1345 (gfc_check_hostnm): Likewise.
1346 (gfc_check_hostnm_sub): Likewise.
1347 (gfc_check_ttynam_sub): Likewise.
1348 (gfc_check_perror): Likewise.
1349 (gfc_check_unlink): Likewise.
1350 (gfc_check_unlink_sub): Likewise.
1351 (gfc_check_system_sub): Likewise.
1352 * primary.c (got_delim): Perform correct character range checking
1354 * trans-intrinsic.c (gfc_conv_intrinsic_conversion): Generate
1355 calls to library functions convert_char4_to_char1 and
1356 convert_char1_to_char4 for character conversions.
1357 (gfc_conv_intrinsic_char): Allow all character kings.
1358 (gfc_conv_intrinsic_strcmp): Fix whitespace.
1359 (gfc_conv_intrinsic_repeat): Take care of all character kinds.
1360 * intrinsic.texi: For all GNU intrinsics accepting character
1361 arguments, mention that they're restricted to the default kind.
1362 * simplify.c (simplify_achar_char): New function.
1363 (gfc_simplify_achar, gfc_simplify_char): Call simplify_achar_char.
1364 gfc_simplify_ichar): Don't error out for wide characters.
1365 (gfc_convert_char_constant): New function.
1367 2008-05-18 Steven G. Kargl <kargls@comcast.net>
1370 * symbol.c (check_conflict): Issue errors for abuse of PUBLIC, PRIVATE,
1372 * resolve.c (gfc_verify_binding_labels): Fix NULL pointer dereference.
1374 2008-05-17 Tobias Burnus <burnus@net-b.de>
1376 * intrinsic.texi: Correct description of GET_COMMAND_ARGUMENT
1377 and GET_ENVIRONMENT_VARIABLE; fix keyword= name for GETENV,
1378 GETLOG, GMTIME, HOSTNM, IRAND, ITIME, KILL.
1379 Move LOG_GAMMA after LOG10.
1381 2008-05-17 Tobias Burnus <burnus@net-b.de>
1383 * intrinsic.c (add_functions): Change FLUSH(C) to FLUSH(UNIT).
1384 * intrinsic.texi: Change INTEGER(*) to INTEGER; fix keyword= name for
1385 ABS, ADJUSTL, AINT, ALLOCATED, ANINT, ASSOCIATED, C_ASSOCIATED,
1386 CEILING, DBLE, DFLOAT, DOT_PRODUCT, DREAL, FLOAT, FLOOR, GET_COMMAND.
1388 2008-05-16 Paul Thomas <pault@gcc.gnu.org>
1392 * trans-stmt.c (gfc_trans_where): Tighten up the dependency
1393 check for calling gfc_trans_where_3.
1396 * trans-stmt.c (gfc_trans_where_2): Set the mask size to zero
1397 if it is calculated to be negative.
1400 * trans-stmt.c (gfc_trans_where_3, gfc_trans_where_assign): Set
1401 ss->where for scalar right hand sides.
1402 * trans-array.c (gfc_add_loop_ss_code): If ss->where is set do
1403 not evaluate scalars outside the loop. Clean up whitespace.
1404 * trans.h : Add a bitfield 'where' to gfc_ss.
1406 2008-05-16 Tobias Burnus <burnus@net-b.de>
1408 * libgfortran.h: Increase GFC_MAX_DIMENSIONS to 15.
1409 * array.c (gfc_match_array_spec): Error with -std=f2003 if rank > 7.
1411 2008-04-16 Daniel Kraft <d@domob.eu>
1414 * gfortran.h: Added field "length_from_typespec" to gfc_charlength.
1415 * aray.c (gfc_match_array_constructor): Added code to parse typespec.
1416 (check_element_type, check_constructor_type, gfc_check_constructor_type):
1417 Extended to support explicit typespec on constructor.
1418 (gfc_resolve_character_array_constructor): Pad strings correctly for
1419 explicit, constant character length.
1420 * trans-array.c: New static global variable "typespec_chararray_ctor"
1421 (gfc_trans_array_constructor): New code to support explicit but dynamic
1424 2008-05-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1427 * decl.c (match_attr_spec): Check for matching pairs of parenthesis.
1428 * expr.c (gfc_specification_expr): Supplement the error message with the
1429 type that was found.
1430 * resolve.c (gfc_resolve_index): Likewise.
1431 * match.c (gfc_match_parens): Clarify error message with "at or before".
1432 (gfc_match_do): Check for matching pairs of parenthesis.
1434 2008-05-16 Tobias Burnus <burnus@net-b.de
1436 * intrinsic.texi: Write Fortran 77/90/95 instead of F77/90/95;
1437 add missing KIND argument to ACHAR and NINT; and state that
1438 the KIND argument is a F2003 extension for ACHAR, COUNT, IACHAR,
1439 ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND, VERIFY.
1441 2008-05-16 Daniel Kraft <d@domob.eu>
1443 * primary.c: New private structure "gfc_structure_ctor_component".
1444 (gfc_free_structure_ctor_component): New helper function.
1445 (gfc_match_structure_constructor): Extended largely to support named
1446 arguments and default initialization for structure constructors.
1448 2008-05-15 Steven G. Kargl <kargls@comcast.net>
1450 * simplify.c (gfc_simplify_dble, gfc_simplify_float,
1451 simplify_bound, gfc_simplify_nearest, gfc_simplify_real): Plug
1452 possible memory leaks.
1453 (gfc_simplify_reshape): Plug possible memory leaks and dereferencing
1456 2008-05-15 Steven G. Kargl <kargls@comcast.net>
1459 * simplify.c (gfc_simplify_int, gfc_simplify_intconv): Replaced hand
1460 rolled integer conversion with gfc_int2int, gfc_real2int, and
1462 (gfc_simplify_intconv): Renamed to simplify_intconv.
1464 2008-05-15 Steven G. Kargl, <kargl@comcast.net>
1465 * gfortran.dg/and_or_xor.f90: New test
1467 * fortran/simplify.c (gfc_simplify_and, gfc_simplify_or,
1468 gfc_simplify_xor): Don't range check logical results.
1470 2008-05-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1472 * trans-expr.c (gfc_conv_concat_op): Take care of nondefault
1474 (gfc_build_compare_string): Add kind argument and use it.
1475 (gfc_conv_statement_function): Fix indentation.
1476 * gfortran.h (gfc_character_info): New structure.
1477 (gfc_character_kinds): New array.
1478 * trans-types.c (gfc_character_kinds, gfc_character_types,
1479 gfc_pcharacter_types): New array.
1480 (gfc_init_kinds): Fill character kinds array.
1481 (validate_character): Take care of nondefault character kinds.
1482 (gfc_build_uint_type): New function.
1483 (gfc_init_types): Take care of nondefault character kinds.
1484 (gfc_get_char_type, gfc_get_pchar_type): New functions.
1485 (gfc_get_character_type_len): Use gfc_get_char_type.
1486 * trans.h (gfc_build_compare_string): Adjust prototype.
1487 (gfor_fndecl_compare_string_char4, gfor_fndecl_concat_string_char4,
1488 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
1489 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
1490 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
1491 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4): New
1493 * trans-types.h (gfc_get_char_type, gfc_get_pchar_type): New
1495 * trans-decl.c (gfor_fndecl_compare_string_char4,
1496 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
1497 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
1498 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
1499 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4,
1500 gfor_fndecl_concat_string_char4): New function decls.
1501 (gfc_build_intrinsic_function_decls): Define new *_char4 function
1503 * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char,
1504 gfc_conv_intrinsic_len_trim, gfc_conv_intrinsic_ichar,
1505 gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_trim,
1506 gfc_conv_intrinsic_function): Deal with nondefault character kinds.
1508 2008-05-15 Sa Liu <saliu@de.ibm.com>
1510 * iso-c-binding.def: Add standard parameter to macro NAMED_INTCST.
1511 All existing NAMED_INTCST definitions has standard GFC_STD_F2003,
1512 c_int128_t, c_int_least128_t and c_int_fast128_t are added as
1514 * iso-fortran-evn.def: Add standard parameter GFC_STD_F2003
1515 to macro NAMED_INTCST.
1516 * symbol.c (std_for_isocbinding_symbol): New helper function to
1517 return the standard that supports this isocbinding symbol.
1518 (generate_isocbinding_symbol): Do not generate GNU extension symbols
1519 if std=f2003. Add new parameter to NAMED_INTCST.
1520 * module.c (use_iso_fortran_env_module): Add new parameter to
1521 NAMED_INTCST and new field standard to struct intmod_sym.
1522 * gfortran.h: Add new parameter to NAMED_INTCST.
1523 * trans-types.c (init_c_interop_kinds): Add new parameter to
1525 * intrinsic.texi: Documented new types C_INT128_T, C_INT_LEASE128_T
1526 and C_INT_FAST128_T.
1528 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1531 * trans-decl.c (gfc_build_dummy_array_decl): Don't repack
1532 arrays that have the TARGET attribute.
1534 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1537 * simplify.c (only_convert_cmplx_boz): New function.
1538 (gfc_simplify_cmplx, gfc_simplify_complex, gfc_simplify_dcmplx):
1539 Call only_convert_cmplx_boz.
1541 2008-05-14 Paul Thomas <pault@gcc.gnu.org>
1544 * interface.c (compare_actual_formal): Do not check sizes if the
1545 actual is BT_PROCEDURE.
1547 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1550 * trans-array.c (gfc_conv_ss_startstride): Any negative size is
1551 the same as zero size.
1552 (gfc_conv_loop_setup): Fix size calculation.
1554 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1557 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Correctly
1558 handle zero-size sections.
1560 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1563 * scanner.c (preprocessor_line): Allocate enough memory for a
1566 2008-05-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1569 * target-memory.c (gfc_target_expr_size): Correctly treat
1571 (gfc_target_encode_expr): Likewise.
1572 (gfc_interpret_complex): Whitespace change.
1574 2008-05-11 Thomas Koenig <tkoenig@gcc.gnu.org>
1577 * trans.c (gfc_call_malloc): If size equals zero, allocate one
1578 byte; don't return a null pointer.
1580 2008-05-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1583 * module.c (quote_string): Fix sprintf format.
1585 2008-05-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1588 * module.c (quote_string, unquote_string,
1589 mio_allocated_wide_string): New functions.
1590 (mio_expr): Call mio_allocated_wide_string where needed.
1592 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
1594 * trans-decl.c (gfc_get_extern_function_decl, build_function_decl):
1595 Rename DECL_IS_PURE to DECL_PURE_P.
1597 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1599 * arith.c: (gfc_arith_concat, gfc_compare_string,
1600 gfc_compare_with_Cstring, hollerith2representation,
1601 gfc_hollerith2int, gfc_hollerith2real, gfc_hollerith2complex,
1602 gfc_hollerith2character, gfc_hollerith2logical): Use wide
1603 characters for character constants.
1604 * data.c (create_character_intializer): Likewise.
1605 * decl.c (gfc_set_constant_character_len): Likewise.
1606 * dump-parse-tree.c (show_char_const): Correctly dump wide
1608 error.c (print_wide_char): Rename into gfc_print_wide_char.
1609 (show_locus): Adapt to new prototype of gfc_print_wide_char.
1610 expr.c (free_expr0): Representation is now disjunct from
1611 character string value, so we always free it.
1612 (gfc_copy_expr, find_substring_ref, gfc_simplify_expr): Adapt
1613 to wide character strings.
1614 * gfortran.h (gfc_expr): Make value.character.string a wide string.
1615 (gfc_wide_toupper, gfc_wide_strncasecmp, gfc_wide_memset,
1616 gfc_widechar_to_char, gfc_char_to_widechar): New prototypes.
1617 (gfc_get_wide_string): New macro.
1618 (gfc_print_wide_char): New prototype.
1619 * io.c (format_string): Make a wide string.
1620 (next_char, gfc_match_format, compare_to_allowed_values,
1621 gfc_match_open): Deal with wide strings.
1622 * module.c (mio_expr): Convert between wide strings and ASCII ones.
1623 * primary.c (match_hollerith_constant, match_charkind_name):
1624 Handle wide strings.
1625 * resolve.c (build_default_init_expr): Likewise.
1626 * scanner.c (gfc_wide_toupper, gfc_wide_memset,
1627 gfc_char_to_widechar): New functions.
1628 (wide_strchr, gfc_widechar_to_char, gfc_wide_strncasecmp):
1629 Changes in prototypes.
1630 (gfc_define_undef_line, load_line, preprocessor_line,
1631 include_line, load_file, gfc_read_orig_filename): Handle wide
1633 * simplify.c (gfc_simplify_achar, gfc_simplify_adjustl,
1634 gfc_simplify_adjustr, gfc_simplify_char, gfc_simplify_iachar,
1635 gfc_simplify_ichar, simplify_min_max, gfc_simplify_new_line,
1636 gfc_simplify_repeat): Handle wide strings.
1637 (wide_strspn, wide_strcspn): New helper functions.
1638 (gfc_simplify_scan, gfc_simplify_trim, gfc_simplify_verify):
1639 Handle wide strings.
1640 * symbol.c (generate_isocbinding_symbol): Likewise.
1641 * target-memory.c (size_character, gfc_target_expr_size,
1642 encode_character, gfc_target_encode_expr, gfc_interpret_character,
1643 gfc_target_interpret_expr): Handle wide strings.
1644 * trans-const.c (gfc_conv_string_init): Lower wide strings to
1646 (gfc_conv_constant_to_tree): Likewise.
1647 * trans-expr.c (gfc_conv_substring_expr): Handle wide strings.
1648 * trans-io.c (gfc_new_nml_name_expr): Likewise.
1649 * trans-stmt.c (gfc_trans_label_assign): Likewise.
1651 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1653 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
1654 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
1655 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): Mark arguments
1656 with ATTRIBUTE_UNUSED.
1658 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1660 * check.c (gfc_check_sizeof): Switch to ATTRIBUTE_UNUSED.
1661 * simplify.c (gfc_simplify_lgamma): Likewise.
1663 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1665 * openmp.c (gfc_match_omp_eos): Use gfc_next_ascii_char and
1666 gfc_peek_ascii_char.
1667 * decl.c (gfc_match_kind_spec, gfc_match_type_spec,
1668 gfc_match_implicit_none, match_implicit_range, gfc_match_implicit,
1669 match_string_p, match_attr_spec, gfc_match_suffix,
1670 match_procedure_decl, gfc_match_entry, gfc_match_subroutine):
1672 * gfortran.h (gfc_char_t): New type.
1673 (gfc_linebuf): Make line member a gfc_char_t.
1674 (locus): Make nextc member a gfc_char_t.
1675 (gfc_wide_is_printable, gfc_wide_is_digit, gfc_wide_fits_in_byte,
1676 gfc_wide_tolower, gfc_wide_strlen, gfc_next_ascii_char,
1677 gfc_peek_ascii_char, gfc_check_digit): New prototypes.
1678 * error.c (print_wide_char): New function.
1679 (show_locus): Use print_wide_char and gfc_wide_strlen.
1680 * io.c (next_char): Use gfc_char_t type.
1681 (match_io): Use gfc_peek_ascii_char and gfc_next_ascii_char.
1682 * match.c (gfc_match_parens, gfc_match_eos,
1683 gfc_match_small_literal_int, gfc_match_name, gfc_match_name_C,
1684 gfc_match_intrinsic_op, gfc_match_char, gfc_match_return,
1685 gfc_match_common): Likewise.
1686 * match.h (gfc_match_special_char): Change prototype.
1687 * parse.c (decode_specification_statement, decode_statement,
1688 decode_omp_directive, next_free, next_fixed): Use
1689 gfc_peek_ascii_char and gfc_next_ascii_char.
1690 * primary.c (gfc_check_digit): Change name.
1691 (match_digits, match_hollerith_constant, match_boz_constant,
1692 match_real_constant, next_string_char, match_charkind_name,
1693 match_string_constant, match_logical_constant_string,
1694 match_complex_constant, match_actual_arg, match_varspec,
1695 gfc_match_rvalue, match_variable): Use gfc_peek_ascii_char and
1696 gfc_next_ascii_char.
1697 * scanner.c (gfc_wide_fits_in_byte, wide_is_ascii,
1698 gfc_wide_is_printable, gfc_wide_tolower, gfc_wide_is_digit,
1699 gfc_wide_is_digit, wide_atoi, gfc_wide_strlen, wide_strcpy,
1700 wide_strchr, widechar_to_char, wide_strncmp, wide_strncasecmp,
1701 gfc_next_ascii_char, gfc_peek_ascii_char):
1703 (next_char, gfc_define_undef_line, skip_free_comments,
1704 gfc_next_char_literal, gfc_next_char, gfc_peek_char,
1705 gfc_error_recovery, load_line, preprocessor_line, include_line,
1706 load_file, gfc_read_orig_filename): Use gfc_char_t for source
1707 characters and the {gfc_,}wide_* functions to manipulate wide
1710 2008-05-06 Tobias Burnus <burnus@net-b.de>
1713 * intrinsic.c (add_functions): Call gfc_simplify_bessel_*.
1714 * intrinsic.h: Add prototypes for gfc_simplify_bessel_*.
1715 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
1716 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
1717 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): New.
1719 2008-05-03 Janus Weil <jaydub66@gmail.com>
1721 * misc.c (gfc_clear_ts): Set interface to NULL.
1723 2008-05-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1726 * gfortran.h: Add extra_comma pointer to gfc_dt structure. Add iokind to
1727 gfc_expr value union. Add io_kind enum to here from io.c.
1728 * io.c (gfc_free_dt): Free extra_comma.
1729 (gfc_resolve_dt): If an extra comma was encountered and io_unit is type
1730 BT_CHARACTER, resolve to format_expr and set default unit. Error if
1731 io_kind is M_WRITE. (match_io): Match the extra comma and set new
1732 pointer, extra_comma.
1734 2008-05-01 Bud Davis <bdavis9659@sbcglobal.net>
1737 * simplify.c (gfc_simplify_index): Check for direction argument
1740 2008-05-01 Janus Weil <jaydub66@gmail.com>
1742 * gfortran.h (struct gfc_symbol): Moving "interface" member to
1743 gfc_typespec (plus fixing a small docu error).
1744 * interface.c (gfc_procedure_use): Ditto.
1745 * decl.c (match_procedure_decl): Ditto.
1746 * resolve.c (resolve_specific_f0,
1747 resolve_specific_f0, resolve_symbol): Ditto.
1749 2008-04-30 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1751 * intrinsic.c (add_functions): Add SELECTED_CHAR_KIND intrinsic.
1752 * intrinsic.h (gfc_check_selected_char_kind,
1753 gfc_simplify_selected_char_kind): New prototypes.
1754 * gfortran.h (gfc_isym_id): Add GFC_ISYM_SC_KIND.
1755 * trans.h (gfor_fndecl_sc_kind): New function decl.
1756 * trans-decl.c (gfor_fndecl_sc_kind): Build new decl.
1757 * arith.c (gfc_compare_with_Cstring): New function.
1758 * arith.h (gfc_compare_with_Cstring): New prototype.
1759 * check.c (gfc_check_selected_char_kind): New function.
1760 * primary.c (match_string_constant, match_kind_param): Mark
1761 symbols used as literal constant kind param as referenced.
1762 * trans-intrinsic.c (gfc_conv_intrinsic_sc_kind): New function.
1763 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_sc_kind.
1764 * intrinsic.texi (SELECTED_CHAR_KIND): Document new intrinsic.
1765 * simplify.c (gfc_simplify_selected_char_kind): New function.
1767 2008-04-28 Paul Thomas <pault@gcc.gnu.org>
1770 * module.c (find_symbol): Do not return a result for a symbol
1771 that has been renamed in another module.
1773 2008-04-26 George Helffrich <george@gcc.gnu.org>
1777 * trans-common.c (create_common): Add decl to function
1778 chain (if inside one) to preserve identifier scope in debug output.
1780 2008-04-25 Jan Hubicka <jh@suse.cz>
1782 * trans-decl.c (trans_function_start): Update.
1784 2008-04-25 Tobias Burnus <burnus@net-b.de>
1785 Daniel Franke <franke.daniel@gmail.com>
1788 * gfortranspec.c (lang_specific_driver): Deprecate
1789 -M option; fix ICE when "-M" is last argument and
1790 make "-M<dir>" work.
1791 * options.c (gfc_handle_module_path_options):
1792 Use -J instead of -M in error messages.
1793 * invoke.texi: Mark -M as depecated.
1795 2008-04-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1796 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1799 * trans-instrinsic.c (gfc_conv_intrinsic_minmaxloc): Correctly adjust
1800 loop counter offset.
1802 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1804 * trans-expr.c (gfc_conv_structure): Don't set TREE_INVARIANT.
1805 * trans-array.c (gfc_build_null_descriptor): Don't set TREE_INVARIANT.
1806 (gfc_trans_array_constructor_value): Don't set TREE_INVARIANT.
1807 (gfc_build_constant_array_constructor): Don't set TREE_INVARIANT.
1808 (gfc_conv_array_initializer): Don't set TREE_INVARIANT.
1809 * trans-common.c (get_init_field): Don't set TREE_INVARIANT.
1810 (create_common): Don't set TREE_INVARIANT.
1811 * trans-stmt.c (gfc_trans_character_select): Don't set TREE_INVARIANT.
1812 * trans-decl.c (gfc_generate_function_code): Don't set TREE_INVARIANT.
1814 2008-04-21 Steve Ellcey <sje@cup.hp.com>
1816 * f95-lang.c (gfc_init_decl_processing): use ptr_mode instead of Pmode.
1818 2008-04-21 Daniel Franke <franke.daniel@gmail.com>
1821 * gfortranspec.c (lookup_option): Properly handle separated arguments
1822 in -J option, print missing argument message when necessary.
1824 2008-04-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1827 * scanner.c (skip_fixed_comments): Update continue_line when comment is
1828 detected. (gfc_next_char_literal): Likewise.
1830 2008-04-19 Paul Thomas <pault@gcc.gnu.org>
1835 * trans_array.c (gfc_trans_array_constructor): Temporarily
1836 realign loop, if loop->from is not zero, before creating
1837 the temporary array and provide an offset.
1840 * trans-decl.c (gfc_init_default_dt): Add gfc_ prefix to name
1841 and allow for NULL body. Change all references from
1842 init_default_dt to gfc_init_default_dt.
1843 * trans.h : Add prototype for gfc_init_default_dt.
1844 * trans-array.c (gfc_trans_deferred_vars): After nullification
1845 call gfc_init_default_dt for derived types with allocatable
1848 2008-04-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1851 * trans-common.c (create_common): Revert patch causing regression.
1853 2008-04-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1856 * iresolve.c (gfc_resolve_eoshift): Check for NULL symtree in test for
1857 optional argument attribute.
1859 2008-04-16 Paul Thomas <pault@gcc.gnu.org>
1862 * trans-intrinsic.c (gfc_conv_intrinsic_char): Even though KIND
1863 is not used, the argument must be converted.
1865 2008-04-16 Jakub Jelinek <jakub@redhat.com>
1868 * f95-lang.c (gfc_init_builtin_functions): Make sure
1869 BUILT_IN_SINCOS{,F,L} types aren't varargs.
1871 2008-04-15 Paul Thomas <pault@gcc.gnu.org>
1874 * expr.c (scalarize_intrinsic_call): Reorder identification of
1875 array argument so that if one is not found a segfault does not
1876 occur. Return FAILURE if all scalar arguments.
1878 2008-04-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1879 Tobias Burnus <burnus@net-b.de>
1882 * options.c (gfc_init_options): Set the default maximum continuation
1883 lines to 255 for both free and fixed form source for warnings.
1884 (gfc_handle_option): Set -std=f95 fixed form max continuations to 19 and
1885 the -std=f95 free form max continuations to 39 for warnings.
1886 * scanner.c (gfc_next_char_literal): Adjust the current_line number only
1887 if it is less than the current locus.
1889 2008-04-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1891 PR fortran/25829 28655
1892 * io.c (io_tag): Add new tags for decimal, encoding, asynchronous,
1893 round, sign, and id. (match_open_element): Match new tags.
1894 (gfc_resolve_open): Resolve new tags. (gfc_match_open): Enable encoding
1895 for DEFAULT only. Update error messages. (match_dt_element): Fix match
1896 tag for asynchronous. Update error messages. (gfc_free_inquire): Free
1897 new expressions. (match_inquire_element): Match new tags.
1898 (gfc_match_inquire): Add constraint for ID and PENDING.
1899 (gfc_resolve_inquire): Resolve new tags.
1900 * trans-io.c (gfc_trans_inquire): Clean up whitespace and fix setting of
1901 mask for ID parameter.
1902 * ioparm.def: Fix order of parameters for pending, round, and sign.
1903 NOTE: These must line up with the definitions in libgfortran/io/io.h. or
1906 2008-04-06 Paul Thomas <pault@gcc.gnu.org>
1909 * expr.c (scalarize_intrinsic_call): Identify which argument is
1910 an array and use that as the template.
1911 (check_init_expr): Remove tests that first argument is an array
1912 in the call to scalarize_intrinsic_call.
1914 2008-04-06 Tobias Schlüter <tobi@gcc.gnu.org>
1917 * io.c (io_tag): Add field 'value'. Split 'spec' field in
1919 (match_etag, match_vtag, match_ltag): Split parsing in two steps
1920 to give better error messages.
1922 2008-04-06 Tobias Burnus <burnus@net-b.de>
1924 * io.c (check_io_constraints): Add constrains. ID= requires
1925 asynchronous= and asynchronous= must be init expression.
1927 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1929 * f95-lang.c: Set LANG_HOOKS_NAME to "GNU Fortran".
1931 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1933 * dump-parse-tree.c: Use fprintf, fputs and fputc instead of
1934 gfc_status and gfc_status_char. Remove gfc_ prefix of the gfc_show_*
1935 functions and make them static. Add new gfc_dump_parse_tree
1937 * gfortran.h (gfc_option_t): Rename verbose into dump_parse_tree.
1938 (gfc_status, gfc_status_char): Delete prototypes.
1939 * error.c (gfc_status, gfc_status_char): Remove functions.
1940 * scanner.c (gfc_new_file): Use printf instead of gfc_status.
1941 * options.c (gfc_init_options): Rename verbose into dump_parse_tree.
1942 (gfc_handle_module_path_options): Use gfc_fatal_error instead of
1943 gfc_status and exit.
1944 (gfc_handle_option): Rename verbose into dump_parse_tree.
1945 * parse.c (gfc_parse_file): Use gfc_dump_parse_tree.
1947 2008-04-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1948 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1950 PR fortran/25829 28655
1951 * dump-parse-tree.c (gfc_show_code_node): Show new I/O parameters.
1952 * gfortran.h (gfc_statement): Add ST_WAIT enumerator.
1953 (gfc_open): Add pointers for decimal, encoding, round, sign,
1954 asynchronous. (gfc_inquire): Add pointers for asynchronous, decimal,
1955 encoding, pending, round, sign, size, id.
1956 (gfc_wait): New typedef struct. (gfc_dt): Add pointers for id, pos,
1957 asynchronous, blank, decimal, delim, pad, round, sign.
1958 (gfc_exec_op): Add EXEC_WAIT enumerator. (gfc_code): Add pointer for
1959 wait. (gfc_free_wait), (gfc_resolve_wait): New function prototypes.
1960 * trans-stmt.h (gfc_trans_wait): New function prototype.
1961 * trans.c (gfc_trans_code): Add case for EXEC_WAIT.
1962 * io.c (io_tag): Add new tags for DECIMAL, ENCODING, ROUND, SIGN,
1963 ASYCHRONOUS, ID. (match_open_element): Add matchers for new tags.
1964 (gfc_free_open): Free new pointers. (gfc_resolve_open): Resolve new
1965 tags. (gfc_resolve_open): Remove comment around check for allowed
1966 values and ASYNCHRONOUS, update it. Likewise for DECIMAL, ENCODING,
1967 ROUND, and SIGN. (match_dt_element): Add matching for new tags.
1968 (gfc_free_wait): New function. (gfc_resolve_wait): New function.
1969 (match_wait_element): New function. (gfc_match_wait): New function.
1970 * resolve.c (gfc_resolve_blocks): Add case for EXEC_WAIT.
1971 (resolve_code): Add case for EXEC_WAIT.
1972 * st.c (gfc_free_statement): Add case for EXEC_WAIT.
1973 * trans-io.c (ioparam_type): Add IOPARM_ptype_wait. (gfc_st_parameter):
1974 Add "wait" entry. (iocall): Add IOCALL_WAIT enumerator.
1975 (gfc_build_io_library_fndecls): Add function declaration for st_wait.
1976 (gfc_trans_open): Add mask bits for new I/O tags.
1977 (gfc_trans_inquire): Add mask bits for new I/O tags.
1978 (gfc_trans_wait): New translation function.
1979 (build_dt): Add mask bits for new I/O tags.
1980 * match.c (gfc_match_if) Add matcher for "wait".
1981 * match.h (gfc_match_wait): Prototype for new function.
1982 * ioparm.def: Add new I/O parameter definitions.
1983 * parse.c (decode_statement): Add match for "wait" statement.
1984 (next_statement): Add case for ST_WAIT. (gfc_ascii_statement): Same.
1986 2008-04-03 Jakub Jelinek <jakub@redhat.com>
1989 * openmp.c (resolve_omp_clauses): Diagnose if a clause symbol
1992 2008-04-03 Tom Tromey <tromey@redhat.com>
1994 * Make-lang.in (fortran_OBJS): New variable.
1996 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1998 * f95-lang.c (insert_block): Kill.
2000 2008-04-01 George Helffrich <george@gcc.gnu.org>
2002 PR fortran/35154, fortran/23057
2003 * trans-common.c (create_common): Add decl to function
2004 chain to preserve identifier scope in debug output.
2006 2008-04-01 Joseph Myers <joseph@codesourcery.com>
2008 * gfortran.texi: Include gpl_v3.texi instead of gpl.texi
2009 * Make-lang.in (GFORTRAN_TEXI): Include gpl_v3.texi instead of
2012 2008-03-30 Paul Thomas <pault@gcc.gnu.org>
2015 * resolve.c (resolve_function, resolve_call): If the procedure
2016 is elemental do not look for noncopying intrinsics.
2018 2008-03-29 Paul Thomas <pault@gcc.gnu.org>
2021 * trans-array.c (gfc_array_init_size): Set 'size' zero if
2022 negative in one dimension.
2025 * trans-expr.c (gfc_trans_string_copy): Only assign a char
2026 directly if the lhs and rhs types are the same.
2028 2008-03-28 Daniel Franke <franke.daniel@gmail.com>
2029 Paul Richard Thomas <paul.richard.thomas@gmail.com>
2032 * primary.c (match_variable): Improved matching of function
2034 * resolve.c (resolve_allocate_deallocate): Removed checks if
2035 the actual argument for STAT is a variable.
2037 2008-03-28 Tobias Burnus <burnus@net-b.de>
2039 * symbol.c (gfc_get_default_type): Fix error message; option
2040 -fallow_leading_underscore should be -fallow-leading-underscore
2042 2008-03-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2045 * iresolve.c (gfc_resolve_cshift): Check for NULL symtree in test for
2046 optional argument attribute.
2048 2008-03-27 Tom Tromey <tromey@redhat.com>
2050 * Make-lang.in: Revert automatic dependency patch.
2052 2008-03-25 Tom Tromey <tromey@redhat.com>
2054 * Make-lang.in: Remove .o targets.
2055 (fortran_OBJS): New variable.
2056 (fortran/gfortranspec.o): Move to fortran/. Reduce to variable
2058 (GFORTRAN_D_OBJS): Update.
2059 (GFORTRAN_TRANS_DEPS): Remove.
2061 2008-03-24 Paul Thomas <pault@gcc.gnu.org>
2064 * resolve.c (resolve_structure_cons): It is an error to assign
2065 NULL to anything other than a pointer or allocatable component.
2068 * resolve.c (resolve_symbol): If the symbol is a derived type,
2069 resolve the derived type. If the symbol is a derived type
2070 function, ensure that the derived type is visible in the same
2071 namespace as the function.
2073 2008-03-23 Tobias Schlüter <tobi@gcc.gnu.org>
2075 * trans.h: Use fold_build in build1_v, build2_v and build3_v
2077 * trans-openmp.c (gfc_trans_omp_critical, gfc_trans_omp_single):
2078 Don't use build2_v macro.
2080 2008-03-19 Daniel Franke <franke.daniel@gmail.com>
2083 * interface.c (gfc_procedure_use): Check for keyworded arguments in
2084 procedures without explicit interfaces.
2086 2008-03-16 Paul Thomas <pault@gcc.gnu.org>
2089 * resolve.c (check_assumed_size_reference): Only visit the
2090 first reference and look directly at the highest dimension.
2092 2008-03-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2095 * trans-array.c (gfc_conv_array_index_offset): Remove unnecessary
2098 2008-03-15 Daniel Franke <franke.daniel@gmail.com>
2101 * resolve.c (resolve_branch): Less strict and pessimistic warning
2104 2008-03-11 Paolo Bonzini <bonzini@gnu.org>
2106 * f95-lang.c (LANG_HOOKS_CLEAR_BINDING_STACK): Delete.
2107 (gfc_be_parse_file): Call clear_binding_stack from here.
2108 (gfc_clear_binding_stack): Rename to clear_binding_stack.
2110 2008-03-09 Paul Thomas <pault@gcc.gnu.org>
2113 * module.c (mio_symtree_ref): After providing a symbol for a
2114 missing equivalence member, resolve and NULL the fixups.
2116 2008-03-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2118 * invoke.texi (Error and Warning Options): Document
2121 2008-03-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2124 * trans-array.c (gfc_conv_ss_startstride): Fix the logic to avoid
2125 checking bounds of absent optional arguments.
2127 2008-03-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2130 * intrinsic.c (add_functions): Add simplification routines for
2131 ERF, DERF, ERFC and DERFC.
2132 * decl.c (gfc_match_suffix, gfc_match_subroutine): Change GNU
2133 extensions into Fortran 2008 features.
2134 * intrinsic.h (gfc_simplify_erf, gfc_simplify_erfc): New
2136 * simplify.c (gfc_simplify_erf, gfc_simplify_erfc): New functions.
2138 2008-03-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2141 * intrinsic.c (add_functions): Modify intrinsics ACOSH, ASINH,
2142 ATANH, ERF, ERFC and GAMMA. Add intrinsics BESSEL_{J,Y}{0,1,N},
2143 ERFC_SCALED, LOG_GAMMA and HYPOT.
2144 * intrinsic.h (gfc_check_hypot, gfc_simplify_hypot,
2145 gfc_resolve_hypot): New prototypes.
2146 * mathbuiltins.def: Add HYPOT builtin. Make complex versions of
2147 ACOSH, ASINH and ATANH available.
2148 * gfortran.h (GFC_ISYM_ERFC_SCALED, GFC_ISYM_HYPOT): New values.
2149 * lang.opt: Add -std=f2008 option.
2150 * libgfortran.h: Define GFC_STD_F2008.
2151 * lang-specs.h: Add .f08 and .F08 file suffixes.
2152 * iresolve.c (gfc_resolve_hypot): New function.
2153 * parse.c (parse_contained): Allow empty CONTAINS for Fortran 2008.
2154 * check.c (gfc_check_hypot): New function.
2155 * trans-intrinsic.c (gfc_intrinsic_map): Define ERFC_SCALE builtin.
2156 * options.c (set_default_std_flags): Allow Fortran 2008 by default.
2157 (form_from_filename): Add .f08 suffix.
2158 (gfc_handle_option): Handle -std=f2008 option.
2159 * simplify.c (gfc_simplify_hypot): New function.
2160 * gfortran.texi: Document Fortran 2008 status and file extensions.
2161 * intrinsic.texi: Document new BESSEL_{J,Y}{0,1,N} intrinsics,
2162 as well as HYPOT and ERFC_SCALED. Update documentation of ERF,
2163 ERFC, GAMMA, LGAMMA, ASINH, ACOSH and ATANH.
2164 * invoke.texi: Document the new -std=f2008 option.
2166 2008-03-02 Jakub Jelinek <jakub@redhat.com>
2168 * gfortranspec.c (lang_specific_driver): Update copyright notice
2171 2008-02-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2174 * expr.c (find_array_element): Modify traversing the constructor to
2175 avoid trying to access NULL memory pointed to by next for the
2176 last element. (find_array_section): Exit while loop if cons->next is
2178 * trans-expr.c (gfc_conv_scalar_char_value): Initialize gfc_typespec.
2179 (gfc_conv_function_call): Same.
2180 * decl.c (gfc_match_implicit): Same.
2181 * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Same.
2183 2008-02-28 Daniel Franke <franke.daniel@gmail.com>
2188 * lang.opt: Added -Wreturn-type.
2189 * options.c (gfc_handle_option): Recognize -Wreturn-type.
2190 * trans-decl.c (gfc_trans_deferred_vars): Emit warnings for funtions
2191 where the result value is not set.
2192 (gfc_generate_function_code): Likewise.
2193 (generate_local_decl): Emit warnings for funtions whose RESULT
2194 variable is not set.
2196 2008-02-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2199 * trans-expr.c (gfc_conv_variable): Don't build indirect
2200 references when explicit interface is mandated.
2201 * resolve.c (resolve_formal_arglist): Set attr.always_explicit
2202 on the result symbol as well as the procedure symbol.
2204 2008-02-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2207 * trans.h: Remove prototypes for gfor_fndecl_math_exponent4,
2208 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
2209 gfor_fndecl_math_exponent16.
2210 * f95-lang.c (build_builtin_fntypes): Add new function types.
2211 (gfc_init_builtin_functions): Add new builtins for nextafter,
2212 frexp, ldexp, fabs, scalbn and inf.
2213 * iresolve.c (gfc_resolve_rrspacing): Don't add hidden arguments.
2214 (gfc_resolve_scale): Don't convert type of second argument.
2215 (gfc_resolve_set_exponent): Likewise.
2216 (gfc_resolve_size): Don't add hidden arguments.
2217 * trans-decl.c: Remove gfor_fndecl_math_exponent4,
2218 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
2219 gfor_fndecl_math_exponent16.
2220 * trans-intrinsic.c (gfc_intrinsic_map): Remove intrinsics
2221 for scalbn, fraction, nearest, rrspacing, set_exponent and
2223 (gfc_conv_intrinsic_exponent): Directly call frexp.
2224 (gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_nearest,
2225 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
2226 gfc_conv_intrinsic_scale, gfc_conv_intrinsic_set_exponent): New
2228 (gfc_conv_intrinsic_function): Use the new functions above.
2230 2008-02-26 Tobias Burnus <burnus@net-b.de>
2233 * interface.c (check_operator_interface): Show better line for error
2234 messages; fix constrains for user-defined assignment operators.
2235 (gfc_extend_assign): Fix constrains for user-defined assignment
2238 2008-02-26 Tom Tromey <tromey@redhat.com>
2240 * trans-io.c (set_error_locus): Remove old location code.
2241 * trans-decl.c (gfc_set_decl_location): Remove old location code.
2242 * f95-lang.c (gfc_init): Remove test of USE_MAPPED_LOCATION.
2243 * scanner.c (gfc_gobble_whitespace): Remove old location code.
2244 (get_file): Likewise.
2245 (preprocessor_line): Likewise.
2246 (load_file): Likewise.
2247 (gfc_new_file): Likewise.
2248 * trans.c (gfc_trans_runtime_check): Remove old location code.
2249 (gfc_get_backend_locus): Likewise.
2250 (gfc_set_backend_locus): Likewise.
2251 * data.c (gfc_assign_data_value): Remove old location code.
2252 * error.c (show_locus): Remove old location code.
2253 * gfortran.h (gfc_linebuf): Remove old location code.
2254 (gfc_linebuf_linenum): Remove old-location variant.
2256 2008-02-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2259 * trans-const.c (gfc_build_string_const): Don't call gettext.
2260 (gfc_build_localized_string_const): New function.
2261 * trans-const.h (gfc_build_localized_string_const): New prototype.
2262 * trans.c (gfc_trans_runtime_check): Use
2263 gfc_build_localized_string_const instead of gfc_build_string_const.
2264 (gfc_call_malloc): Likewise.
2265 (gfc_allocate_with_status): Likewise.
2266 (gfc_allocate_array_with_status): Likewise.
2267 (gfc_deallocate_with_status): Likewise.
2268 (gfc_call_realloc): Likewise.
2269 * trans-io.c (gfc_trans_io_runtime_check): Likewise.
2271 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
2273 * arith.c: Update copyright years.
2274 * arith.h: Likewise.
2275 * array.c: Likewise.
2277 * check.c: Likewise.
2281 * dependency.c: Likewise.
2282 * dependency.h: Likewise.
2283 * dump-parse-tree.c: Likewise.
2284 * error.c: Likewise.
2286 * gfc-internals.texi: Likewise.
2287 * gfortran.h: Likewise.
2288 * gfortran.texi: Likewise.
2289 * gfortranspec.c: Likewise.
2290 * interface.c: Likewise.
2291 * intrinsic.c: Likewise.
2292 * intrinsic.h: Likewise.
2293 * intrinsic.texi: Likewise.
2294 * invoke.texi: Likewise.
2296 * iresolve.c: Likewise.
2297 * iso-c-binding.def: Likewise.
2298 * iso-fortran-env.def: Likewise.
2299 * lang-specs.h: Likewise.
2300 * lang.opt: Likewise.
2301 * libgfortran.h: Likewise.
2302 * match.c: Likewise.
2303 * match.h: Likewise.
2304 * matchexp.c: Likewise.
2306 * module.c: Likewise.
2307 * openmp.c: Likewise.
2308 * options.c: Likewise.
2309 * parse.c: Likewise.
2310 * parse.h: Likewise.
2311 * primary.c: Likewise.
2312 * resolve.c: Likewise.
2313 * scanner.c: Likewise.
2314 * simplify.c: Likewise.
2316 * symbol.c: Likewise.
2317 * target-memory.c: Likewise.
2318 * target-memory.h: Likewise.
2319 * trans-array.h: Likewise.
2320 * trans-const.h: Likewise.
2321 * trans-stmt.h: Likewise.
2322 * trans-types.c: Likewise.
2323 * trans-types.h: Likewise.
2324 * types.def: Likewise.
2326 2008-02-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2329 * simplify.c (gfc_simplify_ibclr), (gfc_simplify_ibits),
2330 (gfc_simplify_ibset): Remove call to range_check.
2331 (simplify_cmplx), (gfc_simplify_dble), (gfc_simplify_float)
2332 (gfc_simplify_real): Add call gfc_clear_ts to initialize the
2333 temporary gfc_typspec variable.
2335 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
2337 * trans-array.c (gfc_conv_descriptor_data_get,
2338 gfc_conv_descriptor_data_set_internal,
2339 gfc_conv_descriptor_data_addr, gfc_conv_descriptor_offset,
2340 gfc_conv_descriptor_dtype, gfc_conv_descriptor_dimension,
2341 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
2342 gfc_conv_descriptor_ubound, gfc_trans_create_temp_array,
2343 gfc_conv_array_transpose, gfc_grow_array,
2344 gfc_trans_array_constructor_subarray,
2345 gfc_trans_array_constructor_value, gfc_trans_scalarized_loop_end,
2346 gfc_array_init_size, gfc_array_allocate, gfc_array_deallocate,
2347 gfc_conv_array_initializer, gfc_trans_array_bounds,
2348 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
2349 gfc_get_dataptr_offset, gfc_conv_array_parameter,
2350 gfc_trans_dealloc_allocated, get_full_array_size,
2351 gfc_duplicate_allocatable, structure_alloc_comps): Use fold_buildN
2353 * trans-expr.c (gfc_conv_expr_present, gfc_conv_missing_dummy,
2354 gfc_conv_component_ref, gfc_conv_cst_int_power,
2355 gfc_conv_function_call, gfc_trans_structur_assign): Likewise.
2356 * trans-common.c (create_common): Likewise.
2357 * trans-openmp.c (gfc_trans_omp_atomic, gfc_trans_omp_do):
2359 * trans-const.c (gfc_conv_constant_to_tree): Likewise.
2360 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_do,
2361 gfc_trans_integer_select, gfc_trans_character_select,
2362 gfc_trans_forall_loop, compute_overall_iter_number,
2363 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_allocate,
2364 gfc_trans_deallocate): Likewise.
2365 * trans.c (gfc_build_addr_expr, gfc_trans_runtime_check,
2366 gfc_allocate_with_status, gfc_allocate_array_with_status,
2367 gfc_deallocate_with_status): Likewise.
2368 * f95-lang.c (gfc_truthvalue_conversion): Likewise.
2369 * trans-io.c (set_parameter_const, set_parameter_value,
2370 set_parameter_ref, set_string, set_internal_unit, io_result,
2371 set_error_locus, nml_get_addr_expr, transfer_expr): Likewise.
2372 * trans-decl.c (gfc_build_qualified_array, build_entry_thunks,
2373 gfc_get_fake_result_decl, gfc_trans_auto_character_variable,
2374 gfc_generate_function_code): Likewise.
2375 * convert.c (convert): Likewise.
2376 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
2377 build_fixbound_expr, build_fix_expr, gfc_conv_intrinsic_aint,
2378 gfc_conv_intrinsic_int, gfc_conv_intrinsic_imagpart,
2379 gfc_conv_intrinsic_conjg, gfc_conv_intrinsic_abs,
2380 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
2381 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_dprod,
2382 gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
2383 gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax,
2384 gfc_conv_intrinsic_minmax_char, gfc_conv_intrinsic_count,
2385 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_dot_product,
2386 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
2387 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_not,
2388 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
2389 gfc_conv_intrinsic_ichar, gfc_conv_intrinsic_size,
2390 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
2391 gfc_conv_allocated, gfc_conv_associated, gfc_conv_intrinsic_trim,
2392 gfc_conv_intrinsic_repeat): Likewise.
2394 2008-02-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2397 * trans-expr.c (gfc_conv_power_op): Use BUILT_IN_CPOW{F,,L}.
2398 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_CPOW{F,,L}.
2399 * trans.h (gfor_fndecl_math_cpow, gfor_fndecl_math_cpowf,
2400 gfor_fndecl_math_cpowl10, gfor_fndecl_math_cpowl16): Remove.
2401 * trans-decl.c: Likewise.
2403 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2406 * expr.c (find_array_element): Modify traversing the constructor to
2407 avoid trying to access NULL memory pointed to by next for the
2408 last element. (find_array_section): Exit while loop if cons->next is
2411 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2414 * iresolve.c (resolve_mask_arg): Add gfc_clear_ts to initialize
2416 (gfc_resolve_aint): Likewise.
2417 (gfc_resolve_anint): Likewise.
2418 (gfc_resolve_besn): Likewise.
2419 (gfc_resolve_cshift): Likewise.
2420 (gfc_resolve_ctime): Likewise.
2421 (gfc_resolve_eoshift): Likewise.
2422 (gfc_resolve_index_func): Likewise.
2423 (gfc_resolve_isatty): Likewise.
2424 (gfc_resolve_malloc): Likewise.
2425 (gfc_resolve_rrspacing): Likewise.
2426 (gfc_resolve_scale): Likewise.
2427 (gfc_resolve_set_exponent): Likewise.
2428 (gfc_resolve_spacing): Likewise.
2429 (gfc_resolve_spacing): Likewise.
2430 (gfc_resolve_fgetc): Likewise.
2431 (gfc_resolve_fputc): Likewise.
2432 (gfc_resolve_ftell): Likewise.
2433 (gfc_resolve_ttynam): Likewise.
2434 (gfc_resolve_alarm_sub): Likewise.
2435 (gfc_resolve_mvbits): Likewise.
2436 (gfc_resolve_getarg): Likewise.
2437 (gfc_resolve_signal_sub): Likewise.
2438 (gfc_resolve_exit): Likewise.
2439 (gfc_resolve_flush): Likewise.
2440 (gfc_resolve_free): Likewise.
2441 (gfc_resolve_ctime_sub): Likewise.
2442 (gfc_resolve_fgetc_sub): Likewise.
2443 (gfc_resolve_fputc_sub): Likewise.
2444 (gfc_resolve_fseek_sub): Likewise.
2445 (gfc_resolve_ftell_sub): Likewise.
2446 (gfc_resolve_ttynam_sub): Likewise.
2448 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2450 * gfc-internals.texi: Fix typos and markup nits.
2451 * gfortran.texi: Likewise.
2452 * intrinsic.texi: Likewise.
2454 2008-02-21 Richard Guenther <rguenther@suse.de>
2456 * trans-expr.c (gfc_conv_expr_op): Expand INTRINSIC_PARENTHESES
2457 as unary PAREN_EXPR for real and complex typed expressions.
2458 (gfc_conv_unary_op): Fold the built tree.
2460 2008-02-20 Tobias Burnus <burnus@net-b.de>
2463 * match.c (gfc_match_name): Improve error message for '$'.
2465 2008-02-19 Daniel Franke <franke.daniel@gmail.com>
2468 * expr.c (gfc_check_pointer_assign): Add type and kind information
2469 to type-mismatch message.
2470 (gfc_check_assign): Unify error messages.
2472 2008-02-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2475 * gfortran.texi: Create new section for unimplemented extensions.
2476 Add "STRUCTURE and RECORD" and "ENCODE and DECODE statements".
2477 Remove "smaller projects" list. Fix a few typos.
2479 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2481 * intrinsic.texi: Rename INDEX node to avoid clashing with
2482 index.html on case-insensitive systems.
2484 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2487 * trans-expr.c (gfc_conv_function_call): Force evaluation of
2490 2008-02-10 Daniel Franke <franke.daniel@gmail.com>
2493 * lang.opt: Allow '-J<dir>' next to '-J <dir>',
2494 likewise '-I <dir>' and '-I<dir>'.
2496 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2499 * Make-lang.in (f951): Add $(GMPLIBS).
2501 2008-02-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2504 * trans-common.c (build_field): Mark fields as volatile when needed.
2506 2008-02-05 Tobias Burnus <burnus@net-b.de>
2509 * data.c (gfc_assign_data_value): Only free "size" if
2510 it has not already been freed.
2512 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
2515 * array.c (match_array_element_spec): Remove check for negative
2517 (gfc_resolve_array_spec): Add check for negative size.
2519 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
2522 * data.c (gfc_assign_data_value): Add bounds check for array
2525 2008-02-04 Daniel Franke <franke.daniel@gmail.com>
2527 * resolve.c (resolve_where): Fix typo.
2528 (gfc_resolve_where_code_in_forall): Likewise.
2530 2008-02-03 Paul Thomas <pault@gcc.gnu.org>
2533 * resolve.c (resolve_allocate_deallocate): New function.
2534 (resolve_code): Call it for allocate and deallocate.
2535 * match.c (gfc_match_allocate, gfc_match_deallocate) : Remove
2536 the checking of the STAT tag and put in above new function.
2537 * primary,c (match_variable): Do not fix flavor of host
2538 associated symbols yet if the type is not known.
2540 2008-01-31 Paul Thomas <pault@gcc.gnu.org>
2543 * expr.c (gfc_check_assign): It is an error to assign
2544 to a sibling procedure.
2546 2008-01-30 Paul Thomas <pault@gcc.gnu.org>
2549 * symbol.c (gfc_delete_symtree, gfc_undo_symbols): Rename
2550 delete_symtree to gfc_delete_symtree.
2551 * gfortran.h : Add prototype for gfc_delete_symtree.
2552 * module.c (load_generic_interfaces): Transfer symbol to a
2553 unique symtree and delete old symtree, instead of renaming.
2554 (read_module): The rsym and the found symbol are the same, so
2555 the found symtree can be deleted.
2558 * decl.c (match_char_spec): Remove the constraint on deferred
2559 matching of functions and free the length expression.
2560 delete_symtree to gfc_delete_symtree.
2561 (gfc_match_type_spec): Whitespace.
2562 (gfc_match_function_decl): Defer characteristic association for
2563 all types except BT_UNKNOWN.
2564 * parse.c (decode_specification_statement): Only derived type
2565 function matching is delayed to the end of specification.
2567 2008-01-28 Tobias Burnus <burnus@net-b.de>
2570 * simplify.c (gfc_simplify_shape): Simplify rank zero arrays.
2572 2008-01-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2575 * array.c (gfc_check_constructor_type): Revert clearing the expression.
2577 2008-01-26 Tobias Burnus <burnus@net-b.de>
2580 * trans-expr.c (gfc_conv_function_call): Don't call
2581 gfc_add_interface_mapping if the expression is NULL.
2583 2008-01-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2586 * trans-array.c (gfc_trans_create_temp_array): Remove call to
2587 gcc_assert (integer_zerop (loop->from[n])).
2589 2008-01-25 Daniel Franke <franke.daniel@gmail.com>
2592 * resolve.c (resolve_where): Added check if user-defined assignment
2593 operator is an elemental subroutine.
2594 (gfc_resolve_where_code_in_forall): Likewise.
2596 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
2600 * gfortran.h: Revert changes from 2008-01-17.
2601 * match.c: Likewise.
2602 * symbol.c: Likewise.
2603 (gfc_undo_symbols): Undo namespace changes related to common blocks.
2605 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
2608 * data.c (formalize_structure_cons): Skip formalization on
2611 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
2613 * gfortran.texi (OpenMP): Extended existing documentation.
2614 (contributors): Added major contributors of 2008 that were
2616 (proposed extensions): Removed implemented items.
2618 2008-01-24 Paul Thomas <pault@gcc.gnu.org>
2621 * parse.c (next_statement) : If ST_GET_FCN_CHARACTERISTICS is
2622 seen, check for a statement label and, if present, delete it
2623 and set the locus to the start of the statement.
2625 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
2628 * trans-io.c (gfc_trans_transfer): If the array reference in a
2629 read has a vector subscript, use gfc_conv_subref_array_arg to
2630 copy back the temporary.
2632 2008-01-22 Tobias Burnus <burnus@net-b.de>
2635 * interface.c (compare_actual_formal): Fix adding type
2636 to missing_arg_type for absent optional arguments.
2638 2008-01-22 Tobias Burnus <burnus@net-b.de>
2641 * parse.c (parse_spec): Change = into ==.
2643 2008-01-22 Daniel Franke <franke.daniel@gmail.com>
2646 * expr.c (check_elemental): Fix check for valid data types.
2648 2008-01-22 Tobias Burnus <burnus@net-b.de>
2651 * scanner.c (load_line): Support <tab><digit> continuation lines.
2652 * invoke.texi (-Wtabs): Document this.
2654 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
2657 * module.c (read_module): Set use_rename attribute.
2659 2007-01-21 Tobias Burnus <burnus@net-b.de>
2662 * interface.c (compare_parameter): Improved error message
2663 for arguments of same type and mismatched kinds.
2665 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
2668 * resolve.c (resolve_entries): Do not do an array bounds check
2669 if the result symbols are the same.
2672 * module.c (read_module) : Hide the symtree of the previous
2673 version of the symbol if this symbol is renamed.
2675 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
2678 * array.c (gfc_check_constructor_type): Clear the expression ts
2679 so that the checking starts from the deepest level of array
2681 * primary.c (match_varspec): If an unknown type is changed to
2682 default character and the attempt to match a substring fails,
2683 change it back to unknown.
2686 * trans-array.c (gfc_add_loop_ss_code) : If ss->string_length is
2687 NULL for an array constructor, use the cl.length expression to
2689 (gfc_conv_array_parameter): Change call to gfc_evaluate_now to
2692 2008-01-19 Thomas Koenig <tkoenig@gcc.gnu.org>
2696 * iresolve.c (gfc_resolve_all): Remove conversion of mask
2697 argument to kind=1 by removing call to resolve_mask_arg().
2698 (gfc_resolve_any): Likewise.
2700 2008-01-19 Tobias Burnus <burnus@net-b.de>
2703 * primary.c (match_variable): Handle FL_UNKNOWN without
2704 uneducated guessing.
2705 (match_variable): Improve error message.
2707 2008-01-18 Tobias Burnus <burnus@net-b.de>
2710 * interface.c (get_expr_storage_size): Return storage size
2711 for array element designators.
2712 (compare_actual_formal): Reject unequal string sizes for
2713 assumed-shape dummy arguments. And fix error message for
2714 array-sections with vector subscripts.
2716 2008-01-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2719 * simplify.c (is_constant_array_expr): New static function that returns
2720 true if the given expression is an array and is constant.
2721 (gfc_simplify_reshape): Use new function.
2723 2008-01-17 H.J. Lu <hongjiu.lu@intel.com>
2726 * symbol.c (free_common_tree): Renamed to ...
2727 (gfc_free_common_tree): This. Remove static.
2728 (gfc_free_namespace): Updated.
2730 * gfortran.h (gfc_free_common_tree): New.
2732 * match.c (gfc_match_common): Call gfc_free_common_tree () with
2733 gfc_current_ns->common_root and set gfc_current_ns->common_root
2734 to NULL on syntax error.
2736 2008-01-18 Richard Sandiford <rsandifo@nildram.co.uk>
2739 * trans-expr.c (gfc_conv_function_call): Use proper
2740 type for returned character pointers.
2742 2008-01-17 Paul Thomas <pault@gcc.gnu.org>
2747 * decl.c : Remove gfc_function_kind_locus and
2748 gfc_function_type_locus. Add gfc_matching_function.
2749 (match_char_length): If matching a function and the length
2750 does not match, return MATCH_YES and try again later.
2751 (gfc_match_kind_spec): The same.
2752 (match_char_kind): The same.
2753 (gfc_match_type_spec): The same for numeric and derived types.
2754 (match_prefix): Rename as gfc_match_prefix.
2755 (gfc_match_function_decl): Except for function valued character
2756 lengths, defer applying kind, type and charlen info until the
2757 end of specification block.
2758 gfortran.h (gfc_statement): Add ST_GET_FCN_CHARACTERISTICS.
2759 parse.c (decode_specification_statement): New function.
2760 (decode_statement): Call it when a function has kind = -1. Set
2761 and reset gfc_matching function, as function statement is being
2763 (match_deferred_characteristics): Simplify with a single call
2764 to gfc_match_prefix. Do appropriate error handling. In any
2765 case, make sure that kind = -1 is reset or corrected.
2766 (parse_spec): Call above on seeing ST_GET_FCN_CHARACTERISTICS.
2767 Throw an error if kind = -1 after last specification statement.
2768 parse.h : Prototype for gfc_match_prefix.
2770 2008-01-16 Tobias Burnus <burnus@net-b.de>
2773 * interface.c (compare_parameter): Allow AS_DEFERRED array
2774 elements and reject attr.pointer array elemenents.
2775 (get_expr_storage_size): Return storage size of elements of
2776 assumed-shape and pointer arrays.
2778 2008-01-15 Sebastian Pop <sebastian.pop@amd.com>
2780 * f95-lang.c (gfc_init_builtin_functions): Initialize GOMP builtins
2781 for flag_tree_parallelize_loops.
2783 2008-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
2786 * iresolve.c (gfc_resolve_all): Call resolve_mask_arg.
2787 (gfc_resolve_any): Likewise.
2788 (gfc_resolve_count): Likewise. Don't append kind of
2789 argument to function name.
2791 2008-01-13 Tobias Burnus <burnus@net-b.de>
2794 * resolve.c (resolve_actual_arglist): For expressions,
2795 also check for assume-sized arrays.
2796 * interface.c (compare_parameter): Move F2003 character checks
2797 here, print error messages here, reject elements of
2798 assumed-shape array as argument to dummy arrays.
2799 (compare_actual_formal): Update for the changes above.
2801 2008-01-13 Tobias Burnus <burnus@net-b.de>
2804 * decl.c (contained_procedure): Only check directly preceeding state.
2806 2008-01-13 Tobias Burnus <burnus@net-b.de>
2809 * check.c (gfc_check_shape): Accept array ranges of
2810 assumed-size arrays.
2812 2008-01-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2815 * match.c (gfc_match_name): Don't error if leading character is a '(',
2816 just return MATCH_NO.
2818 2008-01-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2821 * trans-io.c (create_dummy_iostat): Commit the symbol.
2823 2008-01-11 Paul Thomas <pault@gcc.gnu.org>
2826 * simplify.c (gfc_simplify_transfer): Return NULL if the size
2827 of the element is unavailable and only assign character length
2828 to the result, if 'mold' is constant.
2830 2008-01-10 Paul Thomas <pault@gcc.gnu.org>
2833 * trans-array.c (gfc_trans_array_ctor_element): Use gfc_trans_string_copy
2834 to assign strings and perform bounds checks on the string length.
2835 (get_array_ctor_strlen): Remove bounds checking.
2836 (gfc_trans_array_constructor): Initialize string length checking.
2837 * trans-array.h : Add prototype for gfc_trans_string_copy.
2839 2008-01-08 Richard Guenther <rguenther@suse.de>
2842 PR tree-optimization/34683
2843 * trans-types.c (gfc_get_array_type_bounds): Use an array type
2844 with known size for accesses if that is known.
2846 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
2849 * expr.c (find_array_element): Check that the array bounds are
2850 constant before using them. Use lower, as well as upper bound.
2851 (check_restricted): Allow implied index variable.
2853 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
2856 * trans_array.c (gfc_trans_deferred_array): Do not null the
2857 data pointer on entering scope, nor deallocate it on leaving
2858 scope, if the symbol has the 'save' attribute.
2861 * trans_decl.c (gfc_finish_var_decl): Derived types with
2862 allocatable components and an initializer must be TREE_STATIC.
2864 2008-01-07 Paul Thomas <pault@gcc.gnu.org>
2867 * module.c (write_generic): Rewrite completely.
2868 (write_module): Change call to write_generic.
2870 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2873 * scanner.c (load_line): Do not count ' ' as printable when checking for
2876 2008-01-06 Paul Thomas <pault@gcc.gnu.org>
2879 * module.c (load_needed): If the namespace has no proc_name
2880 give it the module symbol.
2882 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2885 * trans-expr.c (gfc_conv_missing_dummy): Use a temporary to type convert
2886 the dummy variable expression, test for NULL, and pass the variable
2887 address to the called function.
2889 2007-01-06 Tobias Burnus <burnus@net-b.de>
2892 * match.c (gfc_match_common): Remove blank common in
2894 * resolve.c (resolve_common_vars): New function.
2895 (resolve_common_blocks): Move checks to resolve_common_vars
2896 and invoke that function.
2897 (resolve_types): Call resolve_common_vars for blank commons.
2899 2008-01-06 Tobias Burnus <burnus@net-b.de>
2902 * resolve.c (resolve_equivalence_derived): Reject derived types with
2903 default initialization if equivalenced with COMMON variable.
2905 2008-01-06 Tobias Burnus <burnus@net-b.de>
2908 * io.c (check_io_constraints): Disallow unformatted I/O for
2911 2008-01-06 Tobias Burnus <burnus@net-b.de>
2914 * resolve.c (resolve_formal_arglist): Reject dummy procedure in
2915 ELEMENTAL functions.
2917 2008-01-06 Tobias Burnus <burnus@net-b.de>
2920 * interface.c (compare_actual_formal): Reject parameter
2921 actual to intent(out) dummy.
2923 2008-01-04 Tobias Burnus <burnus@net-b.de>
2926 * primary.c (match_varspec): Gobble whitespace before