]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
3 years agoDaily bump.
GCC Administrator [Tue, 30 Nov 2021 00:17:30 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Mon, 29 Nov 2021 00:17:23 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sun, 28 Nov 2021 00:17:12 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sat, 27 Nov 2021 00:17:25 +0000 (00:17 +0000)] 
Daily bump.

3 years agoFortran: do not attempt simplification of [LU]BOUND for pointer/allocatable
Harald Anlauf [Tue, 23 Nov 2021 20:39:36 +0000 (21:39 +0100)] 
Fortran: do not attempt simplification of [LU]BOUND for pointer/allocatable

gcc/fortran/ChangeLog:

PR fortran/103392
* simplify.c (simplify_bound): Do not try to simplify
LBOUND/UBOUND for arrays with POINTER or ALLOCATABLE attribute.

gcc/testsuite/ChangeLog:

PR fortran/103392
* gfortran.dg/bound_simplification_7.f90: New test.

(cherry picked from commit 16e95050f71e9fa408e9bd8ccd415b0e7adc66e5)

3 years agolibstdc++: Use std::addressof in ranges::uninitialized_xxx [PR101571]
Jonathan Wakely [Thu, 22 Jul 2021 13:37:24 +0000 (14:37 +0100)] 
libstdc++: Use std::addressof in ranges::uninitialized_xxx [PR101571]

Make the ranges::uninitialized_xxx algorithms use std::addressof to
protect against iterator types that overload operator&.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:

PR libstdc++/101571
* include/bits/ranges_uninitialized.h (_DestroyGuard): Change
constructor parameter to reference and use addressof.
* testsuite/util/testsuite_iterators.h: Define deleted operator&
overloads for test iterators.

(cherry picked from commit aca7a0253d6e3116f846ad530b19d89644a64267)

3 years agolibstdc++: Don't check always-true condition [PR101965]
Jonathan Wakely [Thu, 19 Aug 2021 12:05:54 +0000 (13:05 +0100)] 
libstdc++: Don't check always-true condition [PR101965]

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:

PR libstdc++/101965
* include/std/charconv (__to_chars_i): Remove redundant check.

(cherry picked from commit 85a709595005b5df4b2ee9d81717a5df19c0023f)

3 years agolibstdc++: Constrain std::make_any [PR102894]
Jonathan Wakely [Fri, 22 Oct 2021 21:55:00 +0000 (22:55 +0100)] 
libstdc++: Constrain std::make_any [PR102894]

std::make_any should be constrained so it can only be called if the
construction of the return value would be valid.

libstdc++-v3/ChangeLog:

PR libstdc++/102894
* include/std/any (make_any): Add SFINAE constraint.
* testsuite/20_util/any/102894.cc: New test.

(cherry picked from commit 0c1f737a485f05c591c94b50acfb416c45a4c916)

3 years agolibstdc++: Add missing 'constexpr' to std::tuple [PR102270]
Jonathan Wakely [Wed, 15 Sep 2021 20:53:35 +0000 (21:53 +0100)] 
libstdc++: Add missing 'constexpr' to std::tuple [PR102270]

This backport to gcc-10 also includes r12-3637.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:

PR libstdc++/102270
* include/std/tuple (_Head_base, _Tuple_impl): Add
_GLIBCXX20_CONSTEXPR to allocator-extended constructors.
(tuple<>::swap(tuple&)): Add _GLIBCXX20_CONSTEXPR.
* testsuite/20_util/tuple/cons/102270.cc: New test.
* testsuite/util/testsuite_allocator.h (SimpleAllocator): Add
constexpr to constructor so it can be used for C++20 tests.

3 years agolibstdc++: Make allocator equality comparable in tests
Jonathan Wakely [Mon, 9 Aug 2021 10:36:07 +0000 (11:36 +0100)] 
libstdc++: Make allocator equality comparable in tests

libstdc++-v3/ChangeLog:

* testsuite/23_containers/unordered_map/cons/default.cc: Add
equality comparison operators to allocator.
* testsuite/23_containers/unordered_set/cons/default.cc:
Likewise.

(cherry picked from commit 2eff2a3cb521c58212885a3dca638764285b5691)

3 years agolibstdc++: fix is_default_constructible for hash containers [PR 100863]
Jonathan Wakely [Tue, 20 Jul 2021 14:20:41 +0000 (15:20 +0100)] 
libstdc++: fix is_default_constructible for hash containers [PR 100863]

The recent change to _Hashtable_ebo_helper for this PR broke the
is_default_constructible trait for a hash container with a non-default
constructible allocator. That happens because the constructor needs to
be user-provided in order to initialize the member, and so is not
defined as deleted when the type is not default constructible.

By making _Hashtable derive from _Enable_special_members we can ensure
that the default constructor for the std::unordered_xxx containers is
deleted when it would be ill-formed. This makes the trait give the
correct answer.

This backport to gcc-10 includes the fix for PR 101583.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:

PR libstdc++/100863
* include/bits/hashtable.h (_Hashtable): Conditionally delete
default constructor by deriving from _Enable_default_constructor.
Construct that base-class explicitly in all non-forwarding,
non-defaulted constructors.
* testsuite/23_containers/unordered_map/cons/default.cc: New test.
* testsuite/23_containers/unordered_set/cons/default.cc: New test.

