Commit Graph

149196 Commits

Author SHA1 Message Date
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
Eric Botcazou c354ab1fb2 Makefile.in (EXTRA_GNATRTL_NONTASKING_OBJS): Define.
* gcc-interface/Makefile.in (EXTRA_GNATRTL_NONTASKING_OBJS): Define.
	(EXTRA_GNATRTL_TASKING_OBJS): Likewise.
	(ARM/Android): Add atomic support.
	(SPARC/Solaris): Simplify.
	(x86/Solaris): Likewise.
	(x86/Linux): Likewise.
	(x86-64/kFreeBDS): Adjust and use system-freebsd-x86.ads
	(x86/FreeBSD): Add s-mudido-affinity.adb.
	(x86-64/FreeBSD): Likewise and use system-freebsd-x86.ads.
	(s390/Linux): Simplify.
	(PowerPC/AIX): Likewise.
	(Cygwin/Mingw): Likewise.
	(MIPSel/Linux): Likewise.
	(ARM/Linux): Add atomic support.
	(Aarch64/Linux): Use system-linux-armel.ads.
	(SPARC/Linux): Simplify.
	(IA-64/Linux): Minor tweak.
	(IA-64/HP-UX): Likewise.
	(Alpha/Linux): Likewise.
	(x86-64/Linux): Use system-linux-x86.ads.
	(x86/Darwin): Simplify.
	(PowerPC/Darwin): Likewise.
	(ARM/Darwin): Use system-darwin-arm.ads.
	(ADA_EXCLUDE_SRCS): Minor reformatting.
	* system-aix.ads (Word_Size): Change to Standard'Word_Size.
	(Memory_Size): Change to 2 ** Word_Size.
	(Support_Atomic_Primitives): Set to True.
	* system-aix64.ads: Delete.
	* system-darwin-arm.ads: New.
	* system-darwin-ppc.ads (Word_Size): Change to Standard'Word_Size.
	(Memory_Size): Change to 2 ** Word_Size.
	(Support_Atomic_Primitives): Set to True.
	* system-darwin-ppc64.ads: New.
	* system-darwin-x86.ads (Word_Size): Change to Standard'Word_Size.
	(Memory_Size): Change to 2 ** Word_Size.
	* system-darwin-x86_64.ads: Delete.
	* system-freebsd-x86.ads (Word_Size): Change to Standard'Word_Size.
	(Memory_Size): Change to 2 ** Word_Size.
	* system-freebsd-x86_64.ads: Delete.
	* system-linux-alpha.ads (Support_Atomic_Primitives): Set to True.
	* system-linux-armeb.ads (Word_Size): Change to Standard'Word_Size.
	(Memory_Size): Change to 2 ** Word_Size.
	(Support_Atomic_Primitives): Set to True.
	* system-linux-armel.ads (Word_Size): Change to Standard'Word_Size.
	(Memory_Size): Change to 2 ** Word_Size.
	(Support_Atomic_Primitives): Set to True.
	* system-linux-mips.ads: (Word_Size): Change to Standard'Word_Size.
	(Memory_Size): Change to 2 ** Word_Size.
	* system-linux-mipsel.ads (Word_Size): Change to Standard'Word_Size.
	(Memory_Size): Change to 2 ** Word_Size.
	* system-linux-s390.ads (Word_Size): Change to Standard'Word_Size.
	(Memory_Size): Change to 2 ** Word_Size.
	(Stack_Check_Probes): Set to True.
	* system-linux-s390x.ads: Delete.
	* system-linux-sparc.ads (Word_Size): Change to Standard'Word_Size.
	(Memory_Size): Change to 2 ** Word_Size.
	* system-linux-sparcv9.ads: Delete.
	* system-linux-x86.ads (Word_Size): Change to Standard'Word_Size.
	(Memory_Size): Change to 2 ** Word_Size.
	* system-linux-x86_64.ads: Delete.
	* system-mingw-x86_64.ads: Delete.
	* system-mingw.ads (Word_Size): Change to Standard'Word_Size.
	(Memory_Size): Change to 2 ** Word_Size.
	* system-solaris-sparc.ads (Word_Size): Change to Standard'Word_Size.
	(Memory_Size): Change to 2 ** Word_Size.
	(Support_Atomic_Primitives): Set to True.
	* system-solaris-sparcv9.ads: Delete.
	* system-solaris-x86.ads (Word_Size): Change to Standard'Word_Size.
	(Memory_Size): Change to 2 ** Word_Size.
	* system-solaris-x86_64.ads: Delete.

