1 2012-08-01 Thomas König <tkoenig@gcc.gnu.org>
4 * scanner.c (add_path_to_list): Emit warning if an error occurs
5 for an include path, if it is not present or if it is not a
6 directory. Do not add the path in these cases.
8 2012-07-31 Janus Weil <janus@gcc.gnu.org>
11 * decl.c (match_procedure_interface): Move some checks to
12 'resolve_procedure_interface'. Set flavor if appropriate.
13 * expr.c (gfc_check_pointer_assign): Cleanup of 'gfc_is_intrinsic'.
14 * intrinsic.c (gfc_is_intrinsic): Additional checks for attributes which
15 identify a procedure as being non-intrinsic.
16 * resolve.c (resolve_procedure_interface): Checks moved here from
17 'match_procedure_interface'. Minor cleanup.
18 (resolve_formal_arglist,resolve_symbol): Cleanup of
19 'resolve_procedure_interface'
20 (resolve_actual_arglist,is_external_proc): Cleanup of
23 2012-07-31 Janus Weil <janus@gcc.gnu.org>
26 * dependency.c (gfc_dep_compare_expr): Check if arguments are NULL.
28 2012-07-31 Tobias Burnus <burnus@net-b.de>
30 * interface.c (gfc_procedure_use): Return gfc_try instead of void.
31 * gfortran.h (gfc_procedure_use): Update prototype.
32 * resolve.c (gfc_iso_c_func_interface): Allow noninteroperable
33 procedures for c_funloc for TS29113.
34 * (gfc_iso_c_sub_interface): Ditto for c_f_procpointer. Add
35 diagnostic for c_ptr vs. c_funptr for c_f_(proc)pointer.
37 2012-07-30 Janus Weil <janus@gcc.gnu.org>
40 * gfortran.h (gfc_resolve_intrinsic): Add prototype.
41 * expr.c (gfc_check_pointer_assign): Set INTRINSIC attribute if needed.
42 Check for invalid intrinsics.
43 * primary.c (gfc_match_rvalue): Check for intrinsics came too early.
44 Set procedure flavor if appropriate.
45 * resolve.c (resolve_intrinsic): Renamed to gfc_resolve_intrinsic.
46 (resolve_procedure_interface,resolve_procedure_expression,
47 resolve_function,resolve_fl_derived0,resolve_symbol): Ditto.
49 2012-07-26 Mikael Morin <mikael@gcc.gnu.org>
52 * trans-array.c (gfc_trans_array_constructor_value):
53 Evaluate the iteration bounds before the inner variable shadows
56 2012-07-26 Mikael Morin <mikael@gcc.gnu.org>
59 * array.c (sought_symbol): New variable.
60 (expr_is_sought_symbol_ref, find_symbol_in_expr): New functions.
61 (resolve_array_list): Check for references to the induction
62 variable in the iteration bounds and issue a diagnostic if some
65 2012-07-26 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
66 Tobias Burnus <burnus@net-b.de>
68 * module.c (mio_array_spec): Don't read as->lower for
71 2012-07-25 Tobias Burnus <burnus@net-b.de>
73 * trans-types.c (gfc_real16_is_float128): Fix spelling
75 * trans.h (struct gfc_array_info): Ditto.
76 * gfortran.h (gfc_expr): Ditto.
77 * simplify.c (gfc_count): Ditto.
78 * trans-expr.c (gfc_copy_class_to_class,
79 conv_parent_component_references,
80 gfc_trans_pointer_assignment): Ditto.
81 * expr.c (check_pointer_assign): Fix diagnostic spelling.
82 * interface.c (compare_parameter): Ditto.
83 * parse.c (use_modules, parse_associate): Ditto.
84 * decl.c (match_char_length): Fix spelling of the
87 2012-07-21 Tobias Burnus <burnus@net-b.de>
89 * iso-c-binding.def (C_PTRDIFF_T): New TS29113 parameter.
90 * intrinsic.texi (ISO_C_BINDING): Document it.
92 2012-07-21 Tobias Burnus <burnus@net-b.de>
95 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Support
96 lbound/ubound with dim= for assumed-rank arrays.
97 * array.c (gfc_set_array_spec): Reject coarrays with
99 * decl.c (merge_array_spec): Ditto. Return gfc_try.
100 (match_attr_spec, match_attr_spec): Update call.
102 2012-07-21 Tobias Burnus <burnus@net-b.de>
104 * resolve.c (resolve_formal_arglist): Put variable
105 declaration before the first assignment.
107 2012-07-21 Tobias Burnus <burnus@net-b.de>
109 * trans-expr.c (gfc_conv_derived_to_class): Fix argument passed
110 to class_array_data_assign.
112 2012-07-20 Tobias Burnus <burnus@net-b.de>
114 * decl.c (gfc_verify_c_interop_param): Allow assumed-shape
117 2012-07-20 Tobias Burnus <burnus@net-b.de>
120 * array.c (match_array_element_spec, gfc_match_array_spec,
121 spec_size, gfc_array_dimen_size): Add support for
123 * check.c (dim_rank_check): Ditto.
124 * class.c (gfc_add_component_ref): Ditto.
125 (gfc_build_class_symbol): Regard assumed-rank arrays
126 as having GFC_MAX_DIMENSIONS. And build extra class
127 container for a scalar pointer class.
128 * decl.c (merge_array_spec): Add assert.
129 * dump-parse-tree.c (show_array_spec): Add support for
131 * expr.c (gfc_is_simply_contiguous): Ditto.
132 * gfortran.h (array_type): Ditto.
133 (gfc_array_spec, gfc_expr): Add comment to "rank" field.
134 * interface.c (compare_type_rank, argument_rank_mismatch,
135 compare_parameter, gfc_procedure_use): Ditto.
136 (compare_actual_formal): Fix NULL() to optional-dummy
137 handling for polymorphic dummies.
138 * module.c (mio_typespec): Add support for
140 * resolve.c (resolve_formal_arglist, resolve_actual_arglist,
141 resolve_elemental_actual, resolve_global_procedure,
142 expression_shape, resolve_variable, update_ppc_arglist,
143 check_typebound_baseobject, gfc_resolve_expr,
144 resolve_fl_var_and_proc, gfc_resolve_finalizers,
145 resolve_typebound_procedure, resolve_symbol): Ditto.
146 (assumed_type_expr_allowed): Remove static variable.
147 (actual_arg, first_actual_arg): New static variables.
148 * simplify.c (simplify_bound, gfc_simplify_range): Add
149 support for assumed-rank arrays.
150 * trans-array.c (gfc_conv_array_parameter): Ditto.
151 (gfc_get_descriptor_dimension): New function, which returns
153 (gfc_conv_descriptor_dimension): Use it.
154 (gfc_conv_descriptor_stride_get, gfc_conv_array_parameter):
155 Handle GFC_ARRAY_ASSUMED_RANK_CONT and AS_ASSUMED_RANK.
156 * trans-array.h (gfc_get_descriptor_dimension): New prototype.
157 * trans-decl. (gfc_build_dummy_array_decl,
158 gfc_trans_deferred_vars, add_argument_checking): Add
159 support for assumed-rank arrays.
160 * trans-expr.c (gfc_conv_expr_present, gfc_conv_variable,
161 gfc_conv_procedure_call): Ditto.
162 (get_scalar_to_descriptor_type, class_array_data_assign,
163 conv_scalar_to_descriptor): New static functions.
164 (gfc_conv_derived_to_class, gfc_conv_class_to_class): Use
166 * trans-intrinsic.c (get_rank_from_desc): New function.
167 (gfc_conv_intrinsic_rank, gfc_conv_associated): Use it.
168 * trans-types.c (gfc_array_descriptor_base_caf,
169 gfc_array_descriptor_base): Make space for scalar array.
170 (gfc_is_nodesc_array, gfc_is_nodesc_array,
171 gfc_build_array_type, gfc_get_array_descriptor_base): Add
172 support for assumed-rank arrays.
173 * trans.h (gfc_array_kind): Add GFC_ARRAY_ASSUMED_RANK and
174 GFC_ARRAY_ASSUMED_RANK_CONT.
176 2012-07-19 Tobias Burnus <burnus@net-b.de>
178 * trans-expr.c (gfc_conv_procedure_call): Fix handling
179 of polymorphic arguments.
180 * resolve.c (resolve_formal_arglist): Ditto, mark polymorphic
181 assumed-shape arrays as such.
183 2012-07-19 Tobias Burnus <burnus@net-b.de>
185 * interface.c (compare_parameter, compare_actual_formal): Fix
186 handling of polymorphic arguments.
188 2012-07-17 Janus Weil <janus@gcc.gnu.org>
191 * error.c (gfc_notify_std): Automatically print the relevant Fortran
193 * arith.c (arith_power): Remove explicit standard reference string.
194 * array.c (gfc_match_array_spec, gfc_match_array_constructor): Ditto.
195 * check.c (gfc_check_a_p, gfc_check_besn, gfc_check_count,
196 gfc_check_float, gfc_check_fn_rc2008, gfc_check_iand,
197 gfc_check_ichar_iachar, gfc_check_ieor, gfc_check_index, gfc_check_ior,
198 gfc_check_lbound, gfc_check_len_lentrim, check_rest, gfc_check_min_max,
199 gfc_check_null, gfc_check_scan, gfc_check_selected_real_kind,
200 gfc_check_shape, gfc_check_size, gfc_check_sngl, gfc_check_ubound,
201 gfc_check_verify): Ditto.
202 * data.c (gfc_assign_data_value): Ditto.
203 * decl.c (var_element, char_len_param_value, match_char_length,
204 gfc_verify_c_interop_param, match_pointer_init, variable_decl,
205 gfc_match_decl_type_spec, gfc_match_import, match_attr_spec,
206 gfc_match_prefix, gfc_match_suffix, match_ppc_decl,
207 match_procedure_in_interface, gfc_match_procedure,gfc_match_entry,
208 gfc_match_subroutine, gfc_match_end, gfc_match_codimension,
209 gfc_match_protected, gfc_match_value, gfc_match_volatile,
210 gfc_match_asynchronous, gfc_match_modproc, gfc_get_type_attr_spec,
211 gfc_match_enum, match_procedure_in_type): Ditto.
212 * expr.c (check_elemental, gfc_check_assign, gfc_check_pointer_assign):
214 * interface.c (gfc_match_abstract_interface, check_interface0): Ditto.
215 * intrinsic.c (gfc_intrinsic_func_interface): Ditto.
216 * io.c (format_lex, resolve_tag_format, resolve_tag,
217 compare_to_allowed_values, gfc_match_open, gfc_match_rewind,
218 gfc_resolve_dt, gfc_match_wait): Ditto.
219 * match.c (match_arithmetic_if, gfc_match_if, gfc_match_critical,
220 gfc_match_do, match_exit_cycle, gfc_match_pause, gfc_match_stop,
221 gfc_match_lock, sync_statement, gfc_match_assign, gfc_match_goto,
222 gfc_match_allocate, gfc_match_return, gfc_match_st_function): Ditto.
223 * module.c (gfc_match_use, gfc_use_module): Ditto.
224 * parse.c (parse_derived_contains, parse_block_construct,
225 parse_associate, parse_contained): Ditto.
226 * primary.c (match_hollerith_constant, match_boz_constant,
227 match_real_constant, match_sym_complex_part, match_arg_list_function,
228 build_actual_constructor, gfc_convert_to_structure_constructor): Ditto.
229 * resolve.c (resolve_formal_arglist, resolve_entries,
230 resolve_common_blocks, resolve_actual_arglist, gfc_resolve_index_1,
231 gfc_resolve_iterator_expr, resolve_ordinary_assign,
232 resolve_fl_var_and_proc, resolve_fl_variable_derived,
233 resolve_fl_procedure, resolve_fl_derived0, resolve_fl_derived,
234 resolve_fl_namelist, resolve_symbol, resolve_fntype): Ditto.
235 * symbol.c (check_conflict, conflict, gfc_add_is_bind_c,
236 gfc_add_extension, gfc_check_symbol_typed): Ditto.
238 2012-07-17 Tobias Burnus <burnus@net-b.de>
241 * decl.c (gfc_verify_c_interop_param): Make warning conditional
242 on -Wc-binding-type works and improve the wording.
244 2012-07-17 Tobias Burnus <burnus@net-b.de>
247 * decl.c (match_char_length): Extra argument, show obsolenscent
248 warning only if *length is used after the typename.
249 (variable_decl, gfc_match_char_spec): Update call
251 2012-07-17 Tobias Burnus <burnus@net-b.de>
252 Steven G. Kargl <kargl@gcc.gnu.org>
255 * decl.c (match_procedure_in_interface): Support "::" for
256 Fortran 2008 and later.
258 2012-07-16 Thomas König <tkoenig@gcc.gnu.org>
261 * resolve.c (resolve_allocate_deallocate): If both
262 start indices are NULL, skip the test for equality.
264 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
266 * f95-lang.c: Include dumpfile.h instead of tree-dump.h.
267 * Make-lang.in: Fix dependencies.
269 2012-07-16 Janus Weil <janus@gcc.gnu.org>
272 * gfortran.h (gfc_copy_formal_args,gfc_copy_formal_args_ppc): Modified
274 * symbol.c (gfc_copy_formal_args): New argument 'if_src'. Copy if_source
276 (gfc_copy_formal_args_ppc): Ditto.
277 * resolve.c (resolve_procedure_interface): Pass IFSRC_DECL to
278 gfc_copy_formal_args.
279 (resolve_fl_derived0): Pass IFSRC_DECL to gfc_copy_formal_args_ppc.
281 2012-07-12 Tobias Burnus <burnus@net-b.de>
283 * trans-expr.c (conv_isocbinding_procedure): Generate c_f_pointer code
286 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
288 * trans.c: Do not include defaults.h.
289 * trans-intrinsic.c: Likewise.
291 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
293 * gfortran.h: Do not include coretypes.h here.
294 Make it an error to include this before coretypes.h
295 * openmp.c: Include coretypes.h.
296 * interface.c: Likewise.
297 * intrinsic.c: Likewise.
298 * symbol.c: Likewise.
301 * matchexp.c: Likewise.
302 * dump-parse-tree.c: Likewise.
304 * constructor.c: Likewise.
308 * module.c: Likewise.
309 * scanner.c: Likewise.
312 * frontend-passes.c: Likewise.
313 * resolve.c: Likewise.
315 * target-memory.c: Likewise.
320 * dependency.c: Likewise.
321 * primary.c: Likewise.
323 * simplify.c: Likewise.
325 2012-07-05 Mikael Morin <mikael@gcc.gnu.org>
328 * trans-array.c (gfc_add_loop_ss_code): Disable self recursive calls
329 handling nested loop(s) if the subscript flag is true.
331 2012-07-05 Uros Bizjak <ubizjak@gmail.com>
334 * parse.c (gfc_parse_file): Initialize errors_before.
336 2012-06-27 Janus Weil <janus@gcc.gnu.org>
340 * interface.c (check_new_interface): Rename, add 'loc' argument,
342 (gfc_add_interface): Rename 'check_new_interface'
343 * gfortran.h (gfc_check_new_interface): Add prototype.
344 * resolve.c (resolve_typebound_intrinsic_op): Add typebound operator
345 targets to non-typebound operator list.
347 2012-06-22 Janus Weil <janus@gcc.gnu.org>
351 * interface.c (count_types_test, generic_correspondence,
352 gfc_compare_interfaces): Ignore PASS arguments.
353 (check_interface1, compare_parameter): Pass NULL arguments to
354 gfc_compare_interfaces.
355 * gfortran.h (gfc_compare_interfaces): Modified prototype.
356 * expr.c (gfc_check_pointer_assign): Pass NULL arguments to
357 gfc_compare_interfaces.
358 * resolve.c (resolve_structure_cons): Ditto.
359 (check_generic_tbp_ambiguity): Determine PASS arguments and pass them
360 to gfc_compare_interfaces.
362 2012-06-21 Janne Blomqvist <jb@gcc.gnu.org>
365 * iresolve.c (gfc_resolve_ftell): Fix result kind and use new
368 2012-06-18 Tobias Burnus <burnus@net-b.de>
370 * intrinsic.h (gfc_resolve_rank): New prototype.
371 * intrinsic.c (add_functions): Use gfc_resolve_rank.
372 * iresolve.c (add_functions): New function.
373 * trans-intrinsic.c (gfc_conv_intrinsic_rank): New function.
374 (gfc_conv_intrinsic_function): Call it.
376 2012-06-18 Tobias Burnus <burnus@net-b.de>
379 * trans-array.c (set_loop_bounds): Don't scalarize via absent
381 * resolve.c (resolve_elemental_actual): Don't stop resolving after printing
384 2012-06-18 Tobias Burnus <burnus@net-b.de>
387 * trans-intrinsic.c (conv_intrinsic_move_alloc): Handle coarrays.
389 2012-06-18 Tobias Burnus <burnus@net-b.de>
392 * check.c (gfc_check_move_alloc): Reject coindexed actual arguments
393 and those with different corank.
395 2012-06-17 Tobias Burnus <burnus@net-b.de>
399 * check.c (gfc_calculate_transfer_sizes): Return if
400 SIZE= is not constant or source-size cannot be determined.
402 2012-06-16 Tobias Burnus <burnus@net-b.de>
406 * frontend-passes.c (optimize_assignment): Don't remove RHS's
407 trim when assigning to a deferred-length string.
408 * trans-expr.c (gfc_trans_assignment_1): Ensure that the RHS string
409 length is evaluated before the deferred-length LHS is reallocated.
411 2012-06-13 Tobias Burnus <burnus@net-b.de>
414 * trans-decl.c (init_intent_out_dt): Fix for polymorphic arrays.
415 * trans-array.c (structure_alloc_comps): Don't loop for
418 2012-06-13 Tobias Burnus <burnus@net-b.de>
421 * decl.c (match_attr_spec): Only mark module variables
422 as SAVE_IMPLICIT for Fortran 2008 and later.
424 2012-06-08 Janus Weil <janus@gcc.gnu.org>
427 * match.c (gfc_match_allocate): Modify order of checks. Change wording
428 of error message. Remove FIXME note.
429 * resolve.c (resolve_allocate_expr): Add a comment.
431 2012-06-07 Thomas König <tkoenig@gcc.gnu.org>
434 * frontend-passes.c (optimize_assignment): Don't set the
435 length of an empty string for deferred-length character
438 2012-06-07 Thomas König <tkoenig@gcc.gnu.org>
441 * frontend-passes.c (empty_string): Add prototype.
442 (optimize_assignment): Set the length of an empty string
445 2012-06-04 Tobias Burnus <burnus@net-b.de>
448 * resolve.c (build_default_init_expr): Don't initialize
451 2012-06-03 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
452 Tobias Burnus <burnus@net-b.de>
455 * gfortran.h (gfc_check_init_expr): Add prototype declaration
457 * check.c (kind_check): Change if condition to use
458 to gfc_check_init_expr.
459 * expr.c (check_init_expr): Remove forward declaration
460 and static keyword. Change name in gfc_check_init_expr.
461 (scalarize_intrinsic_call, check_init_expr_arguments,
462 check_inquiry, check_conversion, gfc_reduce_init_expr): Update
463 call to gfc_check_init_expr.
465 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
467 * trans-common.c: Do not include output.h.
468 * trans-decl.c: Likewise.
470 2012-05-31 Tobias Burnus <burnus@net-b.de>
473 * trans.c (gfc_deallocate_scalar_with_status): Properly
474 handle the case size == 0.
476 2012-05-30 Tobias Burnus <burnus@net-b.de>
479 * decl.c (match_attr_spec): Remove "typedef".
481 2012-05-30 Tobias Burnus <burnus@net-b.de>
483 * decl.c: Fix comment typos.
485 * frontend-passes.c: Ditto.
488 * trans-array.c: Ditto.
489 * trans-common.c: Ditto.
490 * trans-intrinsic.c: Ditto.
491 * trans-types.c: Ditto.
493 2012-05-23 Tobias Burnus <burnus@net-b.de>
497 * match.c (gfc_match_allocate): Set length_from_typespec
499 * resolve.c (resolve_charlen): If set, don't check whether
500 the len is a specification expression.
502 2012-05-22 Tobias Burnus <burnus@net-b.de>
505 * trans-array.c (gfc_add_loop_ss_code): Don't evaluate expression, if
506 ss->is_alloc_lhs is set.
508 2012-05-22 Dodji Seketeli <dodji@redhat.com>
511 * f95-lang.c (gfc_init_builtin_functions): Remove the unused
512 typedef builtin_type.
514 2012-05-14 Janne Blomqvist <jb@gcc.gnu.org>
517 * gfortran.texi: Update _gfortran_set_options documentation.
518 * invoke.texi: Remove runtime behavior description of
520 * trans-decl.c (create_main_function): Don't pass the range-check
521 setting to the library.
523 2012-05-14 Tobias Burnus <burnus@net-b.de>
528 * trans-expr.c (gfc_trans_assignment_1): Fix allocation
529 handling for assignment of function results to allocatable
530 deferred-length strings.
531 * trans-decl.c (gfc_create_string_length): For deferred-length
532 module variables, include module name in the assembler name.
533 (gfc_get_symbol_decl): Don't override the assembler name.
535 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
538 * options.c (gfc_handle_option): Call lang-specific generated function.
540 2012-05-13 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
541 Tobias Burnus <burnus@net-b.de>
546 * resolve.c (resolve_fl_derived0): Deferred character length
547 procedure components are supported.
548 * trans-expr.c (gfc_conv_procedure_call): Handle TBP with
549 deferred-length results.
550 (gfc_string_to_single_character): Add a new check to prevent
552 (gfc_conv_procedure_call): Remove unuseful checks on
553 symbol's attributes. Add new checks to prevent NULL read on
556 2012-05-12 Tobias Burnus <burnus@net-b.de>
560 * resolve.c (resolve_fl_procedure): Don't regard
561 character(len=:) as character(*) in the diagnostic.
563 2012-05-11 Thomas Koenig <tkoenig@gcc.gnu.org>
566 * frontend-passes.c (optimize_op): Change
567 old-style comparison operators to new-style, simplify
569 (empty_string): New function.
570 (get_len_trim_call): New function.
571 (optimize_comparison): If comparing to an empty string,
572 use comparison of len_trim to zero.
573 Use new-style comparison operators only.
574 (optimize_trim): Use get_len_trim_call.
576 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
579 * options.c: Include diagnostics.h instead of
581 (set_Wall): Do not see warn_unused here.
582 (gfc_handle_option): Set it here using handle_generated_option.
584 2012-05-08 Jan Hubicka <jh@suse.cz>
586 * trans-common.c (create_common): Do not fake TREE_ASM_WRITTEN.
587 * trans-decl.c (gfc_finish_cray_pointee): Likewise.
589 2012-05-07 Tobias Burnus <burnus@net-b.de>
592 * resolve.c (resolve_typebound_static): Fix handling
593 of overridden specific to generic operator.
595 2012-05-06 Tobias Burnus <burnus@net-b.de>
598 * decl.c (build_struct): Don't ignore FAILED status.
600 2012-05-05 Paul Thomas <pault@gcc.gnu.org>
603 * trans-array.c (build_array_ref): New static function.
604 (gfc_conv_array_ref, gfc_get_dataptr_offset): Call it.
605 * trans-expr.c (gfc_get_vptr_from_expr): New function.
606 (gfc_conv_derived_to_class): Add a new argument for a caller
607 supplied vptr and use it if it is not NULL.
608 (gfc_conv_procedure_call): Add NULL to call to above.
609 symbol.c (gfc_is_associate_pointer): Return true if symbol is
611 * trans-stmt.c (trans_associate_var): Handle class associate-
613 * expr.c (gfc_get_variable_expr): Supply the array-spec if
615 * trans-types.c (gfc_typenode_for_spec): Set GFC_CLASS_TYPE_P
617 * trans.h : Add prototypes for gfc_get_vptr_from_expr and
618 gfc_conv_derived_to_class. Define GFC_CLASS_TYPE_P.
619 * resolve.c (resolve_variable): For class arrays, ensure that
620 the target expression has all the necessary _data references.
621 (resolve_assoc_var): Throw a "not yet implemented" error for
622 class array selectors that need a temporary.
623 * match.c (copy_ts_from_selector_to_associate,
624 select_derived_set_tmp, select_class_set_tmp): New functions.
625 (select_type_set_tmp): Call one of last two new functions.
626 (gfc_match_select_type): Copy_ts_from_selector_to_associate is
627 called if associate-name is typed.
630 * resolve.c (resolve_ref): C614 applied to class expressions.
632 2012-05-05 Janne Blomqvist <jb@gcc.gnu.org>
636 * intrinsic.texi (MOD, MODULO): Mention sign and magnitude of result.
637 * simplify.c (gfc_simplify_mod): Use mpfr_fmod.
638 (gfc_simplify_modulo): Likewise, use copysign to fix the result if
640 * trans-intrinsic.c (gfc_conv_intrinsic_mod): Remove fallback as
641 builtin_fmod is always available. For modulo, call copysign to fix
642 the result when signed zeros are enabled.
644 2012-05-05 Janne Blomqvist <jb@gcc.gnu.org>
646 * gfortran.texi (GFORTRAN_TMPDIR): Rename to TMPDIR, explain
647 algorithm for choosing temp directory.
649 2012-05-04 Tobias Burnus <burnus@net-b.de>
652 * resolve.c (resolve_variable): Set public_used
653 if a private module variable is used in a (public)
654 specification expression.
655 * trans-decl.c (gfc_finish_var_decl): Mark those
658 2012-05-04 Tobias Burnus <burnus@net-b.de>
661 * resolve.c (resolve_fl_derived): Fix -std=f95
662 diagnostic for generic vs. DT names.
664 2012-05-03 Tobias Burnus <burnus@net-b.de>
667 * interface.c (compare_parameter_intent): Remove.
668 (check_intents): Remove call, handle CLASS pointer.
669 (compare_actual_formal): Handle CLASS pointer.
671 2012-04-30 Jan Hubicka <jh@suse.cz>
673 * f95-lang.c (gfc_finish): Update comments.
675 2012-04-29 Thomas Koenig <tkoenig@gcc.gnu.org>
678 * frontend-passes.c (create_var): If the statement has a label,
679 put the label around the block.
681 2012-04-25 Tobias Burnus <burnus@net-b.de>
684 * lang.opt (Wrealloc-lhs, Wrealloc-lhs-all): New flags.
685 * gfortran.h (gfc_option_t): Add them.
686 * options.c (gfc_init_options, gfc_post_options,
687 gfc_handle_option): Handle them.
688 * invoke.texi: Document them.
689 * trans-expr.c (realloc_lhs_warning): New function.
690 (gfc_trans_arrayfunc_assign,
691 alloc_scalar_allocatable_for_assignment,
692 gfc_trans_assignment_1): Use it.
694 2012-04-18 Steven Bosscher <steven@gcc.gnu.org>
696 * trans-decl.c (gfc_trans_entry_master_switch): Build SWITCH_EXPR
697 with NULL_TREE type instead of void_type_node.
698 * trans-io.c (io_result): Likewise.
699 * trans-stmt.c (gfc_trans_integer_select,
700 gfc_trans_character_select): Likewise.
702 2012-04-16 Tobias Burnus <burnus@net-b.de>
705 * expr.c (gfc_check_vardef_context): Fix assignment check for
708 2012-04-16 Janus Weil <janus@gcc.gnu.org>
711 * class.c (gfc_build_class_symbol): Make sure the 'f2k_derived'
712 namespace is present.
714 2012-04-15 Janus Weil <janus@gcc.gnu.org>
717 * trans-expr.c (gfc_conv_expr_reference): Check if the expression is a
718 simple function call (or a more involved PPC reference).
720 2012-04-15 Tobias Burnus <burnus@net-b.de>
724 * gfortran.h (symbol_attribute): Add public_used.
725 * interface.c (check_sym_interfaces, check_uop_interfaces,
726 gfc_check_interfaces): Set it.
727 * resolve.c (resolve_typebound_procedure): Ditto.
728 * trans-decl.c (build_function_decl): Use it.
730 2012-04-11 Tobias Burnus <burnus@net-b.de>
733 * resolve.c (resolve_symbol): Fix searching for parent NS decl.
735 2012-04-08 Tobias Burnus <burnus@net-b.de>
738 * trans-decl.c (gfc_finish_var_decl): Don't set TREE_PUBLIC
739 for PRIVATE module variables without C-binding label.
742 * trans-decl.c (build_function_decl): Ditto for procedures.
744 2012-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
747 * frontend-passes.c: Keep track of wether we are in an implicit
748 DO loop; do not do function elimination if we are.
750 2012-04-06 Thomas Koenig <tkoenig@gcc.gnu.org>
753 * module.c: Only mark symbols as use_only if they have been
754 imported via an only list.
756 2012-03-28 Paul Thomas <pault@gcc.gnu.org>
757 Tobias Burnus <burnus@gcc.gnu.org>
760 * match.c (gfc_match_allocate, gfc_match_deallocate): Change
761 "not.. or" to "neither.. nor".
762 * parse.c (decode_specification_statement): Correct error in
763 chpice of matching function for "allocatable".
765 2012-03-23 Janne Blomqvist <jb@gcc.gnu.org>
767 * gfortran.h (GFC_MAX_LINE): Remove unused macro.
769 2012-03-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
772 * error.c (gfc_widechar_display_length): Consider tabs as
773 one character wide, as they're displayed as spaces.
774 (show_locus): Move tab handling to...
775 (print_wide_char_into_buffer): ... here.
777 2012-03-17 Tobias Burnus <burnus@net-b.de>
780 * trans-intrinsic.c (gfc_conv_associated): Fix handling of
781 procpointer dummy arguments.
783 2012-03-16 Janne Blomqvist <jb@gcc.gnu.org>
785 * trans-intrinsic.c (build_round_expr): Don't use BUILT_IN_IROUND
788 2012-03-15 Janne Blomqvist <jb@gcc.gnu.org>
790 * f95-lang.c (gfc_init_builtin_functions): Initialize
792 * mathbuiltins.def: Add IROUND.
793 * trans-intrinsic.c (build_round_expr): Use BUILT_IN_IROUND if
795 (gfc_build_intrinsic_lib_fndecls): Build iround functions.
797 2012-03-12 Richard Guenther <rguenther@suse.de>
799 * f95-lang.c (builtin_type_for_size): Use gfc_type_for_size.
801 2012-03-12 Tobias Burnus <burnus@net-b.de>
804 * decl.c (match_procedure_decl): If the interface
805 is bind(C), the procedure is as well.
807 2012-03-10 Steven Bosscher <steven@gcc.gnu.org>
809 * convert.c (convert): Fold BOOLEAN_TYPE types to the proper variant.
811 2012-03-09 Steven Bosscher <steven@gcc.gnu.org>
813 * Make-lang.in (convert.o): Depend on convert.h.
814 * convert.c: Header and comment cleanups.
815 (gfc_thruthvalue_conversion): Rename static function
816 to truthvalue_conversion. Do not use 'internal_error' from here,
817 use 'gcc_unreachable' instead.
818 (convert): Do not use 'error' for conversions to void, use
819 'gcc_unreachable' instead. Likewise for conversions to non-scalar
820 types. Do not hanlde ENUMERAL_TYPE, the front end never creates them.
823 2012-03-08 Tobias Burnus <burnus@net-b.de>
826 * trans-types.c (gfc_get_function_type): Handle backend_decl
827 of a procedure pointer.
829 2012-03-06 Steven Bosscher <steven@gcc.gnu.org>
831 * f95-lang.c (yyerror, yylex): Remove.
832 (clear_binding_stack): Remove, fold into its only user.
833 (LANG_HOOKS_PRINT_IDENTIFIER): Do not re-define.
834 (ridpointers): Remove.
835 (gfc_eh_initialized_p): Make static.
836 (gfc_truthvalue_conversion): Move to convert.c.
837 (gfc_be_parse_file): Clear binding level stack when done.
838 (gfc_print_identifier): Remove.
839 (pushlevel): Remove ignored 'ignore' argument. Update all callers.
840 (poplevel): Remove unused 'reverse' argument. Update all callers.
842 (gfc_builtin_function): Make static. Do not attempt to make RTL for
844 * convert.c (gfc_truthvalue_conversion): Moved here from f95-lang.c,
846 * trans.h (pushlevel, poplevel): Adjust prototypes.
847 (gfc_truthvalue_conversion, gfc_builtin_function): Remove prototypes.
848 * trans-openmp.c: Update calls to pushlevel and poplevel.
850 * trans-decl.c: Likewise.
852 2012-03-04 Mikael Morin <mikael@gcc.gnu.org>
855 * gfortran.h (gfc_is_class_container_ref): New prototype.
856 * class.c (gfc_is_class_container_ref): New function.
857 * trans-expr.c (gfc_conv_procedure_call): Add a "_data" component
858 reference to polymorphic actual arguments.
860 2012-03-04 Mikael Morin <mikael@gcc.gnu.org>
863 * trans-expr.c (gfc_conv_procedure_call): Save se->ss's value.
864 Handle the case of unallocated arrays passed to elemental procedures.
866 2012-03-04 Mikael Morin <mikael@gcc.gnu.org>
868 * trans.h (struct gfc_ss_info): Move can_be_null_ref component from
869 the data::scalar subcomponent to the toplevel.
870 * trans-expr.c (gfc_conv_expr): Update component reference.
871 * trans-array.c (gfc_add_loop_ss_code): Ditto.
872 (gfc_walk_elemental_function_args): Ditto. Move the conditional setting
873 the field out of the scalar-only block.
875 2012-03-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
878 * error.c (gfc_widechar_display_length, gfc_wide_display_length):
880 (print_wide_char_into_buffer): Return length written.
881 (show_locus): Fix locus displayed when wide characters are present.
883 2012-03-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
885 * module.c (gfc_use_module): Improve error message some more.
887 2012-03-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
890 * module.c (gfc_use_module): Improve error messages.
892 2012-03-03 Tobias Burnus <burnus@net-b.de>
895 * resolve.c (resolve_actual_arglist): Properly reset
896 assumed_type_expr_allowed.
898 2012-03-03 Tobias Burnus <burnus@net-b.de>
900 * lang.opt (Wc-binding-type): New flag.
901 * options.c (gfc_init_options, gfc_handle_option): Handle it.
902 * invoke.texi (Wc-binding-type): Document it.
903 * gfortran.h (gfc_option_t): Add warn_c_binding_type.
904 * decl.c (verify_bind_c_sym): Handle -Wc-binding-type.
905 * symbol.c (gfc_set_default_type, verify_bind_c_derived_type):
908 2012-03-03 Tobias Burnus <burnus@net-b.de>
911 * decl.c (gfc_match_decl_type_spec): Support type(*).
912 (gfc_verify_c_interop): Allow type(*).
913 * dump-parse-tree.c (show_typespec): Handle type(*).
914 * expr.c (gfc_copy_expr): Ditto.
915 * interface.c (compare_type_rank, compare_parameter,
916 compare_actual_formal, gfc_procedure_use): Ditto.
917 * libgfortran.h (bt): Add BT_ASSUMED.
918 * misc.c (gfc_basic_typename, gfc_typename): Handle type(*).
919 * module.c (bt_types): Ditto.
920 * resolve.c (assumed_type_expr_allowed): New static variable.
921 (resolve_actual_arglist, resolve_variable, resolve_symbol):
923 * trans-expr.c (gfc_conv_procedure_call): Ditto.
924 * trans-types.c (gfc_typenode_for_spec, gfc_get_dtype): Ditto.
926 2012-03-02 Tobias Burnus <burnus@net-b.de>
929 * primary.c (gfc_match_varspec): Add missing ;.
931 2012-03-02 Tobias Burnus <burnus@net-b.de>
934 * primary.c (gfc_match_varspec): Add diagnostic for % with
937 2012-03-02 Tobias Burnus <burnus@net-b.de>
940 * expr.c (gfc_check_vardef_context): Fix check for
941 intent-in polymorphic pointer .
942 * interface.c (compare_parameter): Allow passing TYPE to
943 intent-in polymorphic pointer.
945 2012-03-02 Tobias Burnus <burnus@net-b.de>
948 * resolve.c (resolve_intrinsic): Don't search for a
949 function if we know that it is a subroutine.
951 2012-02-29 Paul Thomas <pault@gcc.gnu.org>
954 * trans-expr.c (fcncall_realloc_result): Dereference the
955 descriptor if needed.
957 2012-02-22 Tobias Burnus <burnus@net-b.de>
960 * io.c (gfc_match_open): Remove bogus F2003 DELIM= check.
962 2012-02-18 Tobias Burnus <burnus@net-b.de>
965 * interface.c (check_interface0): Internal procs in
966 generic interfaces are allowed in Fortran 2008.
968 2012-02-17 Tobias Burnus <burnus@net-b.de>
969 Roland Stigge <stigge@antcom.de>
972 * interface.c (compare_actual_formal): Fix typo "at at".
974 2012-02-17 Tobias Burnus <burnus@net-b.de>
976 * gfortran.texi (Q exponent-letter): Fix grammar.
978 2012-02-17 Tobias Burnus <burnus@net-b.de>
980 * gfortran.texi (Status): Fix typos.
981 * invoke.texi (ffixed-form, fstack-arrays): Spell Fortran with
984 2012-02-17 Tobias Burnus <burnus@net-b.de>
985 Roland Stigge <stigge@antcom.de>
993 * io.c (gfc_match_open): Fix typo.
994 * interface.c (compare_actual_formal): Ditto.
995 * lang.opt (freal-4-real-8, freal-4-real-16, freal-8-real-16): Ditto.
996 * match.c (alloc_opt_list, gfc_match_nullify): Ditto.
997 * check.c (gfc_check_associated, gfc_check_null): Ditto.
999 2012-02-12 Mikael Morin <mikael@gcc.gnu.org>
1002 * trans-stmt.c (gfc_get_proc_ifc_for_call): New function.
1003 (gfc_trans_call): Use gfc_get_proc_ifc_for_call.
1005 2012-02-12 Mikael Morin <mikael@gcc.gnu.org>
1007 * trans-array.c (gfc_walk_elemental_function_args,
1008 gfc_walk_function_expr): Move call to gfc_get_proc_ifc_for_expr out
1009 of gfc_walk_elemental_function_args.
1010 * trans-stmt.c (gfc_trans_call): Ditto.
1011 * trans-array.h (gfc_get_proc_ifc_for_expr): New prototype.
1012 (gfc_walk_elemental_function_args): Update prototype.
1014 2012-02-12 Mikael Morin <mikael@gcc.gnu.org>
1016 * trans-array.c (gfc_get_proc_ifc_for_expr): New function.
1017 (gfc_walk_elemental_function_args): Move code to
1018 gfc_get_proc_ifc_for_expr and call it.
1020 2012-02-08 Tobias Burnus <burnus@net-b.de>
1023 * trans-expr.c (fcncall_realloc_result): Set also the stride.
1025 2012-02-07 Tobias Burnus <burnus@net-b.de>
1028 * trans-expr.c (gfc_conv_procedure_call): Add _data component
1029 for calls of scalar CLASS actuals to TYPE dummies.
1031 2012-02-05 Thomas König <tkoenig@gcc.gnu.org>
1034 * trans-decl.c: Warn about unused dummy procedure arguments
1035 if -Wunused-dummy-argument is specified. Suppress middle-end
1036 warnings about procedure arguments.
1038 2012-02-05 Paul Thomas <pault@gcc.gnu.org>
1040 * trans-array.c (gfc_array_allocate): Zero memory for all class
1042 * trans-stmt.c (gfc_trans_allocate): Ditto for class scalars.
1045 * trans-stmt.c (gfc_trans_allocate): Before correcting a class
1046 array reference, ensure that 'dataref' points to the _data
1047 component that is followed by the array reference..
1049 2012-02-02 Mikael Morin <mikael@gcc.gnu.org>
1055 * class.c (insert_component_ref, class_data_ref_missing,
1056 gfc_fix_class_refs): New functions.
1057 * gfortran.h (gfc_fix_class_refs): New prototype.
1058 * trans-expr.c (gfc_conv_expr): Remove special case handling and call
1059 gfc_fix_class_refs instead.
1061 2012-02-02 Paul Thomas <pault@gcc.gnu.org>
1064 * trans-expr.c (fcncall_realloc_result): If variable shape is
1065 correct, retain the bounds, whatever they are.
1067 2012-02-02 Tobias Burnus <burnus@net-b.de>
1070 * simplify.c (gfc_simplify_size): Handle INTRINSIC_PARENTHESES.
1072 2012-02-01 Thomas König <tkoenig@gcc.gnu.org>
1075 * frontend-passes.c (convert_elseif): New function.
1076 (optimize_namespace): Call it.
1078 2012-02-01 Tobias Burnus <burnus@net-b.de>
1081 * module.c (MOD_VERSION): Bump.
1082 (mio_typebound_proc): Read/write is_operator from/to the
1085 2012-02-01 Tobias Burnus <burnus@net-b.de>
1088 * trans-expr.c (gfc_conv_procedure_call): Add array ref
1091 2012-01-31 Tobias Burnus <burnus@net-b.de>
1094 * gfortran.h (gfc_tbp_generic): Store whether the
1095 generic is an operator.
1096 * decl.c (gfc_match_generic): Set that flag.
1097 * resolve.c (check_generic_tbp_ambiguity): Use it in the
1098 gfc_compare_interfaces check.
1100 2012-01-31 Tobias Burnus <burnus@net-b.de>
1103 * class.c (gfc_find_derived_vtab): Mark _copy function as pure.
1105 2012-01-31 Tobias Burnus <burnus@net-b.de>
1108 * class.c (get_unique_hashed_string): Adapt trim length.
1109 (gfc_build_class_symbol) Encode also corank in the container name.
1111 2012-01-31 Paul Thomas <pault@gcc.gnu.org>
1114 * trans-expr.c (fcncall_realloc_result): Correct calculation of
1117 2012-01-29 Janne Blomqvist <jb@gcc.gnu.org>
1119 * module.c (pointer_info): Make true_name and module pointers
1120 rather than arrays, order pointers before other fields.
1121 (free_pi_tree): free true_name and module as well.
1122 (mio_read_string): Rename to read_string.
1123 (mio_write_string): Remove.
1124 (load_commons): Use read_string.
1125 (read_module): Use read_string rather than mio_internal_string.
1126 (write_blank_common): Call write_atom directly.
1127 (write_symbol): Likewise.
1129 2012-01-29 Tobias Burnus <burnus@net-b.de>
1132 * expr.c (gfc_default_initializer): Convert the values if
1133 the type does not match.
1135 2012-01-29 Tobias Burnus <burnus@net-b.de>
1138 * trans-array.c (structure_alloc_comps): Fix assignment of
1139 polymorphic components (polymorphic deep copying).
1141 2012-01-29 Janne Blomqvist <jb@gcc.gnu.org>
1144 * decl.c (set_binding_label): Make binding_label argument const.
1145 (curr_binding_label): Constify.
1146 * gfortran.h (gfc_symbol): Constify binding_label.
1147 (gfc_common_head): Likewise.
1148 (get_iso_c_sym): Likewise.
1149 * match.c (gfc_match_name_C): Constify buffer argument.
1150 * match.h (gfc_match_name_C): Likewise.
1151 * resolve.c (set_name_and_label): Constify binding_label argument.
1152 (gfc_iso_c_sub_interface): Constify binding_label variable.
1153 * symbol.c (get_iso_c_sym): Constify binding_label argument.
1155 2012-01-29 Janne Blomqvist <jb@gcc.gnu.org>
1158 * decl.c (set_binding_label): Move prototype from match.h to here.
1159 (curr_binding_label): Make a pointer rather than static array.
1160 (build_sym): Check sym->binding_label pointer rather than array,
1161 update set_binding_label call, handle curr_binding_label changes.
1162 (set_binding_label): Handle new curr_binding_label, dest_label
1163 double ptr, and sym->binding_label.
1164 (verify_bind_c_sym): Handle sym->binding_label being a pointer.
1165 (set_verify_bind_c_sym): Check sym->binding_label pointer rather
1166 than array, update set_binding_label call.
1167 (gfc_match_bind_c_stmt): Handle curr_binding_label change.
1168 (match_procedure_decl): Update set_binding_label call.
1169 (gfc_match_bind_c): Change binding_label to pointer, update
1170 gfc_match_name_C call.
1171 * gfortran.h (GFC_MAX_BINDING_LABEL_LEN): Remove macro.
1172 (gfc_symbol): Make binding_label a pointer.
1173 (gfc_common_head): Likewise.
1174 * match.c (gfc_match_name_C): Heap allocate bind(C) name.
1175 * match.h (gfc_match_name_C): Change prototype argument.
1176 (set_binding_label): Move prototype to decl.c.
1177 * module.c (struct pointer_info): Make binding_label a pointer.
1178 (free_pi_tree): Free unused binding_label.
1179 (mio_read_string): New function.
1180 (mio_write_string): New function.
1181 (load_commons): Redo reading of binding_label.
1182 (read_module): Likewise.
1183 (write_common_0): Change to write empty string instead of name if
1185 (write_blank_common): Write empty string for binding label.
1186 (write_symbol): Change to write empty string instead of name if no
1188 * resolve.c (gfc_iso_c_func_interface): Don't set binding_label.
1189 (set_name_and_label): Make binding_label double pointer, use
1191 (gfc_iso_c_sub_interface): Make binding_label a pointer.
1192 (resolve_bind_c_comms): Handle cases if
1193 gfc_common_head->binding_label is NULL.
1194 (gfc_verify_binding_labels): sym->binding_label is a pointer.
1195 * symbol.c (gfc_new_symbol): Rely on XCNEW zero init for
1197 (gen_special_c_interop_ptr): Don't set binding label.
1198 (generate_isocbinding_symbol): Insert binding_label into symbol
1200 (get_iso_c_sym): Use pointer assignment instead of strcpy.
1201 * trans-common.c (gfc_sym_mangled_common_id): Handle
1202 com->binding_label being a pointer.
1203 * trans-decl.c (gfc_sym_mangled_identifier): Handle
1204 sym->binding_label being a pointer.
1205 (gfc_sym_mangled_function_id): Likewise.
1207 2012-01-29 Tobias Burnus <burnus@net-b.de>
1210 * resolve.c (symbol_as): Remove unused, accidentally
1213 2012-01-28 Tobias Burnus <burnus@net-b.de>
1216 * trans-stmt.c (gfc_trans_allocate): Properly check whether
1217 we have a BT_CLASS which needs to be memset.
1219 2012-01-27 Tobias Burnus <burnus@net-b.de>
1222 * trans-expr.c (gfc_conv_procedure_call): Fix passing
1223 of functions, which return allocatables.
1225 2012-01-27 Tobias Burnus <burnus@net-b.de>
1228 * resolve.c (resolve_formal_arglist): Fix elemental
1229 constraint checks for polymorphic dummies also for
1232 2012-01-27 Tobias Burnus <burnus@net-b.de>
1236 * primary.c (gfc_match_varspec. gfc_match_rvalue): Set
1237 handle array spec for BT_CLASS.
1238 * expr.c (gfc_get_variable_expr, gfc_lval_expr_from_sym)
1239 * frontend-passes.c (create_var): Ditto.
1240 * resolve.c (resolve_actual_arglist, resolve_assoc_var): Ditto.
1241 * trans-decl.c (gfc_trans_deferred_vars): Use class_pointer
1242 instead of attr.pointer.
1243 (gfc_generate_function_code): Use CLASS_DATA (sym) for BT_CLASS.
1244 * trans-intrinsic.c (conv_intrinsic_move_alloc): Move assert.
1245 * trans-stmt.c (trans_associate_var): Ask for the descriptor.
1247 2012-01-27 Tobias Burnus <burnus@net-b.de>
1250 * match.c (gfc_match_allocate): Allow more than allocate
1251 object with SOURCE=.
1253 2012-01-27 Tobias Burnus <burnus@net-b.de>
1256 * resolve.c (resolve_formal_arglist): Fix elemental
1257 constraint checks for polymorphic dummies.
1259 2012-01-27 Paul Thomas <pault@gcc.gnu.org>
1260 Tobias Burnus <burnus@gcc.gnu.org>
1266 * trans-array.c (gfc_array_init_size): Add two extra arguments
1267 to convey the dynamic element size of a calls object and to
1268 return the number of elements that have been allocated.
1269 (gfc_array_allocate): Add the same arguments and use them to
1270 call gfc_array_init_size. Before the allocation dereference
1271 the data pointer, if necessary. Set the allocated array to zero
1272 if the class element size or expr3 are non-null.
1273 * trans-expr.c (gfc_conv_class_to_class): Give this function
1275 (get_class_array_ref): New function.
1276 (gfc_copy_class_to_class): New function.
1277 * trans-array.h : Update prototype for gfc_array_allocate.
1278 * trans-stmt.c (gfc_trans_allocate): For non-variable class
1279 STATUS expressions extract the class object and the dynamic
1280 element size. Use the latter to call gfc_array_allocate and
1281 the former for setting the vptr and, via
1282 gfc_copy_class_to_clasfc_cs, to copy to the allocated data.
1283 * trans.h : Prototypes for gfc_get_class_array_ref,
1284 gfc_copy_class_to_class and gfc_conv_class_to_class.
1286 2012-01-25 Tobias Burnus <burnus@net-b.de>
1288 * resolve.c (symbol_as): Check also for attr.class_ok.
1290 2012-01-25 Tobias Burnus <burnus@net-b.de>
1293 * class.c (gfc_build_class_symbol): Fix invalid freeing
1294 issue with fclass->f2k_derived.
1296 2012-01-25 Tobias Burnus <burnus@net-b.de>
1299 * class.c (gfc_build_class_symbol): Ensure that
1300 fclass->f2k_derived is set.
1302 2012-01-25 Tobias Burnus <burnus@net-b.de>
1305 * resolve.c (resolve_structure_cons): Only create an
1306 array constructors for nonscalars.
1308 2012-01-23 Tobias Burnus <burnus@net-b.de>
1311 * check.c (variable_check): Fix checking for
1312 variables and deeply nested BLOCKs.
1314 2012-01-21 Tobias Burnus <burnus@net-b.de>
1315 Steven G. Kargl <kargl@gcc.gnu.org>
1318 * symbol.c (check_conflict): namelist-group-name cannot have the SAVE
1321 2012-01-21 Tobias Burnus <burnus@net-b.de>
1324 * interface.c (compare_parameter): Fix CLASS comparison.
1326 2012-01-20 Tobias Burnus <burnus@net-b.de>
1327 Janus Weil <janus@gcc.gnu.org>
1330 * module.c (load_needed, read_module): Don't mark __vtab etc.
1333 2012-01-19 Tobias Burnus <burnus@net-b.de>
1336 * expr.c (gfc_build_intrinsic_call): Also set the symtree.
1338 2012-01-18 Paul Thomas <pault@gcc.gnu.org>
1341 * trans-expr.c (gfc_conv_procedure_call): Deallocate allocatable
1342 components of temporary class arguments.
1344 2012-01-17 Tobias Burnus <burnus@net-b.de>
1345 Janne Blomqvist <jb@gcc.gnu.org>
1348 * trans-expr.c (alloc_scalar_allocatable_for_assignment): Nullify
1349 LHS after allocation, if it has allocatable components.
1350 * f95-lang.c (gfc_init_builtin_functions): Add BUILT_IN_CALLOC.
1352 2012-01-16 Mikael Morin <mikael@gcc.gnu.org>
1353 Tobias Burnus <burnus@net-b.de>
1356 * trans-array.c (gfc_walk_elemental_function_args): Fix
1357 passing of deallocated allocatables/pointers as absent argument.
1359 2012-01-16 Tobias Burnus <burnus@net-b.de>
1362 * class.c (gfc_find_derived_vtab): Mark __vtab and
1363 __def_init as FL_VARIABLE not as FL_PARAMETER.
1364 * expr.c (gfc_simplify_expr): Remove special
1366 * resolve.c (resolve_values): Ditto.
1367 * trans-decl.c (gfc_get_symbol_decl): Mark __vtab
1368 and __def_init as TREE_READONLY.
1370 2012-01-16 Zydrunas Gimbutas <gimbutas@cims.nyu.edu>
1371 Andreas Kloeckner <kloeckner@cims.nyu.edu>
1372 Steven G. Kargl <kargl@gcc.gnu.org>
1375 * gfortran.h (gfc_option_t): Add members flag_*_kind to store kind.
1376 * lang.opt: Add options -freal-4-real-8, -freal-4-real-10,
1377 -freal-4-real-16, -freal-8-real-4, -freal-8-real-10, -freal-8-real-16
1378 and -finteger-4-integer-8. User-desired type conversion information.
1379 * decl.c (gfc_match_old_kind_spec,kind_expr): Type conversions
1380 in declaration parsing.
1381 * trans-types.c (gfc_init_kinds): User-specified type conversion
1382 checked for current backend.
1383 * primary.c (match_integer_constant,match_real_constant): Implement
1384 type conversion in constant parsing.
1385 * options.c (gfc_init_options,gfc_handle_option): Translate input
1386 options to flags in internal options data structure.
1387 * invoke.texi: Document new options. Re-order options in Options
1390 2012-01-16 Paul Thomas <pault@gcc.gnu.org>
1392 * trans-array.c (gfc_trans_create_temp_array): In the case of a
1393 class array temporary, detect a null 'eltype' on entry and use
1394 'initial' to provde the class reference and so, through the
1395 vtable, the element size for the dynamic type.
1396 * trans-stmt.c (gfc_conv_elemental_dependencies): For class
1397 expressions, set 'eltype' to null and pass the values via the
1398 'initial' expression.
1400 2012-01-14 Tobias Burnus <burnus@net-b.de>
1403 * resolve.c (build_default_init_expr): Also initialize
1404 nonconstant-length strings with -finit-character=<n>.
1406 2011-01-14 Tobias Burnus <burnus@net-b.de>
1409 * module.c (read_module): Don't make nonexisting
1410 intrinsic operators as found.
1411 (rename_list_remove_duplicate): New function.
1412 (gfc_use_modules): Use it.
1414 2012-01-13 Paul Thomas <pault@gcc.gnu.org>
1417 * trans-array.c (structure_alloc_comps): Suppress interative
1418 call to self, when current component is deallocated using
1419 gfc_trans_dealloc_allocated.
1420 * class.c (gfc_build_class_symbol): Copy the 'alloc_comp'
1421 attribute from the declared type to the class structure.
1423 2012-01-13 Tobias Burnus <burnus@net-b.de>
1426 * fortran/trans-types.c (gfc_init_kinds): Use PTRDIFF_TYPE
1427 instead of a signed int of size POINTER_SIZE for
1428 gfc_index_integer_kind.
1430 2012-01-12 Tobias Burnus <burnus@net-b.de>
1433 * intrinsic.texi (CHMOD): Extend a bit and remove statement
1434 that /bin/chmod is called.
1436 2012-01-10 Gerald Pfeifer <gerald@pfeifer.com>
1438 * gfortran.texi (Fortran 2003 Status): Fix grammar.
1440 2012-01-10 Tobias Burnus <burnus@net-b.de>
1443 * resolve.c (resolve_allocate_expr): For non-deferred char lengths,
1444 check whether type-spec matches declaration.
1446 2012-01-10 Tobias Burnus <burnus@net-b.de>
1448 * resolve.c (resolve_ordinary_assign): Improve error wording.
1450 2012-01-09 Paul Thomas <pault@gcc.gnu.org>
1453 * interface.c (matching_typebound_op): Drill down through
1454 possible parentheses to obtain base expression. Do not test for
1455 'class_ok' but, instead for the class structure components.
1456 * resolve.c (resolve_ordinary_assign): Extend error message for
1457 polymorphic assignment to advise checking for specific
1461 * resolve.c (resolve_typebound_function): Restore 'static' to
1464 2012-01-09 Mikael Morin <mikael@gcc.gnu.org>
1467 * trans-array.c (gfc_walk_elemental_function_args):
1468 Skip over NULL() actual arguments.
1470 2012-01-09 Tobias Burnus <burnus@net-b.de>
1472 * gfortran.texi: Bump copyright year.
1473 (Fortran 2003 Status): Update polymorphism item, add
1474 item for generic interface with DT name.
1476 2012-01-09 Tobias Burnus <burnus@net-b.de>
1479 * gfortran.h (gfc_use_list):
1480 * match.h (gfc_use_module): Rename to ...
1481 (gfc_use_modules): ... this.
1482 * module.c (use_locus, specified_nonint, specified_int): Remove
1484 (module_name): Change type to const char*, used with gfc_get_string.
1485 (module_list): New global variable.
1486 (free_rename): Free argument not global var.
1487 (gfc_match_use): Save match to module_list.
1488 (load_generic_interfaces, read_module): Don't free symtree.
1489 (write_dt_extensions, gfc_dump_module): Fix module-name I/O due to the
1490 type change of module_name.
1491 (write_symbol0, write_generic): Optimize due to the type change.
1492 (import_iso_c_binding_module, use_iso_fortran_env_module): Use
1493 locus of rename->where.
1494 (gfc_use_module): Take module_list as argument.
1495 (gfc_use_modules): New function.
1496 (gfc_module_init_2, gfc_module_done_2): Init module_list, rename_list.
1497 * parse.c (last_was_use_stmt): New global variable.
1498 (use_modules): New function.
1499 (decode_specification_statement, decode_statement): Move USE match up
1500 and call use_modules.
1501 (next_free, next_fixed): Call use_modules.
1502 (accept_statement): Don't call gfc_module_use.
1504 2012-01-06 Tobias Burnus <burnus@net-b.de>
1506 * trans-openmp.c (gfc_omp_clause_dtor, gfc_trans_omp_array_reduction):
1507 Update call to gfc_trans_dealloc_allocated.
1508 * trans.c (gfc_allocate_using_malloc): Fix spacing.
1509 (gfc_allocate_allocatable): For gfc_allocate_using_lib, jump to
1510 label_finish when an error occurs.
1511 (gfc_deallocate_with_status): Call caf_deregister for -fcoarray=lib.
1512 * trans.h (gfc_allocate_allocatable, gfc_deallocate_with_status):
1514 (gfor_fndecl_caf_deregister): New tree symbol.
1515 * trans-expr.c (gfc_conv_procedure_call): Update
1516 gfc_deallocate_with_status and gfc_trans_dealloc_allocated calls.
1517 * trans-array.c (gfc_array_allocate, gfc_trans_dealloc_allocated,
1518 structure_alloc_comps, gfc_trans_deferred_array): Ditto.
1519 (gfc_array_deallocate): Handle coarrays with -fcoarray=lib.
1520 * trans-array.h (gfc_array_deallocate, gfc_array_allocate,
1521 gfc_trans_dealloc_allocated): Update prototypes.
1522 * trans-stmt.c (gfc_trans_sync): Fix indentation.
1523 (gfc_trans_allocate): Fix errmsg padding and label handling.
1524 (gfc_trans_deallocate): Ditto and handle -fcoarray=lib.
1525 * expr.c (gfc_is_coarray): Fix algorithm for BT_CLASS.
1526 * libgfortran.h (GFC_STAT_STOPPED_IMAGE): Use large value
1527 to avoid other stats accidentally matching this one.
1528 * trans-decl.c (gfor_fndecl_caf_deregister): New global var.
1529 (gfc_build_builtin_function_decls): Fix prototype decl of caf_register
1530 and add decl for caf_deregister.
1531 (gfc_trans_deferred_vars): Handle CAF vars with -fcoarrays=lib.
1532 * trans-intrinsic.c (conv_intrinsic_move_alloc): Update call to
1533 gfc_deallocate_with_status.
1535 2012-01-05 Paul Thomas <pault@gcc.gnu.org>
1538 * resolve.c (resolve_typebound_static): If the typebound
1539 procedure is 'deferred' try to find the correct specific
1540 procedure in the derived type operator space itself.
1542 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
1545 * trans-array.h (gfc_walk_elemental_function_args): New argument.
1546 * trans-intrinsic.c (gfc_walk_intrinsic_function): Update call.
1547 * trans-stmt.c (gfc_trans_call): Ditto.
1548 * trans-array.c (gfc_walk_function_expr): Ditto.
1549 (gfc_walk_elemental_function_args): Get the dummy argument list
1550 if possible. Check that the dummy and the actual argument are both
1551 optional, and set can_be_null_ref accordingly.
1553 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
1556 * trans.h (struct gfc_ss_info): New field data::scalar::can_be_null_ref
1557 * trans-array.c: If the reference can be NULL, save the reference
1558 instead of the value.
1559 * trans-expr.c (gfc_conv_expr): If we have saved a reference,
1562 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
1564 * trans-expr.c (gfc_conv_expr): Move address taking...
1565 (gfc_conv_expr_reference): ... here.
1567 2012-01-04 Thomas Koenig <tkoenig@gcc.gnu.org>
1570 * trans-common.c (create_common): Update copyright years. Mark
1571 variables as used to avoid warnings about unused variables in
1574 2012-01-03 Hans-Peter Nilsson <hp@axis.com>
1576 * gfortran.h (struct gfc_expr): Add missing "struct"
1577 qualifier for member base_expr.
1579 2012-01-02 Paul Thomas <pault@gcc.gnu.org>
1582 * trans-array.c (gfc_array_allocate): Null allocated memory of
1583 newly allocted class arrays.
1588 * interface.c(build_compcall_for_operator): Add a type to the
1590 * trans-expr.c (conv_base_obj_fcn_val): New function.
1591 (gfc_conv_procedure_call): Use base_expr to detect non-variable
1592 base objects and, ensuring that there is a temporary variable,
1593 build up the typebound call using conv_base_obj_fcn_val.
1594 (gfc_trans_class_assign): Pick out class procedure pointer
1595 assignments and do the assignment with no further prcessing.
1596 (gfc_trans_class_array_init_assign, gfc_trans_class_init_assign
1597 gfc_trans_class_assign): Move to top of file.
1598 * gfortran.h : Add 'base_expr' field to gfc_expr.
1599 * resolve.c (get_declared_from_expr): Add 'types' argument to
1600 switch checking of derived types on or off.
1601 (resolve_typebound_generic_call): Set the new argument.
1602 (resolve_typebound_function, resolve_typebound_subroutine):
1603 Set 'types' argument for get_declared_from_expr appropriately.
1604 Identify base expression, if not a variable, in the argument
1605 list of class valued calls. Assign it to the 'base_expr' field
1606 of the final expression. Strip away all references after the
1607 last class reference.
1609 2012-01-02 Tobias Burnus <burnus@net-b.de>
1612 * trans-intrinsic.c (trans_this_image, trans_image_index,
1613 trans_num_images, conv_intrinsic_cobound): Fold_convert the
1614 caf_num_images/caf_this_images variables to the correct int kind.
1616 2012-01-01 Jakub Jelinek <jakub@redhat.com>
1618 * gfortranspec.c (lang_specific_driver): Update copyright notice
1621 Copyright (C) 2012 Free Software Foundation, Inc.
1623 Copying and distribution of this file, with or without modification,
1624 are permitted in any medium without royalty provided the copyright
1625 notice and this notice are preserved.