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