OSDN Git Service

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