Commit Graph

167772 Commits

Author SHA1 Message Date
Jakub Jelinek
a15ffa22b5 re PR c++/87481 (Endless loop with optimisation in C++17)
PR c++/87481
	* doc/invoke.texi (-fconstexpr-ops-limit=): Document.

	* c.opt (-fconstexpr-ops-limit=): New option.

	* constexpr.c (struct constexpr_ctx): Add constexpr_ops_count member.
	(cxx_eval_constant_expression): When not skipping, not constant class
	or location wrapper, increment *ctx->constexpr_ops_count and if it is
	above constexpr_loop_nest_limit, diagnose failure.
	(cxx_eval_outermost_constant_expr): Add constexpr_ops_count and
	initialize ctx.constexpr_ops_count to its address.
	(is_sub_constant_expr): Likewise.

	* g++.dg/cpp1y/constexpr-87481.C: New test.

From-SVN: r269874
2019-03-22 15:40:59 +01:00
Pierre-Marie de Rodat
29e0246c68 [Ada] GNAT.Sockets: fix recent regressions
The support for IPv6 that was added since last release triggered
regressions on various platforms. The size of structures passed to low
level routines was not correct anymore: it should depend on the address
family, now.

2019-03-22  Dmitriy Anisimkov  <anisimko@adacore.com>

gcc/ada/

	PR ada/89583
	* libgnat/g-socket.adb (Bind_Socket, Connect_Socket,
	Send_Socket): Fix the computation of structure lengths passed to
	low level routines.
	(Is_IPv6_Address): Fix the number of expected colons.

2019-03-22  Simon Wright  <simon@pushface.org>

gcc/testsuite/

	PR ada/89583
	* gnat.dg/socket2.adb: New.

From-SVN: r269873
2019-03-22 13:59:02 +00:00
Bill Schmidt
b6c5f9f3dd mmintrin.h (_mm_sub_pi32): Fix typo.
[gcc]

2019-03-22  Bill Schmidt  <wschmidt@linux.ibm.com>

	* config/rs6000/mmintrin.h (_mm_sub_pi32): Fix typo.

[gcc/testsuite]

2019-03-22  Bill Schmidt  <wschmidt@linux.ibm.com>

	* gcc.target/powerpc/mmx-psubd-2.c: Test _m_psubd.

From-SVN: r269871
2019-03-22 13:49:18 +00:00
Jakub Jelinek
bfdc651abd * config/i386/sse.md (<avx512>_fmadd_<mode>_mask3<round_name>,
<avx512>_fmsub_<mode>_mask3<round_name>,
	<avx512>_fnmadd_<mode>_mask3<round_name>,
	<avx512>_fnmsub_<mode>_mask3<round_name>,
	avx512f_vmfmadd_<mode>_mask3<round_name>,
	avx512f_vmfmsub_<mode>_mask3<round_name>,
	*avx512f_vmfnmadd_<mode>_mask3<round_name>): Use <round_nimm_predicate>
	instead of register_operand and %v instead of v for match_operand 1.
	(avx512f_vmfnmsub_<mode>_mask3<round_name>): Rename to ...
	(*avx512f_vmfnmsub_<mode>_mask3<round_name>): ... this.  Use
	<round_nimm_predicate> instead of register_operand and %v instead of v
	for match_operand 1.

From-SVN: r269870
2019-03-22 13:58:09 +01:00
Jakub Jelinek
ecf392360a sse.md (<avx512>_fmadd_<mode>_mask<round_name>, [...]): Use <round_nimm_predicate> instead of nonimmediate_operand.
* config/i386/sse.md (<avx512>_fmadd_<mode>_mask<round_name>,
	<avx512>_fmadd_<mode>_mask3<round_name>,
	<avx512>_fmsub_<mode>_mask<round_name>,
	<avx512>_fmsub_<mode>_mask3<round_name>,
	<avx512>_fnmadd_<mode>_mask<round_name>,
	<avx512>_fnmadd_<mode>_mask3<round_name>,
	<avx512>_fnmsub_<mode>_mask<round_name>,
	<avx512>_fnmsub_<mode>_mask3<round_name>,
	<avx512>_fmaddsub_<mode>_mask<round_name>,
	<avx512>_fmaddsub_<mode>_mask3<round_name>,
	<avx512>_fmsubadd_<mode>_mask<round_name>,
	<avx512>_fmsubadd_<mode>_mask3<round_name>): Use
	<round_nimm_predicate> instead of nonimmediate_operand.
	(fmai_vmfmadd_<mode><round_name>, fmai_vmfmsub_<mode><round_name>,
	fmai_vmfnmadd_<mode><round_name>, fmai_vmfnmsub_<mode><round_name>):
	Use register_operand instead of <round_nimm_predicate> for the
	operand that needs to match output.
	(*fmai_fmadd_<mode>, *fmai_fmsub_<mode>,
	*fmai_fnmadd_<mode><round_name>, *fmai_fnmsub_<mode><round_name>):
	Likewise.  Formatting fixes.

