OSDN Git Service

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