OSDN Git Service

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