OSDN Git Service

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