1 2012-01-29 Janne Blomqvist <jb@gcc.gnu.org>
4 * decl.c (set_binding_label): Make binding_label argument const.
5 (curr_binding_label): Constify.
6 * gfortran.h (gfc_symbol): Constify binding_label.
7 (gfc_common_head): Likewise.
8 (get_iso_c_sym): Likewise.
9 * match.c (gfc_match_name_C): Constify buffer argument.
10 * match.h (gfc_match_name_C): Likewise.
11 * resolve.c (set_name_and_label): Constify binding_label argument.
12 (gfc_iso_c_sub_interface): Constify binding_label variable.
13 * symbol.c (get_iso_c_sym): Constify binding_label argument.
15 2012-01-29 Janne Blomqvist <jb@gcc.gnu.org>
18 * decl.c (set_binding_label): Move prototype from match.h to here.
19 (curr_binding_label): Make a pointer rather than static array.
20 (build_sym): Check sym->binding_label pointer rather than array,
21 update set_binding_label call, handle curr_binding_label changes.
22 (set_binding_label): Handle new curr_binding_label, dest_label
23 double ptr, and sym->binding_label.
24 (verify_bind_c_sym): Handle sym->binding_label being a pointer.
25 (set_verify_bind_c_sym): Check sym->binding_label pointer rather
26 than array, update set_binding_label call.
27 (gfc_match_bind_c_stmt): Handle curr_binding_label change.
28 (match_procedure_decl): Update set_binding_label call.
29 (gfc_match_bind_c): Change binding_label to pointer, update
30 gfc_match_name_C call.
31 * gfortran.h (GFC_MAX_BINDING_LABEL_LEN): Remove macro.
32 (gfc_symbol): Make binding_label a pointer.
33 (gfc_common_head): Likewise.
34 * match.c (gfc_match_name_C): Heap allocate bind(C) name.
35 * match.h (gfc_match_name_C): Change prototype argument.
36 (set_binding_label): Move prototype to decl.c.
37 * module.c (struct pointer_info): Make binding_label a pointer.
38 (free_pi_tree): Free unused binding_label.
39 (mio_read_string): New function.
40 (mio_write_string): New function.
41 (load_commons): Redo reading of binding_label.
42 (read_module): Likewise.
43 (write_common_0): Change to write empty string instead of name if
45 (write_blank_common): Write empty string for binding label.
46 (write_symbol): Change to write empty string instead of name if no
48 * resolve.c (gfc_iso_c_func_interface): Don't set binding_label.
49 (set_name_and_label): Make binding_label double pointer, use
51 (gfc_iso_c_sub_interface): Make binding_label a pointer.
52 (resolve_bind_c_comms): Handle cases if
53 gfc_common_head->binding_label is NULL.
54 (gfc_verify_binding_labels): sym->binding_label is a pointer.
55 * symbol.c (gfc_new_symbol): Rely on XCNEW zero init for
57 (gen_special_c_interop_ptr): Don't set binding label.
58 (generate_isocbinding_symbol): Insert binding_label into symbol
60 (get_iso_c_sym): Use pointer assignment instead of strcpy.
61 * trans-common.c (gfc_sym_mangled_common_id): Handle
62 com->binding_label being a pointer.
63 * trans-decl.c (gfc_sym_mangled_identifier): Handle
64 sym->binding_label being a pointer.
65 (gfc_sym_mangled_function_id): Likewise.
67 2012-01-29 Tobias Burnus <burnus@net-b.de>
70 * resolve.c (symbol_as): Remove unused, accidentally
73 2012-01-28 Tobias Burnus <burnus@net-b.de>
76 * trans-stmt.c (gfc_trans_allocate): Properly check whether
77 we have a BT_CLASS which needs to be memset.
79 2012-01-27 Tobias Burnus <burnus@net-b.de>
82 * trans-expr.c (gfc_conv_procedure_call): Fix passing
83 of functions, which return allocatables.
85 2012-01-27 Tobias Burnus <burnus@net-b.de>
88 * resolve.c (resolve_formal_arglist): Fix elemental
89 constraint checks for polymorphic dummies also for
92 2012-01-27 Tobias Burnus <burnus@net-b.de>
96 * primary.c (gfc_match_varspec. gfc_match_rvalue): Set
97 handle array spec for BT_CLASS.
98 * expr.c (gfc_get_variable_expr, gfc_lval_expr_from_sym)
99 * frontend-passes.c (create_var): Ditto.
100 * resolve.c (resolve_actual_arglist, resolve_assoc_var): Ditto.
101 * trans-decl.c (gfc_trans_deferred_vars): Use class_pointer
102 instead of attr.pointer.
103 (gfc_generate_function_code): Use CLASS_DATA (sym) for BT_CLASS.
104 * trans-intrinsic.c (conv_intrinsic_move_alloc): Move assert.
105 * trans-stmt.c (trans_associate_var): Ask for the descriptor.
107 2012-01-27 Tobias Burnus <burnus@net-b.de>
110 * match.c (gfc_match_allocate): Allow more than allocate
113 2012-01-27 Tobias Burnus <burnus@net-b.de>
116 * resolve.c (resolve_formal_arglist): Fix elemental
117 constraint checks for polymorphic dummies.
119 2012-01-27 Paul Thomas <pault@gcc.gnu.org>
120 Tobias Burnus <burnus@gcc.gnu.org>
126 * trans-array.c (gfc_array_init_size): Add two extra arguments
127 to convey the dynamic element size of a calls object and to
128 return the number of elements that have been allocated.
129 (gfc_array_allocate): Add the same arguments and use them to
130 call gfc_array_init_size. Before the allocation dereference
131 the data pointer, if necessary. Set the allocated array to zero
132 if the class element size or expr3 are non-null.
133 * trans-expr.c (gfc_conv_class_to_class): Give this function
135 (get_class_array_ref): New function.
136 (gfc_copy_class_to_class): New function.
137 * trans-array.h : Update prototype for gfc_array_allocate.
138 * trans-stmt.c (gfc_trans_allocate): For non-variable class
139 STATUS expressions extract the class object and the dynamic
140 element size. Use the latter to call gfc_array_allocate and
141 the former for setting the vptr and, via
142 gfc_copy_class_to_clasfc_cs, to copy to the allocated data.
143 * trans.h : Prototypes for gfc_get_class_array_ref,
144 gfc_copy_class_to_class and gfc_conv_class_to_class.
146 2012-01-25 Tobias Burnus <burnus@net-b.de>
148 * resolve.c (symbol_as): Check also for attr.class_ok.
150 2012-01-25 Tobias Burnus <burnus@net-b.de>
153 * class.c (gfc_build_class_symbol): Fix invalid freeing
154 issue with fclass->f2k_derived.
156 2012-01-25 Tobias Burnus <burnus@net-b.de>
159 * class.c (gfc_build_class_symbol): Ensure that
160 fclass->f2k_derived is set.
162 2012-01-25 Tobias Burnus <burnus@net-b.de>
165 * resolve.c (resolve_structure_cons): Only create an
166 array constructors for nonscalars.
168 2012-01-23 Tobias Burnus <burnus@net-b.de>
171 * check.c (variable_check): Fix checking for
172 variables and deeply nested BLOCKs.
174 2012-01-21 Tobias Burnus <burnus@net-b.de>
175 Steven G. Kargl <kargl@gcc.gnu.org>
178 * symbol.c (check_conflict): namelist-group-name cannot have the SAVE
181 2012-01-21 Tobias Burnus <burnus@net-b.de>
184 * interface.c (compare_parameter): Fix CLASS comparison.
186 2012-01-20 Tobias Burnus <burnus@net-b.de>
187 Janus Weil <janus@gcc.gnu.org>
190 * module.c (load_needed, read_module): Don't mark __vtab etc.
193 2012-01-19 Tobias Burnus <burnus@net-b.de>
196 * expr.c (gfc_build_intrinsic_call): Also set the symtree.
198 2012-01-18 Paul Thomas <pault@gcc.gnu.org>
201 * trans-expr.c (gfc_conv_procedure_call): Deallocate allocatable
202 components of temporary class arguments.
204 2012-01-17 Tobias Burnus <burnus@net-b.de>
205 Janne Blomqvist <jb@gcc.gnu.org>
208 * trans-expr.c (alloc_scalar_allocatable_for_assignment): Nullify
209 LHS after allocation, if it has allocatable components.
210 * f95-lang.c (gfc_init_builtin_functions): Add BUILT_IN_CALLOC.
212 2012-01-16 Mikael Morin <mikael@gcc.gnu.org>
213 Tobias Burnus <burnus@net-b.de>
216 * trans-array.c (gfc_walk_elemental_function_args): Fix
217 passing of deallocated allocatables/pointers as absent argument.
219 2012-01-16 Tobias Burnus <burnus@net-b.de>
222 * class.c (gfc_find_derived_vtab): Mark __vtab and
223 __def_init as FL_VARIABLE not as FL_PARAMETER.
224 * expr.c (gfc_simplify_expr): Remove special
226 * resolve.c (resolve_values): Ditto.
227 * trans-decl.c (gfc_get_symbol_decl): Mark __vtab
228 and __def_init as TREE_READONLY.
230 2012-01-16 Zydrunas Gimbutas <gimbutas@cims.nyu.edu>
231 Andreas Kloeckner <kloeckner@cims.nyu.edu>
232 Steven G. Kargl <kargl@gcc.gnu.org>
235 * gfortran.h (gfc_option_t): Add members flag_*_kind to store kind.
236 * lang.opt: Add options -freal-4-real-8, -freal-4-real-10,
237 -freal-4-real-16, -freal-8-real-4, -freal-8-real-10, -freal-8-real-16
238 and -finteger-4-integer-8. User-desired type conversion information.
239 * decl.c (gfc_match_old_kind_spec,kind_expr): Type conversions
240 in declaration parsing.
241 * trans-types.c (gfc_init_kinds): User-specified type conversion
242 checked for current backend.
243 * primary.c (match_integer_constant,match_real_constant): Implement
244 type conversion in constant parsing.
245 * options.c (gfc_init_options,gfc_handle_option): Translate input
246 options to flags in internal options data structure.
247 * invoke.texi: Document new options. Re-order options in Options
250 2012-01-16 Paul Thomas <pault@gcc.gnu.org>
252 * trans-array.c (gfc_trans_create_temp_array): In the case of a
253 class array temporary, detect a null 'eltype' on entry and use
254 'initial' to provde the class reference and so, through the
255 vtable, the element size for the dynamic type.
256 * trans-stmt.c (gfc_conv_elemental_dependencies): For class
257 expressions, set 'eltype' to null and pass the values via the
258 'initial' expression.
260 2012-01-14 Tobias Burnus <burnus@net-b.de>
263 * resolve.c (build_default_init_expr): Also initialize
264 nonconstant-length strings with -finit-character=<n>.
266 2011-01-14 Tobias Burnus <burnus@net-b.de>
269 * module.c (read_module): Don't make nonexisting
270 intrinsic operators as found.
271 (rename_list_remove_duplicate): New function.
272 (gfc_use_modules): Use it.
274 2012-01-13 Paul Thomas <pault@gcc.gnu.org>
277 * trans-array.c (structure_alloc_comps): Suppress interative
278 call to self, when current component is deallocated using
279 gfc_trans_dealloc_allocated.
280 * class.c (gfc_build_class_symbol): Copy the 'alloc_comp'
281 attribute from the declared type to the class structure.
283 2012-01-13 Tobias Burnus <burnus@net-b.de>
286 * fortran/trans-types.c (gfc_init_kinds): Use PTRDIFF_TYPE
287 instead of a signed int of size POINTER_SIZE for
288 gfc_index_integer_kind.
290 2012-01-12 Tobias Burnus <burnus@net-b.de>
293 * intrinsic.texi (CHMOD): Extend a bit and remove statement
294 that /bin/chmod is called.
296 2012-01-10 Gerald Pfeifer <gerald@pfeifer.com>
298 * gfortran.texi (Fortran 2003 Status): Fix grammar.
300 2012-01-10 Tobias Burnus <burnus@net-b.de>
303 * resolve.c (resolve_allocate_expr): For non-deferred char lengths,
304 check whether type-spec matches declaration.
306 2012-01-10 Tobias Burnus <burnus@net-b.de>
308 * resolve.c (resolve_ordinary_assign): Improve error wording.
310 2012-01-09 Paul Thomas <pault@gcc.gnu.org>
313 * interface.c (matching_typebound_op): Drill down through
314 possible parentheses to obtain base expression. Do not test for
315 'class_ok' but, instead for the class structure components.
316 * resolve.c (resolve_ordinary_assign): Extend error message for
317 polymorphic assignment to advise checking for specific
321 * resolve.c (resolve_typebound_function): Restore 'static' to
324 2012-01-09 Mikael Morin <mikael@gcc.gnu.org>
327 * trans-array.c (gfc_walk_elemental_function_args):
328 Skip over NULL() actual arguments.
330 2012-01-09 Tobias Burnus <burnus@net-b.de>
332 * gfortran.texi: Bump copyright year.
333 (Fortran 2003 Status): Update polymorphism item, add
334 item for generic interface with DT name.
336 2012-01-09 Tobias Burnus <burnus@net-b.de>
339 * gfortran.h (gfc_use_list):
340 * match.h (gfc_use_module): Rename to ...
341 (gfc_use_modules): ... this.
342 * module.c (use_locus, specified_nonint, specified_int): Remove
344 (module_name): Change type to const char*, used with gfc_get_string.
345 (module_list): New global variable.
346 (free_rename): Free argument not global var.
347 (gfc_match_use): Save match to module_list.
348 (load_generic_interfaces, read_module): Don't free symtree.
349 (write_dt_extensions, gfc_dump_module): Fix module-name I/O due to the
350 type change of module_name.
351 (write_symbol0, write_generic): Optimize due to the type change.
352 (import_iso_c_binding_module, use_iso_fortran_env_module): Use
353 locus of rename->where.
354 (gfc_use_module): Take module_list as argument.
355 (gfc_use_modules): New function.
356 (gfc_module_init_2, gfc_module_done_2): Init module_list, rename_list.
357 * parse.c (last_was_use_stmt): New global variable.
358 (use_modules): New function.
359 (decode_specification_statement, decode_statement): Move USE match up
360 and call use_modules.
361 (next_free, next_fixed): Call use_modules.
362 (accept_statement): Don't call gfc_module_use.
364 2012-01-06 Tobias Burnus <burnus@net-b.de>
366 * trans-openmp.c (gfc_omp_clause_dtor, gfc_trans_omp_array_reduction):
367 Update call to gfc_trans_dealloc_allocated.
368 * trans.c (gfc_allocate_using_malloc): Fix spacing.
369 (gfc_allocate_allocatable): For gfc_allocate_using_lib, jump to
370 label_finish when an error occurs.
371 (gfc_deallocate_with_status): Call caf_deregister for -fcoarray=lib.
372 * trans.h (gfc_allocate_allocatable, gfc_deallocate_with_status):
374 (gfor_fndecl_caf_deregister): New tree symbol.
375 * trans-expr.c (gfc_conv_procedure_call): Update
376 gfc_deallocate_with_status and gfc_trans_dealloc_allocated calls.
377 * trans-array.c (gfc_array_allocate, gfc_trans_dealloc_allocated,
378 structure_alloc_comps, gfc_trans_deferred_array): Ditto.
379 (gfc_array_deallocate): Handle coarrays with -fcoarray=lib.
380 * trans-array.h (gfc_array_deallocate, gfc_array_allocate,
381 gfc_trans_dealloc_allocated): Update prototypes.
382 * trans-stmt.c (gfc_trans_sync): Fix indentation.
383 (gfc_trans_allocate): Fix errmsg padding and label handling.
384 (gfc_trans_deallocate): Ditto and handle -fcoarray=lib.
385 * expr.c (gfc_is_coarray): Fix algorithm for BT_CLASS.
386 * libgfortran.h (GFC_STAT_STOPPED_IMAGE): Use large value
387 to avoid other stats accidentally matching this one.
388 * trans-decl.c (gfor_fndecl_caf_deregister): New global var.
389 (gfc_build_builtin_function_decls): Fix prototype decl of caf_register
390 and add decl for caf_deregister.
391 (gfc_trans_deferred_vars): Handle CAF vars with -fcoarrays=lib.
392 * trans-intrinsic.c (conv_intrinsic_move_alloc): Update call to
393 gfc_deallocate_with_status.
395 2012-01-05 Paul Thomas <pault@gcc.gnu.org>
398 * resolve.c (resolve_typebound_static): If the typebound
399 procedure is 'deferred' try to find the correct specific
400 procedure in the derived type operator space itself.
402 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
405 * trans-array.h (gfc_walk_elemental_function_args): New argument.
406 * trans-intrinsic.c (gfc_walk_intrinsic_function): Update call.
407 * trans-stmt.c (gfc_trans_call): Ditto.
408 * trans-array.c (gfc_walk_function_expr): Ditto.
409 (gfc_walk_elemental_function_args): Get the dummy argument list
410 if possible. Check that the dummy and the actual argument are both
411 optional, and set can_be_null_ref accordingly.
413 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
416 * trans.h (struct gfc_ss_info): New field data::scalar::can_be_null_ref
417 * trans-array.c: If the reference can be NULL, save the reference
418 instead of the value.
419 * trans-expr.c (gfc_conv_expr): If we have saved a reference,
422 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
424 * trans-expr.c (gfc_conv_expr): Move address taking...
425 (gfc_conv_expr_reference): ... here.
427 2012-01-04 Thomas Koenig <tkoenig@gcc.gnu.org>
430 * trans-common.c (create_common): Update copyright years. Mark
431 variables as used to avoid warnings about unused variables in
434 2012-01-03 Hans-Peter Nilsson <hp@axis.com>
436 * gfortran.h (struct gfc_expr): Add missing "struct"
437 qualifier for member base_expr.
439 2012-01-02 Paul Thomas <pault@gcc.gnu.org>
442 * trans-array.c (gfc_array_allocate): Null allocated memory of
443 newly allocted class arrays.
448 * interface.c(build_compcall_for_operator): Add a type to the
450 * trans-expr.c (conv_base_obj_fcn_val): New function.
451 (gfc_conv_procedure_call): Use base_expr to detect non-variable
452 base objects and, ensuring that there is a temporary variable,
453 build up the typebound call using conv_base_obj_fcn_val.
454 (gfc_trans_class_assign): Pick out class procedure pointer
455 assignments and do the assignment with no further prcessing.
456 (gfc_trans_class_array_init_assign, gfc_trans_class_init_assign
457 gfc_trans_class_assign): Move to top of file.
458 * gfortran.h : Add 'base_expr' field to gfc_expr.
459 * resolve.c (get_declared_from_expr): Add 'types' argument to
460 switch checking of derived types on or off.
461 (resolve_typebound_generic_call): Set the new argument.
462 (resolve_typebound_function, resolve_typebound_subroutine):
463 Set 'types' argument for get_declared_from_expr appropriately.
464 Identify base expression, if not a variable, in the argument
465 list of class valued calls. Assign it to the 'base_expr' field
466 of the final expression. Strip away all references after the
467 last class reference.
469 2012-01-02 Tobias Burnus <burnus@net-b.de>
472 * trans-intrinsic.c (trans_this_image, trans_image_index,
473 trans_num_images, conv_intrinsic_cobound): Fold_convert the
474 caf_num_images/caf_this_images variables to the correct int kind.
476 2012-01-01 Jakub Jelinek <jakub@redhat.com>
478 * gfortranspec.c (lang_specific_driver): Update copyright notice
481 Copyright (C) 2012 Free Software Foundation, Inc.
483 Copying and distribution of this file, with or without modification,
484 are permitted in any medium without royalty provided the copyright
485 notice and this notice are preserved.