OSDN Git Service

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