From-SVN: r241316
2016-10-18 20:29:53 +00:00
Thomas Schwinge 2300c332eb Use FOR_ALL_BB_FN in a few more places
gcc/
	* cfg.c (clear_bb_flags): Use FOR_ALL_BB_FN.
	* config/nvptx/nvptx.c (nvptx_find_sese): Likewise.

From-SVN: r241315
2016-10-18 21:36:45 +02:00
Kelvin Nilsen 902cb7b191 vec-all-ne-0.c: New test.
gcc/testsuite/ChangeLog:

2016-10-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>

	* gcc.target/powerpc/vsu/vec-all-ne-0.c: New test.
	* gcc.target/powerpc/vsu/vec-all-ne-1.c: New test.
	* gcc.target/powerpc/vsu/vec-all-ne-10.c: New test.
	* gcc.target/powerpc/vsu/vec-all-ne-11.c: New test.
	* gcc.target/powerpc/vsu/vec-all-ne-12.c: New test.
	* gcc.target/powerpc/vsu/vec-all-ne-13.c: New test.
	* gcc.target/powerpc/vsu/vec-all-ne-14.c: New test.
	* gcc.target/powerpc/vsu/vec-all-ne-2.c: New test.
	* gcc.target/powerpc/vsu/vec-all-ne-3.c: New test.
	* gcc.target/powerpc/vsu/vec-all-ne-4.c: New test.
	* gcc.target/powerpc/vsu/vec-all-ne-5.c: New test.
	* gcc.target/powerpc/vsu/vec-all-ne-6.c: New test.
	* gcc.target/powerpc/vsu/vec-all-ne-7.c: New test.
	* gcc.target/powerpc/vsu/vec-all-ne-8.c: New test.
	* gcc.target/powerpc/vsu/vec-all-ne-9.c: New test.
	* gcc.target/powerpc/vsu/vec-all-nez-1.c: New test.
	* gcc.target/powerpc/vsu/vec-all-nez-2.c: New test.
	* gcc.target/powerpc/vsu/vec-all-nez-3.c: New test.
	* gcc.target/powerpc/vsu/vec-all-nez-4.c: New test.
	* gcc.target/powerpc/vsu/vec-all-nez-5.c: New test.
	* gcc.target/powerpc/vsu/vec-all-nez-6.c: New test.
	* gcc.target/powerpc/vsu/vec-all-nez-7.c: New test.
	* gcc.target/powerpc/vsu/vec-any-eq-0.c: New test.
	* gcc.target/powerpc/vsu/vec-any-eq-1.c: New test.
	* gcc.target/powerpc/vsu/vec-any-eq-10.c: New test.
	* gcc.target/powerpc/vsu/vec-any-eq-11.c: New test.
	* gcc.target/powerpc/vsu/vec-any-eq-12.c: New test.
	* gcc.target/powerpc/vsu/vec-any-eq-13.c: New test.
	* gcc.target/powerpc/vsu/vec-any-eq-14.c: New test.
	* gcc.target/powerpc/vsu/vec-any-eq-2.c: New test.
	* gcc.target/powerpc/vsu/vec-any-eq-3.c: New test.
	* gcc.target/powerpc/vsu/vec-any-eq-4.c: New test.
	* gcc.target/powerpc/vsu/vec-any-eq-5.c: New test.
	* gcc.target/powerpc/vsu/vec-any-eq-6.c: New test.
	* gcc.target/powerpc/vsu/vec-any-eq-7.c: New test.
	* gcc.target/powerpc/vsu/vec-any-eq-8.c: New test.
	* gcc.target/powerpc/vsu/vec-any-eq-9.c: New test.
	* gcc.target/powerpc/vsu/vec-any-eqz-1.c: New test.
	* gcc.target/powerpc/vsu/vec-any-eqz-2.c: New test.
	* gcc.target/powerpc/vsu/vec-any-eqz-3.c: New test.
	* gcc.target/powerpc/vsu/vec-any-eqz-4.c: New test.
	* gcc.target/powerpc/vsu/vec-any-eqz-5.c: New test.
	* gcc.target/powerpc/vsu/vec-any-eqz-6.c: New test.
	* gcc.target/powerpc/vsu/vec-any-eqz-7.c: New test.
	* gcc.target/powerpc/vsu/vec-cmpne-0.c: New test.
	* gcc.target/powerpc/vsu/vec-cmpne-1.c: New test.
	* gcc.target/powerpc/vsu/vec-cmpne-2.c: New test.
	* gcc.target/powerpc/vsu/vec-cmpne-3.c: New test.
	* gcc.target/powerpc/vsu/vec-cmpne-4.c: New test.
	* gcc.target/powerpc/vsu/vec-cmpne-5.c: New test.
	* gcc.target/powerpc/vsu/vec-cmpne-6.c: New test.
	* gcc.target/powerpc/vsu/vec-cmpne-8.c: New test.
	* gcc.target/powerpc/vsu/vec-cmpne-9.c: New test.
	* gcc.target/powerpc/vsu/vec-cmpnez-1.c: New test.
	* gcc.target/powerpc/vsu/vec-cmpnez-2.c: New test.
	* gcc.target/powerpc/vsu/vec-cmpnez-3.c: New test.
	* gcc.target/powerpc/vsu/vec-cmpnez-4.c: New test.
	* gcc.target/powerpc/vsu/vec-cmpnez-5.c: New test.
	* gcc.target/powerpc/vsu/vec-cmpnez-6.c: New test.
	* gcc.target/powerpc/vsu/vec-cmpnez-7.c: New test.
	* gcc.target/powerpc/vsu/vec-cntlz-lsbb-0.c: New test.
	* gcc.target/powerpc/vsu/vec-cntlz-lsbb-1.c: New test.
	* gcc.target/powerpc/vsu/vec-cntlz-lsbb-2.c: New test.
	* gcc.target/powerpc/vsu/vec-cnttz-lsbb-0.c: New test.
	* gcc.target/powerpc/vsu/vec-cnttz-lsbb-1.c: New test.
	* gcc.target/powerpc/vsu/vec-cnttz-lsbb-2.c: New test.
	* gcc.target/powerpc/vsu/vec-xl-len-0.c: New test.
	* gcc.target/powerpc/vsu/vec-xl-len-1.c: New test.
	* gcc.target/powerpc/vsu/vec-xl-len-10.c: New test.
	* gcc.target/powerpc/vsu/vec-xl-len-11.c: New test.
	* gcc.target/powerpc/vsu/vec-xl-len-12.c: New test.
	* gcc.target/powerpc/vsu/vec-xl-len-13.c: New test.
	* gcc.target/powerpc/vsu/vec-xl-len-2.c: New test.
	* gcc.target/powerpc/vsu/vec-xl-len-3.c: New test.
	* gcc.target/powerpc/vsu/vec-xl-len-4.c: New test.
	* gcc.target/powerpc/vsu/vec-xl-len-5.c: New test.
	* gcc.target/powerpc/vsu/vec-xl-len-6.c: New test.
	* gcc.target/powerpc/vsu/vec-xl-len-7.c: New test.
	* gcc.target/powerpc/vsu/vec-xl-len-8.c: New test.
	* gcc.target/powerpc/vsu/vec-xl-len-9.c: New test.
	* gcc.target/powerpc/vsu/vec-xlx-0.c: New test.
	* gcc.target/powerpc/vsu/vec-xlx-1.c: New test.
	* gcc.target/powerpc/vsu/vec-xlx-2.c: New test.
	* gcc.target/powerpc/vsu/vec-xlx-3.c: New test.
	* gcc.target/powerpc/vsu/vec-xlx-4.c: New test.
	* gcc.target/powerpc/vsu/vec-xlx-5.c: New test.
	* gcc.target/powerpc/vsu/vec-xlx-6.c: New test.
	* gcc.target/powerpc/vsu/vec-xlx-7.c: New test.
	* gcc.target/powerpc/vsu/vec-xrx-0.c: New test.
	* gcc.target/powerpc/vsu/vec-xrx-1.c: New test.
	* gcc.target/powerpc/vsu/vec-xrx-2.c: New test.
	* gcc.target/powerpc/vsu/vec-xrx-3.c: New test.
	* gcc.target/powerpc/vsu/vec-xrx-4.c: New test.
	* gcc.target/powerpc/vsu/vec-xrx-5.c: New test.
	* gcc.target/powerpc/vsu/vec-xrx-6.c: New test.
	* gcc.target/powerpc/vsu/vec-xrx-7.c: New test.
	* gcc.target/powerpc/vsu/vec-xst-len-0.c: New test.
	* gcc.target/powerpc/vsu/vec-xst-len-1.c: New test.
	* gcc.target/powerpc/vsu/vec-xst-len-10.c: New test.
	* gcc.target/powerpc/vsu/vec-xst-len-11.c: New test.
	* gcc.target/powerpc/vsu/vec-xst-len-12.c: New test.
	* gcc.target/powerpc/vsu/vec-xst-len-13.c: New test.
	* gcc.target/powerpc/vsu/vec-xst-len-2.c: New test.
	* gcc.target/powerpc/vsu/vec-xst-len-3.c: New test.
	* gcc.target/powerpc/vsu/vec-xst-len-4.c: New test.
	* gcc.target/powerpc/vsu/vec-xst-len-5.c: New test.
	* gcc.target/powerpc/vsu/vec-xst-len-6.c: New test.
	* gcc.target/powerpc/vsu/vec-xst-len-7.c: New test.
	* gcc.target/powerpc/vsu/vec-xst-len-8.c: New test.
	* gcc.target/powerpc/vsu/vec-xst-len-9.c: New test.
	* gcc.target/powerpc/vsu/vsu.exp: New file.

