Backport from mainline
2017-08-09 Jonathan Wakely <jwakely@redhat.com>
* include/std/type_traits (_GLIBCXX_NO_BUILTIN_HAS_UNIQ_OBJ_REP):
Replace with _GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP and use
__is_identifier to set it.
From-SVN: r251656
Backport from mainline
2017-08-09 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/79820
PR libstdc++/81751
* config/io/basic_file_stdio.cc (sys_open(FILE*, ios_base::openmode)):
Call fflush on the stream instead of calling sync() while _M_cfile is
null. Restore original value of errno.
* testsuite/ext/stdio_filebuf/char/79820.cc: New.
* testsuite/ext/stdio_filebuf/char/81751.cc: New.
From-SVN: r251090
2017-07-26 Richard Biener <rguenther@suse.de>
Backport from mainline
2017-06-02 Richard Biener <rguenther@suse.de>
Markus Eisenmann <meisenmann.lba@fh-salzburg.ac.at>
PR libstdc++/80721
* libsupc++/eh_alloc.cc (pool::free): Keep list properly
sorted and add missing freelist item merging cases.
2017-06-18 Richard Biener <rguenther@suse.de>
PR tree-optimization/81410
* tree-vect-stmts.c (vectorizable_load): Properly adjust for
the gap in the ! slp_perm SLP case after each group.
* gcc.dg/vect/pr81410.c: New testcase.
2017-07-25 Richard Biener <rguenther@suse.de>
PR tree-optimization/81455
* tree-ssa-loop-unswitch.c (find_loop_guard): Make sure to
not walk in cycles when looking for guards.
* gcc.dg/pr81455.c: New testcase.
2017-07-25 Richard Biener <rguenther@suse.de>
PR middle-end/81505
* fold-const.c (fold_negate_const): TREE_OVERFLOW should be
sticky.
* gcc.dg/ubsan/pr81505.c: New testcase.
2017-07-04 Jakub Jelinek <jakub@redhat.com>
PR target/81175
* gcc.target/i386/pr69255-2.c (foo): Use the return value of the
gather.
2017-06-28 Jakub Jelinek <jakub@redhat.com>
PR target/81175
* config/i386/i386.c (ix86_init_mmx_sse_builtins): Use def_builtin
rather than def_builtin_pure for __builtin_ia32_gatherpf*.
2017-06-26 Richard Biener <rguenther@suse.de>
PR target/81175
* config/i386/i386.c (ix86_init_mmx_sse_builtins):
Use def_builtin_pure for all gather builtins.
* gfortran.dg/pr81175.f: New testcase.
2017-06-21 Marc Glisse <marc.glisse@inria.fr>
* config/i386/i386.c (struct builtin_isa): New field pure_p.
Reorder for compactness.
(def_builtin, def_builtin2, ix86_add_new_builtins): Handle pure_p.
(def_builtin_pure, def_builtin_pure2): New functions.
(ix86_init_mmx_sse_builtins) [__builtin_ia32_stmxcsr]: Mark as pure.
* gcc.dg/tree-ssa/addadd.c: Un-XFAIL.
* gcc.dg/tree-ssa/addadd-2.c: New file.
From-SVN: r250560
Backport from mainline
2017-07-06 Jonathan Wakely <jwakely@redhat.com>
* include/bits/uses_allocator.h (__use_alloc(const _Alloc&&)): Add
deleted overload to prevent dangling references to rvalues.
* include/experimental/memory_resource
(polymorphic_allocator::construct): Do not call __use_alloc with
rvalue arguments.
From-SVN: r250537
Backport from mainline
2017-07-14 Jason Merrill <jason@redhat.com>
Jonathan Wakely <jwakely@redhat.com>
* include/std/variant (variant::variant(_Tp&&)): Constrain to remove
the constructor for empty variants from the candidate functions
during class template argument deduction.
* testsuite/20_util/variant/deduction.cc: New.
From-SVN: r250534
Backport from mainline
2017-04-21 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/80316
* include/std/future (_State_baseV2::_Setter::operator()): Remove
_S_check calls that are done after the pointer to the shared state is
already dereferenced.
(_State_baseV2::_Setter<_Res, void>): Define specialization for void
as partial specialization so it can be defined within the definition
of _State_baseV2.
(_State_baseV2::__setter): Call _S_check.
(_State_baseV2::__setter(promise<void>*)): Add overload for use by
promise<void>::set_value and promise<void>::set_value_at_thread_exit.
(promise<T>, promise<T&>, promise<void>): Make _State a friend.
(_State_baseV2::_Setter<void, void>): Remove explicit specialization.
(promise<void>::set_value, promise<void>::set_value_at_thread_exit):
Use new __setter overload.
* testsuite/30_threads/promise/members/at_thread_exit2.cc: New test.
* testsuite/30_threads/promise/members/set_exception.cc: Test
promise<T&> and promise<void> specializations.
* testsuite/30_threads/promise/members/set_exception2.cc: Likewise.
Test for no_state error condition.
* testsuite/30_threads/promise/members/set_value2.cc: Likewise.
From-SVN: r250126
Backport from mainline
2017-06-21 Ville Voutilainen <ville.voutilainen@gmail.com>
PR libstdc++/80675
PR libstdc++/80940
* include/std/istream:
(__is_convertible_to_basic_istream_test(basic_istream<_Ch, _Up>*)): New.
(__do_is_convertible_to_basic_istream_impl): Likewise.
(__is_convertible_to_basic_istream_impl): Likewise.
(__is_convertible_to_basic_istream): Use the new base.
(__rvalue_istream_type): New.
(operator>>(_Istream&&, _Tp&&)): Use the new helper alias
for the SFINAE check, convert to the helper alias type before
doing the actual extraction.
* include/std/ostream:
(__is_convertible_to_basic_ostream_test(basic_ostream<_Ch, _Up>*)): New.
(__do_is_convertible_to_basic_ostream_impl): Likewise.
(__is_convertible_to_basic_ostream_impl): Likewise.
(__is_convertible_to_basic_ostream): Use the new base.
(__rvalue_ostream_type): New.
(operator<<(_Ostream&&, const _Tp&)): Use the new helper alias
for the SFINAE check, convert to the helper alias type before
doing the actual insertion.
* testsuite/27_io/rvalue_streams-2.cc: Add new tests.
From-SVN: r249471
* doc/xml/manual/appendix_contributing.xml: Link to the list of bad
names, and link to the test docs and note higher DejaGnu version
requirement.
* doc/xml/manual/allocator.xml: Fix ViewCVS URLs.
* doc/xml/manual/mt_allocator.xml: Likewise.
* doc/xml/manual/test.xml: Correct instructions on running tests.
* doc/html/*: Regenerate.
From-SVN: r249250
PR libstdc++/80478
* include/std/functional (_Mem_fn_traits_base): Add specializations
for noexcept member function types.
* testsuite/20_util/function_objects/mem_fn/80478.cc: New test.
From-SVN: r248247
* doc/xml/manual/abi.xml: Rephrase one of the references to the
Itanium C++ ABI.
* doc/xml/manual/test.xml: Document DejaGnu 1.5.3 requirement.
* doc/html/*: Regenerate.
From-SVN: r247003
* include/std/functional (default_searcher, __boyer_moore_array_base)
(__is_std_equal_to, __boyer_moore_base_t, boyer_moore_searcher)
(boyer_moore_horspool_searcher): Remove redundant namespace
qualification.
(default_searcher::operator()): Construct return value early and
advance second member in-place.
(boyer_moore_horspool_searcher::operator()): Increment random access
iterator directly instead of using std::next.
(boyer_moore_searcher::operator()): Fix return value.
* testsuite/20_util/function_objects/searchers.cc: Check both parts
of return values.
From-SVN: r246964