(cherry picked from commit 89ec3b67dbe856a447d068b053bc19559f136f43)

3 years agolibstdc++: Value-initialize objects held by EBO helpers [PR 100863]
Jonathan Wakely [Wed, 2 Jun 2021 11:34:48 +0000 (12:34 +0100)] 
libstdc++: Value-initialize objects held by EBO helpers [PR 100863]

The allocator, hash function and equality function should all be
value-initialized by the default constructor of an unordered container.
Do it in the EBO helper, so we don't have to get it right in multiple
places.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:

PR libstdc++/100863
PR libstdc++/65816
* include/bits/hashtable_policy.h (_Hashtable_ebo_helper):
Value-initialize subobject.
* testsuite/23_containers/unordered_map/allocator/default_init.cc:
Remove XFAIL.
* testsuite/23_containers/unordered_set/allocator/default_init.cc:
Remove XFAIL.

(cherry picked from commit f8f0193b5b83f6e85d65015e79c803295baf5166)

3 years agolibstdc++: Improve std::forward static assert message
Jonathan Wakely [Tue, 28 Sep 2021 11:35:29 +0000 (12:35 +0100)] 
libstdc++: Improve std::forward static assert message

The previous message told you something was wrong, but not why it
happened or why it's bad. This changes it to explain that the function
is being misused.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:

* include/bits/move.h (forward(remove_reference_t<T>&&)):
Improve text of static_assert.
* testsuite/20_util/forward/c_neg.cc: Adjust dg-error.
* testsuite/20_util/forward/f_neg.cc: Likewise.

(cherry picked from commit a11052d98db2f2a61841f0c5ee84de4ca1b3e296)

3 years agolibstdc++: Optimize std::seed_seq construction
Antony Polukhin [Tue, 17 Aug 2021 12:50:53 +0000 (13:50 +0100)] 
libstdc++: Optimize std::seed_seq construction

When std::seed_seq is constructed from random access iterators we can
detect the internal vector size in O(1). Reserving memory for elements
in such cases may avoid multiple memory allocations.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:

* include/bits/random.tcc (seed_seq::seed_seq): Reserve capacity
if distance is O(1).
* testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
line number.

Co-authored-by: Jonathan Wakely <jwakely@redhat.com>
(cherry picked from commit 174f9257a75dec93221eca26c236e0a6346c9dfd)

3 years agolibstdc++: Add additional overload of std::lerp [PR101870]
Jonathan Wakely [Thu, 12 Aug 2021 16:35:25 +0000 (17:35 +0100)] 
libstdc++: Add additional overload of std::lerp [PR101870]

The [cmath.syn] p1 wording about additional overloads sufficient to
handle any arithmetic types also applies to std::lerp. This adds a new
overload of std::lerp that does the required promotions to support
arguments of arbitrary arithmetic types.

A new __promoted_t alias template is added, which the C++17 function
templates std::hypot and std::lerp can use to avoid instantiating the
__promote_3 class template.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:

PR libstdc++/101870
* include/c_global/cmath (hypot): Use __promoted_t.
(lerp): Add new overload accepting any arithmetic types.
* include/ext/type_traits.h (__promoted_t): New alias template.
* testsuite/26_numerics/lerp.cc: Moved to...
* testsuite/26_numerics/lerp/1.cc: ...here.
* testsuite/26_numerics/lerp/constexpr.cc: New test.
* testsuite/26_numerics/lerp/version.cc: New test.

(cherry picked from commit 9017326e19fe278d5f62898cca4682b17f8e8e07)

3 years agolibstdc++: Fix test that fails for C++98 mode
Jonathan Wakely [Fri, 26 Nov 2021 12:07:13 +0000 (12:07 +0000)] 
libstdc++: Fix test that fails for C++98 mode

When I backported r11-2760 as r10-8644 I simplified it and didn't add
the new _GLIBCXX11_DEPRECATED macro. That means that the macro used on
the old iostream members does nothing for C++98 mode, and so the test
fails. This adjusts the test to only expect warnigns for C++11 and
later.

libstdc++-v3/ChangeLog:

* testsuite/27_io/types/1.cc: Add c++11 target selector to
warnings.

3 years agolibstdc++: Fix tests that fail in C++98 mode
Jonathan Wakely [Tue, 11 May 2021 16:14:26 +0000 (17:14 +0100)] 
libstdc++: Fix tests that fail in C++98 mode

The header synopsis test fails to define NOTHROW for C++98.

The shared_ptr test should be skipped for C++98.

The debug mode one should work for C++98 too, it just needs to avoid
C++11 syntax that isn't valid in C++98.

libstdc++-v3/ChangeLog:

* testsuite/20_util/headers/memory/synopsis.cc: Define C++98
alternative for macro.
* testsuite/20_util/shared_ptr/creation/99006.cc: Add effective
target keyword.
* testsuite/25_algorithms/copy/debug/99402.cc: Avoid C++11
syntax.

(cherry picked from commit 37407a2ae701c0a93377106a2938ab5474062fc3)

3 years agolibstdc++: Skip failing std::array test for debug mode
Jonathan Wakely [Fri, 26 Nov 2021 11:53:27 +0000 (11:53 +0000)] 
libstdc++: Skip failing std::array test for debug mode

The __gnu_debug::array type isn't three-way comparable in constant
expressions. The __gnu-debug::array type has been removed in gcc-11
anyway, so just skip the test rather than fixing it.

