OSDN Git Service

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