1 2008-08-23 Janus Weil <janus@gcc.gnu.org>
3 * gfortran.h (gfc_component): Add field "symbol_attribute attr", remove
4 fields "pointer", "allocatable", "dimension", "access".
5 Remove functions "gfc_set_component_attr" and "gfc_get_component_attr".
6 * interface.c (gfc_compare_derived_types): Ditto.
7 * trans-array.c (gfc_array_allocate,structure_alloc_comps): Ditto.
8 * trans-expr.c (gfc_conv_component_ref,gfc_trans_subcomponent_assign,
9 gfc_conv_structure): Ditto.
10 * symbol.c (gfc_find_component,free_components,gfc_set_component_attr,
11 gfc_get_component_attr,verify_bind_c_derived_type,
12 generate_isocbinding_symbol): Ditto.
13 * decl.c (build_struct): Ditto.
14 * dump-parse-tree.c (show_components): Ditto.
15 * trans-stmt.c (gfc_trans_deallocate): Ditto.
16 * expr.c (gfc_check_assign,gfc_check_pointer_assign,
17 gfc_default_initializer): Ditto.
18 * module.c (mio_component): Ditto.
19 * trans-types.c (copy_dt_decls_ifequal,gfc_get_derived_type): Ditto.
20 * resolve.c (has_default_initializer,resolve_structure_cons,
21 gfc_iso_c_func_interface,find_array_spec,resolve_ref,
22 resolve_deallocate_expr,resolve_allocate_expr,resolve_fl_derived,
23 resolve_equivalence_derived): Ditto.
24 * trans-io.c (transfer_expr): Ditto.
25 * parse.c (parse_derived): Ditto.
26 * dependency.c (gfc_check_dependency): Ditto.
27 * primary.c (gfc_variable_attr): Ditto.
29 2008-08-23 Tobias Burnus <burnus@net-b.de>
32 * arith.c (gfc_arith_concat): Fix concat of kind=4 strings.
34 2008-08-23 Tobias Burnus <burnus@net-b.de>
37 * target-memory.c (gfc_interpret_character): Support
40 2008-08-22 Daniel Kraft <d@domob.eu>
43 * symbol.c (gfc_add_type): Warn on -Wsurprising if a function-result
44 type is re-declared but neither -pedantic nor -std=f* is given and so
46 * invoke.texi (-Wsurprising): Document this new behaviour.
48 2008-08-22 Daniel Kraft <d@domob.eu>
50 * gfortran.h (in_prefix): Removed from this header.
51 * match.h (gfc_matching_prefix): Moved and renamed from `in_prefix'.
52 * decl.c (in_prefix): Removed from here.
53 (gfc_match_prefix): Use new name of `gfc_matching_prefix'.
54 * symbol.c (gfc_check_symbol_typed): Ditto.
55 * expr.c (check_typed_ns): New helper variable.
56 (expr_check_typed_help): New helper method.
57 (gfc_expr_check_typed): Rewrote to use gfc_traverse_expr to do the
58 work, fixing a minor problem.
59 * match.c (gfc_matching_prefix): New variable.
61 2008-08-22 Daniel Kraft <d@domob.eu>
65 * gfortran.h (in_prefix): New global.
66 (gfc_check_symbol_typed), (gfc_check_expr_typed): New methods.
67 * array.c (match_array_element_spec): Check that bounds-expressions
68 don't have symbols not-yet-typed in them.
69 * decl.c (var_element): Check that variable used is already typed.
70 (char_len_param_value): Check that expression does not contain
71 not-yet-typed symbols.
72 (in_prefix): New global.
73 (gfc_match_prefix): Record using `in_prefix' if we're at the moment
74 parsing a prefix or not.
75 * expr.c (gfc_expr_check_typed): New method.
76 * parse.c (verify_st_order): New argument to disable error output.
77 (check_function_result_typed): New helper method.
78 (parse_spec): Check that the function-result declaration, if given in
79 a prefix, contains no not-yet-typed symbols when the IMPLICIT rules are
81 * symbol.c (gfc_check_symbol_typed): Check that a symbol already has
82 a type associated to it, otherwise use the IMPLICIT rules or signal
85 2008-08-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
87 * f95-lang.c: Update all calls to pedwarn.
89 2008-08-18 Daniel Franke <franke.daniel@gmail.com>
92 * gfortran.texi: Document decision on include file handling in
95 2008-08-16 Tobias Burnus <burnus@net-b.de>
98 * libgfortran.h: Reduce GFC_MAX_DIMENSIONS to 7.
100 2008-08-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
103 * io.c (gfc_match_open): Enable UTF-8 in checks.
104 * simplify.c (gfc_simplify_selected_char_kind): Enable iso_10646.
106 2008-08-14 Janus Weil <janus@gcc.gnu.org>
109 * symbol.c (check_conflict): Move conflict checks for (procedure,save)
110 and (procedure,intent) to resolve_fl_procedure.
111 * resolve.c (resolve_fl_procedure): Ditto.
113 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
116 * f95-lang.c (gfc_mark_addressable): Use "pedwarn (0," instead of
119 2008-08-09 Paul Thomas <pault@gcc.gnu.org>
122 * symbol.c (gfc_add_extension): New function.
123 * decl.c (gfc_get_type_attr_spec): Call it.
124 (gfc_match_derived_decl): Set symbol extension attribute from
126 * gfortran.h : Add prototype for gfc_add_extension.
128 2008-08-08 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
131 * options.c (set_Wall): Replace set_Wunused by warn_unused.
133 2008-08-08 Daniel Kraft <d@domob.eu>
135 * gfortran.h (gfc_finalizer): Replaced member `procedure' by two
136 new members `proc_sym' and `proc_tree' to store the symtree after
138 (gfc_find_sym_in_symtree): Made public.
139 * decl.c (gfc_match_final_decl): Adapted for new member name.
140 * interface.c (gfc_find_sym_in_symtree): Made public.
141 (gfc_extend_expr), (gfc_extend_assign): Changed call accordingly.
142 * module.c (mio_finalizer), (mio_f2k_derived), (mio_full_f2k_derived):
143 New methods for module-file IO of f2k_derived.
144 (mio_symbol): Do IO of f2k_derived namespace.
145 * resolve.c (gfc_resolve_finalizers): Adapted for new member name and
146 finding the symtree for the symbol here.
147 * symbol.c (gfc_free_finalizer): Adapted for new members.
149 2008-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
151 * gfc-internals.texi: Update to GFDL 1.2. Do not list GPL as
153 * gfortran.texi: Likewise.
154 * intrinsic.texi: Do not list GPL as Invariant Section.
155 * invoke.texi: Likewise. Update copyright years.
157 2008-07-29 Paul Thomas <pault@gcc.gnu.org>
159 * trans-expr.c (conv_parent_component_references): New function
160 to build missing parent references.
161 (gfc_conv_variable): Call it
162 * symbol.c (gfc_add_component): Check that component name in a
163 derived type extension does not appear in parent.
164 (gfc_find_component): For a derived type extension, check if
165 the component appears in the parent derived type by calling
166 self. Separate errors for private components and private types.
167 * decl.c (match_data_constant): Add extra arg to call to
168 gfc_match_structure_constructor.
169 (check_extended_derived_type): New function to check that a
170 parent derived type exists and that it is OK for exension.
171 (gfc_get_type_attr_spec): Add extra argument 'name' and return
172 it if extends is specified.
173 (gfc_match_derived_decl): Match derived type extension and
174 build a first component of the parent derived type if OK. Add
175 the f2k namespace if not present.
176 * gfortran.h : Add the extension attribute.
177 * module.c : Handle attribute 'extension'.
178 * match.h : Modify prototypes for gfc_get_type_attr_spec and
179 gfc_match_structure_constructor.
180 * primary.c (build_actual_constructor): New function extracted
181 from gfc_match_structure_constructor and modified to call self
182 iteratively to build derived type extensions, when f2k named
184 (gfc_match_structure_constructor): Do not throw error for too
185 many components if a parent type is being handled. Use
186 gfc_find_component to generate errors for non-existent or
187 private components. Iteratively call self for derived type
188 extensions so that parent constructor is built. If extension
189 and components left over, throw error.
190 (gfc_match_rvalue): Add extra arg to call to
191 gfc_match_structure_constructor.
193 * trans-array.c (gfc_conv_resolve_dependencies): If lhs and rhs
194 are the same symbol, aliassing does not matter.
196 2008-07-29 Jan Hubicka <jh@suse.cz>
198 * options.c (gfc_post_options): Do not set flag_no_inline.
200 2008-07-29 Daniel Kraft <d@domob.eu>
203 * trans-intrinsic.c (conv_generic_with_optional_char_arg): New method
204 to append a string-length even if the string argument is missing, e.g.
206 (gfc_conv_intrinsic_function): Call the new method for EOSHIFT, PACK
209 2008-07-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
211 * gfortran.h (try): Remove macro. Replace try with gfc_try
222 * interface.c: Likewise.
223 * intrinsic.c: Likewise.
224 * intrinsic.h: Likewise.
229 * resolve.c: Likewise.
230 * scanner.c: Likewise.
231 * simplify.c: Likewise.
232 * symbol.c: Likewise.
233 * trans-openmp.c: Likewise.
234 * trans-types.c: Likewise.
236 2008-07-28 Tobias Burnus <burnus@net-b.de>
238 * Make-lang.in: Remove -Wno-* from fortran-warn.
240 2008-07-28 Richard Guenther <rguenther@suse.de>
242 Merge from gimple-tuples-branch.
244 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
246 * trans-expr.c: Include gimple.h instead of tree-gimple.h.
247 * trans-array.c: Same.
248 * trans-openmp.c: Same.
249 * trans-stmt.c: Same.
252 * trans-decl.c: Same.
253 * trans-intrinsic.c: Same.
254 * trans.c: Same. Include tree-iterator.h.
255 * Make-lang.in (trans.o): Depend on tree-iterator.h
257 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
259 * trans-array.h (gfc_conv_descriptor_data_set_internal):
260 Rename to gfc_conv_descriptor_data_set.
261 (gfc_conv_descriptor_data_set_tuples): Remove.
262 * trans-array.c (gfc_conv_descriptor_data_get): Rename
263 from gfc_conv_descriptor_data_set_internal.
264 Remove last argument to gfc_add_modify.
265 (gfc_trans_allocate_array_storage): Rename gfc_add_modify_expr to
267 (gfc_trans_create_temp_array): Same.
268 (gfc_conv_array_transpose): Same.
269 (gfc_grow_array): Same.
270 (gfc_put_offset_into_var): Same.
271 (gfc_trans_array_ctor_element): Same.
272 (gfc_trans_array_constructor_subarray): Same.
273 (gfc_trans_array_constructor_value): Same.
274 (gfc_trans_scalarized_loop_end): Same.
275 (gfc_array_init_size): Same.
276 (gfc_array_allocate): Same.
277 (gfc_trans_array_bounds): Same.
278 (gfc_trans_auto_array_allocation): Same.
279 (gfc_trans_g77_array): Same.
280 (gfc_trans_dummy_array_bias): Same.
281 (gfc_conv_expr_descriptor): Same.
282 (structure_alloc_comps): Same.
283 * trans-expr.c: Same.
284 * trans-openmp.c (gfc_omp_clause_default_ctor): Same.
285 Rename gfc_conv_descriptor_data_set_tuples to
286 gfc_conv_descriptor_data_set.
287 (gfc_omp_clause_copy_ctor): Change build_gimple_modify_stmt to
289 (gfc_omp_clause_assign_op): Same.
290 (gfc_trans_omp_array_reduction): Rename gfc_add_modify_expr to
292 (gfc_trans_omp_atomic): Same.
293 (gfc_trans_omp_do): Same. Change GIMPLE_MODIFY_STMT to MODIFY_EXPR.
294 Rename gfc_add_modify_stmt to gfc_add_modify.
295 * trans-stmt.c: Rename gfc_add_modify_expr to
297 * trans.c: Rename gfc_add_modify_expr to
299 (gfc_add_modify): Remove last argument.
300 Rename GIMPLE_MODIFY_STMT to MODIFY_EXPR.
301 * trans.h: Remove gfc_add_modify_expr, gfc_add_modify_stmt.
302 Add prototype for gfc_add_modify.
303 * f95-lang.c (union lang_tree_node): Rename GENERIC_NEXT to TREE_CHAIN.
304 * trans-decl.c: Rename gfc_add_modify_stmt to gfc_add_modify.
306 * trans-intrinsic.c: Same.
308 2008-02-25 Aldy Hernandez <aldyh@redhat.com>
310 * Make-lang.in (fortran-warn): Add -Wno-format.
312 2008-02-19 Diego Novillo <dnovillo@google.com>
314 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
316 * fortran/Make-lang.in (fortran-warn): Remove.
318 2007-11-22 Aldy Hernandez <aldyh@redhat.com>
320 * trans-expr.c (gfc_trans_string_copy): Use "void *" when building a
323 2007-11-10 Aldy Hernandez <aldyh@redhat.com>
325 * Make-lang.in (fortran-warn): Set to -Wno-format.
326 * trans.c (gfc_trans_code): Update comment to say GENERIC.
327 Call tree_annotate_all_with_locus instead of annotate_all_with_locus.
329 2008-07-27 Tobias Burnus <burnus@net-b.de>
334 * trans.c (gfc_trans_runtime_check): Allow run-time warning besides
336 * trans.h (gfc_trans_runtime_check): Update declaration.
337 * trans-array.c (gfc_trans_array_ctor_element,gfc_trans_array_bound_check,
338 gfc_conv_array_ref,gfc_conv_ss_startstride,gfc_trans_dummy_array_bias):
339 Updated gfc_trans_runtime_check calls.
340 (gfc_conv_array_parameter): Implement flag_check_array_temporaries,
341 fix packing/unpacking for nonpresent optional actuals to optional
343 * trans-array.h (gfc_conv_array_parameter): Update declaration.
344 * trans-expr.c (gfc_conv_substring,gfc_trans_arrayfunc_assign,
345 gfc_conv_function_call): Updated gfc_trans_runtime_check calls.
346 (gfc_conv_function_call): Update gfc_conv_array_parameter calls.
347 * trans-expr.c (gfc_trans_goto): Updated gfc_trans_runtime_check
349 * trans-io.c (set_string,gfc_conv_intrinsic_repeat): Ditto.
350 (gfc_conv_intrinsic_transfer,gfc_conv_intrinsic_loc): Same for
351 gfc_conv_array_parameter.
352 * trans-intrinsics.c (gfc_conv_intrinsic_bound): Ditto.
353 * trans-decl.c (gfc_build_builtin_function_decls): Add
354 gfor_fndecl_runtime_warning_at.
355 * lang.opt: New option fcheck-array-temporaries.
356 * gfortran.h (gfc_options): New flag_check_array_temporaries.
357 * options.c (gfc_init_options, gfc_handle_option): Handle flag.
358 * invoke.texi: New option fcheck-array-temporaries.
360 2008-07-24 Jan Hubicka <jh@suse.cz>
362 * fortran/options.c (gfc_post_options): Remove flag_unline_trees code.
364 2008-07-24 Daniel Kraft <d@domob.eu>
367 * lang.opt (Wnonstd-intrinsics): Removed option.
368 (Wintrinsics-std), (Wintrinsic-shadow): New options.
369 * invoke.texi (Option Summary): Removed -Wnonstd-intrinsics
370 from the list and added -Wintrinsics-std and -Wintrinsic-shadow.
371 (Error and Warning Options): Documented the new options and removed
372 the documentation for -Wnonstd-intrinsics.
373 * gfortran.h (gfc_option_t): New members warn_intrinsic_shadow and
374 warn_intrinsics_std, removed warn_nonstd_intrinsics.
375 (gfc_is_intrinsic): Renamed from gfc_intrinsic_name.
376 (gfc_warn_intrinsic_shadow), (gfc_check_intrinsic_standard): New.
377 * decl.c (match_procedure_decl): Replaced gfc_intrinsic_name by
378 the new name gfc_is_intrinsic.
379 (warn_intrinsic_shadow): New helper method.
380 (gfc_match_function_decl), (gfc_match_subroutine): Call the new method
381 warn_intrinsic_shadow to check the just-parsed procedure.
382 * expr.c (check_init_expr): Call new gfc_is_intrinsic to check whether
383 the function called is really an intrinsic in the selected standard.
384 * intrinsic.c (gfc_is_intrinsic): Renamed from gfc_intrinsic_name and
385 extended to take into account the selected standard settings when trying
386 to find out whether a symbol is an intrinsic or not.
387 (gfc_check_intrinsic_standard): Made public and extended.
388 (gfc_intrinsic_func_interface), (gfc_intrinsic_sub_interface): Removed
389 the calls to check_intrinsic_standard, this check now happens inside
391 (gfc_warn_intrinsic_shadow): New method defined.
392 * options.c (gfc_init_options): Initialize new warning flags to false
393 and removed intialization of Wnonstd-intrinsics flag.
394 (gfc_post_options): Removed logic for Wnonstd-intrinsics flag.
395 (set_Wall): Set new warning flags and removed Wnonstd-intrinsics flag.
396 (gfc_handle_option): Handle the new flags and removed handling of the
397 old Wnonstd-intrinsics flag.
398 * primary.c (gfc_match_rvalue): Replaced call to gfc_intrinsic_name by
399 the new name gfc_is_intrinsic.
400 * resolve.c (resolve_actual_arglist): Ditto.
401 (resolve_generic_f), (resolve_unknown_f): Ditto.
402 (is_external_proc): Ditto.
403 (resolve_generic_s), (resolve_unknown_s): Ditto.
404 (resolve_symbol): Ditto and ensure for symbols declared INTRINSIC that
405 they are really available in the selected standard setting.
407 2008-07-24 Daniel Kraft <d@domob.eu>
409 * match.c (gfc_match): Add assertion to catch wrong calls trying to
410 match upper-case characters.
412 2008-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
415 * gfortran.h: Add "warn_array_temp" to gfc_option_t.
416 * lang.opt: Add -Warray-temporaries.
417 * invoke.texi: Document -Warray-temporaries
418 * trans-array.h (gfc_trans_create_temp_array): Add argument of
420 (gfc_conv_loop_setup): Likewise.
421 * trans-array.c (gfc_trans_create_temp_array): If
422 -Warray-temporaries is given and locus is present, warn about
423 creation of array temporaries.
424 (gfc_trans_array_constructor_subarray): Add locus to call
425 of gfc_conv_loop_setup.
426 (gfc_trans_array_constructor): Add where argument. Pass where
427 argument to call of gfc_trans_create_temp_array.
428 (gfc_add_loop_ss_code): Add where argument. Pass where argument
429 to recursive call of gfc_add_loop_ss_code and to call of
430 gfc_trans_array_constructor.
431 (gfc_conv_loop_setup): Add where argument. Pass where argument
432 to calls to gfc_add_loop_ss_code and to gfc_trans_create_temp_array.
433 (gfc_conv_expr_descriptor): Pass location to call of
435 (gfc_conv_array_parameter): If -Warray-temporaries is given,
436 warn about creation of temporary arrays.
437 * trans-expr.c (gfc_conv_subref_array_arg): Add where argument
438 to call to gfc_conv_loop_setup.
439 (gfc_conv_function_call): Add where argument to call to
440 gfc_trans_creat_temp_array.
441 (gfc_trans_subarray_assign): Likewise.
442 (gfc_trans_assignment_1): Add where argument to call to
444 * trans-stmt.c (gfc_conv_elemental_dependencies): Add where
445 argument to call to gfc_trans_create_temp_array.
446 (gfc_trans_call): Add where argument to call to gfc_conv_loop_setup.
447 (generate_loop_for_temp_to_lhs): Likewise.
448 (generate_loop_for_rhs_to_temp): Likewise.
449 (compute_inner_temp_size): Likewise.
450 (gfc_trans-pointer_assign_need_temp): Likewise.
451 (gfc_evaluate_where_mask): Likewise.
452 (gfc_trans_where_assign): Likewise.
453 (gfc_trans_where_3): Likewise.
454 * trans-io.c (transfer_srray_component): Add where argument
455 to function. Add where argument to call to gfc_conv_loop_setup.
456 (transfer_expr): Add where argument to call to
457 transfer_array_component.
458 (gfc_trans_transfer): Add where expression to call to
460 * trans-intrinsic.c (gfc_conv_intrinsic_anyall): Add
461 where argument to call to gfc_conv_loop_setup.
462 (gfc_conv_intrinsic_count): Likewise.
463 (gfc_conv_intrinsic_arith): Likewise.
464 (gfc_conv_intrinsic_dot_product): Likewise.
465 (gfc_conv_intrinsic_minmaxloc): Likewise.
466 (gfc_conv_intrinsic_minmaxval): Likewise.
467 (gfc_conv_intrinsic_array_transfer): Warn about
468 creation of temporary array.
469 Add where argument to call to gfc_trans_create_temp_array.
470 * options.c (gfc_init_options): Initialize gfc_option.warn_array_temp.
471 (gfc_handle_option): Set gfc_option.warn_array_temp.
473 2008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
476 * f95-lang.c (gfc_mark_addressable): All calls to pedwarn changed.
478 2008-07-22 Daniel Kraft <d@domob.eu>
481 * io.c (error_element), (format_locus): New static globals.
482 (unexpected_element): Spelled out this message fully.
483 (next_char): Keep track of locus when not MODE_STRING.
484 (next_char_not_space): Remember last parsed element in error_element.
485 (format_lex): Fix two indentation errors.
486 (check_format): Use format_locus and possibly error_element for a
487 slightly better error message on invalid format.
488 (check_format_string): Set format_locus to start of the string
489 expression used as format.
491 2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
493 * expr.c (gfc_check_pointer_assign): Fix typo in string.
494 * io.c (check_format): Fix typo in string. Fix comment typos.
495 * parse.c (gfc_global_used): Likewise.
496 * resolve.c (resolve_allocate_expr): Likewise.
497 * symbol.c (gfc_set_default_type): Likewise.
498 * arith.c: Fix typos in comments.
502 * dependency.c: Likewise.
503 * f95-lang.c: Likewise.
504 * gfortran.h: Likewise.
505 * matchexp.c: Likewise.
506 * module.c: Likewise.
507 * primary.c: Likewise.
508 * scanner.c: Likewise.
509 * trans-array.c: Likewise.
510 * trans-common.c: Likewise.
511 * trans-decl.c: Likewise.
512 * trans-expr.c: Likewise.
513 * trans-intrinsic.c: Likewise.
514 * trans-types.c: Likewise.
518 2008-07-19 Tobias Burnus <burnus@net-b.de>
521 * matchexp.c (gfc_get_parentheses): Remove obsolete workaround,
522 which caused the generation of wrong code.
524 2008-07-19 Tobias Burnus <burnus@net-b.de>
527 * scanner.c (load_file): Add argument to destinguish between
528 true filename and displayed filename.
529 (include_line,gfc_new_file): Adapt accordingly.
531 2008-07-19 Tobias Burnus <burnus@net-b.de>
533 * check.c (gfc_check_cshift,gfc_check_eoshift,gfc_check_unpack): Add rank
534 checks for cshift's shift and eoshift's shift and boundary args.
535 (gfc_check_unpack): Add rank and shape tests for unpack.
537 2008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
539 * gfortran.h (new): Remove macro.
540 * array.c (gfc_append_constructor, match_array_list,
541 gfc_match_array_constructor): Likewise.
542 * bbt.c (insert, gfc_insert_bbt): Likewise.
543 * decl.c (var_element, top_var_list, top_val_list, gfc_match_data,
544 get_proc_name): Likewise.
545 * expr.c (gfc_copy_actual_arglist): Likewise.
546 * interface.c (compare_actual_formal, check_new_interface,
547 gfc_add_interface): Likewise.
548 * intrinsic.c gfc_convert_type_warn, gfc_convert_chartype):
550 * io.c (match_io_iterator, match_io_list): Likewise.
551 * match.c (match_forall_header): Likewise.
552 * matchexp.c (build_node): Likewise.
553 * module.c (gfc_match_use): Likewise.
554 * scanner.c (load_file): Likewise.
555 * st.c (gfc_append_code): Likewise.
556 * symbol.c (save_symbol_data, gfc_get_sym_tree, gfc_undo_symbols,
557 gfc_commit_symbols): Likewise.
558 * trans-common.c (build_field): Likewise.
559 * trans-decl.c (gfc_finish_var_decl): Likewise.
560 * trans-expr.c (gfc_free_interface_mapping,
561 gfc_get_interface_mapping_charlen, gfc_add_interface_mapping,
562 gfc_finish_interface_mapping,
563 gfc_apply_interface_mapping_to_expr): Likewise.
564 * trans.h (gfc_interface_sym_mapping): Likewise.
566 2008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
568 * gfortran.h (operator): Remove macro.
569 (gfc_namespace, gfc_expr): Avoid C++ keywords.
570 * arith.c (eval_intrinsic, eval_intrinsic_f2, eval_intrinsic_f3):
572 * decl.c (access_attr_decl): Likewise.
573 * dependency.c (gfc_dep_compare_expr): Likewise.
574 * dump-parse-tree.c (show_expr, show_uop, show_namespace):
576 * expr.c (gfc_copy_expr, gfc_type_convert_binary,
577 simplify_intrinsic_op, check_intrinsic_op): Likewise.
578 * interface.c (fold_unary, gfc_match_generic_spec,
579 gfc_match_interface, gfc_match_end_interface,
580 check_operator_interface, check_uop_interfaces,
581 gfc_check_interfaces, gfc_extend_expr, gfc_extend_assign,
582 gfc_add_interface, gfc_current_interface_head,
583 gfc_set_current_interface_head): Likewise.
584 * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
586 * matchexp.c (gfc_get_parentheses, build_node): Likewise.
587 * module.c (gfc_use_rename, gfc_match_use, find_use_name_n,
588 number_use_names, mio_expr, load_operator_interfaces, read_module,
589 write_operator, write_module): Likewise.
590 * openmp.c (resolve_omp_atomic): Likewise.
591 * resolve.c (resolve_operator, gfc_resolve_character_operator,
592 gfc_resolve_uops): Likewise.
593 * symbol.c (free_uop_tree, gfc_free_namespace): Likewise.
594 * trans-expr.c (gfc_conv_expr_op): Likewise.
595 * trans-openmp.c (gfc_trans_omp_atomic): Likewise.
597 2008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
599 * gfortran.h (protected): Remove macro.
600 * dump-parse-tree.c (show_attr): Avoid C++ keywords.
601 * expr.c (gfc_check_pointer_assign): Likewise.
602 * interface.c (compare_parameter_protected): Likewise.
603 * intrinsic.c (enum class, add_sym, add_sym_0, add_sym_1,
604 add_sym_1s, add_sym_1m, add_sym_2, add_sym_2s, add_sym_3,
605 add_sym_3ml, add_sym_3red, add_sym_3s, add_sym_4, add_sym_4s,
606 add_sym_5s): Likewise.
607 * match.c (gfc_match_assignment, gfc_match_pointer_assignment):
609 * module.c (mio_symbol_attribute): Likewise.
610 * primary.c (match_variable): Likewise.
611 * resolve.c (resolve_equivalence): Likewise.
612 * symbol.c (check_conflict, gfc_add_protected, gfc_copy_attr):
614 * trans-types.c (gfc_get_array_type_bounds): Likewise.
616 2008-07-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
618 * arith.c (eval_type_intrinsic0): Avoid C++ keywords.
619 * gfortran.h (try, protected, operator, new): Likewise.
621 2008-07-17 Tobias Burnus <burnus@net-b.de>
625 * array.c (gfc_match_array_spec): Fix array-rank check.
626 * resolve.c (resolve_fl_derived): Fix constentness check
627 for the array dimensions.
629 2008-07-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
631 * Make-lang.in (gfortranspec.o): Fix dependencies.
633 2008-07-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
636 * io.c: Add error check for g0 edit descriptor followed by '.'.
638 2008-07-12 Daniel Kraft <d@domob.eu>
640 * resolve.c (resolve_fl_derived): Allow pointer components to empty
641 derived types fixing a missing part of PR fortran/33221.
643 2008-07-10 Daniel Kraft <d@domob.eu>
645 * gfc-internals.texi (section gfc_expr): Created documentation about
646 the gfc_expr internal data structure.
648 2008-07-07 Thomas Koenig <tkoenig@gcc.gnu.org>
651 * iresolve.c (gfc_resolve_product): Set shape of return
653 (gfc_resolve_sum): Likewise.
655 2008-07-07 Jakub Jelinek <jakub@redhat.com>
658 * f95-lang.c (poplevel): Don't ever add subblocks to
659 global_binding_level.
661 2008-07-02 Janus Weil <janus@gcc.gnu.org>
662 Tobias Burnus <burnus@net-b.de>
663 Paul Thomas <pault@gcc.gnu.org>
666 * gfortran.h (struct gfc_symbol): New member "proc_pointer".
667 * check.c (gfc_check_associated,gfc_check_null): Implement
669 * decl.c (match_procedure_decl): Ditto.
670 * expr.c (gfc_check_pointer_assign,gfc_check_assign_symbol): Ditto.
671 * interface.c (compare_actual_formal): Ditto.
673 * match.c (gfc_match_pointer_assignment): Ditto.
674 * parse.c (parse_interface): Ditto.
675 * primary.c (gfc_match_rvalue,match_variable): Ditto.
676 * resolve.c (resolve_fl_procedure): Ditto.
677 * symbol.c (check_conflict,gfc_add_external,gfc_add_pointer,
678 gfc_copy_attr,gen_fptr_param,build_formal_args): Ditto.
679 * trans-decl.c (get_proc_pointer_decl,gfc_get_extern_function_decl,
680 create_function_arglist): Ditto.
681 * trans-expr.c (gfc_conv_variable,gfc_conv_function_val,
682 gfc_conv_function_call,gfc_trans_pointer_assignment): Ditto.
684 2008-07-02 Thomas Koenig <tkoenig@gcc.gnu.org>
688 * iresolve.c (resolve_mask_arg): Don't convert mask to
689 kind=1 logical if it is of that type already.
691 2008-06-29 Thomas Koenig <tkoenig@gcc.gnu.org>
694 * iresolve.c (gfc_resolve_matmul): Copy shapes
697 2008-06-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
699 * invoke.texi: Add documentation for runtime behavior of
702 2008-06-28 Daniel Kraft <d@domob.eu>
704 * gfc-internals.texi (section gfc_code): Extended documentation about
705 gfc_code in the internal datastructures chapter including details about
706 how IF, DO and SELECT blocks look like and an example for how the
707 block-chaining works.
709 2008-06-25 Paul Thomas <pault@gcc.gnu.org>
712 * interface.c (check_intents): Correct error where the actual
713 arg was checked for a pointer argument, rather than the formal.
715 2008-06-24 Paul Thomas <pault@gcc.gnu.org>
718 * expr.c (gfc_check_assign): Change message and locus for
719 error when conform == 0.
721 2008-06-23 Jakub Jelinek <jakub@redhat.com>
724 * cpp.c (cpp_define_builtins): Change _OPENMP value to 200805.
726 2008-06-20 Laurynas Biveinis <laurynas.biveinis@gmail.com>
727 Tobias Burnus <burnus@net-b.de>
731 * scanner.c (preprocessor_line): do not call gfc_free for
732 current_file->filename if it differs from filename.
734 2008-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
736 * arith.c (hollerith2representation): Fix for -Wc++-compat.
737 * array.c (gfc_get_constructor): Likewise.
738 * decl.c (gfc_get_data_variable, gfc_get_data_value, gfc_get_data,
739 create_enum_history, gfc_match_final_decl): Likewise.
740 * error.c (error_char): Likewise.
741 * expr.c (gfc_get_expr, gfc_copy_expr): Likewise.
742 * gfortran.h (gfc_get_charlen, gfc_get_array_spec,
743 gfc_get_component, gfc_get_formal_arglist, gfc_get_actual_arglist,
744 gfc_get_namelist, gfc_get_omp_clauses, gfc_get_interface,
745 gfc_get_common_head, gfc_get_dt_list, gfc_get_array_ref,
746 gfc_get_ref, gfc_get_equiv, gfc_get_case, gfc_get_iterator,
747 gfc_get_alloc, gfc_get_wide_string): Likewise.
748 * interface.c (count_types_test): Likewise.
749 * intrinsic.c (add_char_conversions, gfc_intrinsic_init_1):
751 * io.c (gfc_match_open, gfc_match_close, match_filepos, match_io,
752 gfc_match_inquire, gfc_match_wait): Likewise.
753 * match.c (gfc_match, match_forall_iterator): Likewise.
754 * module.c (gfc_get_pointer_info, gfc_get_use_rename, add_fixup,
755 add_true_name, parse_string, write_atom, quote_string,
756 mio_symtree_ref, mio_gmp_real, write_common_0): Likewise.
757 * options.c (gfc_post_options): Likewise.
758 * primary.c (match_integer_constant, match_hollerith_constant,
759 match_boz_constant, match_real_constant,
760 gfc_get_structure_ctor_component, gfc_match_structure_constructor): Likewise.
761 * scanner.c (gfc_widechar_to_char, add_path_to_list,
762 add_file_change, load_line, get_file, preprocessor_line,
763 load_file, unescape_filename, gfc_read_orig_filename): Likewise.
764 * simplify.c (gfc_simplify_ibits, gfc_simplify_ishft,
765 gfc_simplify_ishftc): Likewise.
766 * symbol.c (gfc_get_st_label, gfc_get_namespace, gfc_new_symtree,
767 gfc_get_uop, gfc_new_symbol, save_symbol_data, gfc_get_gsymbol):
769 * target-memory.c (gfc_target_interpret_expr): Likewise.
770 * trans-const.c (gfc_build_wide_string_const): Likewise.
771 * trans-expr.c (gfc_add_interface_mapping): Likewise.
772 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
773 gfc_conv_intrinsic_int, gfc_conv_intrinsic_lib_function,
774 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_ctime,
775 gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam,
776 gfc_conv_intrinsic_minmax, gfc_conv_intrinsic_minmax_char,
777 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_index_scan_verify,
778 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_trim): Likewise.
779 * trans.c (gfc_get_backend_locus): Likewise.
780 * trans.h (gfc_get_ss): Likewise.
782 2008-06-18 Daniel Kraft <d@domob.eu>
784 PR fortran/36517, fortran/36492
785 * array.c (gfc_resolve_character_array_constructor): Call
786 gfc_set_constant_character_len with changed length-chec argument.
787 * decl.c (gfc_set_constant_character_len): Changed array argument to
788 be a generic length-checking argument that can be used for correct
789 checking with typespec and in special cases where the should-be length
790 is different from the target length.
791 (build_struct): Call gfc_set_constant_character_len with changed length
792 checking argument and introduced additional checks for exceptional
793 conditions on invalid code.
794 (add_init_expr_to_sym), (do_parm): Call gfc_set_constant_character_len
795 with changed argument.
796 * match.h (gfc_set_constant_character_len): Changed third argument to
797 int for the should-be length rather than bool.
799 2008-06-17 Daniel Kraft <d@domob.eu>
802 * array.c (gfc_resolve_character_array_constructor): Check that all
803 elements with constant character length have the same one rather than
804 fixing it if no typespec is given, emit an error if they don't. Changed
805 return type to "try" and return FAILURE for the case above.
806 (gfc_resolve_array_constructor): Removed unneeded call to
807 gfc_resolve_character_array_constructor in this function.
808 * gfortran.h (gfc_resolve_character_array_constructor): Returns try.
809 * trans-array.c (get_array_ctor_strlen): Return length of first element
810 rather than last element.
811 * resolve.c (gfc_resolve_expr): Handle FAILURE return from
812 gfc_resolve_character_array_constructor.
814 2008-06-17 Paul Thomas <pault@gcc.gnu.org>
817 * resolve.c (add_dt_to_dt_list): New function.
818 (resolve_fl_derived): Call new function for pointer components
819 and when derived type resolved.
821 2008-06-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
824 * trans-decl.c (gfc_generate_function_code): Add range_check to options
827 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
829 * gfc-internals.texi: Expand TABs, drop indentation outside examples.
830 * gfortran.texi: Likewise.
831 * intrinsic.texi: Likewise.
832 * invoke.texi: Likewise.
834 2008-06-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
837 * trans-io.c (gfc_build_io_library_fndecls): Build declaration for
838 transfer_character_wide which includes passing in the character kind to
839 support wide character IO. (transfer_expr): If the kind == 4, create the
840 argument and build the call.
841 * gfortran.texi: Fix typo.
843 2008-06-13 Tobias Burnus <burnus@net-b.de>
846 * decl.c (do_parm): Handle init expression for len=*.
848 2008-06-12 Tobias Burnus <burnus@net-b.de>
851 * trans-intrinsic.c (gfc_conv_intrinsic_index_scan_verify):
852 Fix passing of the BACK= argument.
854 2008-06-10 Jerry DeLisle <jvdelisle@gcc.gnu.org>
856 * cpp.c: Add copyright notice.
857 * cpp.h: Add copyright notice.
859 2008-06-08 Janus Weil <janus@gcc.gnu.org>
862 * decl.c (match_procedure_decl): Correctly recognize if the interface
863 is an intrinsic procedure.
865 2008-06-08 Tobias Burnus <burnus@net-b.de>
868 * resolve.c (resolve_symbol): Copy more attributes for
869 PROCEDUREs with interfaces.
871 2008-06-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
875 * io.c (check_format): Add new error message for zero width.
876 Use new error message for FMT_A and with READ, FMT_G. Allow
877 FMT_G with WRITE except when -std=F95 and -std=F2003.
879 2008-06-07 Tobias Burnus <burnus@net-b.de>
882 * intrinsic.c (add_functions): Implement c_sizeof.
883 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Do not
884 create unneeded variable in the scalar case.
885 * intrinsic.texi: Add C_SIZEOF documentation.
887 2008-06-06 Tobias Burnus <burnus@net-b.de>
889 * intrinsic.texi (BESSEL_J1): Fix BES(S)EL_J1 typo.
891 2008-06-06 Jakub Jelinek <jakub@redhat.com>
893 * scanner.c (skip_free_comments, skip_fixed_comments): Handle tabs.
894 * parse.c (next_free): Allow tab after !$omp.
895 (decode_omp_directive): Handle !$omp task, !$omp taskwait
897 (case_executable): Add ST_OMP_TASKWAIT.
898 (case_exec_markers): Add ST_OMP_TASK.
899 (gfc_ascii_statement): Handle ST_OMP_TASK, ST_OMP_END_TASK and
901 (parse_omp_structured_block, parse_executable): Handle ST_OMP_TASK.
902 * gfortran.h (gfc_find_sym_in_expr): New prototype.
903 (gfc_statement): Add ST_OMP_TASK, ST_OMP_END_TASK and ST_OMP_TASKWAIT.
904 (gfc_omp_clauses): Add OMP_SCHED_AUTO to sched_kind,
905 OMP_DEFAULT_FIRSTPRIVATE to default_sharing. Add collapse and
907 (gfc_exec_op): Add EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
908 * f95-lang.c (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
909 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP, LANG_HOOKS_OMP_CLAUSE_DTOR,
910 LANG_HOOKS_OMP_PRIVATE_OUTER_REF): Define.
911 * trans.h (gfc_omp_clause_default_ctor): Add another argument.
912 (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
913 gfc_omp_clause_dtor, gfc_omp_private_outer_ref): New prototypes.
914 * types.def (BT_ULONGLONG, BT_PTR_ULONGLONG,
915 BT_FN_BOOL_ULONGLONGPTR_ULONGLONGPTR,
916 BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULLPTR_ULLPTR,
917 BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULL_ULLPTR_ULLPTR,
918 BT_FN_VOID_PTR_PTR, BT_PTR_FN_VOID_PTR_PTR,
919 BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): New.
920 (BT_BOOL): Use integer type with BOOL_TYPE_SIZE rather
921 than boolean_type_node.
922 * dump-parse-tree.c (gfc_show_omp_node): Handle EXEC_OMP_TASK,
923 EXEC_OMP_TASKWAIT, OMP_SCHED_AUTO, OMP_DEFAULT_FIRSTPRIVATE,
924 untied and collapse clauses.
925 (gfc_show_code_node): Handle EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
926 * trans.c (gfc_trans_code): Handle EXEC_OMP_TASK and
928 * st.c (gfc_free_statement): Likewise.
929 * resolve.c (gfc_resolve_blocks, resolve_code): Likewise.
930 (find_sym_in_expr): Rename to...
931 (gfc_find_sym_in_expr): ... this. No longer static.
932 (resolve_allocate_expr, resolve_ordinary_assign): Adjust caller.
933 * match.h (gfc_match_omp_task, gfc_match_omp_taskwait): New
935 * openmp.c (resolve_omp_clauses): Allow allocatable arrays in
936 firstprivate, lastprivate, reduction, copyprivate and copyin
938 (omp_current_do_code): Made static.
939 (omp_current_do_collapse): New variable.
940 (gfc_resolve_omp_do_blocks): Compute omp_current_do_collapse,
941 clear omp_current_do_code and omp_current_do_collapse on return.
942 (gfc_resolve_do_iterator): Handle collapsed do loops.
943 (resolve_omp_do): Likewise, diagnose errorneous collapsed do loops.
944 (OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED): Define.
945 (gfc_match_omp_clauses): Handle default (firstprivate),
946 schedule (auto), untied and collapse (n) clauses.
947 (OMP_DO_CLAUSES): Add OMP_CLAUSE_COLLAPSE.
948 (OMP_TASK_CLAUSES): Define.
949 (gfc_match_omp_task, gfc_match_omp_taskwait): New functions.
950 * trans-openmp.c (gfc_omp_private_outer_ref): New function.
951 (gfc_omp_clause_default_ctor): Add outer argument. For allocatable
952 arrays allocate them with the bounds of the outer var if outer
954 (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
955 gfc_omp_clause_dtor): New functions.
956 (gfc_trans_omp_array_reduction): If decl is allocatable array,
957 allocate it with outer var's bounds in OMP_CLAUSE_REDUCTION_INIT
958 and deallocate it in OMP_CLAUSE_REDUCTION_MERGE.
959 (gfc_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
960 for assumed-size arrays.
961 (gfc_trans_omp_do): Add par_clauses argument. If dovar is
962 present in lastprivate clause and do loop isn't simple,
963 set OMP_CLAUSE_LASTPRIVATE_STMT. If dovar is present in
964 parallel's lastprivate clause, change it to shared and add
965 lastprivate clause to OMP_FOR_CLAUSES. Handle collapsed do loops.
966 (gfc_trans_omp_directive): Adjust gfc_trans_omp_do callers.
967 (gfc_trans_omp_parallel_do): Likewise. Move collapse clause to
968 OMP_FOR from OMP_PARALLEL.
969 (gfc_trans_omp_clauses): Handle OMP_SCHED_AUTO,
970 OMP_DEFAULT_FIRSTPRIVATE, untied and collapse clauses.
971 (gfc_trans_omp_task, gfc_trans_omp_taskwait): New functions.
972 (gfc_trans_omp_directive): Handle EXEC_OMP_TASK and
975 2008-06-04 Janus Weil <janus@gcc.gnu.org>
979 * resolve.c (resolve_symbol): Correctly copy the interface for a
980 PROCEDURE declaration.
982 2008-06-02 Janus Weil <janus@gcc.gnu.org>
985 * symbol.c (gfc_add_allocatable,gfc_add_dimension,
986 gfc_add_explicit_interface): Added checks.
987 * decl.c (attr_decl1): Added missing "var_locus".
988 * parse.c (parse_interface): Checking for errors.
990 2008-06-02 Daniel Kraft <d@domob.eu>
992 * gfortran.h: New statement-type ST_FINAL for FINAL declarations.
993 (struct gfc_symbol): New member f2k_derived.
994 (struct gfc_namespace): New member finalizers, for use in the above
995 mentioned f2k_derived namespace.
996 (struct gfc_finalizer): New type defined for finalizers linked list.
997 * match.h (gfc_match_final_decl): New function header.
998 * decl.c (gfc_match_derived_decl): Create f2k_derived namespace on
999 constructed symbol node.
1000 (gfc_match_final_decl): New function to match a FINAL declaration line.
1001 * parse.c (decode_statement): match-call for keyword FINAL.
1002 (parse_derived): Parse CONTAINS section and accept FINAL statements.
1003 * resolve.c (gfc_resolve_finalizers): New function to resolve (that is
1004 in this case, check) a list of finalizer procedures.
1005 (resolve_fl_derived): Call gfc_resolve_finalizers here.
1006 * symbol.c (gfc_get_namespace): Initialize new finalizers to NULL.
1007 (gfc_free_namespace): Free finalizers list.
1008 (gfc_new_symbol): Initialize new f2k_derived to NULL.
1009 (gfc_free_symbol): Free f2k_derived namespace.
1010 (gfc_free_finalizer): New function to free a single gfc_finalizer node.
1011 (gfc_free_finalizer_list): New function to free a linked list of
1012 gfc_finalizer nodes.
1014 2008-06-02 Daniel Franke <franke.daniel@gmail.com>
1018 * cpp.c (gfc_cpp_init): Do not initialize builtins if
1019 processing already preprocessed input.
1020 (gfc_cpp_preprocess): Finalize output with newline.
1022 2008-05-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1024 * intrinsic.texi: Revert wrong commit.
1026 2008-05-31 Steven G. Kargl <kargls@comcast.net>
1028 * arith.c (gfc_arith_init_1): Remove now unused r and c variables.
1029 Cleanup numerical inquiry function initialization.
1030 (gfc_arith_done_1): Replace multiple mpfr_clear() invocations with
1031 a single mpfr_clears().
1032 (gfc_check_real_range): Re-arrange logic to eliminate multiple
1033 unnecessary branching and assignments.
1034 (gfc_arith_times): Use mpfr_clears() in preference to multiple
1036 (gfc_arith_divide): Ditto.
1037 (complex_reciprocal): Eliminate now unused variables a, re, im.
1038 Cleanup the mpfr abuse. Use mpfr_clears() in preference to
1039 multiple mpfr_clear().
1040 (complex_pow): Fix comment whitespace. Use mpfr_clears() in
1041 preference to multiple mpfr_clear().
1042 * simplify.c (gfc_simplify_and): Remove blank line.
1043 (gfc_simplify_atan2): Move error checking earlier to eliminate
1044 a now unnecessay gfc_free_expr().
1045 (gfc_simplify_bessel_j0): Remove unnecessary gfc_set_model_kind().
1046 (gfc_simplify_bessel_j1): Ditto.
1047 (gfc_simplify_bessel_jn): Ditto.
1048 (gfc_simplify_bessel_y0): Ditto.
1049 (gfc_simplify_bessel_y1): Ditto.
1050 (gfc_simplify_bessel_yn): Ditto.
1051 (only_convert_cmplx_boz): Eliminate unnecessary duplicate code, and
1052 combine nested if statement rational expressions.
1053 (gfc_simplify_cos): Use mpfr_clears() in preference to multiple
1055 (gfc_simplify_exp): Ditto.
1056 (gfc_simplify_fraction): Move gfc_set_model_kind() to after the
1057 special case of 0. Use mpfr_clears() in preference to multiple
1059 (gfc_simplify_gamma): Eliminate unnecessary gfc_set_model_kind().
1060 (gfc_simplify_lgamma): Ditto.
1061 (gfc_simplify_log10): Ditto.
1062 (gfc_simplify_log): Move gfc_set_model_kind () inside switch
1063 statement. Use mpfr_clears() in preference to multiple mpfr_clear().
1064 (gfc_simplify_mod): Eliminate now unused variables quot, iquot,
1065 and term. Simplify the mpfr magic.
1066 (gfc_simplify_modulo): Ditto.
1067 (gfc_simplify_nearest): Eliminate unnecessary gfc_set_model_kind().
1068 (gfc_simplify_scale): Use mpfr_clears() in preference to multiple
1070 (gfc_simplify_sin): Ditto
1071 (gfc_simplify_sqrt): Ditto
1072 (gfc_simplify_set_exponent): Move gfc_set_model_kind() to after the
1073 special case of 0. Use mpfr_clears() in preference to multiple
1076 2008-05-29 Daniel Franke <franke.daniel@gmail.com>
1079 * Make-lang.in (F95_OBJS): Added dependency on FORTRAN_TARGET_OBJS.
1081 2008-05-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1083 * scanner.c (load_line): Add first_char argument. Don't call ungetc.
1084 (gfc_read_orig_filename): Adjust call to load_line. Don't call
1086 (load_file): Adjust call to load_line.
1088 2008-05-28 Janus Weil <janus@gcc.gnu.org>
1092 * interface.c (gfc_procedure_use): Enable argument checking for
1093 external procedures with explicit interface.
1094 * symbol.c (check_conflict): Fix conflict checking for externals.
1095 (copy_formal_args): Fix handling of arrays.
1096 * resolve.c (resolve_specific_f0, resolve_specific_s0): Fix handling
1098 * parse.c (parse_interface): Non-abstract INTERFACE statement implies
1101 2008-05-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1104 * intrinsic.c (gfc_convert_chartype): Don't mark conversion
1106 * trans-array.c (gfc_trans_array_ctor_element): Divide element
1107 size by the size of one character to obtain length.
1108 * iresolve.c (gfc_resolve_cshift): Call the _char4 variant when
1110 (gfc_resolve_eoshift): Likewise.
1111 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Minor beautification.
1112 (gfc_conv_intrinsic_fdate): Minor beautification.
1113 (gfc_conv_intrinsic_ttynam): Minor beautification.
1114 (gfc_conv_intrinsic_minmax_char): Allow all character kinds.
1115 (size_of_string_in_bytes): New function.
1116 (gfc_conv_intrinsic_size): Call size_of_string_in_bytes for
1117 character expressions.
1118 (gfc_conv_intrinsic_sizeof): Likewise.
1119 (gfc_conv_intrinsic_array_transfer): Likewise.
1120 (gfc_conv_intrinsic_trim): Allow all character kinds. Minor
1122 (gfc_conv_intrinsic_repeat): Fix comment typo.
1123 * simplify.c (gfc_convert_char_constant): Take care of conversion
1124 of array constructors.
1126 2008-05-27 Tobias Burnus <burnus@net-b.de>
1129 * trans-array.c (gfc_set_loop_bounds_from_array_spec):
1130 Add missing fold_convert.
1132 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
1134 * fortran/cpp.c (cpp_define_builtins): Remove usage of TARGET_* macros,
1135 added FIXME instead.
1137 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
1140 * lang.opt (A, C, CC, D, E, H, P, U, cpp, d, fworking-directory,
1141 imultilib, iprefix, iquote, isysroot, isystem, nocpp, nostdinc,
1142 o, undef, v): New options.
1143 * options.c (gfc_init_options): Also initialize preprocessor
1145 (gfc_post_options): Also handle post-initialization of preprocessor
1147 (gfc_handle_option): Check if option is a preprocessor option.
1148 If yes, let gfc_cpp_handle_option() handle the option.
1149 * lang-specs.h: Reorganized to handle new options.
1150 * scanner.c (gfc_new_file): Read temporary file instead of
1151 input source if preprocessing is enabled.
1152 * f95-lang.c (gfc_init): Initialize preprocessor.
1153 (gfc_finish): Clean up preprocessor.
1156 * Make-lang.in: Added new objects and dependencies.
1157 * gfortran.texi: Updated section "Preprocessing and
1158 conditional compilation".
1159 * invoke.texi: Added new section "Preprocessing Options",
1160 listed and documented the preprocessing options handled
1163 2008-05-25 Tobias Burnus <burnus@net-b.de>
1166 * trans-expr.c (gfc_conv_function_call): Remove library
1167 call for c_f_pointer with scalar Fortran pointers and for
1170 2008-05-21 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1173 * iresolve.c (check_charlen_present): Don't force the rank to 1.
1175 2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1178 * trans-expr.c (gfc_conv_string_tmp): Pick the correct type for
1179 the temporary variable.
1181 2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1183 * simplify.c (gfc_simplify_dble, gfc_simplify_real): Initialize
1184 result variable to avoid warnings.
1186 2008-05-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1188 * intrinsic.c (char_conversions, ncharconv): New static variables.
1189 (find_char_conv): New function.
1190 (add_functions): Add simplification functions for ADJUSTL and
1191 ADJUSTR. Don't check the kind of their argument. Add checking for
1192 LGE, LLE, LGT and LLT.
1193 (add_subroutines): Fix argument type for SLEEP. Fix argument name
1195 (add_char_conversions): New function.
1196 (gfc_intrinsic_init_1): Call add_char_conversions.
1197 (gfc_intrinsic_done_1): Free char_conversions.
1198 (check_arglist): Use kind == 0 as a signal that we don't want
1199 the kind value to be checked.
1200 (do_simplify): Also simplify character functions.
1201 (gfc_convert_chartype): New function
1202 * trans-array.c (gfc_trans_array_ctor_element): Don't force the
1203 use of default character type.
1204 (gfc_trans_array_constructor_value): Likewise.
1205 (get_array_ctor_var_strlen): Use integer kind to build an integer
1206 instead of a character kind!
1207 (gfc_build_constant_array_constructor): Don't force the use of
1208 default character type.
1209 (gfc_conv_loop_setup): Likewise.
1210 * trans-expr.c (gfc_conv_string_tmp): Don't force the use of
1211 default character type. Allocate enough memory for wide strings.
1212 (gfc_conv_concat_op): Make sure operand kind are the same.
1213 (string_to_single_character): Remove gfc_ prefix. Reindent.
1214 Don't force the use of default character type.
1215 (gfc_conv_scalar_char_value): Likewise.
1216 (gfc_build_compare_string): Call string_to_single_character.
1217 (fill_with_spaces): New function
1218 (gfc_trans_string_copy): Add kind arguments. Use them to deal
1219 with wide character kinds.
1220 (gfc_conv_statement_function): Whitespace fix. Call
1221 gfc_trans_string_copy with new kind arguments.
1222 (gfc_conv_substring_expr): Call gfc_build_wide_string_const
1223 instead of using gfc_widechar_to_char.
1224 (gfc_conv_string_parameter): Don't force the use of default
1226 (gfc_trans_scalar_assign): Pass kind args to gfc_trans_string_copy.
1227 * intrinsic.h (gfc_check_lge_lgt_lle_llt, gfc_convert_char_constant,
1228 gfc_resolve_adjustl, gfc_resolve_adjustr): New prototypes.
1229 * decl.c (gfc_set_constant_character_len): Don't assert the
1230 existence of a single character kind.
1231 * trans-array.h (gfc_trans_string_copy): New prototype.
1232 * gfortran.h (gfc_check_character_range, gfc_convert_chartype):
1234 * error.c (print_wide_char_into_buffer): New function lifting
1235 code from gfc_print_wide_char. Fix order to output '\x??' instead
1237 (gfc_print_wide_char): Call print_wide_char_into_buffer.
1238 (show_locus): Call print_wide_char_into_buffer with buffer local
1240 * trans-const.c (gfc_build_wide_string_const): New function.
1241 (gfc_conv_string_init): Deal with wide characters strings
1243 (gfc_conv_constant_to_tree): Call gfc_build_wide_string_const.
1244 * trans-stmt.c (gfc_trans_label_assign): Likewise.
1245 (gfc_trans_character_select): Deal with wide strings.
1246 * expr.c (gfc_check_assign): Allow conversion between character
1247 kinds on assignment.
1248 * trans-const.h (gfc_build_wide_string_const): New prototype.
1249 * trans-types.c (gfc_get_character_type_len_for_eltype,
1250 gfc_get_character_type_len): Create too variants of the old
1251 gfc_get_character_type_len, one getting kind argument and the
1252 other one directly taking a type tree.
1253 * trans.h (gfor_fndecl_select_string_char4,
1254 gfor_fndecl_convert_char1_to_char4,
1255 gfor_fndecl_convert_char4_to_char1): New prototypes.
1256 * trans-types.h (gfc_get_character_type_len_for_eltype): New
1258 * resolve.c (resolve_operator): Exit early when kind mismatches
1259 are detected, because that makes us issue an error message later.
1260 (validate_case_label_expr): Fix wording of error message.
1261 * iresolve.c (gfc_resolve_adjustl, gfc_resolve_adjustr): New
1263 (gfc_resolve_pack): Call _char4 variants of library function
1264 when dealing with wide characters.
1265 (gfc_resolve_reshape): Likewise.
1266 (gfc_resolve_spread): Likewise.
1267 (gfc_resolve_transpose): Likewise.
1268 (gfc_resolve_unpack): Likewise.
1269 * target-memory.c (size_character): Take character kind bit size
1270 correctly into account (not that it changes anything for now, but
1272 (gfc_encode_character): Added gfc_ prefix. Encoding each
1273 character of a string by calling native_encode_expr for the
1274 corresponding unsigned integer.
1275 (gfc_target_encode_expr): Add gfc_ prefix to encode_character.
1276 * trans-decl.c (gfc_build_intrinsic_function_decls): Build
1277 gfor_fndecl_select_string_char4, gfor_fndecl_convert_char1_to_char4
1278 and gfor_fndecl_convert_char4_to_char1.
1279 * target-memory.h (gfc_encode_character): New prototype.
1280 * arith.c (gfc_check_character_range): New function.
1281 (eval_intrinsic): Allow non-default character kinds.
1282 * check.c (gfc_check_access_func): Only allow default
1283 character kind arguments.
1284 (gfc_check_chdir): Likewise.
1285 (gfc_check_chdir_sub): Likewise.
1286 (gfc_check_chmod): Likewise.
1287 (gfc_check_chmod_sub): Likewise.
1288 (gfc_check_lge_lgt_lle_llt): New function.
1289 (gfc_check_link): Likewise.
1290 (gfc_check_link_sub): Likewise.
1291 (gfc_check_symlnk): Likewise.
1292 (gfc_check_symlnk_sub): Likewise.
1293 (gfc_check_rename): Likewise.
1294 (gfc_check_rename_sub): Likewise.
1295 (gfc_check_fgetputc_sub): Likewise.
1296 (gfc_check_fgetput_sub): Likewise.
1297 (gfc_check_stat): Likewise.
1298 (gfc_check_stat_sub): Likewise.
1299 (gfc_check_date_and_time): Likewise.
1300 (gfc_check_ctime_sub): Likewise.
1301 (gfc_check_fdate_sub): Likewise.
1302 (gfc_check_gerror): Likewise.
1303 (gfc_check_getcwd_sub): Likewise.
1304 (gfc_check_getarg): Likewise.
1305 (gfc_check_getlog): Likewise.
1306 (gfc_check_hostnm): Likewise.
1307 (gfc_check_hostnm_sub): Likewise.
1308 (gfc_check_ttynam_sub): Likewise.
1309 (gfc_check_perror): Likewise.
1310 (gfc_check_unlink): Likewise.
1311 (gfc_check_unlink_sub): Likewise.
1312 (gfc_check_system_sub): Likewise.
1313 * primary.c (got_delim): Perform correct character range checking
1315 * trans-intrinsic.c (gfc_conv_intrinsic_conversion): Generate
1316 calls to library functions convert_char4_to_char1 and
1317 convert_char1_to_char4 for character conversions.
1318 (gfc_conv_intrinsic_char): Allow all character kings.
1319 (gfc_conv_intrinsic_strcmp): Fix whitespace.
1320 (gfc_conv_intrinsic_repeat): Take care of all character kinds.
1321 * intrinsic.texi: For all GNU intrinsics accepting character
1322 arguments, mention that they're restricted to the default kind.
1323 * simplify.c (simplify_achar_char): New function.
1324 (gfc_simplify_achar, gfc_simplify_char): Call simplify_achar_char.
1325 gfc_simplify_ichar): Don't error out for wide characters.
1326 (gfc_convert_char_constant): New function.
1328 2008-05-18 Steven G. Kargl <kargls@comcast.net>
1331 * symbol.c (check_conflict): Issue errors for abuse of PUBLIC, PRIVATE,
1333 * resolve.c (gfc_verify_binding_labels): Fix NULL pointer dereference.
1335 2008-05-17 Tobias Burnus <burnus@net-b.de>
1337 * intrinsic.texi: Correct description of GET_COMMAND_ARGUMENT
1338 and GET_ENVIRONMENT_VARIABLE; fix keyword= name for GETENV,
1339 GETLOG, GMTIME, HOSTNM, IRAND, ITIME, KILL.
1340 Move LOG_GAMMA after LOG10.
1342 2008-05-17 Tobias Burnus <burnus@net-b.de>
1344 * intrinsic.c (add_functions): Change FLUSH(C) to FLUSH(UNIT).
1345 * intrinsic.texi: Change INTEGER(*) to INTEGER; fix keyword= name for
1346 ABS, ADJUSTL, AINT, ALLOCATED, ANINT, ASSOCIATED, C_ASSOCIATED,
1347 CEILING, DBLE, DFLOAT, DOT_PRODUCT, DREAL, FLOAT, FLOOR, GET_COMMAND.
1349 2008-05-16 Paul Thomas <pault@gcc.gnu.org>
1353 * trans-stmt.c (gfc_trans_where): Tighten up the dependency
1354 check for calling gfc_trans_where_3.
1357 * trans-stmt.c (gfc_trans_where_2): Set the mask size to zero
1358 if it is calculated to be negative.
1361 * trans-stmt.c (gfc_trans_where_3, gfc_trans_where_assign): Set
1362 ss->where for scalar right hand sides.
1363 * trans-array.c (gfc_add_loop_ss_code): If ss->where is set do
1364 not evaluate scalars outside the loop. Clean up whitespace.
1365 * trans.h : Add a bitfield 'where' to gfc_ss.
1367 2008-05-16 Tobias Burnus <burnus@net-b.de>
1369 * libgfortran.h: Increase GFC_MAX_DIMENSIONS to 15.
1370 * array.c (gfc_match_array_spec): Error with -std=f2003 if rank > 7.
1372 2008-04-16 Daniel Kraft <d@domob.eu>
1375 * gfortran.h: Added field "length_from_typespec" to gfc_charlength.
1376 * aray.c (gfc_match_array_constructor): Added code to parse typespec.
1377 (check_element_type, check_constructor_type, gfc_check_constructor_type):
1378 Extended to support explicit typespec on constructor.
1379 (gfc_resolve_character_array_constructor): Pad strings correctly for
1380 explicit, constant character length.
1381 * trans-array.c: New static global variable "typespec_chararray_ctor"
1382 (gfc_trans_array_constructor): New code to support explicit but dynamic
1385 2008-05-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1388 * decl.c (match_attr_spec): Check for matching pairs of parenthesis.
1389 * expr.c (gfc_specification_expr): Supplement the error message with the
1390 type that was found.
1391 * resolve.c (gfc_resolve_index): Likewise.
1392 * match.c (gfc_match_parens): Clarify error message with "at or before".
1393 (gfc_match_do): Check for matching pairs of parenthesis.
1395 2008-05-16 Tobias Burnus <burnus@net-b.de
1397 * intrinsic.texi: Write Fortran 77/90/95 instead of F77/90/95;
1398 add missing KIND argument to ACHAR and NINT; and state that
1399 the KIND argument is a F2003 extension for ACHAR, COUNT, IACHAR,
1400 ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND, VERIFY.
1402 2008-05-16 Daniel Kraft <d@domob.eu>
1404 * primary.c: New private structure "gfc_structure_ctor_component".
1405 (gfc_free_structure_ctor_component): New helper function.
1406 (gfc_match_structure_constructor): Extended largely to support named
1407 arguments and default initialization for structure constructors.
1409 2008-05-15 Steven G. Kargl <kargls@comcast.net>
1411 * simplify.c (gfc_simplify_dble, gfc_simplify_float,
1412 simplify_bound, gfc_simplify_nearest, gfc_simplify_real): Plug
1413 possible memory leaks.
1414 (gfc_simplify_reshape): Plug possible memory leaks and dereferencing
1417 2008-05-15 Steven G. Kargl <kargls@comcast.net>
1420 * simplify.c (gfc_simplify_int, gfc_simplify_intconv): Replaced hand
1421 rolled integer conversion with gfc_int2int, gfc_real2int, and
1423 (gfc_simplify_intconv): Renamed to simplify_intconv.
1425 2008-05-15 Steven G. Kargl, <kargl@comcast.net>
1426 * gfortran.dg/and_or_xor.f90: New test
1428 * fortran/simplify.c (gfc_simplify_and, gfc_simplify_or,
1429 gfc_simplify_xor): Don't range check logical results.
1431 2008-05-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1433 * trans-expr.c (gfc_conv_concat_op): Take care of nondefault
1435 (gfc_build_compare_string): Add kind argument and use it.
1436 (gfc_conv_statement_function): Fix indentation.
1437 * gfortran.h (gfc_character_info): New structure.
1438 (gfc_character_kinds): New array.
1439 * trans-types.c (gfc_character_kinds, gfc_character_types,
1440 gfc_pcharacter_types): New array.
1441 (gfc_init_kinds): Fill character kinds array.
1442 (validate_character): Take care of nondefault character kinds.
1443 (gfc_build_uint_type): New function.
1444 (gfc_init_types): Take care of nondefault character kinds.
1445 (gfc_get_char_type, gfc_get_pchar_type): New functions.
1446 (gfc_get_character_type_len): Use gfc_get_char_type.
1447 * trans.h (gfc_build_compare_string): Adjust prototype.
1448 (gfor_fndecl_compare_string_char4, gfor_fndecl_concat_string_char4,
1449 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
1450 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
1451 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
1452 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4): New
1454 * trans-types.h (gfc_get_char_type, gfc_get_pchar_type): New
1456 * trans-decl.c (gfor_fndecl_compare_string_char4,
1457 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
1458 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
1459 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
1460 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4,
1461 gfor_fndecl_concat_string_char4): New function decls.
1462 (gfc_build_intrinsic_function_decls): Define new *_char4 function
1464 * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char,
1465 gfc_conv_intrinsic_len_trim, gfc_conv_intrinsic_ichar,
1466 gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_trim,
1467 gfc_conv_intrinsic_function): Deal with nondefault character kinds.
1469 2008-05-15 Sa Liu <saliu@de.ibm.com>
1471 * iso-c-binding.def: Add standard parameter to macro NAMED_INTCST.
1472 All existing NAMED_INTCST definitions has standard GFC_STD_F2003,
1473 c_int128_t, c_int_least128_t and c_int_fast128_t are added as
1475 * iso-fortran-evn.def: Add standard parameter GFC_STD_F2003
1476 to macro NAMED_INTCST.
1477 * symbol.c (std_for_isocbinding_symbol): New helper function to
1478 return the standard that supports this isocbinding symbol.
1479 (generate_isocbinding_symbol): Do not generate GNU extension symbols
1480 if std=f2003. Add new parameter to NAMED_INTCST.
1481 * module.c (use_iso_fortran_env_module): Add new parameter to
1482 NAMED_INTCST and new field standard to struct intmod_sym.
1483 * gfortran.h: Add new parameter to NAMED_INTCST.
1484 * trans-types.c (init_c_interop_kinds): Add new parameter to
1486 * intrinsic.texi: Documented new types C_INT128_T, C_INT_LEASE128_T
1487 and C_INT_FAST128_T.
1489 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1492 * trans-decl.c (gfc_build_dummy_array_decl): Don't repack
1493 arrays that have the TARGET attribute.
1495 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1498 * simplify.c (only_convert_cmplx_boz): New function.
1499 (gfc_simplify_cmplx, gfc_simplify_complex, gfc_simplify_dcmplx):
1500 Call only_convert_cmplx_boz.
1502 2008-05-14 Paul Thomas <pault@gcc.gnu.org>
1505 * interface.c (compare_actual_formal): Do not check sizes if the
1506 actual is BT_PROCEDURE.
1508 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1511 * trans-array.c (gfc_conv_ss_startstride): Any negative size is
1512 the same as zero size.
1513 (gfc_conv_loop_setup): Fix size calculation.
1515 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1518 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Correctly
1519 handle zero-size sections.
1521 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1524 * scanner.c (preprocessor_line): Allocate enough memory for a
1527 2008-05-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1530 * target-memory.c (gfc_target_expr_size): Correctly treat
1532 (gfc_target_encode_expr): Likewise.
1533 (gfc_interpret_complex): Whitespace change.
1535 2008-05-11 Thomas Koenig <tkoenig@gcc.gnu.org>
1538 * trans.c (gfc_call_malloc): If size equals zero, allocate one
1539 byte; don't return a null pointer.
1541 2008-05-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1544 * module.c (quote_string): Fix sprintf format.
1546 2008-05-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1549 * module.c (quote_string, unquote_string,
1550 mio_allocated_wide_string): New functions.
1551 (mio_expr): Call mio_allocated_wide_string where needed.
1553 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
1555 * trans-decl.c (gfc_get_extern_function_decl, build_function_decl):
1556 Rename DECL_IS_PURE to DECL_PURE_P.
1558 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1560 * arith.c: (gfc_arith_concat, gfc_compare_string,
1561 gfc_compare_with_Cstring, hollerith2representation,
1562 gfc_hollerith2int, gfc_hollerith2real, gfc_hollerith2complex,
1563 gfc_hollerith2character, gfc_hollerith2logical): Use wide
1564 characters for character constants.
1565 * data.c (create_character_intializer): Likewise.
1566 * decl.c (gfc_set_constant_character_len): Likewise.
1567 * dump-parse-tree.c (show_char_const): Correctly dump wide
1569 error.c (print_wide_char): Rename into gfc_print_wide_char.
1570 (show_locus): Adapt to new prototype of gfc_print_wide_char.
1571 expr.c (free_expr0): Representation is now disjunct from
1572 character string value, so we always free it.
1573 (gfc_copy_expr, find_substring_ref, gfc_simplify_expr): Adapt
1574 to wide character strings.
1575 * gfortran.h (gfc_expr): Make value.character.string a wide string.
1576 (gfc_wide_toupper, gfc_wide_strncasecmp, gfc_wide_memset,
1577 gfc_widechar_to_char, gfc_char_to_widechar): New prototypes.
1578 (gfc_get_wide_string): New macro.
1579 (gfc_print_wide_char): New prototype.
1580 * io.c (format_string): Make a wide string.
1581 (next_char, gfc_match_format, compare_to_allowed_values,
1582 gfc_match_open): Deal with wide strings.
1583 * module.c (mio_expr): Convert between wide strings and ASCII ones.
1584 * primary.c (match_hollerith_constant, match_charkind_name):
1585 Handle wide strings.
1586 * resolve.c (build_default_init_expr): Likewise.
1587 * scanner.c (gfc_wide_toupper, gfc_wide_memset,
1588 gfc_char_to_widechar): New functions.
1589 (wide_strchr, gfc_widechar_to_char, gfc_wide_strncasecmp):
1590 Changes in prototypes.
1591 (gfc_define_undef_line, load_line, preprocessor_line,
1592 include_line, load_file, gfc_read_orig_filename): Handle wide
1594 * simplify.c (gfc_simplify_achar, gfc_simplify_adjustl,
1595 gfc_simplify_adjustr, gfc_simplify_char, gfc_simplify_iachar,
1596 gfc_simplify_ichar, simplify_min_max, gfc_simplify_new_line,
1597 gfc_simplify_repeat): Handle wide strings.
1598 (wide_strspn, wide_strcspn): New helper functions.
1599 (gfc_simplify_scan, gfc_simplify_trim, gfc_simplify_verify):
1600 Handle wide strings.
1601 * symbol.c (generate_isocbinding_symbol): Likewise.
1602 * target-memory.c (size_character, gfc_target_expr_size,
1603 encode_character, gfc_target_encode_expr, gfc_interpret_character,
1604 gfc_target_interpret_expr): Handle wide strings.
1605 * trans-const.c (gfc_conv_string_init): Lower wide strings to
1607 (gfc_conv_constant_to_tree): Likewise.
1608 * trans-expr.c (gfc_conv_substring_expr): Handle wide strings.
1609 * trans-io.c (gfc_new_nml_name_expr): Likewise.
1610 * trans-stmt.c (gfc_trans_label_assign): Likewise.
1612 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1614 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
1615 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
1616 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): Mark arguments
1617 with ATTRIBUTE_UNUSED.
1619 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1621 * check.c (gfc_check_sizeof): Switch to ATTRIBUTE_UNUSED.
1622 * simplify.c (gfc_simplify_lgamma): Likewise.
1624 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1626 * openmp.c (gfc_match_omp_eos): Use gfc_next_ascii_char and
1627 gfc_peek_ascii_char.
1628 * decl.c (gfc_match_kind_spec, gfc_match_type_spec,
1629 gfc_match_implicit_none, match_implicit_range, gfc_match_implicit,
1630 match_string_p, match_attr_spec, gfc_match_suffix,
1631 match_procedure_decl, gfc_match_entry, gfc_match_subroutine):
1633 * gfortran.h (gfc_char_t): New type.
1634 (gfc_linebuf): Make line member a gfc_char_t.
1635 (locus): Make nextc member a gfc_char_t.
1636 (gfc_wide_is_printable, gfc_wide_is_digit, gfc_wide_fits_in_byte,
1637 gfc_wide_tolower, gfc_wide_strlen, gfc_next_ascii_char,
1638 gfc_peek_ascii_char, gfc_check_digit): New prototypes.
1639 * error.c (print_wide_char): New function.
1640 (show_locus): Use print_wide_char and gfc_wide_strlen.
1641 * io.c (next_char): Use gfc_char_t type.
1642 (match_io): Use gfc_peek_ascii_char and gfc_next_ascii_char.
1643 * match.c (gfc_match_parens, gfc_match_eos,
1644 gfc_match_small_literal_int, gfc_match_name, gfc_match_name_C,
1645 gfc_match_intrinsic_op, gfc_match_char, gfc_match_return,
1646 gfc_match_common): Likewise.
1647 * match.h (gfc_match_special_char): Change prototype.
1648 * parse.c (decode_specification_statement, decode_statement,
1649 decode_omp_directive, next_free, next_fixed): Use
1650 gfc_peek_ascii_char and gfc_next_ascii_char.
1651 * primary.c (gfc_check_digit): Change name.
1652 (match_digits, match_hollerith_constant, match_boz_constant,
1653 match_real_constant, next_string_char, match_charkind_name,
1654 match_string_constant, match_logical_constant_string,
1655 match_complex_constant, match_actual_arg, match_varspec,
1656 gfc_match_rvalue, match_variable): Use gfc_peek_ascii_char and
1657 gfc_next_ascii_char.
1658 * scanner.c (gfc_wide_fits_in_byte, wide_is_ascii,
1659 gfc_wide_is_printable, gfc_wide_tolower, gfc_wide_is_digit,
1660 gfc_wide_is_digit, wide_atoi, gfc_wide_strlen, wide_strcpy,
1661 wide_strchr, widechar_to_char, wide_strncmp, wide_strncasecmp,
1662 gfc_next_ascii_char, gfc_peek_ascii_char):
1664 (next_char, gfc_define_undef_line, skip_free_comments,
1665 gfc_next_char_literal, gfc_next_char, gfc_peek_char,
1666 gfc_error_recovery, load_line, preprocessor_line, include_line,
1667 load_file, gfc_read_orig_filename): Use gfc_char_t for source
1668 characters and the {gfc_,}wide_* functions to manipulate wide
1671 2008-05-06 Tobias Burnus <burnus@net-b.de>
1674 * intrinsic.c (add_functions): Call gfc_simplify_bessel_*.
1675 * intrinsic.h: Add prototypes for gfc_simplify_bessel_*.
1676 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
1677 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
1678 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): New.
1680 2008-05-03 Janus Weil <jaydub66@gmail.com>
1682 * misc.c (gfc_clear_ts): Set interface to NULL.
1684 2008-05-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1687 * gfortran.h: Add extra_comma pointer to gfc_dt structure. Add iokind to
1688 gfc_expr value union. Add io_kind enum to here from io.c.
1689 * io.c (gfc_free_dt): Free extra_comma.
1690 (gfc_resolve_dt): If an extra comma was encountered and io_unit is type
1691 BT_CHARACTER, resolve to format_expr and set default unit. Error if
1692 io_kind is M_WRITE. (match_io): Match the extra comma and set new
1693 pointer, extra_comma.
1695 2008-05-01 Bud Davis <bdavis9659@sbcglobal.net>
1698 * simplify.c (gfc_simplify_index): Check for direction argument
1701 2008-05-01 Janus Weil <jaydub66@gmail.com>
1703 * gfortran.h (struct gfc_symbol): Moving "interface" member to
1704 gfc_typespec (plus fixing a small docu error).
1705 * interface.c (gfc_procedure_use): Ditto.
1706 * decl.c (match_procedure_decl): Ditto.
1707 * resolve.c (resolve_specific_f0,
1708 resolve_specific_f0, resolve_symbol): Ditto.
1710 2008-04-30 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1712 * intrinsic.c (add_functions): Add SELECTED_CHAR_KIND intrinsic.
1713 * intrinsic.h (gfc_check_selected_char_kind,
1714 gfc_simplify_selected_char_kind): New prototypes.
1715 * gfortran.h (gfc_isym_id): Add GFC_ISYM_SC_KIND.
1716 * trans.h (gfor_fndecl_sc_kind): New function decl.
1717 * trans-decl.c (gfor_fndecl_sc_kind): Build new decl.
1718 * arith.c (gfc_compare_with_Cstring): New function.
1719 * arith.h (gfc_compare_with_Cstring): New prototype.
1720 * check.c (gfc_check_selected_char_kind): New function.
1721 * primary.c (match_string_constant, match_kind_param): Mark
1722 symbols used as literal constant kind param as referenced.
1723 * trans-intrinsic.c (gfc_conv_intrinsic_sc_kind): New function.
1724 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_sc_kind.
1725 * intrinsic.texi (SELECTED_CHAR_KIND): Document new intrinsic.
1726 * simplify.c (gfc_simplify_selected_char_kind): New function.
1728 2008-04-28 Paul Thomas <pault@gcc.gnu.org>
1731 * module.c (find_symbol): Do not return a result for a symbol
1732 that has been renamed in another module.
1734 2008-04-26 George Helffrich <george@gcc.gnu.org>
1738 * trans-common.c (create_common): Add decl to function
1739 chain (if inside one) to preserve identifier scope in debug output.
1741 2008-04-25 Jan Hubicka <jh@suse.cz>
1743 * trans-decl.c (trans_function_start): Update.
1745 2008-04-25 Tobias Burnus <burnus@net-b.de>
1746 Daniel Franke <franke.daniel@gmail.com>
1749 * gfortranspec.c (lang_specific_driver): Deprecate
1750 -M option; fix ICE when "-M" is last argument and
1751 make "-M<dir>" work.
1752 * options.c (gfc_handle_module_path_options):
1753 Use -J instead of -M in error messages.
1754 * invoke.texi: Mark -M as depecated.
1756 2008-04-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1757 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1760 * trans-instrinsic.c (gfc_conv_intrinsic_minmaxloc): Correctly adjust
1761 loop counter offset.
1763 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1765 * trans-expr.c (gfc_conv_structure): Don't set TREE_INVARIANT.
1766 * trans-array.c (gfc_build_null_descriptor): Don't set TREE_INVARIANT.
1767 (gfc_trans_array_constructor_value): Don't set TREE_INVARIANT.
1768 (gfc_build_constant_array_constructor): Don't set TREE_INVARIANT.
1769 (gfc_conv_array_initializer): Don't set TREE_INVARIANT.
1770 * trans-common.c (get_init_field): Don't set TREE_INVARIANT.
1771 (create_common): Don't set TREE_INVARIANT.
1772 * trans-stmt.c (gfc_trans_character_select): Don't set TREE_INVARIANT.
1773 * trans-decl.c (gfc_generate_function_code): Don't set TREE_INVARIANT.
1775 2008-04-21 Steve Ellcey <sje@cup.hp.com>
1777 * f95-lang.c (gfc_init_decl_processing): use ptr_mode instead of Pmode.
1779 2008-04-21 Daniel Franke <franke.daniel@gmail.com>
1782 * gfortranspec.c (lookup_option): Properly handle separated arguments
1783 in -J option, print missing argument message when necessary.
1785 2008-04-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1788 * scanner.c (skip_fixed_comments): Update continue_line when comment is
1789 detected. (gfc_next_char_literal): Likewise.
1791 2008-04-19 Paul Thomas <pault@gcc.gnu.org>
1796 * trans_array.c (gfc_trans_array_constructor): Temporarily
1797 realign loop, if loop->from is not zero, before creating
1798 the temporary array and provide an offset.
1801 * trans-decl.c (gfc_init_default_dt): Add gfc_ prefix to name
1802 and allow for NULL body. Change all references from
1803 init_default_dt to gfc_init_default_dt.
1804 * trans.h : Add prototype for gfc_init_default_dt.
1805 * trans-array.c (gfc_trans_deferred_vars): After nullification
1806 call gfc_init_default_dt for derived types with allocatable
1809 2008-04-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1812 * trans-common.c (create_common): Revert patch causing regression.
1814 2008-04-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1817 * iresolve.c (gfc_resolve_eoshift): Check for NULL symtree in test for
1818 optional argument attribute.
1820 2008-04-16 Paul Thomas <pault@gcc.gnu.org>
1823 * trans-intrinsic.c (gfc_conv_intrinsic_char): Even though KIND
1824 is not used, the argument must be converted.
1826 2008-04-16 Jakub Jelinek <jakub@redhat.com>
1829 * f95-lang.c (gfc_init_builtin_functions): Make sure
1830 BUILT_IN_SINCOS{,F,L} types aren't varargs.
1832 2008-04-15 Paul Thomas <pault@gcc.gnu.org>
1835 * expr.c (scalarize_intrinsic_call): Reorder identification of
1836 array argument so that if one is not found a segfault does not
1837 occur. Return FAILURE if all scalar arguments.
1839 2008-04-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1840 Tobias Burnus <burnus@net-b.de>
1843 * options.c (gfc_init_options): Set the default maximum continuation
1844 lines to 255 for both free and fixed form source for warnings.
1845 (gfc_handle_option): Set -std=f95 fixed form max continuations to 19 and
1846 the -std=f95 free form max continuations to 39 for warnings.
1847 * scanner.c (gfc_next_char_literal): Adjust the current_line number only
1848 if it is less than the current locus.
1850 2008-04-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1852 PR fortran/25829 28655
1853 * io.c (io_tag): Add new tags for decimal, encoding, asynchronous,
1854 round, sign, and id. (match_open_element): Match new tags.
1855 (gfc_resolve_open): Resolve new tags. (gfc_match_open): Enable encoding
1856 for DEFAULT only. Update error messages. (match_dt_element): Fix match
1857 tag for asynchronous. Update error messages. (gfc_free_inquire): Free
1858 new expressions. (match_inquire_element): Match new tags.
1859 (gfc_match_inquire): Add constraint for ID and PENDING.
1860 (gfc_resolve_inquire): Resolve new tags.
1861 * trans-io.c (gfc_trans_inquire): Clean up whitespace and fix setting of
1862 mask for ID parameter.
1863 * ioparm.def: Fix order of parameters for pending, round, and sign.
1864 NOTE: These must line up with the definitions in libgfortran/io/io.h. or
1867 2008-04-06 Paul Thomas <pault@gcc.gnu.org>
1870 * expr.c (scalarize_intrinsic_call): Identify which argument is
1871 an array and use that as the template.
1872 (check_init_expr): Remove tests that first argument is an array
1873 in the call to scalarize_intrinsic_call.
1875 2008-04-06 Tobias Schlüter <tobi@gcc.gnu.org>
1878 * io.c (io_tag): Add field 'value'. Split 'spec' field in
1880 (match_etag, match_vtag, match_ltag): Split parsing in two steps
1881 to give better error messages.
1883 2008-04-06 Tobias Burnus <burnus@net-b.de>
1885 * io.c (check_io_constraints): Add constrains. ID= requires
1886 asynchronous= and asynchronous= must be init expression.
1888 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1890 * f95-lang.c: Set LANG_HOOKS_NAME to "GNU Fortran".
1892 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1894 * dump-parse-tree.c: Use fprintf, fputs and fputc instead of
1895 gfc_status and gfc_status_char. Remove gfc_ prefix of the gfc_show_*
1896 functions and make them static. Add new gfc_dump_parse_tree
1898 * gfortran.h (gfc_option_t): Rename verbose into dump_parse_tree.
1899 (gfc_status, gfc_status_char): Delete prototypes.
1900 * error.c (gfc_status, gfc_status_char): Remove functions.
1901 * scanner.c (gfc_new_file): Use printf instead of gfc_status.
1902 * options.c (gfc_init_options): Rename verbose into dump_parse_tree.
1903 (gfc_handle_module_path_options): Use gfc_fatal_error instead of
1904 gfc_status and exit.
1905 (gfc_handle_option): Rename verbose into dump_parse_tree.
1906 * parse.c (gfc_parse_file): Use gfc_dump_parse_tree.
1908 2008-04-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1909 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1911 PR fortran/25829 28655
1912 * dump-parse-tree.c (gfc_show_code_node): Show new I/O parameters.
1913 * gfortran.h (gfc_statement): Add ST_WAIT enumerator.
1914 (gfc_open): Add pointers for decimal, encoding, round, sign,
1915 asynchronous. (gfc_inquire): Add pointers for asynchronous, decimal,
1916 encoding, pending, round, sign, size, id.
1917 (gfc_wait): New typedef struct. (gfc_dt): Add pointers for id, pos,
1918 asynchronous, blank, decimal, delim, pad, round, sign.
1919 (gfc_exec_op): Add EXEC_WAIT enumerator. (gfc_code): Add pointer for
1920 wait. (gfc_free_wait), (gfc_resolve_wait): New function prototypes.
1921 * trans-stmt.h (gfc_trans_wait): New function prototype.
1922 * trans.c (gfc_trans_code): Add case for EXEC_WAIT.
1923 * io.c (io_tag): Add new tags for DECIMAL, ENCODING, ROUND, SIGN,
1924 ASYCHRONOUS, ID. (match_open_element): Add matchers for new tags.
1925 (gfc_free_open): Free new pointers. (gfc_resolve_open): Resolve new
1926 tags. (gfc_resolve_open): Remove comment around check for allowed
1927 values and ASYNCHRONOUS, update it. Likewise for DECIMAL, ENCODING,
1928 ROUND, and SIGN. (match_dt_element): Add matching for new tags.
1929 (gfc_free_wait): New function. (gfc_resolve_wait): New function.
1930 (match_wait_element): New function. (gfc_match_wait): New function.
1931 * resolve.c (gfc_resolve_blocks): Add case for EXEC_WAIT.
1932 (resolve_code): Add case for EXEC_WAIT.
1933 * st.c (gfc_free_statement): Add case for EXEC_WAIT.
1934 * trans-io.c (ioparam_type): Add IOPARM_ptype_wait. (gfc_st_parameter):
1935 Add "wait" entry. (iocall): Add IOCALL_WAIT enumerator.
1936 (gfc_build_io_library_fndecls): Add function declaration for st_wait.
1937 (gfc_trans_open): Add mask bits for new I/O tags.
1938 (gfc_trans_inquire): Add mask bits for new I/O tags.
1939 (gfc_trans_wait): New translation function.
1940 (build_dt): Add mask bits for new I/O tags.
1941 * match.c (gfc_match_if) Add matcher for "wait".
1942 * match.h (gfc_match_wait): Prototype for new function.
1943 * ioparm.def: Add new I/O parameter definitions.
1944 * parse.c (decode_statement): Add match for "wait" statement.
1945 (next_statement): Add case for ST_WAIT. (gfc_ascii_statement): Same.
1947 2008-04-03 Jakub Jelinek <jakub@redhat.com>
1950 * openmp.c (resolve_omp_clauses): Diagnose if a clause symbol
1953 2008-04-03 Tom Tromey <tromey@redhat.com>
1955 * Make-lang.in (fortran_OBJS): New variable.
1957 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1959 * f95-lang.c (insert_block): Kill.
1961 2008-04-01 George Helffrich <george@gcc.gnu.org>
1963 PR fortran/35154, fortran/23057
1964 * trans-common.c (create_common): Add decl to function
1965 chain to preserve identifier scope in debug output.
1967 2008-04-01 Joseph Myers <joseph@codesourcery.com>
1969 * gfortran.texi: Include gpl_v3.texi instead of gpl.texi
1970 * Make-lang.in (GFORTRAN_TEXI): Include gpl_v3.texi instead of
1973 2008-03-30 Paul Thomas <pault@gcc.gnu.org>
1976 * resolve.c (resolve_function, resolve_call): If the procedure
1977 is elemental do not look for noncopying intrinsics.
1979 2008-03-29 Paul Thomas <pault@gcc.gnu.org>
1982 * trans-array.c (gfc_array_init_size): Set 'size' zero if
1983 negative in one dimension.
1986 * trans-expr.c (gfc_trans_string_copy): Only assign a char
1987 directly if the lhs and rhs types are the same.
1989 2008-03-28 Daniel Franke <franke.daniel@gmail.com>
1990 Paul Richard Thomas <paul.richard.thomas@gmail.com>
1993 * primary.c (match_variable): Improved matching of function
1995 * resolve.c (resolve_allocate_deallocate): Removed checks if
1996 the actual argument for STAT is a variable.
1998 2008-03-28 Tobias Burnus <burnus@net-b.de>
2000 * symbol.c (gfc_get_default_type): Fix error message; option
2001 -fallow_leading_underscore should be -fallow-leading-underscore
2003 2008-03-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2006 * iresolve.c (gfc_resolve_cshift): Check for NULL symtree in test for
2007 optional argument attribute.
2009 2008-03-27 Tom Tromey <tromey@redhat.com>
2011 * Make-lang.in: Revert automatic dependency patch.
2013 2008-03-25 Tom Tromey <tromey@redhat.com>
2015 * Make-lang.in: Remove .o targets.
2016 (fortran_OBJS): New variable.
2017 (fortran/gfortranspec.o): Move to fortran/. Reduce to variable
2019 (GFORTRAN_D_OBJS): Update.
2020 (GFORTRAN_TRANS_DEPS): Remove.
2022 2008-03-24 Paul Thomas <pault@gcc.gnu.org>
2025 * resolve.c (resolve_structure_cons): It is an error to assign
2026 NULL to anything other than a pointer or allocatable component.
2029 * resolve.c (resolve_symbol): If the symbol is a derived type,
2030 resolve the derived type. If the symbol is a derived type
2031 function, ensure that the derived type is visible in the same
2032 namespace as the function.
2034 2008-03-23 Tobias Schlüter <tobi@gcc.gnu.org>
2036 * trans.h: Use fold_build in build1_v, build2_v and build3_v
2038 * trans-openmp.c (gfc_trans_omp_critical, gfc_trans_omp_single):
2039 Don't use build2_v macro.
2041 2008-03-19 Daniel Franke <franke.daniel@gmail.com>
2044 * interface.c (gfc_procedure_use): Check for keyworded arguments in
2045 procedures without explicit interfaces.
2047 2008-03-16 Paul Thomas <pault@gcc.gnu.org>
2050 * resolve.c (check_assumed_size_reference): Only visit the
2051 first reference and look directly at the highest dimension.
2053 2008-03-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2056 * trans-array.c (gfc_conv_array_index_offset): Remove unnecessary
2059 2008-03-15 Daniel Franke <franke.daniel@gmail.com>
2062 * resolve.c (resolve_branch): Less strict and pessimistic warning
2065 2008-03-11 Paolo Bonzini <bonzini@gnu.org>
2067 * f95-lang.c (LANG_HOOKS_CLEAR_BINDING_STACK): Delete.
2068 (gfc_be_parse_file): Call clear_binding_stack from here.
2069 (gfc_clear_binding_stack): Rename to clear_binding_stack.
2071 2008-03-09 Paul Thomas <pault@gcc.gnu.org>
2074 * module.c (mio_symtree_ref): After providing a symbol for a
2075 missing equivalence member, resolve and NULL the fixups.
2077 2008-03-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2079 * invoke.texi (Error and Warning Options): Document
2082 2008-03-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2085 * trans-array.c (gfc_conv_ss_startstride): Fix the logic to avoid
2086 checking bounds of absent optional arguments.
2088 2008-03-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2091 * intrinsic.c (add_functions): Add simplification routines for
2092 ERF, DERF, ERFC and DERFC.
2093 * decl.c (gfc_match_suffix, gfc_match_subroutine): Change GNU
2094 extensions into Fortran 2008 features.
2095 * intrinsic.h (gfc_simplify_erf, gfc_simplify_erfc): New
2097 * simplify.c (gfc_simplify_erf, gfc_simplify_erfc): New functions.
2099 2008-03-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2102 * intrinsic.c (add_functions): Modify intrinsics ACOSH, ASINH,
2103 ATANH, ERF, ERFC and GAMMA. Add intrinsics BESSEL_{J,Y}{0,1,N},
2104 ERFC_SCALED, LOG_GAMMA and HYPOT.
2105 * intrinsic.h (gfc_check_hypot, gfc_simplify_hypot,
2106 gfc_resolve_hypot): New prototypes.
2107 * mathbuiltins.def: Add HYPOT builtin. Make complex versions of
2108 ACOSH, ASINH and ATANH available.
2109 * gfortran.h (GFC_ISYM_ERFC_SCALED, GFC_ISYM_HYPOT): New values.
2110 * lang.opt: Add -std=f2008 option.
2111 * libgfortran.h: Define GFC_STD_F2008.
2112 * lang-specs.h: Add .f08 and .F08 file suffixes.
2113 * iresolve.c (gfc_resolve_hypot): New function.
2114 * parse.c (parse_contained): Allow empty CONTAINS for Fortran 2008.
2115 * check.c (gfc_check_hypot): New function.
2116 * trans-intrinsic.c (gfc_intrinsic_map): Define ERFC_SCALE builtin.
2117 * options.c (set_default_std_flags): Allow Fortran 2008 by default.
2118 (form_from_filename): Add .f08 suffix.
2119 (gfc_handle_option): Handle -std=f2008 option.
2120 * simplify.c (gfc_simplify_hypot): New function.
2121 * gfortran.texi: Document Fortran 2008 status and file extensions.
2122 * intrinsic.texi: Document new BESSEL_{J,Y}{0,1,N} intrinsics,
2123 as well as HYPOT and ERFC_SCALED. Update documentation of ERF,
2124 ERFC, GAMMA, LGAMMA, ASINH, ACOSH and ATANH.
2125 * invoke.texi: Document the new -std=f2008 option.
2127 2008-03-02 Jakub Jelinek <jakub@redhat.com>
2129 * gfortranspec.c (lang_specific_driver): Update copyright notice
2132 2008-02-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2135 * expr.c (find_array_element): Modify traversing the constructor to
2136 avoid trying to access NULL memory pointed to by next for the
2137 last element. (find_array_section): Exit while loop if cons->next is
2139 * trans-expr.c (gfc_conv_scalar_char_value): Initialize gfc_typespec.
2140 (gfc_conv_function_call): Same.
2141 * decl.c (gfc_match_implicit): Same.
2142 * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Same.
2144 2008-02-28 Daniel Franke <franke.daniel@gmail.com>
2149 * lang.opt: Added -Wreturn-type.
2150 * options.c (gfc_handle_option): Recognize -Wreturn-type.
2151 * trans-decl.c (gfc_trans_deferred_vars): Emit warnings for funtions
2152 where the result value is not set.
2153 (gfc_generate_function_code): Likewise.
2154 (generate_local_decl): Emit warnings for funtions whose RESULT
2155 variable is not set.
2157 2008-02-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2160 * trans-expr.c (gfc_conv_variable): Don't build indirect
2161 references when explicit interface is mandated.
2162 * resolve.c (resolve_formal_arglist): Set attr.always_explicit
2163 on the result symbol as well as the procedure symbol.
2165 2008-02-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2168 * trans.h: Remove prototypes for gfor_fndecl_math_exponent4,
2169 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
2170 gfor_fndecl_math_exponent16.
2171 * f95-lang.c (build_builtin_fntypes): Add new function types.
2172 (gfc_init_builtin_functions): Add new builtins for nextafter,
2173 frexp, ldexp, fabs, scalbn and inf.
2174 * iresolve.c (gfc_resolve_rrspacing): Don't add hidden arguments.
2175 (gfc_resolve_scale): Don't convert type of second argument.
2176 (gfc_resolve_set_exponent): Likewise.
2177 (gfc_resolve_size): Don't add hidden arguments.
2178 * trans-decl.c: Remove gfor_fndecl_math_exponent4,
2179 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
2180 gfor_fndecl_math_exponent16.
2181 * trans-intrinsic.c (gfc_intrinsic_map): Remove intrinsics
2182 for scalbn, fraction, nearest, rrspacing, set_exponent and
2184 (gfc_conv_intrinsic_exponent): Directly call frexp.
2185 (gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_nearest,
2186 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
2187 gfc_conv_intrinsic_scale, gfc_conv_intrinsic_set_exponent): New
2189 (gfc_conv_intrinsic_function): Use the new functions above.
2191 2008-02-26 Tobias Burnus <burnus@net-b.de>
2194 * interface.c (check_operator_interface): Show better line for error
2195 messages; fix constrains for user-defined assignment operators.
2196 (gfc_extend_assign): Fix constrains for user-defined assignment
2199 2008-02-26 Tom Tromey <tromey@redhat.com>
2201 * trans-io.c (set_error_locus): Remove old location code.
2202 * trans-decl.c (gfc_set_decl_location): Remove old location code.
2203 * f95-lang.c (gfc_init): Remove test of USE_MAPPED_LOCATION.
2204 * scanner.c (gfc_gobble_whitespace): Remove old location code.
2205 (get_file): Likewise.
2206 (preprocessor_line): Likewise.
2207 (load_file): Likewise.
2208 (gfc_new_file): Likewise.
2209 * trans.c (gfc_trans_runtime_check): Remove old location code.
2210 (gfc_get_backend_locus): Likewise.
2211 (gfc_set_backend_locus): Likewise.
2212 * data.c (gfc_assign_data_value): Remove old location code.
2213 * error.c (show_locus): Remove old location code.
2214 * gfortran.h (gfc_linebuf): Remove old location code.
2215 (gfc_linebuf_linenum): Remove old-location variant.
2217 2008-02-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2220 * trans-const.c (gfc_build_string_const): Don't call gettext.
2221 (gfc_build_localized_string_const): New function.
2222 * trans-const.h (gfc_build_localized_string_const): New prototype.
2223 * trans.c (gfc_trans_runtime_check): Use
2224 gfc_build_localized_string_const instead of gfc_build_string_const.
2225 (gfc_call_malloc): Likewise.
2226 (gfc_allocate_with_status): Likewise.
2227 (gfc_allocate_array_with_status): Likewise.
2228 (gfc_deallocate_with_status): Likewise.
2229 (gfc_call_realloc): Likewise.
2230 * trans-io.c (gfc_trans_io_runtime_check): Likewise.
2232 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
2234 * arith.c: Update copyright years.
2235 * arith.h: Likewise.
2236 * array.c: Likewise.
2238 * check.c: Likewise.
2242 * dependency.c: Likewise.
2243 * dependency.h: Likewise.
2244 * dump-parse-tree.c: Likewise.
2245 * error.c: Likewise.
2247 * gfc-internals.texi: Likewise.
2248 * gfortran.h: Likewise.
2249 * gfortran.texi: Likewise.
2250 * gfortranspec.c: Likewise.
2251 * interface.c: Likewise.
2252 * intrinsic.c: Likewise.
2253 * intrinsic.h: Likewise.
2254 * intrinsic.texi: Likewise.
2255 * invoke.texi: Likewise.
2257 * iresolve.c: Likewise.
2258 * iso-c-binding.def: Likewise.
2259 * iso-fortran-env.def: Likewise.
2260 * lang-specs.h: Likewise.
2261 * lang.opt: Likewise.
2262 * libgfortran.h: Likewise.
2263 * match.c: Likewise.
2264 * match.h: Likewise.
2265 * matchexp.c: Likewise.
2267 * module.c: Likewise.
2268 * openmp.c: Likewise.
2269 * options.c: Likewise.
2270 * parse.c: Likewise.
2271 * parse.h: Likewise.
2272 * primary.c: Likewise.
2273 * resolve.c: Likewise.
2274 * scanner.c: Likewise.
2275 * simplify.c: Likewise.
2277 * symbol.c: Likewise.
2278 * target-memory.c: Likewise.
2279 * target-memory.h: Likewise.
2280 * trans-array.h: Likewise.
2281 * trans-const.h: Likewise.
2282 * trans-stmt.h: Likewise.
2283 * trans-types.c: Likewise.
2284 * trans-types.h: Likewise.
2285 * types.def: Likewise.
2287 2008-02-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2290 * simplify.c (gfc_simplify_ibclr), (gfc_simplify_ibits),
2291 (gfc_simplify_ibset): Remove call to range_check.
2292 (simplify_cmplx), (gfc_simplify_dble), (gfc_simplify_float)
2293 (gfc_simplify_real): Add call gfc_clear_ts to initialize the
2294 temporary gfc_typspec variable.
2296 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
2298 * trans-array.c (gfc_conv_descriptor_data_get,
2299 gfc_conv_descriptor_data_set_internal,
2300 gfc_conv_descriptor_data_addr, gfc_conv_descriptor_offset,
2301 gfc_conv_descriptor_dtype, gfc_conv_descriptor_dimension,
2302 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
2303 gfc_conv_descriptor_ubound, gfc_trans_create_temp_array,
2304 gfc_conv_array_transpose, gfc_grow_array,
2305 gfc_trans_array_constructor_subarray,
2306 gfc_trans_array_constructor_value, gfc_trans_scalarized_loop_end,
2307 gfc_array_init_size, gfc_array_allocate, gfc_array_deallocate,
2308 gfc_conv_array_initializer, gfc_trans_array_bounds,
2309 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
2310 gfc_get_dataptr_offset, gfc_conv_array_parameter,
2311 gfc_trans_dealloc_allocated, get_full_array_size,
2312 gfc_duplicate_allocatable, structure_alloc_comps): Use fold_buildN
2314 * trans-expr.c (gfc_conv_expr_present, gfc_conv_missing_dummy,
2315 gfc_conv_component_ref, gfc_conv_cst_int_power,
2316 gfc_conv_function_call, gfc_trans_structur_assign): Likewise.
2317 * trans-common.c (create_common): Likewise.
2318 * trans-openmp.c (gfc_trans_omp_atomic, gfc_trans_omp_do):
2320 * trans-const.c (gfc_conv_constant_to_tree): Likewise.
2321 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_do,
2322 gfc_trans_integer_select, gfc_trans_character_select,
2323 gfc_trans_forall_loop, compute_overall_iter_number,
2324 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_allocate,
2325 gfc_trans_deallocate): Likewise.
2326 * trans.c (gfc_build_addr_expr, gfc_trans_runtime_check,
2327 gfc_allocate_with_status, gfc_allocate_array_with_status,
2328 gfc_deallocate_with_status): Likewise.
2329 * f95-lang.c (gfc_truthvalue_conversion): Likewise.
2330 * trans-io.c (set_parameter_const, set_parameter_value,
2331 set_parameter_ref, set_string, set_internal_unit, io_result,
2332 set_error_locus, nml_get_addr_expr, transfer_expr): Likewise.
2333 * trans-decl.c (gfc_build_qualified_array, build_entry_thunks,
2334 gfc_get_fake_result_decl, gfc_trans_auto_character_variable,
2335 gfc_generate_function_code): Likewise.
2336 * convert.c (convert): Likewise.
2337 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
2338 build_fixbound_expr, build_fix_expr, gfc_conv_intrinsic_aint,
2339 gfc_conv_intrinsic_int, gfc_conv_intrinsic_imagpart,
2340 gfc_conv_intrinsic_conjg, gfc_conv_intrinsic_abs,
2341 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
2342 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_dprod,
2343 gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
2344 gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax,
2345 gfc_conv_intrinsic_minmax_char, gfc_conv_intrinsic_count,
2346 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_dot_product,
2347 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
2348 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_not,
2349 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
2350 gfc_conv_intrinsic_ichar, gfc_conv_intrinsic_size,
2351 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
2352 gfc_conv_allocated, gfc_conv_associated, gfc_conv_intrinsic_trim,
2353 gfc_conv_intrinsic_repeat): Likewise.
2355 2008-02-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2358 * trans-expr.c (gfc_conv_power_op): Use BUILT_IN_CPOW{F,,L}.
2359 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_CPOW{F,,L}.
2360 * trans.h (gfor_fndecl_math_cpow, gfor_fndecl_math_cpowf,
2361 gfor_fndecl_math_cpowl10, gfor_fndecl_math_cpowl16): Remove.
2362 * trans-decl.c: Likewise.
2364 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2367 * expr.c (find_array_element): Modify traversing the constructor to
2368 avoid trying to access NULL memory pointed to by next for the
2369 last element. (find_array_section): Exit while loop if cons->next is
2372 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2375 * iresolve.c (resolve_mask_arg): Add gfc_clear_ts to initialize
2377 (gfc_resolve_aint): Likewise.
2378 (gfc_resolve_anint): Likewise.
2379 (gfc_resolve_besn): Likewise.
2380 (gfc_resolve_cshift): Likewise.
2381 (gfc_resolve_ctime): Likewise.
2382 (gfc_resolve_eoshift): Likewise.
2383 (gfc_resolve_index_func): Likewise.
2384 (gfc_resolve_isatty): Likewise.
2385 (gfc_resolve_malloc): Likewise.
2386 (gfc_resolve_rrspacing): Likewise.
2387 (gfc_resolve_scale): Likewise.
2388 (gfc_resolve_set_exponent): Likewise.
2389 (gfc_resolve_spacing): Likewise.
2390 (gfc_resolve_spacing): Likewise.
2391 (gfc_resolve_fgetc): Likewise.
2392 (gfc_resolve_fputc): Likewise.
2393 (gfc_resolve_ftell): Likewise.
2394 (gfc_resolve_ttynam): Likewise.
2395 (gfc_resolve_alarm_sub): Likewise.
2396 (gfc_resolve_mvbits): Likewise.
2397 (gfc_resolve_getarg): Likewise.
2398 (gfc_resolve_signal_sub): Likewise.
2399 (gfc_resolve_exit): Likewise.
2400 (gfc_resolve_flush): Likewise.
2401 (gfc_resolve_free): Likewise.
2402 (gfc_resolve_ctime_sub): Likewise.
2403 (gfc_resolve_fgetc_sub): Likewise.
2404 (gfc_resolve_fputc_sub): Likewise.
2405 (gfc_resolve_fseek_sub): Likewise.
2406 (gfc_resolve_ftell_sub): Likewise.
2407 (gfc_resolve_ttynam_sub): Likewise.
2409 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2411 * gfc-internals.texi: Fix typos and markup nits.
2412 * gfortran.texi: Likewise.
2413 * intrinsic.texi: Likewise.
2415 2008-02-21 Richard Guenther <rguenther@suse.de>
2417 * trans-expr.c (gfc_conv_expr_op): Expand INTRINSIC_PARENTHESES
2418 as unary PAREN_EXPR for real and complex typed expressions.
2419 (gfc_conv_unary_op): Fold the built tree.
2421 2008-02-20 Tobias Burnus <burnus@net-b.de>
2424 * match.c (gfc_match_name): Improve error message for '$'.
2426 2008-02-19 Daniel Franke <franke.daniel@gmail.com>
2429 * expr.c (gfc_check_pointer_assign): Add type and kind information
2430 to type-mismatch message.
2431 (gfc_check_assign): Unify error messages.
2433 2008-02-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2436 * gfortran.texi: Create new section for unimplemented extensions.
2437 Add "STRUCTURE and RECORD" and "ENCODE and DECODE statements".
2438 Remove "smaller projects" list. Fix a few typos.
2440 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2442 * intrinsic.texi: Rename INDEX node to avoid clashing with
2443 index.html on case-insensitive systems.
2445 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2448 * trans-expr.c (gfc_conv_function_call): Force evaluation of
2451 2008-02-10 Daniel Franke <franke.daniel@gmail.com>
2454 * lang.opt: Allow '-J<dir>' next to '-J <dir>',
2455 likewise '-I <dir>' and '-I<dir>'.
2457 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2460 * Make-lang.in (f951): Add $(GMPLIBS).
2462 2008-02-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2465 * trans-common.c (build_field): Mark fields as volatile when needed.
2467 2008-02-05 Tobias Burnus <burnus@net-b.de>
2470 * data.c (gfc_assign_data_value): Only free "size" if
2471 it has not already been freed.
2473 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
2476 * array.c (match_array_element_spec): Remove check for negative
2478 (gfc_resolve_array_spec): Add check for negative size.
2480 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
2483 * data.c (gfc_assign_data_value): Add bounds check for array
2486 2008-02-04 Daniel Franke <franke.daniel@gmail.com>
2488 * resolve.c (resolve_where): Fix typo.
2489 (gfc_resolve_where_code_in_forall): Likewise.
2491 2008-02-03 Paul Thomas <pault@gcc.gnu.org>
2494 * resolve.c (resolve_allocate_deallocate): New function.
2495 (resolve_code): Call it for allocate and deallocate.
2496 * match.c (gfc_match_allocate, gfc_match_deallocate) : Remove
2497 the checking of the STAT tag and put in above new function.
2498 * primary,c (match_variable): Do not fix flavor of host
2499 associated symbols yet if the type is not known.
2501 2008-01-31 Paul Thomas <pault@gcc.gnu.org>
2504 * expr.c (gfc_check_assign): It is an error to assign
2505 to a sibling procedure.
2507 2008-01-30 Paul Thomas <pault@gcc.gnu.org>
2510 * symbol.c (gfc_delete_symtree, gfc_undo_symbols): Rename
2511 delete_symtree to gfc_delete_symtree.
2512 * gfortran.h : Add prototype for gfc_delete_symtree.
2513 * module.c (load_generic_interfaces): Transfer symbol to a
2514 unique symtree and delete old symtree, instead of renaming.
2515 (read_module): The rsym and the found symbol are the same, so
2516 the found symtree can be deleted.
2519 * decl.c (match_char_spec): Remove the constraint on deferred
2520 matching of functions and free the length expression.
2521 delete_symtree to gfc_delete_symtree.
2522 (gfc_match_type_spec): Whitespace.
2523 (gfc_match_function_decl): Defer characteristic association for
2524 all types except BT_UNKNOWN.
2525 * parse.c (decode_specification_statement): Only derived type
2526 function matching is delayed to the end of specification.
2528 2008-01-28 Tobias Burnus <burnus@net-b.de>
2531 * simplify.c (gfc_simplify_shape): Simplify rank zero arrays.
2533 2008-01-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2536 * array.c (gfc_check_constructor_type): Revert clearing the expression.
2538 2008-01-26 Tobias Burnus <burnus@net-b.de>
2541 * trans-expr.c (gfc_conv_function_call): Don't call
2542 gfc_add_interface_mapping if the expression is NULL.
2544 2008-01-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2547 * trans-array.c (gfc_trans_create_temp_array): Remove call to
2548 gcc_assert (integer_zerop (loop->from[n])).
2550 2008-01-25 Daniel Franke <franke.daniel@gmail.com>
2553 * resolve.c (resolve_where): Added check if user-defined assignment
2554 operator is an elemental subroutine.
2555 (gfc_resolve_where_code_in_forall): Likewise.
2557 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
2561 * gfortran.h: Revert changes from 2008-01-17.
2562 * match.c: Likewise.
2563 * symbol.c: Likewise.
2564 (gfc_undo_symbols): Undo namespace changes related to common blocks.
2566 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
2569 * data.c (formalize_structure_cons): Skip formalization on
2572 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
2574 * gfortran.texi (OpenMP): Extended existing documentation.
2575 (contributors): Added major contributors of 2008 that were
2577 (proposed extensions): Removed implemented items.
2579 2008-01-24 Paul Thomas <pault@gcc.gnu.org>
2582 * parse.c (next_statement) : If ST_GET_FCN_CHARACTERISTICS is
2583 seen, check for a statement label and, if present, delete it
2584 and set the locus to the start of the statement.
2586 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
2589 * trans-io.c (gfc_trans_transfer): If the array reference in a
2590 read has a vector subscript, use gfc_conv_subref_array_arg to
2591 copy back the temporary.
2593 2008-01-22 Tobias Burnus <burnus@net-b.de>
2596 * interface.c (compare_actual_formal): Fix adding type
2597 to missing_arg_type for absent optional arguments.
2599 2008-01-22 Tobias Burnus <burnus@net-b.de>
2602 * parse.c (parse_spec): Change = into ==.
2604 2008-01-22 Daniel Franke <franke.daniel@gmail.com>
2607 * expr.c (check_elemental): Fix check for valid data types.
2609 2008-01-22 Tobias Burnus <burnus@net-b.de>
2612 * scanner.c (load_line): Support <tab><digit> continuation lines.
2613 * invoke.texi (-Wtabs): Document this.
2615 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
2618 * module.c (read_module): Set use_rename attribute.
2620 2007-01-21 Tobias Burnus <burnus@net-b.de>
2623 * interface.c (compare_parameter): Improved error message
2624 for arguments of same type and mismatched kinds.
2626 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
2629 * resolve.c (resolve_entries): Do not do an array bounds check
2630 if the result symbols are the same.
2633 * module.c (read_module) : Hide the symtree of the previous
2634 version of the symbol if this symbol is renamed.
2636 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
2639 * array.c (gfc_check_constructor_type): Clear the expression ts
2640 so that the checking starts from the deepest level of array
2642 * primary.c (match_varspec): If an unknown type is changed to
2643 default character and the attempt to match a substring fails,
2644 change it back to unknown.
2647 * trans-array.c (gfc_add_loop_ss_code) : If ss->string_length is
2648 NULL for an array constructor, use the cl.length expression to
2650 (gfc_conv_array_parameter): Change call to gfc_evaluate_now to
2653 2008-01-19 Thomas Koenig <tkoenig@gcc.gnu.org>
2657 * iresolve.c (gfc_resolve_all): Remove conversion of mask
2658 argument to kind=1 by removing call to resolve_mask_arg().
2659 (gfc_resolve_any): Likewise.
2661 2008-01-19 Tobias Burnus <burnus@net-b.de>
2664 * primary.c (match_variable): Handle FL_UNKNOWN without
2665 uneducated guessing.
2666 (match_variable): Improve error message.
2668 2008-01-18 Tobias Burnus <burnus@net-b.de>
2671 * interface.c (get_expr_storage_size): Return storage size
2672 for array element designators.
2673 (compare_actual_formal): Reject unequal string sizes for
2674 assumed-shape dummy arguments. And fix error message for
2675 array-sections with vector subscripts.
2677 2008-01-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2680 * simplify.c (is_constant_array_expr): New static function that returns
2681 true if the given expression is an array and is constant.
2682 (gfc_simplify_reshape): Use new function.
2684 2008-01-17 H.J. Lu <hongjiu.lu@intel.com>
2687 * symbol.c (free_common_tree): Renamed to ...
2688 (gfc_free_common_tree): This. Remove static.
2689 (gfc_free_namespace): Updated.
2691 * gfortran.h (gfc_free_common_tree): New.
2693 * match.c (gfc_match_common): Call gfc_free_common_tree () with
2694 gfc_current_ns->common_root and set gfc_current_ns->common_root
2695 to NULL on syntax error.
2697 2008-01-18 Richard Sandiford <rsandifo@nildram.co.uk>
2700 * trans-expr.c (gfc_conv_function_call): Use proper
2701 type for returned character pointers.
2703 2008-01-17 Paul Thomas <pault@gcc.gnu.org>
2708 * decl.c : Remove gfc_function_kind_locus and
2709 gfc_function_type_locus. Add gfc_matching_function.
2710 (match_char_length): If matching a function and the length
2711 does not match, return MATCH_YES and try again later.
2712 (gfc_match_kind_spec): The same.
2713 (match_char_kind): The same.
2714 (gfc_match_type_spec): The same for numeric and derived types.
2715 (match_prefix): Rename as gfc_match_prefix.
2716 (gfc_match_function_decl): Except for function valued character
2717 lengths, defer applying kind, type and charlen info until the
2718 end of specification block.
2719 gfortran.h (gfc_statement): Add ST_GET_FCN_CHARACTERISTICS.
2720 parse.c (decode_specification_statement): New function.
2721 (decode_statement): Call it when a function has kind = -1. Set
2722 and reset gfc_matching function, as function statement is being
2724 (match_deferred_characteristics): Simplify with a single call
2725 to gfc_match_prefix. Do appropriate error handling. In any
2726 case, make sure that kind = -1 is reset or corrected.
2727 (parse_spec): Call above on seeing ST_GET_FCN_CHARACTERISTICS.
2728 Throw an error if kind = -1 after last specification statement.
2729 parse.h : Prototype for gfc_match_prefix.
2731 2008-01-16 Tobias Burnus <burnus@net-b.de>
2734 * interface.c (compare_parameter): Allow AS_DEFERRED array
2735 elements and reject attr.pointer array elemenents.
2736 (get_expr_storage_size): Return storage size of elements of
2737 assumed-shape and pointer arrays.
2739 2008-01-15 Sebastian Pop <sebastian.pop@amd.com>
2741 * f95-lang.c (gfc_init_builtin_functions): Initialize GOMP builtins
2742 for flag_tree_parallelize_loops.
2744 2008-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
2747 * iresolve.c (gfc_resolve_all): Call resolve_mask_arg.
2748 (gfc_resolve_any): Likewise.
2749 (gfc_resolve_count): Likewise. Don't append kind of
2750 argument to function name.
2752 2008-01-13 Tobias Burnus <burnus@net-b.de>
2755 * resolve.c (resolve_actual_arglist): For expressions,
2756 also check for assume-sized arrays.
2757 * interface.c (compare_parameter): Move F2003 character checks
2758 here, print error messages here, reject elements of
2759 assumed-shape array as argument to dummy arrays.
2760 (compare_actual_formal): Update for the changes above.
2762 2008-01-13 Tobias Burnus <burnus@net-b.de>
2765 * decl.c (contained_procedure): Only check directly preceeding state.
2767 2008-01-13 Tobias Burnus <burnus@net-b.de>
2770 * check.c (gfc_check_shape): Accept array ranges of
2771 assumed-size arrays.
2773 2008-01-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2776 * match.c (gfc_match_name): Don't error if leading character is a '(',
2777 just return MATCH_NO.
2779 2008-01-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2782 * trans-io.c (create_dummy_iostat): Commit the symbol.
2784 2008-01-11 Paul Thomas <pault@gcc.gnu.org>
2787 * simplify.c (gfc_simplify_transfer): Return NULL if the size
2788 of the element is unavailable and only assign character length
2789 to the result, if 'mold' is constant.
2791 2008-01-10 Paul Thomas <pault@gcc.gnu.org>
2794 * trans-array.c (gfc_trans_array_ctor_element): Use gfc_trans_string_copy
2795 to assign strings and perform bounds checks on the string length.
2796 (get_array_ctor_strlen): Remove bounds checking.
2797 (gfc_trans_array_constructor): Initialize string length checking.
2798 * trans-array.h : Add prototype for gfc_trans_string_copy.
2800 2008-01-08 Richard Guenther <rguenther@suse.de>
2803 PR tree-optimization/34683
2804 * trans-types.c (gfc_get_array_type_bounds): Use an array type
2805 with known size for accesses if that is known.
2807 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
2810 * expr.c (find_array_element): Check that the array bounds are
2811 constant before using them. Use lower, as well as upper bound.
2812 (check_restricted): Allow implied index variable.
2814 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
2817 * trans_array.c (gfc_trans_deferred_array): Do not null the
2818 data pointer on entering scope, nor deallocate it on leaving
2819 scope, if the symbol has the 'save' attribute.
2822 * trans_decl.c (gfc_finish_var_decl): Derived types with
2823 allocatable components and an initializer must be TREE_STATIC.
2825 2008-01-07 Paul Thomas <pault@gcc.gnu.org>
2828 * module.c (write_generic): Rewrite completely.
2829 (write_module): Change call to write_generic.
2831 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2834 * scanner.c (load_line): Do not count ' ' as printable when checking for
2837 2008-01-06 Paul Thomas <pault@gcc.gnu.org>
2840 * module.c (load_needed): If the namespace has no proc_name
2841 give it the module symbol.
2843 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2846 * trans-expr.c (gfc_conv_missing_dummy): Use a temporary to type convert
2847 the dummy variable expression, test for NULL, and pass the variable
2848 address to the called function.
2850 2007-01-06 Tobias Burnus <burnus@net-b.de>
2853 * match.c (gfc_match_common): Remove blank common in
2855 * resolve.c (resolve_common_vars): New function.
2856 (resolve_common_blocks): Move checks to resolve_common_vars
2857 and invoke that function.
2858 (resolve_types): Call resolve_common_vars for blank commons.
2860 2008-01-06 Tobias Burnus <burnus@net-b.de>
2863 * resolve.c (resolve_equivalence_derived): Reject derived types with
2864 default initialization if equivalenced with COMMON variable.
2866 2008-01-06 Tobias Burnus <burnus@net-b.de>
2869 * io.c (check_io_constraints): Disallow unformatted I/O for
2872 2008-01-06 Tobias Burnus <burnus@net-b.de>
2875 * resolve.c (resolve_formal_arglist): Reject dummy procedure in
2876 ELEMENTAL functions.
2878 2008-01-06 Tobias Burnus <burnus@net-b.de>
2881 * interface.c (compare_actual_formal): Reject parameter
2882 actual to intent(out) dummy.
2884 2008-01-04 Tobias Burnus <burnus@net-b.de>
2887 * primary.c (match_varspec): Gobble whitespace before