libstdc++-v3/ChangeLog:

* testsuite/23_containers/array/comparison_operators/96851.cc:
Skip test in debug mode.

3 years agolibstdc++: Add missing header to <bits/stl_iterator.h>
Jonathan Wakely [Fri, 26 Nov 2021 00:34:52 +0000 (00:34 +0000)] 
libstdc++: Add missing header to <bits/stl_iterator.h>

When included from <debug/functions.h> it's possible for
<bits/stl_iterator.h> to be included without its prerequisites having
been included first. For gcc-11 this was fixed as part of r11-7604, this
fixes it for gcc-10 too.

libstdc++-v3/ChangeLog:

* include/bits/stl_iterator.h: Include required header for
std::iterator class template and iterator category tags.

3 years agolibstdc++: Do not use memset in constexpr calls to ranges::fill_n [PR101608]
Jonathan Wakely [Wed, 24 Nov 2021 13:17:54 +0000 (13:17 +0000)] 
libstdc++: Do not use memset in constexpr calls to ranges::fill_n [PR101608]

libstdc++-v3/ChangeLog:

PR libstdc++/101608
* include/bits/ranges_algobase.h (__fill_n_fn): Check for
constant evaluation before using memset.
* testsuite/25_algorithms/fill_n/constrained.cc: Check
byte-sized values as well.

(cherry picked from commit 82c3657dd74896b39937bb0a2aaeba9b8ca105fd)

3 years agoDaily bump.
GCC Administrator [Fri, 26 Nov 2021 00:17:27 +0000 (00:17 +0000)] 
Daily bump.

3 years agoFix looping flag discovery in ipa-pure-const
Jan Hubicka [Sat, 20 Nov 2021 23:35:22 +0000 (00:35 +0100)] 
Fix looping flag discovery in ipa-pure-const

The testcase shows situation where there is non-trivial cycle in the callgraph
involving a noreturn call.  This cycle is important for const function discovery
but not important for pure.  IPA pure const uses same strongly connected
components for both propagations which makes it to get suboptimal result
(does not detect the pure flag). However local pure const gets the situation
right becaue it processes functions in right order.  This hits rarely
executed code in propagate_pure_const that merge results with previously
known state that has long standing bug in it that makes it to throw away
the looping flag.

Bootstrapped/regtested x86_64-linux.

gcc/ChangeLog:

2021-11-21  Jan Hubicka  <hubicka@ucw.cz>

PR ipa/103052
* ipa-pure-const.c (propagate_pure_const): Fix merging of loping flag.

gcc/testsuite/ChangeLog:

2021-11-21  Jan Hubicka  <hubicka@ucw.cz>

PR ipa/103052
* gcc.c-torture/execute/pr103052.c: New test.

(cherry picked from commit a0e99d5bb741d3db74a67d492f47b28217fbf88a)

3 years agoDaily bump.
GCC Administrator [Thu, 25 Nov 2021 00:17:32 +0000 (00:17 +0000)] 
Daily bump.

3 years agojit: Initialize function::m_blocks in ctor
Martin Liska [Wed, 24 Nov 2021 09:15:34 +0000 (10:15 +0100)] 
jit: Initialize function::m_blocks in ctor

This resolves the problem reported here:
https://mail.gnu.org/archive/html/bug-gnu-emacs/2021-11/msg00606.html
https://bugzilla.opensuse.org/show_bug.cgi?id=1192951

gcc/jit/ChangeLog:

* jit-playback.c (function): Initialize m_blocks vector.

(cherry picked from commit c2e681059bcd7f76f13029988f133858dc82c205)

3 years agoDaily bump.
GCC Administrator [Wed, 24 Nov 2021 00:17:25 +0000 (00:17 +0000)] 
Daily bump.

3 years agolibstdc++: Fix circular dependency for bitmap_allocator [PR103381]
Jonathan Wakely [Tue, 23 Nov 2021 12:28:22 +0000 (12:28 +0000)] 
libstdc++: Fix circular dependency for bitmap_allocator [PR103381]

