Commit Graph

149210 Commits

Author SHA1 Message Date
Ian Lance Taylor 6b752cfac4 runtime: rewrite interface code into Go
I started to copy the Go 1.7 interface code, but the gc and gccgo
    representations of interfaces are too different.  So instead I rewrote
    the gccgo interface code from C to Go.  The code is largely the same as
    it was, but the names are more like those used in the gc runtime.
    
    I also copied over the string comparison functions, and tweaked the
    compiler to use eqstring when comparing strings for equality.
    
    Reviewed-on: https://go-review.googlesource.com/31591

From-SVN: r241384
2016-10-20 18:51:35 +00:00
Jakub Jelinek fceabe505c * g++.dg/cpp1z/inline-var1.C (w): Initialize to 64 + 2.
From-SVN: r241383
2016-10-20 20:37:40 +02:00
Jakub Jelinek 8e92bce9f7 * doc/gty.texi (for_user): Use @item next to @findex.
From-SVN: r241382
2016-10-20 20:34:31 +02:00
Uros Bizjak f56ea76ecb re PR target/78037 (Incorrect code generated at optimization level -O2 for tzcnt and binary and)
PR target/78037
	* config/i386/bmiintrin.h (__tzcnt_u16): Call __builtin_ia32_tzcnt_u16.
	(__tzcnt_u32, _tzcnt_u32): Call __builtin_ia32_tzcnt_u32.
	(__tzcnt_u64, _tzcnt_u64): Call __builtin_ia32_tzcnt_u64.
	* config/i386/lzcntintrin.h (__lzcnt_u16): Call
	__builtin_ia32_lzcnt_u16.
	(__lzcnt_u32, _lzcnt_u32): Call __builtin_ia32_lzcnt_u32.
	(__lzcnt_u64, _lzcnt_u64): Call __builtin_ia32_lzcnt_u64.
	* config/i386/i386.md (UNSPEC_LZCNT, UNSPEC_TZCNT): New unspecs.
	(ctz<mode>2, *ctz<mode>2): Use SWI48 mode iterator.
	(bmi_tzcnt_<mode>): New expander.
	(*bmi_tzcnt_<mode>_falsedep_1): New define_insn_and_split pattern.
	(*bmi_tzcnt_<mode>_falsedep, *bmi_tzcnt_<mode>): New insn patterns.
	(clz<mode>2_lzcnt, *clz<mode>2_lzcnt): Use SWI48 mode iterator.
	(lzcnt_<mode>): New expander.
	(*lzcnt_<mode>_falsedep_1): New define_insn_and_split pattern.
	(*lzcnt_<mode>_falsedep, *lzcnt_<mode>): New insn patterns.
	* config/i386/i386-builtin-types.def (UINT_FTYPE_UINT): New.
	(UINT64_FTYPE_UINT64): New.
	* config/i386/i386-builtin.def (__builtin_clzs): Remove description.
	(__builtin_ia32_lzcnt_u16): New description.
	(__builtin_ia32_lzcnt_u32): Ditto.
	(__builtin_ia32_lzcnt_u64): Ditto.
	(__builtin_ctzs): Remove description.
	(__builtin_ia32_tzcnt_u16): New description.
	(__builtin_ia32_tzcnt_u32): Ditto.
	(__builtin_ia32_tzcnt_u64): Ditto.
	* config/i386/i386.c (ix86_expand_args_builtin): Handle
	UINT_FTYPE_UINT and UINT64_FTYPE_UINT64.

testsuite/ChangeLog:

	PR target/78037
	* gcc.target/i386/pr78037.c: New test.

From-SVN: r241381
2016-10-20 19:53:10 +02:00
Martin Liska 3e23d1bcc4 Do not fixup edges for a thunk in LTRANS (PR lto/78049)
PR lto/78049
	* lto-streamer-in.c (fixup_call_stmt_edges_1): Replace value
	comparison with STMT_UID_NOT_IN_RANGE.
	(fixup_call_stmt_edges): Do not fixup edges of a thunk in
	LTRANS.

