OSDN Git Service

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