]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
5 years ago[libphobos] Update info about required autotools versions
jpfau [Sat, 23 Mar 2019 15:07:25 +0000 (15:07 +0000)] 
[libphobos] Update info about required autotools versions

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269888 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[libphobos] Update MERGE file, remove ill-formatted changelog entry
jpfau [Sat, 23 Mar 2019 15:07:16 +0000 (15:07 +0000)] 
[libphobos] Update MERGE file, remove ill-formatted changelog entry

Changelog entries are not required for upstream merges.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269887 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[AARCH64] Fix zero_extendsidi2_aarch64 type attribute
pinskia [Sat, 23 Mar 2019 00:22:33 +0000 (00:22 +0000)] 
[AARCH64] Fix zero_extendsidi2_aarch64 type attribute

2019-03-22  Andrew Pinski  <apinski@marvell.com>

        * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Fix type
        attrribute for uxtw.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269886 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoDaily bump.
gccadmin [Sat, 23 Mar 2019 00:16:25 +0000 (00:16 +0000)] 
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269885 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * gcc.pot: Regenerate.
jsm28 [Fri, 22 Mar 2019 21:59:36 +0000 (21:59 +0000)] 
* gcc.pot: Regenerate.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269882 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoRemove broken links from libstdc++ manual to Doxygen pages
redi [Fri, 22 Mar 2019 20:57:35 +0000 (20:57 +0000)] 
Remove broken links from libstdc++ manual to Doxygen pages

The Doxygen docs do not have stable URLs, so linking to specific pages
doesn't work well.

* doc/xml/manual/backwards_compatibility.xml: Remove link to
Doxygen-generated pages with unstable URL.
* doc/xml/manual/concurrency_extensions.xml: Likewise.
* doc/xml/manual/extensions.xml: Likewise.
* doc/xml/manual/parallel_mode.xml: Likewise.
* doc/xml/manual/support.xml: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269881 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR rtl-optimization/87761
law [Fri, 22 Mar 2019 18:14:56 +0000 (18:14 +0000)] 
PR rtl-optimization/87761
* config/mips/mips-protos.h (mips_split_move): Add new argument.
(mips_emit_move_or_split): Pass NULL for INSN into mips_split_move.
(mips_split_move): Accept new INSN argument.  Try to forward SRC
into the next instruction.
(mips_split_move_insn): Pass INSN through to mips_split_move.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269880 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago2019-03-22 Vladimir Makarov <vmakarov@redhat.com>
vmakarov [Fri, 22 Mar 2019 16:59:21 +0000 (16:59 +0000)] 
2019-03-22  Vladimir Makarov  <vmakarov@redhat.com>

PR rtl-optimization/89676
* lra-constraints.c (curr_insn_transform): Do match reload for
early clobbers even if the match was successful.

2019-03-22  Vladimir Makarov  <vmakarov@redhat.com>

PR rtl-optimization/89676
* gcc.target/i386/pr89676.c: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269878 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoAvoid -Wconversion warnings when -Wsystem-headers is used
redi [Fri, 22 Mar 2019 16:45:48 +0000 (16:45 +0000)] 
Avoid -Wconversion warnings when -Wsystem-headers is used

* include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
avoid -Wconversion warnings.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269876 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR c++/60702
jakub [Fri, 22 Mar 2019 14:42:57 +0000 (14:42 +0000)] 
PR c++/60702
* cp-tree.h (get_tls_wrapper_fn): Remove declaration.
(maybe_get_tls_wrapper_call): Declare.
* decl2.c (get_tls_wrapper_fn): Make static.
(maybe_get_tls_wrapper_call): New function.
* typeck.c (build_class_member_access_expr): Handle accesses to TLS
variables.
* semantics.c (finish_qualified_id_expr): Likewise.
(finish_id_expression_1): Use maybe_get_tls_wrapper_call.
* pt.c (tsubst_copy_and_build): Likewise.

