]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
6 years agoDaily bump.
GCC Administrator [Thu, 8 Nov 2018 00:16:31 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r265900

6 years agogcc: xtensa: don't force PIC for uclinux target
Max Filippov [Wed, 7 Nov 2018 20:52:29 +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: r265889

6 years agoDaily bump.
GCC Administrator [Wed, 7 Nov 2018 00:16:37 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r265854

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

From-SVN: r265824

6 years agocompiler: handle abstract type in builtin numeric const value
Ian Lance Taylor [Mon, 5 Nov 2018 20:59:38 +0000 (20:59 +0000)] 
compiler: handle abstract type in builtin numeric const value

    Builtin_call_expression::do_numeric_constant_value can be called by
    Array_type::verify_length before the determine types pass, so accept
    an abstract type.

    Test case is https://golang.org/cl/147537.

    Fixes golang/go#28601

    Reviewed-on: https://go-review.googlesource.com/c/147442

From-SVN: r265818

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

From-SVN: r265781

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

From-SVN: r265771

6 years agobackport: re PR fortran/87597 (wrong result with matmul inlining)
Tobias Burnus [Sat, 3 Nov 2018 14:49:33 +0000 (15:49 +0100)] 
backport: re PR fortran/87597 (wrong result with matmul inlining)

2019-11-03  Tobias Burnus  <burnus@net-b.de>
Thomas Koenig  <tkoenig@gcc.gnu.org>

Backport from trunk
PR fortran/87597
* expr.c (gfc_simplify_expr): Avoid simplifying
the 'array' argument to lbound/ubound/lcobound/
ucobound.

2018-11-03  Tobias Burnus  <burnus@net-b.de>
Thomas Koenig  <tkoenig@gcc.gnu.org>

Backport from trunk
PR fortran/87597
* gfortran.dg/inline_matmul_24.f90: New.

Co-Authored-By: Thomas Koenig <tkoenig@gcc.gnu.org>
From-SVN: r265769

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

From-SVN: r265764

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

From-SVN: r265736

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

From-SVN: r265705

6 years agoPR libstdc++/87822 fix layout change for nested std::pair
Jonathan Wakely [Wed, 31 Oct 2018 13:16:10 +0000 (13:16 +0000)] 
PR libstdc++/87822 fix layout change for nested std::pair

The introduction of the empty __pair_base base class for PR 86751
changed the layout of std::pair<std::pair<...>, ...>. The outer pair and
its first member both have a base class of the same type, which cannot
exist at the same address. This causes the first member to be at a
non-zero offset.

The solution is to make the base class depend on the template
parameters, so that each pair type has a different base class type,
which allows the base classes of the outer pair and its first member to
have the same address.

PR libstdc++/87822
* include/bits/stl_pair.h (__pair_base): Change to class template.
(pair): Make base class type depend on template parameters.
* testsuite/20_util/pair/87822.cc: New test.

From-SVN: r265683

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

From-SVN: r265650

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

From-SVN: r265612

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

From-SVN: r265579

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

From-SVN: r265562

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

From-SVN: r265552

6 years agobackport: re PR tree-optimization/87473 (ICE in create_add_on_incoming_edge, at gimpl...
Bill Schmidt [Fri, 26 Oct 2018 19:38:45 +0000 (19:38 +0000)] 
backport: re PR tree-optimization/87473 (ICE in create_add_on_incoming_edge, at gimple-ssa-strength-reduction.c:2344)

[gcc]

2018-10-26  Bill Schmidt  <wschmidt@linux.ibm.com>

Backport from mainline
2018-10-19  Bill Schmidt  <wschmidt@linux.ibm.com>

PR tree-optimization/87473
* gimple-ssa-strength-reduction.c (record_phi_increments): For
phi arguments identical to the base expression of the phi
candidate, record a phi-adjust increment of zero minus the index
expression of the hidden basis.
(phi_incr_cost): For phi arguments identical to the base
expression of the phi candidate, the difference to compare against
the increment is zero minus the index expression of the hidden
basis, and there is no potential savings from replacing the (phi)
statement.
(ncd_with_phi): For phi arguments identical to the base expression
of the phi candidate, the difference to compare against the
increment is zero minus the index expression of the hidden basis.
(all_phi_incrs_profitable): For phi arguments identical to the
base expression of the phi candidate, the increment to be checked
for profitability is zero minus the index expression of the hidden
basis.

[gcc/testsuite]

2018-10-26  Bill Schmidt  <wschmidt@linux.ibm.com>

Backport from mainline
2018-10-19  Bill Schmidt  <wschmidt@linux.ibm.com>

PR tree-optimization/87473
* gcc.c-torture/compile/pr87473.c: New file.

From-SVN: r265547

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

From-SVN: r265512

6 years agoPR libstdc++/87749 fix (and optimize) string move construction
Jonathan Wakely [Thu, 25 Oct 2018 16:32:47 +0000 (17:32 +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: r265497

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

From-SVN: r265476

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

From-SVN: r265446

6 years agoPR libstdc++/87704 fix unique_ptr(nullptr_t) constructors
Jonathan Wakely [Tue, 23 Oct 2018 15:55:05 +0000 (16:55 +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).

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: r265429

6 years agobackport "[c++] Fix DECL_BY_REFERENCE of clone parms"
Tom de Vries [Tue, 23 Oct 2018 15:06:17 +0000 (15:06 +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: r265427

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

From-SVN: r265406

6 years agoutils.c (unchecked_convert): Use local variables for the biased and reverse SSO attri...
Eric Botcazou [Mon, 22 Oct 2018 11:09:11 +0000 (11:09 +0000)] 
utils.c (unchecked_convert): Use local variables for the biased and reverse SSO attributes of both types.

* gcc-interface/utils.c (unchecked_convert): Use local variables for
the biased and reverse SSO attributes of both types.
Further extend the processing of integral types in the presence of
reverse SSO to all scalar types.

From-SVN: r265383

6 years agotrans.c (Pragma_to_gnu): Use a simple memory constraint in all cases.
Eric Botcazou [Mon, 22 Oct 2018 10:45:25 +0000 (10:45 +0000)] 
trans.c (Pragma_to_gnu): Use a simple memory constraint in all cases.

* gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Inspection_Point>: Use
a simple memory constraint in all cases.

From-SVN: r265380

6 years agoPR libstdc++/79433 no #error for including TS headers with wrong -std
Jonathan Wakely [Mon, 22 Oct 2018 08:47:52 +0000 (09:47 +0100)] 
PR libstdc++/79433 no #error for including TS headers with wrong -std

Backport from mainline
2017-09-12  Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/79433
* include/Makefile.am: Remove <bits/c++14_warning.h>.
* include/Makefile.in: Regenerate.
* include/bits/c++14_warning.h: Remove.
* include/experimental/algorithm: Do not include <c++14_warning.h>.
* include/experimental/any: Likewise.
* include/experimental/array: Likewise.
* include/experimental/bits/erase_if.h: Likewise.
* include/experimental/bits/lfts_config.h: Likewise.
* include/experimental/bits/shared_ptr.h: Likewise.
* include/experimental/bits/string_view.tcc: Likewise.
* include/experimental/chrono: Likewise.
* include/experimental/deque: Likewise.
* include/experimental/filesystem: Do not include <c++0x_warning.h>.
* include/experimental/forward_list: Do not include <c++14_warning.h>.
* include/experimental/functional: Likewise.
* include/experimental/iterator: Likewise.
* include/experimental/list: Likewise.
* include/experimental/map: Likewise.
* include/experimental/memory: Likewise.
* include/experimental/numeric: Likewise.
* include/experimental/optional: Likewise.
* include/experimental/propagate_const: Likewise.
* include/experimental/ratio: Likewise.
* include/experimental/regex: Likewise.
* include/experimental/set: Likewise.
* include/experimental/string: Likewise.
* include/experimental/string_view: Likewise.
* include/experimental/system_error: Likewise.
* include/experimental/tuple: Likewise.
* include/experimental/type_traits: Likewise.
* include/experimental/unordered_map: Likewise.
* include/experimental/unordered_set: Likewise.
* include/experimental/vector: Likewise.
* testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error
line number.
* testsuite/experimental/array/neg.cc: Likewise.
* testsuite/experimental/propagate_const/assignment/move_neg.cc:
Likewise.
* testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
* testsuite/experimental/propagate_const/requirements2.cc: Likewise.
* testsuite/experimental/propagate_const/requirements3.cc: Likewise.
* testsuite/experimental/propagate_const/requirements4.cc: Likewise.
* testsuite/experimental/propagate_const/requirements5.cc: Likewise.

From-SVN: r265374

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

From-SVN: r265364

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

From-SVN: r265347

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

From-SVN: r265337

6 years agoS/390: Fix problem with vec_init expander
Andreas Krebbel [Fri, 19 Oct 2018 08:55:27 +0000 (08:55 +0000)] 
S/390: Fix problem with vec_init expander

gcc/ChangeLog:

2018-10-19  Andreas Krebbel  <krebbel@linux.ibm.com>

Backport from mainline
2018-10-15  Andreas Krebbel  <krebbel@linux.ibm.com>

* config/s390/s390.c (s390_expand_vec_init): Force vector element
into reg if it isn't a general operand.

gcc/testsuite/ChangeLog:

2018-10-19  Andreas Krebbel  <krebbel@linux.ibm.com>

Backport from mainline
2018-10-15  Andreas Krebbel  <krebbel@linux.ibm.com>

* g++.dg/vec-init-1.C: New test.

From-SVN: r265309

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

From-SVN: r265301

6 years agoPR libstdc++/87641 correctly initialize accumulator in valarray::sum()
Jonathan Wakely [Thu, 18 Oct 2018 19:38:56 +0000 (20:38 +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: r265285

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

From-SVN: r265253

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

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

From-SVN: r265226

6 years ago[AArch64] Fix PR87511
Wilco Dijkstra [Tue, 16 Oct 2018 13:40:57 +0000 (13:40 +0000)] 
[AArch64] Fix PR87511

As mentioned in PR87511, the shift used in aarch64_mask_and_shift_for_ubfiz_p
should be evaluated as a HOST_WIDE_INT rather than int.

Backported from mainline

    gcc/
PR target/87511
* config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
Use HOST_WIDE_INT_1U for shift.

    testsuite/
PR target/87511
* gcc.target/aarch64/pr87511.c: Add new test.

From-SVN: r265195

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

From-SVN: r265181

6 years agoAdjust test to pass with latest glibc
Jonathan Wakely [Mon, 15 Oct 2018 14:01:47 +0000 (15:01 +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: r265167

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

From-SVN: r265153

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

From-SVN: r265144

6 years agobackport: close.c: Include <string.h>.
Gerald Pfeifer [Sat, 13 Oct 2018 11:25:11 +0000 (11:25 +0000)] 
backport: close.c: Include <string.h>.

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

From-SVN: r265141

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

From-SVN: r265137

6 years agobackport: re PR target/87550 (Intrinsics for rdpmc (__rdpmc, __builtin_ia32_rdpmc...
Jakub Jelinek [Fri, 12 Oct 2018 14:55:17 +0000 (16:55 +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-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
to special_args set.

* gcc.target/i386/pr87550.c: New test.

From-SVN: r265112

6 years agobackport: re PR middle-end/87248 (Bad code for masked operations involving signed...
Jakub Jelinek [Fri, 12 Oct 2018 14:54:34 +0000 (16:54 +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: r265111

6 years agobackport: re PR rtl-optimization/87065 (combine causes ICE in trunc_int_for_mode)
Jakub Jelinek [Fri, 12 Oct 2018 14:53:54 +0000 (16:53 +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: r265110

6 years agobackport: re PR middle-end/86627 (Signed 128-bit division by 2 no longer expanded...
Jakub Jelinek [Fri, 12 Oct 2018 14:53:11 +0000 (16:53 +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: r265109

6 years agobackport: re PR middle-end/86542 (wrong-code for collapsed taskloop which needs omp_c...
Jakub Jelinek [Fri, 12 Oct 2018 14:52:18 +0000 (16:52 +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: r265108

6 years agobackport: re PR middle-end/86539 (OpenMP wrong-code with taskloop and references)
Jakub Jelinek [Fri, 12 Oct 2018 14:49:32 +0000 (16:49 +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: r265107

6 years agobackport: re PR fortran/86421 (OpenMP declare simd linear ref in module causes gfortr...
Jakub Jelinek [Fri, 12 Oct 2018 14:47:57 +0000 (16:47 +0200)] 
backport: re PR fortran/86421 (OpenMP declare simd linear ref in module causes gfortran to bail out)

Backported from mainline
2018-07-10  Jakub Jelinek  <jakub@redhat.com>

PR fortran/86421
* module.c (omp_declare_simd_clauses): Add LINEAR with _REF, _VAL and
_UVAL suffixes.
(mio_omp_declare_simd): Save and restore ref, val and uval modifiers
on linear clauses.  Initialize n->where to gfc_current_locus.

* gfortran.dg/vect/pr86421.f90: New test.

From-SVN: r265106

6 years agobackport: re PR middle-end/86660 (libgomp.c++/for-15.C ICEs with nvptx offloading)
Jakub Jelinek [Fri, 12 Oct 2018 14:46:18 +0000 (16:46 +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: r265105

6 years agobackport: re PR c++/3698 (improper handling of an extern declared inline function)
Jakub Jelinek [Fri, 12 Oct 2018 14:43:18 +0000 (16:43 +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: r265103

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

2018-10-12  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: r265100

6 years agoPR libstdc++/86751 default assignment operators for std::pair
Jonathan Wakely [Fri, 12 Oct 2018 12:51:46 +0000 (13:51 +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: r265096

6 years agoPR libstdc++/78595 implement insertion into maps in terms of emplace
Jonathan Wakely [Fri, 12 Oct 2018 12:51:40 +0000 (13:51 +0100)] 
PR libstdc++/78595 implement insertion into maps in terms of emplace

C++14 simplified the specification of the generic insert function
templates to be equivalent to calling emplace (or emplace_hint).
Defining them in terms of emplace takes care of the problems described
in PR 78595, ensuring a single conversion to value_type is done at the
right time.

Backport from mainline
2018-09-03  Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/78595
* include/bits/stl_map.h (map::insert(_Pair&&))
(map::insert(const_iterator, _Pair&&)): Do emplace instead of insert.
* include/bits/stl_multimap.h (multimap::insert(_Pair&&))
(multimap::insert(const_iterator, _Pair&&)): Likewise.
* include/bits/unordered_map.h (unordered_map::insert(_Pair&&))
(unordered_map::insert(const_iterator, _Pair&&))
(unordered_multimap::insert(_Pair&&))
(unordered_multimap::insert(const_iterator, _Pair&&)): Likewise.
* include/std/type_traits (__enable_if_t): Define for C++11.
* testsuite/23_containers/map/modifiers/insert/78595.cc: New test.
* testsuite/23_containers/multimap/modifiers/insert/78595.cc: New test.
* testsuite/23_containers/unordered_map/modifiers/78595.cc: New test.
* testsuite/23_containers/unordered_multimap/modifiers/78595.cc: New
test.

From-SVN: r265095

6 years agoFix __gnu_cxx::_Pointer_adapter for long long arithmetic
Jonathan Wakely [Fri, 12 Oct 2018 12:51:34 +0000 (13:51 +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: r265094

6 years agoFix experimental::pmr typedefs and add tests
Jonathan Wakely [Fri, 12 Oct 2018 12:51:29 +0000 (13:51 +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-23  Jonathan Wakely  <jwakely@redhat.com>

* testsuite/21_strings/basic_string/init-list.cc:
Require cxx11-abi.
* testsuite/experimental/polymorphic_allocator/pmr_typedefs_match.cc:
Likewise.
* testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
Likewise.

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: r265093

6 years agoPR libstdc++/70966 make pmr::new_delete_resource() immortal
Jonathan Wakely [Fri, 12 Oct 2018 12:51:20 +0000 (13:51 +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: r265092

6 years agoPR libstdc++/77854 document size_type for containers
Jonathan Wakely [Fri, 12 Oct 2018 11:36:18 +0000 (12:36 +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: r265082

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

From-SVN: r265070

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

From-SVN: r265030

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

From-SVN: r265001

6 years agoi386: Use TImode for BLKmode values in 2 integer registers
H.J. Lu [Tue, 9 Oct 2018 17:23:06 +0000 (17:23 +0000)] 
i386: Use TImode for BLKmode values in 2 integer registers

When passing and returning BLKmode values in 2 integer registers, use
1 TImode register instead of 2 DImode registers. Otherwise, V1TImode
may be used to move and store such BLKmode values, which prevent RTL
optimizations.

gcc/

Backport from mainline
PR target/87370
* config/i386/i386.c (construct_container): Use TImode for
BLKmode values in 2 integer registers.

gcc/testsuite/

Backport from mainline
PR target/87370
* gcc.target/i386/pr87370.c: New test.

From-SVN: r264989

6 years agoUse -fno-show-column in libstdc++ installed testing.
Joseph Myers [Tue, 9 Oct 2018 11:37:18 +0000 (12:37 +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: r264953

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

From-SVN: r264946

6 years agoi386: Correct _mm512_mask3_fmaddsub_round_pd
H.J. Lu [Mon, 8 Oct 2018 15:23:48 +0000 (15:23 +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: r264937

6 years agoPR libstdc++/87538 fix std::not_fn exception specifications
Jonathan Wakely [Mon, 8 Oct 2018 13:13:06 +0000 (14:13 +0100)] 
PR libstdc++/87538 fix std::not_fn exception specifications

Backport from mainline
2018-10-08  Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/87538
* include/std/functional (_Not_fn::operator()): Check value of
__is_nothrow_invocable as well.
* testsuite/20_util/function_objects/not_fn/87538.cc: New test.
* testsuite/experimental/functional/87538.cc: New test.

From-SVN: r264926

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

From-SVN: r264908

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

From-SVN: r264904

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

From-SVN: r264894

6 years agoi386: Don't pass -msse2avx to assembler for -mavx
H.J. Lu [Fri, 5 Oct 2018 11:40:59 +0000 (11:40 +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: r264867

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

From-SVN: r264858

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

From-SVN: r264829

6 years agobackport: i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
Uros Bizjak [Wed, 3 Oct 2018 21:49:11 +0000 (23:49 +0200)] 
backport: i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.

Backport from mainline
2018-09-28  Uros Bizjak  <ubizjak@gmail.com>

* config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
(GET_SSE_REGNO): Rename from SSE_REGNO.  Update all uses for rename.

From-SVN: r264826

6 years agoPR other/87353 fix formatting and grammar in manual
Jonathan Wakely [Wed, 3 Oct 2018 10:58:49 +0000 (11:58 +0100)] 
PR other/87353 fix formatting and grammar in manual

The changes to invoke.texi in r242433 left some unwanted spaces that
texi2pod.pl interprets as verbatim formatting. There are also some
grammatical errors due to the removal of references to GCJ, where the
G++ driver is referred to in the plural.

PR other/87353
* doc/invoke.texi (Link Options): Fix formatting and grammar.

From-SVN: r264810

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

From-SVN: r264802

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

From-SVN: r264775

6 years ago[arm] Avoid STRD with odd register for TARGET_ARM in output_move_double
Kyrylo Tkachov [Mon, 1 Oct 2018 12:39:43 +0000 (12:39 +0000)] 
[arm] Avoid STRD with odd register for TARGET_ARM in output_move_double

2018-10-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

Backport from mainline
2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

* config/arm/arm.c (output_move_double): Don't allow STRD instructions
if starting source register is not even.

Backport from mainline
2018-07-02  Christophe Lyon  <christophe.lyon@linaro.org>

* gcc.target/arm/arm-soft-strd-even.c: Skip if -mfloat-abi is
overriden.
2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

* gcc.target/arm/arm-soft-strd-even.c: New test.

From-SVN: r264746

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

From-SVN: r264729

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

From-SVN: r264718

6 years agore PR target/87467 (Incorrect function parameter for _mm512_abs_pd in `include/avx512...
Jakub Jelinek [Sat, 29 Sep 2018 16:28:53 +0000 (18:28 +0200)] 
re PR target/87467 (Incorrect function parameter for _mm512_abs_pd in `include/avx512fintrin.h`)

PR target/87467
* config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
__m512d type for __A argument rather than __m512.

* gcc.target/i386/avx512f-abspd-1.c (SIZE): Divide by two.
(CALC): Use double instead of float.
(TEST): Adjust to test _mm512_abs_pd and _mm512_mask_abs_pd rather than
_mm512_abs_ps and _mm512_mask_abs_ps.

From-SVN: r264714

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

From-SVN: r264707

6 years agoBackport pr 87033 to gcc 7
Michael Meissner [Fri, 28 Sep 2018 00:32:46 +0000 (00:32 +0000)] 
Backport pr 87033 to gcc 7

From-SVN: r264686

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

From-SVN: r264683

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

From-SVN: r264659

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

From-SVN: r264590

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

From-SVN: r264550

6 years agoFix thinko
Eric Botcazou [Mon, 24 Sep 2018 08:15:53 +0000 (08:15 +0000)] 
Fix thinko

From-SVN: r264524

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

From-SVN: r264520

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

From-SVN: r264508

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

From-SVN: r264498

6 years agors6000.c (rs6000_function_ok_for_sibcall): Return false if the call takes a static...
Eric Botcazou [Fri, 21 Sep 2018 10:06:25 +0000 (10:06 +0000)] 
rs6000.c (rs6000_function_ok_for_sibcall): Return false if the call takes a static chain.

* config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
if the call takes a static chain.

From-SVN: r264465

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

From-SVN: r264454

6 years agopa.md (atomic_storeqi): Restore deleted expander.
John David Anglin [Thu, 20 Sep 2018 01:10:47 +0000 (01:10 +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: r264435

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

From-SVN: r264430

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

From-SVN: r264415

6 years ago[libgfortran] Fix uninitialized variable use in fallback_access
Kyrylo Tkachov [Tue, 18 Sep 2018 09:02:14 +0000 (09:02 +0000)] 
[libgfortran] Fix uninitialized variable use in fallback_access

Backport from trunk
2018-09-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

* io/unix.c (fallback_access): Avoid calling close on
uninitialized file descriptor.

From-SVN: r264384

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

From-SVN: r264378

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

From-SVN: r264353