PR fortran/52559
[official-gcc.git] / gcc / fortran / ChangeLog
bloba316336b52d0da15113e095a70951a8dc5fff12c
1 2012-03-19  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3         PR fortran/52559
4         * error.c (gfc_widechar_display_length): Consider tabs as
5         one character wide, as they're displayed as spaces.
6         (show_locus): Move tab handling to...
7         (print_wide_char_into_buffer): ... here.
9 2012-03-17  Tobias Burnus  <burnus@net-b.de>
11         PR fortran/52585
12         * trans-intrinsic.c (gfc_conv_associated): Fix handling of
13         procpointer dummy arguments.
15 2012-03-16  Janne Blomqvist  <jb@gcc.gnu.org>
17         * trans-intrinsic.c (build_round_expr): Don't use BUILT_IN_IROUND
18         for __float128.
20 2012-03-15  Janne Blomqvist  <jb@gcc.gnu.org>
22         * f95-lang.c (gfc_init_builtin_functions): Initialize
23         BUILT_IN_IROUND.
24         * mathbuiltins.def: Add IROUND.
25         * trans-intrinsic.c (build_round_expr): Use BUILT_IN_IROUND if
26         type size matches.
27         (gfc_build_intrinsic_lib_fndecls): Build iround functions.
29 2012-03-12  Richard Guenther  <rguenther@suse.de>
31         * f95-lang.c (builtin_type_for_size): Use gfc_type_for_size.
33 2012-03-12  Tobias Burnus  <burnus@net-b.de>
35         PR fortran/52542
36         * decl.c (match_procedure_decl): If the interface
37         is bind(C), the procedure is as well.
39 2012-03-10  Steven Bosscher  <steven@gcc.gnu.org>
41         * convert.c (convert): Fold BOOLEAN_TYPE types to the proper variant.
43 2012-03-09  Steven Bosscher  <steven@gcc.gnu.org>
45         * Make-lang.in (convert.o): Depend on convert.h.
46         * convert.c: Header and comment cleanups.
47         (gfc_thruthvalue_conversion): Rename static function
48         to truthvalue_conversion.  Do not use 'internal_error' from here,
49         use 'gcc_unreachable' instead.
50         (convert): Do not use 'error' for conversions to void, use
51         'gcc_unreachable' instead.  Likewise for conversions to non-scalar
52         types.  Do not hanlde ENUMERAL_TYPE, the front end never creates them.
53         Clean up #if 0 code.
55 2012-03-08  Tobias Burnus  <burnus@net-b.de>
57         PR fortran/52469
58         * trans-types.c (gfc_get_function_type): Handle backend_decl
59         of a procedure pointer.
61 2012-03-06  Steven Bosscher  <steven@gcc.gnu.org>
63         * f95-lang.c (yyerror, yylex): Remove.
64         (clear_binding_stack): Remove, fold into its only user.
65         (LANG_HOOKS_PRINT_IDENTIFIER): Do not re-define.
66         (ridpointers): Remove.
67         (gfc_eh_initialized_p): Make static.
68         (gfc_truthvalue_conversion): Move to convert.c.
69         (gfc_be_parse_file): Clear binding level stack when done.
70         (gfc_print_identifier): Remove.
71         (pushlevel): Remove ignored 'ignore' argument.  Update all callers.
72         (poplevel): Remove unused 'reverse' argument.  Update all callers.
73         (ggc_p): Remove.
74         (gfc_builtin_function): Make static. Do not attempt to make RTL for
75         builtin functions.
76         * convert.c (gfc_truthvalue_conversion): Moved here from f95-lang.c,
77         and made static.
78         * trans.h (pushlevel, poplevel): Adjust prototypes.
79         (gfc_truthvalue_conversion, gfc_builtin_function): Remove prototypes.
80         * trans-openmp.c: Update calls to pushlevel and poplevel.
81         * trans.c: Likewise.
82         * trans-decl.c: Likewise.
84 2012-03-04  Mikael Morin  <mikael@gcc.gnu.org>
86         PR fortran/50981
87         * gfortran.h (gfc_is_class_container_ref): New prototype.
88         * class.c (gfc_is_class_container_ref): New function.
89         * trans-expr.c (gfc_conv_procedure_call): Add a "_data" component
90         reference to polymorphic actual arguments.
92 2012-03-04  Mikael Morin  <mikael@gcc.gnu.org>
94         PR fortran/50981
95         * trans-expr.c (gfc_conv_procedure_call): Save se->ss's value. 
96         Handle the case of unallocated arrays passed to elemental procedures.
98 2012-03-04  Mikael Morin  <mikael@gcc.gnu.org>
100         * trans.h (struct gfc_ss_info): Move can_be_null_ref component from
101         the data::scalar subcomponent to the toplevel.
102         * trans-expr.c (gfc_conv_expr): Update component reference.
103         * trans-array.c (gfc_add_loop_ss_code): Ditto.
104         (gfc_walk_elemental_function_args): Ditto.  Move the conditional setting
105         the field out of the scalar-only block.
107 2012-03-04  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
109         PR fortran/36160
110         * error.c (gfc_widechar_display_length, gfc_wide_display_length):
111         New functions.
112         (print_wide_char_into_buffer): Return length written.
113         (show_locus): Fix locus displayed when wide characters are present.
115 2012-03-04  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
117         * module.c (gfc_use_module): Improve error message some more.
119 2012-03-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
121         PR fortran/52313
122         * module.c (gfc_use_module): Improve error messages.
124 2012-03-03  Tobias Burnus  <burnus@net-b.de>
126         PR fortran/48820
127         * resolve.c (resolve_actual_arglist): Properly reset
128         assumed_type_expr_allowed.
130 2012-03-03  Tobias Burnus  <burnus@net-b.de>
132         * lang.opt (Wc-binding-type): New flag.
133         * options.c (gfc_init_options, gfc_handle_option): Handle it.
134         * invoke.texi (Wc-binding-type): Document it.
135         * gfortran.h (gfc_option_t): Add warn_c_binding_type.
136         * decl.c (verify_bind_c_sym): Handle -Wc-binding-type.
137         * symbol.c (gfc_set_default_type, verify_bind_c_derived_type):
138         Ditto.
140 2012-03-03  Tobias Burnus  <burnus@net-b.de>
142         PR fortran/48820
143         * decl.c (gfc_match_decl_type_spec): Support type(*).
144         (gfc_verify_c_interop): Allow type(*).
145         * dump-parse-tree.c (show_typespec): Handle type(*).
146         * expr.c (gfc_copy_expr): Ditto.
147         * interface.c (compare_type_rank, compare_parameter,
148         compare_actual_formal, gfc_procedure_use): Ditto.
149         * libgfortran.h (bt): Add BT_ASSUMED.
150         * misc.c (gfc_basic_typename, gfc_typename): Handle type(*).
151         * module.c (bt_types): Ditto.
152         * resolve.c (assumed_type_expr_allowed): New static variable.
153         (resolve_actual_arglist, resolve_variable, resolve_symbol):
154         Handle type(*). 
155         * trans-expr.c (gfc_conv_procedure_call): Ditto.
156         * trans-types.c (gfc_typenode_for_spec, gfc_get_dtype): Ditto.
158 2012-03-02  Tobias Burnus  <burnus@net-b.de>
160         PR fortran/52325
161         * primary.c (gfc_match_varspec): Add missing ;.
163 2012-03-02  Tobias Burnus  <burnus@net-b.de>
165         PR fortran/52325
166         * primary.c (gfc_match_varspec): Add diagnostic for % with
167         nonderived types.
169 2012-03-02  Tobias Burnus  <burnus@net-b.de>
171         PR fortran/52270
172         * expr.c (gfc_check_vardef_context): Fix check for
173         intent-in polymorphic pointer .
174         * interface.c (compare_parameter): Allow passing TYPE to
175         intent-in polymorphic pointer.
177 2012-03-02  Tobias Burnus  <burnus@net-b.de>
179         PR fortran/52452
180         * resolve.c (resolve_intrinsic): Don't search for a
181         function if we know that it is a subroutine.
183 2012-02-29  Paul Thomas  <pault@gcc.gnu.org>
185         PR fortran/52386
186         * trans-expr.c (fcncall_realloc_result): Dereference the
187         descriptor if needed.
189 2012-02-22  Tobias Burnus  <burnus@net-b.de>
191         PR fortran/52335
192         * io.c (gfc_match_open): Remove bogus F2003 DELIM= check.
194 2012-02-18  Tobias Burnus  <burnus@net-b.de>
196         PR fortran/52295
197         * interface.c (check_interface0): Internal procs in
198         generic interfaces are allowed in Fortran 2008.
200 2012-02-17  Tobias Burnus  <burnus@net-b.de>
201             Roland Stigge  <stigge@antcom.de>
203         PR translation/52273
204         * interface.c (compare_actual_formal): Fix typo "at at".
206 2012-02-17  Tobias Burnus  <burnus@net-b.de>
208         * gfortran.texi (Q exponent-letter): Fix grammar.
210 2012-02-17  Tobias Burnus  <burnus@net-b.de>
212         * gfortran.texi (Status): Fix typos.
213         * invoke.texi (ffixed-form, fstack-arrays): Spell Fortran with
214         a majuscule.
216 2012-02-17  Tobias Burnus  <burnus@net-b.de>
217             Roland Stigge  <stigge@antcom.de>
219         PR translation/52232
220         PR translation/52234
221         PR translation/52245
222         PR translation/52246
223         PR translation/52262
224         PR translation/52273
225         * io.c (gfc_match_open): Fix typo.
226         * interface.c (compare_actual_formal): Ditto.
227         * lang.opt (freal-4-real-8, freal-4-real-16, freal-8-real-16): Ditto.
228         * match.c (alloc_opt_list, gfc_match_nullify): Ditto.
229         * check.c (gfc_check_associated, gfc_check_null): Ditto.
231 2012-02-12  Mikael Morin  <mikael@gcc.gnu.org>
233         PR fortran/50981
234         * trans-stmt.c (gfc_get_proc_ifc_for_call): New function.
235         (gfc_trans_call): Use gfc_get_proc_ifc_for_call.
237 2012-02-12  Mikael Morin  <mikael@gcc.gnu.org>
239         * trans-array.c (gfc_walk_elemental_function_args,
240         gfc_walk_function_expr): Move call to gfc_get_proc_ifc_for_expr out
241         of gfc_walk_elemental_function_args.
242         * trans-stmt.c (gfc_trans_call): Ditto.
243         * trans-array.h (gfc_get_proc_ifc_for_expr): New prototype.
244         (gfc_walk_elemental_function_args): Update prototype.
246 2012-02-12  Mikael Morin  <mikael@gcc.gnu.org>
248         * trans-array.c (gfc_get_proc_ifc_for_expr): New function.
249         (gfc_walk_elemental_function_args): Move code to
250         gfc_get_proc_ifc_for_expr and call it.
252 2012-02-08  Tobias Burnus  <burnus@net-b.de>
254         PR fortran/52151
255         * trans-expr.c (fcncall_realloc_result): Set also the stride.
257 2012-02-07  Tobias Burnus  <burnus@net-b.de>
259         PR fortran/51514
260         * trans-expr.c (gfc_conv_procedure_call): Add _data component
261         for calls of scalar CLASS actuals to TYPE dummies.
263 2012-02-05  Thomas König  <tkoenig@gcc.gnu.org>
265         PR fortran/48847
266         * trans-decl.c:  Warn about unused dummy procedure arguments
267         if -Wunused-dummy-argument is specified.  Suppress middle-end
268         warnings about procedure arguments.
270 2012-02-05  Paul Thomas  <pault@gcc.gnu.org>
272         * trans-array.c (gfc_array_allocate): Zero memory for all class
273         array allocations.
274         * trans-stmt.c (gfc_trans_allocate): Ditto for class scalars.
276         PR fortran/52102
277         * trans-stmt.c (gfc_trans_allocate): Before correcting a class
278         array reference, ensure that 'dataref' points to the _data
279         component that is followed by the array reference..
281 2012-02-02  Mikael Morin  <mikael@gcc.gnu.org>
283         PR fortran/41587
284         PR fortran/46356
285         PR fortran/51754
286         PR fortran/50981
287         * class.c (insert_component_ref, class_data_ref_missing,
288         gfc_fix_class_refs): New functions.
289         * gfortran.h (gfc_fix_class_refs): New prototype.
290         * trans-expr.c (gfc_conv_expr): Remove special case handling and call
291         gfc_fix_class_refs instead.
293 2012-02-02  Paul Thomas  <pault@gcc.gnu.org>
295         PR fortran/52012
296         * trans-expr.c (fcncall_realloc_result): If variable shape is
297         correct, retain the bounds, whatever they are.
299 2012-02-02  Tobias Burnus  <burnus@net-b.de>
301         PR fortran/52093
302         * simplify.c (gfc_simplify_size): Handle INTRINSIC_PARENTHESES.
304 2012-02-01  Thomas König  <tkoenig@gcc.gnu.org>
306         PR fortran/51958
307         * frontend-passes.c (convert_elseif):  New function.
308         (optimize_namespace):  Call it.
310 2012-02-01  Tobias Burnus  <burnus@net-b.de>
312         PR fortran/52024
313         * module.c (MOD_VERSION): Bump.
314         (mio_typebound_proc): Read/write is_operator from/to the
315         .mod file.
317 2012-02-01  Tobias Burnus  <burnus@net-b.de>
319         PR fortran/52059
320         * trans-expr.c (gfc_conv_procedure_call): Add array ref
321         only to variables.
323 2012-01-31  Tobias Burnus  <burnus@net-b.de>
325         PR fortran/52024
326         * gfortran.h (gfc_tbp_generic): Store whether the
327         generic is an operator.
328         * decl.c (gfc_match_generic): Set that flag.
329         * resolve.c (check_generic_tbp_ambiguity): Use it in the
330         gfc_compare_interfaces check.
332 2012-01-31  Tobias Burnus  <burnus@net-b.de>
334         PR fortran/52029
335         * class.c (gfc_find_derived_vtab): Mark _copy function as pure.
337 2012-01-31  Tobias Burnus  <burnus@net-b.de>
339         PR fortran/52013
340         * class.c (get_unique_hashed_string): Adapt trim length.
341         (gfc_build_class_symbol) Encode also corank in the container name.
343 2012-01-31  Paul Thomas  <pault@gcc.gnu.org>
345         PR fortran/52012
346         * trans-expr.c (fcncall_realloc_result): Correct calculation of
347         result offset.
349 2012-01-29  Janne Blomqvist  <jb@gcc.gnu.org>
351         * module.c (pointer_info): Make true_name and module pointers
352         rather than arrays, order pointers before other fields.
353         (free_pi_tree): free true_name and module as well.
354         (mio_read_string): Rename to read_string.
355         (mio_write_string): Remove.
356         (load_commons): Use read_string.
357         (read_module): Use read_string rather than mio_internal_string.
358         (write_blank_common): Call write_atom directly.
359         (write_symbol): Likewise.
361 2012-01-29  Tobias Burnus  <burnus@net-b.de>
363         PR fortran/41600
364         * expr.c (gfc_default_initializer): Convert the values if
365         the type does not match.
367 2012-01-29  Tobias Burnus  <burnus@net-b.de>
369         PR fortran/51972
370         * trans-array.c (structure_alloc_comps): Fix assignment of
371         polymorphic components (polymorphic deep copying).
373 2012-01-29  Janne Blomqvist  <jb@gcc.gnu.org>
375         PR fortran/51808
376         * decl.c (set_binding_label): Make binding_label argument const.
377         (curr_binding_label): Constify.
378         * gfortran.h (gfc_symbol): Constify binding_label.
379         (gfc_common_head): Likewise.
380         (get_iso_c_sym): Likewise.
381         * match.c (gfc_match_name_C): Constify buffer argument.
382         * match.h (gfc_match_name_C): Likewise.
383         * resolve.c (set_name_and_label): Constify binding_label argument.
384         (gfc_iso_c_sub_interface): Constify binding_label variable.
385         * symbol.c (get_iso_c_sym): Constify binding_label argument.
387 2012-01-29  Janne Blomqvist  <jb@gcc.gnu.org>
389         PR fortran/51808
390         * decl.c (set_binding_label): Move prototype from match.h to here.
391         (curr_binding_label): Make a pointer rather than static array.
392         (build_sym): Check sym->binding_label pointer rather than array,
393         update set_binding_label call, handle curr_binding_label changes.
394         (set_binding_label): Handle new curr_binding_label, dest_label
395         double ptr, and sym->binding_label.
396         (verify_bind_c_sym): Handle sym->binding_label being a pointer.
397         (set_verify_bind_c_sym): Check sym->binding_label pointer rather
398         than array, update set_binding_label call.
399         (gfc_match_bind_c_stmt): Handle curr_binding_label change.
400         (match_procedure_decl): Update set_binding_label call.
401         (gfc_match_bind_c): Change binding_label to pointer, update
402         gfc_match_name_C call.
403         * gfortran.h (GFC_MAX_BINDING_LABEL_LEN): Remove macro.
404         (gfc_symbol): Make binding_label a pointer.
405         (gfc_common_head): Likewise.
406         * match.c (gfc_match_name_C): Heap allocate bind(C) name.
407         * match.h (gfc_match_name_C): Change prototype argument.
408         (set_binding_label): Move prototype to decl.c.
409         * module.c (struct pointer_info): Make binding_label a pointer.
410         (free_pi_tree): Free unused binding_label.
411         (mio_read_string): New function.
412         (mio_write_string): New function.
413         (load_commons): Redo reading of binding_label.
414         (read_module): Likewise.
415         (write_common_0): Change to write empty string instead of name if
416         no binding_label.
417         (write_blank_common): Write empty string for binding label.
418         (write_symbol): Change to write empty string instead of name if no
419         binding_label.
420         * resolve.c (gfc_iso_c_func_interface): Don't set binding_label.
421         (set_name_and_label): Make binding_label double pointer, use
422         asprintf.
423         (gfc_iso_c_sub_interface): Make binding_label a pointer.
424         (resolve_bind_c_comms): Handle cases if
425         gfc_common_head->binding_label is NULL.
426         (gfc_verify_binding_labels): sym->binding_label is a pointer.
427         * symbol.c (gfc_new_symbol): Rely on XCNEW zero init for
428         binding_label.
429         (gen_special_c_interop_ptr): Don't set binding label.
430         (generate_isocbinding_symbol): Insert binding_label into symbol
431         table.
432         (get_iso_c_sym): Use pointer assignment instead of strcpy.
433         * trans-common.c (gfc_sym_mangled_common_id): Handle
434         com->binding_label being a pointer.
435         * trans-decl.c (gfc_sym_mangled_identifier): Handle
436         sym->binding_label being a pointer.
437         (gfc_sym_mangled_function_id): Likewise.
439 2012-01-29  Tobias Burnus  <burnus@net-b.de>
441         PR fortran/52038
442         * resolve.c (symbol_as): Remove unused, accidentally
443         added function.
445 2012-01-28  Tobias Burnus  <burnus@net-b.de>
447         PR fortran/51972
448         * trans-stmt.c (gfc_trans_allocate): Properly check whether
449         we have a BT_CLASS which needs to be memset.
451 2012-01-27  Tobias Burnus  <burnus@net-b.de>
453         PR fortran/52022
454         * trans-expr.c (gfc_conv_procedure_call): Fix passing
455         of functions, which return allocatables.
457 2012-01-27  Tobias Burnus  <burnus@net-b.de>
459         PR fortran/52016
460         * resolve.c (resolve_formal_arglist): Fix elemental
461         constraint checks for polymorphic dummies also for
462         pointers.
464 2012-01-27  Tobias Burnus  <burnus@net-b.de>
466         PR fortran/51970
467         PR fortran/51977
468         * primary.c (gfc_match_varspec. gfc_match_rvalue): Set
469         handle array spec for BT_CLASS.
470         * expr.c (gfc_get_variable_expr, gfc_lval_expr_from_sym)
471         * frontend-passes.c (create_var): Ditto.
472         * resolve.c (resolve_actual_arglist, resolve_assoc_var): Ditto.
473         * trans-decl.c (gfc_trans_deferred_vars): Use class_pointer
474         instead of attr.pointer.
475         (gfc_generate_function_code): Use CLASS_DATA (sym) for BT_CLASS.
476         * trans-intrinsic.c (conv_intrinsic_move_alloc): Move assert.
477         * trans-stmt.c (trans_associate_var): Ask for the descriptor.
479 2012-01-27  Tobias Burnus  <burnus@net-b.de>
481         PR fortran/51953
482         * match.c (gfc_match_allocate): Allow more than allocate
483         object with SOURCE=.
485 2012-01-27  Tobias Burnus  <burnus@net-b.de>
487         PR fortran/52016
488         * resolve.c (resolve_formal_arglist): Fix elemental
489         constraint checks for polymorphic dummies.
491 2012-01-27  Paul Thomas  <pault@gcc.gnu.org>
492             Tobias Burnus <burnus@gcc.gnu.org>
494         PR fortran/48705
495         PR fortran/51870
496         PR fortran/51943
497         PR fortran/51946
498         * trans-array.c (gfc_array_init_size): Add two extra arguments
499         to convey the dynamic element size of a calls object and to
500         return the number of elements that have been allocated.
501         (gfc_array_allocate): Add the same arguments and use them to
502         call gfc_array_init_size.  Before the allocation dereference
503         the data pointer, if necessary. Set the allocated array to zero
504         if the class element size or expr3 are non-null.
505         * trans-expr.c (gfc_conv_class_to_class): Give this function
506         global scope.
507         (get_class_array_ref): New function.
508         (gfc_copy_class_to_class): New function.
509         * trans-array.h : Update prototype for gfc_array_allocate.
510         * trans-stmt.c (gfc_trans_allocate): For non-variable class
511         STATUS expressions extract the class object and the dynamic
512         element size. Use the latter to call gfc_array_allocate and
513         the former for setting the vptr and, via
514         gfc_copy_class_to_clasfc_cs, to copy to the allocated data.
515         * trans.h : Prototypes for gfc_get_class_array_ref,
516         gfc_copy_class_to_class and gfc_conv_class_to_class.
518 2012-01-25  Tobias Burnus  <burnus@net-b.de>
520         * resolve.c (symbol_as): Check also for attr.class_ok.
522 2012-01-25  Tobias Burnus  <burnus@net-b.de>
524         PR fortran/51995
525         * class.c (gfc_build_class_symbol): Fix invalid freeing
526         issue with fclass->f2k_derived.
528 2012-01-25  Tobias Burnus  <burnus@net-b.de>
530         PR fortran/51995
531         * class.c (gfc_build_class_symbol): Ensure that
532         fclass->f2k_derived is set.
534 2012-01-25  Tobias Burnus  <burnus@net-b.de>
536         PR fortran/51966
537         * resolve.c (resolve_structure_cons): Only create an
538         array constructors for nonscalars.
540 2012-01-23  Tobias Burnus  <burnus@net-b.de>
542         PR fortran/51948
543         * check.c (variable_check): Fix checking for
544          variables and deeply nested BLOCKs.
546 2012-01-21  Tobias Burnus  <burnus@net-b.de>
547             Steven G. Kargl  <kargl@gcc.gnu.org>
549         PR fortran/50556
550         * symbol.c (check_conflict): namelist-group-name cannot have the SAVE
551         attribute.
553 2012-01-21  Tobias Burnus  <burnus@net-b.de>
555         PR fortran/51913
556         * interface.c (compare_parameter): Fix CLASS comparison.
558 2012-01-20  Tobias Burnus  <burnus@net-b.de>
559             Janus Weil  <janus@gcc.gnu.org>
561         PR fortran/51056
562         * module.c (load_needed, read_module): Don't mark __vtab etc.
563         as use_only.
565 2012-01-19  Tobias Burnus  <burnus@net-b.de>
567         PR fortran/51904
568         * expr.c (gfc_build_intrinsic_call): Also set the symtree.
570 2012-01-18  Paul Thomas  <pault@gcc.gnu.org>
572         PR fortran/51634
573         * trans-expr.c (gfc_conv_procedure_call): Deallocate allocatable
574         components of temporary class arguments.
576 2012-01-17  Tobias Burnus  <burnus@net-b.de>
577             Janne Blomqvist  <jb@gcc.gnu.org>
579         PR fortran/51869
580         * trans-expr.c (alloc_scalar_allocatable_for_assignment): Nullify
581         LHS after allocation, if it has allocatable components.
582         * f95-lang.c (gfc_init_builtin_functions): Add BUILT_IN_CALLOC.
584 2012-01-16  Mikael Morin  <mikael@gcc.gnu.org>
585             Tobias Burnus  <burnus@net-b.de>
587         PR fortran/50981
588         * trans-array.c (gfc_walk_elemental_function_args): Fix
589         passing of deallocated allocatables/pointers as absent argument. 
591 2012-01-16  Tobias Burnus  <burnus@net-b.de>
593         PR fortran/51809
594         * class.c (gfc_find_derived_vtab): Mark __vtab and
595         __def_init as FL_VARIABLE not as FL_PARAMETER.
596         * expr.c (gfc_simplify_expr): Remove special
597         handling of __vtab.
598         * resolve.c (resolve_values): Ditto.
599         * trans-decl.c (gfc_get_symbol_decl): Mark __vtab
600         and __def_init as TREE_READONLY.
602 2012-01-16  Zydrunas Gimbutas  <gimbutas@cims.nyu.edu>
603         Andreas Kloeckner  <kloeckner@cims.nyu.edu>
604         Steven G. Kargl  <kargl@gcc.gnu.org>
606         PR fortran/48426
607         * gfortran.h (gfc_option_t): Add members flag_*_kind to store kind.
608         * lang.opt: Add options -freal-4-real-8, -freal-4-real-10,
609         -freal-4-real-16, -freal-8-real-4, -freal-8-real-10, -freal-8-real-16
610         and -finteger-4-integer-8. User-desired type conversion information.
611         * decl.c (gfc_match_old_kind_spec,kind_expr): Type conversions
612         in declaration parsing.
613         * trans-types.c (gfc_init_kinds): User-specified type conversion
614         checked for current backend.
615         * primary.c (match_integer_constant,match_real_constant): Implement
616         type conversion in constant parsing.
617         * options.c (gfc_init_options,gfc_handle_option): Translate input
618         options to flags in internal options data structure.
619         * invoke.texi: Document new options.  Re-order options in Options
620         summary section.
622 2012-01-16  Paul Thomas  <pault@gcc.gnu.org>
624         * trans-array.c (gfc_trans_create_temp_array): In the case of a
625         class array temporary, detect a null 'eltype' on entry and use 
626         'initial' to provde the class reference and so, through the
627         vtable, the element size for the dynamic type.
628         * trans-stmt.c (gfc_conv_elemental_dependencies): For class
629         expressions, set 'eltype' to null and pass the values via the
630         'initial' expression.
632 2012-01-14  Tobias Burnus  <burnus@net-b.de>
634         PR fortran/51800
635         * resolve.c (build_default_init_expr): Also initialize
636         nonconstant-length strings with -finit-character=<n>.
638 2011-01-14  Tobias Burnus  <burnus@net-b.de>
640         PR fortran/51816
641         * module.c (read_module): Don't make nonexisting
642         intrinsic operators as found.
643         (rename_list_remove_duplicate): New function.
644         (gfc_use_modules): Use it.
646 2012-01-13  Paul Thomas  <pault@gcc.gnu.org>
648         PR fortran/48351
649         * trans-array.c (structure_alloc_comps): Suppress interative
650         call to self, when current component is deallocated using
651         gfc_trans_dealloc_allocated.
652         * class.c (gfc_build_class_symbol): Copy the 'alloc_comp'
653         attribute from the declared type to the class structure.
655 2012-01-13  Tobias Burnus  <burnus@net-b.de>
657         PR fortran/51842
658         * fortran/trans-types.c (gfc_init_kinds): Use PTRDIFF_TYPE
659         instead of a signed int of size POINTER_SIZE for
660         gfc_index_integer_kind.
662 2012-01-12  Tobias Burnus  <burnus@net-b.de>
664         PR fortran/36755
665         * intrinsic.texi (CHMOD): Extend a bit and remove statement
666         that /bin/chmod is called.
668 2012-01-10  Gerald Pfeifer  <gerald@pfeifer.com>
670         * gfortran.texi (Fortran 2003 Status): Fix grammar.
672 2012-01-10  Tobias Burnus  <burnus@net-b.de>
674         PR fortran/51652
675         * resolve.c (resolve_allocate_expr): For non-deferred char lengths,
676         check whether type-spec matches declaration.
678 2012-01-10  Tobias Burnus  <burnus@net-b.de>
680         * resolve.c (resolve_ordinary_assign): Improve error wording.
682 2012-01-09  Paul Thomas  <pault@gcc.gnu.org>
684         PR fortran/51791
685         * interface.c (matching_typebound_op): Drill down through
686         possible parentheses to obtain base expression. Do not test for
687         'class_ok' but, instead for the class structure components.
688         * resolve.c (resolve_ordinary_assign): Extend error message for
689         polymorphic assignment to advise checking for specific
690         subroutine.
692         PR fortran/51792
693         * resolve.c (resolve_typebound_function): Restore 'static' to
694         declaration.
696 2012-01-09  Mikael Morin  <mikael@gcc.gnu.org>
698         PR fortran/51758
699         * trans-array.c (gfc_walk_elemental_function_args):
700         Skip over NULL() actual arguments.
702 2012-01-09  Tobias Burnus  <burnus@net-b.de>
704         * gfortran.texi: Bump copyright year.
705         (Fortran 2003 Status): Update polymorphism item, add
706         item for generic interface with DT name.
708 2012-01-09  Tobias Burnus  <burnus@net-b.de>
710         PR fortran/51578
711         * gfortran.h (gfc_use_list):
712         * match.h (gfc_use_module): Rename to ...
713         (gfc_use_modules): ... this.
714         * module.c (use_locus, specified_nonint, specified_int): Remove
715         global variable.
716         (module_name): Change type to const char*, used with gfc_get_string.
717         (module_list): New global variable.
718         (free_rename): Free argument not global var.
719         (gfc_match_use): Save match to module_list.
720         (load_generic_interfaces, read_module): Don't free symtree.
721         (write_dt_extensions, gfc_dump_module): Fix module-name I/O due to the
722         type change of module_name.
723         (write_symbol0, write_generic): Optimize due to the type change.
724         (import_iso_c_binding_module, use_iso_fortran_env_module): Use
725         locus of rename->where.
726         (gfc_use_module): Take module_list as argument.
727         (gfc_use_modules): New function.
728         (gfc_module_init_2, gfc_module_done_2): Init module_list, rename_list.
729         * parse.c (last_was_use_stmt): New global variable.
730         (use_modules): New function.
731         (decode_specification_statement, decode_statement): Move USE match up
732         and call use_modules.
733         (next_free, next_fixed): Call use_modules.
734         (accept_statement): Don't call gfc_module_use.
736 2012-01-06  Tobias Burnus <burnus@net-b.de>
738         * trans-openmp.c (gfc_omp_clause_dtor, gfc_trans_omp_array_reduction):
739         Update call to gfc_trans_dealloc_allocated.
740         * trans.c (gfc_allocate_using_malloc): Fix spacing.
741         (gfc_allocate_allocatable): For gfc_allocate_using_lib, jump to
742         label_finish when an error occurs.
743         (gfc_deallocate_with_status): Call caf_deregister for -fcoarray=lib.
744         * trans.h (gfc_allocate_allocatable, gfc_deallocate_with_status):
745         Update prototype.
746         (gfor_fndecl_caf_deregister): New tree symbol.
747         * trans-expr.c (gfc_conv_procedure_call): Update
748         gfc_deallocate_with_status and gfc_trans_dealloc_allocated calls.
749         * trans-array.c (gfc_array_allocate, gfc_trans_dealloc_allocated,
750         structure_alloc_comps, gfc_trans_deferred_array): Ditto.
751         (gfc_array_deallocate): Handle coarrays with -fcoarray=lib.
752         * trans-array.h (gfc_array_deallocate, gfc_array_allocate,
753         gfc_trans_dealloc_allocated): Update prototypes.
754         * trans-stmt.c (gfc_trans_sync): Fix indentation.
755         (gfc_trans_allocate): Fix errmsg padding and label handling.
756         (gfc_trans_deallocate): Ditto and handle -fcoarray=lib.
757         * expr.c (gfc_is_coarray): Fix algorithm for BT_CLASS.
758         * libgfortran.h (GFC_STAT_STOPPED_IMAGE): Use large value
759         to avoid other stats accidentally matching this one.
760         * trans-decl.c (gfor_fndecl_caf_deregister): New global var.
761         (gfc_build_builtin_function_decls): Fix prototype decl of caf_register
762         and add decl for caf_deregister.
763         (gfc_trans_deferred_vars): Handle CAF vars with -fcoarrays=lib.
764         * trans-intrinsic.c (conv_intrinsic_move_alloc): Update call to
765         gfc_deallocate_with_status.
767 2012-01-05  Paul Thomas  <pault@gcc.gnu.org>
769         PR fortran/PR48946
770         * resolve.c (resolve_typebound_static): If the typebound
771         procedure is 'deferred' try to find the correct specific
772         procedure in the derived type operator space itself.
774 2012-01-04  Mikael Morin  <mikael@gcc.gnu.org>
776         PR fortran/50981
777         * trans-array.h (gfc_walk_elemental_function_args): New argument.
778         * trans-intrinsic.c (gfc_walk_intrinsic_function): Update call.
779         * trans-stmt.c (gfc_trans_call): Ditto.
780         * trans-array.c (gfc_walk_function_expr): Ditto.
781         (gfc_walk_elemental_function_args): Get the dummy argument list
782         if possible.  Check that the dummy and the actual argument are both
783         optional, and set can_be_null_ref accordingly.
785 2012-01-04  Mikael Morin  <mikael@gcc.gnu.org>
787         PR fortran/50981
788         * trans.h (struct gfc_ss_info): New field data::scalar::can_be_null_ref
789         * trans-array.c: If the reference can be NULL, save the reference
790         instead of the value.
791         * trans-expr.c (gfc_conv_expr): If we have saved a reference,
792         dereference it.
794 2012-01-04  Mikael Morin  <mikael@gcc.gnu.org>
796         * trans-expr.c (gfc_conv_expr): Move address taking...
797         (gfc_conv_expr_reference): ... here.
799 2012-01-04  Thomas Koenig  <tkoenig@gcc.gnu.org>
801         PR fortran/49693
802         * trans-common.c (create_common): Update copyright years.  Mark
803         variables as used to avoid warnings about unused variables in
804         common blocks.
806 2012-01-03  Hans-Peter Nilsson  <hp@axis.com>
808         * gfortran.h (struct gfc_expr): Add missing "struct"
809         qualifier for member base_expr.
811 2012-01-02  Paul Thomas  <pault@gcc.gnu.org>
813         PR fortran/51529
814         * trans-array.c (gfc_array_allocate): Null allocated memory of
815         newly allocted class arrays.
817         PR fortran/46262
818         PR fortran/46328
819         PR fortran/51052
820         * interface.c(build_compcall_for_operator): Add a type to the
821         expression.
822         * trans-expr.c (conv_base_obj_fcn_val): New function.
823         (gfc_conv_procedure_call): Use base_expr to detect non-variable
824         base objects and, ensuring that there is a temporary variable,
825         build up the typebound call using conv_base_obj_fcn_val.
826         (gfc_trans_class_assign): Pick out class procedure pointer
827         assignments and do the assignment with no further prcessing.
828         (gfc_trans_class_array_init_assign, gfc_trans_class_init_assign
829         gfc_trans_class_assign): Move to top of file.
830         * gfortran.h : Add 'base_expr' field to gfc_expr.
831         * resolve.c (get_declared_from_expr): Add 'types' argument to
832         switch checking of derived types on or off.
833         (resolve_typebound_generic_call): Set the new argument.
834         (resolve_typebound_function, resolve_typebound_subroutine):
835         Set 'types' argument for get_declared_from_expr appropriately.
836         Identify base expression, if not a variable, in the argument
837         list of class valued calls. Assign it to the 'base_expr' field
838         of the final expression. Strip away all references after the
839         last class reference.
841 2012-01-02  Tobias Burnus  <burnus@net-b.de>
843         PR fortran/51682
844         * trans-intrinsic.c (trans_this_image, trans_image_index,
845         trans_num_images, conv_intrinsic_cobound): Fold_convert the
846         caf_num_images/caf_this_images variables to the correct int kind.
848 2012-01-01  Jakub Jelinek  <jakub@redhat.com>
850         * gfortranspec.c (lang_specific_driver): Update copyright notice
851         dates.
853 Copyright (C) 2012 Free Software Foundation, Inc.
855 Copying and distribution of this file, with or without modification,
856 are permitted in any medium without royalty provided the copyright
857 notice and this notice are preserved.