From-SVN: r241380
2016-10-20 15:30:17 +00:00
Eric Botcazou 2c35bbe14a compare-elim.c (conforming_compare): Accept UNSPECs.
* compare-elim.c (conforming_compare): Accept UNSPECs.
	(find_comparison_dom_walker::before_dom_children): Deal with
	instructions both using and killing the flags register.
	(equivalent_reg_at_start): New function extracted from...
	(try_eliminate_compare): ...here.  Use it and add support for
	registers and UNSPECs as second operand of the compare.
	* config/visium/visium-modes.def (CCV): New.
	* config/visium/predicates.md (visium_v_comparison_operator): New.
	(visium_branch_operator): Deal with CCV mode.
	* config/visium/visium.c (visium_select_cc_mode): Likewise.
	(output_cbranch): Likewise.
	* config/visium/visium.md (UNSPEC_{ADD,SUB,NEG}V): New constants.
	(uaddv<mode>4): New expander.
	(addv<mode>4): Likewise.
	(add<mode>3_insn_set_carry): New instruction.
	(add<mode>3_insn_set_overflow): Likewise.
	(addsi3_insn_set_overflow): Likewise.
	(usubv<mode>4): New expander.
	(subv<mode>4): Likewise.
	(sub<mode>3_insn_set_carry): New instruction.
	(sub<mode>3_insn_set_overflow): Likewise.
	(subsi3_insn_set_overflow): Likewise.
	(unegv<mode>3): New expander.
	(negv<mode>3): Likewise.
	(neg<mode>2_insn_set_overflow): New instruction.
	(addv_tst<mode>): Likewise.
	(subv_tst<mode>): Likewise.
	(negv_tst<mode>): Likewise.
	(cbranch<mode>4_addv_insn): New splitter and instruction.
	(cbranch<mode>4_subv_insn): Likewise.
	(cbranch<mode>4_negv_insn): Likewise.

From-SVN: r241379
2016-10-20 14:38:43 +00:00
Richard Biener 40b8428e2e tree-ssa-alias.c (ptrs_compare_unequal): Remove code duplication.
2016-10-20  Richard Biener  <rguenther@suse.de>

	* tree-ssa-alias.c (ptrs_compare_unequal): Remove code duplication.
	Handle decls possibly not bound.
	* tree-ssa-structalias.c (get_constraint_for_ssa_var): Add
	nothing_id for decls that might not be bound if we are interested
	for the address.
	(get_constraint_for_component_ref): Deal with that.

From-SVN: r241378
2016-10-20 14:14:47 +00:00
Bernd Edlinger eff89e01b8 c-common.c (c_common_truthvalue_conversion): Fix the comment.
2016-10-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * c-common.c (c_common_truthvalue_conversion): Fix the comment.

