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