1 2011-02-06 Janne Blomqvist <jb@gcc.gnu.org>
3 * gfortran.texi (Thread-safety): New section.
4 * intrinsic.texi (EXECUTE_COMMAND_LINE): Mention thread-safety.
6 (GET_ENVIRONMENT_VARIABLE): Likewise.
9 2011-02-06 Paul Thomas <pault@gcc.gnu.org>
12 * trans-stmt.c (gfc_trans_allocate): For deferred character
13 length allocations with SOURCE, store to the values and string
14 length to avoid calculating twice. Replace gfc_start_block
15 with gfc_init_block to avoid unnecessary contexts and to keep
16 declarations of temporaries where they should be. Tidy up the
19 2011-02-05 Janne Blomqvist <jb@gcc.gnu.org>
22 * intrinsic.texi (SYSTEM_CLOCK): Update documentation.
24 2011-02-02 Janus Weil <janus@gcc.gnu.org>
25 Paul Thomas <pault@gcc.gnu.org>
28 * trans-expr.c (gfc_trans_class_init_assign): Add call to
30 * module.c (read_cleanup): Do not use unique_symtrees for vtabs
33 2011-02-02 Janus Weil <janus@gcc.gnu.org>
36 * resolve.c (resolve_fl_variable): Handle polymorphic allocatables.
38 2011-02-01 Janus Weil <janus@gcc.gnu.org>
41 * trans-expr.c (gfc_conv_structure): Handle constructors for procedure
42 pointer components with allocatable result.
44 2011-01-31 Janus Weil <janus@gcc.gnu.org>
47 * trans-expr.c (gfc_conv_procedure_call): Handle procedure pointers
48 with pointer or allocatable result.
50 2011-01-31 Paul Thomas <pault@gcc.gnu.org>
53 * trans-stmt.c (gfc_trans_allocate): Improve handling of
54 deferred character lengths with SOURCE.
55 * iresolve.c (gfc_resolve_repeat): Calculate character
56 length from source length and ncopies.
57 * dump-parse-tree.c (show_code_node): Show MOLD and SOURCE
58 expressions for ALLOCATE.
60 2011-01-31 Janus Weil <janus@gcc.gnu.org>
63 * resolve.c (resolve_typebound_subroutine): Bug fix for the case of
64 an argument of a typebound assignment being a component.
66 2011-01-31 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
68 * gfortranspec.c (add_arg_libgfortran) [HAVE_LD_STATIC_DYNAMIC] Use
69 LD_STATIC_OPTION, LD_DYNAMIC_OPTION.
71 2011-01-31 Tobias Burnus <burnus@net-b.de>
74 * resolve.c (resolve_fl_procedure): Reject stmt functions
75 with pointer/allocatable attribute.
77 2011-01-31 Tobias Burnus <burnus@net-b.de>
80 * interface.c (gfc_procedure_use): Add explicit interface check for
81 pointer/allocatable functions.
83 2011-01-30 Paul Thomas <pault@gcc.gnu.org>
86 * trans-expr.c (gfc_trans_assignment_1): If the rhs is an op
87 expr and is assigned to a deferred character length scalar,
88 make sure that the function is called before reallocation,
89 so that the length is available. Include procedure pointer
90 and procedure pointer component rhs as well.
95 * gfortran.dg/allocatable_function_5.f90: New test not added by
96 mistake on 2011-01-28.
98 2011-01-29 Tobias Burnus <burnus@net-b.de>
101 * check.c (gfc_check_shape): Support kind argument in SHAPE.
102 * intrinsic.c (add_functions): Ditto.
103 * resolve.c (gfc_resolve_shape): Ditto.
104 * simplify.c (gfc_simplify_shape): Ditto.
105 * intrinsic.h (gfc_check_shape, gfc_resolve_shape,
106 gfc_simplify_shape): Update prototypes.
107 * intrinisc.text (SHAPE): Document kind argument.
109 2011-01-28 Tobias Burnus <burnus@net-b.de>
112 * resolve.c (resolve_formal_arglist): Allow arguments with VALUE
113 attribute also without INTENT.
115 2011-01-28 Tobias Burnus <burnus@net-b.de>
117 * gfortran.texi (Fortran 2003 status): Mention support for
118 nonconstant namelist variables.
120 2011-01-28 Paul Thomas <pault@gcc.gnu.org>
121 Tobias Burnus <burnus@gcc.gnu.org>
126 * interface.c (compare_actual_formal): An allocatable or pointer
127 deferred length actual is only allowed if the formal argument
128 is also deferred length. Clean up whitespace.
129 * trans-expr.c (gfc_conv_procedure_call): Pass string length for
130 deferred character length formal arguments by reference. Do the
131 same for function results.
132 (gfc_trans_pointer_assignment): Do not do runtime check of lhs
133 and rhs character lengths, if deferred length lhs. In this case
134 set the lhs character length to that of the rhs.
135 (gfc_conv_string_parameter): Remove assert that string length is
137 (is_scalar_reallocatable_lhs): New function.
138 (alloc_scalar_allocatable_for_assignment): New function.
139 (gfc_trans_assignment_1): Call above new function. If the rhs is
140 a deferred character length itself, makes ure that the function
141 is called before reallocation, so that the length is available.
142 (gfc_trans_asssignment): Remove error about assignment to
143 deferred length character variables.
144 * gfortran.texi : Update entry about (re)allocation on
146 * trans-stmt.c (gfc_trans_allocate): Add code to handle deferred
147 length character variables.
148 * module.c (mio_typespec): Transfer deferred characteristic.
149 * trans-types.c (gfc_get_function_type): New code to generate
150 hidden typelist, so that those character lengths that are
151 passed by reference get the right type.
152 * resolve.c (resolve_contained_fntype): Supress error for
153 deferred character length functions.
154 (resolve_function, resolve_fl_procedure) The same.
155 (check_symbols): Remove the error that support for
156 entity with deferred type parameter is not yet implemented.
157 (resolve_fl_derived): The same.
158 match.c (alloc_opt_list): Allow MOLD for deferred length object.
159 * trans-decl.c (gfc_get_symbol_decl): For deferred character
160 length dummies, generate a local variable for string length.
161 (create_function_arglist): Hidden length can be a pointer.
162 (gfc_trans_deferred_vars): For deferred character length
163 results and dummies, assign the string length to the local
164 variable from the hidden argument on entry and the other way
165 round on exit, as appropriate.
167 2011-01-27 Tobias Burnus <burnus@net-b.de>
170 * trans-decl.c (gfc_generate_function_code): Fix init
171 of allocatable result variable with allocatable components.
173 2011-01-27 Tobias Burnus <burnus@net-b.de>
176 * options.c (gfc_handle_module_path_options): Save
177 module path without trailing slash as include path.
179 2011-01-25 Tobias Burnus <burnus@net-b.de>
182 * interface.c (gfc_check_operator_interface): Fix
183 defined-assignment check.
185 2011-01-23 Tobias Burnus <burnus@net-b.de>
188 * trans-decl.c (gfc_trans_deferred_vars): Do not nullify
189 scalar allocatable dummy arguments.
191 2011-01-22 Thomas Koenig <tkoenig@gcc.gnu.org>
194 * resolve.c (gfc_iso_c_func_interface): For C_LOC,
195 check for array sections followed by component references
196 which are illegal. Also check for coindexed arguments.
198 2011-01-22 Tobias Burnus <burnus@net-b.de>
201 * primary.c (gfc_match_varspec): Relax gcc_assert to allow for
204 2011-01-21 Tobias Burnus <burnus@net-b.de>
207 * error.c (gfc_error_now, gfc_fatal_error, gfc_error_check):
208 Use defined instead of magic number exit status codes.
209 * scanner.c (include_line, gfc_new_file): Ditto.
211 2011-01-21 Tobias Burnus <burnus@net-b.de>
214 * expr.c (gfc_check_pointer_assign): Reject expr data-targets
215 without pointer attribute.
217 2011-01-18 Janus Weil <janus@gcc.gnu.org>
220 * resolve.c (expression_rank): Fix rank of procedure poiner components.
221 * trans-expr.c (gfc_conv_procedure_call): Take care of procedure
222 pointer components as actual arguments.
224 2011-01-17 Jakub Jelinek <jakub@redhat.com>
227 * gfortran.h (struct gfc_omp_saved_state): New type.
228 (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New prototypes.
229 * resolve.c (resolve_global_procedure): Call it around gfc_resolve
231 * openmp.c (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New
234 2011-01-17 Tobias Burnus <burnus@net-b.de>
237 * invoke.texi (Options to request or suppress errors
238 and warnings): Fix cross link.
240 2011-01-15 Tobias Burnus <burnus@net-b.de>
242 * gfortran.texi: Update Fortran 2003 Status section.
245 * invoke.texi: Add missing "-E" to the -dM example.
247 2011-01-13 Tobias Burnus <burnus@net-b.de>
250 * intrinsic.texi (get_command_argument, get_environment_variable):
251 Mark arguments as optional in the Arguments section.
253 2011-01-13 Kai Tietz <kai.tietz@onevision.com>
254 Tobias Burnus <burnus@net-b.de>
257 * trans-decl.c (gfc_get_extern_function_decl,
258 build_function_decl): Set TREE_PUBLIC/TREE_EXTERNAL before
259 calling decl_attributes.
261 2011-01-13 Tobias Burnus <burnus@net-b.de>
262 Mikael Morin <mikael@gcc.gnu.org>
266 * gfortran.h (gfc_code): Move union ext's case_list into
268 * dump-parse-tree.c (show_code_node): Adapt by prefixing case_list
270 * frontend-passes.c (gfc_code_walker): Ditto.
271 * match.c (gfc_match_goto, gfc_match_call, gfc_match_case,
272 gfc_match_type_is, gfc_match_class_is): Ditto.
273 * resolve.c (resolve_select, resolve_select_type): Ditto.
274 * st.c (gfc_free_statement): Ditto.
275 * trans-stmt.c (gfc_trans_integer_select, gfc_trans_logical_select,
276 gfc_trans_character_select): Ditto.
277 * parse.c (resolve_all_program_units): For error recovery, avoid
278 segfault is proc_name is NULL.
280 2011-01-11 Paul Thomas <pault@gcc.gnu.org>
283 * trans-array.c (gfc_alloc_allocatable_for_assignment): Change
284 to be standard compliant by testing for shape rather than size
285 before skipping reallocation. Improve comments.
287 2011-01-09 Janus Weil <janus@gcc.gnu.org>
290 * resolve.c (resolve_actual_arglist): Remove unneeded and buggy piece
293 2011-01-09 Thomas Koenig <tkoenig@gcc.gnu.org>
296 * resolve.c (is_scalar_expr_ptr): For a substring reference,
297 use gfc_dep_compare_expr to compare start and end expession.
298 Add FIXME for using gfc_deb_compare_expr elsewhere.
300 2011-01-09 Janus Weil <janus@gcc.gnu.org>
303 * class.c (get_unique_type_string): Make type name start with upper
306 2011-01-08 Thomas Koenig <tkoenig@gcc.gnu.org>
309 * invoke.texi: Mention -ffree-line-length-none and
310 -ffixed-line-length-none for preprocessing.
312 2011-01-08 Paul Thomas <pault@gcc.gnu.org>
315 * trans-expr.c (gfc_conv_procedure_call): With a non-copying
316 procedure argument (eg TRANSPOSE) use a temporary if there is
317 any chance of aliasing due to host or use association.
318 (arrayfunc_assign_needs_temporary): Correct logic for function
319 results and do not use a temporary for implicitly PURE
320 variables. Use a temporary for Cray pointees.
321 * symbol.c (gfc_add_save): Explicit SAVE not compatible with
322 implicit pureness of containing procedure.
323 * decl.c (match_old_style_init, gfc_match_data): Where decl
324 would fail in PURE procedure, set implicit_pure to zero.
325 * gfortran.h : Add implicit_pure to structure symbol_attr and
326 add prototype for function gfc_implicit_pure.
327 * expr.c (gfc_check_pointer_assign, gfc_check_vardef_context):
328 Where decl would fail in PURE procedure, reset implicit_pure.
329 * io.c (match_vtag, gfc_match_open, gfc_match_close,
330 gfc_match_print, gfc_match_inquire, gfc_match_wait): The same.
331 * match.c (gfc_match_critical, gfc_match_stopcode,
332 sync_statement, gfc_match_allocate, gfc_match_deallocate): The
334 * parse.c (decode_omp_directive): The same.
335 (parse_contained): If not PURE, set implicit pure attribute.
336 * resolve.c (resolve_formal_arglist, resolve_structure_cons,
337 resolve_function, resolve_ordinary_assign) : The same.
338 (gfc_implicit_pure): New function.
339 * module.c (mio_symbol_attribute): Introduce AB_IMPLICIT_PURE
340 to ab_attribute enum and use it in this function.
342 2011-01-08 Thomas Koenig <tkoenig@gcc.gnu.org>
345 * symbol.c (gfc_symbols_could_alias): Strip gfc_ prefix,
346 make static and move in front of its only caller, to ...
347 * trans-array.c (symbols_could_alias): ... here.
348 Pass information about pointer and target status as
349 arguments. Allocatable arrays don't alias anything
350 unless they have the POINTER attribute.
351 (gfc_could_be_alias): Keep track of pointer and target
352 status when following references. Also check if typespecs
353 of components match those of other components or symbols.
355 2011-01-07 Tobias Burnus <burnus@net-b.de>
358 * class.c (gfc_build_class_symbol): Mark __vtab as attr.vtab.
359 * intrinsic.c (add_functions): Use simplify functions for
360 EXTENDS_TYPE_OF and SAME_TYPE_AS.
361 * intrinsic.h (gfc_simplify_extends_type_of,
362 gfc_simplify_same_type_as): New prototypes.
363 * simplify.c (is_last_ref_vtab, gfc_simplify_extends_type_of,
364 gfc_simplify_same_type_as): New functions.
366 2011-01-07 Janus Weil <janus@gcc.gnu.org>
370 * gfortran.h (gfc_lval_expr_from_sym): Moved prototype.
371 * class.c (gfc_class_null_initializer): Initialize _vptr to declared
373 * expr.c (gfc_lval_expr_from_sym): Moved here from symbol.c.
374 * resolve.c (resolve_deallocate_expr): _data component will be added
375 at translation stage.
376 * symbol.c (gfc_lval_expr_from_sym): Moved to expr.c.
377 * trans-stmt.c (gfc_trans_deallocate): Reset _vptr to declared type.
379 2011-01-06 Daniel Franke <franke.daniel@gmail.com>
383 * parse.c (parse_interface): Remove check for procedure types.
384 * interface.c (check_interface0): Verify that procedures are
385 either all SUBROUTINEs or all FUNCTIONs.
387 2011-01-05 Janus Weil <janus@gcc.gnu.org>
390 * trans-expr.c (gfc_trans_class_assign): Bugfix for r168524 (make sure
391 'vtab' is initialized).
393 2011-01-05 Janus Weil <janus@gcc.gnu.org>
396 * trans-expr.c (gfc_trans_class_assign): For a polymorphic NULL pointer
397 assignment, set the _vptr component to the declared type.
399 2011-01-05 Thomas Koenig <tkoenig@gcc.gnu.org>
402 * resolve.c (resolve_allocate_deallocate): Follow references to
403 check for duplicate occurence of allocation/deallocation objects.
405 2011-01-05 Janus Weil <janus@gcc.gnu.org>
408 * trans-decl.c (gfc_trans_deferred_vars): Initialize the _vpr component
409 of polymorphic allocatables according to their declared type.
411 2011-01-04 Janus Weil <janus@gcc.gnu.org>
414 * class.c (gfc_find_derived_vtab): Set the module field for the copying
415 routine to make sure it receives module name mangling.
417 2011-01-03 Jakub Jelinek <jakub@redhat.com>
419 * gfortranspec.c (lang_specific_driver): Update copyright notice
422 2011-01-03 Janus Weil <janus@gcc.gnu.org>
424 * intrinsic.texi (LEADZ): Fix example.
426 2011-01-02 Janus Weil <janus@gcc.gnu.org>
429 * class.c (gfc_find_derived_vtab): Use EXEC_INIT_ASSIGN for __copy_
433 Copyright (C) 2011 Free Software Foundation, Inc.
435 Copying and distribution of this file, with or without modification,
436 are permitted in any medium without royalty provided the copyright
437 notice and this notice are preserved.