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