gcc/ChangeLog:

2016-10-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>

	* config/rs6000/altivec.h (vec_xl_len): New macro.
	(vec_xst_len): New macro.
	(vec_cmpnez): New macro.
	(vec_cntlz_lsbb): New macro.
	(vec_cnttz_lsbb): New macro.
	(vec_xlx): New macro.
	(vec_xrx): New macro.
	(vec_all_nez): New C++ predicate template.
	(vec_any_eqz): New C++ predicate template.
	(vec_all_ne): Revised C++ predicate template under _ARCH_PWR9
	conditional compilation.
	(vec_any_eq): Revised C++ predicate template under _ARCH_PWR9
	conditional compilation.
	(vec_all_nez): New macro.
	(vec_any_eqz): New macro.
	(vec_all_ne): Revised macro under _ARCH_PWR9 conditional
	compilation.
	(vec_any_eq): Revised macro under _ARCH_PWR9 conditional
	compilation.
	* config/rs6000/vector.md (VI): Moved this mode iterator
	definition from altivec.md to vector.md.
	(UNSPEC_NEZ_P): New value.
	(vector_ne_<mode>_p): New expansion for implementation of
	vec_all_ne and vec_any_eq built-in functions.
	(vector_nez_<mode>_p): New expansion for implementation of
	vec_all_nez and vec_any_eqz built-in functions.
	(vector_ne_v2di_p): New expansion for implementation of vec_all_ne
	and vec_any_eq built-in function.
	(cr6_test_for_zero): New commentary to explain this expansion.
	(cr6_test_for_zero_reverse): New commentary to explain this expansion.
	(cr6_test_for_lt): New commentary to explain this expansion.
	(cr6_test_for_lt_reverse): New commentary to explain this
	expansion.
	* config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
	overloaded function prototypes for vec_all_ne, vec_all_nez,
	vec_any_eq, vec_any_eqz, vec_cmpnez, vec_cntlz_lsbb,
	vec_cnttz_lsbb, vec_xl_len, vec_xst_len, vec_xlx, and vec_xrx
	built-in functions.
	(altivec_resolve_overloaded_builtin): Modify the handling of
	ALTIVEC_BUILTIN_VEC_CMPNE to use the Power9 instructions when
	the compiler is configured to support TARGET_P9_VECTOR.
	* config/rs6000/rs6000-builtin.def (BU_ALTIVEC_P): Add commentary
	to explain the special processing that is given to predicate
	built-ins introduced using this macro.
	(BU_ALTIVEC_OVERLOAD_P): Add commentary to alert maintainers to
	the special processing given to predicate built-ins introduced
	using this macro.
	(BU_VSX_P): Likewise.
	(BU_P8V_AV_P): Likewise.
	(BU_P9V_AV_P): Likewise.
	(BU_P9V_AV_X): New macro.
	(BU_P9V_64BIT_AV_X): New macro.
	(BU_P9V_VSX_3): New macro.
	(BU_P9V_OVERLOAD_P): New macro.
	(LXVL): New BU_P9V_64BIT_VSX_2.
	(VEXTUBLX): New BU_P9V_AV_2.
	(VEXTUBRX): Likewise.
	(VEXTUHLX): Likewise.
	(VEXTUHRX): Likewise.
	(VEXTUWLX): Likewise.
	(VEXTUWRX): Likewise.
	(STXVL): New BU_P9V_64BIT_AV_X.
	(VCLZLSBB): New BU_P9V_AV_1.
	(VCTZLSBB): Likewise.
	(CMPNEB): New BU_P9V_AV_2.
	(CMPNEH): Likewise.
	(CMPNEW): Likewise.
	(CMPNEF): Likewise.
	(CMPNED): Likewise.
	(VCMPNEB_P): New BU_P9V_AV_P.
	(VCMPNEH_P): Likewise.
	(VCMPNEW_P): Likewise.
	(VCMPNED_P): Likewise.
	(VCMPNEFP_P): Likewise.
	(VCMPNEDP_P): Likewise.
	(CMPNEZB): New BU_P9V_AV_2.
	(CMPNEZH): Likewise.
	(CMPNEZW): Likewise.
	(VCMPNEZB_P): New BU_P9V_AV_P.
	(VCMPNEZH_P): Likewise.
	(VCMPNEZW_P): Likewise.
	(LXVL): New BU_P9V_OVERLOAD_2.
	(STXVL): New BU_P9V_OVERLOAD_3.
	(VEXTULX): New BU_P9V_OVERLOAD_2.
	(VEXTURX): Likewise.
	(CMPNEZ): Likewise.
	(VCMPNEZ_P): New BU_P9V_OVERLOAD_P.
	(VCMPNE_P): Likewise.
	(VCLZLSBB): New BU_P9V_OVERLOAD_1.
	(VCTZLSBB): Likewise.
	* config/rs6000/rs6000.c (altivec_expand_predicate_builtin): Add
	comment to explain mode used for scratch register.
	(altivec_expand_stxvl_builtin): New function.
	(altivec_expand_builtin): Add case for new constant P9V_BUILTIN_STXVL.
	(altivec_init_builtins): Add initialized variable
	void_ftype_v16qi_pvoid_long and use this type to define the
	built-in function __builtin_altivec_stxvl.
	* config/rs6000/vsx.md (UNSPEC_LXVL): New value.
	(UNSPEC_STXVL): New value.
	(UNSPEC_VCLZLSBB): New value.
	(UNSPEC_VCTZLSBB): New value.
	(UNSPEC_VEXTUBLX): New value.
	(UNSPEC_VEXTUHLX): New value.
	(UNSPEC_VEXTUWLX): New value.
	(UNSPEC_VEXTUBRX): New value.
	(UNSPEC_VEXTUHRX): New value.
	(UNSPEC_VEXTUWRX): New value.
	(UNSPEC_VCMPNEB): New value.
	(UNSPEC_VCMPNEZB): New value.
	(UNSPEC_VCMPNEH): New value.
	(UNSPEC_VCMPNEZH): New value.
	(UNSPEC_VCMPNEW): New value.
	(UNSPEC_VCMPNEZW): New value.
	(*vsx_ne_<mode>_p): New insn for vector test all not equal with
	vector of integer modes.
	(*vsx_ne_<mode>_p): New insn for vector test all not equal with
	vector of float or double modes.
	(*vector_nez_<mode>_p): New insn for vector test all not equal or
	zero.
	(lxvl): New expand for load VSX vector with length.
	(*lxvl): New insn for load VSX vector with length.
	(stxvl): New expand for store VSX vector with length.
	(*stxvl): New insn for store VSX vector with length.
	(vcmpneb): New insn for vector of byte compare not equal.
	(vcmpnezb): New insn for vector of byte compare not equal or zero.
	(vcmpneh): New insn for vector of half word compare not equal.
	(vcmpnezh): New insn for vector of half word compare not equal or
	zero.
	(vcmpnew): New insn for vector of word compare not equal.
	(vcmpne<VSs>): New insn for vector of float or double compare not
	equal.
	(vcmpnezw): New insn for vector of word compare not equal or zero.
	(vclzlsbb): New insn for vector count leading zero
	least-significant bits byte.
	(vctzlsbb): New insn for vector count trailing zero least
	signficant bits byte.
	(vextublx): New insn for vector extract unsigned byte left
	indexed.
	(vextubrx): New insn for vector extract unsigned byte right
	indexed.
	(vextuhlx): New insn for vector extract unsigned half word left
	indexed.
	(vextuhrx): New insn for vector extract unsigned half word right
	indexed.
	(vextuwlx): New insn for vector extract unsigned word left
	indexed.
	(vextuwrx): New insn for vector extract unsigned word right
	indexed.
	* config/rs6000/rs6000.h (RS6000_BTC_CONST): Enhance comment to
	clarify intent of this constant.
	* config/rs6000/altivec.md (VI): Move this mode iterator to vsx.md.
	* doc/extend.texi (PowerPC Altivec Built-in Functions): Add
	documentation for vec_all_nez, vec_any_eqz, vec_cmpnez,
	vec_cntlz_lsbb, vec_cnttz_lsbb, vec_xl_len, vec_xst_len, vec_xlx,
	and vec_xrx functions.

