OSDN Git Service

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