1 2010-08-11 Janus Weil <janus@gcc.gnu.org>
4 * intrinsic.c (gfc_current_intrinsic_arg): Change type from 'char' to
6 (check_arglist,check_specific): Add reference to 'name' field.
7 (init_arglist): Remove reference to 'name' field.
8 * intrinsic.h (gfc_current_intrinsic_arg): Modify prototype.
9 * check.c (variable_check): Reverse order of checks. Respect intent of
11 (int_or_proc_check): New function.
12 (coarray_check): New function.
13 (allocatable_check): New function.
14 (gfc_check_allocated,gfc_check_move_alloc): Use 'allocatable_check'.
15 (gfc_check_complex): Use 'int_or_real_check'.
16 (gfc_check_lcobound,gfc_check_image_index,gfc_check_this_image,
17 gfc_check_ucobound): Use 'coarray_check'.
18 (gfc_check_pack): Use 'real_or_complex_check'.
19 (gfc_check_alarm_sub,gfc_check_signal,gfc_check_signal_sub): Use
21 (scalar_check,type_check,numeric_check,int_or_real_check,
22 real_or_complex_check,kind_check,double_check,logical_array_check,
23 array_check,same_type_check,rank_check,nonoptional_check,
24 kind_value_check,gfc_check_a_p,gfc_check_associated,gfc_check_cmplx,
25 gfc_check_cshift,gfc_check_dcmplx,gfc_check_dot_product,gfc_check_dprod,
26 gfc_check_eoshift,gfc_check_fn_rc2008,gfc_check_index,gfc_check_kind,
27 gfc_check_matmul,gfc_check_minloc_maxloc,check_reduction,gfc_check_null,
28 gfc_check_present,gfc_check_reshape,gfc_check_same_type_as,
29 gfc_check_spread,gfc_check_unpack,gfc_check_random_seed,
30 gfc_check_getarg,gfc_check_and,gfc_check_storage_size): Add reference
33 2010-08-10 Daniel Kraft <d@domob.eu>
35 * gfortran.texi (Interoperability with C): Fix ordering in menu
36 and add new subsection about pointers.
37 (Interoperable Subroutines and Functions): Split off the pointer part.
38 (working with Pointers): New subsection with extended discussion
39 of pointers (especially procedure pointers).
41 2010-08-09 Thomas Koenig <tkoenig@gcc.gnu.org>
44 * array.c (gfc_ref_dimen_size): Add end argument.
45 If end is non-NULL, calculate it.
46 (ref_size): Adjust call to gfc_ref_dimen_size.
47 (gfc_array_dimen_size): Likewise.
48 (gfc_array_res_shape): Likewise.
49 * gfortran.h: Adjust prototype for gfc_ref_dimen_size.
50 * resolve.c (resolve_array_ref): For stride not equal to -1,
51 fill in the lowest possible end.
53 2010-08-09 Janus Weil <janus@gcc.gnu.org>
55 * intrinsic.texi: Correct documentation of ASINH, ACOSH and ATANH.
57 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
59 * interface.c (compare_actual_formal): Use XALLOCAVEC instead of
61 (check_some_aliasing): Likewise.
62 * trans-intrinsic.c (gfc_conv_intrinsic_conversion): Likewise.
63 (gfc_conv_intrinsic_int): Likewise.
64 (gfc_conv_intrinsic_lib_function): Likewise.
65 (gfc_conv_intrinsic_cmplx): Likewise.
66 (gfc_conv_intrinsic_ctime): Likewise.
67 (gfc_conv_intrinsic_fdate): Likewise.
68 (gfc_conv_intrinsic_ttynam): Likewise.
69 (gfc_conv_intrinsic_minmax): Likewise.
70 (gfc_conv_intrinsic_minmax_char): Likewise.
71 (gfc_conv_intrinsic_ishftc): Likewise.
72 (gfc_conv_intrinsic_index_scan_verify): Likewise.
73 (gfc_conv_intrinsic_merge): Likewise.
74 (gfc_conv_intrinsic_trim): Likewise.
75 * trans.c (gfc_trans_runtime_error_vararg): Likewise.
77 2010-08-06 Thomas Koenig <tkoenig@gcc.gnu.org>
80 * dependency.c (check_section_vs_section): Handle cases where
81 the start expression coincides with the lower or upper
84 2010-08-04 Janus Weil <janus@gcc.gnu.org>
89 * class.c (gfc_find_derived_vtab): Do not generate vtabs for class
90 container types. Do not artificially increase refs. Commit symbols one
92 * interface.c (compare_parameter): Make sure vtabs are present before
93 generating module variables.
94 * resolve.c (resolve_allocate_expr): Ditto.
96 2010-08-04 Tobias Burnus <burnus@net-b.de>
100 * resolve.c (resolve_structure_cons): Fix
103 2010-08-04 Mikael Morin <mikael@gcc.gnu.org>
107 * symbol.c (changed_syms): Made static again.
108 (gfc_symbol_state): Don't conditionalize on GFC_DEBUG.
109 Changed conditional internal error into assert.
110 Rename function to ...
111 (gfc_enforce_clean_symbol_state): ... this.
112 * gfortran.h (gfc_symbol_state, gfc_enforce_clean_symbol_state):
113 Rename the former to the latter.
114 * parse.c (decode_statement, decode_omp_directive,
115 decode_gcc_attribute): Update callers accordingly. Don't conditionalize
117 (changed_syms): Remove declaration.
118 (next_statement): Use gfc_enforce_clean_symbol_state.
120 2010-08-04 Tobias Burnus <burnus@net-b.de>
123 * resolve.c (resolve_structure_cons): Fix handling of
124 initialization structure constructors with character
125 elements of the wrong length.
126 * array.c (gfc_check_iter_variable): Add NULL check.
127 (gfc_resolve_character_array_constructor): Also truncate
130 2010-08-04 Tobias Burnus <burnus@net-b.de>
132 * trans-io.c (gfc_build_io_library_fndecls): Fix return
133 value of some libgfortran functions.
135 2010-08-03 Thomas Koenig <tkoenig@gcc.gnu.org>
138 * dependency.c (gfc_deb_compare_expr): Remove any integer
139 conversion functions to larger types from both arguments.
140 Remove handling these functions futher down.
142 2010-08-03 Janus Weil <janus@gcc.gnu.org>
146 * class.c (add_procs_to_declared_vtab1): Don't add erroneous procedures.
147 * resolve.c (resolve_tb_generic_targets): Check for errors.
149 2010-08-02 Thomas Koenig <tkoenig@gcc.gnu.org>
152 * depencency.c (gfc_dep_resolver): Fix logic for when a loop
155 2010-08-02 Thomas Koenig <tkoenig@gcc.gnu.org>
158 * dependency.h: Add prototype for gfc_are_identical_variables.
159 * frontend-passes.c: Include depencency.h.
160 (optimimize_equality): Use gfc_are_identical_variables.
161 * dependency.c (identical_array_ref): New function.
162 (gfc_are_identical_variables): New function.
163 (gfc_deb_compare_expr): Use gfc_are_identical_variables.
164 * dependency.c (gfc_check_section_vs_section). Rename gfc_
165 prefix from statc function.
166 (check_section_vs_section): Change arguments to gfc_array_ref,
167 adjust function body accordingly.
169 2010-08-02 Mikael Morin <mikael@gcc.gnu.org>
170 Janus Weil <janus@gcc.gnu.org>
175 * intrinsic.c (gfc_get_intrinsic_sub_symbol): Commit changed symbol.
176 * symbol.c (gen_cptr_param, gen_fptr_param, gen_shape_param,
177 gfc_copy_formal_args, gfc_copy_formal_args_intr,
178 gfc_copy_formal_args_ppc, generate_isocbinding_symbol): Ditto.
179 * parse.c (parse_derived_contains, parse_spec, parse_progunit):
180 Call reject_statement in case of error.
181 (match_deferred_characteritics): Call gfc_undo_symbols in case match
184 2010-08-01 Janus Weil <janus@gcc.gnu.org>
187 * class.c (gfc_build_class_symbol): Make '$vptr' component private.
188 (gfc_find_derived_vtab): Make vtabs and vtypes public.
189 * module.c (read_module): When reading module files, always import
190 vtab and vtype symbols.
192 2010-07-31 Mikael Morin <mikael@gcc.gnu.org>
196 * symbol.c (changed_syms): Made non-static.
197 * parse.c (changed_syms): Declare new external.
198 (next_statement): Assert changed_syms is NULL at the beginning.
200 2010-07-30 Janus Weil <janus@gcc.gnu.org>
201 Steven G. Kargl <kargl@gcc.gnu.org>
204 * match.c (match_type_spec): Try to parse derived types before
207 2010-07-30 Mikael Morin <mikael@gcc.gnu.org>
209 * gfortran.h (gfc_release_symbol): New prototype.
210 * symbol.c (gfc_release_symbol): New. Code taken from free_sym_tree.
211 (gfc_undo_symbols, free_sym_tree, gfc_free_finalizer):
212 Use gfc_release_symbol.
213 * parse.c (gfc_fixup_sibling_symbols): Ditto.
214 * resolve.c (resolve_symbol): Ditto.
216 2010-07-29 Tobias Burnus <burnus@net-b.de>
220 * trans-decl.c (gfc_get_extern_function_decl): Correctly handle
221 external procedure declarations in modules.
222 (gfc_get_symbol_decl): Modify assert.
224 2010-07-29 Janus Weil <janus@gcc.gnu.org>
227 * resolve.c (resolve_fl_derived): Call gfc_resolve_array_spec.
229 2010-07-29 Janus Weil <janus@gcc.gnu.org>
232 * trans-stmt.h (gfc_trans_class_init_assign): New prototype.
233 (gfc_trans_class_assign): Modified prototype.
234 * trans.h (gfc_conv_intrinsic_move_alloc): New prototype.
235 * trans-expr.c (gfc_trans_class_init_assign): Split off from ...
236 (gfc_trans_class_assign): ... here. Modified actual arguments.
237 * trans-intrinsic.c (gfc_conv_intrinsic_move_alloc): New function to
238 handle the MOVE_ALLOC intrinsic with scalar and class arguments.
239 * trans.c (trans_code): Call 'gfc_conv_intrinsic_move_alloc'.
241 2010-07-29 Mikael Morin <mikael@gcc.gnu.org>
245 * class.c (gfc_find_derived_vtab): Accept or discard newly created
246 symbols before returning.
248 2010-07-29 Joseph Myers <joseph@codesourcery.com>
250 * lang.opt (cpp): Remove Joined and Separate markers.
251 (cpp=): New internal option.
252 * lang-specs.h (F951_CPP_OPTIONS): Generate -cpp= option.
253 * cpp.c (gfc_cpp_handle_option): Handle OPT_cpp_ instead of
256 2010-07-29 Daniel Kraft <d@domob.eu>
259 * array.c (resolve_array_bound): Fix error message to properly handle
260 non-variable expressions.
262 2010-07-28 Mikael Morin <mikael@gcc.gnu.org>
264 * decl.c (free_value): Also free repeat field.
265 * data.c (gfc_assign_data_value): Always free offset before returning.
267 2010-07-28 Daniel Kraft <d@domob.eu>
269 * gfortran.h (gfc_build_intrinsic_call): New method.
270 * expr.c (gfc_build_intrinsic_call): New method.
271 * simplify.c (range_check): Ignore non-constant value.
272 (simplify_bound_dim): Handle non-variable expressions and
273 fix memory leak with non-free'ed expression.
274 (simplify_bound): Handle non-variable expressions.
275 (gfc_simplify_shape): Ditto.
276 (gfc_simplify_size): Ditto, but only in certain cases possible.
278 2010-07-28 Joseph Myers <joseph@codesourcery.com>
280 * gfortranspec.c (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG):
283 2010-07-28 Tobias Burnus <burnus@net-b.de>
286 * trans-types.c (gfc_get_derived_type): Fix DT declaration
287 from modules for whole-file mode.
289 2010-07-27 Joseph Myers <joseph@codesourcery.com>
291 * gfortran.h (gfc_handle_option): Update prototype and return
293 * options.c (gfc_handle_option): Update prototype and return value
296 2010-07-27 Joseph Myers <joseph@codesourcery.com>
298 * cpp.c (gfc_cpp_init_options): Update prototype. Use number of
299 decoded options in allocating deferred_opt.
300 * cpp.h (gfc_cpp_init_options): Update prototype.
301 * f95-lang.c (LANG_HOOKS_OPTION_LANG_MASK): Define.
302 * gfortran.h (gfc_option_lang_mask): New.
303 (gfc_init_options): Update prototype.
304 * options.c (gfc_option_lang_mask): New.
305 (gfc_init_options): Update prototype. Pass new arguments to
306 gfc_cpp_init_options.
308 2010-07-26 Tobias Burnus <burnus@net-b.de>
311 * trans-decl.c (gfc_get_extern_function_decl): Fix generation
312 for functions which are later in the same file.
313 (gfc_create_function_decl, build_function_decl,
314 build_entry_thunks): Add global argument.
315 * trans.c (gfc_generate_module_code): Update
316 gfc_create_function_decl call.
317 * trans.h (gfc_create_function_decl): Update prototype.
318 * resolve.c (resolve_global_procedure): Also resolve for
321 2010-07-26 Richard Henderson <rth@redhat.com>
324 * f95-lang.c (LANG_HOOKS_WRITE_GLOBALS): New.
325 (gfc_write_global_declarations): New.
327 2010-07-26 Tobias Burnus <burnus@net-b.de>
330 * trans-io.c (build_dt): Use NULL_TREE rather than NULL
331 for call to transfer_namelist_element.
332 * trans-decl.c (gfc_get_symbol_decl): Also set sym->backend_decl
335 2010-07-25 Thomas Koenig <tkoenig@gcc.gnu.org>
338 * Make-lang.in: Add fortran/frontend-passes.o.
339 * gfortran.h: Add prototype for gfc_run_passes.
340 * resolve.c (gfc_resolve): Call gfc_run_passes.
341 * frontend-passes.c: New file.
343 2010-07-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>
346 * scanner.c (gfc_next_char_literal): Enable truncation warning for
349 2010-07-25 Mikael Morin <mikael@gcc.gnu.org>
352 * gfortran.h (gfc_namespace): New field old_equiv.
353 (gfc_free_equiv_until): New prototype.
354 * match.c (gfc_free_equiv_until): New, renamed from gfc_free_equiv with
355 a parameterized stop condition.
356 (gfc_free_equiv): Use gfc_free_equiv_until.
357 * parse.c (next_statement): Save equivalence list.
358 (reject_statement): Restore equivalence list.
360 2010-07-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>
363 * scanner.c (gfc_next_char_literal): Move check for truncation earlier
364 in the function so that it does not get missed by early exits.
365 (load_line): Add checks for quoted strings and free form comments to
366 disable warnings on comments. Add check for ampersand as first
367 character after truncation and don't warn for this case, but warn if
368 there are subsequent non-whitespace characters.
370 2010-07-24 Tobias Burnus <burnus@net-b.de>
373 * parse.c (gfc_parse_file): Do not override
374 gfc_global_ns_list items.
376 2010-07-24 Tobias Burnus <burnus@net-b.de>
378 * options.c (gfc_init_options): Enable -fwhole-file by default.
379 * interface.c (compare_parameter): Assume a Hollerith constant is
380 compatible with all other argument types.
382 2010-07-23 Tobias Burnus <burnus@net-b.de>
385 * trans-decl.c (gfc_get_symbol_decl): Use module decl with
386 -fwhole-file also for derived types.
387 * trans-types.c (copy_dt_decls_ifequal): Remove static and
388 rename to gfc_copy_dt_decls_ifequal.
389 (gfc_get_derived_type): Update call.
390 * trans-types.h (gfc_copy_dt_decls_ifequal): Add prototype.
392 2010-07-23 Tobias Burnus <burnus@net-b.de>
395 * resolve.c (resolve_global_procedure): Properly handle ENTRY.
397 2010-07-23 Jakub Jelinek <jakub@redhat.com>
399 * trans-types.c (gfc_get_array_descriptor_base,
400 gfc_get_array_type_bounds): Set TYPE_NAMELESS.
401 * trans-decl.c (gfc_build_qualified_array): Set DECL_NAMELESS
402 instead of clearing DECL_NAME.
403 (gfc_build_dummy_array_decl): Set DECL_NAMELESS.
405 2009-07-23 Paul Thomas <pault@gcc.gnu.org>
408 * trans-array.c (gfc_init_loopinfo): Initialize the reverse
410 gfc_trans_scalarized_loop_end: If reverse set in dimension n,
411 reverse the scalarization loop.
412 gfc_conv_resolve_dependencies: Pass the reverse field of the
413 loopinfo to gfc_dep_resolver.
414 trans-expr.c (gfc_trans_assignment_1): Enable loop reversal for
415 assignment by resetting loop.reverse.
416 gfortran.h : Add the gfc_reverse enum.
417 trans.h : Add the reverse field to gfc_loopinfo.
418 dependency.c (gfc_check_dependency): Pass null to the new arg
420 (gfc_check_section_vs_section): Check for reverse dependencies.
421 (gfc_dep_resolver): Add reverse argument and deal with the loop
423 dependency.h : Modify prototype for gfc_dep_resolver to include
426 2010-07-23 Daniel Kraft <d@domob.eu>
429 * gfortran.h (gfc_find_symtree_in_proc): New method.
430 * symbol.c (gfc_find_symtree_in_proc): New method.
431 * match.c (match_exit_cycle): Look for loop name also in parent
432 namespaces within current procedure.
434 2010-07-22 Tobias Burnus <burnus@net-b.de>
437 * dependency.c (gfc_check_dependency): Add argument alising check.
438 * symbol.c (gfc_symbols_could_alias): Add argument alising check.
440 2010-07-22 Daniel Kraft <d@domob.eu>
442 * trans-stmt.c (gfc_trans_return): Put back in the handling of se.post,
443 now in the correct place.
445 2010-07-21 Steven G. Kargl <kargl@gcc.gnu.org>
448 * Revert my commit r162325.
450 2010-07-21 Daniel Kraft <d@domob.eu>
452 * trans.h (gfc_get_return_label): Removed.
453 (gfc_generate_return): New method.
454 (gfc_trans_deferred_vars): Update gfc_wrapped_block rather than
455 returning a tree directly.
456 * trans-stmt.c (gfc_trans_return): Use `gfc_generate_return'.
457 (gfc_trans_block_construct): Update for new interface to
458 `gfc_trans_deferred_vars'.
459 * trans-decl.c (current_function_return_label): Removed.
460 (current_procedure_symbol): New variable.
461 (gfc_get_return_label): Removed.
462 (gfc_trans_deferred_vars): Update gfc_wrapped_block rather than
463 returning a tree directly.
464 (get_proc_result), (gfc_generate_return): New methods.
465 (gfc_generate_function_code): Clean up and do init/cleanup here
466 also with gfc_wrapped_block. Remove return-label but rather
469 2010-07-19 Steven G. Kargl <kargl@gcc.gnu.org>
472 * fortran/match.c (match_type_spec): Check for derived type before
475 2010-07-19 Paul Thomas <pault@gcc.gnu.org>
478 * interface.c (matching_typebound_op): Add argument for the
479 return of the generic name for the procedure.
480 (build_compcall_for_operator): Add an argument for the generic
481 name of an operator procedure and supply it to the expression.
482 (gfc_extend_expr, gfc_extend_assign): Use the generic name in
483 calls to the above procedures.
484 * resolve.c (resolve_typebound_function): Catch procedure
485 component calls for CLASS objects, check that the vtable is
486 complete and insert the $vptr and procedure components, to make
488 (resolve_typebound_function): The same.
489 * trans-decl.c (gfc_trans_deferred_vars): Do not deallocate
490 an allocatable scalar if it is a result.
492 2010-07-19 Paul Thomas <pault@gcc.gnu.org>
495 * match.c (gfc_match_iterator): Reverted.
497 2010-07-18 Paul Thomas <pault@gcc.gnu.org>
500 * match.c (gfc_match_iterator): Remove error that iterator
501 cannot be INTENT(IN).
503 2010-07-17 Mikael Morin <mikael@gcc.gnu.org>
505 * trans-array.c (gfc_free_ss): Don't free beyond ss rank.
506 Access subscript through the "dim" field index.
507 (gfc_trans_create_temp_array): Access ss info through the "dim" field
509 (gfc_conv_array_index_offset): Ditto.
510 (gfc_conv_loop_setup): Ditto.
511 (gfc_conv_expr_descriptor): Ditto.
512 (gfc_conv_ss_startstride): Ditto. Update call to
513 gfc_conv_section_startstride.
514 (gfc_conv_section_startstride): Set values along the array dimension.
515 Get array dimension directly from the argument.
517 2010-07-15 Jakub Jelinek <jakub@redhat.com>
519 * trans.h (gfc_string_to_single_character): New prototype.
520 * trans-expr.c (string_to_single_character): Renamed to ...
521 (gfc_string_to_single_character): ... this. No longer static.
522 (gfc_conv_scalar_char_value, gfc_build_compare_string,
523 gfc_trans_string_copy): Adjust callers.
524 * config-lang.in (gtfiles): Add fortran/trans-stmt.c.
525 * trans-stmt.c: Include ggc.h and gt-fortran-trans-stmt.h.
526 (select_struct): Move to toplevel, add GTY(()).
527 (gfc_trans_character_select): Optimize SELECT CASE
528 with character length 1.
530 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
532 * f95-lang.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
533 * trans-common.c: Likewise.
534 * trans-decl.c: Likewise.
535 * trans-types.c: Likewise.
538 2010-07-15 Janus Weil <janus@gcc.gnu.org>
541 * resolve.c (resolve_typebound_generic_call): Resolve generic
542 non-polymorphic type-bound procedure calls to the correct specific
544 (resolve_typebound_subroutine): Remove superfluous code.
546 2010-07-15 Daniel Kraft <d@domob.eu>
549 * trans.h (struct gfc_wrapped_block): New struct.
550 (gfc_start_wrapped_block), (gfc_add_init_cleanup): New methods.
551 (gfc_finish_wrapped_block): New method.
552 (gfc_init_default_dt): Add new init code to block rather than
554 * trans-array.h (gfc_trans_auto_array_allocation): Use gfc_wrapped_block
555 (gfc_trans_dummy_array_bias): Ditto.
556 (gfc_trans_g77_array): Ditto.
557 (gfc_trans_deferred_array): Ditto.
558 * trans.c (gfc_add_expr_to_block): Call add_expr_to_chain.
559 (add_expr_to_chain): New method based on old gfc_add_expr_to_block.
560 (gfc_start_wrapped_block), (gfc_add_init_cleanup): New methods.
561 (gfc_finish_wrapped_block): New method.
562 * trans-array.c (gfc_trans_auto_array_allocation): use gfc_wrapped_block
563 (gfc_trans_g77_array), (gfc_trans_dummy_array_bias): Ditto.
564 (gfc_trans_deferred_array): Ditto.
565 * trans-decl.c (gfc_trans_dummy_character): Ditto.
566 (gfc_trans_auto_character_variable), (gfc_trans_assign_aux_var): Ditto.
567 (init_intent_out_dt): Ditto.
568 (gfc_init_default_dt): Add new init code to block rather than
570 (gfc_trans_deferred_vars): Use gfc_wrapped_block to collect all init
571 and cleanup code and put it all together.
573 2010-07-15 Jakub Jelinek <jakub@redhat.com>
575 * trans.h (gfc_build_compare_string): Add CODE argument.
576 * trans-intrinsic.c (gfc_conv_intrinsic_strcmp): Pass OP to
577 gfc_build_compare_string.
578 * trans-expr.c (gfc_conv_expr_op): Pass CODE to
579 gfc_build_compare_string.
580 (string_to_single_character): Rename len variable to length.
581 (gfc_optimize_len_trim): New function.
582 (gfc_build_compare_string): Add CODE argument. If it is EQ_EXPR
583 or NE_EXPR and one of the strings is string literal with LEN_TRIM
584 bigger than the length of the other string, they compare unequal.
587 * trans-stmt.c (gfc_trans_character_select): Always use NULL for high
588 in CASE_LABEL_EXPR and use NULL for low for the default case.
590 2010-07-14 Mikael Morin <mikael@gcc.gnu.org>
592 * trans-array.c (gfc_conv_section_upper_bound): Remove
593 (gfc_conv_section_startstride): Don't set the upper bound in the
594 vector subscript case.
595 (gfc_conv_loop_setup): Don't use gfc_conv_section_upper_bound
597 2010-07-14 Janus Weil <janus@gcc.gnu.org>
600 * gfortran.h (gfc_is_data_pointer): Remove prototype.
601 * dependency.c (gfc_is_data_pointer): Make it static.
602 * intrinsic.texi: Update documentation on C_LOC.
603 * resolve.c (gfc_iso_c_func_interface): Fix pointer and target checks
604 and add a check for polymorphic variables.
606 2010-07-14 Jakub Jelinek <jakub@redhat.com>
608 * trans-expr.c (string_to_single_character): Also optimize
609 string literals containing a single char followed only by spaces.
610 (gfc_trans_string_copy): Remove redundant string_to_single_character
613 * trans-decl.c (gfc_build_intrinsic_function_decls,
614 gfc_build_builtin_function_decls): Mark functions as
615 DECL_PURE_P or TREE_READONLY.
617 2010-07-13 Nathan Froyd <froydnj@codesourcery.com>
619 * trans-decl.c (build_entry_thunks): Call build_call_expr_loc_vec
620 instead of build_function_call_expr.
621 * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Likewise.
623 2010-07-13 Tobias Burnus <burnus@net-b.de>
624 Daniel Franke <franke.daniel@gmail.com>
627 * trans.h (gfc_build_library_function_decl_with_spec): New prototype.
628 * trans-decl.c (gfc_build_library_function_decl_with_spec): Removed
630 * trans-io (gfc_build_io_library_fndecls): Add "fn spec" annotations.
632 2010-07-13 Daniel Franke <franke.daniel@gmail.com>
633 Tobias Burnus <burnus@net-b.de>
636 * trans-decl.c (gfc_build_intrinsic_function_decls): Add
637 noclobber/noescape annotations to function calls.
638 (gfc_build_builtin_function_decls): Likewise.
640 2010-07-13 Janus Weil <janus@gcc.gnu.org>
646 * gfortran.h (gfc_find_derived_vtab): Modified prototype.
647 * class.c (gfc_build_class_symbol): Modified call to
648 'gfc_find_derived_vtab'.
649 (add_proc_component): Removed, moved code into 'add_proc_comp'.
650 (add_proc_comps): Renamed to 'add_proc_comp', removed treatment of
652 (add_procs_to_declared_vtab1): Removed unnecessary argument 'resolved'.
653 Removed treatment of generics.
654 (copy_vtab_proc_comps): Removed unnecessary argument 'resolved'.
655 Call 'add_proc_comp' instead of duplicating code.
656 (add_procs_to_declared_vtab): Removed unnecessary arguments 'resolved'
658 (add_generic_specifics,add_generics_to_declared_vtab): Removed.
659 (gfc_find_derived_vtab): Removed unnecessary argument 'resolved'.
660 Removed treatment of generics.
661 * iresolve.c (gfc_resolve_extends_type_of): Modified call to
662 'gfc_find_derived_vtab'.
663 * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
664 Removed treatment of generics.
665 (resolve_select_type,resolve_fl_derived): Modified call to
666 'gfc_find_derived_vtab'.
667 * trans-decl.c (gfc_get_symbol_decl): Ditto.
668 * trans-expr.c (gfc_conv_derived_to_class,gfc_trans_class_assign):
670 * trans-stmt.c (gfc_trans_allocate): Ditto.
672 2010-07-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
675 * trans-io.c (build_dt): Set common.unit to flag chracter(kind=4)
678 2010-07-12 Mikael Morin <mikael@gcc.gnu.org>
680 * expr.c (gfc_get_int_expr): Don't initialize mpfr data twice.
681 * resolve.c (build_default_init_expr): Ditto.
683 2010-07-11 Tobias Burnus <burnus@net-b.de>
686 * module.c (sort_iso_c_rename_list): Remove.
687 (import_iso_c_binding_module,use_iso_fortran_env_module):
688 Allow multiple imports of the same symbol.
690 2010-07-11 Mikael Morin <mikael@gcc.gnu.org>
692 * arith.c (gfc_arith_done_1): Release mpfr internal caches.
694 2010-07-11 Janus Weil <janus@gcc.gnu.org>
697 * decl.c (build_sym,attr_decl1): Only build the class container if the
698 symbol has sufficient attributes.
699 * expr.c (gfc_check_pointer_assign): Use class_pointer instead of
700 pointer attribute for classes.
701 * match.c (gfc_match_allocate,gfc_match_deallocate): Ditto.
702 * module.c (MOD_VERSION): Bump.
703 (enum ab_attribute,attr_bits): Add AB_CLASS_POINTER.
704 (mio_symbol_attribute): Handle class_pointer attribute.
705 * parse.c (parse_derived): Use class_pointer instead of pointer
706 attribute for classes.
707 * primary.c (gfc_variable_attr,gfc_expr_attr): Ditto.
708 * resolve.c (resolve_structure_cons,resolve_deallocate_expr,
709 resolve_allocate_expr,resolve_fl_derived): Ditto.
710 (resolve_fl_var_and_proc): Check for class_ok attribute.
712 2010-07-10 Mikael Morin <mikael@gcc.gnu.org>
714 * trans-io.c (gfc_build_st_parameter): Update calls to
715 gfc_add_field_to_struct.
716 * trans-stmt.c (ADD_FIELD): Ditto.
718 (gfc_get_derived_type): Ditto. Don't create backend_decl for C_PTR's
720 (gfc_add_field_to_struct_1): Set TYPE_FIELDS(context) instead of
721 fieldlist, remove fieldlist from argument list.
722 (gfc_add_field_to_struct): Update call to gfc_add_field_to_struct_1
723 and remove fieldlist from argument list.
724 (gfc_get_desc_dim_type, gfc_get_array_descriptor_base,
725 gfc_get_mixed_entry_union): Move setting
726 TYPE_FIELDS to gfc_add_field_to_struct_1 and update calls to it.
727 * trans-types.h (gfc_add_field_to_struct): Update prototype.
729 2010-07-10 Paul Thomas <pault@gcc.gnu.org>
732 * trans-expr.c (arrayfunc_assign_needs_temporary): No temporary
733 if the lhs has never been host associated, as well as not being
734 use associated, a pointer or a target.
735 * resolve.c (resolve_variable): Mark variables that are host
737 * gfortran.h: Add the host_assoc bit to the symbol_attribute
740 2010-07-09 Janus Weil <janus@gcc.gnu.org>
742 * intrinsic.texi: Add documentation for SAME_TYPE_AS, EXTENDS_TYPE_OF,
743 STORAGE_SIZE, C_NULL_PTR and C_NULL_FUNPTR. Modify documentation of
746 2010-07-08 Janus Weil <janus@gcc.gnu.org>
749 * gfortran.h (gfc_isym_id): Add GFC_ISYM_C_SIZEOF,GFC_ISYM_STORAGE_SIZE.
750 * intrinsic.h (gfc_check_c_sizeof,gfc_check_storage_size,
751 gfc_resolve_storage_size): New prototypes.
752 * check.c (gfc_check_c_sizeof,gfc_check_storage_size): New functions.
753 * intrinsic.c (add_functions): Add STORAGE_SIZE.
754 * iresolve.c (gfc_resolve_storage_size): New function.
755 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Handle polymorphic
757 (gfc_conv_intrinsic_storage_size): New function.
758 (gfc_conv_intrinsic_function): Handle STORAGE_SIZE.
760 2010-07-08 Jakub Jelinek <jakub@redhat.com>
763 * match.c (match_exit_cycle): Error on EXIT also from collapsed
764 !$omp do loops. Error on CYCLE to non-innermost collapsed
767 2010-07-08 Tobias Burnus <burnus@net-b.de>
770 * array.c (gfc_match_array_ref): Better error message for
771 coarrays with too few ranks.
772 (match_subscript): Move one diagnostic to caller.
773 * gfortran.h (gfc_get_corank): Add prottype.
774 * expr.c (gfc_get_corank): New function.
775 * iresolve.c (resolve_bound): Fix rank for cobounds.
776 (gfc_resolve_lbound,gfc_resolve_lcobound, gfc_resolve_ubound,
777 gfc_resolve_ucobound, gfc_resolve_this_image): Update
780 2010-07-06 Tobias Burnus <burnus@net-b.de>
783 * array.c (gfc_expand_constructor): Add optional diagnostic.
784 * gfortran.h (gfc_expand_constructor): Update prototype.
785 * expr.c (gfc_simplify_expr, check_init_expr,
786 gfc_reduce_init_expr): Update gfc_expand_constructor call.
787 * resolve.c (gfc_resolve_expr): Ditto.
789 2010-07-06 Tobias Burnus <burnus@net-b.de>
791 * trans-decl.c: Include diagnostic-core.h besides toplev.h.
792 * trans-intrinsic.c: Ditto.
793 * trans-types.c: Ditto.
794 * convert.c: Include diagnostic-core.h instead of toplev.h.
796 * trans-array.c: Ditto.
797 * trans-const.c: Ditto.
798 * trans-expr.c: Ditto.
800 * trans-openmp.c: Ditto.
803 2010-07-06 Thomas Koenig <tkoenig@gcc.gnu.org>
806 * check.c (dim_rank_check): Also check intrinsic functions.
807 Adjust permissible rank for functions which reduce the rank of
808 their argument. Spread is an exception, where DIM can
809 be one larger than the rank of array.
811 2010-07-05 Steven G. Kargl <kargl@gcc.gnu.org>
814 * fortran/io.c (resolve_tag): Check EXIST tag is a default logical.
816 2010-07-05 Paul Thomas <pault@gcc.gnu.org>
819 * trans-types.c (gfc_get_derived_type): Derived type fields
820 with the vtype attribute must have TYPE_REF_CAN_ALIAS_ALL set
821 but build_pointer_type_for_mode must be used for this.
823 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
825 * trans.h (gfc_conv_procedure_call): Take a VEC instead of a tree.
826 * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Adjust for new
827 type of gfc_conv_procedure_call.
828 (conv_generic_with_optional_char_arg): Likewise.
829 * trans-stmt.c (gfc_trans_call): Likewise.
830 * trans-expr.c (gfc_conv_function_expr): Likewise.
831 (gfc_conv_procedure_call): Use build_call_vec instead of
834 2010-07-04 Daniel Kraft <d@domob.eu>
836 * gfc-internals.texi (gfc_code): Document BLOCK and ASSOCIATE.
838 2010-07-04 Paul Thomas <pault@gcc.gnu.org>
842 * trans-types.c (gfc_get_derived_type): Derived type fields
843 with the vtype attribute must have TYPE_REF_CAN_ALIAS_ALL set.
845 2010-07-02 Mikael Morin <mikael@gcc.gnu.org>
848 * decl.c (match_procedure_in_type): Clear structure before using.
849 (gfc_match_generic): Ditto.
851 2010-07-02 Nathan Froyd <froydnj@codesourcery.com>
853 * trans-types.h (gfc_add_field_to_struct): Add tree ** parameter.
854 * trans-types.c (gfc_add_field_to_struct_1): New function, most
855 of which comes from...
856 (gfc_add_field_to_struct): ...here. Call it. Add new parameter.
857 (gfc_get_desc_dim_type): Call gfc_add_field_to_struct_1 for
859 (gfc_get_array_descriptor_base): Likewise.
860 (gfc_get_mixed_entry_union): Likewise.
861 (gfc_get_derived_type): Add extra chain parameter for
862 gfc_add_field_to_struct.
863 * trans-stmt.c (gfc_trans_character_select): Likewise.
864 * trans-io.c (gfc_build_st_parameter): Likewise.
866 2010-06-29 Janus Weil <janus@gcc.gnu.org>
869 * resolve.c (is_external_proc): Prevent procedure pointers from being
870 regarded as external procedures.
872 2010-06-29 Janus Weil <janus@gcc.gnu.org>
875 * trans-intrinsic.c (gfc_conv_associated): Handle polymorphic variables
876 passed as second argument of ASSOCIATED.
878 2010-06-29 Paul Thomas <pault@gcc.gnu.org>
881 * trans-expr.c (arrayfunc_assign_needs_temporary): New function
882 to determine if a function assignment can be made without a
884 (gfc_trans_arrayfunc_assign): Move all the conditions that
885 suppress the direct function call to the above new functon and
888 2010-06-28 Paul Thomas <pault@gcc.gnu.org>
891 * interface.c (argument_rank_mismatch): New function.
892 (compare_parameter): Call new function instead of generating
895 2010-06-28 Nathan Froyd <froydnj@codesourcery.com>
897 * trans-openmp.c (dovar_init): Define. Define VECs containing it.
898 (gfc_trans_omp_do): Use a VEC to accumulate variables and their
901 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
903 * Make-lang.in: Update dependencies.
905 2010-06-27 Nathan Froyd <froydnj@codesourcery.com>
907 * gfortran.h (gfc_code): Split backend_decl field into cycle_label
908 and exit_label fields.
909 * trans-openmp.c (gfc_trans_omp_do): Assign to new fields
911 * trans-stmt.c (gfc_trans_simple_do): Likewise.
912 (gfc_trans_do): Likewise.
913 (gfc_trans_do_while): Likewise.
914 (gfc_trans_cycle): Use cycle_label directly.
915 (gfc_trans_exit): Use exit_label directly.
917 2010-06-27 Daniel Kraft <d@domob.eu>
919 * dump-parse-tree.c (show_symbol): Dump target-expression for
921 (show_code_node): Make distinction between BLOCK and ASSOCIATE.
922 (show_namespace): Use show_level for correct indentation of
923 "inner namespaces" (contained procedures or BLOCK).
925 2010-06-27 Thomas Koenig <tkoenig@gcc.gnu.org>
928 * dump-parse-tree.c (show_code_node): Show namespace for
931 2010-06-26 Tobias Burnus <burnus@net-b.de>
933 * decl.c (gfc_match_decl_type_spec): Support
934 TYPE(intrinsic-type-spec).
936 2010-06-25 Tobias Burnus <burnus@net-b.de>
938 * intrinsic.h (gfc_check_selected_real_kind,
939 gfc_simplify_selected_real_kind): Update prototypes.
940 * intrinsic.c (add_functions): Add radix support to
942 * check.c (gfc_check_selected_real_kind): Ditto.
943 * simplify.c (gfc_simplify_selected_real_kind): Ditto.
944 * trans-decl.c (gfc_build_intrinsic_function_decls):
945 Change call from selected_real_kind to selected_real_kind2008.
946 * intrinsic.texi (SELECTED_REAL_KIND): Update for radix.
947 (PRECISION, RANGE, RADIX): Add cross @refs.
949 2010-06-25 Tobias Burnus <burnus@net-b.de>
951 * decl.c (gfc_match_entry): Mark ENTRY as GFC_STD_F2008_OBS.
952 * gfortran.texi (_gfortran_set_options): Update for
953 GFC_STD_F2008_OBS addition.
954 * libgfortran.h: Add GFC_STD_F2008_OBS.
955 * options.c (set_default_std_flags, gfc_handle_option): Handle
957 io.c (check_format): Fix allow_std check.
959 2010-06-25 Tobias Burnus <burnus@net-b.de>
961 * decl.c (gfc_match_entry): Allow END besides
962 END SUBROUTINE/END FUNCTION for contained procedures.
964 2010-06-25 Tobias Burnus <burnus@net-b.de>
966 * parse.c (next_free, next_fixed): Allow ";" as first character.
968 2010-06-24 Tobias Burnus <burnus@net-b.de>
971 * decl.c (variable_decl): Fix IMPORT diagnostic for CLASS.
973 2010-06-22 Janus Weil <janus@gcc.gnu.org>
976 * resolve.c (resolve_fl_derived): Avoid checking for abstract on class
979 2010-06-21 Tobias Burnus <burnus@net-b.de>
982 * interface.c (compare_parameter): Add gfc_is_simply_contiguous
984 * symbol.c (gfc_add_contiguous): New function.
985 (gfc_copy_attr, check_conflict): Handle contiguous attribute.
986 * decl.c (match_attr_spec): Ditto.
987 (gfc_match_contiguous): New function.
988 * resolve.c (resolve_fl_derived, resolve_symbol): Handle
990 * gfortran.h (symbol_attribute): Add contiguous.
991 (gfc_is_simply_contiguous): Add prototype.
992 (gfc_add_contiguous): Add prototype.
993 * match.h (gfc_match_contiguous): Add prototype.
994 * parse.c (decode_specification_statement,
995 decode_statement): Handle contiguous attribute.
996 * expr.c (gfc_is_simply_contiguous): New function.
997 * dump-parse-tree.c (show_attr): Handle contiguous.
998 * module.c (ab_attribute, attr_bits, mio_symbol_attribute):
1000 * trans-expr.c (gfc_add_interface_mapping): Copy
1002 * trans-array.c (gfc_conv_descriptor_stride_get,
1003 gfc_conv_array_parameter): Handle contiguous arrays.
1004 * trans-types.c (gfc_build_array_type, gfc_build_array_type,
1005 gfc_sym_type, gfc_get_derived_type, gfc_get_array_descr_info):
1007 * trans.h (gfc_array_kind): Ditto.
1008 * trans-decl.c (gfc_get_symbol_decl): Ditto.
1010 2010-06-20 Joseph Myers <joseph@codesourcery.com>
1012 * options.c (gfc_handle_option): Don't handle N_OPTS.
1014 2010-06-19 Janus Weil <janus@gcc.gnu.org>
1017 * resolve.c (resolve_fl_derived): Reverse ordering of conditions
1020 2010-06-18 Tobias Burnus <burnus@net-b.de>
1023 * resolve.c (resolve_allocate_deallocate): Properly check
1024 part-refs in stat=/errmsg= for invalid use.
1026 2010-06-17 Janus Weil <janus@gcc.gnu.org>
1029 * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
1030 Return directly in case of an error.
1032 2010-06-16 Janus Weil <janus@gcc.gnu.org>
1035 * gfortran.h (gfc_get_typebound_proc): Modified Prototype.
1036 * decl.c (match_procedure_in_type): Give a unique gfc_typebound_proc
1037 structure to each procedure in a procedure list.
1038 * module.c (mio_typebound_proc): Add NULL argument to
1039 'gfc_get_typebound_proc'.
1040 * symbol.c (gfc_get_typebound_proc): Add a new argument, which is used
1041 to initialize the new structure.
1043 2010-06-15 Janus Weil <janus@gcc.gnu.org>
1046 * gfortran.h (gfc_expr): Add new member 'mold'.
1047 * match.c (gfc_match_allocate): Implement the MOLD tag.
1048 * resolve.c (resolve_allocate_expr): Ditto.
1049 * trans-stmt.c (gfc_trans_allocate): Ditto.
1051 2010-06-15 Jakub Jelinek <jakub@redhat.com>
1054 * trans-openmp.c (gfc_omp_predetermined_sharing): Don't return
1055 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with
1056 GFC_DECL_SAVED_DESCRIPTOR set.
1057 (gfc_omp_report_decl): New function.
1058 * trans.h (gfc_omp_report_decl): New prototype.
1059 * f95-lang.c (LANG_HOOKS_OMP_REPORT_DECL): Redefine.
1061 2010-06-13 Daniel Franke <franke.daniel@gmail.com>
1065 * gfortranspec.c (lang_specific_driver): Removed deprecation
1067 * lang.opt: Add options -M, -MM, -MD, -MMD, -MF, -MG, -MP, -MT, -MQ.
1068 * lang-specs.h (CPP_FORWARD_OPTIONS): Add -M* options.
1069 * cpp.h (gfc_cpp_makedep): New.
1070 (gfc_cpp_add_dep): New.
1071 (gfc_cpp_add_target): New.
1072 * cpp.c (gfc_cpp_option): Add deps* members.
1073 (gfc_cpp_makedep): New.
1074 (gfc_cpp_add_dep): New.
1075 (gfc_cpp_add_target): New.
1076 (gfc_cpp_init_options): Initialize new options.
1077 (gfc_cpp_handle_option): Handle new options.
1078 (gfc_cpp_post_options): Map new options to libcpp-options.
1079 (gfc_cpp_init): Handle deferred -MQ and -MT options.
1080 (gfc_cpp_done): If requested, write dependencies to file.
1081 * module.c (gfc_dump_module): Add a module filename as target.
1082 * scanner.c (open_included_file): New parameter system; add the
1083 included file as dependency.
1084 (gfc_open_included_file): Add the included file as dependency.
1085 (gfc_open_intrinsic_module): Likewise.
1086 * invoke.texi: Removed deprecation warning for -M.
1087 * gfortran.texi: Removed Makefile-dependencies project.
1089 2010-06-12 Daniel Franke <franke.daniel@gmail.com>
1091 * resolve.c (resolve_global_procedure): Improved checking if an
1092 explicit interface is required.
1094 2010-06-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1096 * trans-decl.c (gfc_build_intrinsic_function_decls): Fix
1098 * trans-intrinsic.c (gfc_conv_intrinsic_fdate): Fix argument type.
1099 (gfc_conv_intrinsic_ttynam): Likewise.
1100 (gfc_conv_intrinsic_trim): Likewise.
1102 2010-06-12 Janus Weil <janus@gcc.gnu.org>
1105 * decl.c (match_procedure_in_type): Allow procedure lists (F08).
1107 2010-06-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1109 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Fix comment.
1111 2010-06-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1113 * mathbuiltins.def: Add builtins that do not directly correspond
1114 to a Fortran intrinsic, with new macro OTHER_BUILTIN.
1115 * f95-lang.c (gfc_init_builtin_functions): Define OTHER_BUILTIN.
1116 * trans-intrinsic.c (gfc_intrinsic_map_t): Remove
1117 code_{r,c}{4,8,10,16} fields. Add
1118 {,complex}{float,double,long_double}_built_in fields.
1119 (gfc_intrinsic_map): Adjust definitions of DEFINE_MATH_BUILTIN,
1120 DEFINE_MATH_BUILTIN_C and LIB_FUNCTION accordingly. Add
1121 definition of OTHER_BUILTIN.
1122 (real_compnt_info): Remove unused struct.
1123 (builtin_decl_for_precision, builtin_decl_for_float_kind): New
1125 (build_round_expr): Call builtin_decl_for_precision instead of
1127 (gfc_conv_intrinsic_aint): Call builtin_decl_for_float_kind
1128 instead of a switch.
1129 (gfc_build_intrinsic_lib_fndecls): Match
1130 {real,complex}{4,8,10,16}decl into the C-style built_in_decls.
1131 (gfc_get_intrinsic_lib_fndecl): Do not hardcode floating-point
1133 (gfc_conv_intrinsic_lib_function): Go through all the extended
1135 (gfc_trans_same_strlen_check): Call builtin_decl_for_float_kind
1136 instead of a switch.
1137 (gfc_conv_intrinsic_abs): Likewise.
1138 (gfc_conv_intrinsic_mod): Likewise.
1139 (gfc_conv_intrinsic_sign): Likewise.
1140 (gfc_conv_intrinsic_fraction): Likewise.
1141 (gfc_conv_intrinsic_nearest): Likewise.
1142 (gfc_conv_intrinsic_spacing): Likewise.
1143 (gfc_conv_intrinsic_rrspacing): Likewise.
1144 (gfc_conv_intrinsic_scale): Likewise.
1145 (gfc_conv_intrinsic_set_exponent): Likewise.
1147 2010-06-11 Paul Thomas <pault@gcc.gnu.org>
1151 * trans-expr.c (gfc_conv_derived_to_class): Handle array-valued
1152 functions with CLASS formal arguments.
1154 2010-06-10 Janus Weil <janus@gcc.gnu.org>
1157 * resolve.c (conformable_arrays): Handle allocatable components.
1159 2010-06-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1162 * gfortran.texi: Document that Cray pointers cannot be function
1165 2010-06-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1168 * gfortran.texi: Document lack of support for syntax
1169 "complex FUNCTION name*16()", and existence of alternative
1170 legacy syntax "complex*16 FUNCTION name()".
1172 2010-06-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1175 * intrinsic.texi (FLUSH): Note the difference between FLUSH and
1176 POSIX's fsync(), and how to call the latter from Fortran code.
1178 2010-06-10 Daniel Franke <franke.daniel@gmail.com>
1181 * interface.c (compare_actual_formal): Reject actual arguments with
1182 array subscript passed to ASYNCHRONOUS dummys.
1184 2010-06-10 Daniel Kraft <d@domob.eu>
1187 * gfortran.h (enum gfc_statement): Add ST_ASSOCIATE, ST_END_ASSOCIATE.
1188 (struct gfc_symbol): New field `assoc'.
1189 (struct gfc_association_list): New struct.
1190 (struct gfc_code): New struct `block' in union, move `ns' there
1191 and add association list.
1192 (gfc_free_association_list): New method.
1193 (gfc_has_vector_subscript): Made public;
1194 * match.h (gfc_match_associate): New method.
1195 * parse.h (enum gfc_compile_state): Add COMP_ASSOCIATE.
1196 * decl.c (gfc_match_end): Handle ST_END_ASSOCIATE.
1197 * interface.c (gfc_has_vector_subscript): Made public.
1198 (compare_actual_formal): Rename `has_vector_subscript' accordingly.
1199 * match.c (gfc_match_associate): New method.
1200 (gfc_match_select_type): Change reference to gfc_code's `ns' field.
1201 * primary.c (match_variable): Don't allow names associated to expr here.
1202 * parse.c (decode_statement): Try matching ASSOCIATE statement.
1203 (case_exec_markers, case_end): Add ASSOCIATE statement.
1204 (gfc_ascii_statement): Hande ST_ASSOCIATE and ST_END_ASSOCIATE.
1205 (parse_associate): New method.
1206 (parse_executable): Handle ST_ASSOCIATE.
1207 (parse_block_construct): Change reference to gfc_code's `ns' field.
1208 * resolve.c (resolve_select_type): Ditto.
1209 (resolve_code): Ditto.
1210 (resolve_block_construct): Ditto and add comment.
1211 (resolve_select_type): Set association list in generated BLOCK to NULL.
1212 (resolve_symbol): Resolve associate names.
1213 * st.c (gfc_free_statement): Change reference to gfc_code's `ns' field
1214 and free association list.
1215 (gfc_free_association_list): New method.
1216 * symbol.c (gfc_new_symbol): NULL new field `assoc'.
1217 * trans-stmt.c (gfc_trans_block_construct): Change reference to
1218 gfc_code's `ns' field.
1220 2010-06-10 Kai Tietz <kai.tietz@onevision.com>
1222 * error.c (error_print): Pre-initialize loc by NULL.
1223 * openmp.c (resolve_omp_clauses): Add explicit
1224 braces to avoid ambigous else.
1225 * array.c (match_subscript): Pre-initialize m to MATCH_ERROR.
1227 2010-06-10 Gerald Pfeifer <gerald@pfeifer.com>
1229 * gfc-internals.texi: Move to GFDL 1.3.
1230 * gfortran.texi: Ditto.
1231 * intrinsic.texi: Ditto.
1232 * invoke.texi: Ditto.
1234 2010-06-09 Daniel Franke <franke.daniel@gmail.com>
1237 * check.c (gfc_check_selected_real_kind): Verify that the
1238 actual arguments are scalar.
1240 2010-06-09 Daniel Franke <franke.daniel@gmail.com>
1243 * intrinsic.c (gfc_convert_type_warn): Further improve -Wconversion.
1245 2010-06-09 Janus Weil <janus@gcc.gnu.org>
1248 * dump-parse-tree.c (show_symbol): Avoid infinite loop.
1250 2010-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
1252 * fortran/symbol.c (check_conflict): Remove an invalid conflict check.
1254 2010-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
1256 * fortran/intrinsic.c (add_functions): Change gfc_check_btest,
1257 gfc_check_ibclr, and gfc_check_ibset to gfc_check_bitfcn.
1258 * fortran/intrinsic.h: Remove prototypes for gfc_check_btest,
1259 gfc_check_ibclr, and gfc_check_ibset. Add prototype for
1261 * fortran/check.c (nonnegative_check, less_than_bitsize1,
1262 less_than_bitsize2): New functions.
1263 (gfc_check_btest): Renamed to gfc_check_bitfcn. Use
1264 nonnegative_check and less_than_bitsize1.
1265 (gfc_check_ibclr, gfc_check_ibset): Removed.
1266 (gfc_check_ibits,gfc_check_mvbits): Use nonnegative_check and
1269 2010-06-09 Janus Weil <janus@gcc.gnu.org>
1272 * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
1275 2010-06-09 Kai Tietz <kai.tietz@onevision.com>
1277 * resolve.c (resolve_deallocate_expr): Avoid warning
1278 about possible use of iunitialized sym.
1279 (resolve_allocate_expr): Pre-initialize sym by NULL.
1281 2010-06-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1284 * f95-lang.c (gfc_init_builtin_functions): Remove comment.
1286 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
1288 * trans-types.c (gfc_get_nodesc_array_type): Use typed GC
1290 (gfc_get_array_type_bounds): Likewise.
1292 * trans-decl.c (gfc_allocate_lang_decl): Likewise.
1293 (gfc_find_module): Likewise.
1295 * f95-lang.c (pushlevel): Likewise.
1297 * trans.h (struct lang_type): Add variable_size GTY option.
1298 (struct lang_decl): Likewise.
1300 2010-06-08 Tobias Burnus <burnus@net-b.de>
1303 * symbol.c (check_conflict): Move protected--external/procedure check ...
1304 * resolve.c (resolve_select_type): ... to the resolution stage.
1306 2010-06-07 Tobias Burnus <burnus@net-b.de>
1308 * options.c (gfc_handle_option): Fix -fno-recursive.
1310 2010-06-07 Tobias Burnus <burnus@net-b.de>
1312 * gfc-internals.texi (copyrights-gfortran): Fix copyright year format.
1313 * gfortran.texi (copyrights-gfortran): Ditto.
1315 2010-06-07 Joseph Myers <joseph@codesourcery.com>
1317 * lang.opt (fshort-enums): Define using Var and VarExists.
1318 * options.c (gfc_handle_option): Don't set flag_short_enums here.
1320 2010-06-05 Paul Thomas <pault@gcc.gnu.org>
1321 Janus Weil <janus@gcc.gnu.org>
1324 * resolve.c (get_declared_from_expr): Move to before
1325 resolve_typebound_generic_call. Make new_ref and class_ref
1326 ignorable if set to NULL.
1327 (resolve_typebound_generic_call): Once we have resolved the
1328 generic call, check that the specific instance is that which
1329 is bound to the declared type.
1330 (resolve_typebound_function,resolve_typebound_subroutine): Avoid
1331 freeing 'class_ref->next' twice.
1333 2010-06-05 Paul Thomas <pault@gcc.gnu.org>
1336 * trans-array.c (structure_alloc_comps): Dereference scalar
1337 'decl' if it is a REFERENCE_TYPE. Tidy expressions containing
1340 2010-06-04 Joseph Myers <joseph@codesourcery.com>
1342 * gfortranspec.c (append_arg, lang_specific_driver): Use
1343 GCC-specific formats in diagnostics.
1345 2010-06-02 Tobias Burnus <burnus@net-b.de>
1348 * parse.c (gfc_fixup_sibling_symbols): Do not "fix" use-associated
1351 2010-06-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1354 * match.c (gfc_match_stopcode): Move gfc_match_eos call inside
1357 2010-05-31 Steven G. Kargl <kargl@gcc.gnu.org>
1359 * fortran/gfortran.texi: Fix typos in description of variable-format-
1362 2010-05-31 Thomas Koenig <tkoenig@gcc.gnu.org>
1365 * dependency.c (gfc_check_section_vs_section): Check
1366 for interleaving array assignments without conflicts.
1368 2010-05-30 Janus Weil <janus@gcc.gnu.org>
1370 * gcc/fortran/gfortran.h (CLASS_DATA): New macro for accessing the
1371 $data component of a class container.
1372 * gcc/fortran/decl.c (attr_decl1): Use macro CLASS_DATA.
1373 * gcc/fortran/expr.c (gfc_check_pointer_assign,gfc_check_assign_symbol,
1374 gfc_has_ultimate_allocatable,gfc_has_ultimate_pointer): Ditto.
1375 * gcc/fortran/interface.c (matching_typebound_op): Ditto.
1376 * gcc/fortran/match.c (gfc_match_allocate, gfc_match_deallocate): Ditto.
1377 * gcc/fortran/parse.c (parse_derived): Ditto.
1378 * gcc/fortran/primary.c (gfc_match_varspec, gfc_variable_attr,
1379 gfc_expr_attr): Ditto.
1380 * gcc/fortran/resolve.c (resolve_structure_cons, find_array_spec,
1381 resolve_deallocate_expr, resolve_allocate_expr, resolve_select_type,
1382 resolve_fl_var_and_proc, resolve_typebound_procedure,
1383 resolve_fl_derived): Ditto.
1384 * gcc/fortran/symbol.c (gfc_type_compatible): Restructured.
1385 * gcc/fortran/trans-array.c (structure_alloc_comps): Use macro
1387 * gcc/fortran/trans-decl.c (gfc_get_symbol_decl,
1388 gfc_trans_deferred_vars): Ditto.
1389 * gcc/fortran/trans-stmt.c (gfc_trans_allocate): Ditto.
1391 2010-05-28 Tobias Burnus <burnus@net-b.de>
1393 * options.c (gfc_handle_option): Fix handling of -fno-whole-file.
1395 2010-05-28 Joseph Myers <joseph@codesourcery.com>
1397 * gfortranspec.c (append_arg, lang_specific_driver): Use
1398 fatal_error instead of fatal. Use warning instead of fprintf for
1401 2010-05-28 Joseph Myers <joseph@codesourcery.com>
1403 * cpp.c (gfc_cpp_init_0): Use xstrerror instead of strerror.
1404 * module.c (write_char, gfc_dump_module, gfc_use_module): Use
1405 xstrerror instead of strerror.
1407 2010-05-26 Joseph Myers <joseph@codesourcery.com>
1409 * cpp.c (cb_cpp_error): Save and restore
1410 global_dc->warn_system_headers, not variable warn_system_headers.
1412 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
1414 * fortran/f95-lang.c: Do not include libfuncs.h, expr.h, and except.h.
1416 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
1418 * trans-common.c: Do not include rtl.h, include output.h instead.
1419 * trans-decl.c: Likewise.
1421 2010-05-26 Paul Thomas <pault@gcc.gnu.org>
1424 * resolve.c (resolve_global_procedure): Resolve the gsymbol's
1425 namespace before trying to reorder the gsymbols.
1427 2010-05-25 Daniel Franke <franke.daniel@gmail.com>
1432 * resolve.c (resolve_global_procedure): Add check for global
1433 procedures with implicit interfaces and assumed-shape or optional
1434 dummy arguments. Verify that function return type, kind and string
1437 2010-05-21 Tobias Burnus <burnus@net-b.de>
1439 * gfortran.h: Do not include system.h.
1440 * bbt.c: Include system.h.
1442 * dependency.c: Ditto.
1443 * dump-parse-tree.c: Ditto.
1444 * arith.h: Do not include gfortran.h.
1445 * constructor.h: Do not include gfortran.h and splay-tree.h.
1446 * match.h: Do not include gfortran.h.
1448 * target-memory.h: Ditto.
1449 * openmp.c: Do not include toplev.h and target.h.
1450 * trans-stmt.c: Ditto not include toplev.h.
1452 * trans-common.c: Tell why toplev.h is needed. And
1453 do not include target.h.
1454 * trans-expr.c: Tell why toplev.h is needed.
1455 * trans-array.c: Ditto.
1456 * trans-openmp.c: Ditto.
1457 * trans-const.c: Ditto.
1459 * trans-types.c: Ditto.
1460 * trans-io.c: Ditto.
1461 * trans-decl.c: Ditto.
1464 * trans-intrinsic.c: Ditto.
1467 2010-05-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1470 * match.c (gfc_match_stopcode): Use gfc_match_init_expr. Go to cleanup
1471 before returning MATCH_ERROR. Add check for scalar. Add check for
1472 default integer kind.
1474 2010-05-22 Janus Weil <janus@gcc.gnu.org>
1477 * match.c (gfc_match_select_type): On error jump back out of the local
1479 * parse.c (parse_derived): Defer creation of vtab symbols to resolution
1480 stage, more precisely to ...
1481 * resolve.c (resolve_fl_derived): ... this place.
1483 2010-05-22 Janus Weil <janus@gcc.gnu.org>
1486 * resolve.c (ensure_not_abstract): Allow abstract types with
1487 non-abstract ancestors.
1489 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
1491 * trans-const.c: Include realmpfr.h.
1492 * Make-lang.in: Update dependencies.
1494 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
1496 * trans-const.c, trans-types.c, trans-intrinsic.c:
1497 Clean up redundant includes.
1499 2010-05-20 Daniel Franke <franke.daniel@gmail.com>
1502 * lang.opt (Wunused-dummy-argument): New option.
1503 * gfortran.h (gfc_option_t): Add warn_unused_dummy_argument.
1504 * options.c (gfc_init_options): Disable warn_unused_dummy_argument.
1505 (set_Wall): Enable warn_unused_dummy_argument.
1506 (gfc_handle_option): Set warn_unused_dummy_argument according to
1508 * trans-decl.c (generate_local_decl): Separate warnings about
1509 unused variables and unused dummy arguments.
1510 * invoke.texi: Documented new option.
1512 2010-05-20 Steven Bosscher <steven@gcc.gnu.org>
1514 * trans-expr.c: Do not include convert.h, ggc.h, real.h, and gimple.h.
1515 (gfc_conv_string_tmp): Do not assert type comparibilty.
1516 * trans-array.c: Do not include gimple.h, ggc.h, and real.h.
1517 (gfc_conv_expr_descriptor): Remove assert.
1518 * trans-common.c: Clarify why rtl.h and tm.h are included.
1519 * trans-openmp.c: Do not include ggc.h and real.h.
1520 Explain why gimple.h is included.
1521 * trans-const.c: Do not include ggc.h.
1522 * trans-stmt.c: Do not include gimple.h, ggc.h, and real.h.
1523 * trans.c: Do not include ggc.h and real.h.
1524 Explain why gimple.h is included.
1525 * trans-types.c: Do not include tm.h. Explain why langhooks.h
1526 and dwarf2out.h are included.
1527 * trans-io.c: Do not include gimple.h and real.h.
1528 * trans-decl.c: Explain why gimple.h, tm.h, and rtl.h are included.
1529 * trans-intrinsic.c: Do not include gimple.h. Explain why tm.h
1532 2010-05-20 Tobias Burnus <burnus@net-b.de>
1534 * options.c (gfc_init_options,gfc_post_options): Enable
1535 flag_associative_math by default.
1537 2010-05-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1540 * trans-stmt.c (gfc_trans_stop): Add generation of call to
1541 gfortran_error_stop_numeric. Fix up some whitespace. Use stop_string for
1542 blank STOP, handling a null expression. (gfc_trans_pause): Use
1543 pause_string for blank PAUSE.
1544 * trans.h: Add external function declaration for error_stop_numeric.
1545 * trans-decl.c (gfc_build_builtin_function_decls): Add the building of
1546 the declaration for the library call. Adjust whitespaces.
1547 * match.c (gfc_match_stopcode): Remove use of the actual stop code to
1548 signal no stop code. Match the expression following the stop and pass
1549 that to the translators. Remove the old use of digit matching. Add
1550 checks that the stop_code expression is INTEGER or CHARACTER, constant,
1551 and if CHARACTER, default character KIND.
1553 2010-05-19 Daniel Franke <franke.daniel@gmail.com>
1556 * lang.opt (Wconversion-extra): New option.
1557 * gfortran.h (gfc_option_t): Add warn_conversion_extra.
1558 * options.c (gfc_init_options): Disable -Wconversion-extra by default.
1559 (set_Wall): Enable -Wconversion.
1560 (gfc_handle_option): Set warn_conversion_extra.
1561 * intrinsic.c (gfc_convert_type_warn): Ignore kind conditions
1562 introduced for -Wconversion if -Wconversion-extra is present.
1563 * invoke.texi: Add -Wconversion to -Wall; document new behaviour of
1564 -Wconversion; document -Wconversion-extra.
1566 2010-05-19 Daniel Franke <franke.daniel@gmail.com>
1569 * gfortran.h (gfc_has_default_initializer): New.
1570 * expr.c (gfc_has_default_initializer): New.
1571 * resolve.c (has_default_initializer): Removed, use
1572 gfc_has_default_initializer() instead. Updated all callers.
1573 * trans-array.c (has_default_initializer): Removed, use
1574 gfc_has_default_initializer() instead. Updated all callers.
1575 * trans-decl.c (generate_local_decl): Do not check the
1576 first component only to check for initializers, but use
1577 gfc_has_default_initializer() instead.
1579 2010-05-19 Daniel Franke <franke.daniel@gmail.com>
1582 * primary.c (match_string_constant): Move start_locus just inside
1584 * data.c (create_character_intializer): Clarified truncation warning.
1586 2010-05-19 Daniel Franke <franke.daniel@gmail.com>
1589 * intrinsic.h (gfc_check_float): New prototype.
1590 (gfc_check_sngl): New prototype.
1591 * check.c (gfc_check_float): New.
1592 (gfc_check_sngl): New.
1593 * intrinsic.c (add_functions): Moved DFLOAT from aliasing DBLE
1594 to be a specific for REAL. Added check routines for FLOAT, DFLOAT
1596 * intrinsic.texi: Removed individual nodes of FLOAT, DFLOAT and SNGL,
1597 added them to the list of specifics of REAL instead.
1599 2010-05-17 Janus Weil <janus@gcc.gnu.org>
1602 * trans-expr.c (gfc_conv_structure): Remove unneeded and buggy code.
1603 This is now handled via 'gfc_class_null_initializer'.
1605 2010-05-17 Janus Weil <janus@gcc.gnu.org>
1607 * class.c (gfc_add_component_ref,gfc_class_null_initializer,
1608 gfc_build_class_symbol,add_proc_component,add_proc_comps,
1609 add_procs_to_declared_vtab1,copy_vtab_proc_comps,
1610 add_procs_to_declared_vtab,add_generic_specifics,
1611 add_generics_to_declared_vtab,gfc_find_derived_vtab,
1612 find_typebound_proc_uop,gfc_find_typebound_proc,
1613 gfc_find_typebound_user_op,gfc_find_typebound_intrinsic_op,
1614 gfc_get_tbp_symtree): Moved here from other places.
1615 * expr.c (gfc_add_component_ref,gfc_class_null_initializer): Move to
1617 * gfortran.h (gfc_build_class_symbol,gfc_find_derived_vtab,
1618 gfc_find_typebound_proc,gfc_find_typebound_user_op,
1619 gfc_find_typebound_intrinsic_op,gfc_get_tbp_symtree,
1620 gfc_add_component_ref, gfc_class_null_initializer): Moved to class.c.
1621 * Make-lang.in: Add class.o.
1622 * symbol.c (gfc_build_class_symbol,add_proc_component,add_proc_comps,
1623 add_procs_to_declared_vtab1,copy_vtab_proc_comps,
1624 add_procs_to_declared_vtab,add_generic_specifics,
1625 add_generics_to_declared_vtab,gfc_find_derived_vtab,
1626 find_typebound_proc_uop,gfc_find_typebound_proc,
1627 gfc_find_typebound_user_op,gfc_find_typebound_intrinsic_op,
1628 gfc_get_tbp_symtree): Move to class.c.
1630 2010-05-17 Nathan Froyd <froydnj@codesourcery.com>
1632 * trans-types.c (gfc_init_types): Use build_function_type_list.
1633 (gfc_get_ppc_type): Likewise.
1634 * trans-decl.c (gfc_generate_constructors): Likewise.
1635 * f95-lang.c (build_builtin_fntypes): Likewise.
1636 (gfc_init_builtin_functions): Likewise.
1637 (DEF_FUNCTION_TYPE_0): Likewise.
1638 (DEF_FUNCTION_TYPE_1): Likewise.
1639 (DEF_FUNCTION_TYPE_2): Likewise.
1640 (DEF_FUNCTION_TYPE_3): Likewise.
1641 (DEF_FUNCTION_TYPE_4): Likewise.
1642 (DEF_FUNCTION_TYPE_5): Likewise.
1643 (DEF_FUNCTION_TYPE_6): Likewise.
1644 (DEF_FUNCTION_TYPE_7): Likewise. Use ARG7.
1645 (DEF_FUNCTION_TYPE_VAR_0): Use build_varags_function_type_list.
1647 2010-05-17 Nathan Froyd <froydnj@codesourcery.com>
1649 * trans-array.c (gfc_trans_array_constructor_value): Use
1650 build_constructor instead of build_constructor_from_list.
1651 (gfc_build_constant_array_constructor): Likewise.
1652 * trans-decl.c (create_main_function): Likewise.
1653 * trans-stmt.c (gfc_trans_character_select): Likewise.
1655 2010-05-17 Janus Weil <janus@gcc.gnu.org>
1658 * resolve.c (resolve_fl_var_and_proc): Move error messages here from ...
1659 (resolve_fl_variable_derived): ... this place.
1660 (resolve_symbol): Make sure function symbols (and their result
1661 variables) are not resolved twice.
1663 2010-05-16 Daniel Franke <franke.daniel@gmail.com>
1666 * array.c (match_array_list): Revert change from 2010-05-13.
1668 2010-05-16 Richard Guenther <rguenther@suse.de>
1670 * trans-decl.c (module_htab_decls_hash): Revert last change.
1672 2010-05-16 Richard Guenther <rguenther@suse.de>
1674 * trans-decl.c (module_htab_decls_hash): Use IDENTIFIER_HASH_VALUE.
1676 2010-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
1678 * options.c (set_Wall): Remove special logic for Wuninitialized
1681 2010-05-15 Janus Weil <janus@gcc.gnu.org>
1685 * trans-decl.c (gfc_trans_deferred_vars): Modify ordering of
1688 2010-05-15 Janus Weil <janus@gcc.gnu.org>
1692 * gfortran.h (gfc_class_null_initializer): New prototype.
1693 * expr.c (gfc_class_null_initializer): New function to build a NULL
1694 initializer for CLASS pointers.
1695 * symbol.c (gfc_build_class_symbol): Modify internal naming of class
1696 containers. Remove default NULL initialization of $data component.
1697 * trans.c (gfc_allocate_array_with_status): Fix wording of an error
1699 * trans-expr.c (gfc_conv_initializer,gfc_trans_subcomponent_assign):
1700 Use new function 'gfc_class_null_initializer'.
1701 * trans-intrinsic.c (gfc_conv_allocated): Handle allocatable scalar
1704 2010-05-14 Steven G. Kargl <kargl@gcc.gnu.org>
1707 * fortran/interface.c (get_sym_storage_size): Use signed instead of
1708 unsigned mpz_get_?i routines.
1710 2010-05-14 Jakub Jelinek <jakub@redhat.com>
1712 * trans.c (trans_code): Set backend locus early.
1713 * trans-decl.c (gfc_get_fake_result_decl): Use source location
1714 of the function instead of current input_location.
1716 2010-05-13 Daniel Franke <franke.daniel@gmail.com>
1719 * intrinsic.c (gfc_init_expr): Renamed to gfc_init_expr_flag.
1721 * expr.c (init_flag): Removed; use gfc_init_expr_flag everywhere.
1722 * array.c (match_array_list): Pass on gfc_init_expr_flag when matching
1725 2010-05-13 Jakub Jelinek <jakub@redhat.com>
1728 * openmp.c (resolve_omp_clauses): Allow procedure pointers in clause
1730 * trans-openmp.c (gfc_omp_privatize_by_reference): Don't privatize
1731 by reference dummy procedures or non-dummy procedure pointers.
1732 (gfc_omp_predetermined_sharing): Return
1733 OMP_CLAUSE_DEFAULT_FIRSTPRIVATE for dummy procedures.
1735 2010-05-11 Daniel Franke <franke.daniel@gmail.com>
1738 * openmp.c (gfc_match_omp_taskwait): Report unexpected characters
1739 after OMP statement.
1740 (gfc_match_omp_critical): Likewise.
1741 (gfc_match_omp_flush): Likewise.
1742 (gfc_match_omp_workshare): Likewise.
1743 (gfc_match_omp_master): Likewise.
1744 (gfc_match_omp_ordered): Likewise.
1745 (gfc_match_omp_atomic): Likewise.
1746 (gfc_match_omp_barrier): Likewise.
1747 (gfc_match_omp_end_nowait): Likewise.
1749 2010-05-11 Daniel Franke <franke.daniel@gmail.com>
1752 * resolve.c (validate_case_label_expr): Removed FIXME.
1753 (resolve_select): Raise default warning on case labels out of range
1754 of the case expression.
1756 2010-05-10 Daniel Franke <franke.daniel@gmail.com>
1761 * intrinsic.c (gfc_convert_type_warn): Be more discriminative
1762 about conversion warnings.
1764 2010-05-10 Janus Weil <janus@gcc.gnu.org>
1767 * match.c (gfc_match_select_type): Move error message to
1768 resolve_select_type.
1769 * resolve.c (resolve_select_type): Error message moved here from
1770 gfc_match_select_type. Correctly set type of temporary.
1772 2010-05-10 Richard Guenther <rguenther@suse.de>
1774 * trans-decl.c (gfc_build_library_function_decl): Split out
1776 (build_library_function_decl_1): ... this new function.
1777 Set a fnspec attribute if a specification was provided.
1778 (gfc_build_library_function_decl_with_spec): New function.
1779 (gfc_build_intrinsic_function_decls): Annotate internal_pack
1780 and internal_unpack.
1782 2010-05-07 Daniel Franke <franke.daniel@gmail.com>
1785 * intrinc.c (gfc_is_intrinsic): Do not prematurely mark symbol
1788 2010-05-07 Jason Merrill <jason@redhat.com>
1790 * trans-expr.c (gfc_conv_procedure_call): Rename nullptr to null_ptr
1791 to avoid -Wc++-compat warning.
1793 2010-05-06 Manuel López-Ibáñez <manu@gcc.gnu.org>
1796 * options.c (gfc_handle_option): Add argument kind.
1797 * gfortran.h (gfc_handle_option): Update declaration.
1799 2010-05-06 Tobias Burnus <burnus@net-b.de>
1802 * trans-types.c (gfc_sym_type): Mark Cray pointees as
1805 2010-05-05 Daniel Franke <franke.daniel@gmail.com>
1808 * resolve.c (traverse_data_list): Rephrase error message for
1809 non-constant bounds in data-implied-do.
1811 2010-05-05 Daniel Franke <franke.daniel@gmail.com>
1814 * gfortran.h: Removed repeat count from constructor, removed
1816 * data.h (gfc_assign_data_value_range): Changed return value from
1818 * data.c (gfc_assign_data_value): Add location to constructor element.
1819 (gfc_assign_data_value_range): Call gfc_assign_data_value()
1820 for each element in range. Return early if an error was generated.
1821 * resolve.c (check_data_variable): Stop early if range assignment
1824 2010-05-05 Janus Weil <janus@gcc.gnu.org>
1827 * resolve.c (resolve_fl_derived): Some fixes for class variables.
1828 * symbol.c (gfc_build_class_symbol): Add separate class container for
1831 2010-05-03 Steven G. Kargl <kargl@gcc.gnu.org>
1834 * fortran/parse.c (parse_interface): Do not dereference a NULL pointer.
1836 2010-05-02 Tobias Burnus <burnus@net-b.de>
1839 * intrinsic.c (add_functions): Fix GFC_STD and add gfc_resolve_ calls
1840 for lcobound, ucobound, image_index and this_image.
1841 * intrinsic.h (gfc_resolve_lcobound, gfc_resolve_this_image,
1842 gfc_resolve_image_index, gfc_resolve_ucobound): New prototypes.
1843 * iresolve.c (gfc_resolve_lcobound, gfc_resolve_this_image,
1844 gfc_resolve_image_index, gfc_resolve_ucobound, resolve_bound): New
1846 (gfc_resolve_lbound, gfc_resolve_ubound): Use resolve_bound.
1848 2010-04-30 Tobias Burnus <burnus@net-b.de>
1852 * trans-types.c (gfc_get_array_descriptor_base): Fix index
1853 calculation for array descriptor types.
1855 2010-04-29 Janus Weil <janus@gcc.gnu.org>
1858 * symbol.c (add_proc_component,copy_vtab_proc_comps): Remove
1859 initializers for PPC members of the vtabs.
1861 2010-04-29 Janus Weil <janus@gcc.gnu.org>
1864 * symbol.c (add_proc_component,add_proc_comps): Correctly set the 'ppc'
1865 attribute for all PPC members of the vtypes.
1866 (copy_vtab_proc_comps): Copy the correct interface.
1867 * trans.h (gfc_trans_assign_vtab_procs): Modified prototype.
1868 * trans-expr.c (gfc_trans_assign_vtab_procs): Pass the derived type as
1869 a dummy argument and make sure all PPC members of the vtab are
1870 initialized correctly.
1871 (gfc_conv_derived_to_class,gfc_trans_class_assign): Additional argument
1872 in call to gfc_trans_assign_vtab_procs.
1873 * trans-stmt.c (gfc_trans_allocate): Ditto.
1875 2010-04-29 Paul Thomas <pault@gcc.gnu.org>
1878 * resolve.c (resolve_typebound_function): Renamed
1879 resolve_class_compcall.Do all the detection of class references
1881 (resolve_typebound_subroutine): resolve_class_typebound_call
1882 renamed. Otherwise same as resolve_typebound_function.
1883 (gfc_resolve_expr): Call resolve_typebound_function.
1884 (resolve_code): Call resolve_typebound_subroutine.
1886 2010-04-29 Janus Weil <janus@gcc.gnu.org>
1889 * resolve.c (resolve_typebound_generic_call): For CLASS methods
1890 pass back the specific symtree name, rather than the target
1893 2010-04-29 Paul Thomas <pault@gcc.gnu.org>
1896 * resolve.c (resolve_structure_cons): Make the initializer of
1897 the vtab component 'extends' the same type as the component.
1899 2010-04-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1902 * interface.c (check_interface1): Pass symbol name rather than NULL to
1903 gfc_compare_interfaces.(gfc_compare_interfaces): Add assert to
1904 trap MULL. (gfc_compare_derived_types): Revert previous change
1905 incorporated incorrectly during merge from trunk, r155778.
1906 * resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather
1907 than NULL to gfc_compare_interfaces.
1908 * symbol.c (add_generic_specifics): Likewise.
1910 2010-02-29 Janus Weil <janus@gcc.gnu.org>
1913 * interface.c (gfc_compare_derived_types): Add condition for vtype.
1914 * symbol.c (gfc_find_derived_vtab): Sey access to private.
1915 (gfc_find_derived_vtab): Likewise.
1916 * module.c (ab_attribute): Add enumerator AB_VTAB.
1917 (mio_symbol_attribute): Use new attribute, AB_VTAB.
1918 (check_for_ambiguous): Likewise.
1920 2010-04-29 Paul Thomas <pault@gcc.gnu.org>
1921 Janus Weil <janus@gcc.gnu.org>
1924 * trans-expr.c (select_class_proc): Remove function.
1925 (conv_function_val): Delete reference to previous.
1926 (gfc_conv_derived_to_class): Add second argument to the call to
1927 gfc_find_derived_vtab.
1928 (gfc_conv_structure): Exclude proc_pointer components when
1929 accessing $data field of class objects.
1930 (gfc_trans_assign_vtab_procs): New function.
1931 (gfc_trans_class_assign): Add second argument to the call to
1932 gfc_find_derived_vtab.
1933 * symbol.c (gfc_build_class_symbol): Add delayed_vtab arg and
1934 implement holding off searching for the vptr derived type.
1935 (add_proc_component): New function.
1936 (add_proc_comps): New function.
1937 (add_procs_to_declared_vtab1): New function.
1938 (copy_vtab_proc_comps): New function.
1939 (add_procs_to_declared_vtab): New function.
1940 (void add_generic_specifics): New function.
1941 (add_generics_to_declared_vtab): New function.
1942 (gfc_find_derived_vtab): Add second argument to the call to
1943 gfc_find_derived_vtab. Add the calls to
1944 add_procs_to_declared_vtab and add_generics_to_declared_vtab.
1945 * decl.c (build_sym, build_struct): Use new arg in calls to
1946 gfc_build_class_symbol.
1947 * gfortran.h : Add vtype bitfield to symbol_attr. Remove the
1948 definition of struct gfc_class_esym_list. Modify prototypes
1949 of gfc_build_class_symbol and gfc_find_derived_vtab.
1950 * trans-stmt.c (gfc_trans_allocate): Add second argument to the
1951 call to gfc_find_derived_vtab.
1952 * module.c : Add the vtype attribute.
1953 * trans.h : Add prototype for gfc_trans_assign_vtab_procs.
1954 * resolve.c (resolve_typebound_generic_call): Add second arg
1955 to pass along the generic name for class methods.
1956 (resolve_typebound_call): The same.
1957 (resolve_compcall): Use the second arg to carry the generic
1958 name from the above. Remove the reference to class_esym.
1959 (check_members, check_class_members, resolve_class_esym,
1960 hash_value_expr): Remove functions.
1961 (resolve_class_compcall, resolve_class_typebound_call): Modify
1962 to use vtable rather than member by member calls.
1963 (gfc_resolve_expr): Modify second arg in call to
1965 (resolve_select_type): Add second arg in call to
1966 gfc_find_derived_vtab.
1967 (resolve_code): Add second arg in call resolve_typebound_call.
1968 (resolve_fl_derived): Exclude vtypes from check for late
1969 procedure definitions. Likewise for checking of explicit
1970 interface and checking of pass arg.
1971 * iresolve.c (gfc_resolve_extends_type_of): Add second arg in
1972 calls to gfc_find_derived_vtab.
1973 * match.c (select_type_set_tmp): Use new arg in call to
1974 gfc_build_class_symbol.
1975 * trans-decl.c (gfc_get_symbol_decl): Complete vtable if
1977 * parse.c (endType): Finish incomplete classes.
1979 2010-04-28 Tobias Burnus <burnus@net-b.de>
1983 * simplify.c (simplify_cobound): Handle scalar coarrays.
1985 2010-04-27 Tobias Burnus <burnus@net-b.de>
1987 * gfc-internals.texi: Update copyright year.
1988 * gfortran.texi: Ditto.
1989 * invoke.texi: Ditto.
1991 2010-04-27 Tobias Burnus <burnus@net-b.de>
1994 * resolve.c (resolve_allocate_expr): Allow array coarrays.
1995 * trans-types.h (gfc_get_array_type_bounds): Update prototype.
1996 * trans-types.c (gfc_get_array_type_bounds,
1997 gfc_get_array_descriptor_base): Add corank argument.
1998 * trans-array.c (gfc_array_init_size): Handle corank.
1999 (gfc_trans_create_temp_array, gfc_array_allocate,
2000 gfc_conv_expr_descriptor): Add corank argument to call.
2001 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Ditto.
2003 2010-04-24 Steven G. Kargl <kargl@gcc.gnu.org>
2007 * trans-array.c (gfc_trans_array_bound_check): Use TREE_CODE instead
2008 of mucking with a tree directly.
2010 2010-04-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2013 * io.c (gfc_match_open): Remove branch to syntax error. Add call to
2014 gfc_error with new error message.
2016 2010-04-24 Paul Thomas <pault@gcc.gnu.org>
2020 * trans-expr.c (gfc_conv_expr): Supply an address expression for
2022 (gfc_conv_expr_reference): Call gfc_conv_expr and return for
2024 * trans-array.c (gfc_add_loop_ss_code): Store the value rather
2025 than the address of a GFC_SS_REFERENCE.
2026 * trans.h : Change comment on GFC_SS_REFERENCE.
2028 2010-04-22 Richard Guenther <rguenther@suse.de>
2031 * resolve.c (gfc_resolve_index): Wrap around ...
2032 (gfc_resolve_index_1): ... this. Add parameter to allow
2033 any integer kind index type.
2034 (resolve_array_ref): Allow any integer kind for the start
2035 index of an array ref.
2037 2010-04-21 Jakub Jelinek <jakub@redhat.com>
2040 * f95-lang.c (gfc_define_builtin): Set TREE_NOTHROW on
2043 2010-04-20 Harald Anlauf <anlauf@gmx.de>
2045 * intrinsic.c (sort_actual): Remove 'is' in error message.
2047 2010-04-20 Paul Thomas <pault@gcc.gnu.org>
2050 * resolve.c (resolve_fl_derived): If a component character
2051 length has not been resolved, do so now.
2052 (resolve_symbol): The same as above for a symbol character
2054 * trans-decl.c (gfc_create_module_variable): A 'length' decl is
2055 not needed for a character valued, procedure pointer.
2058 * resolve.c (ensure_not_abstract_walker): If 'overriding' is
2059 not found, return FAILURE rather than ICEing.
2061 2010-04-19 Jakub Jelinek <jakub@redhat.com>
2064 * openmp.c (gfc_resolve_do_iterator): Only make iteration vars for
2065 sequential loops private in the innermost containing task region.
2067 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
2069 * f95-lang.c (gfc_init_decl_processing): Remove second argument in call
2070 to build_common_tree_nodes.
2072 2010-04-17 Steven G. Kargl <kargl@gcc.gnu.org>
2075 * fortran/trans-array.c (gfc_conv_ss_startstride): Remove the use of
2076 gfc_msg_bounds by using 'Array bound mismatch' directly.
2077 (gfc_trans_dummy_array_bias): Remove the use of gfc_msg_bounds. Reword
2078 error message to include the mismatch in the extent of array bound.
2079 * fortran/trans.c: Remove gfc_msg_bounds. It is only used in one place.
2080 * fortran/trans.h: Remove extern definition of gfc_msg_bounds.
2082 2010-04-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2084 * gfortran.texi: Update information on temporary file locations.
2086 2010-04-16 Jakub Jelinek <jakub@redhat.com>
2088 * trans-decl.c (gfc_build_qualified_array): Ensure
2089 ubound.N and lbound.N artificial variable names don't appear
2092 2010-04-15 Steven G. Kargl <kargl@gcc.gnu.org>
2095 * trans-array.c (gfc_trans_array_bound_check): Eliminate a redundant
2096 block of code. Set name to the variable associated with the descriptor.
2098 2010-04-15 Jakub Jelinek <jakub@redhat.com>
2100 * trans-decl.c (gfc_build_qualified_array): Clear DECL_IGNORED_P
2101 on VAR_DECL LBOUND and/or UBOUND, even for -O1.
2103 2010-04-14 Steven G. Kargl <kargl@gcc.gnu.org>
2105 * intrinsic.texi: Add the missing specific name of intrinsic
2106 procedure where the specific name is identical to the generic name.
2107 Fix inconsistent or mismatch in the argument names in intrinsic
2108 procedure descriptions. Add the SCALAR allocatable description to
2111 2010-04-14 Tobias Burnus <burnus@net-b.de>
2114 * array.c (gfc_find_array_ref): Handle codimensions.
2115 (gfc_match_array_spec,gfc_match_array_ref): Use gfc_fatal_error.
2116 * check.c (is_coarray, dim_corank_check, gfc_check_lcobound,
2117 gfc_check_image_index, gfc_check_this_image, gfc_check_ucobound):
2119 * gfortran.h (gfc_isym_id): Add GFC_ISYM_IMAGE_INDEX,
2120 GFC_ISYM_LCOBOUND, GFC_ISYM_THIS_IMAGE,
2122 * intrinsic.h (add_functions): Add this_image, image_index,
2123 lcobound and ucobound intrinsics.
2124 * intrinsic.c (gfc_check_lcobound,gfc_check_ucobound,
2125 gfc_check_image_index, gfc_check_this_image,
2126 gfc_simplify_image_index, gfc_simplify_lcobound,
2127 gfc_simplify_this_image, gfc_simplify_ucobound):
2128 New function prototypes.
2129 * intrinsic.texi (IMAGE_INDEX, LCOBOUND, THIS_IMAGE
2130 IMAGE_INDEX): Document new intrinsic functions.
2131 * match.c (gfc_match_critical, sync_statement): Make -fcoarray=none
2133 * simplify.c (simplify_bound_dim): Handle coarrays.
2134 (simplify_bound): Update simplify_bound_dim call.
2135 (gfc_simplify_num_images): Add -fcoarray=none check.
2136 (simplify_cobound, gfc_simplify_lcobound, gfc_simplify_ucobound,
2137 gfc_simplify_ucobound, gfc_simplify_ucobound): New functions.
2139 2010-04-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2142 * constructor.c: Fix typo in comment.
2143 * expr.c (find_array_section): Add check for max array limit.
2145 2010-04-13 Iain Sandoe <iains@gcc.gnu.org>
2148 * gfortranspec.c (lookup_option): Check for -static and return
2150 (lang_specific_driver): Break when OPTION_static is discovered.
2152 2010-04-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2154 * array.c (extract_element): Restore function from trunk.
2155 (gfc_get_array_element): Restore function from trunk.
2156 (gfc_expand_constructor): Restore check against
2157 flag_max_array_constructor.
2158 * constructor.c (node_copy_and_append): Delete unused.
2159 * gfortran.h: Delete comment and extra include.
2160 * constructor.h: Bump copyright and clean up TODO comments.
2161 * resolve.c: Whitespace.
2163 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
2165 * simplify.c (compute_dot_product): Replaced usage of ADVANCE macro
2166 with direct access access to elements. Adjusted prototype, fixed all
2168 (gfc_simplify_dot_product): Removed duplicate check for zero-sized
2170 (gfc_simplify_matmul): Removed usage of ADVANCE macro.
2171 (gfc_simplify_spread): Removed workaround, directly insert elements
2172 at a given array position.
2173 (gfc_simplify_transpose): Likewise.
2174 (gfc_simplify_pack): Replaced usage of ADVANCE macro with corresponding
2176 (gfc_simplify_unpack): Likewise.
2178 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
2180 * simplify.c (only_convert_cmplx_boz): Renamed to ...
2181 (convert_boz): ... this and moved to start of file.
2182 (gfc_simplify_abs): Whitespace fix.
2183 (gfc_simplify_acos): Whitespace fix.
2184 (gfc_simplify_acosh): Whitespace fix.
2185 (gfc_simplify_aint): Whitespace fix.
2186 (gfc_simplify_dint): Whitespace fix.
2187 (gfc_simplify_anint): Whitespace fix.
2188 (gfc_simplify_and): Replaced if-gate by more common switch-over-type.
2189 (gfc_simplify_dnint): Whitespace fix.
2190 (gfc_simplify_asin): Whitespace fix.
2191 (gfc_simplify_asinh): Moved creation of result-expr out of switch.
2192 (gfc_simplify_atan): Likewise.
2193 (gfc_simplify_atanh): Whitespace fix.
2194 (gfc_simplify_atan2): Whitespace fix.
2195 (gfc_simplify_bessel_j0): Removed ATTRIBUTE_UNUSED.
2196 (gfc_simplify_bessel_j1): Likewise.
2197 (gfc_simplify_bessel_jn): Likewise.
2198 (gfc_simplify_bessel_y0): Likewise.
2199 (gfc_simplify_bessel_y1): Likewise.
2200 (gfc_simplify_bessel_yn): Likewise.
2201 (gfc_simplify_ceiling): Reorderd statements.
2202 (simplify_cmplx): Use convert_boz(), check for constant arguments.
2204 (gfc_simplify_cmplx): Use correct default kind. Removed check for
2206 (gfc_simplify_complex): Replaced if-gate. Removed check for
2208 (gfc_simplify_conjg): Whitespace fix.
2209 (gfc_simplify_cos): Whitespace fix.
2210 (gfc_simplify_cosh): Replaced if-gate by more common switch-over-type.
2211 (gfc_simplify_dcmplx): Removed check for constant arguments.
2212 (gfc_simplify_dble): Use convert_boz() and gfc_convert_constant().
2213 (gfc_simplify_digits): Whitespace fix.
2214 (gfc_simplify_dim): Whitespace fix.
2215 (gfc_simplify_dprod): Reordered statements.
2216 (gfc_simplify_erf): Whitespace fix.
2217 (gfc_simplify_erfc): Whitespace fix.
2218 (gfc_simplify_epsilon): Whitespace fix.
2219 (gfc_simplify_exp): Whitespace fix.
2220 (gfc_simplify_exponent): Use convert_boz().
2221 (gfc_simplify_floor): Reorderd statements.
2222 (gfc_simplify_gamma): Whitespace fix.
2223 (gfc_simplify_huge): Whitespace fix.
2224 (gfc_simplify_iand): Whitespace fix.
2225 (gfc_simplify_ieor): Whitespace fix.
2226 (simplify_intconv): Use gfc_convert_constant().
2227 (gfc_simplify_int): Use simplify_intconv().
2228 (gfc_simplify_int2): Reorderd statements.
2229 (gfc_simplify_idint): Reorderd statements.
2230 (gfc_simplify_ior): Whitespace fix.
2231 (gfc_simplify_ishftc): Removed duplicate type check.
2232 (gfc_simplify_len): Use range_check() instead of manual range check.
2233 (gfc_simplify_lgamma): Removed ATTRIBUTE_UNUSED. Whitespace fix.
2234 (gfc_simplify_log): Whitespace fix.
2235 (gfc_simplify_log10): Whitespace fix.
2236 (gfc_simplify_minval): Whitespace fix.
2237 (gfc_simplify_maxval): Whitespace fix.
2238 (gfc_simplify_mod): Whitespace fix.
2239 (gfc_simplify_modulo): Whitespace fix.
2240 (simplify_nint): Reorderd statements.
2241 (gfc_simplify_not): Whitespace fix.
2242 (gfc_simplify_or): Replaced if-gate by more common switch-over-type.
2243 (gfc_simplify_radix): Removed unused result-variable. Whitespace fix.
2244 (gfc_simplify_range): Removed unused result-variable. Whitespace fix.
2245 (gfc_simplify_real): Use convert_boz() and gfc_convert_constant().
2246 (gfc_simplify_realpart): Whitespace fix.
2247 (gfc_simplify_selected_char_kind): Removed unused result-variable.
2248 (gfc_simplify_selected_int_kind): Removed unused result-variable.
2249 (gfc_simplify_selected_real_kind): Removed unused result-variable.
2250 (gfc_simplify_sign): Whitespace fix.
2251 (gfc_simplify_sin): Whitespace fix.
2252 (gfc_simplify_sinh): Replaced if-gate by more common switch-over-type.
2253 (gfc_simplify_sqrt): Avoided goto by inlining check. Whitespace fix.
2254 (gfc_simplify_tan): Replaced if-gate by more common switch-over-type.
2255 (gfc_simplify_tanh): Replaced if-gate by more common switch-over-type.
2256 (gfc_simplify_xor): Replaced if-gate by more common switch-over-type.
2258 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
2260 * gfortran.h (gfc_start_constructor): Removed.
2261 (gfc_get_array_element): Removed.
2262 * array.c (gfc_start_constructor): Removed, use gfc_get_array_expr
2263 instead. Fixed all callers.
2264 (extract_element): Removed.
2265 (gfc_expand_constructor): Temporarily removed check for
2266 max-array-constructor. Will be re-introduced later if still required.
2267 (gfc_get_array_element): Removed, use gfc_constructor_lookup_expr
2268 instead. Fixed all callers.
2269 * expr.c (find_array_section): Replaced manual lookup of elements
2270 by gfc_constructor_lookup.
2272 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
2274 * gfortran.h (gfc_get_null_expr): New prototype.
2275 (gfc_get_operator_expr): New prototype.
2276 (gfc_get_character_expr): New prototype.
2277 (gfc_get_iokind_expr): New prototype.
2278 * expr.c (gfc_get_null_expr): New.
2279 (gfc_get_character_expr): New.
2280 (gfc_get_iokind_expr): New.
2281 (gfc_get_operator_expr): Moved here from matchexp.c (build_node).
2282 * matchexp.c (build_node): Renamed and moved to
2283 expr.c (gfc_get_operator_expr). Reordered arguments to match
2284 other functions. Fixed all callers.
2285 (gfc_get_parentheses): Use specific function to build expr.
2286 * array.c (gfc_match_array_constructor): Likewise.
2287 * arith.c (eval_intrinsic): Likewise.
2288 (gfc_hollerith2int): Likewise.
2289 (gfc_hollerith2real): Likewise.
2290 (gfc_hollerith2complex): Likewise.
2291 (gfc_hollerith2logical): Likewise.
2292 * data.c (create_character_intializer): Likewise.
2293 * decl.c (gfc_match_null): Likewise.
2294 (enum_initializer): Likewise.
2295 * io.c (gfc_match_format): Likewise.
2296 (match_io): Likewise.
2297 * match.c (gfc_match_nullify): Likewise.
2298 * primary.c (match_string_constant): Likewise.
2299 (match_logical_constant): Likewise.
2300 (build_actual_constructor): Likewise.
2301 * resolve.c (build_default_init_expr): Likewise.
2302 * symbol.c (generate_isocbinding_symbol): Likewise.
2303 (gfc_build_class_symbol): Likewise.
2304 (gfc_find_derived_vtab): Likewise.
2305 * simplify.c (simplify_achar_char): Likewise.
2306 (gfc_simplify_adjustl): Likewise.
2307 (gfc_simplify_adjustr): Likewise.
2308 (gfc_simplify_and): Likewise.
2309 (gfc_simplify_bit_size): Likewise.
2310 (gfc_simplify_is_iostat_end): Likewise.
2311 (gfc_simplify_is_iostat_eor): Likewise.
2312 (gfc_simplify_isnan): Likewise.
2313 (simplify_bound): Likewise.
2314 (gfc_simplify_leadz): Likewise.
2315 (gfc_simplify_len_trim): Likewise.
2316 (gfc_simplify_logical): Likewise.
2317 (gfc_simplify_maxexponent): Likewise.
2318 (gfc_simplify_minexponent): Likewise.
2319 (gfc_simplify_new_line): Likewise.
2320 (gfc_simplify_null): Likewise.
2321 (gfc_simplify_or): Likewise.
2322 (gfc_simplify_precision): Likewise.
2323 (gfc_simplify_repeat): Likewise.
2324 (gfc_simplify_scan): Likewise.
2325 (gfc_simplify_size): Likewise.
2326 (gfc_simplify_trailz): Likewise.
2327 (gfc_simplify_trim): Likewise.
2328 (gfc_simplify_verify): Likewise.
2329 (gfc_simplify_xor): Likewise.
2330 * trans-io.c (build_dt): Likewise.
2331 (gfc_new_nml_name_expr): Removed.
2333 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
2335 * arith.h (gfc_constant_result): Removed prototype.
2336 * constructor.h (gfc_build_array_expr): Removed prototype.
2337 (gfc_build_structure_constructor_expr): Removed prototype.
2338 * gfortran.h (gfc_int_expr): Removed prototype.
2339 (gfc_logical_expr): Removed prototype.
2340 (gfc_get_array_expr): New prototype.
2341 (gfc_get_structure_constructor_expr): New prototype.
2342 (gfc_get_constant_expr): New prototype.
2343 (gfc_get_int_expr): New prototype.
2344 (gfc_get_logical_expr): New prototype.
2345 * arith.c (gfc_constant_result): Moved and renamed to
2346 expr.c (gfc_get_constant_expr). Fixed all callers.
2347 * constructor.c (gfc_build_array_expr): Moved and renamed to
2348 expr.c (gfc_get_array_expr). Split gfc_typespec argument to type
2349 and kind. Fixed all callers.
2350 (gfc_build_structure_constructor_expr): Moved and renamed to
2351 expr.c (gfc_get_structure_constructor_expr). Split gfc_typespec argument
2352 to type and kind. Fixed all callers.
2353 * expr.c (gfc_logical_expr): Renamed to ...
2354 (gfc_get_logical_expr): ... this. Added kind argument. Fixed all callers.
2355 (gfc_int_expr): Renamed to ...
2356 (gfc_get_int_expr): ... this. Added kind and where arguments. Fixed all
2358 (gfc_get_constant_expr): New.
2359 (gfc_get_array_expr): New.
2360 (gfc_get_structure_constructor_expr): New.
2361 * simplify.c (int_expr_with_kind): Removed, callers use gfc_get_int_expr
2364 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
2366 * constructor.h: New.
2367 * constructor.c: New.
2368 * Make-lang.in: Add new files to F95_PARSER_OBJS.
2369 * arith.c (reducy_unary): Use constructor API.
2370 (reduce_binary_ac): Likewise.
2371 (reduce_binary_ca): Likewise.
2372 (reduce_binary_aa): Likewise.
2373 * check.c (gfc_check_pack): Likewise.
2374 (gfc_check_reshape): Likewise.
2375 (gfc_check_unpack): Likewise.
2376 * decl.c (add_init_expr_to_sym): Likewise.
2377 (build_struct): Likewise.
2378 * dependency.c (gfc_check_dependency): Likewise.
2379 (contains_forall_index_p): Likewise.
2380 * dump-parse-tree.c (show_constructor): Likewise.
2381 * expr.c (free_expr0): Likewise.
2382 (gfc_copy_expr): Likewise.
2383 (gfc_is_constant_expr): Likewise.
2384 (simplify_constructor): Likewise.
2385 (find_array_element): Likewise.
2386 (find_component_ref): Likewise.
2387 (find_array_section): Likewise.
2388 (find_substring_ref): Likewise.
2389 (simplify_const_ref): Likewise.
2390 (scalarize_intrinsic_call): Likewise.
2391 (check_alloc_comp_init): Likewise.
2392 (gfc_default_initializer): Likewise.
2393 (gfc_traverse_expr): Likewise.
2394 * iresolve.c (check_charlen_present): Likewise.
2395 (gfc_resolve_reshape): Likewise.
2396 (gfc_resolve_transfer): Likewise.
2397 * module.c (mio_constructor): Likewise.
2398 * primary.c (build_actual_constructor): Likewise.
2399 (gfc_match_structure_constructor): Likewise.
2400 * resolve.c (resolve_structure_cons): Likewise.
2401 * simplify.c (is_constant_array_expr): Likewise.
2402 (init_result_expr): Likewise.
2403 (transformational_result): Likewise.
2404 (simplify_transformation_to_scalar): Likewise.
2405 (simplify_transformation_to_array): Likewise.
2406 (gfc_simplify_dot_product): Likewise.
2407 (simplify_bound): Likewise.
2408 (simplify_matmul): Likewise.
2409 (simplify_minval_maxval): Likewise.
2410 (gfc_simplify_pack): Likewise.
2411 (gfc_simplify_reshape): Likewise.
2412 (gfc_simplify_shape): Likewise.
2413 (gfc_simplify_spread): Likewise.
2414 (gfc_simplify_transpose): Likewise.
2415 (gfc_simplify_unpack): Likewise.q
2416 (gfc_convert_constant): Likewise.
2417 (gfc_convert_char_constant): Likewise.
2418 * target-memory.c (size_array): Likewise.
2419 (encode_array): Likewise.
2420 (encode_derived): Likewise.
2421 (interpret_array): Likewise.
2422 (gfc_interpret_derived): Likewise.
2423 (expr_to_char): Likewise.
2424 (gfc_merge_initializers): Likewise.
2425 * trans-array.c (gfc_get_array_constructor_size): Likewise.
2426 (gfc_trans_array_constructor_value): Likewise.
2427 (get_array_ctor_strlen): Likewise.
2428 (gfc_constant_array_constructor_p): Likewise.
2429 (gfc_build_constant_array_constructor): Likewise.
2430 (gfc_trans_array_constructor): Likewise.
2431 (gfc_conv_array_initializer): Likewise.
2432 * trans-decl.c (check_constant_initializer): Likewise.
2433 * trans-expr.c (flatten_array_ctors_without_strlen): Likewise.
2434 (gfc_apply_interface_mapping_to_cons): Likewise.
2435 (gfc_trans_structure_assign): Likewise.
2436 (gfc_conv_structure): Likewise.
2437 * array.c (check_duplicate_iterator): Likewise.
2438 (match_array_list): Likewise.
2439 (match_array_cons_element): Likewise.
2440 (gfc_match_array_constructor): Likewise.
2441 (check_constructor_type): Likewise.
2442 (check_constructor): Likewise.
2444 (expand_constructor): Likewise.
2445 (extract_element): Likewise.
2446 (gfc_expanded_ac): Likewise.
2447 (resolve_array_list): Likewise.
2448 (gfc_resolve_character_array_constructor): Likewise.
2449 (copy_iterator): Renamed to ...
2450 (gfc_copy_iterator): ... this.
2451 (gfc_append_constructor): Removed.
2452 (gfc_insert_constructor): Removed unused function.
2453 (gfc_get_constructor): Removed.
2454 (gfc_free_constructor): Removed.
2455 (qgfc_copy_constructor): Removed.
2456 * gfortran.h (struct gfc_expr): Removed member 'con_by_offset'.
2457 Removed all references. Replaced constructor list by splay-tree.
2458 (struct gfc_constructor): Removed member 'next', moved 'offset' from
2459 the inner struct, added member 'base'.
2460 (gfc_append_constructor): Removed prototype.
2461 (gfc_insert_constructor): Removed prototype.
2462 (gfc_get_constructor): Removed prototype.
2463 (gfc_free_constructor): Removed prototype.
2464 (qgfc_copy_constructor): Removed prototype.
2465 (gfc_copy_iterator): New prototype.
2466 * trans-array.h (gfc_constant_array_constructor_p): Adjusted prototype.
2468 2010-04-10 Tobias Burnus <burnus@net-b.de>
2471 * expr.c (gfc_is_constant_expr, gfc_traverse_expr): Handle
2472 proc-pointers and type-bound procedures.
2473 (gfc_specification_expr): Check proc-pointers for pureness.
2475 2010-04-09 Iain Sandoe <iains@gcc.gnu.org>
2478 * gfortranspec.c (lang_specific_driver): Do not expose vars
2479 only used by HAVE_LD_STATIC_DYNAMIC targets unless compiling
2482 2010-04-09 Tobias Burnus <burnus@net-b.de>
2485 * decl.c (variable_decl, match_attr_spec): Fix setting the array
2487 * array.c (match_subscript,gfc_match_array_ref): Add coarray support.
2488 * data.c (gfc_assign_data_value): Ditto.
2489 * expr.c (gfc_check_pointer_assign): Add check for coarray constraint.
2490 (gfc_traverse_expr): Traverse also through codimension expressions.
2491 (gfc_is_coindexed, gfc_has_ultimate_allocatable,
2492 gfc_has_ultimate_pointer): New functions.
2493 * gfortran.h (gfc_array_ref_dimen_type): Add DIMEN_STAR for coarrays.
2494 (gfc_array_ref): Add codimen.
2495 (gfc_array_ref): Add in_allocate.
2496 (gfc_is_coindexed, gfc_has_ultimate_allocatable,
2497 gfc_has_ultimate_pointer): Add prototypes.
2498 * interface.c (compare_parameter, compare_actual_formal,
2499 check_intents): Add coarray constraints.
2500 * match.c (gfc_match_iterator): Add coarray constraint.
2501 * match.h (gfc_match_array_ref): Update interface.
2502 * primary.c (gfc_match_varspec): Handle codimensions.
2503 * resolve.c (coarray_alloc, inquiry_argument): New static variables.
2504 (check_class_members): Return gfc_try instead for error recovery.
2505 (resolve_typebound_function,resolve_typebound_subroutine,
2506 check_members): Handle return value of check_class_members.
2507 (resolve_structure_cons, resolve_actual_arglist, resolve_function,
2508 check_dimension, compare_spec_to_ref, resolve_array_ref,
2509 resolve_ref, resolve_variable, gfc_resolve_expr, conformable_arrays,
2510 resolve_allocate_expr, resolve_ordinary_assign): Add coarray
2512 * trans-array.c (gfc_conv_array_ref, gfc_walk_variable_expr):
2513 Skip over coarray refs.
2514 (gfc_array_allocate) Add support for references containing coindexes.
2515 * trans-expr.c (gfc_add_interface_mapping): Copy coarray attribute.
2516 (gfc_map_intrinsic_function): Ignore codimensions.
2518 2010-04-08 Bud Davis <bdavis9659@sbcglobal.net>
2521 * io.c (check_format_string): Added check for additional non
2522 blank characters after the format string was successfully
2524 * io.c (check_format): Changed the error messages for positive
2525 int required and period required to drop through the error logic
2526 and report with gfc_error instead of gfc_error_now. Corrected
2527 format postion for hollerith strings.
2529 2010-04-08 Tobias Burnus <burnus@net-b.de>
2531 * module.c (use_iso_fortran_env_module): Fix standard check.
2533 2010-04-07 Jakub Jelinek <jakub@redhat.com>
2535 * parse.c (parse_derived, parse_enum): Avoid set but not used
2538 2010-04-07 Janne Blomqvist <jb@gcc.gnu.org>
2541 * gfortran.texi: Add section about representation of
2544 2010-04-07 Simon Baldwin <simonb@google.com>
2546 * cpp.c (cb_cpp_error): Add warning reason argument, set a value
2547 for diagnostic_override_option_index if CPP_W_WARNING_DIRECTIVE.
2549 2010-04-07 Richard Guenther <rguenther@suse.de>
2551 * options.c (gfc_init_options): Do not set.
2553 2010-04-06 Tobias Burnus <burnus@net-b.de>
2556 * array.c (gfc_match_array_spec): Add error for -fcoarray=none.
2557 * match.c (gfc_match_critical, sync_statement): Ditto.
2558 * gfortran.h (gfc_fcoarray): New enum.
2559 (gfc_option_t): Use it.
2560 * lang.opt (fcoarray): Add new flag.
2561 * invoke.texi (fcoarray): Document it.
2562 * options.c (gfc_init_options,gfc_handle_option): Handle -fcoarray=.
2563 (gfc_handle_coarray_option): New function.
2565 2010-04-06 Tobias Burnus <burnus@net-b.de>
2568 * gfortran.h (gfc_array_spec): Add cotype.
2569 * array.c (gfc_match_array_spec,gfc_set_array_spec): Use it
2570 and defer error diagnostic.
2571 * resolve.c (resolve_fl_derived): Add missing check.
2572 (resolve_symbol): Add cotype/type check.
2573 * parse.c (parse_derived): Fix setting of coarray_comp.
2575 2010-04-06 Tobias Burnus <burnus@net-b.de>
2578 * array.c (gfc_free_array_spec,gfc_resolve_array_spec,
2579 match_array_element_spec,gfc_copy_array_spec,
2580 gfc_compare_array_spec): Include corank.
2581 (match_array_element_spec,gfc_set_array_spec): Support codimension.
2582 * decl.c (build_sym,build_struct,variable_decl,
2583 match_attr_spec,attr_decl1,cray_pointer_decl,
2584 gfc_match_volatile): Add codimension.
2585 (gfc_match_codimension): New function.
2586 * dump-parse-tree.c (show_array_spec,show_attr): Support codimension.
2587 * gfortran.h (symbol_attribute,gfc_array_spec): Ditto.
2588 (gfc_add_codimension): New function prototype.
2589 * match.h (gfc_match_codimension): New function prototype.
2590 (gfc_match_array_spec): Update prototype
2591 * match.c (gfc_match_common): Update gfc_match_array_spec call.
2592 * module.c (MOD_VERSION): Bump.
2593 (mio_symbol_attribute): Support coarray attributes.
2594 (mio_array_spec): Add corank support.
2595 * parse.c (decode_specification_statement,decode_statement,
2596 parse_derived): Add coarray support.
2597 * resolve.c (resolve_formal_arglist, was_declared,
2598 is_non_constant_shape_array, resolve_fl_variable,
2599 resolve_fl_derived, resolve_symbol): Add coarray support.
2600 * symbol.c (check_conflict, gfc_add_volatile, gfc_copy_attr,
2601 gfc_build_class_symbol): Add coarray support.
2602 (gfc_add_codimension): New function.
2604 2010-04-06 Tobias Burnus <burnus@net-b.de>
2607 * iso-fortran-env.def: Add the integer parameters atomic_int_kind,
2608 atomic_logical_kind, iostat_inquire_internal_unit, stat_locked,
2609 stat_locked_other_image, stat_stopped_image and stat_unlocked of
2611 * intrinsic.texi (iso_fortran_env): Ditto.
2612 * libgfortran.h (libgfortran_stat_codes): New enum.
2613 * module.c (use_iso_fortran_env_module): Honour -std= when loading
2614 constants from the intrinsic module.
2616 2010-04-06 Tobias Burnus <burnus@net-b.de>
2619 * intrinsic.c (add_functions): Add num_images.
2620 * decl.c (gfc_match_end): Handle END CRITICAL.
2621 * intrinsic.h (gfc_simplify_num_images): Add prototype.
2622 * dump-parse-tree.c (show_code_node): Dump CRITICAL, ERROR STOP,
2624 * gfortran.h (gfc_statement): Add enum items for those.
2625 (gfc_exec_op) Ditto.
2626 (gfc_isym_id): Add num_images.
2627 * trans-stmt.c (gfc_trans_stop): Handle ERROR STOP.
2628 (gfc_trans_sync,gfc_trans_critical): New functions.
2629 * trans-stmt.h (gfc_trans_stop,gfc_trans_sync,
2630 gfc_trans_critical): Add/update prototypes.
2631 * trans.c (gfc_trans_code): Handle CRITICAL, ERROR STOP,
2632 and SYNC statements.
2633 * trans.h (gfor_fndecl_error_stop_string) Add variable.
2634 * resolve.c (resolve_sync): Add function.
2635 (gfc_resolve_blocks): Handle CRITICAL.
2636 (resolve_code): Handle CRITICAL, ERROR STOP,
2637 (resolve_branch): Add CRITICAL constraint check.
2638 and SYNC statements.
2639 * st.c (gfc_free_statement): Add new statements.
2640 * trans-decl.c (gfor_fndecl_error_stop_string): Global variable.
2641 (gfc_build_builtin_function_decls): Initialize it.
2642 * match.c (gfc_match_if): Handle ERROR STOP and SYNC.
2643 (gfc_match_critical, gfc_match_error_stop, sync_statement,
2644 gfc_match_sync_all, gfc_match_sync_images, gfc_match_sync_memory):
2646 (match_exit_cycle): Handle CRITICAL constraint.
2647 (gfc_match_stopcode): Handle ERROR STOP.
2648 * match.h (gfc_match_critical, gfc_match_error_stop,
2649 gfc_match_sync_all, gfc_match_sync_images,
2650 gfc_match_sync_memory): Add prototype.
2651 * parse.c (decode_statement, gfc_ascii_statement,
2652 parse_executable): Handle new statements.
2653 (parse_critical_block): New function.
2654 * parse.h (gfc_compile_state): Add COMP_CRITICAL.
2655 * intrinsic.texi (num_images): Document new function.
2656 * simplify.c (gfc_simplify_num_images): Add function.
2658 2010-04-06 Tobias Burnus <burnus@net-b.de>
2661 * trans-array.c (gfc_conv_expr_descriptor): Update
2662 gfc_trans_scalar_assign call.
2663 (has_default_initializer): New function.
2664 (gfc_trans_deferred_array): Nullify less often.
2665 * trans-expr.c (gfc_conv_subref_array_arg,
2666 gfc_trans_subcomponent_assign): Update call to
2667 gfc_trans_scalar_assign.
2668 (gfc_trans_scalar_assign): Add parameter and pass it on.
2669 (gfc_trans_assignment_1): Optionally, do not dealloc before
2671 * trans-openmp.c (gfc_trans_omp_array_reduction): Update
2672 call to gfc_trans_scalar_assign.
2673 * trans-decl.c (gfc_get_symbol_decl): Do not always apply
2674 initializer to static variables.
2675 (gfc_init_default_dt): Add dealloc parameter and pass it on.
2676 * trans-stmt.c (forall_make_variable_temp,
2677 generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
2678 gfc_trans_forall_1, gfc_trans_where_assign, gfc_trans_where_3
2679 gfc_trans_allocate): Update gfc_trans_assignment call.
2680 * trans.h (gfc_trans_scalar_assign, gfc_init_default_dt,
2681 gfc_init_default_dt, gfc_trans_assignment): Add bool dealloc
2682 parameter to prototype.
2684 2010-03-31 Paul Thomas <pault@gcc.gnu.org>
2686 * ioparm.def : Update copyright.
2688 * trans-array.c : ditto
2689 * trans-array.h : ditto
2691 * trans-types.c: ditto
2692 * dependency.c : ditto
2693 * gfortran.h : ditto
2695 * trans-io.c : ditto
2696 * trans-intrinsic.c : ditto
2697 * libgfortran.h : ditto
2698 * invoke.texi : ditto
2699 * intrinsic.texi : ditto
2702 * intrinsic.c : ditto
2703 * interface.c : ditto
2704 * iresolve.c : ditto
2705 * trans-stmt.c : ditto
2706 * trans-stmt.h : ditto
2711 2010-03-20 Paul Thomas <pault@gcc.gnu.org>
2714 * trans-decl.c (gfc_create_module_variable): With -fwhole-file
2715 do not assert the context of derived types.
2717 2010-03-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2720 * ioparm.def: Change inquire size variable to type pointer to
2723 2010-03-18 Paul Thomas <pault@gcc.gnu.org>
2726 * trans-expr.c (conv_parent_component_references): Ensure that
2727 'dt' has a backend_decl.
2730 * trans-expr.c (gfc_conv_structure): Ensure that the derived
2731 type has a backend_decl.
2734 * resolve.c (resolve_global_procedure): Check that the 'cl'
2735 structure is not NULL.
2737 2010-03-18 Shujing Zhao <pearly.zhao@oracle.com>
2739 * lang.opt (-ffixed-line-length-, ffree-line-length-): Remove
2742 2010-03-17 Tobias Burnus <burnus@net-b.de>
2745 * trans-array.c (gfc_conv_array_index_offset,gfc_conv_array_ref,
2746 gfc_conv_ss_startstride): Remove no-longer-needed cp_was_assumed
2748 * decl.c (gfc_match_derived_decl): Don't mark assumed-size Cray
2749 pointees as having explizit size.
2750 * expr.c (gfc_check_assign): Remove now unreachable Cray pointee
2752 * trans-types.c (gfc_is_nodesc_array): Add cp_was_assumed to assert.
2753 (gfc_sym_type): Don't mark Cray pointees as restricted pointers.
2754 * resolve.c (resolve_symbol): Handle cp_was_assumed.
2755 * trans-decl.c (gfc_trans_deferred_vars): Ditto.
2756 (gfc_finish_var_decl): Don't mark Cray pointees as restricted
2759 2010-03-14 Tobias Burnus <burnus@net-b.de>
2762 * resolve.c (resolve_structure_cons): Add missing PURE constraint.
2763 (resolve_ordinary_assign): Add check to avoid segfault.
2765 2010-03-12 Paul Thomas <pault@gcc.gnu.org>
2769 * resolve.c (resolve_compcall): Add new boolean dummy argument
2770 'class_members'. Only resolve expression at end if false.
2771 Remove redundant, static variable 'class_object'.
2772 (check_class_members): Add extra argument to call of
2774 (resolve_typebound_function): Renamed resolve_class_compcall.
2775 Do all the detection of class references here. Correct calls to
2776 resolve_compcall for extra argument.
2777 (resolve_typebound_subroutine): resolve_class_typebound_call
2778 renamed. Otherwise same as resolve_typebound_function.
2779 (gfc_resolve_expr): Call resolve_typebound_function.
2780 (resolve_code): Call resolve_typebound_subroutine.
2782 2010-03-10 Tobias Burnus <burnus@net-b.de
2785 * symbol.c (get_iso_c_sym): Set sym->result.
2787 2010-03-08 Janus Weil <janus@gcc.gnu.org>
2790 * resolve.c (resolve_compcall): Don't set 'value.function.name' here
2791 for TBPs, otherwise they will not be resolved properly.
2792 (resolve_function): Use 'value.function.esym' instead of
2793 'value.function.name' to check if we're dealing with a TBP.
2794 (check_class_members): Set correct type of passed object for all TBPs,
2795 not only generic ones, except if the type is abstract.
2797 2010-03-04 Janus Weil <janus@gcc.gnu.org>
2800 * decl.c (gfc_match_final_decl): Make sure variable names starting with
2801 'final...' are not misinterpreted as FINAL statements.
2803 2010-03-03 Paul Thomas <pault@gcc.gnu.org>
2806 * trans-array.c (gfc_conv_array_parameter): Contiguous refs to
2807 allocatable ultimate components do not need temporaries, whilst
2808 ultimate pointer components do.
2810 2010-03-03 Janus Weil <janus@gcc.gnu.org>
2813 * resolve.c (resolve_code): Correctly set gfc_current_ns for
2815 (gfc_impure_variable): Make it work with sub-namespaces (BLOCK etc).
2818 2010-03-02 Paul Thomas <pault@gcc.gnu.org>
2821 * trans-array.c (gfc_conv_array_parameter): A full array of
2822 derived type need not be restricted to a symbol without an
2823 array spec to use the call to gfc_conv_expr_descriptor.
2826 * trans-array.c (gfc_conv_array_parameter): Contiguous refs to
2827 allocatable arrays do not need temporaries.
2829 2010-03-01 Tobias Burnus <burnus@net-b.de>
2832 * resolve.c (find_array_spec): Handle REF_COMPONENT with
2835 2010-02-28 Tobias Burnus <burnus@net-b.de>
2838 * trans-expr.c (is_zero_initializer_p): Move up in the file.
2839 (gfc_conv_initializer): Handle zero initializer as special case.
2841 2010-02-27 Tobias Burnus <burnus@net-b.de>
2844 * resolve.c (resolve_fl_variable_derived): Imply SAVE
2845 for module variables for Fortran 2008.
2847 2010-02-25 Jakub Jelinek <jakub@redhat.com>
2850 * trans-common.c (build_common_decl): Also update DECL_MODE,
2851 and DECL_SIZE when encountering a larger common block and call
2854 2010-02-24 Tobias Burnus <burnus@net-b.de>
2857 * trans-expr.c (gfc_conv_initializer): Call directly
2858 gfc_conv_constant for C_NULL_(FUN)PTR.
2860 2010-02-22 Paul Thomas <pault@gcc.gnu.org>
2863 * dependency.c (gfc_full_array_ref_p): Check for contiguous by
2864 checking the rest of the dimensions for elements.
2866 2010-02-21 Tobias Burnus <burnus@net-b.de>
2869 * gfortran.h (gfc_option_t): New flag -fprotect-parens.
2871 * option.c (gfc_init_options,gfc_handle_option): Ditto.
2872 * trans-expr.c (gfc_conv_expr_op): Use the flag.
2873 * invoke.texi: Document new -fno-protect-parens flag.
2875 2010-02-20 Paul Thomas <pault@gcc.gnu.org>
2881 * dependency.c (gfc_check_argument_var_dependency): Use enum
2882 value instead of arithmetic vaue for 'elemental'.
2883 (check_data_pointer_types): New function.
2884 (gfc_check_dependency): Call check_data_pointer_types.
2885 * trans-array.h : Change fourth argument of
2886 gfc_conv_array_parameter to boolean.
2887 * trans-array.c (gfc_conv_array_parameter): A contiguous array
2888 can be a dummy but it must not be assumed shape or deferred.
2889 Change fourth argument to boolean. Array constructor exprs will
2890 always be contiguous and do not need packing and unpacking.
2891 * trans-expr.c (gfc_conv_procedure_call): Clean up some white
2892 space and change fourth argument of gfc_conv_array_parameter
2894 (gfc_trans_arrayfunc_assign): Change fourth argument of
2895 gfc_conv_array_parameter to boolean.
2896 * trans-io.c (gfc_convert_array_to_string): The same.
2897 * trans-intrinsic.c (gfc_conv_intrinsic_loc): The same.
2899 2010-02-20 Tobias Burnus <burnus@net-b.de>
2902 * libgfortran.h: Add GFC_RTCHECK_MEM.
2903 * invoke.texi (-fcheck=): Document -fcheck=mem.
2904 * tranc.c (gfc_call_malloc): Remove negative-size run-time error
2905 and enable malloc-success check only with -fcheck=mem.
2906 * option.c (gfc_handle_runtime_check_option): Add -fcheck=mem.
2908 2010-02-16 Tobias Burnus <burnus@net-b.de>
2911 * gfortran.h (gfc_isym_id): Rename GFS_ISYM_GAMMA to GFS_ISYM_TGAMMA.
2912 * intrinsic.c (add_functions): Ditto.
2913 * iresolve.c (gfc_resolve_gamma): Call tgamma instead of gamma.
2914 * mathbuiltins.def: Use TGAMMA instead of GAMMA with "tgamma".
2916 2010-02-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2919 * trans-stmt.h: Add prototype for gfc_trans_code_cond. Add tree cond to
2920 gfc_trans_do prototype.
2921 * trans-stmt.c (gfc_trans_simple_do): Add optional argument to pass in
2922 a loop exit condition. If exit condition is given, build the loop exit
2923 code, checking IO results of implied do loops in READ and WRITE.
2924 (gfc_trans_do): Likewise.
2925 * trans.c (trans_code): New static work function, previously
2926 gfc_trans_code. Passes exit condition to gfc_trans_do.
2927 (gfc_trans_code): Calls trans_code with NULL_TREE condition.
2928 (gfc_trans_code_cond): Calls trans_code with loop exit condition.
2929 * trans-io.c (build_dt): Build an exit condition to allow checking IO
2930 result status bits in the dtparm structure. Use this condition in call
2931 to gfc_trans_code_cond.
2933 2010-02-13 Paul Thomas <pault@gcc.gnu.org>
2937 * trans-array.c (gfc_conv_array_parameter): Use
2938 gfc_full_array_ref_p to detect full and contiguous variable
2939 arrays. Full array components and contiguous arrays do not need
2940 internal_pack and internal_unpack.
2942 2010-02-11 Jakub Jelinek <jakub@redhat.com>
2945 * resolve.c (gfc_resolve_dim_arg): Call gfc_clear_ts.
2948 * decl.c (enumerator_decl): Don't call gfc_free_enum_history
2950 (gfc_match_enumerator_def): But here whenever enumerator_decl returns
2953 2010-02-10 Joost VandeVondele <jv244@cam.ac.uk>
2954 Tobias Burnus <burnus@net-b.de>
2957 * decl.c (gfc_match_subroutine): Explicitly set sym->declared_at.
2959 2010-02-10 Tobias Burnus <burnus@net-b.de>
2962 * trans-decl.c (gfc_generate_function_code): Only check
2963 actual-vs.-dummy character bounds if not bind(C).
2965 2010-02-10 Jakub Jelinek <jakub@redhat.com>
2968 * trans-expr.c (gfc_conv_subref_array_arg): Avoid accessing
2969 info->dimen after info has been freed.
2971 2010-02-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2974 * array.c (gfc_constant_ac): Do not prevent expansion of constructors
2977 2010-02-09 Jakub Jelinek <jakub@redhat.com>
2979 * module.c (fix_mio_expr): Declare sym.
2981 2010-02-09 Paul Thomas <pault@gcc.gnu.org>
2984 * module.c (fix_mio_expr): Fix for private generic procedures.
2986 2010-02-09 Daniel Kraft <d@domob.eu>
2989 * resolve.c (resolve_charlen): Change warning about negative CHARACTER
2990 length to be correct and issue only with -Wsurprising.
2991 * invoke.texi (Wsurprising): Mention this new warning that is
2992 turned on by -Wsurprising.
2994 2010-02-09 Daniel Kraft <d@domob.eu>
2997 * intrinsic.texi (MAXVAL): Remove wrong claim that array argument
2998 can be CHARACTER type.
2999 (MINVAL), (MAXLOC), (MINLOC): Ditto.
3001 2010-02-05 Paul Thomas <pault@gcc.gnu.org>
3004 * trans-expr.c (gfc_conv_subref_array_arg): Add new argument
3005 'formal_ptr'. If this is true, give returned descriptor unity
3006 lbounds, in all dimensions, and the appropriate offset.
3007 (gfc_conv_procedure_call); If formal is a pointer, set the last
3008 argument of gfc_conv_subref_array_arg to true.
3009 * trans.h : Add last argument for gfc_conv_subref_array_arg.
3010 * trans-io.c (set_internal_unit, gfc_trans_transfer): Set the
3011 new arg of gfc_conv_subref_array_arg to false.
3012 * trans-stmt.c (forall_make_variable_temp): The same.
3014 2010-02-03 Tobias Burnus <burnus@net-b.de>
3017 * interface.c (compare_parameter): Disable rank-checking
3020 2010-02-02 Tobias Burnus <burnus@net-b.de>
3023 * parse.c (decode_specification_statement): Use sym->result not sym.
3025 2010-02-01 Tobias Burnus <burnus@net-b.de>
3028 * decl.c (variable_decl): Allow default initializer in
3029 TYPE declarations in PURE functions.
3031 2010-01-31 Janus Weil <janus@gcc.gnu.org>
3034 * resolve.c (resolve_allocate_expr): Move default initialization code
3035 here from gfc_trans_allocate.
3036 * trans.c (gfc_trans_code): Call gfc_trans_class_assign also for
3038 * trans-expr.c (gfc_trans_class_assign): Handle default initialization
3039 of CLASS variables via memcpy.
3040 * trans-stmt.c (gfc_trans_allocate): Move default initialization code
3041 to resolve_allocate_expr.
3043 2010-01-31 Paul Thomas <pault@gcc.gnu.org>
3046 * expr.c (gfc_get_full_arrayspec_from_expr): New function.
3047 * gfortran.h : Add prototype for above.
3048 * trans-expr.c (gfc_trans_alloc_subarray_assign): New function.
3049 (gfc_trans_subcomponent_assign): Call new function to replace
3050 the code to deal with allocatable components.
3051 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Call
3052 gfc_get_full_arrayspec_from_expr to replace existing code.
3054 2010-01-25 Tobias Burnus <burnus@net-b.de>
3057 * array.c (gfc_array_dimen_size): Fix intrinsic procedure
3060 2010-01-24 Paul Thomas <pault@gcc.gnu.org>
3064 * expr.c (remove_subobject_ref): If the constructor is NULL use
3065 the expression as the source.
3066 (simplify_const_ref): Change the type of expression if
3067 there are component references. Allow for substring to be at
3068 the end of an arbitrarily long chain of references. If an
3069 element is found that is not in an EXPR_ARRAY, assume that this
3070 is scalar initialization of array. Call remove_subobject_ref in
3071 this case with NULL second argument.
3073 2010-01-24 Tobias Burnus <burnus@net-b.de>
3076 * array.c (gfc_array_dimen_size): Use correct specific
3077 function in the check.
3079 2010-01-21 Paul Thomas <pault@gcc.gnu.org>
3082 * trans-stmt.c (gfc_conv_elemental_dependencies): If temporary
3083 is required, turn any trailing array elements after a range
3084 into ranges so that offsets can be calculated.
3086 2010-01-20 Joern Rennecke <amylaar@spamcop.net>
3088 * module.c (mio_f2k_derived): Use enumerator as initializer of
3092 * gfortran.h (struct gfc_namespace) <resolved>: Change to signed
3093 bitfield of width 2.
3095 2010-01-19 Janus Weil <janus@gcc.gnu.org>
3098 * resolve.c (extract_compcall_passed_object): Set locus for
3099 passed-object argument.
3100 (extract_ppc_passed_object): Set locus and correctly remove PPC
3103 2010-01-19 Paul Thomas <pault@gcc.gnu.org>
3106 * trans-decl.c (add_argument_checking): Do not use the backend
3107 decl directly to test for the presence of an optional dummy
3108 argument. Use gfc_conv_expr_present, remembering to set the
3112 * trans-decl.c (gfc_generate_function_code): Small white space
3113 changes. If 'recurcheckvar' is NULL do not try to reset it.
3115 2010-01-19 Janus Weil <janus@gcc.gnu.org>
3118 * resolve.c (resolve_fl_derived): Set the accessibility of the parent
3119 component for extended types.
3120 * symbol.c (gfc_find_component): Remove a wrongly-worded error message
3121 and take care of parent component accessibility.
3123 2010-01-17 Janus Weil <janus@gcc.gnu.org>
3126 * gfortran.h (symbol_attribute): Remove 'ambiguous_interfaces'.
3127 * interface.c (check_interface1): Move a warning message here from
3128 resolve_fl_procedure.
3129 (check_sym_interfaces): Removed 'attr.ambiguous_interfaces'.
3130 * module.c (read_module): Remove call to gfc_check_interfaces, since
3131 this comes too early here.
3132 * resolve.c (resolve_fl_procedure): Move warning message to
3135 2010-01-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3138 * interface.c (check_interface1): Pass symbol name rather than NULL to
3139 gfc_compare_interfaces. (gfc_compare_interfaces): Add assert to
3141 * resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather
3142 than NULL to gfc_compare_interfaces.
3144 2010-01-14 Paul Thomas <pault@gcc.gnu.org>
3147 * trans-array.c (duplicate_allocatable): Static version of
3148 gfc_duplicate_allocatable with provision to handle scalar
3149 components. New boolean argument to switch off call to malloc
3151 (gfc_duplicate_allocatable): New function to call above with
3153 (gfc_copy_allocatable_data): New function to call above with
3155 (structure_alloc_comps): Do not apply indirect reference to
3156 scalar pointers. Add new section to copy allocatable components
3157 of arrays. Extend copying of allocatable components to include
3159 (gfc_copy_only_alloc_comp): New function to copy allocatable
3160 component derived types, without allocating the base structure.
3161 * trans-array.h : Add primitive for gfc_copy_allocatable_data.
3162 Add primitive for gfc_copy_only_alloc_comp.
3163 * trans-expr.c (gfc_conv_procedure_call): After calls to
3164 transformational functions with results that are derived types
3165 with allocatable components, copy the components in the result.
3166 (gfc_trans_arrayfunc_assign): Deallocate allocatable components
3167 of lhs derived types before allocation.
3169 2010-01-14 Paul Thomas <pault@gcc.gnu.org>
3172 * module.c (load_generic_interfaces): If a procedure that is
3173 use associated but not generic is given an interface that
3174 includes itself, then make it generic.
3176 2010-01-11 Joseph Myers <joseph@codesourcery.com>
3177 Shujing Zhao <pearly.zhao@oracle.com>
3179 PR translation/42469
3180 * lang.opt (fblas-matmul-limit=, finit-character=, finit-integer=,
3181 finit-logical=, finit-real=, fmax-array-constructor=): Use tab
3182 character between option name and help text.
3184 2010-01-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3188 * trans-array.c (gfc_conv_array_initializer): Change call to
3189 gfc_error_now to call to gfc_fatal_error.
3190 * array.c (count_elements): Whitespace. (extract_element): Whitespace.
3191 (is_constant_element): Changed name from constant_element.
3192 (gfc_constant_ac): Only use expand_construuctor for expression
3193 types of EXPR_ARRAY. If expression type is EXPR_CONSTANT, no need to
3194 call gfc_is_constant_expr.
3195 * expr.c (gfc_reduce_init_expr): Adjust conditionals and delete error
3197 * resolve.c (gfc_is_expandable_expr): New function that determiners if
3198 array expressions should have their constructors expanded.
3199 (gfc_resolve_expr): Use new function to determine whether or not to call
3200 gfc_expand_constructor.
3202 2010-01-09 Tobias Burnus <burnus@net-b.de>
3205 * trans-expr.c (gfc_trans_structure_assign): Handle
3207 * symbol.c (gen_special_c_interop_ptr): Add NULL_EXPR
3208 to the constructor for c_null_(fun)ptr.
3209 * resolve.c (resolve_structure_cons): Add special case
3210 for c_null_(fun)ptr.
3212 2010-01-09 Jakub Jelinek <jakub@redhat.com>
3214 * gfortranspec.c (lang_specific_driver): Update copyright notice
3217 2010-01-08 Tobias Burnus <burnus@net-b.de>
3220 * symbol.c (check_conflict, gfc_copy_attr): Add
3221 ASYNCHRONOUS support.
3222 (gfc_add_asynchronous): New function.
3223 * decl.c (match_attr_spec): Add ASYNCHRONOUS support.
3224 (gfc_match_asynchronous): New function.
3225 * dump-parse-tree.c (show_attr): Add ASYNCHRONOUS support.
3226 * gfortran.h (symbol_attribute): New ASYNCHRONOUS bit.
3227 (gfc_add_asynchronous): New Prototype.
3228 * module.c (ab_attribute, mio_symbol_attribute): Add
3229 ASYNCHRONOUS support.
3230 * resolve.c (was_declared): Ditto.
3231 * match.h (gfc_match_asynchronous): New prototype.
3232 * parse.c (decode_specification_statement,decode_statement):
3233 Add ASYNCHRONOUS support.
3235 2010-01-07 Tobias Burnus <burnus@net-b.de>
3238 * trans-decl.c (get_proc_pointer_decl): Fix call to
3239 gfc_conv_initializer for array-valued proc-pointer funcs.
3241 2010-01-07 Tobias Burnus <burnus@net-b.de>
3244 * trans-decl.c (gfc_trans_deferred_vars): Don't initialize
3245 allocatable scalars with SAVE attribute.
3247 2010-01-05 Tobias Burnus <burnus@net-b.de>
3250 * options.c (gfc_post_options): Set -frecursion
3251 when -fopenmp is used.
3253 2010-01-05 Tobias Burnus <burnus@net-b.de>
3256 * trans-expr.c (gfc_conv_procedure_call): Nullify
3257 return value for allocatable-scalar character functions.
3259 2010-01-04 Tobias Burnus <burnus@net-b.de>
3262 * error.c (error_printf, gfc_warning, gfc_notify_std,
3263 gfc_warning_now, gfc_error, gfc_error_now,
3264 gfc_fatal_error): Change argument name from nocmsgid to
3265 gmsgid to enable (x)gettext's % checking.
3267 2010-01-04 Tobias Burnus <burnus@net-b.de>
3269 * trans-decl.c (gfc_trans_deferred_vars): Fix spelling.
3271 2010-01-04 Tobias Burnus <burnus@net-b.de>
3274 * trans-expr.c (gfc_conv_procedure_call): Add indirect ref
3275 for functions returning allocatable scalars.
3276 * trans-stmt.c (gfc_trans_allocate): Emmit error when
3277 reallocating an allocatable scalar.
3278 * trans.c (gfc_allocate_with_status): Fix pseudocode syntax
3280 * trans-decl.c (gfc_trans_deferred_vars): Nullify local
3281 allocatable scalars.
3282 (gfc_generate_function_code): Nullify result variable for
3283 allocatable scalars.
3286 * module.c (gfc_use_module): Fix warning string to allow
3290 * invoke.texi (-fcheck=recursion): Mention that the checking
3291 is also disabled for -frecursive.
3292 * trans-decl.c (gfc_generate_function_code): Disable
3293 -fcheck=recursion when -frecursive is used.
3295 * intrinsic.texi (iso_c_binding): Improve wording.
3298 Copyright (C) 2010 Free Software Foundation, Inc.
3300 Copying and distribution of this file, with or without modification,
3301 are permitted in any medium without royalty provided the copyright
3302 notice and this notice are preserved.