aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-10-21i386.c (ix86_fold_builtin): Handle IX86_BUILTIN_INFQ and ↵Uros Bizjak2-18/+15
IX86_BUILTIN_HUGE_VALQ here ... * config/i386/i386.c (ix86_fold_builtin): Handle IX86_BUILTIN_INFQ and IX86_BUILTIN_HUGE_VALQ here ... (ix86_expand_builtin): ... not here. From-SVN: r241387
2016-10-20wdate-time.c: Restored test case.Bernd Edlinger3-0/+11
2016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de> * c-c++-common/wdate-time.c: Restored test case. * g++.dg/warn/Wconversion-real.C: Deleted empty file. From-SVN: r241385
2016-10-20runtime: rewrite interface code into GoIan Lance Taylor42-1135/+717
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* g++.dg/cpp1z/inline-var1.C (w): Initialize to 64 + 2.Jakub Jelinek2-1/+5
From-SVN: r241383
2016-10-20* doc/gty.texi (for_user): Use @item next to @findex.Jakub Jelinek2-1/+7
From-SVN: r241382
2016-10-20re PR target/78037 (Incorrect code generated at optimization level -O2 for ↵Uros Bizjak9-28/+226
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-20Do not fixup edges for a thunk in LTRANS (PR lto/78049)Martin Liska2-4/+16
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-20compare-elim.c (conforming_compare): Accept UNSPECs.Eric Botcazou10-61/+543
* 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-20tree-ssa-alias.c (ptrs_compare_unequal): Remove code duplication.Richard Biener3-7/+40
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-20c-common.c (c_common_truthvalue_conversion): Fix the comment.Bernd Edlinger2-1/+5
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* c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.Jason Merrill2-3/+5
From-SVN: r241376
2016-10-20* g++.dg/cpp1z/aligned-new7.C: Fix for small MAX_STACK_ALIGNMENT targets.Jason Merrill1-1/+2
From-SVN: r241375
2016-10-20loop splittingMichael Matz15-3/+884
(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-20Prepare shared_ptr for array supportJonathan Wakely9-198/+453
* 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-20Do the operator= SFINAE in the return type for optional,Ville Voutilainen2-29/+35
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-20Tweak whitespace in std::allocator filesJonathan Wakely3-22/+25
* include/bits/allocator.h: Remove trailing whitespace, tab-indent. * include/ext/new_allocator.h: Likewise. From-SVN: r241371
2016-10-20Makefile (x86-64/Linux): Restore missing pairs.Nicolas Roche2-0/+11
* gcc-interface/Makefile (x86-64/Linux): Restore missing pairs. (x86/Darwin): Likewise. From-SVN: r241369
2016-10-20class.c (gfc_build_class_symbol): Set the kind of _len to ↵Andre Vehreschild2-1/+6
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-20pr35356-1.c: Update.Richard Biener2-1/+5
2016-10-20 Richard Biener <rguenther@suse.de> * gcc.dg/graphite/pr35356-1.c: Update. From-SVN: r241366
2016-10-20PR78052 Define std::allocator<void>::{construct,destroy}Jonathan Wakely3-0/+54
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-20Add more tests for enable_shared_from_this ambiguitiesJonathan Wakely2-20/+54
* testsuite/20_util/enable_shared_from_this/56383.cc: Add tests for additional ambiguous cases. From-SVN: r241364
2016-10-20cgraphunit.c (analyze_functions): Set node->definition to false to signal ↵Richard Biener4-11/+26
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-20S/390: Add fallthrough comment in md file.Andreas Krebbel2-0/+5
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-20re PR c++/77446 (Suspicious "non-constant condition for static assertion" error)Paolo Carlini2-0/+28
2016-10-20 Paolo Carlini <paolo.carlini@oracle.com> PR c++/77446 * g++.dg/cpp1y/pr77446.C: New. From-SVN: r241361
2016-10-20re PR tree-optimization/53979 (((a ^ b) | a) not optimized to (a | b))Prathamesh Kulkarni5-0/+37
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-20Daily bump.GCC Administrator1-1/+1
From-SVN: r241359
2016-10-19pa64-hpux-lib.h: New file.John David Anglin5-90/+124
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-19c-common.c (c_common_truthvalue_conversion): Warn only for signed integer ↵Bernd Edlinger4-3/+36
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-19Make std::enable_shared_from_this cope with ambiguityJonathan Wakely7-78/+191
* 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-19dtio_17.f90: Fix test.Jerry DeLisle2-0/+8
2016-10-19 Jerry DeLisle <jvdelisle@gcc.gnu.org> * gfortran.dg/dtio_17.f90: Fix test. From-SVN: r241352
2016-10-19Walloca-1.c: Adjust test for !lp64 targets.Aldy Hernandez3-4/+15
* gcc.dg/Walloca-1.c: Adjust test for !lp64 targets. * gcc.dg/Walloca-2.c: Same. From-SVN: r241351
2016-10-19Fix copy&paste error in __gnu_debug::vectorJonathan Wakely2-1/+4
* include/debug/vector (__gnu_debug::vector::emplace_back): Fix return type. From-SVN: r241350
2016-10-19Fix incorrect comment about std::auto_ptrJonathan Wakely3-5/+11
* 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-19arm.c (arm_emit_coreregs_64bit_shift): Clear the result register only if ↵Bernd Edlinger2-3/+13
"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-19runtime, syscall: force EPOLLET to be positiveIan Lance Taylor4-2/+16
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-19Wvla-1.c: Rename to...Aldy Hernandez14-115/+126
* 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-19omp-low.c (pass_oacc_device_lower::gate): New method.Eric Botcazou2-5/+7
* omp-low.c (pass_oacc_device_lower::gate): New method. (execute): Always call execute_oacc_device_lower. From-SVN: r241343
2016-10-19re PR tree-optimization/77916 (ICE in verify_gimple_in_cfg: invalid ↵Bill Schmidt2-5/+10
(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-19Test experimental::shared_ptr construction from other smart pointersJonathan Wakely3-5/+66
* 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-19re PR tree-optimization/78005 (172.mgrid and 450.soplex miscompare)Bin Cheng16-90/+166
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[PR lto/77458] Avoid ICE in offloading with differing _FloatN, _FloatNx typesThomas Schwinge3-15/+56
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-19Replace NULL with false as a return valueMartin Liska2-1/+6
* cgraph.h (cgraph_edge::binds_to_current_def_p): Replace NULL with false as a return value. From-SVN: r241336
2016-10-19[PR tree-optimization/78024] Clear basic block flags before using BB_VISITED ↵Thomas Schwinge4-5/+32
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-19Move negative unique_ptr tests to new fileJonathan Wakely3-26/+78
* 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-19Fix std::experimental::shared_ptr SFINAE constraintsJonathan Wakely9-113/+407
* 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-19PR77990 refactor unique_ptr to encapsulate tupleJonathan Wakely7-60/+117
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-19domwalk.c (dom_walker::walk): Use RPO order.Richard Biener2-1/+5
2016-10-19 Richard Biener <rguenther@suse.de> * domwalk.c (dom_walker::walk): Use RPO order. From-SVN: r241329
2016-10-19system-linux-armel.ads: Rename into...Eric Botcazou3-4/+12
* 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-19tree-vrp.c (evrp_dom_walker::evrp_dom_walker): Initialize stmts_to_remove.Richard Biener4-19/+90
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-19Daily bump.GCC Administrator1-1/+1
From-SVN: r241326