1 2012-05-04 Tobias Burnus <burnus@net-b.de>
4 * resolve.c (resolve_fl_derived): Fix -std=f95
5 diagnostic for generic vs. DT names.
7 2012-05-03 Tobias Burnus <burnus@net-b.de>
10 * interface.c (compare_parameter_intent): Remove.
11 (check_intents): Remove call, handle CLASS pointer.
12 (compare_actual_formal): Handle CLASS pointer.
14 2012-04-30 Jan Hubicka <jh@suse.cz>
16 * f95-lang.c (gfc_finish): Update comments.
18 2012-04-29 Thomas Koenig <tkoenig@gcc.gnu.org>
21 * frontend-passes.c (create_var): If the statement has a label,
22 put the label around the block.
24 2012-04-25 Tobias Burnus <burnus@net-b.de>
27 * lang.opt (Wrealloc-lhs, Wrealloc-lhs-all): New flags.
28 * gfortran.h (gfc_option_t): Add them.
29 * options.c (gfc_init_options, gfc_post_options,
30 gfc_handle_option): Handle them.
31 * invoke.texi: Document them.
32 * trans-expr.c (realloc_lhs_warning): New function.
33 (gfc_trans_arrayfunc_assign,
34 alloc_scalar_allocatable_for_assignment,
35 gfc_trans_assignment_1): Use it.
37 2012-04-18 Steven Bosscher <steven@gcc.gnu.org>
39 * trans-decl.c (gfc_trans_entry_master_switch): Build SWITCH_EXPR
40 with NULL_TREE type instead of void_type_node.
41 * trans-io.c (io_result): Likewise.
42 * trans-stmt.c (gfc_trans_integer_select,
43 gfc_trans_character_select): Likewise.
45 2012-04-16 Tobias Burnus <burnus@net-b.de>
48 * expr.c (gfc_check_vardef_context): Fix assignment check for
51 2012-04-16 Janus Weil <janus@gcc.gnu.org>
54 * class.c (gfc_build_class_symbol): Make sure the 'f2k_derived'
57 2012-04-15 Janus Weil <janus@gcc.gnu.org>
60 * trans-expr.c (gfc_conv_expr_reference): Check if the expression is a
61 simple function call (or a more involved PPC reference).
63 2012-04-15 Tobias Burnus <burnus@net-b.de>
67 * gfortran.h (symbol_attribute): Add public_used.
68 * interface.c (check_sym_interfaces, check_uop_interfaces,
69 gfc_check_interfaces): Set it.
70 * resolve.c (resolve_typebound_procedure): Ditto.
71 * trans-decl.c (build_function_decl): Use it.
73 2012-04-11 Tobias Burnus <burnus@net-b.de>
76 * resolve.c (resolve_symbol): Fix searching for parent NS decl.
78 2012-04-08 Tobias Burnus <burnus@net-b.de>
81 * trans-decl.c (gfc_finish_var_decl): Don't set TREE_PUBLIC
82 for PRIVATE module variables without C-binding label.
85 * trans-decl.c (build_function_decl): Ditto for procedures.
87 2012-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
90 * frontend-passes.c: Keep track of wether we are in an implicit
91 DO loop; do not do function elimination if we are.
93 2012-04-06 Thomas Koenig <tkoenig@gcc.gnu.org>
96 * module.c: Only mark symbols as use_only if they have been
97 imported via an only list.
99 2012-03-28 Paul Thomas <pault@gcc.gnu.org>
100 Tobias Burnus <burnus@gcc.gnu.org>
103 * match.c (gfc_match_allocate, gfc_match_deallocate): Change
104 "not.. or" to "neither.. nor".
105 * parse.c (decode_specification_statement): Correct error in
106 chpice of matching function for "allocatable".
108 2012-03-23 Janne Blomqvist <jb@gcc.gnu.org>
110 * gfortran.h (GFC_MAX_LINE): Remove unused macro.
112 2012-03-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
115 * error.c (gfc_widechar_display_length): Consider tabs as
116 one character wide, as they're displayed as spaces.
117 (show_locus): Move tab handling to...
118 (print_wide_char_into_buffer): ... here.
120 2012-03-17 Tobias Burnus <burnus@net-b.de>
123 * trans-intrinsic.c (gfc_conv_associated): Fix handling of
124 procpointer dummy arguments.
126 2012-03-16 Janne Blomqvist <jb@gcc.gnu.org>
128 * trans-intrinsic.c (build_round_expr): Don't use BUILT_IN_IROUND
131 2012-03-15 Janne Blomqvist <jb@gcc.gnu.org>
133 * f95-lang.c (gfc_init_builtin_functions): Initialize
135 * mathbuiltins.def: Add IROUND.
136 * trans-intrinsic.c (build_round_expr): Use BUILT_IN_IROUND if
138 (gfc_build_intrinsic_lib_fndecls): Build iround functions.
140 2012-03-12 Richard Guenther <rguenther@suse.de>
142 * f95-lang.c (builtin_type_for_size): Use gfc_type_for_size.
144 2012-03-12 Tobias Burnus <burnus@net-b.de>
147 * decl.c (match_procedure_decl): If the interface
148 is bind(C), the procedure is as well.
150 2012-03-10 Steven Bosscher <steven@gcc.gnu.org>
152 * convert.c (convert): Fold BOOLEAN_TYPE types to the proper variant.
154 2012-03-09 Steven Bosscher <steven@gcc.gnu.org>
156 * Make-lang.in (convert.o): Depend on convert.h.
157 * convert.c: Header and comment cleanups.
158 (gfc_thruthvalue_conversion): Rename static function
159 to truthvalue_conversion. Do not use 'internal_error' from here,
160 use 'gcc_unreachable' instead.
161 (convert): Do not use 'error' for conversions to void, use
162 'gcc_unreachable' instead. Likewise for conversions to non-scalar
163 types. Do not hanlde ENUMERAL_TYPE, the front end never creates them.
166 2012-03-08 Tobias Burnus <burnus@net-b.de>
169 * trans-types.c (gfc_get_function_type): Handle backend_decl
170 of a procedure pointer.
172 2012-03-06 Steven Bosscher <steven@gcc.gnu.org>
174 * f95-lang.c (yyerror, yylex): Remove.
175 (clear_binding_stack): Remove, fold into its only user.
176 (LANG_HOOKS_PRINT_IDENTIFIER): Do not re-define.
177 (ridpointers): Remove.
178 (gfc_eh_initialized_p): Make static.
179 (gfc_truthvalue_conversion): Move to convert.c.
180 (gfc_be_parse_file): Clear binding level stack when done.
181 (gfc_print_identifier): Remove.
182 (pushlevel): Remove ignored 'ignore' argument. Update all callers.
183 (poplevel): Remove unused 'reverse' argument. Update all callers.
185 (gfc_builtin_function): Make static. Do not attempt to make RTL for
187 * convert.c (gfc_truthvalue_conversion): Moved here from f95-lang.c,
189 * trans.h (pushlevel, poplevel): Adjust prototypes.
190 (gfc_truthvalue_conversion, gfc_builtin_function): Remove prototypes.
191 * trans-openmp.c: Update calls to pushlevel and poplevel.
193 * trans-decl.c: Likewise.
195 2012-03-04 Mikael Morin <mikael@gcc.gnu.org>
198 * gfortran.h (gfc_is_class_container_ref): New prototype.
199 * class.c (gfc_is_class_container_ref): New function.
200 * trans-expr.c (gfc_conv_procedure_call): Add a "_data" component
201 reference to polymorphic actual arguments.
203 2012-03-04 Mikael Morin <mikael@gcc.gnu.org>
206 * trans-expr.c (gfc_conv_procedure_call): Save se->ss's value.
207 Handle the case of unallocated arrays passed to elemental procedures.
209 2012-03-04 Mikael Morin <mikael@gcc.gnu.org>
211 * trans.h (struct gfc_ss_info): Move can_be_null_ref component from
212 the data::scalar subcomponent to the toplevel.
213 * trans-expr.c (gfc_conv_expr): Update component reference.
214 * trans-array.c (gfc_add_loop_ss_code): Ditto.
215 (gfc_walk_elemental_function_args): Ditto. Move the conditional setting
216 the field out of the scalar-only block.
218 2012-03-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
221 * error.c (gfc_widechar_display_length, gfc_wide_display_length):
223 (print_wide_char_into_buffer): Return length written.
224 (show_locus): Fix locus displayed when wide characters are present.
226 2012-03-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
228 * module.c (gfc_use_module): Improve error message some more.
230 2012-03-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
233 * module.c (gfc_use_module): Improve error messages.
235 2012-03-03 Tobias Burnus <burnus@net-b.de>
238 * resolve.c (resolve_actual_arglist): Properly reset
239 assumed_type_expr_allowed.
241 2012-03-03 Tobias Burnus <burnus@net-b.de>
243 * lang.opt (Wc-binding-type): New flag.
244 * options.c (gfc_init_options, gfc_handle_option): Handle it.
245 * invoke.texi (Wc-binding-type): Document it.
246 * gfortran.h (gfc_option_t): Add warn_c_binding_type.
247 * decl.c (verify_bind_c_sym): Handle -Wc-binding-type.
248 * symbol.c (gfc_set_default_type, verify_bind_c_derived_type):
251 2012-03-03 Tobias Burnus <burnus@net-b.de>
254 * decl.c (gfc_match_decl_type_spec): Support type(*).
255 (gfc_verify_c_interop): Allow type(*).
256 * dump-parse-tree.c (show_typespec): Handle type(*).
257 * expr.c (gfc_copy_expr): Ditto.
258 * interface.c (compare_type_rank, compare_parameter,
259 compare_actual_formal, gfc_procedure_use): Ditto.
260 * libgfortran.h (bt): Add BT_ASSUMED.
261 * misc.c (gfc_basic_typename, gfc_typename): Handle type(*).
262 * module.c (bt_types): Ditto.
263 * resolve.c (assumed_type_expr_allowed): New static variable.
264 (resolve_actual_arglist, resolve_variable, resolve_symbol):
266 * trans-expr.c (gfc_conv_procedure_call): Ditto.
267 * trans-types.c (gfc_typenode_for_spec, gfc_get_dtype): Ditto.
269 2012-03-02 Tobias Burnus <burnus@net-b.de>
272 * primary.c (gfc_match_varspec): Add missing ;.
274 2012-03-02 Tobias Burnus <burnus@net-b.de>
277 * primary.c (gfc_match_varspec): Add diagnostic for % with
280 2012-03-02 Tobias Burnus <burnus@net-b.de>
283 * expr.c (gfc_check_vardef_context): Fix check for
284 intent-in polymorphic pointer .
285 * interface.c (compare_parameter): Allow passing TYPE to
286 intent-in polymorphic pointer.
288 2012-03-02 Tobias Burnus <burnus@net-b.de>
291 * resolve.c (resolve_intrinsic): Don't search for a
292 function if we know that it is a subroutine.
294 2012-02-29 Paul Thomas <pault@gcc.gnu.org>
297 * trans-expr.c (fcncall_realloc_result): Dereference the
298 descriptor if needed.
300 2012-02-22 Tobias Burnus <burnus@net-b.de>
303 * io.c (gfc_match_open): Remove bogus F2003 DELIM= check.
305 2012-02-18 Tobias Burnus <burnus@net-b.de>
308 * interface.c (check_interface0): Internal procs in
309 generic interfaces are allowed in Fortran 2008.
311 2012-02-17 Tobias Burnus <burnus@net-b.de>
312 Roland Stigge <stigge@antcom.de>
315 * interface.c (compare_actual_formal): Fix typo "at at".
317 2012-02-17 Tobias Burnus <burnus@net-b.de>
319 * gfortran.texi (Q exponent-letter): Fix grammar.
321 2012-02-17 Tobias Burnus <burnus@net-b.de>
323 * gfortran.texi (Status): Fix typos.
324 * invoke.texi (ffixed-form, fstack-arrays): Spell Fortran with
327 2012-02-17 Tobias Burnus <burnus@net-b.de>
328 Roland Stigge <stigge@antcom.de>
336 * io.c (gfc_match_open): Fix typo.
337 * interface.c (compare_actual_formal): Ditto.
338 * lang.opt (freal-4-real-8, freal-4-real-16, freal-8-real-16): Ditto.
339 * match.c (alloc_opt_list, gfc_match_nullify): Ditto.
340 * check.c (gfc_check_associated, gfc_check_null): Ditto.
342 2012-02-12 Mikael Morin <mikael@gcc.gnu.org>
345 * trans-stmt.c (gfc_get_proc_ifc_for_call): New function.
346 (gfc_trans_call): Use gfc_get_proc_ifc_for_call.
348 2012-02-12 Mikael Morin <mikael@gcc.gnu.org>
350 * trans-array.c (gfc_walk_elemental_function_args,
351 gfc_walk_function_expr): Move call to gfc_get_proc_ifc_for_expr out
352 of gfc_walk_elemental_function_args.
353 * trans-stmt.c (gfc_trans_call): Ditto.
354 * trans-array.h (gfc_get_proc_ifc_for_expr): New prototype.
355 (gfc_walk_elemental_function_args): Update prototype.
357 2012-02-12 Mikael Morin <mikael@gcc.gnu.org>
359 * trans-array.c (gfc_get_proc_ifc_for_expr): New function.
360 (gfc_walk_elemental_function_args): Move code to
361 gfc_get_proc_ifc_for_expr and call it.
363 2012-02-08 Tobias Burnus <burnus@net-b.de>
366 * trans-expr.c (fcncall_realloc_result): Set also the stride.
368 2012-02-07 Tobias Burnus <burnus@net-b.de>
371 * trans-expr.c (gfc_conv_procedure_call): Add _data component
372 for calls of scalar CLASS actuals to TYPE dummies.
374 2012-02-05 Thomas König <tkoenig@gcc.gnu.org>
377 * trans-decl.c: Warn about unused dummy procedure arguments
378 if -Wunused-dummy-argument is specified. Suppress middle-end
379 warnings about procedure arguments.
381 2012-02-05 Paul Thomas <pault@gcc.gnu.org>
383 * trans-array.c (gfc_array_allocate): Zero memory for all class
385 * trans-stmt.c (gfc_trans_allocate): Ditto for class scalars.
388 * trans-stmt.c (gfc_trans_allocate): Before correcting a class
389 array reference, ensure that 'dataref' points to the _data
390 component that is followed by the array reference..
392 2012-02-02 Mikael Morin <mikael@gcc.gnu.org>
398 * class.c (insert_component_ref, class_data_ref_missing,
399 gfc_fix_class_refs): New functions.
400 * gfortran.h (gfc_fix_class_refs): New prototype.
401 * trans-expr.c (gfc_conv_expr): Remove special case handling and call
402 gfc_fix_class_refs instead.
404 2012-02-02 Paul Thomas <pault@gcc.gnu.org>
407 * trans-expr.c (fcncall_realloc_result): If variable shape is
408 correct, retain the bounds, whatever they are.
410 2012-02-02 Tobias Burnus <burnus@net-b.de>
413 * simplify.c (gfc_simplify_size): Handle INTRINSIC_PARENTHESES.
415 2012-02-01 Thomas König <tkoenig@gcc.gnu.org>
418 * frontend-passes.c (convert_elseif): New function.
419 (optimize_namespace): Call it.
421 2012-02-01 Tobias Burnus <burnus@net-b.de>
424 * module.c (MOD_VERSION): Bump.
425 (mio_typebound_proc): Read/write is_operator from/to the
428 2012-02-01 Tobias Burnus <burnus@net-b.de>
431 * trans-expr.c (gfc_conv_procedure_call): Add array ref
434 2012-01-31 Tobias Burnus <burnus@net-b.de>
437 * gfortran.h (gfc_tbp_generic): Store whether the
438 generic is an operator.
439 * decl.c (gfc_match_generic): Set that flag.
440 * resolve.c (check_generic_tbp_ambiguity): Use it in the
441 gfc_compare_interfaces check.
443 2012-01-31 Tobias Burnus <burnus@net-b.de>
446 * class.c (gfc_find_derived_vtab): Mark _copy function as pure.
448 2012-01-31 Tobias Burnus <burnus@net-b.de>
451 * class.c (get_unique_hashed_string): Adapt trim length.
452 (gfc_build_class_symbol) Encode also corank in the container name.
454 2012-01-31 Paul Thomas <pault@gcc.gnu.org>
457 * trans-expr.c (fcncall_realloc_result): Correct calculation of
460 2012-01-29 Janne Blomqvist <jb@gcc.gnu.org>
462 * module.c (pointer_info): Make true_name and module pointers
463 rather than arrays, order pointers before other fields.
464 (free_pi_tree): free true_name and module as well.
465 (mio_read_string): Rename to read_string.
466 (mio_write_string): Remove.
467 (load_commons): Use read_string.
468 (read_module): Use read_string rather than mio_internal_string.
469 (write_blank_common): Call write_atom directly.
470 (write_symbol): Likewise.
472 2012-01-29 Tobias Burnus <burnus@net-b.de>
475 * expr.c (gfc_default_initializer): Convert the values if
476 the type does not match.
478 2012-01-29 Tobias Burnus <burnus@net-b.de>
481 * trans-array.c (structure_alloc_comps): Fix assignment of
482 polymorphic components (polymorphic deep copying).
484 2012-01-29 Janne Blomqvist <jb@gcc.gnu.org>
487 * decl.c (set_binding_label): Make binding_label argument const.
488 (curr_binding_label): Constify.
489 * gfortran.h (gfc_symbol): Constify binding_label.
490 (gfc_common_head): Likewise.
491 (get_iso_c_sym): Likewise.
492 * match.c (gfc_match_name_C): Constify buffer argument.
493 * match.h (gfc_match_name_C): Likewise.
494 * resolve.c (set_name_and_label): Constify binding_label argument.
495 (gfc_iso_c_sub_interface): Constify binding_label variable.
496 * symbol.c (get_iso_c_sym): Constify binding_label argument.
498 2012-01-29 Janne Blomqvist <jb@gcc.gnu.org>
501 * decl.c (set_binding_label): Move prototype from match.h to here.
502 (curr_binding_label): Make a pointer rather than static array.
503 (build_sym): Check sym->binding_label pointer rather than array,
504 update set_binding_label call, handle curr_binding_label changes.
505 (set_binding_label): Handle new curr_binding_label, dest_label
506 double ptr, and sym->binding_label.
507 (verify_bind_c_sym): Handle sym->binding_label being a pointer.
508 (set_verify_bind_c_sym): Check sym->binding_label pointer rather
509 than array, update set_binding_label call.
510 (gfc_match_bind_c_stmt): Handle curr_binding_label change.
511 (match_procedure_decl): Update set_binding_label call.
512 (gfc_match_bind_c): Change binding_label to pointer, update
513 gfc_match_name_C call.
514 * gfortran.h (GFC_MAX_BINDING_LABEL_LEN): Remove macro.
515 (gfc_symbol): Make binding_label a pointer.
516 (gfc_common_head): Likewise.
517 * match.c (gfc_match_name_C): Heap allocate bind(C) name.
518 * match.h (gfc_match_name_C): Change prototype argument.
519 (set_binding_label): Move prototype to decl.c.
520 * module.c (struct pointer_info): Make binding_label a pointer.
521 (free_pi_tree): Free unused binding_label.
522 (mio_read_string): New function.
523 (mio_write_string): New function.
524 (load_commons): Redo reading of binding_label.
525 (read_module): Likewise.
526 (write_common_0): Change to write empty string instead of name if
528 (write_blank_common): Write empty string for binding label.
529 (write_symbol): Change to write empty string instead of name if no
531 * resolve.c (gfc_iso_c_func_interface): Don't set binding_label.
532 (set_name_and_label): Make binding_label double pointer, use
534 (gfc_iso_c_sub_interface): Make binding_label a pointer.
535 (resolve_bind_c_comms): Handle cases if
536 gfc_common_head->binding_label is NULL.
537 (gfc_verify_binding_labels): sym->binding_label is a pointer.
538 * symbol.c (gfc_new_symbol): Rely on XCNEW zero init for
540 (gen_special_c_interop_ptr): Don't set binding label.
541 (generate_isocbinding_symbol): Insert binding_label into symbol
543 (get_iso_c_sym): Use pointer assignment instead of strcpy.
544 * trans-common.c (gfc_sym_mangled_common_id): Handle
545 com->binding_label being a pointer.
546 * trans-decl.c (gfc_sym_mangled_identifier): Handle
547 sym->binding_label being a pointer.
548 (gfc_sym_mangled_function_id): Likewise.
550 2012-01-29 Tobias Burnus <burnus@net-b.de>
553 * resolve.c (symbol_as): Remove unused, accidentally
556 2012-01-28 Tobias Burnus <burnus@net-b.de>
559 * trans-stmt.c (gfc_trans_allocate): Properly check whether
560 we have a BT_CLASS which needs to be memset.
562 2012-01-27 Tobias Burnus <burnus@net-b.de>
565 * trans-expr.c (gfc_conv_procedure_call): Fix passing
566 of functions, which return allocatables.
568 2012-01-27 Tobias Burnus <burnus@net-b.de>
571 * resolve.c (resolve_formal_arglist): Fix elemental
572 constraint checks for polymorphic dummies also for
575 2012-01-27 Tobias Burnus <burnus@net-b.de>
579 * primary.c (gfc_match_varspec. gfc_match_rvalue): Set
580 handle array spec for BT_CLASS.
581 * expr.c (gfc_get_variable_expr, gfc_lval_expr_from_sym)
582 * frontend-passes.c (create_var): Ditto.
583 * resolve.c (resolve_actual_arglist, resolve_assoc_var): Ditto.
584 * trans-decl.c (gfc_trans_deferred_vars): Use class_pointer
585 instead of attr.pointer.
586 (gfc_generate_function_code): Use CLASS_DATA (sym) for BT_CLASS.
587 * trans-intrinsic.c (conv_intrinsic_move_alloc): Move assert.
588 * trans-stmt.c (trans_associate_var): Ask for the descriptor.
590 2012-01-27 Tobias Burnus <burnus@net-b.de>
593 * match.c (gfc_match_allocate): Allow more than allocate
596 2012-01-27 Tobias Burnus <burnus@net-b.de>
599 * resolve.c (resolve_formal_arglist): Fix elemental
600 constraint checks for polymorphic dummies.
602 2012-01-27 Paul Thomas <pault@gcc.gnu.org>
603 Tobias Burnus <burnus@gcc.gnu.org>
609 * trans-array.c (gfc_array_init_size): Add two extra arguments
610 to convey the dynamic element size of a calls object and to
611 return the number of elements that have been allocated.
612 (gfc_array_allocate): Add the same arguments and use them to
613 call gfc_array_init_size. Before the allocation dereference
614 the data pointer, if necessary. Set the allocated array to zero
615 if the class element size or expr3 are non-null.
616 * trans-expr.c (gfc_conv_class_to_class): Give this function
618 (get_class_array_ref): New function.
619 (gfc_copy_class_to_class): New function.
620 * trans-array.h : Update prototype for gfc_array_allocate.
621 * trans-stmt.c (gfc_trans_allocate): For non-variable class
622 STATUS expressions extract the class object and the dynamic
623 element size. Use the latter to call gfc_array_allocate and
624 the former for setting the vptr and, via
625 gfc_copy_class_to_clasfc_cs, to copy to the allocated data.
626 * trans.h : Prototypes for gfc_get_class_array_ref,
627 gfc_copy_class_to_class and gfc_conv_class_to_class.
629 2012-01-25 Tobias Burnus <burnus@net-b.de>
631 * resolve.c (symbol_as): Check also for attr.class_ok.
633 2012-01-25 Tobias Burnus <burnus@net-b.de>
636 * class.c (gfc_build_class_symbol): Fix invalid freeing
637 issue with fclass->f2k_derived.
639 2012-01-25 Tobias Burnus <burnus@net-b.de>
642 * class.c (gfc_build_class_symbol): Ensure that
643 fclass->f2k_derived is set.
645 2012-01-25 Tobias Burnus <burnus@net-b.de>
648 * resolve.c (resolve_structure_cons): Only create an
649 array constructors for nonscalars.
651 2012-01-23 Tobias Burnus <burnus@net-b.de>
654 * check.c (variable_check): Fix checking for
655 variables and deeply nested BLOCKs.
657 2012-01-21 Tobias Burnus <burnus@net-b.de>
658 Steven G. Kargl <kargl@gcc.gnu.org>
661 * symbol.c (check_conflict): namelist-group-name cannot have the SAVE
664 2012-01-21 Tobias Burnus <burnus@net-b.de>
667 * interface.c (compare_parameter): Fix CLASS comparison.
669 2012-01-20 Tobias Burnus <burnus@net-b.de>
670 Janus Weil <janus@gcc.gnu.org>
673 * module.c (load_needed, read_module): Don't mark __vtab etc.
676 2012-01-19 Tobias Burnus <burnus@net-b.de>
679 * expr.c (gfc_build_intrinsic_call): Also set the symtree.
681 2012-01-18 Paul Thomas <pault@gcc.gnu.org>
684 * trans-expr.c (gfc_conv_procedure_call): Deallocate allocatable
685 components of temporary class arguments.
687 2012-01-17 Tobias Burnus <burnus@net-b.de>
688 Janne Blomqvist <jb@gcc.gnu.org>
691 * trans-expr.c (alloc_scalar_allocatable_for_assignment): Nullify
692 LHS after allocation, if it has allocatable components.
693 * f95-lang.c (gfc_init_builtin_functions): Add BUILT_IN_CALLOC.
695 2012-01-16 Mikael Morin <mikael@gcc.gnu.org>
696 Tobias Burnus <burnus@net-b.de>
699 * trans-array.c (gfc_walk_elemental_function_args): Fix
700 passing of deallocated allocatables/pointers as absent argument.
702 2012-01-16 Tobias Burnus <burnus@net-b.de>
705 * class.c (gfc_find_derived_vtab): Mark __vtab and
706 __def_init as FL_VARIABLE not as FL_PARAMETER.
707 * expr.c (gfc_simplify_expr): Remove special
709 * resolve.c (resolve_values): Ditto.
710 * trans-decl.c (gfc_get_symbol_decl): Mark __vtab
711 and __def_init as TREE_READONLY.
713 2012-01-16 Zydrunas Gimbutas <gimbutas@cims.nyu.edu>
714 Andreas Kloeckner <kloeckner@cims.nyu.edu>
715 Steven G. Kargl <kargl@gcc.gnu.org>
718 * gfortran.h (gfc_option_t): Add members flag_*_kind to store kind.
719 * lang.opt: Add options -freal-4-real-8, -freal-4-real-10,
720 -freal-4-real-16, -freal-8-real-4, -freal-8-real-10, -freal-8-real-16
721 and -finteger-4-integer-8. User-desired type conversion information.
722 * decl.c (gfc_match_old_kind_spec,kind_expr): Type conversions
723 in declaration parsing.
724 * trans-types.c (gfc_init_kinds): User-specified type conversion
725 checked for current backend.
726 * primary.c (match_integer_constant,match_real_constant): Implement
727 type conversion in constant parsing.
728 * options.c (gfc_init_options,gfc_handle_option): Translate input
729 options to flags in internal options data structure.
730 * invoke.texi: Document new options. Re-order options in Options
733 2012-01-16 Paul Thomas <pault@gcc.gnu.org>
735 * trans-array.c (gfc_trans_create_temp_array): In the case of a
736 class array temporary, detect a null 'eltype' on entry and use
737 'initial' to provde the class reference and so, through the
738 vtable, the element size for the dynamic type.
739 * trans-stmt.c (gfc_conv_elemental_dependencies): For class
740 expressions, set 'eltype' to null and pass the values via the
741 'initial' expression.
743 2012-01-14 Tobias Burnus <burnus@net-b.de>
746 * resolve.c (build_default_init_expr): Also initialize
747 nonconstant-length strings with -finit-character=<n>.
749 2011-01-14 Tobias Burnus <burnus@net-b.de>
752 * module.c (read_module): Don't make nonexisting
753 intrinsic operators as found.
754 (rename_list_remove_duplicate): New function.
755 (gfc_use_modules): Use it.
757 2012-01-13 Paul Thomas <pault@gcc.gnu.org>
760 * trans-array.c (structure_alloc_comps): Suppress interative
761 call to self, when current component is deallocated using
762 gfc_trans_dealloc_allocated.
763 * class.c (gfc_build_class_symbol): Copy the 'alloc_comp'
764 attribute from the declared type to the class structure.
766 2012-01-13 Tobias Burnus <burnus@net-b.de>
769 * fortran/trans-types.c (gfc_init_kinds): Use PTRDIFF_TYPE
770 instead of a signed int of size POINTER_SIZE for
771 gfc_index_integer_kind.
773 2012-01-12 Tobias Burnus <burnus@net-b.de>
776 * intrinsic.texi (CHMOD): Extend a bit and remove statement
777 that /bin/chmod is called.
779 2012-01-10 Gerald Pfeifer <gerald@pfeifer.com>
781 * gfortran.texi (Fortran 2003 Status): Fix grammar.
783 2012-01-10 Tobias Burnus <burnus@net-b.de>
786 * resolve.c (resolve_allocate_expr): For non-deferred char lengths,
787 check whether type-spec matches declaration.
789 2012-01-10 Tobias Burnus <burnus@net-b.de>
791 * resolve.c (resolve_ordinary_assign): Improve error wording.
793 2012-01-09 Paul Thomas <pault@gcc.gnu.org>
796 * interface.c (matching_typebound_op): Drill down through
797 possible parentheses to obtain base expression. Do not test for
798 'class_ok' but, instead for the class structure components.
799 * resolve.c (resolve_ordinary_assign): Extend error message for
800 polymorphic assignment to advise checking for specific
804 * resolve.c (resolve_typebound_function): Restore 'static' to
807 2012-01-09 Mikael Morin <mikael@gcc.gnu.org>
810 * trans-array.c (gfc_walk_elemental_function_args):
811 Skip over NULL() actual arguments.
813 2012-01-09 Tobias Burnus <burnus@net-b.de>
815 * gfortran.texi: Bump copyright year.
816 (Fortran 2003 Status): Update polymorphism item, add
817 item for generic interface with DT name.
819 2012-01-09 Tobias Burnus <burnus@net-b.de>
822 * gfortran.h (gfc_use_list):
823 * match.h (gfc_use_module): Rename to ...
824 (gfc_use_modules): ... this.
825 * module.c (use_locus, specified_nonint, specified_int): Remove
827 (module_name): Change type to const char*, used with gfc_get_string.
828 (module_list): New global variable.
829 (free_rename): Free argument not global var.
830 (gfc_match_use): Save match to module_list.
831 (load_generic_interfaces, read_module): Don't free symtree.
832 (write_dt_extensions, gfc_dump_module): Fix module-name I/O due to the
833 type change of module_name.
834 (write_symbol0, write_generic): Optimize due to the type change.
835 (import_iso_c_binding_module, use_iso_fortran_env_module): Use
836 locus of rename->where.
837 (gfc_use_module): Take module_list as argument.
838 (gfc_use_modules): New function.
839 (gfc_module_init_2, gfc_module_done_2): Init module_list, rename_list.
840 * parse.c (last_was_use_stmt): New global variable.
841 (use_modules): New function.
842 (decode_specification_statement, decode_statement): Move USE match up
843 and call use_modules.
844 (next_free, next_fixed): Call use_modules.
845 (accept_statement): Don't call gfc_module_use.
847 2012-01-06 Tobias Burnus <burnus@net-b.de>
849 * trans-openmp.c (gfc_omp_clause_dtor, gfc_trans_omp_array_reduction):
850 Update call to gfc_trans_dealloc_allocated.
851 * trans.c (gfc_allocate_using_malloc): Fix spacing.
852 (gfc_allocate_allocatable): For gfc_allocate_using_lib, jump to
853 label_finish when an error occurs.
854 (gfc_deallocate_with_status): Call caf_deregister for -fcoarray=lib.
855 * trans.h (gfc_allocate_allocatable, gfc_deallocate_with_status):
857 (gfor_fndecl_caf_deregister): New tree symbol.
858 * trans-expr.c (gfc_conv_procedure_call): Update
859 gfc_deallocate_with_status and gfc_trans_dealloc_allocated calls.
860 * trans-array.c (gfc_array_allocate, gfc_trans_dealloc_allocated,
861 structure_alloc_comps, gfc_trans_deferred_array): Ditto.
862 (gfc_array_deallocate): Handle coarrays with -fcoarray=lib.
863 * trans-array.h (gfc_array_deallocate, gfc_array_allocate,
864 gfc_trans_dealloc_allocated): Update prototypes.
865 * trans-stmt.c (gfc_trans_sync): Fix indentation.
866 (gfc_trans_allocate): Fix errmsg padding and label handling.
867 (gfc_trans_deallocate): Ditto and handle -fcoarray=lib.
868 * expr.c (gfc_is_coarray): Fix algorithm for BT_CLASS.
869 * libgfortran.h (GFC_STAT_STOPPED_IMAGE): Use large value
870 to avoid other stats accidentally matching this one.
871 * trans-decl.c (gfor_fndecl_caf_deregister): New global var.
872 (gfc_build_builtin_function_decls): Fix prototype decl of caf_register
873 and add decl for caf_deregister.
874 (gfc_trans_deferred_vars): Handle CAF vars with -fcoarrays=lib.
875 * trans-intrinsic.c (conv_intrinsic_move_alloc): Update call to
876 gfc_deallocate_with_status.
878 2012-01-05 Paul Thomas <pault@gcc.gnu.org>
881 * resolve.c (resolve_typebound_static): If the typebound
882 procedure is 'deferred' try to find the correct specific
883 procedure in the derived type operator space itself.
885 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
888 * trans-array.h (gfc_walk_elemental_function_args): New argument.
889 * trans-intrinsic.c (gfc_walk_intrinsic_function): Update call.
890 * trans-stmt.c (gfc_trans_call): Ditto.
891 * trans-array.c (gfc_walk_function_expr): Ditto.
892 (gfc_walk_elemental_function_args): Get the dummy argument list
893 if possible. Check that the dummy and the actual argument are both
894 optional, and set can_be_null_ref accordingly.
896 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
899 * trans.h (struct gfc_ss_info): New field data::scalar::can_be_null_ref
900 * trans-array.c: If the reference can be NULL, save the reference
901 instead of the value.
902 * trans-expr.c (gfc_conv_expr): If we have saved a reference,
905 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
907 * trans-expr.c (gfc_conv_expr): Move address taking...
908 (gfc_conv_expr_reference): ... here.
910 2012-01-04 Thomas Koenig <tkoenig@gcc.gnu.org>
913 * trans-common.c (create_common): Update copyright years. Mark
914 variables as used to avoid warnings about unused variables in
917 2012-01-03 Hans-Peter Nilsson <hp@axis.com>
919 * gfortran.h (struct gfc_expr): Add missing "struct"
920 qualifier for member base_expr.
922 2012-01-02 Paul Thomas <pault@gcc.gnu.org>
925 * trans-array.c (gfc_array_allocate): Null allocated memory of
926 newly allocted class arrays.
931 * interface.c(build_compcall_for_operator): Add a type to the
933 * trans-expr.c (conv_base_obj_fcn_val): New function.
934 (gfc_conv_procedure_call): Use base_expr to detect non-variable
935 base objects and, ensuring that there is a temporary variable,
936 build up the typebound call using conv_base_obj_fcn_val.
937 (gfc_trans_class_assign): Pick out class procedure pointer
938 assignments and do the assignment with no further prcessing.
939 (gfc_trans_class_array_init_assign, gfc_trans_class_init_assign
940 gfc_trans_class_assign): Move to top of file.
941 * gfortran.h : Add 'base_expr' field to gfc_expr.
942 * resolve.c (get_declared_from_expr): Add 'types' argument to
943 switch checking of derived types on or off.
944 (resolve_typebound_generic_call): Set the new argument.
945 (resolve_typebound_function, resolve_typebound_subroutine):
946 Set 'types' argument for get_declared_from_expr appropriately.
947 Identify base expression, if not a variable, in the argument
948 list of class valued calls. Assign it to the 'base_expr' field
949 of the final expression. Strip away all references after the
950 last class reference.
952 2012-01-02 Tobias Burnus <burnus@net-b.de>
955 * trans-intrinsic.c (trans_this_image, trans_image_index,
956 trans_num_images, conv_intrinsic_cobound): Fold_convert the
957 caf_num_images/caf_this_images variables to the correct int kind.
959 2012-01-01 Jakub Jelinek <jakub@redhat.com>
961 * gfortranspec.c (lang_specific_driver): Update copyright notice
964 Copyright (C) 2012 Free Software Foundation, Inc.
966 Copying and distribution of this file, with or without modification,
967 are permitted in any medium without royalty provided the copyright
968 notice and this notice are preserved.