- 20 Nov, 2017 19 commits
-
-
In various places we use lookup_name_fuzzy to provide a hint, and can report messages of the form: error: unknown foo named 'bar' or: error: unknown foo named 'bar'; did you mean 'SUGGESTION? This patch provides a way for lookup_name_fuzzy to provide both the suggestion above, and (optionally) additional hints that can be printed e.g. note: did you forget to include <SOME_HEADER.h>? This patch provides the mechanism and ports existing users of lookup_name_fuzzy to the new return type. There are no uses of such hints in this patch, but followup patches provide various front-end specific uses of this. gcc/c-family/ChangeLog: * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h. (lookup_name_fuzzy): Likewise. Convert return type from const char * to name_hint. Add location_t param. * name-hint.h: New header. gcc/c/ChangeLog: * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h. Include "c-family/name-hint.h" (implicit_decl_warning): Convert "hint" from const char * to name_hint. Pass location to lookup_name_fuzzy. Suppress any deferred diagnostic if the warning was not printed. (undeclared_variable): Likewise for "guessed_id". (lookup_name_fuzzy): Convert return type from const char * to name_hint. Add location_t param. * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h. Include "c-family/name-hint.h" (c_parser_declaration_or_fndef): Convert "hint" from const char * to name_hint. Pass location to lookup_name_fuzzy. (c_parser_parameter_declaration): Likewise. gcc/cp/ChangeLog: * name-lookup.c: Define INCLUDE_UNIQUE_PTR before including system.h. Include "c-family/name-hint.h" (suggest_alternatives_for): Convert "fuzzy_name" from const char * to name_hint, and rename to "hint". Pass location to lookup_name_fuzzy. (lookup_name_fuzzy): Convert return type from const char * to name_hint. Add location_t param. * parser.c: Define INCLUDE_UNIQUE_PTR before including system.h. Include "c-family/name-hint.h" (cp_parser_diagnose_invalid_type_name): Convert "suggestion" from const char * to name_hint, and rename to "hint". Pass location to lookup_name_fuzzy. From-SVN: r254963
David Malcolm committed -
* Makefile.in (OBJS): Add gimple-ssa-evrp-analyze.o. * gimple-ssa-evrp-analyze.c: New file pulled from gimple-ssa-evrp.c. * gimple-ssa-evrp-analyze.h: New file pulled from gimple-ssa-evrp.c. * gimple-ssa-evrp.c: Remove bits moved into new files. Include gimple-ssa-evrp-analyze.h. From-SVN: r254961
Jeff Law committed -
* gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Do not set BB_VISITED here. (evrp_range_analyzer::enter): Set BB_VISITED here instead. From-SVN: r254960
Jeff Law committed -
https://gcc.gnu.org/ml/gcc-patches/2017-11/msg01115.html PR c++/82878 PR c++/78495 * call.c (build_call_a): Don't set CALL_FROM_THUNK_P for inherited ctor. * cp-gimplify.c (cp_genericize_r): Restore THUNK dereference inhibibition check removed in previous c++/78495 change. PR c++/82878 * g++.dg/cpp0x/pr82878.C: New. * g++.dg/cpp1z/inh-ctor38.C: Check moves too. From-SVN: r254958
Nathan Sidwell committed -
* include/bits/stl_iterator_base_funcs.h (next): Use InputIterator instead of ForwardIterator. * testsuite/24_iterators/operations/lwg2353.cc: New. * testsuite/24_iterators/operations/next_neg.cc: Remove. From-SVN: r254957
Ville Voutilainen committed -
* tree-predcom.c: Add general comment on Store-Store chains. (split_data_refs_to_components): Postpone clearing eliminate_store_p flag in component. (get_chain_last_ref_at): Rename into... (get_chain_last_write_at): ...this. (get_chain_last_write_before_load): New function. (add_ref_to_chain): Promote type of chain from CT_STORE_LOAD to CT_STORE_STORE when write reference is added. (determine_roots_comp): Support load ref in CT_STORE_STORE chains. (is_inv_store_elimination_chain): Update get_chain_last_write_at call. (initialize_root_vars_store_elim_1): Ditto. (initialize_root_vars_store_elim_2): Ditto. Replace rhs once default definition is created. (execute_pred_commoning_chain): Support load ref in CT_STORE_STORE chain by replacing it with dominant stored value. gcc/testsuite * gcc.dg/tree-ssa/predcom-dse-12.c: New test. From-SVN: r254956
Bin Cheng committed -
From-SVN: r254955
Bin Cheng committed -
2017-11-20 Marc Glisse <marc.glisse@inria.fr> gcc/ * vr-values.c (extract_range_from_binary_expr): Use a full range for VR_VARYING. gcc/testsuite/ PR testsuite/82951 * gcc.c-torture/execute/20040409-1.c: Move invalid tests... * gcc.c-torture/execute/20040409-1w.c: ... here with -fwrapv. * gcc.c-torture/execute/20040409-2.c: Move invalid tests... * gcc.c-torture/execute/20040409-2w.c: ... here with -fwrapv. * gcc.c-torture/execute/20040409-3.c: Move invalid tests... * gcc.c-torture/execute/20040409-3w.c: ... here with -fwrapv. * gcc.dg/tree-ssa/cmpmul-1.c: Tweak condition. * gcc.dg/tree-ssa/vrp118.c: New file. From-SVN: r254954
Marc Glisse committed -
* g++.dg/pr82836.C: Require int128, __float128 support. Add __float128 options. (size_t): Define using __SIZE_TYPE__. From-SVN: r254953
Rainer Orth committed -
PR c++/82781 * constexpr.c (cxx_eval_vector_conditional_expression): New function. (cxx_eval_constant_expression) <case VEC_COND_EXPR>: Use it instead of cxx_eval_conditional_expression. * g++.dg/ext/constexpr-pr82781.C: New test. From-SVN: r254952
Jakub Jelinek committed -
PR bootstrap/83015 * config/cr16/unwind-cr16.c (uw_install_context): Add FRAMES parameter. * config/xtensa/unwind-dw2-xtensa.c: Likewise * config/ia64/unwind-ia64.c: Add frames parameter. * unwind-sjlj.c: Likewise. From-SVN: r254951
Igor Tsimbalist committed -
Expanders for Armv8-M nonsecure call unnecessarily clobber r4 despite the libcall they perform not writing to r4. Furthermore, the requirement for the branch target address to be in r4 as expected by the libcall is modeled in a convoluted way in the define_insn patterns: the address is a register match_operand constrained by the match_dup for the clobber which is guaranteed to be r4 due to the expander. This patch simplifies all this by simply requiring the address to be in r4 and removing the clobbers. Expanders are left alone because cmse_nonsecure_call_clear_caller_saved relies on branch target memory attributes which would be lost if expanding to reg:SI R4_REGNUM. 2017-11-20 Thomas Preud'homme <thomas.preudhomme@arm.com> gcc/ * config/arm/arm.md (R4_REGNUM): Define constant. (nonsecure_call_internal): Remove r4 clobber. (nonsecure_call_value_internal): Likewise. * config/arm/thumb1.md (nonsecure_call_reg_thumb1_v5): Remove second clobber and resequence match_operands. (nonsecure_call_value_reg_thumb1_v5): Likewise. * config/arm/thumb2.md (nonsecure_call_reg_thumb2): Likewise. (nonsecure_call_value_reg_thumb2): Likewise. From-SVN: r254950
Thomas Preud'homme committed -
2017-11-20 Christophe Lyon <christophe.lyon@linaro.org> gcc/testsuite/ * gcc.target/arm/pr69180.c: Use -: for no column in expected warnings. From-SVN: r254949
Christophe Lyon committed -
re PR tree-optimization/78821 (GCC7: Copying whole 32 bits structure field by field not optimised into copying whole 32 bits at once) PR tree-optimization/78821 * gimple-ssa-store-merging.c (find_bswap_or_nop_load): Give up if base is TARGET_MEM_REF. If base is not MEM_REF, set base_addr to the address of the base rather than the base itself. (find_bswap_or_nop_1): Just use pointer comparison for vuse check. (find_bswap_or_nop_finalize): New function. (find_bswap_or_nop): Use it. (bswap_replace): Return a tree rather than bool, change first argument from gimple * to gimple_stmt_iterator, allow inserting into an empty sequence, allow ins_stmt to be NULL - then emit all stmts into gsi. Fix up MEM_REF address gimplification. (pass_optimize_bswap::execute): Adjust bswap_replace caller. (struct store_immediate_info): Add N and INS_STMT non-static data members. (store_immediate_info::store_immediate_info): Initialize them from newly added ctor args. (merged_store_group::apply_stores): Formatting fixes. Sort by bitpos at the end. (stmts_may_clobber_ref_p): For stores call also refs_anti_dependent_p. (gather_bswap_load_refs): New function. (imm_store_chain_info::try_coalesce_bswap): New method. (imm_store_chain_info::coalesce_immediate_stores): Use it. (split_group): Handle LROTATE_EXPR and NOP_EXPR rhs_code specially. (imm_store_chain_info::output_merged_store): Fail if number of new estimated stmts is bigger or equal than old. Handle LROTATE_EXPR and NOP_EXPR rhs_code. (pass_store_merging::process_store): Compute n and ins_stmt, if ins_stmt is non-NULL and the store rhs is otherwise invalid, use LROTATE_EXPR rhs_code. Pass n and ins_stmt to store_immediate_info ctor. (pass_store_merging::execute): Calculate dominators. * gcc.dg/store_merging_16.c: New test. From-SVN: r254948
Jakub Jelinek committed -
* tree-ssa-math-opts.c (nop_stats, bswap_stats, struct symbolic_number, BITS_PER_MARKER, MARKER_MASK, MARKER_BYTE_UNKNOWN, HEAD_MARKER, CMPNOP, CMPXCHG, do_shift_rotate, verify_symbolic_number_p, init_symbolic_number, find_bswap_or_nop_load, perform_symbolic_merge, find_bswap_or_nop_1, find_bswap_or_nop, pass_data_optimize_bswap, class pass_optimize_bswap, bswap_replace, pass_optimize_bswap::execute): Moved to ... * gimple-ssa-store-merging.c: ... this file. Include optabs-tree.h. (nop_stats, bswap_stats, do_shift_rotate, verify_symbolic_number_p, init_symbolic_number, find_bswap_or_nop_load, perform_symbolic_merge, find_bswap_or_nop_1, find_bswap_or_nop, bswap_replace): Put into anonymous namespace, remove static keywords. (pass_optimize_bswap::gate): Test BITS_PER_UNIT == 8 here... (pass_optimize_bswap::execute): ... rather than here. Formatting fix. From-SVN: r254947
Jakub Jelinek committed -
re PR bootstrap/83062 (Bootstrap failure: libsanitizer/tsan/tsan_rtl.h:713:44: error: inlining failed in call to always_inline ‘void __tsan::MemoryRead(__tsan::ThreadState*, __sanitizer::uptr, __sanitizer: :uptr, int)’: caller is not optimized) PR bootstrap/83062 * ipa-inline.c (can_inline_edge_p): Fix typo in previous patch. From-SVN: r254946
Jan Hubicka committed -
* vec.h (debug_helper): New function. (DEFINE_DEBUG_VEC): New macro. * hash-set.h (debug_helper): New function. (DEFINE_DEBUG_HASH_SET): New macro. * cfg.c (debug_slim (edge)): New function. Call DEFINE_DEBUG_VEC for edges. Call DEFINE_DEBUG_HASH_SET for edges. * cfghooks.c (debug_slim (basic_block)): New function. Call DEFINE_DEBUG_VEC for basic blocks. Call DEFINE_DEBUG_HASH_SET for basic blocks. * print-tree.c (debug_slim): New function to handle trees. Call DEFINE_DEBUG_VEC for trees. Call DEFINE_DEBUG_HASH_SET for trees. (debug (vec<tree, va_gc>) &): Remove. (debug (<vec<tree, va_gc>) *): Remove. * print-rtl.c (debug_slim): New function to handle const_rtx. Call DEFINE_DEBUG_VEC for rtx_def. Call DEFINE_DEBUG_VEC for rtx_insn. Call DEFINE_DEBUG_HASH_SET for rtx_def. Call DEFINE_DEBUG_HASH_SET for rtx_insn. * sel-sched-dump.c (debug (vec<rtx_insn *> &): Remove. (debug (vec<rtx_insn *> *ptr): Remove. (debug_insn_vector): Remove. * stor-layout.c (debug_rli): Call debug() instead of debug_vec_tree. From-SVN: r254945
Aldy Hernandez committed -
2017-11-20 Tom de Vries <tom@codesourcery.com> PR rtl-optimization/82020 * simplify-rtx.c (simplify_ternary_operation): Fix comparison mode of IF_THEN_ELSE condition. From-SVN: r254944
Tom de Vries committed -
From-SVN: r254943
GCC Administrator committed
-
- 19 Nov, 2017 16 commits
-
-
re PR ada/83016 (gnat1: warning: command line option ‘-nostdinc++’ is valid for C++/ObjC++ but not for Ada) PR ada/83016 * gnatlink.adb (Process_Args): Accept multiple switches for --LINK. (Usage): Adjust. * gcc-interface/Makefile.in (GCC_LINK): Remove $(ADA_INCLUDES). (common-tools): Pass $(CC) as --GCC= and $(GCC_LINK) as --LINK= in the invocations of $(GNATLINK). (../../gnatdll$(exeext)): Likewise. (../../vxaddr2line$(exeext)): Likewise. (gnatmake-re): Likewise. (gnatlink-re): Likewise. From-SVN: r254940
Eric Botcazou committed -
re PR target/82281 (Bulldozer/Zen tuning: uses XMM for single 64-bit integer AND, even with a simple mask) PR target/82281 * gcc.target/i386/pr82281.c: New testcase. From-SVN: r254939
Jan Hubicka committed -
tree-ssa-dom.c (record_equivalences_from_phis): Fix handling of degenerates resulting from ignoring an edge. * tree-ssa-dom.c (record_equivalences_from_phis): Fix handling of degenerates resulting from ignoring an edge. From-SVN: r254938
Jeff Law committed -
PR ipa/81360 * ipa-inline.c (can_inline_edge_p): Also check that caller is optimized * gcc.c-torture/compile/pr81360.c: New testcase. From-SVN: r254937
Jan Hubicka committed -
2017-11-19 Paul Thomas <pault@gcc.gnu.org> PR fortran/78990 * expr.c (gfc_is_class_array_function): Renamed from 'gfc_is_alloc_class_array_function' and modified to return true for pointers as well as allocatable results. * gfortran.h : Change of name for prototype of above function. * trans-array.c (gfc_add_loop_ss_code): Force finalization of class array results. (build_class_array_ref): Change assertion into a condition. (build_class_array_ref): Set the se class_vptr for class array function results. (gfc_walk_function_expr): Reference gfc_is_class_array_function as above. * trans-decl.c (get_proc_result): Move it up before gfc_trans_deferred_vars. (gfc_trans_deferred_vars): Nullify explicit return class arrays on entry. * trans-expr.c (gfc_conv_class_to_class): Allow conversion of class array functions that have an se class_vptr and use it for the result vptr. (gfc_conv_subref_array_arg): Rename reference to the above function. (gfc_conv_procedure_call): Ditto. Add the se pre block to the loop pre block before the function is evaluated. Do not finalize class pointer results. (arrayfunc_assign_needs_temporary, gfc_trans_assignment_1) More renamed references. * trans-intrinsic.c (gfc_conv_intrinsic_size): Ditto. 2017-11-19 Paul Thomas <pault@gcc.gnu.org> PR fortran/78990 * gfortran.dg/class_67.f90: New test. From-SVN: r254936
Paul Thomas committed -
PR ipa/83001 * profile-count.c (profile_count::to_sreal_scale): Fix return value for uninitialied counts. From-SVN: r254935
Jan Hubicka committed -
PR ipa/60243 * tree-inline.c (estimate_num_insns): Set to 1 at least. From-SVN: r254934
Jan Hubicka committed -
PR target/82713 * i386.c (ix86_builtin_vectorization_cost): Be ready for insane types. From-SVN: r254933
Jan Hubicka committed -
PR c/66618 PR c/69960 c-family/ * c-common.h (c_fully_fold): Add LVAL argument defaulted to false. c/ * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold where needed. * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr, handle_omp_array_sections): Likewise. (digest_init): Don't call decl_constant_value_for_optimization. * c-tree.h (decl_constant_value_for_optimization): Removed. * c-fold.c (c_fold_array_ref): New function. (c_fully_fold_internal): Add LVAL argument, propagate it through recursive calls. For VAR_P call decl_constant_value and unshare if not LVAL and either optimizing or IN_INIT. Remove decl_constant_value_for_optimization calls. If IN_INIT and not LVAL, fold ARRAY_REF with STRING_CST and INTEGER_CST operands. (c_fully_fold): Add LVAL argument, pass it through to c_fully_fold_internal. (decl_constant_value_for_optimization): Removed. cp/ * cp-gimplify.c (c_fully_fold): Add LVAL argument, call cp_fold_maybe_rvalue instead of cp_fold_rvalue and pass it !LVAL. testsuite/ * gcc.dg/pr69960.c: New test. * gcc.dg/pr66618.c: New test. * gcc.dg/pr66618-2.c: New test. From-SVN: r254930
Jakub Jelinek committed -
2017-11-19 Tom de Vries <tom@codesourcery.com> * config/arc/arc.h (FUNCTION_PROFILER): Remove semicolon after "do while (0)". From-SVN: r254929
Tom de Vries committed -
2017-11-19 Tom de Vries <tom@codesourcery.com> * config/phoenix.h (TARGET_OS_CPP_BUILTINS): Remove semicolon after "do {} while (0)". From-SVN: r254928
Tom de Vries committed -
2017-11-19 Tom de Vries <tom@codesourcery.com> * config/visium/visium.h (ASM_OUTPUT_CASE_END): Remove semicolon after macro body. From-SVN: r254927
Tom de Vries committed -
2017-11-19 Tom de Vries <tom@codesourcery.com> * config/ft32/ft32.h (REGISTER_TARGET_PRAGMAS): Remove semicolon after "do {} while (0)". * config/spu/spu.h (REGISTER_TARGET_PRAGMAS): Same. From-SVN: r254926
Tom de Vries committed -
2017-11-19 Tom de Vries <tom@codesourcery.com> * config/mcore/mcore-elf.h (MCORE_EXPORT_NAME): Remove semicolon after "do {} while (0)". * config/mcore/mcore.h (ASM_OUTPUT_ALIGNED_COMMON): After missing semicolon after MCORE_EXPORT_NAME call. From-SVN: r254925
Tom de Vries committed -
2017-11-18 Edward Smith-Rowland <3dw4rd@verizon.net> PR libstdc++/pr66689 - comp_ellint_3 and ellint_3 return garbage values * include/tr1/ell_integral.tcc: Correct the nu sign convention in ellint_3 and comp_ellint_3. * testsuite/tr1/5_numerical_facilities/special_functions/ 06_comp_ellint_3/check_value.cc: Regen with correct values. * testsuite/tr1/5_numerical_facilities/special_functions/ 14_ellint_3/check_value.cc: Ditto. * testsuite/special_functions/06_comp_ellint_3/check_value.cc: Ditto. * testsuite/special_functions/13_ellint_3/check_value.cc: Ditto. * testsuite/tr1/5_numerical_facilities/special_functions/ 01_assoc_laguerre/check_value.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 02_assoc_legendre/check_value.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 03_beta/check_value.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 04_comp_ellint_1/check_value.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 05_comp_ellint_2/check_value.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 07_conf_hyperg/check_value.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 08_cyl_bessel_i/check_value.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 09_cyl_bessel_j/check_value.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 10_cyl_bessel_k/check_value.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 11_cyl_neumann/check_value.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 12_ellint_1/check_value.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 13_ellint_2/check_value.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 15_expint/check_value_neg.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 16_hermite/check_value.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 17_hyperg/check_value.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 18_laguerre/check_value.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 19_legendre/check_value.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 20_riemann_zeta/check_value_neg.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 21_sph_bessel/check_value.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 22_sph_legendre/check_value.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 23_sph_neumann/check_value.cc: Regen. * testsuite/ext/special_functions/conf_hyperg/check_value.cc: Regen. * testsuite/ext/special_functions/hyperg/check_value.cc: Regen. * testsuite/special_functions/01_assoc_laguerre/check_value.cc: Regen. * testsuite/special_functions/02_assoc_legendre/check_value.cc: Regen. * testsuite/special_functions/03_beta/check_value.cc: Regen. * testsuite/special_functions/04_comp_ellint_1/check_value.cc: Regen. * testsuite/special_functions/05_comp_ellint_2/check_value.cc: Regen. * testsuite/special_functions/07_cyl_bessel_i/check_value.cc: Regen. * testsuite/special_functions/08_cyl_bessel_j/check_value.cc: Regen. * testsuite/special_functions/09_cyl_bessel_k/check_value.cc: Regen. * testsuite/special_functions/10_cyl_neumann/check_value.cc: Regen. * testsuite/special_functions/11_ellint_1/check_value.cc: Regen. * testsuite/special_functions/12_ellint_2/check_value.cc: Regen. * testsuite/special_functions/14_expint/check_value.cc: Regen. * testsuite/special_functions/15_hermite/check_value.cc: Regen. * testsuite/special_functions/16_laguerre/check_value.cc: Regen. * testsuite/special_functions/17_legendre/check_value.cc: Regen. * testsuite/special_functions/18_riemann_zeta/check_value.cc: Regen. * testsuite/special_functions/19_sph_bessel/check_value.cc: Regen. * testsuite/special_functions/20_sph_legendre/check_value.cc: Regen. * testsuite/special_functions/21_sph_neumann/check_value.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 06_comp_ellint_3/pr66689.cc: New. * testsuite/tr1/5_numerical_facilities/special_functions/ 14_ellint_3/pr66689.cc: New. * testsuite/special_functions/06_comp_ellint_3/pr66689.cc: New. * testsuite/special_functions/13_ellint_3/pr66689.cc: New. From-SVN: r254924
Edward Smith-Rowland committed -
From-SVN: r254923
GCC Administrator committed
-
- 18 Nov, 2017 5 commits
-
-
2017-11-19 Tom de Vries <tom@codesourcery.com> PR target/82961 * vmsdbgout.c (vmsdbgout_early_finish): New function. (vmsdbg_debug_hooks): Set early_finish field to vmsdbgout_early_finish. From-SVN: r254920
Tom de Vries committed -
* cgraphclones.c (cgraph_edge::clone): Rename gcov_count to prof_count. (cgraph_edge::clone): Cleanup updating of profile. * ipa-cp.c (update_profiling_info): Likewise. * ipa-inline-transform.c (inline_transform): Likewise. * ipa-inline.c (inline_small_functions): Add missing space to dump. * ipa-split.c (execute_split_functions): Do not split when function is cold. * predict.c (estimate_bb_frequencies): Cleanup updating of profile. * profile-count.c (profile_count::dump): Add global0. (profile_count::to_cgraph_frequency): Do not ICE when entry is undefined. (profile_count::to_sreal_scale): Likewise. (profile_count::adjust_for_ipa_scaling): Fix typo in comment. (profile_count::combine_with_ipa_count): New function. * profile-count.h (profile_guessed_global0adjusted): New. (profile_count::adjusted_zero): New. (profile_count::global0adjusted): New. (profile_count::combine_with_ipa_count): New. * tree-inline.c (copy_edges_for_bb): Add NUM/DEN arugment; correct profile of return block of split functions. (copy_cfg_body): Remove unused profile_count. (copy_body): Likewise. (expand_call_inline): Update. (tree_function_versioning): Update. From-SVN: r254919
Jan Hubicka committed -
Now that the ABI supports large record lengths, there's a few places in libgfortran where we need to use larger types. For internal units which by definition are in-memory, it's enought to use ptrdiff_t, for external units gfc_offset. Regtested on x86_64-pc-linux-gnu? libgfortran/ChangeLog: 2017-11-19 Janne Blomqvist <jb@gcc.gnu.org> PR fortran/44292 * io/transfer.c (skip_record): Use gfc_offset to handle large records. (next_record_r): Likewise. (sset): Likewise. (next_record_w): Use gfc_offset/ptrdiff_t appropriately. From-SVN: r254918
Janne Blomqvist committed -
2017-11-18 Edward Smith-Rowland <3dw4rd@verizon.net> * include/bits/specfun.h: Expose airy_ai and airy_bi. * include/tr1/modified_bessel_func.tcc: Treat NaN and inf arg, return. * testsuite/ext/special_functions/airy_ai/check_nan.cc: New. * testsuite/ext/special_functions/airy_ai/check_value.cc: New. * testsuite/ext/special_functions/airy_ai/compile.cc: New. * testsuite/ext/special_functions/airy_bi/check_nan.cc: New. * testsuite/ext/special_functions/airy_bi/check_value.cc: New. * testsuite/ext/special_functions/airy_bi/compile.cc: New. From-SVN: r254917
Edward Smith-Rowland committed -
This is accomplished by making the NEXTREC specifier be a 8 byte integer where supported. I wasn't able to come up with a testcase that does not create a large file that could be added to the testsuite, but here's one which creates a 2 GB file: program nextrec implicit none integer(8) :: ii, n open(10, file="foo.dat", recl=1, access="direct", form="unformatted", & status="replace") do ii = 1, huge(1) + 2_8 write(10, rec=ii) 'a' end do inquire(10, nextrec=n) if (n /= huge(1) + 3_8) then call abort() end if close(10, status="delete") end program nextrec Regtested on x86_64-pc-linux-gnu. gcc/fortran/ChangeLog: 2017-11-18 Janne Blomqvist <jb@gcc.gnu.org> PR fortran/83036 * ioparm.def (IOPARM): Make nextrec a pintio. libgfortran/ChangeLog: 2017-11-18 Janne Blomqvist <jb@gcc.gnu.org> PR fortran/83036 * io/io.h: Make nextrec a GFC_IO_INT*. --- gcc/fortran/ioparm.def | 2 +- libgfortran/io/io.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/gcc/fortran/ioparm.def b/gcc/fortran/ioparm.def index 5fc04bc..59cc7cd 100644 --- a/gcc/fortran/ioparm.def +++ b/gcc/fortran/ioparm.def @@ -62,7 +62,7 @@ IOPARM (inquire, exist, 1 << 7, pint4) IOPARM (inquire, opened, 1 << 8, pint4) IOPARM (inquire, number, 1 << 9, pint4) IOPARM (inquire, named, 1 << 10, pint4) -IOPARM (inquire, nextrec, 1 << 11, pint4) +IOPARM (inquire, nextrec, 1 << 11, pintio) IOPARM (inquire, recl_out, 1 << 12, pintio) IOPARM (inquire, strm_pos_out, 1 << 13, pintio) IOPARM (inquire, file, 1 << 14, char1) diff --git a/libgfortran/io/io.h b/libgfortran/io/io.h index 3330bce..d29b112 100644 --- a/libgfortran/io/io.h +++ b/libgfortran/io/io.h @@ -388,8 +388,7 @@ typedef struct { st_parameter_common common; GFC_INTEGER_4 *exist, *opened, *number, *named; - GFC_INTEGER_4 *nextrec; - GFC_IO_INT *recl_out, *strm_pos_out; + GFC_IO_INT *nextrec, *recl_out, *strm_pos_out; CHARACTER1 (file); CHARACTER2 (access); CHARACTER1 (form); -- 2.7.4 From-SVN: r254916
Janne Blomqvist committed
-