OSDN Git Service

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