* g++.dg/tls/thread_local11.C: New test.
* g++.dg/tls/thread_local11.h: New test.
* g++.dg/tls/thread_local12a.C: New test.
* g++.dg/tls/thread_local12b.C: New test.
* g++.dg/tls/thread_local12c.C: New test.
* g++.dg/tls/thread_local12d.C: New test.
* g++.dg/tls/thread_local12e.C: New test.
* g++.dg/tls/thread_local12f.C: New test.
* g++.dg/tls/thread_local12g.C: New test.
* g++.dg/tls/thread_local12h.C: New test.
* g++.dg/tls/thread_local12i.C: New test.
* g++.dg/tls/thread_local12j.C: New test.
* g++.dg/tls/thread_local12k.C: New test.
* g++.dg/tls/thread_local12l.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269875 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR c++/87481
jakub [Fri, 22 Mar 2019 14:40:59 +0000 (14:40 +0000)] 
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269874 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[Ada] GNAT.Sockets: fix recent regressions
pmderodat [Fri, 22 Mar 2019 13:59:02 +0000 (13:59 +0000)] 
[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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269873 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[gcc]
wschmidt [Fri, 22 Mar 2019 13:49:18 +0000 (13:49 +0000)] 
[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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269871 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * config/i386/sse.md (<avx512>_fmadd_<mode>_mask3<round_name>,
jakub [Fri, 22 Mar 2019 12:58:09 +0000 (12:58 +0000)] 
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269870 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * config/i386/sse.md (<avx512>_fmadd_<mode>_mask<round_name>,
jakub [Fri, 22 Mar 2019 10:12:18 +0000 (10:12 +0000)] 
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269869 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR target/89784
jakub [Fri, 22 Mar 2019 10:08:40 +0000 (10:08 +0000)] 
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269868 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoPR tree-optimization/89350 - Wrong -Wstringop-overflow= warning since r261518
msebor [Fri, 22 Mar 2019 02:58:27 +0000 (02:58 +0000)] 
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269867 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoDaily bump.
gccadmin [Fri, 22 Mar 2019 00:16:26 +0000 (00:16 +0000)] 
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269866 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoIntegrate C++17 parallel algorithms
redi [Thu, 21 Mar 2019 23:48:49 +0000 (23:48 +0000)] 
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269863 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR lto/89692
jakub [Thu, 21 Mar 2019 22:04:29 +0000 (22:04 +0000)] 
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269862 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR c++/71446
jakub [Thu, 21 Mar 2019 22:03:07 +0000 (22:03 +0000)] 
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269861 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR c++/89767
jakub [Thu, 21 Mar 2019 22:01:02 +0000 (22:01 +0000)] 
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269860 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * hash-table.h (hash_table): Add Lazy template parameter defaulted
jakub [Thu, 21 Mar 2019 22:00:04 +0000 (22:00 +0000)] 
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269859 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[PR72741] Properly handle clauses specifying the level of parallelism for 'external...
tschwinge [Thu, 21 Mar 2019 20:13:44 +0000 (20:13 +0000)] 
[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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269858 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[PR89773] Fortran OpenACC 'routine' directive refuses procedures with implicit EXTERN...
tschwinge [Thu, 21 Mar 2019 20:02:42 +0000 (20:02 +0000)] 
[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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269857 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[PR72741] The name in a Fortran OpenACC 'routine' directive refers to the containing...
tschwinge [Thu, 21 Mar 2019 19:54:51 +0000 (19:54 +0000)] 
[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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269856 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[PR72741] Encode OpenACC 'routine' directive's level of parallelism inside Fortran...
tschwinge [Thu, 21 Mar 2019 19:44:45 +0000 (19:44 +0000)] 
[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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269855 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[testsuite, Fortran] Provide 'dg-compile-aux-modules' in 'gfortran.dg/goacc/goacc...
tschwinge [Thu, 21 Mar 2019 19:44:34 +0000 (19:44 +0000)] 
[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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269854 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[testsuite] Fix 'dg-compile-aux-modules' diagnostic
tschwinge [Thu, 21 Mar 2019 19:29:57 +0000 (19:29 +0000)] 
[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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269851 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[testsuite, Fortran] Apply DejaGnu 1.4.4 work-around also to 'gfortran.dg/coarray...
tschwinge [Thu, 21 Mar 2019 19:16:29 +0000 (19:16 +0000)] 
[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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269848 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[testsuite, Fortran] Consistently set 'DEFAULT_FFLAGS'
tschwinge [Thu, 21 Mar 2019 18:54:50 +0000 (18:54 +0000)] 
[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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269845 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago compiler: add a newline to function receiver type's debug dump
ian [Thu, 21 Mar 2019 16:22:56 +0000 (16:22 +0000)] 
compiler: add a newline to function receiver type's debug dump

    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/168408

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269841 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago2019-03-21 Richard Biener <rguenther@suse.de>
rguenth [Thu, 21 Mar 2019 14:27:32 +0000 (14:27 +0000)] 
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269838 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoIn C++17 <math.h> should not put special functions in global namespace
redi [Thu, 21 Mar 2019 14:03:56 +0000 (14:03 +0000)] 
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269837 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoPR libstdc++/88066 Use <> for includes not ""
redi [Thu, 21 Mar 2019 12:07:10 +0000 (12:07 +0000)] 
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269835 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago2019-03-21 Paolo Carlini <paolo.carlini@oracle.com>
paolo [Thu, 21 Mar 2019 12:05:32 +0000 (12:05 +0000)] 
2019-03-21  Paolo Carlini  <paolo.carlini@oracle.com>

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269834 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago/cp
paolo [Thu, 21 Mar 2019 01:03:30 +0000 (01:03 +0000)] 
/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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269832 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoDaily bump.
gccadmin [Thu, 21 Mar 2019 00:16:12 +0000 (00:16 +0000)] 
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269831 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agod: Fix ICE force_type_die, at dwarf2out.c using nested types
ibuclaw [Wed, 20 Mar 2019 23:52:48 +0000 (23:52 +0000)] 
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269828 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agofix PR 71861
janus [Wed, 20 Mar 2019 21:32:23 +0000 (21:32 +0000)] 
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269827 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR c++/87480 - decltype of member access in default template arg
jason [Wed, 20 Mar 2019 20:31:40 +0000 (20:31 +0000)] 
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269826 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoS/390: Fix PR89775. Stackpointer save/restore instructions removed
krebbel [Wed, 20 Mar 2019 15:28:38 +0000 (15:28 +0000)] 
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269823 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR target/89752
jakub [Wed, 20 Mar 2019 11:26:42 +0000 (11:26 +0000)] 
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269819 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoDaily bump.
gccadmin [Wed, 20 Mar 2019 00:16:16 +0000 (00:16 +0000)] 
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269817 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoPR tree-optimization/89688 - -Wstringop-overflow confused by const 2D array of char
msebor [Tue, 19 Mar 2019 22:43:10 +0000 (22:43 +0000)] 
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269814 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoRISC-V: Fix %lo overflow with BLKmode references.
wilson [Tue, 19 Mar 2019 22:33:34 +0000 (22:33 +0000)] 
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269813 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR rtl-optimization/89768
jakub [Tue, 19 Mar 2019 19:04:14 +0000 (19:04 +0000)] 
PR rtl-optimization/89768
* loop-unroll.c (unroll_loop_constant_iterations): Use gen_int_mode
instead of GEN_INT.
(unroll_loop_runtime_iterations): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269812 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago compiler,runtime: pass old slice's ptr/len/cap by value to growslice
ian [Tue, 19 Mar 2019 18:42:43 +0000 (18:42 +0000)] 
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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269811 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoPR tree-optimization/89644 - false-positive -Warray-bounds on strncpy with unterminat...
msebor [Tue, 19 Mar 2019 18:35:42 +0000 (18:35 +0000)] 
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269809 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoPR tree-optimization/89644 - False-positive -Warray-bounds diagnostic on strncpy
msebor [Tue, 19 Mar 2019 17:45:34 +0000 (17:45 +0000)] 
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269807 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoFix set of even probabilities (PR middle-end/89737).
marxin [Tue, 19 Mar 2019 17:08:28 +0000 (17:08 +0000)] 
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269804 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agors6000: Unaligned stfiwx on older CPUs (PR89746)
segher [Tue, 19 Mar 2019 16:58:42 +0000 (16:58 +0000)] 
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269802 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR target/89378
jakub [Tue, 19 Mar 2019 16:10:59 +0000 (16:10 +0000)] 
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269801 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago2019-03-19 Richard Biener <rguenther@suse.de>
rguenth [Tue, 19 Mar 2019 14:57:18 +0000 (14:57 +0000)] 
2019-03-19  Richard Biener  <rguenther@suse.de>

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269800 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR lto/87809
hubicka [Tue, 19 Mar 2019 14:53:43 +0000 (14:53 +0000)] 
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269799 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago libgo: fix build on AIX
ian [Tue, 19 Mar 2019 14:00:59 +0000 (14:00 +0000)] 
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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269797 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agogcc/testsuite/ChangeLog:
kelvin [Tue, 19 Mar 2019 13:44:03 +0000 (13:44 +0000)] 
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269796 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR target/89506
jakub [Tue, 19 Mar 2019 10:05:10 +0000 (10:05 +0000)] 
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269795 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoUpdate libstdc++ API Evolution documentation
redi [Tue, 19 Mar 2019 09:38:41 +0000 (09:38 +0000)] 
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269794 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR target/89752
jakub [Tue, 19 Mar 2019 08:11:25 +0000 (08:11 +0000)] 
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269793 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR rtl-optimization/89753
ebotcazou [Tue, 19 Mar 2019 08:06:48 +0000 (08:06 +0000)] 
PR rtl-optimization/89753
* loop-unroll.c (decide_unroll_constant_iterations): Make guard for
explicit unrolling factor even more robust.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269791 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR target/89726
jakub [Tue, 19 Mar 2019 07:25:59 +0000 (07:25 +0000)] 
PR target/89726
* config/i386/i386.c (ix86_expand_floorceildf_32): In ceil
compensation use x2 += 1 instead of x2 -= -1 and when honoring
signed zeros, do another copysign after the compensation.

* gcc.target/i386/fpprec-1.c (x): Add 6 new constants.
(expect_round, expect_rint, expect_floor, expect_ceil, expect_trunc):
Add expected results for them.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269790 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR c/89734
jakub [Tue, 19 Mar 2019 06:55:31 +0000 (06:55 +0000)] 
PR c/89734
* c-decl.c (grokdeclarator): Call c_build_qualified_type on function
return type even if quals_used is 0.  Formatting fixes.

* gcc.dg/pr89734.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269789 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoDaily bump.
gccadmin [Tue, 19 Mar 2019 00:16:11 +0000 (00:16 +0000)] 
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269788 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoPR tree-optimization/89720 - Spurious -Warray-bounds warning on a range with max...
msebor [Mon, 18 Mar 2019 23:48:50 +0000 (23:48 +0000)] 
PR tree-optimization/89720 - Spurious -Warray-bounds warning on a range with max < min

gcc/ChangeLog:

PR tree-optimization/89720
* tree-vrp.c (vrp_prop::check_mem_ref): Treat range with max < min
more conservatively, the same as anti-range.

gcc/testsuite/ChangeLog:

PR tree-optimization/89720
* gcc.dg/Warray-bounds-42.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269785 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agomh-mingw: Also set __USE_MINGW_ACCESS flag for C++ code.
jyong [Mon, 18 Mar 2019 22:36:56 +0000 (22:36 +0000)] 
mh-mingw: Also set __USE_MINGW_ACCESS flag for C++ code.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269784 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * sv.po: Update.
jsm28 [Mon, 18 Mar 2019 21:36:44 +0000 (21:36 +0000)] 
* sv.po: Update.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269783 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoAdd a test for PR c++/89630
hjl [Mon, 18 Mar 2019 21:22:30 +0000 (21:22 +0000)] 
Add a test for PR c++/89630

PR c++/89630
* g++.target/i386/pr89630.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269781 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago libgo: update to Go 1.12.1
ian [Mon, 18 Mar 2019 20:27:59 +0000 (20:27 +0000)] 
libgo: update to Go 1.12.1

    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/167749

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269780 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoRISC-V: Fix testsuite regression caused by quotes around options.
wilson [Mon, 18 Mar 2019 19:45:20 +0000 (19:45 +0000)] 
RISC-V: Fix testsuite regression caused by quotes around options.

2019-03-18  Kito Cheng  <kito.cheng@gmail.com>
* gcc.target/riscv/arch-1.c: Add quotes around march in dg-error.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269779 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR c++/89630 - ICE with dependent using-decl as template arg.
jason [Mon, 18 Mar 2019 19:37:00 +0000 (19:37 +0000)] 
PR c++/89630 - ICE with dependent using-decl as template arg.

Even though these two using-declarations have the same effect, they are not
the same declaration, and we don't need to work to treat them as the same
like we do for typedefs.  If we did need to, we would need to handle them
specially in iterative_hash_template_arg as well as here.

* tree.c (cp_tree_equal): Always return false for USING_DECL.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269777 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR c++/89761 - ICE with sizeof... in pack expansion.
jason [Mon, 18 Mar 2019 19:35:12 +0000 (19:35 +0000)] 
PR c++/89761 - ICE with sizeof... in pack expansion.

In this testcase we get confused when looking at the sizeof... because the
argument pack for 'args' has been wrapped in an ARGUMENT_PACK_SELECT as part
of expanding the fold-expression.  We handle this situation a bit lower down
in tsubst_pack_expansion, but that doesn't help the call to
argument_pack_element_is_expansion_p, which happens earlier.

* pt.c (argument_pack_element_is_expansion_p): Handle
ARGUMENT_PACK_SELECT.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269776 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR c++/89640 - GNU attributes on lambda.
jason [Mon, 18 Mar 2019 19:34:47 +0000 (19:34 +0000)] 
PR c++/89640 - GNU attributes on lambda.

My patch for PR 60503 to fix C++11 attribute parsing on lambdas accidentally
removed support for GNU attributes.

* parser.c (cp_parser_lambda_declarator_opt): Allow GNU attributes.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269775 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agors6000: Fix altivec-7.c testcase
segher [Mon, 18 Mar 2019 17:46:18 +0000 (17:46 +0000)] 
rs6000: Fix altivec-7.c testcase

It currently wants to see lvx insns on AIX, and no lvx insns on Linux.
What is really wanted is lvx insns when no VSX, and lxv* insns if VSX.
This fixes it.

* gcc.target/powerpc/altivec-7.c: Look for lxv* if generating VSX
instructions, and lvx if not.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269772 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agors6000: Use pointers in bswap testcases
segher [Mon, 18 Mar 2019 17:44:56 +0000 (17:44 +0000)] 
rs6000: Use pointers in bswap testcases

Currently these bswap testcases use global variables, which causes
problems with -m32: the memory access is a D-form access, and when
combine tries to combine that with the bswap it tries a D-form store
with byte reverse.  That instruction does not exist, and since combine
started with only two insns here it will not try splitting this.

This should be improved, but it is not what this test is testing, and
the "load" case already uses a pointer, so let's do that for the store
case as well.

* gcc.target/powerpc/bswap16.c: Use a pointer instead of a global for
the "store" test as well.
* gcc.target/powerpc/bswap32.c: Ditto.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269771 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agors6000: Fix pr18096-1.c test
segher [Mon, 18 Mar 2019 17:43:34 +0000 (17:43 +0000)] 
rs6000: Fix pr18096-1.c test

For the big stack frame in the test GCC used to say

pr18096-1.c:7:6: error: total size of local objects too large

but now it says

pr18096-1.c:7:6: error: total size of local objects 2147483647 exceeds maximum 2147483392

Let's just allow both in the test.

gcc/testsuite/
* gcc.target/powerpc/pr18096-1.c: Allow an error message that says
"exceeds" instead of just one that talks about "too large".

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269770 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago2019-03-18 Thomas Koenig <tkoeng@gcc.gnu.org>
tkoenig [Mon, 18 Mar 2019 17:35:54 +0000 (17:35 +0000)] 
2019-03-18  Thomas Koenig  <tkoeng@gcc.gnu.org>

PR fortran/68009
* iresolve.c: Include trans.h.
(gfc_resolve_fe_runtine_error): Set backend_decl on
resolved_sym.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269769 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR c++/89682 - wrong access error in default argument.
jason [Mon, 18 Mar 2019 15:58:24 +0000 (15:58 +0000)] 
PR c++/89682 - wrong access error in default argument.

Here we were pushing into the right access context, but we were called from
a deferred checking context, so didn't end up doing the checks until after
we left the access context.

* pt.c (tsubst_default_argument): Don't defer access checks.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269766 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago2019-03-18 Richard Biener <rguenther@suse.de>
rguenth [Mon, 18 Mar 2019 13:59:11 +0000 (13:59 +0000)] 
2019-03-18  Richard Biener  <rguenther@suse.de>

PR middle-end/88945
* tree-ssanames.c (release_ssa_name_fn): For released SSA names
use a TREE_TYPE of error_mark_node to avoid ICEs when dumping
basic-blocks that are removed.  Remove restoring SSA_NAME_VAR.
* tree-outof-ssa.c (eliminate_useless_phis): Remove redundant checking.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269765 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoImplement circular print buffer.
ams [Mon, 18 Mar 2019 13:13:27 +0000 (13:13 +0000)] 
Implement circular print buffer.

2019-03-18  Andrew Stubbs  <ams@codesourcery.com>

gcc/
* config/gcn/gcn-run.c (struct output): Make next_output unsigned.
Extend queue to 1024 entries.
Add "consumed" field.
(gomp_print_output): Remove print_index parameter.
Add final parameter.
Change limit to unsigned.
Use consumed field to implement circular buffer.
Detect interrupted print in final pass.
Flush output at the end.
(run): Update gomp_print_output usage.
(main): Initialize kernargs->output_data.consumed.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269764 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoFix a case in which the vector cost model was ignored
rsandifo [Mon, 18 Mar 2019 12:25:32 +0000 (12:25 +0000)] 
Fix a case in which the vector cost model was ignored

This patch fixes a case in which we vectorised something with a
fully-predicated loop even after the cost model had rejected it.
E.g. the loop in the testcase has the costs:

  Vector inside of loop cost: 27
  Vector prologue cost: 0
  Vector epilogue cost: 0
  Scalar iteration cost: 7
  Scalar outside cost: 6
  Vector outside cost: 0
  prologue iterations: 0
  epilogue iterations: 0

and we can see that the loop executes at most three times, but we
decided to vectorise it anyway.

(The costs here are equal for three iterations, but the same thing
happens even when the vector code is strictly more expensive.)

The problem is the handling of "/VF" in:

  /* Calculate number of iterations required to make the vector version
     profitable, relative to the loop bodies only.  The following condition
     must hold true:
     SIC * niters + SOC > VIC * ((niters-PL_ITERS-EP_ITERS)/VF) + VOC
     where
     SIC = scalar iteration cost, VIC = vector iteration cost,
     VOC = vector outside cost, VF = vectorization factor,
     PL_ITERS = prologue iterations, EP_ITERS= epilogue iterations
     SOC = scalar outside cost for run time cost model check.  */

We treat the "/VF" as truncating, but for fully-predicated loops, it's
closer to a ceil division, since fractional iterations are handled by a
full iteration with some predicate bits set to false.

The easiest fix seemed to be to calculate the minimum number of vector
iterations first, then use that to calculate the minimum number of scalar
iterations.

Calculating the minimum number of vector iterations might make sense for
unpredicated loops too, since calculating the scalar niters directly
doesn't take into account the fact that the VIC multiple has to be an
integer.  But the handling of PL_ITERS and EP_ITERS for unpredicated
loops is a bit hand-wavy anyway, so maybe vagueness here cancels out
vagueness there?

Either way, changing this for unpredicated loops would be much too
invasive for stage 4, so the patch keeps it specific to fully-predicated
loops (i.e. SVE) for now.  There's no functional change for other targets.

2019-03-18  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* tree-vect-loop.c (vect_estimate_min_profitable_iters): Fix the
calculation of the minimum number of scalar iterations for
fully-predicated loops.

gcc/testsuite/
* gcc.target/aarch64/sve/cost_model_1.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269763 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoAdd forgotten requeing in propagate_subaccesses_across_link
jamborm [Mon, 18 Mar 2019 11:28:01 +0000 (11:28 +0000)] 
Add forgotten requeing in propagate_subaccesses_across_link

2019-03-18  Martin Jambor  <mjambor@suse.cz>

PR tree-optimization/89546
* tree-sra.c (propagate_subaccesses_across_link): Requeue new_acc if
any propagation to its children took place.

testsuite/
* gcc.dg/tree-ssa/pr89546.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269761 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agogcc/riscv: Correctly ignore empty C++ structs when flattening for ABI
aburgess [Mon, 18 Mar 2019 10:42:53 +0000 (10:42 +0000)] 
gcc/riscv: Correctly ignore empty C++ structs when flattening for ABI

This fixes PR target/89627.

The RISC-V ABI document[1] says:

   For the purposes of this section, "struct" refers to a C struct
   with its hierarchy flattened, including any array fields. That is,
   struct { struct { float f[1]; } g[2]; } and struct { float f; float
   g; } are treated the same. Fields containing empty structs or
   unions are ignored while flattening, even in C++, unless they have
   nontrivial copy constructors or destructors.

However, this flattening only applies when one of the fields of the
flattened structure can be placed into a floating point register,
otherwise no flattening occurs.

Currently GCC fails to correctly consider that empty C++ structures
have a non-zero size when constructing the arguments from a flattened
structure, and as a result, trying to pass a C++ structure like this:

  struct sf { struct {} e; float f; };

Doesn't work correctly, GCC fails to take the offset of 'f' within
'sf' into account and will actually pass the space backing 'e' as the
contents of 'f'.

This patch fixes this so that 'f' will be passed correctly.  A couple
of new tests are added to cover this functionality.

[1] https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md

gcc/ChangeLog:

PR target/89627
* config/riscv/riscv.c (riscv_pass_fpr_single): Add offset
parameter, and make use of it.
(riscv_get_arg_info): Pass offset to riscv_pass_fpr_single.

gcc/testsuite/ChangeLog:

PR target/89627
* g++.target/riscv/call-with-empty-struct-float.C: New file.
* g++.target/riscv/call-with-empty-struct-int.C: New file.
* g++.target/riscv/call-with-empty-struct.H: New file.
* g++.target/riscv/riscv.exp: New file.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269760 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago/cp
paolo [Mon, 18 Mar 2019 09:38:27 +0000 (09:38 +0000)] 
/cp
2019-03-18  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/85014
* semantics.c (finish_non_static_data_member): Check return value
of context_for_name_lookup and immediately return error_mark_node
if isn't a type.

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

PR c++/85014
* g++.dg/cpp0x/pr85014.C: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269759 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[ARC] Enable code density frame option for elf targets.
claziss [Mon, 18 Mar 2019 09:28:45 +0000 (09:28 +0000)] 
[ARC] Enable code density frame option for elf targets.

xxxx-xx-xx  Claudiu Zissulescu  <claziss@synopsys.com>

* config/arc/arc.opt (mcode-density-frame): Get the inital value
from TARGET_CODE_DENSITY_FRAME_DEFAULT.
* config/arc/elf.h (TARGET_CODE_DENSITY_FRAME_DEFAULT): Define.
* config/arc/linux.h (TARGET_CODE_DENSITY_FRAME_DEFAULT): Define.
* config/arc/arc.md (pop_multi_fp_blink): Adjust constraints to
match what the ops is doing.
(push_multi_fp_blink): Likewise.
* config/arc/arc.c (arc_override_options): Enable enter/leave when
compiling for size and elf target.
(arc_save_callee_enter): Adjust note to match what enter/leave
operation does.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269758 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[ARC] Fix tst_movb pattern.
claziss [Mon, 18 Mar 2019 09:28:33 +0000 (09:28 +0000)] 
[ARC] Fix tst_movb pattern.

xxxx-xx-xx  Claudiu Zissulescu  <claziss@synopsys.com>

* config/arc/arc.md (tst_movb): Fix constraint.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269757 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[ARC] Define TARGET_HAVE_SPECULATION_SAFE_VALUE.
claziss [Mon, 18 Mar 2019 09:28:22 +0000 (09:28 +0000)] 
[ARC] Define TARGET_HAVE_SPECULATION_SAFE_VALUE.

xxxx-xx-xx  Claudiu Zissulescu  <claziss@synopsys.com>

* config/arc/arc.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269756 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[ARC] Introduce ADJUST_REG_ALLOC_ORDER.
claziss [Mon, 18 Mar 2019 09:28:11 +0000 (09:28 +0000)] 
[ARC] Introduce ADJUST_REG_ALLOC_ORDER.

The ARC port is changing the allocation order in the
arc_conditional_register_usage function, but this is not the proper
way. Thus, we employ ADJUST_REG_ALLOC_ORDER hook for this task.

gcc/
xxxx-xx-xx  Claudiu Zissulescu  <claziss@synopsys.com>

* config/arc/arc-protos.h (arc_adjust_reg_alloc_order): Declare.
* config/arc/arc.c (arc_conditional_register_usage): Remove all
reg_alloc_order references.
(size_alloc_order): Define.
(arc_adjust_reg_alloc_order): New function.
* config/arc/arc.h (REG_ALLOC_ORDER): Proper define the register
order.
(ADJUST_REG_ALLOC_ORDER): Define.
(HONOR_REG_ALLOC_ORDER): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269755 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago2019-03-18 Richard Biener <rguenther@suse.de>
rguenth [Mon, 18 Mar 2019 09:17:43 +0000 (09:17 +0000)] 
2019-03-18  Richard Biener  <rguenther@suse.de>

PR target/87561
* config/i386/i386.c (ix86_add_stmt_cost): Pessimize strided
loads and stores a bit more.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269754 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago2019-03-18 Richard Biener <rguenther@suse.de>
rguenth [Mon, 18 Mar 2019 09:16:56 +0000 (09:16 +0000)] 
2019-03-18  Richard Biener  <rguenther@suse.de>

PR target/87561
* config/i386/i386.c (ix86_add_stmt_cost): Apply strided
load pessimization to stores as well.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269753 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR middle-end/86979
jakub [Mon, 18 Mar 2019 08:31:41 +0000 (08:31 +0000)] 
PR middle-end/86979
* gcc.dg/pr86979.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269752 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR middle-end/89676
abel [Mon, 18 Mar 2019 07:51:06 +0000 (07:51 +0000)] 
    PR middle-end/89676
        * sel-sched.c (compute_av_set_at_bb_end): When we have an ineligible
        successor, use NULL as its av set.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269751 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago2019-03-17 Thomas Koenig <tkoenig@gcc.gnu.org>
tkoenig [Mon, 18 Mar 2019 07:28:42 +0000 (07:28 +0000)] 
2019-03-17  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/88008
* gfortran.h (expr_t): Add EXPR_UNKNOWN.
* expr.c (gfc_copy_expr): Add EXPR_UNKNOWN to switch statement.
(gfc_simplify_expr): Likewise.
* module.c (mio_expr): Likewise.
* resovle.c (extract_compcall_passed_object): Issue error on
unknown type.
(check_typebound_baseobject): Issue error on wrong type.
* trans-expr.c (gfc_apply_interface_mapping_to_expr): Add
EXPR_UNKNOWN to switch statement.

2019-03-17  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/88008
 * gfortran.dg/typebound_call_31.f90: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269750 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoDaily bump.
gccadmin [Mon, 18 Mar 2019 00:16:19 +0000 (00:16 +0000)] 
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269749 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR c++/89571 - ICE with ill-formed noexcept on constructor.
jason [Sun, 17 Mar 2019 20:07:26 +0000 (20:07 +0000)] 
PR c++/89571 - ICE with ill-formed noexcept on constructor.

Earlier changes to defer instantiating a defaulted noexcept-specifier that
depends on yet-unparsed default member initializers broke this testcase,
where instantiation fails for another reason.  In this case there's no
reason to defer and try again later, so let's not.

* pt.c (maybe_instantiate_noexcept): Only return false if defaulted.
(regenerate_decl_from_template): Use it for noexcept-specs.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269746 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * gcc.dg/compat/pr83487-1_x.c: Use -fno-common option on hppa*-*-hpux*.
danglin [Sun, 17 Mar 2019 19:37:00 +0000 (19:37 +0000)] 
* gcc.dg/compat/pr83487-1_x.c: Use -fno-common option on hppa*-*-hpux*.
* gcc.dg/compat/pr83487-1_y.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269745 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * gfortran.dg/pointer_init_10.f90: Require visibility support.
danglin [Sun, 17 Mar 2019 19:16:53 +0000 (19:16 +0000)] 
* gfortran.dg/pointer_init_10.f90: Require visibility support.
* gfortran.dg/temporary_3.f90: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269744 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * gcc.dg/pr88074.c: Require c99_runtime.
danglin [Sun, 17 Mar 2019 18:24:14 +0000 (18:24 +0000)] 
* gcc.dg/pr88074.c: Require c99_runtime.
* gcc.dg/warn-abs-1.c: Likewise.
* gfortran.dg/ISO_Fortran_binding_1.f90: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269743 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR testsuite/89666
danglin [Sun, 17 Mar 2019 17:59:03 +0000 (17:59 +0000)] 
PR testsuite/89666
* c-c++-common/builtin-has-attribute-3.c: Define SKIP_ALIAS on
hppa*-*-hpux*.
* gcc.dg/attr-copy.c: Require alias support.
* gcc.dg/ipa/ipa-icf-39.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269742 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoDaily bump.
gccadmin [Sun, 17 Mar 2019 00:16:13 +0000 (00:16 +0000)] 
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269737 138bc75d-0d04-0410-961f-82ee72b054a4