1 2011-01-31 Tobias Burnus <burnus@net-b.de>
4 * resolve.c (resolve_fl_procedure): Reject stmt functions
5 with pointer/allocatable attribute.
7 2011-01-31 Tobias Burnus <burnus@net-b.de>
10 * interface.c (gfc_procedure_use): Add explicit interface check for
11 pointer/allocatable functions.
13 2011-01-30 Paul Thomas <pault@gcc.gnu.org>
16 * trans-expr.c (gfc_trans_assignment_1): If the rhs is an op
17 expr and is assigned to a deferred character length scalar,
18 make sure that the function is called before reallocation,
19 so that the length is available. Include procedure pointer
20 and procedure pointer component rhs as well.
25 * gfortran.dg/allocatable_function_5.f90: New test not added by
26 mistake on 2011-01-28.
28 2011-01-29 Tobias Burnus <burnus@net-b.de>
31 * check.c (gfc_check_shape): Support kind argument in SHAPE.
32 * intrinsic.c (add_functions): Ditto.
33 * resolve.c (gfc_resolve_shape): Ditto.
34 * simplify.c (gfc_simplify_shape): Ditto.
35 * intrinsic.h (gfc_check_shape, gfc_resolve_shape,
36 gfc_simplify_shape): Update prototypes.
37 * intrinisc.text (SHAPE): Document kind argument.
39 2011-01-28 Tobias Burnus <burnus@net-b.de>
42 * resolve.c (resolve_formal_arglist): Allow arguments with VALUE
43 attribute also without INTENT.
45 2011-01-28 Tobias Burnus <burnus@net-b.de>
47 * gfortran.texi (Fortran 2003 status): Mention support for
48 nonconstant namelist variables.
50 2011-01-28 Paul Thomas <pault@gcc.gnu.org>
51 Tobias Burnus <burnus@gcc.gnu.org>
56 * interface.c (compare_actual_formal): An allocatable or pointer
57 deferred length actual is only allowed if the formal argument
58 is also deferred length. Clean up whitespace.
59 * trans-expr.c (gfc_conv_procedure_call): Pass string length for
60 deferred character length formal arguments by reference. Do the
61 same for function results.
62 (gfc_trans_pointer_assignment): Do not do runtime check of lhs
63 and rhs character lengths, if deferred length lhs. In this case
64 set the lhs character length to that of the rhs.
65 (gfc_conv_string_parameter): Remove assert that string length is
67 (is_scalar_reallocatable_lhs): New function.
68 (alloc_scalar_allocatable_for_assignment): New function.
69 (gfc_trans_assignment_1): Call above new function. If the rhs is
70 a deferred character length itself, makes ure that the function
71 is called before reallocation, so that the length is available.
72 (gfc_trans_asssignment): Remove error about assignment to
73 deferred length character variables.
74 * gfortran.texi : Update entry about (re)allocation on
76 * trans-stmt.c (gfc_trans_allocate): Add code to handle deferred
77 length character variables.
78 * module.c (mio_typespec): Transfer deferred characteristic.
79 * trans-types.c (gfc_get_function_type): New code to generate
80 hidden typelist, so that those character lengths that are
81 passed by reference get the right type.
82 * resolve.c (resolve_contained_fntype): Supress error for
83 deferred character length functions.
84 (resolve_function, resolve_fl_procedure) The same.
85 (check_symbols): Remove the error that support for
86 entity with deferred type parameter is not yet implemented.
87 (resolve_fl_derived): The same.
88 match.c (alloc_opt_list): Allow MOLD for deferred length object.
89 * trans-decl.c (gfc_get_symbol_decl): For deferred character
90 length dummies, generate a local variable for string length.
91 (create_function_arglist): Hidden length can be a pointer.
92 (gfc_trans_deferred_vars): For deferred character length
93 results and dummies, assign the string length to the local
94 variable from the hidden argument on entry and the other way
95 round on exit, as appropriate.
97 2011-01-27 Tobias Burnus <burnus@net-b.de>
100 * trans-decl.c (gfc_generate_function_code): Fix init
101 of allocatable result variable with allocatable components.
103 2011-01-27 Tobias Burnus <burnus@net-b.de>
106 * options.c (gfc_handle_module_path_options): Save
107 module path without trailing slash as include path.
109 2011-01-25 Tobias Burnus <burnus@net-b.de>
112 * interface.c (gfc_check_operator_interface): Fix
113 defined-assignment check.
115 2011-01-23 Tobias Burnus <burnus@net-b.de>
118 * trans-decl.c (gfc_trans_deferred_vars): Do not nullify
119 scalar allocatable dummy arguments.
121 2011-01-22 Thomas Koenig <tkoenig@gcc.gnu.org>
124 * resolve.c (gfc_iso_c_func_interface): For C_LOC,
125 check for array sections followed by component references
126 which are illegal. Also check for coindexed arguments.
128 2011-01-22 Tobias Burnus <burnus@net-b.de>
131 * primary.c (gfc_match_varspec): Relax gcc_assert to allow for
134 2011-01-21 Tobias Burnus <burnus@net-b.de>
137 * error.c (gfc_error_now, gfc_fatal_error, gfc_error_check):
138 Use defined instead of magic number exit status codes.
139 * scanner.c (include_line, gfc_new_file): Ditto.
141 2011-01-21 Tobias Burnus <burnus@net-b.de>
144 * expr.c (gfc_check_pointer_assign): Reject expr data-targets
145 without pointer attribute.
147 2011-01-18 Janus Weil <janus@gcc.gnu.org>
150 * resolve.c (expression_rank): Fix rank of procedure poiner components.
151 * trans-expr.c (gfc_conv_procedure_call): Take care of procedure
152 pointer components as actual arguments.
154 2011-01-17 Jakub Jelinek <jakub@redhat.com>
157 * gfortran.h (struct gfc_omp_saved_state): New type.
158 (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New prototypes.
159 * resolve.c (resolve_global_procedure): Call it around gfc_resolve
161 * openmp.c (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New
164 2011-01-17 Tobias Burnus <burnus@net-b.de>
167 * invoke.texi (Options to request or suppress errors
168 and warnings): Fix cross link.
170 2011-01-15 Tobias Burnus <burnus@net-b.de>
172 * gfortran.texi: Update Fortran 2003 Status section.
175 * invoke.texi: Add missing "-E" to the -dM example.
177 2011-01-13 Tobias Burnus <burnus@net-b.de>
180 * intrinsic.texi (get_command_argument, get_environment_variable):
181 Mark arguments as optional in the Arguments section.
183 2011-01-13 Kai Tietz <kai.tietz@onevision.com>
184 Tobias Burnus <burnus@net-b.de>
187 * trans-decl.c (gfc_get_extern_function_decl,
188 build_function_decl): Set TREE_PUBLIC/TREE_EXTERNAL before
189 calling decl_attributes.
191 2011-01-13 Tobias Burnus <burnus@net-b.de>
192 Mikael Morin <mikael@gcc.gnu.org>
196 * gfortran.h (gfc_code): Move union ext's case_list into
198 * dump-parse-tree.c (show_code_node): Adapt by prefixing case_list
200 * frontend-passes.c (gfc_code_walker): Ditto.
201 * match.c (gfc_match_goto, gfc_match_call, gfc_match_case,
202 gfc_match_type_is, gfc_match_class_is): Ditto.
203 * resolve.c (resolve_select, resolve_select_type): Ditto.
204 * st.c (gfc_free_statement): Ditto.
205 * trans-stmt.c (gfc_trans_integer_select, gfc_trans_logical_select,
206 gfc_trans_character_select): Ditto.
207 * parse.c (resolve_all_program_units): For error recovery, avoid
208 segfault is proc_name is NULL.
210 2011-01-11 Paul Thomas <pault@gcc.gnu.org>
213 * trans-array.c (gfc_alloc_allocatable_for_assignment): Change
214 to be standard compliant by testing for shape rather than size
215 before skipping reallocation. Improve comments.
217 2011-01-09 Janus Weil <janus@gcc.gnu.org>
220 * resolve.c (resolve_actual_arglist): Remove unneeded and buggy piece
223 2011-01-09 Thomas Koenig <tkoenig@gcc.gnu.org>
226 * resolve.c (is_scalar_expr_ptr): For a substring reference,
227 use gfc_dep_compare_expr to compare start and end expession.
228 Add FIXME for using gfc_deb_compare_expr elsewhere.
230 2011-01-09 Janus Weil <janus@gcc.gnu.org>
233 * class.c (get_unique_type_string): Make type name start with upper
236 2011-01-08 Thomas Koenig <tkoenig@gcc.gnu.org>
239 * invoke.texi: Mention -ffree-line-length-none and
240 -ffixed-line-length-none for preprocessing.
242 2011-01-08 Paul Thomas <pault@gcc.gnu.org>
245 * trans-expr.c (gfc_conv_procedure_call): With a non-copying
246 procedure argument (eg TRANSPOSE) use a temporary if there is
247 any chance of aliasing due to host or use association.
248 (arrayfunc_assign_needs_temporary): Correct logic for function
249 results and do not use a temporary for implicitly PURE
250 variables. Use a temporary for Cray pointees.
251 * symbol.c (gfc_add_save): Explicit SAVE not compatible with
252 implicit pureness of containing procedure.
253 * decl.c (match_old_style_init, gfc_match_data): Where decl
254 would fail in PURE procedure, set implicit_pure to zero.
255 * gfortran.h : Add implicit_pure to structure symbol_attr and
256 add prototype for function gfc_implicit_pure.
257 * expr.c (gfc_check_pointer_assign, gfc_check_vardef_context):
258 Where decl would fail in PURE procedure, reset implicit_pure.
259 * io.c (match_vtag, gfc_match_open, gfc_match_close,
260 gfc_match_print, gfc_match_inquire, gfc_match_wait): The same.
261 * match.c (gfc_match_critical, gfc_match_stopcode,
262 sync_statement, gfc_match_allocate, gfc_match_deallocate): The
264 * parse.c (decode_omp_directive): The same.
265 (parse_contained): If not PURE, set implicit pure attribute.
266 * resolve.c (resolve_formal_arglist, resolve_structure_cons,
267 resolve_function, resolve_ordinary_assign) : The same.
268 (gfc_implicit_pure): New function.
269 * module.c (mio_symbol_attribute): Introduce AB_IMPLICIT_PURE
270 to ab_attribute enum and use it in this function.
272 2011-01-08 Thomas Koenig <tkoenig@gcc.gnu.org>
275 * symbol.c (gfc_symbols_could_alias): Strip gfc_ prefix,
276 make static and move in front of its only caller, to ...
277 * trans-array.c (symbols_could_alias): ... here.
278 Pass information about pointer and target status as
279 arguments. Allocatable arrays don't alias anything
280 unless they have the POINTER attribute.
281 (gfc_could_be_alias): Keep track of pointer and target
282 status when following references. Also check if typespecs
283 of components match those of other components or symbols.
285 2011-01-07 Tobias Burnus <burnus@net-b.de>
288 * class.c (gfc_build_class_symbol): Mark __vtab as attr.vtab.
289 * intrinsic.c (add_functions): Use simplify functions for
290 EXTENDS_TYPE_OF and SAME_TYPE_AS.
291 * intrinsic.h (gfc_simplify_extends_type_of,
292 gfc_simplify_same_type_as): New prototypes.
293 * simplify.c (is_last_ref_vtab, gfc_simplify_extends_type_of,
294 gfc_simplify_same_type_as): New functions.
296 2011-01-07 Janus Weil <janus@gcc.gnu.org>
300 * gfortran.h (gfc_lval_expr_from_sym): Moved prototype.
301 * class.c (gfc_class_null_initializer): Initialize _vptr to declared
303 * expr.c (gfc_lval_expr_from_sym): Moved here from symbol.c.
304 * resolve.c (resolve_deallocate_expr): _data component will be added
305 at translation stage.
306 * symbol.c (gfc_lval_expr_from_sym): Moved to expr.c.
307 * trans-stmt.c (gfc_trans_deallocate): Reset _vptr to declared type.
309 2011-01-06 Daniel Franke <franke.daniel@gmail.com>
313 * parse.c (parse_interface): Remove check for procedure types.
314 * interface.c (check_interface0): Verify that procedures are
315 either all SUBROUTINEs or all FUNCTIONs.
317 2011-01-05 Janus Weil <janus@gcc.gnu.org>
320 * trans-expr.c (gfc_trans_class_assign): Bugfix for r168524 (make sure
321 'vtab' is initialized).
323 2011-01-05 Janus Weil <janus@gcc.gnu.org>
326 * trans-expr.c (gfc_trans_class_assign): For a polymorphic NULL pointer
327 assignment, set the _vptr component to the declared type.
329 2011-01-05 Thomas Koenig <tkoenig@gcc.gnu.org>
332 * resolve.c (resolve_allocate_deallocate): Follow references to
333 check for duplicate occurence of allocation/deallocation objects.
335 2011-01-05 Janus Weil <janus@gcc.gnu.org>
338 * trans-decl.c (gfc_trans_deferred_vars): Initialize the _vpr component
339 of polymorphic allocatables according to their declared type.
341 2011-01-04 Janus Weil <janus@gcc.gnu.org>
344 * class.c (gfc_find_derived_vtab): Set the module field for the copying
345 routine to make sure it receives module name mangling.
347 2011-01-03 Jakub Jelinek <jakub@redhat.com>
349 * gfortranspec.c (lang_specific_driver): Update copyright notice
352 2011-01-03 Janus Weil <janus@gcc.gnu.org>
354 * intrinsic.texi (LEADZ): Fix example.
356 2011-01-02 Janus Weil <janus@gcc.gnu.org>
359 * class.c (gfc_find_derived_vtab): Use EXEC_INIT_ASSIGN for __copy_
363 Copyright (C) 2011 Free Software Foundation, Inc.
365 Copying and distribution of this file, with or without modification,
366 are permitted in any medium without royalty provided the copyright
367 notice and this notice are preserved.