Commit Graph

168143 Commits

Author SHA1 Message Date
H.J. Lu ca2efef75d x32: Update baseline_symbols.txt
* config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.

From-SVN: r270613
2019-04-26 09:53:54 -07:00
Jonathan Wakely 57e617640d PR c++/90243 - orphaned note in uninstantiated constexpr function
gcc/cp:

	PR c++/90243 - orphaned note in uninstantiated constexpr function
	* decl.c (check_for_uninitialized_const_var): Suppress notes if no
	error was shown.

gcc/testsuite:

	PR c++/90243
	* g++.dg/diagnostic/pr90243.C: New test.

From-SVN: r270610
2019-04-26 17:33:02 +01:00
Jonathan Wakely 700e6332a7 Remove redundant step in experimental::filesystem::path construction
* include/experimental/bits/fs_path.h
	(path::_S_convert_loc<_InputIterator>): Create const std::string to
	avoid redundant call to _S_convert_loc with non-const pointers.

From-SVN: r270608
2019-04-26 16:58:47 +01:00
Eugene Sharygin 224d9de0e8 gdbhooks.py: Fix UnicodeDecodeErrors when printing trees with corrupt codes.
* gdbhooks.py: Fix UnicodeDecodeErrors when printing trees with
	corrupt codes.

From-SVN: r270607
2019-04-26 09:48:43 -06:00
Jakub Jelinek f179b64e3a re PR debug/90197 (Cannot step through simple loop at -O -g)
PR debug/90197
	* c-tree.h (c_finish_loop): Add 2 further location_t arguments.
	* c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
	(c_parser_do_statement): Likewise.
	(c_parser_for_statement): Likewise.  Formatting fixes.
	* c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
	emit DEBUG_BEGIN_STMTs if needed.

From-SVN: r270606
2019-04-26 17:38:33 +02:00
Michael Forney 6b3a5e8a3d libiberty.h (vasprintf): Don't declare if HAVE_DECL_VASPRINTF is not defined.
* libiberty.h (vasprintf): Don't declare if HAVE_DECL_VASPRINTF
	is not defined.

