1 2011-02-06 Paul Thomas <pault@gcc.gnu.org>
4 * trans-stmt.c (gfc_trans_allocate): For deferred character
5 length allocations with SOURCE, store to the values and string
6 length to avoid calculating twice. Replace gfc_start_block
7 with gfc_init_block to avoid unnecessary contexts and to keep
8 declarations of temporaries where they should be. Tidy up the
11 2011-02-05 Janne Blomqvist <jb@gcc.gnu.org>
14 * intrinsic.texi (SYSTEM_CLOCK): Update documentation.
16 2011-02-02 Janus Weil <janus@gcc.gnu.org>
17 Paul Thomas <pault@gcc.gnu.org>
20 * trans-expr.c (gfc_trans_class_init_assign): Add call to
22 * module.c (read_cleanup): Do not use unique_symtrees for vtabs
25 2011-02-02 Janus Weil <janus@gcc.gnu.org>
28 * resolve.c (resolve_fl_variable): Handle polymorphic allocatables.
30 2011-02-01 Janus Weil <janus@gcc.gnu.org>
33 * trans-expr.c (gfc_conv_structure): Handle constructors for procedure
34 pointer components with allocatable result.
36 2011-01-31 Janus Weil <janus@gcc.gnu.org>
39 * trans-expr.c (gfc_conv_procedure_call): Handle procedure pointers
40 with pointer or allocatable result.
42 2011-01-31 Paul Thomas <pault@gcc.gnu.org>
45 * trans-stmt.c (gfc_trans_allocate): Improve handling of
46 deferred character lengths with SOURCE.
47 * iresolve.c (gfc_resolve_repeat): Calculate character
48 length from source length and ncopies.
49 * dump-parse-tree.c (show_code_node): Show MOLD and SOURCE
50 expressions for ALLOCATE.
52 2011-01-31 Janus Weil <janus@gcc.gnu.org>
55 * resolve.c (resolve_typebound_subroutine): Bug fix for the case of
56 an argument of a typebound assignment being a component.
58 2011-01-31 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
60 * gfortranspec.c (add_arg_libgfortran) [HAVE_LD_STATIC_DYNAMIC] Use
61 LD_STATIC_OPTION, LD_DYNAMIC_OPTION.
63 2011-01-31 Tobias Burnus <burnus@net-b.de>
66 * resolve.c (resolve_fl_procedure): Reject stmt functions
67 with pointer/allocatable attribute.
69 2011-01-31 Tobias Burnus <burnus@net-b.de>
72 * interface.c (gfc_procedure_use): Add explicit interface check for
73 pointer/allocatable functions.
75 2011-01-30 Paul Thomas <pault@gcc.gnu.org>
78 * trans-expr.c (gfc_trans_assignment_1): If the rhs is an op
79 expr and is assigned to a deferred character length scalar,
80 make sure that the function is called before reallocation,
81 so that the length is available. Include procedure pointer
82 and procedure pointer component rhs as well.
87 * gfortran.dg/allocatable_function_5.f90: New test not added by
88 mistake on 2011-01-28.
90 2011-01-29 Tobias Burnus <burnus@net-b.de>
93 * check.c (gfc_check_shape): Support kind argument in SHAPE.
94 * intrinsic.c (add_functions): Ditto.
95 * resolve.c (gfc_resolve_shape): Ditto.
96 * simplify.c (gfc_simplify_shape): Ditto.
97 * intrinsic.h (gfc_check_shape, gfc_resolve_shape,
98 gfc_simplify_shape): Update prototypes.
99 * intrinisc.text (SHAPE): Document kind argument.
101 2011-01-28 Tobias Burnus <burnus@net-b.de>
104 * resolve.c (resolve_formal_arglist): Allow arguments with VALUE
105 attribute also without INTENT.
107 2011-01-28 Tobias Burnus <burnus@net-b.de>
109 * gfortran.texi (Fortran 2003 status): Mention support for
110 nonconstant namelist variables.
112 2011-01-28 Paul Thomas <pault@gcc.gnu.org>
113 Tobias Burnus <burnus@gcc.gnu.org>
118 * interface.c (compare_actual_formal): An allocatable or pointer
119 deferred length actual is only allowed if the formal argument
120 is also deferred length. Clean up whitespace.
121 * trans-expr.c (gfc_conv_procedure_call): Pass string length for
122 deferred character length formal arguments by reference. Do the
123 same for function results.
124 (gfc_trans_pointer_assignment): Do not do runtime check of lhs
125 and rhs character lengths, if deferred length lhs. In this case
126 set the lhs character length to that of the rhs.
127 (gfc_conv_string_parameter): Remove assert that string length is
129 (is_scalar_reallocatable_lhs): New function.
130 (alloc_scalar_allocatable_for_assignment): New function.
131 (gfc_trans_assignment_1): Call above new function. If the rhs is
132 a deferred character length itself, makes ure that the function
133 is called before reallocation, so that the length is available.
134 (gfc_trans_asssignment): Remove error about assignment to
135 deferred length character variables.
136 * gfortran.texi : Update entry about (re)allocation on
138 * trans-stmt.c (gfc_trans_allocate): Add code to handle deferred
139 length character variables.
140 * module.c (mio_typespec): Transfer deferred characteristic.
141 * trans-types.c (gfc_get_function_type): New code to generate
142 hidden typelist, so that those character lengths that are
143 passed by reference get the right type.
144 * resolve.c (resolve_contained_fntype): Supress error for
145 deferred character length functions.
146 (resolve_function, resolve_fl_procedure) The same.
147 (check_symbols): Remove the error that support for
148 entity with deferred type parameter is not yet implemented.
149 (resolve_fl_derived): The same.
150 match.c (alloc_opt_list): Allow MOLD for deferred length object.
151 * trans-decl.c (gfc_get_symbol_decl): For deferred character
152 length dummies, generate a local variable for string length.
153 (create_function_arglist): Hidden length can be a pointer.
154 (gfc_trans_deferred_vars): For deferred character length
155 results and dummies, assign the string length to the local
156 variable from the hidden argument on entry and the other way
157 round on exit, as appropriate.
159 2011-01-27 Tobias Burnus <burnus@net-b.de>
162 * trans-decl.c (gfc_generate_function_code): Fix init
163 of allocatable result variable with allocatable components.
165 2011-01-27 Tobias Burnus <burnus@net-b.de>
168 * options.c (gfc_handle_module_path_options): Save
169 module path without trailing slash as include path.
171 2011-01-25 Tobias Burnus <burnus@net-b.de>
174 * interface.c (gfc_check_operator_interface): Fix
175 defined-assignment check.
177 2011-01-23 Tobias Burnus <burnus@net-b.de>
180 * trans-decl.c (gfc_trans_deferred_vars): Do not nullify
181 scalar allocatable dummy arguments.
183 2011-01-22 Thomas Koenig <tkoenig@gcc.gnu.org>
186 * resolve.c (gfc_iso_c_func_interface): For C_LOC,
187 check for array sections followed by component references
188 which are illegal. Also check for coindexed arguments.
190 2011-01-22 Tobias Burnus <burnus@net-b.de>
193 * primary.c (gfc_match_varspec): Relax gcc_assert to allow for
196 2011-01-21 Tobias Burnus <burnus@net-b.de>
199 * error.c (gfc_error_now, gfc_fatal_error, gfc_error_check):
200 Use defined instead of magic number exit status codes.
201 * scanner.c (include_line, gfc_new_file): Ditto.
203 2011-01-21 Tobias Burnus <burnus@net-b.de>
206 * expr.c (gfc_check_pointer_assign): Reject expr data-targets
207 without pointer attribute.
209 2011-01-18 Janus Weil <janus@gcc.gnu.org>
212 * resolve.c (expression_rank): Fix rank of procedure poiner components.
213 * trans-expr.c (gfc_conv_procedure_call): Take care of procedure
214 pointer components as actual arguments.
216 2011-01-17 Jakub Jelinek <jakub@redhat.com>
219 * gfortran.h (struct gfc_omp_saved_state): New type.
220 (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New prototypes.
221 * resolve.c (resolve_global_procedure): Call it around gfc_resolve
223 * openmp.c (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New
226 2011-01-17 Tobias Burnus <burnus@net-b.de>
229 * invoke.texi (Options to request or suppress errors
230 and warnings): Fix cross link.
232 2011-01-15 Tobias Burnus <burnus@net-b.de>
234 * gfortran.texi: Update Fortran 2003 Status section.
237 * invoke.texi: Add missing "-E" to the -dM example.
239 2011-01-13 Tobias Burnus <burnus@net-b.de>
242 * intrinsic.texi (get_command_argument, get_environment_variable):
243 Mark arguments as optional in the Arguments section.
245 2011-01-13 Kai Tietz <kai.tietz@onevision.com>
246 Tobias Burnus <burnus@net-b.de>
249 * trans-decl.c (gfc_get_extern_function_decl,
250 build_function_decl): Set TREE_PUBLIC/TREE_EXTERNAL before
251 calling decl_attributes.
253 2011-01-13 Tobias Burnus <burnus@net-b.de>
254 Mikael Morin <mikael@gcc.gnu.org>
258 * gfortran.h (gfc_code): Move union ext's case_list into
260 * dump-parse-tree.c (show_code_node): Adapt by prefixing case_list
262 * frontend-passes.c (gfc_code_walker): Ditto.
263 * match.c (gfc_match_goto, gfc_match_call, gfc_match_case,
264 gfc_match_type_is, gfc_match_class_is): Ditto.
265 * resolve.c (resolve_select, resolve_select_type): Ditto.
266 * st.c (gfc_free_statement): Ditto.
267 * trans-stmt.c (gfc_trans_integer_select, gfc_trans_logical_select,
268 gfc_trans_character_select): Ditto.
269 * parse.c (resolve_all_program_units): For error recovery, avoid
270 segfault is proc_name is NULL.
272 2011-01-11 Paul Thomas <pault@gcc.gnu.org>
275 * trans-array.c (gfc_alloc_allocatable_for_assignment): Change
276 to be standard compliant by testing for shape rather than size
277 before skipping reallocation. Improve comments.
279 2011-01-09 Janus Weil <janus@gcc.gnu.org>
282 * resolve.c (resolve_actual_arglist): Remove unneeded and buggy piece
285 2011-01-09 Thomas Koenig <tkoenig@gcc.gnu.org>
288 * resolve.c (is_scalar_expr_ptr): For a substring reference,
289 use gfc_dep_compare_expr to compare start and end expession.
290 Add FIXME for using gfc_deb_compare_expr elsewhere.
292 2011-01-09 Janus Weil <janus@gcc.gnu.org>
295 * class.c (get_unique_type_string): Make type name start with upper
298 2011-01-08 Thomas Koenig <tkoenig@gcc.gnu.org>
301 * invoke.texi: Mention -ffree-line-length-none and
302 -ffixed-line-length-none for preprocessing.
304 2011-01-08 Paul Thomas <pault@gcc.gnu.org>
307 * trans-expr.c (gfc_conv_procedure_call): With a non-copying
308 procedure argument (eg TRANSPOSE) use a temporary if there is
309 any chance of aliasing due to host or use association.
310 (arrayfunc_assign_needs_temporary): Correct logic for function
311 results and do not use a temporary for implicitly PURE
312 variables. Use a temporary for Cray pointees.
313 * symbol.c (gfc_add_save): Explicit SAVE not compatible with
314 implicit pureness of containing procedure.
315 * decl.c (match_old_style_init, gfc_match_data): Where decl
316 would fail in PURE procedure, set implicit_pure to zero.
317 * gfortran.h : Add implicit_pure to structure symbol_attr and
318 add prototype for function gfc_implicit_pure.
319 * expr.c (gfc_check_pointer_assign, gfc_check_vardef_context):
320 Where decl would fail in PURE procedure, reset implicit_pure.
321 * io.c (match_vtag, gfc_match_open, gfc_match_close,
322 gfc_match_print, gfc_match_inquire, gfc_match_wait): The same.
323 * match.c (gfc_match_critical, gfc_match_stopcode,
324 sync_statement, gfc_match_allocate, gfc_match_deallocate): The
326 * parse.c (decode_omp_directive): The same.
327 (parse_contained): If not PURE, set implicit pure attribute.
328 * resolve.c (resolve_formal_arglist, resolve_structure_cons,
329 resolve_function, resolve_ordinary_assign) : The same.
330 (gfc_implicit_pure): New function.
331 * module.c (mio_symbol_attribute): Introduce AB_IMPLICIT_PURE
332 to ab_attribute enum and use it in this function.
334 2011-01-08 Thomas Koenig <tkoenig@gcc.gnu.org>
337 * symbol.c (gfc_symbols_could_alias): Strip gfc_ prefix,
338 make static and move in front of its only caller, to ...
339 * trans-array.c (symbols_could_alias): ... here.
340 Pass information about pointer and target status as
341 arguments. Allocatable arrays don't alias anything
342 unless they have the POINTER attribute.
343 (gfc_could_be_alias): Keep track of pointer and target
344 status when following references. Also check if typespecs
345 of components match those of other components or symbols.
347 2011-01-07 Tobias Burnus <burnus@net-b.de>
350 * class.c (gfc_build_class_symbol): Mark __vtab as attr.vtab.
351 * intrinsic.c (add_functions): Use simplify functions for
352 EXTENDS_TYPE_OF and SAME_TYPE_AS.
353 * intrinsic.h (gfc_simplify_extends_type_of,
354 gfc_simplify_same_type_as): New prototypes.
355 * simplify.c (is_last_ref_vtab, gfc_simplify_extends_type_of,
356 gfc_simplify_same_type_as): New functions.
358 2011-01-07 Janus Weil <janus@gcc.gnu.org>
362 * gfortran.h (gfc_lval_expr_from_sym): Moved prototype.
363 * class.c (gfc_class_null_initializer): Initialize _vptr to declared
365 * expr.c (gfc_lval_expr_from_sym): Moved here from symbol.c.
366 * resolve.c (resolve_deallocate_expr): _data component will be added
367 at translation stage.
368 * symbol.c (gfc_lval_expr_from_sym): Moved to expr.c.
369 * trans-stmt.c (gfc_trans_deallocate): Reset _vptr to declared type.
371 2011-01-06 Daniel Franke <franke.daniel@gmail.com>
375 * parse.c (parse_interface): Remove check for procedure types.
376 * interface.c (check_interface0): Verify that procedures are
377 either all SUBROUTINEs or all FUNCTIONs.
379 2011-01-05 Janus Weil <janus@gcc.gnu.org>
382 * trans-expr.c (gfc_trans_class_assign): Bugfix for r168524 (make sure
383 'vtab' is initialized).
385 2011-01-05 Janus Weil <janus@gcc.gnu.org>
388 * trans-expr.c (gfc_trans_class_assign): For a polymorphic NULL pointer
389 assignment, set the _vptr component to the declared type.
391 2011-01-05 Thomas Koenig <tkoenig@gcc.gnu.org>
394 * resolve.c (resolve_allocate_deallocate): Follow references to
395 check for duplicate occurence of allocation/deallocation objects.
397 2011-01-05 Janus Weil <janus@gcc.gnu.org>
400 * trans-decl.c (gfc_trans_deferred_vars): Initialize the _vpr component
401 of polymorphic allocatables according to their declared type.
403 2011-01-04 Janus Weil <janus@gcc.gnu.org>
406 * class.c (gfc_find_derived_vtab): Set the module field for the copying
407 routine to make sure it receives module name mangling.
409 2011-01-03 Jakub Jelinek <jakub@redhat.com>
411 * gfortranspec.c (lang_specific_driver): Update copyright notice
414 2011-01-03 Janus Weil <janus@gcc.gnu.org>
416 * intrinsic.texi (LEADZ): Fix example.
418 2011-01-02 Janus Weil <janus@gcc.gnu.org>
421 * class.c (gfc_find_derived_vtab): Use EXEC_INIT_ASSIGN for __copy_
425 Copyright (C) 2011 Free Software Foundation, Inc.
427 Copying and distribution of this file, with or without modification,
428 are permitted in any medium without royalty provided the copyright
429 notice and this notice are preserved.