<ext/bitmap_allocator.h> includes <function>, and since C++17 that
includes <unordered_map>. If std::allocator is defined in terms of
__gnu_cxx::bitmap_allocator then you get a circular reference and
bootstrap fails when compiling src/c++17/*.cc.

libstdc++-v3/ChangeLog:

PR libstdc++/103381
* include/ext/bitmap_allocator.h: Include <bits/stl_function.h>
instead of <functional>.

(cherry picked from commit 5459fa132a99e6037e5ccf1b49d617677a584ff8)

3 years agors6000: Fix vec_cpsgn parameter order (PR101985)
Bill Schmidt [Tue, 23 Nov 2021 21:57:27 +0000 (15:57 -0600)] 
rs6000: Fix vec_cpsgn parameter order (PR101985)

Backport r12-4361 to releases/gcc-10.

2021-11-23  Bill Schmidt  <wschmidt@linux.ibm.com>

gcc/
PR target/101985
* config/rs6000/altivec.h (vec_cpsgn): Swap operand order.

gcc/testsuite/
PR target/101985
* gcc.target/powerpc/pr101985-1.c: New.
* gcc.target/powerpc/pr101985-2.c: New.

3 years agoDaily bump.
GCC Administrator [Tue, 23 Nov 2021 00:17:17 +0000 (00:17 +0000)] 
Daily bump.

3 years agoFortran: fix lookup for gfortran builtin math intrinsics used by DEC extensions
Harald Anlauf [Sun, 21 Nov 2021 18:29:27 +0000 (19:29 +0100)] 
Fortran: fix lookup for gfortran builtin math intrinsics used by DEC extensions

gcc/fortran/ChangeLog:

PR fortran/99061
* trans-intrinsic.c (gfc_lookup_intrinsic): Helper function for
looking up gfortran builtin intrinsics.
(gfc_conv_intrinsic_atrigd): Use it.
(gfc_conv_intrinsic_cotan): Likewise.
(gfc_conv_intrinsic_cotand): Likewise.
(gfc_conv_intrinsic_atan2d): Likewise.

gcc/testsuite/ChangeLog:

PR fortran/99061
* gfortran.dg/dec_math_5.f90: New test.

Co-authored-by: Steven G. Kargl <kargl@gcc.gnu.org>
(cherry picked from commit 8fef6f720a5a0a056abfa986ba870bb406ab4716)

3 years agoIBM Z: Fix load-and-test peephole2 condition
Stefan Schulze Frielinghaus [Fri, 19 Nov 2021 15:56:56 +0000 (16:56 +0100)] 
IBM Z: Fix load-and-test peephole2 condition

For a peephole2 condition variable insn points to the first matched
insn.  In order to refer to the second matched insn use
peep2_next_insn(1) instead.

gcc/ChangeLog:

* config/s390/s390.md (define_peephole2): Variable insn points
to the first matched insn.  Use peep2_next_insn(1) to refer to
the second matched insn.

gcc/testsuite/ChangeLog:

* gcc.target/s390/20211119.c: New test.

(cherry picked from commit f47870e6a272dfe740a38422030c6c68e0fc7ff8)

3 years agoDaily bump.
GCC Administrator [Mon, 22 Nov 2021 00:17:22 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sun, 21 Nov 2021 00:17:19 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sat, 20 Nov 2021 00:17:27 +0000 (00:17 +0000)] 
Daily bump.

3 years agolibphobos: Increase size of defaultStackPages on OSX X86_64 targets.
Iain Buclaw [Fri, 19 Nov 2021 13:43:07 +0000 (14:43 +0100)] 
libphobos: Increase size of defaultStackPages on OSX X86_64 targets.

As of macOS 11, libunwind now requires more stack space than 16k, so
default to a larger stack size. This is only applied to X86 as the
PAGESIZE is still 4k, however on AArch64 it is 16k.

libphobos/ChangeLog:

* libdruntime/core/thread.d (defaultStackPages): New constant.
(Fiber.this): Set stack size to be a multiple of defaultStackPages.

(cherry picked from commit f316727e5f6a4c58b63bdee9ad6be785f97f5ee7)

3 years agolibphobos: Don't call __gthread_key_delete in the emutls destroy function.
Iain Buclaw [Fri, 19 Nov 2021 13:26:07 +0000 (14:26 +0100)] 
libphobos: Don't call __gthread_key_delete in the emutls destroy function.

Fixes a EXC_BAD_ACCESS issue seen on Darwin when the libphobos DSO gets
unloaded.  Based on reading libgcc's emutls implementation, as it
doesn't call __gthread_key_delete directly, neither should libphobos.

libphobos/ChangeLog:

* libdruntime/gcc/emutls.d (emutlsDestroyThread): Don't remove entry
from global array.
(_d_emutls_destroy): Don't call __gthread_key_delete.

(cherry picked from commit d686cb0d740b0278fdbd7915f43faff14b203888)

3 years agoDaily bump.
GCC Administrator [Fri, 19 Nov 2021 00:17:23 +0000 (00:17 +0000)] 
Daily bump.

3 years agod: Use HOST_WIDE_INT for type size temporaries.
Iain Buclaw [Thu, 18 Nov 2021 21:43:40 +0000 (22:43 +0100)] 
d: Use HOST_WIDE_INT for type size temporaries.

These variables are later used as the value for the format specifier
`%wd`, which the expected type may not match dinteger_t, causing
unnecessary -Wformat warnings.

gcc/d/ChangeLog:

* decl.cc (d_finish_decl): Use HOST_WIDE_INT for type size
temporaries.

(cherry picked from commit d6ec661e3931773e2f571ed4f6dd8b0402d8687d)

3 years agoDaily bump.
GCC Administrator [Thu, 18 Nov 2021 00:17:19 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Wed, 17 Nov 2021 00:17:27 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Tue, 16 Nov 2021 00:17:29 +0000 (00:17 +0000)] 
Daily bump.

3 years agors6000/doc: Rename future cpu with power10
Kewen Lin [Thu, 11 Nov 2021 01:59:18 +0000 (19:59 -0600)] 
rs6000/doc: Rename future cpu with power10

Commmit 5d9d0c94588 renamed future to power10 and ace60939fd2
updated the documentation for "future" renaming.  This patch
is to rename the remaining "future architecture" references in
documentation and polish the words for float128.

gcc/ChangeLog:

* doc/invoke.texi: Change references to "future cpu" to "power10",
"-mcpu=future" to "-mcpu=power10".  Adjust words for float128.

(cherry picked from commit a97fdde627e64202940112009d45d17f85e4cc61)

3 years agoDaily bump.
GCC Administrator [Mon, 15 Nov 2021 00:17:23 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sun, 14 Nov 2021 00:17:25 +0000 (00:17 +0000)] 
Daily bump.

3 years agoFortran: avoid NULL pointer dereferences
Harald Anlauf [Wed, 10 Nov 2021 19:30:27 +0000 (20:30 +0100)] 
Fortran: avoid NULL pointer dereferences

CLASS(), PARAMETER is not yet properly implemented in gfortran.  Using it
in declarations could lead to subsequent NULL pointer dereferences during
checking or simplification of expressions involving those CLASS variables.

gcc/fortran/ChangeLog:

PR fortran/103137
PR fortran/103138
* check.c (gfc_check_shape): Avoid NULL pointer dereference on
missing ref.
* simplify.c (gfc_simplify_cshift): Avoid NULL pointer dereference
when shape not set.
(gfc_simplify_transpose): Likewise.

(cherry picked from commit abc2f01914d6c4703de26c402fb579a9a2d0dba4)

3 years agoFortran: error recovery on initializing invalid derived type array component
Harald Anlauf [Tue, 26 Oct 2021 18:51:46 +0000 (20:51 +0200)] 
Fortran: error recovery on initializing invalid derived type array component

gcc/fortran/ChangeLog:

PR fortran/102816
* resolve.c (resolve_structure_cons): Reject invalid array spec of
a DT component referenced in a structure constructor.

gcc/testsuite/ChangeLog:

PR fortran/102816
* gfortran.dg/pr102816.f90: New test.

(cherry picked from commit 99af0b2f0fe1c0dc8c6d558157e700326d52816a)

3 years agoFortran: validate shape of arrays in constructors against declarations
Harald Anlauf [Fri, 15 Oct 2021 19:23:17 +0000 (21:23 +0200)] 
Fortran: validate shape of arrays in constructors against declarations

gcc/fortran/ChangeLog:

PR fortran/102685
* decl.c (match_clist_expr): Set rank/shape of clist initializer
to match LHS.
* resolve.c (resolve_structure_cons): In a structure constructor,
compare shapes of array components against declared shape.

gcc/testsuite/ChangeLog:

PR fortran/102685
* gfortran.dg/derived_constructor_char_1.f90: Fix invalid code.
* gfortran.dg/pr70931.f90: Likewise.
* gfortran.dg/transfer_simplify_2.f90: Likewise.
* gfortran.dg/pr102685.f90: New test.

Co-authored-by: Tobias Burnus <tobias@codesourcery.com>
(cherry picked from commit 1e819bd95ebeefc1dc469daa1855ce005cb77822)

3 years agoFortran: error recovery on rank mismatch of array and its initializer
Harald Anlauf [Sat, 6 Nov 2021 18:42:01 +0000 (19:42 +0100)] 
Fortran: error recovery on rank mismatch of array and its initializer

gcc/fortran/ChangeLog:

PR fortran/102715
* decl.c (add_init_expr_to_sym): Reject rank mismatch between
array and its initializer.

gcc/testsuite/ChangeLog:

PR fortran/102715
* gfortran.dg/pr68019.f90: Adjust error message.
* gfortran.dg/pr102715.f90: New test.

(cherry picked from commit df2135e88a8f78c853b35246ad426b01b6d08378)

3 years agoFortran: fix simplification of array-valued parameter expressions
Harald Anlauf [Fri, 5 Nov 2021 22:48:20 +0000 (23:48 +0100)] 
Fortran: fix simplification of array-valued parameter expressions

gcc/fortran/ChangeLog:

PR fortran/102817
* expr.c (simplify_parameter_variable): Copy shape of referenced
subobject when simplifying.

gcc/testsuite/ChangeLog:

PR fortran/102817
* gfortran.dg/pr102817.f90: New test.

(cherry picked from commit bcf3728abe8488882922005166d3065fc5fdfea1)

3 years agoFortran: handle initialization of derived type parameter arrays from scalar
Harald Anlauf [Sun, 10 Oct 2021 18:11:43 +0000 (20:11 +0200)] 
Fortran: handle initialization of derived type parameter arrays from scalar

gcc/fortran/ChangeLog:

PR fortran/99348
PR fortran/102521
* decl.c (add_init_expr_to_sym): Extend initialization of
parameter arrays from scalars to handle derived types.

gcc/testsuite/ChangeLog:

PR fortran/99348
PR fortran/102521
* gfortran.dg/parameter_array_init_8.f90: New test.

(cherry picked from commit 74ccca380cde5e79e082d39214b306a90ded0344)

3 years agoDaily bump.
GCC Administrator [Sat, 13 Nov 2021 00:17:21 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Fri, 12 Nov 2021 00:17:19 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Thu, 11 Nov 2021 00:17:18 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Wed, 10 Nov 2021 00:17:30 +0000 (00:17 +0000)] 
Daily bump.

3 years agoipa/102714 - IPA SRA eliding volatile
Richard Biener [Wed, 13 Oct 2021 07:13:36 +0000 (09:13 +0200)] 
ipa/102714 - IPA SRA eliding volatile

The following fixes the volatileness check of IPA SRA which was
looking at the innermost reference when checking TREE_THIS_VOLATILE
but the reference to check is the outermost one.

2021-10-13  Richard Biener  <rguenther@suse.de>

PR ipa/102714
* ipa-sra.c (ptr_parm_has_nonarg_uses): Fix volatileness
check.

* gcc.dg/ipa/pr102714.c: New testcase.

(cherry picked from commit 23cd18c60c8188e3d68eda721cdb739199e85e5b)

3 years agomiddle-end/100672 - fix bogus right shift folding
Richard Biener [Wed, 19 May 2021 11:35:07 +0000 (13:35 +0200)] 
middle-end/100672 - fix bogus right shift folding

This fixes the bogus use of TYPE_PRECISION on vector types
from optimizing -((int)x >> 31) into (unsigned)x >> 31.

2021-05-19  Richard Biener  <rguenther@suse.de>

PR middle-end/100672
* fold-const.c (fold_negate_expr_1): Use element_precision.
(negate_expr_p): Likewise.

* gcc.dg/torture/pr100672.c: New testcase.

(cherry picked from commit 8d51039cb7c807ed84ff7df5416a1e3ba07a5e63)

3 years agotree-optimization/100253 - fix bogus aligned vectorized loads/stores
Richard Biener [Thu, 29 Apr 2021 09:52:08 +0000 (11:52 +0200)] 
tree-optimization/100253 - fix bogus aligned vectorized loads/stores

At some point DR_MISALIGNMENT was supposed to be -1 when the
access was not element aligned.  That's obviously not true at this
point so this adjusts both store and load vectorizing to no longer
assume this which in turn allows simplifying the code.

2021-04-29  Richard Biener  <rguenther@suse.de>

PR tree-optimization/100253
* tree-vect-stmts.c (vectorizable_load): Do not assume
element alignment when DR_MISALIGNMENT is -1.
(vectorizable_store): Likewise.

* g++.dg/pr100253.C: New testcase.

3 years agoDaily bump.
GCC Administrator [Tue, 9 Nov 2021 00:17:23 +0000 (00:17 +0000)] 
Daily bump.

3 years agogcc-changelog: sync from master
Martin Liska [Mon, 8 Nov 2021 11:58:28 +0000 (12:58 +0100)] 
gcc-changelog: sync from master

contrib/ChangeLog:

* gcc-changelog/git_check_commit.py: Sync from master.
* gcc-changelog/git_commit.py: Likewise.
* gcc-changelog/git_email.py: Likewise.
* gcc-changelog/git_update_version.py: Likewise.
* gcc-changelog/test_email.py: Likewise.
* gcc-changelog/test_patches.txt: Likewise.

3 years agovect: Don't update inits for simd_lane_access DRs [PR102789]
Kewen Lin [Tue, 26 Oct 2021 02:05:02 +0000 (21:05 -0500)] 
vect: Don't update inits for simd_lane_access DRs [PR102789]

As PR102789 shows, when vectorizer does some peelings for alignment
in prologues, function vect_update_inits_of_drs would update the
inits of some drs.  But as the failed case, we shouldn't update the
dr for simd_lane_access, it has the fixed-length storage mainly for
the main loop, the update can make the access out of bound and access
the unexpected element.

gcc/ChangeLog:

PR tree-optimization/102789
* tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
update inits of simd_lane_access.

(cherry picked from commit f3dbd3f36d55178d0a9e4431043cbc950524969a)

3 years agoDaily bump.
GCC Administrator [Mon, 8 Nov 2021 00:17:14 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sun, 7 Nov 2021 00:17:22 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sat, 6 Nov 2021 00:17:21 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Fri, 5 Nov 2021 00:17:19 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Thu, 4 Nov 2021 00:17:22 +0000 (00:17 +0000)] 
Daily bump.

3 years ago[PR102842] Consider all outputs in generation of matching reloads
Vladimir N. Makarov [Tue, 26 Oct 2021 18:03:42 +0000 (14:03 -0400)] 
[PR102842] Consider all outputs in generation of matching reloads

Without considering all output insn operands (not only processed
before), in rare cases LRA can use the same hard register for
different outputs of the insn on different assignment subpasses.  The
patch fixes the problem.

gcc/ChangeLog:

PR rtl-optimization/102842
* lra-constraints.c (match_reload): Ignore out in checking values
of outs.
(curr_insn_transform): Collect outputs before doing reloads of operands.

gcc/testsuite/ChangeLog:

PR rtl-optimization/102842
* g++.target/arm/pr102842.C: New test.

3 years agoDaily bump.
GCC Administrator [Wed, 3 Nov 2021 00:17:26 +0000 (00:17 +0000)] 
Daily bump.

3 years agosra: Fix corner case of total scalarization with virtual inheritance (PR 102505)
Martin Jambor [Tue, 2 Nov 2021 10:17:51 +0000 (11:17 +0100)] 
sra: Fix corner case of total scalarization with virtual inheritance (PR 102505)

PR 102505 is a situation where of SRA takes its initial top-level
access size from a get_ref_base_and_extent called on a COMPONENT_REF,
and thus derived frm the FIELD_DECL, which however does not include a
virtual base.  Total scalarization then goes on traversing the type,
which however has virtual base past the non-virtual bits, tricking SRA
to create sub-accesses outside of the supposedly encompassing
accesses, which in turn triggers the verifier within the pass.

The patch below fixes that by failing total scalarization when this
situation is detected.

This backport also has commit f217e87972a2a207e793101fc05cfc9dd095c678
squashed into it in order to avoid PR 102886 that the fix introduced
on trunk.

gcc/ChangeLog:

2021-10-20  Martin Jambor  <mjambor@suse.cz>

PR tree-optimization/102505
* tree-sra.c (totally_scalarize_subtree): Check that the
encountered field fits within the acces we would like to put it
in.

gcc/testsuite/ChangeLog:

2021-10-20  Martin Jambor  <mjambor@suse.cz>

PR tree-optimization/102505
* g++.dg/torture/pr102505.C: New test.

(cherry picked from commit 701ee067807b80957c65bd7ff94b6099a27181de)

3 years agoDaily bump.
GCC Administrator [Tue, 2 Nov 2021 00:17:15 +0000 (00:17 +0000)] 
Daily bump.

3 years agolibstdc++: Remove [[nodiscard]] from <valarray>
Jonathan Wakely [Mon, 1 Nov 2021 20:20:57 +0000 (20:20 +0000)] 
libstdc++: Remove [[nodiscard]] from <valarray>

A backport from trunk included these attributes, but they aren't present
on the other std::begin and std::end overloads, so remove them from
these overloads.

libstdc++-v3/ChangeLog:

* include/std/valarray (begin, end): Remove nodiscard attribute.

3 years agolibstdc++: Fix range access for empty std::valarray [PR103022]
Jonathan Wakely [Mon, 1 Nov 2021 11:06:51 +0000 (11:06 +0000)] 
libstdc++: Fix range access for empty std::valarray [PR103022]

The std::begin and std::end overloads for std::valarray are defined in
terms of std::addressof(v[0]) which is undefined for an empty valarray.

libstdc++-v3/ChangeLog:

PR libstdc++/103022
* include/std/valarray (begin, end): Do not dereference an empty
valarray. Add noexcept and [[nodiscard]].
* testsuite/26_numerics/valarray/range_access.cc: Check empty
valarray. Check iterator properties. Run as well as compiling.
* testsuite/26_numerics/valarray/range_access2.cc: Likewise.
* testsuite/26_numerics/valarray/103022.cc: New test.

(cherry picked from commit 91bac9fed5d082f0b180834110ebc0f46f97599a)

3 years agoDaily bump.
GCC Administrator [Mon, 1 Nov 2021 00:17:09 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sun, 31 Oct 2021 00:17:21 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sat, 30 Oct 2021 00:17:21 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Fri, 29 Oct 2021 00:17:23 +0000 (00:17 +0000)] 
Daily bump.

3 years agoUpdate documentation of %X spec
Eric Botcazou [Thu, 28 Oct 2021 13:51:14 +0000 (15:51 +0200)] 
Update documentation of %X spec

%X
Output the accumulated linker options specified by -Wl or a ‘%x’ spec string

The part about -Wl has been obsolete for 27 years, since this change:

Author: Torbjorn Granlund <tege@gnu.org>
Date:   Thu Oct 27 18:04:25 1994 +0000

    (process_command): Handle -Wl, and -Xlinker similar to -l,

    i.e., preserve their order with respect to linker input files.

Technically speaking, the arguments of -l, -Wl and -Xlinker are input files.

gcc/
* doc/invoke.texi (%X): Remove obsolete reference to -Wl.

3 years agoDaily bump.
GCC Administrator [Thu, 28 Oct 2021 00:17:40 +0000 (00:17 +0000)] 
Daily bump.

3 years agoi386: Fix ICE in ix86_print_opreand_address [PR 102761]
Uros Bizjak [Mon, 18 Oct 2021 15:03:28 +0000 (17:03 +0200)] 
i386: Fix ICE in ix86_print_opreand_address [PR 102761]

2021-10-18  Uroš Bizjak  <ubizjak@gmail.com>

PR target/102761

gcc/ChangeLog:

* config/i386/i386.c (ix86_print_operand_address):
Error out for non-address_operand asm operands.

gcc/testsuite/ChangeLog:

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

3 years agoFix warnings building linux-atomic.c and fptr.c on hppa64-linux
John David Anglin [Wed, 27 Oct 2021 18:02:49 +0000 (18:02 +0000)] 
Fix warnings building linux-atomic.c and fptr.c on hppa64-linux

The file fptr.c is specific to 32-bit hppa-linux and should not be
included in LIB2ADD on hppa64-linux.

There is a builtin type mismatch in linux-atomic.c using the type
long long unsigned int for 64-bit atomic operations on hppa64-linux.

2021-10-27  John David Anglin  <danglin@gcc.gnu.org>

libgcc/ChangeLog:

* config.host (hppa*64*-*-linux*): Don't add pa/t-linux to
tmake_file.
* config/pa/linux-atomic.c: Define u8, u16 and u64 types.
Use them in FETCH_AND_OP_2, OP_AND_FETCH_2, COMPARE_AND_SWAP_2,
SYNC_LOCK_TEST_AND_SET_2 and SYNC_LOCK_RELEASE_1 macros.
* config/pa/t-linux64 (LIB1ASMSRC): New define.
(LIB1ASMFUNCS): Revise.
(HOST_LIBGCC2_CFLAGS): Add "-DLINUX=1".

3 years agoDaily bump.
GCC Administrator [Wed, 27 Oct 2021 00:17:23 +0000 (00:17 +0000)] 
Daily bump.

3 years agogcc/configure: Check for powerpc64le*-*-freebsd*
Piotr Kubaj [Sat, 16 Oct 2021 02:09:05 +0000 (04:09 +0200)] 
gcc/configure: Check for powerpc64le*-*-freebsd*

Only powerpc64-unknown-freebsd was checked for.

Signed-off-by: Piotr Kubaj <pkubaj@FreeBSD.org>
gcc/
* configure.ac: Treat powerpc64*-*-freebsd* the same as
powerpc64-*-freebsd*.
* configure: Regenerate.

(cherry picked from commit a9ef07fe5899fc5998395cdbf96e00af372cfb0b)

3 years agoDaily bump.
GCC Administrator [Tue, 26 Oct 2021 00:17:33 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Mon, 25 Oct 2021 00:17:23 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDon't use 'G' constraint in integer move patterns
John David Anglin [Sun, 24 Oct 2021 16:41:05 +0000 (16:41 +0000)] 
Don't use 'G' constraint in integer move patterns

The 'G' constraint only matches a float zero.

2021-10-24  John David Anglin  <danglin@gcc.gnu.org>

gcc/ChangeLog:

* config/pa/pa.md: Don't use 'G' constraint in integer move patterns.

3 years agoDaily bump.
GCC Administrator [Sun, 24 Oct 2021 00:17:20 +0000 (00:17 +0000)] 
Daily bump.

3 years agoFortran: fix order of checks for the SHAPE intrinsic
Harald Anlauf [Thu, 14 Oct 2021 18:18:14 +0000 (20:18 +0200)] 
Fortran: fix order of checks for the SHAPE intrinsic

gcc/fortran/ChangeLog:

PR fortran/102716
* check.c (gfc_check_shape): Reorder checks so that invalid KIND
arguments can be detected.

gcc/testsuite/ChangeLog:

PR fortran/102716
* gfortran.dg/shape_10.f90: New test.

(cherry picked from commit 1b115daf62d94337b3d0b2962b0bbbf005a450e0)

3 years agoDaily bump.
GCC Administrator [Sat, 23 Oct 2021 00:17:25 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Fri, 22 Oct 2021 00:17:17 +0000 (00:17 +0000)] 
Daily bump.

3 years agox86: Document -fcf-protection requires i686 or newer
H.J. Lu [Thu, 21 Oct 2021 16:45:14 +0000 (09:45 -0700)] 
x86: Document -fcf-protection requires i686 or newer

PR target/98667
* doc/invoke.texi: Document -fcf-protection requires i686 or
new.

(cherry picked from commit 1373066a46d8d47abd97e46a005aef3b3dbfe94a)

3 years agoDaily bump.
GCC Administrator [Thu, 21 Oct 2021 00:17:16 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Wed, 20 Oct 2021 00:17:29 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Tue, 19 Oct 2021 00:17:16 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Mon, 18 Oct 2021 00:17:16 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sun, 17 Oct 2021 00:17:09 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sat, 16 Oct 2021 00:17:12 +0000 (00:17 +0000)] 
Daily bump.

3 years agoConsistently use "rG" constraint for copy instruction in move patterns
John David Anglin [Fri, 15 Oct 2021 14:52:16 +0000 (14:52 +0000)] 
Consistently use "rG" constraint for copy instruction in move patterns

2021-10-15  John David Anglin  <danglin@gcc.gnu.org>

gcc/ChangeLog:

* config/pa/pa.md: Consistently use "rG" constraint for copy
instruction in move patterns.

3 years agoDaily bump.
GCC Administrator [Fri, 15 Oct 2021 00:17:50 +0000 (00:17 +0000)] 
Daily bump.

3 years agoFix TARGET_SOFT_FLOAT patterns in pa.md
John David Anglin [Thu, 14 Oct 2021 00:59:22 +0000 (00:59 +0000)] 
Fix TARGET_SOFT_FLOAT patterns in pa.md

2021-10-13  John David Anglin  <danglin@gcc.gnu.org>

gcc/ChangeLog:

* config/pa/pa.md (cbranchsf4): Disable if TARGET_SOFT_FLOAT.
(cbranchdf4): Likewise.
Add missing move patterns for TARGET_SOFT_FLOAT.

3 years agoDaily bump.
GCC Administrator [Thu, 14 Oct 2021 00:17:18 +0000 (00:17 +0000)] 
Daily bump.

3 years agolibstdc++: Rename file with the wrong extension
Jonathan Wakely [Wed, 13 Oct 2021 21:31:51 +0000 (22:31 +0100)] 
libstdc++: Rename file with the wrong extension

libstdc++-v3/ChangeLog:

* testsuite/28_regex/match_results/102667.C: Moved to...
* testsuite/28_regex/match_results/102667.cc: ...here.

(cherry picked from commit ce55693604813c5be7d23260f1fd276cf5a48f8f)

3 years agoAdd support for 32-bit hppa targets in muldi3 expander
John David Anglin [Wed, 13 Oct 2021 15:49:19 +0000 (15:49 +0000)] 
Add support for 32-bit hppa targets in muldi3 expander

2021-10-13  John David Anglin  <danglin@gcc.gnu.org>

gcc/ChangeLog:

* config/pa/pa.md (muldi3): Add support for inlining 64-bit
multiplication on 32-bit PA 1.1 and 2.0 targets.