gcc/gcc/fortran/ChangeLog

1077 lines
37 KiB
Plaintext
Raw Normal View History

2016-08-15 Fritz Reese <fritzoreese@gmail.com>
gcc/fortran/
* lang.opt, invoke.texi: New flag -finit-derived.
* gfortran.h (gfc_build_default_init_expr, gfc_apply_init,
gfc_generate_initializer): New prototypes.
* expr.c (gfc_build_default_init_expr, gfc_apply_init,
component_initializer, gfc_generate_initializer): New functions.
* expr.c (gfc_default_initializer): Wrap gfc_generate_initializer.
* decl.c (build_struct): Move common code to gfc_apply_init.
* resolve.c (can_generate_init): New function.
* resolve.c (build_default_init_expr): Wrap gfc_build_default_init_expr.
* resolve.c (apply_default_init, resolve_fl_variable_derived): Use
gfc_generate_initializer.
* trans-decl.c (gfc_generate_function_code): Use
gfc_generate_initializer.
2016-08-15 Thomas Koenig <tkoenig@gcc.gnu.org>
* frontend-passes.c (create_var): Set ts.deferred for
deferred-length character variables.
* dump-parse-tree.c (show_typespec): Also dump
is_c_interop, is_iso_c and deferred flags.
2016-08-15 Jakub Jelinek <jakub@redhat.com>
PR debug/71906
* trans-decl.c (gfc_get_symbol_decl): Call gfc_finish_var_decl
for decl's character length before gfc_finish_var_decl on the
decl itself.
2016-08-14 Chung-Lin Tang <cltang@codesourcery.com>
PR fortran/70598
* openmp.c (resolve_omp_clauses): Adjust use_device clause
handling to only allow pointers and arrays.
re PR c/7652 (-Wswitch-break : Warn if a switch case falls through) PR c/7652 gcc/ * alias.c (find_base_value): Adjust fall through comment. * cfgexpand.c (expand_debug_expr): Likewise. * combine.c (find_split_point): Likewise. (expand_compound_operation): Likewise. Add FALLTHRU. (make_compound_operation): Adjust fall through comment. (canon_reg_for_combine): Add FALLTHRU. (force_to_mode): Adjust fall through comment. (simplify_shift_const_1): Likewise. (simplify_comparison): Likewise. * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Add FALLTHRU. * config/aarch64/predicates.md: Likewise. * config/i386/i386.c (function_arg_advance_32): Likewise. (ix86_gimplify_va_arg): Likewise. (print_reg): Likewise. (ix86_print_operand): Likewise. (ix86_build_const_vector): Likewise. (ix86_expand_branch): Likewise. (ix86_sched_init_global): Adjust fall through comment. (ix86_expand_args_builtin): Add FALLTHRU. (ix86_expand_builtin): Likewise. (ix86_expand_vector_init_one_var): Likewise. * config/rs6000/rs6000.c (rs6000_emit_vector_compare_inner): Likewise. (rs6000_adjust_cost): Likewise. (insn_must_be_first_in_group): Likewise. * config/rs6000/rs6000.md: Likewise. Adjust fall through comment. * dbxout.c (dbxout_symbol): Adjust fall through comment. * df-scan.c (df_uses_record): Likewise. * dojump.c (do_jump): Add FALLTHRU. * dwarf2out.c (mem_loc_descriptor): Likewise. Adjust fall through comment. (resolve_args_picking_1): Adjust fall through comment. (loc_list_from_tree_1): Likewise. * expmed.c (make_tree): Likewise. * expr.c (expand_expr_real_2): Add FALLTHRU. (expand_expr_real_1): Likewise. Adjust fall through comment. * fold-const.c (const_binop): Adjust fall through comment. (fold_truth_not_expr): Likewise. (fold_cond_expr_with_comparison): Add FALLTHRU. (fold_binary_loc): Likewise. (contains_label_1): Adjust fall through comment. (multiple_of_p): Likewise. * gcov-tool.c (process_args): Add FALLTHRU. * genattrtab.c (check_attr_test): Likewise. (write_test_expr): Likewise. * genconfig.c (walk_insn_part): Likewise. * genpreds.c (validate_exp): Adjust fall through comment. (needs_variable): Likewise. * gensupport.c (get_alternatives_number): Add FALLTHRU. (subst_dup): Likewise. * gimple-pretty-print.c (dump_gimple_assign): Likewise. * gimplify.c (gimplify_addr_expr): Adjust fall through comment. (gimplify_scan_omp_clauses): Add FALLTHRU. (goa_stabilize_expr): Likewise. * graphite-isl-ast-to-gimple.c (substitute_ssa_name): Adjust fall through comment. * hsa-gen.c (get_address_from_value): Likewise. * ipa-icf.c (sem_function::hash_stmt): Likewise. * ira.c (ira_setup_alts): Add FALLTHRU. * lra-eliminations.c (lra_eliminate_regs_1): Adjust fall through comment. * lto-streamer-out.c (lto_output_tree_ref): Add FALLTHRU. * opts.c (common_handle_option): Likewise. * read-rtl.c (read_rtx_code): Likewise. * real.c (round_for_format): Likewise. * recog.c (asm_operand_ok): Likewise. * reginfo.c (reg_scan_mark_refs): Adjust fall through comment. * reload1.c (set_label_offsets): Likewise. (eliminate_regs_1): Likewise. (reload_reg_reaches_end_p): Likewise. * rtlanal.c (commutative_operand_precedence): Add FALLTHRU. (rtx_cost): Likewise. * sched-rgn.c (is_exception_free): Likewise. * simplify-rtx.c (simplify_rtx): Adjust fall through comment. * stor-layout.c (int_mode_for_mode): Likewise. * toplev.c (print_to_asm_out_file): Likewise. (print_to_stderr): Likewise. * tree-cfg.c (gimple_verify_flow_info): Likewise. * tree-chrec.c (chrec_fold_plus_1): Add FALLTHRU. (chrec_fold_multiply): Likewise. (evolution_function_is_invariant_rec_p): Likewise. (for_each_scev_op): Likewise. * tree-data-ref.c (siv_subscript_p): Likewise. (get_references_in_stmt): Likewise. * tree.c (find_placeholder_in_expr): Adjust fall through comment. (substitute_in_expr): Likewise. (type_cache_hasher::equal): Likewise. (walk_type_fields): Likewise. * var-tracking.c (adjust_mems): Add FALLTHRU. (set_dv_changed): Adjust fall through comment. * varasm.c (default_function_section): Add FALLTHRU. gcc/c-family/ * c-common.c (scalar_to_vector): Adjust fall through comment. * c-opts.c (c_common_handle_option): Likewise. * c-pragma.c (handle_pragma_pack): Add FALLTHRU. * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust fall through comment. * cilk.c (extract_free_variables): Add FALLTHRU. gcc/c/ * c-parser.c (c_parser_external_declaration): Add FALLTHRU. (c_parser_postfix_expression): Likewise. * c-typeck.c (build_unary_op): Adjust fall through comment. (c_mark_addressable): Likewise. gcc/cp/ * call.c (add_builtin_candidate): Add FALLTHRU. (build_integral_nontype_arg_conv): Adjust fall through comment. (build_new_op_1): Add FALLTHRU. (convert_like_real): Adjust fall through comment. * class.c (fixed_type_or_null): Likewise. * constexpr.c (cxx_eval_constant_expression): Likewise. (potential_constant_expression_1): Likewise. Add FALLTHRU. * cp-gimplify.c (cp_gimplify_expr): Adjust fall through comment. (cp_fold): Add FALLTHRU. * cvt.c (build_expr_type_conversion): Adjust fall through comment. * cxx-pretty-print.c (pp_cxx_unqualified_id): Add FALLTHRU. (pp_cxx_qualified_id): Likewise. (cxx_pretty_printer::constant): Adjust fall through comment. (cxx_pretty_printer::primary_expression): Add FALLTHRU. (pp_cxx_pm_expression): Adjust fall through comment. (cxx_pretty_printer::expression): Add FALLTHRU. (cxx_pretty_printer::declaration_specifiers): Reformat code. (pp_cxx_type_specifier_seq): Adjust fall through comment. (pp_cxx_ptr_operator): Likewise. Add FALLTHRU. * error.c (dump_type): Adjust fall through comment. (dump_decl): Likewise. * mangle.c (write_type): Likewise. * method.c (synthesized_method_walk): Add FALLTHRU. * name-lookup.c (arg_assoc_type): Likewise. * parser.c (cp_lexer_print_token): Adjust fall through comment. (cp_parser_primary_expression): Add FALLTHRU. (cp_parser_operator): Likewise. * pt.c (find_parameter_packs_r): Likewise. (tsubst_aggr_type): Adjust fall through comment. * semantics.c (finish_omp_clauses): Add FALLTHRU. * tree.c (lvalue_kind): Likewise. gcc/fortran/ * decl.c (match_attr_spec): Add FALLTHRU. * primary.c (match_arg_list_function): Likewise. * resolve.c (resolve_operator): Adjust fall through comment. (fixup_charlen): Add FALLTHRU. (resolve_allocate_expr): Adjust fall through comment. * trans-array.c (gfc_conv_ss_startstride): Add FALLTHRU. * trans-intrinsic.c (gfc_conv_intrinsic_len): Adjust fall through comment. gcc/java/ * expr.c (java_truthvalue_conversion): Adjust fall through comment. * jcf-io.c (verify_constant_pool): Likewise. * typeck.c (promote_type): Likewise. gcc/objc/ * objc-encoding.c (encode_type): Add FALLTHRU. libcpp/ * lex.c (search_line_fast): Add FALLTHRU. (_cpp_lex_direct): Likewise. (cpp_token_val_index): Adjust fall through comment. * macro.c (parse_params): Add FALLTHRU. * pch.c (count_defs): Adjust fall through comment. (write_defs): Likewise. libiberty/ * cp-demangle.c (d_print_mod): Add FALLTHRU. From-SVN: r239410
2016-08-12 12:30:47 +02:00
2016-08-12 Marek Polacek <polacek@redhat.com>
PR c/7652
* decl.c (match_attr_spec): Add FALLTHRU.
* primary.c (match_arg_list_function): Likewise.
* resolve.c (resolve_operator): Adjust fall through comment.
(fixup_charlen): Add FALLTHRU.
(resolve_allocate_expr): Adjust fall through comment.
* trans-array.c (gfc_conv_ss_startstride): Add FALLTHRU.
* trans-intrinsic.c (gfc_conv_intrinsic_len): Adjust fall through
comment.
2016-08-11 Janne Blomqvist <jb@gcc.gnu.org>
* check.c (gfc_check_random_seed): Use new seed size in check.
* intrinsic.texi (RANDOM_NUMBER): Updated documentation.
(RANDOM_SEED): Likewise.
2016-08-08 Jakub Jelinek <jakub@redhat.com>
PR fortran/72716
* openmp.c (gfc_match_omp_declare_simd): Don't stick anything into
BLOCK DATA ns, it will be rejected later.
2016-08-08 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/71936
* trans-array.c (gfc_array_allocate): When SOURCE= is a function
stick with the ref of the object to allocate.
2016-08-08 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/72698
* trans-stmt.c (gfc_trans_allocate): Prevent generating code for
copy of zero sized string and with it an ICE.
2016-08-08 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/70524
* trans-array.c (gfc_trans_dummy_array_bias): Ensure that the
location information is correctly set.
* trans-decl.c (gfc_trans_deferred_vars): Set the locus of the
current construct early.
2016-08-03 Fritz Reese <fritzoreese@gmail.com>
* lang.opt: New option -fdec-intrinsic-ints.
* options.c (set_dec_flags): Enable with -fdec.
* gfortran.texi, invoke.texi, intrinsics.texi: Update documentation.
* intrinsic.c (add_function, add_subroutine): New B/I/J/K intrinsic
variants.
2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/41922
* target-memory.c (expr_to_char): Pass in locus and use it in error
messages.
(gfc_merge_initializers): Ditto.
* target-memory.h: Update prototype for gfc_merge_initializers ().
* trans-common.c (get_init_field): Use the correct locus.
2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/68566
* check.c (gfc_check_reshape): Check for constant expression.
2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/69867
* decl.c (build_struct): Ensure that pointers point to something.
2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/69962
* decl.c (gfc_set_constant_character_len): if expr is not
constant issue an error instead of an ICE.
2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/70006
* io.c (gfc_resolve_dt): Use correct locus.
* resolve.c (resolve_branch): Ditto.
2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/71730
* decl.c (char_len_param_value): Check return value of
gfc_reduce_init_expr().
2016-07-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
* trans-array.c (gfc_conv_array_ref): Fix allocation of diagnostic
message (was too small).
2016-07-28 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/71067
* decl.c (match_data_constant): On error, set 'result' to NULL.
2016-07-28 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/71799
* resolve.c(gfc_resolve_iterator): Failure of type conversion need
not ICE.
2016-07-28 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/71859
* check.c(numeric_check): Prevent ICE. Issue error for invalid
subroutine as an actual argument when numeric argument is expected.
2016-07-28 Steven G. Kargl <kargl@gcc.gnu.org>
Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/71883
* frontend-passes.c (gfc_run_passes): Bail out if there are any
errors.
* error.c (gfc_internal_error): If there are any errors in the
buffer, exit with EXIT_FAILURE.
2016-07-28 Renlin Li <renlin.li@arm.com>
Revert
2016-07-19 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/71902
* dependency.c (gfc_check_dependency): Use dep_ref. Handle case
if identical is true and two array element references differ.
(gfc_dep_resovler): Move most of the code to dep_ref.
(dep_ref): New function.
* frontend-passes.c (realloc_string_callback): Name temporary
variable "realloc_string".
2016-07-26 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/71862
* class.c: Remove assert. Iterate over component only if non-null.
2016-07-22 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/71935
* check.c (is_c_interoperable): Simplify right expression.
2016-07-22 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/71795
* frontend-passes.c (combine_array_constructor): Don't
do anything if the expression is inside an array iterator.
2016-07-22 Andre Vehreschild <vehre@gcc.gnu.org>
* expr.c (gfc_find_stat_co): Fixed whitespaces.
* gfortran.texi: Fixed typos and reversed meaning of caf_get()'s
src and dst description.
* trans-decl.c (gfc_build_builtin_function_decls): Fixed style
and corrected fnspec for caf functions.
* trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Fixed style.
(conv_caf_send): Dito.
2016-07-19 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/71902
* dependency.c (gfc_check_dependency): Use dep_ref. Handle case
if identical is true and two array element references differ.
(gfc_dep_resovler): Move most of the code to dep_ref.
(dep_ref): New function.
* frontend-passes.c (realloc_string_callback): Name temporary
variable "realloc_string".
2016-07-17 Fritz Reese <fritzoreese@gmail.com>
PR fortran/71523
* trans-decl.c (gfc_finish_var_decl): Replace automatic initializer with
a static one.
2016-07-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Marco Restelli <mrestelli@gmail.com>
PR fortran/62125
* symbol.c (select_type_insert_tmp): Recursively call self to take care
of nested select type.
2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
* openmp.c (gfc_match_omp_clauses): Scan for clause vector_length
before vector.
2016-07-15 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/71807
* trans-expr.c (gfc_trans_subcomponent_assign): Special casing
when allocatable component is set to null() in initializer.
2016-07-14 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/29819
* parse.c (parse_contained): Use proper locus.
2016-07-14 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/70842
* simplify.c (gfc_simplify_len): Only for unlimited polymorphic
types replace the expression's _data ref with a _len ref.
2016-07-09 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/71783
* frontend-passes.c (create_var): Always allocate a charlen
for character variables.
2016-07-08 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/68426
* simplify (gfc_simplify_spread): Adjust locus.
2016-07-08 Cesar Philippidis <cesar@codesourcery.com>
* parse.c (matcha): Define.
(decode_oacc_directive): Add spec_only local var and set it. Use
matcha to parse acc directives except for routine and declare. Return
ST_GET_FCN_CHARACTERISTICS if a non-declarative directive could be
matched.
2016-07-08 Martin Liska <mliska@suse.cz>
* invoke.texi (Wundefined-do-loop): Enhance documentation.
2016-07-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/71764
* trans-expr.c (gfc_trans_structure_assign): Remove assert.
2016-07-07 Martin Liska <mliska@suse.cz>
* lang.opt (Wundefined-do-loop): New option.
* resolve.c (gfc_resolve_iterator): Warn for Wundefined-do-loop.
(gfc_trans_simple_do): Generate a c-style loop.
(gfc_trans_do): Fix GNU coding style.
* invoke.texi: Mention the new warning.
2016-07-07 Martin Liska <mliska@suse.cz>
* trans-stmt.c (gfc_trans_do): Add expect builtin for DO
loops with step bigger than +-1.
2016-07-05 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
* array.c (gfc_match_array_ref): Add parsing support for
STAT= attribute in CAF reference.
* expr.c (gfc_find_stat_co): New function that returns
the STAT= assignment.
* gfortran.h (gfc_array_ref): New member.
* trans-decl.c (gfc_build_builtin_function_decls):
new attribute for caf_get and caf_send functions.
* trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Passing
the stat attribute to external function.
(gfc_conv_intrinsic_caf_send): Ditto.
2016-07-05 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/71623
* trans-stmt.c (gfc_trans_allocate): Add code of pre block of typespec
in allocate to parent block.
2016-07-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/66575
* decl.c (match_procedure_interface): Exit loop if procedure
interface refers to itself.
2016-07-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/35849
* simplify.c (gfc_simplify_ishftc): Check that absolute value of
SHIFT is less than or equal to SIZE.
2016-07-01 Jakub Jelinek <jakub@redhat.com>
PR fortran/71687
* f95-lang.c (struct binding_level): Add reversed field.
(clear_binding_level): Adjust initializer.
(getdecls): If reversed is clear, set it and nreverse the names
chain before returning it.
(poplevel): Use getdecls.
* trans-decl.c (gfc_generate_function_code, gfc_process_block_locals):
Use nreverse to pushdecl decls in the declaration order.
PR fortran/71717
* trans-openmp.c (gfc_omp_privatize_by_reference): Return false
for GFC_DECL_ASSOCIATE_VAR_P with POINTER_TYPE.
2016-06-30 Jakub Jelinek <jakub@redhat.com>
PR fortran/71704
* parse.c (matchs, matcho): Move right before decode_omp_directive.
If spec_only, only gfc_match the keyword and if successful, goto
do_spec_only.
(matchds, matchdo): Define.
(decode_omp_directive): Add spec_only local var and set it.
Use matchds or matchdo macros instead of matchs or matcho
for declare target, declare simd, declare reduction and threadprivate
directives. Return ST_GET_FCN_CHARACTERISTICS if a non-declarative
directive could be matched.
(next_statement): For ST_GET_FCN_CHARACTERISTICS restore
gfc_current_locus from old_locus even if there is no label.
PR fortran/71705
* trans-openmp.c (gfc_trans_omp_clauses): Set TREE_ADDRESSABLE on
decls in to/from clauses.
2016-06-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/71686
* scanner.c (gfc_next_char_literal): Only decrement nextc if it
is not NULL.
2016-06-29 Cesar Philippidis <cesar@codesourcery.com>
* openmp.c (match_oacc_clause_gang): Rename to ...
(match_oacc_clause_gwv): this. Add support for OpenACC worker and
vector clauses.
(gfc_match_omp_clauses): Use match_oacc_clause_gwv for
OMP_CLAUSE_{GANG,WORKER,VECTOR}. Propagate any MATCH_ERRORs for
invalid OMP_CLAUSE_{ASYNC,WAIT,GANG,WORKER,VECTOR} clauses.
(gfc_match_oacc_wait): Propagate MATCH_ERROR for invalid
oacc_expr_lists. Adjust the first and needs_space arguments to
gfc_match_omp_clauses.
2016-06-29 Richard Biener <rguenther@suse.de>
PR middle-end/71002
* f95-lang.c (LANG_HOOKS_GET_ALIAS_SET): Remove (un-)define.
(gfc_get_alias_set): Remove.
2016-06-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/71649
* module.c (create_intrinsic_function): Check for NULL values and
return after giving error.
2016-06-21 Michael Meissner <meissner@linux.vnet.ibm.com>
* trans-types.c (gfc_build_complex_type): Move setting complex
MODE to layout_type, instead of setting it ahead of time by the
caller.
2016-06-21 Tobias Burnus <burnus@net-b.de>
PR fortran/71068
* resolve.c (resolve_function): Don't resolve caf_get/caf_send.
(check_data_variable): Strip-off caf_get before checking.
2016-06-20 Tobias Burnus <burnus@net-b.de>
PR fortran/71194
* trans-expr.c (gfc_trans_pointer_assignment): Correctly handle
RHS pointer functions.
2016-06-19 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
* class.c (gfc_add_class_array_ref): Call gfc_add_data_component()
instead of gfc_add_component_ref().
(gfc_get_len_component): Call gfc_add_len_component() instead of
gfc_add_component_ref().
* trans-intrinsic.c (gfc_conv_intrinsic_loc): Call
gfc_add_data_component() instead of gfc_add_component_ref().
* trans.c (gfc_add_finalizer_call): Call
gfc_add_final_component() and gfc_add_size_component() instead
of gfc_add_component_ref.
2016-06-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
* trans-types.c (gfc_typenode_for_spec): Commentary typo fix.
2016-06-17 Cesar Philippidis <cesar@codesourcery.com>
* openmp.c (match_acc): New generic function to parse OpenACC
directives.
(gfc_match_oacc_parallel_loop): Use it.
(gfc_match_oacc_parallel): Likewise.
(gfc_match_oacc_kernels_loop): Likewise.
(gfc_match_oacc_kernels): Likewise.
(gfc_match_oacc_data): Likewise.
(gfc_match_oacc_host_data): Likewise.
(gfc_match_oacc_loop): Likewise.
(gfc_match_oacc_enter_data): Likewise.
(gfc_match_oacc_exit_data): Likewise.
2016-06-16 Martin Liska <mliska@suse.cz>
* trans-stmt.c (gfc_trans_simple_do): Predict the edge.
2016-06-16 Martin Liska <mliska@suse.cz>
* trans-array.c (gfc_array_allocate): Do not generate expect
stmt.
* trans.c (gfc_allocate_using_malloc): Properly set FAIL_ALLOC
predictor for malloc return value.
(gfc_allocate_allocatable): Use REALLOC predictor instead of
FAIL_ALLOC.
(gfc_deallocate_with_status): Likewise.
2016-06-13 Paul Thomas <pault@gcc.gnu.org>
PR fortran/70673
* frontend-passes.c (realloc_string_callback): Add a call to
gfc_dep_compare_expr.
2016-06-11 Dominique d'Humieres <dominiq@lps.ens.fr>
PR fortran/60751
* io.c (gfc_resolve_dt): Replace GFC_STD_GNU with GFC_STD_LEGACY.
2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
PR c/71381
* openmp.c (gfc_match_oacc_cache): Add comment.
2016-06-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/71404
* io.c (match_io): For READ, commit in pending symbols in the
current statement before trying to match an expression so that
if the match fails and we undo symbols we dont toss good symbols.
2016-06-05 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/69659
* trans-array.c (gfc_trans_dummy_array_bias): For class arrays use
the address of the _data component to reference the arrays data
component.
2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
* trans-openmp.c (gfc_trans_omp_reduction_list): Add mark_addressable
bool parameter, set reduction clause DECLs as addressable when true.
(gfc_trans_omp_clauses): Pass clauses->async to
gfc_trans_omp_reduction_list, add comment describing OpenACC situation.
2016-06-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/52393
* io.c (match_io): For READ, try to match a default character
expression. If found, set the dt format expression to this,
otherwise go back and try control list.
2016-06-01 Paul Thomas <pault@gcc.gnu.org>
PR fortran/71156
* decl.c (copy_prefix): Add checks that the module procedure
declaration prefixes are compliant with the interface. Invert
order of existing elemental and pure checks.
* resolve.c (resolve_fl_procedure): Invert order of elemental
and pure errors.
2016-06-01 Jakub Jelinek <jakub@redhat.com>
* parse.c (case_decl): Move ST_OMP_* to ...
(case_omp_decl): ... here, new macro.
(verify_st_order): For case_omp_decl, complain about
p->state >= ORDER_EXEC, but don't change p->state otherwise.
2016-05-26 Jakub Jelinek <jakub@redhat.com>
* openmp.c (resolve_omp_clauses): Warn if chunk_size is known not to
be positive.
2016-05-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/66461
* scanner.c (gfc_next_char_literal): Clear end_flag when adjusting
current locus back to old_locus.
2016-05-20 Jakub Jelinek <jakub@redhat.com>
PR fortran/71204
* frontend-passes.c (realloc_string_callback): Clear inserted_block
and changed_statement before calling create_var.
2016-05-15 Harald Anlauf <anlauf@gmx.de>
PR fortran/69603
* interface.c (compare_parameter): Check for non-NULL pointer.
2016-05-14 Fritz Reese <fritzoreese@gmail.com>
* gfortran.texi: Update example of DEC UNION extension.
2016-05-14 Fritz Reese <fritzoreese@gmail.com>
PR fortran/71047
* expr.c (gfc_default_initializer): Avoid extra component refs in
constructors for derived types and classes.
2016-05-11 Jakub Jelinek <jakub@redhat.com>
PR fortran/70855
* frontend-passes.c (inline_matmul_assign): Disable in !$omp workshare.
2016-05-09 Richard Biener <rguenther@suse.de>
PR fortran/70937
* trans-decl.c: Include gimplify.h for unshare_expr.
(gfc_trans_vla_one_sizepos): Unshare exprs before inserting
them into the IL.
re PR fortran/56226 (Add support for DEC UNION and MAP extensions) 2016-05-07 Fritz Reese <fritzoreese@gmail.com> PR fortran/56226 * module.c (dt_upper_string): Rename to gfc_dt_upper_string (dt_lower_string): Likewise. * gfortran.h: Make new gfc_dt_upper/lower_string global. * class.c: Use gfc_dt_upper_string. * decl.c: Likewise. * symbol.c: Likewise. * resolve.c (resolve_component): New function. (resolve_fl_derived0): Move component loop code to resolve_component. * parse.c (check_component): New function. (parse_derived): Move loop code to check_component. * lang.opt, invoke.texi, options.c : New option -fdec-structure. * libgfortran.h (bt): New basic type BT_UNION. * gfortran.h (gfc_option): New option -fdec-structure. (gfc_get_union_type, gfc_compare_union_types): New prototypes. (gfc_bt_struct, gfc_fl_struct, case_bt_struct, case_fl_struct): New macros. (gfc_find_component): Change prototype. * match.h (gfc_match_member_sep, gfc_match_map, gfc_match_union, gfc_match_structure_decl): New prototypes. * parse.h (gfc_comp_struct): New macro. * symbol.c (gfc_find_component): Search for components in nested unions * class.c (insert_component_ref, gfc_add_component_ref, add_proc_comp, copy_vtab_proc_comps): Update calls to gfc_find_component. * primary.c (gfc_convert_to_structure_constructor): Likewise. * symbol.c (gfc_add_component): Likewise. * resolve.c (resolve_typebound_function, resolve_typebound_subroutine, resolve_typebound_procedure, resolve_component, resolve_fl_derived): Likewise. * expr.c (get_union_init, component_init): New functions. * decl.c (match_clist_expr, match_record_decl, get_struct_decl, gfc_match_map, gfc_match_union, gfc_match_structure_decl): Likewise. * interface.c (compare_components, gfc_compare_union_types): Likewise. * match.c (gfc_match_member_sep): Likewise. * parse.c (check_component, parse_union, parse_struct_map): Likewise. * resolve.c (resolve_fl_struct): Likewise. * symbol.c (find_union_component): Likewise. * trans-types.c (gfc_get_union_type): Likewise. * parse.c (parse_derived): Use new functions. * interface.c (gfc_compare_derived_types, gfc_compare_types): Likewise. * expr.c (gfc_default_initializer): Likewise. * gfortran.texi: Support for DEC structures, unions, and maps. * gfortran.h (gfc_statement, sym_flavor): Likewise. * check.c (gfc_check_kill_sub): Likewise. * expr.c (gfc_copy_expr, simplify_const_ref, gfc_has_default_initializer): Likewise. * decl.c (build_sym, match_data_constant, add_init_expr_to_sym, match_pointer_init, build_struct, variable_decl, gfc_match_decl_type_spec, gfc_mach_data-decl, gfc_match_entry, gfc_match_end, gfc_match_derived_decl): Likewise. * interface.c (check_interface0, check_interface1, gfc_search_interface): Likewise. * misc.c (gfc_basic_typename, gfc_typename): Likewise. * module.c (add_true_name, build_tnt, bt_types, mio_typespec, fix_mio_expr, load_needed, mio_symbol, read_module, write_symbol, gfc_get_module_backend_decl): Likewise. * parse.h (gfc_compile_state): Likewise. * parse.c (decode_specification_statement, decode_statement, gfc_ascii_statement, verify_st_order, parse_spec): Likewise. * primary.c (gfc_match_varspec, gfc_match_structure_constructor, gfc_match_rvalue, match_variable): Likewise. * resolve.c (find_arglists, resolve_structure_cons, is_illegal_recursion, resolve_generic_f, get_declared_from_expr, resolve_typebound_subroutine, resolve_allocate_expr, nonscalar_typebound_assign, generate_component_assignments, resolve_fl_variable_derived, check_defined_assignments, resolve_component, resolve_symbol, resolve_equivalence_derived): Likewise. * symbol.c (flavors, check_conflict, gfc_add_flavor, gfc_use_derived, gfc_restore_last_undo_checkpoint, gfc_type_compatible, gfc_find_dt_in_generic): Likewise. * trans-decl.c (gfc_get_module_backend_decl, create_function_arglist, gfc_create_module_variable, check_constant_initializer): Likewise. * trans-expr.c (gfc_conv_component_ref, gfc_conv_initializer, gfc_trans_alloc_subarray_assign, gfc_trans_subcomponent_assign, gfc_conv_structure, gfc_trans_scalar_assign, copyable_array_p): Likewise. * trans-io.c (transfer_namelist_element, transfer_expr, gfc_trans_transfer): Likewise. * trans-stmt.c (gfc_trans_deallocate): Likewise. * trans-types.c (gfc_typenode_for_spec, gfc_copy_dt_decls_ifequal, gfc_get_derived_type): Likewise. 2016-05-07 Fritz Reese <fritzoreese@gmail.com> PR fortran/56226 * gfortran.dg/dec_structure_1.f90: New testcase. * gfortran.dg/dec_structure_2.f90: Ditto. * gfortran.dg/dec_structure_3.f90: Ditto. * gfortran.dg/dec_structure_4.f90: Ditto. * gfortran.dg/dec_structure_5.f90: Ditto. * gfortran.dg/dec_structure_6.f90: Ditto. * gfortran.dg/dec_structure_7.f90: Ditto. * gfortran.dg/dec_structure_8.f90: Ditto. * gfortran.dg/dec_structure_9.f90: Ditto. * gfortran.dg/dec_structure_10.f90: Ditto. * gfortran.dg/dec_structure_11.f90: Ditto. * gfortran.dg/dec_union_1.f90: Ditto. * gfortran.dg/dec_union_2.f90: Ditto. * gfortran.dg/dec_union_3.f90: Ditto. * gfortran.dg/dec_union_4.f90: Ditto. * gfortran.dg/dec_union_5.f90: Ditto. * gfortran.dg/dec_union_6.f90: Ditto. * gfortran.dg/dec_union_7.f90: Ditto. From-SVN: r235999
2016-05-08 01:16:23 +02:00
2016-05-07 Fritz Reese <fritzoreese@gmail.com>
PR fortran/56226
* module.c (dt_upper_string): Rename to gfc_dt_upper_string
(dt_lower_string): Likewise.
* gfortran.h: Make new gfc_dt_upper/lower_string global.
* class.c: Use gfc_dt_upper_string.
* decl.c: Likewise.
* symbol.c: Likewise.
* resolve.c (resolve_component): New function.
(resolve_fl_derived0): Move component loop code to resolve_component.
* parse.c (check_component): New function.
(parse_derived): Move loop code to check_component.
* lang.opt, invoke.texi, options.c : New option -fdec-structure.
* libgfortran.h (bt): New basic type BT_UNION.
* gfortran.h (gfc_option): New option -fdec-structure.
(gfc_get_union_type, gfc_compare_union_types): New prototypes.
(gfc_bt_struct, gfc_fl_struct, case_bt_struct, case_fl_struct): New
macros.
(gfc_find_component): Change prototype.
* match.h (gfc_match_member_sep, gfc_match_map, gfc_match_union,
gfc_match_structure_decl): New prototypes.
* parse.h (gfc_comp_struct): New macro.
* symbol.c (gfc_find_component): Search for components in nested unions
* class.c (insert_component_ref, gfc_add_component_ref, add_proc_comp,
copy_vtab_proc_comps): Update calls to gfc_find_component.
* primary.c (gfc_convert_to_structure_constructor): Likewise.
* symbol.c (gfc_add_component): Likewise.
* resolve.c (resolve_typebound_function, resolve_typebound_subroutine,
resolve_typebound_procedure, resolve_component, resolve_fl_derived):
Likewise.
* expr.c (get_union_init, component_init): New functions.
* decl.c (match_clist_expr, match_record_decl, get_struct_decl,
gfc_match_map, gfc_match_union, gfc_match_structure_decl): Likewise.
* interface.c (compare_components, gfc_compare_union_types): Likewise.
* match.c (gfc_match_member_sep): Likewise.
* parse.c (check_component, parse_union, parse_struct_map): Likewise.
* resolve.c (resolve_fl_struct): Likewise.
* symbol.c (find_union_component): Likewise.
* trans-types.c (gfc_get_union_type): Likewise.
* parse.c (parse_derived): Use new functions.
* interface.c (gfc_compare_derived_types, gfc_compare_types): Likewise.
* expr.c (gfc_default_initializer): Likewise.
* gfortran.texi: Support for DEC structures, unions, and maps.
* gfortran.h (gfc_statement, sym_flavor): Likewise.
* check.c (gfc_check_kill_sub): Likewise.
* expr.c (gfc_copy_expr, simplify_const_ref,
gfc_has_default_initializer): Likewise.
* decl.c (build_sym, match_data_constant, add_init_expr_to_sym,
match_pointer_init, build_struct, variable_decl,
gfc_match_decl_type_spec, gfc_mach_data-decl, gfc_match_entry,
gfc_match_end, gfc_match_derived_decl): Likewise.
* interface.c (check_interface0, check_interface1,
gfc_search_interface): Likewise.
* misc.c (gfc_basic_typename, gfc_typename): Likewise.
* module.c (add_true_name, build_tnt, bt_types, mio_typespec,
fix_mio_expr, load_needed, mio_symbol, read_module, write_symbol,
gfc_get_module_backend_decl): Likewise.
* parse.h (gfc_compile_state): Likewise.
* parse.c (decode_specification_statement, decode_statement,
gfc_ascii_statement, verify_st_order, parse_spec): Likewise.
* primary.c (gfc_match_varspec, gfc_match_structure_constructor,
gfc_match_rvalue, match_variable): Likewise.
* resolve.c (find_arglists, resolve_structure_cons,
is_illegal_recursion, resolve_generic_f, get_declared_from_expr,
resolve_typebound_subroutine, resolve_allocate_expr,
nonscalar_typebound_assign, generate_component_assignments,
resolve_fl_variable_derived, check_defined_assignments,
resolve_component, resolve_symbol, resolve_equivalence_derived):
Likewise.
* symbol.c (flavors, check_conflict, gfc_add_flavor, gfc_use_derived,
gfc_restore_last_undo_checkpoint, gfc_type_compatible,
gfc_find_dt_in_generic): Likewise.
* trans-decl.c (gfc_get_module_backend_decl, create_function_arglist,
gfc_create_module_variable, check_constant_initializer): Likewise.
* trans-expr.c (gfc_conv_component_ref, gfc_conv_initializer,
gfc_trans_alloc_subarray_assign, gfc_trans_subcomponent_assign,
gfc_conv_structure, gfc_trans_scalar_assign, copyable_array_p):
Likewise.
* trans-io.c (transfer_namelist_element, transfer_expr,
gfc_trans_transfer): Likewise.
* trans-stmt.c (gfc_trans_deallocate): Likewise.
* trans-types.c (gfc_typenode_for_spec, gfc_copy_dt_decls_ifequal,
gfc_get_derived_type): Likewise.
2016-05-05 Jakub Jelinek <jakub@redhat.com>
* openmp.c (gfc_match_omp_clauses): Restructuralize, so that clause
parsing is done in a big switch based on gfc_peek_ascii_char and
individual clauses under their first letters are sorted too.
machmode.h (mode_complex): Add support to give the complex mode for a given mode. [gcc] 2016-05-02 Michael Meissner <meissner@linux.vnet.ibm.com> * machmode.h (mode_complex): Add support to give the complex mode for a given mode. (GET_MODE_COMPLEX_MODE): Likewise. * stor-layout.c (layout_type): For COMPLEX_TYPE, use the mode stored by build_complex_type and gfc_build_complex_type instead of trying to figure out the appropriate mode based on the size. Raise an assertion error, if the type was not set. * genmodes.c (struct mode_data): Add field for the complex type of the given type. (blank_mode): Likewise. (make_complex_modes): Remember the complex mode created in the base type. (emit_mode_complex): Write out the mode_complex array to map a type mode to the complex version. (emit_insn_modes_c): Likewise. * tree.c (build_complex_type): Set the complex type to use before calling layout_type. * config/rs6000/rs6000.c (rs6000_hard_regno_nregs_internal): Add support for __float128 complex datatypes. (rs6000_hard_regno_mode_ok): Likewise. (rs6000_setup_reg_addr_masks): Likewise. (rs6000_complex_function_value): Likewise. * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Likewise. __float128 and __ibm128 complex. (FLOAT128_IBM_P): Likewise. (ALTIVEC_ARG_MAX_RETURN): Likewise. * doc/extend.texi (Additional Floating Types): Document that -mfloat128 must be used to enable __float128. Document complex __float128 and __ibm128 support. [gcc/fortran] 2016-05-02 Michael Meissner <meissner@linux.vnet.ibm.com> * trans-types.c (gfc_build_complex_type): [gcc/testsuite] 2016-05-02 Michael Meissner <meissner@linux.vnet.ibm.com> * gcc.target/powerpc/float128-complex-1.c: New tests for complex __float128. * gcc.target/powerpc/float128-complex-2.c: Likewise. From-SVN: r235794
2016-05-03 01:23:45 +02:00
2016-05-02 Michael Meissner <meissner@linux.vnet.ibm.com>
* trans-types.c (gfc_build_complex_type):
2016-05-02 Richard Biener <rguenther@suse.de>
* trans-array.c (gfc_trans_create_temp_array): Properly
create a DECL_EXPR for the anonymous VLA array type.
2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
PR middle-end/70626
* trans-openmp.c (gfc_trans_oacc_combined_directive): Duplicate
the reduction clause in both parallel and loop directives.
tree.h (TYPE_ALIGN, DECL_ALIGN): Return shifted amount. * tree.h (TYPE_ALIGN, DECL_ALIGN): Return shifted amount. (SET_TYPE_ALIGN, SET_DECL_ALIGN): New. * tree-core.h (tree_type_common.align): Use bit-field. (tree_type_common.spare): New. (tree_decl_common.off_align): Make smaller. (tree_decl_common.align): Use bit-field. * expr.c (expand_expr_addr_expr_1): Use SET_TYPE_ALIGN. * omp-low.c (install_var_field): Use SET_DECL_ALIGN. (scan_sharing_clauses): Ditto. (finish_taskreg_scan): Use SET_DECL_ALIGN and SET_TYPE_ALIGN. (omp_finish_file): Ditto. * stor-layout.c (do_type_align): Use SET_DECL_ALIGN. (layout_decl): Ditto. (relayout_decl): Ditto. (finalize_record_size): Use SET_TYPE_ALIGN. (finalize_type_size): Ditto. (finish_builtin_struct): Ditto. (layout_type): Ditto. (initialize_sizetypes): Ditto. * targhooks.c (std_gimplify_va_arg_expr): Use SET_TYPE_ALIGN. * tree-nested.c (insert_field_into_struct): Use SET_TYPE_ALIGN. (lookup_field_for_decl): Use SET_DECL_ALIGN. (get_chain_field): Ditto. (get_trampoline_type): Ditto. (get_nl_goto_field): Ditto. * tree-streamer-in.c (unpack_ts_decl_common_value_fields): Use SET_DECL_ALIGN. (unpack_ts_type_common_value_fields): Use SET_TYPE_ALIGN. * gimple-expr.c (copy_var_decl): Use SET_DECL_ALIGN. * tree.c (make_node_stat): Use SET_DECL_ALIGN and SET_TYPE_ALIGN. (build_qualified_type): Use SET_TYPE_ALIGN. (build_aligned_type, build_range_type_1): Ditto. (build_atomic_base): Ditto. (build_common_tree_nodes): Ditto. * cfgexpand.c (align_local_variable): Use SET_DECL_ALIGN. (expand_one_stack_var_at): Ditto. * coverage.c (build_var): Use SET_DECL_ALIGN. * except.c (init_eh): Ditto. * function.c (assign_parm_setup_block): Ditto. * symtab.c (increase_alignment_1): Ditto. * tree-ssa-ccp.c (fold_builtin_alloca_with_align): Ditto. * tree-vect-stmts.c (ensure_base_align): Ditto. * varasm.c (align_variable): Ditto. (assemble_variable): Ditto. (build_constant_desc): Ditto. (output_constant_def_contents): Ditto. * config/arm/arm.c (arm_relayout_function): Use SET_DECL_ALIGN. * config/avr/avr.c (avr_adjust_type_node): Use SET_TYPE_ALIGN. * config/mips/mips.c (mips_std_gimplify_va_arg_expr): Ditto. * config/msp430/msp430.c (msp430_gimplify_va_arg_expr): Ditto. * config/spu/spu.c (spu_build_builtin_va_list): Use SET_DECL_ALIGN. ada/ * gcc-interface/decl.c (gnat_to_gnu_entity): Use SET_TYPE_ALIGN. (gnat_to_gnu_field): Ditto. (components_to_record): Ditto. (create_variant_part_from): Ditto. (copy_and_substitute_in_size): Ditto. (substitute_in_type): Ditto. * gcc-interface/utils.c (make_aligning_type): Use SET_TYPE_ALIGN. (make_packable_type): Ditto. (maybe_pad_type): Ditto. (finish_fat_pointer_type): Ditto. (finish_record_type): Ditto and use SET_DECL_ALIGN. (rest_of_record_type_compilation): Use SET_TYPE_ALIGN. (create_field_decl): Use SET_DECL_ALIGN. c-family/ * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN and SET_DECL_ALIGN. c/ * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN. (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN. cp/ * class.c (build_vtable): Use SET_DECL_ALIGN and SET_TYPE_ALIGN. (layout_class_type): Ditto. (build_base_field): Use SET_DECL_ALIGN. (fixup_attribute_variants): Use SET_TYPE_ALIGN. * decl.c (duplicate_decls): Use SET_DECL_ALIGN. (record_unknown_type): Use SET_TYPE_ALIGN. (cxx_init_decl_processing): Ditto. (copy_type_enum): Ditto. (grokfndecl): Use SET_DECL_ALIGN. (copy_type_enum): Use SET_TYPE_ALIGN. * pt.c (instantiate_class_template_1): Use SET_TYPE_ALIGN. (tsubst): Ditto. * tree.c (cp_build_qualified_type_real): Use SET_TYPE_ALIGN. * lambda.c (maybe_add_lambda_conv_op): Use SET_DECL_ALIGN. * method.c (implicitly_declare_fn): Use SET_DECL_ALIGN. * rtti.c (emit_tinfo_decl): Ditto. fortran/ * trans-io.c (gfc_build_io_library_fndecls): Use SET_TYPE_ALIGN. * trans-common.c (build_common_decl): Use SET_DECL_ALIGN. * trans-types.c (gfc_add_field_to_struct): Use SET_DECL_ALIGN. go/ * go-gcc.cc (Gcc_backend::implicit_variable): Use SET_DECL_ALIGN. java/ * class.c (add_method_1): Use SET_DECL_ALIGN. (make_class_data): Ditto. (emit_register_classes_in_jcr_section): Ditto. * typeck.c (build_java_array_type): Ditto. objc/ * objc-act.c (objc_build_struct): Use SET_DECL_ALIGN. libcc1/ * plugin.cc (plugin_finish_record_or_union): Use SET_TYPE_ALIGN. From-SVN: r235172
2016-04-18 22:36:27 +02:00
2016-04-18 Michael Matz <matz@suse.de>
* trans-io.c (gfc_build_io_library_fndecls): Use SET_TYPE_ALIGN.
* trans-common.c (build_common_decl): Use SET_DECL_ALIGN.
* trans-types.c (gfc_add_field_to_struct): Use SET_DECL_ALIGN.
2016-04-13 Dominique d'Humieres <dominiq@lps.ens.fr>
PR fortran/67039
* intrinsic.texi: Correct the documentation of pseudorandom
number intrinsics.
2016-04-13 Dominique d'Humieres <dominiq@lps.ens.fr>
PR fortran/58000
* gfortran.texi: Document OPEN( ... NAME=) as not implemented
in GNU Fortran
2016-04-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/68566
* array.c (match_array_element_spec): Add check for non-integer.
* simplify.c (gfc_simplify_reshape): If source shape is NULL return.
2016-04-06 Patrick Palka <ppalka@gcc.gnu.org>
PR c/70436
* openmp.c (gfc_find_omp_udr): Add explicit braces to resolve a
future -Wparentheses warning.
2016-04-04 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/67538
* resolve.c (resolve_allocate_expr): Emit error message when no
array spec and no array valued source= expression is given in an
F2008 allocate() for an array to allocate.
2016-04-04 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/65795
* trans-array.c (gfc_array_allocate): When the array is a coarray,
do not nullyfing its allocatable components in array_allocate, because
the nullify missed the array ref and nullifies the wrong component.
Cosmetics.
2016-03-29 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/70397
* trans-expr.c (gfc_class_len_or_zero_get): Add function to return a
constant zero tree, when the class to get the _len component from is
not unlimited polymorphic.
(gfc_copy_class_to_class): Use the new function.
* trans.h: Added interface of new function gfc_class_len_or_zero_get.
2016-03-28 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
* trans-decl.c (gfc_build_builtin_function_decls):
caf_stop_numeric and caf_stop_str definition.
* trans-stmt.c (gfc_trans_stop): invoke external functions
for stop and stop_str when coarrays are used.
* trans.h: extern for new functions.
2016-03-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/69043
* scanner.c (load_file): Update to use S_ISREG macro.
2016-03-17 Thomas Schwinge <thomas@codesourcery.com>
* gfortran.h (enum gfc_omp_map_op): Rename OMP_MAP_FORCE_DEALLOC
to OMP_MAP_DELETE. Adjust all users.
2016-03-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Jim MacArthur <jim.macarthur@codethink.co.uk>
PR fortran/69043
* scanner.c (load_file): Check that included file is regular.
2016-03-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Harold Anlauf <anlauf@gmx.de>
PR fortran/69520
* invoke.texi: Explain use of the 'no-' construct within the
-fcheck= option.
* options.c (gfc_handle_runtime_check_option): Enable use of
'no-' prefix for the various options with -fcheck= to allow
negating previously enabled check options.
2016-03-12 Paul Thomas <pault@gcc.gnu.org>
PR fortran/70031
* decl.c (gfc_match_prefix): Treat the 'module' prefix in the
same way as the others, rather than fixing it to come last.
(gfc_match_function_decl, gfc_match_subroutine): After errors
in 'copy_prefix', emit them immediately in the case of module
procedures to prevent a later ICE.
PR fortran/69524
* decl.c (gfc_match_submod_proc): Permit 'module procedure'
declarations within the contains section of modules as well as
submodules.
* resolve.c (resolve_fl_procedure): Likewise.
*trans-decl.c (build_function_decl): Change the gcc_assert to
allow all forms of module procedure declarations within module
contains sections.
2016-02-28 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/68147
PR fortran/47674
* frontend-passes.c (realloc_string_callback): Don't set
walk_subtrees.
2016-02-28 Thomas Koenig <tkoenig@gcc.gnu.org>
* dump-parse-tree.c (show_code_node): Print association
list of a block if present. Handle EXEC_END_BLOCK.
2016-02-28 Harald Anlauf <anlauf@gmx.de>
Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/56007
* match.c (gfc_match_iterator): Add diagnostic for array variable
as do loop index.
2016-02-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/69910
* io.c (gfc_match_open): Check that open status is an expression
constant before comparing string to 'scratch' with NEWUNIT.
2016-02-27 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
* trans.c (gfc_allocate_allocatable): size conversion
from byte to number of elements for event variables.
* trans-types.c (gfc_get_derived_type): event variables
represented as a pointer (like lock variable).
2016-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/61156
* scanner.c (add_path_to_list): If include path is not a directory,
issue a fatal error.
2016-02-23 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/67451
* trans-array.c (gfc_array_allocate): Take the attributes from the
expression to allocate and not from the source=-expression.
2016-02-20 Paul Thomas <pault@gcc.gnu.org>
PR fortran/69423
* trans-decl.c (create_function_arglist): Deferred character
length functions, with and without declared results, address
the passed reference type as '.result' and the local string
length as '..result'.
(gfc_null_and_pass_deferred_len): Helper function to null and
return deferred string lengths, as needed.
(gfc_trans_deferred_vars): Call it, thereby reducing repeated
code, add call for deferred arrays and reroute pointer function
results. Avoid using 'tmp' for anything other that a temporary
tree by introducing 'type_of_array' for the arrayspec type.
2015-02-16 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/69742
* frontend-passes.c (cfe-expr_0): Don't register functions
from within an ASSOCIATE statement.
2016-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/60526
* decl.c (build_sym): If the name has already been defined as a
type, it has a symtree with an upper case letter at the beginning.
If such a symtree exists, issue an error and exit. Don't do
this if there is no corresponding upper case letter.
2016-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/60526
PR bootstrap/69816
* decl.c (build_sym): Reverted previous patch.
2016-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/60526
* decl.c (build_sym): If the name has already been defined as a
type, issue error and return false.
PR other/69554: avoid excessive source printing for widely-separated locations gcc/ChangeLog: PR other/69554 * diagnostic-show-locus.c (struct line_span): New struct. (layout::get_first_line): Delete. (layout::get_last_line): Delete. (layout::get_num_line_spans): New member function. (layout::get_line_span): Likewise. (layout::print_heading_for_line_span_index_p): Likewise. (layout::get_expanded_location): Likewise. (layout::calculate_line_spans): Likewise. (layout::m_first_line): Delete. (layout::m_last_line): Delete. (layout::m_line_spans): New field. (layout::layout): Update comment. Replace m_first_line and m_last_line with m_line_spans, replacing their initialization with a call to calculate_line_spans. (diagnostic_show_locus): When printing source lines and annotations, rather than looping over a single span of lines, instead loop over each line_span within the layout, with an inner loop over the lines within them. Call the context's start_span callback when changing line spans. * diagnostic.c (diagnostic_initialize): Initialize start_span. (diagnostic_build_prefix): Break out the building of the location part of the string into... (diagnostic_get_location_text): ...this new function, rewriting it from nested ternary expressions to a sequence of "if" statements. (default_diagnostic_start_span_fn): New function. * diagnostic.h (diagnostic_start_span_fn): New typedef. (diagnostic_context::start_span): New field. (default_diagnostic_start_span_fn): New prototype. gcc/fortran/ChangeLog: PR other/69554 * error.c (gfc_diagnostic_start_span): New function. (gfc_diagnostics_init): Initialize global_dc's start_span. gcc/testsuite/ChangeLog: PR other/69554 * gcc.dg/pr69554-1.c: New test. * gfortran.dg/pr69554-1.F90: New test. * gfortran.dg/pr69554-2.F90: New test. * lib/gcc-dg.exp (proc dg-locus): New function. * lib/gfortran-dg.exp (proc gfortran-dg-test): Update comment to distinguish between the caret-printing and non-caret-printing cases. If caret-printing has been explicitly enabled, bail out without attempting to fix up the output. From-SVN: r233386
2016-02-12 20:18:03 +01:00
2016-02-12 David Malcolm <dmalcolm@redhat.com>
PR other/69554
* error.c (gfc_diagnostic_start_span): New function.
(gfc_diagnostics_init): Initialize global_dc's start_span.
2016-02-11 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/69296
* gfortran.h: Added flag to gfc_association_list indicating that
the rank of an associate variable has been guessed only.
* parse.c (parse_associate): Set the guess flag mentioned above
when guessing the rank of an expression.
* resolve.c (resolve_assoc_var): When the rank has been guessed,
make sure, that the guess was correct else overwrite with the actual
rank.
* trans-stmt.c (trans_associate_var): For subref_array_pointers in
class objects, take the span from the _data component.
2016-02-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/50555
* primary.c (match_actual_arg): If symbol has attribute flavor of
namelist, generate an error. (gfc_match_rvalue): Likewise return
MATCH_ERROR.
* resolve.c (resolve_symbol): Scan arument list of procedures and
generate an error if a namelist is found.
2016-02-05 Mikael Morin <mikael@gcc.gnu.org>
PR fortran/66089
* trans-expr.c (expr_is_variable, gfc_expr_is_variable): Rename
the former to the latter and make it non-static. Update callers.
* gfortran.h (gfc_expr_is_variable): New declaration.
(struct gfc_ss_info): Add field needs_temporary.
* trans-array.c (gfc_scalar_elemental_arg_saved_as_argument):
Tighten the condition on aggregate expressions with a check
that the expression is a variable and doesn't need a temporary.
(gfc_conv_resolve_dependency): Add intermediary reference variable.
Set the needs_temporary field.
2016-02-03 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/67451
PR fortran/69418
* trans-expr.c (gfc_copy_class_to_class): For coarrays just the
pointer is passed. Take it as is without trying to deref the
_data component.
* trans-stmt.c (gfc_trans_allocate): Take care of coarrays as
argument to source=-expression.
2016-02-02 Nathan Sidwell <nathan@codesourcery.com>
* lang.opt (fopenacc-dim=): New option.
2016-01-31 Paul Thomas <pault@gcc.gnu.org>
PR fortran/67564
* trans-expr.c (gfc_conv_procedure_call): For the vtable copy
subroutines, add a string length argument, when the actual
argument is an unlimited polymorphic class object.
2016-01-30 Paul Thomas <pault@gcc.gnu.org>
PR fortran/69566
* trans-expr.c (gfc_conv_procedure_call): Correct expression
for 'ulim_copy', which was missing a test for 'comp'.
2016-01-28 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/62536
* decl.c (gfc_match_end): Only unnest and remove BLOCK namespaces
when the END encountered does not match a BLOCK's end.
2016-01-27 Janus Weil <janus@gcc.gnu.org>
PR fortran/69484
* invoke.texi: Fix documentation of -Wall with respect to -Wtabs.
2016-01-27 Paul Thomas <pault@gcc.gnu.org>
PR fortran/69422
* trans-expr.c (is_scalar_reallocatable_lhs): Remove the check
for allocatable components, whilst checking if the symbol is a
derived or class entity..
2016-01-26 Paul Thomas <pault@gcc.gnu.org>
PR fortran/69385
* trans-expr.c (gfc_trans_assignment_1): Exclude initialization
assignments from check on assignment of scalars to unassigned
arrays and correct wrong code within the corresponding block.
PR other/69006: fix extra newlines after diagnostics gcc/c-family/ChangeLog: PR other/69006 * c-opts.c (c_diagnostic_finalizer): Replace invocation of pp_newline_and_flush with pp_flush. gcc/cp/ChangeLog: PR other/69006 * error.c (print_instantiation_partial_context_line): Add missing newlines from output for the t == NULL case. (print_instantiation_partial_context): Remove call to pp_newline. gcc/ChangeLog: PR other/69006 * diagnostic-show-locus.c (layout::print_source_line): Replace call to pp_newline with call to layout::print_newline. (layout::print_annotation_line): Likewise. (layout::move_to_column): Likewise. (layout::print_any_fixits): After printing any fixits, print a trailing newline, if necessary. (layout::print_newline): New method, resetting any colorization before a newline. (diagnostic_show_locus): Move the pp_newline to before the early bailout. Remove dummy block enclosing the layout instance. * diagnostic.c (default_diagnostic_finalizer): Replace invocation of pp_newline_and_flush with pp_flush. (diagnostic_append_note): Delete use of pp_newline. (diagnostic_append_note_at_rich_loc): Delete. * diagnostic.h (diagnostic_append_note_at_rich_loc): Delete. * pretty-print.h (output_buffer_append_r): Reset buff->line_length when newline characters are added to the buffer. gcc/fortran/ChangeLog: PR other/69006 * error.c (gfc_diagnostic_starter): Delete use of pp_newline. gcc/testsuite/ChangeLog: PR other/69006 * g++.dg/ext/timevar1.C: Add dg-allow-blank-lines-in-output directive. * gcc.dg/plugin/diagnostic-test-show-locus-color.c: Update expected multiline output to reflect the colorization being disabled before newlines. * gcc.dg/plugin/diagnostic_plugin_test_show_locus.c (custom_diagnostic_finalizer): Replace call to pp_newline_and_flush with call to pp_flush. * gcc.dg/unroll-2.c: Add dg-allow-blank-lines-in-output directive. * gfortran.dg/implicit_class_1.f90: Likewise. * lib/gcc-dg.exp (allow_blank_lines): New global. (dg-allow-blank-lines-in-output): New procedure. (gcc-dg-prune): Complain about blank lines in the output, unless dg-allow-blank-lines-in-output was called. * lib/multiline.exp (_build_multiline_regex): Only support arbitrary followup text for non-blank-lines, not for blank lines. From-SVN: r232837
2016-01-26 18:08:12 +01:00
2016-01-26 David Malcolm <dmalcolm@redhat.com>
PR other/69006
* error.c (gfc_diagnostic_starter): Delete use of pp_newline.
2016-01-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/69397
PR fortran/68442
* interface.c (gfc_arglist_matches_symbol): Replace assert with
a return false if not a procedure.
* resolve.c (resolve_generic_f): Test if we are resolving an
initialization expression and adjust error message accordingly.
2016-01-24 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/66094
* frontend-passes.c (matmul_lhs_realloc): Add
forgotten break statement.
2016-01-24 Dominique d'Humieres <dominiq@lps.ens.fr>
PR fortran/68283
* primary.c (gfc_variable_attr): revert revision r221955,
call gfc_internal_error only if there is no error.
2016-01-24 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/66094
* frontend-passes.c (enum matrix_case): Add case A2B2T for
MATMUL(A,TRANSPoSE(B)) where A and B are rank 2.
(inline_limit_check): Also add A2B2T.
(matmul_lhs_realloc): Handle A2B2T.
(check_conjg_variable): Rename to
(check_conjg_transpose_variable): and also count TRANSPOSE.
(inline_matmul_assign): Handle A2B2T.
2016-01-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/65996
* error.c (gfc_error): Save the state of abort_on_error and set
it to false for buffered errors to allow normal processing.
Restore the state before leaving.
Merge of HSA 2016-01-19 Martin Jambor <mjambor@suse.cz> Martin Liska <mliska@suse.cz> Michael Matz <matz@suse.de> libgomp/ * plugin/Makefrag.am: Add HSA plugin requirements. * plugin/configfrag.ac (HSA_RUNTIME_INCLUDE): New variable. (HSA_RUNTIME_LIB): Likewise. (HSA_RUNTIME_CPPFLAGS): Likewise. (HSA_RUNTIME_INCLUDE): New substitution. (HSA_RUNTIME_LIB): Likewise. (HSA_RUNTIME_LDFLAGS): Likewise. (hsa-runtime): New configure option. (hsa-runtime-include): Likewise. (hsa-runtime-lib): Likewise. (PLUGIN_HSA): New substitution variable. Fill HSA_RUNTIME_INCLUDE and HSA_RUNTIME_LIB according to the new configure options. (PLUGIN_HSA_CPPFLAGS): Likewise. (PLUGIN_HSA_LDFLAGS): Likewise. (PLUGIN_HSA_LIBS): Likewise. Check that we have access to HSA run-time. * libgomp-plugin.h (offload_target_type): New element OFFLOAD_TARGET_TYPE_HSA. * libgomp.h (gomp_target_task): New fields firstprivate_copies and args. (bool gomp_create_target_task): Updated. (gomp_device_descr): Extra parameter of run_func and async_run_func, new field can_run_func. * libgomp_g.h (GOMP_target_ext): Update prototype. * oacc-host.c (host_run): Added a new parameter args. * target.c (calculate_firstprivate_requirements): New function. (copy_firstprivate_data): Likewise. (gomp_target_fallback_firstprivate): Use them. (gomp_target_unshare_firstprivate): New function. (gomp_get_target_fn_addr): Allow returning NULL for shared memory devices. (GOMP_target): Do host fallback for all shared memory devices. Do not pass any args to plugins. (GOMP_target_ext): Introduce device-specific argument parameter args. Allow host fallback if device shares memory. Do not remap data if device has shared memory. (gomp_target_task_fn): Likewise. Also treat shared memory devices like host fallback for mappings. (GOMP_target_data): Treat shared memory devices like host fallback. (GOMP_target_data_ext): Likewise. (GOMP_target_update): Likewise. (GOMP_target_update_ext): Likewise. Also pass NULL as args to gomp_create_target_task. (GOMP_target_enter_exit_data): Likewise. (omp_target_alloc): Treat shared memory devices like host fallback. (omp_target_free): Likewise. (omp_target_is_present): Likewise. (omp_target_memcpy): Likewise. (omp_target_memcpy_rect): Likewise. (omp_target_associate_ptr): Likewise. (gomp_load_plugin_for_device): Also load can_run. * task.c (GOMP_PLUGIN_target_task_completion): Free firstprivate_copies. (gomp_create_target_task): Accept new argument args and store it to ttask. * plugin/plugin-hsa.c: New file. gcc/ * Makefile.in (OBJS): Add new source files. (GTFILES): Add hsa.c. * common.opt (disable_hsa): New variable. (-Whsa): New warning. * config.in (ENABLE_HSA): New. * configure.ac: Treat hsa differently from other accelerators. (OFFLOAD_TARGETS): Define ENABLE_OFFLOADING according to $enable_offloading. (ENABLE_HSA): Define ENABLE_HSA according to $enable_hsa. * doc/install.texi (Configuration): Document --with-hsa-runtime, --with-hsa-runtime-include, --with-hsa-runtime-lib and --with-hsa-kmt-lib. * doc/invoke.texi (-Whsa): Document. (hsa-gen-debug-stores): Likewise. * lto-wrapper.c (compile_images_for_offload_targets): Do not attempt to invoke offload compiler for hsa acclerator. * opts.c (common_handle_option): Determine whether HSA offloading should be performed. * params.def (PARAM_HSA_GEN_DEBUG_STORES): New parameter. * builtin-types.def (BT_FN_VOID_UINT_PTR_INT_PTR): New. (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_INT_INT): Removed. (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_PTR): New. * gimple-low.c (lower_stmt): Also handle GIMPLE_OMP_GRID_BODY. * gimple-pretty-print.c (dump_gimple_omp_for): Also handle GF_OMP_FOR_KIND_GRID_LOOP. (dump_gimple_omp_block): Also handle GIMPLE_OMP_GRID_BODY. (pp_gimple_stmt_1): Likewise. * gimple-walk.c (walk_gimple_stmt): Likewise. * gimple.c (gimple_build_omp_grid_body): New function. (gimple_copy): Also handle GIMPLE_OMP_GRID_BODY. * gimple.def (GIMPLE_OMP_GRID_BODY): New. * gimple.h (enum gf_mask): Added GF_OMP_PARALLEL_GRID_PHONY, GF_OMP_FOR_KIND_GRID_LOOP, GF_OMP_FOR_GRID_PHONY and GF_OMP_TEAMS_GRID_PHONY. (gimple_statement_omp_single_layout): Updated comments. (gimple_build_omp_grid_body): New function. (gimple_has_substatements): Also handle GIMPLE_OMP_GRID_BODY. (gimple_omp_for_grid_phony): New function. (gimple_omp_for_set_grid_phony): Likewise. (gimple_omp_parallel_grid_phony): Likewise. (gimple_omp_parallel_set_grid_phony): Likewise. (gimple_omp_teams_grid_phony): Likewise. (gimple_omp_teams_set_grid_phony): Likewise. (gimple_return_set_retbnd): Also handle GIMPLE_OMP_GRID_BODY. * omp-builtins.def (BUILT_IN_GOMP_OFFLOAD_REGISTER): New. (BUILT_IN_GOMP_OFFLOAD_UNREGISTER): Likewise. (BUILT_IN_GOMP_TARGET): Updated type. * omp-low.c: Include symbol-summary.h, hsa.h and params.h. (adjust_for_condition): New function. (get_omp_for_step_from_incr): Likewise. (extract_omp_for_data): Moved parts to adjust_for_condition and get_omp_for_step_from_incr. (build_outer_var_ref): Handle GIMPLE_OMP_GRID_BODY. (fixup_child_record_type): Bail out if receiver_decl is NULL. (scan_sharing_clauses): Handle OMP_CLAUSE__GRIDDIM_. (scan_omp_parallel): Do not create child functions for phony constructs. (check_omp_nesting_restrictions): Handle GIMPLE_OMP_GRID_BODY. (scan_omp_1_op): Checking assert we are not remapping to ERROR_MARK. Also also handle GIMPLE_OMP_GRID_BODY. (parallel_needs_hsa_kernel_p): New function. (expand_parallel_call): Register apprpriate parallel child functions as HSA kernels. (grid_launch_attributes_trees): New type. (grid_attr_trees): New variable. (grid_create_kernel_launch_attr_types): New function. (grid_insert_store_range_dim): Likewise. (grid_get_kernel_launch_attributes): Likewise. (get_target_argument_identifier_1): Likewise. (get_target_argument_identifier): Likewise. (get_target_argument_value): Likewise. (push_target_argument_according_to_value): Likewise. (get_target_arguments): Likewise. (expand_omp_target): Call get_target_arguments instead of looking up for teams and thread limit. (grid_expand_omp_for_loop): New function. (grid_arg_decl_map): New type. (grid_remap_kernel_arg_accesses): New function. (grid_expand_target_kernel_body): New function. (expand_omp): Call it. (lower_omp_for): Do not emit phony constructs. (lower_omp_taskreg): Do not emit phony constructs but create for them a temporary variable receiver_decl. (lower_omp_taskreg): Do not emit phony constructs. (lower_omp_teams): Likewise. (lower_omp_grid_body): New function. (lower_omp_1): Call it. (grid_reg_assignment_to_local_var_p): New function. (grid_seq_only_contains_local_assignments): Likewise. (grid_find_single_omp_among_assignments_1): Likewise. (grid_find_single_omp_among_assignments): Likewise. (grid_find_ungridifiable_statement): Likewise. (grid_target_follows_gridifiable_pattern): Likewise. (grid_remap_prebody_decls): Likewise. (grid_copy_leading_local_assignments): Likewise. (grid_process_kernel_body_copy): Likewise. (grid_attempt_target_gridification): Likewise. (grid_gridify_all_targets_stmt): Likewise. (grid_gridify_all_targets): Likewise. (execute_lower_omp): Call grid_gridify_all_targets. (make_gimple_omp_edges): Handle GIMPLE_OMP_GRID_BODY. * tree-core.h (omp_clause_code): Added OMP_CLAUSE__GRIDDIM_. (tree_omp_clause): Added union field dimension. * tree-pretty-print.c (dump_omp_clause): Handle OMP_CLAUSE__GRIDDIM_. * tree.c (omp_clause_num_ops): Added number of arguments of OMP_CLAUSE__GRIDDIM_. (omp_clause_code_name): Added name of OMP_CLAUSE__GRIDDIM_. (walk_tree_1): Handle OMP_CLAUSE__GRIDDIM_. * tree.h (OMP_CLAUSE_GRIDDIM_DIMENSION): New. (OMP_CLAUSE_SET_GRIDDIM_DIMENSION): Likewise. (OMP_CLAUSE_GRIDDIM_SIZE): Likewise. (OMP_CLAUSE_GRIDDIM_GROUP): Likewise. * passes.def: Schedule pass_ipa_hsa and pass_gen_hsail. * tree-pass.h (make_pass_gen_hsail): Declare. (make_pass_ipa_hsa): Likewise. * ipa-hsa.c: New file. * lto-section-in.c (lto_section_name): Add hsa section name. * lto-streamer.h (lto_section_type): Add hsa section. * timevar.def (TV_IPA_HSA): New. * hsa-brig-format.h: New file. * hsa-brig.c: New file. * hsa-dump.c: Likewise. * hsa-gen.c: Likewise. * hsa.c: Likewise. * hsa.h: Likewise. * toplev.c (compile_file): Call hsa_output_brig. * hsa-regalloc.c: New file. gcc/fortran/ * types.def (BT_FN_VOID_UINT_PTR_INT_PTR): New. (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_INT_INT): Removed. (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_PTR): New. gcc/lto/ * lto-partition.c: Include "hsa.h" (add_symbol_to_partition_1): Put hsa implementations into the same partition as host implementations. liboffloadmic/ * plugin/libgomp-plugin-intelmic.cpp (GOMP_OFFLOAD_async_run): New unused parameter. (GOMP_OFFLOAD_run): Likewise. include/ * gomp-constants.h (GOMP_DEVICE_HSA): New macro. (GOMP_VERSION_HSA): Likewise. (GOMP_TARGET_ARG_DEVICE_MASK): Likewise. (GOMP_TARGET_ARG_DEVICE_ALL): Likewise. (GOMP_TARGET_ARG_SUBSEQUENT_PARAM): Likewise. (GOMP_TARGET_ARG_ID_MASK): Likewise. (GOMP_TARGET_ARG_NUM_TEAMS): Likewise. (GOMP_TARGET_ARG_THREAD_LIMIT): Likewise. (GOMP_TARGET_ARG_VALUE_SHIFT): Likewise. (GOMP_TARGET_ARG_HSA_KERNEL_ATTRIBUTES): Likewise. From-SVN: r232549
2016-01-19 11:35:10 +01:00
2016-01-19 Martin Jambor <mjambor@suse.cz>
* types.def (BT_FN_VOID_UINT_PTR_INT_PTR): New.
(BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_INT_INT): Removed.
(BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_PTR): New.
re PR fortran/64324 (Deferred character specific functions not permitted in generic operator interface) 2016-01-15 Paul Thomas <pault@gcc.gnu.org> PR fortran/64324 * resolve.c (check_uop_procedure): Prevent deferred length characters from being trapped by assumed length error. PR fortran/49630 PR fortran/54070 PR fortran/60593 PR fortran/60795 PR fortran/61147 PR fortran/64324 * trans-array.c (gfc_conv_scalarized_array_ref): Pass decl for function as well as variable expressions. (gfc_array_init_size): Add 'expr' as an argument. Use this to correctly set the descriptor dtype for deferred characters. (gfc_array_allocate): Add 'expr' to the call to 'gfc_array_init_size'. * trans.c (gfc_build_array_ref): Expand logic for setting span to include indirect references to character lengths. * trans-decl.c (gfc_get_symbol_decl): Ensure that deferred result char lengths that are PARM_DECLs are indirectly referenced both for directly passed and by reference. (create_function_arglist): If the length type is a pointer type then store the length as the 'passed_length' and make the char length an indirect reference to it. (gfc_trans_deferred_vars): If a character length has escaped being set as an indirect reference, return it via the 'passed length'. * trans-expr.c (gfc_conv_procedure_call): The length of deferred character length results is set TREE_STATIC and set to zero. (gfc_trans_assignment_1): Do not fix the rse string_length if it is a variable, a parameter or an indirect reference. Add the code to trap assignment of scalars to unallocated arrays. * trans-stmt.c (gfc_trans_allocate): Remove 'def_str_len' and all references to it. Instead, replicate the code to obtain a explicitly defined string length and provide a value before array allocation so that the dtype is correctly set. trans-types.c (gfc_get_character_type): If the character length is a pointer, use the indirect reference. 2016-01-15 Paul Thomas <pault@gcc.gnu.org> PR fortran/49630 * gfortran.dg/deferred_character_13.f90: New test for the fix of comment 3 of the PR. PR fortran/54070 * gfortran.dg/deferred_character_8.f90: New test * gfortran.dg/allocate_error_5.f90: New test PR fortran/60593 * gfortran.dg/deferred_character_10.f90: New test PR fortran/60795 * gfortran.dg/deferred_character_14.f90: New test PR fortran/61147 * gfortran.dg/deferred_character_11.f90: New test PR fortran/64324 * gfortran.dg/deferred_character_9.f90: New test From-SVN: r232450
2016-01-15 21:33:58 +01:00
2016-01-15 Paul Thomas <pault@gcc.gnu.org>
PR fortran/64324
* resolve.c (check_uop_procedure): Prevent deferred length
characters from being trapped by assumed length error.
PR fortran/49630
PR fortran/54070
PR fortran/60593
PR fortran/60795
PR fortran/61147
PR fortran/64324
* trans-array.c (gfc_conv_scalarized_array_ref): Pass decl for
function as well as variable expressions.
(gfc_array_init_size): Add 'expr' as an argument. Use this to
correctly set the descriptor dtype for deferred characters.
(gfc_array_allocate): Add 'expr' to the call to
'gfc_array_init_size'.
* trans.c (gfc_build_array_ref): Expand logic for setting span
to include indirect references to character lengths.
* trans-decl.c (gfc_get_symbol_decl): Ensure that deferred
result char lengths that are PARM_DECLs are indirectly
referenced both for directly passed and by reference.
(create_function_arglist): If the length type is a pointer type
then store the length as the 'passed_length' and make the char
length an indirect reference to it.
(gfc_trans_deferred_vars): If a character length has escaped
being set as an indirect reference, return it via the 'passed
length'.
* trans-expr.c (gfc_conv_procedure_call): The length of
deferred character length results is set TREE_STATIC and set to
zero.
(gfc_trans_assignment_1): Do not fix the rse string_length if
it is a variable, a parameter or an indirect reference. Add the
code to trap assignment of scalars to unallocated arrays.
* trans-stmt.c (gfc_trans_allocate): Remove 'def_str_len' and
all references to it. Instead, replicate the code to obtain a
explicitly defined string length and provide a value before
array allocation so that the dtype is correctly set.
trans-types.c (gfc_get_character_type): If the character length
is a pointer, use the indirect reference.
2016-01-10 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/69154
* frontend-passes.c (in_where): New variable.
(inline_matmul_assign): Don't try this if we are within
a WHERE statement.
(gfc_code_walker): Keep track of in_where.
2016-01-10 Paul Thomas <pault@gcc.gnu.org>
PR fortran/67779
* trans_array.c (gfc_conv_scalarized_array_ref): Add missing
se->use_offset from condition for calculation of 'base'.
2016-01-08 Jakub Jelinek <jakub@redhat.com>
PR fortran/69128
* trans.h (OMPWS_SCALARIZER_BODY): Define.
(OMPWS_NOWAIT): Renumber.
* trans-stmt.c (gfc_trans_where_3): Only set OMPWS_SCALARIZER_WS
if OMPWS_SCALARIZER_BODY is not set already, and set also
OMPWS_SCALARIZER_BODY until the final loop creation.
* trans-expr.c (gfc_trans_assignment_1): Likewise.
* trans-openmp.c (gfc_trans_omp_workshare): Also clear
OMPWS_SCALARIZER_BODY.
* trans-array.c (gfc_trans_scalarized_loop_end): Don't create
OMP_FOR if OMPWS_SCALARIZER_BODY is set.
2016-01-04 Jakub Jelinek <jakub@redhat.com>
Update copyright years.
* gfortranspec.c (lang_specific_driver): Update copyright notice
dates.
* gfc-internals.texi: Bump @copying's copyright year.
* gfortran.texi: Ditto.
* intrinsic.texi: Ditto.
* invoke.texi: Ditto.
2016-01-01 Paul Thomas <pault@gcc.gnu.org>
PR fortran/68864
* trans-array.c (evaluate_bound): If deferred, test that 'desc'
is an array descriptor before using gfc_conv_descriptor_xxx.
Copyright (C) 2016 Free Software Foundation, Inc.
ABOUT-GCC-NLS, [...]: Add copyright and license notices. * ABOUT-GCC-NLS, ChangeLog, ChangeLog-1997, ChangeLog-1998, ChangeLog-1999, ChangeLog-2000, ChangeLog-2001, ChangeLog-2002, ChangeLog-2003, ChangeLog-2004, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007, ChangeLog-2008, ChangeLog.dataflow, ChangeLog.lib, ChangeLog.ptr, ChangeLog.tree-ssa, ChangeLog.tuples, FSFChangeLog, FSFChangeLog.10, FSFChangeLog.11, LANGUAGES, ONEWS, acinclude.m4, config/alpha/gnu.h, config/alpha/libgcc-alpha-ldbl.ver, config/alpha/t-osf4, config/alpha/t-vms, config/alpha/va_list.h, config/alpha/x-vms, config/arc/t-arc, config/arm/README-interworking, config/arm/arm-c.c, config/arm/gentune.sh, config/arm/libgcc-bpabi.ver, config/arm/t-arm, config/arm/t-arm-elf, config/arm/t-arm-softfp, config/arm/t-bpabi, config/arm/t-linux, config/arm/t-linux-eabi, config/arm/t-netbsd, config/arm/t-pe, config/arm/t-strongarm-elf, config/arm/t-symbian, config/arm/t-vxworks, config/arm/t-wince-pe, config/avr/t-avr, config/bfin/elf.h, config/bfin/libgcc-bfin.ver, config/bfin/linux.h, config/bfin/t-bfin, config/bfin/t-bfin-elf, config/bfin/t-bfin-linux, config/bfin/t-bfin-uclinux, config/bfin/uclinux.h, config/cris/mulsi3.asm, config/cris/t-cris, config/cris/t-elfmulti, config/crx/t-crx, config/darwin-ppc-ldouble-patch.def, config/darwin-sections.def, config/divmod.c, config/fr30/t-fr30, config/frv/libgcc-frv.ver, config/frv/t-frv, config/frv/t-linux, config/h8300/genmova.sh, config/h8300/t-h8300, config/i386/athlon.md, config/i386/darwin-libgcc.10.4.ver, config/i386/darwin-libgcc.10.5.ver, config/i386/libgcc-glibc.ver, config/i386/mach.h, config/i386/netbsd.h, config/i386/t-crtpc, config/i386/t-cygming, config/i386/t-cygwin, config/i386/t-i386, config/i386/t-linux64, config/i386/t-nwld, config/i386/t-rtems-i386, config/i386/t-sol2-10, config/i386/x-mingw32, config/ia64/div.md, config/ia64/elf.h, config/ia64/ia64.opt, config/ia64/libgcc-glibc.ver, config/ia64/libgcc-ia64.ver, config/ia64/linux.h, config/ia64/sysv4.h, config/ia64/t-hpux, config/ia64/t-ia64, config/iq2000/abi, config/iq2000/lib2extra-funcs.c, config/iq2000/t-iq2000, config/libgcc-glibc.ver, config/m32r/libgcc-glibc.ver, config/m32r/t-linux, config/m32r/t-m32r, config/m68hc11/t-m68hc11, config/m68k/t-floatlib, config/m68k/t-linux, config/m68k/t-mlibs, config/m68k/t-uclinux, config/mcore/t-mcore, config/mcore/t-mcore-pe, config/mips/20kc.md, config/mips/4130.md, config/mips/5400.md, config/mips/5500.md, config/mips/crti.asm, config/mips/crtn.asm, config/mips/irix-crti.asm, config/mips/irix-crtn.asm, config/mips/libgcc-mips16.ver, config/mips/mips-dsp.md, config/mips/mips-dspr2.md, config/mips/mips-fixed.md, config/mips/sb1.md, config/mips/sr71k.md, config/mips/t-elf, config/mips/t-gofast, config/mips/t-iris6, config/mips/t-isa3264, config/mips/t-libgcc-mips16, config/mips/t-linux64, config/mips/t-mips, config/mips/t-r3900, config/mips/t-rtems, config/mips/t-sb1, config/mips/t-sde, config/mips/t-sdemtk, config/mips/t-slibgcc-irix, config/mips/t-sr71k, config/mips/t-st, config/mips/t-vr, config/mips/t-vxworks, config/mmix/t-mmix, config/mn10300/t-linux, config/mn10300/t-mn10300, config/pa/pa32-regs.h, config/pa/t-hpux-shlib, config/pa/t-linux, config/pa/t-linux64, config/pa/t-pa64, config/pdp11/t-pdp11, config/picochip/libgccExtras/clzsi2.asm, config/picochip/t-picochip, config/rs6000/darwin-ldouble-format, config/rs6000/darwin-libgcc.10.4.ver, config/rs6000/darwin-libgcc.10.5.ver, config/rs6000/libgcc-ppc-glibc.ver, config/rs6000/ppc-asm.h, config/rs6000/t-aix43, config/rs6000/t-aix52, config/rs6000/t-darwin, config/rs6000/t-fprules, config/rs6000/t-fprules-fpbit, config/rs6000/t-linux64, config/rs6000/t-lynx, config/rs6000/t-netbsd, config/rs6000/t-ppccomm, config/rs6000/t-ppcendian, config/rs6000/t-ppcgas, config/rs6000/t-rs6000, config/rs6000/t-rtems, config/rs6000/t-spe, config/rs6000/t-vxworks, config/s390/libgcc-glibc.ver, config/score/t-score-elf, config/sh/divcost-analysis, config/sh/libgcc-glibc.ver, config/sh/t-netbsd, config/sh/t-sh, config/sh/t-sh64, config/sh/t-superh, config/sh/t-symbian, config/sparc/libgcc-sparc-glibc.ver, config/sparc/sol2-bi.h, config/sparc/sol2-gas.h, config/sparc/sol2-gld-bi.h, config/sparc/t-elf, config/sparc/t-linux64, config/sparc/t-sol2, config/stormy16/stormy-abi, config/stormy16/t-stormy16, config/t-darwin, config/t-libunwind, config/t-libunwind-elf, config/t-linux, config/t-lynx, config/t-slibgcc-elf-ver, config/t-slibgcc-sld, config/t-sol2, config/t-vxworks, config/udivmod.c, config/udivmodsi4.c, config/v850/t-v850, config/v850/t-v850e, config/xtensa/t-xtensa, diagnostic.def, gdbinit.in, glimits.h, gstab.h, gsyms.h, java/ChangeLog, java/ChangeLog.ptr, java/ChangeLog.tree-ssa, libgcc-std.ver, limitx.h, version.c, xcoff.h: Add copyright and license notices. * config/h8300/genmova.sh: Include copyright and license notices in generated output. * config/h8300/mova.md: Regenerate. * doc/install.texi2html: Include word "Copyright" in copyright notice and use name "Free Software Foundation, Inc.". * ChangeLog, ChangeLog-2000, ChangeLog-2001, ChangeLog-2002, ChangeLog-2003, ChangeLog-2004, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007, ChangeLog-2008: Correct dates. ada: * ChangeLog, ChangeLog.ptr, ChangeLog.tree-ssa: Add copyright and license notices. cp: * ChangeLog, ChangeLog-1993, ChangeLog-1994, ChangeLog-1995, ChangeLog-1996, ChangeLog-1997, ChangeLog-1998, ChangeLog-1999, ChangeLog-2000, ChangeLog-2001, ChangeLog-2002, ChangeLog-2003, ChangeLog-2004, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007, ChangeLog-2008, ChangeLog.ptr, ChangeLog.tree-ssa, NEWS, cfns.gperf: Add copyright and license notices. * cfns.h: Regenerate. * ChangeLog, ChangeLog-2004: Correct dates. fortran: * ChangeLog, ChangeLog-2002, ChangeLog-2003, ChangeLog-2004, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007, ChangeLog-2008, ChangeLog.ptr, config-lang.in, ioparm.def, mathbuiltins.def: Add copyright and license notices. * ChangeLog, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007, ChangeLog-2008: Correct dates. java: * ChangeLog, ChangeLog.ptr, ChangeLog.tree-ssa: Add copyright and license notices. objc: * ChangeLog: Add copyright and license notices. objcp: * ChangeLog: Add copyright and license notices. po: * ChangeLog, EXCLUDES: Add copyright and license notices. testsuite: * ChangeLog, ChangeLog-1993-2007, ChangeLog-2008, ChangeLog.ptr, ChangeLog.tree-ssa, README, README.QMTEST, README.compat, README.gcc, g++.dg/README, g++.dg/compat/break/README, g++.dg/gomp/gomp.exp, g++.old-deja/g++.brendan/README, g++.old-deja/g++.oliva/ChangeLog, g++.old-deja/g++.robertl/README, gcc.c-torture/ChangeLog.0, gcc.c-torture/execute/builtins/builtins.exp, gcc.dg/README, gcc.dg/gomp/gomp.exp, gcc.target/frv/frv.exp, gcc.target/i386/math-torture/math-torture.exp, gcc.target/mips/inter/mips16-inter.exp, gcc.target/mips/mips-nonpic/README, gcc.target/x86_64/abi/README.gcc, gcc.target/xstormy16/xstormy16.exp, gcc.test-framework/README, gfortran.dg/g77/README, gfortran.dg/gomp/gomp.exp, gfortran.fortran-torture/ChangeLog.g95: Add copyright and license notices. * ChangeLog-1993-2007, ChangeLog: Correct dates. From-SVN: r146533
2009-04-21 21:03:23 +02:00
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.