Commit Graph

157709 Commits

Author SHA1 Message Date
Marc Glisse
50dec459c6 VRP: x+1 and -x cannot be INT_MIN
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
2017-11-20 13:26:39 +00:00
Rainer Orth
9aab553436 Add g++.dg/pr82836.C requirements
* g++.dg/pr82836.C: Require int128, __float128 support.
	Add __float128 options.
	(size_t): Define using __SIZE_TYPE__.

From-SVN: r254953
2017-11-20 13:03:06 +00:00
Jakub Jelinek
f370e36dc9 re PR c++/82781 (Vector extension operators return wrong result in constexpr)
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
2017-11-20 13:57:50 +01:00
Igor Tsimbalist
1ebafce0bc re PR bootstrap/83015 (bootstrap comparison failure on ia64)
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
2017-11-20 13:30:25 +01:00
Thomas Preud'homme
0a413fbc6c [ARM] Do no clobber r4 in Armv8-M nonsecure call
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
2017-11-20 11:06:05 +00:00
Christophe Lyon
4acdaf98f9 [testsuite,arm] [Diagnostic Patch] don't print column zero
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
2017-11-20 11:40:36 +01:00
Jakub Jelinek
4b84d9b8f9 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
2017-11-20 11:10:23 +01:00
Jakub Jelinek
dffec8ebdb tree-ssa-math-opts.c (nop_stats, [...]): Moved to ...
* 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
2017-11-20 11:08:48 +01:00
Jan Hubicka
12b8cb2e5b 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
2017-11-20 09:55:02 +00:00
Aldy Hernandez
19a30b7123 vec.h (debug_helper): New function.
* 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
2017-11-20 08:32:57 +00:00
Tom de Vries
7cfaa4c643 Fix comparison mode in simplify_ternary_operation
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
2017-11-20 08:20:35 +00:00
GCC Administrator
7476c7da18 Daily bump.
From-SVN: r254943
2017-11-20 00:16:19 +00:00
Eric Botcazou
3b36246bc2 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
2017-11-19 22:36:25 +00:00
Jan Hubicka
290295fdf8 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
2017-11-19 20:30:26 +00:00
Jeff Law
43502b8313 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
2017-11-19 13:15:45 -07:00
Jan Hubicka
8a4a6d2e84 re PR ipa/81360 (ice in estimate_edge_growth, at ipa-inline.h:86)
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
2017-11-19 19:58:12 +00:00
Paul Thomas
a6b22eea5b re PR fortran/78990 (ICE when assigning polymorphic array function result)
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
2017-11-19 19:50:50 +00:00
Jan Hubicka
77459763f4 re PR ipa/83001 (ICE in edge_badness, at ipa-inline.c:1025)
PR ipa/83001
	* profile-count.c (profile_count::to_sreal_scale): Fix return value
	for uninitialied counts.

From-SVN: r254935
2017-11-19 18:56:58 +00:00
Jan Hubicka
0fa23756e3 re PR ipa/60243 (IPA is slow on large cgraph tree)
PR ipa/60243
	* tree-inline.c (estimate_num_insns): Set to 1 at least.

From-SVN: r254934
2017-11-19 18:55:30 +00:00
Jan Hubicka
66c9290335 re PR target/82713 (ICE in ix86_builtin_vectorization_cost, at config/i386/i386.c:44475)
PR target/82713
	* i386.c (ix86_builtin_vectorization_cost): Be ready for insane
	types.

From-SVN: r254933
2017-11-19 18:52:54 +00:00
Jakub Jelinek
f9c59f7e95 re PR c/66618 (Failure to diagnose non-constant initializer for static object with -O1)
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
2017-11-19 18:17:01 +01:00
Tom de Vries
4397fc04e3 [arc] Remove semicolon after do while (0) in FUNCTION_PROFILER
2017-11-19  Tom de Vries  <tom@codesourcery.com>

	* config/arc/arc.h (FUNCTION_PROFILER): Remove semicolon after
	"do while (0)".

From-SVN: r254929
2017-11-19 12:21:07 +00:00
Tom de Vries
3412efc86e [phoenix] Remove semicolon after do {} while (0) in TARGET_OS_CPP_BUILTINS
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
2017-11-19 10:40:00 +00:00
Tom de Vries
b08c57ef9b [visium] Remove semicolon after ASM_OUTPUT_CASE_END
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
2017-11-19 10:39:50 +00:00
Tom de Vries
f8575ee93f [ft32, spu] Remove semicolon after do {} while (0) in REGISTER_TARGET_PRAGMAS
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
2017-11-19 10:39:38 +00:00
Tom de Vries
6014142052 [mcore] Remove semicolon after do {} while (0) in MCORE_EXPORT_NAME
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
2017-11-19 10:39:27 +00:00
Edward Smith-Rowland
b46881363f PR libstdc++/pr66689 - comp_ellint_3 and ellint_3 return garbage values
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
2017-11-19 01:01:50 +00:00
GCC Administrator
d432108324 Daily bump.
From-SVN: r254923
2017-11-19 00:16:20 +00:00
Tom de Vries
33f4e967a1 [vms] Add missing vmsdbgout_early_finish
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
2017-11-18 23:30:50 +00:00
Jan Hubicka
517048cef0 cgraphclones.c (cgraph_edge::clone): Rename gcov_count to prof_count.
* 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
2017-11-18 22:55:56 +00:00
Janne Blomqvist
2563a16d3c PR 44292 Handle large record lengths
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
2017-11-19 00:05:13 +02:00
Edward Smith-Rowland
a7a389d6ee specfun.h: Expose airy_ai and airy_bi.
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
2017-11-18 19:53:25 +00:00
Janne Blomqvist
a7037861a7 PR 83036 Make NEXTREC specifier for INQUIRE work for large record numbers
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
2017-11-18 18:56:21 +02:00
Janne Blomqvist
831cf09d60 PR 44292 Enable large record lengths in OPEN and INQUIRE statements
This is a straightforward change that we can do now that the ABI has
been bumped (again!).

