1 2012-04-16 Tobias Burnus <burnus@net-b.de>
4 * expr.c (gfc_check_vardef_context): Fix assignment check for
7 2012-04-16 Janus Weil <janus@gcc.gnu.org>
10 * class.c (gfc_build_class_symbol): Make sure the 'f2k_derived'
13 2012-04-15 Janus Weil <janus@gcc.gnu.org>
16 * trans-expr.c (gfc_conv_expr_reference): Check if the expression is a
17 simple function call (or a more involved PPC reference).
19 2012-04-15 Tobias Burnus <burnus@net-b.de>
23 * gfortran.h (symbol_attribute): Add public_used.
24 * interface.c (check_sym_interfaces, check_uop_interfaces,
25 gfc_check_interfaces): Set it.
26 * resolve.c (resolve_typebound_procedure): Ditto.
27 * trans-decl.c (build_function_decl): Use it.
29 2012-04-11 Tobias Burnus <burnus@net-b.de>
32 * resolve.c (resolve_symbol): Fix searching for parent NS decl.
34 2012-04-08 Tobias Burnus <burnus@net-b.de>
37 * trans-decl.c (gfc_finish_var_decl): Don't set TREE_PUBLIC
38 for PRIVATE module variables without C-binding label.
41 * trans-decl.c (build_function_decl): Ditto for procedures.
43 2012-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
46 * frontend-passes.c: Keep track of wether we are in an implicit
47 DO loop; do not do function elimination if we are.
49 2012-04-06 Thomas Koenig <tkoenig@gcc.gnu.org>
52 * module.c: Only mark symbols as use_only if they have been
53 imported via an only list.
55 2012-03-28 Paul Thomas <pault@gcc.gnu.org>
56 Tobias Burnus <burnus@gcc.gnu.org>
59 * match.c (gfc_match_allocate, gfc_match_deallocate): Change
60 "not.. or" to "neither.. nor".
61 * parse.c (decode_specification_statement): Correct error in
62 chpice of matching function for "allocatable".
64 2012-03-23 Janne Blomqvist <jb@gcc.gnu.org>
66 * gfortran.h (GFC_MAX_LINE): Remove unused macro.
68 2012-03-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
71 * error.c (gfc_widechar_display_length): Consider tabs as
72 one character wide, as they're displayed as spaces.
73 (show_locus): Move tab handling to...
74 (print_wide_char_into_buffer): ... here.
76 2012-03-17 Tobias Burnus <burnus@net-b.de>
79 * trans-intrinsic.c (gfc_conv_associated): Fix handling of
80 procpointer dummy arguments.
82 2012-03-16 Janne Blomqvist <jb@gcc.gnu.org>
84 * trans-intrinsic.c (build_round_expr): Don't use BUILT_IN_IROUND
87 2012-03-15 Janne Blomqvist <jb@gcc.gnu.org>
89 * f95-lang.c (gfc_init_builtin_functions): Initialize
91 * mathbuiltins.def: Add IROUND.
92 * trans-intrinsic.c (build_round_expr): Use BUILT_IN_IROUND if
94 (gfc_build_intrinsic_lib_fndecls): Build iround functions.
96 2012-03-12 Richard Guenther <rguenther@suse.de>
98 * f95-lang.c (builtin_type_for_size): Use gfc_type_for_size.
100 2012-03-12 Tobias Burnus <burnus@net-b.de>
103 * decl.c (match_procedure_decl): If the interface
104 is bind(C), the procedure is as well.
106 2012-03-10 Steven Bosscher <steven@gcc.gnu.org>
108 * convert.c (convert): Fold BOOLEAN_TYPE types to the proper variant.
110 2012-03-09 Steven Bosscher <steven@gcc.gnu.org>
112 * Make-lang.in (convert.o): Depend on convert.h.
113 * convert.c: Header and comment cleanups.
114 (gfc_thruthvalue_conversion): Rename static function
115 to truthvalue_conversion. Do not use 'internal_error' from here,
116 use 'gcc_unreachable' instead.
117 (convert): Do not use 'error' for conversions to void, use
118 'gcc_unreachable' instead. Likewise for conversions to non-scalar
119 types. Do not hanlde ENUMERAL_TYPE, the front end never creates them.
122 2012-03-08 Tobias Burnus <burnus@net-b.de>
125 * trans-types.c (gfc_get_function_type): Handle backend_decl
126 of a procedure pointer.
128 2012-03-06 Steven Bosscher <steven@gcc.gnu.org>
130 * f95-lang.c (yyerror, yylex): Remove.
131 (clear_binding_stack): Remove, fold into its only user.
132 (LANG_HOOKS_PRINT_IDENTIFIER): Do not re-define.
133 (ridpointers): Remove.
134 (gfc_eh_initialized_p): Make static.
135 (gfc_truthvalue_conversion): Move to convert.c.
136 (gfc_be_parse_file): Clear binding level stack when done.
137 (gfc_print_identifier): Remove.
138 (pushlevel): Remove ignored 'ignore' argument. Update all callers.
139 (poplevel): Remove unused 'reverse' argument. Update all callers.
141 (gfc_builtin_function): Make static. Do not attempt to make RTL for
143 * convert.c (gfc_truthvalue_conversion): Moved here from f95-lang.c,
145 * trans.h (pushlevel, poplevel): Adjust prototypes.
146 (gfc_truthvalue_conversion, gfc_builtin_function): Remove prototypes.
147 * trans-openmp.c: Update calls to pushlevel and poplevel.
149 * trans-decl.c: Likewise.
151 2012-03-04 Mikael Morin <mikael@gcc.gnu.org>
154 * gfortran.h (gfc_is_class_container_ref): New prototype.
155 * class.c (gfc_is_class_container_ref): New function.
156 * trans-expr.c (gfc_conv_procedure_call): Add a "_data" component
157 reference to polymorphic actual arguments.
159 2012-03-04 Mikael Morin <mikael@gcc.gnu.org>
162 * trans-expr.c (gfc_conv_procedure_call): Save se->ss's value.
163 Handle the case of unallocated arrays passed to elemental procedures.
165 2012-03-04 Mikael Morin <mikael@gcc.gnu.org>
167 * trans.h (struct gfc_ss_info): Move can_be_null_ref component from
168 the data::scalar subcomponent to the toplevel.
169 * trans-expr.c (gfc_conv_expr): Update component reference.
170 * trans-array.c (gfc_add_loop_ss_code): Ditto.
171 (gfc_walk_elemental_function_args): Ditto. Move the conditional setting
172 the field out of the scalar-only block.
174 2012-03-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
177 * error.c (gfc_widechar_display_length, gfc_wide_display_length):
179 (print_wide_char_into_buffer): Return length written.
180 (show_locus): Fix locus displayed when wide characters are present.
182 2012-03-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
184 * module.c (gfc_use_module): Improve error message some more.
186 2012-03-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
189 * module.c (gfc_use_module): Improve error messages.
191 2012-03-03 Tobias Burnus <burnus@net-b.de>
194 * resolve.c (resolve_actual_arglist): Properly reset
195 assumed_type_expr_allowed.
197 2012-03-03 Tobias Burnus <burnus@net-b.de>
199 * lang.opt (Wc-binding-type): New flag.
200 * options.c (gfc_init_options, gfc_handle_option): Handle it.
201 * invoke.texi (Wc-binding-type): Document it.
202 * gfortran.h (gfc_option_t): Add warn_c_binding_type.
203 * decl.c (verify_bind_c_sym): Handle -Wc-binding-type.
204 * symbol.c (gfc_set_default_type, verify_bind_c_derived_type):
207 2012-03-03 Tobias Burnus <burnus@net-b.de>
210 * decl.c (gfc_match_decl_type_spec): Support type(*).
211 (gfc_verify_c_interop): Allow type(*).
212 * dump-parse-tree.c (show_typespec): Handle type(*).
213 * expr.c (gfc_copy_expr): Ditto.
214 * interface.c (compare_type_rank, compare_parameter,
215 compare_actual_formal, gfc_procedure_use): Ditto.
216 * libgfortran.h (bt): Add BT_ASSUMED.
217 * misc.c (gfc_basic_typename, gfc_typename): Handle type(*).
218 * module.c (bt_types): Ditto.
219 * resolve.c (assumed_type_expr_allowed): New static variable.
220 (resolve_actual_arglist, resolve_variable, resolve_symbol):
222 * trans-expr.c (gfc_conv_procedure_call): Ditto.
223 * trans-types.c (gfc_typenode_for_spec, gfc_get_dtype): Ditto.
225 2012-03-02 Tobias Burnus <burnus@net-b.de>
228 * primary.c (gfc_match_varspec): Add missing ;.
230 2012-03-02 Tobias Burnus <burnus@net-b.de>
233 * primary.c (gfc_match_varspec): Add diagnostic for % with
236 2012-03-02 Tobias Burnus <burnus@net-b.de>
239 * expr.c (gfc_check_vardef_context): Fix check for
240 intent-in polymorphic pointer .
241 * interface.c (compare_parameter): Allow passing TYPE to
242 intent-in polymorphic pointer.
244 2012-03-02 Tobias Burnus <burnus@net-b.de>
247 * resolve.c (resolve_intrinsic): Don't search for a
248 function if we know that it is a subroutine.
250 2012-02-29 Paul Thomas <pault@gcc.gnu.org>
253 * trans-expr.c (fcncall_realloc_result): Dereference the
254 descriptor if needed.
256 2012-02-22 Tobias Burnus <burnus@net-b.de>
259 * io.c (gfc_match_open): Remove bogus F2003 DELIM= check.
261 2012-02-18 Tobias Burnus <burnus@net-b.de>
264 * interface.c (check_interface0): Internal procs in
265 generic interfaces are allowed in Fortran 2008.
267 2012-02-17 Tobias Burnus <burnus@net-b.de>
268 Roland Stigge <stigge@antcom.de>
271 * interface.c (compare_actual_formal): Fix typo "at at".
273 2012-02-17 Tobias Burnus <burnus@net-b.de>
275 * gfortran.texi (Q exponent-letter): Fix grammar.
277 2012-02-17 Tobias Burnus <burnus@net-b.de>
279 * gfortran.texi (Status): Fix typos.
280 * invoke.texi (ffixed-form, fstack-arrays): Spell Fortran with
283 2012-02-17 Tobias Burnus <burnus@net-b.de>
284 Roland Stigge <stigge@antcom.de>
292 * io.c (gfc_match_open): Fix typo.
293 * interface.c (compare_actual_formal): Ditto.
294 * lang.opt (freal-4-real-8, freal-4-real-16, freal-8-real-16): Ditto.
295 * match.c (alloc_opt_list, gfc_match_nullify): Ditto.
296 * check.c (gfc_check_associated, gfc_check_null): Ditto.
298 2012-02-12 Mikael Morin <mikael@gcc.gnu.org>
301 * trans-stmt.c (gfc_get_proc_ifc_for_call): New function.
302 (gfc_trans_call): Use gfc_get_proc_ifc_for_call.
304 2012-02-12 Mikael Morin <mikael@gcc.gnu.org>
306 * trans-array.c (gfc_walk_elemental_function_args,
307 gfc_walk_function_expr): Move call to gfc_get_proc_ifc_for_expr out
308 of gfc_walk_elemental_function_args.
309 * trans-stmt.c (gfc_trans_call): Ditto.
310 * trans-array.h (gfc_get_proc_ifc_for_expr): New prototype.
311 (gfc_walk_elemental_function_args): Update prototype.
313 2012-02-12 Mikael Morin <mikael@gcc.gnu.org>
315 * trans-array.c (gfc_get_proc_ifc_for_expr): New function.
316 (gfc_walk_elemental_function_args): Move code to
317 gfc_get_proc_ifc_for_expr and call it.
319 2012-02-08 Tobias Burnus <burnus@net-b.de>
322 * trans-expr.c (fcncall_realloc_result): Set also the stride.
324 2012-02-07 Tobias Burnus <burnus@net-b.de>
327 * trans-expr.c (gfc_conv_procedure_call): Add _data component
328 for calls of scalar CLASS actuals to TYPE dummies.
330 2012-02-05 Thomas König <tkoenig@gcc.gnu.org>
333 * trans-decl.c: Warn about unused dummy procedure arguments
334 if -Wunused-dummy-argument is specified. Suppress middle-end
335 warnings about procedure arguments.
337 2012-02-05 Paul Thomas <pault@gcc.gnu.org>
339 * trans-array.c (gfc_array_allocate): Zero memory for all class
341 * trans-stmt.c (gfc_trans_allocate): Ditto for class scalars.
344 * trans-stmt.c (gfc_trans_allocate): Before correcting a class
345 array reference, ensure that 'dataref' points to the _data
346 component that is followed by the array reference..
348 2012-02-02 Mikael Morin <mikael@gcc.gnu.org>
354 * class.c (insert_component_ref, class_data_ref_missing,
355 gfc_fix_class_refs): New functions.
356 * gfortran.h (gfc_fix_class_refs): New prototype.
357 * trans-expr.c (gfc_conv_expr): Remove special case handling and call
358 gfc_fix_class_refs instead.
360 2012-02-02 Paul Thomas <pault@gcc.gnu.org>
363 * trans-expr.c (fcncall_realloc_result): If variable shape is
364 correct, retain the bounds, whatever they are.
366 2012-02-02 Tobias Burnus <burnus@net-b.de>
369 * simplify.c (gfc_simplify_size): Handle INTRINSIC_PARENTHESES.
371 2012-02-01 Thomas König <tkoenig@gcc.gnu.org>
374 * frontend-passes.c (convert_elseif): New function.
375 (optimize_namespace): Call it.
377 2012-02-01 Tobias Burnus <burnus@net-b.de>
380 * module.c (MOD_VERSION): Bump.
381 (mio_typebound_proc): Read/write is_operator from/to the
384 2012-02-01 Tobias Burnus <burnus@net-b.de>
387 * trans-expr.c (gfc_conv_procedure_call): Add array ref
390 2012-01-31 Tobias Burnus <burnus@net-b.de>
393 * gfortran.h (gfc_tbp_generic): Store whether the
394 generic is an operator.
395 * decl.c (gfc_match_generic): Set that flag.
396 * resolve.c (check_generic_tbp_ambiguity): Use it in the
397 gfc_compare_interfaces check.
399 2012-01-31 Tobias Burnus <burnus@net-b.de>
402 * class.c (gfc_find_derived_vtab): Mark _copy function as pure.
404 2012-01-31 Tobias Burnus <burnus@net-b.de>
407 * class.c (get_unique_hashed_string): Adapt trim length.
408 (gfc_build_class_symbol) Encode also corank in the container name.
410 2012-01-31 Paul Thomas <pault@gcc.gnu.org>
413 * trans-expr.c (fcncall_realloc_result): Correct calculation of
416 2012-01-29 Janne Blomqvist <jb@gcc.gnu.org>
418 * module.c (pointer_info): Make true_name and module pointers
419 rather than arrays, order pointers before other fields.
420 (free_pi_tree): free true_name and module as well.
421 (mio_read_string): Rename to read_string.
422 (mio_write_string): Remove.
423 (load_commons): Use read_string.
424 (read_module): Use read_string rather than mio_internal_string.
425 (write_blank_common): Call write_atom directly.
426 (write_symbol): Likewise.
428 2012-01-29 Tobias Burnus <burnus@net-b.de>
431 * expr.c (gfc_default_initializer): Convert the values if
432 the type does not match.
434 2012-01-29 Tobias Burnus <burnus@net-b.de>
437 * trans-array.c (structure_alloc_comps): Fix assignment of
438 polymorphic components (polymorphic deep copying).
440 2012-01-29 Janne Blomqvist <jb@gcc.gnu.org>
443 * decl.c (set_binding_label): Make binding_label argument const.
444 (curr_binding_label): Constify.
445 * gfortran.h (gfc_symbol): Constify binding_label.
446 (gfc_common_head): Likewise.
447 (get_iso_c_sym): Likewise.
448 * match.c (gfc_match_name_C): Constify buffer argument.
449 * match.h (gfc_match_name_C): Likewise.
450 * resolve.c (set_name_and_label): Constify binding_label argument.
451 (gfc_iso_c_sub_interface): Constify binding_label variable.
452 * symbol.c (get_iso_c_sym): Constify binding_label argument.
454 2012-01-29 Janne Blomqvist <jb@gcc.gnu.org>
457 * decl.c (set_binding_label): Move prototype from match.h to here.
458 (curr_binding_label): Make a pointer rather than static array.
459 (build_sym): Check sym->binding_label pointer rather than array,
460 update set_binding_label call, handle curr_binding_label changes.
461 (set_binding_label): Handle new curr_binding_label, dest_label
462 double ptr, and sym->binding_label.
463 (verify_bind_c_sym): Handle sym->binding_label being a pointer.
464 (set_verify_bind_c_sym): Check sym->binding_label pointer rather
465 than array, update set_binding_label call.
466 (gfc_match_bind_c_stmt): Handle curr_binding_label change.
467 (match_procedure_decl): Update set_binding_label call.
468 (gfc_match_bind_c): Change binding_label to pointer, update
469 gfc_match_name_C call.
470 * gfortran.h (GFC_MAX_BINDING_LABEL_LEN): Remove macro.
471 (gfc_symbol): Make binding_label a pointer.
472 (gfc_common_head): Likewise.
473 * match.c (gfc_match_name_C): Heap allocate bind(C) name.
474 * match.h (gfc_match_name_C): Change prototype argument.
475 (set_binding_label): Move prototype to decl.c.
476 * module.c (struct pointer_info): Make binding_label a pointer.
477 (free_pi_tree): Free unused binding_label.
478 (mio_read_string): New function.
479 (mio_write_string): New function.
480 (load_commons): Redo reading of binding_label.
481 (read_module): Likewise.
482 (write_common_0): Change to write empty string instead of name if
484 (write_blank_common): Write empty string for binding label.
485 (write_symbol): Change to write empty string instead of name if no
487 * resolve.c (gfc_iso_c_func_interface): Don't set binding_label.
488 (set_name_and_label): Make binding_label double pointer, use
490 (gfc_iso_c_sub_interface): Make binding_label a pointer.
491 (resolve_bind_c_comms): Handle cases if
492 gfc_common_head->binding_label is NULL.
493 (gfc_verify_binding_labels): sym->binding_label is a pointer.
494 * symbol.c (gfc_new_symbol): Rely on XCNEW zero init for
496 (gen_special_c_interop_ptr): Don't set binding label.
497 (generate_isocbinding_symbol): Insert binding_label into symbol
499 (get_iso_c_sym): Use pointer assignment instead of strcpy.
500 * trans-common.c (gfc_sym_mangled_common_id): Handle
501 com->binding_label being a pointer.
502 * trans-decl.c (gfc_sym_mangled_identifier): Handle
503 sym->binding_label being a pointer.
504 (gfc_sym_mangled_function_id): Likewise.
506 2012-01-29 Tobias Burnus <burnus@net-b.de>
509 * resolve.c (symbol_as): Remove unused, accidentally
512 2012-01-28 Tobias Burnus <burnus@net-b.de>
515 * trans-stmt.c (gfc_trans_allocate): Properly check whether
516 we have a BT_CLASS which needs to be memset.
518 2012-01-27 Tobias Burnus <burnus@net-b.de>
521 * trans-expr.c (gfc_conv_procedure_call): Fix passing
522 of functions, which return allocatables.
524 2012-01-27 Tobias Burnus <burnus@net-b.de>
527 * resolve.c (resolve_formal_arglist): Fix elemental
528 constraint checks for polymorphic dummies also for
531 2012-01-27 Tobias Burnus <burnus@net-b.de>
535 * primary.c (gfc_match_varspec. gfc_match_rvalue): Set
536 handle array spec for BT_CLASS.
537 * expr.c (gfc_get_variable_expr, gfc_lval_expr_from_sym)
538 * frontend-passes.c (create_var): Ditto.
539 * resolve.c (resolve_actual_arglist, resolve_assoc_var): Ditto.
540 * trans-decl.c (gfc_trans_deferred_vars): Use class_pointer
541 instead of attr.pointer.
542 (gfc_generate_function_code): Use CLASS_DATA (sym) for BT_CLASS.
543 * trans-intrinsic.c (conv_intrinsic_move_alloc): Move assert.
544 * trans-stmt.c (trans_associate_var): Ask for the descriptor.
546 2012-01-27 Tobias Burnus <burnus@net-b.de>
549 * match.c (gfc_match_allocate): Allow more than allocate
552 2012-01-27 Tobias Burnus <burnus@net-b.de>
555 * resolve.c (resolve_formal_arglist): Fix elemental
556 constraint checks for polymorphic dummies.
558 2012-01-27 Paul Thomas <pault@gcc.gnu.org>
559 Tobias Burnus <burnus@gcc.gnu.org>
565 * trans-array.c (gfc_array_init_size): Add two extra arguments
566 to convey the dynamic element size of a calls object and to
567 return the number of elements that have been allocated.
568 (gfc_array_allocate): Add the same arguments and use them to
569 call gfc_array_init_size. Before the allocation dereference
570 the data pointer, if necessary. Set the allocated array to zero
571 if the class element size or expr3 are non-null.
572 * trans-expr.c (gfc_conv_class_to_class): Give this function
574 (get_class_array_ref): New function.
575 (gfc_copy_class_to_class): New function.
576 * trans-array.h : Update prototype for gfc_array_allocate.
577 * trans-stmt.c (gfc_trans_allocate): For non-variable class
578 STATUS expressions extract the class object and the dynamic
579 element size. Use the latter to call gfc_array_allocate and
580 the former for setting the vptr and, via
581 gfc_copy_class_to_clasfc_cs, to copy to the allocated data.
582 * trans.h : Prototypes for gfc_get_class_array_ref,
583 gfc_copy_class_to_class and gfc_conv_class_to_class.
585 2012-01-25 Tobias Burnus <burnus@net-b.de>
587 * resolve.c (symbol_as): Check also for attr.class_ok.
589 2012-01-25 Tobias Burnus <burnus@net-b.de>
592 * class.c (gfc_build_class_symbol): Fix invalid freeing
593 issue with fclass->f2k_derived.
595 2012-01-25 Tobias Burnus <burnus@net-b.de>
598 * class.c (gfc_build_class_symbol): Ensure that
599 fclass->f2k_derived is set.
601 2012-01-25 Tobias Burnus <burnus@net-b.de>
604 * resolve.c (resolve_structure_cons): Only create an
605 array constructors for nonscalars.
607 2012-01-23 Tobias Burnus <burnus@net-b.de>
610 * check.c (variable_check): Fix checking for
611 variables and deeply nested BLOCKs.
613 2012-01-21 Tobias Burnus <burnus@net-b.de>
614 Steven G. Kargl <kargl@gcc.gnu.org>
617 * symbol.c (check_conflict): namelist-group-name cannot have the SAVE
620 2012-01-21 Tobias Burnus <burnus@net-b.de>
623 * interface.c (compare_parameter): Fix CLASS comparison.
625 2012-01-20 Tobias Burnus <burnus@net-b.de>
626 Janus Weil <janus@gcc.gnu.org>
629 * module.c (load_needed, read_module): Don't mark __vtab etc.
632 2012-01-19 Tobias Burnus <burnus@net-b.de>
635 * expr.c (gfc_build_intrinsic_call): Also set the symtree.
637 2012-01-18 Paul Thomas <pault@gcc.gnu.org>
640 * trans-expr.c (gfc_conv_procedure_call): Deallocate allocatable
641 components of temporary class arguments.
643 2012-01-17 Tobias Burnus <burnus@net-b.de>
644 Janne Blomqvist <jb@gcc.gnu.org>
647 * trans-expr.c (alloc_scalar_allocatable_for_assignment): Nullify
648 LHS after allocation, if it has allocatable components.
649 * f95-lang.c (gfc_init_builtin_functions): Add BUILT_IN_CALLOC.
651 2012-01-16 Mikael Morin <mikael@gcc.gnu.org>
652 Tobias Burnus <burnus@net-b.de>
655 * trans-array.c (gfc_walk_elemental_function_args): Fix
656 passing of deallocated allocatables/pointers as absent argument.
658 2012-01-16 Tobias Burnus <burnus@net-b.de>
661 * class.c (gfc_find_derived_vtab): Mark __vtab and
662 __def_init as FL_VARIABLE not as FL_PARAMETER.
663 * expr.c (gfc_simplify_expr): Remove special
665 * resolve.c (resolve_values): Ditto.
666 * trans-decl.c (gfc_get_symbol_decl): Mark __vtab
667 and __def_init as TREE_READONLY.
669 2012-01-16 Zydrunas Gimbutas <gimbutas@cims.nyu.edu>
670 Andreas Kloeckner <kloeckner@cims.nyu.edu>
671 Steven G. Kargl <kargl@gcc.gnu.org>
674 * gfortran.h (gfc_option_t): Add members flag_*_kind to store kind.
675 * lang.opt: Add options -freal-4-real-8, -freal-4-real-10,
676 -freal-4-real-16, -freal-8-real-4, -freal-8-real-10, -freal-8-real-16
677 and -finteger-4-integer-8. User-desired type conversion information.
678 * decl.c (gfc_match_old_kind_spec,kind_expr): Type conversions
679 in declaration parsing.
680 * trans-types.c (gfc_init_kinds): User-specified type conversion
681 checked for current backend.
682 * primary.c (match_integer_constant,match_real_constant): Implement
683 type conversion in constant parsing.
684 * options.c (gfc_init_options,gfc_handle_option): Translate input
685 options to flags in internal options data structure.
686 * invoke.texi: Document new options. Re-order options in Options
689 2012-01-16 Paul Thomas <pault@gcc.gnu.org>
691 * trans-array.c (gfc_trans_create_temp_array): In the case of a
692 class array temporary, detect a null 'eltype' on entry and use
693 'initial' to provde the class reference and so, through the
694 vtable, the element size for the dynamic type.
695 * trans-stmt.c (gfc_conv_elemental_dependencies): For class
696 expressions, set 'eltype' to null and pass the values via the
697 'initial' expression.
699 2012-01-14 Tobias Burnus <burnus@net-b.de>
702 * resolve.c (build_default_init_expr): Also initialize
703 nonconstant-length strings with -finit-character=<n>.
705 2011-01-14 Tobias Burnus <burnus@net-b.de>
708 * module.c (read_module): Don't make nonexisting
709 intrinsic operators as found.
710 (rename_list_remove_duplicate): New function.
711 (gfc_use_modules): Use it.
713 2012-01-13 Paul Thomas <pault@gcc.gnu.org>
716 * trans-array.c (structure_alloc_comps): Suppress interative
717 call to self, when current component is deallocated using
718 gfc_trans_dealloc_allocated.
719 * class.c (gfc_build_class_symbol): Copy the 'alloc_comp'
720 attribute from the declared type to the class structure.
722 2012-01-13 Tobias Burnus <burnus@net-b.de>
725 * fortran/trans-types.c (gfc_init_kinds): Use PTRDIFF_TYPE
726 instead of a signed int of size POINTER_SIZE for
727 gfc_index_integer_kind.
729 2012-01-12 Tobias Burnus <burnus@net-b.de>
732 * intrinsic.texi (CHMOD): Extend a bit and remove statement
733 that /bin/chmod is called.
735 2012-01-10 Gerald Pfeifer <gerald@pfeifer.com>
737 * gfortran.texi (Fortran 2003 Status): Fix grammar.
739 2012-01-10 Tobias Burnus <burnus@net-b.de>
742 * resolve.c (resolve_allocate_expr): For non-deferred char lengths,
743 check whether type-spec matches declaration.
745 2012-01-10 Tobias Burnus <burnus@net-b.de>
747 * resolve.c (resolve_ordinary_assign): Improve error wording.
749 2012-01-09 Paul Thomas <pault@gcc.gnu.org>
752 * interface.c (matching_typebound_op): Drill down through
753 possible parentheses to obtain base expression. Do not test for
754 'class_ok' but, instead for the class structure components.
755 * resolve.c (resolve_ordinary_assign): Extend error message for
756 polymorphic assignment to advise checking for specific
760 * resolve.c (resolve_typebound_function): Restore 'static' to
763 2012-01-09 Mikael Morin <mikael@gcc.gnu.org>
766 * trans-array.c (gfc_walk_elemental_function_args):
767 Skip over NULL() actual arguments.
769 2012-01-09 Tobias Burnus <burnus@net-b.de>
771 * gfortran.texi: Bump copyright year.
772 (Fortran 2003 Status): Update polymorphism item, add
773 item for generic interface with DT name.
775 2012-01-09 Tobias Burnus <burnus@net-b.de>
778 * gfortran.h (gfc_use_list):
779 * match.h (gfc_use_module): Rename to ...
780 (gfc_use_modules): ... this.
781 * module.c (use_locus, specified_nonint, specified_int): Remove
783 (module_name): Change type to const char*, used with gfc_get_string.
784 (module_list): New global variable.
785 (free_rename): Free argument not global var.
786 (gfc_match_use): Save match to module_list.
787 (load_generic_interfaces, read_module): Don't free symtree.
788 (write_dt_extensions, gfc_dump_module): Fix module-name I/O due to the
789 type change of module_name.
790 (write_symbol0, write_generic): Optimize due to the type change.
791 (import_iso_c_binding_module, use_iso_fortran_env_module): Use
792 locus of rename->where.
793 (gfc_use_module): Take module_list as argument.
794 (gfc_use_modules): New function.
795 (gfc_module_init_2, gfc_module_done_2): Init module_list, rename_list.
796 * parse.c (last_was_use_stmt): New global variable.
797 (use_modules): New function.
798 (decode_specification_statement, decode_statement): Move USE match up
799 and call use_modules.
800 (next_free, next_fixed): Call use_modules.
801 (accept_statement): Don't call gfc_module_use.
803 2012-01-06 Tobias Burnus <burnus@net-b.de>
805 * trans-openmp.c (gfc_omp_clause_dtor, gfc_trans_omp_array_reduction):
806 Update call to gfc_trans_dealloc_allocated.
807 * trans.c (gfc_allocate_using_malloc): Fix spacing.
808 (gfc_allocate_allocatable): For gfc_allocate_using_lib, jump to
809 label_finish when an error occurs.
810 (gfc_deallocate_with_status): Call caf_deregister for -fcoarray=lib.
811 * trans.h (gfc_allocate_allocatable, gfc_deallocate_with_status):
813 (gfor_fndecl_caf_deregister): New tree symbol.
814 * trans-expr.c (gfc_conv_procedure_call): Update
815 gfc_deallocate_with_status and gfc_trans_dealloc_allocated calls.
816 * trans-array.c (gfc_array_allocate, gfc_trans_dealloc_allocated,
817 structure_alloc_comps, gfc_trans_deferred_array): Ditto.
818 (gfc_array_deallocate): Handle coarrays with -fcoarray=lib.
819 * trans-array.h (gfc_array_deallocate, gfc_array_allocate,
820 gfc_trans_dealloc_allocated): Update prototypes.
821 * trans-stmt.c (gfc_trans_sync): Fix indentation.
822 (gfc_trans_allocate): Fix errmsg padding and label handling.
823 (gfc_trans_deallocate): Ditto and handle -fcoarray=lib.
824 * expr.c (gfc_is_coarray): Fix algorithm for BT_CLASS.
825 * libgfortran.h (GFC_STAT_STOPPED_IMAGE): Use large value
826 to avoid other stats accidentally matching this one.
827 * trans-decl.c (gfor_fndecl_caf_deregister): New global var.
828 (gfc_build_builtin_function_decls): Fix prototype decl of caf_register
829 and add decl for caf_deregister.
830 (gfc_trans_deferred_vars): Handle CAF vars with -fcoarrays=lib.
831 * trans-intrinsic.c (conv_intrinsic_move_alloc): Update call to
832 gfc_deallocate_with_status.
834 2012-01-05 Paul Thomas <pault@gcc.gnu.org>
837 * resolve.c (resolve_typebound_static): If the typebound
838 procedure is 'deferred' try to find the correct specific
839 procedure in the derived type operator space itself.
841 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
844 * trans-array.h (gfc_walk_elemental_function_args): New argument.
845 * trans-intrinsic.c (gfc_walk_intrinsic_function): Update call.
846 * trans-stmt.c (gfc_trans_call): Ditto.
847 * trans-array.c (gfc_walk_function_expr): Ditto.
848 (gfc_walk_elemental_function_args): Get the dummy argument list
849 if possible. Check that the dummy and the actual argument are both
850 optional, and set can_be_null_ref accordingly.
852 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
855 * trans.h (struct gfc_ss_info): New field data::scalar::can_be_null_ref
856 * trans-array.c: If the reference can be NULL, save the reference
857 instead of the value.
858 * trans-expr.c (gfc_conv_expr): If we have saved a reference,
861 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
863 * trans-expr.c (gfc_conv_expr): Move address taking...
864 (gfc_conv_expr_reference): ... here.
866 2012-01-04 Thomas Koenig <tkoenig@gcc.gnu.org>
869 * trans-common.c (create_common): Update copyright years. Mark
870 variables as used to avoid warnings about unused variables in
873 2012-01-03 Hans-Peter Nilsson <hp@axis.com>
875 * gfortran.h (struct gfc_expr): Add missing "struct"
876 qualifier for member base_expr.
878 2012-01-02 Paul Thomas <pault@gcc.gnu.org>
881 * trans-array.c (gfc_array_allocate): Null allocated memory of
882 newly allocted class arrays.
887 * interface.c(build_compcall_for_operator): Add a type to the
889 * trans-expr.c (conv_base_obj_fcn_val): New function.
890 (gfc_conv_procedure_call): Use base_expr to detect non-variable
891 base objects and, ensuring that there is a temporary variable,
892 build up the typebound call using conv_base_obj_fcn_val.
893 (gfc_trans_class_assign): Pick out class procedure pointer
894 assignments and do the assignment with no further prcessing.
895 (gfc_trans_class_array_init_assign, gfc_trans_class_init_assign
896 gfc_trans_class_assign): Move to top of file.
897 * gfortran.h : Add 'base_expr' field to gfc_expr.
898 * resolve.c (get_declared_from_expr): Add 'types' argument to
899 switch checking of derived types on or off.
900 (resolve_typebound_generic_call): Set the new argument.
901 (resolve_typebound_function, resolve_typebound_subroutine):
902 Set 'types' argument for get_declared_from_expr appropriately.
903 Identify base expression, if not a variable, in the argument
904 list of class valued calls. Assign it to the 'base_expr' field
905 of the final expression. Strip away all references after the
906 last class reference.
908 2012-01-02 Tobias Burnus <burnus@net-b.de>
911 * trans-intrinsic.c (trans_this_image, trans_image_index,
912 trans_num_images, conv_intrinsic_cobound): Fold_convert the
913 caf_num_images/caf_this_images variables to the correct int kind.
915 2012-01-01 Jakub Jelinek <jakub@redhat.com>
917 * gfortranspec.c (lang_specific_driver): Update copyright notice
920 Copyright (C) 2012 Free Software Foundation, Inc.
922 Copying and distribution of this file, with or without modification,
923 are permitted in any medium without royalty provided the copyright
924 notice and this notice are preserved.