2008-09-22 13:45:02 +02:00
|
|
|
2008-09-22 Janus Weil <janus@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/37486
|
|
|
|
* gfortran.h (gfc_option_t): New members flag_align_commons and
|
|
|
|
warn_align_commons.
|
|
|
|
* lang.opt: New options falign-commons and Walign-commons.
|
|
|
|
* invoke.texi: Documentation for new options.
|
|
|
|
* options.c (gfc_init_options): Initialize new options.
|
|
|
|
(gfc_handle_options): Handle new options.
|
|
|
|
* trans-common.c (translate_common): Implement new options.
|
|
|
|
(gfc_trans_common): Set correct locus.
|
|
|
|
|
2008-09-21 21:58:23 +02:00
|
|
|
2008-09-21 Paul Thomas <pault@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/37583
|
|
|
|
* decl.c (scalarize_intrinsic_call): Both subroutines and
|
|
|
|
functions can give a true for get_proc_mame's last argument so
|
|
|
|
remove the &&gfc_current_ns->proc_name->attr.function.
|
|
|
|
resolve.c (resolve_actual_arglist): Add check for recursion by
|
|
|
|
reference to procedure as actual argument.
|
|
|
|
|
2008-09-21 17:33:37 +02:00
|
|
|
2008-09-21 Daniel Kraft <d@domob.eu>
|
|
|
|
|
|
|
|
PR fortran/35846
|
|
|
|
* trans.h (gfc_conv_string_length): New argument `expr'.
|
|
|
|
* trans-expr.c (flatten_array_ctors_without_strlen): New method.
|
|
|
|
(gfc_conv_string_length): New argument `expr' that is used in a new
|
|
|
|
special case handling if cl->length is NULL.
|
|
|
|
(gfc_conv_subref_array_arg): Pass expr to gfc_conv_string_length.
|
|
|
|
* trans-array.c (gfc_conv_expr_descriptor): Ditto.
|
|
|
|
(gfc_trans_auto_array_allocation): Pass NULL as new expr.
|
|
|
|
(gfc_trans_g77_array), (gfc_trans_dummy_array_bias): Ditto.
|
|
|
|
(gfc_trans_deferred_array): Ditto.
|
|
|
|
(gfc_trans_array_constructor): Save and restore old values of globals
|
|
|
|
used for bounds checking.
|
|
|
|
* trans-decl.c (gfc_trans_dummy_character): Ditto.
|
|
|
|
(gfc_trans_auto_character_variable): Ditto.
|
|
|
|
|
2008-09-21 17:24:55 +02:00
|
|
|
2008-09-21 Daniel Kraft <d@domob.eu>
|
|
|
|
|
|
|
|
* decl.c (match_procedure_in_type): Changed misleading error message
|
|
|
|
for not yet implemented PROCEDURE(interface) syntax.
|
|
|
|
|
2008-09-18 22:21:03 +02:00
|
|
|
2008-09-18 Paul Thomas <pault@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/35945
|
|
|
|
* resolve.c (resolve_fl_variable_derived): Remove derived type
|
|
|
|
comparison for use associated derived types. Host association
|
|
|
|
of a derived type will not arise if there is a local derived type
|
|
|
|
whose use name is the same.
|
|
|
|
|
|
|
|
PR fortran/36700
|
|
|
|
* match.c (gfc_match_call): Use the existing symbol even if
|
|
|
|
it is a function.
|
|
|
|
|
2008-09-18 14:02:50 +02:00
|
|
|
2008-09-18 Daniel Kraft <d@domob.eu>
|
|
|
|
|
|
|
|
PR fortran/37507
|
|
|
|
* trans.h (gfc_trans_runtime_error): New method.
|
|
|
|
(gfc_trans_runtime_error_vararg): New method.
|
|
|
|
(gfc_allocate_array_with_status): New argument `expr' for locus/varname.
|
|
|
|
(gfc_deallocate_array_with_status): Ditto.
|
|
|
|
* trans-array.h (gfc_array_deallocate): Ditto.
|
|
|
|
* trans.c (gfc_trans_runtime_error): New method.
|
|
|
|
(gfc_trans_runtime_error_vararg): New method, moved parts of the code
|
|
|
|
from gfc_trans_runtime_check here.
|
|
|
|
(gfc_trans_runtime_error_check): Moved code partly to new method.
|
|
|
|
(gfc_call_malloc): Fix tab-indentation.
|
|
|
|
(gfc_allocate_array_with_status): New argument `expr' and call
|
|
|
|
gfc_trans_runtime_error for error reporting to include locus.
|
|
|
|
(gfc_deallocate_with_status): Ditto.
|
|
|
|
* trans-stmt.c (gfc_trans_deallocate): Pass expr as new argument.
|
|
|
|
* trans-array.c (gfc_array_allocate): Ditto.
|
|
|
|
(gfc_array_deallocate): New argument `expr', passed on.
|
|
|
|
(gfc_trans_dealloc_allocated): Pass NULL for expr.
|
|
|
|
* trans-openmp.c (gfc_omp_clause_default): Ditto.
|
|
|
|
|
2008-09-18 00:23:51 +02:00
|
|
|
2008-09-18 Paul Thomas <pault@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/37274
|
|
|
|
PR fortran/36374
|
|
|
|
* module.c (check_for_ambiguous): New function to test loaded
|
|
|
|
symbol for ambiguity with fixup symbol.
|
|
|
|
(read_module): Call check_for_ambiguous.
|
|
|
|
(write_symtree): Do not write the symtree for symbols coming
|
|
|
|
from an interface body.
|
|
|
|
|
|
|
|
PR fortran/36374
|
|
|
|
* resolve.c (count_specific_procs ): New function to count the
|
|
|
|
number of specific procedures with the same name as the generic
|
|
|
|
and emit appropriate errors for and actual argument reference.
|
|
|
|
(resolve_assumed_size_actual): Add new argument no_formal_args.
|
|
|
|
Correct logic around passing generic procedures as arguments.
|
|
|
|
Call count_specific_procs from two locations.
|
|
|
|
(resolve_function): Evaluate and pass no_formal_args.
|
|
|
|
(resolve call): The same and clean up a bit by using csym more
|
|
|
|
widely.
|
|
|
|
|
|
|
|
PR fortran/36454
|
|
|
|
* symbol.c (gfc_add_access): Access can be updated if use
|
|
|
|
associated and not private.
|
|
|
|
|
2008-09-17 23:51:50 +02:00
|
|
|
2008-09-17 Jakub Jelinek <jakub@redhat.com>
|
|
|
|
|
|
|
|
PR fortran/37536
|
|
|
|
* trans-stmt.c (gfc_trans_do): Optimize integer type non-simple
|
|
|
|
do loop initialization.
|
|
|
|
|
2008-09-14 21:00:26 +02:00
|
|
|
2008-09-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
|
|
|
Tobias Burnus <burnus@net.b.de>
|
|
|
|
|
|
|
|
PR fortran/35840
|
|
|
|
* io.c (match_vtag): Add tag name to error message.
|
|
|
|
(match_out_tag): Cleanup whitespace.
|
|
|
|
(gfc_resolve_dt): Resolve id and async tags.
|
|
|
|
|
2008-09-13 09:44:36 +02:00
|
|
|
2008-09-13 Daniel Kraft <d@domob.eu>
|
|
|
|
|
|
|
|
PR fortran/35770
|
|
|
|
* primary.c (gfc_match_varspec): Added missing type-spec clearing
|
|
|
|
after wrong implicit character typing.
|
|
|
|
|
2008-09-12 11:01:35 +02:00
|
|
|
2008-09-12 Richard Guenther <rguenther@suse.de>
|
|
|
|
|
|
|
|
* trans-intrinsic.c (gfc_conv_intrinsic_transfer): Use
|
|
|
|
build_fold_addr_expr to properly mark the argument
|
|
|
|
addressable.
|
|
|
|
|
2008-09-11 09:28:18 +02:00
|
|
|
2008-09-11 Daniel Kraft <d@domob.eu>
|
|
|
|
|
|
|
|
PR fortran/36214
|
|
|
|
* simplify.c (simplify_cmplx): Added linebreak to long line.
|
|
|
|
* target-memory.c (gfc_convert_boz): Fix indentation.
|
|
|
|
(gfc_interpret_float): Set mpfr precision to right value before
|
|
|
|
calling mpfr_init.
|
|
|
|
|
2008-09-10 23:13:44 +02:00
|
|
|
2008-09-10 H.J. Lu <hongjiu.lu@intel.com>
|
|
|
|
|
|
|
|
* expr.c (find_array_element): Reformat comment.
|
|
|
|
|
2008-09-10 23:07:29 +02:00
|
|
|
2008-09-10 H.J. Lu <hongjiu.lu@intel.com>
|
|
|
|
|
|
|
|
* expr.c (find_array_element): Reformat.
|
|
|
|
|
2008-09-10 13:54:08 +02:00
|
|
|
2008-09-10 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
PR fortran/37420
|
|
|
|
* trans-decl.c (get_proc_pointer_decl): Fix -Wunused-variable.
|
|
|
|
|
2008-09-09 20:08:08 +02:00
|
|
|
2008-09-09 Daniel Kraft <d@domob.eu>
|
|
|
|
|
|
|
|
PR fortran/37429
|
|
|
|
* resolve.c (expression_rank): Added assertion to guard against
|
|
|
|
EXPR_COMPCALL expressions.
|
|
|
|
(resolve_compcall): Set expression's rank from the target procedure's.
|
|
|
|
|
2008-09-09 11:46:51 +02:00
|
|
|
2008-09-09 Daniel Kraft <d@domob.eu>
|
|
|
|
|
|
|
|
PR fortran/37411
|
|
|
|
* trans-array.c (gfc_conv_array_parameter): Added assertion that the
|
|
|
|
symbol has an array spec.
|
|
|
|
|
2008-09-08 11:17:27 +02:00
|
|
|
2008-09-08 Daniel Kraft <d@domob.eu>
|
|
|
|
|
|
|
|
PR fortran/37199
|
|
|
|
* trans-expr.c (gfc_add_interface_mapping): Set new_sym->as.
|
|
|
|
(gfc_map_intrinsic_function): Added checks against NULL bounds in
|
|
|
|
array specs.
|
|
|
|
|
2008-09-08 09:19:46 +02:00
|
|
|
2008-09-08 Tobias Burnus <burnus@net.b.de>
|
|
|
|
|
|
|
|
PR fortran/37400
|
|
|
|
* symbol.c (gfc_set_default_type): Copy char len.
|
|
|
|
|
2008-09-06 17:27:50 +02:00
|
|
|
2008-09-06 Steven G. Kargl <kargls@comcast.net>
|
|
|
|
|
|
|
|
PR fortran/36153
|
|
|
|
* fortran/resolve.c (resolve_function): Shortcircuit for SIZE and
|
|
|
|
UBOUND if 2nd argument is KIND.
|
|
|
|
|
2008-09-06 17:11:29 +02:00
|
|
|
2008-09-06 Steven G. Kargl <kargls@comcast.net>
|
|
|
|
|
|
|
|
PR fortran/33229
|
|
|
|
* resolve.c (resolve_function): An intrinsic subroutine should not be
|
|
|
|
called as a function.
|
|
|
|
|
2008-09-05 22:51:50 +02:00
|
|
|
2008-09-05 Daniel Kraft <d@domob.eu>
|
|
|
|
|
|
|
|
PR fortran/35837
|
|
|
|
* resolve.c (resolve_types): Restore gfc_current_ns on exit.
|
|
|
|
* symbol.c (gfc_save_all): Removed blank line.
|
|
|
|
|
2008-09-05 13:56:23 +02:00
|
|
|
2008-09-05 Daniel Kraft <d@domob.eu>
|
|
|
|
|
|
|
|
PR fortran/36746
|
|
|
|
* primary.c (gfc_match_rvalue): Removed logic to handle implicit
|
|
|
|
typing to a derived-type if a component reference is found.
|
|
|
|
(gfc_match_varspec): Moved it here.
|
|
|
|
|
2008-09-04 21:32:02 +02:00
|
|
|
2008-09-04 Richard Guenther <rguenther@suse.de>
|
|
|
|
|
|
|
|
* trans-array.c (gfc_conv_array_parameter): Use correct types
|
|
|
|
in building COND_EXPRs.
|
|
|
|
* trans-expr.c (gfc_conv_missing_dummy): Likewise.
|
|
|
|
* trans-intrinsics.c (gfc_conv_intrinsic_merge): Likewise.
|
|
|
|
|
2008-09-04 21:16:13 +02:00
|
|
|
2008-09-04 Daniel Kraft <d@domob.eu>
|
|
|
|
|
|
|
|
* PR fortran/37099
|
|
|
|
* expr.c (simplify_const_ref): Update expression's character length
|
|
|
|
when pulling out a substring reference.
|
|
|
|
|
2008-09-04 19:32:38 +02:00
|
|
|
2008-09-04 Ian Lance Taylor <iant@google.com>
|
|
|
|
|
|
|
|
* symbol.c (generate_isocbinding_symbol): Compare
|
|
|
|
gfc_notification_std with ERROR rather than FAILURE.
|
|
|
|
* resolve.c (check_assumed_size_reference): Compare array type
|
|
|
|
with AR_FULL rather than DIMEN_ELEMENT.
|
|
|
|
(resolve_actual_arglist): Compare with EXPR_VARIABLE rather than
|
|
|
|
FL_VARIABLE.
|
|
|
|
|
2008-09-02 10:50:13 +02:00
|
|
|
2008-09-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/37228
|
|
|
|
* io.c (check_format): Allow specifying precision with g0 format.
|
|
|
|
|
2008-09-02 10:13:21 +02:00
|
|
|
2008-09-02 Daniel Kraft <d@domob.eu>
|
|
|
|
|
|
|
|
* gfortran.h (struct gfc_namespace): New member `implicit_loc'.
|
|
|
|
(gfc_add_abstract): New method.
|
|
|
|
* decl.c (gfc_get_type_attr_spec): Match ABSTRACT attribute.
|
|
|
|
(gfc_match_derived_decl): Copy abstract attribute in derived symbol.
|
|
|
|
* dump-parse-tree.c (show_attr): Show ABSTRACT attribute as `ABSTRACT'
|
|
|
|
only to allow for ABSTRACT types.
|
|
|
|
* parse.c (parse_interface): Use new gfc_add_abstract.
|
|
|
|
* primary.c (gfc_match_structure_constructor): Check that no ABSTRACT
|
|
|
|
type is constructed.
|
|
|
|
* resolve.c (resolve_typespec_used): New method.
|
|
|
|
(resolve_fl_derived): Check type in respect to ABSTRACT attribute and
|
|
|
|
check that no component is of an ABSTRACT type.
|
|
|
|
(resolve_symbol): Check that no symbol is of an ABSTRACT type.
|
|
|
|
(resolve_types): Check IMPLICIT declarations for ABSTRACT types.
|
|
|
|
* symbol.c (gfc_merge_new_implicit): Remember loci of IMPLICIT's.
|
|
|
|
(gfc_add_abstract): New method.
|
|
|
|
|
2008-09-01 15:43:10 +02:00
|
|
|
2008-09-01 Daniel Kraft <d@domob.eu>
|
|
|
|
|
|
|
|
PR fortran/37193
|
|
|
|
* module.c (read_module): Initialize use_only flag on used symbols.
|
|
|
|
|
2008-09-01 12:55:50 +02:00
|
|
|
2008-09-01 Daniel Kraft <d@domob.eu>
|
|
|
|
|
|
|
|
* gfc-internals.texi (F2003 OOP), (Type-bound Procedures): New chapter
|
|
|
|
and section to document the internals of type-bound procedures.
|
|
|
|
(gfc_expr): Document EXPR_COMPCALL.
|
|
|
|
* gfortran.h (struct gfc_expr): Remove unused `derived' from compcall.
|
|
|
|
* dump-parse-tree.c (show_compcall): New method.
|
|
|
|
(show_expr): Call it for EXPR_COMPCALL.
|
|
|
|
(show_typebound), (show_f2k_derived): New methods.
|
|
|
|
(show_symbol): Call show_f2k_derived.
|
|
|
|
(show_code_node): Handle EXEC_COMPCALL.
|
|
|
|
* primary.c (gfc_match_varspec): Don't initialize removed `derived' in
|
|
|
|
primary->value.compcall.
|
|
|
|
|
2008-08-31 15:40:15 +02:00
|
|
|
2008-08-31 Richard Guenther <rguenther@suse.de>
|
|
|
|
|
|
|
|
* trans-expr.c (gfc_trans_string_copy): Use the correct types
|
|
|
|
to compute slen and dlen.
|
|
|
|
|
2008-08-31 12:00:30 +02:00
|
|
|
2008-08-31 Daniel Kraft <d@domob.eu>
|
|
|
|
|
|
|
|
* gfortran.h (enum gfc_statement): New entry `ST_GENERIC'.
|
|
|
|
(struct gfc_tbp_generic): New type.
|
|
|
|
(struct gfc_typebound_proc): Removed `target' and added union with
|
|
|
|
`specific' and `generic' members; new members `overridden',
|
|
|
|
`subroutine', `function' and `is_generic'.
|
|
|
|
(struct gfc_expr): New members `derived' and `name' in compcall union
|
|
|
|
member and changed type of `tbp' to gfc_typebound_proc.
|
|
|
|
(gfc_compare_interfaces), (gfc_compare_actual_formal): Made public.
|
|
|
|
* match.h (gfc_typebound_default_access): New global.
|
|
|
|
(gfc_match_generic): New method.
|
|
|
|
* decl.c (gfc_match_generic): New method.
|
|
|
|
(match_binding_attributes): New argument `generic' and handle it.
|
|
|
|
(match_procedure_in_type): Mark matched binding as non-generic.
|
|
|
|
* interface.c (gfc_compare_interfaces): Made public.
|
|
|
|
(gfc_compare_actual_formal): Ditto.
|
|
|
|
(check_interface_1), (compare_parameter): Use new public names.
|
|
|
|
(gfc_procedure_use), (gfc_search_interface): Ditto.
|
|
|
|
* match.c (match_typebound_call): Set base-symbol referenced.
|
|
|
|
* module.c (binding_generic): New global array.
|
|
|
|
(current_f2k_derived): New global.
|
|
|
|
(mio_typebound_proc): Handle IO of GENERIC bindings.
|
|
|
|
(mio_f2k_derived): Record current f2k-namespace in current_f2k_derived.
|
|
|
|
* parse.c (decode_statement): Handle GENERIC statement.
|
|
|
|
(gfc_ascii_statement): Ditto.
|
|
|
|
(typebound_default_access), (set_typebound_default_access): Removed.
|
|
|
|
(gfc_typebound_default_access): New global.
|
|
|
|
(parse_derived_contains): New default-access implementation and handle
|
|
|
|
GENERIC statements encountered.
|
|
|
|
* primary.c (gfc_match_varspec): Adapted to new gfc_typebound_proc
|
|
|
|
structure and removed check for SUBROUTINE/FUNCTION from here.
|
|
|
|
* resolve.c (extract_compcall_passed_object): New method.
|
|
|
|
(update_compcall_arglist): Use it.
|
|
|
|
(resolve_typebound_static): Adapted to new gfc_typebound_proc structure.
|
|
|
|
(resolve_typebound_generic_call): New method.
|
|
|
|
(resolve_typebound_call): Check target is a SUBROUTINE and handle calls
|
|
|
|
to GENERIC bindings.
|
|
|
|
(resolve_compcall): Ditto (check for target being FUNCTION).
|
|
|
|
(check_typebound_override): Handle GENERIC bindings.
|
|
|
|
(check_generic_tbp_ambiguity), (resolve_typebound_generic): New methods.
|
|
|
|
(resolve_typebound_procedure): Handle GENERIC bindings and set new
|
|
|
|
attributes subroutine, function and overridden in gfc_typebound_proc.
|
|
|
|
(resolve_fl_derived): Ensure extended type is resolved before the
|
|
|
|
extending one is.
|
|
|
|
* st.c (gfc_free_statement): Fix bug with free'ing EXEC_COMPCALL's.
|
|
|
|
* symbol.c (gfc_find_typebound_proc): Adapt for GENERIC changes.
|
|
|
|
|
2008-08-29 23:32:41 +02:00
|
|
|
2008-08-29 Jan Hubicka <jh@suse.cz>
|
|
|
|
|
2008-08-30 12:38:55 +02:00
|
|
|
* parse.c (parse_interface): Silence uninitialized var warning.
|
2008-08-29 23:32:41 +02:00
|
|
|
|
re PR fortran/29635 (debug info of modules)
PR fortran/29635
PR fortran/23057
* debug.h (struct gcc_debug_hooks): Add NAME and CHILD
arguments to imported_module_or_decl.
(debug_nothing_tree_tree): Removed.
(debug_nothing_tree_tree_tree_bool): New prototype.
* debug.c (do_nothing_debug_hooks): Adjust.
(debug_nothing_tree_tree): Removed.
(debug_nothing_tree_tree_tree_bool): New function.
* dwarf2out.c (is_symbol_die): Handle DW_TAG_module.
(gen_variable_die): Put all common vars for the
same COMMON block under one DW_TAG_common_block.
(declare_in_namespace): Return new context_die, for Fortran
return the module DIE instead of adding extra declarations into
the namespace.
(gen_type_die_with_usage): Adjust declare_in_namespace caller.
(gen_namespace_die): If is_fortran (), generate DW_TAG_module
instead of DW_TAG_namespace. If DECL_EXTERNAL is set, add
DW_AT_declaration.
(dwarf2out_global_decl): Don't skip Fortran global vars.
(gen_decl_die): Likewise. Adjust declare_in_namespace callers.
(dwarf2out_imported_module_or_decl): Add NAME and CHILD arguments.
If NAME is non-NULL, add DW_AT_name. If CHILD is non-NULL, put
DW_TAG_imported_declaration as child of previous
DW_TAG_imported_module.
* dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Adjust.
* sdbout.c (sdb_debug_hooks): Likewise.
* vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
* name-lookup.c (do_using_directive, cp_emit_debug_info_for_using):
Adjust debug_hooks->imported_module_or_decl callers.
* f95-lang.c (gfc_init_ts): New function.
(LANG_HOOKS_INIT_TS): Define.
* gfortran.h (gfc_use_rename): New type, moved from module.c.
(gfc_get_use_rename): New macro, moved from module.c.
(gfc_use_list): New type.
(gfc_get_use_list): New macro.
(gfc_namespace): Add use_stmts field.
(gfc_free_use_stmts): New prototype.
* Make-lang.in (fortran/trans-decl.o): Depend on debug.h.
* module.c (gfc_use_rename, gfc_get_use_rename): Moved to
gfortran.h.
(gfc_use_module): Chain the USE statement info to
ns->use_stmts.
(gfc_free_use_stmts): New function.
* symbol.c (gfc_free_namespace): Call gfc_free_use_stmts.
* trans.h (struct module_htab_entry): New type.
(gfc_find_module, gfc_module_add_decl): New functions.
* trans.c (gfc_generate_module_code): Create NAMESPACE_DECL for
the module, adjust DECL_CONTEXTs of module procedures and
call gfc_module_add_decl for them.
* trans-common.c (build_common_decl): Set DECL_IGNORED_P
on the common variable.
(create_common): Set DECL_IGNORED_P for use associated vars.
* trans-decl.c: Include debug.h.
(gfc_get_symbol_decl): Set DECL_IGNORED_P on use_assoc vars from
modules.
(build_function_decl): Allow current_function_decl's context
to be a NAMESPACE_DECL.
(module_htab, cur_module): New variables.
(module_htab_do_hash, module_htab_eq, module_htab_decls_hash,
module_htab_decls_eq, gfc_find_module, gfc_module_add_decl): New
functions.
(gfc_create_module_variable): Adjust DECL_CONTEXTs of module
variables and types and call gfc_module_add_decl for them.
(gfc_generate_module_vars): Temporarily set cur_module.
(gfc_trans_use_stmts): New function.
(gfc_generate_function_code): Call it.
(gfc_generate_block_data): Set DECL_IGNORED_P on decl.
* trans-types.c (gfc_get_derived_type): Adjust DECL_CONTEXT
and TYPE_CONTEXT of module derived types.
From-SVN: r139773
2008-08-29 20:41:19 +02:00
|
|
|
2008-08-29 Jakub Jelinek <jakub@redhat.com>
|
|
|
|
|
2008-08-29 20:53:33 +02:00
|
|
|
* trans.h (struct lang_type): Add span.
|
|
|
|
(GFC_TYPE_ARRAY_SPAN): Define.
|
|
|
|
* trans-decl.c (gfc_get_symbol_decl): For subref array pointers,
|
|
|
|
copy TREE_STATIC from decl to span instead of setting it
|
|
|
|
unconditionally, set DECL_ARTIFICIAL, fix type of initializer
|
|
|
|
and set GFC_TYPE_ARRAY_SPAN on decl's type.
|
|
|
|
* trans-types.c (gfc_get_array_descr_info): If
|
|
|
|
GFC_TYPE_ARRAY_SPAN is non-NULL, use it as element size.
|
|
|
|
|
2008-08-29 20:52:22 +02:00
|
|
|
* trans-decl.c (check_constant_initializer,
|
|
|
|
gfc_emit_parameter_debug_info): New functions.
|
|
|
|
(gfc_generate_module_vars, gfc_generate_function_code): Emit
|
|
|
|
PARAMETERs and unreferenced variables with initializers into
|
|
|
|
debug info.
|
|
|
|
|
2008-08-29 20:50:30 +02:00
|
|
|
* gfortran.h (gfc_use_list): Add where field.
|
|
|
|
* module.c (use_locus): New static variable.
|
|
|
|
(gfc_match_use): Set it.
|
|
|
|
(gfc_use_module): Copy it to gfc_use_list's where field.
|
|
|
|
* trans-decl.c (gfc_generate_module_vars): Call gfc_trans_use_stmts.
|
|
|
|
(gfc_trans_use_stmts): Set backend locus before calling the debug
|
|
|
|
hook. Allow non-VAR_DECLs to be created even for non-external
|
|
|
|
module. Don't emit anything so far for renames from different
|
|
|
|
modules.
|
|
|
|
|
2008-08-29 20:47:19 +02:00
|
|
|
PR fortran/24790
|
|
|
|
* trans-decl.c (create_function_arglist): Set DECL_BY_REFERENCE on
|
|
|
|
PARM_DECLs with pointer or reference type.
|
|
|
|
|
2008-08-29 20:43:57 +02:00
|
|
|
* trans-decl.c (gfc_build_qualified_array): Build non-flat
|
|
|
|
array type for debug info purposes.
|
|
|
|
|
re PR fortran/29635 (debug info of modules)
PR fortran/29635
PR fortran/23057
* debug.h (struct gcc_debug_hooks): Add NAME and CHILD
arguments to imported_module_or_decl.
(debug_nothing_tree_tree): Removed.
(debug_nothing_tree_tree_tree_bool): New prototype.
* debug.c (do_nothing_debug_hooks): Adjust.
(debug_nothing_tree_tree): Removed.
(debug_nothing_tree_tree_tree_bool): New function.
* dwarf2out.c (is_symbol_die): Handle DW_TAG_module.
(gen_variable_die): Put all common vars for the
same COMMON block under one DW_TAG_common_block.
(declare_in_namespace): Return new context_die, for Fortran
return the module DIE instead of adding extra declarations into
the namespace.
(gen_type_die_with_usage): Adjust declare_in_namespace caller.
(gen_namespace_die): If is_fortran (), generate DW_TAG_module
instead of DW_TAG_namespace. If DECL_EXTERNAL is set, add
DW_AT_declaration.
(dwarf2out_global_decl): Don't skip Fortran global vars.
(gen_decl_die): Likewise. Adjust declare_in_namespace callers.
(dwarf2out_imported_module_or_decl): Add NAME and CHILD arguments.
If NAME is non-NULL, add DW_AT_name. If CHILD is non-NULL, put
DW_TAG_imported_declaration as child of previous
DW_TAG_imported_module.
* dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Adjust.
* sdbout.c (sdb_debug_hooks): Likewise.
* vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
* name-lookup.c (do_using_directive, cp_emit_debug_info_for_using):
Adjust debug_hooks->imported_module_or_decl callers.
* f95-lang.c (gfc_init_ts): New function.
(LANG_HOOKS_INIT_TS): Define.
* gfortran.h (gfc_use_rename): New type, moved from module.c.
(gfc_get_use_rename): New macro, moved from module.c.
(gfc_use_list): New type.
(gfc_get_use_list): New macro.
(gfc_namespace): Add use_stmts field.
(gfc_free_use_stmts): New prototype.
* Make-lang.in (fortran/trans-decl.o): Depend on debug.h.
* module.c (gfc_use_rename, gfc_get_use_rename): Moved to
gfortran.h.
(gfc_use_module): Chain the USE statement info to
ns->use_stmts.
(gfc_free_use_stmts): New function.
* symbol.c (gfc_free_namespace): Call gfc_free_use_stmts.
* trans.h (struct module_htab_entry): New type.
(gfc_find_module, gfc_module_add_decl): New functions.
* trans.c (gfc_generate_module_code): Create NAMESPACE_DECL for
the module, adjust DECL_CONTEXTs of module procedures and
call gfc_module_add_decl for them.
* trans-common.c (build_common_decl): Set DECL_IGNORED_P
on the common variable.
(create_common): Set DECL_IGNORED_P for use associated vars.
* trans-decl.c: Include debug.h.
(gfc_get_symbol_decl): Set DECL_IGNORED_P on use_assoc vars from
modules.
(build_function_decl): Allow current_function_decl's context
to be a NAMESPACE_DECL.
(module_htab, cur_module): New variables.
(module_htab_do_hash, module_htab_eq, module_htab_decls_hash,
module_htab_decls_eq, gfc_find_module, gfc_module_add_decl): New
functions.
(gfc_create_module_variable): Adjust DECL_CONTEXTs of module
variables and types and call gfc_module_add_decl for them.
(gfc_generate_module_vars): Temporarily set cur_module.
(gfc_trans_use_stmts): New function.
(gfc_generate_function_code): Call it.
(gfc_generate_block_data): Set DECL_IGNORED_P on decl.
* trans-types.c (gfc_get_derived_type): Adjust DECL_CONTEXT
and TYPE_CONTEXT of module derived types.
From-SVN: r139773
2008-08-29 20:41:19 +02:00
|
|
|
PR fortran/29635
|
|
|
|
PR fortran/23057
|
|
|
|
* f95-lang.c (gfc_init_ts): New function.
|
|
|
|
(LANG_HOOKS_INIT_TS): Define.
|
|
|
|
* gfortran.h (gfc_use_rename): New type, moved from module.c.
|
|
|
|
(gfc_get_use_rename): New macro, moved from module.c.
|
|
|
|
(gfc_use_list): New type.
|
|
|
|
(gfc_get_use_list): New macro.
|
|
|
|
(gfc_namespace): Add use_stmts field.
|
|
|
|
(gfc_free_use_stmts): New prototype.
|
|
|
|
* Make-lang.in (fortran/trans-decl.o): Depend on debug.h.
|
|
|
|
* module.c (gfc_use_rename, gfc_get_use_rename): Moved to
|
|
|
|
gfortran.h.
|
|
|
|
(gfc_use_module): Chain the USE statement info to
|
|
|
|
ns->use_stmts.
|
|
|
|
(gfc_free_use_stmts): New function.
|
|
|
|
* symbol.c (gfc_free_namespace): Call gfc_free_use_stmts.
|
|
|
|
* trans.h (struct module_htab_entry): New type.
|
|
|
|
(gfc_find_module, gfc_module_add_decl): New functions.
|
|
|
|
* trans.c (gfc_generate_module_code): Create NAMESPACE_DECL for
|
|
|
|
the module, adjust DECL_CONTEXTs of module procedures and
|
|
|
|
call gfc_module_add_decl for them.
|
|
|
|
* trans-common.c (build_common_decl): Set DECL_IGNORED_P
|
|
|
|
on the common variable.
|
|
|
|
(create_common): Set DECL_IGNORED_P for use associated vars.
|
|
|
|
* trans-decl.c: Include debug.h.
|
|
|
|
(gfc_get_symbol_decl): Set DECL_IGNORED_P on use_assoc vars from
|
|
|
|
modules.
|
|
|
|
(build_function_decl): Allow current_function_decl's context
|
|
|
|
to be a NAMESPACE_DECL.
|
|
|
|
(module_htab, cur_module): New variables.
|
|
|
|
(module_htab_do_hash, module_htab_eq, module_htab_decls_hash,
|
|
|
|
module_htab_decls_eq, gfc_find_module, gfc_module_add_decl): New
|
|
|
|
functions.
|
|
|
|
(gfc_create_module_variable): Adjust DECL_CONTEXTs of module
|
|
|
|
variables and types and call gfc_module_add_decl for them.
|
|
|
|
(gfc_generate_module_vars): Temporarily set cur_module.
|
|
|
|
(gfc_trans_use_stmts): New function.
|
|
|
|
(gfc_generate_function_code): Call it.
|
|
|
|
(gfc_generate_block_data): Set DECL_IGNORED_P on decl.
|
|
|
|
* trans-types.c (gfc_get_derived_type): Adjust DECL_CONTEXT
|
|
|
|
and TYPE_CONTEXT of module derived types.
|
|
|
|
|
2008-08-28 20:03:02 +02:00
|
|
|
2008-08-28 Daniel Kraft <d@domob.eu>
|
|
|
|
|
|
|
|
* gfortran.h (enum expr_t): New value `EXPR_COMPCALL'.
|
|
|
|
(gfc_get_typebound_proc): New macro.
|
|
|
|
(struct gfc_expr): New union-member `compcall' for EXPR_COMPCALL.
|
|
|
|
(enum gfc_exec_op): New value `EXEC_COMPCALL'.
|
|
|
|
(gfc_find_typebound_proc): New argument.
|
|
|
|
(gfc_copy_ref), (gfc_match_varspec): Made public.
|
|
|
|
* decl.c (match_procedure_in_type): Use gfc_get_typebound_proc.
|
|
|
|
* expr.c (free_expr0), (gfc_copy_expr): Handle EXPR_COMPCALL.
|
|
|
|
(gfc_copy_ref): Made public and use new name.
|
|
|
|
(simplify_const_ref): Use new name of gfc_copy_ref.
|
|
|
|
(simplify_parameter_variable): Ditto.
|
|
|
|
(gfc_simplify_expr): gcc_unreachable for EXPR_COMPCALL.
|
|
|
|
* match.c (match_typebound_call): New method.
|
|
|
|
(gfc_match_call): Allow for CALL's to typebound procedures.
|
|
|
|
* module.c (binding_passing), (binding_overriding): New variables.
|
|
|
|
(expr_types): Add EXPR_COMPCALL.
|
|
|
|
(mio_expr): gcc_unreachable for EXPR_COMPCALL.
|
|
|
|
(mio_typebound_proc), (mio_typebound_symtree): New methods.
|
|
|
|
(mio_f2k_derived): Handle type-bound procedures.
|
|
|
|
* primary.c (gfc_match_varspec): Made public and parse trailing
|
|
|
|
references to type-bound procedures; new argument `sub_flag'.
|
|
|
|
(gfc_match_rvalue): New name and argument of gfc_match_varspec.
|
|
|
|
(match_variable): Ditto.
|
|
|
|
* resolve.c (update_arglist_pass): New method.
|
|
|
|
(update_compcall_arglist), (resolve_typebound_static): New methods.
|
|
|
|
(resolve_typebound_call), (resolve_compcall): New methods.
|
|
|
|
(gfc_resolve_expr): Handle EXPR_COMPCALL.
|
|
|
|
(resolve_code): Handle EXEC_COMPCALL.
|
|
|
|
(resolve_fl_derived): New argument to gfc_find_typebound_proc.
|
|
|
|
(resolve_typebound_procedure): Ditto and removed not-implemented error.
|
|
|
|
* st.c (gfc_free_statement): Handle EXEC_COMPCALL.
|
|
|
|
* symbol.c (gfc_find_typebound_proc): New argument `noaccess' and
|
|
|
|
implement access-checking.
|
|
|
|
* trans-expr.c (gfc_apply_interface_mapping_to_expr): gcc_unreachable
|
|
|
|
on EXPR_COMPCALL.
|
|
|
|
* trans-intrinsic.c (gfc_conv_intrinsic_bound): Add missing break.
|
|
|
|
* trans-openmp.c (gfc_trans_omp_array_reduction): Add missing
|
|
|
|
intialization of ref->type.
|
|
|
|
|
2008-08-28 17:10:50 +02:00
|
|
|
2008-08-28 Janus Weil <janus@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/37253
|
|
|
|
* module.c (ab_attribute,attr_bits,mio_symbol_attribute): Take care of
|
|
|
|
saving attr.procedure and attr.proc_ptr to the module file.
|
|
|
|
|
2008-08-25 19:58:53 +02:00
|
|
|
2008-08-25 Daniel Kraft <d@domob.eu>
|
|
|
|
|
|
|
|
* gfortran.h (gfc_find_component): Add new arguments.
|
|
|
|
* parse.c (parse_derived_contains): Check if the derived-type containing
|
|
|
|
the CONTAINS section is SEQUENCE/BIND(C).
|
|
|
|
* resolve.c (resolve_typebound_procedure): Check for name collision with
|
|
|
|
components.
|
|
|
|
(resolve_fl_derived): Check for name collision with inherited
|
|
|
|
type-bound procedures.
|
|
|
|
* symbol.c (gfc_find_component): New arguments `noaccess' and `silent'.
|
|
|
|
(gfc_add_component): Adapt for new arguments.
|
|
|
|
* primary.c (match_varspec), (gfc_match_structure_constructor): Ditto.
|
|
|
|
|
2008-08-24 22:31:09 +02:00
|
|
|
2008-08-24 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
PR fortran/37201
|
|
|
|
* decl.c (verify_bind_c_sym): Reject array/string returning
|
|
|
|
functions.
|
|
|
|
|
2008-08-24 19:16:46 +02:00
|
|
|
2008-08-24 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
PR fortran/37201
|
|
|
|
* trans-expr.c (gfc_conv_function_call): Add string_length
|
|
|
|
for character-returning bind(C) functions.
|
|
|
|
|
2008-08-24 18:15:27 +02:00
|
|
|
2008-08-24 Daniel Kraft <d@domob.eu>
|
|
|
|
|
|
|
|
* gfortran.h (gfc_typebound_proc): New struct.
|
|
|
|
(gfc_symtree): New member typebound.
|
|
|
|
(gfc_find_typebound_proc): Prototype for new method.
|
|
|
|
(gfc_get_derived_super_type): Prototype for new method.
|
|
|
|
* parse.h (gfc_compile_state): New state COMP_DERIVED_CONTAINS.
|
|
|
|
* decl.c (gfc_match_procedure): Handle PROCEDURE inside derived-type
|
|
|
|
CONTAINS section.
|
|
|
|
(gfc_match_end): Handle new context COMP_DERIVED_CONTAINS.
|
|
|
|
(gfc_match_private): Ditto.
|
|
|
|
(match_binding_attributes), (match_procedure_in_type): New methods.
|
|
|
|
(gfc_match_final_decl): Rewrote to make use of new
|
|
|
|
COMP_DERIVED_CONTAINS parser state.
|
|
|
|
* parse.c (typebound_default_access): New global helper variable.
|
|
|
|
(set_typebound_default_access): New callback method.
|
|
|
|
(parse_derived_contains): New method.
|
|
|
|
(parse_derived): Extracted handling of CONTAINS to new parser state
|
|
|
|
and parse_derived_contains.
|
|
|
|
* resolve.c (resolve_bindings_derived), (resolve_bindings_result): New.
|
|
|
|
(check_typebound_override), (resolve_typebound_procedure): New methods.
|
|
|
|
(resolve_typebound_procedures): New method.
|
|
|
|
(resolve_fl_derived): Call new resolving method for typebound procs.
|
|
|
|
* symbol.c (gfc_new_symtree): Initialize new member typebound to NULL.
|
|
|
|
(gfc_find_typebound_proc): New method.
|
|
|
|
(gfc_get_derived_super_type): New method.
|
|
|
|
|
gfortran.h (gfc_component): Add field "symbol_attribute attr"...
2008-08-23 Janus Weil <janus@gcc.gnu.org>
* gfortran.h (gfc_component): Add field "symbol_attribute attr", remove
fields "pointer", "allocatable", "dimension", "access".
Remove functions "gfc_set_component_attr" and "gfc_get_component_attr".
* interface.c (gfc_compare_derived_types): Ditto.
* trans-array.c (gfc_array_allocate,structure_alloc_comps): Ditto.
* trans-expr.c (gfc_conv_component_ref,gfc_trans_subcomponent_assign,
gfc_conv_structure): Ditto.
* symbol.c (gfc_find_component,free_components,gfc_set_component_attr,
gfc_get_component_attr,verify_bind_c_derived_type,
generate_isocbinding_symbol): Ditto.
* decl.c (build_struct): Ditto.
* dump-parse-tree.c (show_components): Ditto.
* trans-stmt.c (gfc_trans_deallocate): Ditto.
* expr.c (gfc_check_assign,gfc_check_pointer_assign,
gfc_default_initializer): Ditto.
* module.c (mio_component): Ditto.
* trans-types.c (copy_dt_decls_ifequal,gfc_get_derived_type): Ditto.
* resolve.c (has_default_initializer,resolve_structure_cons,
gfc_iso_c_func_interface,find_array_spec,resolve_ref,
resolve_deallocate_expr,resolve_allocate_expr,resolve_fl_derived,
resolve_equivalence_derived): Ditto.
* trans-io.c (transfer_expr): Ditto.
* parse.c (parse_derived): Ditto.
* dependency.c (gfc_check_dependency): Ditto.
* primary.c (gfc_variable_attr): Ditto.
From-SVN: r139524
2008-08-23 23:04:01 +02:00
|
|
|
2008-08-23 Janus Weil <janus@gcc.gnu.org>
|
|
|
|
|
|
|
|
* gfortran.h (gfc_component): Add field "symbol_attribute attr", remove
|
|
|
|
fields "pointer", "allocatable", "dimension", "access".
|
|
|
|
Remove functions "gfc_set_component_attr" and "gfc_get_component_attr".
|
|
|
|
* interface.c (gfc_compare_derived_types): Ditto.
|
|
|
|
* trans-array.c (gfc_array_allocate,structure_alloc_comps): Ditto.
|
|
|
|
* trans-expr.c (gfc_conv_component_ref,gfc_trans_subcomponent_assign,
|
|
|
|
gfc_conv_structure): Ditto.
|
|
|
|
* symbol.c (gfc_find_component,free_components,gfc_set_component_attr,
|
|
|
|
gfc_get_component_attr,verify_bind_c_derived_type,
|
|
|
|
generate_isocbinding_symbol): Ditto.
|
|
|
|
* decl.c (build_struct): Ditto.
|
|
|
|
* dump-parse-tree.c (show_components): Ditto.
|
|
|
|
* trans-stmt.c (gfc_trans_deallocate): Ditto.
|
|
|
|
* expr.c (gfc_check_assign,gfc_check_pointer_assign,
|
|
|
|
gfc_default_initializer): Ditto.
|
|
|
|
* module.c (mio_component): Ditto.
|
|
|
|
* trans-types.c (copy_dt_decls_ifequal,gfc_get_derived_type): Ditto.
|
|
|
|
* resolve.c (has_default_initializer,resolve_structure_cons,
|
|
|
|
gfc_iso_c_func_interface,find_array_spec,resolve_ref,
|
|
|
|
resolve_deallocate_expr,resolve_allocate_expr,resolve_fl_derived,
|
|
|
|
resolve_equivalence_derived): Ditto.
|
|
|
|
* trans-io.c (transfer_expr): Ditto.
|
|
|
|
* parse.c (parse_derived): Ditto.
|
|
|
|
* dependency.c (gfc_check_dependency): Ditto.
|
|
|
|
* primary.c (gfc_variable_attr): Ditto.
|
|
|
|
|
2008-08-23 20:49:43 +02:00
|
|
|
2008-08-23 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
PR fortran/37076
|
|
|
|
* arith.c (gfc_arith_concat): Fix concat of kind=4 strings.
|
|
|
|
|
2008-08-23 20:12:30 +02:00
|
|
|
2008-08-23 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
PR fortran/37025
|
|
|
|
* target-memory.c (gfc_interpret_character): Support
|
|
|
|
kind=4 characters.
|
|
|
|
|
2008-08-22 22:36:12 +02:00
|
|
|
2008-08-22 Daniel Kraft <d@domob.eu>
|
|
|
|
|
|
|
|
PR fortran/30239
|
|
|
|
* symbol.c (gfc_add_type): Warn on -Wsurprising if a function-result
|
|
|
|
type is re-declared but neither -pedantic nor -std=f* is given and so
|
|
|
|
this is no error.
|
|
|
|
* invoke.texi (-Wsurprising): Document this new behaviour.
|
|
|
|
|
2008-08-22 12:53:40 +02:00
|
|
|
2008-08-22 Daniel Kraft <d@domob.eu>
|
|
|
|
|
|
|
|
* gfortran.h (in_prefix): Removed from this header.
|
|
|
|
* match.h (gfc_matching_prefix): Moved and renamed from `in_prefix'.
|
|
|
|
* decl.c (in_prefix): Removed from here.
|
|
|
|
(gfc_match_prefix): Use new name of `gfc_matching_prefix'.
|
|
|
|
* symbol.c (gfc_check_symbol_typed): Ditto.
|
|
|
|
* expr.c (check_typed_ns): New helper variable.
|
|
|
|
(expr_check_typed_help): New helper method.
|
|
|
|
(gfc_expr_check_typed): Rewrote to use gfc_traverse_expr to do the
|
|
|
|
work, fixing a minor problem.
|
|
|
|
* match.c (gfc_matching_prefix): New variable.
|
|
|
|
|
2008-08-22 09:13:25 +02:00
|
|
|
2008-08-22 Daniel Kraft <d@domob.eu>
|
|
|
|
|
|
|
|
PR fortran/32095
|
|
|
|
PR fortran/34228
|
|
|
|
* gfortran.h (in_prefix): New global.
|
|
|
|
(gfc_check_symbol_typed), (gfc_check_expr_typed): New methods.
|
|
|
|
* array.c (match_array_element_spec): Check that bounds-expressions
|
|
|
|
don't have symbols not-yet-typed in them.
|
|
|
|
* decl.c (var_element): Check that variable used is already typed.
|
|
|
|
(char_len_param_value): Check that expression does not contain
|
|
|
|
not-yet-typed symbols.
|
|
|
|
(in_prefix): New global.
|
|
|
|
(gfc_match_prefix): Record using `in_prefix' if we're at the moment
|
|
|
|
parsing a prefix or not.
|
|
|
|
* expr.c (gfc_expr_check_typed): New method.
|
|
|
|
* parse.c (verify_st_order): New argument to disable error output.
|
|
|
|
(check_function_result_typed): New helper method.
|
|
|
|
(parse_spec): Check that the function-result declaration, if given in
|
|
|
|
a prefix, contains no not-yet-typed symbols when the IMPLICIT rules are
|
|
|
|
parsed.
|
|
|
|
* symbol.c (gfc_check_symbol_typed): Check that a symbol already has
|
|
|
|
a type associated to it, otherwise use the IMPLICIT rules or signal
|
|
|
|
an error.
|
|
|
|
|
2008-08-21 12:55:13 +02:00
|
|
|
2008-08-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
|
|
|
|
|
|
|
|
* f95-lang.c: Update all calls to pedwarn.
|
|
|
|
|
2008-08-18 22:46:08 +02:00
|
|
|
2008-08-18 Daniel Franke <franke.daniel@gmail.com>
|
|
|
|
|
|
|
|
PR fortran/37032
|
|
|
|
* gfortran.texi: Document decision on include file handling in
|
|
|
|
preprocessed files.
|
|
|
|
|
2008-08-16 17:53:14 +02:00
|
|
|
2008-08-16 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
PR fortran/36825
|
|
|
|
* libgfortran.h: Reduce GFC_MAX_DIMENSIONS to 7.
|
|
|
|
|
2008-08-16 05:36:32 +02:00
|
|
|
2008-08-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/35863
|
|
|
|
* io.c (gfc_match_open): Enable UTF-8 in checks.
|
|
|
|
* simplify.c (gfc_simplify_selected_char_kind): Enable iso_10646.
|
|
|
|
|
2008-08-14 23:15:59 +02:00
|
|
|
2008-08-14 Janus Weil <janus@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/36705
|
|
|
|
* symbol.c (check_conflict): Move conflict checks for (procedure,save)
|
|
|
|
and (procedure,intent) to resolve_fl_procedure.
|
|
|
|
* resolve.c (resolve_fl_procedure): Ditto.
|
|
|
|
|
re PR other/36901 (pedwarn() + -pedantic-errors + -w (inhibit_warnings) should not emit errors)
2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR 36901
* diagnostic.def (DK_PEDWARN, DK_PERMERROR): New.
* diagnostic.c (pedantic_warning_kind, permissive_error_kind):
Moved from diagnostic.h
(diagnostic_report_diagnostic): Return bool. Handle DK_PEDWARN and
DK_PERMERROR.
(emit_diagnostic): New.
(warning0, pedwarn0): Delete.
(warning, warning_at, pedwarn, permerror): Return bool.
* diagnostic.h (pedantic_warning_kind, permissive_error_kind):
Moved to diagnostic.c.
(struct diagnostic_context): Use correct type for
classify_diagnostic.
(diagnostic_report_diagnostic): Update declaration.
(emit_diagnostic): Declare.
* errors.c (warning): Return bool.
* errors.h (warning): Update declaration.
* toplev.h (warning0, pedwarn0): Delete.
(warning, warning_at, pedwarn, permerror): Return bool.
* c-errors.c (pedwarn_c99, pedwarn_c90): Use DK_PEDWARN.
* c-decl.c (locate_old_decl): Delete 'diag' argument. Always use
inform. Update all calls.
(diagnose_mismatched_decls): Check return value of warning/pedwarn
before giving informative note.
(implicit_decl_warning): Likewise.
* c-typeck.c (build_function_call): Likewise.
* tree-sssa.c (warn_uninit): Likewise.
* builtins.c (gimplify_va_arg_expr): Likewise.
fortran/
* f95-lang.c (gfc_mark_addressable): Use "pedwarn (0," instead of
'pedwarn0'.
cp/
* cp-tree.h (struct diagnostic_context, struct diagnostic_info):
Delete forward declarations. Check that toplev.h has not been
included before this file. Include toplev.h and diagnostic.h.
* error.c (cp_cpp_error): Use DK_PEDWARN.
(cxx_incomplete_type_diagnostic): Update declaration.
(cxx_incomplete_type_error): Use DK_ERROR.
* typeck2.c (cxx_incomplete_type_diagnostic): Take a diagnostic_t
as argument. Use emit_diagnostic.
(cxx_incomplete_type_error): Use DK_ERROR.
(add_exception_specifier): Use diagnostic_t instead of custom
codes.
* typeck.c (complete_type_or_else): Update call to
cxx_incomplete_type_diagnostic.
* init.c (build_delete): Likewise.
* call.c (diagnostic_fn_t): Remove unused typedef.
(build_temp): Pass a pointer to diagnostic_t.
(convert_like_real): Use emit_diagnostic.
(joust): Check return value of warning before giving informative
note.
* friend.c (do_friend): Check return value of warning
before giving informative note.
* parser.c (cp_parser_template_id): Likewise.
testsuite/
* gcc.dg/pr36901-1.c: New.
* gcc.dg/pr36901-3.c: New.
* gcc.dg/pr36901-2.c: New.
* gcc.dg/pr36901-4.c: New.
* gcc.dg/pr36901-system.h: New.
* gcc.dg/pr36901.h: New.
* gcc.target/powerpc/altivec-macros.c: Update.
* gcc.target/i386/regparm.c: Update.
* gcc.dg/funcdef-var-1.c: Update.
* gcc.dg/parm-mismatch-1.c: Update.
* gcc.dg/attr-noinline.c: Update.
* gcc.dg/wtr-static-1.c: Update.
* gcc.dg/redecl-11.c: Update.
* gcc.dg/pr27953.c: Update.
* gcc.dg/proto-1.c: Update.
* gcc.dg/decl-3.c: Update.
* gcc.dg/redecl-13.c: Update.
* gcc.dg/pr15360-1.c: Update.
* gcc.dg/redecl-15.c: Update.
* gcc.dg/enum-compat-1.c: Update.
* gcc.dg/dll-3.c: Update.
* gcc.dg/array-5.c: Update.
* gcc.dg/Wredundant-decls-2.c: Update.
* gcc.dg/inline4.c: Update.
* gcc.dg/redecl-2.c: Update.
* gcc.dg/inline-14.c: Update.
* gcc.dg/tls/diag-3.c: Update.
* gcc.dg/funcdef-var-2.c: Update.
* gcc.dg/20041213-1.c: Update.
* gcc.dg/old-style-then-proto-1.c: Update.
* gcc.dg/decl-2.c: Update.
* gcc.dg/redecl-12.c: Update.
* gcc.dg/decl-4.c: Update.
* gcc.dg/Wshadow-1.c: Update.
* gcc.dg/transparent-union-2.c: Update.
* gcc.dg/visibility-7.c: Update.
* gcc.dg/dll-2.c: Update.
* gcc.dg/redecl-16.c: Update.
* gcc.dg/inline1.c: Update.
* gcc.dg/decl-8.c: Update.
* gcc.dg/nested-redef-1.c: Update.
* gcc.dg/inline3.c: Update.
* gcc.dg/redecl-1.c: Update.
* gcc.dg/inline5.c: Update.
* gcc.dg/pr35899.c: Update.
* gcc.dg/noncompile/label-lineno-1.c: Update.
* gcc.dg/noncompile/label-1.c: Update.
* gcc.dg/noncompile/20020220-1.c: Update.
* gcc.dg/noncompile/redecl-1.c: Update.
* gcc.dg/redecl-5.c: Update.
* gcc.dg/qual-return-3.c: Update.
* gcc.dg/label-decl-4.c: Update.
From-SVN: r138893
2008-08-09 01:57:19 +02:00
|
|
|
2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR 36901
|
|
|
|
* f95-lang.c (gfc_mark_addressable): Use "pedwarn (0," instead of
|
|
|
|
'pedwarn0'.
|
|
|
|
|
2008-08-09 01:22:51 +02:00
|
|
|
2008-08-09 Paul Thomas <pault@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/37011
|
|
|
|
* symbol.c (gfc_add_extension): New function.
|
|
|
|
* decl.c (gfc_get_type_attr_spec): Call it.
|
|
|
|
(gfc_match_derived_decl): Set symbol extension attribute from
|
|
|
|
attr.extension.
|
|
|
|
* gfortran.h : Add prototype for gfc_add_extension.
|
|
|
|
|
2008-08-09 01:15:31 +02:00
|
|
|
2008-08-08 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR 28875
|
|
|
|
* options.c (set_Wall): Replace set_Wunused by warn_unused.
|
|
|
|
|
2008-08-08 20:19:46 +02:00
|
|
|
2008-08-08 Daniel Kraft <d@domob.eu>
|
|
|
|
|
|
|
|
* gfortran.h (gfc_finalizer): Replaced member `procedure' by two
|
|
|
|
new members `proc_sym' and `proc_tree' to store the symtree after
|
|
|
|
resolution.
|
|
|
|
(gfc_find_sym_in_symtree): Made public.
|
|
|
|
* decl.c (gfc_match_final_decl): Adapted for new member name.
|
|
|
|
* interface.c (gfc_find_sym_in_symtree): Made public.
|
|
|
|
(gfc_extend_expr), (gfc_extend_assign): Changed call accordingly.
|
|
|
|
* module.c (mio_finalizer), (mio_f2k_derived), (mio_full_f2k_derived):
|
|
|
|
New methods for module-file IO of f2k_derived.
|
|
|
|
(mio_symbol): Do IO of f2k_derived namespace.
|
|
|
|
* resolve.c (gfc_resolve_finalizers): Adapted for new member name and
|
|
|
|
finding the symtree for the symbol here.
|
|
|
|
* symbol.c (gfc_free_finalizer): Adapted for new members.
|
|
|
|
|
2008-07-30 07:28:53 +02:00
|
|
|
2008-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
|
|
|
|
|
|
|
* gfc-internals.texi: Update to GFDL 1.2. Do not list GPL as
|
|
|
|
Invariant Section.
|
|
|
|
* gfortran.texi: Likewise.
|
|
|
|
* intrinsic.texi: Do not list GPL as Invariant Section.
|
|
|
|
* invoke.texi: Likewise. Update copyright years.
|
|
|
|
|
2008-07-29 22:44:09 +02:00
|
|
|
2008-07-29 Paul Thomas <pault@gcc.gnu.org>
|
|
|
|
|
|
|
|
* trans-expr.c (conv_parent_component_references): New function
|
|
|
|
to build missing parent references.
|
|
|
|
(gfc_conv_variable): Call it
|
|
|
|
* symbol.c (gfc_add_component): Check that component name in a
|
|
|
|
derived type extension does not appear in parent.
|
|
|
|
(gfc_find_component): For a derived type extension, check if
|
|
|
|
the component appears in the parent derived type by calling
|
|
|
|
self. Separate errors for private components and private types.
|
|
|
|
* decl.c (match_data_constant): Add extra arg to call to
|
|
|
|
gfc_match_structure_constructor.
|
|
|
|
(check_extended_derived_type): New function to check that a
|
|
|
|
parent derived type exists and that it is OK for exension.
|
|
|
|
(gfc_get_type_attr_spec): Add extra argument 'name' and return
|
|
|
|
it if extends is specified.
|
|
|
|
(gfc_match_derived_decl): Match derived type extension and
|
|
|
|
build a first component of the parent derived type if OK. Add
|
|
|
|
the f2k namespace if not present.
|
|
|
|
* gfortran.h : Add the extension attribute.
|
|
|
|
* module.c : Handle attribute 'extension'.
|
|
|
|
* match.h : Modify prototypes for gfc_get_type_attr_spec and
|
|
|
|
gfc_match_structure_constructor.
|
|
|
|
* primary.c (build_actual_constructor): New function extracted
|
|
|
|
from gfc_match_structure_constructor and modified to call self
|
|
|
|
iteratively to build derived type extensions, when f2k named
|
|
|
|
components are used.
|
|
|
|
(gfc_match_structure_constructor): Do not throw error for too
|
|
|
|
many components if a parent type is being handled. Use
|
|
|
|
gfc_find_component to generate errors for non-existent or
|
|
|
|
private components. Iteratively call self for derived type
|
|
|
|
extensions so that parent constructor is built. If extension
|
|
|
|
and components left over, throw error.
|
|
|
|
(gfc_match_rvalue): Add extra arg to call to
|
|
|
|
gfc_match_structure_constructor.
|
|
|
|
|
|
|
|
* trans-array.c (gfc_conv_resolve_dependencies): If lhs and rhs
|
|
|
|
are the same symbol, aliassing does not matter.
|
|
|
|
|
2008-07-29 13:00:58 +02:00
|
|
|
2008-07-29 Jan Hubicka <jh@suse.cz>
|
|
|
|
|
|
|
|
* options.c (gfc_post_options): Do not set flag_no_inline.
|
|
|
|
|
2008-07-29 11:11:51 +02:00
|
|
|
2008-07-29 Daniel Kraft <d@domob.eu>
|
|
|
|
|
|
|
|
PR fortran/36403
|
|
|
|
* trans-intrinsic.c (conv_generic_with_optional_char_arg): New method
|
|
|
|
to append a string-length even if the string argument is missing, e.g.
|
|
|
|
for EOSHIFT.
|
|
|
|
(gfc_conv_intrinsic_function): Call the new method for EOSHIFT, PACK
|
|
|
|
and RESHAPE.
|
|
|
|
|
2008-07-29 02:45:52 +02:00
|
|
|
2008-07-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
|
|
|
|
|
|
|
* gfortran.h (try): Remove macro. Replace try with gfc_try
|
|
|
|
throughout.
|
|
|
|
* array.c: Likewise.
|
|
|
|
* check.c: Likewise.
|
|
|
|
* cpp.c: Likewise.
|
|
|
|
* cpp.h: Likewise.
|
|
|
|
* data.c: Likewise.
|
|
|
|
* data.h: Likewise.
|
|
|
|
* decl.c: Likewise.
|
|
|
|
* error.c: Likewise.
|
|
|
|
* expr.c: Likewise.
|
|
|
|
* interface.c: Likewise.
|
|
|
|
* intrinsic.c: Likewise.
|
|
|
|
* intrinsic.h: Likewise.
|
|
|
|
* io.c: Likewise.
|
|
|
|
* match.h: Likewise.
|
|
|
|
* parse.c: Likewise.
|
|
|
|
* parse.h: Likewise.
|
|
|
|
* resolve.c: Likewise.
|
|
|
|
* scanner.c: Likewise.
|
|
|
|
* simplify.c: Likewise.
|
|
|
|
* symbol.c: Likewise.
|
|
|
|
* trans-openmp.c: Likewise.
|
|
|
|
* trans-types.c: Likewise.
|
|
|
|
|
2008-07-28 18:02:51 +02:00
|
|
|
2008-07-28 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
* Make-lang.in: Remove -Wno-* from fortran-warn.
|
|
|
|
|
2008-07-28 16:33:56 +02:00
|
|
|
2008-07-28 Richard Guenther <rguenther@suse.de>
|
|
|
|
|
|
|
|
Merge from gimple-tuples-branch.
|
|
|
|
|
|
|
|
2008-07-18 Aldy Hernandez <aldyh@redhat.com>
|
|
|
|
|
|
|
|
* trans-expr.c: Include gimple.h instead of tree-gimple.h.
|
|
|
|
* trans-array.c: Same.
|
|
|
|
* trans-openmp.c: Same.
|
|
|
|
* trans-stmt.c: Same.
|
|
|
|
* f95-lang.c: Same.
|
|
|
|
* trans-io.c: Same.
|
|
|
|
* trans-decl.c: Same.
|
|
|
|
* trans-intrinsic.c: Same.
|
|
|
|
* trans.c: Same. Include tree-iterator.h.
|
|
|
|
* Make-lang.in (trans.o): Depend on tree-iterator.h
|
|
|
|
|
|
|
|
2008-07-14 Aldy Hernandez <aldyh@redhat.com>
|
|
|
|
|
|
|
|
* trans-array.h (gfc_conv_descriptor_data_set_internal):
|
|
|
|
Rename to gfc_conv_descriptor_data_set.
|
|
|
|
(gfc_conv_descriptor_data_set_tuples): Remove.
|
|
|
|
* trans-array.c (gfc_conv_descriptor_data_get): Rename
|
|
|
|
from gfc_conv_descriptor_data_set_internal.
|
|
|
|
Remove last argument to gfc_add_modify.
|
|
|
|
(gfc_trans_allocate_array_storage): Rename gfc_add_modify_expr to
|
|
|
|
gfc_add_modify.
|
|
|
|
(gfc_trans_create_temp_array): Same.
|
|
|
|
(gfc_conv_array_transpose): Same.
|
|
|
|
(gfc_grow_array): Same.
|
|
|
|
(gfc_put_offset_into_var): Same.
|
|
|
|
(gfc_trans_array_ctor_element): Same.
|
|
|
|
(gfc_trans_array_constructor_subarray): Same.
|
|
|
|
(gfc_trans_array_constructor_value): Same.
|
|
|
|
(gfc_trans_scalarized_loop_end): Same.
|
|
|
|
(gfc_array_init_size): Same.
|
|
|
|
(gfc_array_allocate): Same.
|
|
|
|
(gfc_trans_array_bounds): Same.
|
|
|
|
(gfc_trans_auto_array_allocation): Same.
|
|
|
|
(gfc_trans_g77_array): Same.
|
|
|
|
(gfc_trans_dummy_array_bias): Same.
|
|
|
|
(gfc_conv_expr_descriptor): Same.
|
|
|
|
(structure_alloc_comps): Same.
|
|
|
|
* trans-expr.c: Same.
|
|
|
|
* trans-openmp.c (gfc_omp_clause_default_ctor): Same.
|
|
|
|
Rename gfc_conv_descriptor_data_set_tuples to
|
|
|
|
gfc_conv_descriptor_data_set.
|
|
|
|
(gfc_omp_clause_copy_ctor): Change build_gimple_modify_stmt to
|
|
|
|
build2_v.
|
|
|
|
(gfc_omp_clause_assign_op): Same.
|
|
|
|
(gfc_trans_omp_array_reduction): Rename gfc_add_modify_expr to
|
|
|
|
gfc_add_modify.
|
|
|
|
(gfc_trans_omp_atomic): Same.
|
|
|
|
(gfc_trans_omp_do): Same. Change GIMPLE_MODIFY_STMT to MODIFY_EXPR.
|
|
|
|
Rename gfc_add_modify_stmt to gfc_add_modify.
|
|
|
|
* trans-stmt.c: Rename gfc_add_modify_expr to
|
|
|
|
gfc_add_modify.
|
|
|
|
* trans.c: Rename gfc_add_modify_expr to
|
|
|
|
gfc_add_modify.
|
|
|
|
(gfc_add_modify): Remove last argument.
|
|
|
|
Rename GIMPLE_MODIFY_STMT to MODIFY_EXPR.
|
|
|
|
* trans.h: Remove gfc_add_modify_expr, gfc_add_modify_stmt.
|
|
|
|
Add prototype for gfc_add_modify.
|
|
|
|
* f95-lang.c (union lang_tree_node): Rename GENERIC_NEXT to TREE_CHAIN.
|
|
|
|
* trans-decl.c: Rename gfc_add_modify_stmt to gfc_add_modify.
|
|
|
|
* trans-io.c: Same.
|
|
|
|
* trans-intrinsic.c: Same.
|
|
|
|
|
|
|
|
2008-02-25 Aldy Hernandez <aldyh@redhat.com>
|
|
|
|
|
|
|
|
* Make-lang.in (fortran-warn): Add -Wno-format.
|
|
|
|
|
|
|
|
2008-02-19 Diego Novillo <dnovillo@google.com>
|
|
|
|
|
|
|
|
http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
|
|
|
|
|
|
|
|
* fortran/Make-lang.in (fortran-warn): Remove.
|
|
|
|
|
|
|
|
2007-11-22 Aldy Hernandez <aldyh@redhat.com>
|
|
|
|
|
|
|
|
* trans-expr.c (gfc_trans_string_copy): Use "void *" when building a
|
|
|
|
memset.
|
|
|
|
|
|
|
|
2007-11-10 Aldy Hernandez <aldyh@redhat.com>
|
|
|
|
|
|
|
|
* Make-lang.in (fortran-warn): Set to -Wno-format.
|
|
|
|
* trans.c (gfc_trans_code): Update comment to say GENERIC.
|
|
|
|
Call tree_annotate_all_with_locus instead of annotate_all_with_locus.
|
|
|
|
|
re PR fortran/36132 (_gfortran_internal_pack on optional arguments)
2008-07-27 Tobias Burnus <burnus@net-b.de>
PR fortran/36132
PR fortran/29952
PR fortran/36909
* trans.c (gfc_trans_runtime_check): Allow run-time warning
* besides
run-time error.
* trans.h (gfc_trans_runtime_check): Update declaration.
* trans-array.c
* (gfc_trans_array_ctor_element,gfc_trans_array_bound_check,
gfc_conv_array_ref,gfc_conv_ss_startstride,gfc_trans_dummy_array_bias):
Updated gfc_trans_runtime_check calls.
(gfc_conv_array_parameter): Implement flag_check_array_temporaries,
fix packing/unpacking for nonpresent optional actuals to optional
formals.
* trans-array.h (gfc_conv_array_parameter): Update declaration.
* trans-expr.c (gfc_conv_substring,gfc_trans_arrayfunc_assign,
gfc_conv_function_call): Updated gfc_trans_runtime_check calls.
(gfc_conv_function_call): Update gfc_conv_array_parameter calls.
* trans-expr.c (gfc_trans_goto): Updated gfc_trans_runtime_check
calls.
* trans-io.c (set_string,gfc_conv_intrinsic_repeat): Ditto.
(gfc_conv_intrinsic_transfer,gfc_conv_intrinsic_loc): Same for
gfc_conv_array_parameter.
* trans-intrinsics.c (gfc_conv_intrinsic_bound): Ditto.
* trans-decl.c (gfc_build_builtin_function_decls): Add
gfor_fndecl_runtime_warning_at.
* lang.opt: New option fcheck-array-temporaries.
* gfortran.h (gfc_options): New flag_check_array_temporaries.
* options.c (gfc_init_options, gfc_handle_option): Handle flag.
* invoke.texi: New option fcheck-array-temporaries.
2008-07-27 Tobias Burnus <burnus@net-b.de>
PR fortran/36132
PR fortran/29952
PR fortran/36909
* runtime/error.c: New function runtime_error_at.
* gfortran.map: Ditto.
* libgfortran.h: Ditto.
2008-07-27 Tobias Burnus <burnus@net-b.de>
PR fortran/36132
PR fortran/29952
PR fortran/36909
gfortran.dg/internal_pack_4.f90: New.
gfortran.dg/internal_pack_5.f90: New.
gfortran.dg/array_temporaries_2.f90: New.
From-SVN: r138186
2008-07-27 12:45:44 +02:00
|
|
|
2008-07-27 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
PR fortran/36132
|
|
|
|
PR fortran/29952
|
|
|
|
PR fortran/36909
|
|
|
|
* trans.c (gfc_trans_runtime_check): Allow run-time warning besides
|
|
|
|
run-time error.
|
|
|
|
* trans.h (gfc_trans_runtime_check): Update declaration.
|
|
|
|
* trans-array.c (gfc_trans_array_ctor_element,gfc_trans_array_bound_check,
|
|
|
|
gfc_conv_array_ref,gfc_conv_ss_startstride,gfc_trans_dummy_array_bias):
|
|
|
|
Updated gfc_trans_runtime_check calls.
|
|
|
|
(gfc_conv_array_parameter): Implement flag_check_array_temporaries,
|
|
|
|
fix packing/unpacking for nonpresent optional actuals to optional
|
|
|
|
formals.
|
|
|
|
* trans-array.h (gfc_conv_array_parameter): Update declaration.
|
|
|
|
* trans-expr.c (gfc_conv_substring,gfc_trans_arrayfunc_assign,
|
|
|
|
gfc_conv_function_call): Updated gfc_trans_runtime_check calls.
|
|
|
|
(gfc_conv_function_call): Update gfc_conv_array_parameter calls.
|
|
|
|
* trans-expr.c (gfc_trans_goto): Updated gfc_trans_runtime_check
|
|
|
|
calls.
|
|
|
|
* trans-io.c (set_string,gfc_conv_intrinsic_repeat): Ditto.
|
|
|
|
(gfc_conv_intrinsic_transfer,gfc_conv_intrinsic_loc): Same for
|
|
|
|
gfc_conv_array_parameter.
|
|
|
|
* trans-intrinsics.c (gfc_conv_intrinsic_bound): Ditto.
|
|
|
|
* trans-decl.c (gfc_build_builtin_function_decls): Add
|
|
|
|
gfor_fndecl_runtime_warning_at.
|
|
|
|
* lang.opt: New option fcheck-array-temporaries.
|
|
|
|
* gfortran.h (gfc_options): New flag_check_array_temporaries.
|
|
|
|
* options.c (gfc_init_options, gfc_handle_option): Handle flag.
|
|
|
|
* invoke.texi: New option fcheck-array-temporaries.
|
|
|
|
|
2008-07-25 15:11:32 +02:00
|
|
|
2008-07-24 Jan Hubicka <jh@suse.cz>
|
|
|
|
|
|
|
|
* fortran/options.c (gfc_post_options): Remove flag_unline_trees code.
|
|
|
|
|
2008-07-24 20:52:51 +02:00
|
|
|
2008-07-24 Daniel Kraft <d@domob.eu>
|
|
|
|
|
|
|
|
PR fortran/33141
|
|
|
|
* lang.opt (Wnonstd-intrinsics): Removed option.
|
|
|
|
(Wintrinsics-std), (Wintrinsic-shadow): New options.
|
|
|
|
* invoke.texi (Option Summary): Removed -Wnonstd-intrinsics
|
|
|
|
from the list and added -Wintrinsics-std and -Wintrinsic-shadow.
|
|
|
|
(Error and Warning Options): Documented the new options and removed
|
|
|
|
the documentation for -Wnonstd-intrinsics.
|
|
|
|
* gfortran.h (gfc_option_t): New members warn_intrinsic_shadow and
|
|
|
|
warn_intrinsics_std, removed warn_nonstd_intrinsics.
|
|
|
|
(gfc_is_intrinsic): Renamed from gfc_intrinsic_name.
|
|
|
|
(gfc_warn_intrinsic_shadow), (gfc_check_intrinsic_standard): New.
|
|
|
|
* decl.c (match_procedure_decl): Replaced gfc_intrinsic_name by
|
|
|
|
the new name gfc_is_intrinsic.
|
|
|
|
(warn_intrinsic_shadow): New helper method.
|
|
|
|
(gfc_match_function_decl), (gfc_match_subroutine): Call the new method
|
|
|
|
warn_intrinsic_shadow to check the just-parsed procedure.
|
|
|
|
* expr.c (check_init_expr): Call new gfc_is_intrinsic to check whether
|
|
|
|
the function called is really an intrinsic in the selected standard.
|
|
|
|
* intrinsic.c (gfc_is_intrinsic): Renamed from gfc_intrinsic_name and
|
|
|
|
extended to take into account the selected standard settings when trying
|
|
|
|
to find out whether a symbol is an intrinsic or not.
|
|
|
|
(gfc_check_intrinsic_standard): Made public and extended.
|
|
|
|
(gfc_intrinsic_func_interface), (gfc_intrinsic_sub_interface): Removed
|
|
|
|
the calls to check_intrinsic_standard, this check now happens inside
|
|
|
|
gfc_is_intrinsic.
|
|
|
|
(gfc_warn_intrinsic_shadow): New method defined.
|
|
|
|
* options.c (gfc_init_options): Initialize new warning flags to false
|
|
|
|
and removed intialization of Wnonstd-intrinsics flag.
|
|
|
|
(gfc_post_options): Removed logic for Wnonstd-intrinsics flag.
|
|
|
|
(set_Wall): Set new warning flags and removed Wnonstd-intrinsics flag.
|
|
|
|
(gfc_handle_option): Handle the new flags and removed handling of the
|
|
|
|
old Wnonstd-intrinsics flag.
|
|
|
|
* primary.c (gfc_match_rvalue): Replaced call to gfc_intrinsic_name by
|
|
|
|
the new name gfc_is_intrinsic.
|
|
|
|
* resolve.c (resolve_actual_arglist): Ditto.
|
|
|
|
(resolve_generic_f), (resolve_unknown_f): Ditto.
|
|
|
|
(is_external_proc): Ditto.
|
|
|
|
(resolve_generic_s), (resolve_unknown_s): Ditto.
|
|
|
|
(resolve_symbol): Ditto and ensure for symbols declared INTRINSIC that
|
|
|
|
they are really available in the selected standard setting.
|
|
|
|
|
2008-07-24 18:06:55 +02:00
|
|
|
2008-07-24 Daniel Kraft <d@domob.eu>
|
|
|
|
|
|
|
|
* match.c (gfc_match): Add assertion to catch wrong calls trying to
|
|
|
|
match upper-case characters.
|
|
|
|
|
2008-07-24 11:26:43 +02:00
|
|
|
2008-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/29952
|
|
|
|
* gfortran.h: Add "warn_array_temp" to gfc_option_t.
|
|
|
|
* lang.opt: Add -Warray-temporaries.
|
|
|
|
* invoke.texi: Document -Warray-temporaries
|
|
|
|
* trans-array.h (gfc_trans_create_temp_array): Add argument of
|
|
|
|
type *locus.
|
|
|
|
(gfc_conv_loop_setup): Likewise.
|
|
|
|
* trans-array.c (gfc_trans_create_temp_array): If
|
|
|
|
-Warray-temporaries is given and locus is present, warn about
|
|
|
|
creation of array temporaries.
|
|
|
|
(gfc_trans_array_constructor_subarray): Add locus to call
|
|
|
|
of gfc_conv_loop_setup.
|
|
|
|
(gfc_trans_array_constructor): Add where argument. Pass where
|
|
|
|
argument to call of gfc_trans_create_temp_array.
|
|
|
|
(gfc_add_loop_ss_code): Add where argument. Pass where argument
|
|
|
|
to recursive call of gfc_add_loop_ss_code and to call of
|
|
|
|
gfc_trans_array_constructor.
|
|
|
|
(gfc_conv_loop_setup): Add where argument. Pass where argument
|
|
|
|
to calls to gfc_add_loop_ss_code and to gfc_trans_create_temp_array.
|
|
|
|
(gfc_conv_expr_descriptor): Pass location to call of
|
|
|
|
gfc_conv_loop_setup.
|
|
|
|
(gfc_conv_array_parameter): If -Warray-temporaries is given,
|
|
|
|
warn about creation of temporary arrays.
|
|
|
|
* trans-expr.c (gfc_conv_subref_array_arg): Add where argument
|
|
|
|
to call to gfc_conv_loop_setup.
|
|
|
|
(gfc_conv_function_call): Add where argument to call to
|
|
|
|
gfc_trans_creat_temp_array.
|
|
|
|
(gfc_trans_subarray_assign): Likewise.
|
|
|
|
(gfc_trans_assignment_1): Add where argument to call to
|
|
|
|
gfc_conv_loop_setup.
|
|
|
|
* trans-stmt.c (gfc_conv_elemental_dependencies): Add where
|
|
|
|
argument to call to gfc_trans_create_temp_array.
|
|
|
|
(gfc_trans_call): Add where argument to call to gfc_conv_loop_setup.
|
|
|
|
(generate_loop_for_temp_to_lhs): Likewise.
|
|
|
|
(generate_loop_for_rhs_to_temp): Likewise.
|
|
|
|
(compute_inner_temp_size): Likewise.
|
|
|
|
(gfc_trans-pointer_assign_need_temp): Likewise.
|
|
|
|
(gfc_evaluate_where_mask): Likewise.
|
|
|
|
(gfc_trans_where_assign): Likewise.
|
|
|
|
(gfc_trans_where_3): Likewise.
|
|
|
|
* trans-io.c (transfer_srray_component): Add where argument
|
|
|
|
to function. Add where argument to call to gfc_conv_loop_setup.
|
|
|
|
(transfer_expr): Add where argument to call to
|
|
|
|
transfer_array_component.
|
|
|
|
(gfc_trans_transfer): Add where expression to call to
|
|
|
|
gfc_conv_loop_setup.
|
|
|
|
* trans-intrinsic.c (gfc_conv_intrinsic_anyall): Add
|
|
|
|
where argument to call to gfc_conv_loop_setup.
|
|
|
|
(gfc_conv_intrinsic_count): Likewise.
|
|
|
|
(gfc_conv_intrinsic_arith): Likewise.
|
|
|
|
(gfc_conv_intrinsic_dot_product): Likewise.
|
|
|
|
(gfc_conv_intrinsic_minmaxloc): Likewise.
|
|
|
|
(gfc_conv_intrinsic_minmaxval): Likewise.
|
|
|
|
(gfc_conv_intrinsic_array_transfer): Warn about
|
|
|
|
creation of temporary array.
|
|
|
|
Add where argument to call to gfc_trans_create_temp_array.
|
|
|
|
* options.c (gfc_init_options): Initialize gfc_option.warn_array_temp.
|
|
|
|
(gfc_handle_option): Set gfc_option.warn_array_temp.
|
|
|
|
|
2008-07-23 17:57:49 +02:00
|
|
|
2008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR 35058
|
|
|
|
* f95-lang.c (gfc_mark_addressable): All calls to pedwarn changed.
|
|
|
|
|
2008-07-22 19:05:55 +02:00
|
|
|
2008-07-22 Daniel Kraft <d@domob.eu>
|
|
|
|
|
|
|
|
PR fortran/29835
|
|
|
|
* io.c (error_element), (format_locus): New static globals.
|
|
|
|
(unexpected_element): Spelled out this message fully.
|
|
|
|
(next_char): Keep track of locus when not MODE_STRING.
|
|
|
|
(next_char_not_space): Remember last parsed element in error_element.
|
|
|
|
(format_lex): Fix two indentation errors.
|
|
|
|
(check_format): Use format_locus and possibly error_element for a
|
|
|
|
slightly better error message on invalid format.
|
|
|
|
(check_format_string): Set format_locus to start of the string
|
|
|
|
expression used as format.
|
|
|
|
|
2008-07-21 21:17:08 +02:00
|
|
|
2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
|
|
|
|
|
|
|
* expr.c (gfc_check_pointer_assign): Fix typo in string.
|
|
|
|
* io.c (check_format): Fix typo in string. Fix comment typos.
|
|
|
|
* parse.c (gfc_global_used): Likewise.
|
|
|
|
* resolve.c (resolve_allocate_expr): Likewise.
|
|
|
|
* symbol.c (gfc_set_default_type): Likewise.
|
|
|
|
* arith.c: Fix typos in comments.
|
|
|
|
* array.c: Likewise.
|
|
|
|
* data.c: Likewise.
|
|
|
|
* decl.c: Likewise.
|
|
|
|
* dependency.c: Likewise.
|
|
|
|
* f95-lang.c: Likewise.
|
|
|
|
* gfortran.h: Likewise.
|
|
|
|
* matchexp.c: Likewise.
|
|
|
|
* module.c: Likewise.
|
|
|
|
* primary.c: Likewise.
|
|
|
|
* scanner.c: Likewise.
|
|
|
|
* trans-array.c: Likewise.
|
|
|
|
* trans-common.c: Likewise.
|
|
|
|
* trans-decl.c: Likewise.
|
|
|
|
* trans-expr.c: Likewise.
|
|
|
|
* trans-intrinsic.c: Likewise.
|
|
|
|
* trans-types.c: Likewise.
|
|
|
|
* trans.c: Likewise.
|
|
|
|
* trans.h: Likewise.
|
|
|
|
|
2008-07-19 20:29:18 +02:00
|
|
|
2008-07-19 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
PR fortran/36795
|
|
|
|
* matchexp.c (gfc_get_parentheses): Remove obsolete workaround,
|
|
|
|
which caused the generation of wrong code.
|
|
|
|
|
2008-07-19 20:27:00 +02:00
|
|
|
2008-07-19 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
PR fortran/36342
|
|
|
|
* scanner.c (load_file): Add argument to destinguish between
|
|
|
|
true filename and displayed filename.
|
|
|
|
(include_line,gfc_new_file): Adapt accordingly.
|
|
|
|
|
2008-07-19 19:20:26 +02:00
|
|
|
2008-07-19 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
* check.c (gfc_check_cshift,gfc_check_eoshift,gfc_check_unpack): Add rank
|
|
|
|
checks for cshift's shift and eoshift's shift and boundary args.
|
|
|
|
(gfc_check_unpack): Add rank and shape tests for unpack.
|
|
|
|
|
gfortran.h (new): Remove macro.
* gfortran.h (new): Remove macro.
* array.c (gfc_append_constructor, match_array_list,
gfc_match_array_constructor): Likewise.
* bbt.c (insert, gfc_insert_bbt): Likewise.
* decl.c (var_element, top_var_list, top_val_list, gfc_match_data,
get_proc_name): Likewise.
* expr.c (gfc_copy_actual_arglist): Likewise.
* interface.c (compare_actual_formal, check_new_interface,
gfc_add_interface): Likewise.
* intrinsic.c gfc_convert_type_warn, gfc_convert_chartype):
Likewise.
* io.c (match_io_iterator, match_io_list): Likewise.
* match.c (match_forall_header): Likewise.
* matchexp.c (build_node): Likewise.
* module.c (gfc_match_use): Likewise.
* scanner.c (load_file): Likewise.
* st.c (gfc_append_code): Likewise.
* symbol.c (save_symbol_data, gfc_get_sym_tree, gfc_undo_symbols,
gfc_commit_symbols): Likewise.
* trans-common.c (build_field): Likewise.
* trans-decl.c (gfc_finish_var_decl): Likewise.
* trans-expr.c (gfc_free_interface_mapping,
gfc_get_interface_mapping_charlen, gfc_add_interface_mapping,
gfc_finish_interface_mapping,
gfc_apply_interface_mapping_to_expr): Likewise.
* trans.h (gfc_interface_sym_mapping): Likewise.
From-SVN: r137982
2008-07-19 18:23:52 +02:00
|
|
|
2008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
|
|
|
|
|
|
|
* gfortran.h (new): Remove macro.
|
|
|
|
* array.c (gfc_append_constructor, match_array_list,
|
|
|
|
gfc_match_array_constructor): Likewise.
|
|
|
|
* bbt.c (insert, gfc_insert_bbt): Likewise.
|
|
|
|
* decl.c (var_element, top_var_list, top_val_list, gfc_match_data,
|
|
|
|
get_proc_name): Likewise.
|
|
|
|
* expr.c (gfc_copy_actual_arglist): Likewise.
|
|
|
|
* interface.c (compare_actual_formal, check_new_interface,
|
|
|
|
gfc_add_interface): Likewise.
|
|
|
|
* intrinsic.c gfc_convert_type_warn, gfc_convert_chartype):
|
|
|
|
Likewise.
|
|
|
|
* io.c (match_io_iterator, match_io_list): Likewise.
|
|
|
|
* match.c (match_forall_header): Likewise.
|
|
|
|
* matchexp.c (build_node): Likewise.
|
|
|
|
* module.c (gfc_match_use): Likewise.
|
|
|
|
* scanner.c (load_file): Likewise.
|
|
|
|
* st.c (gfc_append_code): Likewise.
|
|
|
|
* symbol.c (save_symbol_data, gfc_get_sym_tree, gfc_undo_symbols,
|
|
|
|
gfc_commit_symbols): Likewise.
|
|
|
|
* trans-common.c (build_field): Likewise.
|
|
|
|
* trans-decl.c (gfc_finish_var_decl): Likewise.
|
|
|
|
* trans-expr.c (gfc_free_interface_mapping,
|
|
|
|
gfc_get_interface_mapping_charlen, gfc_add_interface_mapping,
|
|
|
|
gfc_finish_interface_mapping,
|
|
|
|
gfc_apply_interface_mapping_to_expr): Likewise.
|
|
|
|
* trans.h (gfc_interface_sym_mapping): Likewise.
|
|
|
|
|
gfortran.h (operator): Remove macro.
* gfortran.h (operator): Remove macro.
(gfc_namespace, gfc_expr): Avoid C++ keywords.
* arith.c (eval_intrinsic, eval_intrinsic_f2, eval_intrinsic_f3):
Likewise.
* decl.c (access_attr_decl): Likewise.
* dependency.c (gfc_dep_compare_expr): Likewise.
* dump-parse-tree.c (show_expr, show_uop, show_namespace):
Likewise.
* expr.c (gfc_copy_expr, gfc_type_convert_binary,
simplify_intrinsic_op, check_intrinsic_op): Likewise.
* interface.c (fold_unary, gfc_match_generic_spec,
gfc_match_interface, gfc_match_end_interface,
check_operator_interface, check_uop_interfaces,
gfc_check_interfaces, gfc_extend_expr, gfc_extend_assign,
gfc_add_interface, gfc_current_interface_head,
gfc_set_current_interface_head): Likewise.
* iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
Likewise.
* matchexp.c (gfc_get_parentheses, build_node): Likewise.
* module.c (gfc_use_rename, gfc_match_use, find_use_name_n,
number_use_names, mio_expr, load_operator_interfaces, read_module,
write_operator, write_module): Likewise.
* openmp.c (resolve_omp_atomic): Likewise.
* resolve.c (resolve_operator, gfc_resolve_character_operator,
gfc_resolve_uops): Likewise.
* symbol.c (free_uop_tree, gfc_free_namespace): Likewise.
* trans-expr.c (gfc_conv_expr_op): Likewise.
* trans-openmp.c (gfc_trans_omp_atomic): Likewise.
From-SVN: r137981
2008-07-19 18:22:12 +02:00
|
|
|
2008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
|
|
|
|
|
|
|
* gfortran.h (operator): Remove macro.
|
|
|
|
(gfc_namespace, gfc_expr): Avoid C++ keywords.
|
|
|
|
* arith.c (eval_intrinsic, eval_intrinsic_f2, eval_intrinsic_f3):
|
|
|
|
Likewise.
|
|
|
|
* decl.c (access_attr_decl): Likewise.
|
|
|
|
* dependency.c (gfc_dep_compare_expr): Likewise.
|
|
|
|
* dump-parse-tree.c (show_expr, show_uop, show_namespace):
|
|
|
|
Likewise.
|
|
|
|
* expr.c (gfc_copy_expr, gfc_type_convert_binary,
|
|
|
|
simplify_intrinsic_op, check_intrinsic_op): Likewise.
|
|
|
|
* interface.c (fold_unary, gfc_match_generic_spec,
|
|
|
|
gfc_match_interface, gfc_match_end_interface,
|
|
|
|
check_operator_interface, check_uop_interfaces,
|
|
|
|
gfc_check_interfaces, gfc_extend_expr, gfc_extend_assign,
|
|
|
|
gfc_add_interface, gfc_current_interface_head,
|
|
|
|
gfc_set_current_interface_head): Likewise.
|
|
|
|
* iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
|
|
|
|
Likewise.
|
|
|
|
* matchexp.c (gfc_get_parentheses, build_node): Likewise.
|
|
|
|
* module.c (gfc_use_rename, gfc_match_use, find_use_name_n,
|
|
|
|
number_use_names, mio_expr, load_operator_interfaces, read_module,
|
|
|
|
write_operator, write_module): Likewise.
|
|
|
|
* openmp.c (resolve_omp_atomic): Likewise.
|
|
|
|
* resolve.c (resolve_operator, gfc_resolve_character_operator,
|
|
|
|
gfc_resolve_uops): Likewise.
|
|
|
|
* symbol.c (free_uop_tree, gfc_free_namespace): Likewise.
|
|
|
|
* trans-expr.c (gfc_conv_expr_op): Likewise.
|
|
|
|
* trans-openmp.c (gfc_trans_omp_atomic): Likewise.
|
|
|
|
|
gfortran.h (protected): Remove macro.
* gfortran.h (protected): Remove macro.
* dump-parse-tree.c (show_attr): Avoid C++ keywords.
* expr.c (gfc_check_pointer_assign): Likewise.
* interface.c (compare_parameter_protected): Likewise.
* intrinsic.c (enum class, add_sym, add_sym_0, add_sym_1,
add_sym_1s, add_sym_1m, add_sym_2, add_sym_2s, add_sym_3,
add_sym_3ml, add_sym_3red, add_sym_3s, add_sym_4, add_sym_4s,
add_sym_5s): Likewise.
* match.c (gfc_match_assignment, gfc_match_pointer_assignment):
Likewise.
* module.c (mio_symbol_attribute): Likewise.
* primary.c (match_variable): Likewise.
* resolve.c (resolve_equivalence): Likewise.
* symbol.c (check_conflict, gfc_add_protected, gfc_copy_attr):
Likewise.
* trans-types.c (gfc_get_array_type_bounds): Likewise.
From-SVN: r137980
2008-07-19 18:19:27 +02:00
|
|
|
2008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
|
|
|
|
|
|
|
* gfortran.h (protected): Remove macro.
|
|
|
|
* dump-parse-tree.c (show_attr): Avoid C++ keywords.
|
|
|
|
* expr.c (gfc_check_pointer_assign): Likewise.
|
|
|
|
* interface.c (compare_parameter_protected): Likewise.
|
|
|
|
* intrinsic.c (enum class, add_sym, add_sym_0, add_sym_1,
|
|
|
|
add_sym_1s, add_sym_1m, add_sym_2, add_sym_2s, add_sym_3,
|
|
|
|
add_sym_3ml, add_sym_3red, add_sym_3s, add_sym_4, add_sym_4s,
|
|
|
|
add_sym_5s): Likewise.
|
|
|
|
* match.c (gfc_match_assignment, gfc_match_pointer_assignment):
|
|
|
|
Likewise.
|
|
|
|
* module.c (mio_symbol_attribute): Likewise.
|
|
|
|
* primary.c (match_variable): Likewise.
|
|
|
|
* resolve.c (resolve_equivalence): Likewise.
|
|
|
|
* symbol.c (check_conflict, gfc_add_protected, gfc_copy_attr):
|
|
|
|
Likewise.
|
|
|
|
* trans-types.c (gfc_get_array_type_bounds): Likewise.
|
|
|
|
|
2008-07-18 19:54:46 +02:00
|
|
|
2008-07-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
|
|
|
|
|
|
|
* arith.c (eval_type_intrinsic0): Avoid C++ keywords.
|
|
|
|
* gfortran.h (try, protected, operator, new): Likewise.
|
|
|
|
|
2008-07-17 07:54:42 +02:00
|
|
|
2008-07-17 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
PR fortran/36825
|
|
|
|
PR fortran/36824
|
|
|
|
* array.c (gfc_match_array_spec): Fix array-rank check.
|
|
|
|
* resolve.c (resolve_fl_derived): Fix constentness check
|
|
|
|
for the array dimensions.
|
|
|
|
|
2008-07-14 20:40:35 +02:00
|
|
|
2008-07-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
|
|
|
|
|
|
|
* Make-lang.in (gfortranspec.o): Fix dependencies.
|
|
|
|
|
2008-07-14 02:51:44 +02:00
|
|
|
2008-07-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/36725
|
|
|
|
* io.c: Add error check for g0 edit descriptor followed by '.'.
|
|
|
|
|
2008-07-12 13:26:50 +02:00
|
|
|
2008-07-12 Daniel Kraft <d@domob.eu>
|
|
|
|
|
|
|
|
* resolve.c (resolve_fl_derived): Allow pointer components to empty
|
|
|
|
derived types fixing a missing part of PR fortran/33221.
|
|
|
|
|
2008-07-10 09:05:40 +02:00
|
|
|
2008-07-10 Daniel Kraft <d@domob.eu>
|
|
|
|
|
|
|
|
* gfc-internals.texi (section gfc_expr): Created documentation about
|
|
|
|
the gfc_expr internal data structure.
|
|
|
|
|
2008-07-07 21:45:55 +02:00
|
|
|
2008-07-07 Thomas Koenig <tkoenig@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/36670
|
|
|
|
* iresolve.c (gfc_resolve_product): Set shape of return
|
|
|
|
value from array.
|
|
|
|
(gfc_resolve_sum): Likewise.
|
|
|
|
|
2008-07-07 17:26:35 +02:00
|
|
|
2008-07-07 Jakub Jelinek <jakub@redhat.com>
|
|
|
|
|
|
|
|
PR middle-end/36726
|
|
|
|
* f95-lang.c (poplevel): Don't ever add subblocks to
|
|
|
|
global_binding_level.
|
|
|
|
|
re PR fortran/32580 (iso_c_binding c_f_procpointer / procedure pointers)
2008-07-02 Janus Weil <janus@gcc.gnu.org>
Tobias Burnus <burnus@net-b.de>
Paul Thomas <pault@gcc.gnu.org>
PR fortran/32580
* gfortran.h (struct gfc_symbol): New member "proc_pointer".
* check.c (gfc_check_associated,gfc_check_null): Implement
procedure pointers.
* decl.c (match_procedure_decl): Ditto.
* expr.c (gfc_check_pointer_assign,gfc_check_assign_symbol): Ditto.
* interface.c (compare_actual_formal): Ditto.
* match.h: Ditto.
* match.c (gfc_match_pointer_assignment): Ditto.
* parse.c (parse_interface): Ditto.
* primary.c (gfc_match_rvalue,match_variable): Ditto.
* resolve.c (resolve_fl_procedure): Ditto.
* symbol.c (check_conflict,gfc_add_external,gfc_add_pointer,
gfc_copy_attr,gen_fptr_param,build_formal_args): Ditto.
* trans-decl.c (get_proc_pointer_decl,gfc_get_extern_function_decl,
create_function_arglist): Ditto.
* trans-expr.c (gfc_conv_variable,gfc_conv_function_val,
gfc_conv_function_call,gfc_trans_pointer_assignment): Ditto.
2008-07-02 Janus Weil <janus@gcc.gnu.org>
Tobias Burnus <burnus@net-b.de>
PR fortran/32580
* gfortran.dg/c_f_pointer_tests_3.f90: Updated.
* gfortran.dg/proc_decl_1.f90: Updated.
* gfortran.dg/proc_ptr_1.f90: New.
* gfortran.dg/proc_ptr_2.f90: New.
* gfortran.dg/proc_ptr_3.f90: New.
* gfortran.dg/proc_ptr_4.f90: New.
* gfortran.dg/proc_ptr_5.f90: New.
* gfortran.dg/proc_ptr_6.f90: New.
* gfortran.dg/proc_ptr_7.f90: New.
* gfortran.dg/proc_ptr_8.f90: New.
Co-Authored-By: Paul Thomas <pault@gcc.gnu.org>
Co-Authored-By: Tobias Burnus <burnus@net-b.de>
From-SVN: r137386
2008-07-02 21:53:37 +02:00
|
|
|
2008-07-02 Janus Weil <janus@gcc.gnu.org>
|
|
|
|
Tobias Burnus <burnus@net-b.de>
|
|
|
|
Paul Thomas <pault@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/32580
|
|
|
|
* gfortran.h (struct gfc_symbol): New member "proc_pointer".
|
|
|
|
* check.c (gfc_check_associated,gfc_check_null): Implement
|
|
|
|
procedure pointers.
|
|
|
|
* decl.c (match_procedure_decl): Ditto.
|
|
|
|
* expr.c (gfc_check_pointer_assign,gfc_check_assign_symbol): Ditto.
|
|
|
|
* interface.c (compare_actual_formal): Ditto.
|
|
|
|
* match.h: Ditto.
|
|
|
|
* match.c (gfc_match_pointer_assignment): Ditto.
|
|
|
|
* parse.c (parse_interface): Ditto.
|
|
|
|
* primary.c (gfc_match_rvalue,match_variable): Ditto.
|
|
|
|
* resolve.c (resolve_fl_procedure): Ditto.
|
|
|
|
* symbol.c (check_conflict,gfc_add_external,gfc_add_pointer,
|
|
|
|
gfc_copy_attr,gen_fptr_param,build_formal_args): Ditto.
|
|
|
|
* trans-decl.c (get_proc_pointer_decl,gfc_get_extern_function_decl,
|
|
|
|
create_function_arglist): Ditto.
|
|
|
|
* trans-expr.c (gfc_conv_variable,gfc_conv_function_val,
|
|
|
|
gfc_conv_function_call,gfc_trans_pointer_assignment): Ditto.
|
|
|
|
|
2008-07-02 16:36:58 +02:00
|
|
|
2008-07-02 Thomas Koenig <tkoenig@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/36590
|
|
|
|
PR fortran/36681
|
|
|
|
* iresolve.c (resolve_mask_arg): Don't convert mask to
|
|
|
|
kind=1 logical if it is of that type already.
|
|
|
|
|
2008-06-29 21:06:06 +02:00
|
|
|
2008-06-29 Thomas Koenig <tkoenig@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/36341
|
|
|
|
* iresolve.c (gfc_resolve_matmul): Copy shapes
|
|
|
|
from arguments.
|
|
|
|
|
2008-06-29 20:56:08 +02:00
|
|
|
2008-06-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
|
|
|
|
|
|
|
* invoke.texi: Add documentation for runtime behavior of
|
|
|
|
-fno-range-check.
|
|
|
|
|
2008-06-28 17:11:25 +02:00
|
|
|
2008-06-28 Daniel Kraft <d@domob.eu>
|
|
|
|
|
|
|
|
* gfc-internals.texi (section gfc_code): Extended documentation about
|
|
|
|
gfc_code in the internal datastructures chapter including details about
|
|
|
|
how IF, DO and SELECT blocks look like and an example for how the
|
|
|
|
block-chaining works.
|
|
|
|
|
2008-06-26 01:04:33 +02:00
|
|
|
2008-06-25 Paul Thomas <pault@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/36526
|
|
|
|
* interface.c (check_intents): Correct error where the actual
|
|
|
|
arg was checked for a pointer argument, rather than the formal.
|
|
|
|
|
2008-06-24 23:44:28 +02:00
|
|
|
2008-06-24 Paul Thomas <pault@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/34371
|
|
|
|
* expr.c (gfc_check_assign): Change message and locus for
|
|
|
|
error when conform == 0.
|
|
|
|
|
2008-06-23 12:20:33 +02:00
|
|
|
2008-06-23 Jakub Jelinek <jakub@redhat.com>
|
|
|
|
|
|
|
|
PR fortran/36597
|
|
|
|
* cpp.c (cpp_define_builtins): Change _OPENMP value to 200805.
|
|
|
|
|
2008-06-20 15:57:00 +02:00
|
|
|
2008-06-20 Laurynas Biveinis <laurynas.biveinis@gmail.com>
|
|
|
|
Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
PR fortran/34908
|
|
|
|
PR fortran/36276
|
|
|
|
* scanner.c (preprocessor_line): do not call gfc_free for
|
|
|
|
current_file->filename if it differs from filename.
|
|
|
|
|
arith.c (hollerith2representation): Fix for -Wc++-compat.
* arith.c (hollerith2representation): Fix for -Wc++-compat.
* array.c (gfc_get_constructor): Likewise.
* decl.c (gfc_get_data_variable, gfc_get_data_value, gfc_get_data,
create_enum_history, gfc_match_final_decl): Likewise.
* error.c (error_char): Likewise.
* expr.c (gfc_get_expr, gfc_copy_expr): Likewise.
* gfortran.h (gfc_get_charlen, gfc_get_array_spec,
gfc_get_component, gfc_get_formal_arglist, gfc_get_actual_arglist,
gfc_get_namelist, gfc_get_omp_clauses, gfc_get_interface,
gfc_get_common_head, gfc_get_dt_list, gfc_get_array_ref,
gfc_get_ref, gfc_get_equiv, gfc_get_case, gfc_get_iterator,
gfc_get_alloc, gfc_get_wide_string): Likewise.
* interface.c (count_types_test): Likewise.
* intrinsic.c (add_char_conversions, gfc_intrinsic_init_1):
Likewise.
* io.c (gfc_match_open, gfc_match_close, match_filepos, match_io,
gfc_match_inquire, gfc_match_wait): Likewise.
* match.c (gfc_match, match_forall_iterator): Likewise.
* module.c (gfc_get_pointer_info, gfc_get_use_rename, add_fixup,
add_true_name, parse_string, write_atom, quote_string,
mio_symtree_ref, mio_gmp_real, write_common_0): Likewise.
* options.c (gfc_post_options): Likewise.
* primary.c (match_integer_constant, match_hollerith_constant,
match_boz_constant, match_real_constant,
gfc_get_structure_ctor_component, gfc_match_structure_constructor): Likewise.
* scanner.c (gfc_widechar_to_char, add_path_to_list,
add_file_change, load_line, get_file, preprocessor_line,
load_file, unescape_filename, gfc_read_orig_filename): Likewise.
* simplify.c (gfc_simplify_ibits, gfc_simplify_ishft,
gfc_simplify_ishftc): Likewise.
* symbol.c (gfc_get_st_label, gfc_get_namespace, gfc_new_symtree,
gfc_get_uop, gfc_new_symbol, save_symbol_data, gfc_get_gsymbol):
Likewise.
* target-memory.c (gfc_target_interpret_expr): Likewise.
* trans-const.c (gfc_build_wide_string_const): Likewise.
* trans-expr.c (gfc_add_interface_mapping): Likewise.
* trans-intrinsic.c (gfc_conv_intrinsic_conversion,
gfc_conv_intrinsic_int, gfc_conv_intrinsic_lib_function,
gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_ctime,
gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam,
gfc_conv_intrinsic_minmax, gfc_conv_intrinsic_minmax_char,
gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_index_scan_verify,
gfc_conv_intrinsic_merge, gfc_conv_intrinsic_trim): Likewise.
* trans.c (gfc_get_backend_locus): Likewise.
* trans.h (gfc_get_ss): Likewise.
From-SVN: r136982
2008-06-20 08:03:16 +02:00
|
|
|
2008-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
|
|
|
|
|
|
|
* arith.c (hollerith2representation): Fix for -Wc++-compat.
|
|
|
|
* array.c (gfc_get_constructor): Likewise.
|
|
|
|
* decl.c (gfc_get_data_variable, gfc_get_data_value, gfc_get_data,
|
|
|
|
create_enum_history, gfc_match_final_decl): Likewise.
|
|
|
|
* error.c (error_char): Likewise.
|
|
|
|
* expr.c (gfc_get_expr, gfc_copy_expr): Likewise.
|
|
|
|
* gfortran.h (gfc_get_charlen, gfc_get_array_spec,
|
|
|
|
gfc_get_component, gfc_get_formal_arglist, gfc_get_actual_arglist,
|
|
|
|
gfc_get_namelist, gfc_get_omp_clauses, gfc_get_interface,
|
|
|
|
gfc_get_common_head, gfc_get_dt_list, gfc_get_array_ref,
|
|
|
|
gfc_get_ref, gfc_get_equiv, gfc_get_case, gfc_get_iterator,
|
|
|
|
gfc_get_alloc, gfc_get_wide_string): Likewise.
|
|
|
|
* interface.c (count_types_test): Likewise.
|
|
|
|
* intrinsic.c (add_char_conversions, gfc_intrinsic_init_1):
|
|
|
|
Likewise.
|
|
|
|
* io.c (gfc_match_open, gfc_match_close, match_filepos, match_io,
|
|
|
|
gfc_match_inquire, gfc_match_wait): Likewise.
|
|
|
|
* match.c (gfc_match, match_forall_iterator): Likewise.
|
|
|
|
* module.c (gfc_get_pointer_info, gfc_get_use_rename, add_fixup,
|
|
|
|
add_true_name, parse_string, write_atom, quote_string,
|
|
|
|
mio_symtree_ref, mio_gmp_real, write_common_0): Likewise.
|
|
|
|
* options.c (gfc_post_options): Likewise.
|
|
|
|
* primary.c (match_integer_constant, match_hollerith_constant,
|
|
|
|
match_boz_constant, match_real_constant,
|
|
|
|
gfc_get_structure_ctor_component, gfc_match_structure_constructor): Likewise.
|
|
|
|
* scanner.c (gfc_widechar_to_char, add_path_to_list,
|
|
|
|
add_file_change, load_line, get_file, preprocessor_line,
|
|
|
|
load_file, unescape_filename, gfc_read_orig_filename): Likewise.
|
|
|
|
* simplify.c (gfc_simplify_ibits, gfc_simplify_ishft,
|
|
|
|
gfc_simplify_ishftc): Likewise.
|
|
|
|
* symbol.c (gfc_get_st_label, gfc_get_namespace, gfc_new_symtree,
|
|
|
|
gfc_get_uop, gfc_new_symbol, save_symbol_data, gfc_get_gsymbol):
|
|
|
|
Likewise.
|
|
|
|
* target-memory.c (gfc_target_interpret_expr): Likewise.
|
|
|
|
* trans-const.c (gfc_build_wide_string_const): Likewise.
|
|
|
|
* trans-expr.c (gfc_add_interface_mapping): Likewise.
|
|
|
|
* trans-intrinsic.c (gfc_conv_intrinsic_conversion,
|
|
|
|
gfc_conv_intrinsic_int, gfc_conv_intrinsic_lib_function,
|
|
|
|
gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_ctime,
|
|
|
|
gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam,
|
|
|
|
gfc_conv_intrinsic_minmax, gfc_conv_intrinsic_minmax_char,
|
|
|
|
gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_index_scan_verify,
|
|
|
|
gfc_conv_intrinsic_merge, gfc_conv_intrinsic_trim): Likewise.
|
|
|
|
* trans.c (gfc_get_backend_locus): Likewise.
|
|
|
|
* trans.h (gfc_get_ss): Likewise.
|
|
|
|
|
2008-06-18 15:53:32 +02:00
|
|
|
2008-06-18 Daniel Kraft <d@domob.eu>
|
|
|
|
|
|
|
|
PR fortran/36517, fortran/36492
|
|
|
|
* array.c (gfc_resolve_character_array_constructor): Call
|
|
|
|
gfc_set_constant_character_len with changed length-chec argument.
|
|
|
|
* decl.c (gfc_set_constant_character_len): Changed array argument to
|
|
|
|
be a generic length-checking argument that can be used for correct
|
|
|
|
checking with typespec and in special cases where the should-be length
|
|
|
|
is different from the target length.
|
|
|
|
(build_struct): Call gfc_set_constant_character_len with changed length
|
|
|
|
checking argument and introduced additional checks for exceptional
|
|
|
|
conditions on invalid code.
|
|
|
|
(add_init_expr_to_sym), (do_parm): Call gfc_set_constant_character_len
|
|
|
|
with changed argument.
|
|
|
|
* match.h (gfc_set_constant_character_len): Changed third argument to
|
|
|
|
int for the should-be length rather than bool.
|
|
|
|
|
2008-06-17 22:24:20 +02:00
|
|
|
2008-06-17 Daniel Kraft <d@domob.eu>
|
|
|
|
|
|
|
|
PR fortran/36112
|
|
|
|
* array.c (gfc_resolve_character_array_constructor): Check that all
|
|
|
|
elements with constant character length have the same one rather than
|
|
|
|
fixing it if no typespec is given, emit an error if they don't. Changed
|
|
|
|
return type to "try" and return FAILURE for the case above.
|
|
|
|
(gfc_resolve_array_constructor): Removed unneeded call to
|
|
|
|
gfc_resolve_character_array_constructor in this function.
|
|
|
|
* gfortran.h (gfc_resolve_character_array_constructor): Returns try.
|
|
|
|
* trans-array.c (get_array_ctor_strlen): Return length of first element
|
|
|
|
rather than last element.
|
|
|
|
* resolve.c (gfc_resolve_expr): Handle FAILURE return from
|
|
|
|
gfc_resolve_character_array_constructor.
|
|
|
|
|
2008-06-17 20:08:24 +02:00
|
|
|
2008-06-17 Paul Thomas <pault@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/34396
|
|
|
|
* resolve.c (add_dt_to_dt_list): New function.
|
|
|
|
(resolve_fl_derived): Call new function for pointer components
|
|
|
|
and when derived type resolved.
|
|
|
|
|
2008-06-15 22:00:41 +02:00
|
|
|
2008-06-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/36515
|
|
|
|
* trans-decl.c (gfc_generate_function_code): Add range_check to options
|
|
|
|
array.
|
|
|
|
|
2008-06-15 11:42:13 +02:00
|
|
|
2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
|
|
|
|
|
|
|
* gfc-internals.texi: Expand TABs, drop indentation outside examples.
|
|
|
|
* gfortran.texi: Likewise.
|
|
|
|
* intrinsic.texi: Likewise.
|
|
|
|
* invoke.texi: Likewise.
|
|
|
|
|
2008-06-13 22:30:48 +02:00
|
|
|
2008-06-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/35863
|
|
|
|
* trans-io.c (gfc_build_io_library_fndecls): Build declaration for
|
|
|
|
transfer_character_wide which includes passing in the character kind to
|
|
|
|
support wide character IO. (transfer_expr): If the kind == 4, create the
|
|
|
|
argument and build the call.
|
|
|
|
* gfortran.texi: Fix typo.
|
|
|
|
|
2008-06-13 15:04:26 +02:00
|
|
|
2008-06-13 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
PR fortran/36476
|
|
|
|
* decl.c (do_parm): Handle init expression for len=*.
|
|
|
|
|
2008-06-12 18:16:39 +02:00
|
|
|
2008-06-12 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
PR fortran/36462
|
|
|
|
* trans-intrinsic.c (gfc_conv_intrinsic_index_scan_verify):
|
|
|
|
Fix passing of the BACK= argument.
|
|
|
|
|
2008-06-11 06:37:24 +02:00
|
|
|
2008-06-10 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
|
|
|
|
|
|
|
* cpp.c: Add copyright notice.
|
|
|
|
* cpp.h: Add copyright notice.
|
|
|
|
|
2008-06-08 13:55:41 +02:00
|
|
|
2008-06-08 Janus Weil <janus@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/36459
|
|
|
|
* decl.c (match_procedure_decl): Correctly recognize if the interface
|
|
|
|
is an intrinsic procedure.
|
|
|
|
|
2008-06-08 09:48:53 +02:00
|
|
|
2008-06-08 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
PR fortran/35830
|
|
|
|
* resolve.c (resolve_symbol): Copy more attributes for
|
|
|
|
PROCEDUREs with interfaces.
|
|
|
|
|
2008-06-08 01:55:47 +02:00
|
|
|
2008-06-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
|
|
|
|
2008-06-08 02:01:19 +02:00
|
|
|
PR fortran/36420
|
|
|
|
PR fortran/36422
|
2008-06-08 01:55:47 +02:00
|
|
|
* io.c (check_format): Add new error message for zero width.
|
|
|
|
Use new error message for FMT_A and with READ, FMT_G. Allow
|
|
|
|
FMT_G with WRITE except when -std=F95 and -std=F2003.
|
|
|
|
|
2008-06-07 20:53:07 +02:00
|
|
|
2008-06-07 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
2008-06-07 20:56:19 +02:00
|
|
|
PR fortran/36437
|
2008-06-07 20:53:07 +02:00
|
|
|
* intrinsic.c (add_functions): Implement c_sizeof.
|
|
|
|
* trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Do not
|
|
|
|
create unneeded variable in the scalar case.
|
|
|
|
* intrinsic.texi: Add C_SIZEOF documentation.
|
|
|
|
|
2008-06-06 19:19:02 +02:00
|
|
|
2008-06-06 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
* intrinsic.texi (BESSEL_J1): Fix BES(S)EL_J1 typo.
|
|
|
|
|
c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP value to 200805.
* c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP value to
200805.
* langhooks.h (struct lang_hooks_for_decls): Add omp_finish_clause.
Add omp_private_outer_ref hook, add another argument to
omp_clause_default_ctor hook.
* langhooks-def.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
(LANG_HOOKS_OMP_PRIVATE_OUTER_REF): Define.
(LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR): Change to
hook_tree_tree_tree_tree_null.
(LANG_HOOKS_DECLS): Add LANG_HOOKS_OMP_FINISH_CLAUSE and
LANG_HOOKS_OMP_PRIVATE_OUTER_REF.
* hooks.c (hook_tree_tree_tree_tree_null): New function.
* hooks.h (hook_tree_tree_tree_tree_null): New prototype.
* tree.def (OMP_TASK): New tree code.
* tree.h (OMP_TASK_COPYFN, OMP_TASK_ARG_SIZE, OMP_TASK_ARG_ALIGN,
OMP_CLAUSE_PRIVATE_OUTER_REF, OMP_CLAUSE_LASTPRIVATE_STMT,
OMP_CLAUSE_COLLAPSE_ITERVAR, OMP_CLAUSE_COLLAPSE_COUNT,
OMP_TASKREG_CHECK, OMP_TASKREG_BODY, OMP_TASKREG_CLAUSES,
OMP_TASKREG_FN, OMP_TASKREG_DATA_ARG, OMP_TASK_BODY,
OMP_TASK_CLAUSES, OMP_TASK_FN, OMP_TASK_DATA_ARG,
OMP_CLAUSE_COLLAPSE_EXPR): Define.
(enum omp_clause_default_kind): Add OMP_CLAUSE_DEFAULT_FIRSTPRIVATE.
(OMP_DIRECTIVE_P): Add OMP_TASK.
(OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED): New clause codes.
(OMP_CLAUSE_SCHEDULE_AUTO): New schedule kind.
* tree.c (omp_clause_code_name): Add OMP_CLAUSE_COLLAPSE
and OMP_CLAUSE_UNTIED entries.
(omp_clause_num_ops): Likewise. Increase OMP_CLAUSE_LASTPRIVATE
num_ops to 2.
(walk_tree_1): Handle OMP_CLAUSE_COLLAPSE and OMP_CLAUSE_UNTIED.
Walk OMP_CLAUSE_LASTPRIVATE_STMT.
* tree-pretty-print.c (dump_omp_clause): Handle
OMP_CLAUSE_SCHEDULE_AUTO, OMP_CLAUSE_UNTIED, OMP_CLAUSE_COLLAPSE,
OMP_CLAUSE_DEFAULT_FIRSTPRIVATE.
(dump_generic_node): Handle OMP_TASK and collapsed OMP_FOR loops.
* c-omp.c (c_finish_omp_for): Allow pointer iterators. Remove
warning about unsigned iterators. Change decl/init/cond/incr
arguments to TREE_VECs, check arguments for all collapsed loops.
(c_finish_omp_taskwait): New function.
(c_split_parallel_clauses): Put OMP_CLAUSE_COLLAPSE clause to
ws_clauses.
* c-parser.c (c_parser_omp_for_loop): Parse collapsed loops. Call
default_function_array_conversion on init. Add par_clauses argument.
If decl is present in parallel's lastprivate clause, change it to
shared and add lastprivate clause for decl to OMP_FOR_CLAUSES.
Add clauses argument, on success set OMP_FOR_CLAUSES to it. Look up
collapse count in clauses.
(c_parser_omp_for, c_parser_omp_parallel): Adjust
c_parser_omp_for_loop callers.
(OMP_FOR_CLAUSE_MASK): Add 1 << PRAGMA_OMP_CLAUSE_COLLAPSE.
(c_parser_pragma): Handle PRAGMA_OMP_TASKWAIT.
(c_parser_omp_clause_name): Handle collapse and untied clauses.
(c_parser_omp_clause_collapse, c_parser_omp_clause_untied): New
functions.
(c_parser_omp_clause_schedule): Handle schedule(auto).
Include correct location in the error message.
(c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
and PRAGMA_OMP_CLAUSE_UNTIED.
(OMP_TASK_CLAUSE_MASK): Define.
(c_parser_omp_task, c_parser_omp_taskwait): New functions.
(c_parser_omp_construct): Handle PRAGMA_OMP_TASK.
* tree-nested.c (convert_nonlocal_omp_clauses,
convert_local_omp_clauses): Handle OMP_CLAUSE_LASTPRIVATE_STMT,
OMP_CLAUSE_REDUCTION_INIT, OMP_CLAUSE_REDUCTION_MERGE,
OMP_CLAUSE_COLLAPSE and OMP_CLAUSE_UNTIED.
Don't handle TREE_STATIC or DECL_EXTERNAL VAR_DECLs in
OMP_CLAUSE_DECL.
(conver_nonlocal_reference, convert_local_reference,
convert_call_expr): Handle OMP_TASK the same as OMP_PARALLEL. Use
OMP_TASKREG_* macros rather than OMP_PARALLEL_*.
(walk_omp_for): Adjust for OMP_FOR_{INIT,COND,INCR} changes.
* tree-gimple.c (is_gimple_stmt): Handle OMP_TASK.
* c-tree.h (c_begin_omp_task, c_finish_omp_task): New prototypes.
* c-pragma.h (PRAGMA_OMP_TASK, PRAGMA_OMP_TASKWAIT): New.
(PRAGMA_OMP_CLAUSE_COLLAPSE, PRAGMA_OMP_CLAUSE_UNTIED): New.
* c-typeck.c (c_begin_omp_task, c_finish_omp_task): New functions.
(c_finish_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
OMP_CLAUSE_UNTIED.
* c-pragma.c (init_pragma): Init omp task and omp taskwait pragmas.
* c-common.h (c_finish_omp_taskwait): New prototype.
* gimple-low.c (lower_stmt): Handle OMP_TASK.
* tree-parloops.c (create_parallel_loop): Create 1 entry
vectors for OMP_FOR_{INIT,COND,INCR}.
* tree-cfg.c (remove_useless_stmts_1): Handle OMP_* containers.
(make_edges): Handle OMP_TASK.
* tree-ssa-operands.c (get_expr_operands): Handle collapsed OMP_FOR
loops, adjust for OMP_FOR_{INIT,COND,INCR} changes.
* tree-inline.c (estimate_num_insns_1): Handle OMP_TASK.
* builtin-types.def (BT_PTR_ULONGLONG, BT_PTR_FN_VOID_PTR_PTR,
BT_FN_BOOL_ULONGLONGPTR_ULONGLONGPTR,
BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULLPTR_ULLPTR,
BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULL_ULLPTR_ULLPTR,
BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): New.
* omp-builtins.def (BUILT_IN_GOMP_TASK, BUILT_IN_GOMP_TASKWAIT,
BUILT_IN_GOMP_LOOP_ULL_STATIC_START,
BUILT_IN_GOMP_LOOP_ULL_DYNAMIC_START,
BUILT_IN_GOMP_LOOP_ULL_GUIDED_START,
BUILT_IN_GOMP_LOOP_ULL_RUNTIME_START,
BUILT_IN_GOMP_LOOP_ULL_ORDERED_STATIC_START,
BUILT_IN_GOMP_LOOP_ULL_ORDERED_DYNAMIC_START,
BUILT_IN_GOMP_LOOP_ULL_ORDERED_GUIDED_START,
BUILT_IN_GOMP_LOOP_ULL_ORDERED_RUNTIME_START,
BUILT_IN_GOMP_LOOP_ULL_STATIC_NEXT,
BUILT_IN_GOMP_LOOP_ULL_DYNAMIC_NEXT,
BUILT_IN_GOMP_LOOP_ULL_GUIDED_NEXT,
BUILT_IN_GOMP_LOOP_ULL_RUNTIME_NEXT,
BUILT_IN_GOMP_LOOP_ULL_ORDERED_STATIC_NEXT,
BUILT_IN_GOMP_LOOP_ULL_ORDERED_DYNAMIC_NEXT,
BUILT_IN_GOMP_LOOP_ULL_ORDERED_GUIDED_NEXT,
BUILT_IN_GOMP_LOOP_ULL_ORDERED_RUNTIME_NEXT): New builtins.
* gimplify.c (gimplify_omp_for): Allow pointer type for decl,
handle POINTER_PLUS_EXPR. If loop counter has been replaced and
original iterator is present in lastprivate clause or if
collapse > 1, set OMP_CLAUSE_LASTPRIVATE_STMT. Handle collapsed
OMP_FOR loops, adjust for OMP_FOR_{INIT,COND,INCR} changes.
(gimplify_expr): Handle OMP_SECTIONS_SWITCH and OMP_TASK.
(enum gimplify_omp_var_data): Add GOVD_PRIVATE_OUTER_REF.
(omp_notice_variable): Set GOVD_PRIVATE_OUTER_REF if needed,
if it is set, lookup var in outer contexts too. Handle
OMP_CLAUSE_DEFAULT_FIRSTPRIVATE. Handle vars that are supposed
to be implicitly determined firstprivate for task regions.
(gimplify_scan_omp_clauses): Set GOVD_PRIVATE_OUTER_REF if needed,
if it is set, lookup var in outer contexts too. Set
OMP_CLAUSE_PRIVATE_OUTER_REF if GOVD_PRIVATE_OUTER_REF is set.
Handle OMP_CLAUSE_LASTPRIVATE_STMT, OMP_CLAUSE_COLLAPSE and
OMP_CLAUSE_UNTIED. Take region_type as last argument
instead of in_parallel and in_combined_parallel.
(gimplify_omp_parallel, gimplify_omp_for, gimplify_omp_workshare):
Adjust callers.
(gimplify_adjust_omp_clauses_1): Set OMP_CLAUSE_PRIVATE_OUTER_REF if
GOVD_PRIVATE_OUTER_REF is set. Call omp_finish_clause
langhook.
(new_omp_context): Set default_kind to
OMP_CLAUSE_DEFAULT_UNSPECIFIED for OMP_TASK regions.
(omp_region_type): New enum.
(struct gimplify_omp_ctx): Remove is_parallel and is_combined_parallel
fields, add region_type.
(new_omp_context): Take region_type as argument instead of is_parallel
and is_combined_parallel.
(gimple_add_tmp_var, omp_firstprivatize_variable, omp_notice_variable,
omp_is_private, omp_check_private): Adjust ctx->is_parallel and
ctx->is_combined_parallel checks.
(gimplify_omp_task): New function.
(gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
OMP_CLAUSE_UNTIED.
* omp-low.c (extract_omp_for_data): Use schedule(static)
for schedule(auto). Handle pointer and unsigned iterators.
Compute fd->iter_type. Handle POINTER_PLUS_EXPR increments.
Add loops argument. Extract data for collapsed OMP_FOR loops.
(expand_parallel_call): Assert sched_kind isn't auto,
map runtime schedule to index 3.
(struct omp_for_data_loop): New type.
(struct omp_for_data): Remove v, n1, n2, step, cond_code fields.
Add loop, loops, collapse and iter_type fields.
(workshare_safe_to_combine_p): Disallow combined for if
iter_type is unsigned long long. Don't combine collapse > 1 loops
unless all bounds and steps are constant. Adjust extract_omp_for_data
caller.
(expand_omp_for_generic): Handle pointer, unsigned and long long
iterators. Handle collapsed OMP_FOR loops. Adjust
for struct omp_for_data changes. If libgomp function doesn't return
boolean_type_node, add comparison of the return value with 0.
(expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
pointer, unsigned and long long iterators. Adjust for struct
omp_for_data changes.
(expand_omp_for): Assert sched_kind isn't auto, map runtime schedule
to index 3. Use GOMP_loop_ull*{start,next} if iter_type is
unsigned long long. Allocate loops array, pass it to
extract_omp_for_data. For collapse > 1 loops use always
expand_omp_for_generic.
(omp_context): Add sfield_map and srecord_type fields.
(is_task_ctx, lookup_sfield): New functions.
(use_pointer_for_field): Use is_task_ctx helper. Change first
argument's type from const_tree to tree. Clarify comment.
In OMP_TASK disallow copy-in/out sharing.
(build_sender_ref): Call lookup_sfield instead of lookup_field.
(install_var_field): Add mask argument. Populate both record_type
and srecord_type if needed.
(delete_omp_context): Destroy sfield_map, clear DECL_ABSTRACT_ORIGIN
in srecord_type.
(fixup_child_record_type): Also remap FIELD_DECL's DECL_SIZE{,_UNIT}
and DECL_FIELD_OFFSET.
(scan_sharing_clauses): Adjust install_var_field callers. For
firstprivate clauses on explicit tasks allocate the var by value in
record_type unconditionally, rather than by reference.
Handle OMP_CLAUSE_PRIVATE_OUTER_REF. Scan OMP_CLAUSE_LASTPRIVATE_STMT.
Use is_taskreg_ctx instead of is_parallel_ctx.
Handle OMP_CLAUSE_COLLAPSE and OMP_CLAUSE_UNTIED.
(create_omp_child_function_name): Add task_copy argument, use
*_omp_cpyfn* names if it is true.
(create_omp_child_function): Add task_copy argument, if true create
*_omp_cpyfn* helper function.
(scan_omp_parallel): Adjust create_omp_child_function callers.
Rename parallel_nesting_level to taskreg_nesting_level.
(scan_omp_task): New function.
(lower_rec_input_clauses): Don't run constructors for firstprivate
explicit task vars which are initialized by *_omp_cpyfn*.
Pass outer var ref to omp_clause_default_ctor hook if
OMP_CLAUSE_PRIVATE_OUTER_REF or OMP_CLAUSE_LASTPRIVATE.
Replace OMP_CLAUSE_REDUCTION_PLACEHOLDER decls in
OMP_CLAUSE_REDUCTION_INIT.
(lower_send_clauses): Clear DECL_ABSTRACT_ORIGIN if in task to
avoid duplicate setting of fields. Handle
OMP_CLAUSE_PRIVATE_OUTER_REF.
(lower_send_shared_vars): Use srecord_type if non-NULL. Don't
copy-out if TREE_READONLY, only copy-in.
(expand_task_copyfn): New function.
(expand_task_call): New function.
(struct omp_taskcopy_context): New type.
(task_copyfn_copy_decl, task_copyfn_remap_type, create_task_copyfn):
New functions.
(lower_omp_parallel): Rename to...
(lower_omp_taskreg): ... this. Use OMP_TASKREG_* macros where needed.
Call create_task_copyfn if srecord_type is needed. Adjust
sender_decl type.
(task_shared_vars): New variable.
(check_omp_nesting_restrictions): Warn if work-sharing,
barrier, master or ordered region is closely nested inside OMP_TASK.
Add warnings for barrier if closely nested inside of work-sharing,
ordered, or master region.
(scan_omp_1): Call check_omp_nesting_restrictions even for
GOMP_barrier calls. Rename parallel_nesting_level to
taskreg_nesting_level. Handle OMP_TASK.
(lower_lastprivate_clauses): Even if some lastprivate is found on a
work-sharing construct, continue looking for them on parent parallel
construct.
(lower_omp_for_lastprivate): Add lastprivate clauses
to the beginning of dlist rather than end. Adjust for struct
omp_for_data changes.
(lower_omp_for): Add rec input clauses before OMP_FOR_PRE_BODY,
not after it. Handle collapsed OMP_FOR loops, adjust for
OMP_FOR_{INIT,COND,INCR} changes, adjust extract_omp_for_data
caller.
(get_ws_args_for): Adjust extract_omp_for_data caller.
(scan_omp_for): Handle collapsed OMP_FOR
loops, adjust for OMP_FOR_{INIT,COND,INCR} changes.
(lower_omp_single_simple): If libgomp function doesn't return
boolean_type_node, add comparison of the return value with 0.
(diagnose_sb_1, diagnose_sb_2): Handle collapsed OMP_FOR
loops, adjust for OMP_FOR_{INIT,COND,INCR} changes. Handle OMP_TASK.
(parallel_nesting_level): Rename to...
(taskreg_nesting_level): ... this.
(is_taskreg_ctx): New function.
(build_outer_var_ref, omp_copy_decl): Use is_taskreg_ctx instead
of is_parallel_ctx.
(execute_lower_omp): Rename parallel_nesting_level to
taskreg_nesting_level.
(expand_omp_parallel): Rename to...
(expand_omp_taskreg): ... this. Use OMP_TASKREG_* macros where needed.
Call omp_task_call for OMP_TASK regions.
(expand_omp): Adjust caller, handle OMP_TASK.
(lower_omp_1): Adjust lower_omp_taskreg caller, handle OMP_TASK.
* bitmap.c (bitmap_default_obstack_depth): New variable.
(bitmap_obstack_initialize, bitmap_obstack_release): Do nothing
if argument is NULL and bitmap_default_obstack is already initialized.
* ipa-struct-reorg.c (do_reorg_1): Call bitmap_obstack_release
at the end.
* matrix-reorg.c (matrix_reorg): Likewise.
cp/
* cp-tree.h (cxx_omp_finish_clause, cxx_omp_create_clause_info,
dependent_omp_for_p, begin_omp_task, finish_omp_task,
finish_omp_taskwait): New prototypes.
(cxx_omp_clause_default_ctor): Add outer argument.
(finish_omp_for): Add new clauses argument.
* cp-gimplify.c (cxx_omp_finish_clause): New function.
(cxx_omp_predetermined_sharing): Moved from semantics.c, rewritten.
(cxx_omp_clause_default_ctor): Add outer argument.
(cp_genericize_r): Walk OMP_CLAUSE_LASTPRIVATE_STMT.
* cp-objcp-common.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
* parser.c (cp_parser_omp_for_loop): Parse collapsed for loops.
Add par_clauses argument. If decl is present in parallel's
lastprivate clause, change that clause to shared and add
a lastprivate clause for decl to OMP_FOR_CLAUSES.
Fix wording of error messages. Adjust finish_omp_for caller.
Add clauses argument. Parse loops with random access iterators.
(cp_parser_omp_clause_collapse, cp_parser_omp_clause_untied): New
functions.
(cp_parser_omp_for, cp_parser_omp_parallel): Adjust
cp_parser_omp_for_loop callers.
(cp_parser_omp_for_cond, cp_parser_omp_for_incr): New helper
functions.
(cp_parser_omp_clause_name): Handle collapse and untied
clauses.
(cp_parser_omp_clause_schedule): Handle auto schedule.
(cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
and PRAGMA_OMP_CLAUSE_UNTIED.
(OMP_FOR_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_COLLAPSE.
(OMP_TASK_CLAUSE_MASK): Define.
(cp_parser_omp_task, cp_parser_omp_taskwait): New functions.
(cp_parser_omp_construct): Handle PRAGMA_OMP_TASK.
(cp_parser_pragma): Handle PRAGMA_OMP_TASK and
PRAGMA_OMP_TASKWAIT.
* pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
OMP_CLAUSE_UNTIED. Handle OMP_CLAUSE_LASTPRIVATE_STMT.
(tsubst_omp_for_iterator): New function.
(dependent_omp_for_p): New function.
(tsubst_expr) <case OMP_FOR>: Use it. Handle collapsed OMP_FOR
loops. Adjust finish_omp_for caller. Handle loops with random
access iterators. Adjust for OMP_FOR_{INIT,COND,INCR} changes.
(tsubst_expr): Handle OMP_TASK.
* semantics.c (cxx_omp_create_clause_info): New function.
(finish_omp_clauses): Call it. Handle OMP_CLAUSE_UNTIED and
OMP_CLAUSE_COLLAPSE.
(cxx_omp_predetermined_sharing): Removed.
* semantics.c (finish_omp_for): Allow pointer iterators. Use
handle_omp_for_class_iterator and dependent_omp_for_p. Handle
collapsed for loops. Adjust c_finish_omp_for caller. Add new
clauses argument. Fix check for type dependent cond or incr.
Set OMP_FOR_CLAUSES to clauses. Use cp_convert instead of
fold_convert to convert incr amount to difference_type. Only
fold if not in template. If decl is mentioned in lastprivate
clause, set OMP_CLAUSE_LASTPRIVATE_STMT. Handle loops with random
access iterators. Adjust for OMP_FOR_{INIT,COND,INCR}
changes.
(finish_omp_threadprivate): Allow static class members of the
current class.
(handle_omp_for_class_iterator, begin_omp_task, finish_omp_task,
finish_omp_taskwait): New functions.
* parser.c (cp_parser_binary_expression): Add prec argument.
(cp_parser_assignment_expression): Adjust caller.
* cp-tree.h (outer_curly_brace_block): New prototype.
* decl.c (outer_curly_brace_block): No longer static.
fortran/
* scanner.c (skip_free_comments, skip_fixed_comments): Handle tabs.
* parse.c (next_free): Allow tab after !$omp.
(decode_omp_directive): Handle !$omp task, !$omp taskwait
and !$omp end task.
(case_executable): Add ST_OMP_TASKWAIT.
(case_exec_markers): Add ST_OMP_TASK.
(gfc_ascii_statement): Handle ST_OMP_TASK, ST_OMP_END_TASK and
ST_OMP_TASKWAIT.
(parse_omp_structured_block, parse_executable): Handle ST_OMP_TASK.
* gfortran.h (gfc_find_sym_in_expr): New prototype.
(gfc_statement): Add ST_OMP_TASK, ST_OMP_END_TASK and ST_OMP_TASKWAIT.
(gfc_omp_clauses): Add OMP_SCHED_AUTO to sched_kind,
OMP_DEFAULT_FIRSTPRIVATE to default_sharing. Add collapse and
untied fields.
(gfc_exec_op): Add EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
* f95-lang.c (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP, LANG_HOOKS_OMP_CLAUSE_DTOR,
LANG_HOOKS_OMP_PRIVATE_OUTER_REF): Define.
* trans.h (gfc_omp_clause_default_ctor): Add another argument.
(gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
gfc_omp_clause_dtor, gfc_omp_private_outer_ref): New prototypes.
* types.def (BT_ULONGLONG, BT_PTR_ULONGLONG,
BT_FN_BOOL_ULONGLONGPTR_ULONGLONGPTR,
BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULLPTR_ULLPTR,
BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULL_ULLPTR_ULLPTR,
BT_FN_VOID_PTR_PTR, BT_PTR_FN_VOID_PTR_PTR,
BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): New.
(BT_BOOL): Use integer type with BOOL_TYPE_SIZE rather
than boolean_type_node.
* dump-parse-tree.c (gfc_show_omp_node): Handle EXEC_OMP_TASK,
EXEC_OMP_TASKWAIT, OMP_SCHED_AUTO, OMP_DEFAULT_FIRSTPRIVATE,
untied and collapse clauses.
(gfc_show_code_node): Handle EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
* trans.c (gfc_trans_code): Handle EXEC_OMP_TASK and
EXEC_OMP_TASKWAIT.
* st.c (gfc_free_statement): Likewise.
* resolve.c (gfc_resolve_blocks, resolve_code): Likewise.
(find_sym_in_expr): Rename to...
(gfc_find_sym_in_expr): ... this. No longer static.
(resolve_allocate_expr, resolve_ordinary_assign): Adjust caller.
* match.h (gfc_match_omp_task, gfc_match_omp_taskwait): New
prototypes.
* openmp.c (resolve_omp_clauses): Allow allocatable arrays in
firstprivate, lastprivate, reduction, copyprivate and copyin
clauses.
(omp_current_do_code): Made static.
(omp_current_do_collapse): New variable.
(gfc_resolve_omp_do_blocks): Compute omp_current_do_collapse,
clear omp_current_do_code and omp_current_do_collapse on return.
(gfc_resolve_do_iterator): Handle collapsed do loops.
(resolve_omp_do): Likewise, diagnose errorneous collapsed do loops.
(OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED): Define.
(gfc_match_omp_clauses): Handle default (firstprivate),
schedule (auto), untied and collapse (n) clauses.
(OMP_DO_CLAUSES): Add OMP_CLAUSE_COLLAPSE.
(OMP_TASK_CLAUSES): Define.
(gfc_match_omp_task, gfc_match_omp_taskwait): New functions.
* trans-openmp.c (gfc_omp_private_outer_ref): New function.
(gfc_omp_clause_default_ctor): Add outer argument. For allocatable
arrays allocate them with the bounds of the outer var if outer
var is allocated.
(gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
gfc_omp_clause_dtor): New functions.
(gfc_trans_omp_array_reduction): If decl is allocatable array,
allocate it with outer var's bounds in OMP_CLAUSE_REDUCTION_INIT
and deallocate it in OMP_CLAUSE_REDUCTION_MERGE.
(gfc_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
for assumed-size arrays.
(gfc_trans_omp_do): Add par_clauses argument. If dovar is
present in lastprivate clause and do loop isn't simple,
set OMP_CLAUSE_LASTPRIVATE_STMT. If dovar is present in
parallel's lastprivate clause, change it to shared and add
lastprivate clause to OMP_FOR_CLAUSES. Handle collapsed do loops.
(gfc_trans_omp_directive): Adjust gfc_trans_omp_do callers.
(gfc_trans_omp_parallel_do): Likewise. Move collapse clause to
OMP_FOR from OMP_PARALLEL.
(gfc_trans_omp_clauses): Handle OMP_SCHED_AUTO,
OMP_DEFAULT_FIRSTPRIVATE, untied and collapse clauses.
(gfc_trans_omp_task, gfc_trans_omp_taskwait): New functions.
(gfc_trans_omp_directive): Handle EXEC_OMP_TASK and
EXEC_OMP_TASKWAIT.
gcc/testsuite/
* gcc.dg/gomp/collapse-1.c: New test.
* gcc.dg/gomp/nesting-1.c: New test.
* g++.dg/gomp/task-1.C: New test.
* g++.dg/gomp/predetermined-1.C: New test.
* g++.dg/gomp/tls-4.C: New test.
* gfortran.dg/gomp/collapse1.f90: New test.
* gfortran.dg/gomp/sharing-3.f90: New test.
* gcc.dg/gomp/pr27499.c (foo): Remove is unsigned dg-warning.
* g++.dg/gomp/pr27499.C (foo): Likewise.
* g++.dg/gomp/for-16.C (foo): Likewise.
* g++.dg/gomp/tls-3.C: Remove dg-error, add S::s definition.
* g++.dg/gomp/pr34607.C: Adjust dg-error location.
* g++.dg/gomp/for-16.C (foo): Add a new dg-error.
* gcc.dg/gomp/appendix-a/a.35.4.c: Add dg-warning.
* gcc.dg/gomp/appendix-a/a.35.6.c: Likewise.
* gfortran.dg/gomp/appendix-a/a.35.4.f90: Likewise.
* gfortran.dg/gomp/appendix-a/a.35.6.f90: Likewise.
* gfortran.dg/gomp/omp_parse1.f90: Remove !$omp tab test.
* gfortran.dg/gomp/appendix-a/a.33.4.f90: Remove dg-error
about allocatable array.
* gfortran.dg/gomp/reduction1.f90: Likewise.
libgomp/
* configure.ac (LIBGOMP_GNU_SYMBOL_VERSIONING): New AC_DEFINE.
Substitute also OMP_*LOCK_25*.
* configure: Regenerated.
* config.h.in: Regenerated.
* Makefile.am (libgomp_la_SOURCES): Add loop_ull.c, iter_ull.c,
ptrlock.c and task.c.
* Makefile.in: Regenerated.
* testsuite/Makefile.in: Regenerated.
* task.c: New file.
* loop_ull.c: New file.
* iter_ull.c: New file.
* libgomp.h: Include ptrlock.h.
(enum gomp_task_kind): New type.
(struct gomp_team): Add task_lock, task_queue, task_count,
task_running_count, single_count fields. Add
work_share_list_free_lock ifndef HAVE_SYNC_BUILTINS.
Remove work_share_lock, generation_mask,
oldest_live_gen, num_live_gen and init_work_shares fields, add
work work_share_list_alloc, work_share_list_free and work_share_chunk
fields. Change work_shares from pointer to pointers into an array.
Change ordered_release field into gomp_sem_t ** from flexible array
member. Add implicit_task and initial_work_shares fields.
Move close to the end of the struct.
(struct gomp_team_state): Add single_count, last_work_share,
active_level and level fields, remove work_share_generation.
(gomp_barrier_handle_tasks): New prototype.
(gomp_finish_task): New inline function.
(struct gomp_work_share): Move chunk_size, end, incr into
transparent union/struct, add chunk_size_ull, end_ll, incr_ll and
next_ll fields. Reshuffle fields. Add next_alloc,
next_ws, next_free and inline_ordered_team_ids fields, change
ordered_team_ids into pointer from flexible array member.
Add mode field. Put lock and next into a different cache line
from most of the write-once fields.
(gomp_iter_ull_static_next, gomp_iter_ull_dynamic_next_locked,
gomp_iter_ull_guided_next_locked, gomp_iter_ull_dynamic_next,
gomp_iter_ull_guided_next): New prototypes.
(gomp_new_icv): New prototype.
(struct gomp_thread): Add thread_pool and task fields.
(struct gomp_thread_pool): New type.
(gomp_new_team): New prototype.
(gomp_team_start): Change type of last argument.
(gomp_new_work_share): Removed.
(gomp_init_work_share, gomp_fini_work_share): New prototypes.
(gomp_work_share_init_done): New static inline.
(gomp_throttled_spin_count_var, gomp_available_cpus,
gomp_managed_threads): New extern decls.
(gomp_init_task): New prototype.
(gomp_spin_count_var): New extern var decl.
(LIBGOMP_GNU_SYMBOL_VERSIONING): Undef if no visibility
or no alias support, or if not PIC.
(gomp_init_lock_30, gomp_destroy_lock_30, gomp_set_lock_30,
gomp_unset_lock_30, gomp_test_lock_30, gomp_init_nest_lock_30,
gomp_destroy_nest_lock_30, gomp_set_nest_lock_30,
gomp_unset_nest_lock_30, gomp_test_nest_lock_30, gomp_init_lock_25,
gomp_destroy_lock_25, gomp_set_lock_25, gomp_unset_lock_25,
gomp_test_lock_25, gomp_init_nest_lock_25, gomp_destroy_nest_lock_25,
gomp_set_nest_lock_25, gomp_unset_nest_lock_25,
gomp_test_nest_lock_25): New prototypes.
(omp_lock_symver, strong_alias): Define.
(gomp_remaining_threads_count, gomp_remaining_threads_lock): New
decls.
(gomp_end_task): New.
(struct gomp_task_icv, gomp_global_icv): New.
(gomp_thread_limit_var, gomp_max_active_levels_var): New.
(struct gomp_task): New.
(gomp_nthreads_var, gomp_dyn_var, gomp_nest_var,
gomp_run_sched_var, gomp_run_sched_chunk): Remove.
(gomp_icv): New.
(gomp_schedule_type): Reorder enum to match
omp_sched_t.
* team.c (struct gomp_thread_start_data): Add thread_pool and task
fields.
(gomp_thread_start): Add gomp_team_barrier_wait call.
For non-nested case remove clearing of docked thread thr fields.
Use pool fields instead of global gomp_* variables. Use
gomp_barrier_wait_last when needed. Initialize ts.active_level.
Create tasks for each member thread.
(free_team): Only destroy team barrier, task_lock here and free it.
(gomp_free_thread): Free last_team if non-NULL.
(gomp_team_end): Call gomp_team_barrier_wait instead of
gomp_barrier_wait. For nested case call one extra
gomp_barrier_wait. Move here some destruction from free_team.
Call free_team on pool->last_team if any, rather than freeing
current team. Destroy work_share_list_free_lock ifndef
HAVE_SYNC_BUILTINS.
(gomp_new_icv): New function.
(gomp_threads, gomp_threads_size, gomp_threads_used,
gomp_threads_dock): Removed.
(gomp_thread_destructor): New variable.
(gomp_new_thread_pool, gomp_free_pool_helper, gomp_free_thread): New
functions.
(gomp_team_start): Create new pool if current thread doesn't have
one. Use pool fields instead of global gomp_* variables.
Initialize thread_pool field for new threads. Clear single_count.
Change last argument from ws to team, don't create
new team, set ts.work_share to &team->work_shares[0] and clear
ts.last_work_share. Don't clear ts.work_share_generation.
If number of threads changed, adjust atomically gomp_managed_threads.
Use gomp_init_task instead of gomp_new_task,
set thr->task to the corresponding implicit_task array entry.
Create tasks for each member thread. Initialize ts.level.
(initialize_team): Call pthread_key_create on
gomp_thread_destructor.
(team_destructor): New function.
(new_team): Removed.
(gomp_new_team): New function.
(free_team): Free gomp_work_share blocks chained through next_alloc,
instead of freeing work_shares and destroying work_share_lock.
(gomp_team_end): Call gomp_fini_work_share. If number of threads
changed, adjust atomically gomp_managed_threads. Use gomp_end_task.
* barrier.c (GOMP_barrier): Call gomp_team_barrier_wait instead
of gomp_barrier_wait.
* single.c (GOMP_single_copy_start): Call gomp_team_barrier_wait
instead of gomp_barrier_wait. Call gomp_work_share_init_done
if gomp_work_share_start returned true. Don't unlock ws->lock.
(GOMP_single_copy_end): Call gomp_team_barrier_wait instead
of gomp_barrier_wait.
(GOMP_single_start): Rewritten if HAVE_SYNC_BUILTINS. Call
gomp_work_share_init_done if gomp_work_share_start returned true.
Don't unlock ws->lock.
* work.c: Include stddef.h.
(free_work_share): Use work_share_list_free_lock instead
of atomic chaining ifndef HAVE_SYNC_BUILTINS. Add team argument.
Call gomp_fini_work_share and then either free ws if orphaned, or
put it into work_share_list_free list of the current team.
(alloc_work_share, gomp_init_work_share, gomp_fini_work_share): New
functions.
(gomp_work_share_start, gomp_work_share_end,
gomp_work_share_end_nowait): Rewritten.
* omp_lib.f90.in Change some tabs to spaces to prevent warnings.
(openmp_version): Set to 200805.
(omp_sched_kind, omp_sched_static, omp_sched_dynamic,
omp_sched_guided, omp_sched_auto): New parameters.
(omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
omp_set_max_active_levels, omp_get_max_active_levels,
omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size,
omp_get_active_level): New interfaces.
* omp_lib.h.in (openmp_version): Set to 200805.
(omp_sched_kind, omp_sched_static, omp_sched_dynamic,
omp_sched_guided, omp_sched_auto): New parameters.
(omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
omp_set_max_active_levels, omp_get_max_active_levels,
omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size,
omp_get_active_level): New externals.
* loop.c: Include limits.h.
(GOMP_loop_runtime_next, GOMP_loop_ordered_runtime_next): Handle
GFS_AUTO.
(GOMP_loop_runtime_start, GOMP_loop_ordered_runtime_start):
Likewise. Use gomp_icv.
(gomp_loop_static_start, gomp_loop_dynamic_start): Clear
ts.static_trip here.
(gomp_loop_static_start, gomp_loop_ordered_static_start): Call
gomp_work_share_init_done after gomp_loop_init. Don't unlock ws->lock.
(gomp_loop_dynamic_start, gomp_loop_guided_start): Call
gomp_work_share_init_done after gomp_loop_init. If HAVE_SYNC_BUILTINS,
don't unlock ws->lock, otherwise lock it.
(gomp_loop_ordered_dynamic_start, gomp_loop_ordered_guided_start): Call
gomp_work_share_init_done after gomp_loop_init. Lock ws->lock.
(gomp_parallel_loop_start): Call gomp_new_team instead of
gomp_new_work_share. Call gomp_loop_init on &team->work_shares[0].
Adjust gomp_team_start caller. Pass 0 as second argument to
gomp_resolve_num_threads.
(gomp_loop_init): For GFS_DYNAMIC, multiply ws->chunk_size by incr.
If adding ws->chunk_size nthreads + 1 times after end won't
overflow, set ws->mode to 1.
* libgomp_g.h (GOMP_loop_ull_static_start, GOMP_loop_ull_dynamic_start,
GOMP_loop_ull_guided_start, GOMP_loop_ull_runtime_start,
GOMP_loop_ull_ordered_static_start,
GOMP_loop_ull_ordered_dynamic_start,
GOMP_loop_ull_ordered_guided_start,
GOMP_loop_ull_ordered_runtime_start, GOMP_loop_ull_static_next,
GOMP_loop_ull_dynamic_next, GOMP_loop_ull_guided_next,
GOMP_loop_ull_runtime_next, GOMP_loop_ull_ordered_static_next,
GOMP_loop_ull_ordered_dynamic_next, GOMP_loop_ull_ordered_guided_next,
GOMP_loop_ull_ordered_runtime_next, GOMP_task, GOMP_taskwait): New
prototypes.
* libgomp.map: Export lock routines also @@OMP_2.0.
(GOMP_loop_ordered_dynamic_first,
GOMP_loop_ordered_guided_first, GOMP_loop_ordered_runtime_first,
GOMP_loop_ordered_static_first): Remove.
(GOMP_loop_ull_dynamic_next, GOMP_loop_ull_dynamic_start,
GOMP_loop_ull_guided_next, GOMP_loop_ull_guided_start,
GOMP_loop_ull_ordered_dynamic_next,
GOMP_loop_ull_ordered_dynamic_start,
GOMP_loop_ull_ordered_guided_next,
GOMP_loop_ull_ordered_guided_start,
GOMP_loop_ull_ordered_runtime_next,
GOMP_loop_ull_ordered_runtime_start,
GOMP_loop_ull_ordered_static_next,
GOMP_loop_ull_ordered_static_start,
GOMP_loop_ull_runtime_next, GOMP_loop_ull_runtime_start,
GOMP_loop_ull_static_next, GOMP_loop_ull_static_start,
GOMP_task, GOMP_taskwait): Export @@GOMP_2.0.
(omp_set_schedule, omp_get_schedule,
omp_get_thread_limit, omp_set_max_active_levels,
omp_get_max_active_levels, omp_get_level,
omp_get_ancestor_thread_num, omp_get_team_size, omp_get_active_level,
omp_set_schedule_, omp_set_schedule_8_,
omp_get_schedule_, omp_get_schedule_8_, omp_get_thread_limit_,
omp_set_max_active_levels_, omp_set_max_active_levels_8_,
omp_get_max_active_levels_, omp_get_level_,
omp_get_ancestor_thread_num_, omp_get_ancestor_thread_num_8_,
omp_get_team_size_, omp_get_team_size_8_, omp_get_active_level_):
New exports @@OMP_3.0.
* omp.h.in (omp_sched_t): New type.
(omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
omp_set_max_active_levels, omp_get_max_active_levels,
omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size,
omp_get_active_level): New prototypes.
* env.c (gomp_spin_count_var, gomp_throttled_spin_count_var,
gomp_available_cpus, gomp_managed_threads, gomp_max_active_levels_var,
gomp_thread_limit_var, gomp_remaining_threads_count,
gomp_remaining_threads_lock): New variables.
(parse_spincount): New function.
(initialize_env): Call gomp_init_num_threads unconditionally.
Initialize gomp_available_cpus. Call parse_spincount,
initialize gomp_{,throttled_}spin_count_var
depending on presence and value of OMP_WAIT_POLICY and
GOMP_SPINCOUNT env vars. Handle GOMP_BLOCKTIME env var.
Handle OMP_WAIT_POLICY, OMP_MAX_ACTIVE_LEVELS,
OMP_THREAD_LIMIT, OMP_STACKSIZE env vars. Handle unit specification
for GOMP_STACKSIZE. Initialize gomp_remaining_threads_count and
gomp_remaining_threads_lock if needed. Use gomp_global_icv.
(gomp_nthreads_var, gomp_dyn_var, gomp_nest_var,
gomp_run_sched_var, gomp_run_sched_chunk): Remove.
(gomp_global_icv): New.
(parse_schedule): Use it. Parse "auto".
(omp_set_num_threads): Use gomp_icv.
(omp_set_dynamic, omp_get_dynamic, omp_set_nested, omp_get_nested):
Likewise.
(omp_get_max_threads): Move from parallel.c.
(omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
omp_set_max_active_levels, omp_get_max_active_levels): New functions,
add ialias.
(parse_stacksize, parse_wait_policy): New functions.
* fortran.c: Rewrite lock wrappers, if symbol versioning provide
both wrappers for compatibility and new locks.
(omp_set_schedule, omp_get_schedule,
omp_get_thread_limit, omp_set_max_active_levels,
omp_get_max_active_levels, omp_get_level,
omp_get_ancestor_thread_num, omp_get_team_size,
omp_get_active_level): New ialias_redirect.
(omp_set_schedule_, omp_set_schedule_8_,
omp_get_schedule_, omp_get_schedule_8_, omp_get_thread_limit_,
omp_set_max_active_levels_, omp_set_max_active_levels_8_,
omp_get_max_active_levels_, omp_get_level_,
omp_get_ancestor_thread_num_, omp_get_ancestor_thread_num_8_,
omp_get_team_size_, omp_get_team_size_8_, omp_get_active_level_):
New functions.
* parallel.c: Include limits.h.
(gomp_resolve_num_threads): Add count argument. Rewritten.
(GOMP_parallel_start): Call gomp_new_team and pass that as last
argument to gomp_team_start. Pass 0 as second argument to
gomp_resolve_num_threads.
(GOMP_parallel_end): Decrease gomp_remaining_threads_count
if gomp_thread_limit_var != ULONG_MAX.
(omp_in_parallel): Implement using ts.active_level.
(omp_get_max_threads): Move to env.c.
(omp_get_level, omp_get_ancestor_thread_num,
omp_get_team_size, omp_get_active_level): New functions,
add ialias.
* sections.c (GOMP_sections_start): Call gomp_work_share_init_done
after gomp_sections_init. If HAVE_SYNC_BUILTINS, call
gomp_iter_dynamic_next instead of the _locked variant and don't take
lock around it, otherwise acquire it before calling
gomp_iter_dynamic_next_locked.
(GOMP_sections_next): If HAVE_SYNC_BUILTINS, call
gomp_iter_dynamic_next instead of the _locked variant and don't take
lock around it.
(GOMP_parallel_sections_start): Call gomp_new_team instead of
gomp_new_work_share. Call gomp_sections_init on &team->work_shares[0].
Adjust gomp_team_start caller. Pass count as second argument to
gomp_resolve_num_threads, don't adjust num_threads after the call.
Use gomp_icv.
* iter.c (gomp_iter_dynamic_next_locked): Don't multiply
ws->chunk_size by incr.
(gomp_iter_dynamic_next): Likewise. If ws->mode, use more efficient
code.
* libgomp_f.h.in (omp_lock_25_arg_t, omp_nest_lock_25_arg_t): New
types.
(omp_lock_25_arg, omp_nest_lock_25_arg): New macros.
(omp_check_defines): Check even the compat defines.
* config/linux/ptrlock.c: New file.
* config/linux/ptrlock.h: New file.
* config/linux/wait.h: New file.
* config/posix/ptrlock.c: New file.
* config/posix/ptrlock.h: New file.
* config/linux/bar.h (gomp_team_barrier_wait,
gomp_team_barrier_wait_end, gomp_team_barrier_wake): New prototypes.
(gomp_team_barrier_set_task_pending,
gomp_team_barrier_clear_task_pending,
gomp_team_barrier_set_waiting_for_tasks,
gomp_team_barrier_waiting_for_tasks,
gomp_team_barrier_done): New inlines.
(gomp_barrier_t): Rewritten.
(gomp_barrier_state_t): New typedef.
(gomp_barrier_init, gomp_barrier_reinit, gomp_barrier_destroy,
gomp_barrier_wait_start): Rewritten.
(gomp_barrier_wait_end): Change second argument to
gomp_barrier_state_t.
(gomp_barrier_last_thread, gomp_barrier_wait_last): New static
inlines.
* config/linux/bar.c: Include wait.h instead of libgomp.h and
futex.h.
(gomp_barrier_wait_end): Rewritten.
(gomp_team_barrier_wait, gomp_team_barrier_wait_end,
gomp_team_barrier_wake, gomp_barrier_wait_last): New functions.
* config/posix/bar.h (gomp_barrier_t): Add generation field.
(gomp_barrier_state_t): New typedef.
(gomp_team_barrier_wait,
gomp_team_barrier_wait_end, gomp_team_barrier_wake): New prototypes.
(gomp_barrier_wait_start): Or all but low 2 bits from generation
into the return value. Return gomp_barrier_state_t.
(gomp_team_barrier_set_task_pending,
gomp_team_barrier_clear_task_pending,
gomp_team_barrier_set_waiting_for_tasks,
gomp_team_barrier_waiting_for_tasks,
gomp_team_barrier_done): New inlines.
(gomp_barrier_wait_end): Change second argument to
gomp_barrier_state_t.
(gomp_barrier_last_thread, gomp_barrier_wait_last): New static
inlines.
* config/posix/bar.c (gomp_barrier_init): Clear generation field.
(gomp_barrier_wait_end): Change second argument to
gomp_barrier_state_t.
(gomp_team_barrier_wait, gomp_team_barrier_wait_end,
gomp_team_barrier_wake): New functions.
* config/linux/mutex.c: Include wait.h instead of libgomp.h and
futex.h.
(gomp_futex_wake, gomp_futex_wait): New variables.
(gomp_mutex_lock_slow): Call do_wait instead of futex_wait.
* config/linux/lock.c: Rewrite to make locks task owned,
for backwards compatibility provide the old entrypoints
if symbol versioning. Include wait.h instead of libgomp.h and
futex.h.
(gomp_set_nest_lock_25): Call do_wait instead of futex_wait.
* config/posix95/lock.c: Rewrite to make locks task owned,
for backwards compatibility provide the old entrypoints
if symbol versioning.
* config/posix/lock.c: Rewrite to make locks task owned,
for backwards compatibility provide the old entrypoints
if symbol versioning.
* config/linux/proc.c (gomp_init_num_threads): Use gomp_global_icv.
(get_num_procs, gomp_dynamic_max_threads): Use gomp_icv.
* config/posix/proc.c, config/mingw32/proc.c: Similarly.
* config/linux/powerpc/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
(sys_futex0): Return error code.
(futex_wake, futex_wait): If ENOSYS was returned, clear
FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
(cpu_relax, atomic_write_barrier): New static inlines.
* config/linux/alpha/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
(futex_wake, futex_wait): If ENOSYS was returned, clear
FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
(cpu_relax, atomic_write_barrier): New static inlines.
* config/linux/x86/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
(sys_futex0): Return error code.
(futex_wake, futex_wait): If ENOSYS was returned, clear
FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
(cpu_relax, atomic_write_barrier): New static inlines.
* config/linux/s390/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
(sys_futex0): Return error code.
(futex_wake, futex_wait): If ENOSYS was returned, clear
FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
(cpu_relax, atomic_write_barrier): New static inlines.
* config/linux/ia64/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
(sys_futex0): Return error code.
(futex_wake, futex_wait): If ENOSYS was returned, clear
FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
(cpu_relax, atomic_write_barrier): New static inlines.
* config/linux/sparc/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
(sys_futex0): Return error code.
(futex_wake, futex_wait): If ENOSYS was returned, clear
FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
(cpu_relax, atomic_write_barrier): New static inlines.
* config/linux/sem.c: Include wait.h instead of libgomp.h and
futex.h.
(gomp_sem_wait_slow): Call do_wait instead of futex_wait.
* config/linux/affinity.c: Assume HAVE_SYNC_BUILTINS.
* config/linux/omp-lock.h (omp_lock_25_t, omp_nest_lock_25_t): New
types.
(omp_nest_lock_t): Change owner into void *, add lock field.
* config/posix95/omp-lock.h: Include semaphore.h.
(omp_lock_25_t, omp_nest_lock_25_t): New types.
(omp_lock_t): Use sem_t instead of mutex if semaphores
aren't broken.
(omp_nest_lock_t): Likewise. Change owner to void *.
* config/posix/omp-lock.h: Include semaphore.h.
(omp_lock_25_t, omp_nest_lock_25_t): New types.
(omp_lock_t): Use sem_t instead of mutex if semaphores
aren't broken.
(omp_nest_lock_t): Likewise. Add owner field.
* testsuite/libgomp.c/collapse-1.c: New test.
* testsuite/libgomp.c/collapse-2.c: New test.
* testsuite/libgomp.c/collapse-3.c: New test.
* testsuite/libgomp.c/icv-1.c: New test.
* testsuite/libgomp.c/icv-2.c: New test.
* testsuite/libgomp.c/lib-2.c: New test.
* testsuite/libgomp.c/lock-1.c: New test.
* testsuite/libgomp.c/lock-2.c: New test.
* testsuite/libgomp.c/lock-3.c: New test.
* testsuite/libgomp.c/loop-4.c: New test.
* testsuite/libgomp.c/loop-5.c: New test.
* testsuite/libgomp.c/loop-6.c: New test.
* testsuite/libgomp.c/loop-7.c: New test.
* testsuite/libgomp.c/loop-8.c: New test.
* testsuite/libgomp.c/loop-9.c: New test.
* testsuite/libgomp.c/nested-3.c: New test.
* testsuite/libgomp.c/nestedfn-6.c: New test.
* testsuite/libgomp.c/sort-1.c: New test.
* testsuite/libgomp.c/task-1.c: New test.
* testsuite/libgomp.c/task-2.c: New test.
* testsuite/libgomp.c/task-3.c: New test.
* testsuite/libgomp.c/task-4.c: New test.
* testsuite/libgomp.c++/c++.exp: Add libstdc++-v3 build includes
to C++ testsuite default compiler options.
* testsuite/libgomp.c++/collapse-1.C: New test.
* testsuite/libgomp.c++/collapse-2.C: New test.
* testsuite/libgomp.c++/ctor-10.C: New test.
* testsuite/libgomp.c++/for-1.C: New test.
* testsuite/libgomp.c++/for-2.C: New test.
* testsuite/libgomp.c++/for-3.C: New test.
* testsuite/libgomp.c++/for-4.C: New test.
* testsuite/libgomp.c++/for-5.C: New test.
* testsuite/libgomp.c++/loop-8.C: New test.
* testsuite/libgomp.c++/loop-9.C: New test.
* testsuite/libgomp.c++/loop-10.C: New test.
* testsuite/libgomp.c++/task-1.C: New test.
* testsuite/libgomp.c++/task-2.C: New test.
* testsuite/libgomp.c++/task-3.C: New test.
* testsuite/libgomp.c++/task-4.C: New test.
* testsuite/libgomp.c++/task-5.C: New test.
* testsuite/libgomp.c++/task-6.C: New test.
* testsuite/libgomp.fortran/allocatable1.f90: New test.
* testsuite/libgomp.fortran/allocatable2.f90: New test.
* testsuite/libgomp.fortran/allocatable3.f90: New test.
* testsuite/libgomp.fortran/allocatable4.f90: New test.
* testsuite/libgomp.fortran/collapse1.f90: New test.
* testsuite/libgomp.fortran/collapse2.f90: New test.
* testsuite/libgomp.fortran/collapse3.f90: New test.
* testsuite/libgomp.fortran/collapse4.f90: New test.
* testsuite/libgomp.fortran/lastprivate1.f90: New test.
* testsuite/libgomp.fortran/lastprivate2.f90: New test.
* testsuite/libgomp.fortran/lib4.f90: New test.
* testsuite/libgomp.fortran/lock-1.f90: New test.
* testsuite/libgomp.fortran/lock-2.f90: New test.
* testsuite/libgomp.fortran/nested1.f90: New test.
* testsuite/libgomp.fortran/nestedfn4.f90: New test.
* testsuite/libgomp.fortran/strassen.f90: New test.
* testsuite/libgomp.fortran/tabs1.f90: New test.
* testsuite/libgomp.fortran/tabs2.f: New test.
* testsuite/libgomp.fortran/task1.f90: New test.
* testsuite/libgomp.fortran/task2.f90: New test.
* testsuite/libgomp.fortran/vla4.f90: Add dg-warning.
* testsuite/libgomp.fortran/vla5.f90: Likewise.
* testsuite/libgomp.c/pr26943-2.c: Likewise.
* testsuite/libgomp.c/pr26943-3.c: Likewise.
* testsuite/libgomp.c/pr26943-4.c: Likewise.
Co-Authored-By: Jakob Blomer <jakob.blomer@ira.uka.de>
Co-Authored-By: Richard Henderson <rth@redhat.com>
Co-Authored-By: Ulrich Drepper <drepper@redhat.com>
From-SVN: r136433
2008-06-06 15:01:54 +02:00
|
|
|
2008-06-06 Jakub Jelinek <jakub@redhat.com>
|
|
|
|
|
|
|
|
* scanner.c (skip_free_comments, skip_fixed_comments): Handle tabs.
|
|
|
|
* parse.c (next_free): Allow tab after !$omp.
|
|
|
|
(decode_omp_directive): Handle !$omp task, !$omp taskwait
|
|
|
|
and !$omp end task.
|
|
|
|
(case_executable): Add ST_OMP_TASKWAIT.
|
|
|
|
(case_exec_markers): Add ST_OMP_TASK.
|
|
|
|
(gfc_ascii_statement): Handle ST_OMP_TASK, ST_OMP_END_TASK and
|
|
|
|
ST_OMP_TASKWAIT.
|
|
|
|
(parse_omp_structured_block, parse_executable): Handle ST_OMP_TASK.
|
|
|
|
* gfortran.h (gfc_find_sym_in_expr): New prototype.
|
|
|
|
(gfc_statement): Add ST_OMP_TASK, ST_OMP_END_TASK and ST_OMP_TASKWAIT.
|
|
|
|
(gfc_omp_clauses): Add OMP_SCHED_AUTO to sched_kind,
|
|
|
|
OMP_DEFAULT_FIRSTPRIVATE to default_sharing. Add collapse and
|
|
|
|
untied fields.
|
|
|
|
(gfc_exec_op): Add EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
|
|
|
|
* f95-lang.c (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
|
|
|
|
LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP, LANG_HOOKS_OMP_CLAUSE_DTOR,
|
|
|
|
LANG_HOOKS_OMP_PRIVATE_OUTER_REF): Define.
|
|
|
|
* trans.h (gfc_omp_clause_default_ctor): Add another argument.
|
|
|
|
(gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
|
|
|
|
gfc_omp_clause_dtor, gfc_omp_private_outer_ref): New prototypes.
|
|
|
|
* types.def (BT_ULONGLONG, BT_PTR_ULONGLONG,
|
|
|
|
BT_FN_BOOL_ULONGLONGPTR_ULONGLONGPTR,
|
|
|
|
BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULLPTR_ULLPTR,
|
|
|
|
BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULL_ULLPTR_ULLPTR,
|
|
|
|
BT_FN_VOID_PTR_PTR, BT_PTR_FN_VOID_PTR_PTR,
|
|
|
|
BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): New.
|
|
|
|
(BT_BOOL): Use integer type with BOOL_TYPE_SIZE rather
|
|
|
|
than boolean_type_node.
|
|
|
|
* dump-parse-tree.c (gfc_show_omp_node): Handle EXEC_OMP_TASK,
|
|
|
|
EXEC_OMP_TASKWAIT, OMP_SCHED_AUTO, OMP_DEFAULT_FIRSTPRIVATE,
|
|
|
|
untied and collapse clauses.
|
|
|
|
(gfc_show_code_node): Handle EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
|
|
|
|
* trans.c (gfc_trans_code): Handle EXEC_OMP_TASK and
|
|
|
|
EXEC_OMP_TASKWAIT.
|
|
|
|
* st.c (gfc_free_statement): Likewise.
|
|
|
|
* resolve.c (gfc_resolve_blocks, resolve_code): Likewise.
|
|
|
|
(find_sym_in_expr): Rename to...
|
|
|
|
(gfc_find_sym_in_expr): ... this. No longer static.
|
|
|
|
(resolve_allocate_expr, resolve_ordinary_assign): Adjust caller.
|
|
|
|
* match.h (gfc_match_omp_task, gfc_match_omp_taskwait): New
|
|
|
|
prototypes.
|
|
|
|
* openmp.c (resolve_omp_clauses): Allow allocatable arrays in
|
|
|
|
firstprivate, lastprivate, reduction, copyprivate and copyin
|
|
|
|
clauses.
|
|
|
|
(omp_current_do_code): Made static.
|
|
|
|
(omp_current_do_collapse): New variable.
|
|
|
|
(gfc_resolve_omp_do_blocks): Compute omp_current_do_collapse,
|
|
|
|
clear omp_current_do_code and omp_current_do_collapse on return.
|
|
|
|
(gfc_resolve_do_iterator): Handle collapsed do loops.
|
|
|
|
(resolve_omp_do): Likewise, diagnose errorneous collapsed do loops.
|
|
|
|
(OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED): Define.
|
|
|
|
(gfc_match_omp_clauses): Handle default (firstprivate),
|
|
|
|
schedule (auto), untied and collapse (n) clauses.
|
|
|
|
(OMP_DO_CLAUSES): Add OMP_CLAUSE_COLLAPSE.
|
|
|
|
(OMP_TASK_CLAUSES): Define.
|
|
|
|
(gfc_match_omp_task, gfc_match_omp_taskwait): New functions.
|
|
|
|
* trans-openmp.c (gfc_omp_private_outer_ref): New function.
|
|
|
|
(gfc_omp_clause_default_ctor): Add outer argument. For allocatable
|
|
|
|
arrays allocate them with the bounds of the outer var if outer
|
|
|
|
var is allocated.
|
|
|
|
(gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
|
|
|
|
gfc_omp_clause_dtor): New functions.
|
|
|
|
(gfc_trans_omp_array_reduction): If decl is allocatable array,
|
|
|
|
allocate it with outer var's bounds in OMP_CLAUSE_REDUCTION_INIT
|
|
|
|
and deallocate it in OMP_CLAUSE_REDUCTION_MERGE.
|
|
|
|
(gfc_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
|
|
|
|
for assumed-size arrays.
|
|
|
|
(gfc_trans_omp_do): Add par_clauses argument. If dovar is
|
|
|
|
present in lastprivate clause and do loop isn't simple,
|
|
|
|
set OMP_CLAUSE_LASTPRIVATE_STMT. If dovar is present in
|
|
|
|
parallel's lastprivate clause, change it to shared and add
|
|
|
|
lastprivate clause to OMP_FOR_CLAUSES. Handle collapsed do loops.
|
|
|
|
(gfc_trans_omp_directive): Adjust gfc_trans_omp_do callers.
|
|
|
|
(gfc_trans_omp_parallel_do): Likewise. Move collapse clause to
|
|
|
|
OMP_FOR from OMP_PARALLEL.
|
|
|
|
(gfc_trans_omp_clauses): Handle OMP_SCHED_AUTO,
|
|
|
|
OMP_DEFAULT_FIRSTPRIVATE, untied and collapse clauses.
|
|
|
|
(gfc_trans_omp_task, gfc_trans_omp_taskwait): New functions.
|
|
|
|
(gfc_trans_omp_directive): Handle EXEC_OMP_TASK and
|
|
|
|
EXEC_OMP_TASKWAIT.
|
|
|
|
|
2008-06-04 23:04:32 +02:00
|
|
|
2008-06-04 Janus Weil <janus@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/36322
|
|
|
|
PR fortran/36275
|
|
|
|
* resolve.c (resolve_symbol): Correctly copy the interface for a
|
|
|
|
PROCEDURE declaration.
|
|
|
|
|
2008-06-02 23:50:23 +02:00
|
|
|
2008-06-02 Janus Weil <janus@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/36361
|
|
|
|
* symbol.c (gfc_add_allocatable,gfc_add_dimension,
|
|
|
|
gfc_add_explicit_interface): Added checks.
|
|
|
|
* decl.c (attr_decl1): Added missing "var_locus".
|
|
|
|
* parse.c (parse_interface): Checking for errors.
|
|
|
|
|
2008-06-02 22:03:03 +02:00
|
|
|
2008-06-02 Daniel Kraft <d@domob.eu>
|
|
|
|
|
|
|
|
* gfortran.h: New statement-type ST_FINAL for FINAL declarations.
|
|
|
|
(struct gfc_symbol): New member f2k_derived.
|
|
|
|
(struct gfc_namespace): New member finalizers, for use in the above
|
|
|
|
mentioned f2k_derived namespace.
|
|
|
|
(struct gfc_finalizer): New type defined for finalizers linked list.
|
|
|
|
* match.h (gfc_match_final_decl): New function header.
|
|
|
|
* decl.c (gfc_match_derived_decl): Create f2k_derived namespace on
|
|
|
|
constructed symbol node.
|
|
|
|
(gfc_match_final_decl): New function to match a FINAL declaration line.
|
|
|
|
* parse.c (decode_statement): match-call for keyword FINAL.
|
|
|
|
(parse_derived): Parse CONTAINS section and accept FINAL statements.
|
|
|
|
* resolve.c (gfc_resolve_finalizers): New function to resolve (that is
|
|
|
|
in this case, check) a list of finalizer procedures.
|
|
|
|
(resolve_fl_derived): Call gfc_resolve_finalizers here.
|
|
|
|
* symbol.c (gfc_get_namespace): Initialize new finalizers to NULL.
|
|
|
|
(gfc_free_namespace): Free finalizers list.
|
|
|
|
(gfc_new_symbol): Initialize new f2k_derived to NULL.
|
|
|
|
(gfc_free_symbol): Free f2k_derived namespace.
|
|
|
|
(gfc_free_finalizer): New function to free a single gfc_finalizer node.
|
|
|
|
(gfc_free_finalizer_list): New function to free a linked list of
|
|
|
|
gfc_finalizer nodes.
|
|
|
|
|
2008-06-02 18:41:08 +02:00
|
|
|
2008-06-02 Daniel Franke <franke.daniel@gmail.com>
|
|
|
|
|
|
|
|
PR fortran/36375
|
|
|
|
PR fortran/36377
|
|
|
|
* cpp.c (gfc_cpp_init): Do not initialize builtins if
|
|
|
|
processing already preprocessed input.
|
|
|
|
(gfc_cpp_preprocess): Finalize output with newline.
|
|
|
|
|
2008-06-01 02:30:37 +02:00
|
|
|
2008-05-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
|
|
|
|
|
|
|
* intrinsic.texi: Revert wrong commit.
|
|
|
|
|
2008-05-31 21:19:48 +02:00
|
|
|
2008-05-31 Steven G. Kargl <kargls@comcast.net>
|
|
|
|
|
|
|
|
* arith.c (gfc_arith_init_1): Remove now unused r and c variables.
|
|
|
|
Cleanup numerical inquiry function initialization.
|
|
|
|
(gfc_arith_done_1): Replace multiple mpfr_clear() invocations with
|
|
|
|
a single mpfr_clears().
|
|
|
|
(gfc_check_real_range): Re-arrange logic to eliminate multiple
|
|
|
|
unnecessary branching and assignments.
|
|
|
|
(gfc_arith_times): Use mpfr_clears() in preference to multiple
|
|
|
|
mpfr_clear().
|
|
|
|
(gfc_arith_divide): Ditto.
|
|
|
|
(complex_reciprocal): Eliminate now unused variables a, re, im.
|
|
|
|
Cleanup the mpfr abuse. Use mpfr_clears() in preference to
|
|
|
|
multiple mpfr_clear().
|
|
|
|
(complex_pow): Fix comment whitespace. Use mpfr_clears() in
|
|
|
|
preference to multiple mpfr_clear().
|
|
|
|
* simplify.c (gfc_simplify_and): Remove blank line.
|
|
|
|
(gfc_simplify_atan2): Move error checking earlier to eliminate
|
|
|
|
a now unnecessay gfc_free_expr().
|
|
|
|
(gfc_simplify_bessel_j0): Remove unnecessary gfc_set_model_kind().
|
|
|
|
(gfc_simplify_bessel_j1): Ditto.
|
|
|
|
(gfc_simplify_bessel_jn): Ditto.
|
|
|
|
(gfc_simplify_bessel_y0): Ditto.
|
|
|
|
(gfc_simplify_bessel_y1): Ditto.
|
|
|
|
(gfc_simplify_bessel_yn): Ditto.
|
|
|
|
(only_convert_cmplx_boz): Eliminate unnecessary duplicate code, and
|
|
|
|
combine nested if statement rational expressions.
|
|
|
|
(gfc_simplify_cos): Use mpfr_clears() in preference to multiple
|
|
|
|
mpfr_clear().
|
|
|
|
(gfc_simplify_exp): Ditto.
|
|
|
|
(gfc_simplify_fraction): Move gfc_set_model_kind() to after the
|
|
|
|
special case of 0. Use mpfr_clears() in preference to multiple
|
|
|
|
mpfr_clear().
|
|
|
|
(gfc_simplify_gamma): Eliminate unnecessary gfc_set_model_kind().
|
|
|
|
(gfc_simplify_lgamma): Ditto.
|
|
|
|
(gfc_simplify_log10): Ditto.
|
|
|
|
(gfc_simplify_log): Move gfc_set_model_kind () inside switch
|
|
|
|
statement. Use mpfr_clears() in preference to multiple mpfr_clear().
|
|
|
|
(gfc_simplify_mod): Eliminate now unused variables quot, iquot,
|
|
|
|
and term. Simplify the mpfr magic.
|
|
|
|
(gfc_simplify_modulo): Ditto.
|
|
|
|
(gfc_simplify_nearest): Eliminate unnecessary gfc_set_model_kind().
|
|
|
|
(gfc_simplify_scale): Use mpfr_clears() in preference to multiple
|
|
|
|
mpfr_clear().
|
|
|
|
(gfc_simplify_sin): Ditto
|
|
|
|
(gfc_simplify_sqrt): Ditto
|
|
|
|
(gfc_simplify_set_exponent): Move gfc_set_model_kind() to after the
|
|
|
|
special case of 0. Use mpfr_clears() in preference to multiple
|
|
|
|
mpfr_clear().
|
|
|
|
|
2008-05-29 20:21:35 +02:00
|
|
|
2008-05-29 Daniel Franke <franke.daniel@gmail.com>
|
|
|
|
|
|
|
|
PR target/36348
|
|
|
|
* Make-lang.in (F95_OBJS): Added dependency on FORTRAN_TARGET_OBJS.
|
|
|
|
|
2008-05-29 17:24:46 +02:00
|
|
|
2008-05-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
|
|
|
|
|
|
|
* scanner.c (load_line): Add first_char argument. Don't call ungetc.
|
|
|
|
(gfc_read_orig_filename): Adjust call to load_line. Don't call
|
|
|
|
ungetc.
|
|
|
|
(load_file): Adjust call to load_line.
|
|
|
|
|
2008-05-28 23:27:56 +02:00
|
|
|
2008-05-28 Janus Weil <janus@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/36325
|
|
|
|
PR fortran/35830
|
|
|
|
* interface.c (gfc_procedure_use): Enable argument checking for
|
|
|
|
external procedures with explicit interface.
|
|
|
|
* symbol.c (check_conflict): Fix conflict checking for externals.
|
|
|
|
(copy_formal_args): Fix handling of arrays.
|
|
|
|
* resolve.c (resolve_specific_f0, resolve_specific_s0): Fix handling
|
|
|
|
of intrinsics.
|
|
|
|
* parse.c (parse_interface): Non-abstract INTERFACE statement implies
|
|
|
|
EXTERNAL attribute.
|
|
|
|
|
re PR fortran/36319 (Segfault with wide characters in DATA)
PR fortran/36319
* intrinsic.c (gfc_convert_chartype): Don't mark conversion
function as pure.
* trans-array.c (gfc_trans_array_ctor_element): Divide element
size by the size of one character to obtain length.
* iresolve.c (gfc_resolve_cshift): Call the _char4 variant when
appropriate.
(gfc_resolve_eoshift): Likewise.
* trans-intrinsic.c (gfc_conv_intrinsic_ctime): Minor beautification.
(gfc_conv_intrinsic_fdate): Minor beautification.
(gfc_conv_intrinsic_ttynam): Minor beautification.
(gfc_conv_intrinsic_minmax_char): Allow all character kinds.
(size_of_string_in_bytes): New function.
(gfc_conv_intrinsic_size): Call size_of_string_in_bytes for
character expressions.
(gfc_conv_intrinsic_sizeof): Likewise.
(gfc_conv_intrinsic_array_transfer): Likewise.
(gfc_conv_intrinsic_trim): Allow all character kinds. Minor
beautification.
(gfc_conv_intrinsic_repeat): Fix comment typo.
* simplify.c (gfc_convert_char_constant): Take care of conversion
of array constructors.
* intrinsics/string_intrinsics_inc.c (string_index): Return
correct value for zero-length substring.
* intrinsics/cshift0.c: Add _char4 variant.
* intrinsics/eoshift0.c (eoshift0): Allow filler to be a pattern
wider than a single byte. Add _char4 variant and use above
functionality.
* intrinsics/eoshift2.c (eoshift2): Likewise.
* m4/eoshift1.m4: Likewise.
* m4/eoshift3.m4: Likewise.
* m4/cshift1.m4: Add _char4 variants.
* gfortran.map (GFORTRAN_1.1): Add _gfortran_cshift0_1_char4,
_gfortran_cshift0_2_char4, _gfortran_cshift0_4_char4,
_gfortran_cshift0_8_char4, _gfortran_cshift1_16_char4,
_gfortran_cshift1_4_char4, _gfortran_cshift1_8_char4,
_gfortran_eoshift0_1_char4, _gfortran_eoshift0_2_char4,
_gfortran_eoshift0_4_char4, _gfortran_eoshift0_8_char4,
_gfortran_eoshift1_16_char4, _gfortran_eoshift1_4_char4,
_gfortran_eoshift1_8_char4, _gfortran_eoshift2_1_char4,
_gfortran_eoshift2_2_char4, _gfortran_eoshift2_4_char4,
_gfortran_eoshift2_8_char4, _gfortran_eoshift3_16_char4,
_gfortran_eoshift3_4_char4 and _gfortran_eoshift3_8_char4.
* generated/eoshift3_4.c: Regenerate.
* generated/eoshift1_8.c: Regenerate.
* generated/eoshift1_16.c: Regenerate.
* generated/cshift1_4.c: Regenerate.
* generated/eoshift1_4.c: Regenerate.
* generated/eoshift3_8.c: Regenerate.
* generated/eoshift3_16.c: Regenerate.
* generated/cshift1_8.c: Regenerate.
* generated/cshift1_16.c: Regenerate.
* gfortran.dg/widechar_5.f90: New file.
* gfortran.dg/widechar_6.f90: New file.
* gfortran.dg/widechar_7.f90: New file.
* gfortran.dg/widechar_intrinsics_5.f90: Uncomment the lines
testing the SPREAD intrinsic.
* gfortran.dg/widechar_intrinsics_6.f90: New file.
* gfortran.dg/widechar_intrinsics_7.f90: New file.
* gfortran.dg/widechar_intrinsics_8.f90: New file.
* gfortran.dg/widechar_intrinsics_9.f90: New file.
* gfortran.dg/widechar_intrinsics_10.f90: New file.
From-SVN: r136129
2008-05-28 23:11:39 +02:00
|
|
|
2008-05-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/36319
|
|
|
|
* intrinsic.c (gfc_convert_chartype): Don't mark conversion
|
|
|
|
function as pure.
|
|
|
|
* trans-array.c (gfc_trans_array_ctor_element): Divide element
|
|
|
|
size by the size of one character to obtain length.
|
|
|
|
* iresolve.c (gfc_resolve_cshift): Call the _char4 variant when
|
|
|
|
appropriate.
|
|
|
|
(gfc_resolve_eoshift): Likewise.
|
|
|
|
* trans-intrinsic.c (gfc_conv_intrinsic_ctime): Minor beautification.
|
|
|
|
(gfc_conv_intrinsic_fdate): Minor beautification.
|
|
|
|
(gfc_conv_intrinsic_ttynam): Minor beautification.
|
|
|
|
(gfc_conv_intrinsic_minmax_char): Allow all character kinds.
|
|
|
|
(size_of_string_in_bytes): New function.
|
|
|
|
(gfc_conv_intrinsic_size): Call size_of_string_in_bytes for
|
|
|
|
character expressions.
|
|
|
|
(gfc_conv_intrinsic_sizeof): Likewise.
|
|
|
|
(gfc_conv_intrinsic_array_transfer): Likewise.
|
|
|
|
(gfc_conv_intrinsic_trim): Allow all character kinds. Minor
|
|
|
|
beautification.
|
|
|
|
(gfc_conv_intrinsic_repeat): Fix comment typo.
|
|
|
|
* simplify.c (gfc_convert_char_constant): Take care of conversion
|
|
|
|
of array constructors.
|
|
|
|
|
2008-05-27 21:22:01 +02:00
|
|
|
2008-05-27 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
PR fortran/36316
|
|
|
|
* trans-array.c (gfc_set_loop_bounds_from_array_spec):
|
|
|
|
Add missing fold_convert.
|
|
|
|
|
2008-05-26 22:18:04 +02:00
|
|
|
2008-05-26 Daniel Franke <franke.daniel@gmail.com>
|
|
|
|
|
|
|
|
* fortran/cpp.c (cpp_define_builtins): Remove usage of TARGET_* macros,
|
|
|
|
added FIXME instead.
|
|
|
|
|
re PR fortran/18428 (No preprocessing option -cpp for gfortran)
gcc:
2008-05-26 Daniel Franke <franke.daniel@gmail.com>
PR fortran/18428
* c.opt: Removed undocumented option '-lang-fortran'.
* c-common.h: Removed global variable 'lang_fortran'.
* c-opts.c (c_common_handle_option): Removed code to handle
option '-lang-fortran'. Updated includes.
* c-cppbuiltin.c (c_cpp_builtins): Removed conditional
definition of '__GFORTRAN__'.
(define__GNUC__): Reimplemented to use BASEVER and
cpp_define_formatted.
(builtin_define_with_value_n): Removed.
* c-incpath.h: Renamed to ...
* incpath.h: ... this.
* c-incpath.c: Renamed to ...
* incpath.c: ... this. Updated includes.
* fix-header.c: Updated includes.
* Makefile.in: Replaced c-incpath.[ch] by incpath.[ch].
(c-cppbuiltin.o): Added dependency on and definition of BASEVER.
(OBJ-archive): Added cppdefault.o, incpath.o and prefix.o.
gcc/cp:
2008-05-26 Daniel Franke <franke.daniel@gmail.com>
* Makefile.in: Adjusted dependencies on c-incpath.o.
gcc/fortran:
2008-05-26 Daniel Franke <franke.daniel@gmail.com>
PR fortran/18428
* lang.opt (A, C, CC, D, E, H, P, U, cpp, d, fworking-directory,
imultilib, iprefix, iquote, isysroot, isystem, nocpp, nostdinc,
o, undef, v): New options.
* options.c (gfc_init_options): Also initialize preprocessor
options.
(gfc_post_options): Also handle post-initialization of preprocessor
options.
(gfc_handle_option): Check if option is a preprocessor option.
If yes, let gfc_cpp_handle_option() handle the option.
* lang-specs.h: Reorganized to handle new options.
* scanner.c (gfc_new_file): Read temporary file instead of
input source if preprocessing is enabled.
* f95-lang.c (gfc_init): Initialize preprocessor.
(gfc_finish): Clean up preprocessor.
* cpp.c: New.
* cpp.h: New.
* Make-lang.in: Added new objects and dependencies.
* gfortran.texi: Updated section "Preprocessing and
conditional compilation".
* invoke.texi: Added new section "Preprocessing Options",
listed and documented the preprocessing options handled by gfortran.
From-SVN: r135882
2008-05-26 00:37:41 +02:00
|
|
|
2008-05-26 Daniel Franke <franke.daniel@gmail.com>
|
|
|
|
|
|
|
|
PR fortran/18428
|
|
|
|
* lang.opt (A, C, CC, D, E, H, P, U, cpp, d, fworking-directory,
|
|
|
|
imultilib, iprefix, iquote, isysroot, isystem, nocpp, nostdinc,
|
|
|
|
o, undef, v): New options.
|
|
|
|
* options.c (gfc_init_options): Also initialize preprocessor
|
|
|
|
options.
|
|
|
|
(gfc_post_options): Also handle post-initialization of preprocessor
|
|
|
|
options.
|
|
|
|
(gfc_handle_option): Check if option is a preprocessor option.
|
|
|
|
If yes, let gfc_cpp_handle_option() handle the option.
|
|
|
|
* lang-specs.h: Reorganized to handle new options.
|
|
|
|
* scanner.c (gfc_new_file): Read temporary file instead of
|
|
|
|
input source if preprocessing is enabled.
|
|
|
|
* f95-lang.c (gfc_init): Initialize preprocessor.
|
|
|
|
(gfc_finish): Clean up preprocessor.
|
|
|
|
* cpp.c: New.
|
|
|
|
* cpp.h: New.
|
|
|
|
* Make-lang.in: Added new objects and dependencies.
|
|
|
|
* gfortran.texi: Updated section "Preprocessing and
|
|
|
|
conditional compilation".
|
|
|
|
* invoke.texi: Added new section "Preprocessing Options",
|
|
|
|
listed and documented the preprocessing options handled
|
|
|
|
by gfortran.
|
|
|
|
|
2008-05-25 19:52:03 +02:00
|
|
|
2008-05-25 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
PR fortran/32600
|
|
|
|
* trans-expr.c (gfc_conv_function_call): Remove library
|
|
|
|
call for c_f_pointer with scalar Fortran pointers and for
|
|
|
|
c_f_procpointer.
|
|
|
|
|
2008-05-21 18:01:08 +02:00
|
|
|
2008-05-21 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/36257
|
|
|
|
* iresolve.c (check_charlen_present): Don't force the rank to 1.
|
|
|
|
|
2008-05-19 17:57:28 +02:00
|
|
|
2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/36265
|
|
|
|
* trans-expr.c (gfc_conv_string_tmp): Pick the correct type for
|
|
|
|
the temporary variable.
|
|
|
|
|
2008-05-19 14:22:39 +02:00
|
|
|
2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
|
|
|
|
|
|
|
* simplify.c (gfc_simplify_dble, gfc_simplify_real): Initialize
|
|
|
|
result variable to avoid warnings.
|
|
|
|
|
intrinsic.c (char_conversions, ncharconv): New static variables.
* intrinsic.c (char_conversions, ncharconv): New static variables.
(find_char_conv): New function.
(add_functions): Add simplification functions for ADJUSTL and
ADJUSTR. Don't check the kind of their argument. Add checking for
LGE, LLE, LGT and LLT.
(add_subroutines): Fix argument type for SLEEP. Fix argument name
for SYSTEM.
(add_char_conversions): New function.
(gfc_intrinsic_init_1): Call add_char_conversions.
(gfc_intrinsic_done_1): Free char_conversions.
(check_arglist): Use kind == 0 as a signal that we don't want
the kind value to be checked.
(do_simplify): Also simplify character functions.
(gfc_convert_chartype): New function
* trans-array.c (gfc_trans_array_ctor_element): Don't force the
use of default character type.
(gfc_trans_array_constructor_value): Likewise.
(get_array_ctor_var_strlen): Use integer kind to build an integer
instead of a character kind!
(gfc_build_constant_array_constructor): Don't force the use of
default character type.
(gfc_conv_loop_setup): Likewise.
* trans-expr.c (gfc_conv_string_tmp): Don't force the use of
default character type. Allocate enough memory for wide strings.
(gfc_conv_concat_op): Make sure operand kind are the same.
(string_to_single_character): Remove gfc_ prefix. Reindent.
Don't force the use of default character type.
(gfc_conv_scalar_char_value): Likewise.
(gfc_build_compare_string): Call string_to_single_character.
(fill_with_spaces): New function
(gfc_trans_string_copy): Add kind arguments. Use them to deal
with wide character kinds.
(gfc_conv_statement_function): Whitespace fix. Call
gfc_trans_string_copy with new kind arguments.
(gfc_conv_substring_expr): Call gfc_build_wide_string_const
instead of using gfc_widechar_to_char.
(gfc_conv_string_parameter): Don't force the use of default
character type.
(gfc_trans_scalar_assign): Pass kind args to gfc_trans_string_copy.
* intrinsic.h (gfc_check_lge_lgt_lle_llt, gfc_convert_char_constant,
gfc_resolve_adjustl, gfc_resolve_adjustr): New prototypes.
* decl.c (gfc_set_constant_character_len): Don't assert the
existence of a single character kind.
* trans-array.h (gfc_trans_string_copy): New prototype.
* gfortran.h (gfc_check_character_range, gfc_convert_chartype):
New prototypes.
* error.c (print_wide_char_into_buffer): New function lifting
code from gfc_print_wide_char. Fix order to output '\x??' instead
of 'x\??'.
(gfc_print_wide_char): Call print_wide_char_into_buffer.
(show_locus): Call print_wide_char_into_buffer with buffer local
to this function.
* trans-const.c (gfc_build_wide_string_const): New function.
(gfc_conv_string_init): Deal with wide characters strings
constructors.
(gfc_conv_constant_to_tree): Call gfc_build_wide_string_const.
* trans-stmt.c (gfc_trans_label_assign): Likewise.
(gfc_trans_character_select): Deal with wide strings.
* expr.c (gfc_check_assign): Allow conversion between character
kinds on assignment.
* trans-const.h (gfc_build_wide_string_const): New prototype.
* trans-types.c (gfc_get_character_type_len_for_eltype,
gfc_get_character_type_len): Create too variants of the old
gfc_get_character_type_len, one getting kind argument and the
other one directly taking a type tree.
* trans.h (gfor_fndecl_select_string_char4,
gfor_fndecl_convert_char1_to_char4,
gfor_fndecl_convert_char4_to_char1): New prototypes.
* trans-types.h (gfc_get_character_type_len_for_eltype): New
prototype.
* resolve.c (resolve_operator): Exit early when kind mismatches
are detected, because that makes us issue an error message later.
(validate_case_label_expr): Fix wording of error message.
* iresolve.c (gfc_resolve_adjustl, gfc_resolve_adjustr): New
functions.
(gfc_resolve_pack): Call _char4 variants of library function
when dealing with wide characters.
(gfc_resolve_reshape): Likewise.
(gfc_resolve_spread): Likewise.
(gfc_resolve_transpose): Likewise.
(gfc_resolve_unpack): Likewise.
* target-memory.c (size_character): Take character kind bit size
correctly into account (not that it changes anything for now, but
it's more generic).
(gfc_encode_character): Added gfc_ prefix. Encoding each
character of a string by calling native_encode_expr for the
corresponding unsigned integer.
(gfc_target_encode_expr): Add gfc_ prefix to encode_character.
* trans-decl.c (gfc_build_intrinsic_function_decls): Build
gfor_fndecl_select_string_char4, gfor_fndecl_convert_char1_to_char4
and gfor_fndecl_convert_char4_to_char1.
* target-memory.h (gfc_encode_character): New prototype.
* arith.c (gfc_check_character_range): New function.
(eval_intrinsic): Allow non-default character kinds.
* check.c (gfc_check_access_func): Only allow default
character kind arguments.
(gfc_check_chdir): Likewise.
(gfc_check_chdir_sub): Likewise.
(gfc_check_chmod): Likewise.
(gfc_check_chmod_sub): Likewise.
(gfc_check_lge_lgt_lle_llt): New function.
(gfc_check_link): Likewise.
(gfc_check_link_sub): Likewise.
(gfc_check_symlnk): Likewise.
(gfc_check_symlnk_sub): Likewise.
(gfc_check_rename): Likewise.
(gfc_check_rename_sub): Likewise.
(gfc_check_fgetputc_sub): Likewise.
(gfc_check_fgetput_sub): Likewise.
(gfc_check_stat): Likewise.
(gfc_check_stat_sub): Likewise.
(gfc_check_date_and_time): Likewise.
(gfc_check_ctime_sub): Likewise.
(gfc_check_fdate_sub): Likewise.
(gfc_check_gerror): Likewise.
(gfc_check_getcwd_sub): Likewise.
(gfc_check_getarg): Likewise.
(gfc_check_getlog): Likewise.
(gfc_check_hostnm): Likewise.
(gfc_check_hostnm_sub): Likewise.
(gfc_check_ttynam_sub): Likewise.
(gfc_check_perror): Likewise.
(gfc_check_unlink): Likewise.
(gfc_check_unlink_sub): Likewise.
(gfc_check_system_sub): Likewise.
* primary.c (got_delim): Perform correct character range checking
for all kinds.
* trans-intrinsic.c (gfc_conv_intrinsic_conversion): Generate
calls to library functions convert_char4_to_char1 and
convert_char1_to_char4 for character conversions.
(gfc_conv_intrinsic_char): Allow all character kings.
(gfc_conv_intrinsic_strcmp): Fix whitespace.
(gfc_conv_intrinsic_repeat): Take care of all character kinds.
* intrinsic.texi: For all GNU intrinsics accepting character
arguments, mention that they're restricted to the default kind.
* simplify.c (simplify_achar_char): New function.
(gfc_simplify_achar, gfc_simplify_char): Call simplify_achar_char.
gfc_simplify_ichar): Don't error out for wide characters.
(gfc_convert_char_constant): New function.
* gfortran.dg/achar_3.f90: Adjust error messages.
* gfortran.dg/achar_5.f90: New test.
* gfortran.dg/achar_6.F90: New test.
* gfortran.dg/widechar_1.f90: New test.
* gfortran.dg/widechar_2.f90: New test.
* gfortran.dg/widechar_3.f90: New test.
* gfortran.dg/widechar_4.f90: New test.
* gfortran.dg/widechar_intrinsics_1.f90: New test.
* gfortran.dg/widechar_intrinsics_2.f90: New test.
* gfortran.dg/widechar_intrinsics_3.f90: New test.
* gfortran.dg/widechar_intrinsics_4.f90: New test.
* gfortran.dg/widechar_intrinsics_5.f90: New test.
* gfortran.dg/widechar_select_1.f90: New test.
* gfortran.dg/widechar_select_2.f90: New test.
From-SVN: r135515
2008-05-19 00:45:05 +02:00
|
|
|
2008-05-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
|
|
|
|
|
|
|
* intrinsic.c (char_conversions, ncharconv): New static variables.
|
|
|
|
(find_char_conv): New function.
|
|
|
|
(add_functions): Add simplification functions for ADJUSTL and
|
|
|
|
ADJUSTR. Don't check the kind of their argument. Add checking for
|
|
|
|
LGE, LLE, LGT and LLT.
|
|
|
|
(add_subroutines): Fix argument type for SLEEP. Fix argument name
|
|
|
|
for SYSTEM.
|
|
|
|
(add_char_conversions): New function.
|
|
|
|
(gfc_intrinsic_init_1): Call add_char_conversions.
|
|
|
|
(gfc_intrinsic_done_1): Free char_conversions.
|
|
|
|
(check_arglist): Use kind == 0 as a signal that we don't want
|
|
|
|
the kind value to be checked.
|
|
|
|
(do_simplify): Also simplify character functions.
|
|
|
|
(gfc_convert_chartype): New function
|
|
|
|
* trans-array.c (gfc_trans_array_ctor_element): Don't force the
|
|
|
|
use of default character type.
|
|
|
|
(gfc_trans_array_constructor_value): Likewise.
|
|
|
|
(get_array_ctor_var_strlen): Use integer kind to build an integer
|
|
|
|
instead of a character kind!
|
|
|
|
(gfc_build_constant_array_constructor): Don't force the use of
|
|
|
|
default character type.
|
|
|
|
(gfc_conv_loop_setup): Likewise.
|
|
|
|
* trans-expr.c (gfc_conv_string_tmp): Don't force the use of
|
|
|
|
default character type. Allocate enough memory for wide strings.
|
|
|
|
(gfc_conv_concat_op): Make sure operand kind are the same.
|
|
|
|
(string_to_single_character): Remove gfc_ prefix. Reindent.
|
|
|
|
Don't force the use of default character type.
|
|
|
|
(gfc_conv_scalar_char_value): Likewise.
|
|
|
|
(gfc_build_compare_string): Call string_to_single_character.
|
|
|
|
(fill_with_spaces): New function
|
|
|
|
(gfc_trans_string_copy): Add kind arguments. Use them to deal
|
|
|
|
with wide character kinds.
|
|
|
|
(gfc_conv_statement_function): Whitespace fix. Call
|
|
|
|
gfc_trans_string_copy with new kind arguments.
|
|
|
|
(gfc_conv_substring_expr): Call gfc_build_wide_string_const
|
|
|
|
instead of using gfc_widechar_to_char.
|
|
|
|
(gfc_conv_string_parameter): Don't force the use of default
|
|
|
|
character type.
|
|
|
|
(gfc_trans_scalar_assign): Pass kind args to gfc_trans_string_copy.
|
|
|
|
* intrinsic.h (gfc_check_lge_lgt_lle_llt, gfc_convert_char_constant,
|
|
|
|
gfc_resolve_adjustl, gfc_resolve_adjustr): New prototypes.
|
|
|
|
* decl.c (gfc_set_constant_character_len): Don't assert the
|
|
|
|
existence of a single character kind.
|
|
|
|
* trans-array.h (gfc_trans_string_copy): New prototype.
|
|
|
|
* gfortran.h (gfc_check_character_range, gfc_convert_chartype):
|
|
|
|
New prototypes.
|
|
|
|
* error.c (print_wide_char_into_buffer): New function lifting
|
|
|
|
code from gfc_print_wide_char. Fix order to output '\x??' instead
|
|
|
|
of 'x\??'.
|
|
|
|
(gfc_print_wide_char): Call print_wide_char_into_buffer.
|
|
|
|
(show_locus): Call print_wide_char_into_buffer with buffer local
|
|
|
|
to this function.
|
|
|
|
* trans-const.c (gfc_build_wide_string_const): New function.
|
|
|
|
(gfc_conv_string_init): Deal with wide characters strings
|
|
|
|
constructors.
|
|
|
|
(gfc_conv_constant_to_tree): Call gfc_build_wide_string_const.
|
|
|
|
* trans-stmt.c (gfc_trans_label_assign): Likewise.
|
|
|
|
(gfc_trans_character_select): Deal with wide strings.
|
|
|
|
* expr.c (gfc_check_assign): Allow conversion between character
|
|
|
|
kinds on assignment.
|
|
|
|
* trans-const.h (gfc_build_wide_string_const): New prototype.
|
|
|
|
* trans-types.c (gfc_get_character_type_len_for_eltype,
|
|
|
|
gfc_get_character_type_len): Create too variants of the old
|
|
|
|
gfc_get_character_type_len, one getting kind argument and the
|
|
|
|
other one directly taking a type tree.
|
|
|
|
* trans.h (gfor_fndecl_select_string_char4,
|
|
|
|
gfor_fndecl_convert_char1_to_char4,
|
|
|
|
gfor_fndecl_convert_char4_to_char1): New prototypes.
|
|
|
|
* trans-types.h (gfc_get_character_type_len_for_eltype): New
|
|
|
|
prototype.
|
|
|
|
* resolve.c (resolve_operator): Exit early when kind mismatches
|
|
|
|
are detected, because that makes us issue an error message later.
|
|
|
|
(validate_case_label_expr): Fix wording of error message.
|
|
|
|
* iresolve.c (gfc_resolve_adjustl, gfc_resolve_adjustr): New
|
|
|
|
functions.
|
|
|
|
(gfc_resolve_pack): Call _char4 variants of library function
|
|
|
|
when dealing with wide characters.
|
|
|
|
(gfc_resolve_reshape): Likewise.
|
|
|
|
(gfc_resolve_spread): Likewise.
|
|
|
|
(gfc_resolve_transpose): Likewise.
|
|
|
|
(gfc_resolve_unpack): Likewise.
|
|
|
|
* target-memory.c (size_character): Take character kind bit size
|
|
|
|
correctly into account (not that it changes anything for now, but
|
|
|
|
it's more generic).
|
|
|
|
(gfc_encode_character): Added gfc_ prefix. Encoding each
|
|
|
|
character of a string by calling native_encode_expr for the
|
|
|
|
corresponding unsigned integer.
|
|
|
|
(gfc_target_encode_expr): Add gfc_ prefix to encode_character.
|
|
|
|
* trans-decl.c (gfc_build_intrinsic_function_decls): Build
|
|
|
|
gfor_fndecl_select_string_char4, gfor_fndecl_convert_char1_to_char4
|
|
|
|
and gfor_fndecl_convert_char4_to_char1.
|
|
|
|
* target-memory.h (gfc_encode_character): New prototype.
|
|
|
|
* arith.c (gfc_check_character_range): New function.
|
|
|
|
(eval_intrinsic): Allow non-default character kinds.
|
|
|
|
* check.c (gfc_check_access_func): Only allow default
|
|
|
|
character kind arguments.
|
|
|
|
(gfc_check_chdir): Likewise.
|
|
|
|
(gfc_check_chdir_sub): Likewise.
|
|
|
|
(gfc_check_chmod): Likewise.
|
|
|
|
(gfc_check_chmod_sub): Likewise.
|
|
|
|
(gfc_check_lge_lgt_lle_llt): New function.
|
|
|
|
(gfc_check_link): Likewise.
|
|
|
|
(gfc_check_link_sub): Likewise.
|
|
|
|
(gfc_check_symlnk): Likewise.
|
|
|
|
(gfc_check_symlnk_sub): Likewise.
|
|
|
|
(gfc_check_rename): Likewise.
|
|
|
|
(gfc_check_rename_sub): Likewise.
|
|
|
|
(gfc_check_fgetputc_sub): Likewise.
|
|
|
|
(gfc_check_fgetput_sub): Likewise.
|
|
|
|
(gfc_check_stat): Likewise.
|
|
|
|
(gfc_check_stat_sub): Likewise.
|
|
|
|
(gfc_check_date_and_time): Likewise.
|
|
|
|
(gfc_check_ctime_sub): Likewise.
|
|
|
|
(gfc_check_fdate_sub): Likewise.
|
|
|
|
(gfc_check_gerror): Likewise.
|
|
|
|
(gfc_check_getcwd_sub): Likewise.
|
|
|
|
(gfc_check_getarg): Likewise.
|
|
|
|
(gfc_check_getlog): Likewise.
|
|
|
|
(gfc_check_hostnm): Likewise.
|
|
|
|
(gfc_check_hostnm_sub): Likewise.
|
|
|
|
(gfc_check_ttynam_sub): Likewise.
|
|
|
|
(gfc_check_perror): Likewise.
|
|
|
|
(gfc_check_unlink): Likewise.
|
|
|
|
(gfc_check_unlink_sub): Likewise.
|
|
|
|
(gfc_check_system_sub): Likewise.
|
|
|
|
* primary.c (got_delim): Perform correct character range checking
|
|
|
|
for all kinds.
|
|
|
|
* trans-intrinsic.c (gfc_conv_intrinsic_conversion): Generate
|
|
|
|
calls to library functions convert_char4_to_char1 and
|
|
|
|
convert_char1_to_char4 for character conversions.
|
|
|
|
(gfc_conv_intrinsic_char): Allow all character kings.
|
|
|
|
(gfc_conv_intrinsic_strcmp): Fix whitespace.
|
|
|
|
(gfc_conv_intrinsic_repeat): Take care of all character kinds.
|
|
|
|
* intrinsic.texi: For all GNU intrinsics accepting character
|
|
|
|
arguments, mention that they're restricted to the default kind.
|
|
|
|
* simplify.c (simplify_achar_char): New function.
|
|
|
|
(gfc_simplify_achar, gfc_simplify_char): Call simplify_achar_char.
|
|
|
|
gfc_simplify_ichar): Don't error out for wide characters.
|
|
|
|
(gfc_convert_char_constant): New function.
|
|
|
|
|
2008-05-18 13:10:11 +02:00
|
|
|
2008-05-18 Steven G. Kargl <kargls@comcast.net>
|
|
|
|
|
|
|
|
PR fortran/36251
|
|
|
|
* symbol.c (check_conflict): Issue errors for abuse of PUBLIC, PRIVATE,
|
|
|
|
and BIND(C).
|
|
|
|
* resolve.c (gfc_verify_binding_labels): Fix NULL pointer dereference.
|
|
|
|
|
|
|
|
2008-05-17 Tobias Burnus <burnus@net-b.de>
|
2008-05-18 00:28:51 +02:00
|
|
|
|
|
|
|
* intrinsic.texi: Correct description of GET_COMMAND_ARGUMENT
|
|
|
|
and GET_ENVIRONMENT_VARIABLE; fix keyword= name for GETENV,
|
|
|
|
GETLOG, GMTIME, HOSTNM, IRAND, ITIME, KILL.
|
|
|
|
Move LOG_GAMMA after LOG10.
|
|
|
|
|
2008-05-18 13:10:11 +02:00
|
|
|
2008-05-17 Tobias Burnus <burnus@net-b.de>
|
intrinsic.c (add_functions): Change FLUSH(C) to FLUSH(UNIT).
2008-05-16 Tobias Burnus <burnus@net-b.de>
* intrinsic.c (add_functions): Change FLUSH(C) to FLUSH(UNIT).
* intrinsic.texi: Change INTEGER(*) to INTEGER; fix keyword= name for
ABS, ADJUSTL, AINT, ALLOCATED, ANINT, ASSOCIATED, C_ASSOCIATED,
CEILING, DBLE, DFLOAT, DOT_PRODUCT, DREAL, FLOAT, FLOOR, GET_COMMAND.
From-SVN: r135471
2008-05-17 15:49:44 +02:00
|
|
|
|
|
|
|
* intrinsic.c (add_functions): Change FLUSH(C) to FLUSH(UNIT).
|
|
|
|
* intrinsic.texi: Change INTEGER(*) to INTEGER; fix keyword= name for
|
|
|
|
ABS, ADJUSTL, AINT, ALLOCATED, ANINT, ASSOCIATED, C_ASSOCIATED,
|
|
|
|
CEILING, DBLE, DFLOAT, DOT_PRODUCT, DREAL, FLOAT, FLOOR, GET_COMMAND.
|
|
|
|
|
2008-05-16 23:12:04 +02:00
|
|
|
2008-05-16 Paul Thomas <pault@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/35756
|
|
|
|
PR fortran/35759
|
|
|
|
* trans-stmt.c (gfc_trans_where): Tighten up the dependency
|
|
|
|
check for calling gfc_trans_where_3.
|
|
|
|
|
|
|
|
PR fortran/35743
|
|
|
|
* trans-stmt.c (gfc_trans_where_2): Set the mask size to zero
|
|
|
|
if it is calculated to be negative.
|
|
|
|
|
|
|
|
PR fortran/35745
|
|
|
|
* trans-stmt.c (gfc_trans_where_3, gfc_trans_where_assign): Set
|
|
|
|
ss->where for scalar right hand sides.
|
|
|
|
* trans-array.c (gfc_add_loop_ss_code): If ss->where is set do
|
|
|
|
not evaluate scalars outside the loop. Clean up whitespace.
|
|
|
|
* trans.h : Add a bitfield 'where' to gfc_ss.
|
|
|
|
|
2008-05-16 23:05:08 +02:00
|
|
|
2008-05-16 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
* libgfortran.h: Increase GFC_MAX_DIMENSIONS to 15.
|
|
|
|
* array.c (gfc_match_array_spec): Error with -std=f2003 if rank > 7.
|
|
|
|
|
2008-05-16 21:50:04 +02:00
|
|
|
2008-04-16 Daniel Kraft <d@domob.eu>
|
|
|
|
|
|
|
|
PR fortran/27997
|
|
|
|
* gfortran.h: Added field "length_from_typespec" to gfc_charlength.
|
|
|
|
* aray.c (gfc_match_array_constructor): Added code to parse typespec.
|
|
|
|
(check_element_type, check_constructor_type, gfc_check_constructor_type):
|
|
|
|
Extended to support explicit typespec on constructor.
|
|
|
|
(gfc_resolve_character_array_constructor): Pad strings correctly for
|
|
|
|
explicit, constant character length.
|
|
|
|
* trans-array.c: New static global variable "typespec_chararray_ctor"
|
|
|
|
(gfc_trans_array_constructor): New code to support explicit but dynamic
|
|
|
|
character lengths.
|
|
|
|
|
2008-05-16 18:44:28 +02:00
|
|
|
2008-05-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
|
|
|
|
2008-05-16 21:50:04 +02:00
|
|
|
PR fortran/34325
|
|
|
|
* decl.c (match_attr_spec): Check for matching pairs of parenthesis.
|
|
|
|
* expr.c (gfc_specification_expr): Supplement the error message with the
|
|
|
|
type that was found.
|
|
|
|
* resolve.c (gfc_resolve_index): Likewise.
|
|
|
|
* match.c (gfc_match_parens): Clarify error message with "at or before".
|
|
|
|
(gfc_match_do): Check for matching pairs of parenthesis.
|
2008-05-16 18:44:28 +02:00
|
|
|
|
intrinsic.texi: Write Fortran 77/90/95 instead of F77/90/95...
2008-05-16 Tobias Burnus <burnus@net-b.de
* intrinsic.texi: Write Fortran 77/90/95 instead of F77/90/95;
add missing KIND argument to ACHAR and NINT; and state that
the KIND argument is a F2003 extension for ACHAR, COUNT, IACHAR,
ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND, VERIFY.
From-SVN: r135427
2008-05-16 18:29:36 +02:00
|
|
|
2008-05-16 Tobias Burnus <burnus@net-b.de
|
|
|
|
|
|
|
|
* intrinsic.texi: Write Fortran 77/90/95 instead of F77/90/95;
|
|
|
|
add missing KIND argument to ACHAR and NINT; and state that
|
|
|
|
the KIND argument is a F2003 extension for ACHAR, COUNT, IACHAR,
|
|
|
|
ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND, VERIFY.
|
|
|
|
|
2008-05-16 08:52:14 +02:00
|
|
|
2008-05-16 Daniel Kraft <d@domob.eu>
|
|
|
|
|
|
|
|
* primary.c: New private structure "gfc_structure_ctor_component".
|
|
|
|
(gfc_free_structure_ctor_component): New helper function.
|
|
|
|
(gfc_match_structure_constructor): Extended largely to support named
|
|
|
|
arguments and default initialization for structure constructors.
|
|
|
|
|
[multiple changes]
2008-05-15 Steven G. Kargl <kargls@comcast.net>
* simplify.c (gfc_simplify_dble, gfc_simplify_float,
simplify_bound, gfc_simplify_nearest, gfc_simplify_real): Plug
possible memory leaks.
(gfc_simplify_reshape): Plug possible memory leaks and dereferencing
of NULL pointers.
2008-05-15 Steven G. Kargl <kargls@comcast.net>
PR fortran/36239
* simplify.c (gfc_simplify_int, gfc_simplify_intconv): Replaced hand
rolled integer conversion with gfc_int2int, gfc_real2int, and
gfc_complex2int.
(gfc_simplify_intconv): Renamed to simplify_intconv.
2008-05-15 Steven G. Kargl, <kargl@comcast.net>
* gfortran.dg/and_or_xor.f90: New test
* fortran/simplify.c (gfc_simplify_and, gfc_simplify_or,
gfc_simplify_xor): Don't range check logical results.
From-SVN: r135408
2008-05-16 05:41:17 +02:00
|
|
|
2008-05-15 Steven G. Kargl <kargls@comcast.net>
|
|
|
|
|
|
|
|
* simplify.c (gfc_simplify_dble, gfc_simplify_float,
|
|
|
|
simplify_bound, gfc_simplify_nearest, gfc_simplify_real): Plug
|
|
|
|
possible memory leaks.
|
|
|
|
(gfc_simplify_reshape): Plug possible memory leaks and dereferencing
|
|
|
|
of NULL pointers.
|
|
|
|
|
|
|
|
2008-05-15 Steven G. Kargl <kargls@comcast.net>
|
|
|
|
|
|
|
|
PR fortran/36239
|
|
|
|
* simplify.c (gfc_simplify_int, gfc_simplify_intconv): Replaced hand
|
|
|
|
rolled integer conversion with gfc_int2int, gfc_real2int, and
|
|
|
|
gfc_complex2int.
|
|
|
|
(gfc_simplify_intconv): Renamed to simplify_intconv.
|
|
|
|
|
|
|
|
2008-05-15 Steven G. Kargl, <kargl@comcast.net>
|
|
|
|
* gfortran.dg/and_or_xor.f90: New test
|
|
|
|
|
|
|
|
* fortran/simplify.c (gfc_simplify_and, gfc_simplify_or,
|
|
|
|
gfc_simplify_xor): Don't range check logical results.
|
|
|
|
|
trans-expr.c (gfc_conv_concat_op): Take care of nondefault character kinds.
* trans-expr.c (gfc_conv_concat_op): Take care of nondefault
character kinds.
(gfc_build_compare_string): Add kind argument and use it.
(gfc_conv_statement_function): Fix indentation.
* gfortran.h (gfc_character_info): New structure.
(gfc_character_kinds): New array.
* trans-types.c (gfc_character_kinds, gfc_character_types,
gfc_pcharacter_types): New array.
(gfc_init_kinds): Fill character kinds array.
(validate_character): Take care of nondefault character kinds.
(gfc_build_uint_type): New function.
(gfc_init_types): Take care of nondefault character kinds.
(gfc_get_char_type, gfc_get_pchar_type): New functions.
(gfc_get_character_type_len): Use gfc_get_char_type.
* trans.h (gfc_build_compare_string): Adjust prototype.
(gfor_fndecl_compare_string_char4, gfor_fndecl_concat_string_char4,
gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4): New
prototypes.
* trans-types.h (gfc_get_char_type, gfc_get_pchar_type): New
prototypes.
* trans-decl.c (gfor_fndecl_compare_string_char4,
gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4,
gfor_fndecl_concat_string_char4): New function decls.
(gfc_build_intrinsic_function_decls): Define new *_char4 function
decls.
* trans-intrinsic.c (gfc_conv_intrinsic_minmax_char,
gfc_conv_intrinsic_len_trim, gfc_conv_intrinsic_ichar,
gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_trim,
gfc_conv_intrinsic_function): Deal with nondefault character kinds.
From-SVN: r135397
2008-05-15 23:12:53 +02:00
|
|
|
2008-05-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
|
|
|
|
|
|
|
* trans-expr.c (gfc_conv_concat_op): Take care of nondefault
|
|
|
|
character kinds.
|
|
|
|
(gfc_build_compare_string): Add kind argument and use it.
|
|
|
|
(gfc_conv_statement_function): Fix indentation.
|
|
|
|
* gfortran.h (gfc_character_info): New structure.
|
|
|
|
(gfc_character_kinds): New array.
|
|
|
|
* trans-types.c (gfc_character_kinds, gfc_character_types,
|
|
|
|
gfc_pcharacter_types): New array.
|
|
|
|
(gfc_init_kinds): Fill character kinds array.
|
|
|
|
(validate_character): Take care of nondefault character kinds.
|
|
|
|
(gfc_build_uint_type): New function.
|
|
|
|
(gfc_init_types): Take care of nondefault character kinds.
|
|
|
|
(gfc_get_char_type, gfc_get_pchar_type): New functions.
|
|
|
|
(gfc_get_character_type_len): Use gfc_get_char_type.
|
|
|
|
* trans.h (gfc_build_compare_string): Adjust prototype.
|
|
|
|
(gfor_fndecl_compare_string_char4, gfor_fndecl_concat_string_char4,
|
|
|
|
gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
|
|
|
|
gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
|
|
|
|
gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
|
|
|
|
gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4): New
|
|
|
|
prototypes.
|
|
|
|
* trans-types.h (gfc_get_char_type, gfc_get_pchar_type): New
|
|
|
|
prototypes.
|
|
|
|
* trans-decl.c (gfor_fndecl_compare_string_char4,
|
|
|
|
gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
|
|
|
|
gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
|
|
|
|
gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
|
|
|
|
gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4,
|
|
|
|
gfor_fndecl_concat_string_char4): New function decls.
|
|
|
|
(gfc_build_intrinsic_function_decls): Define new *_char4 function
|
|
|
|
decls.
|
|
|
|
* trans-intrinsic.c (gfc_conv_intrinsic_minmax_char,
|
|
|
|
gfc_conv_intrinsic_len_trim, gfc_conv_intrinsic_ichar,
|
|
|
|
gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_trim,
|
|
|
|
gfc_conv_intrinsic_function): Deal with nondefault character kinds.
|
|
|
|
|
2008-05-15 15:11:52 +02:00
|
|
|
2008-05-15 Sa Liu <saliu@de.ibm.com>
|
|
|
|
|
|
|
|
* iso-c-binding.def: Add standard parameter to macro NAMED_INTCST.
|
|
|
|
All existing NAMED_INTCST definitions has standard GFC_STD_F2003,
|
|
|
|
c_int128_t, c_int_least128_t and c_int_fast128_t are added as
|
|
|
|
GNU extensions.
|
|
|
|
* iso-fortran-evn.def: Add standard parameter GFC_STD_F2003
|
|
|
|
to macro NAMED_INTCST.
|
|
|
|
* symbol.c (std_for_isocbinding_symbol): New helper function to
|
|
|
|
return the standard that supports this isocbinding symbol.
|
|
|
|
(generate_isocbinding_symbol): Do not generate GNU extension symbols
|
|
|
|
if std=f2003. Add new parameter to NAMED_INTCST.
|
|
|
|
* module.c (use_iso_fortran_env_module): Add new parameter to
|
|
|
|
NAMED_INTCST and new field standard to struct intmod_sym.
|
|
|
|
* gfortran.h: Add new parameter to NAMED_INTCST.
|
|
|
|
* trans-types.c (init_c_interop_kinds): Add new parameter to
|
|
|
|
NAMED_INTCST.
|
|
|
|
* intrinsic.texi: Documented new types C_INT128_T, C_INT_LEASE128_T
|
|
|
|
and C_INT_FAST128_T.
|
|
|
|
|
2008-05-14 23:44:36 +02:00
|
|
|
2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/36059
|
|
|
|
* trans-decl.c (gfc_build_dummy_array_decl): Don't repack
|
|
|
|
arrays that have the TARGET attribute.
|
|
|
|
|
2008-05-14 23:36:26 +02:00
|
|
|
2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/36186
|
|
|
|
* simplify.c (only_convert_cmplx_boz): New function.
|
|
|
|
(gfc_simplify_cmplx, gfc_simplify_complex, gfc_simplify_dcmplx):
|
|
|
|
Call only_convert_cmplx_boz.
|
|
|
|
|
2008-05-14 23:32:53 +02:00
|
|
|
2008-05-14 Paul Thomas <pault@gcc.gnu.org>
|
|
|
|
|
2008-05-14 23:36:26 +02:00
|
|
|
PR fortran/36233
|
|
|
|
* interface.c (compare_actual_formal): Do not check sizes if the
|
|
|
|
actual is BT_PROCEDURE.
|
2008-05-14 23:32:53 +02:00
|
|
|
|
2008-05-14 23:20:10 +02:00
|
|
|
2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/35682
|
|
|
|
* trans-array.c (gfc_conv_ss_startstride): Any negative size is
|
|
|
|
the same as zero size.
|
|
|
|
(gfc_conv_loop_setup): Fix size calculation.
|
|
|
|
|
2008-05-14 23:17:54 +02:00
|
|
|
2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/35685
|
|
|
|
* trans-intrinsic.c (gfc_conv_intrinsic_bound): Correctly
|
|
|
|
handle zero-size sections.
|
|
|
|
|
2008-05-14 16:23:01 +02:00
|
|
|
2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/36215
|
|
|
|
* scanner.c (preprocessor_line): Allocate enough memory for a
|
|
|
|
wide string.
|
|
|
|
|
2008-05-12 17:51:27 +02:00
|
|
|
2008-05-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/36176
|
|
|
|
* target-memory.c (gfc_target_expr_size): Correctly treat
|
|
|
|
substrings.
|
|
|
|
(gfc_target_encode_expr): Likewise.
|
|
|
|
(gfc_interpret_complex): Whitespace change.
|
|
|
|
|
2008-05-11 22:28:52 +02:00
|
|
|
2008-05-11 Thomas Koenig <tkoenig@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/35719
|
|
|
|
* trans.c (gfc_call_malloc): If size equals zero, allocate one
|
|
|
|
byte; don't return a null pointer.
|
|
|
|
|
2008-05-10 18:39:27 +02:00
|
|
|
2008-05-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/36197
|
|
|
|
* module.c (quote_string): Fix sprintf format.
|
|
|
|
|
2008-05-09 10:02:52 +02:00
|
|
|
2008-05-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/36162
|
|
|
|
* module.c (quote_string, unquote_string,
|
|
|
|
mio_allocated_wide_string): New functions.
|
|
|
|
(mio_expr): Call mio_allocated_wide_string where needed.
|
|
|
|
|
[multiple changes]
2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
PATCH rtl/7335
PATCH rtl/33826
* see.c (see_copy_insn): Copy new pure const attributes for new
call.
* c-decl.c (merge_decls): Ditto.
* postreload.c (record_opr_changes): Change CONST_OR_PURE_CALL_P
to RTL_CONST_OR_PURE_CALL_P.
* tree.c (define_local_buitin): Rename DECL_IS_PURE to
DECL_PURE_P. Initialized DECL_LOOPING_CONST_PURE.
(process_call_operands): Set tree_side_effects properly.
* tree.h (TREE_READONLY_DECL_P): Removed.
(DECL_IS_PURE): Renamed to DECL_PURE_P.
(DECL_LOOPING_OR_CONST_P): New macro.
(struct tree_function_decl): Added looping_const_or_pure_p.
(ECF_*) Renumbered.
(ECF_LOOPING_OR_CONST_P): New macro,
* rtlanal.c (pure_const_p): Removed.
* builtins.c (expand_builtin): Rename DECL_IS_PURE to DECL_PURE_P.
* reorg.c (delete_prior_computation) Changed CONST_OR_PURE_CALL_P
to RTL_CONST_CALL_P.
* ipa-pure-const.c (pure_const_state_e): Added looping field.
(check_decl, check_tree, check_call, scan_function): Initialize
looping.
(analyze_function): Rename DECL_IS_PURE to DECL_PURE_P.
(static_execute): Set looping true for recursive functions.
Undo setting state to IPA_NEITHER for recursive functions.
* cse.c (cse_insn):
* ifcvt.c (noce_can_store_speculate_p): Changed
CONST_OR_PURE_CALL_P and pure_call_p to RTL_CONST_CALL_P or
RTL_CONST_OR_PURE_CALL_P.
* dse.c (scan_insn): Ditto.
* local-alloc.c (validate_equiv_mem, memref_used_between_p): Ditto.
* gcse.c (oprs_not_seen_p) Changed CONST_OR_PURE_CALL_P to
RTL_CONST_OR_PURE_CALL_P.
(store_killed_in_insn): Changed CONST_OR_PURE_CALL_P and
pure_call_p to RTL_CONST_CALL_P.
* gimplify.c (gimplify_call_expr): Clear side effects for
non-looping pure and constant calls.
* calls.c (emit_call_1): Set rtl flags from ecf flags.
(flags_from_decl_or_type): Set ecf flags from decl flags.
(initialize_argument_information): Turn off
ECF_LOOPING_CONST_OR_PURE when turning off ECF_CONST.
Change const to pure if callee_copies is true rather than just
turning off const.
(expand_call): Turn off ECF_LOOPING_PURE_CONST_CALL and remove old
way of marking pure calls.
(emit_library_call_value_1): Turn off ECF_LOOPING_PURE_CONST_CALL.
Remove hack that was supposed to fix pr7335 and remove old
way of marking pure calls.
* emit-rtl.c (emit_copy_of_insn_after): Copy RTL_CONST_CALL_P,
RTL_PURE_CALL_P, RTL_LOOPING_CONST_OR_PURE_CALL_P.
* cselib.c (cselib_process_insn): Changed CONST_OR_PURE_CALL_P to
RTL_CONST_OR_PURE_CALL_P.
* tree-ssa-pre.c (can_value_number_call): Fixed spacing.
* loop-invariant.c (find_exits, find_invariant_bb): Changed
CONST_OR_PURE_CALL_P to RTL_CONST_OR_PURE_CALL_P.
* sched-deps.c (schedule_analyze): Ditto.
* rtl.h (struct rtx_def): Use call field, unchanging field, and
return_val field of calls to represent pure and const function
info.
(CONST_OR_PURE_CALL_P): Deleted macro.
(RTL_CONST_CALL_P, RTL_PURE_CALL_P,
RTL_LOOPING_CONST_OR_PURE_CALL_P, RTL_CONST_OR_PURE_P): New macros.
* tree-inline.c (copy_body_r): Changed TREE_READONLY_DECL_P to
TREE_READONLY.
* tree-optimize.c (execute_fixup_cfg): Added test for
ECF_LOOPING_CONST_OR_PURE.
* c-common.c (handle_pure_attribute): Changed DECL_IS_PURE to
DECL_PURE_P.
* tree-cfg.c (update_call_expr_flags): Do not clear tree side
effects for looping pure or const calls.
(verify_gimple_expr): Added verification code.
* config/alpha/alpha.c (alpha_legitimize_address,
alpha_emit_xfloating_libcall): Changed CONST_OR_PURE_CALL_P to
RTL_CONST_CALL_P.
* config/s390/s390.c (s390_emit_tls_call_insn): Ditto.
* config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Ditto.
* config/mips/mips.c (mips_call_tls_get_addr): Ditto.
* cfgrtl.c (need_fake_edge_p): Changed CONST_OR_PURE_CALL_P to
RTL_CONST_OR_PURE_CALL_P.
* dce.c (deletable_insn_p): Allow non looping, non sibling, pure
and const calls to be deleted.
java:
2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
* decl.c (java_init_decl_processing): Change DECL_IS_PURE to
DECL_PURE_P.
cp:
2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
* decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY,
DECL_LOOPING_CONST_OR_PURE_P attributes.
* rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to
DECL_PURE_P.
gfortran:
2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
* trans-decl.c (gfc_get_extern_function_decl, build_function_decl):
Rename DECL_IS_PURE to DECL_PURE_P.
From-SVN: r135053
2008-05-07 22:48:07 +02:00
|
|
|
2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
|
|
|
|
|
|
|
|
* trans-decl.c (gfc_get_extern_function_decl, build_function_decl):
|
|
|
|
Rename DECL_IS_PURE to DECL_PURE_P.
|
|
|
|
|
arith.c: (gfc_arith_concat...
* arith.c: (gfc_arith_concat, gfc_compare_string,
gfc_compare_with_Cstring, hollerith2representation,
gfc_hollerith2int, gfc_hollerith2real, gfc_hollerith2complex,
gfc_hollerith2character, gfc_hollerith2logical): Use wide
characters for character constants.
* data.c (create_character_intializer): Likewise.
* decl.c (gfc_set_constant_character_len): Likewise.
* dump-parse-tree.c (show_char_const): Correctly dump wide
character strings.
error.c (print_wide_char): Rename into gfc_print_wide_char.
(show_locus): Adapt to new prototype of gfc_print_wide_char.
expr.c (free_expr0): Representation is now disjunct from
character string value, so we always free it.
(gfc_copy_expr, find_substring_ref, gfc_simplify_expr): Adapt
to wide character strings.
* gfortran.h (gfc_expr): Make value.character.string a wide string.
(gfc_wide_toupper, gfc_wide_strncasecmp, gfc_wide_memset,
gfc_widechar_to_char, gfc_char_to_widechar): New prototypes.
(gfc_get_wide_string): New macro.
(gfc_print_wide_char): New prototype.
* io.c (format_string): Make a wide string.
(next_char, gfc_match_format, compare_to_allowed_values,
gfc_match_open): Deal with wide strings.
* module.c (mio_expr): Convert between wide strings and ASCII ones.
* primary.c (match_hollerith_constant, match_charkind_name):
Handle wide strings.
* resolve.c (build_default_init_expr): Likewise.
* scanner.c (gfc_wide_toupper, gfc_wide_memset,
gfc_char_to_widechar): New functions.
(wide_strchr, gfc_widechar_to_char, gfc_wide_strncasecmp):
Changes in prototypes.
(gfc_define_undef_line, load_line, preprocessor_line,
include_line, load_file, gfc_read_orig_filename): Handle wide
strings.
* simplify.c (gfc_simplify_achar, gfc_simplify_adjustl,
gfc_simplify_adjustr, gfc_simplify_char, gfc_simplify_iachar,
gfc_simplify_ichar, simplify_min_max, gfc_simplify_new_line,
gfc_simplify_repeat): Handle wide strings.
(wide_strspn, wide_strcspn): New helper functions.
(gfc_simplify_scan, gfc_simplify_trim, gfc_simplify_verify):
Handle wide strings.
* symbol.c (generate_isocbinding_symbol): Likewise.
* target-memory.c (size_character, gfc_target_expr_size,
encode_character, gfc_target_encode_expr, gfc_interpret_character,
gfc_target_interpret_expr): Handle wide strings.
* trans-const.c (gfc_conv_string_init): Lower wide strings to
narrow ones.
(gfc_conv_constant_to_tree): Likewise.
* trans-expr.c (gfc_conv_substring_expr): Handle wide strings.
* trans-io.c (gfc_new_nml_name_expr): Likewise.
* trans-stmt.c (gfc_trans_label_assign): Likewise.
From-SVN: r135006
2008-05-06 23:06:20 +02:00
|
|
|
2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
|
|
|
|
|
|
|
* arith.c: (gfc_arith_concat, gfc_compare_string,
|
|
|
|
gfc_compare_with_Cstring, hollerith2representation,
|
|
|
|
gfc_hollerith2int, gfc_hollerith2real, gfc_hollerith2complex,
|
|
|
|
gfc_hollerith2character, gfc_hollerith2logical): Use wide
|
|
|
|
characters for character constants.
|
|
|
|
* data.c (create_character_intializer): Likewise.
|
|
|
|
* decl.c (gfc_set_constant_character_len): Likewise.
|
|
|
|
* dump-parse-tree.c (show_char_const): Correctly dump wide
|
|
|
|
character strings.
|
|
|
|
error.c (print_wide_char): Rename into gfc_print_wide_char.
|
|
|
|
(show_locus): Adapt to new prototype of gfc_print_wide_char.
|
|
|
|
expr.c (free_expr0): Representation is now disjunct from
|
|
|
|
character string value, so we always free it.
|
|
|
|
(gfc_copy_expr, find_substring_ref, gfc_simplify_expr): Adapt
|
|
|
|
to wide character strings.
|
|
|
|
* gfortran.h (gfc_expr): Make value.character.string a wide string.
|
|
|
|
(gfc_wide_toupper, gfc_wide_strncasecmp, gfc_wide_memset,
|
|
|
|
gfc_widechar_to_char, gfc_char_to_widechar): New prototypes.
|
|
|
|
(gfc_get_wide_string): New macro.
|
|
|
|
(gfc_print_wide_char): New prototype.
|
|
|
|
* io.c (format_string): Make a wide string.
|
|
|
|
(next_char, gfc_match_format, compare_to_allowed_values,
|
|
|
|
gfc_match_open): Deal with wide strings.
|
|
|
|
* module.c (mio_expr): Convert between wide strings and ASCII ones.
|
|
|
|
* primary.c (match_hollerith_constant, match_charkind_name):
|
|
|
|
Handle wide strings.
|
|
|
|
* resolve.c (build_default_init_expr): Likewise.
|
|
|
|
* scanner.c (gfc_wide_toupper, gfc_wide_memset,
|
|
|
|
gfc_char_to_widechar): New functions.
|
|
|
|
(wide_strchr, gfc_widechar_to_char, gfc_wide_strncasecmp):
|
|
|
|
Changes in prototypes.
|
|
|
|
(gfc_define_undef_line, load_line, preprocessor_line,
|
|
|
|
include_line, load_file, gfc_read_orig_filename): Handle wide
|
|
|
|
strings.
|
|
|
|
* simplify.c (gfc_simplify_achar, gfc_simplify_adjustl,
|
|
|
|
gfc_simplify_adjustr, gfc_simplify_char, gfc_simplify_iachar,
|
|
|
|
gfc_simplify_ichar, simplify_min_max, gfc_simplify_new_line,
|
|
|
|
gfc_simplify_repeat): Handle wide strings.
|
|
|
|
(wide_strspn, wide_strcspn): New helper functions.
|
|
|
|
(gfc_simplify_scan, gfc_simplify_trim, gfc_simplify_verify):
|
|
|
|
Handle wide strings.
|
|
|
|
* symbol.c (generate_isocbinding_symbol): Likewise.
|
|
|
|
* target-memory.c (size_character, gfc_target_expr_size,
|
|
|
|
encode_character, gfc_target_encode_expr, gfc_interpret_character,
|
|
|
|
gfc_target_interpret_expr): Handle wide strings.
|
|
|
|
* trans-const.c (gfc_conv_string_init): Lower wide strings to
|
|
|
|
narrow ones.
|
|
|
|
(gfc_conv_constant_to_tree): Likewise.
|
|
|
|
* trans-expr.c (gfc_conv_substring_expr): Handle wide strings.
|
|
|
|
* trans-io.c (gfc_new_nml_name_expr): Likewise.
|
|
|
|
* trans-stmt.c (gfc_trans_label_assign): Likewise.
|
|
|
|
|
2008-05-06 22:28:19 +02:00
|
|
|
2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
|
|
|
|
|
|
|
* simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
|
|
|
|
gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
|
|
|
|
gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): Mark arguments
|
|
|
|
with ATTRIBUTE_UNUSED.
|
|
|
|
|
2008-05-06 22:24:05 +02:00
|
|
|
2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
|
|
|
|
|
|
|
* check.c (gfc_check_sizeof): Switch to ATTRIBUTE_UNUSED.
|
|
|
|
* simplify.c (gfc_simplify_lgamma): Likewise.
|
|
|
|
|
|
|
|
2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
openmp.c (gfc_match_omp_eos): Use gfc_next_ascii_char and gfc_peek_ascii_char.
* openmp.c (gfc_match_omp_eos): Use gfc_next_ascii_char and
gfc_peek_ascii_char.
* decl.c (gfc_match_kind_spec, gfc_match_type_spec,
gfc_match_implicit_none, match_implicit_range, gfc_match_implicit,
match_string_p, match_attr_spec, gfc_match_suffix,
match_procedure_decl, gfc_match_entry, gfc_match_subroutine):
Likewise.
* gfortran.h (gfc_char_t): New type.
(gfc_linebuf): Make line member a gfc_char_t.
(locus): Make nextc member a gfc_char_t.
(gfc_wide_is_printable, gfc_wide_is_digit, gfc_wide_fits_in_byte,
gfc_wide_tolower, gfc_wide_strlen, gfc_next_ascii_char,
gfc_peek_ascii_char, gfc_check_digit): New prototypes.
* error.c (print_wide_char): New function.
(show_locus): Use print_wide_char and gfc_wide_strlen.
* io.c (next_char): Use gfc_char_t type.
(match_io): Use gfc_peek_ascii_char and gfc_next_ascii_char.
* match.c (gfc_match_parens, gfc_match_eos,
gfc_match_small_literal_int, gfc_match_name, gfc_match_name_C,
gfc_match_intrinsic_op, gfc_match_char, gfc_match_return,
gfc_match_common): Likewise.
* match.h (gfc_match_special_char): Change prototype.
* parse.c (decode_specification_statement, decode_statement,
decode_omp_directive, next_free, next_fixed): Use
gfc_peek_ascii_char and gfc_next_ascii_char.
* primary.c (gfc_check_digit): Change name.
(match_digits, match_hollerith_constant, match_boz_constant,
match_real_constant, next_string_char, match_charkind_name,
match_string_constant, match_logical_constant_string,
match_complex_constant, match_actual_arg, match_varspec,
gfc_match_rvalue, match_variable): Use gfc_peek_ascii_char and
gfc_next_ascii_char.
* scanner.c (gfc_wide_fits_in_byte, wide_is_ascii,
gfc_wide_is_printable, gfc_wide_tolower, gfc_wide_is_digit,
gfc_wide_is_digit, wide_atoi, gfc_wide_strlen, wide_strcpy,
wide_strchr, widechar_to_char, wide_strncmp, wide_strncasecmp,
gfc_next_ascii_char, gfc_peek_ascii_char):
New functions.
(next_char, gfc_define_undef_line, skip_free_comments,
gfc_next_char_literal, gfc_next_char, gfc_peek_char,
gfc_error_recovery, load_line, preprocessor_line, include_line,
load_file, gfc_read_orig_filename): Use gfc_char_t for source
characters and the {gfc_,}wide_* functions to manipulate wide
strings.
From-SVN: r134992
2008-05-06 20:28:32 +02:00
|
|
|
|
|
|
|
* openmp.c (gfc_match_omp_eos): Use gfc_next_ascii_char and
|
|
|
|
gfc_peek_ascii_char.
|
|
|
|
* decl.c (gfc_match_kind_spec, gfc_match_type_spec,
|
|
|
|
gfc_match_implicit_none, match_implicit_range, gfc_match_implicit,
|
|
|
|
match_string_p, match_attr_spec, gfc_match_suffix,
|
|
|
|
match_procedure_decl, gfc_match_entry, gfc_match_subroutine):
|
|
|
|
Likewise.
|
|
|
|
* gfortran.h (gfc_char_t): New type.
|
|
|
|
(gfc_linebuf): Make line member a gfc_char_t.
|
|
|
|
(locus): Make nextc member a gfc_char_t.
|
|
|
|
(gfc_wide_is_printable, gfc_wide_is_digit, gfc_wide_fits_in_byte,
|
|
|
|
gfc_wide_tolower, gfc_wide_strlen, gfc_next_ascii_char,
|
|
|
|
gfc_peek_ascii_char, gfc_check_digit): New prototypes.
|
|
|
|
* error.c (print_wide_char): New function.
|
|
|
|
(show_locus): Use print_wide_char and gfc_wide_strlen.
|
|
|
|
* io.c (next_char): Use gfc_char_t type.
|
|
|
|
(match_io): Use gfc_peek_ascii_char and gfc_next_ascii_char.
|
|
|
|
* match.c (gfc_match_parens, gfc_match_eos,
|
|
|
|
gfc_match_small_literal_int, gfc_match_name, gfc_match_name_C,
|
|
|
|
gfc_match_intrinsic_op, gfc_match_char, gfc_match_return,
|
|
|
|
gfc_match_common): Likewise.
|
|
|
|
* match.h (gfc_match_special_char): Change prototype.
|
|
|
|
* parse.c (decode_specification_statement, decode_statement,
|
|
|
|
decode_omp_directive, next_free, next_fixed): Use
|
|
|
|
gfc_peek_ascii_char and gfc_next_ascii_char.
|
|
|
|
* primary.c (gfc_check_digit): Change name.
|
|
|
|
(match_digits, match_hollerith_constant, match_boz_constant,
|
|
|
|
match_real_constant, next_string_char, match_charkind_name,
|
|
|
|
match_string_constant, match_logical_constant_string,
|
|
|
|
match_complex_constant, match_actual_arg, match_varspec,
|
|
|
|
gfc_match_rvalue, match_variable): Use gfc_peek_ascii_char and
|
|
|
|
gfc_next_ascii_char.
|
|
|
|
* scanner.c (gfc_wide_fits_in_byte, wide_is_ascii,
|
|
|
|
gfc_wide_is_printable, gfc_wide_tolower, gfc_wide_is_digit,
|
|
|
|
gfc_wide_is_digit, wide_atoi, gfc_wide_strlen, wide_strcpy,
|
|
|
|
wide_strchr, widechar_to_char, wide_strncmp, wide_strncasecmp,
|
|
|
|
gfc_next_ascii_char, gfc_peek_ascii_char):
|
|
|
|
New functions.
|
|
|
|
(next_char, gfc_define_undef_line, skip_free_comments,
|
|
|
|
gfc_next_char_literal, gfc_next_char, gfc_peek_char,
|
|
|
|
gfc_error_recovery, load_line, preprocessor_line, include_line,
|
|
|
|
load_file, gfc_read_orig_filename): Use gfc_char_t for source
|
|
|
|
characters and the {gfc_,}wide_* functions to manipulate wide
|
|
|
|
strings.
|
|
|
|
|
2008-05-06 19:06:54 +02:00
|
|
|
2008-05-06 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
PR fortran/36117
|
|
|
|
* intrinsic.c (add_functions): Call gfc_simplify_bessel_*.
|
|
|
|
* intrinsic.h: Add prototypes for gfc_simplify_bessel_*.
|
|
|
|
* simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
|
|
|
|
gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
|
|
|
|
gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): New.
|
|
|
|
|
2008-05-03 22:37:48 +02:00
|
|
|
2008-05-03 Janus Weil <jaydub66@gmail.com>
|
|
|
|
|
|
|
|
* misc.c (gfc_clear_ts): Set interface to NULL.
|
|
|
|
|
2008-05-03 17:11:33 +02:00
|
|
|
2008-05-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/33268
|
|
|
|
* gfortran.h: Add extra_comma pointer to gfc_dt structure. Add iokind to
|
|
|
|
gfc_expr value union. Add io_kind enum to here from io.c.
|
|
|
|
* io.c (gfc_free_dt): Free extra_comma.
|
|
|
|
(gfc_resolve_dt): If an extra comma was encountered and io_unit is type
|
|
|
|
BT_CHARACTER, resolve to format_expr and set default unit. Error if
|
|
|
|
io_kind is M_WRITE. (match_io): Match the extra comma and set new
|
|
|
|
pointer, extra_comma.
|
|
|
|
|
2008-05-02 06:05:12 +02:00
|
|
|
2008-05-01 Bud Davis <bdavis9659@sbcglobal.net>
|
|
|
|
|
|
|
|
PR35940/Fortran
|
|
|
|
* simplify.c (gfc_simplify_index): Check for direction argument
|
|
|
|
being a constant.
|
|
|
|
|
2008-05-01 21:38:04 +02:00
|
|
|
2008-05-01 Janus Weil <jaydub66@gmail.com>
|
|
|
|
|
|
|
|
* gfortran.h (struct gfc_symbol): Moving "interface" member to
|
|
|
|
gfc_typespec (plus fixing a small docu error).
|
|
|
|
* interface.c (gfc_procedure_use): Ditto.
|
|
|
|
* decl.c (match_procedure_decl): Ditto.
|
|
|
|
* resolve.c (resolve_specific_f0,
|
|
|
|
resolve_specific_f0, resolve_symbol): Ditto.
|
|
|
|
|
2008-04-30 23:45:02 +02:00
|
|
|
2008-04-30 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
|
|
|
|
|
|
|
* intrinsic.c (add_functions): Add SELECTED_CHAR_KIND intrinsic.
|
|
|
|
* intrinsic.h (gfc_check_selected_char_kind,
|
|
|
|
gfc_simplify_selected_char_kind): New prototypes.
|
|
|
|
* gfortran.h (gfc_isym_id): Add GFC_ISYM_SC_KIND.
|
|
|
|
* trans.h (gfor_fndecl_sc_kind): New function decl.
|
|
|
|
* trans-decl.c (gfor_fndecl_sc_kind): Build new decl.
|
|
|
|
* arith.c (gfc_compare_with_Cstring): New function.
|
|
|
|
* arith.h (gfc_compare_with_Cstring): New prototype.
|
|
|
|
* check.c (gfc_check_selected_char_kind): New function.
|
|
|
|
* primary.c (match_string_constant, match_kind_param): Mark
|
|
|
|
symbols used as literal constant kind param as referenced.
|
|
|
|
* trans-intrinsic.c (gfc_conv_intrinsic_sc_kind): New function.
|
|
|
|
(gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_sc_kind.
|
|
|
|
* intrinsic.texi (SELECTED_CHAR_KIND): Document new intrinsic.
|
|
|
|
* simplify.c (gfc_simplify_selected_char_kind): New function.
|
|
|
|
|
2008-04-30 22:13:21 +02:00
|
|
|
2008-04-28 Paul Thomas <pault@gcc.gnu.org>
|
|
|
|
|
2008-04-30 23:45:02 +02:00
|
|
|
PR fortran/35997
|
|
|
|
* module.c (find_symbol): Do not return a result for a symbol
|
|
|
|
that has been renamed in another module.
|
2008-04-30 22:13:21 +02:00
|
|
|
|
2008-04-26 11:46:01 +02:00
|
|
|
2008-04-26 George Helffrich <george@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/35892
|
|
|
|
PR fortran/35154
|
|
|
|
* trans-common.c (create_common): Add decl to function
|
|
|
|
chain (if inside one) to preserve identifier scope in debug output.
|
|
|
|
|
re PR testsuite/35843 (-fdump-rtl-expand does not exist anymore)
PR testsuite/35843
* cfgexpand.c (pass_expand): Turn into RTL pass.
* passes.c (execute_one_pass): Do pass typechecking after execution.
* tree-pass.h (pass_expand): Turn into RTL pass.
* function.h (struct rtl_data): Move here fields
accesses_prior_frames, calls_eh_return, saves_all_registers,
has_nonlocal_goto, has_asm_statement, is_thunk,
all_throwers_are_sibcalls, limit_stack, profile, uses_const_pool,
uses_pic_offset_table, uses_eh_lsda, tail_call_emit,
arg_pointer_save_area_init from struct function; turn into bool.
(struct function): Move
calls_eh_return, saves_all_registers, has_nonlocal_goto,
has_asm_statement, is_thunk, all_throwers_are_sibcalls, limit_stack,
profile, uses_const_pool, uses_pic_offset_table, uses_eh_lsda,
tail_call_emit, arg_pointer_save_area_init
into struct rtl_data. Remove recursive_call_emit and gimplified flags.
(current_function_returns_struct, current_function_returns_pcc_struct,
current_function_calls_setjmp, current_function_calls_alloca,
current_function_accesses_prior_frames,
current_function_calls_eh_return, current_function_is_thunk,
current_function_stdarg, current_function_profile,
current_function_limit_stack, current_function_uses_pic_offset_table,
current_function_uses_const_pool, current_function_has_nonlocal_label,
current_function_saves_all_registers,
current_function_has_nonlocal_goto,
current_function_has_asm_statement): Remove accesor macros.
* ra-conflict.c (global_conflicts): Update.
* tree-tailcall.c (suitable_for_tail_opt_p): Update.
(suitable_for_tail_call_opt_p): Update.
* builtins.c (expand_builtin_return_addr): Update.
(expand_builtin_setjmp_setup): Update.
(expand_builtin_nonlocal_goto): Update.
* final.c (final_start_function): Update.
(profile_function): Update.
(leaf_function_p): Update.
(only_leaf_regs_used): Update.
* df-scan.c (df_get_exit_block_use_set): Update.
* dojump.c (clear_pending_stack_adjust): Update.
* tree-stdarg.c (gate_optimize_stdarg): Update.
* gimple-low.c (lower_function_body): Update.
* global.c (compute_regsets): Update.
(global_alloc): Update.
* dwarf2out.c (dwarf2out_begin_prologue): Update.
* expr.c (expand_assignment): Update.
* dse.c (dse_step0): Update.
(dse_step1): Update.
* c-decl.c (store_parm_decls): Update.
* local-alloc.c (combine_regs): Update.
(find_free_reg): Update.
* function.c (assign_parms_augmented_arg_list): Update.
(assign_parm_find_data_types): Update.
(assign_parms): Update.
(allocate_struct_function): Update.
(expand_function_start): Update.
(expand_function_end): Update.
(get_arg_pointer_save_area): Update.
(thread_prologue_and_epilogue_insns): Update.
(rest_of_match_asm_constraints): Update.
* stor-layout.c (variable_size): Update.
* gcse.c (gcse_main): Update.
(bypass_jumps): Update.
* gimplify.c (gimplify_function_tree): Update.
* calls.c (emit_call_1): Update.
(expand_call): Update.
* bt-load.c (compute_defs_uses_and_gen): Update.
* except.c (sjlj_assign_call_site_values): Update.
(sjlj_emit_function_enter): Update.
(can_throw_external): Update.
(set_nothrow_function_flags): Update.
(expand_builtin_unwind_init): Update.
(expand_eh_return): Update.
(convert_to_eh_region_ranges): Update.
(output_function_exception_table): Update.
* emit-rtl.c (gen_tmp_stack_mem): Update.
* cfgexpand.c (expand_used_vars): Update.
(tree_expand_cfg): Update.
* cfgcleanup.c (rest_of_handle_jump): Update.
* explow.c (allocate_dynamic_stack_space): Update.
* varasm.c (assemble_start_function): Update.
(force_const_mem): Update.
(mark_constant_pool): Update.
* tree-optimize.c (tree_rest_of_compilation): Update.
* stack-ptr-mod.c (notice_stack_pointer_modification): Update.
* tree-cfg.c (notice_special_calls): Update.
(is_ctrl_altering_stmt): Update.
(tree_can_make_abnormal_goto): Update.
(tree_purge_dead_abnormal_call_edges): Update.
* config/alpha/predicates.md: Update.
* config/alpha/alpha.c (alpha_sa_mask): Update.
(alpha_sa_size): Update.
(alpha_does_function_need_gp): Update.
(alpha_expand_prologue): Update.
(alpha_start_function): Update.
(alpha_output_function_end_prologue): Update.
(alpha_expand_epilogue): Update.
* config/frv/frv.c (frv_stack_info): Update.
(frv_expand_epilogue): Update.
* config/s390/s390.c (s390_regs_ever_clobbered): Update.
(s390_register_info): Update.
(s390_frame_info): Update.
(s390_init_frame_layout): Update.
(s390_can_eliminate): Update.
(save_gprs): Update.
* config/spu/spu.c (spu_split_immediate): Update.
(need_to_save_reg): Update.
(spu_expand_prologue): Update.
(spu_expand_epilogue): Update.
* config/sparc/sparc.md: Update.
* config/sparc/sparc.c (eligible_for_return_delay): Update.
(sparc_tls_got): Update.
(legitimize_pic_address): Update.
(sparc_emit_call_insn): Update.
(sparc_expand_prologue): Update.
(output_return): Update.
(print_operand): Update.
(sparc_function_ok_for_sibcall): Update.
* config/sparc/sparc.h (EXIT_IGNORE_STACK): Update.
* config/m32r/m32r.md: Update.
* config/m32r/m32r.c (MUST_SAVE_RETURN_ADDR): Update.
(m32r_compute_frame_size): Update.
(m32r_expand_prologue): Update.
(m32r_expand_epilogue): Update.
(m32r_legitimize_pic_address): Update.
* config/m32r/m32r.h (FRAME_POINTER_REQUIRED): Update.
* config/i386/linux.h (SUBTARGET_FRAME_POINTER_REQUIRED): Update.
* config/i386/i386.c (ix86_frame_pointer_required): Update.
(gen_push): Update.
(ix86_save_reg): Update.
(ix86_compute_frame_layout): Update.
(ix86_expand_prologue): Update.
(ix86_expand_epilogue): Update.
* config/sh/sh.c (output_stack_adjust): Update.
(calc_live_regs): Update.
(sh5_schedule_saves): Update.
(sh_expand_prologue): Update.
(sh_expand_epilogue): Update.
(sh_setup_incoming_varargs): Update.
(sh_allocate_initial_value): Update.
(sh_get_pr_initial_val): Update.
* config/sh/sh.h (SHMEDIA_REGS_STACK_ADJUST): Update.
* config/sh/sh.md (label:): Update.
* config/avr/avr.c (out_movhi_mr_r): Update.
* config/crx/crx.h (enum): Update.
* config/xtensa/xtensa.h (along): Update.
* config/stormy16/stormy16.c Update.
(xstormy16_compute_stack_layout): Update.
* config/fr30/fr30.c (MUST_SAVE_RETURN_POINTER): Update.
(fr30_expand_prologue): Update.
* config/cris/cris.c (cris_conditional_register_usage): Update.
(cris_reg_saved_in_regsave_area): Update.
(cris_initial_frame_pointer_offset): Update.
(cris_simple_epilogue): Update.
(cris_expand_prologue): Update.
(cris_expand_epilogue): Update.
(cris_expand_pic_call_address): Update.
(cris_asm_output_symbol_ref): Update.
(cris_asm_output_label_ref): Update.
* config/cris/cris.md Update.
* config/iq2000/iq2000.c (compute_frame_size): Update.
(iq2000_expand_epilogue): Update.
* config/mt/mt.h (save_direction): Update.
* config/mn10300/mn10300.c (mn10300_function_value): Update.
* config/ia64/ia64.c (ia64_compute_frame_size): Update.
(ia64_secondary_reload_class): Update.
* config/m68k/m68k.c (m68k_save_reg): Update.
(m68k_expand_prologue): Update.
(m68k_expand_epilogue): Update.
(legitimize_pic_address): Update.
* config/rs6000/rs6000.c (rs6000_got_register): Update.
(first_reg_to_save): Update.
(first_altivec_reg_to_save): Update.
(compute_vrsave_mask): Update.
(compute_save_world_info): Update.
(rs6000_stack_info): Update.
(spe_func_has_64bit_regs_p): Update.
(rs6000_ra_ever_killed): Update.
(rs6000_emit_eh_reg_restore): Update.
(rs6000_emit_allocate_stack): Update.
(rs6000_emit_prologue): Update.
(rs6000_emit_epilogue): Update.
(rs6000_output_function_epilogue): Update.
(output_profile_hook): Update.
(rs6000_elf_declare_function_name): Update.
* config/rs6000/rs6000.h (rs6000_args): Update.
* config/rs6000/rs6000.md: Update.
* config/mcore/mcore.c (mcore_expand_prolog): Update.
* config/arc/arc.c (arc_output_function_epilogue): Update.
* config/arc/arc.h (FRAME_POINTER_REQUIRED): Update.
* config/darwin.c (machopic_function_base_name): Update.
* config/score/score3.c (score3_compute_frame_size): Update.
(rpush): Update.
(rpop): Update.
(score3_epilogue): Update.
* config/score/score7.c (score7_compute_frame_size): Update.
(score7_prologue): Update.
(score7_epilogue): Update.
* config/score/score.h (FRAME_POINTER_REQUIRED): Update.
* config/arm/linux-elf.h (SUBTARGET_FRAME_POINTER_REQUIRED): Update.
* config/arm/arm.c (use_return_insn): Update.
(require_pic_register): Update.
(arm_load_pic_register): Update.
(arm_compute_save_reg0_reg12_mask): Update.
(arm_compute_save_reg_mask): Update.
(thumb1_compute_save_reg_mask): Update.
(output_return_instruction): Update.
(arm_output_function_prologue): Update.
(arm_output_epilogue): Update.
(arm_get_frame_offsets): Update.
(arm_expand_prologue): Update.
(thumb_pushpop): Update.
(thumb_exit): Update.
(thumb1_expand_prologue): Update.
(thumb1_expand_epilogue): Update.
(arm_unwind_emit): Update.
(arm_output_fn_unwind): Update.
* config/arm/arm.h (FRAME_POINTER_REQUIRED): Update.
* config/arm/arm.md: Update.
* config/pa/pa.md: Update.
* config/pa/pa.c (legitimize_pic_address): Update.
(compute_frame_size): Update.
(hppa_expand_prologue): Update.
(hppa_expand_epilogue): Update.
(borx_reg_operand): Update.
* config/pa/pa.h (FRAME_POINTER_REQUIRED): Update.
(HARD_REGNO_RENAME_OK): Update.
* config/mips/mips.c (mips_global_pointer): Update.
(mips_save_reg_p): Update.
(mips_compute_frame_info): Update.
(mips_frame_pointer_required): Update.
(mips_expand_prologue): Update.
(mips_expand_epilogue): Update.
(mips_can_use_return_insn): Update.
(mips_reorg_process_insns): Update.
* config/v850/v850.c (compute_register_save_size): Update.
* config/mmix/mmix.h (FRAME_POINTER_REQUIRED): Update.
* config/mmix/mmix.c (along): Update.
(mmix_expand_epilogue): Update.
* config/bfin/bfin.c (legitimize_pic_address): Update.
(must_save_p): Update.
(stack_frame_needed_p): Update.
(add_to_reg): Update.
(bfin_expand_prologue): Update.
* stmt.c (expand_asm_operands): Update.
* reload1.c (reload): Update.
(init_elim_table): Update.
From-SVN: r134682
2008-04-26 01:14:40 +02:00
|
|
|
2008-04-25 Jan Hubicka <jh@suse.cz>
|
|
|
|
|
|
|
|
* trans-decl.c (trans_function_start): Update.
|
|
|
|
|
2008-04-25 23:14:49 +02:00
|
|
|
2008-04-25 Tobias Burnus <burnus@net-b.de>
|
|
|
|
Daniel Franke <franke.daniel@gmail.com>
|
|
|
|
|
|
|
|
PR fortran/35156
|
|
|
|
* gfortranspec.c (lang_specific_driver): Deprecate
|
|
|
|
-M option; fix ICE when "-M" is last argument and
|
|
|
|
make "-M<dir>" work.
|
|
|
|
* options.c (gfc_handle_module_path_options):
|
|
|
|
Use -J instead of -M in error messages.
|
|
|
|
* invoke.texi: Mark -M as depecated.
|
|
|
|
|
2008-04-24 05:48:00 +02:00
|
|
|
2008-04-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
|
|
|
Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/35994
|
|
|
|
* trans-instrinsic.c (gfc_conv_intrinsic_minmaxloc): Correctly adjust
|
|
|
|
loop counter offset.
|
|
|
|
|
2008-04-23 17:00:52 +02:00
|
|
|
2008-04-23 Paolo Bonzini <bonzini@gnu.org>
|
|
|
|
|
|
|
|
* trans-expr.c (gfc_conv_structure): Don't set TREE_INVARIANT.
|
|
|
|
* trans-array.c (gfc_build_null_descriptor): Don't set TREE_INVARIANT.
|
|
|
|
(gfc_trans_array_constructor_value): Don't set TREE_INVARIANT.
|
|
|
|
(gfc_build_constant_array_constructor): Don't set TREE_INVARIANT.
|
|
|
|
(gfc_conv_array_initializer): Don't set TREE_INVARIANT.
|
|
|
|
* trans-common.c (get_init_field): Don't set TREE_INVARIANT.
|
|
|
|
(create_common): Don't set TREE_INVARIANT.
|
|
|
|
* trans-stmt.c (gfc_trans_character_select): Don't set TREE_INVARIANT.
|
|
|
|
* trans-decl.c (gfc_generate_function_code): Don't set TREE_INVARIANT.
|
|
|
|
|
2008-04-21 23:22:34 +02:00
|
|
|
2008-04-21 Steve Ellcey <sje@cup.hp.com>
|
|
|
|
|
|
|
|
* f95-lang.c (gfc_init_decl_processing): use ptr_mode instead of Pmode.
|
|
|
|
|
2008-04-21 19:10:15 +02:00
|
|
|
2008-04-21 Daniel Franke <franke.daniel@gmail.com>
|
|
|
|
|
|
|
|
PR fortran/35019
|
|
|
|
* gfortranspec.c (lookup_option): Properly handle separated arguments
|
|
|
|
in -J option, print missing argument message when necessary.
|
|
|
|
|
2008-04-20 23:11:22 +02:00
|
|
|
2008-04-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/35882
|
|
|
|
* scanner.c (skip_fixed_comments): Update continue_line when comment is
|
|
|
|
detected. (gfc_next_char_literal): Likewise.
|
|
|
|
|
2008-04-19 23:55:24 +02:00
|
|
|
2008-04-19 Paul Thomas <pault@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/35944
|
|
|
|
PR fortran/35946
|
|
|
|
PR fortran/35947
|
|
|
|
* trans_array.c (gfc_trans_array_constructor): Temporarily
|
|
|
|
realign loop, if loop->from is not zero, before creating
|
|
|
|
the temporary array and provide an offset.
|
|
|
|
|
|
|
|
PR fortran/35959
|
|
|
|
* trans-decl.c (gfc_init_default_dt): Add gfc_ prefix to name
|
|
|
|
and allow for NULL body. Change all references from
|
|
|
|
init_default_dt to gfc_init_default_dt.
|
|
|
|
* trans.h : Add prototype for gfc_init_default_dt.
|
|
|
|
* trans-array.c (gfc_trans_deferred_vars): After nullification
|
|
|
|
call gfc_init_default_dt for derived types with allocatable
|
|
|
|
components.
|
|
|
|
|
2008-04-19 08:34:12 +02:00
|
|
|
2008-04-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
|
|
|
|
2008-04-19 08:45:44 +02:00
|
|
|
PR fortran/35892
|
2008-04-19 08:34:12 +02:00
|
|
|
* trans-common.c (create_common): Revert patch causing regression.
|
|
|
|
|
2008-04-17 06:30:04 +02:00
|
|
|
2008-04-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/35724
|
|
|
|
* iresolve.c (gfc_resolve_eoshift): Check for NULL symtree in test for
|
|
|
|
optional argument attribute.
|
|
|
|
|
2008-04-16 22:53:07 +02:00
|
|
|
2008-04-16 Paul Thomas <pault@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/35932
|
|
|
|
* trans-intrinsic.c (gfc_conv_intrinsic_char): Even though KIND
|
|
|
|
is not used, the argument must be converted.
|
|
|
|
|
2008-04-16 17:56:58 +02:00
|
|
|
2008-04-16 Jakub Jelinek <jakub@redhat.com>
|
|
|
|
|
|
|
|
PR target/35662
|
|
|
|
* f95-lang.c (gfc_init_builtin_functions): Make sure
|
|
|
|
BUILT_IN_SINCOS{,F,L} types aren't varargs.
|
|
|
|
|
2008-04-15 21:40:33 +02:00
|
|
|
2008-04-15 Paul Thomas <pault@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/35864
|
|
|
|
* expr.c (scalarize_intrinsic_call): Reorder identification of
|
|
|
|
array argument so that if one is not found a segfault does not
|
|
|
|
occur. Return FAILURE if all scalar arguments.
|
|
|
|
|
2008-04-14 02:43:32 +02:00
|
|
|
2008-04-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
|
|
|
Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
PR fortran/35882
|
|
|
|
* options.c (gfc_init_options): Set the default maximum continuation
|
|
|
|
lines to 255 for both free and fixed form source for warnings.
|
|
|
|
(gfc_handle_option): Set -std=f95 fixed form max continuations to 19 and
|
|
|
|
the -std=f95 free form max continuations to 39 for warnings.
|
|
|
|
* scanner.c (gfc_next_char_literal): Adjust the current_line number only
|
|
|
|
if it is less than the current locus.
|
|
|
|
|
2008-04-08 00:07:44 +02:00
|
|
|
2008-04-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/25829 28655
|
|
|
|
* io.c (io_tag): Add new tags for decimal, encoding, asynchronous,
|
|
|
|
round, sign, and id. (match_open_element): Match new tags.
|
|
|
|
(gfc_resolve_open): Resolve new tags. (gfc_match_open): Enable encoding
|
|
|
|
for DEFAULT only. Update error messages. (match_dt_element): Fix match
|
|
|
|
tag for asynchronous. Update error messages. (gfc_free_inquire): Free
|
|
|
|
new expressions. (match_inquire_element): Match new tags.
|
|
|
|
(gfc_match_inquire): Add constraint for ID and PENDING.
|
|
|
|
(gfc_resolve_inquire): Resolve new tags.
|
|
|
|
* trans-io.c (gfc_trans_inquire): Clean up whitespace and fix setting of
|
|
|
|
mask for ID parameter.
|
|
|
|
* ioparm.def: Fix order of parameters for pending, round, and sign.
|
|
|
|
NOTE: These must line up with the definitions in libgfortran/io/io.h. or
|
|
|
|
things don't work.
|
|
|
|
|
Index...
Index: gcc/fortran/trans-stmt.c
===================================================================
*** gcc/fortran/trans-stmt.c (revision 133728)
--- gcc/fortran/trans-stmt.c (working copy)
*************** gfc_trans_where_2 (gfc_code * code, tree
*** 3540,3547 ****
/* Translate a simple WHERE construct or statement without dependencies.
CBLOCK is the "then" clause of the WHERE statement, where CBLOCK->EXPR
! is the mask condition, and EBLOCK if non-NULL is the "else" clause.
! Currently both CBLOCK and EBLOCK are restricted to single assignments. */
static tree
gfc_trans_where_3 (gfc_code * cblock, gfc_code * eblock)
--- 3540,3550 ----
/* Translate a simple WHERE construct or statement without dependencies.
CBLOCK is the "then" clause of the WHERE statement, where CBLOCK->EXPR
! is the mask condition, and EBLOCK if non-NULL is the "then" clause of
! the ELSWHERE. As required by 7.5.3.2, the WHERE and ELSEWHERE are
! executed with separate loops. It should be noted that the mask expression
! is evaluated for both loops. Currently both CBLOCK and EBLOCK are
! restricted to single assignments. */
static tree
gfc_trans_where_3 (gfc_code * cblock, gfc_code * eblock)
*************** gfc_trans_where_3 (gfc_code * cblock, gf
*** 3561,3566 ****
--- 3564,3570 ----
edst = eblock ? eblock->next->expr : NULL;
esrc = eblock ? eblock->next->expr2 : NULL;
+ /*---------------First do the WHERE part.----------------*/
gfc_start_block (&block);
gfc_init_loopinfo (&loop);
*************** gfc_trans_where_3 (gfc_code * cblock, gf
*** 3584,3619 ****
gfc_add_ss_to_loop (&loop, tdss);
gfc_add_ss_to_loop (&loop, tsss);
- if (eblock)
- {
- /* Handle the else clause. */
- gfc_init_se (&edse, NULL);
- gfc_init_se (&esse, NULL);
- edss = gfc_walk_expr (edst);
- esss = gfc_walk_expr (esrc);
- if (esss == gfc_ss_terminator)
- {
- esss = gfc_get_ss ();
- esss->next = gfc_ss_terminator;
- esss->type = GFC_SS_SCALAR;
- esss->expr = esrc;
- }
- gfc_add_ss_to_loop (&loop, edss);
- gfc_add_ss_to_loop (&loop, esss);
- }
-
gfc_conv_ss_startstride (&loop);
gfc_conv_loop_setup (&loop);
gfc_mark_ss_chain_used (css, 1);
gfc_mark_ss_chain_used (tdss, 1);
gfc_mark_ss_chain_used (tsss, 1);
! if (eblock)
! {
! gfc_mark_ss_chain_used (edss, 1);
! gfc_mark_ss_chain_used (esss, 1);
! }
!
gfc_start_scalarized_body (&loop, &body);
gfc_copy_loopinfo_to_se (&cse, &loop);
--- 3588,3600 ----
gfc_add_ss_to_loop (&loop, tdss);
gfc_add_ss_to_loop (&loop, tsss);
gfc_conv_ss_startstride (&loop);
gfc_conv_loop_setup (&loop);
gfc_mark_ss_chain_used (css, 1);
gfc_mark_ss_chain_used (tdss, 1);
gfc_mark_ss_chain_used (tsss, 1);
!
gfc_start_scalarized_body (&loop, &body);
gfc_copy_loopinfo_to_se (&cse, &loop);
*************** gfc_trans_where_3 (gfc_code * cblock, gf
*** 3622,3637 ****
cse.ss = css;
tdse.ss = tdss;
tsse.ss = tsss;
- if (eblock)
- {
- gfc_copy_loopinfo_to_se (&edse, &loop);
- gfc_copy_loopinfo_to_se (&esse, &loop);
- edse.ss = edss;
- esse.ss = esss;
- }
gfc_conv_expr (&cse, cond);
! gfc_add_block_to_block (&body, &cse.pre);
cexpr = cse.expr;
gfc_conv_expr (&tsse, tsrc);
--- 3603,3611 ----
cse.ss = css;
tdse.ss = tdss;
tsse.ss = tsss;
gfc_conv_expr (&cse, cond);
! gfc_add_block_to_block (&block, &cse.pre);
cexpr = cse.expr;
gfc_conv_expr (&tsse, tsrc);
*************** gfc_trans_where_3 (gfc_code * cblock, gf
*** 3643,3650 ****
--- 3617,3678 ----
else
gfc_conv_expr (&tdse, tdst);
+ /* Make the assignment on condition 'cond'. */
+ tstmt = gfc_trans_scalar_assign (&tdse, &tsse, tdst->ts, false, false);
+ tmp = build3_v (COND_EXPR, cexpr, tstmt, build_empty_stmt ());
+ gfc_add_expr_to_block (&body, tmp);
+ gfc_add_block_to_block (&body, &cse.post);
+
+ gfc_trans_scalarizing_loops (&loop, &body);
+ gfc_add_block_to_block (&block, &loop.pre);
+ gfc_add_block_to_block (&block, &loop.post);
+ gfc_cleanup_loop (&loop);
+
+ /*---------------Now do the ELSEWHERE.--------------*/
if (eblock)
{
+ gfc_init_loopinfo (&loop);
+
+ /* Handle the condition. */
+ gfc_init_se (&cse, NULL);
+ css = gfc_walk_expr (cond);
+ gfc_add_ss_to_loop (&loop, css);
+
+ /* Handle the then-clause. */
+ gfc_init_se (&edse, NULL);
+ gfc_init_se (&esse, NULL);
+ edss = gfc_walk_expr (edst);
+ esss = gfc_walk_expr (esrc);
+ if (esss == gfc_ss_terminator)
+ {
+ esss = gfc_get_ss ();
+ esss->next = gfc_ss_terminator;
+ esss->type = GFC_SS_SCALAR;
+ esss->expr = esrc;
+ }
+ gfc_add_ss_to_loop (&loop, edss);
+ gfc_add_ss_to_loop (&loop, esss);
+
+ gfc_conv_ss_startstride (&loop);
+ gfc_conv_loop_setup (&loop);
+
+ gfc_mark_ss_chain_used (css, 1);
+ gfc_mark_ss_chain_used (edss, 1);
+ gfc_mark_ss_chain_used (esss, 1);
+
+ gfc_start_scalarized_body (&loop, &body);
+
+ gfc_copy_loopinfo_to_se (&cse, &loop);
+ gfc_copy_loopinfo_to_se (&edse, &loop);
+ gfc_copy_loopinfo_to_se (&esse, &loop);
+ cse.ss = css;
+ edse.ss = edss;
+ esse.ss = esss;
+
+ gfc_conv_expr (&cse, cond);
+ gfc_add_block_to_block (&body, &cse.pre);
+ cexpr = cse.expr;
+
gfc_conv_expr (&esse, esrc);
if (edss != gfc_ss_terminator && loop.temp_ss != NULL)
{
*************** gfc_trans_where_3 (gfc_code * cblock, gf
*** 3653,3672 ****
}
else
gfc_conv_expr (&edse, edst);
}
- tstmt = gfc_trans_scalar_assign (&tdse, &tsse, tdst->ts, false, false);
- estmt = eblock ? gfc_trans_scalar_assign (&edse, &esse, edst->ts, false, false)
- : build_empty_stmt ();
- tmp = build3_v (COND_EXPR, cexpr, tstmt, estmt);
- gfc_add_expr_to_block (&body, tmp);
- gfc_add_block_to_block (&body, &cse.post);
-
- gfc_trans_scalarizing_loops (&loop, &body);
- gfc_add_block_to_block (&block, &loop.pre);
- gfc_add_block_to_block (&block, &loop.post);
- gfc_cleanup_loop (&loop);
-
return gfc_finish_block (&block);
}
--- 3681,3700 ----
}
else
gfc_conv_expr (&edse, edst);
+
+ /* Make the assignment on condition 'NOT.cond'. */
+ estmt = gfc_trans_scalar_assign (&edse, &esse, edst->ts, false, false);
+ cexpr = fold_build1 (TRUTH_NOT_EXPR, boolean_type_node, cexpr);
+ tmp = build3_v (COND_EXPR, cexpr, estmt, build_empty_stmt ());
+ gfc_add_expr_to_block (&body, tmp);
+ gfc_add_block_to_block (&body, &cse.post);
+
+ gfc_trans_scalarizing_loops (&loop, &body);
+ gfc_add_block_to_block (&block, &loop.pre);
+ gfc_add_block_to_block (&block, &loop.post);
+ gfc_cleanup_loop (&loop);
}
return gfc_finish_block (&block);
}
*************** gfc_trans_where (gfc_code * code)
*** 3698,3708 ****
cblock->next->expr2, 0))
return gfc_trans_where_3 (cblock, NULL);
}
else if (!eblock->expr
&& !eblock->block
&& eblock->next
&& eblock->next->op == EXEC_ASSIGN
! && !eblock->next->next)
{
/* A simple "WHERE (cond) x1 = y1 ELSEWHERE x2 = y2 ENDWHERE"
block is dependence free if cond is not dependent on writes
--- 3726,3739 ----
cblock->next->expr2, 0))
return gfc_trans_where_3 (cblock, NULL);
}
+ /* Since gfc_trans_where_3 evaluates the condition expression
+ twice, do not use it if the condition is not a variable. */
else if (!eblock->expr
&& !eblock->block
&& eblock->next
&& eblock->next->op == EXEC_ASSIGN
! && !eblock->next->next
! && cblock->expr->expr_type == EXPR_VARIABLE)
{
/* A simple "WHERE (cond) x1 = y1 ELSEWHERE x2 = y2 ENDWHERE"
block is dependence free if cond is not dependent on writes
Index: gcc/testsuite/gfortran.dg/where_1.f90
===================================================================
*** gcc/testsuite/gfortran.dg/where_1.f90 (revision 0)
--- gcc/testsuite/gfortran.dg/where_1.f90 (revision 0)
***************
*** 0 ****
--- 1,61 ----
+ ! { dg-do run }
+ ! { dg-options "-fdump-tree-original" }
+ ! Tests the fix for PR35759, in which the simple WHERE was logically
+ ! wrong. 7.5.3.2 requires that the WHERE and ELSEWHERE are execute in
+ ! separate loops, whereas gfortran was implementing them as a single
+ ! loop with an 'if' and 'else'. Since the condition expression is
+ ! evaluated twice with the fix, the use of anything other than a
+ ! variable or parameter array for the condition will trigger the more
+ ! comprehensive implementation of WHERE. This is checked by the
+ ! check of the declaration of temp.15 in the 'original' code.
+ !
+ ! Contributed by Dick Hendrickson <dick.hendrickson@gmail.com>
+ !
+ program RG0023
+
+ integer UDA1L(6)
+ integer :: UDA1R(6), expected(6) = (/2,0,5,0,3,0/)
+ LOGICAL LDA(5)
+ LOGICAL, parameter :: PDA(5) = (/ (i/2*2 .ne. I, i=1,5) /)
+
+ UDA1L(1:6) = 0
+ uda1r = (/1,2,3,4,5,6/)
+ lda = pda
+
+ WHERE (lda) ! expected
+ UDA1L(1:5) = UDA1R(2:6) ! uda1l = 2,0,4,0,6,0
+ ELSEWHERE
+ UDA1L(2:6) = UDA1R(6:2:-1) !uda1l = 2,0,5,0,3,0
+ ENDWHERE
+
+ if (any (uda1l /= expected)) call abort ()
+
+ uda1l = 0
+
+ WHERE (pda) ! expected
+ UDA1L(1:5) = UDA1R(2:6) ! uda1l = 2,0,4,0,6,0
+ ELSEWHERE
+ UDA1L(2:6) = UDA1R(6:2:-1) !uda1l = 2,0,5,0,3,0
+ ENDWHERE
+
+ if (any (uda1l /= expected)) call abort ()
+
+ uda1l = 0
+
+ WHERE (lfoo ()) ! expected
+ UDA1L(1:5) = UDA1R(2:6) ! uda1l = 2,0,4,0,6,0
+ ELSEWHERE
+ UDA1L(2:6) = UDA1R(6:2:-1) !uda1l = 2,0,5,0,3,0
+ ENDWHERE
+
+ if (any (uda1l /= expected)) call abort ()
+
+ contains
+
+ function lfoo () result (ltmp)
+ logical ltmp(5)
+ ltmp = lda
+ end function lfoo
+ END
+ ! { dg-final { scan-tree-dump-times "temp.18\\\[5\\\]" 1 "original" } }
+ ! { dg-final { cleanup-tree-dump "original" } }
From-SVN: r133965
2008-04-06 21:37:45 +02:00
|
|
|
2008-04-06 Paul Thomas <pault@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/35780
|
|
|
|
* expr.c (scalarize_intrinsic_call): Identify which argument is
|
|
|
|
an array and use that as the template.
|
|
|
|
(check_init_expr): Remove tests that first argument is an array
|
|
|
|
in the call to scalarize_intrinsic_call.
|
|
|
|
|
2008-06-20 15:57:00 +02:00
|
|
|
2008-04-06 Tobias Schlüter <tobi@gcc.gnu.org>
|
2008-04-06 20:58:34 +02:00
|
|
|
|
|
|
|
PR fortran/35832
|
|
|
|
* io.c (io_tag): Add field 'value'. Split 'spec' field in
|
|
|
|
existing io_tags.
|
|
|
|
(match_etag, match_vtag, match_ltag): Split parsing in two steps
|
|
|
|
to give better error messages.
|
|
|
|
|
2008-04-06 17:38:33 +02:00
|
|
|
2008-04-06 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
* io.c (check_io_constraints): Add constrains. ID= requires
|
|
|
|
asynchronous= and asynchronous= must be init expression.
|
|
|
|
|
2008-04-06 14:36:58 +02:00
|
|
|
2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
|
|
|
|
|
|
|
* f95-lang.c: Set LANG_HOOKS_NAME to "GNU Fortran".
|
|
|
|
|
2008-04-06 14:17:33 +02:00
|
|
|
2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
|
|
|
|
|
|
|
* dump-parse-tree.c: Use fprintf, fputs and fputc instead of
|
|
|
|
gfc_status and gfc_status_char. Remove gfc_ prefix of the gfc_show_*
|
|
|
|
functions and make them static. Add new gfc_dump_parse_tree
|
|
|
|
function.
|
|
|
|
* gfortran.h (gfc_option_t): Rename verbose into dump_parse_tree.
|
|
|
|
(gfc_status, gfc_status_char): Delete prototypes.
|
|
|
|
* error.c (gfc_status, gfc_status_char): Remove functions.
|
|
|
|
* scanner.c (gfc_new_file): Use printf instead of gfc_status.
|
|
|
|
* options.c (gfc_init_options): Rename verbose into dump_parse_tree.
|
|
|
|
(gfc_handle_module_path_options): Use gfc_fatal_error instead of
|
|
|
|
gfc_status and exit.
|
|
|
|
(gfc_handle_option): Rename verbose into dump_parse_tree.
|
2008-04-06 14:18:56 +02:00
|
|
|
* parse.c (gfc_parse_file): Use gfc_dump_parse_tree.
|
2008-04-06 14:17:33 +02:00
|
|
|
|
PR fortran/25829 28655
2008-04-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/25829 28655
* dump-parse-tree.c (gfc_show_code_node): Show new I/O parameters.
* gfortran.h (gfc_statement): Add ST_WAIT enumerator.
(gfc_open): Add pointers for decimal, encoding, round, sign,
asynchronous. (gfc_inquire): Add pointers for asynchronous, decimal,
encoding, pending, round, sign, size, id.
(gfc_wait): New typedef struct. (gfc_dt): Add pointers for id, pos,
asynchronous, blank, decimal, delim, pad, round, sign.
(gfc_exec_op): Add EXEC_WAIT enumerator. (gfc_code): Add pointer for
wait. (gfc_free_wait), (gfc_resolve_wait): New function prototypes.
* trans-stmt.h (gfc_trans_wait): New function prototype.
* trans.c (gfc_trans_code): Add case for EXEC_WAIT.
* io.c (io_tag): Add new tags for DECIMAL, ENCODING, ROUND, SIGN,
ASYCHRONOUS, ID. (match_open_element): Add matchers for new tags.
(gfc_free_open): Free new pointers. (gfc_resolve_open): Resolve new
tags. (gfc_resolve_open): Remove comment around check for allowed
values and ASYNCHRONOUS, update it. Likewise for DECIMAL, ENCODING,
ROUND, and SIGN. (match_dt_element): Add matching for new tags.
(gfc_free_wait): New function. (gfc_resolve_wait): New function.
(match_wait_element): New function. (gfc_match_wait): New function.
* resolve.c (gfc_resolve_blocks): Add case for EXEC_WAIT.
(resolve_code): Add case for EXEC_WAIT.
* st.c (gfc_free_statement): Add case for EXEC_WAIT.
* trans-io.c (ioparam_type): Add IOPARM_ptype_wait. (gfc_st_parameter):
Add "wait" entry. (iocall): Add IOCALL_WAIT enumerator.
(gfc_build_io_library_fndecls): Add function declaration for st_wait.
(gfc_trans_open): Add mask bits for new I/O tags.
(gfc_trans_inquire): Add mask bits for new I/O tags.
(gfc_trans_wait): New translation function.
(build_dt): Add mask bits for new I/O tags.
* match.c (gfc_match_if) Add matcher for "wait".
* match.h (gfc_match_wait): Prototype for new function.
* ioparm.def: Add new I/O parameter definitions.
* parse.c (decode_statement): Add match for "wait" statement.
(next_statement): Add case for ST_WAIT. (gfc_ascii_statement): Same.
Co-Authored-By: Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
From-SVN: r133944
2008-04-06 00:23:27 +02:00
|
|
|
2008-04-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
|
|
|
Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/25829 28655
|
|
|
|
* dump-parse-tree.c (gfc_show_code_node): Show new I/O parameters.
|
|
|
|
* gfortran.h (gfc_statement): Add ST_WAIT enumerator.
|
|
|
|
(gfc_open): Add pointers for decimal, encoding, round, sign,
|
|
|
|
asynchronous. (gfc_inquire): Add pointers for asynchronous, decimal,
|
|
|
|
encoding, pending, round, sign, size, id.
|
|
|
|
(gfc_wait): New typedef struct. (gfc_dt): Add pointers for id, pos,
|
|
|
|
asynchronous, blank, decimal, delim, pad, round, sign.
|
|
|
|
(gfc_exec_op): Add EXEC_WAIT enumerator. (gfc_code): Add pointer for
|
|
|
|
wait. (gfc_free_wait), (gfc_resolve_wait): New function prototypes.
|
|
|
|
* trans-stmt.h (gfc_trans_wait): New function prototype.
|
|
|
|
* trans.c (gfc_trans_code): Add case for EXEC_WAIT.
|
|
|
|
* io.c (io_tag): Add new tags for DECIMAL, ENCODING, ROUND, SIGN,
|
|
|
|
ASYCHRONOUS, ID. (match_open_element): Add matchers for new tags.
|
|
|
|
(gfc_free_open): Free new pointers. (gfc_resolve_open): Resolve new
|
|
|
|
tags. (gfc_resolve_open): Remove comment around check for allowed
|
|
|
|
values and ASYNCHRONOUS, update it. Likewise for DECIMAL, ENCODING,
|
|
|
|
ROUND, and SIGN. (match_dt_element): Add matching for new tags.
|
|
|
|
(gfc_free_wait): New function. (gfc_resolve_wait): New function.
|
|
|
|
(match_wait_element): New function. (gfc_match_wait): New function.
|
|
|
|
* resolve.c (gfc_resolve_blocks): Add case for EXEC_WAIT.
|
|
|
|
(resolve_code): Add case for EXEC_WAIT.
|
|
|
|
* st.c (gfc_free_statement): Add case for EXEC_WAIT.
|
|
|
|
* trans-io.c (ioparam_type): Add IOPARM_ptype_wait. (gfc_st_parameter):
|
|
|
|
Add "wait" entry. (iocall): Add IOCALL_WAIT enumerator.
|
|
|
|
(gfc_build_io_library_fndecls): Add function declaration for st_wait.
|
|
|
|
(gfc_trans_open): Add mask bits for new I/O tags.
|
|
|
|
(gfc_trans_inquire): Add mask bits for new I/O tags.
|
|
|
|
(gfc_trans_wait): New translation function.
|
|
|
|
(build_dt): Add mask bits for new I/O tags.
|
|
|
|
* match.c (gfc_match_if) Add matcher for "wait".
|
|
|
|
* match.h (gfc_match_wait): Prototype for new function.
|
|
|
|
* ioparm.def: Add new I/O parameter definitions.
|
|
|
|
* parse.c (decode_statement): Add match for "wait" statement.
|
|
|
|
(next_statement): Add case for ST_WAIT. (gfc_ascii_statement): Same.
|
|
|
|
|
2008-04-03 23:01:26 +02:00
|
|
|
2008-04-03 Jakub Jelinek <jakub@redhat.com>
|
|
|
|
|
|
|
|
PR fortran/35786
|
|
|
|
* openmp.c (resolve_omp_clauses): Diagnose if a clause symbol
|
|
|
|
isn't a variable.
|
|
|
|
|
2008-04-03 08:12:27 +02:00
|
|
|
2008-04-03 Tom Tromey <tromey@redhat.com>
|
|
|
|
|
|
|
|
* Make-lang.in (fortran_OBJS): New variable.
|
|
|
|
|
2008-04-03 07:41:57 +02:00
|
|
|
2008-04-03 Paolo Bonzini <bonzini@gnu.org>
|
|
|
|
|
2008-04-06 14:17:33 +02:00
|
|
|
* f95-lang.c (insert_block): Kill.
|
2008-04-03 07:41:57 +02:00
|
|
|
|
2008-04-01 23:23:36 +02:00
|
|
|
2008-04-01 George Helffrich <george@gcc.gnu.org>
|
|
|
|
|
2008-04-28 11:45:26 +02:00
|
|
|
PR fortran/35154, fortran/23057
|
2008-04-01 23:23:36 +02:00
|
|
|
* trans-common.c (create_common): Add decl to function
|
|
|
|
chain to preserve identifier scope in debug output.
|
|
|
|
|
2008-04-01 18:38:56 +02:00
|
|
|
2008-04-01 Joseph Myers <joseph@codesourcery.com>
|
|
|
|
|
|
|
|
* gfortran.texi: Include gpl_v3.texi instead of gpl.texi
|
|
|
|
* Make-lang.in (GFORTRAN_TEXI): Include gpl_v3.texi instead of
|
|
|
|
gpl.texi.
|
|
|
|
|
2008-03-30 16:13:21 +02:00
|
|
|
2008-03-30 Paul Thomas <pault@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/35740
|
|
|
|
* resolve.c (resolve_function, resolve_call): If the procedure
|
|
|
|
is elemental do not look for noncopying intrinsics.
|
|
|
|
|
2008-03-29 09:11:02 +01:00
|
|
|
2008-03-29 Paul Thomas <pault@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/35698
|
|
|
|
* trans-array.c (gfc_array_init_size): Set 'size' zero if
|
|
|
|
negative in one dimension.
|
|
|
|
|
|
|
|
PR fortran/35702
|
|
|
|
* trans-expr.c (gfc_trans_string_copy): Only assign a char
|
|
|
|
directly if the lhs and rhs types are the same.
|
|
|
|
|
2008-03-28 23:57:25 +01:00
|
|
|
2008-03-28 Daniel Franke <franke.daniel@gmail.com>
|
|
|
|
Paul Richard Thomas <paul.richard.thomas@gmail.com>
|
|
|
|
|
|
|
|
PR fortran/34714
|
|
|
|
* primary.c (match_variable): Improved matching of function
|
|
|
|
result variables.
|
|
|
|
* resolve.c (resolve_allocate_deallocate): Removed checks if
|
|
|
|
the actual argument for STAT is a variable.
|
|
|
|
|
2008-03-28 11:12:05 +01:00
|
|
|
2008-03-28 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
* symbol.c (gfc_get_default_type): Fix error message; option
|
|
|
|
-fallow_leading_underscore should be -fallow-leading-underscore
|
|
|
|
|
2008-03-28 05:44:40 +01:00
|
|
|
2008-03-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/35724
|
|
|
|
* iresolve.c (gfc_resolve_cshift): Check for NULL symtree in test for
|
|
|
|
optional argument attribute.
|
|
|
|
|
sourcebuild.texi, [...]: Revert automatic dependency patch.
gcc/
* doc/sourcebuild.texi, doc/install.texi, configure, aclocal.m4,
configure.ac, Makefile.in, config/t-darwin, config/m32c/t-m32c,
config/spu/t-spu-elf, config/i386/t-interix,
config/i386/t-cygming, config/i386/x-i386, config/i386/t-cygwin,
config/i386/x-darwin, config/i386/x-mingw32,
config/i386/t-netware, config/i386/x-cygwin, config/i386/t-nwld,
config/sh/t-sh, config/sh/t-symbian, config/x-linux,
config/t-sol2, config/x-hpux, config/x-darwin, config/ia64/t-ia64,
config/x-solaris, config/t-vxworks, config/m68k/t-uclinux,
config/rs6000/x-rs6000, config/rs6000/x-darwin64,
config/rs6000/x-darwin, config/rs6000/t-rs6000,
config/score/t-score-elf, config/arm/t-strongarm-pe,
config/arm/t-pe, config/arm/t-arm, config/arm/t-wince-pe,
config/v850/t-v850, config/v850/t-v850e, config/bfin/t-bfin-linux:
Revert automatic dependency patch.
gcc/java/
* Make-lang.in: Revert automatic dependency patch.
gcc/objc/
* Make-lang.in: Revert automatic dependency patch.
gcc/objcp/
* Make-lang.in: Revert automatic dependency patch.
gcc/cp/
* Make-lang.in: Revert automatic dependency patch.
gcc/fortran/
* Make-lang.in: Revert automatic dependency patch.
From-SVN: r133652
2008-03-27 20:20:18 +01:00
|
|
|
2008-03-27 Tom Tromey <tromey@redhat.com>
|
|
|
|
|
|
|
|
* Make-lang.in: Revert automatic dependency patch.
|
|
|
|
|
x-solaris (host-solaris.o): Update.
gcc
* config/x-solaris (host-solaris.o): Update.
* config/x-linux (host-linux.o): Update.
* config/x-hpux (host-hpux.o): Update.
* config/x-darwin (host-darwin.o): Update.
* config/v850/t-v850e (v850-c.o): Update.
* config/v850/t-v850 (v850-c.o): Update.
* config/t-vxworks (vxworks.o): Update.
* config/t-sol2 (sol2-c.o, sol2.o): Update.
* config/t-darwin (darwin.o, darwin-c.o, darwin-driver.o):
Update.
* config/spu/t-spu-elf (spu-c.o): Update.
(spu.o): Remove.
* config/sh/t-symbian (sh-c.o): Update.
(symbian.o): Update.
* config/sh/t-sh (sh-c.o): Update.
* config/score/t-score-elf (score7.o, score3.o): Update.
* config/rs6000/x-rs6000 (driver-rs6000.o): Update.
* config/rs6000/x-darwin64 (host-ppc64-darwin.o): Update.
* config/rs6000/x-darwin (host-ppc-darwin.o): Update.
* config/rs6000/t-rs6000 (rs6000-c.o): Update.
(rs6000.o): Remove.
* config/m68k/t-uclinux (generated_files): Add sysroot-suffix.h.
* config/m32c/t-m32c (m32c-pragma.o): Update.
* config/ia64/t-ia64 (ia64-c.o): Update.
* config/i386/x-mingw32 (host-mingw32.o): Update.
* config/i386/x-i386 (driver-i386.o): Update.
* config/i386/x-darwin (host-i386-darwin.o): Update.
* config/i386/x-cygwin (host-cygwin.o): Update.
* config/i386/t-nwld (nwld.o): Update.
* config/i386/t-netware (netware.o): Update.
* config/i386/t-interix (winnt.o): Update.
* config/i386/t-cygwin (cygwin1.o, cygwin2.o): Update.
* config/i386/t-cygming (winnt.o, winnt-cxx.o, winnt-stubs.o,
msformat-c.o): Update.
* config/bfin/t-bfin-linux (generated_files): Add
linux-sysroot-suffix.h.
* config/arm/t-wince-pe (pe.o): Update.
* config/arm/t-strongarm-pe (pe.o): Update.
* config/arm/t-pe (pe.o): Update.
* config/arm/t-arm (arm-c.o): Update.
* doc/install.texi (Prerequisites): Require make 3.80.
* Makefile.in: Remove .o targets.
(CCDEPMODE, DEPDIR, depcomp, BUILD_DEPMODE): New variables.
(OBSTACK_H, FIBHEAP_H, PARTITION_H, MD5_H, BCONFIG_H): Remove.
(simple_generated_h, simple_generated_c): Move earlier.
(generated_files): New variable.
(TARGET_H, MACHMODE_H, HOOKS_H, HOSTHOOKS_DEF_H, LANGHOOKS_DEF_H,
TARGET_DEF_H, RTL_BASE_H, RTL_H, PARAMS_H, BUILTINS_DEF, TREE_H,
BASIC_BLOCK_H, GCOV_IO_H, COVERAGE_H, DEMANGLE_H, RECOG_H,
ALIAS_H, EMIT_RTL_H, FLAGS_H, FUNCTION_H, EXPR_H, OPTABS_H,
REGS_H, RA_H, RESOURCE_H, SCHED_INT_H, INTEGRATE_H, CFGLAYOUT_H,
CFGLOOP_H, IPA_UTILS_H, IPA_REFERENCE_H, IPA_TYPE_ESCAPE_H,
CGRAPH_H, DF_H, RESOURCE_H, DDG_H, GCC_H, GGC_H, TIMEVAR_H,
INSN_ATTR_H, C_COMMON_H, C_PRAGMA_H, C_TREE_H, SYSTEM_H,
PREDICT_H, DECNUM_H, MKDEPS_H, SYMTAB_H, TREE_DUMP_H,
TREE_GIMPLE_H, TREE_FLOW_H, TREE_SSA_LIVE_H, PRETTY_PRINT_H,
DIAGNOSTIC_H, C_PRETTY_PRINT_H, SCEV_H, LAMBDA_H, TREE_DATA_REF_H,
VARRAY_H, TREE_INLINE_H, REAL_H, DBGCNT_H, EBIMAP_H): Remove.
(.c.o): Remove.
(COMPILE.base, COMPILE): New variables.
(%.o): New pattern rule.
(ALL_HOST_OBJS): New variable.
(xgcc$(exeext), cpp$(exeext)): Remove extra version.o.
(dummy-checksum.o, cc1-checksum.o): Remove.
(DRIVER_SHLIB): New variable.
(DRIVER_DEFINES): Use it.
(gencondmd.c): Move out of build/.
(s-conditions): Update.
(BUILDCOMPILE.base, BUILDCOMPILE): New variables.
(ALL_BUILD_OBJS): Likewise.
(build/%.o): Use BUILDCOMPILE.
(build/ggc-none.o, build/ggc-none.o, build/min-insn-modes.o,
build/print-rtl.o, build/read-rtl.o, build/rtl.o, build/vec.o,
build/gencondmd.o, build/genattrtab.o, build/genautomata.o,
build/gencheck.o, build/gencodes.o, build/genconditions.o,
build/genconfig.o, build/genconstants.o, build/genemit.o,
build/genextract.o, build/genflags.o, build/genmddeps.o,
build/genopinit.o, build/genoutput.o, build/genpeep.o,
build/genpreds.o, build/genrecog.o, build/gcov-iov.o,
build/gen-protos.o, build/scan.o, build/fix-header.o,
build/scan-decls.o): Simplify.
(collect2.o, c-opts.o, gcc.o, gccspec.o, gcc-options.o,
cppdefault.o, protoize.o, unprotoize.o, intl.o, version.o,
prefix.o, toplev.o): Reduce to variable setting.
(libbackend.o): Use COMPILE. Remove most dependencies. Move
later.
($(out_object_file), gcc-options.o): New targets.
($(ALL_HOST_OBJS)): New target.
Include dependency files.
* configure: Rebuilt.
* configure.ac: Call ZW_CREATE_DEPDIR,
ZW_PROG_COMPILER_DEPENDENCIES.
* doc/sourcebuild.texi (Front End Directory): Document new
variable.
gcc/java
* Make-lang.in: Removed most explicit .o targets.
(java/jvspec.o): Reduce to variable setting. Moved to java/.
($(GCJ)$(exeext)): Update.
(JAVA_OBJS): New variable.
(JCFDUMP_OBJS): Reformat.
(java_OBJS): New variable.
(java/jvspec.o-warn): Update.
(java/parse.o-warn): Remove.
(JAVA_TREE_H): Remove.
(java/jcf-io.o): Reduce to variable setting.
(ALL_CPPFLAGS): Likewise.
gcc/objc
* Make-lang.in (objc_OBJS): New variable.
(cc1obj-checksum.o, objc/objc-lang.o, objc/objc-act.o): Remove.
gcc/objcp
* Make-lang.in (objcp_OBJS): New variable.
(cc1objplus-checksum.o, objcp/objcp-lang.o, objcp/objcp-decl.o,
objcp/objcp-act.o): Remove.
gcc/cp
* Make-lang.in: Remove .o targets.
(cp/g++spec.o): Moved to cp/. Reduce to variable setting.
(GXX_OBJS): Update.
(c++_OBJS): New variable.
(CXX_TREE_H, CXX_PRETTY_PRINT_H): Remove.
gcc/fortran
* Make-lang.in: Remove .o targets.
(fortran_OBJS): New variable.
(fortran/gfortranspec.o): Move to fortran/. Reduce to variable
setting.
(GFORTRAN_D_OBJS): Update.
(GFORTRAN_TRANS_DEPS): Remove.
From-SVN: r133523
2008-03-25 17:56:50 +01:00
|
|
|
2008-03-25 Tom Tromey <tromey@redhat.com>
|
|
|
|
|
|
|
|
* Make-lang.in: Remove .o targets.
|
|
|
|
(fortran_OBJS): New variable.
|
|
|
|
(fortran/gfortranspec.o): Move to fortran/. Reduce to variable
|
|
|
|
setting.
|
|
|
|
(GFORTRAN_D_OBJS): Update.
|
|
|
|
(GFORTRAN_TRANS_DEPS): Remove.
|
|
|
|
|
2008-03-24 20:11:24 +01:00
|
|
|
2008-03-24 Paul Thomas <pault@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/34813
|
|
|
|
* resolve.c (resolve_structure_cons): It is an error to assign
|
|
|
|
NULL to anything other than a pointer or allocatable component.
|
|
|
|
|
|
|
|
PR fortran/33295
|
|
|
|
* resolve.c (resolve_symbol): If the symbol is a derived type,
|
|
|
|
resolve the derived type. If the symbol is a derived type
|
|
|
|
function, ensure that the derived type is visible in the same
|
|
|
|
namespace as the function.
|
|
|
|
|
2008-06-20 15:57:00 +02:00
|
|
|
2008-03-23 Tobias Schlüter <tobi@gcc.gnu.org>
|
2008-03-23 10:28:03 +01:00
|
|
|
|
|
|
|
* trans.h: Use fold_build in build1_v, build2_v and build3_v
|
|
|
|
macros.
|
|
|
|
* trans-openmp.c (gfc_trans_omp_critical, gfc_trans_omp_single):
|
|
|
|
Don't use build2_v macro.
|
|
|
|
|
2008-03-19 20:13:48 +01:00
|
|
|
2008-03-19 Daniel Franke <franke.daniel@gmail.com>
|
|
|
|
|
|
|
|
PR fortran/35152
|
|
|
|
* interface.c (gfc_procedure_use): Check for keyworded arguments in
|
|
|
|
procedures without explicit interfaces.
|
|
|
|
|
2008-03-16 20:14:17 +01:00
|
|
|
2008-03-16 Paul Thomas <pault@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/35470
|
|
|
|
* resolve.c (check_assumed_size_reference): Only visit the
|
|
|
|
first reference and look directly at the highest dimension.
|
|
|
|
|
2008-03-15 17:45:12 +01:00
|
|
|
2008-03-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/35184
|
|
|
|
* trans-array.c (gfc_conv_array_index_offset): Remove unnecessary
|
|
|
|
assert.
|
|
|
|
|
2008-03-15 15:28:55 +01:00
|
|
|
2008-03-15 Daniel Franke <franke.daniel@gmail.com>
|
|
|
|
|
|
|
|
PR fortran/35584
|
|
|
|
* resolve.c (resolve_branch): Less strict and pessimistic warning
|
|
|
|
message.
|
|
|
|
|
2008-03-11 17:44:25 +01:00
|
|
|
2008-03-11 Paolo Bonzini <bonzini@gnu.org>
|
|
|
|
|
2008-03-15 15:28:55 +01:00
|
|
|
* f95-lang.c (LANG_HOOKS_CLEAR_BINDING_STACK): Delete.
|
|
|
|
(gfc_be_parse_file): Call clear_binding_stack from here.
|
2008-03-11 17:44:25 +01:00
|
|
|
(gfc_clear_binding_stack): Rename to clear_binding_stack.
|
|
|
|
|
2008-03-09 20:38:51 +01:00
|
|
|
2008-03-09 Paul Thomas <pault@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/35474
|
|
|
|
* module.c (mio_symtree_ref): After providing a symbol for a
|
|
|
|
missing equivalence member, resolve and NULL the fixups.
|
|
|
|
|
2008-03-09 18:43:10 +01:00
|
|
|
2008-03-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
|
|
|
|
|
|
|
* invoke.texi (Error and Warning Options): Document
|
|
|
|
-Wline-truncation.
|
|
|
|
|
2008-03-08 19:22:31 +01:00
|
|
|
2008-03-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/34956
|
|
|
|
* trans-array.c (gfc_conv_ss_startstride): Fix the logic to avoid
|
|
|
|
checking bounds of absent optional arguments.
|
|
|
|
|
2008-03-06 13:40:28 +01:00
|
|
|
2008-03-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/33197
|
|
|
|
* intrinsic.c (add_functions): Add simplification routines for
|
|
|
|
ERF, DERF, ERFC and DERFC.
|
|
|
|
* decl.c (gfc_match_suffix, gfc_match_subroutine): Change GNU
|
|
|
|
extensions into Fortran 2008 features.
|
|
|
|
* intrinsic.h (gfc_simplify_erf, gfc_simplify_erfc): New
|
|
|
|
prototypes.
|
|
|
|
* simplify.c (gfc_simplify_erf, gfc_simplify_erfc): New functions.
|
|
|
|
|
re PR fortran/33197 (Fortran 2008: math functions)
PR fortran/33197
gcc/fortran/
* intrinsic.c (add_functions): Modify intrinsics ACOSH, ASINH,
ATANH, ERF, ERFC and GAMMA. Add intrinsics BESSEL_{J,Y}{0,1,N},
ERFC_SCALED, LOG_GAMMA and HYPOT.
* intrinsic.h (gfc_check_hypot, gfc_simplify_hypot,
gfc_resolve_hypot): New prototypes.
* mathbuiltins.def: Add HYPOT builtin. Make complex versions of
ACOSH, ASINH and ATANH available.
* gfortran.h (GFC_ISYM_ERFC_SCALED, GFC_ISYM_HYPOT): New values.
* lang.opt: Add -std=f2008 option.
* libgfortran.h: Define GFC_STD_F2008.
* lang-specs.h: Add .f08 and .F08 file suffixes.
* iresolve.c (gfc_resolve_hypot): New function.
* parse.c (parse_contained): Allow empty CONTAINS for Fortran 2008.
* check.c (gfc_check_hypot): New function.
* trans-intrinsic.c (gfc_intrinsic_map): Define ERFC_SCALE builtin.
* options.c (set_default_std_flags): Allow Fortran 2008 by default.
(form_from_filename): Add .f08 suffix.
(gfc_handle_option): Handle -std=f2008 option.
* simplify.c (gfc_simplify_hypot): New function.
* gfortran.texi: Document Fortran 2008 status and file extensions.
* intrinsic.texi: Document new BESSEL_{J,Y}{0,1,N} intrinsics,
as well as HYPOT and ERFC_SCALED. Update documentation of ERF,
ERFC, GAMMA, LGAMMA, ASINH, ACOSH and ATANH.
* invoke.texi: Document the new -std=f2008 option.
libgomp/
* testsuite/libgomp.fortran/fortran.exp: Add .f08 and
.F08 file suffixes.
gcc/testsuite/
* gfortran.dg/gomp/gomp.exp: Add .f08 and .F08 file suffixes.
* gfortran.dg/dg.exp: Likewise.
* gfortran.dg/vect/vect.exp: Likewise.
* gfortran.fortran-torture/execute/execute.exp: Likewise.
* gfortran.fortran-torture/compile/compile.exp: Likewise.
* gfortran.dg/gamma_1.f90: Also check log_gamma.
* gfortran.dg/invalid_contains_1.f90: Remove warning about
empty CONTAINS.
* gfortran.dg/gamma_2.f90: Add a few error messages.
* gfortran.dg/invalid_contains_2.f90: Remove warning about
empty CONTAINS.
* gfortran.dg/gamma_3.f90: Adjust error message.
* gfortran.dg/gamma_4.f90: Test for log_gamma instead of lgamma.
* gfortran.dg/bind_c_usage_9.f03: Adjust error messages.
* gfortran.dg/bessel_1.f90: New test.
* gfortran.dg/recursive_check_3.f90: Remove warnings.
* gfortran.dg/besxy.f90: Also check for new F2008 intrinsics.
* gfortran.dg/derived_function_interface_1.f90: Remove warning.
* gfortran.dg/contains_empty_1.f03: New test.
* gfortran.dg/erfc_scaled_1.f90: New test.
* gfortran.dg/hypot_1.f90: New test.
* gfortran.dg/contains_empty_2.f03: New test.
libgfortran/
* intrinsics/erfc_scaled_inc.c: New file.
* intrinsics/erfc_scaled.c: New file.
* gfortran.map (GFORTRAN_1.0): Add _gfortran_erfc_scaled_r*.
* Makefile.am: Add intrinsics/erfc_scaled.c.
* config.h.in: Regenerate.
* configure: Regenerate.
* Makefile.in: Regenerate.
From-SVN: r132846
2008-03-04 00:46:20 +01:00
|
|
|
2008-03-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/33197
|
|
|
|
* intrinsic.c (add_functions): Modify intrinsics ACOSH, ASINH,
|
|
|
|
ATANH, ERF, ERFC and GAMMA. Add intrinsics BESSEL_{J,Y}{0,1,N},
|
|
|
|
ERFC_SCALED, LOG_GAMMA and HYPOT.
|
|
|
|
* intrinsic.h (gfc_check_hypot, gfc_simplify_hypot,
|
|
|
|
gfc_resolve_hypot): New prototypes.
|
|
|
|
* mathbuiltins.def: Add HYPOT builtin. Make complex versions of
|
|
|
|
ACOSH, ASINH and ATANH available.
|
|
|
|
* gfortran.h (GFC_ISYM_ERFC_SCALED, GFC_ISYM_HYPOT): New values.
|
|
|
|
* lang.opt: Add -std=f2008 option.
|
|
|
|
* libgfortran.h: Define GFC_STD_F2008.
|
|
|
|
* lang-specs.h: Add .f08 and .F08 file suffixes.
|
|
|
|
* iresolve.c (gfc_resolve_hypot): New function.
|
|
|
|
* parse.c (parse_contained): Allow empty CONTAINS for Fortran 2008.
|
|
|
|
* check.c (gfc_check_hypot): New function.
|
|
|
|
* trans-intrinsic.c (gfc_intrinsic_map): Define ERFC_SCALE builtin.
|
|
|
|
* options.c (set_default_std_flags): Allow Fortran 2008 by default.
|
|
|
|
(form_from_filename): Add .f08 suffix.
|
|
|
|
(gfc_handle_option): Handle -std=f2008 option.
|
|
|
|
* simplify.c (gfc_simplify_hypot): New function.
|
|
|
|
* gfortran.texi: Document Fortran 2008 status and file extensions.
|
|
|
|
* intrinsic.texi: Document new BESSEL_{J,Y}{0,1,N} intrinsics,
|
|
|
|
as well as HYPOT and ERFC_SCALED. Update documentation of ERF,
|
|
|
|
ERFC, GAMMA, LGAMMA, ASINH, ACOSH and ATANH.
|
|
|
|
* invoke.texi: Document the new -std=f2008 option.
|
|
|
|
|
2008-03-02 23:50:02 +01:00
|
|
|
2008-03-02 Jakub Jelinek <jakub@redhat.com>
|
|
|
|
|
|
|
|
* gfortranspec.c (lang_specific_driver): Update copyright notice
|
|
|
|
dates.
|
|
|
|
|
2008-02-29 23:50:25 +01:00
|
|
|
2008-02-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/35059
|
|
|
|
* expr.c (find_array_element): Modify traversing the constructor to
|
|
|
|
avoid trying to access NULL memory pointed to by next for the
|
|
|
|
last element. (find_array_section): Exit while loop if cons->next is
|
|
|
|
NULL.
|
|
|
|
* trans-expr.c (gfc_conv_scalar_char_value): Initialize gfc_typespec.
|
|
|
|
(gfc_conv_function_call): Same.
|
|
|
|
* decl.c (gfc_match_implicit): Same.
|
|
|
|
* trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Same.
|
|
|
|
|
2008-02-28 21:22:55 +01:00
|
|
|
2008-02-28 Daniel Franke <franke.daniel@gmail.com>
|
|
|
|
|
|
|
|
PR fortran/31463
|
|
|
|
PR fortran/33950
|
|
|
|
PR fortran/34296
|
|
|
|
* lang.opt: Added -Wreturn-type.
|
|
|
|
* options.c (gfc_handle_option): Recognize -Wreturn-type.
|
|
|
|
* trans-decl.c (gfc_trans_deferred_vars): Emit warnings for funtions
|
|
|
|
where the result value is not set.
|
|
|
|
(gfc_generate_function_code): Likewise.
|
|
|
|
(generate_local_decl): Emit warnings for funtions whose RESULT
|
|
|
|
variable is not set.
|
|
|
|
|
2008-02-28 16:42:21 +01:00
|
|
|
2008-02-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/34868
|
|
|
|
* trans-expr.c (gfc_conv_variable): Don't build indirect
|
|
|
|
references when explicit interface is mandated.
|
|
|
|
* resolve.c (resolve_formal_arglist): Set attr.always_explicit
|
|
|
|
on the result symbol as well as the procedure symbol.
|
|
|
|
|
re PR fortran/33387 (Fortran front-end should translate intrinsics by calling C99 function instead of libgfortran functions)
PR fortran/33387
* trans.h: Remove prototypes for gfor_fndecl_math_exponent4,
gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
gfor_fndecl_math_exponent16.
* f95-lang.c (build_builtin_fntypes): Add new function types.
(gfc_init_builtin_functions): Add new builtins for nextafter,
frexp, ldexp, fabs, scalbn and inf.
* iresolve.c (gfc_resolve_rrspacing): Don't add hidden arguments.
(gfc_resolve_scale): Don't convert type of second argument.
(gfc_resolve_set_exponent): Likewise.
(gfc_resolve_size): Don't add hidden arguments.
* trans-decl.c: Remove gfor_fndecl_math_exponent4,
gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
gfor_fndecl_math_exponent16.
* trans-intrinsic.c (gfc_intrinsic_map): Remove intrinsics
for scalbn, fraction, nearest, rrspacing, set_exponent and
spacing.
(gfc_conv_intrinsic_exponent): Directly call frexp.
(gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_nearest,
gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
gfc_conv_intrinsic_scale, gfc_conv_intrinsic_set_exponent): New
functions.
(gfc_conv_intrinsic_function): Use the new functions above.
From-SVN: r132713
2008-02-27 15:32:02 +01:00
|
|
|
2008-02-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/33387
|
|
|
|
* trans.h: Remove prototypes for gfor_fndecl_math_exponent4,
|
|
|
|
gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
|
|
|
|
gfor_fndecl_math_exponent16.
|
|
|
|
* f95-lang.c (build_builtin_fntypes): Add new function types.
|
|
|
|
(gfc_init_builtin_functions): Add new builtins for nextafter,
|
|
|
|
frexp, ldexp, fabs, scalbn and inf.
|
|
|
|
* iresolve.c (gfc_resolve_rrspacing): Don't add hidden arguments.
|
|
|
|
(gfc_resolve_scale): Don't convert type of second argument.
|
|
|
|
(gfc_resolve_set_exponent): Likewise.
|
|
|
|
(gfc_resolve_size): Don't add hidden arguments.
|
|
|
|
* trans-decl.c: Remove gfor_fndecl_math_exponent4,
|
|
|
|
gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
|
|
|
|
gfor_fndecl_math_exponent16.
|
|
|
|
* trans-intrinsic.c (gfc_intrinsic_map): Remove intrinsics
|
|
|
|
for scalbn, fraction, nearest, rrspacing, set_exponent and
|
|
|
|
spacing.
|
|
|
|
(gfc_conv_intrinsic_exponent): Directly call frexp.
|
|
|
|
(gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_nearest,
|
|
|
|
gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
|
|
|
|
gfc_conv_intrinsic_scale, gfc_conv_intrinsic_set_exponent): New
|
|
|
|
functions.
|
|
|
|
(gfc_conv_intrinsic_function): Use the new functions above.
|
|
|
|
|
2008-02-26 23:33:35 +01:00
|
|
|
2008-02-26 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
PR fortran/35033
|
|
|
|
* interface.c (check_operator_interface): Show better line for error
|
|
|
|
messages; fix constrains for user-defined assignment operators.
|
|
|
|
(gfc_extend_assign): Fix constrains for user-defined assignment
|
|
|
|
operators.
|
|
|
|
|
2008-02-26 17:05:24 +01:00
|
|
|
2008-02-26 Tom Tromey <tromey@redhat.com>
|
|
|
|
|
|
|
|
* trans-io.c (set_error_locus): Remove old location code.
|
|
|
|
* trans-decl.c (gfc_set_decl_location): Remove old location code.
|
|
|
|
* f95-lang.c (gfc_init): Remove test of USE_MAPPED_LOCATION.
|
|
|
|
* scanner.c (gfc_gobble_whitespace): Remove old location code.
|
|
|
|
(get_file): Likewise.
|
|
|
|
(preprocessor_line): Likewise.
|
|
|
|
(load_file): Likewise.
|
|
|
|
(gfc_new_file): Likewise.
|
|
|
|
* trans.c (gfc_trans_runtime_check): Remove old location code.
|
|
|
|
(gfc_get_backend_locus): Likewise.
|
|
|
|
(gfc_set_backend_locus): Likewise.
|
|
|
|
* data.c (gfc_assign_data_value): Remove old location code.
|
|
|
|
* error.c (show_locus): Remove old location code.
|
|
|
|
* gfortran.h (gfc_linebuf): Remove old location code.
|
|
|
|
(gfc_linebuf_linenum): Remove old-location variant.
|
|
|
|
|
2008-02-25 09:36:15 +01:00
|
|
|
2008-02-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/34729
|
|
|
|
* trans-const.c (gfc_build_string_const): Don't call gettext.
|
|
|
|
(gfc_build_localized_string_const): New function.
|
|
|
|
* trans-const.h (gfc_build_localized_string_const): New prototype.
|
|
|
|
* trans.c (gfc_trans_runtime_check): Use
|
|
|
|
gfc_build_localized_string_const instead of gfc_build_string_const.
|
|
|
|
(gfc_call_malloc): Likewise.
|
|
|
|
(gfc_allocate_with_status): Likewise.
|
|
|
|
(gfc_allocate_array_with_status): Likewise.
|
|
|
|
(gfc_deallocate_with_status): Likewise.
|
|
|
|
(gfc_call_realloc): Likewise.
|
|
|
|
* trans-io.c (gfc_trans_io_runtime_check): Likewise.
|
|
|
|
|
2008-06-20 15:57:00 +02:00
|
|
|
2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
|
2008-02-24 22:43:48 +01:00
|
|
|
|
|
|
|
* arith.c: Update copyright years.
|
|
|
|
* arith.h: Likewise.
|
|
|
|
* array.c: Likewise.
|
|
|
|
* bbt.c: Likewise.
|
|
|
|
* check.c: Likewise.
|
|
|
|
* data.c: Likewise.
|
|
|
|
* data.h: Likewise.
|
|
|
|
* decl.c: Likewise.
|
|
|
|
* dependency.c: Likewise.
|
|
|
|
* dependency.h: Likewise.
|
|
|
|
* dump-parse-tree.c: Likewise.
|
|
|
|
* error.c: Likewise.
|
|
|
|
* expr.c: Likewise.
|
|
|
|
* gfc-internals.texi: Likewise.
|
|
|
|
* gfortran.h: Likewise.
|
|
|
|
* gfortran.texi: Likewise.
|
|
|
|
* gfortranspec.c: Likewise.
|
|
|
|
* interface.c: Likewise.
|
|
|
|
* intrinsic.c: Likewise.
|
|
|
|
* intrinsic.h: Likewise.
|
|
|
|
* intrinsic.texi: Likewise.
|
|
|
|
* invoke.texi: Likewise.
|
|
|
|
* io.c: Likewise.
|
|
|
|
* iresolve.c: Likewise.
|
|
|
|
* iso-c-binding.def: Likewise.
|
|
|
|
* iso-fortran-env.def: Likewise.
|
|
|
|
* lang-specs.h: Likewise.
|
|
|
|
* lang.opt: Likewise.
|
|
|
|
* libgfortran.h: Likewise.
|
|
|
|
* match.c: Likewise.
|
|
|
|
* match.h: Likewise.
|
|
|
|
* matchexp.c: Likewise.
|
|
|
|
* misc.c: Likewise.
|
|
|
|
* module.c: Likewise.
|
|
|
|
* openmp.c: Likewise.
|
|
|
|
* options.c: Likewise.
|
|
|
|
* parse.c: Likewise.
|
|
|
|
* parse.h: Likewise.
|
|
|
|
* primary.c: Likewise.
|
|
|
|
* resolve.c: Likewise.
|
|
|
|
* scanner.c: Likewise.
|
|
|
|
* simplify.c: Likewise.
|
|
|
|
* st.c: Likewise.
|
|
|
|
* symbol.c: Likewise.
|
|
|
|
* target-memory.c: Likewise.
|
|
|
|
* target-memory.h: Likewise.
|
|
|
|
* trans-array.h: Likewise.
|
|
|
|
* trans-const.h: Likewise.
|
|
|
|
* trans-stmt.h: Likewise.
|
|
|
|
* trans-types.c: Likewise.
|
|
|
|
* trans-types.h: Likewise.
|
|
|
|
* types.def: Likewise.
|
|
|
|
|
2008-02-24 20:18:27 +01:00
|
|
|
2008-02-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/35223
|
|
|
|
* simplify.c (gfc_simplify_ibclr), (gfc_simplify_ibits),
|
|
|
|
(gfc_simplify_ibset): Remove call to range_check.
|
|
|
|
(simplify_cmplx), (gfc_simplify_dble), (gfc_simplify_float)
|
|
|
|
(gfc_simplify_real): Add call gfc_clear_ts to initialize the
|
|
|
|
temporary gfc_typspec variable.
|
|
|
|
|
2008-06-20 15:57:00 +02:00
|
|
|
2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
|
2008-02-24 22:38:53 +01:00
|
|
|
|
|
|
|
* trans-array.c (gfc_conv_descriptor_data_get,
|
|
|
|
gfc_conv_descriptor_data_set_internal,
|
|
|
|
gfc_conv_descriptor_data_addr, gfc_conv_descriptor_offset,
|
|
|
|
gfc_conv_descriptor_dtype, gfc_conv_descriptor_dimension,
|
|
|
|
gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
|
|
|
|
gfc_conv_descriptor_ubound, gfc_trans_create_temp_array,
|
|
|
|
gfc_conv_array_transpose, gfc_grow_array,
|
|
|
|
gfc_trans_array_constructor_subarray,
|
|
|
|
gfc_trans_array_constructor_value, gfc_trans_scalarized_loop_end,
|
|
|
|
gfc_array_init_size, gfc_array_allocate, gfc_array_deallocate,
|
|
|
|
gfc_conv_array_initializer, gfc_trans_array_bounds,
|
|
|
|
gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
|
|
|
|
gfc_get_dataptr_offset, gfc_conv_array_parameter,
|
|
|
|
gfc_trans_dealloc_allocated, get_full_array_size,
|
|
|
|
gfc_duplicate_allocatable, structure_alloc_comps): Use fold_buildN
|
|
|
|
instead of buildN.
|
|
|
|
* trans-expr.c (gfc_conv_expr_present, gfc_conv_missing_dummy,
|
|
|
|
gfc_conv_component_ref, gfc_conv_cst_int_power,
|
|
|
|
gfc_conv_function_call, gfc_trans_structur_assign): Likewise.
|
|
|
|
* trans-common.c (create_common): Likewise.
|
|
|
|
* trans-openmp.c (gfc_trans_omp_atomic, gfc_trans_omp_do):
|
|
|
|
Likewise.
|
|
|
|
* trans-const.c (gfc_conv_constant_to_tree): Likewise.
|
|
|
|
* trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_do,
|
|
|
|
gfc_trans_integer_select, gfc_trans_character_select,
|
|
|
|
gfc_trans_forall_loop, compute_overall_iter_number,
|
|
|
|
gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_allocate,
|
|
|
|
gfc_trans_deallocate): Likewise.
|
|
|
|
* trans.c (gfc_build_addr_expr, gfc_trans_runtime_check,
|
|
|
|
gfc_allocate_with_status, gfc_allocate_array_with_status,
|
|
|
|
gfc_deallocate_with_status): Likewise.
|
|
|
|
* f95-lang.c (gfc_truthvalue_conversion): Likewise.
|
|
|
|
* trans-io.c (set_parameter_const, set_parameter_value,
|
|
|
|
set_parameter_ref, set_string, set_internal_unit, io_result,
|
|
|
|
set_error_locus, nml_get_addr_expr, transfer_expr): Likewise.
|
|
|
|
* trans-decl.c (gfc_build_qualified_array, build_entry_thunks,
|
|
|
|
gfc_get_fake_result_decl, gfc_trans_auto_character_variable,
|
|
|
|
gfc_generate_function_code): Likewise.
|
|
|
|
* convert.c (convert): Likewise.
|
|
|
|
* trans-intrinsic.c (gfc_conv_intrinsic_conversion,
|
|
|
|
build_fixbound_expr, build_fix_expr, gfc_conv_intrinsic_aint,
|
|
|
|
gfc_conv_intrinsic_int, gfc_conv_intrinsic_imagpart,
|
|
|
|
gfc_conv_intrinsic_conjg, gfc_conv_intrinsic_abs,
|
|
|
|
gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
|
|
|
|
gfc_conv_intrinsic_dim, gfc_conv_intrinsic_dprod,
|
|
|
|
gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
|
|
|
|
gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax,
|
|
|
|
gfc_conv_intrinsic_minmax_char, gfc_conv_intrinsic_count,
|
|
|
|
gfc_conv_intrinsic_arith, gfc_conv_intrinsic_dot_product,
|
|
|
|
gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
|
|
|
|
gfc_conv_intrinsic_btest, gfc_conv_intrinsic_not,
|
|
|
|
gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
|
|
|
|
gfc_conv_intrinsic_ichar, gfc_conv_intrinsic_size,
|
|
|
|
gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
|
|
|
|
gfc_conv_allocated, gfc_conv_associated, gfc_conv_intrinsic_trim,
|
|
|
|
gfc_conv_intrinsic_repeat): Likewise.
|
|
|
|
|
2008-05-06 22:24:05 +02:00
|
|
|
2008-02-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
2008-02-23 19:42:04 +01:00
|
|
|
|
|
|
|
PR target/25477
|
|
|
|
* trans-expr.c (gfc_conv_power_op): Use BUILT_IN_CPOW{F,,L}.
|
|
|
|
* f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_CPOW{F,,L}.
|
|
|
|
* trans.h (gfor_fndecl_math_cpow, gfor_fndecl_math_cpowf,
|
|
|
|
gfor_fndecl_math_cpowl10, gfor_fndecl_math_cpowl16): Remove.
|
|
|
|
* trans-decl.c: Likewise.
|
|
|
|
|
2008-02-24 20:18:27 +01:00
|
|
|
2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/35059
|
|
|
|
* expr.c (find_array_element): Modify traversing the constructor to
|
|
|
|
avoid trying to access NULL memory pointed to by next for the
|
|
|
|
last element. (find_array_section): Exit while loop if cons->next is
|
|
|
|
NULL.
|
|
|
|
|
|
|
|
2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
2008-02-22 07:21:47 +01:00
|
|
|
|
|
|
|
PR fortran/34907
|
|
|
|
* iresolve.c (resolve_mask_arg): Add gfc_clear_ts to initialize
|
|
|
|
structure.
|
|
|
|
(gfc_resolve_aint): Likewise.
|
|
|
|
(gfc_resolve_anint): Likewise.
|
|
|
|
(gfc_resolve_besn): Likewise.
|
|
|
|
(gfc_resolve_cshift): Likewise.
|
|
|
|
(gfc_resolve_ctime): Likewise.
|
|
|
|
(gfc_resolve_eoshift): Likewise.
|
|
|
|
(gfc_resolve_index_func): Likewise.
|
|
|
|
(gfc_resolve_isatty): Likewise.
|
|
|
|
(gfc_resolve_malloc): Likewise.
|
|
|
|
(gfc_resolve_rrspacing): Likewise.
|
|
|
|
(gfc_resolve_scale): Likewise.
|
|
|
|
(gfc_resolve_set_exponent): Likewise.
|
|
|
|
(gfc_resolve_spacing): Likewise.
|
|
|
|
(gfc_resolve_spacing): Likewise.
|
|
|
|
(gfc_resolve_fgetc): Likewise.
|
|
|
|
(gfc_resolve_fputc): Likewise.
|
|
|
|
(gfc_resolve_ftell): Likewise.
|
|
|
|
(gfc_resolve_ttynam): Likewise.
|
|
|
|
(gfc_resolve_alarm_sub): Likewise.
|
|
|
|
(gfc_resolve_mvbits): Likewise.
|
|
|
|
(gfc_resolve_getarg): Likewise.
|
|
|
|
(gfc_resolve_signal_sub): Likewise.
|
|
|
|
(gfc_resolve_exit): Likewise.
|
|
|
|
(gfc_resolve_flush): Likewise.
|
|
|
|
(gfc_resolve_free): Likewise.
|
|
|
|
(gfc_resolve_ctime_sub): Likewise.
|
|
|
|
(gfc_resolve_fgetc_sub): Likewise.
|
|
|
|
(gfc_resolve_fputc_sub): Likewise.
|
|
|
|
(gfc_resolve_fseek_sub): Likewise.
|
|
|
|
(gfc_resolve_ftell_sub): Likewise.
|
|
|
|
(gfc_resolve_ttynam_sub): Likewise.
|
|
|
|
|
2008-02-22 07:01:51 +01:00
|
|
|
2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
|
|
|
|
|
|
|
* gfc-internals.texi: Fix typos and markup nits.
|
|
|
|
* gfortran.texi: Likewise.
|
|
|
|
* intrinsic.texi: Likewise.
|
|
|
|
|
2008-02-21 10:38:07 +01:00
|
|
|
2008-02-21 Richard Guenther <rguenther@suse.de>
|
|
|
|
|
|
|
|
* trans-expr.c (gfc_conv_expr_op): Expand INTRINSIC_PARENTHESES
|
|
|
|
as unary PAREN_EXPR for real and complex typed expressions.
|
|
|
|
(gfc_conv_unary_op): Fold the built tree.
|
|
|
|
|
2008-02-20 19:21:14 +01:00
|
|
|
2008-02-20 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
PR fortran/34997
|
|
|
|
* match.c (gfc_match_name): Improve error message for '$'.
|
|
|
|
|
2008-02-19 19:26:12 +01:00
|
|
|
2008-02-19 Daniel Franke <franke.daniel@gmail.com>
|
|
|
|
|
|
|
|
PR fortran/35030
|
|
|
|
* expr.c (gfc_check_pointer_assign): Add type and kind information
|
|
|
|
to type-mismatch message.
|
|
|
|
(gfc_check_assign): Unify error messages.
|
|
|
|
|
2008-02-16 15:10:12 +01:00
|
|
|
2008-02-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/34952
|
|
|
|
* gfortran.texi: Create new section for unimplemented extensions.
|
|
|
|
Add "STRUCTURE and RECORD" and "ENCODE and DECODE statements".
|
|
|
|
Remove "smaller projects" list. Fix a few typos.
|
|
|
|
|
2008-02-15 23:56:37 +01:00
|
|
|
2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
|
|
|
|
|
|
|
* intrinsic.texi: Rename INDEX node to avoid clashing with
|
|
|
|
index.html on case-insensitive systems.
|
|
|
|
|
2008-02-15 22:12:24 +01:00
|
|
|
2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/35150
|
|
|
|
* trans-expr.c (gfc_conv_function_call): Force evaluation of
|
|
|
|
se->expr.
|
|
|
|
|
2008-02-10 16:01:39 +01:00
|
|
|
2008-02-10 Daniel Franke <franke.daniel@gmail.com>
|
|
|
|
|
2008-02-19 19:26:12 +01:00
|
|
|
PR fortran/35019
|
2008-02-10 16:01:39 +01:00
|
|
|
* lang.opt: Allow '-J<dir>' next to '-J <dir>',
|
|
|
|
likewise '-I <dir>' and '-I<dir>'.
|
|
|
|
|
2008-02-06 22:51:24 +01:00
|
|
|
2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
|
|
|
|
|
|
|
PR other/35107
|
|
|
|
* Make-lang.in (f951): Add $(GMPLIBS).
|
|
|
|
|
2008-02-05 22:06:32 +01:00
|
|
|
2008-02-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/35037
|
|
|
|
* trans-common.c (build_field): Mark fields as volatile when needed.
|
|
|
|
|
2008-02-05 21:40:45 +01:00
|
|
|
2008-02-05 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
PR fortran/35093
|
|
|
|
* data.c (gfc_assign_data_value): Only free "size" if
|
|
|
|
it has not already been freed.
|
|
|
|
|
2008-02-05 14:33:35 +01:00
|
|
|
2008-02-05 Paul Thomas <pault@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/34945
|
|
|
|
* array.c (match_array_element_spec): Remove check for negative
|
|
|
|
array size.
|
|
|
|
(gfc_resolve_array_spec): Add check for negative size.
|
|
|
|
|
2008-02-05 12:16:33 +01:00
|
|
|
2008-02-05 Paul Thomas <pault@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/32315
|
|
|
|
* data.c (gfc_assign_data_value): Add bounds check for array
|
|
|
|
references.
|
|
|
|
|
2008-02-04 23:29:35 +01:00
|
|
|
2008-02-04 Daniel Franke <franke.daniel@gmail.com>
|
|
|
|
|
|
|
|
* resolve.c (resolve_where): Fix typo.
|
|
|
|
(gfc_resolve_where_code_in_forall): Likewise.
|
|
|
|
|
2008-02-03 12:29:27 +01:00
|
|
|
2008-02-03 Paul Thomas <pault@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/32760
|
|
|
|
* resolve.c (resolve_allocate_deallocate): New function.
|
|
|
|
(resolve_code): Call it for allocate and deallocate.
|
|
|
|
* match.c (gfc_match_allocate, gfc_match_deallocate) : Remove
|
|
|
|
the checking of the STAT tag and put in above new function.
|
|
|
|
* primary,c (match_variable): Do not fix flavor of host
|
|
|
|
associated symbols yet if the type is not known.
|
|
|
|
|
2008-01-31 23:20:47 +01:00
|
|
|
2008-01-31 Paul Thomas <pault@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/34910
|
|
|
|
* expr.c (gfc_check_assign): It is an error to assign
|
|
|
|
to a sibling procedure.
|
|
|
|
|
2008-01-30 07:56:10 +01:00
|
|
|
2008-01-30 Paul Thomas <pault@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/34975
|
|
|
|
* symbol.c (gfc_delete_symtree, gfc_undo_symbols): Rename
|
|
|
|
delete_symtree to gfc_delete_symtree.
|
|
|
|
* gfortran.h : Add prototype for gfc_delete_symtree.
|
|
|
|
* module.c (load_generic_interfaces): Transfer symbol to a
|
|
|
|
unique symtree and delete old symtree, instead of renaming.
|
|
|
|
(read_module): The rsym and the found symbol are the same, so
|
|
|
|
the found symtree can be deleted.
|
|
|
|
|
|
|
|
PR fortran/34429
|
|
|
|
* decl.c (match_char_spec): Remove the constraint on deferred
|
|
|
|
matching of functions and free the length expression.
|
|
|
|
delete_symtree to gfc_delete_symtree.
|
|
|
|
(gfc_match_type_spec): Whitespace.
|
|
|
|
(gfc_match_function_decl): Defer characteristic association for
|
|
|
|
all types except BT_UNKNOWN.
|
|
|
|
* parse.c (decode_specification_statement): Only derived type
|
|
|
|
function matching is delayed to the end of specification.
|
|
|
|
|
2008-01-28 18:25:55 +01:00
|
|
|
2008-01-28 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
PR libfortran/34980
|
|
|
|
* simplify.c (gfc_simplify_shape): Simplify rank zero arrays.
|
|
|
|
|
2008-01-27 20:38:59 +01:00
|
|
|
2008-01-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/34990
|
|
|
|
* array.c (gfc_check_constructor_type): Revert clearing the expression.
|
|
|
|
|
2008-01-26 21:44:49 +01:00
|
|
|
2008-01-26 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
PR fortran/34848
|
|
|
|
* trans-expr.c (gfc_conv_function_call): Don't call
|
|
|
|
gfc_add_interface_mapping if the expression is NULL.
|
|
|
|
|
2008-01-26 20:01:07 +01:00
|
|
|
2008-01-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/31610
|
|
|
|
* trans-array.c (gfc_trans_create_temp_array): Remove call to
|
|
|
|
gcc_assert (integer_zerop (loop->from[n])).
|
|
|
|
|
2008-01-25 22:55:47 +01:00
|
|
|
2008-01-25 Daniel Franke <franke.daniel@gmail.com>
|
|
|
|
|
|
|
|
PR fortran/34661
|
|
|
|
* resolve.c (resolve_where): Added check if user-defined assignment
|
|
|
|
operator is an elemental subroutine.
|
|
|
|
(gfc_resolve_where_code_in_forall): Likewise.
|
|
|
|
|
2008-01-24 22:36:14 +01:00
|
|
|
2008-01-24 Daniel Franke <franke.daniel@gmail.com>
|
|
|
|
|
|
|
|
PR fortran/33375
|
|
|
|
PR fortran/34858
|
|
|
|
* gfortran.h: Revert changes from 2008-01-17.
|
|
|
|
* match.c: Likewise.
|
|
|
|
* symbol.c: Likewise.
|
|
|
|
(gfc_undo_symbols): Undo namespace changes related to common blocks.
|
|
|
|
|
2008-01-24 22:28:20 +01:00
|
|
|
2008-01-24 Daniel Franke <franke.daniel@gmail.com>
|
|
|
|
|
|
|
|
PR fortran/34202
|
|
|
|
* data.c (formalize_structure_cons): Skip formalization on
|
|
|
|
empty structures.
|
|
|
|
|
2008-01-24 19:28:11 +01:00
|
|
|
2008-01-24 Daniel Franke <franke.daniel@gmail.com>
|
|
|
|
|
|
|
|
* gfortran.texi (OpenMP): Extended existing documentation.
|
|
|
|
(contributors): Added major contributors of 2008 that were
|
|
|
|
not listed yet.
|
|
|
|
(proposed extensions): Removed implemented items.
|
|
|
|
|
|
|
|
2008-01-24 Paul Thomas <pault@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/34872
|
|
|
|
* parse.c (next_statement) : If ST_GET_FCN_CHARACTERISTICS is
|
|
|
|
seen, check for a statement label and, if present, delete it
|
|
|
|
and set the locus to the start of the statement.
|
|
|
|
|
2008-01-22 22:22:13 +01:00
|
|
|
2008-01-22 Paul Thomas <pault@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/34875
|
|
|
|
* trans-io.c (gfc_trans_transfer): If the array reference in a
|
|
|
|
read has a vector subscript, use gfc_conv_subref_array_arg to
|
|
|
|
copy back the temporary.
|
|
|
|
|
2008-01-22 20:35:49 +01:00
|
|
|
2008-01-22 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
PR fortran/34848
|
|
|
|
* interface.c (compare_actual_formal): Fix adding type
|
|
|
|
to missing_arg_type for absent optional arguments.
|
|
|
|
|
2008-01-22 17:43:20 +01:00
|
|
|
2008-01-22 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
PR fortran/34907
|
|
|
|
* parse.c (parse_spec): Change = into ==.
|
|
|
|
|
2008-01-22 13:19:54 +01:00
|
|
|
2008-01-22 Daniel Franke <franke.daniel@gmail.com>
|
|
|
|
|
|
|
|
PR fortran/34915
|
|
|
|
* expr.c (check_elemental): Fix check for valid data types.
|
|
|
|
|
2008-01-22 08:33:46 +01:00
|
|
|
2008-01-22 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
PR fortran/34899
|
|
|
|
* scanner.c (load_line): Support <tab><digit> continuation lines.
|
|
|
|
* invoke.texi (-Wtabs): Document this.
|
|
|
|
|
2008-01-22 07:01:54 +01:00
|
|
|
2008-01-22 Paul Thomas <pault@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/34896
|
|
|
|
* module.c (read_module): Set use_rename attribute.
|
|
|
|
|
2008-01-21 19:33:10 +01:00
|
|
|
2007-01-21 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
PR fortran/34901
|
|
|
|
* interface.c (compare_parameter): Improved error message
|
|
|
|
for arguments of same type and mismatched kinds.
|
|
|
|
|
2008-01-20 17:58:15 +01:00
|
|
|
2008-01-20 Paul Thomas <pault@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/34861
|
|
|
|
* resolve.c (resolve_entries): Do not do an array bounds check
|
|
|
|
if the result symbols are the same.
|
|
|
|
|
|
|
|
PR fortran/34854
|
|
|
|
* module.c (read_module) : Hide the symtree of the previous
|
|
|
|
version of the symbol if this symbol is renamed.
|
|
|
|
|
2008-01-20 09:22:56 +01:00
|
|
|
2008-01-20 Paul Thomas <pault@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/34784
|
|
|
|
* array.c (gfc_check_constructor_type): Clear the expression ts
|
|
|
|
so that the checking starts from the deepest level of array
|
|
|
|
constructor.
|
|
|
|
* primary.c (match_varspec): If an unknown type is changed to
|
|
|
|
default character and the attempt to match a substring fails,
|
|
|
|
change it back to unknown.
|
|
|
|
|
|
|
|
PR fortran/34785
|
|
|
|
* trans-array.c (gfc_add_loop_ss_code) : If ss->string_length is
|
|
|
|
NULL for an array constructor, use the cl.length expression to
|
|
|
|
build it.
|
|
|
|
(gfc_conv_array_parameter): Change call to gfc_evaluate_now to
|
|
|
|
a tree assignment.
|
|
|
|
|
2008-01-19 23:47:47 +01:00
|
|
|
2008-01-19 Thomas Koenig <tkoenig@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/34817
|
|
|
|
PR fortran/34838
|
|
|
|
* iresolve.c (gfc_resolve_all): Remove conversion of mask
|
|
|
|
argument to kind=1 by removing call to resolve_mask_arg().
|
|
|
|
(gfc_resolve_any): Likewise.
|
|
|
|
|
2008-01-19 16:41:04 +01:00
|
|
|
2008-01-19 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
PR fortran/34760
|
|
|
|
* primary.c (match_variable): Handle FL_UNKNOWN without
|
|
|
|
uneducated guessing.
|
|
|
|
(match_variable): Improve error message.
|
|
|
|
|
2008-01-19 00:46:04 +01:00
|
|
|
2008-01-18 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
PR fortran/32616
|
|
|
|
* interface.c (get_expr_storage_size): Return storage size
|
|
|
|
for array element designators.
|
|
|
|
(compare_actual_formal): Reject unequal string sizes for
|
|
|
|
assumed-shape dummy arguments. And fix error message for
|
|
|
|
array-sections with vector subscripts.
|
|
|
|
|
2008-01-18 03:08:22 +01:00
|
|
|
2008-01-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/34556
|
|
|
|
* simplify.c (is_constant_array_expr): New static function that returns
|
|
|
|
true if the given expression is an array and is constant.
|
|
|
|
(gfc_simplify_reshape): Use new function.
|
|
|
|
|
2008-01-18 02:29:11 +01:00
|
|
|
2008-01-17 H.J. Lu <hongjiu.lu@intel.com>
|
|
|
|
|
|
|
|
PR fortran/33375
|
|
|
|
* symbol.c (free_common_tree): Renamed to ...
|
|
|
|
(gfc_free_common_tree): This. Remove static.
|
|
|
|
(gfc_free_namespace): Updated.
|
|
|
|
|
|
|
|
* gfortran.h (gfc_free_common_tree): New.
|
|
|
|
|
|
|
|
* match.c (gfc_match_common): Call gfc_free_common_tree () with
|
|
|
|
gfc_current_ns->common_root and set gfc_current_ns->common_root
|
|
|
|
to NULL on syntax error.
|
|
|
|
|
2008-01-18 01:28:28 +01:00
|
|
|
2008-01-18 Richard Sandiford <rsandifo@nildram.co.uk>
|
|
|
|
|
|
|
|
PR fortran/34686
|
|
|
|
* trans-expr.c (gfc_conv_function_call): Use proper
|
|
|
|
type for returned character pointers.
|
|
|
|
|
2008-01-17 08:19:04 +01:00
|
|
|
2008-01-17 Paul Thomas <pault@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/34429
|
|
|
|
PR fortran/34431
|
|
|
|
PR fortran/34471
|
|
|
|
* decl.c : Remove gfc_function_kind_locus and
|
|
|
|
gfc_function_type_locus. Add gfc_matching_function.
|
|
|
|
(match_char_length): If matching a function and the length
|
|
|
|
does not match, return MATCH_YES and try again later.
|
|
|
|
(gfc_match_kind_spec): The same.
|
|
|
|
(match_char_kind): The same.
|
|
|
|
(gfc_match_type_spec): The same for numeric and derived types.
|
|
|
|
(match_prefix): Rename as gfc_match_prefix.
|
|
|
|
(gfc_match_function_decl): Except for function valued character
|
|
|
|
lengths, defer applying kind, type and charlen info until the
|
|
|
|
end of specification block.
|
|
|
|
gfortran.h (gfc_statement): Add ST_GET_FCN_CHARACTERISTICS.
|
|
|
|
parse.c (decode_specification_statement): New function.
|
|
|
|
(decode_statement): Call it when a function has kind = -1. Set
|
|
|
|
and reset gfc_matching function, as function statement is being
|
|
|
|
matched.
|
|
|
|
(match_deferred_characteristics): Simplify with a single call
|
|
|
|
to gfc_match_prefix. Do appropriate error handling. In any
|
|
|
|
case, make sure that kind = -1 is reset or corrected.
|
|
|
|
(parse_spec): Call above on seeing ST_GET_FCN_CHARACTERISTICS.
|
|
|
|
Throw an error if kind = -1 after last specification statement.
|
|
|
|
parse.h : Prototype for gfc_match_prefix.
|
|
|
|
|
2008-01-16 08:12:00 +01:00
|
|
|
2008-01-16 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
PR fortran/34796
|
|
|
|
* interface.c (compare_parameter): Allow AS_DEFERRED array
|
|
|
|
elements and reject attr.pointer array elemenents.
|
|
|
|
(get_expr_storage_size): Return storage size of elements of
|
|
|
|
assumed-shape and pointer arrays.
|
|
|
|
|
2008-01-16 00:45:28 +01:00
|
|
|
2008-01-15 Sebastian Pop <sebastian.pop@amd.com>
|
|
|
|
|
|
|
|
* f95-lang.c (gfc_init_builtin_functions): Initialize GOMP builtins
|
|
|
|
for flag_tree_parallelize_loops.
|
|
|
|
|
re PR libfortran/34671 (any(kind=1) and all(kind=1))
2008-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/34671
* gfortran.am: Added _gfortran_all_l1, _gfortran_all_l2,
_gfortran_any_l1, _gfortran_any_l2, -28,15 _gfortran_count_1_l,
_gfortran_count_16_l, _gfortran_count_2_l, _gfortran_count_4_l and
_gfortran_count_8_l Removed _gfortran_count_16_l16,
_gfortran_count_16_l4, _gfortran_count_16_l8,
_gfortran_count_4_l16, _gfortran_count_4_l4, _gfortran_count_4_l8,
_gfortran_count_8_l16, _gfortran_count_8_l4 and
_gfortran_count_8_l8.
* Makefile.am: Added generated/any_l1.c and generated/any_l2.c to
i_any_c. Added generated/all_l1. and generated/all_l2.c to
i_all_c. Removed generated/count_4_l4.c, generated/count_8_l4.c,
generated/count_16_l4.c, generated/count_4_l8.c,
generated/count_8_l8.c, generated/count_16_l8.c,
generated/count_4_l16.c, generated/count_8_l16.c, and
generated/count_16_l16.c from i_count_c. Added count_1_l.c,
count_2_l.c, count_4_l.c, count_8_l.c and count_16_l.c to
i_count_c. I_M4_DEPS2 depends on ifunction_logical.m4, for
any of the files generated from all.m4, any.m4 and count.m4.
* Makefile.in: Regenerated.
* m4/ifunction_logical.m4: New file. Use
GFC_LOGICAL_1 pointer for access to source arrays.
* m4/any.m4: Include ifunction_logical.m4 instead of
ifunction.m4. Don't check atype_name.
* m4/all.m4: Likewise.
* m4/count.m4: Likewise.
* generated/any_l1.c: New file.
* generated/any_l2.c: New file.
* generated/all_l1.c: New file.
* generated/count_1_l.c: New file.
* generated/count_2_l.c: New file.
* generated/count_4_l.c: New file.
* generated/count_8_l.c: New file.
* generated/count_16_l.c: New file.
* generated/any_l4.c: Regenerated.
* generated/any_l8.c: Regenerated.
* generated/any_l16.c: Regenerated.
* generated/all_l4.c: Regenerated.
* generated/all_l8.c: Regenerated.
* generated/all_l16.c: Regenerated.
* generated/count_4_l4.c: Removed.
* generated/count_4_l8.c: Removed.
* generated/count_4_l16.c: Removed.
* generated/count_8_l4.c: Removed.
* generated/count_8_l8.c: Removed.
* generated/count_8_l16.c: Removed.
* generated/count_16_l4.c: Removed.
* generated/count_16_l8.c: Removed.
* generated/count_16_l16.c: Removed.
2008-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/34671
* iresolve.c (gfc_resolve_all): Call resolve_mask_arg.
(gfc_resolve_any): Likewise.
(gfc_resolve_count): Likewise. Don't append kind of
argument to function name.
2008-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/34671
* gfortran.dg/anyallcount_1.f90: New test.
From-SVN: r131553
2008-01-15 22:22:07 +01:00
|
|
|
2008-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR libfortran/34671
|
|
|
|
* iresolve.c (gfc_resolve_all): Call resolve_mask_arg.
|
|
|
|
(gfc_resolve_any): Likewise.
|
|
|
|
(gfc_resolve_count): Likewise. Don't append kind of
|
|
|
|
argument to function name.
|
|
|
|
|
2008-01-13 22:35:33 +01:00
|
|
|
2008-01-13 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
PR fortran/34665
|
|
|
|
* resolve.c (resolve_actual_arglist): For expressions,
|
|
|
|
also check for assume-sized arrays.
|
|
|
|
* interface.c (compare_parameter): Move F2003 character checks
|
|
|
|
here, print error messages here, reject elements of
|
|
|
|
assumed-shape array as argument to dummy arrays.
|
|
|
|
(compare_actual_formal): Update for the changes above.
|
|
|
|
|
2008-01-13 22:29:49 +01:00
|
|
|
2008-01-13 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
PR fortran/34763
|
|
|
|
* decl.c (contained_procedure): Only check directly preceeding state.
|
|
|
|
|
2008-01-13 22:28:30 +01:00
|
|
|
2008-01-13 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
PR fortran/34759
|
|
|
|
* check.c (gfc_check_shape): Accept array ranges of
|
|
|
|
assumed-size arrays.
|
|
|
|
|
2008-01-12 09:35:25 +01:00
|
|
|
2008-01-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
|
|
|
|
2008-01-12 09:36:52 +01:00
|
|
|
PR fortran/34432
|
2008-01-12 09:35:25 +01:00
|
|
|
* match.c (gfc_match_name): Don't error if leading character is a '(',
|
|
|
|
just return MATCH_NO.
|
|
|
|
|
2008-01-11 22:15:41 +01:00
|
|
|
2008-01-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/34722
|
|
|
|
* trans-io.c (create_dummy_iostat): Commit the symbol.
|
|
|
|
|
2008-01-11 19:25:29 +01:00
|
|
|
2008-01-11 Paul Thomas <pault@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/34537
|
|
|
|
* simplify.c (gfc_simplify_transfer): Return NULL if the size
|
|
|
|
of the element is unavailable and only assign character length
|
|
|
|
to the result, if 'mold' is constant.
|
|
|
|
|
2008-01-10 20:10:48 +01:00
|
|
|
2008-01-10 Paul Thomas <pault@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/34396
|
|
|
|
* trans-array.c (gfc_trans_array_ctor_element): Use gfc_trans_string_copy
|
|
|
|
to assign strings and perform bounds checks on the string length.
|
|
|
|
(get_array_ctor_strlen): Remove bounds checking.
|
|
|
|
(gfc_trans_array_constructor): Initialize string length checking.
|
|
|
|
* trans-array.h : Add prototype for gfc_trans_string_copy.
|
|
|
|
|
2008-01-08 22:21:29 +01:00
|
|
|
2008-01-08 Richard Guenther <rguenther@suse.de>
|
|
|
|
|
|
|
|
PR fortran/34706
|
|
|
|
PR tree-optimization/34683
|
|
|
|
* trans-types.c (gfc_get_array_type_bounds): Use an array type
|
|
|
|
with known size for accesses if that is known.
|
|
|
|
|
2008-01-08 16:14:33 +01:00
|
|
|
2008-01-08 Paul Thomas <pault@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/34476
|
|
|
|
* expr.c (find_array_element): Check that the array bounds are
|
|
|
|
constant before using them. Use lower, as well as upper bound.
|
|
|
|
(check_restricted): Allow implied index variable.
|
|
|
|
|
2008-01-08 16:12:34 +01:00
|
|
|
2008-01-08 Paul Thomas <pault@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/34681
|
|
|
|
* trans_array.c (gfc_trans_deferred_array): Do not null the
|
|
|
|
data pointer on entering scope, nor deallocate it on leaving
|
|
|
|
scope, if the symbol has the 'save' attribute.
|
|
|
|
|
|
|
|
PR fortran/34704
|
|
|
|
* trans_decl.c (gfc_finish_var_decl): Derived types with
|
|
|
|
allocatable components and an initializer must be TREE_STATIC.
|
|
|
|
|
2008-01-07 17:44:43 +01:00
|
|
|
2008-01-07 Paul Thomas <pault@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/34672
|
|
|
|
* module.c (write_generic): Rewrite completely.
|
|
|
|
(write_module): Change call to write_generic.
|
|
|
|
|
2008-01-07 03:53:04 +01:00
|
|
|
2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/34659
|
|
|
|
* scanner.c (load_line): Do not count ' ' as printable when checking for
|
|
|
|
continuations.
|
|
|
|
|
2008-01-06 23:00:00 +01:00
|
|
|
2008-01-06 Paul Thomas <pault@gcc.gnu.org>
|
2008-01-06 20:36:44 +01:00
|
|
|
|
2008-01-06 23:00:00 +01:00
|
|
|
PR fortran/34545
|
|
|
|
* module.c (load_needed): If the namespace has no proc_name
|
|
|
|
give it the module symbol.
|
2008-01-06 20:36:44 +01:00
|
|
|
|
2008-01-06 19:19:06 +01:00
|
|
|
2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
|
|
|
|
|
|
|
PR fortran/34387
|
|
|
|
* trans-expr.c (gfc_conv_missing_dummy): Use a temporary to type convert
|
|
|
|
the dummy variable expression, test for NULL, and pass the variable
|
|
|
|
address to the called function.
|
|
|
|
|
2008-01-06 19:17:14 +01:00
|
|
|
2007-01-06 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
PR fortran/34658
|
|
|
|
* match.c (gfc_match_common): Remove blank common in
|
|
|
|
DATA BLOCK warning.
|
|
|
|
* resolve.c (resolve_common_vars): New function.
|
|
|
|
(resolve_common_blocks): Move checks to resolve_common_vars
|
|
|
|
and invoke that function.
|
|
|
|
(resolve_types): Call resolve_common_vars for blank commons.
|
|
|
|
|
2008-01-06 19:07:52 +01:00
|
|
|
2008-01-06 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
PR fortran/34655
|
|
|
|
* resolve.c (resolve_equivalence_derived): Reject derived types with
|
|
|
|
default initialization if equivalenced with COMMON variable.
|
|
|
|
|
2008-01-06 10:21:27 +01:00
|
|
|
2008-01-06 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
PR fortran/34654
|
|
|
|
* io.c (check_io_constraints): Disallow unformatted I/O for
|
|
|
|
internal units.
|
|
|
|
|
2008-01-06 10:18:43 +01:00
|
|
|
2008-01-06 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
PR fortran/34660
|
|
|
|
* resolve.c (resolve_formal_arglist): Reject dummy procedure in
|
|
|
|
ELEMENTAL functions.
|
|
|
|
|
2008-01-06 10:07:47 +01:00
|
|
|
2008-01-06 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
PR fortran/34662
|
|
|
|
* interface.c (compare_actual_formal): Reject parameter
|
|
|
|
actual to intent(out) dummy.
|
|
|
|
|
2008-01-04 10:11:26 +01:00
|
|
|
2008-01-04 Tobias Burnus <burnus@net-b.de>
|
|
|
|
|
|
|
|
PR fortran/34557
|
|
|
|
* primary.c (match_varspec): Gobble whitespace before
|
|
|
|
checking for '('.
|