This project is mirrored from git://gcc.gnu.org/git/gcc.git.
Pull mirroring failed .
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer.
Last successful update .
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer.
Last successful update .
- 26 Oct, 2018 2 commits
-
-
GCC Administrator authored
From-SVN: r265524
-
GCC Administrator authored
From-SVN: r265511
-
- 25 Oct, 2018 3 commits
-
-
Jonathan Wakely authored
The move constructor for the SSO string uses assign(const basic_string&) when either: (1) the source string is "local" and so the contents of the small string buffer need to be copied, or (2) the allocator does not propagate and is_always_equal is false. Case (1) is suboptimal, because the assign member is not noexcept and the compiler isn't smart enough to see it won't actually throw in this case. This causes extra code in the move assignment operator so that any exception will be turned into a call to std::terminate. This can be fixed by copying small strings inline instead of calling assign. Case (2) is a bug, because the specific instances of the allocators could be equal even if is_always_equal is false. This can result in an unnecessary deep copy (and potentially-throwing allocation) when the storage should be moved. This can be fixed by simply checking if the allocators are equal. PR libstdc++/87749 * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI] (basic_string::operator=(basic_string&&)): For short strings copy the buffer inline. Only fall back to using assign(const basic_string&) to do a deep copy when reallocation is needed. * testsuite/21_strings/basic_string/modifiers/assign/char/87749.cc: New test. * testsuite/21_strings/basic_string/modifiers/assign/char/ move_assign_optim.cc: New test. * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/87749.cc: New test. * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/ move_assign_optim.cc: New test. From-SVN: r265500
-
Jonathan Wakely authored
Using a delegating constructor to implement these constructors means that they instantiate the destructor, which requires the element_type to be complete. In C++11 and C++14 they were specified to be delegating, but that was changed as part of LWG 2801 so in C++17 they don't require a complete type (as was intended all along). Backport from mainline 2018-10-23 Jonathan Wakely <jwakely@redhat.com> PR libstdc++/87704 * include/bits/unique_ptr.h (unique_ptr::unique_ptr(nullptr_t)): Do not delegate to default constructor. (unique_ptr<T[], D>::unique_ptr(nullptr_t)): Likewise. * testsuite/20_util/unique_ptr/cons/incomplete.cc: New test. From-SVN: r265499
-
GCC Administrator authored
From-SVN: r265475
-
- 24 Oct, 2018 1 commit
-
-
GCC Administrator authored
From-SVN: r265445
-
- 23 Oct, 2018 2 commits
-
-
Tom de Vries authored
Consider test.C compiled at -O0 -g: ... class string { public: string (const char *p) { this->p = p ; } string (const string &s) { this->p = s.p; } private: const char *p; }; class foo { public: foo (string dir_hint) {} }; int main (void) { std::string s = "This is just a string"; foo bar(s); return 0; } ... When parsing foo::foo, the dir_hint parameter gets a DECL_ARG_TYPE of 'struct string & restrict'. Then during finish_struct, we call clone_constructors_and_destructors and create clones for foo::foo, and set the DECL_ARG_TYPE in the same way. Later on, during finish_function, cp_genericize is called for the original foo::foo, which sets the type of parm dir_hint to DECL_ARG_TYPE, and sets DECL_BY_REFERENCE of dir_hint to 1. After that, during maybe_clone_body update_cloned_parm is called with: ... (gdb) call debug_generic_expr (parm.typed.type) struct string & restrict (gdb) call debug_generic_expr (cloned_parm.typed.type) struct string ... The type of the cloned_parm is then set to the type of parm, but DECL_BY_REFERENCE is not set. When doing cp_genericize for the clone later on, TREE_ADDRESSABLE (TREE_TYPE ()) is no longer true for the updated type for the parm, so DECL_BY_REFERENCE is not set there either. The missing DECL_BY_REFERENCE on cloned_parm causes incorrect debug info to be generated. This patch fixes the problem by copying DECL_BY_REFERENCE in update_cloned_parm. Bootstrapped and reg-tested on x86_64. 2018-10-23 Tom de Vries <tdevries@suse.de> backport from trunk: 2018-07-31 Tom de Vries <tdevries@suse.de> PR debug/86687 * optimize.c (update_cloned_parm): Copy DECL_BY_REFERENCE. * g++.dg/guality/pr86687.C: New test. From-SVN: r265431 -
GCC Administrator authored
From-SVN: r265405
-
- 22 Oct, 2018 1 commit
-
-
GCC Administrator authored
From-SVN: r265363
-
- 21 Oct, 2018 1 commit
-
-
GCC Administrator authored
From-SVN: r265346
-
- 20 Oct, 2018 1 commit
-
-
GCC Administrator authored
From-SVN: r265336
-
- 19 Oct, 2018 1 commit
-
-
GCC Administrator authored
From-SVN: r265300
-
- 18 Oct, 2018 2 commits
-
-
Jonathan Wakely authored
Use the value of the first element as the initial value of the __valarray_sum accumulator. Value-initialization might not create the additive identity for the value type. PR libstdc++/87641 * include/bits/valarray_array.h (__valarray_sum): Use first element to initialize accumulator instead of value-initializing it. * testsuite/26_numerics/valarray/87641.cc: New test. From-SVN: r265291
-
GCC Administrator authored
From-SVN: r265252
-
- 17 Oct, 2018 2 commits
-
-
Eric Botcazou authored
re PR middle-end/87623 (bytes swapped in register when comparing cause fail when compiled with -O1 or higher) PR middle-end/87623 * fold-const.c (fold_truth_andor_1): If the right side is not constant, bail out if both sides do not have the same storage order. From-SVN: r265245
-
GCC Administrator authored
From-SVN: r265225
-
- 16 Oct, 2018 2 commits
-
-
Gerald Pfeifer authored
Backport from trunk * io/close.c [!HAVE_UNLINK_OPEN_FILE]: Include <string.h>. From-SVN: r265198
-
GCC Administrator authored
From-SVN: r265180
-
- 15 Oct, 2018 5 commits
-
-
Jonathan Wakely authored
Glibc changed the it_IT locales to use thousands separators, invalidating this test. Use nl_NL instead, as Dutch only uses grouping for money not numbers. * testsuite/22_locale/numpunct/members/char/3.cc: Adjust test to account for change to glibc it_IT localedata (glibc bz#10797). From-SVN: r265168
-
Richard Biener authored
2018-10-15 Richard Biener <rguenther@suse.de> Backport from mainline 2018-03-19 Jakub Jelinek <jakub@redhat.com> PR sanitizer/84761 * sanitizer_common/sanitizer_linux_libcdep.cc (__GLIBC_PREREQ): Define if not defined. (DL_INTERNAL_FUNCTION): Don't define. (InitTlsSize): For __i386__ if not compiled against glibc 2.27+ determine at runtime whether to use regparm(3), stdcall calling convention for older glibcs or normal calling convention for newer glibcs for call to _dl_get_tls_static_info. From-SVN: r265164
-
Jonathan Wakely authored
The solution for PR 77537 causes ambiguities due to the extra copy assignment operator taking a __nonesuch_no_braces parameter. By making the base class non-assignable we don't need the extra deleted overload in std::pair. The copy assignment operator will be implicitly deleted (and the move assignment operator not declared) as needed. Without the additional user-provided operator in std::pair the ambiguity is avoided. Backport from mainline 2018-07-31 Jonathan Wakely <jwakely@redhat.com> PR libstdc++/86751 * include/bits/stl_pair.h (__pair_base): New class with deleted copy assignment operator. (pair): Derive from __pair_base. (pair::operator=): Remove deleted overload. * python/libstdcxx/v6/printers.py (StdPairPrinter): New pretty printer so that new base class isn't shown in GDB. * testsuite/20_util/pair/86751.cc: New test. * testsuite/20_util/pair/ref_assign.cc: New test. From-SVN: r265162
-
Richard Biener authored
2018-10-15 Richard Biener <rguenther@suse.de> Backport from mainline 2018-08-23 Richard Biener <rguenther@suse.de> PR middle-end/87024 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len calls. * gcc.dg/pr87024.c: New testcase. 2018-08-17 Richard Biener <rguenther@suse.de> PR middle-end/86505 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len () across a va-arg-pack using call adjust its return value accordingly. * gcc.dg/torture/pr86505.c: New testcase. From-SVN: r265159
-
GCC Administrator authored
From-SVN: r265152
-
- 14 Oct, 2018 1 commit
-
-
GCC Administrator authored
From-SVN: r265143
-
- 13 Oct, 2018 1 commit
-
-
GCC Administrator authored
From-SVN: r265136
-
- 12 Oct, 2018 15 commits
-
-
Jakub Jelinek authored
backport: re PR target/87550 (Intrinsics for rdpmc (__rdpmc, __builtin_ia32_rdpmc) are interpreted as pure functions) Backported from mainline 2018-10-10 Jakub Jelinek <jakub@redhat.com> PR target/87550 * config/i386/i386.c (bdesc_args): Move IX86_BUILTIN_RDPMC from here to ... (bdesc_special_args): ... here. * gcc.target/i386/pr87550.c: New test. From-SVN: r265122
-
Jakub Jelinek authored
Backported from mainline 2018-09-12 Jakub Jelinek <jakub@redhat.com> PR middle-end/87248 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that BIT_AND_EXPR's second operand is a power of two. Formatting fix. * c-c++-common/torture/pr87248.c: New test. From-SVN: r265121
-
Jakub Jelinek authored
Backported from mainline 2018-08-27 Jakub Jelinek <jakub@redhat.com> PR rtl-optimization/87065 * combine.c (simplify_if_then_else): Formatting fix. (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P check. (known_cond): Don't return const_true_rtx for vector modes. Use CONST0_RTX instead of const0_rtx. Formatting fixes. * gcc.target/i386/pr87065.c: New test. From-SVN: r265120
-
Jakub Jelinek authored
Backported from mainline 2018-07-24 Jakub Jelinek <jakub@redhat.com> PR middle-end/86627 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT and abs_d == d, do the power of two handling if profitable. * gcc.target/i386/pr86627.c: New test. From-SVN: r265119
-
Jakub Jelinek authored
Backported from mainline 2018-07-17 Jakub Jelinek <jakub@redhat.com> PR middle-end/86542 * omp-low.c (create_task_copyfn): Copy over also fields corresponding to _looptemp_ clauses, other than the first two. * testsuite/libgomp.c++/pr86542.C: New test. From-SVN: r265118
-
Jakub Jelinek authored
Backported from mainline 2018-07-17 Jakub Jelinek <jakub@redhat.com> PR middle-end/86539 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init and cond temporaries don't have reference type if iterator has pointer type. For init use &for_pre_body instead of pre_p if for_pre_body is non-empty. * testsuite/libgomp.c++/pr86539.C: New test. From-SVN: r265117
-
Jakub Jelinek authored
Backported from mainline 2018-07-26 Jakub Jelinek <jakub@redhat.com> PR middle-end/86660 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for declare target to variables if they have always,{to,from,tofrom} map kinds. * testsuite/libgomp.c/pr86660.c: New test. From-SVN: r265116 -
Jakub Jelinek authored
Backported from mainline 2018-07-16 Jakub Jelinek <jakub@redhat.com> PR c++/3698 PR c++/86208 * cp-gimplify.c (cp_genericize_r): When using extern_decl_map, or in TREE_USED flag from stmt to h->to. * g++.dg/opt/pr3698.C: New test. From-SVN: r265115
-
Richard Biener authored
2018-10-12 Richard Biener <rguenther@suse.de> PR c++/54278 Backport from mainline 2017-03-23 Richard Biener <rguenther@suse.de> PR tree-optimization/80032 * gimplify.c (gimple_push_cleanup): Forced unconditional cleanups still have to go to the conditional_cleanups sequence. 2017-03-21 Richard Biener <rguenther@suse.de> PR tree-optimization/80032 * gimplify.c (gimple_push_cleanup): Add force_uncond parameter, if set force the cleanup to happen unconditionally. (gimplify_target_expr): Push inserted clobbers with force_uncond to avoid them being removed by control-dependent DCE. * g++.dg/opt/pr80032.C: New testcase. From-SVN: r265101
-
Jonathan Wakely authored
Backport from mainline 2018-08-30 Jonathan Wakely <jwakely@redhat.com> * include/ext/pointer.h (_Pointer_adapter): Define operators for pointer arithmetic using long long offsets. * testsuite/ext/ext_pointer/1.cc: Test pointer arithmetic using long long values. From-SVN: r265099
-
Jonathan Wakely authored
The typedefs in <experimental/regex> and <experimental/string> don't need to be in the __cxx11 namespace, because they are only aliases and so will have the same mangled name as the underlying types. Backport from mainline 2018-08-22 Jonathan Wakely <jwakely@redhat.com> PR libstdc++/87061 * include/experimental/regex [!_GLIBCXX_USE_CXX11_ABI] (experimental::pmr::match_results, experimental::pmr::cmatch) (experimental::pmr::smatch, experimental::pmr::wcmatch) (experimental::pmr::wsmatch): Do not declare for gcc4-compatible ABI, because COW strings don't support C++11 allocator model. * include/experimental/string [!_GLIBCXX_USE_CXX11_ABI] (experimental::pmr::basic_string, experimental::pmr::string) (experimental::pmr::u16string, experimental::pmr::u32string) (experimental::pmr::wstring): Likewise. Backport from mainline 2018-08-15 Jonathan Wakely <jwakely@redhat.com> * include/experimental/regex: Remove begin/end macros for namespace. * include/experimental/string: Likewise. * testsuite/experimental/polymorphic_allocator/pmr_typedefs_deque.cc: New test. * testsuite/experimental/polymorphic_allocator/ pmr_typedefs_forward_list.cc: New test. * testsuite/experimental/polymorphic_allocator/pmr_typedefs_list.cc: New test. * testsuite/experimental/polymorphic_allocator/pmr_typedefs_map.cc: New test. * testsuite/experimental/polymorphic_allocator/pmr_typedefs_match.cc: New test. * testsuite/experimental/polymorphic_allocator/ pmr_typedefs_multimap.cc: New test. * testsuite/experimental/polymorphic_allocator/ pmr_typedefs_multiset.cc: New test. * testsuite/experimental/polymorphic_allocator/pmr_typedefs_set.cc: New test. * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc: New test. * testsuite/experimental/polymorphic_allocator/ pmr_typedefs_unordered_map.cc: New test. * testsuite/experimental/polymorphic_allocator/ pmr_typedefs_unordered_multimap.cc: New test. * testsuite/experimental/polymorphic_allocator/ pmr_typedefs_unordered_multiset.cc: New test. * testsuite/experimental/polymorphic_allocator/ pmr_typedefs_unordered_set.cc: New test. * testsuite/experimental/polymorphic_allocator/pmr_typedefs_vector.cc: New test. From-SVN: r265098
-
Jonathan Wakely authored
Construct the program-wide resource objects using placement new. This means they have dynamic storage duration and won't be destroyed during termination. Backport from mainline 2018-07-24 Jonathan Wakely <jwakely@redhat.com> PR libstdc++/70966 * include/experimental/memory_resource (__get_default_resource): Use placement new to create an object with dynamic storage duration. Backport from mainline 2018-06-20 Jonathan Wakely <jwakely@redhat.com> PR libstdc++/70966 * include/experimental/memory_resource (__resource_adaptor_imp): Add static assertions to enforce requirements on pointer types. (__resource_adaptor_imp::get_allocator()): Add noexcept. (new_delete_resource, null_memory_resource): Return address of an object with dynamic storage duration. (__null_memory_resource): Remove. * testsuite/experimental/memory_resource/70966.cc: New. From-SVN: r265097
-
H.J. Lu authored
Define _mm512_mask3_fmaddsub_round_pd with __builtin_ia32_vfmaddsubpd512_mask, instead of __builtin_ia32_vfmaddpd512_mask. Backport from mainline PR target/87517 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd): Defined with __builtin_ia32_vfmaddsubpd512_mask. From-SVN: r265091
-
H.J. Lu authored
With gcc -O2 -fPIC -flto -g -c -o a.o a.c gcc -O2 -fPIC -flto -g -mavx -c -o b.o b.c gcc -shared -O2 -fPIC -flto -g -o lib1.so a.o b.o LTO correctly generates AVX for b.o and SSE for a.o. But the GCC driver passes -msse2avx to assembler, which encodes SSE instructions as AVX instructions. We shouldn't pass -msse2avx to assembler for -mavx. Backport from mainline PR target/87522 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to assembler for -mavx. * config/i386/gnu-user64.h (ASM_SPEC): Likewise. From-SVN: r265090
-
Jonathan Wakely authored
PR libstdc++/77854 * doc/xml/manual/status_cxx1998.xml: Document size_type and difference_type for containers. * doc/html/*: Regenerate. From-SVN: r265084
-