1 2011-02-22 Tobias Burnus <burnus@net-b.de>
4 * trans-stmt.c (gfc_trans_if_1): Use correct line for
5 expressions in the if condition.
7 2011-02-20 Tobias Burnus <burnus@net-b.de>
10 * trans-decl.c (gfc_trans_deferred_vars): Use gfc_set_backend_locus and
11 gfc_restore_backend_locus to have better debug locations.
12 * trans-array.c (gfc_trans_deferred_array): Ditto.
14 2011-02-20 Paul Thomas <pault@gcc.gnu.org>
18 * trans-types.c (gfc_get_derived_type): Remove code that looks
19 for decls in gsym and add call to gfc_get_module_backend_decl.
20 * trans.h : Add prototype for gfc_get_module_backend_decl.
21 * trans-decl.c (gfc_get_module_backend_decl): New function.
22 (gfc_get_symbol_decl): Call it.
24 2011-02-19 Paul Thomas <pault@gcc.gnu.org>
27 * trans-array.c (get_array_ctor_all_strlen): Move up in file.
28 (get_array_ctor_var_strlen): Add block dummy and add call to
29 get_array_ctor_all_strlen instead of giving up on substrings.
30 Call gcc_unreachable for default case.
31 (get_array_ctor_strlen): Add extra argument to in call to
32 get_array_ctor_var_strlen.
34 2011-02-18 Janus Weil <janus@gcc.gnu.org>
37 * primary.c (gfc_match_structure_constructor): Handle empty parent
40 2011-02-18 Tobias Burnus
43 * trans-expr.c (arrayfunc_assign_needs_temporary): Use
44 esym to check whether the specific procedure returns an
45 allocatable or pointer.
47 2011-02-18 Michael Matz <matz@suse.de>
50 * gfortran.h (struct gfc_component): Add norestrict_decl member.
51 * trans.h (struct lang_type): Add nonrestricted_type member.
52 * trans-expr.c (gfc_conv_component_ref): Search fields with correct
54 * trans-types.c (mirror_fields, gfc_nonrestricted_type): New.
55 (gfc_sym_type): Use it.
57 2011-02-18 Janus Weil <janus@gcc.gnu.org>
60 * resolve.c (resolve_transfer): Reject variables with procedure pointer
63 2011-02-18 Janus Weil <janus@gcc.gnu.org>
66 * gfortran.h (gfc_check_access): Removed prototype.
67 (gfc_check_symbol_access): Added prototype.
68 * module.c (gfc_check_access): Renamed to 'check_access', made static.
69 (gfc_check_symbol_access): New function, basically a shortcut for
71 (write_dt_extensions,write_symbol0,write_generic,write_symtree): Use
72 'gfc_check_symbol_access'.
73 (write_operator,write_module): Renamed 'gfc_check_access'.
74 * resolve.c (resolve_fl_procedure,resolve_fl_derived,
75 resolve_fl_namelist,resolve_symbol,resolve_fntype): Use
76 'gfc_check_symbol_access'.
78 2011-02-16 Janus Weil <janus@gcc.gnu.org>
81 * class.c (gfc_build_class_symbol): Set 'class_ok' attribute.
82 * decl.c (build_sym,attr_decl1): Move setting of 'class_ok' into
83 'gfc_build_class_symbol'.
84 (gfc_match_decl_type_spec): Reject unlimited polymorphism.
85 * interface.c (matching_typebound_op): Check for 'class_ok' attribute.
86 * match.c (select_type_set_tmp): Move setting of 'class_ok' into
87 'gfc_build_class_symbol'.
88 * primary.c (gfc_variable_attr): Check for 'class_ok' attribute.
90 2011-02-15 Steven G. Kargl <kargl@gcc.gnu.org>
93 . simplify.c (gfc_simplify_compiler_version): Fix off-by-one issue.
95 2011-02-14 Janus Weil <janus@gcc.gnu.org>
98 * parse.c (gfc_build_block_ns): Commit 'block@' symbol.
100 2011-02-14 Janus Weil <janus@gcc.gnu.org>
103 * class.c (gfc_build_class_symbol): Give a fatal error on polymorphic
105 * primary.c (gfc_match_varspec): Avoid ICE for invalid class
108 2011-02-14 Janus Weil <janus@gcc.gnu.org>
111 * interface.c (get_expr_storage_size): Handle derived-type components.
113 2011-02-13 Tobias Burnus <burnus@net-b.de>
116 * interface.c (compare_parameter): Avoid ICE with
117 character components.
119 2011-02-12 Janus Weil <janus@gcc.gnu.org>
121 * class.c (gfc_build_class_symbol): Reject polymorphic arrays.
122 * decl.c (build_sym,build_struct,attr_decl1): Use return value of
123 'gfc_build_class_symbol'.
125 2011-02-12 Michael Matz <matz@suse.de>
126 Janus Weil <janus@gcc.gnu.org>
127 Tobias Burnus <burnus@net-b.de>
130 * trans-expr.c (conv_parent_component_references): Avoid unintendent
131 skipping of parent compounds.
133 2011-02-11 Tobias Burnus <burnus@net-b.de>
136 * resolve.c (resolve_formal_arglist): PURE with VALUE
137 and no INTENT: Add -std= diagnostics.
139 2011-02-09 Janus Weil <janus@gcc.gnu.org>
142 * resolve.c (resolve_procedure_interface): If interface has a result
143 variable, copy the typespec and set result pointer to self.
145 2011-02-09 Janus Weil <janus@gcc.gnu.org>
148 * resolve.c (resolve_typebound_subroutine): Remove erroneous line.
150 2011-02-09 Janus Weil <janus@gcc.gnu.org>
153 * trans-decl.c (init_intent_out_dt): Handle CLASS arguments.
155 2011-02-08 Jerry DeLisle <jvdelisle@gcc.gnu.org>
157 * io.c (match_io_element): Do not set dt if not inquire.
159 2011-02-08 Janus Weil <janus@gcc.gnu.org>
162 * expr.c (gfc_check_assign_symbol): Reject pointers as pointer
163 initialization target.
165 2011-02-07 Janne Blomqvist <jb@gcc.gnu.org>
166 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
168 * gfortran.texi (Thread-safety): texinfo styling fixes.
169 * intrinsic.texi: Likewise.
171 2011-02-06 Janne Blomqvist <jb@gcc.gnu.org>
173 * gfortran.texi (Compiler Characteristics): Add reference to
174 thread-safety section.
176 2011-02-06 Janne Blomqvist <jb@gcc.gnu.org>
178 * gfortran.texi (Thread-safety): New section.
179 * intrinsic.texi (EXECUTE_COMMAND_LINE): Mention thread-safety.
181 (GET_ENVIRONMENT_VARIABLE): Likewise.
184 2011-02-06 Paul Thomas <pault@gcc.gnu.org>
187 * trans-stmt.c (gfc_trans_allocate): For deferred character
188 length allocations with SOURCE, store to the values and string
189 length to avoid calculating twice. Replace gfc_start_block
190 with gfc_init_block to avoid unnecessary contexts and to keep
191 declarations of temporaries where they should be. Tidy up the
194 2011-02-05 Janne Blomqvist <jb@gcc.gnu.org>
197 * intrinsic.texi (SYSTEM_CLOCK): Update documentation.
199 2011-02-02 Janus Weil <janus@gcc.gnu.org>
200 Paul Thomas <pault@gcc.gnu.org>
203 * trans-expr.c (gfc_trans_class_init_assign): Add call to
204 gfc_get_derived_type.
205 * module.c (read_cleanup): Do not use unique_symtrees for vtabs
208 2011-02-02 Janus Weil <janus@gcc.gnu.org>
211 * resolve.c (resolve_fl_variable): Handle polymorphic allocatables.
213 2011-02-01 Janus Weil <janus@gcc.gnu.org>
216 * trans-expr.c (gfc_conv_structure): Handle constructors for procedure
217 pointer components with allocatable result.
219 2011-01-31 Janus Weil <janus@gcc.gnu.org>
222 * trans-expr.c (gfc_conv_procedure_call): Handle procedure pointers
223 with pointer or allocatable result.
225 2011-01-31 Paul Thomas <pault@gcc.gnu.org>
228 * trans-stmt.c (gfc_trans_allocate): Improve handling of
229 deferred character lengths with SOURCE.
230 * iresolve.c (gfc_resolve_repeat): Calculate character
231 length from source length and ncopies.
232 * dump-parse-tree.c (show_code_node): Show MOLD and SOURCE
233 expressions for ALLOCATE.
235 2011-01-31 Janus Weil <janus@gcc.gnu.org>
238 * resolve.c (resolve_typebound_subroutine): Bug fix for the case of
239 an argument of a typebound assignment being a component.
241 2011-01-31 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
243 * gfortranspec.c (add_arg_libgfortran) [HAVE_LD_STATIC_DYNAMIC] Use
244 LD_STATIC_OPTION, LD_DYNAMIC_OPTION.
246 2011-01-31 Tobias Burnus <burnus@net-b.de>
249 * resolve.c (resolve_fl_procedure): Reject stmt functions
250 with pointer/allocatable attribute.
252 2011-01-31 Tobias Burnus <burnus@net-b.de>
255 * interface.c (gfc_procedure_use): Add explicit interface check for
256 pointer/allocatable functions.
258 2011-01-30 Paul Thomas <pault@gcc.gnu.org>
261 * trans-expr.c (gfc_trans_assignment_1): If the rhs is an op
262 expr and is assigned to a deferred character length scalar,
263 make sure that the function is called before reallocation,
264 so that the length is available. Include procedure pointer
265 and procedure pointer component rhs as well.
270 * gfortran.dg/allocatable_function_5.f90: New test not added by
271 mistake on 2011-01-28.
273 2011-01-29 Tobias Burnus <burnus@net-b.de>
276 * check.c (gfc_check_shape): Support kind argument in SHAPE.
277 * intrinsic.c (add_functions): Ditto.
278 * resolve.c (gfc_resolve_shape): Ditto.
279 * simplify.c (gfc_simplify_shape): Ditto.
280 * intrinsic.h (gfc_check_shape, gfc_resolve_shape,
281 gfc_simplify_shape): Update prototypes.
282 * intrinisc.text (SHAPE): Document kind argument.
284 2011-01-28 Tobias Burnus <burnus@net-b.de>
287 * resolve.c (resolve_formal_arglist): Allow arguments with VALUE
288 attribute also without INTENT.
290 2011-01-28 Tobias Burnus <burnus@net-b.de>
292 * gfortran.texi (Fortran 2003 status): Mention support for
293 nonconstant namelist variables.
295 2011-01-28 Paul Thomas <pault@gcc.gnu.org>
296 Tobias Burnus <burnus@gcc.gnu.org>
301 * interface.c (compare_actual_formal): An allocatable or pointer
302 deferred length actual is only allowed if the formal argument
303 is also deferred length. Clean up whitespace.
304 * trans-expr.c (gfc_conv_procedure_call): Pass string length for
305 deferred character length formal arguments by reference. Do the
306 same for function results.
307 (gfc_trans_pointer_assignment): Do not do runtime check of lhs
308 and rhs character lengths, if deferred length lhs. In this case
309 set the lhs character length to that of the rhs.
310 (gfc_conv_string_parameter): Remove assert that string length is
312 (is_scalar_reallocatable_lhs): New function.
313 (alloc_scalar_allocatable_for_assignment): New function.
314 (gfc_trans_assignment_1): Call above new function. If the rhs is
315 a deferred character length itself, makes ure that the function
316 is called before reallocation, so that the length is available.
317 (gfc_trans_asssignment): Remove error about assignment to
318 deferred length character variables.
319 * gfortran.texi : Update entry about (re)allocation on
321 * trans-stmt.c (gfc_trans_allocate): Add code to handle deferred
322 length character variables.
323 * module.c (mio_typespec): Transfer deferred characteristic.
324 * trans-types.c (gfc_get_function_type): New code to generate
325 hidden typelist, so that those character lengths that are
326 passed by reference get the right type.
327 * resolve.c (resolve_contained_fntype): Supress error for
328 deferred character length functions.
329 (resolve_function, resolve_fl_procedure) The same.
330 (check_symbols): Remove the error that support for
331 entity with deferred type parameter is not yet implemented.
332 (resolve_fl_derived): The same.
333 match.c (alloc_opt_list): Allow MOLD for deferred length object.
334 * trans-decl.c (gfc_get_symbol_decl): For deferred character
335 length dummies, generate a local variable for string length.
336 (create_function_arglist): Hidden length can be a pointer.
337 (gfc_trans_deferred_vars): For deferred character length
338 results and dummies, assign the string length to the local
339 variable from the hidden argument on entry and the other way
340 round on exit, as appropriate.
342 2011-01-27 Tobias Burnus <burnus@net-b.de>
345 * trans-decl.c (gfc_generate_function_code): Fix init
346 of allocatable result variable with allocatable components.
348 2011-01-27 Tobias Burnus <burnus@net-b.de>
351 * options.c (gfc_handle_module_path_options): Save
352 module path without trailing slash as include path.
354 2011-01-25 Tobias Burnus <burnus@net-b.de>
357 * interface.c (gfc_check_operator_interface): Fix
358 defined-assignment check.
360 2011-01-23 Tobias Burnus <burnus@net-b.de>
363 * trans-decl.c (gfc_trans_deferred_vars): Do not nullify
364 scalar allocatable dummy arguments.
366 2011-01-22 Thomas Koenig <tkoenig@gcc.gnu.org>
369 * resolve.c (gfc_iso_c_func_interface): For C_LOC,
370 check for array sections followed by component references
371 which are illegal. Also check for coindexed arguments.
373 2011-01-22 Tobias Burnus <burnus@net-b.de>
376 * primary.c (gfc_match_varspec): Relax gcc_assert to allow for
379 2011-01-21 Tobias Burnus <burnus@net-b.de>
382 * error.c (gfc_error_now, gfc_fatal_error, gfc_error_check):
383 Use defined instead of magic number exit status codes.
384 * scanner.c (include_line, gfc_new_file): Ditto.
386 2011-01-21 Tobias Burnus <burnus@net-b.de>
389 * expr.c (gfc_check_pointer_assign): Reject expr data-targets
390 without pointer attribute.
392 2011-01-18 Janus Weil <janus@gcc.gnu.org>
395 * resolve.c (expression_rank): Fix rank of procedure poiner components.
396 * trans-expr.c (gfc_conv_procedure_call): Take care of procedure
397 pointer components as actual arguments.
399 2011-01-17 Jakub Jelinek <jakub@redhat.com>
402 * gfortran.h (struct gfc_omp_saved_state): New type.
403 (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New prototypes.
404 * resolve.c (resolve_global_procedure): Call it around gfc_resolve
406 * openmp.c (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New
409 2011-01-17 Tobias Burnus <burnus@net-b.de>
412 * invoke.texi (Options to request or suppress errors
413 and warnings): Fix cross link.
415 2011-01-15 Tobias Burnus <burnus@net-b.de>
417 * gfortran.texi: Update Fortran 2003 Status section.
420 * invoke.texi: Add missing "-E" to the -dM example.
422 2011-01-13 Tobias Burnus <burnus@net-b.de>
425 * intrinsic.texi (get_command_argument, get_environment_variable):
426 Mark arguments as optional in the Arguments section.
428 2011-01-13 Kai Tietz <kai.tietz@onevision.com>
429 Tobias Burnus <burnus@net-b.de>
432 * trans-decl.c (gfc_get_extern_function_decl,
433 build_function_decl): Set TREE_PUBLIC/TREE_EXTERNAL before
434 calling decl_attributes.
436 2011-01-13 Tobias Burnus <burnus@net-b.de>
437 Mikael Morin <mikael@gcc.gnu.org>
441 * gfortran.h (gfc_code): Move union ext's case_list into
443 * dump-parse-tree.c (show_code_node): Adapt by prefixing case_list
445 * frontend-passes.c (gfc_code_walker): Ditto.
446 * match.c (gfc_match_goto, gfc_match_call, gfc_match_case,
447 gfc_match_type_is, gfc_match_class_is): Ditto.
448 * resolve.c (resolve_select, resolve_select_type): Ditto.
449 * st.c (gfc_free_statement): Ditto.
450 * trans-stmt.c (gfc_trans_integer_select, gfc_trans_logical_select,
451 gfc_trans_character_select): Ditto.
452 * parse.c (resolve_all_program_units): For error recovery, avoid
453 segfault is proc_name is NULL.
455 2011-01-11 Paul Thomas <pault@gcc.gnu.org>
458 * trans-array.c (gfc_alloc_allocatable_for_assignment): Change
459 to be standard compliant by testing for shape rather than size
460 before skipping reallocation. Improve comments.
462 2011-01-09 Janus Weil <janus@gcc.gnu.org>
465 * resolve.c (resolve_actual_arglist): Remove unneeded and buggy piece
468 2011-01-09 Thomas Koenig <tkoenig@gcc.gnu.org>
471 * resolve.c (is_scalar_expr_ptr): For a substring reference,
472 use gfc_dep_compare_expr to compare start and end expession.
473 Add FIXME for using gfc_deb_compare_expr elsewhere.
475 2011-01-09 Janus Weil <janus@gcc.gnu.org>
478 * class.c (get_unique_type_string): Make type name start with upper
481 2011-01-08 Thomas Koenig <tkoenig@gcc.gnu.org>
484 * invoke.texi: Mention -ffree-line-length-none and
485 -ffixed-line-length-none for preprocessing.
487 2011-01-08 Paul Thomas <pault@gcc.gnu.org>
490 * trans-expr.c (gfc_conv_procedure_call): With a non-copying
491 procedure argument (eg TRANSPOSE) use a temporary if there is
492 any chance of aliasing due to host or use association.
493 (arrayfunc_assign_needs_temporary): Correct logic for function
494 results and do not use a temporary for implicitly PURE
495 variables. Use a temporary for Cray pointees.
496 * symbol.c (gfc_add_save): Explicit SAVE not compatible with
497 implicit pureness of containing procedure.
498 * decl.c (match_old_style_init, gfc_match_data): Where decl
499 would fail in PURE procedure, set implicit_pure to zero.
500 * gfortran.h : Add implicit_pure to structure symbol_attr and
501 add prototype for function gfc_implicit_pure.
502 * expr.c (gfc_check_pointer_assign, gfc_check_vardef_context):
503 Where decl would fail in PURE procedure, reset implicit_pure.
504 * io.c (match_vtag, gfc_match_open, gfc_match_close,
505 gfc_match_print, gfc_match_inquire, gfc_match_wait): The same.
506 * match.c (gfc_match_critical, gfc_match_stopcode,
507 sync_statement, gfc_match_allocate, gfc_match_deallocate): The
509 * parse.c (decode_omp_directive): The same.
510 (parse_contained): If not PURE, set implicit pure attribute.
511 * resolve.c (resolve_formal_arglist, resolve_structure_cons,
512 resolve_function, resolve_ordinary_assign) : The same.
513 (gfc_implicit_pure): New function.
514 * module.c (mio_symbol_attribute): Introduce AB_IMPLICIT_PURE
515 to ab_attribute enum and use it in this function.
517 2011-01-08 Thomas Koenig <tkoenig@gcc.gnu.org>
520 * symbol.c (gfc_symbols_could_alias): Strip gfc_ prefix,
521 make static and move in front of its only caller, to ...
522 * trans-array.c (symbols_could_alias): ... here.
523 Pass information about pointer and target status as
524 arguments. Allocatable arrays don't alias anything
525 unless they have the POINTER attribute.
526 (gfc_could_be_alias): Keep track of pointer and target
527 status when following references. Also check if typespecs
528 of components match those of other components or symbols.
530 2011-01-07 Tobias Burnus <burnus@net-b.de>
533 * class.c (gfc_build_class_symbol): Mark __vtab as attr.vtab.
534 * intrinsic.c (add_functions): Use simplify functions for
535 EXTENDS_TYPE_OF and SAME_TYPE_AS.
536 * intrinsic.h (gfc_simplify_extends_type_of,
537 gfc_simplify_same_type_as): New prototypes.
538 * simplify.c (is_last_ref_vtab, gfc_simplify_extends_type_of,
539 gfc_simplify_same_type_as): New functions.
541 2011-01-07 Janus Weil <janus@gcc.gnu.org>
545 * gfortran.h (gfc_lval_expr_from_sym): Moved prototype.
546 * class.c (gfc_class_null_initializer): Initialize _vptr to declared
548 * expr.c (gfc_lval_expr_from_sym): Moved here from symbol.c.
549 * resolve.c (resolve_deallocate_expr): _data component will be added
550 at translation stage.
551 * symbol.c (gfc_lval_expr_from_sym): Moved to expr.c.
552 * trans-stmt.c (gfc_trans_deallocate): Reset _vptr to declared type.
554 2011-01-06 Daniel Franke <franke.daniel@gmail.com>
558 * parse.c (parse_interface): Remove check for procedure types.
559 * interface.c (check_interface0): Verify that procedures are
560 either all SUBROUTINEs or all FUNCTIONs.
562 2011-01-05 Janus Weil <janus@gcc.gnu.org>
565 * trans-expr.c (gfc_trans_class_assign): Bugfix for r168524 (make sure
566 'vtab' is initialized).
568 2011-01-05 Janus Weil <janus@gcc.gnu.org>
571 * trans-expr.c (gfc_trans_class_assign): For a polymorphic NULL pointer
572 assignment, set the _vptr component to the declared type.
574 2011-01-05 Thomas Koenig <tkoenig@gcc.gnu.org>
577 * resolve.c (resolve_allocate_deallocate): Follow references to
578 check for duplicate occurence of allocation/deallocation objects.
580 2011-01-05 Janus Weil <janus@gcc.gnu.org>
583 * trans-decl.c (gfc_trans_deferred_vars): Initialize the _vpr component
584 of polymorphic allocatables according to their declared type.
586 2011-01-04 Janus Weil <janus@gcc.gnu.org>
589 * class.c (gfc_find_derived_vtab): Set the module field for the copying
590 routine to make sure it receives module name mangling.
592 2011-01-03 Jakub Jelinek <jakub@redhat.com>
594 * gfortranspec.c (lang_specific_driver): Update copyright notice
597 2011-01-03 Janus Weil <janus@gcc.gnu.org>
599 * intrinsic.texi (LEADZ): Fix example.
601 2011-01-02 Janus Weil <janus@gcc.gnu.org>
604 * class.c (gfc_find_derived_vtab): Use EXEC_INIT_ASSIGN for __copy_
608 Copyright (C) 2011 Free Software Foundation, Inc.
610 Copying and distribution of this file, with or without modification,
611 are permitted in any medium without royalty provided the copyright
612 notice and this notice are preserved.