f95-lang.c (ATTR_NOTHROW_LEAF_MALLOC_LIST): New macro.
[official-gcc.git] / gcc / fortran / ChangeLog
blob74ea42aefec212337425aab40f61a02874d8a0bc
1 2012-11-12  Jan Hubicka  <jh@suse.cz>
3         * f95-lang.c (ATTR_NOTHROW_LEAF_MALLOC_LIST): New macro.
4         (gfc_define_builtin): Use set_call_expr_flags.
5         (gfc_init_builtin_functions): Update.
7 2012-11-12  Tobias Burnus  <burnus@net-b.de>
9         PR fortran/55272
10         * module.c (mio_array_spec): Correctly handle coarray
11         scalars.
13 2012-11-07  Tobias Schlüter  <tobi@gcc.gnu.org>
15         PR fortran/51727
16         * module.c (sorted_pointer_info): New.
17         (gfc_get_sorted_pointer_info): New.
18         (free_sorted_pointer_info_tree): New.
19         (compare_sorted_pointer_info): New.
20         (find_symbols_to_write): New.
21         (write_symbol1_recursion): New.
22         (write_symbol1): Collect symbols that need writing, output in order.
23         (write_generic): Traverse tree in order.
25 2012-11-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
27         PR c/53063
28         * options.c (set_Wall): Do not set warn_switch here.
30 2012-11-06  Janus Weil  <janus@gcc.gnu.org>
32         PR fortran/54917
33         * target-memory.c (gfc_target_expr_size,gfc_target_interpret_expr):
34         Handle BT_CLASS.
35         * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Add support for
36         polymorphic arguments.
38 2012-11-04  Janus Weil  <janus@gcc.gnu.org>
40         PR fortran/55199
41         * primary.c (gfc_match_varspec): Clear typespec if it cannot be
42         determined at this point.
44 2012-10-31  Janus Weil  <janus@gcc.gnu.org>
46         PR fortran/53718
47         * trans.h (GFC_DECL_PUSH_TOPLEVEL): Removed.
48         * trans-decl.c (gfc_get_symbol_decl,gfc_generate_function_code): Remove
49         GFC_DECL_PUSH_TOPLEVEL.
50         (build_function_decl): Do not push __copy procedure to toplevel.
52 2012-10-31  Tobias Burnus  <burnus@net-b.de>
54         PR fortran/55134
55         * trans-array.c (gfc_conv_array_parameter): Regard AS_DEFERRED as
56         array with descriptor.
58 2012-10-28  Tobias Burnus  <burnus@net-b.de>
60         PR fortran/54958
61         * gfortran.h (gfc_resolve_iterator_expr,
62         gfc_check_vardef_context): Update prototype.
63         * expr.c (gfc_check_vardef_context): Add own_scope
64         argument and honour it.
65         * resolve.c (gfc_resolve_iterator_expr): Add own_scope
66         argument and honour it.
67         (resolve_deallocate_expr, resolve_allocate_expr,
68         resolve_data_variables, resolve_transfer
69         resolve_lock_unlock, resolve_code): Update calls.
70         * array.c (resolve_array_list): Ditto.
71         * check.c (gfc_check_atomic_def, gfc_check_atomic_ref): Ditto.
72         * interface.c (compare_actual_formal): Ditto.
73         * intrinsic.c (check_arglist): Ditto.
74         * io.c (resolve_tag, gfc_resolve_dt, gfc_resolve_inquire): Ditto.
76 2012-10-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
78         * trans.c (gfc_allocate_allocatable):  Revert accidental
79         commit.
81 2012-10-24  Janus Weil  <janus@gcc.gnu.org>
83         PR fortran/55037
84         * trans-expr.c (gfc_conv_procedure_call): Move a piece of code and
85         remove an assert.
87 2012-10-21  Tobias Burnus  <burnus@net-b.de>
89         PR fortran/54725
90         * Make-lang.in (CFLAGS-cpp.o): Use TARGET_SYSTEM_ROOT_DEFINE.
91         * cpp.o (gfc_cpp_init_options): Use it for
92         setting gfc_cpp_option.sysroot.
94 2012-10-21  Thomas König  <tkoenig@gcc.gnu.org>
96         PR fortran/54465
97         * lang.opt (Wextra):  Add.
98         * invoke.texi:  Document that -Wc-binding-type, -Wconversion
99         and -Wline-truncation are implied by -Wall.  Document that
100         -Wcompare-reals is implied by -Wextra.  Document -Wextra.
101         * options.c (set_Wextra):  New function.
102         (gfc_handle_option):  Handle -Wextra.
104 2012-10-19  Janus Weil  <janus@gcc.gnu.org>
106         PR fortran/54224
107         * trans-expr.c (conv_function_val): Set TREE_USED.
109 2012-10-18  Tobias Burnus  <burnus@net-b.de>
111         PR fortran/54884
112         * resolve.c (specification_expr): Change to bool.
113         (resolve_formal_arglist, resolve_symbol): Set
114         specification_expr to true before resolving the array spec.
115         (resolve_variable, resolve_charlen, resolve_fl_variable):
116         Properly reset specification_expr.
117         (resolve_function): Set public_use when used in
118         a specification expr.
120 2012-10-16  Tobias Burnus  <burnus@net-b.de>
122         PR fortran/50981
123         PR fortran/54618
124         * trans.h (gfc_conv_derived_to_class, gfc_conv_class_to_class):
125         Update prototype.
126         * trans-stmt.c (trans_associate_var,gfc_trans_allocate): Update
127         calls to those functions.
128         * trans-expr.c (gfc_conv_derived_to_class, gfc_conv_class_to_class,
129         gfc_conv_expr_present): Handle absent polymorphic arguments.
130         (class_scalar_coarray_to_class): New function.
131         (gfc_conv_procedure_call): Update calls.
133 2012-10-12  Janus Weil  <janus@gcc.gnu.org>
135         PR fortran/40453
136         * interface.c (check_dummy_characteristics): Recursively check dummy
137         procedures.
139 2012-10-11  Janus Weil  <janus@gcc.gnu.org>
141         PR fortran/54784
142         * trans-stmt.c (gfc_trans_allocate): Correctly determine the reference
143         to the _data component for polymorphic allocation with SOURCE.
145 2012-10-06  Janus Weil  <janus@gcc.gnu.org>
147         PR fortran/54832
148         * resolve.c (resolve_fl_derived0): Correctly copy the 'class_ok'
149         attribute for proc-ptr components with RESULT variable.
151 2012-10-06  Janus Weil  <janus@gcc.gnu.org>
153         PR fortran/45521
154         * interface.c (generic_correspondence): Implement additional
155         distinguishability criteria of F08.
156         (compare_actual_formal): Reject data object as actual argument for
157         procedure formal argument.
159 2012-10-04  Tobias Burnus  <burnus@net-b.de>
161         * expr.c (scalarize_intrinsic_call): Plug memory leak.
162         * frontend-passes.c (gcc_assert): Extend assert.
163         * interface.c (gfc_compare_derived_types): Fix comparison.
164         (gfc_check_operator_interface): Move up to make this error
165         message reachable.
166         (get_sym_storage_size): Remove always-true checks.
167         * io.c (format_lex): Add comment.
168         (gfc_free_wait): Free memory.
169         * match.c (gfc_match_select_type): Ditto. 
170         * matchexpr.c (match_level_3): Ditto.
171         * primary.c (match_string_constant): Ditto.
172         (match_actual_arg): Check return value.
173         * resolve.c (gfc_resolve_substring_charlen,
174         resolve_typebound_generic_call, resolve_typebound_function,
175         resolve_typebound_subroutine): Free memory.
176         * trans-types.c (gfc_get_derived_type): Remove always-true check.
178 2012-10-02  Janus Weil  <janus@gcc.gnu.org>
180         PR fortran/54778
181         * interface.c (matching_typebound_op): Check for 'class_ok' attribute.
183 2012-09-30  Janus Weil  <janus@gcc.gnu.org>
185         PR fortran/54667
186         * intrinsic.texi (C_F_POINTER): Fix description.
187         * resolve.c (gfc_iso_c_sub_interface): Add a check for FPTR argument
188         of C_F_POINTER. Modify two error messages. Cleanup.
190 2012-09-24  Tobias Burnus  <burnus@net-b.de>
192         PR fortran/54618
193         PR fortran/54690
194         * trans-expr.c (gfc_conv_procedure_call): Fix INTENT(OUT)
195         handling for allocatable BT_CLASS.
197 2012-09-24  Lawrence Crowl  <crowl@google.com>
199         * trans-expr.c (gfc_conv_cst_int_power): Change to new double_int API.
200         * target-memory.c (gfc_interpret_logical): Likewise.
202 2012-09-23  Tobias Burnus  <burnus@net-b.de>
204         * parse.c (parse_derived): Don't set attr.alloc_comp
205         for pointer components with allocatable subcomps.
207         PR fortran/54599
208         * resolve.c (resolve_fl_namelist): Remove superfluous
209         NULL check.
210         * simplify.c (simplify_min_max): Remove unreachable code.
211         * trans-array.c (gfc_trans_create_temp_array): Change
212         a condition into an assert.
214         PR fortran/54618
215         * trans-expr.c (gfc_trans_class_init_assign): Guard
216         re-setting of the _data by gfc_conv_expr_present.
217         (gfc_conv_procedure_call): Fix INTENT(OUT) handling
218         for allocatable BT_CLASS.
220 2012-09-22  Thomas König  <tkoenig@gcc.gnu.org>
222         PR fortran/54599
223         * dependency.c (gfc_dep_compare_expr):  Clarify logic,
224         remove dead code.
226 2012-09-20  Tobias Burnus  <burnus@net-b.de>
228         PR fortran/54599
229         * cpp.c (print_line): Properly handle extern C.
231 2012-09-20  Martin Jambor  <mjambor@suse.cz>
233         * trans-decl.c (gfc_get_extern_function_decl): Push NULL cfun.  Do not
234         set and restore current_function_decl.
235         (gfc_init_coarray_decl): Do not set and restore current_function_decl.
237 2012-09-17  Tobias Burnus  <burnus@net-b.de>
239         PR fortran/54608
240         * simplify.c (gfc_simplify_scan, gfc_simplify_verify):
241         Fix handling of BACK=variable.
243 2012-09-17  Janus Weil  <janus@gcc.gnu.org>
245         PR fortran/54285
246         * expr.c (gfc_check_pointer_assign): Correctly handle procedure pointers
247         as function results.
248         * primary.c (gfc_match_varspec): Allow to call a PPC with proc-ptr
249         result.
251 2012-09-17  Tobias Burnus  <burnus@net-b.de>
253         PR fortran/54603
254         * trans-expr.c (gfc_trans_subcomponent_assign): Handle
255         proc-pointer components.
257 2012-09-17  Tobias Burnus  <burnus@net-b.de>
259         PR fortran/54599
260         * error.c (error_print): Move increment out of the assert.
261         * interface.c (gfc_compare_derived_types): Add assert.
262         (get_expr_storage_size): Remove always-true logical condition.
263         * resolve.c (resolve_allocate_expr): Fix looping logic.
264         * target-memory.c (gfc_target_expr_size): Add assert.
266 2012-09-16  Janus Weil  <janus@gcc.gnu.org>
268         PR fortran/54594
269         * resolve.c (get_checked_tb_operator_target): Add a reference to the
270         relevant quote from the F08 standard.
272 2012-09-16  Janus Weil  <janus@gcc.gnu.org>
274         PR fortran/54594
275         * interface.c (compare_type_rank): Handle CLASS arrays.
277 2012-09-16  Janus Weil  <janus@gcc.gnu.org>
279         PR fortran/54387
280         * expr.c (gfc_check_pointer_assign): Check for result of embracing
281         function.
283 2012-09-16  Tobias Burnus  <burnus@net-b.de>
285         * trans-decl.c (gfc_generate_function_code): Fix
286         gfc_option.coarray check.
287         * trans-stmt.c (compute_inner_temp_size): Fix handling
288         of gfc_option.rtcheck.
290 2012-09-16  Mikael Morin  <mikael@gcc.gnu.org>
292         * symbol.c (gfc_undo_symbols): Correctly undo namelists.
294 2012-09-15  Tobias Burnus  <burnus@net-b.de>
296         * trans-io.c (gfc_trans_transfer): Add an assert.
298 2012-09-15  Tobias Burnus  <burnus@net-b.de>
300         * arith.c (arith_power): Call gfc_free_expr in case of error.
301         * array.c (gfc_match_array_constructor): Initialize variable.
302         (gfc_resolve_character_array_constructor): Remove superfluous check.
303         (gfc_array_dimen_size): Add assert.
304         * check.c (numeric_check): Fix implicit typing.
305         * class.c (gfc_build_class_symbol): Add assert.
306         (finalize_component): Free memory.
307         * dump-parse-tree.c (show_namespace): Add assert.
308         * trans-io.c (transfer_namelist_element, transfer_expr): Avoid
309         memory leakage.
310         (gfc_trans_transfer): Add assert.
311         * trans.c (gfc_trans_runtime_check): Call va_end
313 2012-09-15  Tobias Burnus  <burnus@net-b.de>
315         * match.c (lock_unlock_statement, sync_statement): Fix potential
316         double freeing.
317         (sync_statement): Remove unreachable code.
318         * simplify.c (gfc_simplify_bessel_n2): Avoid double freeing.
319         (gfc_simplify_repeat): Remove bogus code.
320         * target-memory.h (gfc_target_encode_expr): Update prototype.
321         * target-memory.c (gfc_target_encode_expr, encode_array,
322         encode_derived): Return unsigned HOST_WIDE_INT.
323         (gfc_target_interpret_expr): Add assert.
324         (gfc_merge_initializers): Fix "== 0" check for mpz_t.
325         * symbol.c (gfc_get_typebound_proc): Add assert.
326         (gfc_merge_initializers): Remove unreachable check.
328 2012-09-13  Tobias Burnus  <burnus@net-b.de>
330         PR fortran/54556
331         * resolve.c (resolve_formal_arglist): Allow VALUE arguments
332         with implicit_pure.
333         (gfc_impure_variable): Don't check gfc_pure such that the
334         function also works for gfc_implicit_pure procedures.
336 2012-09-12  Tobias Burnus  <burnus@net-b.de>
338         PR fortran/54225
339         PR fortran/53306
340         * array.c (match_subscript, gfc_match_array_ref): Fix
341         diagnostic of coarray's '*'.
343 2012-09-07  Mikael Morin  <mikael@gcc.gnu.org>
345         PR fortran/54208
346         * simplify.c (simplify_bound_dim): Resolve array spec before
347         proceeding with simplification.
349 2012-09-06  Tobias Burnus  <burnus@net-b.de>
351         PR fortran/54463
352         * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Fix matmul
353         call to BLAS if the default-kind has been promoted.
355 2012-09-05  Tobias Burnus  <burnus@net-b.de>
357         PR fortran/54462
358         * symbol.c (gfc_undo_symbols): Avoid NULL pointer dereference.
360 2012-09-04  Janus Weil  <janus@gcc.gnu.org>
362         PR fortran/54435
363         PR fortran/54443
364         * match.c (gfc_match_select_type): Make sure to only access CLASS_DATA
365         for BT_CLASS.
367 2012-09-03  Tobias Burnus  <burnus@net-b.de>
369         PR fortran/54467
370         * class.c (gfc_find_derived_vtab): Fix disabling of _final
371         by continuing to generate normal type-bound procedures.
373 2012-09-03  Tobias Burnus  <burnus@net-b.de>
375         * class.c (gfc_find_derived_vtab): Disable ABI-breaking
376         generation of the "_final" subroutine for now.
378 2012-09-03  Tobias Burnus  <burnus@net-b.de>
380         * class.c (finalize_component): Fixes to the comment.
382 2012-09-03  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
383             Tobias Burnus  <burnus@net-b.de>
385         PR fortran/37336
386         * gfortran.h (symbol_attribute): Add artificial.
387         * module.c (mio_symbol_attribute): Handle attr.artificial
388         * class.c (gfc_build_class_symbol): Defer creation of the vtab
389         if the DT has finalizers, mark generated symbols as
390         attr.artificial.
391         (has_finalizer_component, finalize_component,
392         finalization_scalarizer, generate_finalization_wrapper):
393         New static functions.
394         (gfc_find_derived_vtab): Add _final component and call
395         generate_finalization_wrapper.
396         * dump-parse-tree.c (show_f2k_derived): Use resolved
397         proc_tree->n.sym rather than unresolved proc_sym.
398         (show_attr): Handle attr.artificial.
399         * resolve.c (gfc_resolve_finalizers): Ensure that the vtab exists.
400         (resolve_fl_derived): Resolve finalizers before
401         generating the vtab.
402         (resolve_symbol): Also allow assumed-rank arrays with CONTIGUOUS;
403         skip artificial symbols.
404         (resolve_fl_derived0): Skip artificial symbols.
406 2012-09-02  Tobias Burnus  <burnus@net-b.de>
408         PR fortran/54426
409         * symbol.c (find_common_symtree): New function.
410         (gfc_undo_symbols): Use it; free common_head if needed.
412 2012-08-28  Tobias Burnus  <burnus@net-b.de>
414         PR fortran/54389
415         * trans-decl.c (gfc_get_extern_function_decl,
416         build_function_decl): Don't mark impure elemental
417         functions as DECL_PURE_P and honour implicit_pure.
419 2012-08-28  Tobias Burnus  <burnus@net-b.de>
421         PR fortran/54382
422         * error.c (show_locus): Avoid out of bound access.
424 2012-08-28  Tobias Burnus  <burnus@net-b.de>
426         PR fortran/54384
427         * decl.c (match_data_constant): Add missing gfc_free_expr.
428         (top_val_list): Remove always-true condition.
429         * data.c (get_array_index, create_character_initializer):
430         Free temporary expressions.
431         (gfc_assign_data_value): Free expression when aborting.
433 2012-08-28  Tobias Burnus  <burnus@net-b.de>
435         PR fortran/54384
436         * symbol.c (gfc_copy_formal_args): Set also sym->formal_ns.
438 2012-08-27  Tobias Burnus  <burnus@net-b.de>
440         PR fortran/54384
441         * resolve.c (gfc_resolve_character_operator): Free temporary
442         variables.
443         * trans-expr.c (gfc_conv_statement_function): Ditto.
445 2012-08-27  Tobias Burnus  <burnus@net-b.de>
447         PR fortran/54384
448         * dependency.c (check_section_vs_section): Use gfc_free_expr
449         instead of free.
450         * trans-intrinsic.c (conv_generic_with_optional_char_arg): Use
451         gfc_free_symbol instead of free.
453 2012-08-27  Tobias Burnus  <burnus@net-b.de>
455         PR fortran/54384
456         * trans-expr.c (gfc_trans_arrayfunc_assign): Free se.ss
457         and loop.
459 2012-08-27  Tobias Burnus  <burnus@net-b.de>
461         PR fortran/41093
462         * gfortran.h (gfc_common_head): Add "int refs".
463         * match.c (gfc_match_common): Increment refs.
464         * resolve.c (resolve_symbol): Only increment formal_ns->refs
465         if formal_ns is not sym->ns.
466         * symbol.c (gfc_free_symbol): Only free formal_ns if
467         if formal_ns is not sym->ns. Free common_block if refs is one.
468         (gfc_release_symbol): Release formal_ns only if the
469         symbol is not ENTRY of a module.
470         * decl.c (get_proc_name): Don't increment gfc_current_ns->refs.
471         * parse.c (parse_interface): Incement proc_unit->refs++ for
472         proc-pointer result variables.
473         * module.c (mio_symbol): Don't increase sym->refs for its
474         use in sym->formal_ns->proc_name.
476 2012-08-27  Tobias Burnus  <burnus@net-b.de>
478         PR fortran/54370
479         * trans-stmt.c (gfc_trans_do_while): Don't change the logical
480         kind for negation of the condition.
482 2012-08-27  Tobias Burnus  <burnus@net-b.de>
484         * options.c (set_Wall): Don't set for -Wcompare-reals.
485         * invoke.texi (-Wall, -Wcompare-reals): -Wall no longer
486         implies -Wcompare-reals.
488 2012-08-24  Simon Baldwin  <simonb@google.com>
490         * lang.opt (-cpp=): Mark flag NoDWARFRecord.
492 2012-08-23  Tobias Burnus  <burnus@net-b.de>
494         PR fortran/54350
495         * trans-array.c (free_ss_info): Free data.array.subscript.
496         (gfc_free_ss): No longer free data.array.subscript.
497         (walk_coarray): New function, moved from trans-intrinsic.c
498         (gfc_conv_expr_descriptor): Walk array descriptor instead
499         of taking passed "ss".
500         (get_array_ctor_all_strlen, gfc_add_loop_ss_code,
501         gfc_conv_array_parameter): Update call and cleanup ss handling.
502         * trans-array.h (gfc_conv_expr_descriptor,
503         gfc_conv_array_parameter): Update prototype.
504         * trans-expr.c (gfc_conv_derived_to_class,
505         conv_isocbinding_procedure, gfc_conv_procedure_call,
506         gfc_trans_alloc_subarray_assign, gfc_trans_subcomponent_assign,
507         gfc_trans_pointer_assignment, gfc_trans_arrayfunc_assign): Update
508         call to gfc_conv_expr_descriptor and gfc_conv_array_parameter, and
509         clean up.
510         * trans-intrinsic.c (walk_coarray): Moved to trans-array.c
511         (trans_this_image, trans_image_index, gfc_conv_intrinsic_rank
512         gfc_conv_intrinsic_bound, gfc_conv_intrinsic_cobound,
513         gfc_conv_intrinsic_len, gfc_conv_intrinsic_size,
514         gfc_conv_intrinsic_sizeof, gfc_conv_intrinsic_storage_size,
515         gfc_conv_intrinsic_transfer, gfc_conv_allocated,
516         gfc_conv_associated, gfc_conv_intrinsic_loc,
517         conv_intrinsic_move_alloc): Update calls.
518         * trans-io.c (gfc_convert_array_to_string, set_internal_unit,
519         gfc_trans_transfer): Ditto.
520         * trans-stmt.c (gfc_conv_elemental_dependencies,
521         gfc_trans_sync, trans_associate_var,
522         gfc_trans_pointer_assign_need_temp): Ditto.
524 2012-08-23  Jakub Jelinek  <jakub@redhat.com>
526         * trans-decl.c (trans_function_start, generate_coarray_init,
527         create_main_function, gfc_generate_constructors): Call
528         allocate_struct_function instead of init_function_start.
530 2012-08-22  Tobias Burnus  <burnus@net-b.de>
532         * trans-expr.c (gfc_copy_class_to_class,
533         gfc_trans_arrayfunc_assign): Free loop and ss data.
534         * trans-intrinsic.c (gfc_trans_arrayfunc_assign): Free ss data.
536 2012-08-21  Tobias Burnus  <burnus@net-b.de>
538         * parse.c (parse_contained): Include EXEC_END_PROCEDURE
539         in ns->code to make sure the gfc_code is freed.
541 2012-08-20  Tobias Burnus  <burnus@net-b.de>
543         PR fortran/54301
544         * expr.c (gfc_check_pointer_assign): Warn when a pointer,
545         which is a function result, might outlive its target.
547 2012-08-20  Tobias Burnus  <burnus@net-b.de>
549         PR fortran/54301
550         * expr.c (gfc_check_pointer_assign): Warn when the pointer
551         might outlive its target.
552         * gfortran.h (struct gfc_option_t): Add warn_target_lifetime.
553         * options.c (gfc_init_options, set_wall, gfc_handle_option):
554         handle it.
555         * invoke.texi (-Wtarget-lifetime): Document it.
556         (-Wall): Implied it.
557         * lang.opt (-Wtarget-lifetime): New flag.
559 2012-08-19  Thomas König  <tkoenig@gcc.gnu.org>
561         PR fortran/54298
562         * gfortran.h (struct gfc_option_t): Add warn_compare_reals.
563         * lang.opt:  Add Wcompare-reals.
564         * invoke.texi:  Document -Wcompare-reals.
565         * resolve.c (resolve_operator):  If -Wcompare-reals is in effect,
566         warn about equality/inequality comparisions for REAL and COMPLEX.
567         * options.c (gfc_init_options):  Set warn_compare_reals.
568         (set_Wall):  Include warn_compare_reals in Wall.
569         (gfc_handle_option):  Handle Wcompare_reals.
571 2012-08-17  Jakub Jelinek  <jakub@redhat.com>
573         * array.c (gfc_match_array_ref): Fix up memset arguments.
575 2012-08-16   Diego Novillo  <dnovillo@google.com>
577         Revert
579         PR bootstrap/54281
580         * gfortran.h: Do not include gmp.h.
582 2012-08-16   Diego Novillo  <dnovillo@google.com>
584         PR bootstrap/54281
585         * gfortran.h: Do not include gmp.h.
587 2012-08-15  Janus Weil  <janus@gcc.gnu.org>
589         PR fortran/54243
590         PR fortran/54244
591         * resolve.c (check_typebound_baseobject): Check for class_ok attribute.
592         (resolve_procedure_interface,resolve_fl_derived0): Copy class_ok
593         attribute.
595 2012-08-14  Mikael Morin  <mikael@gcc.gnu.org>
597         PR fortran/47586
598         * trans-expr.c (expr_is_variable): Handle regular, procedure pointer,
599         and typebound functions returning a data pointer.
601 2012-08-14  Mikael Morin  <mikael@gcc.gnu.org>
603         * decl.c (match_ppc_decl): Copy the procedure interface's symbol
604         as procedure interface's result.
606 2012-08-14  Mikael Morin  <mikael@gcc.gnu.org>
608         * trans-expr.c (gfc_trans_scalar_assign): Rename argument,
609         extend comment.
611 2012-08-14  Mikael Morin  <mikael@gcc.gnu.org>
613         * gfortran.h (gfc_get_proc_ptr_comp): New prototype.
614         (gfc_is_proc_ptr_comp): Update prototype.
615         * expr.c (gfc_get_proc_ptr_comp): New function based on the old
616         gfc_is_proc_ptr_comp.
617         (gfc_is_proc_ptr_comp): Call gfc_get_proc_ptr_comp.
618         (gfc_specification_expr, gfc_check_pointer_assign): Use
619         gfc_get_proc_ptr_comp.
620         * trans-array.c (gfc_walk_function_expr): Likewise.
621         * resolve.c (resolve_structure_cons, update_ppc_arglist,
622         resolve_ppc_call, resolve_expr_ppc): Likewise.
623         (resolve_function): Update call to gfc_is_proc_ptr_comp.
624         * dump-parse-tree.c (show_expr): Likewise.
625         * interface.c (compare_actual_formal): Likewise.
626         * match.c (gfc_match_pointer_assignment): Likewise.
627         * primary.c (gfc_match_varspec): Likewise.
628         * trans-io.c (gfc_trans_transfer): Likewise.
629         * trans-expr.c (gfc_conv_variable, conv_function_val,
630         conv_isocbinding_procedure, gfc_conv_procedure_call,
631         gfc_trans_pointer_assignment): Likewise.
632         (gfc_conv_procedure_call, gfc_trans_array_func_assign):
633         Use gfc_get_proc_ptr_comp.
635 2012-08-14  Tobias Burnus  <burnus@net-b.de>
637         PR fortran/40881
638         * error.c (gfc_notify_std): Reset cur_error_buffer->flag flag
639         when the error/warning has been printed.
640         * gfortran.h (gfc_sl_type): Add ST_LABEL_DO_TARGET.
641         * match.c (gfc_match_do): Use ST_LABEL_DO_TARGET.
642         * parse.c (check_statement_label): Use ST_LABEL_DO_TARGET.
643         (parse_executable): Add obsolescence check for DATA.
644         * resolve.c (resolve_branch): Handle ST_LABEL_DO_TARGET.
645         * symbol.c (gfc_define_st_label, gfc_reference_st_label):
646         Add obsolescence diagnostics.
647         * trans-stmt.c (gfc_trans_label_assign): Handle ST_LABEL_DO_TARGET.
649 2012-08-14  Tobias Burnus  <burnus@net-b.de>
651         PR fortran/54234
652         * check.c (gfc_check_cmplx): Add -Wconversion warning
653         when converting higher-precision REAL to default-precision
654         CMPLX without kind= parameter.
656 2012-08-12  Tobias Burnus  <burnus@net-b.de>
658         PR fortran/54221
659         * trans-decl.c (gfc_finish_var_decl, build_function_decl):
660         Fix setting private module vars/procs as TREE_PUBLIC(...) = 0.
662 2012-08-09  Tobias Burnus  <burnus@net-b.de>
664         PR fortran/54199
665         * intrinsic.c (gfc_warn_intrinsic_shadow): Better warning
666         for internal procedures.
668 2012-08-06  Janus Weil  <janus@gcc.gnu.org>
670         PR fortran/35831
671         * interface.c (check_result_characteristics): New function, which checks
672         the characteristics of function results.
673         (gfc_compare_interfaces,gfc_check_typebound_override): Call it.
675 2012-08-02  Thomas König  <tkoenig@gcc.gnu.org>
677          PR fortran/54033
678          * scanner.c (add_path_to_list):  New argument warn.  Don't
679          warn if it is true.
680          (gfc_add_include_path):  Warn if directory is missing.
681          (gfc_add_intrinsic_modules_path):  Do not warn if directory
682          is missing.
683          * optinons.c (gfc_handle_option):  Do not add directory
684          for intrinsic modules to normal include path.
686 2012-08-03  Mikael Morin  <mikael@gcc.gnu.org>
688         PR fortran/54166
689         * trans-array.c (set_loop_bounds): Access specinfo using spec_dim.
691 2012-08-02  Mikael Morin  <mikael@gcc.gnu.org>
693         PR fortran/48820
694         * trans-array.c (gfc_conv_ss_startstride): Set the intrinsic
695         result's lower and upper bounds according to the rank.
696         (set_loop_bounds): Set the loop upper bound in the intrinsic case.
698 2012-08-02  Mikael Morin  <mikael@gcc.gnu.org>
700         * trans-array.c (set_loop_bounds): Allow non-array-section to be
701         chosen using the stride and lower bound criteria.
703 2012-08-02  Mikael Morin  <mikael@gcc.gnu.org>
705         * trans-array.c (set_loop_bounds): Remove useless dimension check.
706         Don't update loopspec if it would loose the wanted stride criterion.
708 2012-08-02  Mikael Morin  <mikael@gcc.gnu.org>
710         * trans-array.h (gfc_conv_descriptor_rank): New prototype.
711         * trans-array.c (gfc_conv_descriptor_rank): New function moved and
712         renamed ...
713         * trans-intrinsic.c (get_rank_from_desc): ... from this one.
714         (gfc_conv_intrinsic_rank, gfc_conv_intrinsic_bound,
715         gfc_conv_associated): Also rename function calls.
717 2012-08-02  Mikael Morin  <mikael@gcc.gnu.org>
719         * iresolve.c (resolve_bound, gfc_resolve_shape):
720         Don't set the shape for assumed rank arrays.
721         * simplify.c (gfc_simplify_shape): Don't try to simplify if the
722         argument is assumed rank.
724 2012-08-02  Mikael Morin  <mikael@gcc.gnu.org>
726         * array.c (gfc_copy_array_ref): Don't copy the offset field.
727         * expr.c (find_array_section): Ignore the offset field.
728         * trans-expr.c (gfc_find_interface_mapping_to_ref): Don't apply
729         any interface mapping to the offset field.
730         * gfortran.h (struct gfc_array_ref): Remove the offset field.
732 2012-08-02  Janus Weil  <janus@gcc.gnu.org>
734         PR fortran/54147
735         * resolve.c (check_proc_interface): New routine for PROCEDURE interface
736         checks.
737         (resolve_procedure_interface,resolve_typebound_procedure,
738         resolve_fl_derived0): Call it.
740 2012-08-01  Thomas König  <tkoenig@gcc.gnu.org>
742         PR fortran/54033
743         * scanner.c (add_path_to_list): Emit warning if an error occurs
744         for an include path, if it is not present or if it is not a
745         directory.  Do not add the path in these cases.
747 2012-07-31  Janus Weil  <janus@gcc.gnu.org>
749         PR fortran/42418
750         * decl.c (match_procedure_interface): Move some checks to
751         'resolve_procedure_interface'. Set flavor if appropriate.
752         * expr.c (gfc_check_pointer_assign): Cleanup of 'gfc_is_intrinsic'.
753         * intrinsic.c (gfc_is_intrinsic): Additional checks for attributes which
754         identify a procedure as being non-intrinsic.
755         * resolve.c (resolve_procedure_interface): Checks moved here from
756         'match_procedure_interface'. Minor cleanup.
757         (resolve_formal_arglist,resolve_symbol): Cleanup of
758         'resolve_procedure_interface'
759         (resolve_actual_arglist,is_external_proc): Cleanup of
760         'gfc_is_intrinsic'.
762 2012-07-31  Janus Weil  <janus@gcc.gnu.org>
764         PR fortran/54134
765         * dependency.c (gfc_dep_compare_expr): Check if arguments are NULL.
767 2012-07-31  Tobias Burnus  <burnus@net-b.de>
769         * interface.c (gfc_procedure_use): Return gfc_try instead of void.
770         * gfortran.h (gfc_procedure_use): Update prototype.
771         * resolve.c (gfc_iso_c_func_interface): Allow noninteroperable
772         procedures for c_funloc for TS29113.
773         * (gfc_iso_c_sub_interface): Ditto for c_f_procpointer. Add
774         diagnostic for c_ptr vs. c_funptr for c_f_(proc)pointer.
776 2012-07-30  Janus Weil  <janus@gcc.gnu.org>
778         PR fortran/51081
779         * gfortran.h (gfc_resolve_intrinsic): Add prototype.
780         * expr.c (gfc_check_pointer_assign): Set INTRINSIC attribute if needed.
781         Check for invalid intrinsics.
782         * primary.c (gfc_match_rvalue): Check for intrinsics came too early.
783         Set procedure flavor if appropriate.
784         * resolve.c (resolve_intrinsic): Renamed to gfc_resolve_intrinsic.
785         (resolve_procedure_interface,resolve_procedure_expression,
786         resolve_function,resolve_fl_derived0,resolve_symbol): Ditto.
788 2012-07-26  Mikael Morin  <mikael@gcc.gnu.org>
790         PR fortran/44354
791         * trans-array.c (gfc_trans_array_constructor_value):
792         Evaluate the iteration bounds before the inner variable shadows
793         the outer.
795 2012-07-26  Mikael Morin  <mikael@gcc.gnu.org>
797         PR fortran/44354
798         * array.c (sought_symbol): New variable.
799         (expr_is_sought_symbol_ref, find_symbol_in_expr): New functions.
800         (resolve_array_list): Check for references to the induction
801         variable in the iteration bounds and issue a diagnostic if some
802         are found.
804 2012-07-26  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
805             Tobias Burnus  <burnus@net-b.de>
807         * module.c (mio_array_spec): Don't read as->lower for
808         assumed-rank arrays.
810 2012-07-25  Tobias Burnus  <burnus@net-b.de>
812         * trans-types.c (gfc_real16_is_float128): Fix spelling
813         in a comment.
814         * trans.h (struct gfc_array_info): Ditto.
815         * gfortran.h (gfc_expr): Ditto.
816         * simplify.c (gfc_count): Ditto.
817         * trans-expr.c (gfc_copy_class_to_class,
818         conv_parent_component_references,
819         gfc_trans_pointer_assignment): Ditto.
820         * expr.c (check_pointer_assign): Fix diagnostic spelling.
821         * interface.c (compare_parameter): Ditto.
822         * parse.c (use_modules, parse_associate): Ditto.
823         * decl.c (match_char_length): Fix spelling of the
824         an function argument.
826 2012-07-21  Tobias Burnus  <burnus@net-b.de>
828         * iso-c-binding.def (C_PTRDIFF_T): New TS29113 parameter.
829         * intrinsic.texi (ISO_C_BINDING): Document it.
831 2012-07-21  Tobias Burnus  <burnus@net-b.de>
833         PR fortran/48820
834         * trans-intrinsic.c (gfc_conv_intrinsic_bound): Support
835         lbound/ubound with dim= for assumed-rank arrays.
836         * array.c (gfc_set_array_spec): Reject coarrays with
837         assumed shape.
838         * decl.c (merge_array_spec): Ditto. Return gfc_try.
839         (match_attr_spec, match_attr_spec): Update call.
841 2012-07-21  Tobias Burnus  <burnus@net-b.de>
843         * resolve.c (resolve_formal_arglist): Put variable
844         declaration before the first assignment.
846 2012-07-21  Tobias Burnus  <burnus@net-b.de>
848         * trans-expr.c (gfc_conv_derived_to_class): Fix argument passed
849         to class_array_data_assign.
851 2012-07-20  Tobias Burnus  <burnus@net-b.de>
853         * decl.c (gfc_verify_c_interop_param): Allow assumed-shape
854         with -std=f2008ts.
856 2012-07-20  Tobias Burnus  <burnus@net-b.de>
858         PR fortran/48820
859         * array.c (match_array_element_spec, gfc_match_array_spec,
860         spec_size, gfc_array_dimen_size): Add support for
861         assumed-rank arrays.
862         * check.c (dim_rank_check): Ditto.
863         * class.c (gfc_add_component_ref): Ditto.
864         (gfc_build_class_symbol): Regard assumed-rank arrays
865         as having GFC_MAX_DIMENSIONS. And build extra class
866         container for a scalar pointer class.
867         * decl.c (merge_array_spec): Add assert.
868         * dump-parse-tree.c (show_array_spec): Add support for
869         assumed-rank arrays.
870         * expr.c (gfc_is_simply_contiguous): Ditto.
871         * gfortran.h (array_type): Ditto.
872         (gfc_array_spec, gfc_expr): Add comment to "rank" field.
873         * interface.c (compare_type_rank, argument_rank_mismatch,
874         compare_parameter, gfc_procedure_use): Ditto.
875         (compare_actual_formal): Fix NULL() to optional-dummy
876         handling for polymorphic dummies.
877         * module.c (mio_typespec): Add support for
878         assumed-rank arrays.
879         * resolve.c (resolve_formal_arglist, resolve_actual_arglist,
880         resolve_elemental_actual, resolve_global_procedure,
881         expression_shape, resolve_variable, update_ppc_arglist,
882         check_typebound_baseobject, gfc_resolve_expr,
883         resolve_fl_var_and_proc, gfc_resolve_finalizers,
884         resolve_typebound_procedure, resolve_symbol): Ditto.
885         (assumed_type_expr_allowed): Remove static variable.
886         (actual_arg, first_actual_arg): New static variables.
887         * simplify.c (simplify_bound, gfc_simplify_range): Add
888         support for assumed-rank arrays.
889         * trans-array.c (gfc_conv_array_parameter): Ditto.
890         (gfc_get_descriptor_dimension): New function, which returns
891         the descriptor.
892         (gfc_conv_descriptor_dimension): Use it.
893         (gfc_conv_descriptor_stride_get, gfc_conv_array_parameter):
894         Handle GFC_ARRAY_ASSUMED_RANK_CONT and AS_ASSUMED_RANK.
895         * trans-array.h (gfc_get_descriptor_dimension): New prototype.
896         * trans-decl. (gfc_build_dummy_array_decl,
897         gfc_trans_deferred_vars, add_argument_checking): Add
898         support for assumed-rank arrays.
899         * trans-expr.c (gfc_conv_expr_present, gfc_conv_variable,
900         gfc_conv_procedure_call): Ditto.
901         (get_scalar_to_descriptor_type, class_array_data_assign,
902         conv_scalar_to_descriptor): New static functions.
903         (gfc_conv_derived_to_class, gfc_conv_class_to_class): Use
904         them.
905         * trans-intrinsic.c (get_rank_from_desc): New function.
906         (gfc_conv_intrinsic_rank, gfc_conv_associated): Use it.
907         * trans-types.c (gfc_array_descriptor_base_caf,
908         gfc_array_descriptor_base): Make space for scalar array.
909         (gfc_is_nodesc_array, gfc_is_nodesc_array,
910         gfc_build_array_type, gfc_get_array_descriptor_base): Add
911         support for assumed-rank arrays.
912         * trans.h (gfc_array_kind): Add GFC_ARRAY_ASSUMED_RANK and
913         GFC_ARRAY_ASSUMED_RANK_CONT.
915 2012-07-19  Tobias Burnus  <burnus@net-b.de>
917         * trans-expr.c (gfc_conv_procedure_call): Fix handling
918         of polymorphic arguments.
919         * resolve.c (resolve_formal_arglist): Ditto, mark polymorphic
920         assumed-shape arrays as such.
922 2012-07-19  Tobias Burnus  <burnus@net-b.de>
924         * interface.c (compare_parameter, compare_actual_formal): Fix
925         handling of polymorphic arguments.
927 2012-07-17  Janus Weil  <janus@gcc.gnu.org>
929         PR fortran/51081
930         * error.c (gfc_notify_std): Automatically print the relevant Fortran
931         standard version.
932         * arith.c (arith_power): Remove explicit standard reference string.
933         * array.c (gfc_match_array_spec, gfc_match_array_constructor): Ditto.
934         * check.c (gfc_check_a_p, gfc_check_besn, gfc_check_count,
935         gfc_check_float, gfc_check_fn_rc2008, gfc_check_iand,
936         gfc_check_ichar_iachar, gfc_check_ieor, gfc_check_index, gfc_check_ior,
937         gfc_check_lbound, gfc_check_len_lentrim, check_rest, gfc_check_min_max,
938         gfc_check_null, gfc_check_scan, gfc_check_selected_real_kind,
939         gfc_check_shape, gfc_check_size, gfc_check_sngl, gfc_check_ubound,
940         gfc_check_verify): Ditto.
941         * data.c (gfc_assign_data_value): Ditto.
942         * decl.c (var_element, char_len_param_value, match_char_length,
943         gfc_verify_c_interop_param, match_pointer_init, variable_decl,
944         gfc_match_decl_type_spec, gfc_match_import, match_attr_spec, 
945         gfc_match_prefix, gfc_match_suffix, match_ppc_decl,
946         match_procedure_in_interface, gfc_match_procedure,gfc_match_entry,
947         gfc_match_subroutine, gfc_match_end, gfc_match_codimension,
948         gfc_match_protected, gfc_match_value, gfc_match_volatile,
949         gfc_match_asynchronous, gfc_match_modproc, gfc_get_type_attr_spec,
950         gfc_match_enum, match_procedure_in_type): Ditto.
951         * expr.c (check_elemental, gfc_check_assign, gfc_check_pointer_assign):
952         Ditto.
953         * interface.c (gfc_match_abstract_interface, check_interface0): Ditto.
954         * intrinsic.c (gfc_intrinsic_func_interface): Ditto.
955         * io.c (format_lex, resolve_tag_format, resolve_tag,
956         compare_to_allowed_values, gfc_match_open, gfc_match_rewind,
957         gfc_resolve_dt, gfc_match_wait): Ditto.
958         * match.c (match_arithmetic_if, gfc_match_if, gfc_match_critical,
959         gfc_match_do, match_exit_cycle, gfc_match_pause, gfc_match_stop,
960         gfc_match_lock, sync_statement, gfc_match_assign, gfc_match_goto,
961         gfc_match_allocate, gfc_match_return, gfc_match_st_function): Ditto.
962         * module.c (gfc_match_use, gfc_use_module): Ditto.
963         * parse.c (parse_derived_contains, parse_block_construct,
964         parse_associate, parse_contained): Ditto.
965         * primary.c (match_hollerith_constant, match_boz_constant,
966         match_real_constant, match_sym_complex_part, match_arg_list_function,
967         build_actual_constructor, gfc_convert_to_structure_constructor): Ditto.
968         * resolve.c (resolve_formal_arglist, resolve_entries,
969         resolve_common_blocks, resolve_actual_arglist, gfc_resolve_index_1,
970         gfc_resolve_iterator_expr, resolve_ordinary_assign,
971         resolve_fl_var_and_proc, resolve_fl_variable_derived,
972         resolve_fl_procedure, resolve_fl_derived0, resolve_fl_derived,
973         resolve_fl_namelist, resolve_symbol, resolve_fntype): Ditto.
974         * symbol.c (check_conflict, conflict, gfc_add_is_bind_c,
975         gfc_add_extension, gfc_check_symbol_typed): Ditto.
977 2012-07-17  Tobias Burnus  <burnus@net-b.de>
979         PR fortran/53985
980         * decl.c (gfc_verify_c_interop_param): Make warning conditional
981         on -Wc-binding-type works and improve the wording.
983 2012-07-17  Tobias Burnus  <burnus@net-b.de>
985         PR fortran/52101
986         * decl.c (match_char_length): Extra argument, show obsolenscent
987         warning only if *length is used after the typename.
988         (variable_decl, gfc_match_char_spec): Update call
990 2012-07-17  Tobias Burnus  <burnus@net-b.de>
991             Steven G. Kargl  <kargl@gcc.gnu.org>
993         PR fortran/49265
994         * decl.c (match_procedure_in_interface): Support "::" for
995         Fortran 2008 and later.
997 2012-07-16  Thomas König  <tkoenig@gcc.gnu.org>
999         PR fortran/53824
1000         * resolve.c (resolve_allocate_deallocate):  If both
1001         start indices are NULL, skip the test for equality.
1003 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
1005         * f95-lang.c: Include dumpfile.h instead of tree-dump.h.
1006         * Make-lang.in: Fix dependencies.
1008 2012-07-16  Janus Weil  <janus@gcc.gnu.org>
1010         PR fortran/53956
1011         * gfortran.h (gfc_copy_formal_args,gfc_copy_formal_args_ppc): Modified
1012         prototypes.
1013         * symbol.c (gfc_copy_formal_args): New argument 'if_src'. Copy if_source
1014         of dummy procedures.
1015         (gfc_copy_formal_args_ppc): Ditto.
1016         * resolve.c (resolve_procedure_interface): Pass IFSRC_DECL to
1017         gfc_copy_formal_args.
1018         (resolve_fl_derived0): Pass IFSRC_DECL to gfc_copy_formal_args_ppc.
1020 2012-07-12  Tobias Burnus  <burnus@net-b.de>
1022         * trans-expr.c (conv_isocbinding_procedure): Generate c_f_pointer code
1023         inline.
1025 2012-07-11  Steven Bosscher  <steven@gcc.gnu.org>
1027         * trans.c: Do not include defaults.h.
1028         * trans-intrinsic.c: Likewise.
1030 2012-07-08  Steven Bosscher  <steven@gcc.gnu.org>
1032         * gfortran.h: Do not include coretypes.h here.
1033         Make it an error to include this before coretypes.h
1034         * openmp.c: Include coretypes.h.
1035         * interface.c: Likewise.
1036         * intrinsic.c: Likewise.
1037         * symbol.c: Likewise.
1038         * class.c: Likewise.
1039         * decl.c: Likewise.
1040         * matchexp.c: Likewise.
1041         * dump-parse-tree.c: Likewise.
1042         * array.c: Likewise.
1043         * constructor.c: Likewise.
1044         * error.c: Likewise.
1045         * data.c: Likewise.
1046         * expr.c: Likewise.
1047         * module.c: Likewise.
1048         * scanner.c: Likewise.
1049         * bbt.c: Likewise.
1050         * io.c: Likewise.
1051         * frontend-passes.c: Likewise.
1052         * resolve.c: Likewise.
1053         * st.c: Likewise.
1054         * target-memory.c: Likewise.
1055         * match.c: Likewise.
1056         * arith.c: Likewise.
1057         * parse.c: Likewise.
1058         * check.c: Likewise.
1059         * dependency.c: Likewise.
1060         * primary.c: Likewise.
1061         * misc.c: Likewise.
1062         * simplify.c: Likewise.
1064 2012-07-05  Mikael Morin  <mikael@gcc.gnu.org>
1066         PR fortran/53732
1067         * trans-array.c (gfc_add_loop_ss_code): Disable self recursive calls
1068         handling nested loop(s) if the subscript flag is true.
1070 2012-07-05  Uros Bizjak  <ubizjak@gmail.com>
1072         PR fortran/53449
1073         * parse.c (gfc_parse_file): Initialize errors_before.
1075 2012-06-27  Janus Weil  <janus@gcc.gnu.org>
1077         PR fortran/41951
1078         PR fortran/49591
1079         * interface.c (check_new_interface): Rename, add 'loc' argument,
1080         make non-static.
1081         (gfc_add_interface): Rename 'check_new_interface'
1082         * gfortran.h (gfc_check_new_interface): Add prototype.
1083         * resolve.c (resolve_typebound_intrinsic_op): Add typebound operator
1084         targets to non-typebound operator list.
1086 2012-06-22  Janus Weil  <janus@gcc.gnu.org>
1088         PR fortran/47710
1089         PR fortran/53328
1090         * interface.c (count_types_test, generic_correspondence,
1091         gfc_compare_interfaces): Ignore PASS arguments.
1092         (check_interface1, compare_parameter): Pass NULL arguments to
1093         gfc_compare_interfaces.
1094         * gfortran.h (gfc_compare_interfaces): Modified prototype.
1095         * expr.c (gfc_check_pointer_assign): Pass NULL arguments to
1096         gfc_compare_interfaces.
1097         * resolve.c (resolve_structure_cons): Ditto.
1098         (check_generic_tbp_ambiguity): Determine PASS arguments and pass them
1099         to gfc_compare_interfaces.
1101 2012-06-21  Janne Blomqvist  <jb@gcc.gnu.org>
1103         PR fortran/39654
1104         * iresolve.c (gfc_resolve_ftell): Fix result kind and use new
1105         library function.
1107 2012-06-18  Tobias Burnus  <burnus@net-b.de>
1109         * intrinsic.h (gfc_resolve_rank): New prototype.
1110         * intrinsic.c (add_functions): Use gfc_resolve_rank.
1111         * iresolve.c (add_functions): New function.
1112         * trans-intrinsic.c (gfc_conv_intrinsic_rank): New function.
1113         (gfc_conv_intrinsic_function): Call it.
1115 2012-06-18  Tobias Burnus  <burnus@net-b.de>
1117         PR fortran/53692
1118         * trans-array.c (set_loop_bounds): Don't scalarize via absent
1119         optional arrays.
1120         * resolve.c (resolve_elemental_actual): Don't stop resolving after printing
1121         a warning.
1123 2012-06-18  Tobias Burnus  <burnus@net-b.de>
1125         PR fortran/53526
1126         * trans-intrinsic.c (conv_intrinsic_move_alloc): Handle coarrays.
1128 2012-06-18  Tobias Burnus  <burnus@net-b.de>
1130         PR fortran/53526
1131         * check.c (gfc_check_move_alloc): Reject coindexed actual arguments
1132         and those with different corank.
1134 2012-06-17  Tobias Burnus  <burnus@net-b.de>
1136         PR fortran/53691
1137         PR fortran/53685
1138         * check.c (gfc_calculate_transfer_sizes): Return if
1139         SIZE= is not constant or source-size cannot be determined.
1141 2012-06-16  Tobias Burnus  <burnus@net-b.de>
1143         PR fortran/53642
1144         PR fortran/45170
1145         * frontend-passes.c (optimize_assignment): Don't remove RHS's
1146         trim when assigning to a deferred-length string.
1147         * trans-expr.c (gfc_trans_assignment_1): Ensure that the RHS string
1148         length is evaluated before the deferred-length LHS is reallocated.
1150 2012-06-13  Tobias Burnus  <burnus@net-b.de>
1152         PR fortran/53643
1153         * trans-decl.c (init_intent_out_dt): Fix for polymorphic arrays.
1154         * trans-array.c (structure_alloc_comps): Don't loop for
1155         scalar coarrays.
1157 2012-06-13  Tobias Burnus  <burnus@net-b.de>
1159         PR fortran/53597
1160         * decl.c (match_attr_spec): Only mark module variables
1161         as SAVE_IMPLICIT for Fortran 2008 and later.
1163 2012-06-08  Janus Weil  <janus@gcc.gnu.org>
1165         PR fortran/52552
1166         * match.c (gfc_match_allocate): Modify order of checks. Change wording
1167         of error message. Remove FIXME note.
1168         * resolve.c (resolve_allocate_expr): Add a comment.
1170 2012-06-07  Thomas König  <tkoenig@gcc.gnu.org>
1172         PR fortran/52861
1173         * frontend-passes.c (optimize_assignment):  Don't set the
1174         length of an empty string for deferred-length character
1175         variables.
1177 2012-06-07  Thomas König  <tkoenig@gcc.gnu.org>
1179         PR fortran/52861
1180         * frontend-passes.c (empty_string):  Add prototype.
1181         (optimize_assignment):  Set the length of an empty string
1182         constant to zero.
1184 2012-06-04  Tobias Burnus  <burnus@net-b.de>
1186         PR fortran/50619
1187         * resolve.c (build_default_init_expr): Don't initialize
1188         ASSOCIATE names.
1190 2012-06-03  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
1191             Tobias Burnus  <burnus@net-b.de>
1193         PR fortran/48831
1194         * gfortran.h (gfc_check_init_expr): Add prototype declaration
1195         of function.
1196         * check.c (kind_check): Change if condition to use
1197         to gfc_check_init_expr.
1198         * expr.c (check_init_expr): Remove forward declaration
1199         and static keyword. Change name in gfc_check_init_expr.
1200         (scalarize_intrinsic_call, check_init_expr_arguments,
1201         check_inquiry, check_conversion, gfc_reduce_init_expr): Update
1202         call to gfc_check_init_expr.
1204 2012-05-31  Steven Bosscher  <steven@gcc.gnu.org>
1206         * trans-common.c: Do not include output.h.
1207         * trans-decl.c: Likewise.
1209 2012-05-31  Tobias Burnus  <burnus@net-b.de>
1211         PR fortran/53521
1212         * trans.c (gfc_deallocate_scalar_with_status): Properly
1213         handle the case size == 0.
1215 2012-05-30  Tobias Burnus  <burnus@net-b.de>
1217         PR c/53502
1218         * decl.c (match_attr_spec): Remove "typedef".
1220 2012-05-30  Tobias Burnus  <burnus@net-b.de>
1222         * decl.c: Fix comment typos.
1223         * expr.c: Ditto.
1224         * frontend-passes.c: Ditto.
1225         * match.c: Ditto.
1226         * resolve.c: Ditto.
1227         * trans-array.c: Ditto.
1228         * trans-common.c: Ditto.
1229         * trans-intrinsic.c: Ditto.
1230         * trans-types.c: Ditto.
1232 2012-05-23  Tobias Burnus  <burnus@net-b.de>
1234         PR fortran/51055
1235         PR fortran/45170
1236         * match.c (gfc_match_allocate): Set length_from_typespec
1237         for characters.
1238         * resolve.c (resolve_charlen): If set, don't check whether
1239         the len is a specification expression.
1241 2012-05-22  Tobias Burnus  <burnus@net-b.de>
1243         PR fortran/53389
1244         * trans-array.c (gfc_add_loop_ss_code): Don't evaluate expression, if
1245         ss->is_alloc_lhs is set.
1247 2012-05-22  Dodji Seketeli  <dodji@redhat.com>
1249         PR c++/53322
1250         * f95-lang.c (gfc_init_builtin_functions): Remove the unused
1251         typedef builtin_type.
1253 2012-05-14  Janne Blomqvist  <jb@gcc.gnu.org>
1255         PR fortran/52428
1256         * gfortran.texi: Update _gfortran_set_options documentation.
1257         * invoke.texi: Remove runtime behavior description of
1258         -fno-range-check.
1259         * trans-decl.c (create_main_function): Don't pass the range-check
1260         setting to the library.
1262 2012-05-14  Tobias Burnus  <burnus@net-b.de>
1264         PR fortran/49110
1265         PR fortran/51055
1266         PR fortran/53329
1267         * trans-expr.c (gfc_trans_assignment_1): Fix allocation
1268         handling for assignment of function results to allocatable
1269         deferred-length strings.
1270         * trans-decl.c (gfc_create_string_length): For deferred-length
1271         module variables, include module name in the assembler name.
1272         (gfc_get_symbol_decl): Don't override the assembler name.
1274 2012-05-14  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1276         PR 53063
1277         * options.c (gfc_handle_option): Call lang-specific generated function.
1279 2012-05-13  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
1280             Tobias Burnus  <burnus@net-b.de>
1282         PR fortran/52158
1283         PR fortran/45170
1284         PR fortran/49430
1285         * resolve.c (resolve_fl_derived0): Deferred character length 
1286         procedure components are supported.
1287         * trans-expr.c (gfc_conv_procedure_call): Handle TBP with 
1288         deferred-length results.
1289         (gfc_string_to_single_character): Add a new check to prevent
1290         NULL read.
1291         (gfc_conv_procedure_call): Remove unuseful checks on 
1292         symbol's attributes. Add new checks to prevent NULL read on
1293         string length. 
1295 2012-05-12  Tobias Burnus  <burnus@net-b.de>
1297         PR fortran/49110
1298         PR fortran/52843
1299         * resolve.c (resolve_fl_procedure): Don't regard
1300         character(len=:) as character(*) in the diagnostic.
1302 2012-05-11  Thomas Koenig  <tkoenig@gcc.gnu.org>
1304         PR fortran/52537
1305         * frontend-passes.c (optimize_op):  Change
1306         old-style comparison operators to new-style, simplify
1307         switch as a result.
1308         (empty_string):  New function.
1309         (get_len_trim_call):  New function.
1310         (optimize_comparison):  If comparing to an empty string,
1311         use comparison of len_trim to zero.
1312         Use new-style comparison operators only.
1313         (optimize_trim):  Use get_len_trim_call.
1315 2012-05-11  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1317         PR 53063
1318         * options.c: Include diagnostics.h instead of
1319         diagnostics-core.h.
1320         (set_Wall): Do not see warn_unused here.
1321         (gfc_handle_option): Set it here using handle_generated_option.
1323 2012-05-08  Jan Hubicka  <jh@suse.cz>
1325         * trans-common.c (create_common): Do not fake TREE_ASM_WRITTEN.
1326         * trans-decl.c (gfc_finish_cray_pointee): Likewise.
1328 2012-05-07  Tobias Burnus  <burnus@net-b.de>
1330         PR fortran/53255
1331         * resolve.c (resolve_typebound_static): Fix handling
1332         of overridden specific to generic operator.
1334 2012-05-06  Tobias Burnus  <burnus@net-b.de>
1336         PR fortran/41587
1337         * decl.c (build_struct): Don't ignore FAILED status.
1339 2012-05-05  Paul Thomas  <pault@gcc.gnu.org>
1341         PR fortran/41600
1342         * trans-array.c (build_array_ref): New static function.
1343         (gfc_conv_array_ref, gfc_get_dataptr_offset): Call it.
1344         * trans-expr.c (gfc_get_vptr_from_expr): New function.
1345         (gfc_conv_derived_to_class): Add a new argument for a caller
1346         supplied vptr and use it if it is not NULL.
1347         (gfc_conv_procedure_call): Add NULL to call to above.
1348         symbol.c (gfc_is_associate_pointer): Return true if symbol is
1349         a class object.
1350         * trans-stmt.c (trans_associate_var): Handle class associate-
1351         names.
1352         * expr.c (gfc_get_variable_expr): Supply the array-spec if
1353         possible.
1354         * trans-types.c (gfc_typenode_for_spec): Set GFC_CLASS_TYPE_P
1355         for class types.
1356         * trans.h : Add prototypes for gfc_get_vptr_from_expr and
1357         gfc_conv_derived_to_class. Define GFC_CLASS_TYPE_P.
1358         * resolve.c (resolve_variable): For class arrays, ensure that
1359         the target expression has all the necessary _data references.
1360         (resolve_assoc_var): Throw a "not yet implemented" error for
1361         class array selectors that need a temporary.
1362         * match.c (copy_ts_from_selector_to_associate,
1363         select_derived_set_tmp, select_class_set_tmp): New functions.
1364         (select_type_set_tmp): Call one of last two new functions.
1365         (gfc_match_select_type): Copy_ts_from_selector_to_associate is
1366         called if associate-name is typed.
1368         PR fortran/53191
1369         * resolve.c (resolve_ref): C614 applied to class expressions.
1371 2012-05-05  Janne Blomqvist  <jb@gcc.gnu.org>
1373         PR fortran/49010
1374         PR fortran/24518
1375         * intrinsic.texi (MOD, MODULO): Mention sign and magnitude of result.
1376         * simplify.c (gfc_simplify_mod): Use mpfr_fmod.
1377         (gfc_simplify_modulo): Likewise, use copysign to fix the result if
1378         zero.
1379         * trans-intrinsic.c (gfc_conv_intrinsic_mod): Remove fallback as
1380         builtin_fmod is always available. For modulo, call copysign to fix
1381         the result when signed zeros are enabled.
1383 2012-05-05  Janne Blomqvist  <jb@gcc.gnu.org>
1385         * gfortran.texi (GFORTRAN_TMPDIR): Rename to TMPDIR, explain
1386         algorithm for choosing temp directory.
1388 2012-05-04  Tobias Burnus  <burnus@net-b.de>
1390         PR fortran/53175
1391         * resolve.c (resolve_variable): Set public_used
1392         if a private module variable is used in a (public)
1393         specification expression.
1394         * trans-decl.c (gfc_finish_var_decl): Mark those
1395         TREE_PUBLIC.
1397 2012-05-04  Tobias Burnus  <burnus@net-b.de>
1399         PR fortran/53111
1400         * resolve.c (resolve_fl_derived): Fix -std=f95
1401         diagnostic for generic vs. DT names.
1403 2012-05-03  Tobias Burnus  <burnus@net-b.de>
1405         PR fortran/52864
1406         * interface.c (compare_parameter_intent): Remove.
1407         (check_intents): Remove call, handle CLASS pointer.
1408         (compare_actual_formal): Handle CLASS pointer.
1410 2012-04-30  Jan Hubicka  <jh@suse.cz>
1412         * f95-lang.c (gfc_finish): Update comments.
1414 2012-04-29  Thomas Koenig  <tkoenig@gcc.gnu.org>
1416         PR fortran/53148
1417         * frontend-passes.c (create_var):  If the statement has a label,
1418         put the label around the block.
1420 2012-04-25  Tobias Burnus  <burnus@net-b.de>
1422         PR fortran/52196
1423         * lang.opt (Wrealloc-lhs, Wrealloc-lhs-all): New flags.
1424         * gfortran.h (gfc_option_t): Add them.
1425         * options.c (gfc_init_options, gfc_post_options,
1426         gfc_handle_option): Handle them.
1427         * invoke.texi: Document them.
1428         * trans-expr.c (realloc_lhs_warning): New function.
1429         (gfc_trans_arrayfunc_assign,
1430         alloc_scalar_allocatable_for_assignment,
1431         gfc_trans_assignment_1): Use it.
1433 2012-04-18  Steven Bosscher  <steven@gcc.gnu.org>
1435         * trans-decl.c (gfc_trans_entry_master_switch): Build SWITCH_EXPR
1436         with NULL_TREE type instead of void_type_node.
1437         * trans-io.c (io_result): Likewise.
1438         * trans-stmt.c (gfc_trans_integer_select,
1439         gfc_trans_character_select): Likewise.
1441 2012-04-16  Tobias Burnus  <burnus@net-b.de>
1443         PR fortran/52864
1444         * expr.c (gfc_check_vardef_context): Fix assignment check for
1445         pointer components.
1447 2012-04-16  Janus Weil  <janus@gcc.gnu.org>
1449         PR fortran/52968
1450         * class.c (gfc_build_class_symbol): Make sure the 'f2k_derived'
1451         namespace is present.
1453 2012-04-15  Janus Weil  <janus@gcc.gnu.org>
1455         PR fortran/51082
1456         * trans-expr.c (gfc_conv_expr_reference): Check if the expression is a
1457         simple function call (or a more involved PPC reference).
1459 2012-04-15  Tobias Burnus  <burnus@net-b.de>
1461         PR fortran/52916
1462         PR fortran/40973
1463         * gfortran.h (symbol_attribute): Add public_used.
1464         * interface.c (check_sym_interfaces, check_uop_interfaces,
1465         gfc_check_interfaces): Set it.
1466         * resolve.c (resolve_typebound_procedure): Ditto.
1467         * trans-decl.c (build_function_decl): Use it.
1469 2012-04-11  Tobias Burnus  <burnus@net-b.de>
1471         PR fortran/52729
1472         * resolve.c (resolve_symbol): Fix searching for parent NS decl.
1474 2012-04-08  Tobias Burnus  <burnus@net-b.de>
1476         PR fortran/52751
1477         * trans-decl.c (gfc_finish_var_decl): Don't set TREE_PUBLIC
1478         for PRIVATE module variables without C-binding label.
1480         PR fortran/40973
1481         * trans-decl.c (build_function_decl): Ditto for procedures.
1483 2012-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
1485         PR fortran/52893
1486         * frontend-passes.c:  Keep track of wether we are in an implicit
1487         DO loop; do not do function elimination if we are.
1489 2012-04-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
1491         PR fortran/52668
1492         * module.c:  Only mark symbols as use_only if they have been
1493         imported via an only list.
1495 2012-03-28  Paul Thomas  <pault@gcc.gnu.org>
1496         Tobias Burnus  <burnus@gcc.gnu.org>
1498         PR fortran/52652
1499         * match.c (gfc_match_allocate, gfc_match_deallocate): Change
1500         "not.. or" to "neither.. nor".
1501         * parse.c (decode_specification_statement): Correct error in
1502         chpice of matching function for "allocatable".
1504 2012-03-23  Janne Blomqvist  <jb@gcc.gnu.org>
1506         * gfortran.h (GFC_MAX_LINE): Remove unused macro.
1508 2012-03-19  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1510         PR fortran/52559
1511         * error.c (gfc_widechar_display_length): Consider tabs as
1512         one character wide, as they're displayed as spaces.
1513         (show_locus): Move tab handling to...
1514         (print_wide_char_into_buffer): ... here.
1516 2012-03-17  Tobias Burnus  <burnus@net-b.de>
1518         PR fortran/52585
1519         * trans-intrinsic.c (gfc_conv_associated): Fix handling of
1520         procpointer dummy arguments.
1522 2012-03-16  Janne Blomqvist  <jb@gcc.gnu.org>
1524         * trans-intrinsic.c (build_round_expr): Don't use BUILT_IN_IROUND
1525         for __float128.
1527 2012-03-15  Janne Blomqvist  <jb@gcc.gnu.org>
1529         * f95-lang.c (gfc_init_builtin_functions): Initialize
1530         BUILT_IN_IROUND.
1531         * mathbuiltins.def: Add IROUND.
1532         * trans-intrinsic.c (build_round_expr): Use BUILT_IN_IROUND if
1533         type size matches.
1534         (gfc_build_intrinsic_lib_fndecls): Build iround functions.
1536 2012-03-12  Richard Guenther  <rguenther@suse.de>
1538         * f95-lang.c (builtin_type_for_size): Use gfc_type_for_size.
1540 2012-03-12  Tobias Burnus  <burnus@net-b.de>
1542         PR fortran/52542
1543         * decl.c (match_procedure_decl): If the interface
1544         is bind(C), the procedure is as well.
1546 2012-03-10  Steven Bosscher  <steven@gcc.gnu.org>
1548         * convert.c (convert): Fold BOOLEAN_TYPE types to the proper variant.
1550 2012-03-09  Steven Bosscher  <steven@gcc.gnu.org>
1552         * Make-lang.in (convert.o): Depend on convert.h.
1553         * convert.c: Header and comment cleanups.
1554         (gfc_thruthvalue_conversion): Rename static function
1555         to truthvalue_conversion.  Do not use 'internal_error' from here,
1556         use 'gcc_unreachable' instead.
1557         (convert): Do not use 'error' for conversions to void, use
1558         'gcc_unreachable' instead.  Likewise for conversions to non-scalar
1559         types.  Do not hanlde ENUMERAL_TYPE, the front end never creates them.
1560         Clean up #if 0 code.
1562 2012-03-08  Tobias Burnus  <burnus@net-b.de>
1564         PR fortran/52469
1565         * trans-types.c (gfc_get_function_type): Handle backend_decl
1566         of a procedure pointer.
1568 2012-03-06  Steven Bosscher  <steven@gcc.gnu.org>
1570         * f95-lang.c (yyerror, yylex): Remove.
1571         (clear_binding_stack): Remove, fold into its only user.
1572         (LANG_HOOKS_PRINT_IDENTIFIER): Do not re-define.
1573         (ridpointers): Remove.
1574         (gfc_eh_initialized_p): Make static.
1575         (gfc_truthvalue_conversion): Move to convert.c.
1576         (gfc_be_parse_file): Clear binding level stack when done.
1577         (gfc_print_identifier): Remove.
1578         (pushlevel): Remove ignored 'ignore' argument.  Update all callers.
1579         (poplevel): Remove unused 'reverse' argument.  Update all callers.
1580         (ggc_p): Remove.
1581         (gfc_builtin_function): Make static. Do not attempt to make RTL for
1582         builtin functions.
1583         * convert.c (gfc_truthvalue_conversion): Moved here from f95-lang.c,
1584         and made static.
1585         * trans.h (pushlevel, poplevel): Adjust prototypes.
1586         (gfc_truthvalue_conversion, gfc_builtin_function): Remove prototypes.
1587         * trans-openmp.c: Update calls to pushlevel and poplevel.
1588         * trans.c: Likewise.
1589         * trans-decl.c: Likewise.
1591 2012-03-04  Mikael Morin  <mikael@gcc.gnu.org>
1593         PR fortran/50981
1594         * gfortran.h (gfc_is_class_container_ref): New prototype.
1595         * class.c (gfc_is_class_container_ref): New function.
1596         * trans-expr.c (gfc_conv_procedure_call): Add a "_data" component
1597         reference to polymorphic actual arguments.
1599 2012-03-04  Mikael Morin  <mikael@gcc.gnu.org>
1601         PR fortran/50981
1602         * trans-expr.c (gfc_conv_procedure_call): Save se->ss's value. 
1603         Handle the case of unallocated arrays passed to elemental procedures.
1605 2012-03-04  Mikael Morin  <mikael@gcc.gnu.org>
1607         * trans.h (struct gfc_ss_info): Move can_be_null_ref component from
1608         the data::scalar subcomponent to the toplevel.
1609         * trans-expr.c (gfc_conv_expr): Update component reference.
1610         * trans-array.c (gfc_add_loop_ss_code): Ditto.
1611         (gfc_walk_elemental_function_args): Ditto.  Move the conditional setting
1612         the field out of the scalar-only block.
1614 2012-03-04  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1616         PR fortran/36160
1617         * error.c (gfc_widechar_display_length, gfc_wide_display_length):
1618         New functions.
1619         (print_wide_char_into_buffer): Return length written.
1620         (show_locus): Fix locus displayed when wide characters are present.
1622 2012-03-04  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1624         * module.c (gfc_use_module): Improve error message some more.
1626 2012-03-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1628         PR fortran/52313
1629         * module.c (gfc_use_module): Improve error messages.
1631 2012-03-03  Tobias Burnus  <burnus@net-b.de>
1633         PR fortran/48820
1634         * resolve.c (resolve_actual_arglist): Properly reset
1635         assumed_type_expr_allowed.
1637 2012-03-03  Tobias Burnus  <burnus@net-b.de>
1639         * lang.opt (Wc-binding-type): New flag.
1640         * options.c (gfc_init_options, gfc_handle_option): Handle it.
1641         * invoke.texi (Wc-binding-type): Document it.
1642         * gfortran.h (gfc_option_t): Add warn_c_binding_type.
1643         * decl.c (verify_bind_c_sym): Handle -Wc-binding-type.
1644         * symbol.c (gfc_set_default_type, verify_bind_c_derived_type):
1645         Ditto.
1647 2012-03-03  Tobias Burnus  <burnus@net-b.de>
1649         PR fortran/48820
1650         * decl.c (gfc_match_decl_type_spec): Support type(*).
1651         (gfc_verify_c_interop): Allow type(*).
1652         * dump-parse-tree.c (show_typespec): Handle type(*).
1653         * expr.c (gfc_copy_expr): Ditto.
1654         * interface.c (compare_type_rank, compare_parameter,
1655         compare_actual_formal, gfc_procedure_use): Ditto.
1656         * libgfortran.h (bt): Add BT_ASSUMED.
1657         * misc.c (gfc_basic_typename, gfc_typename): Handle type(*).
1658         * module.c (bt_types): Ditto.
1659         * resolve.c (assumed_type_expr_allowed): New static variable.
1660         (resolve_actual_arglist, resolve_variable, resolve_symbol):
1661         Handle type(*). 
1662         * trans-expr.c (gfc_conv_procedure_call): Ditto.
1663         * trans-types.c (gfc_typenode_for_spec, gfc_get_dtype): Ditto.
1665 2012-03-02  Tobias Burnus  <burnus@net-b.de>
1667         PR fortran/52325
1668         * primary.c (gfc_match_varspec): Add missing ;.
1670 2012-03-02  Tobias Burnus  <burnus@net-b.de>
1672         PR fortran/52325
1673         * primary.c (gfc_match_varspec): Add diagnostic for % with
1674         nonderived types.
1676 2012-03-02  Tobias Burnus  <burnus@net-b.de>
1678         PR fortran/52270
1679         * expr.c (gfc_check_vardef_context): Fix check for
1680         intent-in polymorphic pointer .
1681         * interface.c (compare_parameter): Allow passing TYPE to
1682         intent-in polymorphic pointer.
1684 2012-03-02  Tobias Burnus  <burnus@net-b.de>
1686         PR fortran/52452
1687         * resolve.c (resolve_intrinsic): Don't search for a
1688         function if we know that it is a subroutine.
1690 2012-02-29  Paul Thomas  <pault@gcc.gnu.org>
1692         PR fortran/52386
1693         * trans-expr.c (fcncall_realloc_result): Dereference the
1694         descriptor if needed.
1696 2012-02-22  Tobias Burnus  <burnus@net-b.de>
1698         PR fortran/52335
1699         * io.c (gfc_match_open): Remove bogus F2003 DELIM= check.
1701 2012-02-18  Tobias Burnus  <burnus@net-b.de>
1703         PR fortran/52295
1704         * interface.c (check_interface0): Internal procs in
1705         generic interfaces are allowed in Fortran 2008.
1707 2012-02-17  Tobias Burnus  <burnus@net-b.de>
1708             Roland Stigge  <stigge@antcom.de>
1710         PR translation/52273
1711         * interface.c (compare_actual_formal): Fix typo "at at".
1713 2012-02-17  Tobias Burnus  <burnus@net-b.de>
1715         * gfortran.texi (Q exponent-letter): Fix grammar.
1717 2012-02-17  Tobias Burnus  <burnus@net-b.de>
1719         * gfortran.texi (Status): Fix typos.
1720         * invoke.texi (ffixed-form, fstack-arrays): Spell Fortran with
1721         a majuscule.
1723 2012-02-17  Tobias Burnus  <burnus@net-b.de>
1724             Roland Stigge  <stigge@antcom.de>
1726         PR translation/52232
1727         PR translation/52234
1728         PR translation/52245
1729         PR translation/52246
1730         PR translation/52262
1731         PR translation/52273
1732         * io.c (gfc_match_open): Fix typo.
1733         * interface.c (compare_actual_formal): Ditto.
1734         * lang.opt (freal-4-real-8, freal-4-real-16, freal-8-real-16): Ditto.
1735         * match.c (alloc_opt_list, gfc_match_nullify): Ditto.
1736         * check.c (gfc_check_associated, gfc_check_null): Ditto.
1738 2012-02-12  Mikael Morin  <mikael@gcc.gnu.org>
1740         PR fortran/50981
1741         * trans-stmt.c (gfc_get_proc_ifc_for_call): New function.
1742         (gfc_trans_call): Use gfc_get_proc_ifc_for_call.
1744 2012-02-12  Mikael Morin  <mikael@gcc.gnu.org>
1746         * trans-array.c (gfc_walk_elemental_function_args,
1747         gfc_walk_function_expr): Move call to gfc_get_proc_ifc_for_expr out
1748         of gfc_walk_elemental_function_args.
1749         * trans-stmt.c (gfc_trans_call): Ditto.
1750         * trans-array.h (gfc_get_proc_ifc_for_expr): New prototype.
1751         (gfc_walk_elemental_function_args): Update prototype.
1753 2012-02-12  Mikael Morin  <mikael@gcc.gnu.org>
1755         * trans-array.c (gfc_get_proc_ifc_for_expr): New function.
1756         (gfc_walk_elemental_function_args): Move code to
1757         gfc_get_proc_ifc_for_expr and call it.
1759 2012-02-08  Tobias Burnus  <burnus@net-b.de>
1761         PR fortran/52151
1762         * trans-expr.c (fcncall_realloc_result): Set also the stride.
1764 2012-02-07  Tobias Burnus  <burnus@net-b.de>
1766         PR fortran/51514
1767         * trans-expr.c (gfc_conv_procedure_call): Add _data component
1768         for calls of scalar CLASS actuals to TYPE dummies.
1770 2012-02-05  Thomas König  <tkoenig@gcc.gnu.org>
1772         PR fortran/48847
1773         * trans-decl.c:  Warn about unused dummy procedure arguments
1774         if -Wunused-dummy-argument is specified.  Suppress middle-end
1775         warnings about procedure arguments.
1777 2012-02-05  Paul Thomas  <pault@gcc.gnu.org>
1779         * trans-array.c (gfc_array_allocate): Zero memory for all class
1780         array allocations.
1781         * trans-stmt.c (gfc_trans_allocate): Ditto for class scalars.
1783         PR fortran/52102
1784         * trans-stmt.c (gfc_trans_allocate): Before correcting a class
1785         array reference, ensure that 'dataref' points to the _data
1786         component that is followed by the array reference..
1788 2012-02-02  Mikael Morin  <mikael@gcc.gnu.org>
1790         PR fortran/41587
1791         PR fortran/46356
1792         PR fortran/51754
1793         PR fortran/50981
1794         * class.c (insert_component_ref, class_data_ref_missing,
1795         gfc_fix_class_refs): New functions.
1796         * gfortran.h (gfc_fix_class_refs): New prototype.
1797         * trans-expr.c (gfc_conv_expr): Remove special case handling and call
1798         gfc_fix_class_refs instead.
1800 2012-02-02  Paul Thomas  <pault@gcc.gnu.org>
1802         PR fortran/52012
1803         * trans-expr.c (fcncall_realloc_result): If variable shape is
1804         correct, retain the bounds, whatever they are.
1806 2012-02-02  Tobias Burnus  <burnus@net-b.de>
1808         PR fortran/52093
1809         * simplify.c (gfc_simplify_size): Handle INTRINSIC_PARENTHESES.
1811 2012-02-01  Thomas König  <tkoenig@gcc.gnu.org>
1813         PR fortran/51958
1814         * frontend-passes.c (convert_elseif):  New function.
1815         (optimize_namespace):  Call it.
1817 2012-02-01  Tobias Burnus  <burnus@net-b.de>
1819         PR fortran/52024
1820         * module.c (MOD_VERSION): Bump.
1821         (mio_typebound_proc): Read/write is_operator from/to the
1822         .mod file.
1824 2012-02-01  Tobias Burnus  <burnus@net-b.de>
1826         PR fortran/52059
1827         * trans-expr.c (gfc_conv_procedure_call): Add array ref
1828         only to variables.
1830 2012-01-31  Tobias Burnus  <burnus@net-b.de>
1832         PR fortran/52024
1833         * gfortran.h (gfc_tbp_generic): Store whether the
1834         generic is an operator.
1835         * decl.c (gfc_match_generic): Set that flag.
1836         * resolve.c (check_generic_tbp_ambiguity): Use it in the
1837         gfc_compare_interfaces check.
1839 2012-01-31  Tobias Burnus  <burnus@net-b.de>
1841         PR fortran/52029
1842         * class.c (gfc_find_derived_vtab): Mark _copy function as pure.
1844 2012-01-31  Tobias Burnus  <burnus@net-b.de>
1846         PR fortran/52013
1847         * class.c (get_unique_hashed_string): Adapt trim length.
1848         (gfc_build_class_symbol) Encode also corank in the container name.
1850 2012-01-31  Paul Thomas  <pault@gcc.gnu.org>
1852         PR fortran/52012
1853         * trans-expr.c (fcncall_realloc_result): Correct calculation of
1854         result offset.
1856 2012-01-29  Janne Blomqvist  <jb@gcc.gnu.org>
1858         * module.c (pointer_info): Make true_name and module pointers
1859         rather than arrays, order pointers before other fields.
1860         (free_pi_tree): free true_name and module as well.
1861         (mio_read_string): Rename to read_string.
1862         (mio_write_string): Remove.
1863         (load_commons): Use read_string.
1864         (read_module): Use read_string rather than mio_internal_string.
1865         (write_blank_common): Call write_atom directly.
1866         (write_symbol): Likewise.
1868 2012-01-29  Tobias Burnus  <burnus@net-b.de>
1870         PR fortran/41600
1871         * expr.c (gfc_default_initializer): Convert the values if
1872         the type does not match.
1874 2012-01-29  Tobias Burnus  <burnus@net-b.de>
1876         PR fortran/51972
1877         * trans-array.c (structure_alloc_comps): Fix assignment of
1878         polymorphic components (polymorphic deep copying).
1880 2012-01-29  Janne Blomqvist  <jb@gcc.gnu.org>
1882         PR fortran/51808
1883         * decl.c (set_binding_label): Make binding_label argument const.
1884         (curr_binding_label): Constify.
1885         * gfortran.h (gfc_symbol): Constify binding_label.
1886         (gfc_common_head): Likewise.
1887         (get_iso_c_sym): Likewise.
1888         * match.c (gfc_match_name_C): Constify buffer argument.
1889         * match.h (gfc_match_name_C): Likewise.
1890         * resolve.c (set_name_and_label): Constify binding_label argument.
1891         (gfc_iso_c_sub_interface): Constify binding_label variable.
1892         * symbol.c (get_iso_c_sym): Constify binding_label argument.
1894 2012-01-29  Janne Blomqvist  <jb@gcc.gnu.org>
1896         PR fortran/51808
1897         * decl.c (set_binding_label): Move prototype from match.h to here.
1898         (curr_binding_label): Make a pointer rather than static array.
1899         (build_sym): Check sym->binding_label pointer rather than array,
1900         update set_binding_label call, handle curr_binding_label changes.
1901         (set_binding_label): Handle new curr_binding_label, dest_label
1902         double ptr, and sym->binding_label.
1903         (verify_bind_c_sym): Handle sym->binding_label being a pointer.
1904         (set_verify_bind_c_sym): Check sym->binding_label pointer rather
1905         than array, update set_binding_label call.
1906         (gfc_match_bind_c_stmt): Handle curr_binding_label change.
1907         (match_procedure_decl): Update set_binding_label call.
1908         (gfc_match_bind_c): Change binding_label to pointer, update
1909         gfc_match_name_C call.
1910         * gfortran.h (GFC_MAX_BINDING_LABEL_LEN): Remove macro.
1911         (gfc_symbol): Make binding_label a pointer.
1912         (gfc_common_head): Likewise.
1913         * match.c (gfc_match_name_C): Heap allocate bind(C) name.
1914         * match.h (gfc_match_name_C): Change prototype argument.
1915         (set_binding_label): Move prototype to decl.c.
1916         * module.c (struct pointer_info): Make binding_label a pointer.
1917         (free_pi_tree): Free unused binding_label.
1918         (mio_read_string): New function.
1919         (mio_write_string): New function.
1920         (load_commons): Redo reading of binding_label.
1921         (read_module): Likewise.
1922         (write_common_0): Change to write empty string instead of name if
1923         no binding_label.
1924         (write_blank_common): Write empty string for binding label.
1925         (write_symbol): Change to write empty string instead of name if no
1926         binding_label.
1927         * resolve.c (gfc_iso_c_func_interface): Don't set binding_label.
1928         (set_name_and_label): Make binding_label double pointer, use
1929         asprintf.
1930         (gfc_iso_c_sub_interface): Make binding_label a pointer.
1931         (resolve_bind_c_comms): Handle cases if
1932         gfc_common_head->binding_label is NULL.
1933         (gfc_verify_binding_labels): sym->binding_label is a pointer.
1934         * symbol.c (gfc_new_symbol): Rely on XCNEW zero init for
1935         binding_label.
1936         (gen_special_c_interop_ptr): Don't set binding label.
1937         (generate_isocbinding_symbol): Insert binding_label into symbol
1938         table.
1939         (get_iso_c_sym): Use pointer assignment instead of strcpy.
1940         * trans-common.c (gfc_sym_mangled_common_id): Handle
1941         com->binding_label being a pointer.
1942         * trans-decl.c (gfc_sym_mangled_identifier): Handle
1943         sym->binding_label being a pointer.
1944         (gfc_sym_mangled_function_id): Likewise.
1946 2012-01-29  Tobias Burnus  <burnus@net-b.de>
1948         PR fortran/52038
1949         * resolve.c (symbol_as): Remove unused, accidentally
1950         added function.
1952 2012-01-28  Tobias Burnus  <burnus@net-b.de>
1954         PR fortran/51972
1955         * trans-stmt.c (gfc_trans_allocate): Properly check whether
1956         we have a BT_CLASS which needs to be memset.
1958 2012-01-27  Tobias Burnus  <burnus@net-b.de>
1960         PR fortran/52022
1961         * trans-expr.c (gfc_conv_procedure_call): Fix passing
1962         of functions, which return allocatables.
1964 2012-01-27  Tobias Burnus  <burnus@net-b.de>
1966         PR fortran/52016
1967         * resolve.c (resolve_formal_arglist): Fix elemental
1968         constraint checks for polymorphic dummies also for
1969         pointers.
1971 2012-01-27  Tobias Burnus  <burnus@net-b.de>
1973         PR fortran/51970
1974         PR fortran/51977
1975         * primary.c (gfc_match_varspec. gfc_match_rvalue): Set
1976         handle array spec for BT_CLASS.
1977         * expr.c (gfc_get_variable_expr, gfc_lval_expr_from_sym)
1978         * frontend-passes.c (create_var): Ditto.
1979         * resolve.c (resolve_actual_arglist, resolve_assoc_var): Ditto.
1980         * trans-decl.c (gfc_trans_deferred_vars): Use class_pointer
1981         instead of attr.pointer.
1982         (gfc_generate_function_code): Use CLASS_DATA (sym) for BT_CLASS.
1983         * trans-intrinsic.c (conv_intrinsic_move_alloc): Move assert.
1984         * trans-stmt.c (trans_associate_var): Ask for the descriptor.
1986 2012-01-27  Tobias Burnus  <burnus@net-b.de>
1988         PR fortran/51953
1989         * match.c (gfc_match_allocate): Allow more than allocate
1990         object with SOURCE=.
1992 2012-01-27  Tobias Burnus  <burnus@net-b.de>
1994         PR fortran/52016
1995         * resolve.c (resolve_formal_arglist): Fix elemental
1996         constraint checks for polymorphic dummies.
1998 2012-01-27  Paul Thomas  <pault@gcc.gnu.org>
1999             Tobias Burnus <burnus@gcc.gnu.org>
2001         PR fortran/48705
2002         PR fortran/51870
2003         PR fortran/51943
2004         PR fortran/51946
2005         * trans-array.c (gfc_array_init_size): Add two extra arguments
2006         to convey the dynamic element size of a calls object and to
2007         return the number of elements that have been allocated.
2008         (gfc_array_allocate): Add the same arguments and use them to
2009         call gfc_array_init_size.  Before the allocation dereference
2010         the data pointer, if necessary. Set the allocated array to zero
2011         if the class element size or expr3 are non-null.
2012         * trans-expr.c (gfc_conv_class_to_class): Give this function
2013         global scope.
2014         (get_class_array_ref): New function.
2015         (gfc_copy_class_to_class): New function.
2016         * trans-array.h : Update prototype for gfc_array_allocate.
2017         * trans-stmt.c (gfc_trans_allocate): For non-variable class
2018         STATUS expressions extract the class object and the dynamic
2019         element size. Use the latter to call gfc_array_allocate and
2020         the former for setting the vptr and, via
2021         gfc_copy_class_to_clasfc_cs, to copy to the allocated data.
2022         * trans.h : Prototypes for gfc_get_class_array_ref,
2023         gfc_copy_class_to_class and gfc_conv_class_to_class.
2025 2012-01-25  Tobias Burnus  <burnus@net-b.de>
2027         * resolve.c (symbol_as): Check also for attr.class_ok.
2029 2012-01-25  Tobias Burnus  <burnus@net-b.de>
2031         PR fortran/51995
2032         * class.c (gfc_build_class_symbol): Fix invalid freeing
2033         issue with fclass->f2k_derived.
2035 2012-01-25  Tobias Burnus  <burnus@net-b.de>
2037         PR fortran/51995
2038         * class.c (gfc_build_class_symbol): Ensure that
2039         fclass->f2k_derived is set.
2041 2012-01-25  Tobias Burnus  <burnus@net-b.de>
2043         PR fortran/51966
2044         * resolve.c (resolve_structure_cons): Only create an
2045         array constructors for nonscalars.
2047 2012-01-23  Tobias Burnus  <burnus@net-b.de>
2049         PR fortran/51948
2050         * check.c (variable_check): Fix checking for
2051          variables and deeply nested BLOCKs.
2053 2012-01-21  Tobias Burnus  <burnus@net-b.de>
2054             Steven G. Kargl  <kargl@gcc.gnu.org>
2056         PR fortran/50556
2057         * symbol.c (check_conflict): namelist-group-name cannot have the SAVE
2058         attribute.
2060 2012-01-21  Tobias Burnus  <burnus@net-b.de>
2062         PR fortran/51913
2063         * interface.c (compare_parameter): Fix CLASS comparison.
2065 2012-01-20  Tobias Burnus  <burnus@net-b.de>
2066             Janus Weil  <janus@gcc.gnu.org>
2068         PR fortran/51056
2069         * module.c (load_needed, read_module): Don't mark __vtab etc.
2070         as use_only.
2072 2012-01-19  Tobias Burnus  <burnus@net-b.de>
2074         PR fortran/51904
2075         * expr.c (gfc_build_intrinsic_call): Also set the symtree.
2077 2012-01-18  Paul Thomas  <pault@gcc.gnu.org>
2079         PR fortran/51634
2080         * trans-expr.c (gfc_conv_procedure_call): Deallocate allocatable
2081         components of temporary class arguments.
2083 2012-01-17  Tobias Burnus  <burnus@net-b.de>
2084             Janne Blomqvist  <jb@gcc.gnu.org>
2086         PR fortran/51869
2087         * trans-expr.c (alloc_scalar_allocatable_for_assignment): Nullify
2088         LHS after allocation, if it has allocatable components.
2089         * f95-lang.c (gfc_init_builtin_functions): Add BUILT_IN_CALLOC.
2091 2012-01-16  Mikael Morin  <mikael@gcc.gnu.org>
2092             Tobias Burnus  <burnus@net-b.de>
2094         PR fortran/50981
2095         * trans-array.c (gfc_walk_elemental_function_args): Fix
2096         passing of deallocated allocatables/pointers as absent argument. 
2098 2012-01-16  Tobias Burnus  <burnus@net-b.de>
2100         PR fortran/51809
2101         * class.c (gfc_find_derived_vtab): Mark __vtab and
2102         __def_init as FL_VARIABLE not as FL_PARAMETER.
2103         * expr.c (gfc_simplify_expr): Remove special
2104         handling of __vtab.
2105         * resolve.c (resolve_values): Ditto.
2106         * trans-decl.c (gfc_get_symbol_decl): Mark __vtab
2107         and __def_init as TREE_READONLY.
2109 2012-01-16  Zydrunas Gimbutas  <gimbutas@cims.nyu.edu>
2110         Andreas Kloeckner  <kloeckner@cims.nyu.edu>
2111         Steven G. Kargl  <kargl@gcc.gnu.org>
2113         PR fortran/48426
2114         * gfortran.h (gfc_option_t): Add members flag_*_kind to store kind.
2115         * lang.opt: Add options -freal-4-real-8, -freal-4-real-10,
2116         -freal-4-real-16, -freal-8-real-4, -freal-8-real-10, -freal-8-real-16
2117         and -finteger-4-integer-8. User-desired type conversion information.
2118         * decl.c (gfc_match_old_kind_spec,kind_expr): Type conversions
2119         in declaration parsing.
2120         * trans-types.c (gfc_init_kinds): User-specified type conversion
2121         checked for current backend.
2122         * primary.c (match_integer_constant,match_real_constant): Implement
2123         type conversion in constant parsing.
2124         * options.c (gfc_init_options,gfc_handle_option): Translate input
2125         options to flags in internal options data structure.
2126         * invoke.texi: Document new options.  Re-order options in Options
2127         summary section.
2129 2012-01-16  Paul Thomas  <pault@gcc.gnu.org>
2131         * trans-array.c (gfc_trans_create_temp_array): In the case of a
2132         class array temporary, detect a null 'eltype' on entry and use 
2133         'initial' to provde the class reference and so, through the
2134         vtable, the element size for the dynamic type.
2135         * trans-stmt.c (gfc_conv_elemental_dependencies): For class
2136         expressions, set 'eltype' to null and pass the values via the
2137         'initial' expression.
2139 2012-01-14  Tobias Burnus  <burnus@net-b.de>
2141         PR fortran/51800
2142         * resolve.c (build_default_init_expr): Also initialize
2143         nonconstant-length strings with -finit-character=<n>.
2145 2011-01-14  Tobias Burnus  <burnus@net-b.de>
2147         PR fortran/51816
2148         * module.c (read_module): Don't make nonexisting
2149         intrinsic operators as found.
2150         (rename_list_remove_duplicate): New function.
2151         (gfc_use_modules): Use it.
2153 2012-01-13  Paul Thomas  <pault@gcc.gnu.org>
2155         PR fortran/48351
2156         * trans-array.c (structure_alloc_comps): Suppress interative
2157         call to self, when current component is deallocated using
2158         gfc_trans_dealloc_allocated.
2159         * class.c (gfc_build_class_symbol): Copy the 'alloc_comp'
2160         attribute from the declared type to the class structure.
2162 2012-01-13  Tobias Burnus  <burnus@net-b.de>
2164         PR fortran/51842
2165         * fortran/trans-types.c (gfc_init_kinds): Use PTRDIFF_TYPE
2166         instead of a signed int of size POINTER_SIZE for
2167         gfc_index_integer_kind.
2169 2012-01-12  Tobias Burnus  <burnus@net-b.de>
2171         PR fortran/36755
2172         * intrinsic.texi (CHMOD): Extend a bit and remove statement
2173         that /bin/chmod is called.
2175 2012-01-10  Gerald Pfeifer  <gerald@pfeifer.com>
2177         * gfortran.texi (Fortran 2003 Status): Fix grammar.
2179 2012-01-10  Tobias Burnus  <burnus@net-b.de>
2181         PR fortran/51652
2182         * resolve.c (resolve_allocate_expr): For non-deferred char lengths,
2183         check whether type-spec matches declaration.
2185 2012-01-10  Tobias Burnus  <burnus@net-b.de>
2187         * resolve.c (resolve_ordinary_assign): Improve error wording.
2189 2012-01-09  Paul Thomas  <pault@gcc.gnu.org>
2191         PR fortran/51791
2192         * interface.c (matching_typebound_op): Drill down through
2193         possible parentheses to obtain base expression. Do not test for
2194         'class_ok' but, instead for the class structure components.
2195         * resolve.c (resolve_ordinary_assign): Extend error message for
2196         polymorphic assignment to advise checking for specific
2197         subroutine.
2199         PR fortran/51792
2200         * resolve.c (resolve_typebound_function): Restore 'static' to
2201         declaration.
2203 2012-01-09  Mikael Morin  <mikael@gcc.gnu.org>
2205         PR fortran/51758
2206         * trans-array.c (gfc_walk_elemental_function_args):
2207         Skip over NULL() actual arguments.
2209 2012-01-09  Tobias Burnus  <burnus@net-b.de>
2211         * gfortran.texi: Bump copyright year.
2212         (Fortran 2003 Status): Update polymorphism item, add
2213         item for generic interface with DT name.
2215 2012-01-09  Tobias Burnus  <burnus@net-b.de>
2217         PR fortran/51578
2218         * gfortran.h (gfc_use_list):
2219         * match.h (gfc_use_module): Rename to ...
2220         (gfc_use_modules): ... this.
2221         * module.c (use_locus, specified_nonint, specified_int): Remove
2222         global variable.
2223         (module_name): Change type to const char*, used with gfc_get_string.
2224         (module_list): New global variable.
2225         (free_rename): Free argument not global var.
2226         (gfc_match_use): Save match to module_list.
2227         (load_generic_interfaces, read_module): Don't free symtree.
2228         (write_dt_extensions, gfc_dump_module): Fix module-name I/O due to the
2229         type change of module_name.
2230         (write_symbol0, write_generic): Optimize due to the type change.
2231         (import_iso_c_binding_module, use_iso_fortran_env_module): Use
2232         locus of rename->where.
2233         (gfc_use_module): Take module_list as argument.
2234         (gfc_use_modules): New function.
2235         (gfc_module_init_2, gfc_module_done_2): Init module_list, rename_list.
2236         * parse.c (last_was_use_stmt): New global variable.
2237         (use_modules): New function.
2238         (decode_specification_statement, decode_statement): Move USE match up
2239         and call use_modules.
2240         (next_free, next_fixed): Call use_modules.
2241         (accept_statement): Don't call gfc_module_use.
2243 2012-01-06  Tobias Burnus <burnus@net-b.de>
2245         * trans-openmp.c (gfc_omp_clause_dtor, gfc_trans_omp_array_reduction):
2246         Update call to gfc_trans_dealloc_allocated.
2247         * trans.c (gfc_allocate_using_malloc): Fix spacing.
2248         (gfc_allocate_allocatable): For gfc_allocate_using_lib, jump to
2249         label_finish when an error occurs.
2250         (gfc_deallocate_with_status): Call caf_deregister for -fcoarray=lib.
2251         * trans.h (gfc_allocate_allocatable, gfc_deallocate_with_status):
2252         Update prototype.
2253         (gfor_fndecl_caf_deregister): New tree symbol.
2254         * trans-expr.c (gfc_conv_procedure_call): Update
2255         gfc_deallocate_with_status and gfc_trans_dealloc_allocated calls.
2256         * trans-array.c (gfc_array_allocate, gfc_trans_dealloc_allocated,
2257         structure_alloc_comps, gfc_trans_deferred_array): Ditto.
2258         (gfc_array_deallocate): Handle coarrays with -fcoarray=lib.
2259         * trans-array.h (gfc_array_deallocate, gfc_array_allocate,
2260         gfc_trans_dealloc_allocated): Update prototypes.
2261         * trans-stmt.c (gfc_trans_sync): Fix indentation.
2262         (gfc_trans_allocate): Fix errmsg padding and label handling.
2263         (gfc_trans_deallocate): Ditto and handle -fcoarray=lib.
2264         * expr.c (gfc_is_coarray): Fix algorithm for BT_CLASS.
2265         * libgfortran.h (GFC_STAT_STOPPED_IMAGE): Use large value
2266         to avoid other stats accidentally matching this one.
2267         * trans-decl.c (gfor_fndecl_caf_deregister): New global var.
2268         (gfc_build_builtin_function_decls): Fix prototype decl of caf_register
2269         and add decl for caf_deregister.
2270         (gfc_trans_deferred_vars): Handle CAF vars with -fcoarrays=lib.
2271         * trans-intrinsic.c (conv_intrinsic_move_alloc): Update call to
2272         gfc_deallocate_with_status.
2274 2012-01-05  Paul Thomas  <pault@gcc.gnu.org>
2276         PR fortran/PR48946
2277         * resolve.c (resolve_typebound_static): If the typebound
2278         procedure is 'deferred' try to find the correct specific
2279         procedure in the derived type operator space itself.
2281 2012-01-04  Mikael Morin  <mikael@gcc.gnu.org>
2283         PR fortran/50981
2284         * trans-array.h (gfc_walk_elemental_function_args): New argument.
2285         * trans-intrinsic.c (gfc_walk_intrinsic_function): Update call.
2286         * trans-stmt.c (gfc_trans_call): Ditto.
2287         * trans-array.c (gfc_walk_function_expr): Ditto.
2288         (gfc_walk_elemental_function_args): Get the dummy argument list
2289         if possible.  Check that the dummy and the actual argument are both
2290         optional, and set can_be_null_ref accordingly.
2292 2012-01-04  Mikael Morin  <mikael@gcc.gnu.org>
2294         PR fortran/50981
2295         * trans.h (struct gfc_ss_info): New field data::scalar::can_be_null_ref
2296         * trans-array.c: If the reference can be NULL, save the reference
2297         instead of the value.
2298         * trans-expr.c (gfc_conv_expr): If we have saved a reference,
2299         dereference it.
2301 2012-01-04  Mikael Morin  <mikael@gcc.gnu.org>
2303         * trans-expr.c (gfc_conv_expr): Move address taking...
2304         (gfc_conv_expr_reference): ... here.
2306 2012-01-04  Thomas Koenig  <tkoenig@gcc.gnu.org>
2308         PR fortran/49693
2309         * trans-common.c (create_common): Update copyright years.  Mark
2310         variables as used to avoid warnings about unused variables in
2311         common blocks.
2313 2012-01-03  Hans-Peter Nilsson  <hp@axis.com>
2315         * gfortran.h (struct gfc_expr): Add missing "struct"
2316         qualifier for member base_expr.
2318 2012-01-02  Paul Thomas  <pault@gcc.gnu.org>
2320         PR fortran/51529
2321         * trans-array.c (gfc_array_allocate): Null allocated memory of
2322         newly allocted class arrays.
2324         PR fortran/46262
2325         PR fortran/46328
2326         PR fortran/51052
2327         * interface.c(build_compcall_for_operator): Add a type to the
2328         expression.
2329         * trans-expr.c (conv_base_obj_fcn_val): New function.
2330         (gfc_conv_procedure_call): Use base_expr to detect non-variable
2331         base objects and, ensuring that there is a temporary variable,
2332         build up the typebound call using conv_base_obj_fcn_val.
2333         (gfc_trans_class_assign): Pick out class procedure pointer
2334         assignments and do the assignment with no further prcessing.
2335         (gfc_trans_class_array_init_assign, gfc_trans_class_init_assign
2336         gfc_trans_class_assign): Move to top of file.
2337         * gfortran.h : Add 'base_expr' field to gfc_expr.
2338         * resolve.c (get_declared_from_expr): Add 'types' argument to
2339         switch checking of derived types on or off.
2340         (resolve_typebound_generic_call): Set the new argument.
2341         (resolve_typebound_function, resolve_typebound_subroutine):
2342         Set 'types' argument for get_declared_from_expr appropriately.
2343         Identify base expression, if not a variable, in the argument
2344         list of class valued calls. Assign it to the 'base_expr' field
2345         of the final expression. Strip away all references after the
2346         last class reference.
2348 2012-01-02  Tobias Burnus  <burnus@net-b.de>
2350         PR fortran/51682
2351         * trans-intrinsic.c (trans_this_image, trans_image_index,
2352         trans_num_images, conv_intrinsic_cobound): Fold_convert the
2353         caf_num_images/caf_this_images variables to the correct int kind.
2355 2012-01-01  Jakub Jelinek  <jakub@redhat.com>
2357         * gfortranspec.c (lang_specific_driver): Update copyright notice
2358         dates.
2360 Copyright (C) 2012 Free Software Foundation, Inc.
2362 Copying and distribution of this file, with or without modification,
2363 are permitted in any medium without royalty provided the copyright
2364 notice and this notice are preserved.