From-SVN: r241314
2016-10-18 19:31:38 +00:00
Max Filippov 2a26adf1d8 xtensa: don't use unwind-dw2-fde-dip with elf targets
Define LIB2ADDEH_XTENSA_UNWIND_DW2_FDE to unwind-dw2-fde.c in
xtensa/t-elf and to unwind-dw2-fde-dip.c in xtensa/t-linux and use
LIB2ADDEH_XTENSA_UNWIND_DW2_FDE in LIB2ADDEH definition.

This fixes build for elf target with windowed xtensa core that currently
breaks with the following error message:
    
  unwind-dw2-fde-dip.c:36:40: fatal error: elf.h: No such file or directory

2016-10-18  Max Filippov  <jcmvbkbc@gmail.com>
libgcc/
	* config/xtensa/t-elf (LIB2ADDEH_XTENSA_UNWIND_DW2_FDE): New
	definition.
	* config/xtensa/t-linux (LIB2ADDEH_XTENSA_UNWIND_DW2_FDE): New
	definition.
	* config/xtensa/t-windowed (LIB2ADDEH): Use
	LIB2ADDEH_XTENSA_UNWIND_DW2_FDE defined by either xtensa/t-elf
	or xtensa/t-linux.

From-SVN: r241313
2016-10-18 19:12:19 +00:00
Ding-Kai Chen 66192aa129 xtensa: add HW FPU sequences for DIV/SQRT/RECIP/RSQRT
Use new FPU instruction sequences documented in the ISA book to
implement __divsf3, __divdf3, __recipsf2, __recipdf2, __rsqrtsf2,
__rsqrtdf2 and __ieee754_sqrtf and __ieee754_sqrt.