From-SVN: r269869
2019-03-22 11:12:18 +01:00
Jakub Jelinek
5c4ade6d44 re PR target/89784 (Missing AVX512 intrinsics)
PR target/89784
	* config/i386/i386.c (enum ix86_builtins): Remove
	IX86_BUILTIN_VFMSUBSD3_MASK3 and IX86_BUILTIN_VFMSUBSS3_MASK3.
	* config/i386/i386-builtin.def (__builtin_ia32_vfmaddsd3_mask,
	__builtin_ia32_vfmaddsd3_mask3, __builtin_ia32_vfmaddsd3_maskz,
	__builtin_ia32_vfmsubsd3_mask3, __builtin_ia32_vfmaddss3_mask,
	__builtin_ia32_vfmaddss3_mask3, __builtin_ia32_vfmaddss3_maskz,
	__builtin_ia32_vfmsubss3_mask3): New builtins.
	* config/i386/sse.md (avx512f_vmfmadd_<mode>_mask<round_name>,
	avx512f_vmfmadd_<mode>_mask3<round_name>,
	avx512f_vmfmadd_<mode>_maskz_1<round_name>,
	*avx512f_vmfmsub_<mode>_mask<round_name>,
	avx512f_vmfmsub_<mode>_mask3<round_name>,
	*avx512f_vmfmasub_<mode>_maskz_1<round_name>,
	*avx512f_vmfnmadd_<mode>_mask<round_name>,
	*avx512f_vmfnmadd_<mode>_mask3<round_name>,
	*avx512f_vmfnmadd_<mode>_maskz_1<round_name>,
	*avx512f_vmfnmsub_<mode>_mask<round_name>,
	*avx512f_vmfnmsub_<mode>_mask3<round_name>,
	*avx512f_vmfnmasub_<mode>_maskz_1<round_name>): New define_insns.
	(avx512f_vmfmadd_<mode>_maskz<round_expand_name>): New define_expand.
	* config/i386/avx512fintrin.h (_mm_mask_fmadd_sd, _mm_mask_fmadd_ss,
	_mm_mask3_fmadd_sd, _mm_mask3_fmadd_ss, _mm_maskz_fmadd_sd,
	_mm_maskz_fmadd_ss, _mm_mask_fmsub_sd, _mm_mask_fmsub_ss,
	_mm_mask3_fmsub_sd, _mm_mask3_fmsub_ss, _mm_maskz_fmsub_sd,
	_mm_maskz_fmsub_ss, _mm_mask_fnmadd_sd, _mm_mask_fnmadd_ss,
	_mm_mask3_fnmadd_sd, _mm_mask3_fnmadd_ss, _mm_maskz_fnmadd_sd,
	_mm_maskz_fnmadd_ss, _mm_mask_fnmsub_sd, _mm_mask_fnmsub_ss,
	_mm_mask3_fnmsub_sd, _mm_mask3_fnmsub_ss, _mm_maskz_fnmsub_sd,
	_mm_maskz_fnmsub_ss, _mm_mask_fmadd_round_sd, _mm_mask_fmadd_round_ss,
	_mm_mask3_fmadd_round_sd, _mm_mask3_fmadd_round_ss,
	_mm_maskz_fmadd_round_sd, _mm_maskz_fmadd_round_ss,
	_mm_mask_fmsub_round_sd, _mm_mask_fmsub_round_ss,
	_mm_mask3_fmsub_round_sd, _mm_mask3_fmsub_round_ss,
	_mm_maskz_fmsub_round_sd, _mm_maskz_fmsub_round_ss,
	_mm_mask_fnmadd_round_sd, _mm_mask_fnmadd_round_ss,
	_mm_mask3_fnmadd_round_sd, _mm_mask3_fnmadd_round_ss,
	_mm_maskz_fnmadd_round_sd, _mm_maskz_fnmadd_round_ss,
	_mm_mask_fnmsub_round_sd, _mm_mask_fnmsub_round_ss,
	_mm_mask3_fnmsub_round_sd, _mm_mask3_fnmsub_round_ss,
	_mm_maskz_fnmsub_round_sd, _mm_maskz_fnmsub_round_ss): New intrinsics.

	* gcc.target/i386/sse-13.c (__builtin_ia32_vfmaddsd3_mask,
	__builtin_ia32_vfmaddsd3_mask3, __builtin_ia32_vfmaddsd3_maskz,
	__builtin_ia32_vfmsubsd3_mask3, __builtin_ia32_vfmaddss3_mask,
	__builtin_ia32_vfmaddss3_mask3, __builtin_ia32_vfmaddss3_maskz,
	__builtin_ia32_vfmsubss3_mask3): Define.
	* gcc.target/i386/sse-23.c (__builtin_ia32_vfmaddsd3_mask,
	__builtin_ia32_vfmaddsd3_mask3, __builtin_ia32_vfmaddsd3_maskz,
	__builtin_ia32_vfmsubsd3_mask3, __builtin_ia32_vfmaddss3_mask,
	__builtin_ia32_vfmaddss3_mask3, __builtin_ia32_vfmaddss3_maskz,
	__builtin_ia32_vfmsubss3_mask3): Define.
	* gcc.target/i386/avx-1.c (__builtin_ia32_vfmaddsd3_mask,
	__builtin_ia32_vfmaddsd3_mask3, __builtin_ia32_vfmaddsd3_maskz,
	__builtin_ia32_vfmsubsd3_mask3, __builtin_ia32_vfmaddss3_mask,
	__builtin_ia32_vfmaddss3_mask3, __builtin_ia32_vfmaddss3_maskz,
	__builtin_ia32_vfmsubss3_mask3): Define.
	* gcc.target/i386/sse-14.c: Add tests for
	_mm_mask{,3,z}_f{,n}m{add,sub}_round_s{s,d} builtins.
	* gcc.target/i386/sse-22.c: Likewise.

