OSDN Git Service

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