2016-10-18  Ding-Kai Chen  <dkchen@cadence.com>
libgcc/
	* config/xtensa/ieee754-df.S (__recipdf2, __rsqrtdf2,
	__ieee754_sqrt): New functions.
	(__divdf3): Add implementation with new FPU instructions under
	#if XCHAL_HAVE_DFP_DIV.
	* config/xtensa/ieee754-sf.S (__recipsf2, __rsqrtsf2,
	__ieee754_sqrtf): New functions.
	(__divsf3): Add implementation with new FPU instructions under
	#if XCHAL_HAVE_FP_DIV.
	* config/xtensa/t-xtensa (LIB1ASMFUNCS): Add _sqrtf, _recipsf2
	_rsqrtsf2, _sqrt, _recipdf2 and _rsqrtdf2.

From-SVN: r241312
2016-10-18 19:06:33 +00:00
Jonathan Wakely 6dddab0845 Fix indentation of experimental::shared_ptr code
* include/experimental/bits/shared_ptr.h: Fix indentation.

From-SVN: r241311
2016-10-18 19:41:43 +01:00
Jonathan Wakely 8a9ff71f5b Fix typos in experimental::shared_ptr
* include/experimental/bits/shared_ptr.h (shared_ptr(shared_ptr&&)):
	Remove const from parameter.
	(operator<(const shared_ptr<T>&, nullptr_t)): Use correct
	specialization of std::less.
	* testsuite/experimental/memory/shared_ptr/comparison/comparison.cc:
	Test comparison with nullptr and actually call test functions.