From-SVN: r270605
2019-04-26 09:35:01 -06:00
Jonathan Wakely 53e6927367 Fix tests that fail with _GLIBCXX_USE_CXX11_ABI=0
The pmr::string typedef isn't available for the old COW string, so some
tests that use it were failing.

	* testsuite/20_util/variant/run.cc: Use a new Hashable type to test
	hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
	* testsuite/21_strings/basic_string/hash/hash.cc
	[!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
	* testsuite/21_strings/basic_string/hash/hash_char8_t.cc
	[!_GLIBCXX_USE_CXX11_ABI]: Likewise.

From-SVN: r270604
2019-04-26 16:02:02 +01:00
Paolo Carlini 69dad6faf9 re PR c++/90173 (ICE: Segmentation fault (in strip_declarator_types))
/cp
2019-04-26  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/90173
	* decl.c (grokdeclarator): Set type to error_mark_node
	upon error about template placeholder type non followed
	by a simple declarator-id.

/testsuite
2019-04-26  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/90173
	* g++.dg/cpp1z/class-deduction66.C: New.

From-SVN: r270603
2019-04-26 14:51:00 +00:00
Jonathan Wakely 8281e3b8ea Reduce code instantiated by filesystem::path::_S_convert_loc
Jakub noted in https://gcc.gnu.org/ml/libstdc++/2019-04/msg00140.html
that an unwanted std::wstring::_M_replace_dispatch symbol has started to
be exported from the Fedora shared library. This symbol is triggered by
the instantiation of std::wstring::assign(const char*, const char*) from
std::__str_codecvt_in which is called from path::_S_convert_loc. The
branch that triggers that instantiation can't actually happen in that
case, because codecvt facets will only return noconv when the input and
output types are the same. Guarding the assign call with an if-constexpr
check that the types are the same avoids instantiating template
specializations that will never actually be needed.

	* config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
	wstring::_M_replace_dispatch with more specific patterns.
	* include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
	Create const std::string to avoid redundant call to _S_convert_loc
	with non-const pointers.
	* include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
	avoid unnecessary basic_string::assign instantiations.

From-SVN: r270602
2019-04-26 15:04:45 +01:00
Jonathan Wakely 3addb7b937 Tweak C++2a uses-allocator construction utilities
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
2019-04-26 14:15:54 +01:00
Jakub Jelinek f8790a498e baseline_symbols.txt: Update.
* 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
2019-04-26 14:08:58 +02:00
Paolo Carlini aaa94b3c89 decl.c (grokdeclarator): Fix value assigned to typespec_loc, use min_location.
/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
2019-04-26 11:46:15 +00:00
Jakub Jelinek 849ab78ab0 baseline_symbols.txt: Update.
* 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
2019-04-26 13:13:04 +02:00
Richard Sandiford e78a87f724 Fix use of COMPLETE_TYPE_P for -Wstrict-aliasing=1
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
2019-04-26 10:33:10 +00:00
Richard Sandiford 4ef8a24ca5 Add commentary to (SET_)TYPE_VECTOR_SUBPARTS
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
2019-04-26 09:59:31 +00:00
GCC Administrator 25efa5fb15 Daily bump.
From-SVN: r270592
2019-04-26 00:16:18 +00:00
Jonathan Wakely ee2f721c2f PR libstdc++/90239 use uses_allocator_construction_args in <scoped_allocator>
PR libstdc++/90239
	* doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
	* include/std/scoped_allocator [__cplusplus > 201703L]
	(scoped_allocator_adaptor::construct): Define in terms of
	uses_allocator_construction_args, as per P0591R4.
	* testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
	* testsuite/util/testsuite_allocator.h: Remove name of unused
	parameter.

From-SVN: r270588
2019-04-25 23:43:15 +01:00
Andreas Tobler b6bf4d8a77 freebsd64.h: Add bits for 32-bit multilib support.
2019-04-25  Andreas Tobler  <andreast@gcc.gnu.org>

        * config/i386/freebsd64.h: Add bits for 32-bit multilib support.
        * config/i386/t-freebsd64: New file.
        * config.gcc: Add the t-freebsd64 for multilib support.

From-SVN: r270586
2019-04-25 22:03:35 +02:00
Uros Bizjak 8a55f9c57a extend.texi (vector_size): Add missing comma after @xref.
* doc/extend.texi (vector_size): Add missing comma after @xref.

From-SVN: r270585
2019-04-25 21:45:26 +02:00
Jakub Jelinek 68ec60c4a3 * BASE-VER: Set to 10.0.0.
From-SVN: r270581
2019-04-25 20:01:17 +02:00
Richard Biener f47f687a97 re PR middle-end/89765 (Multiple problems with vec-insert implementation on PowerPC)
PR middle-end/89765
	* gimplify.c (gimplify_expr): Avoid turning a lvalue
	VIEW_CONVERT_EXPR into one operating on an rvalue.

From-SVN: r270579
2019-04-25 19:58:56 +02:00
H.J. Lu 604ab090ad x86: Update message for target_clones and unsupported ISAs
Before AVX512F, processors with the newer ISAs also support the older
ISAs, i.e., AVX2 processors also support AVX and SSE4, SSE4 processors
also support SSSE3, ...   After AVX512F, an AVX512XX processor may not
support AVX512YY.  It means AVX512XX features, except for AVX512F, can't
be used to decide priority in target_clones.

This patch updates error message for ISAs with P_ZERO priority.  It also
merges _feature_list into _isa_names_table and marks ISAs, which have
unknown priority, with P_ZERO so that we only need to update one place
to add a new ISA feature.

gcc/

2019-04-25  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/89929
	* config/i386/i386.c (feature_priority): Moved to file scope.
	(processor_features): Likewise.
	(processor_model): Likewise.
	(_arch_names_table): Likewise.
	(arch_names_table): Likewise.
	(_feature_list): Removed.
	(feature_list): Likewise.
	(_isa_names_table): Moved to file scope.  Add priority.
	(isa_names_table): Likewise.
	(get_builtin_code_for_version): Replace feature_list with
	isa_names_table.  Update error message for P_ZERO priority.

gcc/testsuite/

2019-04-25  Martin Liska  <mliska@suse.cz>
	    H.J. Lu  <hongjiu.lu@intel.com>

	PR target/89929
	* g++.target/i386/mv28.C: New test.
	* gcc.target/i386/mvc14.c: Likewise.
	* g++.target/i386/pr57362.C: Updated.

From-SVN: r270578
2019-04-25 10:00:28 -07:00
Iain Buclaw 9125dc3292 libphobos: Fix segfault in runtime caused by unexpected GC of TLS data.
libphobos/ChangeLog:

2019-04-25  Iain Buclaw  <ibuclaw@gdcproject.org>

	PR d/90250
	* libdruntime/gcc/sections/elf_shared.d (initTLSRanges): Populate
	_tlsRanges in every startup thread.
	* testsuite/libphobos.thread/thread.exp: Load libphobos-dg.exp.
	* testsuite/libphobos.thread/tlsgc_sections.d: New test.

From-SVN: r270576
2019-04-25 15:31:35 +00:00
Richard Biener aeec4861c4 tree-pass.h (make_pass_phi_only_cprop): Remove.
2019-04-25  Richard Biener  <rguenther@suse.de>

	* tree-pass.h (make_pass_phi_only_cprop): Remove.
	* timevar.def (TV_TREE_PHI_CPROP): Likewise.

From-SVN: r270575
2019-04-25 14:55:42 +00:00
Jeff Law 33579b59aa re PR tree-optimization/90037 (-Wnull-dereference false positive after r269302)
PR tree-optimization/90037
	* Makefile.in (OBJS): Remove tree-ssa-phionlycprop.c
	* passes.def: Replace all instance of phi-only cprop with the
	lattice propagator.  Move propagation pass from after erroneous
	path isolation to before erroneous path isolation.
	* tree-ssa-phionlycprop.c: Remove.

	* gcc.dg/tree-ssa/20030710-1.c: Update dump file to scan.
	* gcc.dg/isolate-2.c: Likewise.
	* gcc.dg/isolate-4.c: Likewise.
	* gcc.dg/pr19431.c: Accept either ordering of PHI args.
	* gcc.dg/pr90037.c: New test.

From-SVN: r270574
2019-04-25 08:32:16 -06:00
Rainer Orth b16f214775 Fix typo in m4/druntime/cpu.m4
* m4/druntime/cpu.m4 (DRUNTIME_CPU_SOURCES): Quote brackets.
	* configure: Regenerate.

From-SVN: r270573
2019-04-25 12:39:33 +00:00
Jakub Jelinek 60a893dbb4 re PR c++/44648 (missing -Wunused warning on a const variable in if statement)
PR c++/44648
	* g++.dg/warn/Wunused-var-35.C: Remove xfail.

From-SVN: r270572
2019-04-25 14:18:07 +02:00
Johannes Pfau cecd06a9ea D: Do not add target_libs if phobos is disabled
From-SVN: r270571
2019-04-25 11:22:27 +00:00
Richard Biener a9e6359a90 re PR tree-optimization/90213 (UBSAN: signed integer overflow: -5621332293356458048 * 8 cannot be represented in type 'long int')
2019-04-24  Richard Biener  <rguenther@suse.de>

	PR middle-end/90213
	* gimple-fold.c (fold_const_aggregate_ref_1): Do multiplication
	by size and BITS_PER_UNIT on poly-wide-ints.

From-SVN: r270570
2019-04-25 11:17:49 +00:00
Richard Biener f469220df6 re PR middle-end/90194 (ICE in expand_debug_expr, at cfgexpand.c:5244)
2019-04-25  Richard Biener  <rguenther@suse.de>

	PR middle-end/90194
	* match.pd: Add pattern to simplify view-conversion of an
	empty constructor.

	* g++.dg/torture/pr90194.C: New testcase.

From-SVN: r270569
2019-04-25 11:15:35 +00:00
Johannes Pfau 9168f22057 D: Implement GCC emutls in druntime
* libdruntime/Makefile.am: Add emutls and gthread files.
* libdruntime/Makefile.in: Regenerate.
* libdruntime/gcc/emutls.d: New file. Implement GC-compatible emutls.
* libdruntime/gcc/gthread.d: New file.
* libdruntime/gcc/sections/elf_shared.d: Integrate emutls support.
* testsuite/libphobos.allocations/tls_gc_integration.d: New test for
TLS.

From-SVN: r270568
2019-04-25 11:11:39 +00:00
Iain Buclaw 7da021f080 libphobos: Add missing PWD_COMMAND to Makefile.
2019-04-25  Iain Buclaw  <ibuclaw@gdcproject.org>

	* testsuite/Makefile.am: Set PWD_COMMAND.
	* testsuite/Makefile.in: Regenerate.

From-SVN: r270566
2019-04-25 06:26:57 +00:00
Ian Lance Taylor ce0f706246 compiler: fix glitch when inlining method with empty param/receiver
Fix a problem with Function_declaration::import_function relating to
    how no-name or "sink" parameters are handled. In Gogo::start_function
    (for the non-inline case) when parameter bindings are being added,
    parameters with empty/sink names are renamed to synthesized "r.%d" /
    "p.%d" names so as to avoid collisions. This same handling needs to be
    present when creating the bindings for an inline function that's being
    instantiated after being read from export data.
    
    Fixes golang/go#31637.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/173538

From-SVN: r270564
2019-04-25 01:13:22 +00:00
GCC Administrator 6aa6cbacc8 Daily bump.
From-SVN: r270563
2019-04-25 00:16:17 +00:00
Iain Buclaw 2493e71815 libphobos: Fix linker warning and SEGV in core.thread tests.
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
2019-04-24 22:46:59 +00:00
Jonathan Wakely 7c3e085e44 Update C++17 library status tables
* doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
	* doc/html/*: Regenerate.

From-SVN: r270559
2019-04-24 23:16:45 +01:00
Jonathan Wakely f90b16c429 Make filesystem::path comparison operators hidden friends (LWG 3065)
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
2019-04-24 22:35:26 +01:00
Marek Polacek 7f8aaa1ae9 re PR c++/90236 (bogus error with auto non-type template argument)
PR c++/90236
	* g++.dg/cpp1z/nontype-auto16.C: New test.

From-SVN: r270557
2019-04-24 21:28:04 +00:00
Jason Merrill fd177738f3 PR c++/90227 - error with template parameter packs.
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
2019-04-24 16:37:30 -04:00
Iain Buclaw 58990c4d3a libphobos: Fix FAIL phobos.exp/core.time on CentOS 5.11, Linux 2.6.18
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
2019-04-24 18:57:36 +00:00
Clement Chigot 265e6a0ae0 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
2019-04-24 14:03:47 -04:00
Jonathan Wakely 303b226457 Use __and_v<...> instead of __and_<...>::value
* include/std/any (any::any(ValueType&&)): Use __and_v.
	* include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
	Likewise.

From-SVN: r270552
2019-04-24 17:25:21 +01:00
Jonathan Wakely 81c7cf71bf Finish implementing "Treating Unnecessary decay" (P0777R1)
* 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
2019-04-24 17:25:17 +01:00
Jakub Jelinek 73f1289e49 re PR target/90193 (asm goto with TLS "m" input operand generates incorrect assembler in O1 and O2)
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
2019-04-24 17:49:36 +02:00
Jonathan Wakely fb8b3e2993 Fix basic_string_view typedefs and enforce preconditions
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
2019-04-24 16:17:53 +01:00
Jonathan Wakely 92750002ef PR libstdc++/90220 Fix std::any_cast for array types
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
2019-04-24 16:17:43 +01:00
Iain Buclaw 540bc8a8b1 libphobos: Skip curl tests if libcurl is not installed on the target.
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
2019-04-24 14:17:34 +00:00
Andreas Krebbel 9fe1940081 S/390: Fix PR89952 incorrect CFI
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
2019-04-24 13:40:38 +00:00
Ian Lance Taylor 972206e0c2 re PR target/89093 (C++ exception handling clobbers d8 VFP register)
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
2019-04-24 12:45:45 +00:00
Iain Buclaw 9e1558d322 libphobos: Fix assert in core.sys.posix.sys.stat for aarch64/ilp32.
Merges upstream druntime 51365217.

Reviewed-on: https://github.com/dlang/druntime/pull/2579

From-SVN: r270541
2019-04-24 11:04:22 +00:00