summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-07-14PR tree-optimization/86274 - SEGFAULT when logging std::to_string(NAN)msebor
gcc/ChangeLog: PR tree-optimization/86274 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify precondition. (format_floating): Correct handling of infinities and NaNs. gcc/testsuite/ChangeLog: PR tree-optimization/86274 * gcc.dg/tree-ssa/builtin-sprintf-9.c: New test. * gcc.dg/tree-ssa/builtin-sprintf-warn-1.c: Adjust. * gcc.dg/tree-ssa/builtin-sprintf-warn-10.c: Same. * gcc.dg/tree-ssa/builtin-sprintf-warn-15.c: Same. * gcc.dg/tree-ssa/builtin-sprintf-warn-7.c: Same. * gcc.dg/tree-ssa/builtin-sprintf.c: Same. * gcc.dg/tree-ssa/pr83198.c: Same. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262661 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-14Daily bump.gccadmin
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262657 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-13x86: Tune Skylake, Cannonlake and Icelake as Haswellhjl
r259399, which added PROCESSOR_SKYLAKE, disabled many x86 optimizations which are enabled by PROCESSOR_HASWELL. As the result, -mtune=skylake generates slower codes on Skylake than before. The same also applies to Cannonlake and Icelak tuning. This patch changes -mtune={skylake|cannonlake|icelake} to tune like -mtune=haswell for until their tuning is properly adjusted. It also enables -mprefer-vector-width=256 for -mtune=haswell, which has no impact on codegen when AVX512 isn't enabled. Performance impacts on SPEC CPU 2017 rate with 1 copy using -march=native -mfpmath=sse -O2 -m64 are 1. On Broadwell server: 500.perlbench_r -0.56% 502.gcc_r -0.18% 505.mcf_r 0.24% 520.omnetpp_r 0.00% 523.xalancbmk_r -0.32% 525.x264_r -0.17% 531.deepsjeng_r 0.00% 541.leela_r 0.00% 548.exchange2_r 0.12% 557.xz_r 0.00% Geomean 0.00% 503.bwaves_r 0.00% 507.cactuBSSN_r 0.21% 508.namd_r 0.00% 510.parest_r 0.19% 511.povray_r -0.48% 519.lbm_r 0.00% 521.wrf_r 0.28% 526.blender_r 0.19% 527.cam4_r 0.39% 538.imagick_r 0.00% 544.nab_r -0.36% 549.fotonik3d_r 0.51% 554.roms_r 0.00% Geomean 0.17% On Skylake client: 500.perlbench_r 0.96% 502.gcc_r 0.13% 505.mcf_r -1.03% 520.omnetpp_r -1.11% 523.xalancbmk_r 1.02% 525.x264_r 0.50% 531.deepsjeng_r 2.97% 541.leela_r 0.50% 548.exchange2_r -0.95% 557.xz_r 2.41% Geomean 0.56% 503.bwaves_r 0.49% 507.cactuBSSN_r 3.17% 508.namd_r 4.05% 510.parest_r 0.15% 511.povray_r 0.80% 519.lbm_r 3.15% 521.wrf_r 10.56% 526.blender_r 2.97% 527.cam4_r 2.36% 538.imagick_r 46.40% 544.nab_r 2.04% 549.fotonik3d_r 0.00% 554.roms_r 1.27% Geomean 5.49% On Skylake server: 500.perlbench_r 0.71% 502.gcc_r -0.51% 505.mcf_r -1.06% 520.omnetpp_r -0.33% 523.xalancbmk_r -0.22% 525.x264_r 1.72% 531.deepsjeng_r -0.26% 541.leela_r 0.57% 548.exchange2_r -0.75% 557.xz_r -1.28% Geomean -0.21% 503.bwaves_r 0.00% 507.cactuBSSN_r 2.66% 508.namd_r 3.67% 510.parest_r 1.25% 511.povray_r 2.26% 519.lbm_r 1.69% 521.wrf_r 11.03% 526.blender_r 3.39% 527.cam4_r 1.69% 538.imagick_r 64.59% 544.nab_r -0.54% 549.fotonik3d_r 2.68% 554.roms_r 0.00% Geomean 6.19% This patch improves -march=native performance on Skylake up to 60% and leaves -march=native performance unchanged on Haswell. gcc/ Backport from mainline 2018-07-13 H.J. Lu <hongjiu.lu@intel.com> Sunil K Pandey <sunil.k.pandey@intel.com> PR target/84413 * config/i386/i386.c (m_CORE_AVX512): New. (m_CORE_AVX2): Likewise. (m_CORE_ALL): Add m_CORE_AVX2. * config/i386/x86-tune.def: Replace m_HASWELL with m_CORE_AVX2. Replace m_SKYLAKE_AVX512 with m_CORE_AVX512 on avx256_optimal and remove the rest of m_SKYLAKE_AVX512. gcc/testsuite/ Backport from mainline 2018-07-13 H.J. Lu <hongjiu.lu@intel.com> Sunil K Pandey <sunil.k.pandey@intel.com> PR target/84413 * gcc.target/i386/pr84413-1.c: New test. * gcc.target/i386/pr84413-2.c: Likewise. * gcc.target/i386/pr84413-3.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262650 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-13[PR c++/86374] Name lookup failure in enclosing templatenathan
https://gcc.gnu.org/ml/gcc-patches/2018-07/msg00701.html PR c++/86374 * pt.c (lookup_template_class_1): Use tsubst_aggr_type for contexts that are classes. PR c++/86374 * g++.dg/pr86374.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262639 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-13 PR middle-end/86202mpolacek
* gimple-fold.c (size_must_be_zero_p): Check the type of the size. * gcc.dg/Wint-conversion-2.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262635 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-13Daily bump.gccadmin
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262619 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-12 * c-attribs.c (c_common_attribute_table): Addjakub
"omp declare target implicit" attribute. * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable type here, instead add "omp declare target implicit" attribute. (finish_decl): Diagnose vars without mappable type here. * decl2.c (cplus_decl_attributes): Don't diagnose vars without mappable type here, instead add "omp declare target implicit" attribute. Add that attribute instead of "omp declare target" also when processing_template_decl. * decl.c (cp_finish_decl): Diagnose vars without mappable type here, and before calling cp_omp_mappable_type call complete_type. * c-c++-common/gomp/declare-target-3.c: New test. * g++.dg/gomp/declare-target-2.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262606 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-122018-07-12 Richard Biener <rguenther@suse.de>rguenth
PR target/84829 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC): Remove -mieee-fp handling. * gcc.target/i386/pr84829.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262584 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-12 PR tree-optimization/86492jakub
* gimple-ssa-store-merging.c (imm_store_chain_info::coalesce_immediate_stores): Call check_no_overlap even for the merge_overlapping case. * gcc.c-torture/execute/pr86492.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262577 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-12Daily bump.gccadmin
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262570 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-11 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):jakub
Use __mmask64 type instead of __mmask8 for __M argument. * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64, _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for __U argument. (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of __mmask16 for __M argument. (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4, _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument to __mmask16 instead of __mmask8. * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps, _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps, _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps, _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type instead of __mmask16 for __U argument. * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use __mmask16 instead of __mmask8 for __U argument. (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for __U argument. (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of __mmask16. (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U argument. (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for __U argument. (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of __mmask16. (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead of __mmask16. (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for __U argument. (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for __U argument. (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for __U argument. (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for __U argument. (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask, _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change return type as well as __M argument type and all casts from __mmask8 to __mmask32. (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask, _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change return type as well as __M argument type and all casts from __mmask8 to __mmask16. (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask, _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change return type as well as __M argument type and all casts from __mmask8 to __mmask32. (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask, _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change return type as well as __M argument type and all casts from __mmask8 to __mmask16. * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32, _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of __mmask16. * gcc.target/i386/avx512bw-vpcmpb-2.c (CMP): Use SIZE macro instead of hardcoding size. Cast (rel) to MASK_TYPE. * gcc.target/i386/avx512bw-vpcmpub-2.c (CMP): Likewise. * gcc.target/i386/avx512f-vinserti32x4-3.c: New test. * gcc.target/i386/avx512f-vinsertf32x4-3.c: New test. * gcc.target/i386/avx512vl-vpcmpnequb-2.c: New test. * gcc.target/i386/avx512vl-vpcmpgeub-2.c: New test. * gcc.target/i386/avx512vl-vpcmpleb-2.c: New test. * gcc.target/i386/avx512vl-vpcmpgeb-2.c: New test. * gcc.target/i386/avx512vl-vpcmpltb-2.c: New test. * gcc.target/i386/avx512vl-vpcmpltub-2.c: New test. * gcc.target/i386/avx512vl-vpcmpleub-2.c: New test. * gcc.target/i386/avx512vl-vpcmpneqb-2.c: New test. * gcc.target/i386/avx512vl-vpcmpnequw-2.c: New test. * gcc.target/i386/avx512vl-vpcmpgeuw-2.c: New test. * gcc.target/i386/avx512vl-vpcmplew-2.c: New test. * gcc.target/i386/avx512vl-vpcmpgew-2.c: New test. * gcc.target/i386/avx512vl-vpcmpltw-2.c: New test. * gcc.target/i386/avx512vl-vpcmpltuw-2.c: New test. * gcc.target/i386/avx512vl-vpcmpleuw-2.c: New test. * gcc.target/i386/avx512vl-vpcmpneqw-2.c: New test. 2018-07-11 Grazvydas Ignotas <notasas@gmail.com> * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask, _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32 for __U argument. * gcc.target/i386/avx512bw-vpcmpb-2.c (SIZE): Define to (AVX512F_LEN / 8) instead of (AVX512F_LEN / 16). * gcc.target/i386/avx512bw-vpcmpub-2.c (SIZE): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262567 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-11Daily bump.gccadmin
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262548 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-10 PR sanitizer/86406jakub
* cp-gimplify.c (cp_maybe_instrument_return): Skip trailing DEBUG_BEGIN_STMTs. * g++.dg/ubsan/pr86406.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262537 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-10Daily bump.gccadmin
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262531 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-09Daily bump.gccadmin
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262508 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-08Daily bump.gccadmin
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262504 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-07Daily bump.gccadmin
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262491 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-06RTEMS/Ada: Change system configurationsh
The previous system configuration led to undefined references to __gnat_raise_nodefer_with_msg(). gcc/ada * libgnat/system-rtems.ads (Frontend_Exceptions): Set to False. (ZCX_By_Default): Set to True. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262468 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-06Daily bump.gccadmin
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262461 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-05Backport from trunk.msebor
PR tree-optimization/86400 - set<string>::set<char (*)[2]) constructor does not work with array argument. gcc/ChangeLog: * gcc.dg/strlenopt-47.c: New test. * gcc.dg/strlenopt-48.c: New test. gcc/testsuite/ChangeLog: * gcc.dg/strlenopt-47.c: New test. * gcc.dg/strlenopt-48.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262446 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-05gcc/ChangeLog:carll
2018-07-03 Carl Love <cel@us.ibm.com> Backport from trunk 2018-07-03 Carl Love <cel@us.ibm.com> * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for float argument to VSX_BUILTIN_DOUBLEH_V4SF. Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to VSX_BUILTIN_DOUBLEL_V4SF. gcc/testsuite/ChangeLog: 2018-07-03 Carl Love <cel@us.ibm.com> Backport from trunk 2018-07-03 Carl Love <cel@us.ibm.com> * gcc.target/altivec-1-runnable.c: New test file. * gcc.target/altivec-2-runnable.c: New test file. * gcc.target/vsx-7.c (main2): Test file changes not backported from mainline since test file does not exist in GCC 8. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262440 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-052018-07-05 François Dumont <fdumont@gcc.gnu.org>fdumont
Backport from mainline 2018-07-04 François Dumont <fdumont@gcc.gnu.org> PR libstdc++/86272 * include/debug/string (__gnu_debug::basic_string<>::insert<_Ite>(const_iterator, _Ite, _Ite)): Use __glibcxx_check_insert_range. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262430 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-05Daily bump.gccadmin
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262427 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-04Backport from mainlineville
2018-07-04 Ville Voutilainen <ville.voutilainen@gmail.com> gcc/cp/ PR c++/86398 * method.c (is_trivially_xible): Return false if is_xible_helper returns a NULL_TREE. testsuite/ PR c++/86398 * g++.dg/ext/is_trivially_constructible1.C: Add new tests. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262424 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-04[AArch64, Falkor] Falkor address costs tuningluisgpm
Switch from using generic address costs to using Falkor-specific ones, which give Falkor better results overall. gcc/ChangeLog: 2018-07-04 Luis Machado <luis.machado@linaro.org> * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static global. (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262422 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-04Remove spurious $HOME include from BRIG FE Makefilejamborm
2018-07-04 Martin Jambor <mjambor@suse.cz> PR hsa/86371 * Make-lang.in (BRIGINCLUDES): Remove erroneous include path in $HOME. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262399 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-04Fix std::codecvt_utf8<wchar_t> for Mingwredi
Backport from mainline 2018-05-19 Jonathan Wakely <jwakely@redhat.com> * src/c++11/codecvt.cc (__codecvt_utf8_base<wchar_t>::do_in) [__SIZEOF_WCHAR_T__==2 && __BYTE_ORDER__!=__ORDER_BIG_ENDIAN__]: Set little_endian element in bitmask. * testsuite/22_locale/codecvt/codecvt_utf8/69703.cc: Run all tests. * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262397 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-04Remove redundant #if conditionalredi
The whole file is guarded by the same check already. Backport from mainline 2018-07-03 Jonathan Wakely <jwakely@redhat.com> * include/bits/alloc_traits.h: Remove redundant preprocessor condition. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262396 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-04Add std::__is_byte<std::byte> specializationredi
Backport from mainline 2018-06-27 Jonathan Wakely <jwakely@redhat.com> * include/bits/cpp_type_traits.h [__cplusplus >= 201703] (__is_byte<byte>): Define specialization for std::byte. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262395 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-04LWG 3050 Fix cv-qualification of convertibility constraintsredi
Backport from mainline 2018-06-18 Jonathan Wakely <jwakely@redhat.com> * include/std/chrono (duration, operator*, operator/, operator%): Use const-qualified type as source type in is_convertible constraints. * testsuite/20_util/duration/arithmetic/dr3050.cc: New. * testsuite/20_util/duration/cons/dr3050.cc: New. * testsuite/20_util/duration/literals/range.cc: Rename to... * testsuite/20_util/duration/literals/range_neg.cc: Here. Adjust dg-error lineno. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262394 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-04PR libstdc++/86127 avoid unnecessary allocator conversionsredi
There is no need to use an allocator of the correct value_type when calling allocator_traits::construct and allocator_traits::destroy. The existing node allocator can be used, instead of constructing a new allocator object every time. There's also no benefit to using __gnu_cxx::__alloc_traits instead of std::allocator_traits to get the pointer and const_pointer types. std::forward_list is only available for C++11 and later, when std::allocator_traits is available too. Backport from mainline 2018-06-13 Jonathan Wakely <jwakely@redhat.com> PR libstdc++/86127 * include/bits/forward_list.h (_Fwd_list_base::_Tp_alloc_type): Remove unused typedef. (_Fwd_list_base::_M_create_node, _Fwd_list_base::_M_erase_after): Use node allocator to create and destroy elements. (forward_list::_Tp_alloc_type): Remove unused typedef. (forward_list::_Alloc_traits): Use allocator_traits instead of __gnu_cxx::__alloc_traits. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262393 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-04Qualify another call in <variant>redi
Backport from mainline 2018-05-29 Jonathan Wakely <jwakely@redhat.com> * include/std/variant (__erased_dtor): Qualify call to __get. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262392 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-04Qualify std::__invoke in <variant> to prevent ADLredi
Backport from mainline 2018-05-15 Jonathan Wakely <jwakely@redhat.com> * include/std/variant (__gen_vtable_impl::__visit_invoke): Qualify __invoke to prevent ADL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262391 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-04PR target/85904 check for aligned_alloc on netbsd cross-compilationredi
Backport from mainline 2018-05-24 Maya Rashish <coypu@sdf.org> PR target/85904 * crossconfig.m4: Test for aligned_alloc on netbsd. * configure: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262390 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-04PR libstdc++/85098 add missing definitions for static constantsredi
In C++11 and C++14 any odr-use of these constants requires a definition at namespace-scope. In C++17 they are implicitly inline and so the namespace-scope redeclarations are redundant (and allowing them is deprecated). Backport from mainline 2018-05-18 Jonathan Wakely <jwakely@redhat.com> PR libstdc++/85098 * include/bits/regex.h [__cplusplus < 201703L] (basic_regex::icase) (basic_regex::nosubs, basic_regex::optimize, basic_regex::collate) (basic_regex::ECMAScript, basic_regex::basic, basic_regex::extended) (basic_regex::awk, basic_regex::grep, basic_regex::egrep): Add definitions. * include/bits/regex_automaton.h (_NFA::_M_insert_state): Adjust whitespace. * include/bits/regex_compiler.tcc (__INSERT_REGEX_MATCHER): Add braces around body of do-while. * testsuite/28_regex/basic_regex/85098.cc: New git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262389 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-04PR libstdc++/85671 allow copy elision in path concatenationredi
By performing the /= operation on a named local variable instead of a temporary the copy made for the return value can be elided. Backport from mainline 2018-05-07 Jonathan Wakely <jwakely@redhat.com> PR libstdc++/85671 * include/bits/fs_path.h (operator/): Permit copy elision. * include/experimental/bits/fs_path.h (operator/): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262388 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-04PR libstdc++/83982 fix exception-safety guarantee of std::vector::resizeredi
Construct new elements before moving existing ones, so that if a default constructor throws, the existing elements are not left in a moved-from state. Backport from mainline 2018-06-14 Daniel Trebbien <dtrebbien@gmail.com> Jonathan Wakely <jwakely@redhat.com> PR libstdc++/83982 * include/bits/vector.tcc (vector::_M_default_append(size_type)): Default-construct new elements before moving existing ones. * testsuite/23_containers/vector/capacity/resize/strong_guarantee.cc: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262387 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-04PR libstdc++/86292 fix exception safety of std::vector<InputIterator> ↵redi
constructor Backport from mainline 2018-06-25 Jonathan Wakely <jwakely@redhat.com> PR libstdc++/86292 * include/bits/stl_vector.h (vector::_M_range_initialize<InputIter>): Add try-catch block. * testsuite/23_containers/vector/cons/86292.cc: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262386 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-04Declare some explicit instantiations for strings in Debug Moderedi
The empty reps and the I/O functions do not need to be implicitly instantiated to enable assertions, so declare the explicit instantiations when _GLIBCXX_EXTERN_TEMPLATE == -1 (i.e. when _GLIBCXX_ASSERTIONS is defined). Backport from mainline 2018-06-27 Jonathan Wakely <jwakely@redhat.com> PR libstdc++/86138 * include/bits/basic_string.tcc: [_GLIBCXX_EXTERN_TEMPLATE < 0] Declare explicit instantiations of COW empty reps and I/O functions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262385 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-04LWG 3076 basic_string CTAD ambiguityredi
When deduction guides are supported by the compiler (i.e. for C++17 and later) replace two basic_string constructors by constrained function templates as required by LWG 3075. In order to ensure that the pre-C++17 non-template constructors are still exported from the shared library define a macro in src/c++11/string-inst.cc to force the non-template declarations (this isn't strictly needed yet, because the string instantiations are compiled with -std=gnu++11, but that is likely to change). Backport from mainline 2018-06-16 Jonathan Wakely <jwakely@redhat.com> LWG 3076 basic_string CTAD ambiguity * doc/xml/manual/intro.xml: Document LWG 3076 change. * include/bits/basic_string.h [__cpp_deduction_guides && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS] (basic_string(const _CharT*, const _Alloc&)): Turn into a function template constrained by _RequireAllocator. (basic_string(size_type, _CharT, const _Alloc&)): Likewise. * src/c++11/string-inst.cc (_GLIBCXX_DEFINING_STRING_INSTANTIATIONS): Define. * testsuite/21_strings/basic_string/cons/char/deduction.cc: Test deduction * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262384 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-04LWG 3075 basic_string needs deduction guides from basic_string_viewredi
Backport from mainline 2018-06-14 Jonathan Wakely <jwakely@redhat.com> * include/bits/basic_string.h: Add deduction guides from string_view. * testsuite/21_strings/basic_string/cons/char/deduction.cc: Test deduction from string views. * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262383 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-04PR libstdc++/84087 add default arguments to basic_string members (LWG 2268)redi
This change was a DR against C++11 and so should have been implemented years ago. Backport from mainline 2018-05-03 Jonathan Wakely <jwakely@redhat.com> PR libstdc++/84087 LWG DR 2268 basic_string default arguments * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI=1] (append(const basic_string&, size_type, size_type) (assign(const basic_string&, size_type, size_type) (insert(size_type, const basic_string&, size_type, size_type) (replace(size_type,size_type,const basic_string&,size_type,size_type) (compare(size_type,size_type,constbasic_string&,size_type,size_type)): Add default arguments (LWG 2268). [_GLIBCXX_USE_CXX11_ABI=0] (append(const basic_string&, size_type, size_type) (assign(const basic_string&, size_type, size_type) (insert(size_type, const basic_string&, size_type, size_type) (replace(size_type,size_type,const basic_string&,size_type,size_type) (compare(size_type,size_type,constbasic_string&,size_type,size_type)): Likewise. * testsuite/21_strings/basic_string/dr2268.cc: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262382 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-04PR libstdc++/86398 fix std::is_trivially_constructible regressionredi
The intrinsic doesn't check for allowed conversions between scalar types, so restore the std::is_constructible check. Also make some trivial whitespace changes. PR libstdc++/86398 * include/std/type_traits (is_trivially_constructible): Check is_constructible before __is_trivially_constructible. * testsuite/20_util/is_trivially_constructible/value.cc: Add more tests, including negative cases. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Use zero for dg-error lineno. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262381 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-04Daily bump.gccadmin
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262363 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-03 PR c++/86378 - functional cast in noexcept-specifier.jason
* tree.c (strip_typedefs_expr) [TREE_LIST]: Fix iteration. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262351 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-03Reduce garbage from push_to_top_level.jason
* name-lookup.c (do_push_to_top_level): Don't allocate current_lang_base. (do_pop_from_top_level): Release current_lang_base. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262350 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-03Daily bump.gccadmin
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262325 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-02rs6000: Set up ieee128_float_type_node correctly (PR86285)segher
We shouldn't init __ieee128 to be the same as long double if the latter is not even a 128-bit type. This also reorders the nearby __ibm128 code so both types use similar logic. Backport from trunk 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org> PR target/86285 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set ieee128_float_type_node to long_double_type_node unless TARGET_LONG_DOUBLE_128 is set. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262320 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-022018-07-02 Paul Thomas <pault@gcc.gnu.org>pault
PR fortran/45305 * expr.c : Add a prototype for scalarize_intrinsic_call. (gfc_simplify_expr): Use scalarize_intrinsic_call for elemental intrinsic function calls. (scalarize_intrinsic_call): Add 'init_flag' argument. Check if the expression or any of the actual argument expressions are NULL. Before calling gfc_check_init_expr, check 'init_flag'. Only simplify the scalarized expressions if there are no errors on the stack. (gfc_check_init_expr): Set 'init_flag' true in the call to scalarize_intrinsic_call. 2018-07-02 Paul Thomas <pault@gcc.gnu.org> PR fortran/45305 * gfortran.dg/scalarize_parameter_array_2.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262316 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-02 PR go/86331ian
os: check return value as well as error from waitid https://gcc.gnu.org/PR86331 indicates that if a signal handler runs it is possible for syscall.Syscall6 to return a non-zero errno value even if no error occurs. That is a problem in general, but this fix will let us work around the general problem for the specific case of calling waitid. Reviewed-on: https://go-review.googlesource.com/121595 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@262314 138bc75d-0d04-0410-961f-82ee72b054a4