From-SVN: r241310
2016-10-18 19:30:38 +01:00
Andrew Pinski e25a366f6f re PR middle-end/65950 (exit in main is causing the path to it to become unlikely.)
2016-10-18  Andrew Pinski  <apinski@cavium.com>

        PR tree-opt/65950
        * predict.c (is_exit_with_zero_arg): New function.
        (tree_bb_level_predictions): Don't consider paths leading to exit(0)
        as nottaken.

From-SVN: r241309
2016-10-18 08:42:21 -07:00
Uros Bizjak 5cb96b6a87 re PR target/77991 (ICE on x32 in plus_constant, at explow.c:87)
PR target/77991
	* config/i386/i386.c (legitimize_tls_address)
	<case TLS_MODEL_INITIAL_EXEC>: For TARGET_64BIT || TARGET_ANY_GNU_TLS
	convert dest to Pmode if different than Pmode.

testsuite/ChangeLog:

	PR target/77991
	* gcc.target/i386/pr77991.c: New test.

From-SVN: r241308
2016-10-18 16:39:39 +02:00
Ian Lance Taylor 812ba636c7 runtime: copy netpoll code from Go 1.7 runtime
Reviewed-on: https://go-review.googlesource.com/31325

From-SVN: r241307
2016-10-18 14:38:29 +00:00
Matthew Fortune f5de494c59 Set gcc_force_conventional_output even without LTO linker plugin
gcc/testsuite/

	* lib/gcc-dg.exp: Set gcc_force_conventional_output whenever
	LTO is used.

