PR fortran/36160
[official-gcc.git] / gcc / fortran / ChangeLog
blob3a072e0a9b0155366b2c24630a5e767ab14bac75
1 2012-03-04  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3         PR fortran/36160
4         * error.c (gfc_widechar_display_length, gfc_wide_display_length):
5         New functions.
6         (print_wide_char_into_buffer): Return length written.
7         (show_locus): Fix locus displayed when wide characters are present.
9 2012-03-04  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
11         * module.c (gfc_use_module): Improve error message some more.
13 2012-03-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
15         PR fortran/52313
16         * module.c (gfc_use_module): Improve error messages.
18 2012-03-03  Tobias Burnus  <burnus@net-b.de>
20         PR fortran/48820
21         * resolve.c (resolve_actual_arglist): Properly reset
22         assumed_type_expr_allowed.
24 2012-03-03  Tobias Burnus  <burnus@net-b.de>
26         * lang.opt (Wc-binding-type): New flag.
27         * options.c (gfc_init_options, gfc_handle_option): Handle it.
28         * invoke.texi (Wc-binding-type): Document it.
29         * gfortran.h (gfc_option_t): Add warn_c_binding_type.
30         * decl.c (verify_bind_c_sym): Handle -Wc-binding-type.
31         * symbol.c (gfc_set_default_type, verify_bind_c_derived_type):
32         Ditto.
34 2012-03-03  Tobias Burnus  <burnus@net-b.de>
36         PR fortran/48820
37         * decl.c (gfc_match_decl_type_spec): Support type(*).
38         (gfc_verify_c_interop): Allow type(*).
39         * dump-parse-tree.c (show_typespec): Handle type(*).
40         * expr.c (gfc_copy_expr): Ditto.
41         * interface.c (compare_type_rank, compare_parameter,
42         compare_actual_formal, gfc_procedure_use): Ditto.
43         * libgfortran.h (bt): Add BT_ASSUMED.
44         * misc.c (gfc_basic_typename, gfc_typename): Handle type(*).
45         * module.c (bt_types): Ditto.
46         * resolve.c (assumed_type_expr_allowed): New static variable.
47         (resolve_actual_arglist, resolve_variable, resolve_symbol):
48         Handle type(*). 
49         * trans-expr.c (gfc_conv_procedure_call): Ditto.
50         * trans-types.c (gfc_typenode_for_spec, gfc_get_dtype): Ditto.
52 2012-03-02  Tobias Burnus  <burnus@net-b.de>
54         PR fortran/52325
55         * primary.c (gfc_match_varspec): Add missing ;.
57 2012-03-02  Tobias Burnus  <burnus@net-b.de>
59         PR fortran/52325
60         * primary.c (gfc_match_varspec): Add diagnostic for % with
61         nonderived types.
63 2012-03-02  Tobias Burnus  <burnus@net-b.de>
65         PR fortran/52270
66         * expr.c (gfc_check_vardef_context): Fix check for
67         intent-in polymorphic pointer .
68         * interface.c (compare_parameter): Allow passing TYPE to
69         intent-in polymorphic pointer.
71 2012-03-02  Tobias Burnus  <burnus@net-b.de>
73         PR fortran/52452
74         * resolve.c (resolve_intrinsic): Don't search for a
75         function if we know that it is a subroutine.
77 2012-02-29  Paul Thomas  <pault@gcc.gnu.org>
79         PR fortran/52386
80         * trans-expr.c (fcncall_realloc_result): Dereference the
81         descriptor if needed.
83 2012-02-22  Tobias Burnus  <burnus@net-b.de>
85         PR fortran/52335
86         * io.c (gfc_match_open): Remove bogus F2003 DELIM= check.
88 2012-02-18  Tobias Burnus  <burnus@net-b.de>
90         PR fortran/52295
91         * interface.c (check_interface0): Internal procs in
92         generic interfaces are allowed in Fortran 2008.
94 2012-02-17  Tobias Burnus  <burnus@net-b.de>
95             Roland Stigge  <stigge@antcom.de>
97         PR translation/52273
98         * interface.c (compare_actual_formal): Fix typo "at at".
100 2012-02-17  Tobias Burnus  <burnus@net-b.de>
102         * gfortran.texi (Q exponent-letter): Fix grammar.
104 2012-02-17  Tobias Burnus  <burnus@net-b.de>
106         * gfortran.texi (Status): Fix typos.
107         * invoke.texi (ffixed-form, fstack-arrays): Spell Fortran with
108         a majuscule.
110 2012-02-17  Tobias Burnus  <burnus@net-b.de>
111             Roland Stigge  <stigge@antcom.de>
113         PR translation/52232
114         PR translation/52234
115         PR translation/52245
116         PR translation/52246
117         PR translation/52262
118         PR translation/52273
119         * io.c (gfc_match_open): Fix typo.
120         * interface.c (compare_actual_formal): Ditto.
121         * lang.opt (freal-4-real-8, freal-4-real-16, freal-8-real-16): Ditto.
122         * match.c (alloc_opt_list, gfc_match_nullify): Ditto.
123         * check.c (gfc_check_associated, gfc_check_null): Ditto.
125 2012-02-12  Mikael Morin  <mikael@gcc.gnu.org>
127         PR fortran/50981
128         * trans-stmt.c (gfc_get_proc_ifc_for_call): New function.
129         (gfc_trans_call): Use gfc_get_proc_ifc_for_call.
131 2012-02-12  Mikael Morin  <mikael@gcc.gnu.org>
133         * trans-array.c (gfc_walk_elemental_function_args,
134         gfc_walk_function_expr): Move call to gfc_get_proc_ifc_for_expr out
135         of gfc_walk_elemental_function_args.
136         * trans-stmt.c (gfc_trans_call): Ditto.
137         * trans-array.h (gfc_get_proc_ifc_for_expr): New prototype.
138         (gfc_walk_elemental_function_args): Update prototype.
140 2012-02-12  Mikael Morin  <mikael@gcc.gnu.org>
142         * trans-array.c (gfc_get_proc_ifc_for_expr): New function.
143         (gfc_walk_elemental_function_args): Move code to
144         gfc_get_proc_ifc_for_expr and call it.
146 2012-02-08  Tobias Burnus  <burnus@net-b.de>
148         PR fortran/52151
149         * trans-expr.c (fcncall_realloc_result): Set also the stride.
151 2012-02-07  Tobias Burnus  <burnus@net-b.de>
153         PR fortran/51514
154         * trans-expr.c (gfc_conv_procedure_call): Add _data component
155         for calls of scalar CLASS actuals to TYPE dummies.
157 2012-02-05  Thomas König  <tkoenig@gcc.gnu.org>
159         PR fortran/48847
160         * trans-decl.c:  Warn about unused dummy procedure arguments
161         if -Wunused-dummy-argument is specified.  Suppress middle-end
162         warnings about procedure arguments.
164 2012-02-05  Paul Thomas  <pault@gcc.gnu.org>
166         * trans-array.c (gfc_array_allocate): Zero memory for all class
167         array allocations.
168         * trans-stmt.c (gfc_trans_allocate): Ditto for class scalars.
170         PR fortran/52102
171         * trans-stmt.c (gfc_trans_allocate): Before correcting a class
172         array reference, ensure that 'dataref' points to the _data
173         component that is followed by the array reference..
175 2012-02-02  Mikael Morin  <mikael@gcc.gnu.org>
177         PR fortran/41587
178         PR fortran/46356
179         PR fortran/51754
180         PR fortran/50981
181         * class.c (insert_component_ref, class_data_ref_missing,
182         gfc_fix_class_refs): New functions.
183         * gfortran.h (gfc_fix_class_refs): New prototype.
184         * trans-expr.c (gfc_conv_expr): Remove special case handling and call
185         gfc_fix_class_refs instead.
187 2012-02-02  Paul Thomas  <pault@gcc.gnu.org>
189         PR fortran/52012
190         * trans-expr.c (fcncall_realloc_result): If variable shape is
191         correct, retain the bounds, whatever they are.
193 2012-02-02  Tobias Burnus  <burnus@net-b.de>
195         PR fortran/52093
196         * simplify.c (gfc_simplify_size): Handle INTRINSIC_PARENTHESES.
198 2012-02-01  Thomas König  <tkoenig@gcc.gnu.org>
200         PR fortran/51958
201         * frontend-passes.c (convert_elseif):  New function.
202         (optimize_namespace):  Call it.
204 2012-02-01  Tobias Burnus  <burnus@net-b.de>
206         PR fortran/52024
207         * module.c (MOD_VERSION): Bump.
208         (mio_typebound_proc): Read/write is_operator from/to the
209         .mod file.
211 2012-02-01  Tobias Burnus  <burnus@net-b.de>
213         PR fortran/52059
214         * trans-expr.c (gfc_conv_procedure_call): Add array ref
215         only to variables.
217 2012-01-31  Tobias Burnus  <burnus@net-b.de>
219         PR fortran/52024
220         * gfortran.h (gfc_tbp_generic): Store whether the
221         generic is an operator.
222         * decl.c (gfc_match_generic): Set that flag.
223         * resolve.c (check_generic_tbp_ambiguity): Use it in the
224         gfc_compare_interfaces check.
226 2012-01-31  Tobias Burnus  <burnus@net-b.de>
228         PR fortran/52029
229         * class.c (gfc_find_derived_vtab): Mark _copy function as pure.
231 2012-01-31  Tobias Burnus  <burnus@net-b.de>
233         PR fortran/52013
234         * class.c (get_unique_hashed_string): Adapt trim length.
235         (gfc_build_class_symbol) Encode also corank in the container name.
237 2012-01-31  Paul Thomas  <pault@gcc.gnu.org>
239         PR fortran/52012
240         * trans-expr.c (fcncall_realloc_result): Correct calculation of
241         result offset.
243 2012-01-29  Janne Blomqvist  <jb@gcc.gnu.org>
245         * module.c (pointer_info): Make true_name and module pointers
246         rather than arrays, order pointers before other fields.
247         (free_pi_tree): free true_name and module as well.
248         (mio_read_string): Rename to read_string.
249         (mio_write_string): Remove.
250         (load_commons): Use read_string.
251         (read_module): Use read_string rather than mio_internal_string.
252         (write_blank_common): Call write_atom directly.
253         (write_symbol): Likewise.
255 2012-01-29  Tobias Burnus  <burnus@net-b.de>
257         PR fortran/41600
258         * expr.c (gfc_default_initializer): Convert the values if
259         the type does not match.
261 2012-01-29  Tobias Burnus  <burnus@net-b.de>
263         PR fortran/51972
264         * trans-array.c (structure_alloc_comps): Fix assignment of
265         polymorphic components (polymorphic deep copying).
267 2012-01-29  Janne Blomqvist  <jb@gcc.gnu.org>
269         PR fortran/51808
270         * decl.c (set_binding_label): Make binding_label argument const.
271         (curr_binding_label): Constify.
272         * gfortran.h (gfc_symbol): Constify binding_label.
273         (gfc_common_head): Likewise.
274         (get_iso_c_sym): Likewise.
275         * match.c (gfc_match_name_C): Constify buffer argument.
276         * match.h (gfc_match_name_C): Likewise.
277         * resolve.c (set_name_and_label): Constify binding_label argument.
278         (gfc_iso_c_sub_interface): Constify binding_label variable.
279         * symbol.c (get_iso_c_sym): Constify binding_label argument.
281 2012-01-29  Janne Blomqvist  <jb@gcc.gnu.org>
283         PR fortran/51808
284         * decl.c (set_binding_label): Move prototype from match.h to here.
285         (curr_binding_label): Make a pointer rather than static array.
286         (build_sym): Check sym->binding_label pointer rather than array,
287         update set_binding_label call, handle curr_binding_label changes.
288         (set_binding_label): Handle new curr_binding_label, dest_label
289         double ptr, and sym->binding_label.
290         (verify_bind_c_sym): Handle sym->binding_label being a pointer.
291         (set_verify_bind_c_sym): Check sym->binding_label pointer rather
292         than array, update set_binding_label call.
293         (gfc_match_bind_c_stmt): Handle curr_binding_label change.
294         (match_procedure_decl): Update set_binding_label call.
295         (gfc_match_bind_c): Change binding_label to pointer, update
296         gfc_match_name_C call.
297         * gfortran.h (GFC_MAX_BINDING_LABEL_LEN): Remove macro.
298         (gfc_symbol): Make binding_label a pointer.
299         (gfc_common_head): Likewise.
300         * match.c (gfc_match_name_C): Heap allocate bind(C) name.
301         * match.h (gfc_match_name_C): Change prototype argument.
302         (set_binding_label): Move prototype to decl.c.
303         * module.c (struct pointer_info): Make binding_label a pointer.
304         (free_pi_tree): Free unused binding_label.
305         (mio_read_string): New function.
306         (mio_write_string): New function.
307         (load_commons): Redo reading of binding_label.
308         (read_module): Likewise.
309         (write_common_0): Change to write empty string instead of name if
310         no binding_label.
311         (write_blank_common): Write empty string for binding label.
312         (write_symbol): Change to write empty string instead of name if no
313         binding_label.
314         * resolve.c (gfc_iso_c_func_interface): Don't set binding_label.
315         (set_name_and_label): Make binding_label double pointer, use
316         asprintf.
317         (gfc_iso_c_sub_interface): Make binding_label a pointer.
318         (resolve_bind_c_comms): Handle cases if
319         gfc_common_head->binding_label is NULL.
320         (gfc_verify_binding_labels): sym->binding_label is a pointer.
321         * symbol.c (gfc_new_symbol): Rely on XCNEW zero init for
322         binding_label.
323         (gen_special_c_interop_ptr): Don't set binding label.
324         (generate_isocbinding_symbol): Insert binding_label into symbol
325         table.
326         (get_iso_c_sym): Use pointer assignment instead of strcpy.
327         * trans-common.c (gfc_sym_mangled_common_id): Handle
328         com->binding_label being a pointer.
329         * trans-decl.c (gfc_sym_mangled_identifier): Handle
330         sym->binding_label being a pointer.
331         (gfc_sym_mangled_function_id): Likewise.
333 2012-01-29  Tobias Burnus  <burnus@net-b.de>
335         PR fortran/52038
336         * resolve.c (symbol_as): Remove unused, accidentally
337         added function.
339 2012-01-28  Tobias Burnus  <burnus@net-b.de>
341         PR fortran/51972
342         * trans-stmt.c (gfc_trans_allocate): Properly check whether
343         we have a BT_CLASS which needs to be memset.
345 2012-01-27  Tobias Burnus  <burnus@net-b.de>
347         PR fortran/52022
348         * trans-expr.c (gfc_conv_procedure_call): Fix passing
349         of functions, which return allocatables.
351 2012-01-27  Tobias Burnus  <burnus@net-b.de>
353         PR fortran/52016
354         * resolve.c (resolve_formal_arglist): Fix elemental
355         constraint checks for polymorphic dummies also for
356         pointers.
358 2012-01-27  Tobias Burnus  <burnus@net-b.de>
360         PR fortran/51970
361         PR fortran/51977
362         * primary.c (gfc_match_varspec. gfc_match_rvalue): Set
363         handle array spec for BT_CLASS.
364         * expr.c (gfc_get_variable_expr, gfc_lval_expr_from_sym)
365         * frontend-passes.c (create_var): Ditto.
366         * resolve.c (resolve_actual_arglist, resolve_assoc_var): Ditto.
367         * trans-decl.c (gfc_trans_deferred_vars): Use class_pointer
368         instead of attr.pointer.
369         (gfc_generate_function_code): Use CLASS_DATA (sym) for BT_CLASS.
370         * trans-intrinsic.c (conv_intrinsic_move_alloc): Move assert.
371         * trans-stmt.c (trans_associate_var): Ask for the descriptor.
373 2012-01-27  Tobias Burnus  <burnus@net-b.de>
375         PR fortran/51953
376         * match.c (gfc_match_allocate): Allow more than allocate
377         object with SOURCE=.
379 2012-01-27  Tobias Burnus  <burnus@net-b.de>
381         PR fortran/52016
382         * resolve.c (resolve_formal_arglist): Fix elemental
383         constraint checks for polymorphic dummies.
385 2012-01-27  Paul Thomas  <pault@gcc.gnu.org>
386             Tobias Burnus <burnus@gcc.gnu.org>
388         PR fortran/48705
389         PR fortran/51870
390         PR fortran/51943
391         PR fortran/51946
392         * trans-array.c (gfc_array_init_size): Add two extra arguments
393         to convey the dynamic element size of a calls object and to
394         return the number of elements that have been allocated.
395         (gfc_array_allocate): Add the same arguments and use them to
396         call gfc_array_init_size.  Before the allocation dereference
397         the data pointer, if necessary. Set the allocated array to zero
398         if the class element size or expr3 are non-null.
399         * trans-expr.c (gfc_conv_class_to_class): Give this function
400         global scope.
401         (get_class_array_ref): New function.
402         (gfc_copy_class_to_class): New function.
403         * trans-array.h : Update prototype for gfc_array_allocate.
404         * trans-stmt.c (gfc_trans_allocate): For non-variable class
405         STATUS expressions extract the class object and the dynamic
406         element size. Use the latter to call gfc_array_allocate and
407         the former for setting the vptr and, via
408         gfc_copy_class_to_clasfc_cs, to copy to the allocated data.
409         * trans.h : Prototypes for gfc_get_class_array_ref,
410         gfc_copy_class_to_class and gfc_conv_class_to_class.
412 2012-01-25  Tobias Burnus  <burnus@net-b.de>
414         * resolve.c (symbol_as): Check also for attr.class_ok.
416 2012-01-25  Tobias Burnus  <burnus@net-b.de>
418         PR fortran/51995
419         * class.c (gfc_build_class_symbol): Fix invalid freeing
420         issue with fclass->f2k_derived.
422 2012-01-25  Tobias Burnus  <burnus@net-b.de>
424         PR fortran/51995
425         * class.c (gfc_build_class_symbol): Ensure that
426         fclass->f2k_derived is set.
428 2012-01-25  Tobias Burnus  <burnus@net-b.de>
430         PR fortran/51966
431         * resolve.c (resolve_structure_cons): Only create an
432         array constructors for nonscalars.
434 2012-01-23  Tobias Burnus  <burnus@net-b.de>
436         PR fortran/51948
437         * check.c (variable_check): Fix checking for
438          variables and deeply nested BLOCKs.
440 2012-01-21  Tobias Burnus  <burnus@net-b.de>
441             Steven G. Kargl  <kargl@gcc.gnu.org>
443         PR fortran/50556
444         * symbol.c (check_conflict): namelist-group-name cannot have the SAVE
445         attribute.
447 2012-01-21  Tobias Burnus  <burnus@net-b.de>
449         PR fortran/51913
450         * interface.c (compare_parameter): Fix CLASS comparison.
452 2012-01-20  Tobias Burnus  <burnus@net-b.de>
453             Janus Weil  <janus@gcc.gnu.org>
455         PR fortran/51056
456         * module.c (load_needed, read_module): Don't mark __vtab etc.
457         as use_only.
459 2012-01-19  Tobias Burnus  <burnus@net-b.de>
461         PR fortran/51904
462         * expr.c (gfc_build_intrinsic_call): Also set the symtree.
464 2012-01-18  Paul Thomas  <pault@gcc.gnu.org>
466         PR fortran/51634
467         * trans-expr.c (gfc_conv_procedure_call): Deallocate allocatable
468         components of temporary class arguments.
470 2012-01-17  Tobias Burnus  <burnus@net-b.de>
471             Janne Blomqvist  <jb@gcc.gnu.org>
473         PR fortran/51869
474         * trans-expr.c (alloc_scalar_allocatable_for_assignment): Nullify
475         LHS after allocation, if it has allocatable components.
476         * f95-lang.c (gfc_init_builtin_functions): Add BUILT_IN_CALLOC.
478 2012-01-16  Mikael Morin  <mikael@gcc.gnu.org>
479             Tobias Burnus  <burnus@net-b.de>
481         PR fortran/50981
482         * trans-array.c (gfc_walk_elemental_function_args): Fix
483         passing of deallocated allocatables/pointers as absent argument. 
485 2012-01-16  Tobias Burnus  <burnus@net-b.de>
487         PR fortran/51809
488         * class.c (gfc_find_derived_vtab): Mark __vtab and
489         __def_init as FL_VARIABLE not as FL_PARAMETER.
490         * expr.c (gfc_simplify_expr): Remove special
491         handling of __vtab.
492         * resolve.c (resolve_values): Ditto.
493         * trans-decl.c (gfc_get_symbol_decl): Mark __vtab
494         and __def_init as TREE_READONLY.
496 2012-01-16  Zydrunas Gimbutas  <gimbutas@cims.nyu.edu>
497         Andreas Kloeckner  <kloeckner@cims.nyu.edu>
498         Steven G. Kargl  <kargl@gcc.gnu.org>
500         PR fortran/48426
501         * gfortran.h (gfc_option_t): Add members flag_*_kind to store kind.
502         * lang.opt: Add options -freal-4-real-8, -freal-4-real-10,
503         -freal-4-real-16, -freal-8-real-4, -freal-8-real-10, -freal-8-real-16
504         and -finteger-4-integer-8. User-desired type conversion information.
505         * decl.c (gfc_match_old_kind_spec,kind_expr): Type conversions
506         in declaration parsing.
507         * trans-types.c (gfc_init_kinds): User-specified type conversion
508         checked for current backend.
509         * primary.c (match_integer_constant,match_real_constant): Implement
510         type conversion in constant parsing.
511         * options.c (gfc_init_options,gfc_handle_option): Translate input
512         options to flags in internal options data structure.
513         * invoke.texi: Document new options.  Re-order options in Options
514         summary section.
516 2012-01-16  Paul Thomas  <pault@gcc.gnu.org>
518         * trans-array.c (gfc_trans_create_temp_array): In the case of a
519         class array temporary, detect a null 'eltype' on entry and use 
520         'initial' to provde the class reference and so, through the
521         vtable, the element size for the dynamic type.
522         * trans-stmt.c (gfc_conv_elemental_dependencies): For class
523         expressions, set 'eltype' to null and pass the values via the
524         'initial' expression.
526 2012-01-14  Tobias Burnus  <burnus@net-b.de>
528         PR fortran/51800
529         * resolve.c (build_default_init_expr): Also initialize
530         nonconstant-length strings with -finit-character=<n>.
532 2011-01-14  Tobias Burnus  <burnus@net-b.de>
534         PR fortran/51816
535         * module.c (read_module): Don't make nonexisting
536         intrinsic operators as found.
537         (rename_list_remove_duplicate): New function.
538         (gfc_use_modules): Use it.
540 2012-01-13  Paul Thomas  <pault@gcc.gnu.org>
542         PR fortran/48351
543         * trans-array.c (structure_alloc_comps): Suppress interative
544         call to self, when current component is deallocated using
545         gfc_trans_dealloc_allocated.
546         * class.c (gfc_build_class_symbol): Copy the 'alloc_comp'
547         attribute from the declared type to the class structure.
549 2012-01-13  Tobias Burnus  <burnus@net-b.de>
551         PR fortran/51842
552         * fortran/trans-types.c (gfc_init_kinds): Use PTRDIFF_TYPE
553         instead of a signed int of size POINTER_SIZE for
554         gfc_index_integer_kind.
556 2012-01-12  Tobias Burnus  <burnus@net-b.de>
558         PR fortran/36755
559         * intrinsic.texi (CHMOD): Extend a bit and remove statement
560         that /bin/chmod is called.
562 2012-01-10  Gerald Pfeifer  <gerald@pfeifer.com>
564         * gfortran.texi (Fortran 2003 Status): Fix grammar.
566 2012-01-10  Tobias Burnus  <burnus@net-b.de>
568         PR fortran/51652
569         * resolve.c (resolve_allocate_expr): For non-deferred char lengths,
570         check whether type-spec matches declaration.
572 2012-01-10  Tobias Burnus  <burnus@net-b.de>
574         * resolve.c (resolve_ordinary_assign): Improve error wording.
576 2012-01-09  Paul Thomas  <pault@gcc.gnu.org>
578         PR fortran/51791
579         * interface.c (matching_typebound_op): Drill down through
580         possible parentheses to obtain base expression. Do not test for
581         'class_ok' but, instead for the class structure components.
582         * resolve.c (resolve_ordinary_assign): Extend error message for
583         polymorphic assignment to advise checking for specific
584         subroutine.
586         PR fortran/51792
587         * resolve.c (resolve_typebound_function): Restore 'static' to
588         declaration.
590 2012-01-09  Mikael Morin  <mikael@gcc.gnu.org>
592         PR fortran/51758
593         * trans-array.c (gfc_walk_elemental_function_args):
594         Skip over NULL() actual arguments.
596 2012-01-09  Tobias Burnus  <burnus@net-b.de>
598         * gfortran.texi: Bump copyright year.
599         (Fortran 2003 Status): Update polymorphism item, add
600         item for generic interface with DT name.
602 2012-01-09  Tobias Burnus  <burnus@net-b.de>
604         PR fortran/51578
605         * gfortran.h (gfc_use_list):
606         * match.h (gfc_use_module): Rename to ...
607         (gfc_use_modules): ... this.
608         * module.c (use_locus, specified_nonint, specified_int): Remove
609         global variable.
610         (module_name): Change type to const char*, used with gfc_get_string.
611         (module_list): New global variable.
612         (free_rename): Free argument not global var.
613         (gfc_match_use): Save match to module_list.
614         (load_generic_interfaces, read_module): Don't free symtree.
615         (write_dt_extensions, gfc_dump_module): Fix module-name I/O due to the
616         type change of module_name.
617         (write_symbol0, write_generic): Optimize due to the type change.
618         (import_iso_c_binding_module, use_iso_fortran_env_module): Use
619         locus of rename->where.
620         (gfc_use_module): Take module_list as argument.
621         (gfc_use_modules): New function.
622         (gfc_module_init_2, gfc_module_done_2): Init module_list, rename_list.
623         * parse.c (last_was_use_stmt): New global variable.
624         (use_modules): New function.
625         (decode_specification_statement, decode_statement): Move USE match up
626         and call use_modules.
627         (next_free, next_fixed): Call use_modules.
628         (accept_statement): Don't call gfc_module_use.
630 2012-01-06  Tobias Burnus <burnus@net-b.de>
632         * trans-openmp.c (gfc_omp_clause_dtor, gfc_trans_omp_array_reduction):
633         Update call to gfc_trans_dealloc_allocated.
634         * trans.c (gfc_allocate_using_malloc): Fix spacing.
635         (gfc_allocate_allocatable): For gfc_allocate_using_lib, jump to
636         label_finish when an error occurs.
637         (gfc_deallocate_with_status): Call caf_deregister for -fcoarray=lib.
638         * trans.h (gfc_allocate_allocatable, gfc_deallocate_with_status):
639         Update prototype.
640         (gfor_fndecl_caf_deregister): New tree symbol.
641         * trans-expr.c (gfc_conv_procedure_call): Update
642         gfc_deallocate_with_status and gfc_trans_dealloc_allocated calls.
643         * trans-array.c (gfc_array_allocate, gfc_trans_dealloc_allocated,
644         structure_alloc_comps, gfc_trans_deferred_array): Ditto.
645         (gfc_array_deallocate): Handle coarrays with -fcoarray=lib.
646         * trans-array.h (gfc_array_deallocate, gfc_array_allocate,
647         gfc_trans_dealloc_allocated): Update prototypes.
648         * trans-stmt.c (gfc_trans_sync): Fix indentation.
649         (gfc_trans_allocate): Fix errmsg padding and label handling.
650         (gfc_trans_deallocate): Ditto and handle -fcoarray=lib.
651         * expr.c (gfc_is_coarray): Fix algorithm for BT_CLASS.
652         * libgfortran.h (GFC_STAT_STOPPED_IMAGE): Use large value
653         to avoid other stats accidentally matching this one.
654         * trans-decl.c (gfor_fndecl_caf_deregister): New global var.
655         (gfc_build_builtin_function_decls): Fix prototype decl of caf_register
656         and add decl for caf_deregister.
657         (gfc_trans_deferred_vars): Handle CAF vars with -fcoarrays=lib.
658         * trans-intrinsic.c (conv_intrinsic_move_alloc): Update call to
659         gfc_deallocate_with_status.
661 2012-01-05  Paul Thomas  <pault@gcc.gnu.org>
663         PR fortran/PR48946
664         * resolve.c (resolve_typebound_static): If the typebound
665         procedure is 'deferred' try to find the correct specific
666         procedure in the derived type operator space itself.
668 2012-01-04  Mikael Morin  <mikael@gcc.gnu.org>
670         PR fortran/50981
671         * trans-array.h (gfc_walk_elemental_function_args): New argument.
672         * trans-intrinsic.c (gfc_walk_intrinsic_function): Update call.
673         * trans-stmt.c (gfc_trans_call): Ditto.
674         * trans-array.c (gfc_walk_function_expr): Ditto.
675         (gfc_walk_elemental_function_args): Get the dummy argument list
676         if possible.  Check that the dummy and the actual argument are both
677         optional, and set can_be_null_ref accordingly.
679 2012-01-04  Mikael Morin  <mikael@gcc.gnu.org>
681         PR fortran/50981
682         * trans.h (struct gfc_ss_info): New field data::scalar::can_be_null_ref
683         * trans-array.c: If the reference can be NULL, save the reference
684         instead of the value.
685         * trans-expr.c (gfc_conv_expr): If we have saved a reference,
686         dereference it.
688 2012-01-04  Mikael Morin  <mikael@gcc.gnu.org>
690         * trans-expr.c (gfc_conv_expr): Move address taking...
691         (gfc_conv_expr_reference): ... here.
693 2012-01-04  Thomas Koenig  <tkoenig@gcc.gnu.org>
695         PR fortran/49693
696         * trans-common.c (create_common): Update copyright years.  Mark
697         variables as used to avoid warnings about unused variables in
698         common blocks.
700 2012-01-03  Hans-Peter Nilsson  <hp@axis.com>
702         * gfortran.h (struct gfc_expr): Add missing "struct"
703         qualifier for member base_expr.
705 2012-01-02  Paul Thomas  <pault@gcc.gnu.org>
707         PR fortran/51529
708         * trans-array.c (gfc_array_allocate): Null allocated memory of
709         newly allocted class arrays.
711         PR fortran/46262
712         PR fortran/46328
713         PR fortran/51052
714         * interface.c(build_compcall_for_operator): Add a type to the
715         expression.
716         * trans-expr.c (conv_base_obj_fcn_val): New function.
717         (gfc_conv_procedure_call): Use base_expr to detect non-variable
718         base objects and, ensuring that there is a temporary variable,
719         build up the typebound call using conv_base_obj_fcn_val.
720         (gfc_trans_class_assign): Pick out class procedure pointer
721         assignments and do the assignment with no further prcessing.
722         (gfc_trans_class_array_init_assign, gfc_trans_class_init_assign
723         gfc_trans_class_assign): Move to top of file.
724         * gfortran.h : Add 'base_expr' field to gfc_expr.
725         * resolve.c (get_declared_from_expr): Add 'types' argument to
726         switch checking of derived types on or off.
727         (resolve_typebound_generic_call): Set the new argument.
728         (resolve_typebound_function, resolve_typebound_subroutine):
729         Set 'types' argument for get_declared_from_expr appropriately.
730         Identify base expression, if not a variable, in the argument
731         list of class valued calls. Assign it to the 'base_expr' field
732         of the final expression. Strip away all references after the
733         last class reference.
735 2012-01-02  Tobias Burnus  <burnus@net-b.de>
737         PR fortran/51682
738         * trans-intrinsic.c (trans_this_image, trans_image_index,
739         trans_num_images, conv_intrinsic_cobound): Fold_convert the
740         caf_num_images/caf_this_images variables to the correct int kind.
742 2012-01-01  Jakub Jelinek  <jakub@redhat.com>
744         * gfortranspec.c (lang_specific_driver): Update copyright notice
745         dates.
747 Copyright (C) 2012 Free Software Foundation, Inc.
749 Copying and distribution of this file, with or without modification,
750 are permitted in any medium without royalty provided the copyright
751 notice and this notice are preserved.