]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
6 years agogcc: xtensa: don't force PIC for uclinux target releases/gcc-6
Max Filippov [Wed, 7 Nov 2018 20:52:55 +0000 (20:52 +0000)] 
gcc: xtensa: don't force PIC for uclinux target

xtensa-uclinux uses bFLT executable file format that cannot relocate
fields representing offsets from data to code. C++ objects built as PIC
use offsets to encode FDE structures. As a result C++ exception handling
doesn't work correctly on xtensa-uclinux. Don't use PIC by default on
xtensa-uclinux.

gcc/
2018-11-07  Max Filippov  <jcmvbkbc@gmail.com>

Backport from mainline
2018-11-05  Max Filippov  <jcmvbkbc@gmail.com>

* config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.

From-SVN: r265890

6 years agoUpdate ChangeLog and version files for release releases/gcc-6.5.0
GCC Administrator [Fri, 26 Oct 2018 09:54:34 +0000 (09:54 +0000)] 
Update ChangeLog and version files for release

From-SVN: r265524

6 years agoDaily bump.
GCC Administrator [Fri, 26 Oct 2018 00:16:31 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r265511

6 years agoPR libstdc++/87749 fix (and optimize) string move construction
Jonathan Wakely [Thu, 25 Oct 2018 16:42:01 +0000 (17:42 +0100)] 
PR libstdc++/87749 fix (and optimize) string move construction

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

6 years agoPR libstdc++/87704 fix unique_ptr(nullptr_t) constructors
Jonathan Wakely [Thu, 25 Oct 2018 16:41:54 +0000 (17:41 +0100)] 
PR libstdc++/87704 fix unique_ptr(nullptr_t) constructors

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

6 years agoDaily bump.
GCC Administrator [Thu, 25 Oct 2018 00:16:05 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r265475

6 years agoDaily bump.
GCC Administrator [Wed, 24 Oct 2018 00:16:40 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r265445

6 years agobackport "[c++] Fix DECL_BY_REFERENCE of clone parms"
Tom de Vries [Tue, 23 Oct 2018 17:16:55 +0000 (17:16 +0000)] 
backport "[c++] Fix DECL_BY_REFERENCE of clone parms"

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

6 years agoDaily bump.
GCC Administrator [Tue, 23 Oct 2018 00:16:37 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r265405

6 years agoDaily bump.
GCC Administrator [Mon, 22 Oct 2018 00:16:31 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r265363

6 years agoDaily bump.
GCC Administrator [Sun, 21 Oct 2018 00:16:21 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r265346

6 years agoDaily bump.
GCC Administrator [Sat, 20 Oct 2018 00:16:39 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r265336

6 years agoDaily bump.
GCC Administrator [Fri, 19 Oct 2018 00:16:46 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r265300

6 years agoPR libstdc++/87641 correctly initialize accumulator in valarray::sum()
Jonathan Wakely [Thu, 18 Oct 2018 21:41:01 +0000 (22:41 +0100)] 
PR libstdc++/87641 correctly initialize accumulator in valarray::sum()

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

6 years agoDaily bump.
GCC Administrator [Thu, 18 Oct 2018 00:16:24 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r265252

6 years agore PR middle-end/87623 (bytes swapped in register when comparing cause fail when...
Eric Botcazou [Wed, 17 Oct 2018 17:54:26 +0000 (17:54 +0000)] 
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

6 years agoDaily bump.
GCC Administrator [Wed, 17 Oct 2018 00:16:25 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r265225

6 years agobackport: close.c: Include <string.h>.
Gerald Pfeifer [Tue, 16 Oct 2018 15:21:19 +0000 (15:21 +0000)] 
backport: close.c: Include <string.h>.

Backport from trunk
* io/close.c [!HAVE_UNLINK_OPEN_FILE]: Include <string.h>.

From-SVN: r265198

6 years agoDaily bump.
GCC Administrator [Tue, 16 Oct 2018 00:16:36 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r265180

6 years agoAdjust test to pass with latest glibc
Jonathan Wakely [Mon, 15 Oct 2018 14:03:53 +0000 (15:03 +0100)] 
Adjust test to pass with latest glibc

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

6 years agobackport: re PR sanitizer/84761 (AddressSanitizer is not compatible with glibc 2...
Richard Biener [Mon, 15 Oct 2018 13:43:09 +0000 (13:43 +0000)] 
backport: re PR sanitizer/84761 (AddressSanitizer is not compatible with glibc 2.27 on x86)

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

6 years agoPR libstdc++/86751 default assignment operators for std::pair
Jonathan Wakely [Mon, 15 Oct 2018 11:52:48 +0000 (12:52 +0100)] 
PR libstdc++/86751 default assignment operators for std::pair

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

6 years agobackport: [multiple changes]
Richard Biener [Mon, 15 Oct 2018 10:50:57 +0000 (10:50 +0000)] 
backport: [multiple changes]

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

6 years agoDaily bump.
GCC Administrator [Mon, 15 Oct 2018 00:16:36 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r265152

6 years agoDaily bump.
GCC Administrator [Sun, 14 Oct 2018 00:16:06 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r265143

6 years agoDaily bump.
GCC Administrator [Sat, 13 Oct 2018 00:16:20 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r265136

6 years agobackport: re PR target/87550 (Intrinsics for rdpmc (__rdpmc, __builtin_ia32_rdpmc...
Jakub Jelinek [Fri, 12 Oct 2018 17:34:07 +0000 (19:34 +0200)] 
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

6 years agobackport: re PR middle-end/87248 (Bad code for masked operations involving signed...
Jakub Jelinek [Fri, 12 Oct 2018 17:33:25 +0000 (19:33 +0200)] 
backport: re PR middle-end/87248 (Bad code for masked operations involving signed ints)

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

6 years agobackport: re PR rtl-optimization/87065 (combine causes ICE in trunc_int_for_mode)
Jakub Jelinek [Fri, 12 Oct 2018 17:32:38 +0000 (19:32 +0200)] 
backport: re PR rtl-optimization/87065 (combine causes ICE in trunc_int_for_mode)

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

6 years agobackport: re PR middle-end/86627 (Signed 128-bit division by 2 no longer expanded...
Jakub Jelinek [Fri, 12 Oct 2018 17:31:33 +0000 (19:31 +0200)] 
backport: re PR middle-end/86627 (Signed 128-bit division by 2 no longer expanded to RTL)

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

6 years agobackport: re PR middle-end/86542 (wrong-code for collapsed taskloop which needs omp_c...
Jakub Jelinek [Fri, 12 Oct 2018 17:30:45 +0000 (19:30 +0200)] 
backport: re PR middle-end/86542 (wrong-code for collapsed taskloop which needs omp_cpyfn)

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

6 years agobackport: re PR middle-end/86539 (OpenMP wrong-code with taskloop and references)
Jakub Jelinek [Fri, 12 Oct 2018 17:29:35 +0000 (19:29 +0200)] 
backport: re PR middle-end/86539 (OpenMP wrong-code with taskloop and references)

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

6 years agobackport: re PR middle-end/86660 (libgomp.c++/for-15.C ICEs with nvptx offloading)
Jakub Jelinek [Fri, 12 Oct 2018 17:28:51 +0000 (19:28 +0200)] 
backport: re PR middle-end/86660 (libgomp.c++/for-15.C ICEs with nvptx offloading)

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

6 years agobackport: re PR c++/3698 (improper handling of an extern declared inline function)
Jakub Jelinek [Fri, 12 Oct 2018 17:27:56 +0000 (19:27 +0200)] 
backport: re PR c++/3698 (improper handling of an extern declared inline function)

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

6 years agobackport: [multiple changes]
Richard Biener [Fri, 12 Oct 2018 13:44:35 +0000 (13:44 +0000)] 
backport: [multiple changes]

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

6 years agoFix __gnu_cxx::_Pointer_adapter for long long arithmetic
Jonathan Wakely [Fri, 12 Oct 2018 13:04:44 +0000 (14:04 +0100)] 
Fix __gnu_cxx::_Pointer_adapter for long long arithmetic

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

6 years agoFix experimental::pmr typedefs and add tests
Jonathan Wakely [Fri, 12 Oct 2018 13:04:38 +0000 (14:04 +0100)] 
Fix experimental::pmr typedefs and add tests

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

6 years agoPR libstdc++/70966 make pmr::new_delete_resource() immortal
Jonathan Wakely [Fri, 12 Oct 2018 13:04:24 +0000 (14:04 +0100)] 
PR libstdc++/70966 make pmr::new_delete_resource() immortal

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

6 years agoi386: Correct _mm512_mask3_fmaddsub_round_pd
H.J. Lu [Fri, 12 Oct 2018 12:38:28 +0000 (12:38 +0000)] 
i386: Correct _mm512_mask3_fmaddsub_round_pd

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

6 years agoi386: Don't pass -msse2avx to assembler for -mavx
H.J. Lu [Fri, 12 Oct 2018 12:34:36 +0000 (12:34 +0000)] 
i386: Don't pass -msse2avx to assembler for -mavx

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

6 years agoPR libstdc++/77854 document size_type for containers
Jonathan Wakely [Fri, 12 Oct 2018 11:37:51 +0000 (12:37 +0100)] 
PR libstdc++/77854 document size_type for containers

PR libstdc++/77854
* doc/xml/manual/status_cxx1998.xml: Document size_type and
difference_type for containers.
* doc/html/*: Regenerate.

From-SVN: r265084

6 years agoPR libstdc++/85098 add missing definitions for static constants
Jonathan Wakely [Fri, 12 Oct 2018 11:37:46 +0000 (12:37 +0100)] 
PR libstdc++/85098 add missing definitions for static constants

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.
* testsuite/28_regex/basic_regex/85098.cc: New

From-SVN: r265083

6 years agoDaily bump.
GCC Administrator [Fri, 12 Oct 2018 00:16:30 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r265069

6 years agoDaily bump.
GCC Administrator [Thu, 11 Oct 2018 00:16:20 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r265029

6 years agoDaily bump.
GCC Administrator [Wed, 10 Oct 2018 00:16:27 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r265000

6 years agoUse -fno-show-column in libstdc++ installed testing.
Joseph Myers [Tue, 9 Oct 2018 11:40:45 +0000 (12:40 +0100)] 
Use -fno-show-column in libstdc++ installed testing.

<https://gcc.gnu.org/ml/libstdc++/2016-08/msg00006.html> arranged for
libstdc++ tests to use -fno-show-column by default, but only for
build-tree testing.  This patch adds it to the options used for
installed testing as well.

Tested with installed testing for a cross to x86_64-linux-gnu, where
it fixes various test failures.

Backport from mainline
2018-10-02  Joseph Myers  <joseph@codesourcery.com>

* testsuite/lib/libstdc++.exp (libstdc++_init): Use
-fno-show-column in default cxxflags.

From-SVN: r264955

6 years agoDaily bump.
GCC Administrator [Tue, 9 Oct 2018 00:16:19 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r264945

6 years agoDaily bump.
GCC Administrator [Mon, 8 Oct 2018 00:16:22 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r264907

6 years agoDaily bump.
GCC Administrator [Sun, 7 Oct 2018 00:16:05 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r264903

6 years agoDaily bump.
GCC Administrator [Sat, 6 Oct 2018 00:16:22 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r264893

6 years agoDaily bump.
GCC Administrator [Fri, 5 Oct 2018 00:16:08 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r264857

6 years agoDaily bump.
GCC Administrator [Thu, 4 Oct 2018 00:16:10 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r264828

6 years agoDaily bump.
GCC Administrator [Wed, 3 Oct 2018 00:16:24 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r264801

6 years agoDaily bump.
GCC Administrator [Tue, 2 Oct 2018 00:16:21 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r264774

6 years agoDaily bump.
GCC Administrator [Mon, 1 Oct 2018 00:16:05 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r264728

6 years agoDaily bump.
GCC Administrator [Sun, 30 Sep 2018 00:16:06 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r264717

6 years agoDaily bump.
GCC Administrator [Sat, 29 Sep 2018 00:16:06 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r264706

6 years agoDaily bump.
GCC Administrator [Fri, 28 Sep 2018 00:16:28 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r264682

6 years agoDaily bump.
GCC Administrator [Thu, 27 Sep 2018 00:16:38 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r264658

6 years agoDaily bump.
GCC Administrator [Wed, 26 Sep 2018 00:16:32 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r264589

6 years agoDaily bump.
GCC Administrator [Tue, 25 Sep 2018 00:16:07 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r264549

6 years agoDaily bump.
GCC Administrator [Mon, 24 Sep 2018 00:16:16 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r264519

6 years agobackport: re PR sanitizer/86012 (libsanitizer build failure on sparc64-linux-gnu)
Matthias Klose [Sun, 23 Sep 2018 08:36:14 +0000 (08:36 +0000)] 
backport: re PR sanitizer/86012 (libsanitizer build failure on sparc64-linux-gnu)

2017-09-23  Matthias Klose  <doko@ubuntu.com>

        Backported from the gcc-7-branch:
        2018-05-31  Matthias Klose  <doko@ubuntu.com>

        PR sanitizer/86012
        * sanitizer_common/sanitizer_platform_limits_posix.cc: Define
        SIZEOF_STRUCT_USTAT for 32bit sparc.

From-SVN: r264511

6 years agoDaily bump.
GCC Administrator [Sun, 23 Sep 2018 00:16:06 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r264507

6 years agoDaily bump.
GCC Administrator [Sat, 22 Sep 2018 00:16:19 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r264497

6 years agobackport: re PR sanitizer/85835 (libsanitizer includes <sys/ustat.h> unconditionally)
Matthias Klose [Fri, 21 Sep 2018 07:18:26 +0000 (07:18 +0000)] 
backport: re PR sanitizer/85835 (libsanitizer includes <sys/ustat.h> unconditionally)

2017-09-21  Matthias Klose  <doko@ubuntu.com>

        Backported from the gcc-7-branch:
        2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>

        PR sanitizer/85835
        * sanitizer_common/sanitizer_platform_limits_posix.cc: Don't
        include <sys/ustat.h> for Linux.
        (SIZEOF_STRUCT_USTAT): New.
        (struct_ustat_sz): Use SIZEOF_STRUCT_USTAT for Linux.

From-SVN: r264457

6 years agoDaily bump.
GCC Administrator [Fri, 21 Sep 2018 00:16:27 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r264453

6 years agopa.md (atomic_storeqi): Restore deleted expander.
John David Anglin [Thu, 20 Sep 2018 01:13:58 +0000 (01:13 +0000)] 
pa.md (atomic_storeqi): Restore deleted expander.

* config/pa/pa.md (atomic_storeqi): Restore deleted expander.
(atomic_storehi): Likewise.
(atomic_storesi): Likewise.
(atomic_loaddi): Restore compare and swap exchange loop code.

From-SVN: r264436

6 years agoDaily bump.
GCC Administrator [Thu, 20 Sep 2018 00:16:19 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r264429

6 years agoDaily bump.
GCC Administrator [Wed, 19 Sep 2018 00:16:29 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r264414

6 years agoDaily bump.
GCC Administrator [Tue, 18 Sep 2018 00:16:16 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r264377

6 years agoDaily bump.
GCC Administrator [Mon, 17 Sep 2018 00:16:05 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r264352

6 years agoDaily bump.
GCC Administrator [Sun, 16 Sep 2018 00:16:29 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r264343

6 years agoDaily bump.
GCC Administrator [Sat, 15 Sep 2018 00:16:12 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r264338

6 years agoDaily bump.
GCC Administrator [Fri, 14 Sep 2018 00:16:30 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r264296

6 years agoDaily bump.
GCC Administrator [Thu, 13 Sep 2018 00:16:05 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r264255

6 years agoDaily bump.
GCC Administrator [Wed, 12 Sep 2018 00:16:30 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r264223

6 years agoDaily bump.
GCC Administrator [Tue, 11 Sep 2018 00:16:21 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r264197

6 years agoDaily bump.
GCC Administrator [Mon, 10 Sep 2018 00:16:23 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r264186

6 years agoDaily bump.
GCC Administrator [Sun, 9 Sep 2018 00:16:22 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r264173

6 years agoDaily bump.
GCC Administrator [Sat, 8 Sep 2018 00:16:20 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r264164

6 years agobackport: re PR fortran/86116 (Ambiguous generic interface not recognised)
Janus Weil [Fri, 7 Sep 2018 18:01:23 +0000 (20:01 +0200)] 
backport: re PR fortran/86116 (Ambiguous generic interface not recognised)

2018-09-07  Janus Weil  <janus@gcc.gnu.org>

Backported from trunk
PR fortran/86116
* interface.c (compare_type): Remove a CLASS/TYPE check.
(compare_type_characteristics): New function that behaves like the old
'compare_type'.
(gfc_check_dummy_characteristics, gfc_check_result_characteristics):
Call 'compare_type_characteristics' instead of 'compare_type'.

2018-09-07  Janus Weil  <janus@gcc.gnu.org>

Backported from trunk
PR fortran/86116
* gfortran.dg/generic_34.f90: New test case.

From-SVN: r264162

6 years agoDaily bump.
GCC Administrator [Fri, 7 Sep 2018 00:16:15 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r264152

6 years agoDaily bump.
GCC Administrator [Thu, 6 Sep 2018 00:16:25 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r264135

6 years agoDaily bump.
GCC Administrator [Wed, 5 Sep 2018 00:16:14 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r264097

6 years agogcc: xtensa: fix NAND code in xtensa_expand_atomic
Max Filippov [Tue, 4 Sep 2018 18:03:57 +0000 (18:03 +0000)] 
gcc: xtensa: fix NAND code in xtensa_expand_atomic

NAND is ~(a1 & a2), but xtensa_expand_atomic does ~a1 & a2.
That fixes libatomic tests atomic-op-{1,2}.

gcc/
2018-09-04  Max Filippov  <jcmvbkbc@gmail.com>

Backport from mainline
2018-09-04  Max Filippov  <jcmvbkbc@gmail.com>

* config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
XOR operations in NAND case.

From-SVN: r264093

6 years agoDaily bump.
GCC Administrator [Tue, 4 Sep 2018 00:16:27 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r264071

6 years agobackport "[tail-merge] Fix side-effect test in stmt_local_def"
Tom de Vries [Mon, 3 Sep 2018 10:14:52 +0000 (10:14 +0000)] 
backport "[tail-merge] Fix side-effect test in stmt_local_def"

2018-09-03  Tom de Vries  <tdevries@suse.de>

backport from trunk:
2018-06-21  Tom de Vries  <tdevries@suse.de>

PR tree-optimization/85859
* tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
test with comment from bb_no_side_effects_p.

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

From-SVN: r264055

6 years agoDaily bump.
GCC Administrator [Mon, 3 Sep 2018 00:16:35 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r264046

6 years agoDaily bump.
GCC Administrator [Sun, 2 Sep 2018 00:16:10 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r264034

6 years agoDaily bump.
GCC Administrator [Sat, 1 Sep 2018 00:16:25 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r264023

6 years agoDaily bump.
GCC Administrator [Fri, 31 Aug 2018 00:16:19 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r264003

6 years agoDaily bump.
GCC Administrator [Thu, 30 Aug 2018 00:16:38 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r263969

6 years agoDaily bump.
GCC Administrator [Wed, 29 Aug 2018 00:16:20 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r263937

6 years agoDaily bump.
GCC Administrator [Tue, 28 Aug 2018 00:16:21 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r263901

6 years agoDaily bump.
GCC Administrator [Mon, 27 Aug 2018 00:16:09 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r263864

6 years agoDaily bump.
GCC Administrator [Sun, 26 Aug 2018 00:16:19 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r263857

6 years agoDaily bump.
GCC Administrator [Sat, 25 Aug 2018 00:16:39 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r263846

6 years agoDaily bump.
GCC Administrator [Fri, 24 Aug 2018 00:16:36 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r263824

6 years agoDaily bump.
GCC Administrator [Thu, 23 Aug 2018 00:16:29 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r263795