Set gcc_force_conventional_output even without LTO linker plugin

From-SVN: r241306
2016-10-18 14:12:58 +00:00
Bill Schmidt c502602151 re PR tree-optimization/77916 (ICE in verify_gimple_in_cfg: invalid (pointer) operands to plus/minus)
2016-10-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR tree-optimization/77916
	* gimple-ssa-strength-reduction.c (analyze_increments): Reinstate
	stopgap fix, as pointers with -1 increment are still broken.

From-SVN: r241305
2016-10-18 13:35:19 +00:00
Ian Lance Taylor 421a8ed412 runtime: scan caller-saved registers for non-split-stack
While testing a patch on Solaris, which does not support split-stack, I
    ran across a bug in the handling of caller-saved registers for the
    garbage collector.  For non-split-stack systems, runtime_mcall is
    responsible for saving all caller-saved registers on the stack so that
    the GC stack scan will see them.  It does this by calling
    __builtin_unwind_init and setting the g's gcnextsp field to point to the
    current stack.  The garbage collector then scans the stack from gcnextsp
    to the top of stack.
    
    Unfortunately, the code was setting gcnextsp to point to runtime_mcall's
    argument, which meant that even though runtime_mcall was careful to
    store all caller-saved registers on the stack, the GC never saw them.
    This is, of course, only a problem if a value lives only in a
    caller-saved register, and not anywhere else on the stack or heap.  And
    it is only a problem if that caller-saved register manages to make it
    all the way down to runtime_mcall without being saved by any function on
    the way.  This is moderately unlikely but it turns out that the recent
    changes to keep values on the stack when compiling the runtime package
    caused it to happen for the local variable `s` in `notifyListWait` in
    runtime/sema.go.  That function calls goparkunlock which is simple
    enough to not require all registers, and itself calls runtime_mcall.  So
    it was possible for `s` to be released by the GC before the goroutine
    returned from goparkunlock, which eventually caused a dangling pointer
    to be passed to releaseSudog.
    
    This is not a problem on split-stack systems, which use
    __splitstack_get_context, which saves a stack pointer low enough on the
    stack to scan the registers saved by runtime_mcall.
    
    Reviewed-on: https://go-review.googlesource.com/31323

From-SVN: r241304
2016-10-18 13:29:37 +00:00
David Edelsohn 1b32951078 rs6000.c (rs6000_output_symbol_ref): Move storage mapping class decoration from here...
* config/rs6000/rs6000.c (rs6000_output_symbol_ref): Move storage
        mapping class decoration from here...
        (rs6000_xcoff_encode_section): ...to here.

        (rs6000_savres_strategy) [AIX,ELFv2]: Inline FPR save and restore
        if shrink-wrapping and optimizing for speed.

From-SVN: r241303
2016-10-18 09:28:16 -04:00