OSDN Git Service

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