1 2010-08-16 Joseph Myers <joseph@codesourcery.com>
3 * lang.opt (MDX, MMDX): Mark RejectDriver.
5 2010-08-15 Janus Weil <janus@gcc.gnu.org>
7 * trans-expr.c (gfc_trans_assign_vtab_procs): Clean up (we don't have
8 vtabs for generics any more).
10 2010-08-15 Daniel Kraft <d@domob.eu>
13 * gfortran.h (gfc_find_proc_namespace): New method.
14 * expr.c (gfc_build_intrinsic_call): No need to build symtree messing
15 around with namespace.
16 * symbol.c (gfc_find_proc_namespace): New method.
17 * trans-decl.c (gfc_build_qualified_array): Use it for correct
19 * primary.c (gfc_match_varspec): Handle associate-names as arrays.
20 * parse.c (parse_associate): Removed assignment-generation here...
21 * resolve.c (resolve_block_construct): ...and added it here.
22 (resolve_variable): Handle names that are arrays but were not parsed
23 as such because of association.
24 (resolve_code): Fix BLOCK resolution.
25 (resolve_symbol): Generate array-spec for associate-names.
27 2010-08-15 Tobias Burnus <burnus@net-b.de>
30 * decl.c (verify_c_interop_param): Remove superfluous space (" ").
31 (verify_c_interop): Handle unresolved DT with bind(C).
33 2010-08-15 Tobias Burnus <burnus@net-b.de>
35 * trans-expr.c (gfc_conv_expr_present): Regard nullified
36 pointer arrays as absent.
37 (gfc_conv_procedure_call): Handle EXPR_NULL for non-pointer
38 dummys as absent argument.
39 * interface.c (compare_actual_formal,compare_parameter):
42 2010-08-15 Tobias Burnus <burnus@net-b.de>
44 * interface.c (compare_pointer, ): Allow passing TARGETs to pointers
45 dummies with intent(in).
47 2010-08-15 Daniel Kraft <d@domob.eu>
50 * decl.c (gfc_match_prefix): Match IMPURE prefix and mark ELEMENTAL
51 routines not IMPURE also as PURE.
52 * intrinsic.c (enum klass): New class `CLASS_PURE' and renamed
53 `NO_CLASS' in `CLASS_IMPURE'.
54 (add_sym): Set symbol-attributes `pure' and `elemental' correctly.
55 (add_sym_0s): Renamed `NO_CLASS' in `CLASS_IMPURE'.
56 (add_functions): Ditto.
57 (add_subroutines): Ditto and mark `MOVE_ALLOC' as CLASS_PURE.
58 * resolve.c (gfc_pure): Do not treat ELEMENTAL as automatically PURE.
59 (resolve_formal_arglist): Check that arguments to ELEMENTAL procedures
60 are not ALLOCATABLE and have their INTENT specified.
62 2010-08-13 Daniel Kraft <d@domob.eu>
64 * gfortran.h (array_type): New type `AS_IMPLIED_SHAPE'.
65 * array.c (gfc_match_array_spec): Match implied-shape specification and
66 handle AS_IMPLIED_SHAPE correctly otherwise.
67 * decl.c (add_init_expr_to_sym): Set upper bounds for implied-shape.
68 (variable_decl): Some checks for implied-shape declaration.
69 * resolve.c (resolve_symbol): Assert that array-spec is no longer
70 AS_IMPLIED_SHAPE in any case.
72 2010-08-12 Joseph Myers <joseph@codesourcery.com>
74 * lang.opt (MD, MMD): Change to MDX and MMDX.
75 * cpp.c (gfc_cpp_handle_option): Use OPT_MMD and OPT_MMDX.
77 2010-08-11 Janus Weil <janus@gcc.gnu.org>
80 * intrinsic.c (gfc_current_intrinsic_arg): Change type from 'char' to
82 (check_arglist,check_specific): Add reference to 'name' field.
83 (init_arglist): Remove reference to 'name' field.
84 * intrinsic.h (gfc_current_intrinsic_arg): Modify prototype.
85 * check.c (variable_check): Reverse order of checks. Respect intent of
87 (int_or_proc_check): New function.
88 (coarray_check): New function.
89 (allocatable_check): New function.
90 (gfc_check_allocated,gfc_check_move_alloc): Use 'allocatable_check'.
91 (gfc_check_complex): Use 'int_or_real_check'.
92 (gfc_check_lcobound,gfc_check_image_index,gfc_check_this_image,
93 gfc_check_ucobound): Use 'coarray_check'.
94 (gfc_check_pack): Use 'real_or_complex_check'.
95 (gfc_check_alarm_sub,gfc_check_signal,gfc_check_signal_sub): Use
97 (scalar_check,type_check,numeric_check,int_or_real_check,
98 real_or_complex_check,kind_check,double_check,logical_array_check,
99 array_check,same_type_check,rank_check,nonoptional_check,
100 kind_value_check,gfc_check_a_p,gfc_check_associated,gfc_check_cmplx,
101 gfc_check_cshift,gfc_check_dcmplx,gfc_check_dot_product,gfc_check_dprod,
102 gfc_check_eoshift,gfc_check_fn_rc2008,gfc_check_index,gfc_check_kind,
103 gfc_check_matmul,gfc_check_minloc_maxloc,check_reduction,gfc_check_null,
104 gfc_check_present,gfc_check_reshape,gfc_check_same_type_as,
105 gfc_check_spread,gfc_check_unpack,gfc_check_random_seed,
106 gfc_check_getarg,gfc_check_and,gfc_check_storage_size): Add reference
109 2010-08-10 Daniel Kraft <d@domob.eu>
111 * gfortran.texi (Interoperability with C): Fix ordering in menu
112 and add new subsection about pointers.
113 (Interoperable Subroutines and Functions): Split off the pointer part.
114 (working with Pointers): New subsection with extended discussion
115 of pointers (especially procedure pointers).
117 2010-08-09 Thomas Koenig <tkoenig@gcc.gnu.org>
120 * array.c (gfc_ref_dimen_size): Add end argument.
121 If end is non-NULL, calculate it.
122 (ref_size): Adjust call to gfc_ref_dimen_size.
123 (gfc_array_dimen_size): Likewise.
124 (gfc_array_res_shape): Likewise.
125 * gfortran.h: Adjust prototype for gfc_ref_dimen_size.
126 * resolve.c (resolve_array_ref): For stride not equal to -1,
127 fill in the lowest possible end.
129 2010-08-09 Janus Weil <janus@gcc.gnu.org>
131 * intrinsic.texi: Correct documentation of ASINH, ACOSH and ATANH.
133 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
135 * interface.c (compare_actual_formal): Use XALLOCAVEC instead of
137 (check_some_aliasing): Likewise.
138 * trans-intrinsic.c (gfc_conv_intrinsic_conversion): Likewise.
139 (gfc_conv_intrinsic_int): Likewise.
140 (gfc_conv_intrinsic_lib_function): Likewise.
141 (gfc_conv_intrinsic_cmplx): Likewise.
142 (gfc_conv_intrinsic_ctime): Likewise.
143 (gfc_conv_intrinsic_fdate): Likewise.
144 (gfc_conv_intrinsic_ttynam): Likewise.
145 (gfc_conv_intrinsic_minmax): Likewise.
146 (gfc_conv_intrinsic_minmax_char): Likewise.
147 (gfc_conv_intrinsic_ishftc): Likewise.
148 (gfc_conv_intrinsic_index_scan_verify): Likewise.
149 (gfc_conv_intrinsic_merge): Likewise.
150 (gfc_conv_intrinsic_trim): Likewise.
151 * trans.c (gfc_trans_runtime_error_vararg): Likewise.
153 2010-08-06 Thomas Koenig <tkoenig@gcc.gnu.org>
156 * dependency.c (check_section_vs_section): Handle cases where
157 the start expression coincides with the lower or upper
160 2010-08-04 Janus Weil <janus@gcc.gnu.org>
165 * class.c (gfc_find_derived_vtab): Do not generate vtabs for class
166 container types. Do not artificially increase refs. Commit symbols one
168 * interface.c (compare_parameter): Make sure vtabs are present before
169 generating module variables.
170 * resolve.c (resolve_allocate_expr): Ditto.
172 2010-08-04 Tobias Burnus <burnus@net-b.de>
176 * resolve.c (resolve_structure_cons): Fix
179 2010-08-04 Mikael Morin <mikael@gcc.gnu.org>
183 * symbol.c (changed_syms): Made static again.
184 (gfc_symbol_state): Don't conditionalize on GFC_DEBUG.
185 Changed conditional internal error into assert.
186 Rename function to ...
187 (gfc_enforce_clean_symbol_state): ... this.
188 * gfortran.h (gfc_symbol_state, gfc_enforce_clean_symbol_state):
189 Rename the former to the latter.
190 * parse.c (decode_statement, decode_omp_directive,
191 decode_gcc_attribute): Update callers accordingly. Don't conditionalize
193 (changed_syms): Remove declaration.
194 (next_statement): Use gfc_enforce_clean_symbol_state.
196 2010-08-04 Tobias Burnus <burnus@net-b.de>
199 * resolve.c (resolve_structure_cons): Fix handling of
200 initialization structure constructors with character
201 elements of the wrong length.
202 * array.c (gfc_check_iter_variable): Add NULL check.
203 (gfc_resolve_character_array_constructor): Also truncate
206 2010-08-04 Tobias Burnus <burnus@net-b.de>
208 * trans-io.c (gfc_build_io_library_fndecls): Fix return
209 value of some libgfortran functions.
211 2010-08-03 Thomas Koenig <tkoenig@gcc.gnu.org>
214 * dependency.c (gfc_deb_compare_expr): Remove any integer
215 conversion functions to larger types from both arguments.
216 Remove handling these functions futher down.
218 2010-08-03 Janus Weil <janus@gcc.gnu.org>
222 * class.c (add_procs_to_declared_vtab1): Don't add erroneous procedures.
223 * resolve.c (resolve_tb_generic_targets): Check for errors.
225 2010-08-02 Thomas Koenig <tkoenig@gcc.gnu.org>
228 * depencency.c (gfc_dep_resolver): Fix logic for when a loop
231 2010-08-02 Thomas Koenig <tkoenig@gcc.gnu.org>
234 * dependency.h: Add prototype for gfc_are_identical_variables.
235 * frontend-passes.c: Include depencency.h.
236 (optimimize_equality): Use gfc_are_identical_variables.
237 * dependency.c (identical_array_ref): New function.
238 (gfc_are_identical_variables): New function.
239 (gfc_deb_compare_expr): Use gfc_are_identical_variables.
240 * dependency.c (gfc_check_section_vs_section). Rename gfc_
241 prefix from statc function.
242 (check_section_vs_section): Change arguments to gfc_array_ref,
243 adjust function body accordingly.
245 2010-08-02 Mikael Morin <mikael@gcc.gnu.org>
246 Janus Weil <janus@gcc.gnu.org>
251 * intrinsic.c (gfc_get_intrinsic_sub_symbol): Commit changed symbol.
252 * symbol.c (gen_cptr_param, gen_fptr_param, gen_shape_param,
253 gfc_copy_formal_args, gfc_copy_formal_args_intr,
254 gfc_copy_formal_args_ppc, generate_isocbinding_symbol): Ditto.
255 * parse.c (parse_derived_contains, parse_spec, parse_progunit):
256 Call reject_statement in case of error.
257 (match_deferred_characteritics): Call gfc_undo_symbols in case match
260 2010-08-01 Janus Weil <janus@gcc.gnu.org>
263 * class.c (gfc_build_class_symbol): Make '$vptr' component private.
264 (gfc_find_derived_vtab): Make vtabs and vtypes public.
265 * module.c (read_module): When reading module files, always import
266 vtab and vtype symbols.
268 2010-07-31 Mikael Morin <mikael@gcc.gnu.org>
272 * symbol.c (changed_syms): Made non-static.
273 * parse.c (changed_syms): Declare new external.
274 (next_statement): Assert changed_syms is NULL at the beginning.
276 2010-07-30 Janus Weil <janus@gcc.gnu.org>
277 Steven G. Kargl <kargl@gcc.gnu.org>
280 * match.c (match_type_spec): Try to parse derived types before
283 2010-07-30 Mikael Morin <mikael@gcc.gnu.org>
285 * gfortran.h (gfc_release_symbol): New prototype.
286 * symbol.c (gfc_release_symbol): New. Code taken from free_sym_tree.
287 (gfc_undo_symbols, free_sym_tree, gfc_free_finalizer):
288 Use gfc_release_symbol.
289 * parse.c (gfc_fixup_sibling_symbols): Ditto.
290 * resolve.c (resolve_symbol): Ditto.
292 2010-07-29 Tobias Burnus <burnus@net-b.de>
296 * trans-decl.c (gfc_get_extern_function_decl): Correctly handle
297 external procedure declarations in modules.
298 (gfc_get_symbol_decl): Modify assert.
300 2010-07-29 Janus Weil <janus@gcc.gnu.org>
303 * resolve.c (resolve_fl_derived): Call gfc_resolve_array_spec.
305 2010-07-29 Janus Weil <janus@gcc.gnu.org>
308 * trans-stmt.h (gfc_trans_class_init_assign): New prototype.
309 (gfc_trans_class_assign): Modified prototype.
310 * trans.h (gfc_conv_intrinsic_move_alloc): New prototype.
311 * trans-expr.c (gfc_trans_class_init_assign): Split off from ...
312 (gfc_trans_class_assign): ... here. Modified actual arguments.
313 * trans-intrinsic.c (gfc_conv_intrinsic_move_alloc): New function to
314 handle the MOVE_ALLOC intrinsic with scalar and class arguments.
315 * trans.c (trans_code): Call 'gfc_conv_intrinsic_move_alloc'.
317 2010-07-29 Mikael Morin <mikael@gcc.gnu.org>
321 * class.c (gfc_find_derived_vtab): Accept or discard newly created
322 symbols before returning.
324 2010-07-29 Joseph Myers <joseph@codesourcery.com>
326 * lang.opt (cpp): Remove Joined and Separate markers.
327 (cpp=): New internal option.
328 * lang-specs.h (F951_CPP_OPTIONS): Generate -cpp= option.
329 * cpp.c (gfc_cpp_handle_option): Handle OPT_cpp_ instead of
332 2010-07-29 Daniel Kraft <d@domob.eu>
335 * array.c (resolve_array_bound): Fix error message to properly handle
336 non-variable expressions.
338 2010-07-28 Mikael Morin <mikael@gcc.gnu.org>
340 * decl.c (free_value): Also free repeat field.
341 * data.c (gfc_assign_data_value): Always free offset before returning.
343 2010-07-28 Daniel Kraft <d@domob.eu>
345 * gfortran.h (gfc_build_intrinsic_call): New method.
346 * expr.c (gfc_build_intrinsic_call): New method.
347 * simplify.c (range_check): Ignore non-constant value.
348 (simplify_bound_dim): Handle non-variable expressions and
349 fix memory leak with non-free'ed expression.
350 (simplify_bound): Handle non-variable expressions.
351 (gfc_simplify_shape): Ditto.
352 (gfc_simplify_size): Ditto, but only in certain cases possible.
354 2010-07-28 Joseph Myers <joseph@codesourcery.com>
356 * gfortranspec.c (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG):
359 2010-07-28 Tobias Burnus <burnus@net-b.de>
362 * trans-types.c (gfc_get_derived_type): Fix DT declaration
363 from modules for whole-file mode.
365 2010-07-27 Joseph Myers <joseph@codesourcery.com>
367 * gfortran.h (gfc_handle_option): Update prototype and return
369 * options.c (gfc_handle_option): Update prototype and return value
372 2010-07-27 Joseph Myers <joseph@codesourcery.com>
374 * cpp.c (gfc_cpp_init_options): Update prototype. Use number of
375 decoded options in allocating deferred_opt.
376 * cpp.h (gfc_cpp_init_options): Update prototype.
377 * f95-lang.c (LANG_HOOKS_OPTION_LANG_MASK): Define.
378 * gfortran.h (gfc_option_lang_mask): New.
379 (gfc_init_options): Update prototype.
380 * options.c (gfc_option_lang_mask): New.
381 (gfc_init_options): Update prototype. Pass new arguments to
382 gfc_cpp_init_options.
384 2010-07-26 Tobias Burnus <burnus@net-b.de>
387 * trans-decl.c (gfc_get_extern_function_decl): Fix generation
388 for functions which are later in the same file.
389 (gfc_create_function_decl, build_function_decl,
390 build_entry_thunks): Add global argument.
391 * trans.c (gfc_generate_module_code): Update
392 gfc_create_function_decl call.
393 * trans.h (gfc_create_function_decl): Update prototype.
394 * resolve.c (resolve_global_procedure): Also resolve for
397 2010-07-26 Richard Henderson <rth@redhat.com>
400 * f95-lang.c (LANG_HOOKS_WRITE_GLOBALS): New.
401 (gfc_write_global_declarations): New.
403 2010-07-26 Tobias Burnus <burnus@net-b.de>
406 * trans-io.c (build_dt): Use NULL_TREE rather than NULL
407 for call to transfer_namelist_element.
408 * trans-decl.c (gfc_get_symbol_decl): Also set sym->backend_decl
411 2010-07-25 Thomas Koenig <tkoenig@gcc.gnu.org>
414 * Make-lang.in: Add fortran/frontend-passes.o.
415 * gfortran.h: Add prototype for gfc_run_passes.
416 * resolve.c (gfc_resolve): Call gfc_run_passes.
417 * frontend-passes.c: New file.
419 2010-07-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>
422 * scanner.c (gfc_next_char_literal): Enable truncation warning for
425 2010-07-25 Mikael Morin <mikael@gcc.gnu.org>
428 * gfortran.h (gfc_namespace): New field old_equiv.
429 (gfc_free_equiv_until): New prototype.
430 * match.c (gfc_free_equiv_until): New, renamed from gfc_free_equiv with
431 a parameterized stop condition.
432 (gfc_free_equiv): Use gfc_free_equiv_until.
433 * parse.c (next_statement): Save equivalence list.
434 (reject_statement): Restore equivalence list.
436 2010-07-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>
439 * scanner.c (gfc_next_char_literal): Move check for truncation earlier
440 in the function so that it does not get missed by early exits.
441 (load_line): Add checks for quoted strings and free form comments to
442 disable warnings on comments. Add check for ampersand as first
443 character after truncation and don't warn for this case, but warn if
444 there are subsequent non-whitespace characters.
446 2010-07-24 Tobias Burnus <burnus@net-b.de>
449 * parse.c (gfc_parse_file): Do not override
450 gfc_global_ns_list items.
452 2010-07-24 Tobias Burnus <burnus@net-b.de>
454 * options.c (gfc_init_options): Enable -fwhole-file by default.
455 * interface.c (compare_parameter): Assume a Hollerith constant is
456 compatible with all other argument types.
458 2010-07-23 Tobias Burnus <burnus@net-b.de>
461 * trans-decl.c (gfc_get_symbol_decl): Use module decl with
462 -fwhole-file also for derived types.
463 * trans-types.c (copy_dt_decls_ifequal): Remove static and
464 rename to gfc_copy_dt_decls_ifequal.
465 (gfc_get_derived_type): Update call.
466 * trans-types.h (gfc_copy_dt_decls_ifequal): Add prototype.
468 2010-07-23 Tobias Burnus <burnus@net-b.de>
471 * resolve.c (resolve_global_procedure): Properly handle ENTRY.
473 2010-07-23 Jakub Jelinek <jakub@redhat.com>
475 * trans-types.c (gfc_get_array_descriptor_base,
476 gfc_get_array_type_bounds): Set TYPE_NAMELESS.
477 * trans-decl.c (gfc_build_qualified_array): Set DECL_NAMELESS
478 instead of clearing DECL_NAME.
479 (gfc_build_dummy_array_decl): Set DECL_NAMELESS.
481 2009-07-23 Paul Thomas <pault@gcc.gnu.org>
484 * trans-array.c (gfc_init_loopinfo): Initialize the reverse
486 gfc_trans_scalarized_loop_end: If reverse set in dimension n,
487 reverse the scalarization loop.
488 gfc_conv_resolve_dependencies: Pass the reverse field of the
489 loopinfo to gfc_dep_resolver.
490 trans-expr.c (gfc_trans_assignment_1): Enable loop reversal for
491 assignment by resetting loop.reverse.
492 gfortran.h : Add the gfc_reverse enum.
493 trans.h : Add the reverse field to gfc_loopinfo.
494 dependency.c (gfc_check_dependency): Pass null to the new arg
496 (gfc_check_section_vs_section): Check for reverse dependencies.
497 (gfc_dep_resolver): Add reverse argument and deal with the loop
499 dependency.h : Modify prototype for gfc_dep_resolver to include
502 2010-07-23 Daniel Kraft <d@domob.eu>
505 * gfortran.h (gfc_find_symtree_in_proc): New method.
506 * symbol.c (gfc_find_symtree_in_proc): New method.
507 * match.c (match_exit_cycle): Look for loop name also in parent
508 namespaces within current procedure.
510 2010-07-22 Tobias Burnus <burnus@net-b.de>
513 * dependency.c (gfc_check_dependency): Add argument alising check.
514 * symbol.c (gfc_symbols_could_alias): Add argument alising check.
516 2010-07-22 Daniel Kraft <d@domob.eu>
518 * trans-stmt.c (gfc_trans_return): Put back in the handling of se.post,
519 now in the correct place.
521 2010-07-21 Steven G. Kargl <kargl@gcc.gnu.org>
524 * Revert my commit r162325.
526 2010-07-21 Daniel Kraft <d@domob.eu>
528 * trans.h (gfc_get_return_label): Removed.
529 (gfc_generate_return): New method.
530 (gfc_trans_deferred_vars): Update gfc_wrapped_block rather than
531 returning a tree directly.
532 * trans-stmt.c (gfc_trans_return): Use `gfc_generate_return'.
533 (gfc_trans_block_construct): Update for new interface to
534 `gfc_trans_deferred_vars'.
535 * trans-decl.c (current_function_return_label): Removed.
536 (current_procedure_symbol): New variable.
537 (gfc_get_return_label): Removed.
538 (gfc_trans_deferred_vars): Update gfc_wrapped_block rather than
539 returning a tree directly.
540 (get_proc_result), (gfc_generate_return): New methods.
541 (gfc_generate_function_code): Clean up and do init/cleanup here
542 also with gfc_wrapped_block. Remove return-label but rather
545 2010-07-19 Steven G. Kargl <kargl@gcc.gnu.org>
548 * fortran/match.c (match_type_spec): Check for derived type before
551 2010-07-19 Paul Thomas <pault@gcc.gnu.org>
554 * interface.c (matching_typebound_op): Add argument for the
555 return of the generic name for the procedure.
556 (build_compcall_for_operator): Add an argument for the generic
557 name of an operator procedure and supply it to the expression.
558 (gfc_extend_expr, gfc_extend_assign): Use the generic name in
559 calls to the above procedures.
560 * resolve.c (resolve_typebound_function): Catch procedure
561 component calls for CLASS objects, check that the vtable is
562 complete and insert the $vptr and procedure components, to make
564 (resolve_typebound_function): The same.
565 * trans-decl.c (gfc_trans_deferred_vars): Do not deallocate
566 an allocatable scalar if it is a result.
568 2010-07-19 Paul Thomas <pault@gcc.gnu.org>
571 * match.c (gfc_match_iterator): Reverted.
573 2010-07-18 Paul Thomas <pault@gcc.gnu.org>
576 * match.c (gfc_match_iterator): Remove error that iterator
577 cannot be INTENT(IN).
579 2010-07-17 Mikael Morin <mikael@gcc.gnu.org>
581 * trans-array.c (gfc_free_ss): Don't free beyond ss rank.
582 Access subscript through the "dim" field index.
583 (gfc_trans_create_temp_array): Access ss info through the "dim" field
585 (gfc_conv_array_index_offset): Ditto.
586 (gfc_conv_loop_setup): Ditto.
587 (gfc_conv_expr_descriptor): Ditto.
588 (gfc_conv_ss_startstride): Ditto. Update call to
589 gfc_conv_section_startstride.
590 (gfc_conv_section_startstride): Set values along the array dimension.
591 Get array dimension directly from the argument.
593 2010-07-15 Jakub Jelinek <jakub@redhat.com>
595 * trans.h (gfc_string_to_single_character): New prototype.
596 * trans-expr.c (string_to_single_character): Renamed to ...
597 (gfc_string_to_single_character): ... this. No longer static.
598 (gfc_conv_scalar_char_value, gfc_build_compare_string,
599 gfc_trans_string_copy): Adjust callers.
600 * config-lang.in (gtfiles): Add fortran/trans-stmt.c.
601 * trans-stmt.c: Include ggc.h and gt-fortran-trans-stmt.h.
602 (select_struct): Move to toplevel, add GTY(()).
603 (gfc_trans_character_select): Optimize SELECT CASE
604 with character length 1.
606 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
608 * f95-lang.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
609 * trans-common.c: Likewise.
610 * trans-decl.c: Likewise.
611 * trans-types.c: Likewise.
614 2010-07-15 Janus Weil <janus@gcc.gnu.org>
617 * resolve.c (resolve_typebound_generic_call): Resolve generic
618 non-polymorphic type-bound procedure calls to the correct specific
620 (resolve_typebound_subroutine): Remove superfluous code.
622 2010-07-15 Daniel Kraft <d@domob.eu>
625 * trans.h (struct gfc_wrapped_block): New struct.
626 (gfc_start_wrapped_block), (gfc_add_init_cleanup): New methods.
627 (gfc_finish_wrapped_block): New method.
628 (gfc_init_default_dt): Add new init code to block rather than
630 * trans-array.h (gfc_trans_auto_array_allocation): Use gfc_wrapped_block
631 (gfc_trans_dummy_array_bias): Ditto.
632 (gfc_trans_g77_array): Ditto.
633 (gfc_trans_deferred_array): Ditto.
634 * trans.c (gfc_add_expr_to_block): Call add_expr_to_chain.
635 (add_expr_to_chain): New method based on old gfc_add_expr_to_block.
636 (gfc_start_wrapped_block), (gfc_add_init_cleanup): New methods.
637 (gfc_finish_wrapped_block): New method.
638 * trans-array.c (gfc_trans_auto_array_allocation): use gfc_wrapped_block
639 (gfc_trans_g77_array), (gfc_trans_dummy_array_bias): Ditto.
640 (gfc_trans_deferred_array): Ditto.
641 * trans-decl.c (gfc_trans_dummy_character): Ditto.
642 (gfc_trans_auto_character_variable), (gfc_trans_assign_aux_var): Ditto.
643 (init_intent_out_dt): Ditto.
644 (gfc_init_default_dt): Add new init code to block rather than
646 (gfc_trans_deferred_vars): Use gfc_wrapped_block to collect all init
647 and cleanup code and put it all together.
649 2010-07-15 Jakub Jelinek <jakub@redhat.com>
651 * trans.h (gfc_build_compare_string): Add CODE argument.
652 * trans-intrinsic.c (gfc_conv_intrinsic_strcmp): Pass OP to
653 gfc_build_compare_string.
654 * trans-expr.c (gfc_conv_expr_op): Pass CODE to
655 gfc_build_compare_string.
656 (string_to_single_character): Rename len variable to length.
657 (gfc_optimize_len_trim): New function.
658 (gfc_build_compare_string): Add CODE argument. If it is EQ_EXPR
659 or NE_EXPR and one of the strings is string literal with LEN_TRIM
660 bigger than the length of the other string, they compare unequal.
663 * trans-stmt.c (gfc_trans_character_select): Always use NULL for high
664 in CASE_LABEL_EXPR and use NULL for low for the default case.
666 2010-07-14 Mikael Morin <mikael@gcc.gnu.org>
668 * trans-array.c (gfc_conv_section_upper_bound): Remove
669 (gfc_conv_section_startstride): Don't set the upper bound in the
670 vector subscript case.
671 (gfc_conv_loop_setup): Don't use gfc_conv_section_upper_bound
673 2010-07-14 Janus Weil <janus@gcc.gnu.org>
676 * gfortran.h (gfc_is_data_pointer): Remove prototype.
677 * dependency.c (gfc_is_data_pointer): Make it static.
678 * intrinsic.texi: Update documentation on C_LOC.
679 * resolve.c (gfc_iso_c_func_interface): Fix pointer and target checks
680 and add a check for polymorphic variables.
682 2010-07-14 Jakub Jelinek <jakub@redhat.com>
684 * trans-expr.c (string_to_single_character): Also optimize
685 string literals containing a single char followed only by spaces.
686 (gfc_trans_string_copy): Remove redundant string_to_single_character
689 * trans-decl.c (gfc_build_intrinsic_function_decls,
690 gfc_build_builtin_function_decls): Mark functions as
691 DECL_PURE_P or TREE_READONLY.
693 2010-07-13 Nathan Froyd <froydnj@codesourcery.com>
695 * trans-decl.c (build_entry_thunks): Call build_call_expr_loc_vec
696 instead of build_function_call_expr.
697 * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Likewise.
699 2010-07-13 Tobias Burnus <burnus@net-b.de>
700 Daniel Franke <franke.daniel@gmail.com>
703 * trans.h (gfc_build_library_function_decl_with_spec): New prototype.
704 * trans-decl.c (gfc_build_library_function_decl_with_spec): Removed
706 * trans-io (gfc_build_io_library_fndecls): Add "fn spec" annotations.
708 2010-07-13 Daniel Franke <franke.daniel@gmail.com>
709 Tobias Burnus <burnus@net-b.de>
712 * trans-decl.c (gfc_build_intrinsic_function_decls): Add
713 noclobber/noescape annotations to function calls.
714 (gfc_build_builtin_function_decls): Likewise.
716 2010-07-13 Janus Weil <janus@gcc.gnu.org>
722 * gfortran.h (gfc_find_derived_vtab): Modified prototype.
723 * class.c (gfc_build_class_symbol): Modified call to
724 'gfc_find_derived_vtab'.
725 (add_proc_component): Removed, moved code into 'add_proc_comp'.
726 (add_proc_comps): Renamed to 'add_proc_comp', removed treatment of
728 (add_procs_to_declared_vtab1): Removed unnecessary argument 'resolved'.
729 Removed treatment of generics.
730 (copy_vtab_proc_comps): Removed unnecessary argument 'resolved'.
731 Call 'add_proc_comp' instead of duplicating code.
732 (add_procs_to_declared_vtab): Removed unnecessary arguments 'resolved'
734 (add_generic_specifics,add_generics_to_declared_vtab): Removed.
735 (gfc_find_derived_vtab): Removed unnecessary argument 'resolved'.
736 Removed treatment of generics.
737 * iresolve.c (gfc_resolve_extends_type_of): Modified call to
738 'gfc_find_derived_vtab'.
739 * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
740 Removed treatment of generics.
741 (resolve_select_type,resolve_fl_derived): Modified call to
742 'gfc_find_derived_vtab'.
743 * trans-decl.c (gfc_get_symbol_decl): Ditto.
744 * trans-expr.c (gfc_conv_derived_to_class,gfc_trans_class_assign):
746 * trans-stmt.c (gfc_trans_allocate): Ditto.
748 2010-07-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
751 * trans-io.c (build_dt): Set common.unit to flag chracter(kind=4)
754 2010-07-12 Mikael Morin <mikael@gcc.gnu.org>
756 * expr.c (gfc_get_int_expr): Don't initialize mpfr data twice.
757 * resolve.c (build_default_init_expr): Ditto.
759 2010-07-11 Tobias Burnus <burnus@net-b.de>
762 * module.c (sort_iso_c_rename_list): Remove.
763 (import_iso_c_binding_module,use_iso_fortran_env_module):
764 Allow multiple imports of the same symbol.
766 2010-07-11 Mikael Morin <mikael@gcc.gnu.org>
768 * arith.c (gfc_arith_done_1): Release mpfr internal caches.
770 2010-07-11 Janus Weil <janus@gcc.gnu.org>
773 * decl.c (build_sym,attr_decl1): Only build the class container if the
774 symbol has sufficient attributes.
775 * expr.c (gfc_check_pointer_assign): Use class_pointer instead of
776 pointer attribute for classes.
777 * match.c (gfc_match_allocate,gfc_match_deallocate): Ditto.
778 * module.c (MOD_VERSION): Bump.
779 (enum ab_attribute,attr_bits): Add AB_CLASS_POINTER.
780 (mio_symbol_attribute): Handle class_pointer attribute.
781 * parse.c (parse_derived): Use class_pointer instead of pointer
782 attribute for classes.
783 * primary.c (gfc_variable_attr,gfc_expr_attr): Ditto.
784 * resolve.c (resolve_structure_cons,resolve_deallocate_expr,
785 resolve_allocate_expr,resolve_fl_derived): Ditto.
786 (resolve_fl_var_and_proc): Check for class_ok attribute.
788 2010-07-10 Mikael Morin <mikael@gcc.gnu.org>
790 * trans-io.c (gfc_build_st_parameter): Update calls to
791 gfc_add_field_to_struct.
792 * trans-stmt.c (ADD_FIELD): Ditto.
794 (gfc_get_derived_type): Ditto. Don't create backend_decl for C_PTR's
796 (gfc_add_field_to_struct_1): Set TYPE_FIELDS(context) instead of
797 fieldlist, remove fieldlist from argument list.
798 (gfc_add_field_to_struct): Update call to gfc_add_field_to_struct_1
799 and remove fieldlist from argument list.
800 (gfc_get_desc_dim_type, gfc_get_array_descriptor_base,
801 gfc_get_mixed_entry_union): Move setting
802 TYPE_FIELDS to gfc_add_field_to_struct_1 and update calls to it.
803 * trans-types.h (gfc_add_field_to_struct): Update prototype.
805 2010-07-10 Paul Thomas <pault@gcc.gnu.org>
808 * trans-expr.c (arrayfunc_assign_needs_temporary): No temporary
809 if the lhs has never been host associated, as well as not being
810 use associated, a pointer or a target.
811 * resolve.c (resolve_variable): Mark variables that are host
813 * gfortran.h: Add the host_assoc bit to the symbol_attribute
816 2010-07-09 Janus Weil <janus@gcc.gnu.org>
818 * intrinsic.texi: Add documentation for SAME_TYPE_AS, EXTENDS_TYPE_OF,
819 STORAGE_SIZE, C_NULL_PTR and C_NULL_FUNPTR. Modify documentation of
822 2010-07-08 Janus Weil <janus@gcc.gnu.org>
825 * gfortran.h (gfc_isym_id): Add GFC_ISYM_C_SIZEOF,GFC_ISYM_STORAGE_SIZE.
826 * intrinsic.h (gfc_check_c_sizeof,gfc_check_storage_size,
827 gfc_resolve_storage_size): New prototypes.
828 * check.c (gfc_check_c_sizeof,gfc_check_storage_size): New functions.
829 * intrinsic.c (add_functions): Add STORAGE_SIZE.
830 * iresolve.c (gfc_resolve_storage_size): New function.
831 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Handle polymorphic
833 (gfc_conv_intrinsic_storage_size): New function.
834 (gfc_conv_intrinsic_function): Handle STORAGE_SIZE.
836 2010-07-08 Jakub Jelinek <jakub@redhat.com>
839 * match.c (match_exit_cycle): Error on EXIT also from collapsed
840 !$omp do loops. Error on CYCLE to non-innermost collapsed
843 2010-07-08 Tobias Burnus <burnus@net-b.de>
846 * array.c (gfc_match_array_ref): Better error message for
847 coarrays with too few ranks.
848 (match_subscript): Move one diagnostic to caller.
849 * gfortran.h (gfc_get_corank): Add prottype.
850 * expr.c (gfc_get_corank): New function.
851 * iresolve.c (resolve_bound): Fix rank for cobounds.
852 (gfc_resolve_lbound,gfc_resolve_lcobound, gfc_resolve_ubound,
853 gfc_resolve_ucobound, gfc_resolve_this_image): Update
856 2010-07-06 Tobias Burnus <burnus@net-b.de>
859 * array.c (gfc_expand_constructor): Add optional diagnostic.
860 * gfortran.h (gfc_expand_constructor): Update prototype.
861 * expr.c (gfc_simplify_expr, check_init_expr,
862 gfc_reduce_init_expr): Update gfc_expand_constructor call.
863 * resolve.c (gfc_resolve_expr): Ditto.
865 2010-07-06 Tobias Burnus <burnus@net-b.de>
867 * trans-decl.c: Include diagnostic-core.h besides toplev.h.
868 * trans-intrinsic.c: Ditto.
869 * trans-types.c: Ditto.
870 * convert.c: Include diagnostic-core.h instead of toplev.h.
872 * trans-array.c: Ditto.
873 * trans-const.c: Ditto.
874 * trans-expr.c: Ditto.
876 * trans-openmp.c: Ditto.
879 2010-07-06 Thomas Koenig <tkoenig@gcc.gnu.org>
882 * check.c (dim_rank_check): Also check intrinsic functions.
883 Adjust permissible rank for functions which reduce the rank of
884 their argument. Spread is an exception, where DIM can
885 be one larger than the rank of array.
887 2010-07-05 Steven G. Kargl <kargl@gcc.gnu.org>
890 * fortran/io.c (resolve_tag): Check EXIST tag is a default logical.
892 2010-07-05 Paul Thomas <pault@gcc.gnu.org>
895 * trans-types.c (gfc_get_derived_type): Derived type fields
896 with the vtype attribute must have TYPE_REF_CAN_ALIAS_ALL set
897 but build_pointer_type_for_mode must be used for this.
899 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
901 * trans.h (gfc_conv_procedure_call): Take a VEC instead of a tree.
902 * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Adjust for new
903 type of gfc_conv_procedure_call.
904 (conv_generic_with_optional_char_arg): Likewise.
905 * trans-stmt.c (gfc_trans_call): Likewise.
906 * trans-expr.c (gfc_conv_function_expr): Likewise.
907 (gfc_conv_procedure_call): Use build_call_vec instead of
910 2010-07-04 Daniel Kraft <d@domob.eu>
912 * gfc-internals.texi (gfc_code): Document BLOCK and ASSOCIATE.
914 2010-07-04 Paul Thomas <pault@gcc.gnu.org>
918 * trans-types.c (gfc_get_derived_type): Derived type fields
919 with the vtype attribute must have TYPE_REF_CAN_ALIAS_ALL set.
921 2010-07-02 Mikael Morin <mikael@gcc.gnu.org>
924 * decl.c (match_procedure_in_type): Clear structure before using.
925 (gfc_match_generic): Ditto.
927 2010-07-02 Nathan Froyd <froydnj@codesourcery.com>
929 * trans-types.h (gfc_add_field_to_struct): Add tree ** parameter.
930 * trans-types.c (gfc_add_field_to_struct_1): New function, most
931 of which comes from...
932 (gfc_add_field_to_struct): ...here. Call it. Add new parameter.
933 (gfc_get_desc_dim_type): Call gfc_add_field_to_struct_1 for
935 (gfc_get_array_descriptor_base): Likewise.
936 (gfc_get_mixed_entry_union): Likewise.
937 (gfc_get_derived_type): Add extra chain parameter for
938 gfc_add_field_to_struct.
939 * trans-stmt.c (gfc_trans_character_select): Likewise.
940 * trans-io.c (gfc_build_st_parameter): Likewise.
942 2010-06-29 Janus Weil <janus@gcc.gnu.org>
945 * resolve.c (is_external_proc): Prevent procedure pointers from being
946 regarded as external procedures.
948 2010-06-29 Janus Weil <janus@gcc.gnu.org>
951 * trans-intrinsic.c (gfc_conv_associated): Handle polymorphic variables
952 passed as second argument of ASSOCIATED.
954 2010-06-29 Paul Thomas <pault@gcc.gnu.org>
957 * trans-expr.c (arrayfunc_assign_needs_temporary): New function
958 to determine if a function assignment can be made without a
960 (gfc_trans_arrayfunc_assign): Move all the conditions that
961 suppress the direct function call to the above new functon and
964 2010-06-28 Paul Thomas <pault@gcc.gnu.org>
967 * interface.c (argument_rank_mismatch): New function.
968 (compare_parameter): Call new function instead of generating
971 2010-06-28 Nathan Froyd <froydnj@codesourcery.com>
973 * trans-openmp.c (dovar_init): Define. Define VECs containing it.
974 (gfc_trans_omp_do): Use a VEC to accumulate variables and their
977 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
979 * Make-lang.in: Update dependencies.
981 2010-06-27 Nathan Froyd <froydnj@codesourcery.com>
983 * gfortran.h (gfc_code): Split backend_decl field into cycle_label
984 and exit_label fields.
985 * trans-openmp.c (gfc_trans_omp_do): Assign to new fields
987 * trans-stmt.c (gfc_trans_simple_do): Likewise.
988 (gfc_trans_do): Likewise.
989 (gfc_trans_do_while): Likewise.
990 (gfc_trans_cycle): Use cycle_label directly.
991 (gfc_trans_exit): Use exit_label directly.
993 2010-06-27 Daniel Kraft <d@domob.eu>
995 * dump-parse-tree.c (show_symbol): Dump target-expression for
997 (show_code_node): Make distinction between BLOCK and ASSOCIATE.
998 (show_namespace): Use show_level for correct indentation of
999 "inner namespaces" (contained procedures or BLOCK).
1001 2010-06-27 Thomas Koenig <tkoenig@gcc.gnu.org>
1004 * dump-parse-tree.c (show_code_node): Show namespace for
1007 2010-06-26 Tobias Burnus <burnus@net-b.de>
1009 * decl.c (gfc_match_decl_type_spec): Support
1010 TYPE(intrinsic-type-spec).
1012 2010-06-25 Tobias Burnus <burnus@net-b.de>
1014 * intrinsic.h (gfc_check_selected_real_kind,
1015 gfc_simplify_selected_real_kind): Update prototypes.
1016 * intrinsic.c (add_functions): Add radix support to
1018 * check.c (gfc_check_selected_real_kind): Ditto.
1019 * simplify.c (gfc_simplify_selected_real_kind): Ditto.
1020 * trans-decl.c (gfc_build_intrinsic_function_decls):
1021 Change call from selected_real_kind to selected_real_kind2008.
1022 * intrinsic.texi (SELECTED_REAL_KIND): Update for radix.
1023 (PRECISION, RANGE, RADIX): Add cross @refs.
1025 2010-06-25 Tobias Burnus <burnus@net-b.de>
1027 * decl.c (gfc_match_entry): Mark ENTRY as GFC_STD_F2008_OBS.
1028 * gfortran.texi (_gfortran_set_options): Update for
1029 GFC_STD_F2008_OBS addition.
1030 * libgfortran.h: Add GFC_STD_F2008_OBS.
1031 * options.c (set_default_std_flags, gfc_handle_option): Handle
1033 io.c (check_format): Fix allow_std check.
1035 2010-06-25 Tobias Burnus <burnus@net-b.de>
1037 * decl.c (gfc_match_entry): Allow END besides
1038 END SUBROUTINE/END FUNCTION for contained procedures.
1040 2010-06-25 Tobias Burnus <burnus@net-b.de>
1042 * parse.c (next_free, next_fixed): Allow ";" as first character.
1044 2010-06-24 Tobias Burnus <burnus@net-b.de>
1047 * decl.c (variable_decl): Fix IMPORT diagnostic for CLASS.
1049 2010-06-22 Janus Weil <janus@gcc.gnu.org>
1052 * resolve.c (resolve_fl_derived): Avoid checking for abstract on class
1055 2010-06-21 Tobias Burnus <burnus@net-b.de>
1058 * interface.c (compare_parameter): Add gfc_is_simply_contiguous
1060 * symbol.c (gfc_add_contiguous): New function.
1061 (gfc_copy_attr, check_conflict): Handle contiguous attribute.
1062 * decl.c (match_attr_spec): Ditto.
1063 (gfc_match_contiguous): New function.
1064 * resolve.c (resolve_fl_derived, resolve_symbol): Handle
1066 * gfortran.h (symbol_attribute): Add contiguous.
1067 (gfc_is_simply_contiguous): Add prototype.
1068 (gfc_add_contiguous): Add prototype.
1069 * match.h (gfc_match_contiguous): Add prototype.
1070 * parse.c (decode_specification_statement,
1071 decode_statement): Handle contiguous attribute.
1072 * expr.c (gfc_is_simply_contiguous): New function.
1073 * dump-parse-tree.c (show_attr): Handle contiguous.
1074 * module.c (ab_attribute, attr_bits, mio_symbol_attribute):
1076 * trans-expr.c (gfc_add_interface_mapping): Copy
1078 * trans-array.c (gfc_conv_descriptor_stride_get,
1079 gfc_conv_array_parameter): Handle contiguous arrays.
1080 * trans-types.c (gfc_build_array_type, gfc_build_array_type,
1081 gfc_sym_type, gfc_get_derived_type, gfc_get_array_descr_info):
1083 * trans.h (gfc_array_kind): Ditto.
1084 * trans-decl.c (gfc_get_symbol_decl): Ditto.
1086 2010-06-20 Joseph Myers <joseph@codesourcery.com>
1088 * options.c (gfc_handle_option): Don't handle N_OPTS.
1090 2010-06-19 Janus Weil <janus@gcc.gnu.org>
1093 * resolve.c (resolve_fl_derived): Reverse ordering of conditions
1096 2010-06-18 Tobias Burnus <burnus@net-b.de>
1099 * resolve.c (resolve_allocate_deallocate): Properly check
1100 part-refs in stat=/errmsg= for invalid use.
1102 2010-06-17 Janus Weil <janus@gcc.gnu.org>
1105 * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
1106 Return directly in case of an error.
1108 2010-06-16 Janus Weil <janus@gcc.gnu.org>
1111 * gfortran.h (gfc_get_typebound_proc): Modified Prototype.
1112 * decl.c (match_procedure_in_type): Give a unique gfc_typebound_proc
1113 structure to each procedure in a procedure list.
1114 * module.c (mio_typebound_proc): Add NULL argument to
1115 'gfc_get_typebound_proc'.
1116 * symbol.c (gfc_get_typebound_proc): Add a new argument, which is used
1117 to initialize the new structure.
1119 2010-06-15 Janus Weil <janus@gcc.gnu.org>
1122 * gfortran.h (gfc_expr): Add new member 'mold'.
1123 * match.c (gfc_match_allocate): Implement the MOLD tag.
1124 * resolve.c (resolve_allocate_expr): Ditto.
1125 * trans-stmt.c (gfc_trans_allocate): Ditto.
1127 2010-06-15 Jakub Jelinek <jakub@redhat.com>
1130 * trans-openmp.c (gfc_omp_predetermined_sharing): Don't return
1131 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with
1132 GFC_DECL_SAVED_DESCRIPTOR set.
1133 (gfc_omp_report_decl): New function.
1134 * trans.h (gfc_omp_report_decl): New prototype.
1135 * f95-lang.c (LANG_HOOKS_OMP_REPORT_DECL): Redefine.
1137 2010-06-13 Daniel Franke <franke.daniel@gmail.com>
1141 * gfortranspec.c (lang_specific_driver): Removed deprecation
1143 * lang.opt: Add options -M, -MM, -MD, -MMD, -MF, -MG, -MP, -MT, -MQ.
1144 * lang-specs.h (CPP_FORWARD_OPTIONS): Add -M* options.
1145 * cpp.h (gfc_cpp_makedep): New.
1146 (gfc_cpp_add_dep): New.
1147 (gfc_cpp_add_target): New.
1148 * cpp.c (gfc_cpp_option): Add deps* members.
1149 (gfc_cpp_makedep): New.
1150 (gfc_cpp_add_dep): New.
1151 (gfc_cpp_add_target): New.
1152 (gfc_cpp_init_options): Initialize new options.
1153 (gfc_cpp_handle_option): Handle new options.
1154 (gfc_cpp_post_options): Map new options to libcpp-options.
1155 (gfc_cpp_init): Handle deferred -MQ and -MT options.
1156 (gfc_cpp_done): If requested, write dependencies to file.
1157 * module.c (gfc_dump_module): Add a module filename as target.
1158 * scanner.c (open_included_file): New parameter system; add the
1159 included file as dependency.
1160 (gfc_open_included_file): Add the included file as dependency.
1161 (gfc_open_intrinsic_module): Likewise.
1162 * invoke.texi: Removed deprecation warning for -M.
1163 * gfortran.texi: Removed Makefile-dependencies project.
1165 2010-06-12 Daniel Franke <franke.daniel@gmail.com>
1167 * resolve.c (resolve_global_procedure): Improved checking if an
1168 explicit interface is required.
1170 2010-06-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1172 * trans-decl.c (gfc_build_intrinsic_function_decls): Fix
1174 * trans-intrinsic.c (gfc_conv_intrinsic_fdate): Fix argument type.
1175 (gfc_conv_intrinsic_ttynam): Likewise.
1176 (gfc_conv_intrinsic_trim): Likewise.
1178 2010-06-12 Janus Weil <janus@gcc.gnu.org>
1181 * decl.c (match_procedure_in_type): Allow procedure lists (F08).
1183 2010-06-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1185 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Fix comment.
1187 2010-06-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1189 * mathbuiltins.def: Add builtins that do not directly correspond
1190 to a Fortran intrinsic, with new macro OTHER_BUILTIN.
1191 * f95-lang.c (gfc_init_builtin_functions): Define OTHER_BUILTIN.
1192 * trans-intrinsic.c (gfc_intrinsic_map_t): Remove
1193 code_{r,c}{4,8,10,16} fields. Add
1194 {,complex}{float,double,long_double}_built_in fields.
1195 (gfc_intrinsic_map): Adjust definitions of DEFINE_MATH_BUILTIN,
1196 DEFINE_MATH_BUILTIN_C and LIB_FUNCTION accordingly. Add
1197 definition of OTHER_BUILTIN.
1198 (real_compnt_info): Remove unused struct.
1199 (builtin_decl_for_precision, builtin_decl_for_float_kind): New
1201 (build_round_expr): Call builtin_decl_for_precision instead of
1203 (gfc_conv_intrinsic_aint): Call builtin_decl_for_float_kind
1204 instead of a switch.
1205 (gfc_build_intrinsic_lib_fndecls): Match
1206 {real,complex}{4,8,10,16}decl into the C-style built_in_decls.
1207 (gfc_get_intrinsic_lib_fndecl): Do not hardcode floating-point
1209 (gfc_conv_intrinsic_lib_function): Go through all the extended
1211 (gfc_trans_same_strlen_check): Call builtin_decl_for_float_kind
1212 instead of a switch.
1213 (gfc_conv_intrinsic_abs): Likewise.
1214 (gfc_conv_intrinsic_mod): Likewise.
1215 (gfc_conv_intrinsic_sign): Likewise.
1216 (gfc_conv_intrinsic_fraction): Likewise.
1217 (gfc_conv_intrinsic_nearest): Likewise.
1218 (gfc_conv_intrinsic_spacing): Likewise.
1219 (gfc_conv_intrinsic_rrspacing): Likewise.
1220 (gfc_conv_intrinsic_scale): Likewise.
1221 (gfc_conv_intrinsic_set_exponent): Likewise.
1223 2010-06-11 Paul Thomas <pault@gcc.gnu.org>
1227 * trans-expr.c (gfc_conv_derived_to_class): Handle array-valued
1228 functions with CLASS formal arguments.
1230 2010-06-10 Janus Weil <janus@gcc.gnu.org>
1233 * resolve.c (conformable_arrays): Handle allocatable components.
1235 2010-06-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1238 * gfortran.texi: Document that Cray pointers cannot be function
1241 2010-06-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1244 * gfortran.texi: Document lack of support for syntax
1245 "complex FUNCTION name*16()", and existence of alternative
1246 legacy syntax "complex*16 FUNCTION name()".
1248 2010-06-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1251 * intrinsic.texi (FLUSH): Note the difference between FLUSH and
1252 POSIX's fsync(), and how to call the latter from Fortran code.
1254 2010-06-10 Daniel Franke <franke.daniel@gmail.com>
1257 * interface.c (compare_actual_formal): Reject actual arguments with
1258 array subscript passed to ASYNCHRONOUS dummys.
1260 2010-06-10 Daniel Kraft <d@domob.eu>
1263 * gfortran.h (enum gfc_statement): Add ST_ASSOCIATE, ST_END_ASSOCIATE.
1264 (struct gfc_symbol): New field `assoc'.
1265 (struct gfc_association_list): New struct.
1266 (struct gfc_code): New struct `block' in union, move `ns' there
1267 and add association list.
1268 (gfc_free_association_list): New method.
1269 (gfc_has_vector_subscript): Made public;
1270 * match.h (gfc_match_associate): New method.
1271 * parse.h (enum gfc_compile_state): Add COMP_ASSOCIATE.
1272 * decl.c (gfc_match_end): Handle ST_END_ASSOCIATE.
1273 * interface.c (gfc_has_vector_subscript): Made public.
1274 (compare_actual_formal): Rename `has_vector_subscript' accordingly.
1275 * match.c (gfc_match_associate): New method.
1276 (gfc_match_select_type): Change reference to gfc_code's `ns' field.
1277 * primary.c (match_variable): Don't allow names associated to expr here.
1278 * parse.c (decode_statement): Try matching ASSOCIATE statement.
1279 (case_exec_markers, case_end): Add ASSOCIATE statement.
1280 (gfc_ascii_statement): Hande ST_ASSOCIATE and ST_END_ASSOCIATE.
1281 (parse_associate): New method.
1282 (parse_executable): Handle ST_ASSOCIATE.
1283 (parse_block_construct): Change reference to gfc_code's `ns' field.
1284 * resolve.c (resolve_select_type): Ditto.
1285 (resolve_code): Ditto.
1286 (resolve_block_construct): Ditto and add comment.
1287 (resolve_select_type): Set association list in generated BLOCK to NULL.
1288 (resolve_symbol): Resolve associate names.
1289 * st.c (gfc_free_statement): Change reference to gfc_code's `ns' field
1290 and free association list.
1291 (gfc_free_association_list): New method.
1292 * symbol.c (gfc_new_symbol): NULL new field `assoc'.
1293 * trans-stmt.c (gfc_trans_block_construct): Change reference to
1294 gfc_code's `ns' field.
1296 2010-06-10 Kai Tietz <kai.tietz@onevision.com>
1298 * error.c (error_print): Pre-initialize loc by NULL.
1299 * openmp.c (resolve_omp_clauses): Add explicit
1300 braces to avoid ambigous else.
1301 * array.c (match_subscript): Pre-initialize m to MATCH_ERROR.
1303 2010-06-10 Gerald Pfeifer <gerald@pfeifer.com>
1305 * gfc-internals.texi: Move to GFDL 1.3.
1306 * gfortran.texi: Ditto.
1307 * intrinsic.texi: Ditto.
1308 * invoke.texi: Ditto.
1310 2010-06-09 Daniel Franke <franke.daniel@gmail.com>
1313 * check.c (gfc_check_selected_real_kind): Verify that the
1314 actual arguments are scalar.
1316 2010-06-09 Daniel Franke <franke.daniel@gmail.com>
1319 * intrinsic.c (gfc_convert_type_warn): Further improve -Wconversion.
1321 2010-06-09 Janus Weil <janus@gcc.gnu.org>
1324 * dump-parse-tree.c (show_symbol): Avoid infinite loop.
1326 2010-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
1328 * fortran/symbol.c (check_conflict): Remove an invalid conflict check.
1330 2010-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
1332 * fortran/intrinsic.c (add_functions): Change gfc_check_btest,
1333 gfc_check_ibclr, and gfc_check_ibset to gfc_check_bitfcn.
1334 * fortran/intrinsic.h: Remove prototypes for gfc_check_btest,
1335 gfc_check_ibclr, and gfc_check_ibset. Add prototype for
1337 * fortran/check.c (nonnegative_check, less_than_bitsize1,
1338 less_than_bitsize2): New functions.
1339 (gfc_check_btest): Renamed to gfc_check_bitfcn. Use
1340 nonnegative_check and less_than_bitsize1.
1341 (gfc_check_ibclr, gfc_check_ibset): Removed.
1342 (gfc_check_ibits,gfc_check_mvbits): Use nonnegative_check and
1345 2010-06-09 Janus Weil <janus@gcc.gnu.org>
1348 * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
1351 2010-06-09 Kai Tietz <kai.tietz@onevision.com>
1353 * resolve.c (resolve_deallocate_expr): Avoid warning
1354 about possible use of iunitialized sym.
1355 (resolve_allocate_expr): Pre-initialize sym by NULL.
1357 2010-06-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1360 * f95-lang.c (gfc_init_builtin_functions): Remove comment.
1362 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
1364 * trans-types.c (gfc_get_nodesc_array_type): Use typed GC
1366 (gfc_get_array_type_bounds): Likewise.
1368 * trans-decl.c (gfc_allocate_lang_decl): Likewise.
1369 (gfc_find_module): Likewise.
1371 * f95-lang.c (pushlevel): Likewise.
1373 * trans.h (struct lang_type): Add variable_size GTY option.
1374 (struct lang_decl): Likewise.
1376 2010-06-08 Tobias Burnus <burnus@net-b.de>
1379 * symbol.c (check_conflict): Move protected--external/procedure check ...
1380 * resolve.c (resolve_select_type): ... to the resolution stage.
1382 2010-06-07 Tobias Burnus <burnus@net-b.de>
1384 * options.c (gfc_handle_option): Fix -fno-recursive.
1386 2010-06-07 Tobias Burnus <burnus@net-b.de>
1388 * gfc-internals.texi (copyrights-gfortran): Fix copyright year format.
1389 * gfortran.texi (copyrights-gfortran): Ditto.
1391 2010-06-07 Joseph Myers <joseph@codesourcery.com>
1393 * lang.opt (fshort-enums): Define using Var and VarExists.
1394 * options.c (gfc_handle_option): Don't set flag_short_enums here.
1396 2010-06-05 Paul Thomas <pault@gcc.gnu.org>
1397 Janus Weil <janus@gcc.gnu.org>
1400 * resolve.c (get_declared_from_expr): Move to before
1401 resolve_typebound_generic_call. Make new_ref and class_ref
1402 ignorable if set to NULL.
1403 (resolve_typebound_generic_call): Once we have resolved the
1404 generic call, check that the specific instance is that which
1405 is bound to the declared type.
1406 (resolve_typebound_function,resolve_typebound_subroutine): Avoid
1407 freeing 'class_ref->next' twice.
1409 2010-06-05 Paul Thomas <pault@gcc.gnu.org>
1412 * trans-array.c (structure_alloc_comps): Dereference scalar
1413 'decl' if it is a REFERENCE_TYPE. Tidy expressions containing
1416 2010-06-04 Joseph Myers <joseph@codesourcery.com>
1418 * gfortranspec.c (append_arg, lang_specific_driver): Use
1419 GCC-specific formats in diagnostics.
1421 2010-06-02 Tobias Burnus <burnus@net-b.de>
1424 * parse.c (gfc_fixup_sibling_symbols): Do not "fix" use-associated
1427 2010-06-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1430 * match.c (gfc_match_stopcode): Move gfc_match_eos call inside
1433 2010-05-31 Steven G. Kargl <kargl@gcc.gnu.org>
1435 * fortran/gfortran.texi: Fix typos in description of variable-format-
1438 2010-05-31 Thomas Koenig <tkoenig@gcc.gnu.org>
1441 * dependency.c (gfc_check_section_vs_section): Check
1442 for interleaving array assignments without conflicts.
1444 2010-05-30 Janus Weil <janus@gcc.gnu.org>
1446 * gcc/fortran/gfortran.h (CLASS_DATA): New macro for accessing the
1447 $data component of a class container.
1448 * gcc/fortran/decl.c (attr_decl1): Use macro CLASS_DATA.
1449 * gcc/fortran/expr.c (gfc_check_pointer_assign,gfc_check_assign_symbol,
1450 gfc_has_ultimate_allocatable,gfc_has_ultimate_pointer): Ditto.
1451 * gcc/fortran/interface.c (matching_typebound_op): Ditto.
1452 * gcc/fortran/match.c (gfc_match_allocate, gfc_match_deallocate): Ditto.
1453 * gcc/fortran/parse.c (parse_derived): Ditto.
1454 * gcc/fortran/primary.c (gfc_match_varspec, gfc_variable_attr,
1455 gfc_expr_attr): Ditto.
1456 * gcc/fortran/resolve.c (resolve_structure_cons, find_array_spec,
1457 resolve_deallocate_expr, resolve_allocate_expr, resolve_select_type,
1458 resolve_fl_var_and_proc, resolve_typebound_procedure,
1459 resolve_fl_derived): Ditto.
1460 * gcc/fortran/symbol.c (gfc_type_compatible): Restructured.
1461 * gcc/fortran/trans-array.c (structure_alloc_comps): Use macro
1463 * gcc/fortran/trans-decl.c (gfc_get_symbol_decl,
1464 gfc_trans_deferred_vars): Ditto.
1465 * gcc/fortran/trans-stmt.c (gfc_trans_allocate): Ditto.
1467 2010-05-28 Tobias Burnus <burnus@net-b.de>
1469 * options.c (gfc_handle_option): Fix handling of -fno-whole-file.
1471 2010-05-28 Joseph Myers <joseph@codesourcery.com>
1473 * gfortranspec.c (append_arg, lang_specific_driver): Use
1474 fatal_error instead of fatal. Use warning instead of fprintf for
1477 2010-05-28 Joseph Myers <joseph@codesourcery.com>
1479 * cpp.c (gfc_cpp_init_0): Use xstrerror instead of strerror.
1480 * module.c (write_char, gfc_dump_module, gfc_use_module): Use
1481 xstrerror instead of strerror.
1483 2010-05-26 Joseph Myers <joseph@codesourcery.com>
1485 * cpp.c (cb_cpp_error): Save and restore
1486 global_dc->warn_system_headers, not variable warn_system_headers.
1488 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
1490 * fortran/f95-lang.c: Do not include libfuncs.h, expr.h, and except.h.
1492 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
1494 * trans-common.c: Do not include rtl.h, include output.h instead.
1495 * trans-decl.c: Likewise.
1497 2010-05-26 Paul Thomas <pault@gcc.gnu.org>
1500 * resolve.c (resolve_global_procedure): Resolve the gsymbol's
1501 namespace before trying to reorder the gsymbols.
1503 2010-05-25 Daniel Franke <franke.daniel@gmail.com>
1508 * resolve.c (resolve_global_procedure): Add check for global
1509 procedures with implicit interfaces and assumed-shape or optional
1510 dummy arguments. Verify that function return type, kind and string
1513 2010-05-21 Tobias Burnus <burnus@net-b.de>
1515 * gfortran.h: Do not include system.h.
1516 * bbt.c: Include system.h.
1518 * dependency.c: Ditto.
1519 * dump-parse-tree.c: Ditto.
1520 * arith.h: Do not include gfortran.h.
1521 * constructor.h: Do not include gfortran.h and splay-tree.h.
1522 * match.h: Do not include gfortran.h.
1524 * target-memory.h: Ditto.
1525 * openmp.c: Do not include toplev.h and target.h.
1526 * trans-stmt.c: Ditto not include toplev.h.
1528 * trans-common.c: Tell why toplev.h is needed. And
1529 do not include target.h.
1530 * trans-expr.c: Tell why toplev.h is needed.
1531 * trans-array.c: Ditto.
1532 * trans-openmp.c: Ditto.
1533 * trans-const.c: Ditto.
1535 * trans-types.c: Ditto.
1536 * trans-io.c: Ditto.
1537 * trans-decl.c: Ditto.
1540 * trans-intrinsic.c: Ditto.
1543 2010-05-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1546 * match.c (gfc_match_stopcode): Use gfc_match_init_expr. Go to cleanup
1547 before returning MATCH_ERROR. Add check for scalar. Add check for
1548 default integer kind.
1550 2010-05-22 Janus Weil <janus@gcc.gnu.org>
1553 * match.c (gfc_match_select_type): On error jump back out of the local
1555 * parse.c (parse_derived): Defer creation of vtab symbols to resolution
1556 stage, more precisely to ...
1557 * resolve.c (resolve_fl_derived): ... this place.
1559 2010-05-22 Janus Weil <janus@gcc.gnu.org>
1562 * resolve.c (ensure_not_abstract): Allow abstract types with
1563 non-abstract ancestors.
1565 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
1567 * trans-const.c: Include realmpfr.h.
1568 * Make-lang.in: Update dependencies.
1570 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
1572 * trans-const.c, trans-types.c, trans-intrinsic.c:
1573 Clean up redundant includes.
1575 2010-05-20 Daniel Franke <franke.daniel@gmail.com>
1578 * lang.opt (Wunused-dummy-argument): New option.
1579 * gfortran.h (gfc_option_t): Add warn_unused_dummy_argument.
1580 * options.c (gfc_init_options): Disable warn_unused_dummy_argument.
1581 (set_Wall): Enable warn_unused_dummy_argument.
1582 (gfc_handle_option): Set warn_unused_dummy_argument according to
1584 * trans-decl.c (generate_local_decl): Separate warnings about
1585 unused variables and unused dummy arguments.
1586 * invoke.texi: Documented new option.
1588 2010-05-20 Steven Bosscher <steven@gcc.gnu.org>
1590 * trans-expr.c: Do not include convert.h, ggc.h, real.h, and gimple.h.
1591 (gfc_conv_string_tmp): Do not assert type comparibilty.
1592 * trans-array.c: Do not include gimple.h, ggc.h, and real.h.
1593 (gfc_conv_expr_descriptor): Remove assert.
1594 * trans-common.c: Clarify why rtl.h and tm.h are included.
1595 * trans-openmp.c: Do not include ggc.h and real.h.
1596 Explain why gimple.h is included.
1597 * trans-const.c: Do not include ggc.h.
1598 * trans-stmt.c: Do not include gimple.h, ggc.h, and real.h.
1599 * trans.c: Do not include ggc.h and real.h.
1600 Explain why gimple.h is included.
1601 * trans-types.c: Do not include tm.h. Explain why langhooks.h
1602 and dwarf2out.h are included.
1603 * trans-io.c: Do not include gimple.h and real.h.
1604 * trans-decl.c: Explain why gimple.h, tm.h, and rtl.h are included.
1605 * trans-intrinsic.c: Do not include gimple.h. Explain why tm.h
1608 2010-05-20 Tobias Burnus <burnus@net-b.de>
1610 * options.c (gfc_init_options,gfc_post_options): Enable
1611 flag_associative_math by default.
1613 2010-05-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1616 * trans-stmt.c (gfc_trans_stop): Add generation of call to
1617 gfortran_error_stop_numeric. Fix up some whitespace. Use stop_string for
1618 blank STOP, handling a null expression. (gfc_trans_pause): Use
1619 pause_string for blank PAUSE.
1620 * trans.h: Add external function declaration for error_stop_numeric.
1621 * trans-decl.c (gfc_build_builtin_function_decls): Add the building of
1622 the declaration for the library call. Adjust whitespaces.
1623 * match.c (gfc_match_stopcode): Remove use of the actual stop code to
1624 signal no stop code. Match the expression following the stop and pass
1625 that to the translators. Remove the old use of digit matching. Add
1626 checks that the stop_code expression is INTEGER or CHARACTER, constant,
1627 and if CHARACTER, default character KIND.
1629 2010-05-19 Daniel Franke <franke.daniel@gmail.com>
1632 * lang.opt (Wconversion-extra): New option.
1633 * gfortran.h (gfc_option_t): Add warn_conversion_extra.
1634 * options.c (gfc_init_options): Disable -Wconversion-extra by default.
1635 (set_Wall): Enable -Wconversion.
1636 (gfc_handle_option): Set warn_conversion_extra.
1637 * intrinsic.c (gfc_convert_type_warn): Ignore kind conditions
1638 introduced for -Wconversion if -Wconversion-extra is present.
1639 * invoke.texi: Add -Wconversion to -Wall; document new behaviour of
1640 -Wconversion; document -Wconversion-extra.
1642 2010-05-19 Daniel Franke <franke.daniel@gmail.com>
1645 * gfortran.h (gfc_has_default_initializer): New.
1646 * expr.c (gfc_has_default_initializer): New.
1647 * resolve.c (has_default_initializer): Removed, use
1648 gfc_has_default_initializer() instead. Updated all callers.
1649 * trans-array.c (has_default_initializer): Removed, use
1650 gfc_has_default_initializer() instead. Updated all callers.
1651 * trans-decl.c (generate_local_decl): Do not check the
1652 first component only to check for initializers, but use
1653 gfc_has_default_initializer() instead.
1655 2010-05-19 Daniel Franke <franke.daniel@gmail.com>
1658 * primary.c (match_string_constant): Move start_locus just inside
1660 * data.c (create_character_intializer): Clarified truncation warning.
1662 2010-05-19 Daniel Franke <franke.daniel@gmail.com>
1665 * intrinsic.h (gfc_check_float): New prototype.
1666 (gfc_check_sngl): New prototype.
1667 * check.c (gfc_check_float): New.
1668 (gfc_check_sngl): New.
1669 * intrinsic.c (add_functions): Moved DFLOAT from aliasing DBLE
1670 to be a specific for REAL. Added check routines for FLOAT, DFLOAT
1672 * intrinsic.texi: Removed individual nodes of FLOAT, DFLOAT and SNGL,
1673 added them to the list of specifics of REAL instead.
1675 2010-05-17 Janus Weil <janus@gcc.gnu.org>
1678 * trans-expr.c (gfc_conv_structure): Remove unneeded and buggy code.
1679 This is now handled via 'gfc_class_null_initializer'.
1681 2010-05-17 Janus Weil <janus@gcc.gnu.org>
1683 * class.c (gfc_add_component_ref,gfc_class_null_initializer,
1684 gfc_build_class_symbol,add_proc_component,add_proc_comps,
1685 add_procs_to_declared_vtab1,copy_vtab_proc_comps,
1686 add_procs_to_declared_vtab,add_generic_specifics,
1687 add_generics_to_declared_vtab,gfc_find_derived_vtab,
1688 find_typebound_proc_uop,gfc_find_typebound_proc,
1689 gfc_find_typebound_user_op,gfc_find_typebound_intrinsic_op,
1690 gfc_get_tbp_symtree): Moved here from other places.
1691 * expr.c (gfc_add_component_ref,gfc_class_null_initializer): Move to
1693 * gfortran.h (gfc_build_class_symbol,gfc_find_derived_vtab,
1694 gfc_find_typebound_proc,gfc_find_typebound_user_op,
1695 gfc_find_typebound_intrinsic_op,gfc_get_tbp_symtree,
1696 gfc_add_component_ref, gfc_class_null_initializer): Moved to class.c.
1697 * Make-lang.in: Add class.o.
1698 * symbol.c (gfc_build_class_symbol,add_proc_component,add_proc_comps,
1699 add_procs_to_declared_vtab1,copy_vtab_proc_comps,
1700 add_procs_to_declared_vtab,add_generic_specifics,
1701 add_generics_to_declared_vtab,gfc_find_derived_vtab,
1702 find_typebound_proc_uop,gfc_find_typebound_proc,
1703 gfc_find_typebound_user_op,gfc_find_typebound_intrinsic_op,
1704 gfc_get_tbp_symtree): Move to class.c.
1706 2010-05-17 Nathan Froyd <froydnj@codesourcery.com>
1708 * trans-types.c (gfc_init_types): Use build_function_type_list.
1709 (gfc_get_ppc_type): Likewise.
1710 * trans-decl.c (gfc_generate_constructors): Likewise.
1711 * f95-lang.c (build_builtin_fntypes): Likewise.
1712 (gfc_init_builtin_functions): Likewise.
1713 (DEF_FUNCTION_TYPE_0): Likewise.
1714 (DEF_FUNCTION_TYPE_1): Likewise.
1715 (DEF_FUNCTION_TYPE_2): Likewise.
1716 (DEF_FUNCTION_TYPE_3): Likewise.
1717 (DEF_FUNCTION_TYPE_4): Likewise.
1718 (DEF_FUNCTION_TYPE_5): Likewise.
1719 (DEF_FUNCTION_TYPE_6): Likewise.
1720 (DEF_FUNCTION_TYPE_7): Likewise. Use ARG7.
1721 (DEF_FUNCTION_TYPE_VAR_0): Use build_varags_function_type_list.
1723 2010-05-17 Nathan Froyd <froydnj@codesourcery.com>
1725 * trans-array.c (gfc_trans_array_constructor_value): Use
1726 build_constructor instead of build_constructor_from_list.
1727 (gfc_build_constant_array_constructor): Likewise.
1728 * trans-decl.c (create_main_function): Likewise.
1729 * trans-stmt.c (gfc_trans_character_select): Likewise.
1731 2010-05-17 Janus Weil <janus@gcc.gnu.org>
1734 * resolve.c (resolve_fl_var_and_proc): Move error messages here from ...
1735 (resolve_fl_variable_derived): ... this place.
1736 (resolve_symbol): Make sure function symbols (and their result
1737 variables) are not resolved twice.
1739 2010-05-16 Daniel Franke <franke.daniel@gmail.com>
1742 * array.c (match_array_list): Revert change from 2010-05-13.
1744 2010-05-16 Richard Guenther <rguenther@suse.de>
1746 * trans-decl.c (module_htab_decls_hash): Revert last change.
1748 2010-05-16 Richard Guenther <rguenther@suse.de>
1750 * trans-decl.c (module_htab_decls_hash): Use IDENTIFIER_HASH_VALUE.
1752 2010-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
1754 * options.c (set_Wall): Remove special logic for Wuninitialized
1757 2010-05-15 Janus Weil <janus@gcc.gnu.org>
1761 * trans-decl.c (gfc_trans_deferred_vars): Modify ordering of
1764 2010-05-15 Janus Weil <janus@gcc.gnu.org>
1768 * gfortran.h (gfc_class_null_initializer): New prototype.
1769 * expr.c (gfc_class_null_initializer): New function to build a NULL
1770 initializer for CLASS pointers.
1771 * symbol.c (gfc_build_class_symbol): Modify internal naming of class
1772 containers. Remove default NULL initialization of $data component.
1773 * trans.c (gfc_allocate_array_with_status): Fix wording of an error
1775 * trans-expr.c (gfc_conv_initializer,gfc_trans_subcomponent_assign):
1776 Use new function 'gfc_class_null_initializer'.
1777 * trans-intrinsic.c (gfc_conv_allocated): Handle allocatable scalar
1780 2010-05-14 Steven G. Kargl <kargl@gcc.gnu.org>
1783 * fortran/interface.c (get_sym_storage_size): Use signed instead of
1784 unsigned mpz_get_?i routines.
1786 2010-05-14 Jakub Jelinek <jakub@redhat.com>
1788 * trans.c (trans_code): Set backend locus early.
1789 * trans-decl.c (gfc_get_fake_result_decl): Use source location
1790 of the function instead of current input_location.
1792 2010-05-13 Daniel Franke <franke.daniel@gmail.com>
1795 * intrinsic.c (gfc_init_expr): Renamed to gfc_init_expr_flag.
1797 * expr.c (init_flag): Removed; use gfc_init_expr_flag everywhere.
1798 * array.c (match_array_list): Pass on gfc_init_expr_flag when matching
1801 2010-05-13 Jakub Jelinek <jakub@redhat.com>
1804 * openmp.c (resolve_omp_clauses): Allow procedure pointers in clause
1806 * trans-openmp.c (gfc_omp_privatize_by_reference): Don't privatize
1807 by reference dummy procedures or non-dummy procedure pointers.
1808 (gfc_omp_predetermined_sharing): Return
1809 OMP_CLAUSE_DEFAULT_FIRSTPRIVATE for dummy procedures.
1811 2010-05-11 Daniel Franke <franke.daniel@gmail.com>
1814 * openmp.c (gfc_match_omp_taskwait): Report unexpected characters
1815 after OMP statement.
1816 (gfc_match_omp_critical): Likewise.
1817 (gfc_match_omp_flush): Likewise.
1818 (gfc_match_omp_workshare): Likewise.
1819 (gfc_match_omp_master): Likewise.
1820 (gfc_match_omp_ordered): Likewise.
1821 (gfc_match_omp_atomic): Likewise.
1822 (gfc_match_omp_barrier): Likewise.
1823 (gfc_match_omp_end_nowait): Likewise.
1825 2010-05-11 Daniel Franke <franke.daniel@gmail.com>
1828 * resolve.c (validate_case_label_expr): Removed FIXME.
1829 (resolve_select): Raise default warning on case labels out of range
1830 of the case expression.
1832 2010-05-10 Daniel Franke <franke.daniel@gmail.com>
1837 * intrinsic.c (gfc_convert_type_warn): Be more discriminative
1838 about conversion warnings.
1840 2010-05-10 Janus Weil <janus@gcc.gnu.org>
1843 * match.c (gfc_match_select_type): Move error message to
1844 resolve_select_type.
1845 * resolve.c (resolve_select_type): Error message moved here from
1846 gfc_match_select_type. Correctly set type of temporary.
1848 2010-05-10 Richard Guenther <rguenther@suse.de>
1850 * trans-decl.c (gfc_build_library_function_decl): Split out
1852 (build_library_function_decl_1): ... this new function.
1853 Set a fnspec attribute if a specification was provided.
1854 (gfc_build_library_function_decl_with_spec): New function.
1855 (gfc_build_intrinsic_function_decls): Annotate internal_pack
1856 and internal_unpack.
1858 2010-05-07 Daniel Franke <franke.daniel@gmail.com>
1861 * intrinc.c (gfc_is_intrinsic): Do not prematurely mark symbol
1864 2010-05-07 Jason Merrill <jason@redhat.com>
1866 * trans-expr.c (gfc_conv_procedure_call): Rename nullptr to null_ptr
1867 to avoid -Wc++-compat warning.
1869 2010-05-06 Manuel López-Ibáñez <manu@gcc.gnu.org>
1872 * options.c (gfc_handle_option): Add argument kind.
1873 * gfortran.h (gfc_handle_option): Update declaration.
1875 2010-05-06 Tobias Burnus <burnus@net-b.de>
1878 * trans-types.c (gfc_sym_type): Mark Cray pointees as
1881 2010-05-05 Daniel Franke <franke.daniel@gmail.com>
1884 * resolve.c (traverse_data_list): Rephrase error message for
1885 non-constant bounds in data-implied-do.
1887 2010-05-05 Daniel Franke <franke.daniel@gmail.com>
1890 * gfortran.h: Removed repeat count from constructor, removed
1892 * data.h (gfc_assign_data_value_range): Changed return value from
1894 * data.c (gfc_assign_data_value): Add location to constructor element.
1895 (gfc_assign_data_value_range): Call gfc_assign_data_value()
1896 for each element in range. Return early if an error was generated.
1897 * resolve.c (check_data_variable): Stop early if range assignment
1900 2010-05-05 Janus Weil <janus@gcc.gnu.org>
1903 * resolve.c (resolve_fl_derived): Some fixes for class variables.
1904 * symbol.c (gfc_build_class_symbol): Add separate class container for
1907 2010-05-03 Steven G. Kargl <kargl@gcc.gnu.org>
1910 * fortran/parse.c (parse_interface): Do not dereference a NULL pointer.
1912 2010-05-02 Tobias Burnus <burnus@net-b.de>
1915 * intrinsic.c (add_functions): Fix GFC_STD and add gfc_resolve_ calls
1916 for lcobound, ucobound, image_index and this_image.
1917 * intrinsic.h (gfc_resolve_lcobound, gfc_resolve_this_image,
1918 gfc_resolve_image_index, gfc_resolve_ucobound): New prototypes.
1919 * iresolve.c (gfc_resolve_lcobound, gfc_resolve_this_image,
1920 gfc_resolve_image_index, gfc_resolve_ucobound, resolve_bound): New
1922 (gfc_resolve_lbound, gfc_resolve_ubound): Use resolve_bound.
1924 2010-04-30 Tobias Burnus <burnus@net-b.de>
1928 * trans-types.c (gfc_get_array_descriptor_base): Fix index
1929 calculation for array descriptor types.
1931 2010-04-29 Janus Weil <janus@gcc.gnu.org>
1934 * symbol.c (add_proc_component,copy_vtab_proc_comps): Remove
1935 initializers for PPC members of the vtabs.
1937 2010-04-29 Janus Weil <janus@gcc.gnu.org>
1940 * symbol.c (add_proc_component,add_proc_comps): Correctly set the 'ppc'
1941 attribute for all PPC members of the vtypes.
1942 (copy_vtab_proc_comps): Copy the correct interface.
1943 * trans.h (gfc_trans_assign_vtab_procs): Modified prototype.
1944 * trans-expr.c (gfc_trans_assign_vtab_procs): Pass the derived type as
1945 a dummy argument and make sure all PPC members of the vtab are
1946 initialized correctly.
1947 (gfc_conv_derived_to_class,gfc_trans_class_assign): Additional argument
1948 in call to gfc_trans_assign_vtab_procs.
1949 * trans-stmt.c (gfc_trans_allocate): Ditto.
1951 2010-04-29 Paul Thomas <pault@gcc.gnu.org>
1954 * resolve.c (resolve_typebound_function): Renamed
1955 resolve_class_compcall.Do all the detection of class references
1957 (resolve_typebound_subroutine): resolve_class_typebound_call
1958 renamed. Otherwise same as resolve_typebound_function.
1959 (gfc_resolve_expr): Call resolve_typebound_function.
1960 (resolve_code): Call resolve_typebound_subroutine.
1962 2010-04-29 Janus Weil <janus@gcc.gnu.org>
1965 * resolve.c (resolve_typebound_generic_call): For CLASS methods
1966 pass back the specific symtree name, rather than the target
1969 2010-04-29 Paul Thomas <pault@gcc.gnu.org>
1972 * resolve.c (resolve_structure_cons): Make the initializer of
1973 the vtab component 'extends' the same type as the component.
1975 2010-04-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1978 * interface.c (check_interface1): Pass symbol name rather than NULL to
1979 gfc_compare_interfaces.(gfc_compare_interfaces): Add assert to
1980 trap MULL. (gfc_compare_derived_types): Revert previous change
1981 incorporated incorrectly during merge from trunk, r155778.
1982 * resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather
1983 than NULL to gfc_compare_interfaces.
1984 * symbol.c (add_generic_specifics): Likewise.
1986 2010-02-29 Janus Weil <janus@gcc.gnu.org>
1989 * interface.c (gfc_compare_derived_types): Add condition for vtype.
1990 * symbol.c (gfc_find_derived_vtab): Sey access to private.
1991 (gfc_find_derived_vtab): Likewise.
1992 * module.c (ab_attribute): Add enumerator AB_VTAB.
1993 (mio_symbol_attribute): Use new attribute, AB_VTAB.
1994 (check_for_ambiguous): Likewise.
1996 2010-04-29 Paul Thomas <pault@gcc.gnu.org>
1997 Janus Weil <janus@gcc.gnu.org>
2000 * trans-expr.c (select_class_proc): Remove function.
2001 (conv_function_val): Delete reference to previous.
2002 (gfc_conv_derived_to_class): Add second argument to the call to
2003 gfc_find_derived_vtab.
2004 (gfc_conv_structure): Exclude proc_pointer components when
2005 accessing $data field of class objects.
2006 (gfc_trans_assign_vtab_procs): New function.
2007 (gfc_trans_class_assign): Add second argument to the call to
2008 gfc_find_derived_vtab.
2009 * symbol.c (gfc_build_class_symbol): Add delayed_vtab arg and
2010 implement holding off searching for the vptr derived type.
2011 (add_proc_component): New function.
2012 (add_proc_comps): New function.
2013 (add_procs_to_declared_vtab1): New function.
2014 (copy_vtab_proc_comps): New function.
2015 (add_procs_to_declared_vtab): New function.
2016 (void add_generic_specifics): New function.
2017 (add_generics_to_declared_vtab): New function.
2018 (gfc_find_derived_vtab): Add second argument to the call to
2019 gfc_find_derived_vtab. Add the calls to
2020 add_procs_to_declared_vtab and add_generics_to_declared_vtab.
2021 * decl.c (build_sym, build_struct): Use new arg in calls to
2022 gfc_build_class_symbol.
2023 * gfortran.h : Add vtype bitfield to symbol_attr. Remove the
2024 definition of struct gfc_class_esym_list. Modify prototypes
2025 of gfc_build_class_symbol and gfc_find_derived_vtab.
2026 * trans-stmt.c (gfc_trans_allocate): Add second argument to the
2027 call to gfc_find_derived_vtab.
2028 * module.c : Add the vtype attribute.
2029 * trans.h : Add prototype for gfc_trans_assign_vtab_procs.
2030 * resolve.c (resolve_typebound_generic_call): Add second arg
2031 to pass along the generic name for class methods.
2032 (resolve_typebound_call): The same.
2033 (resolve_compcall): Use the second arg to carry the generic
2034 name from the above. Remove the reference to class_esym.
2035 (check_members, check_class_members, resolve_class_esym,
2036 hash_value_expr): Remove functions.
2037 (resolve_class_compcall, resolve_class_typebound_call): Modify
2038 to use vtable rather than member by member calls.
2039 (gfc_resolve_expr): Modify second arg in call to
2041 (resolve_select_type): Add second arg in call to
2042 gfc_find_derived_vtab.
2043 (resolve_code): Add second arg in call resolve_typebound_call.
2044 (resolve_fl_derived): Exclude vtypes from check for late
2045 procedure definitions. Likewise for checking of explicit
2046 interface and checking of pass arg.
2047 * iresolve.c (gfc_resolve_extends_type_of): Add second arg in
2048 calls to gfc_find_derived_vtab.
2049 * match.c (select_type_set_tmp): Use new arg in call to
2050 gfc_build_class_symbol.
2051 * trans-decl.c (gfc_get_symbol_decl): Complete vtable if
2053 * parse.c (endType): Finish incomplete classes.
2055 2010-04-28 Tobias Burnus <burnus@net-b.de>
2059 * simplify.c (simplify_cobound): Handle scalar coarrays.
2061 2010-04-27 Tobias Burnus <burnus@net-b.de>
2063 * gfc-internals.texi: Update copyright year.
2064 * gfortran.texi: Ditto.
2065 * invoke.texi: Ditto.
2067 2010-04-27 Tobias Burnus <burnus@net-b.de>
2070 * resolve.c (resolve_allocate_expr): Allow array coarrays.
2071 * trans-types.h (gfc_get_array_type_bounds): Update prototype.
2072 * trans-types.c (gfc_get_array_type_bounds,
2073 gfc_get_array_descriptor_base): Add corank argument.
2074 * trans-array.c (gfc_array_init_size): Handle corank.
2075 (gfc_trans_create_temp_array, gfc_array_allocate,
2076 gfc_conv_expr_descriptor): Add corank argument to call.
2077 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Ditto.
2079 2010-04-24 Steven G. Kargl <kargl@gcc.gnu.org>
2083 * trans-array.c (gfc_trans_array_bound_check): Use TREE_CODE instead
2084 of mucking with a tree directly.
2086 2010-04-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2089 * io.c (gfc_match_open): Remove branch to syntax error. Add call to
2090 gfc_error with new error message.
2092 2010-04-24 Paul Thomas <pault@gcc.gnu.org>
2096 * trans-expr.c (gfc_conv_expr): Supply an address expression for
2098 (gfc_conv_expr_reference): Call gfc_conv_expr and return for
2100 * trans-array.c (gfc_add_loop_ss_code): Store the value rather
2101 than the address of a GFC_SS_REFERENCE.
2102 * trans.h : Change comment on GFC_SS_REFERENCE.
2104 2010-04-22 Richard Guenther <rguenther@suse.de>
2107 * resolve.c (gfc_resolve_index): Wrap around ...
2108 (gfc_resolve_index_1): ... this. Add parameter to allow
2109 any integer kind index type.
2110 (resolve_array_ref): Allow any integer kind for the start
2111 index of an array ref.
2113 2010-04-21 Jakub Jelinek <jakub@redhat.com>
2116 * f95-lang.c (gfc_define_builtin): Set TREE_NOTHROW on
2119 2010-04-20 Harald Anlauf <anlauf@gmx.de>
2121 * intrinsic.c (sort_actual): Remove 'is' in error message.
2123 2010-04-20 Paul Thomas <pault@gcc.gnu.org>
2126 * resolve.c (resolve_fl_derived): If a component character
2127 length has not been resolved, do so now.
2128 (resolve_symbol): The same as above for a symbol character
2130 * trans-decl.c (gfc_create_module_variable): A 'length' decl is
2131 not needed for a character valued, procedure pointer.
2134 * resolve.c (ensure_not_abstract_walker): If 'overriding' is
2135 not found, return FAILURE rather than ICEing.
2137 2010-04-19 Jakub Jelinek <jakub@redhat.com>
2140 * openmp.c (gfc_resolve_do_iterator): Only make iteration vars for
2141 sequential loops private in the innermost containing task region.
2143 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
2145 * f95-lang.c (gfc_init_decl_processing): Remove second argument in call
2146 to build_common_tree_nodes.
2148 2010-04-17 Steven G. Kargl <kargl@gcc.gnu.org>
2151 * fortran/trans-array.c (gfc_conv_ss_startstride): Remove the use of
2152 gfc_msg_bounds by using 'Array bound mismatch' directly.
2153 (gfc_trans_dummy_array_bias): Remove the use of gfc_msg_bounds. Reword
2154 error message to include the mismatch in the extent of array bound.
2155 * fortran/trans.c: Remove gfc_msg_bounds. It is only used in one place.
2156 * fortran/trans.h: Remove extern definition of gfc_msg_bounds.
2158 2010-04-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2160 * gfortran.texi: Update information on temporary file locations.
2162 2010-04-16 Jakub Jelinek <jakub@redhat.com>
2164 * trans-decl.c (gfc_build_qualified_array): Ensure
2165 ubound.N and lbound.N artificial variable names don't appear
2168 2010-04-15 Steven G. Kargl <kargl@gcc.gnu.org>
2171 * trans-array.c (gfc_trans_array_bound_check): Eliminate a redundant
2172 block of code. Set name to the variable associated with the descriptor.
2174 2010-04-15 Jakub Jelinek <jakub@redhat.com>
2176 * trans-decl.c (gfc_build_qualified_array): Clear DECL_IGNORED_P
2177 on VAR_DECL LBOUND and/or UBOUND, even for -O1.
2179 2010-04-14 Steven G. Kargl <kargl@gcc.gnu.org>
2181 * intrinsic.texi: Add the missing specific name of intrinsic
2182 procedure where the specific name is identical to the generic name.
2183 Fix inconsistent or mismatch in the argument names in intrinsic
2184 procedure descriptions. Add the SCALAR allocatable description to
2187 2010-04-14 Tobias Burnus <burnus@net-b.de>
2190 * array.c (gfc_find_array_ref): Handle codimensions.
2191 (gfc_match_array_spec,gfc_match_array_ref): Use gfc_fatal_error.
2192 * check.c (is_coarray, dim_corank_check, gfc_check_lcobound,
2193 gfc_check_image_index, gfc_check_this_image, gfc_check_ucobound):
2195 * gfortran.h (gfc_isym_id): Add GFC_ISYM_IMAGE_INDEX,
2196 GFC_ISYM_LCOBOUND, GFC_ISYM_THIS_IMAGE,
2198 * intrinsic.h (add_functions): Add this_image, image_index,
2199 lcobound and ucobound intrinsics.
2200 * intrinsic.c (gfc_check_lcobound,gfc_check_ucobound,
2201 gfc_check_image_index, gfc_check_this_image,
2202 gfc_simplify_image_index, gfc_simplify_lcobound,
2203 gfc_simplify_this_image, gfc_simplify_ucobound):
2204 New function prototypes.
2205 * intrinsic.texi (IMAGE_INDEX, LCOBOUND, THIS_IMAGE
2206 IMAGE_INDEX): Document new intrinsic functions.
2207 * match.c (gfc_match_critical, sync_statement): Make -fcoarray=none
2209 * simplify.c (simplify_bound_dim): Handle coarrays.
2210 (simplify_bound): Update simplify_bound_dim call.
2211 (gfc_simplify_num_images): Add -fcoarray=none check.
2212 (simplify_cobound, gfc_simplify_lcobound, gfc_simplify_ucobound,
2213 gfc_simplify_ucobound, gfc_simplify_ucobound): New functions.
2215 2010-04-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2218 * constructor.c: Fix typo in comment.
2219 * expr.c (find_array_section): Add check for max array limit.
2221 2010-04-13 Iain Sandoe <iains@gcc.gnu.org>
2224 * gfortranspec.c (lookup_option): Check for -static and return
2226 (lang_specific_driver): Break when OPTION_static is discovered.
2228 2010-04-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2230 * array.c (extract_element): Restore function from trunk.
2231 (gfc_get_array_element): Restore function from trunk.
2232 (gfc_expand_constructor): Restore check against
2233 flag_max_array_constructor.
2234 * constructor.c (node_copy_and_append): Delete unused.
2235 * gfortran.h: Delete comment and extra include.
2236 * constructor.h: Bump copyright and clean up TODO comments.
2237 * resolve.c: Whitespace.
2239 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
2241 * simplify.c (compute_dot_product): Replaced usage of ADVANCE macro
2242 with direct access access to elements. Adjusted prototype, fixed all
2244 (gfc_simplify_dot_product): Removed duplicate check for zero-sized
2246 (gfc_simplify_matmul): Removed usage of ADVANCE macro.
2247 (gfc_simplify_spread): Removed workaround, directly insert elements
2248 at a given array position.
2249 (gfc_simplify_transpose): Likewise.
2250 (gfc_simplify_pack): Replaced usage of ADVANCE macro with corresponding
2252 (gfc_simplify_unpack): Likewise.
2254 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
2256 * simplify.c (only_convert_cmplx_boz): Renamed to ...
2257 (convert_boz): ... this and moved to start of file.
2258 (gfc_simplify_abs): Whitespace fix.
2259 (gfc_simplify_acos): Whitespace fix.
2260 (gfc_simplify_acosh): Whitespace fix.
2261 (gfc_simplify_aint): Whitespace fix.
2262 (gfc_simplify_dint): Whitespace fix.
2263 (gfc_simplify_anint): Whitespace fix.
2264 (gfc_simplify_and): Replaced if-gate by more common switch-over-type.
2265 (gfc_simplify_dnint): Whitespace fix.
2266 (gfc_simplify_asin): Whitespace fix.
2267 (gfc_simplify_asinh): Moved creation of result-expr out of switch.
2268 (gfc_simplify_atan): Likewise.
2269 (gfc_simplify_atanh): Whitespace fix.
2270 (gfc_simplify_atan2): Whitespace fix.
2271 (gfc_simplify_bessel_j0): Removed ATTRIBUTE_UNUSED.
2272 (gfc_simplify_bessel_j1): Likewise.
2273 (gfc_simplify_bessel_jn): Likewise.
2274 (gfc_simplify_bessel_y0): Likewise.
2275 (gfc_simplify_bessel_y1): Likewise.
2276 (gfc_simplify_bessel_yn): Likewise.
2277 (gfc_simplify_ceiling): Reorderd statements.
2278 (simplify_cmplx): Use convert_boz(), check for constant arguments.
2280 (gfc_simplify_cmplx): Use correct default kind. Removed check for
2282 (gfc_simplify_complex): Replaced if-gate. Removed check for
2284 (gfc_simplify_conjg): Whitespace fix.
2285 (gfc_simplify_cos): Whitespace fix.
2286 (gfc_simplify_cosh): Replaced if-gate by more common switch-over-type.
2287 (gfc_simplify_dcmplx): Removed check for constant arguments.
2288 (gfc_simplify_dble): Use convert_boz() and gfc_convert_constant().
2289 (gfc_simplify_digits): Whitespace fix.
2290 (gfc_simplify_dim): Whitespace fix.
2291 (gfc_simplify_dprod): Reordered statements.
2292 (gfc_simplify_erf): Whitespace fix.
2293 (gfc_simplify_erfc): Whitespace fix.
2294 (gfc_simplify_epsilon): Whitespace fix.
2295 (gfc_simplify_exp): Whitespace fix.
2296 (gfc_simplify_exponent): Use convert_boz().
2297 (gfc_simplify_floor): Reorderd statements.
2298 (gfc_simplify_gamma): Whitespace fix.
2299 (gfc_simplify_huge): Whitespace fix.
2300 (gfc_simplify_iand): Whitespace fix.
2301 (gfc_simplify_ieor): Whitespace fix.
2302 (simplify_intconv): Use gfc_convert_constant().
2303 (gfc_simplify_int): Use simplify_intconv().
2304 (gfc_simplify_int2): Reorderd statements.
2305 (gfc_simplify_idint): Reorderd statements.
2306 (gfc_simplify_ior): Whitespace fix.
2307 (gfc_simplify_ishftc): Removed duplicate type check.
2308 (gfc_simplify_len): Use range_check() instead of manual range check.
2309 (gfc_simplify_lgamma): Removed ATTRIBUTE_UNUSED. Whitespace fix.
2310 (gfc_simplify_log): Whitespace fix.
2311 (gfc_simplify_log10): Whitespace fix.
2312 (gfc_simplify_minval): Whitespace fix.
2313 (gfc_simplify_maxval): Whitespace fix.
2314 (gfc_simplify_mod): Whitespace fix.
2315 (gfc_simplify_modulo): Whitespace fix.
2316 (simplify_nint): Reorderd statements.
2317 (gfc_simplify_not): Whitespace fix.
2318 (gfc_simplify_or): Replaced if-gate by more common switch-over-type.
2319 (gfc_simplify_radix): Removed unused result-variable. Whitespace fix.
2320 (gfc_simplify_range): Removed unused result-variable. Whitespace fix.
2321 (gfc_simplify_real): Use convert_boz() and gfc_convert_constant().
2322 (gfc_simplify_realpart): Whitespace fix.
2323 (gfc_simplify_selected_char_kind): Removed unused result-variable.
2324 (gfc_simplify_selected_int_kind): Removed unused result-variable.
2325 (gfc_simplify_selected_real_kind): Removed unused result-variable.
2326 (gfc_simplify_sign): Whitespace fix.
2327 (gfc_simplify_sin): Whitespace fix.
2328 (gfc_simplify_sinh): Replaced if-gate by more common switch-over-type.
2329 (gfc_simplify_sqrt): Avoided goto by inlining check. Whitespace fix.
2330 (gfc_simplify_tan): Replaced if-gate by more common switch-over-type.
2331 (gfc_simplify_tanh): Replaced if-gate by more common switch-over-type.
2332 (gfc_simplify_xor): Replaced if-gate by more common switch-over-type.
2334 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
2336 * gfortran.h (gfc_start_constructor): Removed.
2337 (gfc_get_array_element): Removed.
2338 * array.c (gfc_start_constructor): Removed, use gfc_get_array_expr
2339 instead. Fixed all callers.
2340 (extract_element): Removed.
2341 (gfc_expand_constructor): Temporarily removed check for
2342 max-array-constructor. Will be re-introduced later if still required.
2343 (gfc_get_array_element): Removed, use gfc_constructor_lookup_expr
2344 instead. Fixed all callers.
2345 * expr.c (find_array_section): Replaced manual lookup of elements
2346 by gfc_constructor_lookup.
2348 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
2350 * gfortran.h (gfc_get_null_expr): New prototype.
2351 (gfc_get_operator_expr): New prototype.
2352 (gfc_get_character_expr): New prototype.
2353 (gfc_get_iokind_expr): New prototype.
2354 * expr.c (gfc_get_null_expr): New.
2355 (gfc_get_character_expr): New.
2356 (gfc_get_iokind_expr): New.
2357 (gfc_get_operator_expr): Moved here from matchexp.c (build_node).
2358 * matchexp.c (build_node): Renamed and moved to
2359 expr.c (gfc_get_operator_expr). Reordered arguments to match
2360 other functions. Fixed all callers.
2361 (gfc_get_parentheses): Use specific function to build expr.
2362 * array.c (gfc_match_array_constructor): Likewise.
2363 * arith.c (eval_intrinsic): Likewise.
2364 (gfc_hollerith2int): Likewise.
2365 (gfc_hollerith2real): Likewise.
2366 (gfc_hollerith2complex): Likewise.
2367 (gfc_hollerith2logical): Likewise.
2368 * data.c (create_character_intializer): Likewise.
2369 * decl.c (gfc_match_null): Likewise.
2370 (enum_initializer): Likewise.
2371 * io.c (gfc_match_format): Likewise.
2372 (match_io): Likewise.
2373 * match.c (gfc_match_nullify): Likewise.
2374 * primary.c (match_string_constant): Likewise.
2375 (match_logical_constant): Likewise.
2376 (build_actual_constructor): Likewise.
2377 * resolve.c (build_default_init_expr): Likewise.
2378 * symbol.c (generate_isocbinding_symbol): Likewise.
2379 (gfc_build_class_symbol): Likewise.
2380 (gfc_find_derived_vtab): Likewise.
2381 * simplify.c (simplify_achar_char): Likewise.
2382 (gfc_simplify_adjustl): Likewise.
2383 (gfc_simplify_adjustr): Likewise.
2384 (gfc_simplify_and): Likewise.
2385 (gfc_simplify_bit_size): Likewise.
2386 (gfc_simplify_is_iostat_end): Likewise.
2387 (gfc_simplify_is_iostat_eor): Likewise.
2388 (gfc_simplify_isnan): Likewise.
2389 (simplify_bound): Likewise.
2390 (gfc_simplify_leadz): Likewise.
2391 (gfc_simplify_len_trim): Likewise.
2392 (gfc_simplify_logical): Likewise.
2393 (gfc_simplify_maxexponent): Likewise.
2394 (gfc_simplify_minexponent): Likewise.
2395 (gfc_simplify_new_line): Likewise.
2396 (gfc_simplify_null): Likewise.
2397 (gfc_simplify_or): Likewise.
2398 (gfc_simplify_precision): Likewise.
2399 (gfc_simplify_repeat): Likewise.
2400 (gfc_simplify_scan): Likewise.
2401 (gfc_simplify_size): Likewise.
2402 (gfc_simplify_trailz): Likewise.
2403 (gfc_simplify_trim): Likewise.
2404 (gfc_simplify_verify): Likewise.
2405 (gfc_simplify_xor): Likewise.
2406 * trans-io.c (build_dt): Likewise.
2407 (gfc_new_nml_name_expr): Removed.
2409 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
2411 * arith.h (gfc_constant_result): Removed prototype.
2412 * constructor.h (gfc_build_array_expr): Removed prototype.
2413 (gfc_build_structure_constructor_expr): Removed prototype.
2414 * gfortran.h (gfc_int_expr): Removed prototype.
2415 (gfc_logical_expr): Removed prototype.
2416 (gfc_get_array_expr): New prototype.
2417 (gfc_get_structure_constructor_expr): New prototype.
2418 (gfc_get_constant_expr): New prototype.
2419 (gfc_get_int_expr): New prototype.
2420 (gfc_get_logical_expr): New prototype.
2421 * arith.c (gfc_constant_result): Moved and renamed to
2422 expr.c (gfc_get_constant_expr). Fixed all callers.
2423 * constructor.c (gfc_build_array_expr): Moved and renamed to
2424 expr.c (gfc_get_array_expr). Split gfc_typespec argument to type
2425 and kind. Fixed all callers.
2426 (gfc_build_structure_constructor_expr): Moved and renamed to
2427 expr.c (gfc_get_structure_constructor_expr). Split gfc_typespec argument
2428 to type and kind. Fixed all callers.
2429 * expr.c (gfc_logical_expr): Renamed to ...
2430 (gfc_get_logical_expr): ... this. Added kind argument. Fixed all callers.
2431 (gfc_int_expr): Renamed to ...
2432 (gfc_get_int_expr): ... this. Added kind and where arguments. Fixed all
2434 (gfc_get_constant_expr): New.
2435 (gfc_get_array_expr): New.
2436 (gfc_get_structure_constructor_expr): New.
2437 * simplify.c (int_expr_with_kind): Removed, callers use gfc_get_int_expr
2440 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
2442 * constructor.h: New.
2443 * constructor.c: New.
2444 * Make-lang.in: Add new files to F95_PARSER_OBJS.
2445 * arith.c (reducy_unary): Use constructor API.
2446 (reduce_binary_ac): Likewise.
2447 (reduce_binary_ca): Likewise.
2448 (reduce_binary_aa): Likewise.
2449 * check.c (gfc_check_pack): Likewise.
2450 (gfc_check_reshape): Likewise.
2451 (gfc_check_unpack): Likewise.
2452 * decl.c (add_init_expr_to_sym): Likewise.
2453 (build_struct): Likewise.
2454 * dependency.c (gfc_check_dependency): Likewise.
2455 (contains_forall_index_p): Likewise.
2456 * dump-parse-tree.c (show_constructor): Likewise.
2457 * expr.c (free_expr0): Likewise.
2458 (gfc_copy_expr): Likewise.
2459 (gfc_is_constant_expr): Likewise.
2460 (simplify_constructor): Likewise.
2461 (find_array_element): Likewise.
2462 (find_component_ref): Likewise.
2463 (find_array_section): Likewise.
2464 (find_substring_ref): Likewise.
2465 (simplify_const_ref): Likewise.
2466 (scalarize_intrinsic_call): Likewise.
2467 (check_alloc_comp_init): Likewise.
2468 (gfc_default_initializer): Likewise.
2469 (gfc_traverse_expr): Likewise.
2470 * iresolve.c (check_charlen_present): Likewise.
2471 (gfc_resolve_reshape): Likewise.
2472 (gfc_resolve_transfer): Likewise.
2473 * module.c (mio_constructor): Likewise.
2474 * primary.c (build_actual_constructor): Likewise.
2475 (gfc_match_structure_constructor): Likewise.
2476 * resolve.c (resolve_structure_cons): Likewise.
2477 * simplify.c (is_constant_array_expr): Likewise.
2478 (init_result_expr): Likewise.
2479 (transformational_result): Likewise.
2480 (simplify_transformation_to_scalar): Likewise.
2481 (simplify_transformation_to_array): Likewise.
2482 (gfc_simplify_dot_product): Likewise.
2483 (simplify_bound): Likewise.
2484 (simplify_matmul): Likewise.
2485 (simplify_minval_maxval): Likewise.
2486 (gfc_simplify_pack): Likewise.
2487 (gfc_simplify_reshape): Likewise.
2488 (gfc_simplify_shape): Likewise.
2489 (gfc_simplify_spread): Likewise.
2490 (gfc_simplify_transpose): Likewise.
2491 (gfc_simplify_unpack): Likewise.q
2492 (gfc_convert_constant): Likewise.
2493 (gfc_convert_char_constant): Likewise.
2494 * target-memory.c (size_array): Likewise.
2495 (encode_array): Likewise.
2496 (encode_derived): Likewise.
2497 (interpret_array): Likewise.
2498 (gfc_interpret_derived): Likewise.
2499 (expr_to_char): Likewise.
2500 (gfc_merge_initializers): Likewise.
2501 * trans-array.c (gfc_get_array_constructor_size): Likewise.
2502 (gfc_trans_array_constructor_value): Likewise.
2503 (get_array_ctor_strlen): Likewise.
2504 (gfc_constant_array_constructor_p): Likewise.
2505 (gfc_build_constant_array_constructor): Likewise.
2506 (gfc_trans_array_constructor): Likewise.
2507 (gfc_conv_array_initializer): Likewise.
2508 * trans-decl.c (check_constant_initializer): Likewise.
2509 * trans-expr.c (flatten_array_ctors_without_strlen): Likewise.
2510 (gfc_apply_interface_mapping_to_cons): Likewise.
2511 (gfc_trans_structure_assign): Likewise.
2512 (gfc_conv_structure): Likewise.
2513 * array.c (check_duplicate_iterator): Likewise.
2514 (match_array_list): Likewise.
2515 (match_array_cons_element): Likewise.
2516 (gfc_match_array_constructor): Likewise.
2517 (check_constructor_type): Likewise.
2518 (check_constructor): Likewise.
2520 (expand_constructor): Likewise.
2521 (extract_element): Likewise.
2522 (gfc_expanded_ac): Likewise.
2523 (resolve_array_list): Likewise.
2524 (gfc_resolve_character_array_constructor): Likewise.
2525 (copy_iterator): Renamed to ...
2526 (gfc_copy_iterator): ... this.
2527 (gfc_append_constructor): Removed.
2528 (gfc_insert_constructor): Removed unused function.
2529 (gfc_get_constructor): Removed.
2530 (gfc_free_constructor): Removed.
2531 (qgfc_copy_constructor): Removed.
2532 * gfortran.h (struct gfc_expr): Removed member 'con_by_offset'.
2533 Removed all references. Replaced constructor list by splay-tree.
2534 (struct gfc_constructor): Removed member 'next', moved 'offset' from
2535 the inner struct, added member 'base'.
2536 (gfc_append_constructor): Removed prototype.
2537 (gfc_insert_constructor): Removed prototype.
2538 (gfc_get_constructor): Removed prototype.
2539 (gfc_free_constructor): Removed prototype.
2540 (qgfc_copy_constructor): Removed prototype.
2541 (gfc_copy_iterator): New prototype.
2542 * trans-array.h (gfc_constant_array_constructor_p): Adjusted prototype.
2544 2010-04-10 Tobias Burnus <burnus@net-b.de>
2547 * expr.c (gfc_is_constant_expr, gfc_traverse_expr): Handle
2548 proc-pointers and type-bound procedures.
2549 (gfc_specification_expr): Check proc-pointers for pureness.
2551 2010-04-09 Iain Sandoe <iains@gcc.gnu.org>
2554 * gfortranspec.c (lang_specific_driver): Do not expose vars
2555 only used by HAVE_LD_STATIC_DYNAMIC targets unless compiling
2558 2010-04-09 Tobias Burnus <burnus@net-b.de>
2561 * decl.c (variable_decl, match_attr_spec): Fix setting the array
2563 * array.c (match_subscript,gfc_match_array_ref): Add coarray support.
2564 * data.c (gfc_assign_data_value): Ditto.
2565 * expr.c (gfc_check_pointer_assign): Add check for coarray constraint.
2566 (gfc_traverse_expr): Traverse also through codimension expressions.
2567 (gfc_is_coindexed, gfc_has_ultimate_allocatable,
2568 gfc_has_ultimate_pointer): New functions.
2569 * gfortran.h (gfc_array_ref_dimen_type): Add DIMEN_STAR for coarrays.
2570 (gfc_array_ref): Add codimen.
2571 (gfc_array_ref): Add in_allocate.
2572 (gfc_is_coindexed, gfc_has_ultimate_allocatable,
2573 gfc_has_ultimate_pointer): Add prototypes.
2574 * interface.c (compare_parameter, compare_actual_formal,
2575 check_intents): Add coarray constraints.
2576 * match.c (gfc_match_iterator): Add coarray constraint.
2577 * match.h (gfc_match_array_ref): Update interface.
2578 * primary.c (gfc_match_varspec): Handle codimensions.
2579 * resolve.c (coarray_alloc, inquiry_argument): New static variables.
2580 (check_class_members): Return gfc_try instead for error recovery.
2581 (resolve_typebound_function,resolve_typebound_subroutine,
2582 check_members): Handle return value of check_class_members.
2583 (resolve_structure_cons, resolve_actual_arglist, resolve_function,
2584 check_dimension, compare_spec_to_ref, resolve_array_ref,
2585 resolve_ref, resolve_variable, gfc_resolve_expr, conformable_arrays,
2586 resolve_allocate_expr, resolve_ordinary_assign): Add coarray
2588 * trans-array.c (gfc_conv_array_ref, gfc_walk_variable_expr):
2589 Skip over coarray refs.
2590 (gfc_array_allocate) Add support for references containing coindexes.
2591 * trans-expr.c (gfc_add_interface_mapping): Copy coarray attribute.
2592 (gfc_map_intrinsic_function): Ignore codimensions.
2594 2010-04-08 Bud Davis <bdavis9659@sbcglobal.net>
2597 * io.c (check_format_string): Added check for additional non
2598 blank characters after the format string was successfully
2600 * io.c (check_format): Changed the error messages for positive
2601 int required and period required to drop through the error logic
2602 and report with gfc_error instead of gfc_error_now. Corrected
2603 format postion for hollerith strings.
2605 2010-04-08 Tobias Burnus <burnus@net-b.de>
2607 * module.c (use_iso_fortran_env_module): Fix standard check.
2609 2010-04-07 Jakub Jelinek <jakub@redhat.com>
2611 * parse.c (parse_derived, parse_enum): Avoid set but not used
2614 2010-04-07 Janne Blomqvist <jb@gcc.gnu.org>
2617 * gfortran.texi: Add section about representation of
2620 2010-04-07 Simon Baldwin <simonb@google.com>
2622 * cpp.c (cb_cpp_error): Add warning reason argument, set a value
2623 for diagnostic_override_option_index if CPP_W_WARNING_DIRECTIVE.
2625 2010-04-07 Richard Guenther <rguenther@suse.de>
2627 * options.c (gfc_init_options): Do not set.
2629 2010-04-06 Tobias Burnus <burnus@net-b.de>
2632 * array.c (gfc_match_array_spec): Add error for -fcoarray=none.
2633 * match.c (gfc_match_critical, sync_statement): Ditto.
2634 * gfortran.h (gfc_fcoarray): New enum.
2635 (gfc_option_t): Use it.
2636 * lang.opt (fcoarray): Add new flag.
2637 * invoke.texi (fcoarray): Document it.
2638 * options.c (gfc_init_options,gfc_handle_option): Handle -fcoarray=.
2639 (gfc_handle_coarray_option): New function.
2641 2010-04-06 Tobias Burnus <burnus@net-b.de>
2644 * gfortran.h (gfc_array_spec): Add cotype.
2645 * array.c (gfc_match_array_spec,gfc_set_array_spec): Use it
2646 and defer error diagnostic.
2647 * resolve.c (resolve_fl_derived): Add missing check.
2648 (resolve_symbol): Add cotype/type check.
2649 * parse.c (parse_derived): Fix setting of coarray_comp.
2651 2010-04-06 Tobias Burnus <burnus@net-b.de>
2654 * array.c (gfc_free_array_spec,gfc_resolve_array_spec,
2655 match_array_element_spec,gfc_copy_array_spec,
2656 gfc_compare_array_spec): Include corank.
2657 (match_array_element_spec,gfc_set_array_spec): Support codimension.
2658 * decl.c (build_sym,build_struct,variable_decl,
2659 match_attr_spec,attr_decl1,cray_pointer_decl,
2660 gfc_match_volatile): Add codimension.
2661 (gfc_match_codimension): New function.
2662 * dump-parse-tree.c (show_array_spec,show_attr): Support codimension.
2663 * gfortran.h (symbol_attribute,gfc_array_spec): Ditto.
2664 (gfc_add_codimension): New function prototype.
2665 * match.h (gfc_match_codimension): New function prototype.
2666 (gfc_match_array_spec): Update prototype
2667 * match.c (gfc_match_common): Update gfc_match_array_spec call.
2668 * module.c (MOD_VERSION): Bump.
2669 (mio_symbol_attribute): Support coarray attributes.
2670 (mio_array_spec): Add corank support.
2671 * parse.c (decode_specification_statement,decode_statement,
2672 parse_derived): Add coarray support.
2673 * resolve.c (resolve_formal_arglist, was_declared,
2674 is_non_constant_shape_array, resolve_fl_variable,
2675 resolve_fl_derived, resolve_symbol): Add coarray support.
2676 * symbol.c (check_conflict, gfc_add_volatile, gfc_copy_attr,
2677 gfc_build_class_symbol): Add coarray support.
2678 (gfc_add_codimension): New function.
2680 2010-04-06 Tobias Burnus <burnus@net-b.de>
2683 * iso-fortran-env.def: Add the integer parameters atomic_int_kind,
2684 atomic_logical_kind, iostat_inquire_internal_unit, stat_locked,
2685 stat_locked_other_image, stat_stopped_image and stat_unlocked of
2687 * intrinsic.texi (iso_fortran_env): Ditto.
2688 * libgfortran.h (libgfortran_stat_codes): New enum.
2689 * module.c (use_iso_fortran_env_module): Honour -std= when loading
2690 constants from the intrinsic module.
2692 2010-04-06 Tobias Burnus <burnus@net-b.de>
2695 * intrinsic.c (add_functions): Add num_images.
2696 * decl.c (gfc_match_end): Handle END CRITICAL.
2697 * intrinsic.h (gfc_simplify_num_images): Add prototype.
2698 * dump-parse-tree.c (show_code_node): Dump CRITICAL, ERROR STOP,
2700 * gfortran.h (gfc_statement): Add enum items for those.
2701 (gfc_exec_op) Ditto.
2702 (gfc_isym_id): Add num_images.
2703 * trans-stmt.c (gfc_trans_stop): Handle ERROR STOP.
2704 (gfc_trans_sync,gfc_trans_critical): New functions.
2705 * trans-stmt.h (gfc_trans_stop,gfc_trans_sync,
2706 gfc_trans_critical): Add/update prototypes.
2707 * trans.c (gfc_trans_code): Handle CRITICAL, ERROR STOP,
2708 and SYNC statements.
2709 * trans.h (gfor_fndecl_error_stop_string) Add variable.
2710 * resolve.c (resolve_sync): Add function.
2711 (gfc_resolve_blocks): Handle CRITICAL.
2712 (resolve_code): Handle CRITICAL, ERROR STOP,
2713 (resolve_branch): Add CRITICAL constraint check.
2714 and SYNC statements.
2715 * st.c (gfc_free_statement): Add new statements.
2716 * trans-decl.c (gfor_fndecl_error_stop_string): Global variable.
2717 (gfc_build_builtin_function_decls): Initialize it.
2718 * match.c (gfc_match_if): Handle ERROR STOP and SYNC.
2719 (gfc_match_critical, gfc_match_error_stop, sync_statement,
2720 gfc_match_sync_all, gfc_match_sync_images, gfc_match_sync_memory):
2722 (match_exit_cycle): Handle CRITICAL constraint.
2723 (gfc_match_stopcode): Handle ERROR STOP.
2724 * match.h (gfc_match_critical, gfc_match_error_stop,
2725 gfc_match_sync_all, gfc_match_sync_images,
2726 gfc_match_sync_memory): Add prototype.
2727 * parse.c (decode_statement, gfc_ascii_statement,
2728 parse_executable): Handle new statements.
2729 (parse_critical_block): New function.
2730 * parse.h (gfc_compile_state): Add COMP_CRITICAL.
2731 * intrinsic.texi (num_images): Document new function.
2732 * simplify.c (gfc_simplify_num_images): Add function.
2734 2010-04-06 Tobias Burnus <burnus@net-b.de>
2737 * trans-array.c (gfc_conv_expr_descriptor): Update
2738 gfc_trans_scalar_assign call.
2739 (has_default_initializer): New function.
2740 (gfc_trans_deferred_array): Nullify less often.
2741 * trans-expr.c (gfc_conv_subref_array_arg,
2742 gfc_trans_subcomponent_assign): Update call to
2743 gfc_trans_scalar_assign.
2744 (gfc_trans_scalar_assign): Add parameter and pass it on.
2745 (gfc_trans_assignment_1): Optionally, do not dealloc before
2747 * trans-openmp.c (gfc_trans_omp_array_reduction): Update
2748 call to gfc_trans_scalar_assign.
2749 * trans-decl.c (gfc_get_symbol_decl): Do not always apply
2750 initializer to static variables.
2751 (gfc_init_default_dt): Add dealloc parameter and pass it on.
2752 * trans-stmt.c (forall_make_variable_temp,
2753 generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
2754 gfc_trans_forall_1, gfc_trans_where_assign, gfc_trans_where_3
2755 gfc_trans_allocate): Update gfc_trans_assignment call.
2756 * trans.h (gfc_trans_scalar_assign, gfc_init_default_dt,
2757 gfc_init_default_dt, gfc_trans_assignment): Add bool dealloc
2758 parameter to prototype.
2760 2010-03-31 Paul Thomas <pault@gcc.gnu.org>
2762 * ioparm.def : Update copyright.
2764 * trans-array.c : ditto
2765 * trans-array.h : ditto
2767 * trans-types.c: ditto
2768 * dependency.c : ditto
2769 * gfortran.h : ditto
2771 * trans-io.c : ditto
2772 * trans-intrinsic.c : ditto
2773 * libgfortran.h : ditto
2774 * invoke.texi : ditto
2775 * intrinsic.texi : ditto
2778 * intrinsic.c : ditto
2779 * interface.c : ditto
2780 * iresolve.c : ditto
2781 * trans-stmt.c : ditto
2782 * trans-stmt.h : ditto
2787 2010-03-20 Paul Thomas <pault@gcc.gnu.org>
2790 * trans-decl.c (gfc_create_module_variable): With -fwhole-file
2791 do not assert the context of derived types.
2793 2010-03-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2796 * ioparm.def: Change inquire size variable to type pointer to
2799 2010-03-18 Paul Thomas <pault@gcc.gnu.org>
2802 * trans-expr.c (conv_parent_component_references): Ensure that
2803 'dt' has a backend_decl.
2806 * trans-expr.c (gfc_conv_structure): Ensure that the derived
2807 type has a backend_decl.
2810 * resolve.c (resolve_global_procedure): Check that the 'cl'
2811 structure is not NULL.
2813 2010-03-18 Shujing Zhao <pearly.zhao@oracle.com>
2815 * lang.opt (-ffixed-line-length-, ffree-line-length-): Remove
2818 2010-03-17 Tobias Burnus <burnus@net-b.de>
2821 * trans-array.c (gfc_conv_array_index_offset,gfc_conv_array_ref,
2822 gfc_conv_ss_startstride): Remove no-longer-needed cp_was_assumed
2824 * decl.c (gfc_match_derived_decl): Don't mark assumed-size Cray
2825 pointees as having explizit size.
2826 * expr.c (gfc_check_assign): Remove now unreachable Cray pointee
2828 * trans-types.c (gfc_is_nodesc_array): Add cp_was_assumed to assert.
2829 (gfc_sym_type): Don't mark Cray pointees as restricted pointers.
2830 * resolve.c (resolve_symbol): Handle cp_was_assumed.
2831 * trans-decl.c (gfc_trans_deferred_vars): Ditto.
2832 (gfc_finish_var_decl): Don't mark Cray pointees as restricted
2835 2010-03-14 Tobias Burnus <burnus@net-b.de>
2838 * resolve.c (resolve_structure_cons): Add missing PURE constraint.
2839 (resolve_ordinary_assign): Add check to avoid segfault.
2841 2010-03-12 Paul Thomas <pault@gcc.gnu.org>
2845 * resolve.c (resolve_compcall): Add new boolean dummy argument
2846 'class_members'. Only resolve expression at end if false.
2847 Remove redundant, static variable 'class_object'.
2848 (check_class_members): Add extra argument to call of
2850 (resolve_typebound_function): Renamed resolve_class_compcall.
2851 Do all the detection of class references here. Correct calls to
2852 resolve_compcall for extra argument.
2853 (resolve_typebound_subroutine): resolve_class_typebound_call
2854 renamed. Otherwise same as resolve_typebound_function.
2855 (gfc_resolve_expr): Call resolve_typebound_function.
2856 (resolve_code): Call resolve_typebound_subroutine.
2858 2010-03-10 Tobias Burnus <burnus@net-b.de
2861 * symbol.c (get_iso_c_sym): Set sym->result.
2863 2010-03-08 Janus Weil <janus@gcc.gnu.org>
2866 * resolve.c (resolve_compcall): Don't set 'value.function.name' here
2867 for TBPs, otherwise they will not be resolved properly.
2868 (resolve_function): Use 'value.function.esym' instead of
2869 'value.function.name' to check if we're dealing with a TBP.
2870 (check_class_members): Set correct type of passed object for all TBPs,
2871 not only generic ones, except if the type is abstract.
2873 2010-03-04 Janus Weil <janus@gcc.gnu.org>
2876 * decl.c (gfc_match_final_decl): Make sure variable names starting with
2877 'final...' are not misinterpreted as FINAL statements.
2879 2010-03-03 Paul Thomas <pault@gcc.gnu.org>
2882 * trans-array.c (gfc_conv_array_parameter): Contiguous refs to
2883 allocatable ultimate components do not need temporaries, whilst
2884 ultimate pointer components do.
2886 2010-03-03 Janus Weil <janus@gcc.gnu.org>
2889 * resolve.c (resolve_code): Correctly set gfc_current_ns for
2891 (gfc_impure_variable): Make it work with sub-namespaces (BLOCK etc).
2894 2010-03-02 Paul Thomas <pault@gcc.gnu.org>
2897 * trans-array.c (gfc_conv_array_parameter): A full array of
2898 derived type need not be restricted to a symbol without an
2899 array spec to use the call to gfc_conv_expr_descriptor.
2902 * trans-array.c (gfc_conv_array_parameter): Contiguous refs to
2903 allocatable arrays do not need temporaries.
2905 2010-03-01 Tobias Burnus <burnus@net-b.de>
2908 * resolve.c (find_array_spec): Handle REF_COMPONENT with
2911 2010-02-28 Tobias Burnus <burnus@net-b.de>
2914 * trans-expr.c (is_zero_initializer_p): Move up in the file.
2915 (gfc_conv_initializer): Handle zero initializer as special case.
2917 2010-02-27 Tobias Burnus <burnus@net-b.de>
2920 * resolve.c (resolve_fl_variable_derived): Imply SAVE
2921 for module variables for Fortran 2008.
2923 2010-02-25 Jakub Jelinek <jakub@redhat.com>
2926 * trans-common.c (build_common_decl): Also update DECL_MODE,
2927 and DECL_SIZE when encountering a larger common block and call
2930 2010-02-24 Tobias Burnus <burnus@net-b.de>
2933 * trans-expr.c (gfc_conv_initializer): Call directly
2934 gfc_conv_constant for C_NULL_(FUN)PTR.
2936 2010-02-22 Paul Thomas <pault@gcc.gnu.org>
2939 * dependency.c (gfc_full_array_ref_p): Check for contiguous by
2940 checking the rest of the dimensions for elements.
2942 2010-02-21 Tobias Burnus <burnus@net-b.de>
2945 * gfortran.h (gfc_option_t): New flag -fprotect-parens.
2947 * option.c (gfc_init_options,gfc_handle_option): Ditto.
2948 * trans-expr.c (gfc_conv_expr_op): Use the flag.
2949 * invoke.texi: Document new -fno-protect-parens flag.
2951 2010-02-20 Paul Thomas <pault@gcc.gnu.org>
2957 * dependency.c (gfc_check_argument_var_dependency): Use enum
2958 value instead of arithmetic vaue for 'elemental'.
2959 (check_data_pointer_types): New function.
2960 (gfc_check_dependency): Call check_data_pointer_types.
2961 * trans-array.h : Change fourth argument of
2962 gfc_conv_array_parameter to boolean.
2963 * trans-array.c (gfc_conv_array_parameter): A contiguous array
2964 can be a dummy but it must not be assumed shape or deferred.
2965 Change fourth argument to boolean. Array constructor exprs will
2966 always be contiguous and do not need packing and unpacking.
2967 * trans-expr.c (gfc_conv_procedure_call): Clean up some white
2968 space and change fourth argument of gfc_conv_array_parameter
2970 (gfc_trans_arrayfunc_assign): Change fourth argument of
2971 gfc_conv_array_parameter to boolean.
2972 * trans-io.c (gfc_convert_array_to_string): The same.
2973 * trans-intrinsic.c (gfc_conv_intrinsic_loc): The same.
2975 2010-02-20 Tobias Burnus <burnus@net-b.de>
2978 * libgfortran.h: Add GFC_RTCHECK_MEM.
2979 * invoke.texi (-fcheck=): Document -fcheck=mem.
2980 * tranc.c (gfc_call_malloc): Remove negative-size run-time error
2981 and enable malloc-success check only with -fcheck=mem.
2982 * option.c (gfc_handle_runtime_check_option): Add -fcheck=mem.
2984 2010-02-16 Tobias Burnus <burnus@net-b.de>
2987 * gfortran.h (gfc_isym_id): Rename GFS_ISYM_GAMMA to GFS_ISYM_TGAMMA.
2988 * intrinsic.c (add_functions): Ditto.
2989 * iresolve.c (gfc_resolve_gamma): Call tgamma instead of gamma.
2990 * mathbuiltins.def: Use TGAMMA instead of GAMMA with "tgamma".
2992 2010-02-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2995 * trans-stmt.h: Add prototype for gfc_trans_code_cond. Add tree cond to
2996 gfc_trans_do prototype.
2997 * trans-stmt.c (gfc_trans_simple_do): Add optional argument to pass in
2998 a loop exit condition. If exit condition is given, build the loop exit
2999 code, checking IO results of implied do loops in READ and WRITE.
3000 (gfc_trans_do): Likewise.
3001 * trans.c (trans_code): New static work function, previously
3002 gfc_trans_code. Passes exit condition to gfc_trans_do.
3003 (gfc_trans_code): Calls trans_code with NULL_TREE condition.
3004 (gfc_trans_code_cond): Calls trans_code with loop exit condition.
3005 * trans-io.c (build_dt): Build an exit condition to allow checking IO
3006 result status bits in the dtparm structure. Use this condition in call
3007 to gfc_trans_code_cond.
3009 2010-02-13 Paul Thomas <pault@gcc.gnu.org>
3013 * trans-array.c (gfc_conv_array_parameter): Use
3014 gfc_full_array_ref_p to detect full and contiguous variable
3015 arrays. Full array components and contiguous arrays do not need
3016 internal_pack and internal_unpack.
3018 2010-02-11 Jakub Jelinek <jakub@redhat.com>
3021 * resolve.c (gfc_resolve_dim_arg): Call gfc_clear_ts.
3024 * decl.c (enumerator_decl): Don't call gfc_free_enum_history
3026 (gfc_match_enumerator_def): But here whenever enumerator_decl returns
3029 2010-02-10 Joost VandeVondele <jv244@cam.ac.uk>
3030 Tobias Burnus <burnus@net-b.de>
3033 * decl.c (gfc_match_subroutine): Explicitly set sym->declared_at.
3035 2010-02-10 Tobias Burnus <burnus@net-b.de>
3038 * trans-decl.c (gfc_generate_function_code): Only check
3039 actual-vs.-dummy character bounds if not bind(C).
3041 2010-02-10 Jakub Jelinek <jakub@redhat.com>
3044 * trans-expr.c (gfc_conv_subref_array_arg): Avoid accessing
3045 info->dimen after info has been freed.
3047 2010-02-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3050 * array.c (gfc_constant_ac): Do not prevent expansion of constructors
3053 2010-02-09 Jakub Jelinek <jakub@redhat.com>
3055 * module.c (fix_mio_expr): Declare sym.
3057 2010-02-09 Paul Thomas <pault@gcc.gnu.org>
3060 * module.c (fix_mio_expr): Fix for private generic procedures.
3062 2010-02-09 Daniel Kraft <d@domob.eu>
3065 * resolve.c (resolve_charlen): Change warning about negative CHARACTER
3066 length to be correct and issue only with -Wsurprising.
3067 * invoke.texi (Wsurprising): Mention this new warning that is
3068 turned on by -Wsurprising.
3070 2010-02-09 Daniel Kraft <d@domob.eu>
3073 * intrinsic.texi (MAXVAL): Remove wrong claim that array argument
3074 can be CHARACTER type.
3075 (MINVAL), (MAXLOC), (MINLOC): Ditto.
3077 2010-02-05 Paul Thomas <pault@gcc.gnu.org>
3080 * trans-expr.c (gfc_conv_subref_array_arg): Add new argument
3081 'formal_ptr'. If this is true, give returned descriptor unity
3082 lbounds, in all dimensions, and the appropriate offset.
3083 (gfc_conv_procedure_call); If formal is a pointer, set the last
3084 argument of gfc_conv_subref_array_arg to true.
3085 * trans.h : Add last argument for gfc_conv_subref_array_arg.
3086 * trans-io.c (set_internal_unit, gfc_trans_transfer): Set the
3087 new arg of gfc_conv_subref_array_arg to false.
3088 * trans-stmt.c (forall_make_variable_temp): The same.
3090 2010-02-03 Tobias Burnus <burnus@net-b.de>
3093 * interface.c (compare_parameter): Disable rank-checking
3096 2010-02-02 Tobias Burnus <burnus@net-b.de>
3099 * parse.c (decode_specification_statement): Use sym->result not sym.
3101 2010-02-01 Tobias Burnus <burnus@net-b.de>
3104 * decl.c (variable_decl): Allow default initializer in
3105 TYPE declarations in PURE functions.
3107 2010-01-31 Janus Weil <janus@gcc.gnu.org>
3110 * resolve.c (resolve_allocate_expr): Move default initialization code
3111 here from gfc_trans_allocate.
3112 * trans.c (gfc_trans_code): Call gfc_trans_class_assign also for
3114 * trans-expr.c (gfc_trans_class_assign): Handle default initialization
3115 of CLASS variables via memcpy.
3116 * trans-stmt.c (gfc_trans_allocate): Move default initialization code
3117 to resolve_allocate_expr.
3119 2010-01-31 Paul Thomas <pault@gcc.gnu.org>
3122 * expr.c (gfc_get_full_arrayspec_from_expr): New function.
3123 * gfortran.h : Add prototype for above.
3124 * trans-expr.c (gfc_trans_alloc_subarray_assign): New function.
3125 (gfc_trans_subcomponent_assign): Call new function to replace
3126 the code to deal with allocatable components.
3127 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Call
3128 gfc_get_full_arrayspec_from_expr to replace existing code.
3130 2010-01-25 Tobias Burnus <burnus@net-b.de>
3133 * array.c (gfc_array_dimen_size): Fix intrinsic procedure
3136 2010-01-24 Paul Thomas <pault@gcc.gnu.org>
3140 * expr.c (remove_subobject_ref): If the constructor is NULL use
3141 the expression as the source.
3142 (simplify_const_ref): Change the type of expression if
3143 there are component references. Allow for substring to be at
3144 the end of an arbitrarily long chain of references. If an
3145 element is found that is not in an EXPR_ARRAY, assume that this
3146 is scalar initialization of array. Call remove_subobject_ref in
3147 this case with NULL second argument.
3149 2010-01-24 Tobias Burnus <burnus@net-b.de>
3152 * array.c (gfc_array_dimen_size): Use correct specific
3153 function in the check.
3155 2010-01-21 Paul Thomas <pault@gcc.gnu.org>
3158 * trans-stmt.c (gfc_conv_elemental_dependencies): If temporary
3159 is required, turn any trailing array elements after a range
3160 into ranges so that offsets can be calculated.
3162 2010-01-20 Joern Rennecke <amylaar@spamcop.net>
3164 * module.c (mio_f2k_derived): Use enumerator as initializer of
3168 * gfortran.h (struct gfc_namespace) <resolved>: Change to signed
3169 bitfield of width 2.
3171 2010-01-19 Janus Weil <janus@gcc.gnu.org>
3174 * resolve.c (extract_compcall_passed_object): Set locus for
3175 passed-object argument.
3176 (extract_ppc_passed_object): Set locus and correctly remove PPC
3179 2010-01-19 Paul Thomas <pault@gcc.gnu.org>
3182 * trans-decl.c (add_argument_checking): Do not use the backend
3183 decl directly to test for the presence of an optional dummy
3184 argument. Use gfc_conv_expr_present, remembering to set the
3188 * trans-decl.c (gfc_generate_function_code): Small white space
3189 changes. If 'recurcheckvar' is NULL do not try to reset it.
3191 2010-01-19 Janus Weil <janus@gcc.gnu.org>
3194 * resolve.c (resolve_fl_derived): Set the accessibility of the parent
3195 component for extended types.
3196 * symbol.c (gfc_find_component): Remove a wrongly-worded error message
3197 and take care of parent component accessibility.
3199 2010-01-17 Janus Weil <janus@gcc.gnu.org>
3202 * gfortran.h (symbol_attribute): Remove 'ambiguous_interfaces'.
3203 * interface.c (check_interface1): Move a warning message here from
3204 resolve_fl_procedure.
3205 (check_sym_interfaces): Removed 'attr.ambiguous_interfaces'.
3206 * module.c (read_module): Remove call to gfc_check_interfaces, since
3207 this comes too early here.
3208 * resolve.c (resolve_fl_procedure): Move warning message to
3211 2010-01-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3214 * interface.c (check_interface1): Pass symbol name rather than NULL to
3215 gfc_compare_interfaces. (gfc_compare_interfaces): Add assert to
3217 * resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather
3218 than NULL to gfc_compare_interfaces.
3220 2010-01-14 Paul Thomas <pault@gcc.gnu.org>
3223 * trans-array.c (duplicate_allocatable): Static version of
3224 gfc_duplicate_allocatable with provision to handle scalar
3225 components. New boolean argument to switch off call to malloc
3227 (gfc_duplicate_allocatable): New function to call above with
3229 (gfc_copy_allocatable_data): New function to call above with
3231 (structure_alloc_comps): Do not apply indirect reference to
3232 scalar pointers. Add new section to copy allocatable components
3233 of arrays. Extend copying of allocatable components to include
3235 (gfc_copy_only_alloc_comp): New function to copy allocatable
3236 component derived types, without allocating the base structure.
3237 * trans-array.h : Add primitive for gfc_copy_allocatable_data.
3238 Add primitive for gfc_copy_only_alloc_comp.
3239 * trans-expr.c (gfc_conv_procedure_call): After calls to
3240 transformational functions with results that are derived types
3241 with allocatable components, copy the components in the result.
3242 (gfc_trans_arrayfunc_assign): Deallocate allocatable components
3243 of lhs derived types before allocation.
3245 2010-01-14 Paul Thomas <pault@gcc.gnu.org>
3248 * module.c (load_generic_interfaces): If a procedure that is
3249 use associated but not generic is given an interface that
3250 includes itself, then make it generic.
3252 2010-01-11 Joseph Myers <joseph@codesourcery.com>
3253 Shujing Zhao <pearly.zhao@oracle.com>
3255 PR translation/42469
3256 * lang.opt (fblas-matmul-limit=, finit-character=, finit-integer=,
3257 finit-logical=, finit-real=, fmax-array-constructor=): Use tab
3258 character between option name and help text.
3260 2010-01-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3264 * trans-array.c (gfc_conv_array_initializer): Change call to
3265 gfc_error_now to call to gfc_fatal_error.
3266 * array.c (count_elements): Whitespace. (extract_element): Whitespace.
3267 (is_constant_element): Changed name from constant_element.
3268 (gfc_constant_ac): Only use expand_construuctor for expression
3269 types of EXPR_ARRAY. If expression type is EXPR_CONSTANT, no need to
3270 call gfc_is_constant_expr.
3271 * expr.c (gfc_reduce_init_expr): Adjust conditionals and delete error
3273 * resolve.c (gfc_is_expandable_expr): New function that determiners if
3274 array expressions should have their constructors expanded.
3275 (gfc_resolve_expr): Use new function to determine whether or not to call
3276 gfc_expand_constructor.
3278 2010-01-09 Tobias Burnus <burnus@net-b.de>
3281 * trans-expr.c (gfc_trans_structure_assign): Handle
3283 * symbol.c (gen_special_c_interop_ptr): Add NULL_EXPR
3284 to the constructor for c_null_(fun)ptr.
3285 * resolve.c (resolve_structure_cons): Add special case
3286 for c_null_(fun)ptr.
3288 2010-01-09 Jakub Jelinek <jakub@redhat.com>
3290 * gfortranspec.c (lang_specific_driver): Update copyright notice
3293 2010-01-08 Tobias Burnus <burnus@net-b.de>
3296 * symbol.c (check_conflict, gfc_copy_attr): Add
3297 ASYNCHRONOUS support.
3298 (gfc_add_asynchronous): New function.
3299 * decl.c (match_attr_spec): Add ASYNCHRONOUS support.
3300 (gfc_match_asynchronous): New function.
3301 * dump-parse-tree.c (show_attr): Add ASYNCHRONOUS support.
3302 * gfortran.h (symbol_attribute): New ASYNCHRONOUS bit.
3303 (gfc_add_asynchronous): New Prototype.
3304 * module.c (ab_attribute, mio_symbol_attribute): Add
3305 ASYNCHRONOUS support.
3306 * resolve.c (was_declared): Ditto.
3307 * match.h (gfc_match_asynchronous): New prototype.
3308 * parse.c (decode_specification_statement,decode_statement):
3309 Add ASYNCHRONOUS support.
3311 2010-01-07 Tobias Burnus <burnus@net-b.de>
3314 * trans-decl.c (get_proc_pointer_decl): Fix call to
3315 gfc_conv_initializer for array-valued proc-pointer funcs.
3317 2010-01-07 Tobias Burnus <burnus@net-b.de>
3320 * trans-decl.c (gfc_trans_deferred_vars): Don't initialize
3321 allocatable scalars with SAVE attribute.
3323 2010-01-05 Tobias Burnus <burnus@net-b.de>
3326 * options.c (gfc_post_options): Set -frecursion
3327 when -fopenmp is used.
3329 2010-01-05 Tobias Burnus <burnus@net-b.de>
3332 * trans-expr.c (gfc_conv_procedure_call): Nullify
3333 return value for allocatable-scalar character functions.
3335 2010-01-04 Tobias Burnus <burnus@net-b.de>
3338 * error.c (error_printf, gfc_warning, gfc_notify_std,
3339 gfc_warning_now, gfc_error, gfc_error_now,
3340 gfc_fatal_error): Change argument name from nocmsgid to
3341 gmsgid to enable (x)gettext's % checking.
3343 2010-01-04 Tobias Burnus <burnus@net-b.de>
3345 * trans-decl.c (gfc_trans_deferred_vars): Fix spelling.
3347 2010-01-04 Tobias Burnus <burnus@net-b.de>
3350 * trans-expr.c (gfc_conv_procedure_call): Add indirect ref
3351 for functions returning allocatable scalars.
3352 * trans-stmt.c (gfc_trans_allocate): Emmit error when
3353 reallocating an allocatable scalar.
3354 * trans.c (gfc_allocate_with_status): Fix pseudocode syntax
3356 * trans-decl.c (gfc_trans_deferred_vars): Nullify local
3357 allocatable scalars.
3358 (gfc_generate_function_code): Nullify result variable for
3359 allocatable scalars.
3362 * module.c (gfc_use_module): Fix warning string to allow
3366 * invoke.texi (-fcheck=recursion): Mention that the checking
3367 is also disabled for -frecursive.
3368 * trans-decl.c (gfc_generate_function_code): Disable
3369 -fcheck=recursion when -frecursive is used.
3371 * intrinsic.texi (iso_c_binding): Improve wording.
3374 Copyright (C) 2010 Free Software Foundation, Inc.
3376 Copying and distribution of this file, with or without modification,
3377 are permitted in any medium without royalty provided the copyright
3378 notice and this notice are preserved.