From-SVN: r241377
2016-10-20 14:00:46 +00:00
Jason Merrill 24bc7bf417 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
From-SVN: r241376
2016-10-20 09:49:28 -04:00
Jason Merrill 916de0338d * g++.dg/cpp1z/aligned-new7.C: Fix for small MAX_STACK_ALIGNMENT targets.
From-SVN: r241375
2016-10-20 09:47:25 -04:00
Michael Matz 28df87300a loop splitting
(approved at https://gcc.gnu.org/ml/gcc-patches/2015-12/msg00648.html )

	* common.opt (-fsplit-loops): New flag.
	* passes.def (pass_loop_split): Add.
	* opts.c (default_options_table): Add OPT_fsplit_loops entry at -O3.
	(enable_fdo_optimizations): Add loop splitting.
	* timevar.def (TV_LOOP_SPLIT): Add.
	* tree-pass.h (make_pass_loop_split): Declare.
	* tree-ssa-loop-manip.h (rewrite_into_loop_closed_ssa_1): Declare.
	* tree-ssa-loop-unswitch.c: Include tree-ssa-loop-manip.h,
	* tree-ssa-loop-split.c: New file.
	* Makefile.in (OBJS): Add tree-ssa-loop-split.o.
	* doc/invoke.texi (fsplit-loops): Document.
	* doc/passes.texi (Loop optimization): Add paragraph about loop
	splitting.

testsuite/
	* gcc.dg/loop-split.c: New test.
	* gcc.dg/tree-ssa/ifc-9.c: Update.
	* gcc.dg/tree-ssa/ifc-10.c: Update.

From-SVN: r241374
2016-10-20 12:18:32 +00:00
Jonathan Wakely a2e0054e1d Prepare shared_ptr for array support
* include/backward/auto_ptr.h (__shared_ptr(auto_ptr&&))
	(shared_ptr(auto_ptr&&)): Adjust template parameter lists.
	* include/bits/shared_ptr.h (__sp_compatible_with)
	(__sp_is_constructible): New helper traits for shared_ptr.
	(shared_ptr::_Convertible): Replace with _Constructible.
	(shared_ptr::_Constructible, shared_ptr::_Assignable): Forward checks
	to base class.
	(shared_ptr::shared_ptr, shared_ptr::operator=): Constrain template
	with _Constructible and _Assignable.
	(shared_ptr::shared_ptr(shared_ptr<_Tp1>, _Tp*)): Use element_type
	instead of _Tp.
	(operator<): Likewise.
	(operator>): Define in terms of operator<.
	(static_pointer_cast, const_pointer_cast, dynamic_pointer_cast): Use
	element_type instead of _Tp.
	(reinterpret_pointer_cast): Define for C++17.
	(weak_ptr::_Convertible): Replace with _Constructible.
	(weak_ptr::_Constructible, weak_ptr::_Assignable): Forward checks
	to base class.
	(weak_ptr::weak_ptr, weak_ptr::operator=): Constrain templates
	with _Constructible and _Assignable.
	* include/bits/shared_ptr_base.h (__shared_ptr::_Convertible): Replace
	with _Compatible.
	(__shared_ptr::_SafeConv): New constraint for incoming raw pointers.
	(__shared_ptr::_Compatible): New constraint for converting from
	other types of shared_ptr and weak_ptr.
	(__shared_ptr::_Assignable): Define in terms of _Compatible.
	(__shared_ptr::_UniqCompatible, __shared_ptr::_UniqAssignable): New
	constraints for converting from unique_ptr.
	(__shared_ptr::__shared_ptr, __shared_ptr::operator=): Constrain
	template with _SaveConf, _Compatible and _Assignable. Remove
	__glibcxx_function_requires concept checks. Add static assertion for
	deleter expression being well-formed.
	(__shared_ptr::__shared_ptr(__shared_ptr<_Tp1>, _Tp*))
	(__shared_ptr::operator*, __shared_ptr::operator->)
	(__shared_ptr::get, __shared_ptr::_M_ptr): Use element_type instead
	of _Tp.
	(operator<): Likewise.
	(operator>): Define in terms of operator<.
	(static_pointer_cast, const_pointer_cast, dynamic_pointer_cast): Use
	element_type instead of _Tp.
	(reinterpret_pointer_cast): Define for C++17.
	(weak_ptr::_Convertible): Replace with _Compatible.
	(weak_ptr::_Compatible, weak_ptr::_Assignable): New constraints for
	conversions from other types of weak_ptr and shared_ptr.
	(__weak_ptr::__weak_ptr, __weak_ptr::operator=): Constrain templates
	with _Constructible and _Assignable.
	(__weak_ptr::_M_ptr): Use element_type instead of _Tp.
	* testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Adjust
	dg-error pattern.
	* testsuite/20_util/shared_ptr/cons/auto_ptr.cc: Test conversions.
	* testsuite/20_util/shared_ptr/cons/unique_ptr.cc: Likewise.
	* testsuite/20_util/shared_ptr/cons/void_neg.cc: Likewise.
	* testsuite/20_util/shared_ptr/casts/reinterpret.cc: New test.

From-SVN: r241373
2016-10-20 13:07:45 +01:00
Ville Voutilainen f320e6a091 Do the operator= SFINAE in the return type for optional,
not in the template parameters.
* include/std/optional (operator=(_Up&&)): Move SFINAE
from template parameters to the return type.
(operator=(const optional<_Up>&)): Likewise.
(operator=(optional<_Up>&&)): Likewise.

From-SVN: r241372
2016-10-20 14:54:52 +03:00
Jonathan Wakely 88b3e63150 Tweak whitespace in std::allocator files
* include/bits/allocator.h: Remove trailing whitespace, tab-indent.
	* include/ext/new_allocator.h: Likewise.

From-SVN: r241371
2016-10-20 12:37:19 +01:00
Nicolas Roche 2e20345f13 Makefile (x86-64/Linux): Restore missing pairs.
* gcc-interface/Makefile (x86-64/Linux): Restore missing pairs.
	(x86/Darwin): Likewise.

From-SVN: r241369
2016-10-20 11:06:21 +00:00
Andre Vehreschild 40cc684dce class.c (gfc_build_class_symbol): Set the kind of _len to gfc_charlen_int_kind to catch changes of the charlen kind.
gcc/fortran/ChangeLog:

2016-10-20  Andre Vehreschild  <vehre@gcc.gnu.org>

	* class.c (gfc_build_class_symbol): Set the kind of _len to
	gfc_charlen_int_kind to catch changes of the charlen kind.

From-SVN: r241367
2016-10-20 12:50:27 +02:00
Richard Biener 6c1a9e41d9 pr35356-1.c: Update.
2016-10-20  Richard Biener  <rguenther@suse.de>

	* gcc.dg/graphite/pr35356-1.c: Update.

From-SVN: r241366
2016-10-20 10:43:39 +00:00
Jonathan Wakely 1d6360c85b PR78052 Define std::allocator<void>::{construct,destroy}
PR libstdc++/78052
	* include/bits/allocator.h (allocator<void>::construct)
	(allocator<void>::destroy): Define.
	* testsuite/20_util/allocator/void.cc: New test.

From-SVN: r241365
2016-10-20 11:13:10 +01:00
Jonathan Wakely 4f63d614fa Add more tests for enable_shared_from_this ambiguities
* testsuite/20_util/enable_shared_from_this/56383.cc: Add tests for
	additional ambiguous cases.

From-SVN: r241364
2016-10-20 11:13:04 +01:00
Richard Biener 775669c1eb cgraphunit.c (analyze_functions): Set node->definition to false to signal symbol removal to...
2016-10-20  Richard Biener  <rguenther@suse.de>

	* cgraphunit.c (analyze_functions): Set node->definition to
	false to signal symbol removal to debug_hooks->late_global_decl.
	* ipa.c (symbol_table::remove_unreachable_nodes): When not in
	WPA signal symbol removal to the debuginfo machinery.
	* dwarf2out.c (dwarf2out_late_global_decl): Instead of
	using early_finised to guard the we're called for symbol
	removal case look at the symtabs definition flag.
	(gen_variable_die): Remove redundant check.

From-SVN: r241363
2016-10-20 08:49:48 +00:00
Andreas Krebbel a65593a4b4 S/390: Add fallthrough comment in md file.
gcc/ChangeLog:

2016-10-20  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* config/s390/s390.md ("prefetch"): Add fallthrough comment.

From-SVN: r241362
2016-10-20 08:43:50 +00:00
Paolo Carlini a2923dbadb re PR c++/77446 (Suspicious "non-constant condition for static assertion" error)
2016-10-20  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/77446
	* g++.dg/cpp1y/pr77446.C: New.

From-SVN: r241361
2016-10-20 08:15:49 +00:00
Prathamesh Kulkarni 2066ef6ac8 re PR tree-optimization/53979 (((a ^ b) | a) not optimized to (a | b))
2016-10-20  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>

	PR tree-optimization/53979
	* match.pd ((a ^ b) | a -> a | b): New pattern.

testsuite/
	* gcc.dg/pr53979-1.c: New test-case.
	* gcc.dg/pr53979-2.c: Likewise.

From-SVN: r241360
2016-10-20 07:55:28 +00:00
GCC Administrator d480863abb Daily bump.
From-SVN: r241359
2016-10-20 00:16:24 +00:00
John David Anglin 4c6d7494fc pa64-hpux-lib.h: New file.
libgcc/
	* config/pa/pa64-hpux-lib.h: New file.  
	(EH_FRAME_SECTION_NAME): Rename to __LIBGCC_EH_FRAME_SECTION_NAME__.
	(DTORS_SECTION_ASM_OP): Rename to __LIBGCC_DTORS_SECTION_ASM_OP__.
	* config.host (tm_file): Add pa/pa64-hpux-lib.h to tm_file on
	hppa*64*-*-hpux11*.
gcc/
	* config/pa/pa64-hpux.h (PA_INIT_FRAME_DUMMY_ASM_OP): Move to
	config/pa/pa64-hpux-lib.h.
	(PA_CRTBEGIN_HACK): Likewise.
	(DTOR_LIST_BEGIN): Likewise.

From-SVN: r241356
2016-10-19 22:52:21 +00:00
Bernd Edlinger 4c71237418 c-common.c (c_common_truthvalue_conversion): Warn only for signed integer shift ops in boolean context.
2016-10-19  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * c-common.c (c_common_truthvalue_conversion): Warn only for signed
        integer shift ops in boolean context.

testsuite:
2016-10-19  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * c-c++-common/Wint-in-bool-context-2.c: New test.

From-SVN: r241354
2016-10-19 21:00:39 +00:00
Jonathan Wakely f3070dab7a Make std::enable_shared_from_this cope with ambiguity
* include/backward/auto_ptr.h (__shared_ptr(auto_ptr&&)): Call
	_M_enable_shared_from_this_with instead of
	__enable_shared_from_this_helper.
	* include/bits/shared_ptr.h (__enable_shared_from_this_helper):
	Remove overload for std::enable_shared_from_this..
	(__enable_shared_from_this_base): Define friend function to select a
	std::enable_shared_from_this base class.
	* include/bits/shared_ptr_base.h (__enable_shared_from_this_helper):
	Remove all overloads.
	(__shared_ptr): Change all relevant constructors to call
	_M_enable_shared_from_this_with instead of
	__enable_shared_from_this_helper.
	(__shared_ptr::__efst_base_t, __shared_ptr::__has_efst_base): Helpers
	to detect accessible and unambiguous enable_shared_from_this bases.
	(__shared_ptr::_M_enable_shared_from_this_with): New function to
	replace __enable_shared_from_this_helper overloads.
	(__enable_shared_from_this_helper): Remove overload for
	std::__enable_shared_from_this.
	(__enable_shared_from_this_base): Define friend function to select a
	std::__enable_shared_from_this base class.
	* include/experimental/bits/shared_ptr.h (experimental::shared_ptr):
	Change relevant constructors to call _M_enable_shared_from_this_with.
	(experimental::shared_ptr::__efst_base_t)
	(experimental::shared_ptr::__has_efst_base): Helpers to detect
	accessible and unambiguous enable_shared_from_this bases.
	(experimental::shared_ptr::_M_enable_shared_from_this_with): Define.
	(experimental::__enable_shared_from_this_helper): Remove overload for
	std::experimental::enable_shared_from_this.
	(experimental::__expt_enable_shared_from_this_base): Define friend
	function to select a std::experimental::enable_shared_from_this base.
	* testsuite/experimental/memory/shared_ptr/cons/
	enable_shared_from_this.cc: New test.
	* testsuite/experimental/memory/shared_ptr/cons/unique_ptr_ctor.cc:
	Adjust expected behaviour for shared_ptr<A[]>.

From-SVN: r241353
2016-10-19 21:13:14 +01:00
Jerry DeLisle bdcf8e7c55 dtio_17.f90: Fix test.
2016-10-19  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	* gfortran.dg/dtio_17.f90: Fix test.

From-SVN: r241352
2016-10-19 19:23:06 +00:00
Aldy Hernandez ec1748d461 Walloca-1.c: Adjust test for !lp64 targets.
* gcc.dg/Walloca-1.c: Adjust test for !lp64 targets.
	* gcc.dg/Walloca-2.c: Same.

From-SVN: r241351
2016-10-19 18:41:36 +00:00
Jonathan Wakely 36e2520b47 Fix copy&paste error in __gnu_debug::vector
* include/debug/vector (__gnu_debug::vector::emplace_back): Fix return
	type.

From-SVN: r241350
2016-10-19 19:33:47 +01:00
Jonathan Wakely 181f50b626 Fix incorrect comment about std::auto_ptr
* include/backward/auto_ptr.h (dauto_ptr): Correct comment about
	conversions from auto_ptr<Derived> rvalues to auto_ptr<Base>.
	* testsuite/20_util/auto_ptr/assign_neg.cc: Remove redundant dg-error
	directives that only match notes, not errors.

From-SVN: r241349
2016-10-19 19:18:43 +01:00
Bernd Edlinger c6cc81d613 arm.c (arm_emit_coreregs_64bit_shift): Clear the result register only if "in" and "out" are different registers.
2016-10-19  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * config/arm/arm.c (arm_emit_coreregs_64bit_shift): Clear the result
        register only if "in" and "out" are different registers.

From-SVN: r241348
2016-10-19 17:02:30 +00:00
Ian Lance Taylor 29849c91e4 runtime, syscall: force EPOLLET to be positive
The C definition is 1U << 31.  Reportedly on some systems GCC's
    -fgo-dump-spec can print this as -2147483648.
    
    Reviewed-on: https://go-review.googlesource.com/31448

From-SVN: r241347
2016-10-19 16:53:13 +00:00
Aldy Hernandez b70f0b0cc3 Wvla-1.c: Rename to...
* gcc.dg/Wvla-1.c: Rename to...
	* gcc.dg/Wvla-larger-than-1.c: ...this.
	* gcc.dg/Wvla-2.c: Rename to...
	* gcc.dg/Wvla-larger-than-2.c: ...this.
	* gcc.dg/Wvla-3.c: Rename to...
	* gcc.dg/Walloca-11.c.: ...this.
	* gcc.dg/wvla-[1-7].c: Rename to:
	* gcc.dg/Wvla-[1-7].c: ...this.

From-SVN: r241344
2016-10-19 13:52:43 +00:00
Eric Botcazou 346a966edf omp-low.c (pass_oacc_device_lower::gate): New method.
* omp-low.c (pass_oacc_device_lower::gate): New method.
	(execute): Always call execute_oacc_device_lower.

From-SVN: r241343
2016-10-19 13:38:24 +00:00
Bill Schmidt 6e3d8cb41d re PR tree-optimization/77916 (ICE in verify_gimple_in_cfg: invalid (pointer) operands to plus/minus)
2016-10-19  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR tree-optimization/77916
	PR tree-optimization/77937
	* gimple-ssa-strength-reduction.c (analyze_increments): Remove
	stopgap fix.
	(insert_initializers): Requirement of initializer for -1 should be
	based on pointer-typedness of the candidate basis.

From-SVN: r241342
2016-10-19 13:35:14 +00:00
Jonathan Wakely a04df2babb Test experimental::shared_ptr construction from other smart pointers
* testsuite/experimental/memory/shared_ptr/cons/unique_ptr_ctor.cc:
	Add tests for valid and invalid conversions.
	* testsuite/experimental/memory/shared_ptr/cons/weak_ptr_ctor.cc:
	Likewise.

From-SVN: r241340
2016-10-19 12:57:22 +01:00
Bin Cheng cbb22e6143 re PR tree-optimization/78005 (172.mgrid and 450.soplex miscompare)
PR tree-optimization/78005
	* tree-vect-loop-manip.c (vect_gen_prolog_loop_niters): Compute
	upper (included) bound for niters of prolog loop.
	(vect_gen_scalar_loop_niters): Change parameter VF to VFM1.
	Compute niters of scalar loop above which vectorized loop is
	preferred, as well as the upper (included) bound for the niters.
	(vect_do_peeling): Record niter bound for loops accordingly.

	gcc/testsuite
	PR tree-optimization/78005
	* gcc.dg/vect/pr78005.c: New.
	* gcc.target/i386/l_fma_float_1.c: Revise test.
	* gcc.target/i386/l_fma_float_2.c: Ditto.
	* gcc.target/i386/l_fma_float_3.c: Ditto.
	* gcc.target/i386/l_fma_float_4.c: Ditto.
	* gcc.target/i386/l_fma_float_5.c: Ditto.
	* gcc.target/i386/l_fma_float_6.c: Ditto.
	* gcc.target/i386/l_fma_double_1.c: Ditto.
	* gcc.target/i386/l_fma_double_2.c: Ditto.
	* gcc.target/i386/l_fma_double_3.c: Ditto.
	* gcc.target/i386/l_fma_double_4.c: Ditto.
	* gcc.target/i386/l_fma_double_5.c: Ditto.
	* gcc.target/i386/l_fma_double_6.c: Ditto.

From-SVN: r241339
2016-10-19 11:02:23 +00:00
Thomas Schwinge 3b834a2e01 [PR lto/77458] Avoid ICE in offloading with differing _FloatN, _FloatNx types
gcc/
	PR lto/77458
	* tree-core.h (enum tree_index): Put the complex types after their
	component types.
	* tree-streamer.c (verify_common_node_recorded): New function.
	(preload_common_nodes) <TREE_CODE (node) == COMPLEX_TYPE>: Use it.

From-SVN: r241338
2016-10-19 12:48:46 +02:00
Martin Liska aff98801ac Replace NULL with false as a return value
* cgraph.h (cgraph_edge::binds_to_current_def_p):
	Replace NULL with false as a return value.

From-SVN: r241336
2016-10-19 10:30:36 +00:00
Thomas Schwinge a023f8c8dc [PR tree-optimization/78024] Clear basic block flags before using BB_VISITED for OpenACC loops processing
gcc/
	* omp-low.c (oacc_loop_discovery): Call clear_bb_flags before, and
	don't clear BB_VISITED after processing.

	gcc/testsuite/
	* gcc.dg/goacc/loop-processing-1.c: New file.

From-SVN: r241334
2016-10-19 12:19:24 +02:00
Jonathan Wakely d40627f933 Move negative unique_ptr tests to new file
* testsuite/20_util/unique_ptr/cons/cv_qual.cc: Move negative tests
	to new file.
	* testsuite/20_util/unique_ptr/cons/cv_qual_neg.cc: New file.  Fix
	test for incompatible deleters to not also use incompatible types.
	Add tests for incompatible array types.

From-SVN: r241332
2016-10-19 11:10:54 +01:00
Jonathan Wakely 84870b6bb2 Fix std::experimental::shared_ptr SFINAE constraints
* include/experimental/bits/shared_ptr.h
	(__shared_ptr<__libfund_v1<_Tp, false>, _Lp>::_Compatible): Just use
	is_convertible for non-array specialization.
	(__shared_ptr<__libfund_v1<_Tp, false>, _Lp>::_UniqCompatible): New
	constraint for conversions from unique_ptr.
	(__shared_ptr<__libfund_v1<_Tp, false>, _Lp>::__shared_ptr): Constrain.
	(__shared_ptr<__libfund_v1<_Tp, false>, _Lp>::reset): Likewise.
	(__sp_compatible_v): New variable template for trait.
	(__sp_is_constructible): New trait to check shared_ptr constraints.
	(__sp_is_constructible_v): New variable template for trait.
	(__shared_ptr<__libfund_v1<_Tp, true>, _Lp>::_SafeConv): New
	constraint for construction/reset, using __sp_is_constructible_v.
	(__shared_ptr<__libfund_v1<_Tp, true>, _Lp>::_UniqCompatible): New
	constraint for conversions from unique_ptr.
	(__shared_ptr<__libfund_v1<_Tp, true>, _Lp>::__shared_ptr): Constrain.
	(__shared_ptr<__libfund_v1<_Tp, true>, _Lp>::reset): Likewise.
	(shared_ptr::_SafeConv): Constraint for checking constructors.
	(shared_ptr(Tp1*), shared_ptr(_Tp1, _Deleter))
	(shared_ptr(_Tp1, _Deleter, _Alloc)): Constrain with _SafeConv.
	(shared_ptr(const weak_ptr<_Tp1>&)): Constrain with _Compatible.
	(shared_ptr(auto_ptr<_Tp1>&&)): Fix, remove TODO.
	* testsuite/experimental/memory/shared_ptr/cons/pointer_ctor.cc:
	Remove tests using invalid conversions.
	* testsuite/experimental/memory/shared_ptr/cons/pointer_ctor_neg.cc:
	New test.
	* testsuite/experimental/memory/shared_ptr/cons/torture.cc: New test.
	* testsuite/experimental/memory/shared_ptr/modifiers/reset.cc: Remove
	tests using invalid conversions.
	* testsuite/experimental/memory/shared_ptr/modifiers/reset_neg.cc: New
	test.
	* testsuite/experimental/memory/shared_ptr/observers/use_count.cc:
	Remove tests using invalid conversions.

From-SVN: r241331
2016-10-19 10:35:03 +01:00
Jonathan Wakely e182393e31 PR77990 refactor unique_ptr to encapsulate tuple
PR libstdc++/77990
	* include/bits/unique_ptr.h (__uniq_ptr_impl): New type to
	encapsulate implementation details.
	(unique_ptr::unique_ptr(_Up)): Don't copy deleter object.
	(unique_ptr::get, unique_ptr::get_deleter, unique_ptr::release):
	Call member functions of implementation object.
	(unique_ptr<T[], D>): Likewise.
	* python/libstdcxx/v6/printers.py (UniquePointerPrinter): Adjust for
	new implementation.
	* python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker): Likewise.
	* testsuite/20_util/unique_ptr/assign/48635_neg.cc: Adjust dg-error
	lines.
	* testsuite/20_util/unique_ptr/assign/cv_qual.cc: Likewise.
	* testsuite/20_util/unique_ptr/cons/cv_qual.cc: Likewise.
	* testsuite/20_util/unique_ptr/cons/77990.cc: New test.

