1. 26 Apr, 2019 7 commits
    • Tweak C++2a uses-allocator construction utilities · 3addb7b9
      The 20_util/scoped_allocator/69293_neg.cc test was failing in C++2a mode
      because the expected static_assert text wasn't matched. The code is
      still ill-formed in C++2a, but uses the new __uses_alloc_args function
      and so fails a different static_assert. This patch adds the same string
      to the new static_assert, so the test passes.
      
      Now that G++ allows concepts to be declared without 'bool' we can use
      the correct C++2a syntax for the _Std_pair concept used to constrain the
      uses-allocator construction utilities.
      
      Also add a new test to verify that pmr::polymorphic_allocator correctly
      performs recursive uses-allocator construction for nested pairs in
      C++2a.
      
      	* include/std/memory (__uses_alloc_args): Add string-literal to
      	static_assert, to match the one in __uses_alloc.
      	[__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
      	* testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
      	for recursive uses-allocator construction of nested pairs.
      	* testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
      	comment.
      
      From-SVN: r270600
      Jonathan Wakely committed
    • baseline_symbols.txt: Update. · f8790a49
      	* config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
      	* config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
      	* config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
      	* config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
      
      From-SVN: r270598
      Jakub Jelinek committed
    • decl.c (grokdeclarator): Fix value assigned to typespec_loc, use min_location. · aaa94b3c
      /cp
      2018-04-26  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	* decl.c (grokdeclarator): Fix value assigned to typespec_loc, use
      	min_location.
      
      /testsuite
      2018-04-26  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	* g++.dg/diagnostic/trailing1.C: New.
      
      From-SVN: r270597
      Paolo Carlini committed
    • baseline_symbols.txt: Update. · 849ab78a
      	* config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
      	* config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
      	* config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
      	* config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
      	* config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
      	* config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
      	* config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
      
      From-SVN: r270595
      Jakub Jelinek committed
    • Fix use of COMPLETE_TYPE_P for -Wstrict-aliasing=1 · e78a87f7
      The handling of -Wstrict-aliasing=1 applied COMPLETE_TYPE_P to the
      pointer type rather than the pointer target, so missed the warnings
      for "struct incomplete" in the testcase.
      
      I couldn't find any existing C tests for -Wstrict-aliasing=1,
      so I added a few extra tests besides the ones fixed by the patch.
      I'm sure there's lots more we could test -- this is just supposed
      to be better than the status quo (i.e. nothing).
      
      2019-04-26  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/c-family/
      	* c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
      	the pointer target rather than the pointer itself.
      
      gcc/testsuite/
      	* gcc.dg/alias-16.c: New test.
      
      From-SVN: r270594
      Richard Sandiford committed
    • Add commentary to (SET_)TYPE_VECTOR_SUBPARTS · 4ef8a24c
      2019-04-26  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* tree.h (TYPE_VECTOR_SUBPARTS, SET_TYPE_VECTOR_SUBPARTS): Add
      	commentary about the encoding of precision.
      
      From-SVN: r270593
      Richard Sandiford committed
    • Daily bump. · 25efa5fb
      From-SVN: r270592
      GCC Administrator committed
  2. 25 Apr, 2019 18 commits
  3. 24 Apr, 2019 15 commits
    • libphobos: Fix linker warning and SEGV in core.thread tests. · 2493e718
      The monolithic core/threadasm.S source has been removed, and split into
      multiple parts, one for each intended target CPU/OS.
      
      Added .type and .size directives for all asm implementations of
      fiber_switchContent and callWithStackShell where they were missing.
      
      libphobos/ChangeLog:
      
      2019-04-25  Iain Buclaw  <ibuclaw@gdcproject.org>
      
      	PR d/90086
      	* m4/druntime/cpu.m4 (DRUNTIME_CPU_SOURCES): New macro.
      	* configure.ac: Use it.
      	* configure: Regenerate.
      	* libdruntime/Makefile.am: Add new config sources to
      	DRUNTIME_SOURCES_CONFIGURED.
      	* libdruntime/Makefile.in: Regenerate.
      	* libdruntime/config/aarch64/switchcontext.S: New file.
      	* libdruntime/config/arm/switchcontext.S: New file.
      	* libdruntime/config/common/threadasm.S: New file.
      	* libdruntime/config/mingw/switchcontext.S: New file.
      	* libdruntime/config/mips/switchcontext.S: New file.
      	* libdruntime/config/powerpc/switchcontext.S: New file.
      	* libdruntime/config/powerpc64/callwithstack.S: New file.
      	* libdruntime/config/x86/switchcontext.S: New file.
      	* libdruntime/core/threadasm.S: Remove.
      
      From-SVN: r270560
      Iain Buclaw committed
    • Update C++17 library status tables · 7c3e085e
      	* doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
      	* doc/html/*: Regenerate.
      
      From-SVN: r270559
      Jonathan Wakely committed
    • Make filesystem::path comparison operators hidden friends (LWG 3065) · f90b16c4
      This change revealed two testsuite bugs where some string comparisons
      only compiled by converting the strings to filesystem::path objects.
      
      	* include/bits/fs_path.h (operator<, operator<=, operator>)
      	(operator>=, operator==, operator!=): Make hidden friends, as per
      	LWG 3065.
      	* testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
      	string type in test.
      	* testsuite/27_io/filesystem/path/native/string.cc: Likewise.
      
      From-SVN: r270558
      Jonathan Wakely committed
    • re PR c++/90236 (bogus error with auto non-type template argument) · 7f8aaa1a
      	PR c++/90236
      	* g++.dg/cpp1z/nontype-auto16.C: New test.
      
      From-SVN: r270557
      Marek Polacek committed
    • PR c++/90227 - error with template parameter packs. · fd177738
      If require_all_args, we aren't waiting for more args to be deduced later.
      
      	* pt.c (coerce_template_parms): Do add empty pack when
      	require_all_args.
      
      From-SVN: r270556
      Jason Merrill committed
    • libphobos: Fix FAIL phobos.exp/core.time on CentOS 5.11, Linux 2.6.18 · 58990c4d
      Merges upstream druntime e03164b5.
      
      Reviewed-on: https://github.com/dlang/druntime/pull/2581
      
      libphobos/ChangeLog:
      
      2019-04-24  Iain Buclaw  <ibuclaw@gdcproject.org>
      
      	PR d/89432
      	* testsuite/lib/libphobos.exp (check_effective_target_linux_pre_2639):
      	New proc.
      	* testsuite/libphobos.druntime/druntime.exp: Add compiler flag
      	-fversion=Linux_Pre_2639 if target is linux_pre_2639.
      	* testsuite/libphobos.druntime_shared/druntime_shared.exp: Likewise.
      
      From-SVN: r270554
      Iain Buclaw committed
    • aix71.h (SUBTARGET_OVERRIDE_OPTIONS): Disable OPTION_MASK_VSX and… · 265e6a0a
      aix71.h (SUBTARGET_OVERRIDE_OPTIONS): Disable OPTION_MASK_VSX and OPTION_MASK_ALTIVEC from rs6000_isa_flags for Go on...
      
      2019-04-24  Clement Chigot  <clement.chigot@atos.net>
      
              * config/rs6000/aix71.h (SUBTARGET_OVERRIDE_OPTIONS): Disable
              OPTION_MASK_VSX and OPTION_MASK_ALTIVEC from rs6000_isa_flags
              for Go on 32 bit AIX.
              * config/rs6000/aix72.h: Likewise.
      
      From-SVN: r270553
      Clement Chigot committed
    • Use __and_v<...> instead of __and_<...>::value · 303b2264
      	* include/std/any (any::any(ValueType&&)): Use __and_v.
      	* include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
      	Likewise.
      
      From-SVN: r270552
      Jonathan Wakely committed
    • Finish implementing "Treating Unnecessary decay" (P0777R1) · 81c7cf71
      	* include/std/tuple (apply): Use remove_reference_t instead of decay_t
      	as per P0777R1.
      	* include/std/type_traits (__result_of_memfun): Use remove_reference
      	instead of __remove_cvref_t and remove redundant is_same check.
      	(__inv_unwrap): Use __remove_cvref_t instead of decay_t.
      
      From-SVN: r270551
      Jonathan Wakely committed
    • re PR target/90193 (asm goto with TLS "m" input operand generates incorrect assembler in O1 and O2) · 73f1289e
      	PR target/90193
      	* rtl.c (classify_insn): Return JUMP_INSN for asm goto.
      	* emit-rtl.c (try_split): Copy over REG_LABEL_TARGET.
      
      	* gcc.target/i386/pr90193.c: New test.
      
      From-SVN: r270550
      Jakub Jelinek committed
    • Fix basic_string_view typedefs and enforce preconditions · fb8b3e29
      The basic_string_view::pointer and basic_string_view::reference typedefs
      are supposed to refer to the non-const value type.
      
      In previous standards having traits_type::char_type different to
      value_type was simply undefined, but in the C++2a draft it's ill-formed,
      as changed by P1148R0. For std::basic_string and iostreams we might
      want to only enforce this conditionally for __cplusplus > 201703L but
      for std::basic_string_view we don't have backwards compatibility
      concerns. Also add assertions to verify the _CharT argument is a
      "char-like" type (non-array, trivial, standard layout type).
      
      Also remove the non-standard basic_string_view::_M_check and
      basic_string_view::_M_limit member functions, replacing them with
      non-member functions that will still exist even if basic_string_view is
      specialized by the program.
      
      	* include/experimental/string_view (basic_string_view::pointer)
      	(basic_string_view::reference): Fix to refer to non-const value_type.
      	* include/bits/basic_string.h (basic_string): Use __sv_check and
      	__sv_limit instead of basic_string_view::_M_check and
      	basic_string_view::_M_limit.
      	* include/std/string_view (__sv_check, __sv_limit): New
      	helper functions to replace basic_string_view::_M_check and
      	basic_string_view::_M_limit.
      	(basic_string_view): Add static assertions to enforce ill-formed
      	requirement for traits_type::char_type from P1148R0, and to enforce
      	required properties of char-like types.
      	(basic_string_view::pointer, basic_string_view::reference): Fix to
      	refer to non-const value_type.
      	(basic_string_view::operator[], basic_string_view::at)
      	(basic_string_view::front, basic_string_view::back)
      	(basic_string_view::data): Use const_reference and const_pointer
      	typedefs for return types.
      	(basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
      	(hash<wstring_view>): Fix argument_type typedef.
      	* testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
      	char/1.cc: Fix expected return type of basic_string_view::data().
      	* testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
      	wchar_t/1.cc: Likewise.
      	* testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
      	char/1.cc: Likewise.
      	* testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
      	wchar_t/1.cc: Likewise.
      	* testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
      	New test.
      	* testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
      	Check reference and pointer typedefs.
      	* testsuite/experimental/string_view/requirements/typedefs.cc:
      	Likewise.
      	* testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
      	Fix expected return type of basic_string_view::data().
      	* testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
      	1.cc: Likewise.
      	* testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
      	Likewise.
      	* testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
      	1.cc: Likewise.
      
      From-SVN: r270548
      Jonathan Wakely committed
    • PR libstdc++/90220 Fix std::any_cast for array types · 92750002
      Although the std::any constructors use decay_t to determine the type of
      the contained value, std::any_cast should use the un-decayed type (and
      so always fail for function and array types that decay to pointers).
      
      Using remove_cv_t is correct, because the condition for std::any_cast
      to return non-null is operand.type() == typeid(T) and typeid ignores
      top-level cv-qualifiers.
      
      	PR libstdc++/90220
      	* include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
      	Avoid a runtime check for types that can never be stored in std::any.
      	* testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
      	array types.
      
      From-SVN: r270547
      Jonathan Wakely committed
    • libphobos: Skip curl tests if libcurl is not installed on the target. · 540bc8a8
      libphobos/ChangeLog:
      
      2019-04-24  Iain Buclaw  <ibuclaw@gdcproject.org>
      
      	PR d/88654
      	* testsuite/lib/libphobos.exp (libphobos-dg-test): Check
      	libphobos_skipped_test_p before running test.
      	(libphobos-dg-prune): New proc.
      	(libphobos_init): Set libphobos_skip_tests.
      	(libphobos_skipped_test_p): New proc.
      	(check_effective_target_libcurl_available): New proc.
      	* testsuite/libphobos.phobos/phobos.exp: Skip curl tests if library
      	not found.
      	* testsuite/libphobos.phobos_shared/phobos_shared.exp: Likewise.
      
      From-SVN: r270545
      Iain Buclaw committed
    • S/390: Fix PR89952 incorrect CFI · 9fe19400
      This patch fixes a cases where inconsistent CFI is generated.
      
      After restoring the hard frame pointer (r11) from an FPR we have to
      set the CFA register.  In order to be able to set it back to the stack
      pointer (r15) we have to make sure that r15 has been restored already.
      
      The patch also adds a scheduler dependency to prevent the instruction
      scheduler from swapping the r11 and r15 restore again.
      
      gcc/ChangeLog:
      
      2019-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
      
      	PR target/89952
      	* config/s390/s390.c (s390_restore_gprs_from_fprs): Restore GPRs
          	from FPRs in reverse order.  Generate REG_CFA_DEF_CFA note also
          	for restored hard frame pointer.
      	(s390_sched_dependencies_evaluation): Implement new target hook.
      	(TARGET_SCHED_DEPENDENCIES_EVALUATION_HOOK): New macro definition.
      
      gcc/testsuite/ChangeLog:
      
      2019-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
      
      	PR target/89952
      	* gcc.target/s390/pr89952.c: New test.
      
      From-SVN: r270544
      Andreas Krebbel committed
    • re PR target/89093 (C++ exception handling clobbers d8 VFP register) · 972206e0
      	PR target/89093
          runtime: mark unwind functions general-regs-only on ARM
          
          For https://gcc.gnu.org/PR89093.
          
          Change-Id: Ic426b43d633c77104bda01d4e7835bc9ab4695ef
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/173657
          Reviewed-by: Ian Lance Taylor <iant@golang.org>
      
      From-SVN: r270542
      Ian Lance Taylor committed