2019-03-22  Hongtao Liu  <hongtao.liu@intel.com>

	* gcc.target/i386/avx512f-vfmaddXXXsd-1.c (avx512f_test): Add tests
	for _mm_mask{,3,z}_*.
	* gcc.target/i386/avx512f-vfmaddXXXss-1.c (avx512f_test): Likewise.
	* gcc.target/i386/avx512f-vfmsubXXXsd-1.c (avx512f_test): Likewise.
	* gcc.target/i386/avx512f-vfmsubXXXss-1.c (avx512f_test): Likewise.
	* gcc.target/i386/avx512f-vfnmaddXXXsd-1.c (avx512f_test): Likewise.
	* gcc.target/i386/avx512f-vfnmaddXXXss-1.c (avx512f_test): Likewise.
	* gcc.target/i386/avx512f-vfnmsubXXXsd-1.c (avx512f_test): Likewise.
	* gcc.target/i386/avx512f-vfnmsubXXXss-1.c (avx512f_test): Likewise.
	* gcc.target/i386/avx512f-vfmaddXXXsd-2.c: New test.
	* gcc.target/i386/avx512f-vfmaddXXXss-2.c: New test.
	* gcc.target/i386/avx512f-vfmsubXXXsd-2.c: New test.
	* gcc.target/i386/avx512f-vfmsubXXXss-2.c: New test.
	* gcc.target/i386/avx512f-vfnmaddXXXsd-2.c: New test.
	* gcc.target/i386/avx512f-vfnmaddXXXss-2.c: New test.
	* gcc.target/i386/avx512f-vfnmsubXXXsd-2.c: New test.
	* gcc.target/i386/avx512f-vfnmsubXXXss-2.c: New test.

From-SVN: r269868
2019-03-22 11:08:40 +01:00
Martin Sebor
a411ae9b35 PR tree-optimization/89350 - Wrong -Wstringop-overflow= warning since r261518
gcc/ChangeLog:

	PR tree-optimization/89350
	* builtins.c (compute_objsize): Also ignore offsets whose upper
	bound is negative.
	* gimple-ssa-warn-restrict.c (builtin_memref): Add new member.
	(builtin_memref::builtin_memref): Initialize new member.
	Allow EXPR to be null.
	(builtin_memref::extend_offset_range): Replace local with a member.
	Avoid assuming pointer offsets are unsigned.
	(builtin_memref::set_base_and_offset): Determine base object
	before computing offset range.
	(builtin_access::builtin_access): Handle memset.
	(builtin_access::generic_overlap): Replace local with a member.
	(builtin_access::strcat_overlap): Same.
	(builtin_access::overlap): Same.
	(maybe_diag_overlap): Same.
	(maybe_diag_access_bounds): Same.
	(wrestrict_dom_walker::check_call): Handle memset.
	(check_bounds_or_overlap): Same.

gcc/testsuite/ChangeLog:

	PR tree-optimization/89350
	* gcc.dg/Wstringop-overflow.c: Xfail overly ambitious tests.
	* gcc.dg/Wstringop-overflow-11.c: New test.
	* gcc.dg/Wstringop-overflow-12.c: New test.
	* gcc.dg/pr89350.c: New test.
	* gcc.dg/pr40340-1.c: Adjust expected warning.
	* gcc.dg/pr40340-2.c: Same.
	* gcc.dg/pr40340-4.c: Same.
	* gcc.dg/pr40340-5.c: Same.

From-SVN: r269867
2019-03-21 20:58:27 -06:00
GCC Administrator
11bf9a075a Daily bump.
From-SVN: r269866
2019-03-22 00:16:26 +00:00
Thomas Rodgers
061f457868 Integrate C++17 parallel algorithms
This is the Intel implementation of the C++17 parallel
algorithms, which has been donated to both GCC and LLVM. The upstream
project is at -

	https://reviews.llvm.org/source/pstl/

