OSDN Git Service

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