From-SVN: r241330
2016-10-19 10:34:57 +01:00
Richard Biener e7a3e0c653 domwalk.c (dom_walker::walk): Use RPO order.
2016-10-19  Richard Biener  <rguenther@suse.de>

	* domwalk.c (dom_walker::walk): Use RPO order.

From-SVN: r241329
2016-10-19 08:39:55 +00:00
Eric Botcazou 1af000e003 system-linux-armel.ads: Rename into...
* system-linux-armel.ads: Rename into...
	* system-linux-arm.ads: ...this
	* gcc-interface/Makefile.in (ARM/Android): Adjust to above renaming.
	(ARM/Linux): Likewise.
	(Aarch64/Linux): Likewise.

From-SVN: r241328
2016-10-19 08:05:36 +00:00
Richard Biener d9700bdb89 tree-vrp.c (evrp_dom_walker::evrp_dom_walker): Initialize stmts_to_remove.
2016-10-19  Richard Biener  <rguenther@suse.de>

	* tree-vrp.c (evrp_dom_walker::evrp_dom_walker): Initialize
	stmts_to_remove.
	(evrp_dom_walker::~evrp_dom_walker): Free it.
	(evrp_dom_walker::stmts_to_remove): Add.
	(evrp_dom_walker::before_dom_children): Mark PHIs and stmts
	whose output we fully propagate for removal.  Propagate
	into BB destination PHI arguments.
	(execute_early_vrp): Remove queued stmts.  Dump value ranges
	before stmt removal.

	* gcc.dg/tree-ssa/pr61839_2.c: Fix testcase.

From-SVN: r241327
2016-10-19 07:42:19 +00:00
GCC Administrator ae4206cb7c Daily bump.
From-SVN: r241326
2016-10-19 00:16:16 +00:00
David Edelsohn 7fc6e2c6fd Fix formatting.
From-SVN: r241322
2016-10-18 19:37:07 -04:00
Aldy Hernandez adc577c558 Makefile.in (OBJS): Add gimple-ssa-warn-alloca.o.
* Makefile.in (OBJS): Add gimple-ssa-warn-alloca.o.
	* passes.def: Add two instances of pass_walloca.
	* tree-pass.h (make_pass_walloca): New.
	* gimple-ssa-warn-walloca.c: New file.
	* doc/invoke.texi: Document -Walloca, -Walloca-larger-than=, and
	-Wvla-larger-than= options.

From-SVN: r241318
2016-10-18 21:40:58 +00:00