2012-11-25 Thomas Koenig <tkoenig@gcc.gnu.org>
[official-gcc.git] / gcc / fortran / ChangeLog
blobbf5f8fbad5b7417f561988bc0c2871277710924c
1 2012-11-25  Thomas Koenig  <tkoenig@gcc.gnu.org>
3         PR fortran/30146
4         * frontend-passes.c (doloop_warn):  New function.
5         (doloop_list):  New static variable.
6         (doloop_size):  New static variable.
7         (doloop_level):  New static variable.
8         (gfc_run_passes): Call doloop_warn.
9         (doloop_code):  New function.
10         (doloop_function):  New function.
11         (gfc_code_walker):  Keep track of DO level.
13 2012-11-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
15         PR fortran/55314
16         * resolve.c (resolve_allocate_deallocate):  Compare all
17         subscripts when deciding if to reject a (de)allocate
18         statement.
20 2012-11-21  Janus Weil  <janus@gcc.gnu.org>
22         PR fortran/55352
23         * trans-decl.c (generate_local_decl): Don't warn for explicitly imported
24         but unused module variables which are in a namelist or common block.
26 2012-11-20  Diego Novillo  <dnovillo@google.com>
27             Jakub Jelinek  <jakub@redhat.com>
29         * trans-openmp.c: Replace all vec<T, A>() initializers
30         with vNULL.
32 2012-11-17  Diego Novillo  <dnovillo@google.com>
34         Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
36         * frontend-passes.c: Use new vec API in vec.h.
37         * trans-array.c: Likewise.
38         * trans-common.c: Likewise.
39         * trans-decl.c: Likewise.
40         * trans-expr.c: Likewise.
41         * trans-intrinsic.c: Likewise.
42         * trans-openmp.c: Likewise.
43         * trans-stmt.c: Likewise.
44         * trans-types.c: Likewise.
45         * trans.h: Likewise.
47 2012-11-17  Jakub Jelinek  <jakub@redhat.com>
49         PR fortran/55341
50         * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Convert last
51         argument to memcpy to size_type_node type.
52         * trans-stmt.c (gfc_conv_elemental_dependencies): Likewise.
53         * trasn-array.c (duplicate_allocatable): Likewise.
55 2012-11-16  Janus Weil  <janus@gcc.gnu.org>
57         PR fortran/55297
58         * resolve.c (resolve_typebound_intrinsic_op): Only add typebound
59         operators to the operator list in the namespace of the derived type.
62 2012-11-12  Jan Hubicka  <jh@suse.cz>
64         * f95-lang.c (ATTR_NOTHROW_LEAF_MALLOC_LIST): New macro.
65         (gfc_define_builtin): Use set_call_expr_flags.
66         (gfc_init_builtin_functions): Update.
68 2012-11-12  Tobias Burnus  <burnus@net-b.de>
70         PR fortran/55272
71         * module.c (mio_array_spec): Correctly handle coarray
72         scalars.
74 2012-11-07  Tobias Schlüter  <tobi@gcc.gnu.org>
76         PR fortran/51727
77         * module.c (sorted_pointer_info): New.
78         (gfc_get_sorted_pointer_info): New.
79         (free_sorted_pointer_info_tree): New.
80         (compare_sorted_pointer_info): New.
81         (find_symbols_to_write): New.
82         (write_symbol1_recursion): New.
83         (write_symbol1): Collect symbols that need writing, output in order.
84         (write_generic): Traverse tree in order.
86 2012-11-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
88         PR c/53063
89         * options.c (set_Wall): Do not set warn_switch here.
91 2012-11-06  Janus Weil  <janus@gcc.gnu.org>
93         PR fortran/54917
94         * target-memory.c (gfc_target_expr_size,gfc_target_interpret_expr):
95         Handle BT_CLASS.
96         * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Add support for
97         polymorphic arguments.
99 2012-11-04  Janus Weil  <janus@gcc.gnu.org>
101         PR fortran/55199
102         * primary.c (gfc_match_varspec): Clear typespec if it cannot be
103         determined at this point.
105 2012-10-31  Janus Weil  <janus@gcc.gnu.org>
107         PR fortran/53718
108         * trans.h (GFC_DECL_PUSH_TOPLEVEL): Removed.
109         * trans-decl.c (gfc_get_symbol_decl,gfc_generate_function_code): Remove
110         GFC_DECL_PUSH_TOPLEVEL.
111         (build_function_decl): Do not push __copy procedure to toplevel.
113 2012-10-31  Tobias Burnus  <burnus@net-b.de>
115         PR fortran/55134
116         * trans-array.c (gfc_conv_array_parameter): Regard AS_DEFERRED as
117         array with descriptor.
119 2012-10-28  Tobias Burnus  <burnus@net-b.de>
121         PR fortran/54958
122         * gfortran.h (gfc_resolve_iterator_expr,
123         gfc_check_vardef_context): Update prototype.
124         * expr.c (gfc_check_vardef_context): Add own_scope
125         argument and honour it.
126         * resolve.c (gfc_resolve_iterator_expr): Add own_scope
127         argument and honour it.
128         (resolve_deallocate_expr, resolve_allocate_expr,
129         resolve_data_variables, resolve_transfer
130         resolve_lock_unlock, resolve_code): Update calls.
131         * array.c (resolve_array_list): Ditto.
132         * check.c (gfc_check_atomic_def, gfc_check_atomic_ref): Ditto.
133         * interface.c (compare_actual_formal): Ditto.
134         * intrinsic.c (check_arglist): Ditto.
135         * io.c (resolve_tag, gfc_resolve_dt, gfc_resolve_inquire): Ditto.
137 2012-10-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
139         * trans.c (gfc_allocate_allocatable):  Revert accidental
140         commit.
142 2012-10-24  Janus Weil  <janus@gcc.gnu.org>
144         PR fortran/55037
145         * trans-expr.c (gfc_conv_procedure_call): Move a piece of code and
146         remove an assert.
148 2012-10-21  Tobias Burnus  <burnus@net-b.de>
150         PR fortran/54725
151         * Make-lang.in (CFLAGS-cpp.o): Use TARGET_SYSTEM_ROOT_DEFINE.
152         * cpp.o (gfc_cpp_init_options): Use it for
153         setting gfc_cpp_option.sysroot.
155 2012-10-21  Thomas König  <tkoenig@gcc.gnu.org>
157         PR fortran/54465
158         * lang.opt (Wextra):  Add.
159         * invoke.texi:  Document that -Wc-binding-type, -Wconversion
160         and -Wline-truncation are implied by -Wall.  Document that
161         -Wcompare-reals is implied by -Wextra.  Document -Wextra.
162         * options.c (set_Wextra):  New function.
163         (gfc_handle_option):  Handle -Wextra.
165 2012-10-19  Janus Weil  <janus@gcc.gnu.org>
167         PR fortran/54224
168         * trans-expr.c (conv_function_val): Set TREE_USED.
170 2012-10-18  Tobias Burnus  <burnus@net-b.de>
172         PR fortran/54884
173         * resolve.c (specification_expr): Change to bool.
174         (resolve_formal_arglist, resolve_symbol): Set
175         specification_expr to true before resolving the array spec.
176         (resolve_variable, resolve_charlen, resolve_fl_variable):
177         Properly reset specification_expr.
178         (resolve_function): Set public_use when used in
179         a specification expr.
181 2012-10-16  Tobias Burnus  <burnus@net-b.de>
183         PR fortran/50981
184         PR fortran/54618
185         * trans.h (gfc_conv_derived_to_class, gfc_conv_class_to_class):
186         Update prototype.
187         * trans-stmt.c (trans_associate_var,gfc_trans_allocate): Update
188         calls to those functions.
189         * trans-expr.c (gfc_conv_derived_to_class, gfc_conv_class_to_class,
190         gfc_conv_expr_present): Handle absent polymorphic arguments.
191         (class_scalar_coarray_to_class): New function.
192         (gfc_conv_procedure_call): Update calls.
194 2012-10-12  Janus Weil  <janus@gcc.gnu.org>
196         PR fortran/40453
197         * interface.c (check_dummy_characteristics): Recursively check dummy
198         procedures.
200 2012-10-11  Janus Weil  <janus@gcc.gnu.org>
202         PR fortran/54784
203         * trans-stmt.c (gfc_trans_allocate): Correctly determine the reference
204         to the _data component for polymorphic allocation with SOURCE.
206 2012-10-06  Janus Weil  <janus@gcc.gnu.org>
208         PR fortran/54832
209         * resolve.c (resolve_fl_derived0): Correctly copy the 'class_ok'
210         attribute for proc-ptr components with RESULT variable.
212 2012-10-06  Janus Weil  <janus@gcc.gnu.org>
214         PR fortran/45521
215         * interface.c (generic_correspondence): Implement additional
216         distinguishability criteria of F08.
217         (compare_actual_formal): Reject data object as actual argument for
218         procedure formal argument.
220 2012-10-04  Tobias Burnus  <burnus@net-b.de>
222         * expr.c (scalarize_intrinsic_call): Plug memory leak.
223         * frontend-passes.c (gcc_assert): Extend assert.
224         * interface.c (gfc_compare_derived_types): Fix comparison.
225         (gfc_check_operator_interface): Move up to make this error
226         message reachable.
227         (get_sym_storage_size): Remove always-true checks.
228         * io.c (format_lex): Add comment.
229         (gfc_free_wait): Free memory.
230         * match.c (gfc_match_select_type): Ditto. 
231         * matchexpr.c (match_level_3): Ditto.
232         * primary.c (match_string_constant): Ditto.
233         (match_actual_arg): Check return value.
234         * resolve.c (gfc_resolve_substring_charlen,
235         resolve_typebound_generic_call, resolve_typebound_function,
236         resolve_typebound_subroutine): Free memory.
237         * trans-types.c (gfc_get_derived_type): Remove always-true check.
239 2012-10-02  Janus Weil  <janus@gcc.gnu.org>
241         PR fortran/54778
242         * interface.c (matching_typebound_op): Check for 'class_ok' attribute.
244 2012-09-30  Janus Weil  <janus@gcc.gnu.org>
246         PR fortran/54667
247         * intrinsic.texi (C_F_POINTER): Fix description.
248         * resolve.c (gfc_iso_c_sub_interface): Add a check for FPTR argument
249         of C_F_POINTER. Modify two error messages. Cleanup.
251 2012-09-24  Tobias Burnus  <burnus@net-b.de>
253         PR fortran/54618
254         PR fortran/54690
255         * trans-expr.c (gfc_conv_procedure_call): Fix INTENT(OUT)
256         handling for allocatable BT_CLASS.
258 2012-09-24  Lawrence Crowl  <crowl@google.com>
260         * trans-expr.c (gfc_conv_cst_int_power): Change to new double_int API.
261         * target-memory.c (gfc_interpret_logical): Likewise.
263 2012-09-23  Tobias Burnus  <burnus@net-b.de>
265         * parse.c (parse_derived): Don't set attr.alloc_comp
266         for pointer components with allocatable subcomps.
268         PR fortran/54599
269         * resolve.c (resolve_fl_namelist): Remove superfluous
270         NULL check.
271         * simplify.c (simplify_min_max): Remove unreachable code.
272         * trans-array.c (gfc_trans_create_temp_array): Change
273         a condition into an assert.
275         PR fortran/54618
276         * trans-expr.c (gfc_trans_class_init_assign): Guard
277         re-setting of the _data by gfc_conv_expr_present.
278         (gfc_conv_procedure_call): Fix INTENT(OUT) handling
279         for allocatable BT_CLASS.
281 2012-09-22  Thomas König  <tkoenig@gcc.gnu.org>
283         PR fortran/54599
284         * dependency.c (gfc_dep_compare_expr):  Clarify logic,
285         remove dead code.
287 2012-09-20  Tobias Burnus  <burnus@net-b.de>
289         PR fortran/54599
290         * cpp.c (print_line): Properly handle extern C.
292 2012-09-20  Martin Jambor  <mjambor@suse.cz>
294         * trans-decl.c (gfc_get_extern_function_decl): Push NULL cfun.  Do not
295         set and restore current_function_decl.
296         (gfc_init_coarray_decl): Do not set and restore current_function_decl.
298 2012-09-17  Tobias Burnus  <burnus@net-b.de>
300         PR fortran/54608
301         * simplify.c (gfc_simplify_scan, gfc_simplify_verify):
302         Fix handling of BACK=variable.
304 2012-09-17  Janus Weil  <janus@gcc.gnu.org>
306         PR fortran/54285
307         * expr.c (gfc_check_pointer_assign): Correctly handle procedure pointers
308         as function results.
309         * primary.c (gfc_match_varspec): Allow to call a PPC with proc-ptr
310         result.
312 2012-09-17  Tobias Burnus  <burnus@net-b.de>
314         PR fortran/54603
315         * trans-expr.c (gfc_trans_subcomponent_assign): Handle
316         proc-pointer components.
318 2012-09-17  Tobias Burnus  <burnus@net-b.de>
320         PR fortran/54599
321         * error.c (error_print): Move increment out of the assert.
322         * interface.c (gfc_compare_derived_types): Add assert.
323         (get_expr_storage_size): Remove always-true logical condition.
324         * resolve.c (resolve_allocate_expr): Fix looping logic.
325         * target-memory.c (gfc_target_expr_size): Add assert.
327 2012-09-16  Janus Weil  <janus@gcc.gnu.org>
329         PR fortran/54594
330         * resolve.c (get_checked_tb_operator_target): Add a reference to the
331         relevant quote from the F08 standard.
333 2012-09-16  Janus Weil  <janus@gcc.gnu.org>
335         PR fortran/54594
336         * interface.c (compare_type_rank): Handle CLASS arrays.
338 2012-09-16  Janus Weil  <janus@gcc.gnu.org>
340         PR fortran/54387
341         * expr.c (gfc_check_pointer_assign): Check for result of embracing
342         function.
344 2012-09-16  Tobias Burnus  <burnus@net-b.de>
346         * trans-decl.c (gfc_generate_function_code): Fix
347         gfc_option.coarray check.
348         * trans-stmt.c (compute_inner_temp_size): Fix handling
349         of gfc_option.rtcheck.
351 2012-09-16  Mikael Morin  <mikael@gcc.gnu.org>
353         * symbol.c (gfc_undo_symbols): Correctly undo namelists.
355 2012-09-15  Tobias Burnus  <burnus@net-b.de>
357         * trans-io.c (gfc_trans_transfer): Add an assert.
359 2012-09-15  Tobias Burnus  <burnus@net-b.de>
361         * arith.c (arith_power): Call gfc_free_expr in case of error.
362         * array.c (gfc_match_array_constructor): Initialize variable.
363         (gfc_resolve_character_array_constructor): Remove superfluous check.
364         (gfc_array_dimen_size): Add assert.
365         * check.c (numeric_check): Fix implicit typing.
366         * class.c (gfc_build_class_symbol): Add assert.
367         (finalize_component): Free memory.
368         * dump-parse-tree.c (show_namespace): Add assert.
369         * trans-io.c (transfer_namelist_element, transfer_expr): Avoid
370         memory leakage.
371         (gfc_trans_transfer): Add assert.
372         * trans.c (gfc_trans_runtime_check): Call va_end
374 2012-09-15  Tobias Burnus  <burnus@net-b.de>
376         * match.c (lock_unlock_statement, sync_statement): Fix potential
377         double freeing.
378         (sync_statement): Remove unreachable code.
379         * simplify.c (gfc_simplify_bessel_n2): Avoid double freeing.
380         (gfc_simplify_repeat): Remove bogus code.
381         * target-memory.h (gfc_target_encode_expr): Update prototype.
382         * target-memory.c (gfc_target_encode_expr, encode_array,
383         encode_derived): Return unsigned HOST_WIDE_INT.
384         (gfc_target_interpret_expr): Add assert.
385         (gfc_merge_initializers): Fix "== 0" check for mpz_t.
386         * symbol.c (gfc_get_typebound_proc): Add assert.
387         (gfc_merge_initializers): Remove unreachable check.
389 2012-09-13  Tobias Burnus  <burnus@net-b.de>
391         PR fortran/54556
392         * resolve.c (resolve_formal_arglist): Allow VALUE arguments
393         with implicit_pure.
394         (gfc_impure_variable): Don't check gfc_pure such that the
395         function also works for gfc_implicit_pure procedures.
397 2012-09-12  Tobias Burnus  <burnus@net-b.de>
399         PR fortran/54225
400         PR fortran/53306
401         * array.c (match_subscript, gfc_match_array_ref): Fix
402         diagnostic of coarray's '*'.
404 2012-09-07  Mikael Morin  <mikael@gcc.gnu.org>
406         PR fortran/54208
407         * simplify.c (simplify_bound_dim): Resolve array spec before
408         proceeding with simplification.
410 2012-09-06  Tobias Burnus  <burnus@net-b.de>
412         PR fortran/54463
413         * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Fix matmul
414         call to BLAS if the default-kind has been promoted.
416 2012-09-05  Tobias Burnus  <burnus@net-b.de>
418         PR fortran/54462
419         * symbol.c (gfc_undo_symbols): Avoid NULL pointer dereference.
421 2012-09-04  Janus Weil  <janus@gcc.gnu.org>
423         PR fortran/54435
424         PR fortran/54443
425         * match.c (gfc_match_select_type): Make sure to only access CLASS_DATA
426         for BT_CLASS.
428 2012-09-03  Tobias Burnus  <burnus@net-b.de>
430         PR fortran/54467
431         * class.c (gfc_find_derived_vtab): Fix disabling of _final
432         by continuing to generate normal type-bound procedures.
434 2012-09-03  Tobias Burnus  <burnus@net-b.de>
436         * class.c (gfc_find_derived_vtab): Disable ABI-breaking
437         generation of the "_final" subroutine for now.
439 2012-09-03  Tobias Burnus  <burnus@net-b.de>
441         * class.c (finalize_component): Fixes to the comment.
443 2012-09-03  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
444             Tobias Burnus  <burnus@net-b.de>
446         PR fortran/37336
447         * gfortran.h (symbol_attribute): Add artificial.
448         * module.c (mio_symbol_attribute): Handle attr.artificial
449         * class.c (gfc_build_class_symbol): Defer creation of the vtab
450         if the DT has finalizers, mark generated symbols as
451         attr.artificial.
452         (has_finalizer_component, finalize_component,
453         finalization_scalarizer, generate_finalization_wrapper):
454         New static functions.
455         (gfc_find_derived_vtab): Add _final component and call
456         generate_finalization_wrapper.
457         * dump-parse-tree.c (show_f2k_derived): Use resolved
458         proc_tree->n.sym rather than unresolved proc_sym.
459         (show_attr): Handle attr.artificial.
460         * resolve.c (gfc_resolve_finalizers): Ensure that the vtab exists.
461         (resolve_fl_derived): Resolve finalizers before
462         generating the vtab.
463         (resolve_symbol): Also allow assumed-rank arrays with CONTIGUOUS;
464         skip artificial symbols.
465         (resolve_fl_derived0): Skip artificial symbols.
467 2012-09-02  Tobias Burnus  <burnus@net-b.de>
469         PR fortran/54426
470         * symbol.c (find_common_symtree): New function.
471         (gfc_undo_symbols): Use it; free common_head if needed.
473 2012-08-28  Tobias Burnus  <burnus@net-b.de>
475         PR fortran/54389
476         * trans-decl.c (gfc_get_extern_function_decl,
477         build_function_decl): Don't mark impure elemental
478         functions as DECL_PURE_P and honour implicit_pure.
480 2012-08-28  Tobias Burnus  <burnus@net-b.de>
482         PR fortran/54382
483         * error.c (show_locus): Avoid out of bound access.
485 2012-08-28  Tobias Burnus  <burnus@net-b.de>
487         PR fortran/54384
488         * decl.c (match_data_constant): Add missing gfc_free_expr.
489         (top_val_list): Remove always-true condition.
490         * data.c (get_array_index, create_character_initializer):
491         Free temporary expressions.
492         (gfc_assign_data_value): Free expression when aborting.
494 2012-08-28  Tobias Burnus  <burnus@net-b.de>
496         PR fortran/54384
497         * symbol.c (gfc_copy_formal_args): Set also sym->formal_ns.
499 2012-08-27  Tobias Burnus  <burnus@net-b.de>
501         PR fortran/54384
502         * resolve.c (gfc_resolve_character_operator): Free temporary
503         variables.
504         * trans-expr.c (gfc_conv_statement_function): Ditto.
506 2012-08-27  Tobias Burnus  <burnus@net-b.de>
508         PR fortran/54384
509         * dependency.c (check_section_vs_section): Use gfc_free_expr
510         instead of free.
511         * trans-intrinsic.c (conv_generic_with_optional_char_arg): Use
512         gfc_free_symbol instead of free.
514 2012-08-27  Tobias Burnus  <burnus@net-b.de>
516         PR fortran/54384
517         * trans-expr.c (gfc_trans_arrayfunc_assign): Free se.ss
518         and loop.
520 2012-08-27  Tobias Burnus  <burnus@net-b.de>
522         PR fortran/41093
523         * gfortran.h (gfc_common_head): Add "int refs".
524         * match.c (gfc_match_common): Increment refs.
525         * resolve.c (resolve_symbol): Only increment formal_ns->refs
526         if formal_ns is not sym->ns.
527         * symbol.c (gfc_free_symbol): Only free formal_ns if
528         if formal_ns is not sym->ns. Free common_block if refs is one.
529         (gfc_release_symbol): Release formal_ns only if the
530         symbol is not ENTRY of a module.
531         * decl.c (get_proc_name): Don't increment gfc_current_ns->refs.
532         * parse.c (parse_interface): Incement proc_unit->refs++ for
533         proc-pointer result variables.
534         * module.c (mio_symbol): Don't increase sym->refs for its
535         use in sym->formal_ns->proc_name.
537 2012-08-27  Tobias Burnus  <burnus@net-b.de>
539         PR fortran/54370
540         * trans-stmt.c (gfc_trans_do_while): Don't change the logical
541         kind for negation of the condition.
543 2012-08-27  Tobias Burnus  <burnus@net-b.de>
545         * options.c (set_Wall): Don't set for -Wcompare-reals.
546         * invoke.texi (-Wall, -Wcompare-reals): -Wall no longer
547         implies -Wcompare-reals.
549 2012-08-24  Simon Baldwin  <simonb@google.com>
551         * lang.opt (-cpp=): Mark flag NoDWARFRecord.
553 2012-08-23  Tobias Burnus  <burnus@net-b.de>
555         PR fortran/54350
556         * trans-array.c (free_ss_info): Free data.array.subscript.
557         (gfc_free_ss): No longer free data.array.subscript.
558         (walk_coarray): New function, moved from trans-intrinsic.c
559         (gfc_conv_expr_descriptor): Walk array descriptor instead
560         of taking passed "ss".
561         (get_array_ctor_all_strlen, gfc_add_loop_ss_code,
562         gfc_conv_array_parameter): Update call and cleanup ss handling.
563         * trans-array.h (gfc_conv_expr_descriptor,
564         gfc_conv_array_parameter): Update prototype.
565         * trans-expr.c (gfc_conv_derived_to_class,
566         conv_isocbinding_procedure, gfc_conv_procedure_call,
567         gfc_trans_alloc_subarray_assign, gfc_trans_subcomponent_assign,
568         gfc_trans_pointer_assignment, gfc_trans_arrayfunc_assign): Update
569         call to gfc_conv_expr_descriptor and gfc_conv_array_parameter, and
570         clean up.
571         * trans-intrinsic.c (walk_coarray): Moved to trans-array.c
572         (trans_this_image, trans_image_index, gfc_conv_intrinsic_rank
573         gfc_conv_intrinsic_bound, gfc_conv_intrinsic_cobound,
574         gfc_conv_intrinsic_len, gfc_conv_intrinsic_size,
575         gfc_conv_intrinsic_sizeof, gfc_conv_intrinsic_storage_size,
576         gfc_conv_intrinsic_transfer, gfc_conv_allocated,
577         gfc_conv_associated, gfc_conv_intrinsic_loc,
578         conv_intrinsic_move_alloc): Update calls.
579         * trans-io.c (gfc_convert_array_to_string, set_internal_unit,
580         gfc_trans_transfer): Ditto.
581         * trans-stmt.c (gfc_conv_elemental_dependencies,
582         gfc_trans_sync, trans_associate_var,
583         gfc_trans_pointer_assign_need_temp): Ditto.
585 2012-08-23  Jakub Jelinek  <jakub@redhat.com>
587         * trans-decl.c (trans_function_start, generate_coarray_init,
588         create_main_function, gfc_generate_constructors): Call
589         allocate_struct_function instead of init_function_start.
591 2012-08-22  Tobias Burnus  <burnus@net-b.de>
593         * trans-expr.c (gfc_copy_class_to_class,
594         gfc_trans_arrayfunc_assign): Free loop and ss data.
595         * trans-intrinsic.c (gfc_trans_arrayfunc_assign): Free ss data.
597 2012-08-21  Tobias Burnus  <burnus@net-b.de>
599         * parse.c (parse_contained): Include EXEC_END_PROCEDURE
600         in ns->code to make sure the gfc_code is freed.
602 2012-08-20  Tobias Burnus  <burnus@net-b.de>
604         PR fortran/54301
605         * expr.c (gfc_check_pointer_assign): Warn when a pointer,
606         which is a function result, might outlive its target.
608 2012-08-20  Tobias Burnus  <burnus@net-b.de>
610         PR fortran/54301
611         * expr.c (gfc_check_pointer_assign): Warn when the pointer
612         might outlive its target.
613         * gfortran.h (struct gfc_option_t): Add warn_target_lifetime.
614         * options.c (gfc_init_options, set_wall, gfc_handle_option):
615         handle it.
616         * invoke.texi (-Wtarget-lifetime): Document it.
617         (-Wall): Implied it.
618         * lang.opt (-Wtarget-lifetime): New flag.
620 2012-08-19  Thomas König  <tkoenig@gcc.gnu.org>
622         PR fortran/54298
623         * gfortran.h (struct gfc_option_t): Add warn_compare_reals.
624         * lang.opt:  Add Wcompare-reals.
625         * invoke.texi:  Document -Wcompare-reals.
626         * resolve.c (resolve_operator):  If -Wcompare-reals is in effect,
627         warn about equality/inequality comparisions for REAL and COMPLEX.
628         * options.c (gfc_init_options):  Set warn_compare_reals.
629         (set_Wall):  Include warn_compare_reals in Wall.
630         (gfc_handle_option):  Handle Wcompare_reals.
632 2012-08-17  Jakub Jelinek  <jakub@redhat.com>
634         * array.c (gfc_match_array_ref): Fix up memset arguments.
636 2012-08-16   Diego Novillo  <dnovillo@google.com>
638         Revert
640         PR bootstrap/54281
641         * gfortran.h: Do not include gmp.h.
643 2012-08-16   Diego Novillo  <dnovillo@google.com>
645         PR bootstrap/54281
646         * gfortran.h: Do not include gmp.h.
648 2012-08-15  Janus Weil  <janus@gcc.gnu.org>
650         PR fortran/54243
651         PR fortran/54244
652         * resolve.c (check_typebound_baseobject): Check for class_ok attribute.
653         (resolve_procedure_interface,resolve_fl_derived0): Copy class_ok
654         attribute.
656 2012-08-14  Mikael Morin  <mikael@gcc.gnu.org>
658         PR fortran/47586
659         * trans-expr.c (expr_is_variable): Handle regular, procedure pointer,
660         and typebound functions returning a data pointer.
662 2012-08-14  Mikael Morin  <mikael@gcc.gnu.org>
664         * decl.c (match_ppc_decl): Copy the procedure interface's symbol
665         as procedure interface's result.
667 2012-08-14  Mikael Morin  <mikael@gcc.gnu.org>
669         * trans-expr.c (gfc_trans_scalar_assign): Rename argument,
670         extend comment.
672 2012-08-14  Mikael Morin  <mikael@gcc.gnu.org>
674         * gfortran.h (gfc_get_proc_ptr_comp): New prototype.
675         (gfc_is_proc_ptr_comp): Update prototype.
676         * expr.c (gfc_get_proc_ptr_comp): New function based on the old
677         gfc_is_proc_ptr_comp.
678         (gfc_is_proc_ptr_comp): Call gfc_get_proc_ptr_comp.
679         (gfc_specification_expr, gfc_check_pointer_assign): Use
680         gfc_get_proc_ptr_comp.
681         * trans-array.c (gfc_walk_function_expr): Likewise.
682         * resolve.c (resolve_structure_cons, update_ppc_arglist,
683         resolve_ppc_call, resolve_expr_ppc): Likewise.
684         (resolve_function): Update call to gfc_is_proc_ptr_comp.
685         * dump-parse-tree.c (show_expr): Likewise.
686         * interface.c (compare_actual_formal): Likewise.
687         * match.c (gfc_match_pointer_assignment): Likewise.
688         * primary.c (gfc_match_varspec): Likewise.
689         * trans-io.c (gfc_trans_transfer): Likewise.
690         * trans-expr.c (gfc_conv_variable, conv_function_val,
691         conv_isocbinding_procedure, gfc_conv_procedure_call,
692         gfc_trans_pointer_assignment): Likewise.
693         (gfc_conv_procedure_call, gfc_trans_array_func_assign):
694         Use gfc_get_proc_ptr_comp.
696 2012-08-14  Tobias Burnus  <burnus@net-b.de>
698         PR fortran/40881
699         * error.c (gfc_notify_std): Reset cur_error_buffer->flag flag
700         when the error/warning has been printed.
701         * gfortran.h (gfc_sl_type): Add ST_LABEL_DO_TARGET.
702         * match.c (gfc_match_do): Use ST_LABEL_DO_TARGET.
703         * parse.c (check_statement_label): Use ST_LABEL_DO_TARGET.
704         (parse_executable): Add obsolescence check for DATA.
705         * resolve.c (resolve_branch): Handle ST_LABEL_DO_TARGET.
706         * symbol.c (gfc_define_st_label, gfc_reference_st_label):
707         Add obsolescence diagnostics.
708         * trans-stmt.c (gfc_trans_label_assign): Handle ST_LABEL_DO_TARGET.
710 2012-08-14  Tobias Burnus  <burnus@net-b.de>
712         PR fortran/54234
713         * check.c (gfc_check_cmplx): Add -Wconversion warning
714         when converting higher-precision REAL to default-precision
715         CMPLX without kind= parameter.
717 2012-08-12  Tobias Burnus  <burnus@net-b.de>
719         PR fortran/54221
720         * trans-decl.c (gfc_finish_var_decl, build_function_decl):
721         Fix setting private module vars/procs as TREE_PUBLIC(...) = 0.
723 2012-08-09  Tobias Burnus  <burnus@net-b.de>
725         PR fortran/54199
726         * intrinsic.c (gfc_warn_intrinsic_shadow): Better warning
727         for internal procedures.
729 2012-08-06  Janus Weil  <janus@gcc.gnu.org>
731         PR fortran/35831
732         * interface.c (check_result_characteristics): New function, which checks
733         the characteristics of function results.
734         (gfc_compare_interfaces,gfc_check_typebound_override): Call it.
736 2012-08-02  Thomas König  <tkoenig@gcc.gnu.org>
738          PR fortran/54033
739          * scanner.c (add_path_to_list):  New argument warn.  Don't
740          warn if it is true.
741          (gfc_add_include_path):  Warn if directory is missing.
742          (gfc_add_intrinsic_modules_path):  Do not warn if directory
743          is missing.
744          * optinons.c (gfc_handle_option):  Do not add directory
745          for intrinsic modules to normal include path.
747 2012-08-03  Mikael Morin  <mikael@gcc.gnu.org>
749         PR fortran/54166
750         * trans-array.c (set_loop_bounds): Access specinfo using spec_dim.
752 2012-08-02  Mikael Morin  <mikael@gcc.gnu.org>
754         PR fortran/48820
755         * trans-array.c (gfc_conv_ss_startstride): Set the intrinsic
756         result's lower and upper bounds according to the rank.
757         (set_loop_bounds): Set the loop upper bound in the intrinsic case.
759 2012-08-02  Mikael Morin  <mikael@gcc.gnu.org>
761         * trans-array.c (set_loop_bounds): Allow non-array-section to be
762         chosen using the stride and lower bound criteria.
764 2012-08-02  Mikael Morin  <mikael@gcc.gnu.org>
766         * trans-array.c (set_loop_bounds): Remove useless dimension check.
767         Don't update loopspec if it would loose the wanted stride criterion.
769 2012-08-02  Mikael Morin  <mikael@gcc.gnu.org>
771         * trans-array.h (gfc_conv_descriptor_rank): New prototype.
772         * trans-array.c (gfc_conv_descriptor_rank): New function moved and
773         renamed ...
774         * trans-intrinsic.c (get_rank_from_desc): ... from this one.
775         (gfc_conv_intrinsic_rank, gfc_conv_intrinsic_bound,
776         gfc_conv_associated): Also rename function calls.
778 2012-08-02  Mikael Morin  <mikael@gcc.gnu.org>
780         * iresolve.c (resolve_bound, gfc_resolve_shape):
781         Don't set the shape for assumed rank arrays.
782         * simplify.c (gfc_simplify_shape): Don't try to simplify if the
783         argument is assumed rank.
785 2012-08-02  Mikael Morin  <mikael@gcc.gnu.org>
787         * array.c (gfc_copy_array_ref): Don't copy the offset field.
788         * expr.c (find_array_section): Ignore the offset field.
789         * trans-expr.c (gfc_find_interface_mapping_to_ref): Don't apply
790         any interface mapping to the offset field.
791         * gfortran.h (struct gfc_array_ref): Remove the offset field.
793 2012-08-02  Janus Weil  <janus@gcc.gnu.org>
795         PR fortran/54147
796         * resolve.c (check_proc_interface): New routine for PROCEDURE interface
797         checks.
798         (resolve_procedure_interface,resolve_typebound_procedure,
799         resolve_fl_derived0): Call it.
801 2012-08-01  Thomas König  <tkoenig@gcc.gnu.org>
803         PR fortran/54033
804         * scanner.c (add_path_to_list): Emit warning if an error occurs
805         for an include path, if it is not present or if it is not a
806         directory.  Do not add the path in these cases.
808 2012-07-31  Janus Weil  <janus@gcc.gnu.org>
810         PR fortran/42418
811         * decl.c (match_procedure_interface): Move some checks to
812         'resolve_procedure_interface'. Set flavor if appropriate.
813         * expr.c (gfc_check_pointer_assign): Cleanup of 'gfc_is_intrinsic'.
814         * intrinsic.c (gfc_is_intrinsic): Additional checks for attributes which
815         identify a procedure as being non-intrinsic.
816         * resolve.c (resolve_procedure_interface): Checks moved here from
817         'match_procedure_interface'. Minor cleanup.
818         (resolve_formal_arglist,resolve_symbol): Cleanup of
819         'resolve_procedure_interface'
820         (resolve_actual_arglist,is_external_proc): Cleanup of
821         'gfc_is_intrinsic'.
823 2012-07-31  Janus Weil  <janus@gcc.gnu.org>
825         PR fortran/54134
826         * dependency.c (gfc_dep_compare_expr): Check if arguments are NULL.
828 2012-07-31  Tobias Burnus  <burnus@net-b.de>
830         * interface.c (gfc_procedure_use): Return gfc_try instead of void.
831         * gfortran.h (gfc_procedure_use): Update prototype.
832         * resolve.c (gfc_iso_c_func_interface): Allow noninteroperable
833         procedures for c_funloc for TS29113.
834         * (gfc_iso_c_sub_interface): Ditto for c_f_procpointer. Add
835         diagnostic for c_ptr vs. c_funptr for c_f_(proc)pointer.
837 2012-07-30  Janus Weil  <janus@gcc.gnu.org>
839         PR fortran/51081
840         * gfortran.h (gfc_resolve_intrinsic): Add prototype.
841         * expr.c (gfc_check_pointer_assign): Set INTRINSIC attribute if needed.
842         Check for invalid intrinsics.
843         * primary.c (gfc_match_rvalue): Check for intrinsics came too early.
844         Set procedure flavor if appropriate.
845         * resolve.c (resolve_intrinsic): Renamed to gfc_resolve_intrinsic.
846         (resolve_procedure_interface,resolve_procedure_expression,
847         resolve_function,resolve_fl_derived0,resolve_symbol): Ditto.
849 2012-07-26  Mikael Morin  <mikael@gcc.gnu.org>
851         PR fortran/44354
852         * trans-array.c (gfc_trans_array_constructor_value):
853         Evaluate the iteration bounds before the inner variable shadows
854         the outer.
856 2012-07-26  Mikael Morin  <mikael@gcc.gnu.org>
858         PR fortran/44354
859         * array.c (sought_symbol): New variable.
860         (expr_is_sought_symbol_ref, find_symbol_in_expr): New functions.
861         (resolve_array_list): Check for references to the induction
862         variable in the iteration bounds and issue a diagnostic if some
863         are found.
865 2012-07-26  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
866             Tobias Burnus  <burnus@net-b.de>
868         * module.c (mio_array_spec): Don't read as->lower for
869         assumed-rank arrays.
871 2012-07-25  Tobias Burnus  <burnus@net-b.de>
873         * trans-types.c (gfc_real16_is_float128): Fix spelling
874         in a comment.
875         * trans.h (struct gfc_array_info): Ditto.
876         * gfortran.h (gfc_expr): Ditto.
877         * simplify.c (gfc_count): Ditto.
878         * trans-expr.c (gfc_copy_class_to_class,
879         conv_parent_component_references,
880         gfc_trans_pointer_assignment): Ditto.
881         * expr.c (check_pointer_assign): Fix diagnostic spelling.
882         * interface.c (compare_parameter): Ditto.
883         * parse.c (use_modules, parse_associate): Ditto.
884         * decl.c (match_char_length): Fix spelling of the
885         an function argument.
887 2012-07-21  Tobias Burnus  <burnus@net-b.de>
889         * iso-c-binding.def (C_PTRDIFF_T): New TS29113 parameter.
890         * intrinsic.texi (ISO_C_BINDING): Document it.
892 2012-07-21  Tobias Burnus  <burnus@net-b.de>
894         PR fortran/48820
895         * trans-intrinsic.c (gfc_conv_intrinsic_bound): Support
896         lbound/ubound with dim= for assumed-rank arrays.
897         * array.c (gfc_set_array_spec): Reject coarrays with
898         assumed shape.
899         * decl.c (merge_array_spec): Ditto. Return gfc_try.
900         (match_attr_spec, match_attr_spec): Update call.
902 2012-07-21  Tobias Burnus  <burnus@net-b.de>
904         * resolve.c (resolve_formal_arglist): Put variable
905         declaration before the first assignment.
907 2012-07-21  Tobias Burnus  <burnus@net-b.de>
909         * trans-expr.c (gfc_conv_derived_to_class): Fix argument passed
910         to class_array_data_assign.
912 2012-07-20  Tobias Burnus  <burnus@net-b.de>
914         * decl.c (gfc_verify_c_interop_param): Allow assumed-shape
915         with -std=f2008ts.
917 2012-07-20  Tobias Burnus  <burnus@net-b.de>
919         PR fortran/48820
920         * array.c (match_array_element_spec, gfc_match_array_spec,
921         spec_size, gfc_array_dimen_size): Add support for
922         assumed-rank arrays.
923         * check.c (dim_rank_check): Ditto.
924         * class.c (gfc_add_component_ref): Ditto.
925         (gfc_build_class_symbol): Regard assumed-rank arrays
926         as having GFC_MAX_DIMENSIONS. And build extra class
927         container for a scalar pointer class.
928         * decl.c (merge_array_spec): Add assert.
929         * dump-parse-tree.c (show_array_spec): Add support for
930         assumed-rank arrays.
931         * expr.c (gfc_is_simply_contiguous): Ditto.
932         * gfortran.h (array_type): Ditto.
933         (gfc_array_spec, gfc_expr): Add comment to "rank" field.
934         * interface.c (compare_type_rank, argument_rank_mismatch,
935         compare_parameter, gfc_procedure_use): Ditto.
936         (compare_actual_formal): Fix NULL() to optional-dummy
937         handling for polymorphic dummies.
938         * module.c (mio_typespec): Add support for
939         assumed-rank arrays.
940         * resolve.c (resolve_formal_arglist, resolve_actual_arglist,
941         resolve_elemental_actual, resolve_global_procedure,
942         expression_shape, resolve_variable, update_ppc_arglist,
943         check_typebound_baseobject, gfc_resolve_expr,
944         resolve_fl_var_and_proc, gfc_resolve_finalizers,
945         resolve_typebound_procedure, resolve_symbol): Ditto.
946         (assumed_type_expr_allowed): Remove static variable.
947         (actual_arg, first_actual_arg): New static variables.
948         * simplify.c (simplify_bound, gfc_simplify_range): Add
949         support for assumed-rank arrays.
950         * trans-array.c (gfc_conv_array_parameter): Ditto.
951         (gfc_get_descriptor_dimension): New function, which returns
952         the descriptor.
953         (gfc_conv_descriptor_dimension): Use it.
954         (gfc_conv_descriptor_stride_get, gfc_conv_array_parameter):
955         Handle GFC_ARRAY_ASSUMED_RANK_CONT and AS_ASSUMED_RANK.
956         * trans-array.h (gfc_get_descriptor_dimension): New prototype.
957         * trans-decl. (gfc_build_dummy_array_decl,
958         gfc_trans_deferred_vars, add_argument_checking): Add
959         support for assumed-rank arrays.
960         * trans-expr.c (gfc_conv_expr_present, gfc_conv_variable,
961         gfc_conv_procedure_call): Ditto.
962         (get_scalar_to_descriptor_type, class_array_data_assign,
963         conv_scalar_to_descriptor): New static functions.
964         (gfc_conv_derived_to_class, gfc_conv_class_to_class): Use
965         them.
966         * trans-intrinsic.c (get_rank_from_desc): New function.
967         (gfc_conv_intrinsic_rank, gfc_conv_associated): Use it.
968         * trans-types.c (gfc_array_descriptor_base_caf,
969         gfc_array_descriptor_base): Make space for scalar array.
970         (gfc_is_nodesc_array, gfc_is_nodesc_array,
971         gfc_build_array_type, gfc_get_array_descriptor_base): Add
972         support for assumed-rank arrays.
973         * trans.h (gfc_array_kind): Add GFC_ARRAY_ASSUMED_RANK and
974         GFC_ARRAY_ASSUMED_RANK_CONT.
976 2012-07-19  Tobias Burnus  <burnus@net-b.de>
978         * trans-expr.c (gfc_conv_procedure_call): Fix handling
979         of polymorphic arguments.
980         * resolve.c (resolve_formal_arglist): Ditto, mark polymorphic
981         assumed-shape arrays as such.
983 2012-07-19  Tobias Burnus  <burnus@net-b.de>
985         * interface.c (compare_parameter, compare_actual_formal): Fix
986         handling of polymorphic arguments.
988 2012-07-17  Janus Weil  <janus@gcc.gnu.org>
990         PR fortran/51081
991         * error.c (gfc_notify_std): Automatically print the relevant Fortran
992         standard version.
993         * arith.c (arith_power): Remove explicit standard reference string.
994         * array.c (gfc_match_array_spec, gfc_match_array_constructor): Ditto.
995         * check.c (gfc_check_a_p, gfc_check_besn, gfc_check_count,
996         gfc_check_float, gfc_check_fn_rc2008, gfc_check_iand,
997         gfc_check_ichar_iachar, gfc_check_ieor, gfc_check_index, gfc_check_ior,
998         gfc_check_lbound, gfc_check_len_lentrim, check_rest, gfc_check_min_max,
999         gfc_check_null, gfc_check_scan, gfc_check_selected_real_kind,
1000         gfc_check_shape, gfc_check_size, gfc_check_sngl, gfc_check_ubound,
1001         gfc_check_verify): Ditto.
1002         * data.c (gfc_assign_data_value): Ditto.
1003         * decl.c (var_element, char_len_param_value, match_char_length,
1004         gfc_verify_c_interop_param, match_pointer_init, variable_decl,
1005         gfc_match_decl_type_spec, gfc_match_import, match_attr_spec, 
1006         gfc_match_prefix, gfc_match_suffix, match_ppc_decl,
1007         match_procedure_in_interface, gfc_match_procedure,gfc_match_entry,
1008         gfc_match_subroutine, gfc_match_end, gfc_match_codimension,
1009         gfc_match_protected, gfc_match_value, gfc_match_volatile,
1010         gfc_match_asynchronous, gfc_match_modproc, gfc_get_type_attr_spec,
1011         gfc_match_enum, match_procedure_in_type): Ditto.
1012         * expr.c (check_elemental, gfc_check_assign, gfc_check_pointer_assign):
1013         Ditto.
1014         * interface.c (gfc_match_abstract_interface, check_interface0): Ditto.
1015         * intrinsic.c (gfc_intrinsic_func_interface): Ditto.
1016         * io.c (format_lex, resolve_tag_format, resolve_tag,
1017         compare_to_allowed_values, gfc_match_open, gfc_match_rewind,
1018         gfc_resolve_dt, gfc_match_wait): Ditto.
1019         * match.c (match_arithmetic_if, gfc_match_if, gfc_match_critical,
1020         gfc_match_do, match_exit_cycle, gfc_match_pause, gfc_match_stop,
1021         gfc_match_lock, sync_statement, gfc_match_assign, gfc_match_goto,
1022         gfc_match_allocate, gfc_match_return, gfc_match_st_function): Ditto.
1023         * module.c (gfc_match_use, gfc_use_module): Ditto.
1024         * parse.c (parse_derived_contains, parse_block_construct,
1025         parse_associate, parse_contained): Ditto.
1026         * primary.c (match_hollerith_constant, match_boz_constant,
1027         match_real_constant, match_sym_complex_part, match_arg_list_function,
1028         build_actual_constructor, gfc_convert_to_structure_constructor): Ditto.
1029         * resolve.c (resolve_formal_arglist, resolve_entries,
1030         resolve_common_blocks, resolve_actual_arglist, gfc_resolve_index_1,
1031         gfc_resolve_iterator_expr, resolve_ordinary_assign,
1032         resolve_fl_var_and_proc, resolve_fl_variable_derived,
1033         resolve_fl_procedure, resolve_fl_derived0, resolve_fl_derived,
1034         resolve_fl_namelist, resolve_symbol, resolve_fntype): Ditto.
1035         * symbol.c (check_conflict, conflict, gfc_add_is_bind_c,
1036         gfc_add_extension, gfc_check_symbol_typed): Ditto.
1038 2012-07-17  Tobias Burnus  <burnus@net-b.de>
1040         PR fortran/53985
1041         * decl.c (gfc_verify_c_interop_param): Make warning conditional
1042         on -Wc-binding-type works and improve the wording.
1044 2012-07-17  Tobias Burnus  <burnus@net-b.de>
1046         PR fortran/52101
1047         * decl.c (match_char_length): Extra argument, show obsolenscent
1048         warning only if *length is used after the typename.
1049         (variable_decl, gfc_match_char_spec): Update call
1051 2012-07-17  Tobias Burnus  <burnus@net-b.de>
1052             Steven G. Kargl  <kargl@gcc.gnu.org>
1054         PR fortran/49265
1055         * decl.c (match_procedure_in_interface): Support "::" for
1056         Fortran 2008 and later.
1058 2012-07-16  Thomas König  <tkoenig@gcc.gnu.org>
1060         PR fortran/53824
1061         * resolve.c (resolve_allocate_deallocate):  If both
1062         start indices are NULL, skip the test for equality.
1064 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
1066         * f95-lang.c: Include dumpfile.h instead of tree-dump.h.
1067         * Make-lang.in: Fix dependencies.
1069 2012-07-16  Janus Weil  <janus@gcc.gnu.org>
1071         PR fortran/53956
1072         * gfortran.h (gfc_copy_formal_args,gfc_copy_formal_args_ppc): Modified
1073         prototypes.
1074         * symbol.c (gfc_copy_formal_args): New argument 'if_src'. Copy if_source
1075         of dummy procedures.
1076         (gfc_copy_formal_args_ppc): Ditto.
1077         * resolve.c (resolve_procedure_interface): Pass IFSRC_DECL to
1078         gfc_copy_formal_args.
1079         (resolve_fl_derived0): Pass IFSRC_DECL to gfc_copy_formal_args_ppc.
1081 2012-07-12  Tobias Burnus  <burnus@net-b.de>
1083         * trans-expr.c (conv_isocbinding_procedure): Generate c_f_pointer code
1084         inline.
1086 2012-07-11  Steven Bosscher  <steven@gcc.gnu.org>
1088         * trans.c: Do not include defaults.h.
1089         * trans-intrinsic.c: Likewise.
1091 2012-07-08  Steven Bosscher  <steven@gcc.gnu.org>
1093         * gfortran.h: Do not include coretypes.h here.
1094         Make it an error to include this before coretypes.h
1095         * openmp.c: Include coretypes.h.
1096         * interface.c: Likewise.
1097         * intrinsic.c: Likewise.
1098         * symbol.c: Likewise.
1099         * class.c: Likewise.
1100         * decl.c: Likewise.
1101         * matchexp.c: Likewise.
1102         * dump-parse-tree.c: Likewise.
1103         * array.c: Likewise.
1104         * constructor.c: Likewise.
1105         * error.c: Likewise.
1106         * data.c: Likewise.
1107         * expr.c: Likewise.
1108         * module.c: Likewise.
1109         * scanner.c: Likewise.
1110         * bbt.c: Likewise.
1111         * io.c: Likewise.
1112         * frontend-passes.c: Likewise.
1113         * resolve.c: Likewise.
1114         * st.c: Likewise.
1115         * target-memory.c: Likewise.
1116         * match.c: Likewise.
1117         * arith.c: Likewise.
1118         * parse.c: Likewise.
1119         * check.c: Likewise.
1120         * dependency.c: Likewise.
1121         * primary.c: Likewise.
1122         * misc.c: Likewise.
1123         * simplify.c: Likewise.
1125 2012-07-05  Mikael Morin  <mikael@gcc.gnu.org>
1127         PR fortran/53732
1128         * trans-array.c (gfc_add_loop_ss_code): Disable self recursive calls
1129         handling nested loop(s) if the subscript flag is true.
1131 2012-07-05  Uros Bizjak  <ubizjak@gmail.com>
1133         PR fortran/53449
1134         * parse.c (gfc_parse_file): Initialize errors_before.
1136 2012-06-27  Janus Weil  <janus@gcc.gnu.org>
1138         PR fortran/41951
1139         PR fortran/49591
1140         * interface.c (check_new_interface): Rename, add 'loc' argument,
1141         make non-static.
1142         (gfc_add_interface): Rename 'check_new_interface'
1143         * gfortran.h (gfc_check_new_interface): Add prototype.
1144         * resolve.c (resolve_typebound_intrinsic_op): Add typebound operator
1145         targets to non-typebound operator list.
1147 2012-06-22  Janus Weil  <janus@gcc.gnu.org>
1149         PR fortran/47710
1150         PR fortran/53328
1151         * interface.c (count_types_test, generic_correspondence,
1152         gfc_compare_interfaces): Ignore PASS arguments.
1153         (check_interface1, compare_parameter): Pass NULL arguments to
1154         gfc_compare_interfaces.
1155         * gfortran.h (gfc_compare_interfaces): Modified prototype.
1156         * expr.c (gfc_check_pointer_assign): Pass NULL arguments to
1157         gfc_compare_interfaces.
1158         * resolve.c (resolve_structure_cons): Ditto.
1159         (check_generic_tbp_ambiguity): Determine PASS arguments and pass them
1160         to gfc_compare_interfaces.
1162 2012-06-21  Janne Blomqvist  <jb@gcc.gnu.org>
1164         PR fortran/39654
1165         * iresolve.c (gfc_resolve_ftell): Fix result kind and use new
1166         library function.
1168 2012-06-18  Tobias Burnus  <burnus@net-b.de>
1170         * intrinsic.h (gfc_resolve_rank): New prototype.
1171         * intrinsic.c (add_functions): Use gfc_resolve_rank.
1172         * iresolve.c (add_functions): New function.
1173         * trans-intrinsic.c (gfc_conv_intrinsic_rank): New function.
1174         (gfc_conv_intrinsic_function): Call it.
1176 2012-06-18  Tobias Burnus  <burnus@net-b.de>
1178         PR fortran/53692
1179         * trans-array.c (set_loop_bounds): Don't scalarize via absent
1180         optional arrays.
1181         * resolve.c (resolve_elemental_actual): Don't stop resolving after printing
1182         a warning.
1184 2012-06-18  Tobias Burnus  <burnus@net-b.de>
1186         PR fortran/53526
1187         * trans-intrinsic.c (conv_intrinsic_move_alloc): Handle coarrays.
1189 2012-06-18  Tobias Burnus  <burnus@net-b.de>
1191         PR fortran/53526
1192         * check.c (gfc_check_move_alloc): Reject coindexed actual arguments
1193         and those with different corank.
1195 2012-06-17  Tobias Burnus  <burnus@net-b.de>
1197         PR fortran/53691
1198         PR fortran/53685
1199         * check.c (gfc_calculate_transfer_sizes): Return if
1200         SIZE= is not constant or source-size cannot be determined.
1202 2012-06-16  Tobias Burnus  <burnus@net-b.de>
1204         PR fortran/53642
1205         PR fortran/45170
1206         * frontend-passes.c (optimize_assignment): Don't remove RHS's
1207         trim when assigning to a deferred-length string.
1208         * trans-expr.c (gfc_trans_assignment_1): Ensure that the RHS string
1209         length is evaluated before the deferred-length LHS is reallocated.
1211 2012-06-13  Tobias Burnus  <burnus@net-b.de>
1213         PR fortran/53643
1214         * trans-decl.c (init_intent_out_dt): Fix for polymorphic arrays.
1215         * trans-array.c (structure_alloc_comps): Don't loop for
1216         scalar coarrays.
1218 2012-06-13  Tobias Burnus  <burnus@net-b.de>
1220         PR fortran/53597
1221         * decl.c (match_attr_spec): Only mark module variables
1222         as SAVE_IMPLICIT for Fortran 2008 and later.
1224 2012-06-08  Janus Weil  <janus@gcc.gnu.org>
1226         PR fortran/52552
1227         * match.c (gfc_match_allocate): Modify order of checks. Change wording
1228         of error message. Remove FIXME note.
1229         * resolve.c (resolve_allocate_expr): Add a comment.
1231 2012-06-07  Thomas König  <tkoenig@gcc.gnu.org>
1233         PR fortran/52861
1234         * frontend-passes.c (optimize_assignment):  Don't set the
1235         length of an empty string for deferred-length character
1236         variables.
1238 2012-06-07  Thomas König  <tkoenig@gcc.gnu.org>
1240         PR fortran/52861
1241         * frontend-passes.c (empty_string):  Add prototype.
1242         (optimize_assignment):  Set the length of an empty string
1243         constant to zero.
1245 2012-06-04  Tobias Burnus  <burnus@net-b.de>
1247         PR fortran/50619
1248         * resolve.c (build_default_init_expr): Don't initialize
1249         ASSOCIATE names.
1251 2012-06-03  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
1252             Tobias Burnus  <burnus@net-b.de>
1254         PR fortran/48831
1255         * gfortran.h (gfc_check_init_expr): Add prototype declaration
1256         of function.
1257         * check.c (kind_check): Change if condition to use
1258         to gfc_check_init_expr.
1259         * expr.c (check_init_expr): Remove forward declaration
1260         and static keyword. Change name in gfc_check_init_expr.
1261         (scalarize_intrinsic_call, check_init_expr_arguments,
1262         check_inquiry, check_conversion, gfc_reduce_init_expr): Update
1263         call to gfc_check_init_expr.
1265 2012-05-31  Steven Bosscher  <steven@gcc.gnu.org>
1267         * trans-common.c: Do not include output.h.
1268         * trans-decl.c: Likewise.
1270 2012-05-31  Tobias Burnus  <burnus@net-b.de>
1272         PR fortran/53521
1273         * trans.c (gfc_deallocate_scalar_with_status): Properly
1274         handle the case size == 0.
1276 2012-05-30  Tobias Burnus  <burnus@net-b.de>
1278         PR c/53502
1279         * decl.c (match_attr_spec): Remove "typedef".
1281 2012-05-30  Tobias Burnus  <burnus@net-b.de>
1283         * decl.c: Fix comment typos.
1284         * expr.c: Ditto.
1285         * frontend-passes.c: Ditto.
1286         * match.c: Ditto.
1287         * resolve.c: Ditto.
1288         * trans-array.c: Ditto.
1289         * trans-common.c: Ditto.
1290         * trans-intrinsic.c: Ditto.
1291         * trans-types.c: Ditto.
1293 2012-05-23  Tobias Burnus  <burnus@net-b.de>
1295         PR fortran/51055
1296         PR fortran/45170
1297         * match.c (gfc_match_allocate): Set length_from_typespec
1298         for characters.
1299         * resolve.c (resolve_charlen): If set, don't check whether
1300         the len is a specification expression.
1302 2012-05-22  Tobias Burnus  <burnus@net-b.de>
1304         PR fortran/53389
1305         * trans-array.c (gfc_add_loop_ss_code): Don't evaluate expression, if
1306         ss->is_alloc_lhs is set.
1308 2012-05-22  Dodji Seketeli  <dodji@redhat.com>
1310         PR c++/53322
1311         * f95-lang.c (gfc_init_builtin_functions): Remove the unused
1312         typedef builtin_type.
1314 2012-05-14  Janne Blomqvist  <jb@gcc.gnu.org>
1316         PR fortran/52428
1317         * gfortran.texi: Update _gfortran_set_options documentation.
1318         * invoke.texi: Remove runtime behavior description of
1319         -fno-range-check.
1320         * trans-decl.c (create_main_function): Don't pass the range-check
1321         setting to the library.
1323 2012-05-14  Tobias Burnus  <burnus@net-b.de>
1325         PR fortran/49110
1326         PR fortran/51055
1327         PR fortran/53329
1328         * trans-expr.c (gfc_trans_assignment_1): Fix allocation
1329         handling for assignment of function results to allocatable
1330         deferred-length strings.
1331         * trans-decl.c (gfc_create_string_length): For deferred-length
1332         module variables, include module name in the assembler name.
1333         (gfc_get_symbol_decl): Don't override the assembler name.
1335 2012-05-14  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1337         PR 53063
1338         * options.c (gfc_handle_option): Call lang-specific generated function.
1340 2012-05-13  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
1341             Tobias Burnus  <burnus@net-b.de>
1343         PR fortran/52158
1344         PR fortran/45170
1345         PR fortran/49430
1346         * resolve.c (resolve_fl_derived0): Deferred character length 
1347         procedure components are supported.
1348         * trans-expr.c (gfc_conv_procedure_call): Handle TBP with 
1349         deferred-length results.
1350         (gfc_string_to_single_character): Add a new check to prevent
1351         NULL read.
1352         (gfc_conv_procedure_call): Remove unuseful checks on 
1353         symbol's attributes. Add new checks to prevent NULL read on
1354         string length. 
1356 2012-05-12  Tobias Burnus  <burnus@net-b.de>
1358         PR fortran/49110
1359         PR fortran/52843
1360         * resolve.c (resolve_fl_procedure): Don't regard
1361         character(len=:) as character(*) in the diagnostic.
1363 2012-05-11  Thomas Koenig  <tkoenig@gcc.gnu.org>
1365         PR fortran/52537
1366         * frontend-passes.c (optimize_op):  Change
1367         old-style comparison operators to new-style, simplify
1368         switch as a result.
1369         (empty_string):  New function.
1370         (get_len_trim_call):  New function.
1371         (optimize_comparison):  If comparing to an empty string,
1372         use comparison of len_trim to zero.
1373         Use new-style comparison operators only.
1374         (optimize_trim):  Use get_len_trim_call.
1376 2012-05-11  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1378         PR 53063
1379         * options.c: Include diagnostics.h instead of
1380         diagnostics-core.h.
1381         (set_Wall): Do not see warn_unused here.
1382         (gfc_handle_option): Set it here using handle_generated_option.
1384 2012-05-08  Jan Hubicka  <jh@suse.cz>
1386         * trans-common.c (create_common): Do not fake TREE_ASM_WRITTEN.
1387         * trans-decl.c (gfc_finish_cray_pointee): Likewise.
1389 2012-05-07  Tobias Burnus  <burnus@net-b.de>
1391         PR fortran/53255
1392         * resolve.c (resolve_typebound_static): Fix handling
1393         of overridden specific to generic operator.
1395 2012-05-06  Tobias Burnus  <burnus@net-b.de>
1397         PR fortran/41587
1398         * decl.c (build_struct): Don't ignore FAILED status.
1400 2012-05-05  Paul Thomas  <pault@gcc.gnu.org>
1402         PR fortran/41600
1403         * trans-array.c (build_array_ref): New static function.
1404         (gfc_conv_array_ref, gfc_get_dataptr_offset): Call it.
1405         * trans-expr.c (gfc_get_vptr_from_expr): New function.
1406         (gfc_conv_derived_to_class): Add a new argument for a caller
1407         supplied vptr and use it if it is not NULL.
1408         (gfc_conv_procedure_call): Add NULL to call to above.
1409         symbol.c (gfc_is_associate_pointer): Return true if symbol is
1410         a class object.
1411         * trans-stmt.c (trans_associate_var): Handle class associate-
1412         names.
1413         * expr.c (gfc_get_variable_expr): Supply the array-spec if
1414         possible.
1415         * trans-types.c (gfc_typenode_for_spec): Set GFC_CLASS_TYPE_P
1416         for class types.
1417         * trans.h : Add prototypes for gfc_get_vptr_from_expr and
1418         gfc_conv_derived_to_class. Define GFC_CLASS_TYPE_P.
1419         * resolve.c (resolve_variable): For class arrays, ensure that
1420         the target expression has all the necessary _data references.
1421         (resolve_assoc_var): Throw a "not yet implemented" error for
1422         class array selectors that need a temporary.
1423         * match.c (copy_ts_from_selector_to_associate,
1424         select_derived_set_tmp, select_class_set_tmp): New functions.
1425         (select_type_set_tmp): Call one of last two new functions.
1426         (gfc_match_select_type): Copy_ts_from_selector_to_associate is
1427         called if associate-name is typed.
1429         PR fortran/53191
1430         * resolve.c (resolve_ref): C614 applied to class expressions.
1432 2012-05-05  Janne Blomqvist  <jb@gcc.gnu.org>
1434         PR fortran/49010
1435         PR fortran/24518
1436         * intrinsic.texi (MOD, MODULO): Mention sign and magnitude of result.
1437         * simplify.c (gfc_simplify_mod): Use mpfr_fmod.
1438         (gfc_simplify_modulo): Likewise, use copysign to fix the result if
1439         zero.
1440         * trans-intrinsic.c (gfc_conv_intrinsic_mod): Remove fallback as
1441         builtin_fmod is always available. For modulo, call copysign to fix
1442         the result when signed zeros are enabled.
1444 2012-05-05  Janne Blomqvist  <jb@gcc.gnu.org>
1446         * gfortran.texi (GFORTRAN_TMPDIR): Rename to TMPDIR, explain
1447         algorithm for choosing temp directory.
1449 2012-05-04  Tobias Burnus  <burnus@net-b.de>
1451         PR fortran/53175
1452         * resolve.c (resolve_variable): Set public_used
1453         if a private module variable is used in a (public)
1454         specification expression.
1455         * trans-decl.c (gfc_finish_var_decl): Mark those
1456         TREE_PUBLIC.
1458 2012-05-04  Tobias Burnus  <burnus@net-b.de>
1460         PR fortran/53111
1461         * resolve.c (resolve_fl_derived): Fix -std=f95
1462         diagnostic for generic vs. DT names.
1464 2012-05-03  Tobias Burnus  <burnus@net-b.de>
1466         PR fortran/52864
1467         * interface.c (compare_parameter_intent): Remove.
1468         (check_intents): Remove call, handle CLASS pointer.
1469         (compare_actual_formal): Handle CLASS pointer.
1471 2012-04-30  Jan Hubicka  <jh@suse.cz>
1473         * f95-lang.c (gfc_finish): Update comments.
1475 2012-04-29  Thomas Koenig  <tkoenig@gcc.gnu.org>
1477         PR fortran/53148
1478         * frontend-passes.c (create_var):  If the statement has a label,
1479         put the label around the block.
1481 2012-04-25  Tobias Burnus  <burnus@net-b.de>
1483         PR fortran/52196
1484         * lang.opt (Wrealloc-lhs, Wrealloc-lhs-all): New flags.
1485         * gfortran.h (gfc_option_t): Add them.
1486         * options.c (gfc_init_options, gfc_post_options,
1487         gfc_handle_option): Handle them.
1488         * invoke.texi: Document them.
1489         * trans-expr.c (realloc_lhs_warning): New function.
1490         (gfc_trans_arrayfunc_assign,
1491         alloc_scalar_allocatable_for_assignment,
1492         gfc_trans_assignment_1): Use it.
1494 2012-04-18  Steven Bosscher  <steven@gcc.gnu.org>
1496         * trans-decl.c (gfc_trans_entry_master_switch): Build SWITCH_EXPR
1497         with NULL_TREE type instead of void_type_node.
1498         * trans-io.c (io_result): Likewise.
1499         * trans-stmt.c (gfc_trans_integer_select,
1500         gfc_trans_character_select): Likewise.
1502 2012-04-16  Tobias Burnus  <burnus@net-b.de>
1504         PR fortran/52864
1505         * expr.c (gfc_check_vardef_context): Fix assignment check for
1506         pointer components.
1508 2012-04-16  Janus Weil  <janus@gcc.gnu.org>
1510         PR fortran/52968
1511         * class.c (gfc_build_class_symbol): Make sure the 'f2k_derived'
1512         namespace is present.
1514 2012-04-15  Janus Weil  <janus@gcc.gnu.org>
1516         PR fortran/51082
1517         * trans-expr.c (gfc_conv_expr_reference): Check if the expression is a
1518         simple function call (or a more involved PPC reference).
1520 2012-04-15  Tobias Burnus  <burnus@net-b.de>
1522         PR fortran/52916
1523         PR fortran/40973
1524         * gfortran.h (symbol_attribute): Add public_used.
1525         * interface.c (check_sym_interfaces, check_uop_interfaces,
1526         gfc_check_interfaces): Set it.
1527         * resolve.c (resolve_typebound_procedure): Ditto.
1528         * trans-decl.c (build_function_decl): Use it.
1530 2012-04-11  Tobias Burnus  <burnus@net-b.de>
1532         PR fortran/52729
1533         * resolve.c (resolve_symbol): Fix searching for parent NS decl.
1535 2012-04-08  Tobias Burnus  <burnus@net-b.de>
1537         PR fortran/52751
1538         * trans-decl.c (gfc_finish_var_decl): Don't set TREE_PUBLIC
1539         for PRIVATE module variables without C-binding label.
1541         PR fortran/40973
1542         * trans-decl.c (build_function_decl): Ditto for procedures.
1544 2012-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
1546         PR fortran/52893
1547         * frontend-passes.c:  Keep track of wether we are in an implicit
1548         DO loop; do not do function elimination if we are.
1550 2012-04-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
1552         PR fortran/52668
1553         * module.c:  Only mark symbols as use_only if they have been
1554         imported via an only list.
1556 2012-03-28  Paul Thomas  <pault@gcc.gnu.org>
1557         Tobias Burnus  <burnus@gcc.gnu.org>
1559         PR fortran/52652
1560         * match.c (gfc_match_allocate, gfc_match_deallocate): Change
1561         "not.. or" to "neither.. nor".
1562         * parse.c (decode_specification_statement): Correct error in
1563         chpice of matching function for "allocatable".
1565 2012-03-23  Janne Blomqvist  <jb@gcc.gnu.org>
1567         * gfortran.h (GFC_MAX_LINE): Remove unused macro.
1569 2012-03-19  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1571         PR fortran/52559
1572         * error.c (gfc_widechar_display_length): Consider tabs as
1573         one character wide, as they're displayed as spaces.
1574         (show_locus): Move tab handling to...
1575         (print_wide_char_into_buffer): ... here.
1577 2012-03-17  Tobias Burnus  <burnus@net-b.de>
1579         PR fortran/52585
1580         * trans-intrinsic.c (gfc_conv_associated): Fix handling of
1581         procpointer dummy arguments.
1583 2012-03-16  Janne Blomqvist  <jb@gcc.gnu.org>
1585         * trans-intrinsic.c (build_round_expr): Don't use BUILT_IN_IROUND
1586         for __float128.
1588 2012-03-15  Janne Blomqvist  <jb@gcc.gnu.org>
1590         * f95-lang.c (gfc_init_builtin_functions): Initialize
1591         BUILT_IN_IROUND.
1592         * mathbuiltins.def: Add IROUND.
1593         * trans-intrinsic.c (build_round_expr): Use BUILT_IN_IROUND if
1594         type size matches.
1595         (gfc_build_intrinsic_lib_fndecls): Build iround functions.
1597 2012-03-12  Richard Guenther  <rguenther@suse.de>
1599         * f95-lang.c (builtin_type_for_size): Use gfc_type_for_size.
1601 2012-03-12  Tobias Burnus  <burnus@net-b.de>
1603         PR fortran/52542
1604         * decl.c (match_procedure_decl): If the interface
1605         is bind(C), the procedure is as well.
1607 2012-03-10  Steven Bosscher  <steven@gcc.gnu.org>
1609         * convert.c (convert): Fold BOOLEAN_TYPE types to the proper variant.
1611 2012-03-09  Steven Bosscher  <steven@gcc.gnu.org>
1613         * Make-lang.in (convert.o): Depend on convert.h.
1614         * convert.c: Header and comment cleanups.
1615         (gfc_thruthvalue_conversion): Rename static function
1616         to truthvalue_conversion.  Do not use 'internal_error' from here,
1617         use 'gcc_unreachable' instead.
1618         (convert): Do not use 'error' for conversions to void, use
1619         'gcc_unreachable' instead.  Likewise for conversions to non-scalar
1620         types.  Do not hanlde ENUMERAL_TYPE, the front end never creates them.
1621         Clean up #if 0 code.
1623 2012-03-08  Tobias Burnus  <burnus@net-b.de>
1625         PR fortran/52469
1626         * trans-types.c (gfc_get_function_type): Handle backend_decl
1627         of a procedure pointer.
1629 2012-03-06  Steven Bosscher  <steven@gcc.gnu.org>
1631         * f95-lang.c (yyerror, yylex): Remove.
1632         (clear_binding_stack): Remove, fold into its only user.
1633         (LANG_HOOKS_PRINT_IDENTIFIER): Do not re-define.
1634         (ridpointers): Remove.
1635         (gfc_eh_initialized_p): Make static.
1636         (gfc_truthvalue_conversion): Move to convert.c.
1637         (gfc_be_parse_file): Clear binding level stack when done.
1638         (gfc_print_identifier): Remove.
1639         (pushlevel): Remove ignored 'ignore' argument.  Update all callers.
1640         (poplevel): Remove unused 'reverse' argument.  Update all callers.
1641         (ggc_p): Remove.
1642         (gfc_builtin_function): Make static. Do not attempt to make RTL for
1643         builtin functions.
1644         * convert.c (gfc_truthvalue_conversion): Moved here from f95-lang.c,
1645         and made static.
1646         * trans.h (pushlevel, poplevel): Adjust prototypes.
1647         (gfc_truthvalue_conversion, gfc_builtin_function): Remove prototypes.
1648         * trans-openmp.c: Update calls to pushlevel and poplevel.
1649         * trans.c: Likewise.
1650         * trans-decl.c: Likewise.
1652 2012-03-04  Mikael Morin  <mikael@gcc.gnu.org>
1654         PR fortran/50981
1655         * gfortran.h (gfc_is_class_container_ref): New prototype.
1656         * class.c (gfc_is_class_container_ref): New function.
1657         * trans-expr.c (gfc_conv_procedure_call): Add a "_data" component
1658         reference to polymorphic actual arguments.
1660 2012-03-04  Mikael Morin  <mikael@gcc.gnu.org>
1662         PR fortran/50981
1663         * trans-expr.c (gfc_conv_procedure_call): Save se->ss's value. 
1664         Handle the case of unallocated arrays passed to elemental procedures.
1666 2012-03-04  Mikael Morin  <mikael@gcc.gnu.org>
1668         * trans.h (struct gfc_ss_info): Move can_be_null_ref component from
1669         the data::scalar subcomponent to the toplevel.
1670         * trans-expr.c (gfc_conv_expr): Update component reference.
1671         * trans-array.c (gfc_add_loop_ss_code): Ditto.
1672         (gfc_walk_elemental_function_args): Ditto.  Move the conditional setting
1673         the field out of the scalar-only block.
1675 2012-03-04  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1677         PR fortran/36160
1678         * error.c (gfc_widechar_display_length, gfc_wide_display_length):
1679         New functions.
1680         (print_wide_char_into_buffer): Return length written.
1681         (show_locus): Fix locus displayed when wide characters are present.
1683 2012-03-04  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1685         * module.c (gfc_use_module): Improve error message some more.
1687 2012-03-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1689         PR fortran/52313
1690         * module.c (gfc_use_module): Improve error messages.
1692 2012-03-03  Tobias Burnus  <burnus@net-b.de>
1694         PR fortran/48820
1695         * resolve.c (resolve_actual_arglist): Properly reset
1696         assumed_type_expr_allowed.
1698 2012-03-03  Tobias Burnus  <burnus@net-b.de>
1700         * lang.opt (Wc-binding-type): New flag.
1701         * options.c (gfc_init_options, gfc_handle_option): Handle it.
1702         * invoke.texi (Wc-binding-type): Document it.
1703         * gfortran.h (gfc_option_t): Add warn_c_binding_type.
1704         * decl.c (verify_bind_c_sym): Handle -Wc-binding-type.
1705         * symbol.c (gfc_set_default_type, verify_bind_c_derived_type):
1706         Ditto.
1708 2012-03-03  Tobias Burnus  <burnus@net-b.de>
1710         PR fortran/48820
1711         * decl.c (gfc_match_decl_type_spec): Support type(*).
1712         (gfc_verify_c_interop): Allow type(*).
1713         * dump-parse-tree.c (show_typespec): Handle type(*).
1714         * expr.c (gfc_copy_expr): Ditto.
1715         * interface.c (compare_type_rank, compare_parameter,
1716         compare_actual_formal, gfc_procedure_use): Ditto.
1717         * libgfortran.h (bt): Add BT_ASSUMED.
1718         * misc.c (gfc_basic_typename, gfc_typename): Handle type(*).
1719         * module.c (bt_types): Ditto.
1720         * resolve.c (assumed_type_expr_allowed): New static variable.
1721         (resolve_actual_arglist, resolve_variable, resolve_symbol):
1722         Handle type(*). 
1723         * trans-expr.c (gfc_conv_procedure_call): Ditto.
1724         * trans-types.c (gfc_typenode_for_spec, gfc_get_dtype): Ditto.
1726 2012-03-02  Tobias Burnus  <burnus@net-b.de>
1728         PR fortran/52325
1729         * primary.c (gfc_match_varspec): Add missing ;.
1731 2012-03-02  Tobias Burnus  <burnus@net-b.de>
1733         PR fortran/52325
1734         * primary.c (gfc_match_varspec): Add diagnostic for % with
1735         nonderived types.
1737 2012-03-02  Tobias Burnus  <burnus@net-b.de>
1739         PR fortran/52270
1740         * expr.c (gfc_check_vardef_context): Fix check for
1741         intent-in polymorphic pointer .
1742         * interface.c (compare_parameter): Allow passing TYPE to
1743         intent-in polymorphic pointer.
1745 2012-03-02  Tobias Burnus  <burnus@net-b.de>
1747         PR fortran/52452
1748         * resolve.c (resolve_intrinsic): Don't search for a
1749         function if we know that it is a subroutine.
1751 2012-02-29  Paul Thomas  <pault@gcc.gnu.org>
1753         PR fortran/52386
1754         * trans-expr.c (fcncall_realloc_result): Dereference the
1755         descriptor if needed.
1757 2012-02-22  Tobias Burnus  <burnus@net-b.de>
1759         PR fortran/52335
1760         * io.c (gfc_match_open): Remove bogus F2003 DELIM= check.
1762 2012-02-18  Tobias Burnus  <burnus@net-b.de>
1764         PR fortran/52295
1765         * interface.c (check_interface0): Internal procs in
1766         generic interfaces are allowed in Fortran 2008.
1768 2012-02-17  Tobias Burnus  <burnus@net-b.de>
1769             Roland Stigge  <stigge@antcom.de>
1771         PR translation/52273
1772         * interface.c (compare_actual_formal): Fix typo "at at".
1774 2012-02-17  Tobias Burnus  <burnus@net-b.de>
1776         * gfortran.texi (Q exponent-letter): Fix grammar.
1778 2012-02-17  Tobias Burnus  <burnus@net-b.de>
1780         * gfortran.texi (Status): Fix typos.
1781         * invoke.texi (ffixed-form, fstack-arrays): Spell Fortran with
1782         a majuscule.
1784 2012-02-17  Tobias Burnus  <burnus@net-b.de>
1785             Roland Stigge  <stigge@antcom.de>
1787         PR translation/52232
1788         PR translation/52234
1789         PR translation/52245
1790         PR translation/52246
1791         PR translation/52262
1792         PR translation/52273
1793         * io.c (gfc_match_open): Fix typo.
1794         * interface.c (compare_actual_formal): Ditto.
1795         * lang.opt (freal-4-real-8, freal-4-real-16, freal-8-real-16): Ditto.
1796         * match.c (alloc_opt_list, gfc_match_nullify): Ditto.
1797         * check.c (gfc_check_associated, gfc_check_null): Ditto.
1799 2012-02-12  Mikael Morin  <mikael@gcc.gnu.org>
1801         PR fortran/50981
1802         * trans-stmt.c (gfc_get_proc_ifc_for_call): New function.
1803         (gfc_trans_call): Use gfc_get_proc_ifc_for_call.
1805 2012-02-12  Mikael Morin  <mikael@gcc.gnu.org>
1807         * trans-array.c (gfc_walk_elemental_function_args,
1808         gfc_walk_function_expr): Move call to gfc_get_proc_ifc_for_expr out
1809         of gfc_walk_elemental_function_args.
1810         * trans-stmt.c (gfc_trans_call): Ditto.
1811         * trans-array.h (gfc_get_proc_ifc_for_expr): New prototype.
1812         (gfc_walk_elemental_function_args): Update prototype.
1814 2012-02-12  Mikael Morin  <mikael@gcc.gnu.org>
1816         * trans-array.c (gfc_get_proc_ifc_for_expr): New function.
1817         (gfc_walk_elemental_function_args): Move code to
1818         gfc_get_proc_ifc_for_expr and call it.
1820 2012-02-08  Tobias Burnus  <burnus@net-b.de>
1822         PR fortran/52151
1823         * trans-expr.c (fcncall_realloc_result): Set also the stride.
1825 2012-02-07  Tobias Burnus  <burnus@net-b.de>
1827         PR fortran/51514
1828         * trans-expr.c (gfc_conv_procedure_call): Add _data component
1829         for calls of scalar CLASS actuals to TYPE dummies.
1831 2012-02-05  Thomas König  <tkoenig@gcc.gnu.org>
1833         PR fortran/48847
1834         * trans-decl.c:  Warn about unused dummy procedure arguments
1835         if -Wunused-dummy-argument is specified.  Suppress middle-end
1836         warnings about procedure arguments.
1838 2012-02-05  Paul Thomas  <pault@gcc.gnu.org>
1840         * trans-array.c (gfc_array_allocate): Zero memory for all class
1841         array allocations.
1842         * trans-stmt.c (gfc_trans_allocate): Ditto for class scalars.
1844         PR fortran/52102
1845         * trans-stmt.c (gfc_trans_allocate): Before correcting a class
1846         array reference, ensure that 'dataref' points to the _data
1847         component that is followed by the array reference..
1849 2012-02-02  Mikael Morin  <mikael@gcc.gnu.org>
1851         PR fortran/41587
1852         PR fortran/46356
1853         PR fortran/51754
1854         PR fortran/50981
1855         * class.c (insert_component_ref, class_data_ref_missing,
1856         gfc_fix_class_refs): New functions.
1857         * gfortran.h (gfc_fix_class_refs): New prototype.
1858         * trans-expr.c (gfc_conv_expr): Remove special case handling and call
1859         gfc_fix_class_refs instead.
1861 2012-02-02  Paul Thomas  <pault@gcc.gnu.org>
1863         PR fortran/52012
1864         * trans-expr.c (fcncall_realloc_result): If variable shape is
1865         correct, retain the bounds, whatever they are.
1867 2012-02-02  Tobias Burnus  <burnus@net-b.de>
1869         PR fortran/52093
1870         * simplify.c (gfc_simplify_size): Handle INTRINSIC_PARENTHESES.
1872 2012-02-01  Thomas König  <tkoenig@gcc.gnu.org>
1874         PR fortran/51958
1875         * frontend-passes.c (convert_elseif):  New function.
1876         (optimize_namespace):  Call it.
1878 2012-02-01  Tobias Burnus  <burnus@net-b.de>
1880         PR fortran/52024
1881         * module.c (MOD_VERSION): Bump.
1882         (mio_typebound_proc): Read/write is_operator from/to the
1883         .mod file.
1885 2012-02-01  Tobias Burnus  <burnus@net-b.de>
1887         PR fortran/52059
1888         * trans-expr.c (gfc_conv_procedure_call): Add array ref
1889         only to variables.
1891 2012-01-31  Tobias Burnus  <burnus@net-b.de>
1893         PR fortran/52024
1894         * gfortran.h (gfc_tbp_generic): Store whether the
1895         generic is an operator.
1896         * decl.c (gfc_match_generic): Set that flag.
1897         * resolve.c (check_generic_tbp_ambiguity): Use it in the
1898         gfc_compare_interfaces check.
1900 2012-01-31  Tobias Burnus  <burnus@net-b.de>
1902         PR fortran/52029
1903         * class.c (gfc_find_derived_vtab): Mark _copy function as pure.
1905 2012-01-31  Tobias Burnus  <burnus@net-b.de>
1907         PR fortran/52013
1908         * class.c (get_unique_hashed_string): Adapt trim length.
1909         (gfc_build_class_symbol) Encode also corank in the container name.
1911 2012-01-31  Paul Thomas  <pault@gcc.gnu.org>
1913         PR fortran/52012
1914         * trans-expr.c (fcncall_realloc_result): Correct calculation of
1915         result offset.
1917 2012-01-29  Janne Blomqvist  <jb@gcc.gnu.org>
1919         * module.c (pointer_info): Make true_name and module pointers
1920         rather than arrays, order pointers before other fields.
1921         (free_pi_tree): free true_name and module as well.
1922         (mio_read_string): Rename to read_string.
1923         (mio_write_string): Remove.
1924         (load_commons): Use read_string.
1925         (read_module): Use read_string rather than mio_internal_string.
1926         (write_blank_common): Call write_atom directly.
1927         (write_symbol): Likewise.
1929 2012-01-29  Tobias Burnus  <burnus@net-b.de>
1931         PR fortran/41600
1932         * expr.c (gfc_default_initializer): Convert the values if
1933         the type does not match.
1935 2012-01-29  Tobias Burnus  <burnus@net-b.de>
1937         PR fortran/51972
1938         * trans-array.c (structure_alloc_comps): Fix assignment of
1939         polymorphic components (polymorphic deep copying).
1941 2012-01-29  Janne Blomqvist  <jb@gcc.gnu.org>
1943         PR fortran/51808
1944         * decl.c (set_binding_label): Make binding_label argument const.
1945         (curr_binding_label): Constify.
1946         * gfortran.h (gfc_symbol): Constify binding_label.
1947         (gfc_common_head): Likewise.
1948         (get_iso_c_sym): Likewise.
1949         * match.c (gfc_match_name_C): Constify buffer argument.
1950         * match.h (gfc_match_name_C): Likewise.
1951         * resolve.c (set_name_and_label): Constify binding_label argument.
1952         (gfc_iso_c_sub_interface): Constify binding_label variable.
1953         * symbol.c (get_iso_c_sym): Constify binding_label argument.
1955 2012-01-29  Janne Blomqvist  <jb@gcc.gnu.org>
1957         PR fortran/51808
1958         * decl.c (set_binding_label): Move prototype from match.h to here.
1959         (curr_binding_label): Make a pointer rather than static array.
1960         (build_sym): Check sym->binding_label pointer rather than array,
1961         update set_binding_label call, handle curr_binding_label changes.
1962         (set_binding_label): Handle new curr_binding_label, dest_label
1963         double ptr, and sym->binding_label.
1964         (verify_bind_c_sym): Handle sym->binding_label being a pointer.
1965         (set_verify_bind_c_sym): Check sym->binding_label pointer rather
1966         than array, update set_binding_label call.
1967         (gfc_match_bind_c_stmt): Handle curr_binding_label change.
1968         (match_procedure_decl): Update set_binding_label call.
1969         (gfc_match_bind_c): Change binding_label to pointer, update
1970         gfc_match_name_C call.
1971         * gfortran.h (GFC_MAX_BINDING_LABEL_LEN): Remove macro.
1972         (gfc_symbol): Make binding_label a pointer.
1973         (gfc_common_head): Likewise.
1974         * match.c (gfc_match_name_C): Heap allocate bind(C) name.
1975         * match.h (gfc_match_name_C): Change prototype argument.
1976         (set_binding_label): Move prototype to decl.c.
1977         * module.c (struct pointer_info): Make binding_label a pointer.
1978         (free_pi_tree): Free unused binding_label.
1979         (mio_read_string): New function.
1980         (mio_write_string): New function.
1981         (load_commons): Redo reading of binding_label.
1982         (read_module): Likewise.
1983         (write_common_0): Change to write empty string instead of name if
1984         no binding_label.
1985         (write_blank_common): Write empty string for binding label.
1986         (write_symbol): Change to write empty string instead of name if no
1987         binding_label.
1988         * resolve.c (gfc_iso_c_func_interface): Don't set binding_label.
1989         (set_name_and_label): Make binding_label double pointer, use
1990         asprintf.
1991         (gfc_iso_c_sub_interface): Make binding_label a pointer.
1992         (resolve_bind_c_comms): Handle cases if
1993         gfc_common_head->binding_label is NULL.
1994         (gfc_verify_binding_labels): sym->binding_label is a pointer.
1995         * symbol.c (gfc_new_symbol): Rely on XCNEW zero init for
1996         binding_label.
1997         (gen_special_c_interop_ptr): Don't set binding label.
1998         (generate_isocbinding_symbol): Insert binding_label into symbol
1999         table.
2000         (get_iso_c_sym): Use pointer assignment instead of strcpy.
2001         * trans-common.c (gfc_sym_mangled_common_id): Handle
2002         com->binding_label being a pointer.
2003         * trans-decl.c (gfc_sym_mangled_identifier): Handle
2004         sym->binding_label being a pointer.
2005         (gfc_sym_mangled_function_id): Likewise.
2007 2012-01-29  Tobias Burnus  <burnus@net-b.de>
2009         PR fortran/52038
2010         * resolve.c (symbol_as): Remove unused, accidentally
2011         added function.
2013 2012-01-28  Tobias Burnus  <burnus@net-b.de>
2015         PR fortran/51972
2016         * trans-stmt.c (gfc_trans_allocate): Properly check whether
2017         we have a BT_CLASS which needs to be memset.
2019 2012-01-27  Tobias Burnus  <burnus@net-b.de>
2021         PR fortran/52022
2022         * trans-expr.c (gfc_conv_procedure_call): Fix passing
2023         of functions, which return allocatables.
2025 2012-01-27  Tobias Burnus  <burnus@net-b.de>
2027         PR fortran/52016
2028         * resolve.c (resolve_formal_arglist): Fix elemental
2029         constraint checks for polymorphic dummies also for
2030         pointers.
2032 2012-01-27  Tobias Burnus  <burnus@net-b.de>
2034         PR fortran/51970
2035         PR fortran/51977
2036         * primary.c (gfc_match_varspec. gfc_match_rvalue): Set
2037         handle array spec for BT_CLASS.
2038         * expr.c (gfc_get_variable_expr, gfc_lval_expr_from_sym)
2039         * frontend-passes.c (create_var): Ditto.
2040         * resolve.c (resolve_actual_arglist, resolve_assoc_var): Ditto.
2041         * trans-decl.c (gfc_trans_deferred_vars): Use class_pointer
2042         instead of attr.pointer.
2043         (gfc_generate_function_code): Use CLASS_DATA (sym) for BT_CLASS.
2044         * trans-intrinsic.c (conv_intrinsic_move_alloc): Move assert.
2045         * trans-stmt.c (trans_associate_var): Ask for the descriptor.
2047 2012-01-27  Tobias Burnus  <burnus@net-b.de>
2049         PR fortran/51953
2050         * match.c (gfc_match_allocate): Allow more than allocate
2051         object with SOURCE=.
2053 2012-01-27  Tobias Burnus  <burnus@net-b.de>
2055         PR fortran/52016
2056         * resolve.c (resolve_formal_arglist): Fix elemental
2057         constraint checks for polymorphic dummies.
2059 2012-01-27  Paul Thomas  <pault@gcc.gnu.org>
2060             Tobias Burnus <burnus@gcc.gnu.org>
2062         PR fortran/48705
2063         PR fortran/51870
2064         PR fortran/51943
2065         PR fortran/51946
2066         * trans-array.c (gfc_array_init_size): Add two extra arguments
2067         to convey the dynamic element size of a calls object and to
2068         return the number of elements that have been allocated.
2069         (gfc_array_allocate): Add the same arguments and use them to
2070         call gfc_array_init_size.  Before the allocation dereference
2071         the data pointer, if necessary. Set the allocated array to zero
2072         if the class element size or expr3 are non-null.
2073         * trans-expr.c (gfc_conv_class_to_class): Give this function
2074         global scope.
2075         (get_class_array_ref): New function.
2076         (gfc_copy_class_to_class): New function.
2077         * trans-array.h : Update prototype for gfc_array_allocate.
2078         * trans-stmt.c (gfc_trans_allocate): For non-variable class
2079         STATUS expressions extract the class object and the dynamic
2080         element size. Use the latter to call gfc_array_allocate and
2081         the former for setting the vptr and, via
2082         gfc_copy_class_to_clasfc_cs, to copy to the allocated data.
2083         * trans.h : Prototypes for gfc_get_class_array_ref,
2084         gfc_copy_class_to_class and gfc_conv_class_to_class.
2086 2012-01-25  Tobias Burnus  <burnus@net-b.de>
2088         * resolve.c (symbol_as): Check also for attr.class_ok.
2090 2012-01-25  Tobias Burnus  <burnus@net-b.de>
2092         PR fortran/51995
2093         * class.c (gfc_build_class_symbol): Fix invalid freeing
2094         issue with fclass->f2k_derived.
2096 2012-01-25  Tobias Burnus  <burnus@net-b.de>
2098         PR fortran/51995
2099         * class.c (gfc_build_class_symbol): Ensure that
2100         fclass->f2k_derived is set.
2102 2012-01-25  Tobias Burnus  <burnus@net-b.de>
2104         PR fortran/51966
2105         * resolve.c (resolve_structure_cons): Only create an
2106         array constructors for nonscalars.
2108 2012-01-23  Tobias Burnus  <burnus@net-b.de>
2110         PR fortran/51948
2111         * check.c (variable_check): Fix checking for
2112          variables and deeply nested BLOCKs.
2114 2012-01-21  Tobias Burnus  <burnus@net-b.de>
2115             Steven G. Kargl  <kargl@gcc.gnu.org>
2117         PR fortran/50556
2118         * symbol.c (check_conflict): namelist-group-name cannot have the SAVE
2119         attribute.
2121 2012-01-21  Tobias Burnus  <burnus@net-b.de>
2123         PR fortran/51913
2124         * interface.c (compare_parameter): Fix CLASS comparison.
2126 2012-01-20  Tobias Burnus  <burnus@net-b.de>
2127             Janus Weil  <janus@gcc.gnu.org>
2129         PR fortran/51056
2130         * module.c (load_needed, read_module): Don't mark __vtab etc.
2131         as use_only.
2133 2012-01-19  Tobias Burnus  <burnus@net-b.de>
2135         PR fortran/51904
2136         * expr.c (gfc_build_intrinsic_call): Also set the symtree.
2138 2012-01-18  Paul Thomas  <pault@gcc.gnu.org>
2140         PR fortran/51634
2141         * trans-expr.c (gfc_conv_procedure_call): Deallocate allocatable
2142         components of temporary class arguments.
2144 2012-01-17  Tobias Burnus  <burnus@net-b.de>
2145             Janne Blomqvist  <jb@gcc.gnu.org>
2147         PR fortran/51869
2148         * trans-expr.c (alloc_scalar_allocatable_for_assignment): Nullify
2149         LHS after allocation, if it has allocatable components.
2150         * f95-lang.c (gfc_init_builtin_functions): Add BUILT_IN_CALLOC.
2152 2012-01-16  Mikael Morin  <mikael@gcc.gnu.org>
2153             Tobias Burnus  <burnus@net-b.de>
2155         PR fortran/50981
2156         * trans-array.c (gfc_walk_elemental_function_args): Fix
2157         passing of deallocated allocatables/pointers as absent argument. 
2159 2012-01-16  Tobias Burnus  <burnus@net-b.de>
2161         PR fortran/51809
2162         * class.c (gfc_find_derived_vtab): Mark __vtab and
2163         __def_init as FL_VARIABLE not as FL_PARAMETER.
2164         * expr.c (gfc_simplify_expr): Remove special
2165         handling of __vtab.
2166         * resolve.c (resolve_values): Ditto.
2167         * trans-decl.c (gfc_get_symbol_decl): Mark __vtab
2168         and __def_init as TREE_READONLY.
2170 2012-01-16  Zydrunas Gimbutas  <gimbutas@cims.nyu.edu>
2171         Andreas Kloeckner  <kloeckner@cims.nyu.edu>
2172         Steven G. Kargl  <kargl@gcc.gnu.org>
2174         PR fortran/48426
2175         * gfortran.h (gfc_option_t): Add members flag_*_kind to store kind.
2176         * lang.opt: Add options -freal-4-real-8, -freal-4-real-10,
2177         -freal-4-real-16, -freal-8-real-4, -freal-8-real-10, -freal-8-real-16
2178         and -finteger-4-integer-8. User-desired type conversion information.
2179         * decl.c (gfc_match_old_kind_spec,kind_expr): Type conversions
2180         in declaration parsing.
2181         * trans-types.c (gfc_init_kinds): User-specified type conversion
2182         checked for current backend.
2183         * primary.c (match_integer_constant,match_real_constant): Implement
2184         type conversion in constant parsing.
2185         * options.c (gfc_init_options,gfc_handle_option): Translate input
2186         options to flags in internal options data structure.
2187         * invoke.texi: Document new options.  Re-order options in Options
2188         summary section.
2190 2012-01-16  Paul Thomas  <pault@gcc.gnu.org>
2192         * trans-array.c (gfc_trans_create_temp_array): In the case of a
2193         class array temporary, detect a null 'eltype' on entry and use 
2194         'initial' to provde the class reference and so, through the
2195         vtable, the element size for the dynamic type.
2196         * trans-stmt.c (gfc_conv_elemental_dependencies): For class
2197         expressions, set 'eltype' to null and pass the values via the
2198         'initial' expression.
2200 2012-01-14  Tobias Burnus  <burnus@net-b.de>
2202         PR fortran/51800
2203         * resolve.c (build_default_init_expr): Also initialize
2204         nonconstant-length strings with -finit-character=<n>.
2206 2011-01-14  Tobias Burnus  <burnus@net-b.de>
2208         PR fortran/51816
2209         * module.c (read_module): Don't make nonexisting
2210         intrinsic operators as found.
2211         (rename_list_remove_duplicate): New function.
2212         (gfc_use_modules): Use it.
2214 2012-01-13  Paul Thomas  <pault@gcc.gnu.org>
2216         PR fortran/48351
2217         * trans-array.c (structure_alloc_comps): Suppress interative
2218         call to self, when current component is deallocated using
2219         gfc_trans_dealloc_allocated.
2220         * class.c (gfc_build_class_symbol): Copy the 'alloc_comp'
2221         attribute from the declared type to the class structure.
2223 2012-01-13  Tobias Burnus  <burnus@net-b.de>
2225         PR fortran/51842
2226         * fortran/trans-types.c (gfc_init_kinds): Use PTRDIFF_TYPE
2227         instead of a signed int of size POINTER_SIZE for
2228         gfc_index_integer_kind.
2230 2012-01-12  Tobias Burnus  <burnus@net-b.de>
2232         PR fortran/36755
2233         * intrinsic.texi (CHMOD): Extend a bit and remove statement
2234         that /bin/chmod is called.
2236 2012-01-10  Gerald Pfeifer  <gerald@pfeifer.com>
2238         * gfortran.texi (Fortran 2003 Status): Fix grammar.
2240 2012-01-10  Tobias Burnus  <burnus@net-b.de>
2242         PR fortran/51652
2243         * resolve.c (resolve_allocate_expr): For non-deferred char lengths,
2244         check whether type-spec matches declaration.
2246 2012-01-10  Tobias Burnus  <burnus@net-b.de>
2248         * resolve.c (resolve_ordinary_assign): Improve error wording.
2250 2012-01-09  Paul Thomas  <pault@gcc.gnu.org>
2252         PR fortran/51791
2253         * interface.c (matching_typebound_op): Drill down through
2254         possible parentheses to obtain base expression. Do not test for
2255         'class_ok' but, instead for the class structure components.
2256         * resolve.c (resolve_ordinary_assign): Extend error message for
2257         polymorphic assignment to advise checking for specific
2258         subroutine.
2260         PR fortran/51792
2261         * resolve.c (resolve_typebound_function): Restore 'static' to
2262         declaration.
2264 2012-01-09  Mikael Morin  <mikael@gcc.gnu.org>
2266         PR fortran/51758
2267         * trans-array.c (gfc_walk_elemental_function_args):
2268         Skip over NULL() actual arguments.
2270 2012-01-09  Tobias Burnus  <burnus@net-b.de>
2272         * gfortran.texi: Bump copyright year.
2273         (Fortran 2003 Status): Update polymorphism item, add
2274         item for generic interface with DT name.
2276 2012-01-09  Tobias Burnus  <burnus@net-b.de>
2278         PR fortran/51578
2279         * gfortran.h (gfc_use_list):
2280         * match.h (gfc_use_module): Rename to ...
2281         (gfc_use_modules): ... this.
2282         * module.c (use_locus, specified_nonint, specified_int): Remove
2283         global variable.
2284         (module_name): Change type to const char*, used with gfc_get_string.
2285         (module_list): New global variable.
2286         (free_rename): Free argument not global var.
2287         (gfc_match_use): Save match to module_list.
2288         (load_generic_interfaces, read_module): Don't free symtree.
2289         (write_dt_extensions, gfc_dump_module): Fix module-name I/O due to the
2290         type change of module_name.
2291         (write_symbol0, write_generic): Optimize due to the type change.
2292         (import_iso_c_binding_module, use_iso_fortran_env_module): Use
2293         locus of rename->where.
2294         (gfc_use_module): Take module_list as argument.
2295         (gfc_use_modules): New function.
2296         (gfc_module_init_2, gfc_module_done_2): Init module_list, rename_list.
2297         * parse.c (last_was_use_stmt): New global variable.
2298         (use_modules): New function.
2299         (decode_specification_statement, decode_statement): Move USE match up
2300         and call use_modules.
2301         (next_free, next_fixed): Call use_modules.
2302         (accept_statement): Don't call gfc_module_use.
2304 2012-01-06  Tobias Burnus <burnus@net-b.de>
2306         * trans-openmp.c (gfc_omp_clause_dtor, gfc_trans_omp_array_reduction):
2307         Update call to gfc_trans_dealloc_allocated.
2308         * trans.c (gfc_allocate_using_malloc): Fix spacing.
2309         (gfc_allocate_allocatable): For gfc_allocate_using_lib, jump to
2310         label_finish when an error occurs.
2311         (gfc_deallocate_with_status): Call caf_deregister for -fcoarray=lib.
2312         * trans.h (gfc_allocate_allocatable, gfc_deallocate_with_status):
2313         Update prototype.
2314         (gfor_fndecl_caf_deregister): New tree symbol.
2315         * trans-expr.c (gfc_conv_procedure_call): Update
2316         gfc_deallocate_with_status and gfc_trans_dealloc_allocated calls.
2317         * trans-array.c (gfc_array_allocate, gfc_trans_dealloc_allocated,
2318         structure_alloc_comps, gfc_trans_deferred_array): Ditto.
2319         (gfc_array_deallocate): Handle coarrays with -fcoarray=lib.
2320         * trans-array.h (gfc_array_deallocate, gfc_array_allocate,
2321         gfc_trans_dealloc_allocated): Update prototypes.
2322         * trans-stmt.c (gfc_trans_sync): Fix indentation.
2323         (gfc_trans_allocate): Fix errmsg padding and label handling.
2324         (gfc_trans_deallocate): Ditto and handle -fcoarray=lib.
2325         * expr.c (gfc_is_coarray): Fix algorithm for BT_CLASS.
2326         * libgfortran.h (GFC_STAT_STOPPED_IMAGE): Use large value
2327         to avoid other stats accidentally matching this one.
2328         * trans-decl.c (gfor_fndecl_caf_deregister): New global var.
2329         (gfc_build_builtin_function_decls): Fix prototype decl of caf_register
2330         and add decl for caf_deregister.
2331         (gfc_trans_deferred_vars): Handle CAF vars with -fcoarrays=lib.
2332         * trans-intrinsic.c (conv_intrinsic_move_alloc): Update call to
2333         gfc_deallocate_with_status.
2335 2012-01-05  Paul Thomas  <pault@gcc.gnu.org>
2337         PR fortran/PR48946
2338         * resolve.c (resolve_typebound_static): If the typebound
2339         procedure is 'deferred' try to find the correct specific
2340         procedure in the derived type operator space itself.
2342 2012-01-04  Mikael Morin  <mikael@gcc.gnu.org>
2344         PR fortran/50981
2345         * trans-array.h (gfc_walk_elemental_function_args): New argument.
2346         * trans-intrinsic.c (gfc_walk_intrinsic_function): Update call.
2347         * trans-stmt.c (gfc_trans_call): Ditto.
2348         * trans-array.c (gfc_walk_function_expr): Ditto.
2349         (gfc_walk_elemental_function_args): Get the dummy argument list
2350         if possible.  Check that the dummy and the actual argument are both
2351         optional, and set can_be_null_ref accordingly.
2353 2012-01-04  Mikael Morin  <mikael@gcc.gnu.org>
2355         PR fortran/50981
2356         * trans.h (struct gfc_ss_info): New field data::scalar::can_be_null_ref
2357         * trans-array.c: If the reference can be NULL, save the reference
2358         instead of the value.
2359         * trans-expr.c (gfc_conv_expr): If we have saved a reference,
2360         dereference it.
2362 2012-01-04  Mikael Morin  <mikael@gcc.gnu.org>
2364         * trans-expr.c (gfc_conv_expr): Move address taking...
2365         (gfc_conv_expr_reference): ... here.
2367 2012-01-04  Thomas Koenig  <tkoenig@gcc.gnu.org>
2369         PR fortran/49693
2370         * trans-common.c (create_common): Update copyright years.  Mark
2371         variables as used to avoid warnings about unused variables in
2372         common blocks.
2374 2012-01-03  Hans-Peter Nilsson  <hp@axis.com>
2376         * gfortran.h (struct gfc_expr): Add missing "struct"
2377         qualifier for member base_expr.
2379 2012-01-02  Paul Thomas  <pault@gcc.gnu.org>
2381         PR fortran/51529
2382         * trans-array.c (gfc_array_allocate): Null allocated memory of
2383         newly allocted class arrays.
2385         PR fortran/46262
2386         PR fortran/46328
2387         PR fortran/51052
2388         * interface.c(build_compcall_for_operator): Add a type to the
2389         expression.
2390         * trans-expr.c (conv_base_obj_fcn_val): New function.
2391         (gfc_conv_procedure_call): Use base_expr to detect non-variable
2392         base objects and, ensuring that there is a temporary variable,
2393         build up the typebound call using conv_base_obj_fcn_val.
2394         (gfc_trans_class_assign): Pick out class procedure pointer
2395         assignments and do the assignment with no further prcessing.
2396         (gfc_trans_class_array_init_assign, gfc_trans_class_init_assign
2397         gfc_trans_class_assign): Move to top of file.
2398         * gfortran.h : Add 'base_expr' field to gfc_expr.
2399         * resolve.c (get_declared_from_expr): Add 'types' argument to
2400         switch checking of derived types on or off.
2401         (resolve_typebound_generic_call): Set the new argument.
2402         (resolve_typebound_function, resolve_typebound_subroutine):
2403         Set 'types' argument for get_declared_from_expr appropriately.
2404         Identify base expression, if not a variable, in the argument
2405         list of class valued calls. Assign it to the 'base_expr' field
2406         of the final expression. Strip away all references after the
2407         last class reference.
2409 2012-01-02  Tobias Burnus  <burnus@net-b.de>
2411         PR fortran/51682
2412         * trans-intrinsic.c (trans_this_image, trans_image_index,
2413         trans_num_images, conv_intrinsic_cobound): Fold_convert the
2414         caf_num_images/caf_this_images variables to the correct int kind.
2416 2012-01-01  Jakub Jelinek  <jakub@redhat.com>
2418         * gfortranspec.c (lang_specific_driver): Update copyright notice
2419         dates.
2421 Copyright (C) 2012 Free Software Foundation, Inc.
2423 Copying and distribution of this file, with or without modification,
2424 are permitted in any medium without royalty provided the copyright
2425 notice and this notice are preserved.