The new files in the include/pstl sub-directory are covered by the
LICENSE.txt in that sub-directory, as are the tests in
testsuite/**/pstl/*

	* include/Makefile.am (std_header): Add ${std_srcdir}/execution.
	(pstl_srcdir, pstl_builddir, pstl_headers): New variables.
	(allstamped): Add stamp-pstl.
	(install-headers): Add ptsl_builddir.
	* include/Makefile.in: Regenerate.
	* include/bits/c++config: Add pstl configuration.
	* include/pstl/LICENSE.txt: New file.
	* include/pstl/algorithm_fwd.h: New file.
	* include/pstl/algorithm_impl.h: New file.
	* include/pstl/execution_defs.h: New file.
	* include/pstl/execution_impl.h: New file.
	* include/pstl/glue_algorithm_defs.h: New file.
	* include/pstl/glue_algorithm_impl.h: New file.
	* include/pstl/glue_execution_defs.h: New file.
	* include/pstl/glue_memory_defs.h: New file.
	* include/pstl/glue_memory_impl.h: New file.
	* include/pstl/glue_numeric_defs.h: New file.
	* include/pstl/glue_numeric_impl.h: New file.
	* include/pstl/memory_impl.h: New file.
	* include/pstl/numeric_fwd.h: New file.
	* include/pstl/numeric_impl.h: New file.
	* include/pstl/parallel_backend.h: New file.
	* include/pstl/parallel_backend_tbb.h: New file.
	* include/pstl/parallel_backend_utils.h: New file.
	* include/pstl/parallel_impl.h: New file.
	* include/pstl/pstl_config.h: New file.
	* include/pstl/unseq_backend_simd.h: New file.
	* include/pstl/utils.h: New file.
	* include/std/algorithm: Include parallel algorithm implementations.
	* include/std/execution: New file.
	* include/std/memory: Include parallel algorithm implementations.
	* include/std/numeric: Include parallel algorithm implementations.
	* include/std/version: Add parallel algorithms feature test macro.
	* testsuite/util/pstl/pstl_test_config.h: New file.
	* testsuite/util/pstl/test_utils.h: New file.
	* testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
	* testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
	* testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
	* testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
	* testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
	* testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
	* testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
	* testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
	* testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
	* testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
	* testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
	* testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
	* testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
	* testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
	* testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
	* testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
	* testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
	* testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
	* testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
	* testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
	* testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
	* testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
	* testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
	* testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
	* testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
	* testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
	* testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
	* testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
	* testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
	* testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
	* testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
	* testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
	* testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
	* testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
	* testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
	* testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
	* testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
	* testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
	* testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
	* testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
	* testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
	* testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
	* testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
	* testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
	* testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
	* testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
	* testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
	* testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
	* testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
	* testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
	* testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
	* testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
	* testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
	* testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
	* testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
	* testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
	* testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
	* testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
	* testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
	* testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
	* testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
	* testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.

From-SVN: r269863
2019-03-21 23:48:49 +00:00
Jan Hubicka
774856e3fb re PR lto/89692 (ICE in streamer_write_chain, at tree-streamer-out.c:506)
PR lto/89692
	* tree.c (fld_type_variant, fld_incomplete_type_of,
	fld_process_array_type): Call fld->pset.add and don't call
	add_tree_to_fld_list if it returns true.
	(free_lang_data_in_type): Similarly with self-recursive call.  Purge
	non-marked types from TYPE_NEXT_VARIANT list.
	(find_decls_types_r): Call fld_worklist_push for TYPE_CANONICAL (t).

	* g++.dg/other/pr89692.C: New test.

From-SVN: r269862
2019-03-21 23:04:29 +01:00
Jakub Jelinek
8c8b42cf72 re PR c++/71446 (Incorrect overload resolution when using designated initializers)
PR c++/71446
	* call.c (filed_in_pset): Change pset from hash_set<tree> * to
	hash_set<tree, true> &, adjust uses accordingly.
	(build_aggr_conv): Change pset from hash_set<tree> *
	to hash_set<tree, true>.  Replace goto fail; with return NULL;,
	adjust pset uses.

From-SVN: r269861
2019-03-21 23:03:07 +01:00
Jakub Jelinek
152d47df7f re PR c++/89767 (ICE with tuple and optimization)
PR c++/89767
	* parser.c (cp_parser_lambda_introducer): Add ids and first_capture_id
	variables, check for duplicates in this function.
	* lambda.c (add_capture): Don't check for duplicates nor use
	IDENTIFIER_MARKED.
	(register_capture_members): Don't clear IDENTIFIER_MARKED here.

	* g++.dg/cpp1y/lambda-init18.C: New test.
	* g++.dg/cpp1y/lambda-init19.C: New test.
	* g++.dg/cpp1y/pr89767.C: New test.

From-SVN: r269860
2019-03-21 23:01:02 +01:00
Jakub Jelinek
36a3a7a372 hash-table.h (hash_table): Add Lazy template parameter defaulted to false...
* hash-table.h (hash_table): Add Lazy template parameter defaulted
	to false, if true, don't alloc_entries during construction, but defer
	it to the first method that needs m_entries allocated.
	(hash_table::hash_table, hash_table::~hash_table,
	hash_table::alloc_entries, hash_table::find_empty_slot_for_expand,
	hash_table::too_empty_p, hash_table::expand, hash_table::empty_slow,
	hash_table::clear_slot, hash_table::traverse_noresize,
	hash_table::traverse, hash_table::iterator::slide): Adjust all methods.
	* hash-set.h (hash_set): Add Lazy template parameter defaulted to
	false.
	(hash_set::contains): If Lazy is true, use find_slot_with_hash with
	NO_INSERT instead of find_with_hash.
	(hash_set::traverse, hash_set::iterator, hash_set::iterator::m_iter,
	hash_set::m_table): Add Lazy to template params of hash_table.
	(gt_ggc_mx, gt_pch_nx): Use false as Lazy in hash_set template param.
	* attribs.c (test_attribute_exclusions): Likewise.
	* hash-set-tests.c (test_set_of_strings): Add iterator tests for
	hash_set.  Add tests for hash_set with Lazy = true.
c-family/
	* c-common.c (per_file_includes_t): Use false as Lazy in hash_set
	template param.
jit/
	* jit-recording.c (reproducer::m_set_identifiers): Use false as Lazy
	in hash_set template param.

From-SVN: r269859
2019-03-21 23:00:04 +01:00
Thomas Schwinge
2e4182ae07 [PR72741] Properly handle clauses specifying the level of parallelism for 'external' Fortran OpenACC routines
..., so as to also for these enable the generic middle end OMP code to verify
proper nesting of loops/routines regarding their levels of parallelism.

	gcc/fortran/
	PR fortran/72741
	* openmp.c (gfc_match_oacc_routine): Set the level of parallelism
	for all variants.
	(gfc_resolve_oacc_routines): Call gfc_add_omp_declare_target.
	gcc/testsuite/
	PR fortran/72741
	* c-c++-common/goacc/routine-3-extern.c: New file.
	* c-c++-common/goacc/routine-3.c: Adjust.
	* c-c++-common/goacc/routine-4-extern.c: New file.
	* c-c++-common/goacc/routine-4.c: Adjust.
	* gfortran.dg/goacc/routine-module-3.f90: New file.
	* gfortran.dg/goacc/routine-external-level-of-parallelism-1.f: New
	file.
	* gfortran.dg/goacc/routine-external-level-of-parallelism-2.f:
	Likewise.

Co-Authored-By: Cesar Philippidis <cesar@codesourcery.com>

From-SVN: r269858
2019-03-21 21:13:44 +01:00
Thomas Schwinge
f6bf4bc14d [PR89773] Fortran OpenACC 'routine' directive refuses procedures with implicit EXTERNAL attribute
gcc/fortran/
	PR fortran/89773
	* gfortran.h (gfc_oacc_routine_name): Add loc member.
	(gfc_resolve_oacc_routines): Declare.
	* openmp.c (gfc_match_oacc_routine): Move some error checking
	into...
	(gfc_resolve_oacc_routines): ... this new function.
	* resolve.c (resolve_codes): Call it.
	gcc/testsuite/
	PR fortran/89773
	* gfortran.dg/goacc/pr89773.f90: New file.
	* gfortran.dg/goacc/pr77765.f90: Adjust.
	* gfortran.dg/goacc/routine-6.f90: Adjust, and extend.

From-SVN: r269857
2019-03-21 21:02:42 +01:00
Thomas Schwinge
8ced98c643 [PR72741] The name in a Fortran OpenACC 'routine' directive refers to the containing subroutine or function
gcc/fortran/
	PR fortran/72741
	* openmp.c (gfc_match_oacc_routine): Clarify.
	gcc/testsuite/
	PR fortran/72741
	* gfortran.dg/goacc/routine-module-mod-1.f90: Update.

From-SVN: r269856
2019-03-21 20:54:51 +01:00
Thomas Schwinge
64a40f1320 [PR72741] Encode OpenACC 'routine' directive's level of parallelism inside Fortran module files
If 'use'ing with an old GCC a new module file (with OpenACC 'routine'
directive's level of parallelism encoded), then that expectedly fails as
follows:

    f951: Fatal Error: Reading module 'routine_module_mod_1' at line 27 column 21: find_enum(): Enum not found

If 'use'ing with a new GCC an old module file (without OpenACC 'routine'
directive's level of parallelism encoded), then that (silently) continues to
accept the module file, and will proceed with the previous, erroneous behavior.

These seem to be acceptable compromises, instead of incrementing 'MOD_VERSION'.

	gcc/fortran/
	PR fortran/72741
	* module.c (verify_OACC_ROUTINE_LOP_NONE): New function.
	(enum ab_attribute): Add AB_OACC_ROUTINE_LOP_GANG,
	AB_OACC_ROUTINE_LOP_WORKER, AB_OACC_ROUTINE_LOP_VECTOR,
	AB_OACC_ROUTINE_LOP_SEQ.
	(attr_bits): Add these.
	(mio_symbol_attribute): Handle these.
	gcc/testsuite/
	PR fortran/72741
	* gfortran.dg/goacc/routine-module-1.f90: New file.
	* gfortran.dg/goacc/routine-module-2.f90: Likewise.
	* gfortran.dg/goacc/routine-module-mod-1.f90: Likewise.

From-SVN: r269855
2019-03-21 20:44:45 +01:00
Thomas Schwinge
33fc9dc962 [testsuite, Fortran] Provide 'dg-compile-aux-modules' in 'gfortran.dg/goacc/goacc.exp'
..., as yet another copy from 'gfortran.dg/dg.exp', which there are a few
already.

	gcc/testsuite/
	* gfortran.dg/goacc/goacc.exp (dg-compile-aux-modules): New proc.

From-SVN: r269854
2019-03-21 20:44:34 +01:00
Thomas Schwinge
a77457430e [testsuite] Fix 'dg-compile-aux-modules' diagnostic
gcc/testsuite/
	PR fortran/56408
	* gcc.target/powerpc/ppc-fortran/ppc-fortran.exp
	(dg-compile-aux-modules): Fix diagnostic.
	* gfortran.dg/coarray/caf.exp (dg-compile-aux-modules): Likewise.
	* gfortran.dg/dg.exp (dg-compile-aux-modules): Likewise.

From-SVN: r269851
2019-03-21 20:29:57 +01:00
Thomas Schwinge
4c1595d236 [testsuite, Fortran] Apply DejaGnu 1.4.4 work-around also to 'gfortran.dg/coarray/caf.exp:dg-compile-aux-modules'
See trunk r215293.  This unifies all 'dg-compile-aux-modules' instances.

	gcc/testsuite/
	PR fortran/56408
	* gfortran.dg/coarray/caf.exp (dg-compile-aux-modules): Workaround
	missing nexted dg-test call support in dejaGNU 1.4.4.

From-SVN: r269848
2019-03-21 20:16:29 +01:00
Thomas Schwinge
bcb68daa54 [testsuite, Fortran] Consistently set 'DEFAULT_FFLAGS'
In the same 'runtest' instance, 'global' variables persist from one '*.exp'
file to another.

All other '*.exp' files are using " -pedantic-errors" instead of the empty
string as the default for 'DEFAULT_FFLAGS'.  Thus this setting of
'DEFAULT_FFLAGS' is not idempotent, depends on whether
'gfortran.dg/ieee/ieee.exp', or an other defining '*.exp' file is executed
first.

	gcc/testsuite/
	PR fortran/29383
	* gfortran.dg/ieee/ieee.exp (DEFAULT_FFLAGS): Set the same as in
	other '*.exp' files.

From-SVN: r269845
2019-03-21 19:54:50 +01:00
Ian Lance Taylor
cae1a424cd compiler: add a newline to function receiver type's debug dump
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/168408

From-SVN: r269841
2019-03-21 16:22:56 +00:00
Richard Biener
6d1a7fd450 re PR middle-end/89779 (internal compiler error: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in tree_nop_conversion_p, at tree.c:12798)
2019-03-21  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/89779
	* tree.c (tree_nop_conversion): Consolidate and fix defensive
	checks with respect to released SSA names now having error_mark_node
	type.
	* fold-const.c (operand_equal_p): Likewise.

	* gcc.dg/torture/pr89779.c: New testcase.

From-SVN: r269838
2019-03-21 14:27:32 +00:00
Jonathan Wakely
e2186cd88e In C++17 <math.h> should not put special functions in global namespace
IS 29124 8.2 [sf.mathh] says that <math.h> should add the names of the
special functions to the global namespace.  However, C++17 Annex D
[depr.c.headers] excludes those functions explicitly, so they should not
be placed in the global namespace unconditionally for C++17.

Only add them to the global namespace when IS 29124 is explicitly
requested via the __STDCPP_WANT_MATH_SPEC_FUNCS__ macro.

	* include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
	(assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
	(assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
	(comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
	(comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
	(cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
	(cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
	(cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
	(ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
	(ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
	(hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
	(legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
	(sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
	(sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
	when the special functions IS is enabled, not for C++17.
	* testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
	Replace with ...
	* testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
	without checks for special functions in C++17.
	* testsuite/26_numerics/headers/cmath/special_functions_global.cc:
	New test.

From-SVN: r269837
2019-03-21 14:03:56 +00:00
Jonathan Wakely
42d9f14bab PR libstdc++/88066 Use <> for includes not ""
These headers were missed in the previous commit for this bug.

There are also several "" includes in the profile mode headers, but
because they're deprecated I'm not fixing them.

	* include/backward/hash_map: Use <> for includes not "".
	* include/backward/hash_set: Likewise.
	* include/backward/strstream: Likewise.
	* include/tr1/bessel_function.tcc: Likewise.
	* include/tr1/exp_integral.tcc: Likewise.
	* include/tr1/legendre_function.tcc: Likewise.
	* include/tr1/modified_bessel_func.tcc: Likewise.
	* include/tr1/riemann_zeta.tcc: Likewise.

From-SVN: r269835
2019-03-21 12:07:10 +00:00
Paolo Carlini
6f5df5fdf8 re PR c++/78645 (ICE on invalid code (Segmentation fault, cxx_eval_call_expression))
2019-03-21  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/78645
	* g++.dg/cpp0x/constexpr-ice20.C: New.

From-SVN: r269834
2019-03-21 12:05:32 +00:00
Paolo Carlini
c6ecc13a07 re PR c++/89571 (ICE in nothrow_spec_p, at cp/except.c:1238)
/cp
2019-03-21  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/89571
	* method.c (after_nsdmi_defaulted_late_checks): Avoid passing
	error_mark_node to comp_except_specs.

/testsuite
2019-03-21  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/89571
	* g++.dg/cpp0x/noexcept37.C: New.

From-SVN: r269832
2019-03-21 01:03:30 +00:00
GCC Administrator
2aecb44b40 Daily bump.
From-SVN: r269831
2019-03-21 00:16:12 +00:00
Iain Buclaw
9dddefefdf d: Fix ICE force_type_die, at dwarf2out.c using nested types
In functions whose return type is instantiated from a nested template,
make sure that all members of the instance are emitted before finishing
the outer function, otherwise they will be removed during the
prune_unused_types pass.

gcc/d/ChangeLog:

2019-03-21  Iain Buclaw  <ibuclaw@gdcproject.org>

	PR d/89017
	* d-codegen.cc (d_decl_context): Skip over template instances when
	finding the context.
	* decl.cc (DeclVisitor::visit(TemplateDeclaration)): New override.
	(build_type_decl): Include parameters in name of template types.

gcc/testsuite/ChangeLog:

2019-03-21  Iain Buclaw  <ibuclaw@gdcproject.org>

	PR d/89017
	* gdc.dg/pr89017.d: New test.

From-SVN: r269828
2019-03-20 23:52:48 +00:00
Janus Weil
5d2df818b7 re PR fortran/71861 ([F03] ICE in write_symbol(): bad module symbol)
fix PR 71861

2019-03-20  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/71861
	* symbol.c (check_conflict): ABSTRACT attribute conflicts with
	INTRINSIC attribute.

2019-03-20  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/71861
	* gfortran.dg/interface_abstract_5.f90: New test case.

From-SVN: r269827
2019-03-20 22:32:23 +01:00
Jason Merrill
292a8bbb27 PR c++/87480 - decltype of member access in default template arg
The issue here is that declval<T>().d is considered instantiation-dependent
within a template, as the access to 'd' might depend on the particular
specialization.  But when we're deducing template arguments for a call, we
know that the call and the arguments are non-dependent, so we can do the
substitution as though we aren't in a template.  Which strictly speaking we
aren't, since the default argument is considered a separate definition.

	* pt.c (type_unification_real): Accept a dependent result in
	template context.

From-SVN: r269826
2019-03-20 16:31:40 -04:00
Andreas Krebbel
3ad7fed1cc S/390: Fix PR89775. Stackpointer save/restore instructions removed
Even if a global register is being clobbered in a function we usually
do not save and restore it. However, we still have to do this if it is
a special register. Most of the places in the backend handle this
correctly but not the prologue/epilogue optimization.

gcc/ChangeLog:

2019-03-20  Andreas Krebbel  <krebbel@linux.ibm.com>

	PR target/89775
	* config/s390/s390.c (global_not_special_regno_p): Move to make it
	available to ...
	(s390_optimize_register_info): Use global_not_special_regno_p to
	check for global regs.

2019-03-20  Jakub Jelinek  <jakub@redhat.com>

	PR target/89775
	* gcc.target/s390/pr89775-1.c: New test.
	* gcc.target/s390/pr89775-2.c: New test.

From-SVN: r269823
2019-03-20 15:28:38 +00:00
Jakub Jelinek
a5b821e448 re PR target/89752 (ICE in emit_move_insn, at expr.c:3723)
PR target/89752
	* lra-constraints.c (process_alt_operands) <reg>: For BLKmode, don't
	update this_alternative nor this_alternative_set.

	* g++.target/aarch64/aarch64.exp: New file.
	* g++.target/aarch64/pr89752.C: New test.

From-SVN: r269819
2019-03-20 12:26:42 +01:00
GCC Administrator
7f129d6f16 Daily bump.
From-SVN: r269817
2019-03-20 00:16:16 +00:00
Martin Sebor
bec1da64ae PR tree-optimization/89688 - -Wstringop-overflow confused by const 2D array of char
gcc/c/ChangeLog:

	PR tree-optimization/89688
	* c-decl.c (finish_decl): Call braced_lists_to_string for more
	kinds of initializers.

gcc/c-family/ChangeLog:

	PR tree-optimization/89688
	* c-common.c (braced_list_to_string): Make static.
	(braced_lists_to_strings): Define new function.
	* c-common.h (braced_list_to_string): Remove.
	(braced_lists_to_strings): Declare.

gcc/cp/ChangeLog:

	PR tree-optimization/89688
	* typeck2.c (store_init_value): Call braced_lists_to_string for more
	kinds of initializers.

gcc/testsuite/ChangeLog:

	PR tree-optimization/89688
	* gcc.dg/strlenopt-61.c: New test.
	* g++.dg/warn/Wstringop-overflow-2.C: New test.

From-SVN: r269814
2019-03-19 16:43:10 -06:00
Jim Wilson
026216a753 RISC-V: Fix %lo overflow with BLKmode references.
gcc/
	PR target/89411
	* config/riscv/riscv.c (riscv_valid_lo_sum_p): New arg x.  New locals
	align, size, offset.  Use them to handle a BLKmode reference.  Update
	comment.
	(riscv_classify_address): Pass info->offset to riscv_valid_lo_sum_p.

	gcc/testsuite/
	PR target/89411
	* gcc.target/riscv/losum-overflow.c: New test.

From-SVN: r269813
2019-03-19 15:33:34 -07:00
Jakub Jelinek
2a23a1c39f re PR rtl-optimization/89768 (ICE in compare_and_jump_seq at loop-unroll.c:838)
PR rtl-optimization/89768
	* loop-unroll.c (unroll_loop_constant_iterations): Use gen_int_mode
	instead of GEN_INT.
	(unroll_loop_runtime_iterations): Likewise.

From-SVN: r269812
2019-03-19 20:04:14 +01:00
Ian Lance Taylor
ea5ac5a69b compiler,runtime: pass old slice's ptr/len/cap by value to growslice
In the C calling convention, on AMD64, and probably a number of
    other architectures, a 3-word struct argument is passed on stack.
    This is less efficient than passing in three registers. Further,
    this may affect the code generation in other part of the program,
    even if the function is not actually called.
    
    Slices are common in Go and append is a common slice operation,
    which calls growslice in the growing path. To improve the code
    generation, pass the slice header's three fields as separate
    values, instead of a struct, to growslice.
    
    The drawback is that this makes the runtime implementation
    slightly diverges from the gc runtime.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/168277

From-SVN: r269811
2019-03-19 18:42:43 +00:00
Martin Sebor
e074803086 PR tree-optimization/89644 - false-positive -Warray-bounds on strncpy with unterminated array
gcc/ChangeLog:
	* tree-ssa-strlen.c (handle_builtin_stxncpy): Use full_string_p
	rather than endptr as an indicator of nul-termination.

From-SVN: r269809
2019-03-19 12:35:42 -06:00
Martin Sebor
e3ba46bd52 PR tree-optimization/89644 - False-positive -Warray-bounds diagnostic on strncpy
gcc/ChangeLog:

	PR tree-optimization/89644
	* tree-ssa-strlen.c (handle_builtin_stxncpy): Consider unterminated
	arrays in determining sequence sizes in strncpy and stpncpy.

gcc/testsuite/ChangeLog:

	PR tree-optimization/89644
	* gcc.dg/Wstringop-truncation-8.c: New test.

From-SVN: r269807
2019-03-19 11:45:34 -06:00
Martin Liska
2214085aff Fix set of even probabilities (PR middle-end/89737).
2019-03-19  Martin Liska  <mliska@suse.cz>

	PR middle-end/89737
	* predict.c (combine_predictions_for_bb): Empty likely_edges and
	unlikely_edges if there's an edge that belongs to both these sets.
2019-03-19  Martin Liska  <mliska@suse.cz>

	PR middle-end/89737
	* gcc.dg/pr89737.c: New test.

From-SVN: r269804
2019-03-19 17:08:28 +00:00
Segher Boessenkool
e8926ce09f rs6000: Unaligned stfiwx on older CPUs (PR89746)
The "classic" PowerPCs (6xx/7xx) are not STRICT_ALIGNMENT, but their
floating point units are.  This is not normally a problem, the ABIs
make everything FP aligned.  The RTL patterns converting FP to integer
however get a potentially unaligned destination, and we do not want to
do an stfiwx on that on such older CPUs.

This fixes it.  It does not change anything for TARGET_MFCRF targets
(POWER4 and later).  It also won't change anything for strict-alignment
targets, or CPUs without hardware FP of course, or CPUs that do not
implement stfiwx (older 4xx/5xx/8xx).

It does not change the corresponding fixuns* pattern, because that can
not be enabled on any CPU that cannot handle unaligned FP well.


	PR target/89746
	* config/rs6000/rs6000.md (fix_trunc<mode>si2_stfiwx): If we have a
	non-TARGET_MFCRF target, and the dest is memory but not 32-bit aligned,
	go via a stack temporary.

From-SVN: r269802
2019-03-19 17:58:42 +01:00
Jakub Jelinek
bb48c402f4 re PR target/89378 ([MIPS] FAIL: gcc.dg/vect/pr88598-3.c -mmsa (internal compiler error))
PR target/89378
	* config/mips/mips.c (mips_expand_vec_cond_expr): Use gen_lowpart
	instead of gen_rtx_SUBREG.
	* config/mips/mips-msa.md (vec_extract<mode><unitmode>): Likewise.

From-SVN: r269801
2019-03-19 17:10:59 +01:00
Richard Biener
22fdf6af14 re PR debug/88389 (-flto -g -gsplit-dwarf is broken)
2019-03-19  Richard Biener  <rguenther@suse.de>

	PR debug/88389
	* opts.c (finish_options): Disable -gsplit-dwarf when doing LTO.

From-SVN: r269800
2019-03-19 14:57:18 +00:00
Jan Hubicka
2ca6d1813e re PR lto/87089 (tree check: expected class 'type', have 'declaration' (namespace_decl) in type_with_linkage_p, at ipa-utils.h)
PR lto/87809
	PR lto/89335
	* tree.c (free_lang_data_in_decl): Do not free context of C++
	destrutors.

	* g++.dg/lto/pr87089_0.C: New testcase.
	* g++.dg/lto/pr87089_1.C: New testcase.
	* g++.dg/lto/pr89335_0.C: New testcase.

From-SVN: r269799
2019-03-19 14:53:43 +00:00
Ian Lance Taylor
9195aa172b libgo: fix build on AIX
Since aix/ppc64 has been added to GC toolchain, a mix between new and
    old files were created in gcc toolchain.
    This commit corrects this merge for aix/ppc64 and aix/ppc.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/167658

From-SVN: r269797
2019-03-19 14:00:59 +00:00
Kelvin Nilsen
3b595ecaed re PR target/89736 (New test pr87532-mc.c fails on compiler not defaulting to VSX)
gcc/testsuite/ChangeLog:

2019-03-19  Kelvin Nilsen  <kelvin@gcc.gnu.org>

	PR target/89736
	* gcc.target/powerpc/pr87532-mc.c: Modify dejagnu directives to
	restrict this test to vsx targets.

From-SVN: r269796
2019-03-19 13:44:03 +00:00
Jakub Jelinek
1504f0b4b1 re PR target/89506 (ICE: in decompose, at rtl.h:2266 with -Og -g)
PR target/89506
	* config/arm/arm.md (cmpsi2_addneg): Swap the alternatives and use
	subs for the first alternative except when operands[3] is 1.

From-SVN: r269795
2019-03-19 11:05:10 +01:00
Jonathan Wakely
cad3fc8c59 Update libstdc++ API Evolution documentation
* doc/xml/manual/allocator.xml: Link to table documenting evolution
	of extension allocators.
	* doc/xml/manual/evolution.xml: Use angle brackets for header names.
	Document new headers in 7.2, 8.1 and 9.1 releases.
	* doc/xml/manual/using.xml: Adjust link target for new_allocator.
	* doc/html/*: Regenerate.

From-SVN: r269794
2019-03-19 09:38:41 +00:00
Jakub Jelinek
edff2a0574 re PR target/89752 (ICE in emit_move_insn, at expr.c:3723)
PR target/89752
	* gimplify.c (gimplify_asm_expr): For output argument with
	TREE_ADDRESSABLE type, clear allows_reg if it allows memory, otherwise
	diagnose error.

	* g++.dg/ext/asm15.C: Check for particular diagnostic wording.
	* g++.dg/ext/asm16.C: Likewise.
	* g++.dg/ext/asm17.C: New test.

From-SVN: r269793
2019-03-19 09:11:25 +01:00