Regtested on x86_64-pc-linux-gnu.

gcc/fortran/ChangeLog:

2017-11-18  Janne Blomqvist  <jb@gcc.gnu.org>

	PR fortran/44292
	* ioparm.def (IOPARM): Make recl_in intio, and recl_out pintio.

libgfortran/ChangeLog:

2017-11-18  Janne Blomqvist  <jb@gcc.gnu.org>

	PR fortran/44292
	* io/io.h: Make recl_in a GC_IO_INT and recl_out a type
	GFC_IO_INT*.

gcc/testsuite/ChangeLog:

2017-11-18  Janne Blomqvist  <jb@gcc.gnu.org>

	PR fortran/44292
	* gfortran.dg/large_recl.f90: New test.

From-SVN: r254915
2017-11-18 18:13:20 +02:00
Thomas Koenig
a814e35ba3 re PR fortran/83012 (Simply contiguous pointer function not recognized as contiguous)
2017-11-18  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/83012
	* expr.c (gfc_is_simply_contiguous): If a function call through a
	class variable is done through a reference, check the function's
	interface.

2017-11-18  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/83012
	* gfortran.dg/contiguous_5.f90: New test.

From-SVN: r254914
2017-11-18 15:53:21 +00:00
Aldy Hernandez
cde30fe045 hash-set.h (hash_set::empty): New.
* hash-set.h (hash_set::empty): New.
	* tree-ssa-threadbackward.h: Delete.
	* tree-ssa-threadbackward.c (class thread_jumps): New.
	Move max_threaded_paths into class.
	(fsm_find_thread_path): Remove arguments that are now in class.
	(profitable_jump_thread_path): Rename to...
	(thread_jumps::profitable_jump_thread_path): ...this.
	(convert_and_register_jump_thread_path): Rename to...
	(thread_jumps::convert_and_register_current_path): ...this.
	(check_subpath_and_update_thread_path): Rename to...
	(thread_jumps::check_subpath_and_update_thread_path): ...this.
	(register_jump_thread_path_if_profitable): Rename to...
	(thread_jumps::register_jump_thread_path_if_profitable): ...this.
	(handle_phi): Rename to...
	(thread_jumps::handle_phi): ...this.
	(handle_assignment): Rename to...
	(thread_jumps::handle_assignment): ...this.
	(fsm_find_control_statement_thread_paths): Rename to...
	(thread_jumps::fsm_find_control_statement_thread_paths): ...this.
	(find_jump_threads_backwards): Rename to...
	(thread_jumps::find_jump_threads_backwards): ...this.
	Initialize path local data.
	(pass_thread_jumps::execute): Call find_jump_threads_backwards
	from within thread_jumps class.
	(pass_early_thread_jumps::execute): Same.

From-SVN: r254913
2017-11-18 07:35:18 +00:00
GCC Administrator
f32e0e16b2 Daily bump.
From-SVN: r254912
2017-11-18 00:16:18 +00:00
Jan Hubicka
d53a5d8b6e * cgraph.c (cgraph_node::dump): Do IPA sanity checking on IPA counts.
From-SVN: r254909
2017-11-17 23:25:07 +00:00
Igor Tsimbalist
c51081fc9f Enable building libitm with Intel CET
libitm/
	* Makefile.in: Regenerate.
	* acinclude.m4: Add enable.m4 and cet.m4.
	* config/x86/sjlj.S: Include cet.h.
	(_ITM_beginTransaction): Add _CET_ENDBR.
	Save Shadow Stack pointer.
	(GTM_longjmp): Add _CET_ENDBR. Restore Shadow Stack pointer.
	* config/x86/target.h (struct gtm_jmpbuf):
	Add new field for Shadow Stack pointer.
	* configure: Regenerate.
	* configure.ac: Set CET_FLAGS. Update XCFLAGS.
	* configure.ac: Update libtool_VERSION for x86.
	* testsuite/Makefile.in: Regenerate.

