1 2013-09-20 Janus Weil <janus@gcc.gnu.org>
4 * expr.c (gfc_check_pointer_assign): Remove second call to
5 'gfc_compare_interfaces' with swapped arguments.
6 * interface.c (gfc_compare_interfaces): Symmetrize the call to
7 'check_result_characteristics' by calling it with swapped arguments.
9 2013-09-18 Tobias Burnus <burnus@net-b.de>
11 * expr.c (gfc_check_assign_symbol): Free lvalue.ref.
13 2013-09-18 Tobias Burnus <burnus@net-b.de>
16 * primary.c (gfc_variable_attr): Also handle codimension.
17 * resolve.c (resolve_ordinary_assign): Add invalid-diagnostic for
18 polymorphic assignment.
20 2013-09-16 Tobias Burnus <burnus@net-b.de>
23 * class.c (generate_finalization_wrapper): Init proc_tree if
26 2013-09-16 Tobias Burnus <burnus@net-b.de>
29 * resolve.c (generate_component_assignments): Correctly handle the
30 case that the LHS is not allocated.
32 2013-09-15 Tobias Burnus <burnus@net-b.de>
35 * resolve.c (generate_component_assignments): Handle unallocated
36 LHS with defined assignment of components.
38 2013-09-12 Brooks Moses <bmoses@google.com>
41 * Make-lang.in: Do not install driver binaries in $(target)/bin.
43 2013-09-09 Tobias Burnus <burnus@net-b.de>
45 * invoke.texi (Error and Warning Options): Add hyphen.
47 2013-09-02 Thomas Koenig <tkoenig@gcc.gnu.org>
50 * gfortran.h: Declare gfc_do_concurrent_flag as extern.
51 * resolve.c: Rename do_concurrent_flag to gfc_do_concurrent_flag
53 (resolve_function): Use gfc_do_concurrent_flag instead of
55 (pure_subroutine): Likewise.
56 (resolve_code): Likewise.
57 (resolve_types): Likewise.
58 * intrinsic.c (gfc_intrinsic_sub_interface): Raise error for
59 non-pure intrinsic subroutines within DO CONCURRENT.
61 2013-08-29 Thomas Koenig <tkoenig@gcc.gnu.org>
64 * trans-expr.c (is_runtime_conformable): New function.
65 * gfc_trans_assignment_1: Use it.
67 2013-08-26 Thomas Koenig <tkoenig@gcc.gnu.org>
70 * array.c (gfc_ref_dimen_size): If possible, use
71 gfc_dep_difference to calculate array refrence
72 sizes. Fall back to integer code otherwise.
73 * dependency.c (discard_nops). Move up.
74 Also discarde widening integer conversions.
75 (gfc_dep_compare_expr): Use discard_nops.
77 2013-08-23 Mikael Morin <mikael@gcc.gnu.org>
80 * trans-array.c (gfc_conv_ss_startstride, set_loop_bounds,
81 gfc_set_delta): Generate preliminary code before the outermost loop.
83 2013-08-23 Janus Weil <janus@gcc.gnu.org>
86 * interface.c (gfc_extend_assign): Look for type-bound assignment
87 procedures before non-typebound.
89 2013-08-23 Mikael Morin <mikael@gcc.gnu.org>
91 * trans-array.c (gfc_conv_section_startstride): Move &loop->pre access
93 (gfc_conv_ss_startstride, gfc_conv_expr_descriptor): Update callers.
95 2013-08-22 Janus Weil <janus@gcc.gnu.org>
98 * match.c (copy_ts_from_selector_to_associate): Only build class
99 container for polymorphic selector. Some cleanup.
101 2013-08-20 Janus Weil <janus@gcc.gnu.org>
104 * trans-decl.c (generate_local_decl): Check if type has any components.
106 2013-08-19 Janus Weil <janus@gcc.gnu.org>
109 * openmp.c (resolve_omp_clauses): Bugfix for procedure pointers.
111 2013-08-12 Thomas Koenig <tkoenig@gcc.gnu.org>
114 * gfortran.h (gfc_option_t): Add warn_zerotrip.
115 * invoke.texi (-Wzerotrip): Document option.
116 * lang.opt (Wzerotrip): Add.
117 * options.c (gfc_init_options): Initialize warn_zerotrip.
118 (set_Wall): Add handling of warn_zerotrip.
119 (gfc_handle_option): Handle OPT_Wzerotrip.
120 * resolve.c (gfc_resolve_iterator): Honor
121 gfc_option.warn_zerotrip; update error message to show
122 how to suppress the warning.
124 2013-08-09 Janus Weil <janus@gcc.gnu.org>
126 * gfortran.h (gfc_get_code): Modified prototype.
127 * class.c (finalize_component, finalization_scalarizer,
128 finalization_get_offset, finalizer_insert_packed_call,
129 generate_finalization_wrapper, gfc_find_derived_vtab,
130 gfc_find_intrinsic_vtab): Use 'gfc_get_code'.
131 * io.c (match_io_iterator, match_io_element, terminate_io, get_io_list,
132 gfc_match_inquire): Call 'gfc_get_code' with argument.
133 * match.c (match_simple_forall, gfc_match_forall, gfc_match_goto,
134 gfc_match_nullify, gfc_match_call, match_simple_where, gfc_match_where):
136 * parse.c (new_level): Ditto.
137 (add_statement): Use XCNEW.
138 * resolve.c (resolve_entries, resolve_allocate_expr,
139 resolve_select_type, build_assignment, build_init_assign): Call
140 'gfc_get_code' with argument.
141 * st.c (gfc_get_code): Add argument 'op'.
142 * trans-expr.c (gfc_trans_class_array_init_assign): Call 'gfc_get_code'
144 * trans-stmt.c (gfc_trans_allocate): Ditto.
146 2013-08-09 Janus Weil <janus@gcc.gnu.org>
149 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Free the temporary
150 string, if necessary.
152 2013-08-06 Martin Jambor <mjambor@suse.cz>
155 * trans-decl.c (gfc_generate_function_code): Never call
156 cgraph_finalize_function on nested functions.
158 2013-08-06 Janus Weil <janus@gcc.gnu.org>
161 * class.c (gfc_class_null_initializer): Rename to
162 'gfc_class_initializer'. Treat non-NULL init-exprs.
163 * gfortran.h (gfc_class_null_initializer): Update prototype.
164 * trans-decl.c (gfc_get_symbol_decl): Treat class variables.
165 * trans-expr.c (gfc_conv_initializer): Ditto.
166 (gfc_trans_subcomponent_assign): Renamed gfc_class_null_initializer.
168 2013-07-30 Tobias Burnus <burnus@net-b.de>
171 * symbol.c (gfc_type_compatible): A type is type compatible with
172 a class if both have the same declared type.
173 * interface.c (compare_type): Reject CLASS/TYPE even if they
176 2013-07-30 Tobias Burnus <burnus@net-b.de>
179 * trans-expr.c (gfc_trans_class_assign): Handle CLASS array
181 (gfc_trans_pointer_assign): Ditto and support pointer assignment of
182 a polymorphic var to a nonpolymorphic var.
184 2013-07-22 Po Chang <pchang9@cs.wisc.edu>
186 * match.c (gfc_match_call): Exit loop after setting i.
188 * resolve.c (resolve_variable): Exit loop after setting seen.
190 * expr.c (gfc_check_pointer_assign): Exit loop after setting warn.
192 * trans-array.c (set_loop_bounds): Exit loop after setting
195 * trans-io.c (gfc_trans_transfer): Exit loop after setting seen_vector.
197 2013-07-28 Thomas Koenig <tkoenig@gcc.gnu.org>
200 * expr.c (gfc_check_vardef_context): Check for same values in
201 vector expression subscripts.
203 2013-07-27 Tobias Burnus <burnus@net-b.de>
206 * interface.c (check_some_aliasing): Also warn for intent OUT/OUT.
208 2013-07-27 Janus Weil <janus@gcc.gnu.org>
211 * check.c (dim_rank_check): Re-enable this check for CLASS arrays.
213 2013-07-25 Janus Weil <janus@gcc.gnu.org>
216 * resolve.c (resolve_typebound_function): Make sure the declared type,
217 including its type-bound procedures, is resolved before resolving the
218 actual type-bound call.
220 2013-07-25 Janus Weil <janus@gcc.gnu.org>
223 * interface.c (compare_parameter): Check for class_ok.
224 * simplify.c (gfc_simplify_same_type_as): Ditto.
226 2013-07-23 Ondřej Bílka <neleai@seznam.cz>
228 * decl.c: Fix comment typos.
229 * interface.c: Likewise.
230 * trans-array.c: Likewise.
233 2013-07-22 Tobias Burnus <burnus@net-b.de>
237 * class.c (gfc_build_class_symbol): Set coarray_comp.
238 * trans-array.c (structure_alloc_comps): For coarrays,
239 directly use the data pointer address.
241 2013-07-22 Chang <pchang9@cs.wisc.edu>
243 * trans-decl.c (gfc_build_dummy_array_decl): Exit loop after
244 setting PACKED_PARTIAL.
246 2013-07-22 Tobias Burnus <burnus@net-b.de>
248 * trans-array.c (gfc_array_allocate): Correct memory-leak patch.
250 2013-07-22 Tobias Burnus <burnus@net-b.de>
252 * trans-array.c (gfc_array_allocate,
253 gfc_trans_deferred_array): Plug memory leak.
255 2013-07-21 Ondřej Bílka <neleai@seznam.cz>
257 * trans-decl.c: Fix comment typos.
258 * trans-expr.c: Ditto.
260 2013-07-21 Thomas Koenig <tkoenig@gcc.gnu.org>
263 * dependency.c (gfc_dep_resolver): Treat identical
264 array subscripts as identical; don't unconditionally
265 return a dependency if an array subscript is found.
267 2013-07-21 Tobias Burnus <burnus@net-b.de>
270 * libgfortran.h (GFC_FPE_DOWNWARD, GFC_FPE_TONEAREST,
271 GFC_FPE_TOWARDZERO, GFC_FPE_UPWARD): New defines.
273 2013-07-21 Tobias Burnus <burnus@net-b.de>
276 * check.c (min_max_args): Add keyword= check.
278 2013-07-17 Mikael Morin <mikael@gcc.gnu.org>
279 Tobias Burnus <burnus@net-b.de>
282 * match.c (gfc_match_name): Ensure that the error
283 message regarding -fdollar-ok gets printed.
284 (gfc_match_common): Avoid multiple freeing.
286 2013-07-16 Tobias Burnus <burnus@net-b.de>
289 * trans-expr.c (gfc_trans_scalar_assign): Correct if
290 condition for caf realloc.
292 2013-07-15 Tobias Burnus <burnus@net-b.de>
294 * trans-array.h (gfc_deallocate_alloc_comp_no_caf,
295 gfc_reassign_alloc_comp_caf): New prototype.
296 * trans-array.c (enum): Add DEALLOCATE_ALLOC_COMP_NO_CAF
297 and COPY_ALLOC_COMP_CAF.
298 (structure_alloc_comps): Handle it.
299 (gfc_reassign_alloc_comp_caf,
300 gfc_deallocate_alloc_comp_no_caf): New function.
301 (gfc_alloc_allocatable_for_assignment): Call it.
302 * trans-expr.c (gfc_trans_scalar_assign,
303 gfc_trans_arrayfunc_assign, gfc_trans_assignment_1): Ditto.
304 * parse.c (parse_derived): Correctly set coarray_comp.
305 * resolve.c (resolve_symbol): Improve error wording.
307 2013-07-15 Tobias Burnus <burnus@net-b.de>
310 * trans.c (gfc_add_comp_finalizer_call): New function.
311 * trans.h (gfc_add_comp_finalizer_call): New prototype.
312 * trans-array.c (structure_alloc_comps): Call it.
314 2013-07-14 Thomas Koenig <tkoenig@gcc.gnu.org>
315 Tobias Burnus <burnus@gcc.gnu.org>
318 * trans-decl.c (gfc_finish_var_decl): Move setting of
319 PRIVATE for a module variable if the module has a private
320 default or -fmodule-private is given to...
321 (gfc_create_module_variable): here. Optionally
322 warn about private module variable which is not used.
324 2013-07-08 Tobias Burnus <burnus@net-b.de>
327 * check.c (is_c_interoperable): Add special case for c_f_pointer.
328 (explicit-size, gfc_check_c_f_pointer, gfc_check_c_loc): Update
331 2013-07-08 Tobias Burnus <burnus@net-b.de>
334 * io.c (match_inquire_element): Add missing do-var check.
336 2013-07-08 Tobias Burnus <burnus@net-b.de>
339 * simplify.c (compute_dot_product): Complex conjugate for
341 (gfc_simplify_dot_product, gfc_simplify_matmul): Update call.
343 2013-07-08 Tobias Burnus <burnus@net-b.de>
346 * trans-decl.c (generate_local_decl): Don't warn that
347 a dummy is unused, when it is in a namelist.
349 2013-07-01 Dominique d'Humieres <dominiq@lps.ens.fr>
352 * array.c (spec_size): handle the case as==NULL.
354 2013-06-26 Tobias Burnus <burnus@net-b.de>
357 * trans-array.c (gfc_conv_array_ref): Improve out-of-bounds
359 * trans-array.c (gfc_conv_array_ref): Update prototype.
360 * trans-expr.c (gfc_conv_variable): Update call.
362 2013-06-24 Steven G. Kargl <sgk@troutmask.apl.washington.edu>
363 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
364 Dominique d'Humieres <dominiq@lps.ens.fr>
367 * simplify.c (gfc_simplify_fraction): Fix the sign of negative values.
369 2013-06-21 Tobias Burnus <burnus@net-b.de>
372 * trans-array.c (gfc_trans_deferred_array): Call the
373 finalizer for nonallocatable local variables.
374 * trans-decl.c (gfc_get_symbol_decl): Add local
375 finalizable vars to the deferred list.
376 (gfc_trans_deferred_vars): Call gfc_trans_deferred_array
379 2013-06-21 Tobias Burnus <burnus@net-b.de>
381 * trans-array.c (gfc_alloc_allocatable_for_assignment): Allocate
383 * trans-expr.c (alloc_scalar_allocatable_for_assignment): Ditto.
385 2013-06-20 Tobias Burnus <burnus@net-b.de>
387 * resolve.c (get_temp_from_expr): Don't set FL_VARIABLE twice.
389 2013-06-17 Tobias Burnus <burnus@net-b.de>
391 * gfortran.h (gfc_option_t): Add fpe_summary.
392 * gfortran.texi (_gfortran_set_options): Update.
393 * invoke.texi (-ffpe-summary): Add doc.
394 * lang.opt (ffpe-summary): Add flag.
395 * options.c (gfc_init_options, gfc_handle_option): Handle it.
396 (gfc_handle_fpe_option): Renamed from gfc_handle_fpe_trap_option,
397 also handle fpe_summary.
398 * trans-decl.c (create_main_function): Update
399 _gfortran_set_options call.
401 2013-06-15 Mikael Morin <mikael@gcc.gnu.org>
405 * dependency.c (gfc_check_argument_var_dependency): Return 0 in the
406 array constructor case.
408 2013-06-14 Tobias Burnus <burnus@net-b.de>
411 * resolve.c (get_temp_from_expr): Don't copy function
412 result attributes to temporary.
414 2013-06-14 Tobias Burnus <burnus@net-b.de>
417 * trans-decl.c (gfc_trans_deferred_vars): Honor OPTIONAL
418 for nullify and deferred-strings' length variable.
420 2013-06-13 Mikael Morin <mikael@gcc.gnu.org>
423 * trans-expr.c (gfc_conv_variable): Don't walk the reference chain.
424 Handle NULL array references.
425 (gfc_conv_procedure_call): Remove code handling NULL array references.
427 2013-06-11 Tobias Burnus <burnus@net-b.de>
430 * trans-array.c (build_class_array_ref): Fix ICE for
431 function result variables.
433 2013-06-08 Tobias Burnus <burnus@net-b.de>
436 * trans-decl.c (init_intent_out_dt): Call finalizer
439 2013-06-08 Tobias Burnus <burnus@net-b.de>
442 * simplify.c (gfc_simplify_storage_size): Handle literal
444 * trans-intrinsic.c (gfc_conv_intrinsic_storage_size):
445 Add missing fold_convert.
447 2013-06-07 Tobias Burnus <burnus@net-b.de>
450 * array.c (gfc_match_array_constructor): Call
451 gfc_match_type_spec instead of gfc_match_decl_type_spec.
452 * match.c (gfc_match_type_spec): Renamed from match_type_spec.
453 (gfc_match_type_is, gfc_match_allocate): Update call.
454 * match.h (gfc_match_type_spec): Add prototype.
456 2013-06-07 Tobias Burnus <burnus@net-b.de>
459 * trans.c (gfc_build_final_call): Init block before use.
461 2013-06-06 Tobias Burnus <burnus@net-b.de>
464 * trans.c (gfc_build_final_call): Add se.pre to the block
465 and modify the assert.
467 2013-06-04 Tobias Burnus <burnus@net-b.de>
470 * trans.h (gfc_build_final_call): Remove prototype.
471 (gfc_add_finalizer_call): Add prototype.
472 * trans-array.c (gfc_trans_dealloc_allocated): Support finalization.
473 (structure_alloc_comps): Update caller.
474 (gfc_trans_deferred_array): Call finalizer.
475 * trans-array.h (gfc_trans_dealloc_allocated): Update prototype.
476 * trans-decl.c (gfc_trans_deferred_vars): Don't deallocate/finalize
477 variables of the main program.
478 * trans-expr.c (gfc_conv_procedure_call): Support finalization.
479 * trans-openmp.c (gfc_omp_clause_dtor,
480 gfc_trans_omp_array_reduction): Update calls.
481 * trans-stmt.c (gfc_trans_deallocate): Avoid double deallocation
483 * trans.c (gfc_add_finalizer_call): New function.
484 (gfc_deallocate_with_status,
485 gfc_deallocate_scalar_with_status): Call it
486 (gfc_build_final_call): Fix handling of scalar coarrays,
487 move up in the file and make static.
489 2013-06-01 Janus Weil <janus@gcc.gnu.org>
490 Mikael Morin <mikael@gcc.gnu.org>
492 * error.c (get_terminal_width): Only limit the width if we're
493 outputting to a terminal. Try to determine width via ioctl.
495 2013-06-01 Tobias Burnus <burnus@net-b.de>
497 * decl.c (add_global_entry): Take locus.
498 (gfc_match_entry): Update call.
499 (gfc_match_end): Better error location.
500 * parse.c (parse_block_data, parse_module, add_global_procedure,
501 add_global_program): Use better locus data.
503 2013-05-31 Tobias Burnus <burnus@net-b.de>
506 * trans-array.c (gfc_array_init_size): Use passed type spec,
508 (gfc_array_allocate): Pass typespec on.
509 * trans-array.h (gfc_array_allocate): Update prototype.
510 * trans-stmt.c (gfc_trans_allocate): Pass typespec on.
512 2013-05-31 Janus Weil <janus@gcc.gnu.org>
516 * gfortran.h (gfc_terminal_width): Remove prototype.
517 * error.c (get_terminal_width): Moved here from misc.c. Renamed.
518 Try to determine terminal width from environment variable.
519 * interface.c (compare_type, compare_rank): New functions. Fix assumed
521 (compare_type_rank, check_dummy_characteristics,
522 check_result_characteristics, gfc_compare_interfaces): Use them.
523 (symbol_rank): Slightly modified and moved.
524 * misc.c (gfc_terminal_width): Moved to error.c.
526 2013-05-30 Janus Weil <janus@gcc.gnu.org>
529 * resolve.c (check_assumed_size_reference): Check for e->ref.
531 2013-05-30 Tobias Burnus <burnus@net-b.de>
534 * interface.c (compare_parameter): Update C1239/C1240 constraint
535 check for assumed-rank/TS29113.
537 2013-05-29 Tobias Burnus <burnus@net-b.de>
540 * class.c (finalize_component): Fix coarray array refs.
541 (generate_finalization_wrapper): Only gfc_convert_type_warn
542 when the kind value is different.
543 (gfc_find_intrinsic_vtab): _copy's dst is now intent(inout).
544 (gfc_find_derived_vtab): Ditto. Enable finalization-wrapper
546 * module.c (MOD_VERSION): Bump.
547 (gfc_dump_module, gfc_use_module): Remove empty line in .mod.
548 * trans-array.c (gfc_conv_descriptor_token): Accept nonrestricted
550 (gfc_array_allocate, structure_alloc_comps): Don't nullify for
551 BT_CLASS allocations.
552 * trans-stmt.c (gfc_trans_allocate): Ditto.
554 2013-05-29 Tobias Burnus <burnus@net-b.de>
557 * resolve.c (gfc_resolve_finalizers): Remove not implemented error.
559 2013-05-28 Tobias Burnus <burnus@net-b.de>
561 * trans-expr.c (gfc_conv_procedure_call): Deallocate
562 polymorphic arrays for allocatable intent(out) dummies.
563 (gfc_reset_vptr): New function, moved from trans-stmt.c
565 * trans-stmt.c (reset_vptr): Remove.
566 (gfc_trans_deallocate): Update calls.
567 * trans.h (gfc_reset_vptr): New prototype.
569 2013-05-28 Dominique d'Humieres <dominiq@lps.ens.fr>
572 * module.c (check_for_ambiguous): Avoid null pointer deref.
574 2013-05-28 Janus Weil <janus@gcc.gnu.org>
575 Tobias Burnus <burnus@net-b.de>
578 * interface.c (check_dummy_characteristics): Symmetrize type check.
580 2013-05-27 Bud Davis <jmdavis@link.com>
583 * resolve.c (resolve_formal_arglist): Detect error when an argument
584 has the same name as the function.
586 2013-05-27 Tobias Burnus <burnus@net-b.de>
588 * expr.c (gfc_build_intrinsic_call): Make symbol as attr.artificial.
589 * intrinsic.c (gfc_is_intrinsic): Disable std check for those.
591 2013-05-22 Tobias Burnus <burnus@net-b.de>
593 * resolve.c (get_temp_from_expr): Change mangling to
594 start always with a _.
596 2013-05-22 Tobias Burnus <burnus@net-b.de>
598 * resolve.c (get_temp_from_expr): Fix temp var mangling.
600 2013-05-22 Tobias Burnus <burnus@net-b.de>
603 * resolve.c (get_temp_from_expr): Commit created sym.
605 2013-05-22 Tobias Burnus <burnus@net-b.de>
608 * intrinsic.c (do_check): Move some checks to ...
609 (do_ts29113_check): ... this new function.
610 (check_specific, gfc_intrinsic_sub_interface): Call it.
612 2013-05-22 Janne Blomqvist <jb@gcc.gnu.org>
614 * intrinsic.texi (RANDOM_SEED): Improve example.
616 2013-05-21 Tobias Burnus <burnus@net-b.de>
619 * intrinsic.c (do_check): Add constraint check for
620 NO_ARG_CHECK, assumed rank and assumed type.
621 * gfortran.texi (NO_ARG_CHECK): Minor wording change,
622 allow PRESENT intrinsic.
624 2013-05-20 Tobias Burnus <burnus@net-b.de>
628 * decl.c (add_global_entry): Add sym_name.
629 * parse.c (add_global_procedure): Ditto.
630 * resolve.c (resolve_bind_c_derived_types): Handle multiple decl for
632 (resolve_global_procedure): Handle gsym->ns pointing to a module.
633 * trans-decl.c (gfc_get_extern_function_decl): Ditto.
635 2013-05-20 Tobias Burnus <burnus@net-b.de>
638 * decl.c (add_global_entry): Use nonbinding name
639 only for F2003 or if no binding label exists.
640 (gfc_match_entry): Update calls.
641 * parse.c (gfc_global_used): Improve error message.
642 (add_global_procedure): Use nonbinding name
643 only for F2003 or if no binding label exists.
644 (gfc_parse_file): Update call.
645 * resolve.c (resolve_global_procedure): Use binding
647 * trans-decl.c (gfc_get_extern_function_decl): Ditto.
649 2013-05-20 Tobias Burnus <burnus@net-b.de>
652 * decl.c (gfc_match_bind_c_stmt): Add gfc_notify_std.
653 * match.c (gfc_match_common): Don't add commons to gsym.
654 * resolve.c (resolve_common_blocks): Add to gsym and
656 (resolve_bind_c_comms): Remove.
657 (resolve_types): Remove call to the latter.
658 * trans-common.c (gfc_common_ns): Remove static var.
659 (gfc_map_of_all_commons): Add static var.
660 (build_common_decl): Correctly handle binding label.
662 2013-05-16 Jason Merrill <jason@redhat.com>
664 * Make-lang.in (f951$(exeext)): Use link mutex.
666 2013-05-05 Tobias Burnus <burnus@net-b.de>
668 * resolve.c (conformable_arrays): Avoid segfault
669 when ar.start[i] == NULL.
671 2013-05-05 Tobias Burnus <burnus@net-b.de>
674 * decl.c (gfc_match_null): Permit use-associated
677 2013-05-04 Tobias Burnus <burnus@net-b.de>
679 * decl.c (gfc_verify_c_interop_param): Permit allocatable
680 and pointer with -std=f2008ts.
682 2013-05-02 Tobias Burnus <burnus@net-b.de>
685 * simplify.c (gfc_simplify_size): Renamed from
686 simplify_size; fix kind=8 handling.
687 (gfc_simplify_size): New function.
688 (gfc_simplify_shape): Add range check.
689 * resolve.c (resolve_function): Fix handling
692 2013-05-01 Thomas Koenig <tkoenig@gcc.gnu.org>
694 * frontend-passes.c (optimize_power): Fix typo
697 2013-04-30 Thomas Koenig <tkoenig@gcc.gnu.org>
700 * frontend-passes.c (optimize_power): Simplify
703 2013-04-28 Tobias Burnus <burnus@net-b.de>
706 * intrinsic.texi (RANK): Correct syntax description and
709 2013-04-28 Tobias Burnus <burnus@net-b.de>
712 * trans-types.c (gfc_get_element_type): Fix handling
713 of scalar coarrays of type character.
714 * intrinsic.texi (PACK): Add missing ")".
716 2013-04-28 Thomas Koenig <tkoenig@gcc.gnu.org>
719 * frontend-passes (optimize_power): New function.
720 (optimize_op): Use it.
722 2013-04-25 Janne Blomqvist <jb@gcc.gnu.org>
725 * Make-lang.in (f951): Link in ZLIB.
726 (CFLAGS-fortran/module.o): Add zlib include directory.
728 2013-04-22 Janus Weil <janus@gcc.gnu.org>
732 * check.c (gfc_calculate_transfer_sizes): Fix for array-valued SOURCE
734 * simplify.c (gfc_simplify_sizeof,gfc_simplify_storage_size): Get rid
735 of special treatment for EXPR_ARRAY.
736 * target-memory.h (gfc_element_size): New prototype.
737 * target-memory.c (size_array): Remove.
738 (gfc_element_size): New function.
739 (gfc_target_expr_size): Modified to always return the full size of the
742 2013-04-20 Tobias Burnus <burnus@net-b.de>
745 * trans-intrinsic.c (conv_isocbinding_function): Don't pack array
748 2013-04-19 Thomas Koenig <tkoenig@gcc.gnu.org>
749 Mikael Morin <mikael@gcc.gnu.org>
752 * frontend-passes.c (copy_walk_reduction_arg): Change argument type
753 to gfc_constructor. If it has an iterator, wrap the copy of its
754 expression in an array constructor with that iterator. Don't special
755 case function expressions.
756 (callback_reduction): Update caller. Don't return early if there is
759 2013-04-18 Tobias Burnus <burnus@net-b.de>
761 * expr.c (find_array_element): Don't copy expr.
762 * data.c (create_character_initializer): Free expr.
763 * frontend-passes.c (combine_array_constructor): Ditto.
764 * match.c (match_typebound_call, gfc_match_select_type): Ditto.
765 * resolve.c (resolve_typebound_function): Free gfc_ref.
767 2013-04-18 Tobias Burnus <burnus@net-b.de>
770 * invoke.texi (NEAREST): S argument is not optional.
772 2013-04-17 Janus Weil <janus@gcc.gnu.org>
775 * interface.c (check_result_characteristics): Get result from interface
778 2013-04-17 Janne Blomqvist <jb@gcc.gnu.org>
781 * scanner.h: New file.
782 * Make-lang.in: Dependencies on scanner.h.
783 * scanner.c (gfc_directorylist): Move to scanner.h.
784 * module.c: Don't include md5.h, include scanner.h and zlib.h.
785 (MOD_VERSION): Add comment about backwards compatibility.
786 (module_fp): Change type to gzFile.
788 (gzopen_included_file_1): New function.
789 (gzopen_included_file): New function.
790 (gzopen_intrinsic_module): New function.
791 (write_char): Use gzputc.
792 (read_crc32_from_module_file): New function.
793 (read_md5_from_module_file): Remove.
794 (gfc_dump_module): Use gz* functions instead of stdio, check gzip
795 crc32 instead of md5.
796 (read_module_to_tmpbuf): Use gz* functions instead of stdio.
797 (gfc_use_module): Use gz* functions.
799 2013-04-16 Tobias Burnus <burnus@net-b.de>
802 * decl.c (ext_attr_list): Add EXT_ATTR_NO_ARG_CHECK.
803 * gfortran.h (ext_attr_id_t): Ditto.
804 * gfortran.texi (GNU Fortran Compiler Directives):
806 * interface.c (compare_type_rank): Ignore rank for NO_ARG_CHECK.
807 (compare_parameter): Ditto - and regard as unlimited polymorphic.
808 * resolve.c (resolve_symbol, resolve_variable): Add same constraint
809 checks as for TYPE(*); turn dummy to TYPE(*),dimension(*).
810 (gfc_explicit_interface_required): Require explicit interface
813 2013-04-16 Janus Weil <janus@gcc.gnu.org>
816 * expr.c (gfc_check_pointer_assign): Handle generic functions returning
819 2013-04-16 Tobias Burnus <burnus@net-b.de>
822 * intrinsic.c (gfc_intrinsic_func_interface): Don't set
823 module name to "(intrinsic)" for intrinsics from intrinsic
826 2013-04-15 Tobias Burnus <burnus@net-b.de>
828 * intrinsic.texi (SYSTEM_CLOCK): Recommend kind=8.
830 2013-04-15 Janne Blomqvist <jb@gcc.gnu.org>
833 * intrinsics.texi (SYSTEM_CLOCK): Update documentation.
835 2013-04-15 Tobias Burnus <burnus@net-b.de>
837 * class.c (gfc_find_intrinsic_vtab): Removed unused var.
838 * dependency.c (check_data_pointer_types): Fix check.
839 * frontend-passes.c (check_data_pointer_types): Remove
840 superfluous statement.
841 * parse.c (decode_omp_directive): Add missing break.
842 * resolve.c (resolve_typebound_subroutine: Free variable.
843 * trans-decl.c (create_function_arglist): Correct condition.
845 2013-04-14 Mikael Morin <mikael@gcc.gnu.org>
848 * match.c (gfc_match_select_type): Add syntax error. Move namespace
849 allocation and cleanup...
850 * parse.c (decode_statement): ... here.
852 2013-04-13 Janus Weil <janus@gcc.gnu.org>
855 * expr.c (gfc_simplify_expr): Branch is not unreachable.
857 2013-04-12 Janus Weil <janus@gcc.gnu.org>
860 * primary.c (gfc_match_varspec): Turn gcc_assert into MATCH_ERROR.
862 2013-04-12 Tobias Burnus <burnus@net-b.de>
865 * trans-array.c (duplicate_allocatable): Fix handling
868 2013-04-12 Janus Weil <janus@gcc.gnu.org>
871 * gfortran.h (gfc_explicit_interface_required): New prototype.
872 * expr.c (gfc_check_pointer_assign): Check if an explicit interface is
873 required in a proc-ptr assignment.
874 * interface.c (check_result_characteristics): Extra check.
875 * resolve.c (gfc_explicit_interface_required): New function.
876 (resolve_global_procedure): Use new function
877 'gfc_explicit_interface_required'. Do a full interface check.
879 2013-04-12 Tobias Burnus <burnus@net-b.de>
882 * trans-decl.c (gfc_trans_deferred_vars): Restrict
883 static CLASS init to SAVE and -fno-automatic.
885 2013-04-12 Tobias Burnus <burnus@net-b.de>
888 * trans-decl.c (gfc_trans_deferred_vars): Set _vptr for
889 allocatable static BT_CLASS.
890 * trans-expr.c (gfc_class_set_static_fields): New function.
891 * trans.h (gfc_class_set_static_fields): New prototype.
893 2013-04-11 Janne Blomqvist <jb@gcc.gnu.org>
895 * gfortran.h: Remove enum gfc_try, replace gfc_try with bool type.
896 * arith.c: Replace gfc_try with bool type.
907 * f95-lang.c: Likewise.
908 * interface.c: Likewise.
909 * intrinsic.c: Likewise.
910 * intrinsic.h: Likewise.
914 * module.c: Likewise.
915 * openmp.c: Likewise.
918 * primary.c: Likewise.
919 * resolve.c: Likewise.
920 * scanner.c: Likewise.
921 * simplify.c: Likewise.
922 * symbol.c: Likewise.
923 * trans-intrinsic.c: Likewise.
924 * trans-openmp.c: Likewise.
925 * trans-stmt.c: Likewise.
926 * trans-types.c: Likewise.
928 2013-04-09 Tobias Burnus <burnus@net-b.de>
930 * gfortran.texi (KIND Type Parameters,
931 Internal representation of LOGICAL variables): Add crossrefs.
932 (Intrinsic Types): Mention issues with _Bool interop.
933 (Naming and argument-passing conventions): New section.
935 2013-04-08 Thomas Koenig <tkoenig@gcc.gnu.org>
938 * frontend-passes.c (callback_reduction): Don't do
939 any simplification if there is only a single element
940 which has an iterator.
942 2013-04-07 Tobias Burnus <burnus@net-b.de>
945 * iresolve.c (gfc_resolve_reshape): Set shape also
948 2013-04-04 Janus Weil <janus@gcc.gnu.org>
951 * match.c (gfc_match_return): Remove standard notification.
952 * primary.c (gfc_match_actual_arglist): Add standard notification.
954 2013-04-04 Tobias Burnus <burnus@net-b.de>
957 * gcc/fortran/check.c (is_c_interoperable,
958 gfc_check_c_loc): Correct c_loc array checking
959 for Fortran 2003 and Fortran 2008.
961 2013-04-03 Janus Weil <janus@gcc.gnu.org>
965 * decl.c (gfc_match_formal_arglist): Warn about alternate-return
967 * interface.c (check_dummy_characteristics): Return if symbols are NULL.
969 2013-04-01 Janus Weil <janus@gcc.gnu.org>
972 * symbol.c (gfc_set_default_type): Build class container for
975 2013-03-31 Tobias Burnus <burnus@net-b.de>
977 * class.c (finalization_scalarizer, finalizer_insert_packed_call,
978 generate_finalization_wrapper): Avoid segfault with absent SIZE=
979 argument to TRANSFER and use correct result kind for SIZE.
980 * intrinsic.c (gfc_isym_id_by_intmod): Also handle ids of
982 * trans.c (gfc_build_final_call): Handle coarrays.
984 2013-03-30 Thomas Koenig <tkoenig@gcc.gnu.org>
986 * trans-expr.c (build_memcmp_call): New function.
987 (gfc_build_compare_string): If the strings
988 compared have constant and equal lengths and
989 the strings are kind=1, or, for kind=4 strings,
990 the test is for (in)equality, use memcmp().
992 2013-03-29 Tobias Burnus <burnus@net-b.de>
995 * trans-decl.c (create_function_arglist): Pass hidden argument
996 for passed-by-value optional+value dummies.
997 * trans-expr.c (gfc_conv_expr_present,
998 gfc_conv_procedure_call): Handle those.
1000 2013-03-28 Thomas Koenig <tkoenig@gcc.gnu.org>
1003 * gfortran.h (gfc_dep_difference): Add prototype.
1004 * dependency.c (discard_nops): New function.
1005 (gfc_dep_difference): New function.
1006 (check_section_vs_section): Use gfc_dep_difference
1007 to calculate the difference of starting indices.
1008 * trans-expr.c (gfc_conv_substring): Use
1009 gfc_dep_difference to calculate the length of
1010 substrings where possible.
1012 2013-03-28 Thomas Koenig <tkoenig@gcc.gnu.org>
1015 * frontend-passes.c (optimize_code): Keep track of
1016 current code to make code insertion possible.
1017 (combine_array_constructor): New function.
1018 (optimize_op): Call it.
1020 2013-03-27 Tobias Burnus <burnus@net-b.de>
1024 * check.c (gfc_check_sizeof, gfc_check_c_sizeof,
1025 gfc_check_storage_size): Update checks.
1026 * intrinsic.texi (SIZEOF): Correct class.
1027 * intrinsic.h (gfc_simplify_sizeof,
1028 gfc_simplify_storage_size): New prototypes.
1029 * intrinsic.c (add_functions): Use them.
1030 * simplify.c (gfc_simplify_sizeof,
1031 gfc_simplify_storage_size): New functions.
1033 2013-03-27 Janne Blomqvist <jb@gcc.gnu.org>
1036 * module.c (module_locus): Use long for position.
1037 (module_content): New variable.
1038 (module_pos): Likewise.
1039 (prev_character): Remove.
1040 (bad_module): Free data instead of closing mod file.
1041 (set_module_locus): Use module_pos.
1042 (get_module_locus): Likewise.
1043 (module_char): use buffer rather than stdio file.
1044 (module_unget_char): Likewise.
1045 (read_module_to_tmpbuf): New function.
1046 (gfc_use_module): Call read_module_to_tmpbuf.
1048 2013-03-26 Tobias Burnus <burnus@net-b.de>
1051 * simplify.c (gfc_simplify_merge): Simplify more.
1053 2013-03-25 Tobias Burnus <burnus@net-b.de>
1073 * check.c (gfc_var_strlen): Properly handle 0-sized string.
1074 (gfc_check_c_sizeof): Use is_c_interoperable, add checks.
1075 (is_c_interoperable, gfc_check_c_associated, gfc_check_c_f_pointer,
1076 gfc_check_c_f_procpointer, gfc_check_c_funloc, gfc_check_c_loc): New
1078 * expr.c (check_inquiry): Add c_sizeof, compiler_version and
1080 (gfc_check_pointer_assign): Refine function result check.
1081 gfortran.h (gfc_isym_id): Add GFC_ISYM_C_ASSOCIATED,
1082 GFC_ISYM_C_F_POINTER, GFC_ISYM_C_F_PROCPOINTER, GFC_ISYM_C_FUNLOC,
1084 (iso_fortran_env_symbol, iso_c_binding_symbol): Handle
1086 (generate_isocbinding_symbol): Update prototype.
1087 (get_iso_c_sym): Remove.
1088 (gfc_isym_id_by_intmod, gfc_isym_id_by_intmod_sym): New prototypes.
1089 * intrinsic.c (gfc_intrinsic_subroutine_by_id): New function.
1090 (gfc_intrinsic_sub_interface): Use it.
1091 (add_functions, add_subroutines): Add missing C-binding intrinsics.
1092 (gfc_intrinsic_func_interface): Add special case for c_loc.
1093 gfc_isym_id_by_intmod, gfc_isym_id_by_intmod_sym): New functions.
1094 (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Use them.
1095 * intrinsic.h (gfc_check_c_associated, gfc_check_c_f_pointer,
1096 gfc_check_c_f_procpointer, gfc_check_c_funloc, gfc_check_c_loc,
1097 gfc_resolve_c_loc, gfc_resolve_c_funloc): New prototypes.
1098 * iresolve.c (gfc_resolve_c_loc, gfc_resolve_c_funloc): New
1100 * iso-c-binding.def: Split PROCEDURE into NAMED_SUBROUTINE and
1102 * iso-fortran-env.def: Add NAMED_SUBROUTINE for completeness.
1103 * module.c (create_intrinsic_function): Support subroutines and
1104 derived-type results.
1105 (use_iso_fortran_env_module): Update calls.
1106 (import_iso_c_binding_module): Ditto; update calls to
1107 generate_isocbinding_symbol.
1108 * resolve.c (find_arglists): Skip for intrinsic symbols.
1109 (gfc_resolve_intrinsic): Find intrinsic subs via id.
1110 (is_scalar_expr_ptr, gfc_iso_c_func_interface,
1111 set_name_and_label, gfc_iso_c_sub_interface): Remove.
1112 (resolve_function, resolve_specific_s0): Remove calls to those.
1113 (resolve_structure_cons): Fix handling.
1114 * symbol.c (gen_special_c_interop_ptr): Update c_ptr/c_funptr
1116 (gen_cptr_param, gen_fptr_param, gen_shape_param,
1117 build_formal_args, get_iso_c_sym): Remove.
1118 (std_for_isocbinding_symbol): Handle NAMED_SUBROUTINE.
1119 (generate_isocbinding_symbol): Support hidden symbols and
1120 using c_ptr/c_funptr symtrees for nullptr defs.
1121 * target-memory.c (gfc_target_encode_expr): Fix handling
1123 * trans-expr.c (conv_isocbinding_procedure): Remove.
1124 (gfc_conv_procedure_call): Remove call to it.
1125 (gfc_trans_subcomponent_assign, gfc_conv_expr): Update handling
1127 * trans-intrinsic.c (conv_isocbinding_function,
1128 conv_isocbinding_subroutine): New.
1129 (gfc_conv_intrinsic_function, gfc_conv_intrinsic_subroutine):
1131 * trans-io.c (transfer_expr): Fix handling of c_ptr/c_funptr.
1132 * trans-types.c (gfc_typenode_for_spec,
1133 gfc_get_derived_type): Ditto.
1134 (gfc_init_c_interop_kinds): Handle NAMED_SUBROUTINE.
1136 2013-03-18 Tobias Burnus <burnus@net-b.de>
1138 * gfortran.h (gfc_option_t): Remove flag_whole_file.
1139 * invoke.texi (-fno-whole-file): Remove.
1140 * lang.opt (fwhole-file): Change to Ignore.
1141 * options.c (gfc_init_options, gfc_post_options,
1142 gfc_handle_option): Remove !flag_whole_file handling
1143 * parse.c (resolve_all_program_units, translate_all_program_units,
1144 gfc_parse_file): Ditto.
1145 * resolve.c (resolve_global_procedure): Ditto.
1146 * trans-decl.c (gfc_get_symbol_decl, gfc_get_extern_function_decl,
1147 gfc_create_module_variable): Ditto.
1148 * trans-types.c (gfc_get_derived_type): Ditto.
1150 2013-03-15 Tobias Burnus <burnus@net-b.de>
1153 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Pack arrays
1154 if they are not simply contiguous.
1156 2013-03-11 Tobias Burnus <burnus@net-b.de>
1158 * gfortran.texi (STRUCTURE and RECORD): State more clearly how
1159 to convert them into derived types.
1161 2013-03-10 Paul Thomas <pault@gcc.gnu.org>
1164 * expr.c (gfc_default_initializer): Check that a class declared
1165 type has any components.
1166 * resolve.c (resolve_fl_derived0): On failing the test for C437
1167 set the type to BT_UNKNOWN to prevent repeat error messages.
1169 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
1172 * expr.c (gfc_check_pointer_assign): Avoid NULL pointer dereference.
1174 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
1177 * array.c (gfc_match_array_constructor): Set a checkpoint before
1178 matching a typespec. Drop it on success, restore it otherwise.
1180 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
1183 * gfortran.h (struct gfc_undo_change_set): New field 'previous'.
1184 (gfc_new_undo_checkpoint, gfc_drop_last_undo_checkpoint,
1185 gfc_restore_last_undo_checkpoint): New prototypes.
1186 * symbol.c (default_undo_chgset_var): Update initialization.
1187 (single_undo_checkpoint_p, gfc_new_undo_checkpoint,
1188 free_undo_change_set_data, pop_undo_change_set,
1189 gfc_drop_last_undo_checkpoint, enforce_single_undo_checkpoint):
1191 (save_symbol_data): Handle multiple change sets. Make sure old_symbol
1192 field's previous value is not overwritten. Clear gfc_new field.
1193 (restore_old_symbol): Restore previous old_symbol field.
1194 (gfc_restore_last_undo_checkpoint): New function, using body renamed
1195 from gfc_undo_symbols. Restore the previous change set as current one.
1196 (gfc_undo_symbols): New body.
1197 (gfc_commit_symbols, gfc_commit_symbol, gfc_enforce_clean_symbol_state):
1198 Call enforce_single_undo_checkpoint.
1199 (gfc_symbol_done_2): Ditto. Free change set data.
1201 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
1203 * symbol.c (restore_old_symbol): Fix thinko.
1205 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
1207 * symbol.c (gfc_undo_symbols): Move code...
1208 (restore_old_symbol): ... here as a new function.
1210 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
1212 * Make-lang.in (F95_PARSER_OBJS): Add dependency to vec.h.
1213 * gfortran.h: Include vec.h.
1214 (gfc_undo_change_set): New struct.
1215 * symbol.c (tentative_tbp): Remove struct.
1216 (changed_syms, tentative_tbp_list): Remove variables.
1217 (default_undo_chgset_var, latest_undo_chgset): New variables.
1218 (save_symbol_data, gfc_get_sym_tree, gfc_undo_symbols,
1219 gfc_commit_symbols, gfc_commit_symbol,
1220 gfc_enforce_clean_symbol_state, gfc_get_typebound_proc):
1221 Use latest_undo_chgset instead of changed_syms and tentative_tbp_list.
1223 2013-03-01 Tobias Burnus <burnus@net-b.de>
1226 * iresolve.c (resolve_bound): Use gfc_get_string instead of xstrdup.
1227 * symbol.c (free_components): Free proc-pointer components.
1229 2013-03-01 Tobias Burnus <burnus@net-b.de>
1231 * trans-decl.c (gfc_trans_deferred_vars): Free expr after use.
1232 * trans-io.c (build_dt): Ditto.
1234 2013-02-24 Joseph Myers <joseph@codesourcery.com>
1236 * resolve.c (generate_component_assignments): Don't use UTF-8
1237 ligature in diagnostic.
1239 2013-02-21 Janus Weil <janus@gcc.gnu.org>
1242 * trans-array.c (structure_alloc_comps): Handle procedure-pointer
1243 components with allocatable result.
1245 2013-02-21 Tobias Burnus <burnus@net-b.de>
1248 * gfortran.texi (Part II: Language Reference, Extensions,
1249 Non-Fortran Main Program): Sort @menu to match actual section order.
1250 * intrinsic.texi (Intrinsic Procedures): Ditto.
1251 (C_F_POINTER, PRECISION): Move to the alphabetically correct place.
1253 2013-02-15 Tobias Burnus <burnus@net-b.de>
1254 Mikael Morin <mikael@gcc.gnu.org>
1257 * simplify.c (gfc_simplify_matmul): Fix result shape
1260 2013-02-15 Tobias Burnus <burnus@net-b.de>
1263 * resolve.c (apply_default_init_local): Don't create an
1264 initializer for a result variable.
1266 2013-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
1269 * gfortran.h (gfc_add_include_path): Add boolean argument
1271 * scanner.c (gfc_add_include_path): Pass along warn argument
1272 to add_path_to_list.
1273 * options.c (gfc_post_options): Add true warn argument to
1274 gfc_add_include_path.
1275 (gfc_handle_module_path_options): Likewise.
1276 (gfc_handle_option): Also gfc_add_include_path for intrinsic
1277 modules, without warning.
1279 2013-02-14 Paul Thomas <pault@gcc.gnu.org>
1280 Tobias Burnus <burnus@net-b.de>
1283 * trans-decl.c (gfc_get_symbol_decl): Fix deferred-length
1284 results for functions without extra result variable.
1287 2013-01-30 Tobias Burnus <burnus@net-b.de>
1290 * trans-decl.c (gfc_trans_deferred_vars): Fix deferred-length
1291 results for functions without extra result variable.
1293 2013-02-12 Janus Weil <janus@gcc.gnu.org>
1296 * resolve.c (resolve_call): Do not check deferred procedures for
1299 2013-02-09 Paul Thomas <pault@gcc.gnu.org>
1302 * check.c (array_check): It is an error if a procedure is
1305 2013-02-08 Mikael Morin <mikael@gcc.gnu.org>
1308 * trans-types.c (gfc_get_function_type): Change a NULL backend_decl
1309 to error_mark_node on entry. Detect recursive types. Build a variadic
1310 procedure type if the type is recursive. Restore the initial
1313 2013-02-07 Tobias Burnus <burnus@net-b.de>
1316 * gfortran.texi (Standards): Mention TS29113.
1317 (Varying Length Character): Mention deferred-length
1319 (Fortran 2003 Status): Add unlimited polymorphic.
1320 (TS 29113 Status): Add TYPE(*) and DIMENSION(..).
1321 (C Interop): Update the section about TS29113.
1323 2013-02-06 Paul Thomas <pault@gcc.gnu.org>
1326 * trans-array.c (trans_array_constructor): Remove condition
1327 'dynamic' = true if the loop ubound is a VAR_DECL.
1329 2013-02-04 Paul Thomas <pault@gcc.gnu.org>
1333 * trans-array.c (gfc_alloc_allocatable_for_assignment): Save
1334 the lhs descriptor before it is modified for reallocation. Use
1335 it to deallocate allocatable components in the reallocation
1336 block. Nullify allocatable components for newly (re)allocated
1339 2013-02-04 Mikael Morin <mikael@gcc.gnu.org>
1342 * resolve.c (resolve_typebound_procedures): Recurse through
1345 2013-02-04 Mikael Morin <mikael@gcc.gnu.org>
1349 * gfortran.h (struct gfc_symbol): New field 'resolved'.
1350 * resolve.c (resolve_fl_var_and_proc): Don't skip result symbols.
1351 (resolve_symbol): Skip duplicate calls. Don't check the current
1354 2013-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
1358 * decl.c (gfc_match_end): Remove half-ready namespace
1359 from parent if the end of a block is missing.
1360 * parse.c (parse_module): Do not put namespace into
1363 2013-01-30 Tobias Burnus <burnus@net-b.de>
1366 * trans-decl.c (gfc_trans_deferred_vars): Fix deferred-length
1367 results for functions without extra result variable.
1369 2013-01-29 Janus Weil <janus@gcc.gnu.org>
1370 Mikael Morin <mikael@gcc.gnu.org>
1373 * gfortran.h (gfc_component): Delete members 'formal' and 'formal_ns'.
1374 (gfc_copy_formal_args,gfc_copy_formal_args_ppc,gfc_expr_replace_symbols,
1375 gfc_expr_replace_comp): Delete.
1376 (gfc_sym_get_dummy_args): New prototype.
1377 * dependency.c (gfc_check_fncall_dependency): Use
1378 'gfc_sym_get_dummy_args'.
1379 * expr.c (gfc_is_constant_expr): Ditto.
1380 (replace_symbol,gfc_expr_replace_symbols,replace_comp,
1381 gfc_expr_replace_comp): Deleted.
1382 * frontend-passes.c (doloop_code,do_function): Use
1383 'gfc_sym_get_dummy_args'.
1384 * interface.c (gfc_check_operator_interface,gfc_compare_interfaces,
1385 gfc_procedure_use,gfc_ppc_use,gfc_arglist_matches_symbol,
1386 gfc_check_typebound_override): Ditto.
1387 * module.c (MOD_VERSION): Bump module version.
1388 (mio_component): Do not read/write 'formal' and 'formal_ns'.
1389 * resolve.c (resolve_procedure_interface,resolve_fl_derived0): Do not
1390 copy formal args, but just keep a pointer to the interface.
1391 (resolve_function,resolve_call,resolve_typebound_generic_call,
1392 resolve_ppc_call,resolve_expr_ppc,generate_component_assignments,
1393 resolve_fl_procedure,gfc_resolve_finalizers,check_generic_tbp_ambiguity,
1394 resolve_typebound_procedure,check_uop_procedure): Use
1395 'gfc_sym_get_dummy_args'.
1396 * symbol.c (free_components): Do not free 'formal' and 'formal_ns'.
1397 (gfc_copy_formal_args,gfc_copy_formal_args_ppc): Deleted.
1398 (gfc_sym_get_dummy_args): New function.
1399 * trans-array.c (get_array_charlen,gfc_walk_elemental_function_args):
1400 Use 'gfc_sym_get_dummy_args'.
1401 * trans-decl.c (build_function_decl,create_function_arglist,
1402 build_entry_thunks,init_intent_out_dt,gfc_trans_deferred_vars,
1403 add_argument_checking): Ditto.
1404 * trans-expr.c (gfc_map_fcn_formal_to_actual,gfc_conv_procedure_call,
1405 gfc_conv_statement_function): Ditto.
1406 * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
1407 * trans-types.c (create_fn_spec,gfc_get_function_type): Ditto.
1409 2013-01-28 Tobias Burnus <burnus@net-b.de>
1410 Mikael Morin <mikael@gcc.gnu.org>
1413 * symbol.c (gfc_find_sym_tree): Don't look for the symbol outside an
1415 (gfc_get_ha_symtree): Let gfc_find_sym_tree lookup the parent namespace.
1416 * decl.c (gfc_match_data_decl): Ditto.
1417 (variable_decl): Remove undeclared type error.
1418 (gfc_match_import): Use renamed instead of original name.
1420 2013-01-27 Paul Thomas <pault@gcc.gnu.org>
1424 * gfortran.h : Add associate_var to symbol_attr.
1425 * resolve.c (resolve_assoc_var): Set associate_var attribute.
1426 If the target class_ok is set, set it for the associate
1428 * check.c (allocatable_check): Associate variables should not
1429 have the allocatable attribute even if their symbols do.
1430 * class.c (gfc_build_class_symbol): Symbols with associate_var
1431 set will always have a good class container.
1433 2013-01-23 Janus Weil <janus@gcc.gnu.org>
1436 * resolve.c (resolve_select): Add argument 'select_type', reject
1437 non-scalar expressions.
1438 (resolve_select_type,resolve_code): Pass new argument to
1441 2013-01-23 Jakub Jelinek <jakub@redhat.com>
1444 * trans-decl.c (gfc_get_symbol_decl): Set DECL_ARTIFICIAL
1445 and DECL_IGNORED_P on select_type_temporary and don't set
1448 2013-01-21 Thomas Koenig <tkoenig@gcc.gnu.org>
1451 * scanner.c (add_path_to_list): Copy path to temporary and strip
1452 trailing directory separators before calling stat().
1454 2013-01-17 Richard Biener <rguenther@suse.de>
1456 * trans-stmt.c (gfc_trans_do): Conditionally compute countm1
1457 dependent on sign of step, avoids repeated evaluation of
1458 step sign test. Avoid undefined overflow issues by using unsigned
1461 2013-01-16 Janus Weil <janus@gcc.gnu.org>
1464 * class.c (find_typebound_proc_uop): Check for f2k_derived instead of
1467 2013-01-16 Jakub Jelinek <jakub@redhat.com>
1468 Tobias Burnus <burnus@net-b.de>
1471 * lang.opt (fintrinsic-modules-path): Don't accept Joined.
1472 (fintrinsic-modules-path=): New.
1473 * options.c (gfc_handle_option, gfc_get_option_string,
1474 gfc_get_option_string): Handle the latter.
1476 2013-01-16 Jakub Jelinek <jakub@redhat.com>
1479 * trans-stmt.c (gfc_trans_do): Put countm1-- before conditional
1480 and use value of countm1 before the decrement in the condition.
1482 2013-01-15 Paul Thomas <pault@gcc.gnu.org>
1485 * expr.c (gfc_check_pointer_assign): Check for presence of
1486 's2' before using it.
1488 2013-01-14 Thomas Koenig <tkoenig@gcc.gnu.org>
1491 * frontend-passes.c (optimize_reduction): New function,
1492 including prototype.
1493 (callback_reduction): Likewise.
1494 (gfc_run_passes): Also run optimize_reduction.
1495 (copy_walk_reduction_arg): New function.
1496 (dummy_code_callback): New function.
1498 2013-01-13 Jakub Jelinek <jakub@redhat.com>
1501 * trans-expr.c (gfc_conv_structure): Call
1502 unshare_expr_without_location on the ctor elements.
1504 2013-01-13 Paul Thomas <pault@gcc.gnu.org>
1507 * expr.c (gfc_check_pointer_assign): Ensure that both lvalue
1508 and rvalue interfaces are presented to gfc_compare_interfaces.
1509 Simplify references to interface names by using the symbols
1510 themselves. Call gfc_compare_interfaces with s1 and s2 inter-
1511 changed to overcome the asymmetry of this function. Do not
1512 repeat the check for the presence of s1 and s2.
1514 2013-01-12 Janus Weil <janus@gcc.gnu.org>
1517 * trans-array.c (gfc_conv_array_parameter): No packing was done for
1518 full arrays of derived type.
1520 2013-01-08 Paul Thomas <pault@gcc.gnu.org>
1523 * class.c (get_unique_type_string): Change $tar to STAR and
1524 replace sprintf by strcpy where there is no formatting.
1525 * decl.c (gfc_match_decl_type_spec): Change $tar to STAR.
1527 2013-01-09 Mikael Morin <mikael@gcc.gnu.org>
1530 * module.c (check_for_ambiguous): Get the current program unit using
1533 2013-01-09 Tobias Burnus <burnus@net-b.de>
1536 * resolve.c (resolve_symbol): Reject non-C_Bool logicals
1537 in BIND(C) procedures with -std=f*.
1539 2013-01-08 Paul Thomas <pault@gcc.gnu.org>
1542 * trans-expr.c (gfc_conv_procedure_call): Dereference scalar
1543 character function arguments to elemental procedures in
1544 scalarization loops.
1546 2013-01-07 Tobias Burnus <burnus@net-b.de>
1549 * gfortran.h (gfc_check_assign_symbol): Update prototype.
1550 * decl.c (add_init_expr_to_sym, do_parm): Update call.
1551 * expr.c (gfc_check_assign_symbol): Handle BT_CLASS and
1552 improve error location; support components.
1553 (gfc_check_pointer_assign): Handle component assignments.
1554 * resolve.c (resolve_fl_derived0): Call gfc_check_assign_symbol.
1555 (resolve_values): Update call.
1556 (resolve_structure_cons): Avoid double diagnostic.
1558 2013-01-07 Tobias Burnus <burnus@net-b.de>
1559 Thomas Koenig <tkoenig@gcc.gnu.org>
1562 * expr.c (gfc_build_intrinsic_call): Avoid clashes
1563 with user's procedures.
1564 * gfortran.h (gfc_build_intrinsic_call): Update prototype.
1565 * simplify.c (gfc_simplify_size): Update call.
1566 * class.c (finalization_scalarizer, finalization_get_offset,
1567 finalizer_insert_packed_call, generate_finalization_wrapper):
1568 Clean up by using gfc_build_intrinsic_call.
1570 2013-01-07 Tobias Burnus <burnus@net-b.de>
1573 * resolve.c (resolve_select_type): Reject intrinsic types for
1574 a non-unlimited-polymorphic selector.
1576 2013-01-06 Paul Thomas <pault@gcc.gnu.org>
1581 * trans-array.c (build_array_ref): Check the TYPE_CANONICAL
1582 to see if it is GFC_CLASS_TYPE_P.
1583 * trans-expr.c (gfc_get_vptr_from_expr): The same.
1584 (gfc_conv_class_to_class): If the types are not the same,
1585 cast parmese->expr to the type of ctree.
1586 * trans-types.c (gfc_get_derived_type): GFC_CLASS_TYPE_P of
1587 CLASS components must be set.
1589 2013-01-06 Mikael Morin <mikael@gcc.gnu.org>
1594 * module.c (read_module): Don't reuse local symtree if the associated
1595 symbol isn't exactly the one wanted. Don't reuse local symtree if it is
1597 * resolve.c (resolve_call): Use symtree's name instead of symbol's to
1600 2013-01-05 Steven G. Kargl <kargl@gcc.gnu.org>
1601 Mikael Morin <mikael@gcc.gnu.org>
1604 * class.c (gfc_fix_class_refs): Adapt ts initialization for the case
1606 * trans-expr.c (gfc_conv_function_expr): Init sym earlier. Use it.
1608 2013-01-05 Tobias Burnus <burnus@net-b.de>
1610 * class.c (finalize_component): Used passed offset expr.
1611 (finalization_get_offset): New static function.
1612 (finalizer_insert_packed_call, generate_finalization_wrapper): Use it
1613 to handle noncontiguous arrays.
1615 2013-01-04 Tobias Burnus <burnus@net-b.de>
1617 * trans.c (gfc_build_final_call): New function.
1618 * trans.h (gfc_build_final_call, gfc_conv_scalar_to_descriptor):
1619 New function prototypes.
1620 * trans-expr.c (gfc_conv_scalar_to_descriptor): Renamed from
1621 conv_scalar_to_descriptor, removed static attribute.
1622 (gfc_conv_procedure_call): Honor renaming.
1624 2013-01-04 Tobias Burnus <burnus@net-b.de>
1626 * intrinsic.c (add_functions): New internal intrinsic
1627 function GFC_PREFIX ("stride").
1628 * gfortran.h (gfc_isym_id): Add GFC_ISYM_STRIDE.
1629 * intrinsic.h (gfc_resolve_stride): New prototypes.
1630 * iresolve.c (gfc_resolve_stride): New function.
1631 * trans-intrinsic.c (conv_intrinsic_stride): New static
1633 (gfc_conv_intrinsic_function): Use it.
1635 2013-01-04 Tobias Burnus <burnus@net-b.de>
1637 * class.c (gfc_find_intrinsic_vtab): Add _final
1639 * decl.c (gfc_match_null): Remove superfluous
1640 variadic argument to gfc_match.
1642 2013-01-04 Paul Thomas <pault@gcc.gnu.org>
1645 * match.c (copy_ts_from_selector_to_associate): Remove call to
1646 gfc_resolve_expr and replace it with explicit setting of the
1647 array reference type.
1648 * resolve.c (resolve_select_type): It is an error if the
1649 selector is coindexed.
1651 2013-01-04 Tobias Burnus <burnus@net-b.de>
1654 * decl.c (gfc_match_null): Parse and reject MOLD.
1656 2013-01-04 Tobias Burnus <burnus@net-b.de>
1660 * class.c (gfc_class_null_initializer): Fix finding the vtab.
1661 (gfc_find_intrinsic_vtab): Use BT_VOID for some components.
1663 2013-01-03 Janus Weil <janus@gcc.gnu.org>
1666 * expr.c (gfc_check_assign): Use 'gfc_expr_attr' to evaluate attributes
1667 of rvalue. Correct hyphenation in error message.
1669 2013-01-03 Jakub Jelinek <jakub@redhat.com>
1671 * gfortranspec.c (lang_specific_driver): Update copyright notice
1674 Copyright (C) 2013 Free Software Foundation, Inc.
1676 Copying and distribution of this file, with or without modification,
1677 are permitted in any medium without royalty provided the copyright
1678 notice and this notice are preserved.