From-SVN: r254908
2017-11-17 23:59:41 +01:00
Igor Tsimbalist
cc03e55b5a Add extra field to gtm_jmpbuf on x86 only
Expand the gtm_jmpbuf structure by one word field to add
Intel CET support further. The code in sjlj.S already
allocates more space on the stack then gtm_jmpbuf needs.
Use this extra space to absorb the new field.

The structure is allocated on the stack in such a way
that eip/rsp field is overlapped with return address on
the stack. Locate the new field right before eip/rsp so
code that accesses buffer fields relative to address of
gtm_jmpbuf has its offsets unchanged.

	* libitm/config/x86/target.h: Add new field (ssp).
	* libitm/config/x86/sjlj.S: Change offsets.

From-SVN: r254907
2017-11-17 23:57:07 +01:00
Steve Ellcey
7cac54fb0d fmls.c: New test.
2017-11-17  Steve Ellcey  <sellcey@cavium.com>

	* gcc.target/aarch64/fmls.c: New test.

From-SVN: r254906
2017-11-17 22:56:52 +00:00
Steve Ellcey
a7fef189d8 aarch64-simd.md (fnma<mode>4): Move neg operator to canonical location.
2017-11-17  Steve Ellcey  <sellcey@cavium.com>

	* config/aarch64/aarch64-simd.md (fnma<mode>4): Move neg operator
	to canonical location.

From-SVN: r254905
2017-11-17 22:55:38 +00:00
Igor Tsimbalist
7b7168cffe Enable building libobjc with Intel CET
libobjc/
	* Makefile.in: Regenerate.
	* aclocal.m4: Likeiwse.
	* configure: Likewise.
	* configure.ac: Set CET_FLAGS. Update XCFLAGS.

From-SVN: r254904
2017-11-17 23:48:36 +01:00
Steve Ellcey
667b43c179 pr81356.c: New test.
2017-11-17  Steve Ellcey  <sellcey@cavium.com>

	* gcc.target/aarch64/pr81356.c: New test.

From-SVN: r254903
2017-11-17 22:46:46 +00:00
Igor Tsimbalist
26724ef992 Enable building libgfortran with Intel CET
libgfortran/
	* acinclude.m4: Add enable.m4, cet.m4.
	* Makefile.in: Regenerate.
	* configure: Likewise.
	* configure.ac: Set CET_FLAGS. Update AM_FCFLAGS,
	AM_CFLAGS, CFLAGS.

From-SVN: r254902
2017-11-17 23:44:59 +01:00
Steve Ellcey
0495940618 re PR target/81356 (__builtin_strcpy is not good for copying an empty string on aarch64)
2017-11-17  Steve Ellcey  <sellcey@cavium.com>

	PR target/81356
	* config/aarch64/aarch64.c (aarch64_use_by_pieces_infrastructure_p):
	Remove.
	(TARGET_USE_BY_PIECES_INFRASTRUCTURE_P): Remove define.

From-SVN: r254901
2017-11-17 22:44:32 +00:00
Igor Tsimbalist
abccc074bb Enable building libmpx with Intel CET
libmpx/
	* Makefile.in: Regenerate.
	* acinclude.m4: Add enable.m4 and cet.m4.
	* configure: Regenerate.
	* configure.ac: Set CET_FLAGS. Update XCFLAGS.
	* mpxrt/Makefile.am: Update libmpx_la_CFLAGS.
	* mpxrt/Makefile.in: Regenerate.
	* mpxwrap/Makefile.am: Add AM_CFLAGS. Update
	libmpxwrappers_la_CFLAGS.
	* mpxwrap/Makefile.in: Regenerate.

From-SVN: r254900
2017-11-17 23:41:10 +01:00
Igor Tsimbalist
fda26abecc Enable building libquadmath with Intel CET
libquadmath/
	* Makefile.am: Update AM_CFLAGS.
	* Makefile.in: Regenerate:
	* acinclude.m4: Add enable.m4 and cet.m4.
	* configure: Regenerate.
	* configure.ac: Set CET_FLAGS. Update XCFLAGS.

From-SVN: r254899
2017-11-17 23:36:50 +01:00
Igor Tsimbalist
ff035ef673 Enable building libssp with Intel CET
libssp/
	* Makefile.am: Update AM_CFLAGS, update
	libssp_nonshared_la_CFLAGS.
	* Makefile.in: Regenerate.
	* configure: Likewise.
	* aclocal.m4: Likewise.
	* configure.ac: Set CET_FLAGS. Update XCFLAGS.

From-SVN: r254898
2017-11-17 23:32:46 +01:00
Igor Tsimbalist
8e2fc0551b Enable building libvtv with Intel CET
libvtv/
	* acinclude.m4: Add enable.m4 and cet.m4.
	* Makefile.in: Regenerate.
	* testsuite/Makefile.in: Likewise.
	* configure: Likewise.
	* configure.ac: Set CET_FLAGS. Update XCFLAGS.
	* testsuite/libvtv.cc/vtv.exp: Add scanlang.exp.

From-SVN: r254897
2017-11-17 23:29:19 +01:00