]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
2 years agoRTEMS: Add -mvrsave multilibs
Sebastian Huber [Thu, 1 Sep 2022 08:22:47 +0000 (10:22 +0200)] 
RTEMS: Add -mvrsave multilibs

gcc/ChangeLog:

* config/rs6000/rtems.h (CPP_OS_DEFAULT_SPEC): Define __PPC_VRSAVE__ if
-mvrsave is present.
* config/rs6000/t-rtems: Add -mvrsave multilib variants for
-mcpu=e6500.

2 years agoDaily bump.
GCC Administrator [Thu, 8 Sep 2022 00:19:55 +0000 (00:19 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Wed, 7 Sep 2022 00:19:12 +0000 (00:19 +0000)] 
Daily bump.

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

2 years agoDaily bump.
GCC Administrator [Mon, 5 Sep 2022 00:18:24 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sun, 4 Sep 2022 00:18:43 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sat, 3 Sep 2022 00:18:39 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Fri, 2 Sep 2022 00:17:55 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Thu, 1 Sep 2022 00:18:39 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Wed, 31 Aug 2022 00:17:42 +0000 (00:17 +0000)] 
Daily bump.

2 years agors6000: Allow conversions of MMA pointer types [PR106017]
Peter Bergner [Sun, 28 Aug 2022 00:44:16 +0000 (19:44 -0500)] 
rs6000: Allow conversions of MMA pointer types [PR106017]

GCC incorrectly disables conversions between MMA pointer types, which
are allowed with clang.  The original intent was to disable conversions
between MMA types and other other types, but pointer conversions should
have been allowed.  The fix is to just remove the MMA pointer conversion
handling code altogether.

gcc/
PR target/106017
* config/rs6000/rs6000.c (rs6000_invalid_conversion): Remove handling
of MMA pointer conversions.

gcc/testsuite/
PR target/106017
* gcc.target/powerpc/pr106017.c: New test.

(cherry picked from commit 1ae1325f24cea1698b56e4299d95446a1f7b90a2)

2 years agoDaily bump.
GCC Administrator [Tue, 30 Aug 2022 00:18:08 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Mon, 29 Aug 2022 00:17:43 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sun, 28 Aug 2022 00:17:39 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sat, 27 Aug 2022 00:17:56 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Fri, 26 Aug 2022 00:17:34 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Thu, 25 Aug 2022 00:17:42 +0000 (00:17 +0000)] 
Daily bump.

2 years agors6000: Adjust mov optabs for opaque modes [PR103353]
Kewen Lin [Tue, 23 Aug 2022 08:31:17 +0000 (03:31 -0500)] 
rs6000: Adjust mov optabs for opaque modes [PR103353]

As PR103353 shows, we may want to continue to expand built-in
function __builtin_vsx_lxvp, even if we have already emitted
error messages about some missing required conditions.  As
shown in that PR, without one explicit mov optab on OOmode
provided, it would call emit_move_insn recursively.

So this patch is to allow the mov pattern to be generated during
expanding phase if compiler has already seen errors.

PR target/103353

gcc/ChangeLog:

* config/rs6000/mma.md (define_expand movpoi): Move TARGET_MMA condition
check to preparation statements and add handlings for !TARGET_MMA.
(define_expand movpxi): Likewise.

gcc/testsuite/ChangeLog:

* gcc.target/powerpc/pr103353.c: New test.

(cherry picked from commit 9367e3a65f874dffc8f8a3b6760e77fd9ed67117)

2 years agoDaily bump.
GCC Administrator [Wed, 24 Aug 2022 00:17:41 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Tue, 23 Aug 2022 00:17:43 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Mon, 22 Aug 2022 00:17:47 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sun, 21 Aug 2022 00:22:06 +0000 (00:22 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sat, 20 Aug 2022 00:17:43 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Fri, 19 Aug 2022 00:18:05 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Thu, 18 Aug 2022 00:18:25 +0000 (00:18 +0000)] 
Daily bump.

2 years agors6000: Make the has_arch target selectors actually work
Segher Boessenkool [Tue, 26 Apr 2022 11:26:09 +0000 (11:26 +0000)] 
rs6000: Make the has_arch target selectors actually work

2022-04-26  Segher Boessenkoool  <segher@kernel.crashing.org>

gcc/testsuite/
PR target/105349
* lib/target-supports.exp (check_effective_target_has_arch_pwr5): Use
the specified dg-options.
(check_effective_target_has_arch_pwr6): Ditto.
(check_effective_target_has_arch_pwr7): Ditto.
(check_effective_target_has_arch_pwr8): Ditto.
(check_effective_target_has_arch_pwr9): Ditto.
(check_effective_target_has_arch_ppc64): Ditto.

(cherry picked from commit ad56a60f58c1ed662deaf60d5736c332ec2caabb)

2 years agors6000: Add effective target has_arch_ppc64
Segher Boessenkool [Thu, 21 Apr 2022 18:32:48 +0000 (18:32 +0000)] 
rs6000: Add effective target has_arch_ppc64

This is true if we have -mpowerpc64.

2022-04-21  Segher Boessenkool  <segher@kernel.crashing.org>

gcc/testsuite/
* lib/target-supports.exp (check_effective_target_has_arch_ppc64): New.

(cherry picked from commit fc9deca632c2eb246c54cfd13cb616bf3fcbd21a)

2 years agoDaily bump.
GCC Administrator [Wed, 17 Aug 2022 00:18:56 +0000 (00:18 +0000)] 
Daily bump.

2 years agors6000: Disparage lfiwzx and similar
Segher Boessenkool [Sun, 2 Jan 2022 14:08:35 +0000 (14:08 +0000)] 
rs6000: Disparage lfiwzx and similar

RA now chooses GEN_OR_VSX_REGS in most cases.  This is great in most
cases, but we often (or always?) use {l,st}{f,xs}iwzx now, which is
problematic because the integer load and store insns can use cheaper
addressing modes.  We can fix that by putting a small penalty on the
instruction alternatives for those.

2022-04-21  Segher Boessenkool  <segher@kernel.crashing.org>

PR target/103197
PR target/102146
* config/rs6000/rs6000.md (zero_extendqi<mode>2 for EXTQI): Disparage
the "Z" alternatives in {l,st}{f,xs}iwzx.
(zero_extendhi<mode>2 for EXTHI): Ditto.
(zero_extendsi<mode>2 for EXTSI): Ditto.
(*movsi_internal1): Ditto.
(*mov<mode>_internal1 for QHI): Ditto.
(movsd_hardfloat): Ditto.

(cherry picked from commit 26fa464f42622c60d6929720dd37143a21054ede)

2 years agod: Update DIP links in gdc documentation to point at upstream repository
Iain Buclaw [Tue, 16 Aug 2022 10:22:10 +0000 (12:22 +0200)] 
d: Update DIP links in gdc documentation to point at upstream repository

The wiki links probably worked at some point in the distant past, but
now the official location of tracking all D Improvement Proposals is on
the upstream dlang/DIPs GitHub repository.

PR d/106638

gcc/d/ChangeLog:

* gdc.texi: Update DIP links to point at upstream dlang/DIPs
repository.

(cherry picked from commit e56b695aa3aed3c0c80616bba569bbeb4a06b5e5)

2 years agoDaily bump.
GCC Administrator [Tue, 16 Aug 2022 00:19:21 +0000 (00:19 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Mon, 15 Aug 2022 00:17:32 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sun, 14 Aug 2022 00:17:58 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sat, 13 Aug 2022 00:17:48 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Fri, 12 Aug 2022 00:17:59 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Thu, 11 Aug 2022 00:17:49 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Wed, 10 Aug 2022 00:17:50 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Tue, 9 Aug 2022 00:17:43 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Mon, 8 Aug 2022 00:17:32 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sun, 7 Aug 2022 00:17:40 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sat, 6 Aug 2022 00:17:45 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Fri, 5 Aug 2022 00:17:34 +0000 (00:17 +0000)] 
Daily bump.

3 years agors6000: Update testsuite to use -mdejagnu-cpu= and -mdejagnu-tune= options
Peter Bergner [Fri, 25 Mar 2022 22:59:07 +0000 (17:59 -0500)] 
rs6000: Update testsuite to use -mdejagnu-cpu= and -mdejagnu-tune= options

This patch updates the POWER testsuite test cases using -mcpu= and -mtune=
to use the preferred -mdejagnu-cpu= and -mdejagnu-tune= options.  This also
obviates the need for the dg-skip-if directive, since the user cannot
override the -mcpu= value being used to compile the test case.

2022-03-25  Peter Bergner  <bergner@linux.ibm.com>

gcc/testsuite/

* g++.dg/pr65240-1.C: Use -mdejagnu-cpu=.  Remove dg-skip-if.
* g++.dg/pr65240-2.C: Likewise.
* g++.dg/pr65240-3.C: Likewise.
* g++.dg/pr65240-4.C: Likewise.
* g++.dg/pr65242.C: Likewise.
* g++.dg/pr67211.C: Likewise.
* g++.dg/pr69667.C: Likewise.
* g++.dg/pr71294.C: Likewise.
* g++.dg/pr84279.C: Likewise.
* g++.dg/torture/ppc-ldst-array.C: Likewise.
* gfortran.dg/nint_p7.f90: Likewise.
* gfortran.dg/pr102860.f90: Likewise.
* gcc.target/powerpc/fusion.c: Use -mdejagnu-cpu= and -mdejagnu-tune=.
* gcc.target/powerpc/fusion2.c: Likewise.
* gcc.target/powerpc/test_mffsl.c: Likewise.
* gfortran.dg/pr47614.f: Likewise.
* gfortran.dg/pr58968.f: Likewise.

(cherry picked from commit 81faedaa8e2819fc0ffda4ce0a888065a6d7a535)

3 years agoDaily bump.
GCC Administrator [Thu, 4 Aug 2022 00:17:49 +0000 (00:17 +0000)] 
Daily bump.

3 years agolibstdc++: Add valid range checks to std::span constructors [PR98421]
Jonathan Wakely [Tue, 31 Aug 2021 16:34:51 +0000 (17:34 +0100)] 
libstdc++: Add valid range checks to std::span constructors [PR98421]

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

PR libstdc++/98421
* include/std/span (span(Iter, size_type), span(Iter, Iter)):
Add valid range checks.
* testsuite/23_containers/span/cons_1_assert_neg.cc: New test.
* testsuite/23_containers/span/cons_2_assert_neg.cc: New test.

(cherry picked from commit ef7becc9c8a48804d3fd9dac032f7b33e561a612)

3 years agolibstdc++: Avoid try-catch and O(N) size in std::list::merge for old ABI
Jonathan Wakely [Wed, 29 Sep 2021 19:46:55 +0000 (20:46 +0100)] 
libstdc++: Avoid try-catch and O(N) size in std::list::merge for old ABI

The current std::list::merge code calls size() before starting to merge
any elements, so that the _M_size members can be updated after the merge
finishes. The work is done in a try-block so that the sizes can still be
updated in an exception handler if any element comparison throws.

The _M_size members only exist for the cxx11 ABI, so the initial call to
size() and the try-catch are only needed for that ABI. For the old ABI
the size() call performs an O(N) list traversal to get a value that
isn't even used, and catching exceptions just to rethrow them isn't
needed either.

In r11-10123 this code was refactored to use an RAII guard type, but for
the gcc-10 branch a less invasive change using preprocessor conditionals
seems more appropriate.

libstdc++-v3/ChangeLog:

* include/bits/list.tcc (list::merge) [!USE_CXX11_ABI]: Remove
call to size() and try-catch block.

3 years agolibstdc++: Optimize std::any_cast by replacing indirect call
Tim Adye [Fri, 4 Jun 2021 14:59:38 +0000 (15:59 +0100)] 
libstdc++: Optimize std::any_cast by replacing indirect call

This significantly improves the performance of std::any_cast, by
avoiding an indirect call to the _S_manage function through a function
pointer. Before we make that indirect call we've already established
that the contained value has the expected type, which means we also know
the manager type, and so can call one of its members directly.

We also know the precise type in the any::emplace functions, because
we've just constructed that type, so we can use the new member there
too. That doesn't seem to affect performance, but we might as well use
the new _S_access function anyway.

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

* include/std/any (any::_Manager::_S_access): New static
function to access the contained value.
(any::emplace, __any_caster): Use _S_access member of the
manager type.

(cherry picked from commit f6bb145c0bff19767931d37733be11c8acc6fa00)

3 years agolibstdc++: Remove precondition checks from ranges::subrange
Jonathan Wakely [Tue, 15 Jun 2021 14:07:25 +0000 (15:07 +0100)] 
libstdc++: Remove precondition checks from ranges::subrange

The assertion in the subrange constructor causes semantic changes,
because the call to ranges::distance performs additional operations that
are not part of the constructor's specification. That will fail to
compile if the iterator is move-only, because the argument to
ranges::distance is passed by value. It will modify the subrange if the
iterator is not a forward iterator, because incrementing the copy also
affects the _M_begin member. Those problems could be prevented by using
if-constexpr to only do the assertion for copyable forward iterators,
but the call to ranges::distance can also prevent the constructor being
usable in constant expressions. If the member initializers are usable in
constant expressions, but iterator increments of equality comparisons
are not, then the checks done by __glibcxx_assert might
make constant evaluation fail.

This change removes the assertion.

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

* include/std/ranges (subrange(i, s, n)): Remove assertion.
* testsuite/std/ranges/subrange/constexpr.cc: New test.

(cherry picked from commit a88fc03ba7e52d9a072f25d42bb9619fedb7892e)

3 years agolibstdc++: Disable gthreads weak symbols for glibc 2.34 [PR103133]
Jonathan Wakely [Tue, 9 Nov 2021 23:45:36 +0000 (23:45 +0000)] 
libstdc++: Disable gthreads weak symbols for glibc 2.34 [PR103133]

Since Glibc 2.34 all pthreads symbols are defined directly in libc not
libpthread, and since Glibc 2.32 we have used __libc_single_threaded to
avoid unnecessary locking in single-threaded programs. This means there
is no reason to avoid linking to libpthread now, and so no reason to use
weak symbols defined in gthr-posix.h for all the pthread_xxx functions.

libstdc++-v3/ChangeLog:

PR libstdc++/100748
PR libstdc++/103133
* config/os/gnu-linux/os_defines.h (_GLIBCXX_GTHREAD_USE_WEAK):
Define for glibc 2.34 and later.

(cherry picked from commit 80fe172ba9820199c2bbce5d0611ffca27823049)

3 years agoDaily bump.
GCC Administrator [Wed, 3 Aug 2022 00:17:42 +0000 (00:17 +0000)] 
Daily bump.

3 years agoc: Fix location for _Pragma tokens [PR97498]
Lewis Hyatt [Sat, 9 Jul 2022 20:12:21 +0000 (16:12 -0400)] 
c: Fix location for _Pragma tokens [PR97498]

The handling of #pragma GCC diagnostic uses input_location, which is not always
as precise as needed; in particular the relative location of some tokens and a
_Pragma directive will crucially determine whether a given diagnostic is enabled
or suppressed in the desired way. PR97498 shows how the C frontend ends up with
input_location pointing to the beginning of the line containing a _Pragma()
directive, resulting in the wrong behavior if the diagnostic to be modified
pertains to some tokens found earlier on the same line. This patch fixes that by
addressing two issues:

    a) libcpp was not assigning a valid location to the CPP_PRAGMA token
    generated by the _Pragma directive.
    b) C frontend was not setting input_location to something reasonable.

With this change, the C frontend is able to change input_location to point to
the _Pragma token as needed.

This is just a two-line fix (one for each of a) and b)), the testsuite changes
were needed only because the location on the tested warnings has been somewhat
improved, so the tests need to look for the new locations.

gcc/c/ChangeLog:

PR preprocessor/97498
* c-parser.c (c_parser_pragma): Set input_location to the
location of the pragma, rather than the start of the line.

libcpp/ChangeLog:

PR preprocessor/97498
* directives.c (destringize_and_run): Override the location of
the CPP_PRAGMA token from a _Pragma directive to the location of
the expansion point, as is done for the tokens lexed from it.

gcc/testsuite/ChangeLog:

PR preprocessor/97498
* c-c++-common/pr97498.c: New test.
* gcc.dg/pragma-message.c: Adapt for improved warning locations.

(cherry picked from commit 0587cef3d7962a8b0f44779589ba2920dd3d71e5)

3 years agors6000: Adjust -mdejagnu-cpu to filter out -mtune [PR106345]
Peter Bergner [Mon, 25 Jul 2022 05:51:44 +0000 (00:51 -0500)] 
rs6000: Adjust -mdejagnu-cpu to filter out -mtune [PR106345]

As PR106345 shows, when configuring compiler with an explicit
option --with-tune=<value>, it would cause some test cases to
fail if their test points are sensitive to tune setting, such
as: group_ending_nop, loop align etc.  It doesn't help that
even to specify one explicit -mcpu=.

This patch is to adjust the behavior of -mdejagnu-cpu by
filtering out all -mcpu= and -mtune= options, then test cases
would use <cpu> as tune as the one specified by -mdejagnu-cpu.

2022-07-25  Peter Bergner  <bergner@linux.ibm.com>
    Kewen Lin  <linkw@linux.ibm.com>

PR testsuite/106345

gcc/ChangeLog:

* config/rs6000/rs6000.h (DRIVER_SELF_SPECS): Adjust -mdejagnu-cpu
to filter out all -mtune options.

(cherry picked from commit 75d20d6c84c12bedd65a904e462f02f0b9eb3f77)

3 years agors6000: Preserve REG_EH_REGION when replacing load/store [PR106091]
Kewen Lin [Tue, 26 Jul 2022 02:29:14 +0000 (21:29 -0500)] 
rs6000: Preserve REG_EH_REGION when replacing load/store [PR106091]

As test case in PR106091 shows, rs6000 specific pass swaps
doesn't preserve the reg_note REG_EH_REGION when replacing
some load insn at the end of basic block, it causes the
flow info verification to fail unexpectedly.  Since memory
reference rtx may trap, this patch is to ensure we copy
REG_EH_REGION reg_note while replacing swapped aligned load
or store.

PR target/106091

gcc/ChangeLog:

* config/rs6000/rs6000-p8swap.c (replace_swapped_aligned_store): Copy
REG_EH_REGION when replacing one store insn having it.
(replace_swapped_aligned_load): Likewise.

gcc/testsuite/ChangeLog:

* gcc.target/powerpc/pr106091.c: New test.

(cherry picked from commit f4286601933406142b46693660f7f4b682cb50a5)

3 years agoDaily bump.
GCC Administrator [Tue, 2 Aug 2022 00:17:41 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Mon, 1 Aug 2022 00:17:43 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sun, 31 Jul 2022 00:17:29 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sat, 30 Jul 2022 00:17:19 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Fri, 29 Jul 2022 00:17:33 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Thu, 28 Jul 2022 00:17:25 +0000 (00:17 +0000)] 
Daily bump.

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

3 years agoFortran: error recovery from calculation of storage size of a symbol [PR103504]
Harald Anlauf [Mon, 25 Jul 2022 20:29:50 +0000 (22:29 +0200)] 
Fortran: error recovery from calculation of storage size of a symbol [PR103504]

gcc/fortran/ChangeLog:

PR fortran/103504
* interface.c (get_sym_storage_size): Array bounds and character
length can only be of integer type.

gcc/testsuite/ChangeLog:

PR fortran/103504
* gfortran.dg/pr103504.f90: New test.

(cherry picked from commit 600956c81c784f4a0cc9d10f6e03e01847afd961)

3 years agoDaily bump.
GCC Administrator [Tue, 26 Jul 2022 00:17:43 +0000 (00:17 +0000)] 
Daily bump.

3 years agoRTEMS: Do not define _GNU_SOURCE by default
Sebastian Huber [Fri, 22 Jul 2022 12:09:20 +0000 (14:09 +0200)] 
RTEMS: Do not define _GNU_SOURCE by default

gcc/ChangeLog:

* config/rs6000/rtems.h (CPLUSPLUS_CPP_SPEC): Undef.

(cherry picked from commit 556b816b820f6749910784cbaca8bb0bb822a970)

3 years agoDaily bump.
GCC Administrator [Mon, 25 Jul 2022 00:17:35 +0000 (00:17 +0000)] 
Daily bump.

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

3 years agolibstdc++: Add missing prerequisite to generated header [PR106162]
Jonathan Wakely [Fri, 1 Jul 2022 21:23:43 +0000 (22:23 +0100)] 
libstdc++: Add missing prerequisite to generated header [PR106162]

The ${host_builddir}/largefile-config.h header can't be written until
its parent directory has been created, so it needs to have the creation
of that directory as a prerequisite.

libstdc++-v3/ChangeLog:

PR libstdc++/106162
* include/Makefile.am (largefile-config.h): Add
stamp-${host_alias} prerequisite.
* include/Makefile.in: Regenerate.

(cherry picked from commit 8a6ee426c2be3bd4359520e02c00ec60cac2fece)

3 years agolibstdc++: Fix inconsistent noexcept-specific for valarray begin/end
Jonathan Wakely [Fri, 5 Nov 2021 21:42:20 +0000 (21:42 +0000)] 
libstdc++: Fix inconsistent noexcept-specific for valarray begin/end

These declarations should be noexcept after I added it to the
definitions in <valarray>.

libstdc++-v3/ChangeLog:

* include/bits/range_access.h (begin(valarray), end(valarray)):
Add noexcept.

(cherry picked from commit 2b2d97fc545635a0f6aa9c9ee3b017394bc494bf)

3 years agoDaily bump.
GCC Administrator [Sat, 23 Jul 2022 00:17:24 +0000 (00:17 +0000)] 
Daily bump.

3 years agolibstdc++: Fix backward compatibility of P2325R3 backport [PR106320]
Patrick Palka [Fri, 22 Jul 2022 16:52:03 +0000 (12:52 -0400)] 
libstdc++: Fix backward compatibility of P2325R3 backport [PR106320]

The 11 and 10 partial backports of P2325R3, r11-9555-g92d612cccc1eec and
r10-10808-g22b86cdc4d7fdd, unnecessarily preserved some changes from the
paper that made certain view specializations no longer default
constructible, changes which aren't required to reap the overall benefits
of the paper and which are backward incompatible with pre-P2325R3 code in
practice.

This patch reverts the problematic changes, specifically it relaxes the
constraints on various views' default constructors added by the paper
so that we keep only the constraints that were already implicitly
imposed by the NSDMIs of the view.  Thus for example this patch retains
the default_initializable<_Vp> constraint on transform_view's default
constructor since its '_Vp _M_base = _Vp()' NSDMI already requires this
constraint, and it removes the default_initializable<_Fp> constraint
since the corresponding member '__detail::__box<_Fp> _M_fun' doesn't
require default constructibility (specializations of __box are always
default constructible).

After reverting these changes, all static_asserts from p2325.cc that
verify lack of default constructibility now fail as expected, matching
the pre-P2325R3 behavior.

PR libstdc++/106320

libstdc++-v3/ChangeLog:

* include/std/ranges (single_view): Relax constraints on
default constructor so as to preserve pre-P2325R3 behavior.
(filter_view): Likewise.
(transform_view): Likewise.
(take_while_view): Likewise.
(drop_while_view): Likewise.
* testsuite/std/ranges/adaptors/join.cc (test13): New test.
* testsuite/std/ranges/p2325.cc: Fix S to be only non default
constructible and not also non copy constructible.  XFAIL the
tests that verify a non default constructible functor makes a
view non default constructible (lines 94, 97 and 98).  XFAIL
the test that effectively verifies a non default constructible
element type makes single_view non default constructible (line
114).

(cherry picked from commit 36dd51bf87e1c533bf33ad3b16fd3fe06c356746)

3 years agoregrename: Fix -fcompare-debug issue in check_new_reg_p [PR105041]
Surya Kumari Jangala [Fri, 10 Jun 2022 14:22:57 +0000 (19:52 +0530)] 
regrename: Fix -fcompare-debug issue in check_new_reg_p [PR105041]

In check_new_reg_p, the nregs of a du chain is computed by obtaining the
MODE of the first element in the chain, and then calling
hard_regno_nregs() with the MODE. But the first element of the chain can
be a DEBUG_INSN whose mode need not be the same as the rest of the
elements in the du chain. This was resulting in fcompare-debug failure
as check_new_reg_p was returning a different result with -g for the same
candidate register. We can instead obtain nregs from the du chain
itself.

2022-06-10  Surya Kumari Jangala  <jskumari@linux.ibm.com>

gcc/
PR rtl-optimization/105041
* regrename.c (check_new_reg_p): Use nregs value from du chain.

gcc/testsuite/
PR rtl-optimization/105041
* gcc.target/powerpc/pr105041.c: New test.

(cherry picked from commit 3e16b4359e86b36676ed01219e6deafa95f3c16b)

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

3 years agolibgo: don't include <linux/fs.h> when building gen-sysinfo.go
Ian Lance Taylor [Wed, 13 Jul 2022 02:42:43 +0000 (19:42 -0700)] 
libgo: don't include <linux/fs.h> when building gen-sysinfo.go

Removing this doesn't change anything at least with glibc 2.33.
The include was added in https://go.dev/cl/6100049 but it's not
clear why.

Fixes PR go/106266

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/417294
(cherry picked from commit f35d65517a59565758107c5b1a51a5fa382f8d1a)

3 years agolibsanitizer: cherry-pick 9cf13067cb5088626ba7 from upstream
Martin Liska [Mon, 11 Jul 2022 20:03:14 +0000 (22:03 +0200)] 
libsanitizer: cherry-pick 9cf13067cb5088626ba7 from upstream

9cf13067cb5088626ba7ee1ec4c42ec59c7995a0 [sanitizer] Remove #include <linux/fs.h> to resolve fsconfig_command/mount_attr conflict with glibc 2.36

(cherry picked from commit 2701442d0cf6292f6624443c15813d6d1a3562fe)

3 years agoDaily bump.
GCC Administrator [Thu, 21 Jul 2022 00:17:41 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Wed, 20 Jul 2022 00:17:39 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Tue, 19 Jul 2022 00:17:46 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Mon, 18 Jul 2022 00:17:35 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sun, 17 Jul 2022 00:17:36 +0000 (00:17 +0000)] 
Daily bump.

3 years agoFortran: do not generate conflicting results under -ff2c [PR104313]
Steve Kargl [Fri, 15 Jul 2022 20:07:15 +0000 (22:07 +0200)] 
Fortran: do not generate conflicting results under -ff2c [PR104313]

gcc/fortran/ChangeLog:

PR fortran/104313
* trans-decl.c (gfc_generate_return): Do not generate conflicting
fake results for functions with no result variable under -ff2c.

gcc/testsuite/ChangeLog:

PR fortran/104313
* gfortran.dg/pr104313.f: New test.

(cherry picked from commit 517fb1a78102df43f052c6934c27dd51d786aff7)

3 years agoDaily bump.
GCC Administrator [Sat, 16 Jul 2022 00:17:36 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Fri, 15 Jul 2022 00:17:42 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Thu, 14 Jul 2022 00:17:34 +0000 (00:17 +0000)] 
Daily bump.

3 years agotree-sra: Fix union handling in build_reconstructed_reference
Martin Jambor [Wed, 13 Jul 2022 11:17:25 +0000 (13:17 +0200)] 
tree-sra: Fix union handling in build_reconstructed_reference

As the testcase in PR 105860 shows, the code that tries to re-use the
handled_component chains in SRA can be horribly confused by unions,
where it thinks it has found a compatible structure under which it can
chain the references, but in fact it found the type it was looking
for elsewhere in a union and generated a write to a completely wrong
part of an aggregate.

I don't remember whether the plan was to support unions at all in
build_reconstructed_reference but it can work, to an extent, if we
make sure that we start the search only outside the outermost union,
which is what the patch does (and the extra testcase verifies).

Additionally, this commit also contains sqashed in it a backport of
b984b84cbe4bf026edef2ba37685f3958a1dc1cf which fixes the testcase
gcc.dg/tree-ssa/alias-access-path-13.c for many 32-bit targets.

gcc/ChangeLog:

2022-07-01  Martin Jambor  <mjambor@suse.cz>

PR tree-optimization/105860
* tree-sra.c (build_reconstructed_reference): Start expr
traversal only just below the outermost union.

gcc/testsuite/ChangeLog:

2022-07-01  Martin Jambor  <mjambor@suse.cz>

PR tree-optimization/105860
* gcc.dg/tree-ssa/alias-access-path-13.c: New test.
* gcc.dg/tree-ssa/pr105860.c: Likewise.

(cherry picked from commit b110e5283e368b5377e04766e4ff82cd52634208)

3 years agoDaily bump.
GCC Administrator [Wed, 13 Jul 2022 00:17:37 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Tue, 12 Jul 2022 00:17:32 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Mon, 11 Jul 2022 00:17:42 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sun, 10 Jul 2022 00:17:34 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sat, 9 Jul 2022 00:17:48 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Fri, 8 Jul 2022 00:17:24 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Thu, 7 Jul 2022 00:17:32 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Wed, 6 Jul 2022 00:17:32 +0000 (00:17 +0000)] 
Daily bump.

3 years agod: Fix error: aggregate value used where floating point was expected
Iain Buclaw [Wed, 29 Jun 2022 19:52:39 +0000 (21:52 +0200)] 
d: Fix error: aggregate value used where floating point was expected

Casting from vector to static array is permitted, and the frontend
generates a reinterpret cast, but casting back the other way resulted in
an error.  This has been fixed to be properly handled in the code
generation pass of VectorExp, and the conversion for lvalue and rvalue
handling done in convert_expr and convert_for_rvalue respectively.

PR d/106139

gcc/d/ChangeLog:

* d-convert.cc (convert_expr): Handle casting from array to vector.
(convert_for_rvalue): Rewrite vector to array casts of the same
element type into a constructor.
(convert_for_assignment): Return calling convert_for_rvalue.
* dmd/expressionsem.c (ExpressionSemanticVisitor::visit): Run semantic
on vector expression after lowering.
* expr.cc (ExprVisitor::visit (VectorExp *)): Handle generating a
vector expression from a static array.

gcc/testsuite/ChangeLog:

* gdc.dg/pr106139a.d: New test.
* gdc.dg/pr106139b.d: New test.
* gdc.dg/pr106139c.d: New test.
* gdc.dg/pr106139d.d: New test.
* gdc.test/fail_compilation/ice20264.d: New test.

(cherry picked from commit 488759b7ea16972c4dfbb62926cd71996b1f77a7)

3 years agoDaily bump.
GCC Administrator [Tue, 5 Jul 2022 00:17:43 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Mon, 4 Jul 2022 00:17:14 +0000 (00:17 +0000)] 
Daily bump.

3 years agoFortran: error recovery on invalid CLASS(), PARAMETER declarations [PR105243]
Harald Anlauf [Wed, 29 Jun 2022 19:36:17 +0000 (21:36 +0200)] 
Fortran: error recovery on invalid CLASS(), PARAMETER declarations [PR105243]

gcc/fortran/ChangeLog:

PR fortran/103137
PR fortran/103138
PR fortran/103693
PR fortran/105243
* decl.c (gfc_match_data_decl): Reject CLASS entity declaration
when it is given the PARAMETER attribute.

gcc/testsuite/ChangeLog:

PR fortran/103137
PR fortran/103138
PR fortran/103693
PR fortran/105243
* gfortran.dg/class_58.f90: Fix test.
* gfortran.dg/class_73.f90: New test.

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

3 years agoFortran: improve error recovery for EXTENDS_TYPE_OF() [PR106121]
Harald Anlauf [Tue, 28 Jun 2022 20:29:28 +0000 (22:29 +0200)] 
Fortran: improve error recovery for EXTENDS_TYPE_OF() [PR106121]

gcc/fortran/ChangeLog:

PR fortran/106121
* simplify.c (gfc_simplify_extends_type_of): Do not attempt to
simplify when one of the arguments is a CLASS variable that was
not properly declared.

gcc/testsuite/ChangeLog:

PR fortran/106121
* gfortran.dg/extends_type_of_4.f90: New test.

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

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

3 years agoDaily bump.
GCC Administrator [Sat, 2 Jul 2022 00:17:34 +0000 (00:17 +0000)] 
Daily bump.

3 years agoFortran: handle explicit-shape specs with constant bounds [PR105954]
Harald Anlauf [Mon, 20 Jun 2022 18:59:55 +0000 (20:59 +0200)] 
Fortran: handle explicit-shape specs with constant bounds [PR105954]

gcc/fortran/ChangeLog:

PR fortran/105954
* decl.c (variable_decl): Adjust upper bounds for explicit-shape
specs with constant bound expressions to ensure non-negative
extents.

gcc/testsuite/ChangeLog:

PR fortran/105954
* gfortran.dg/pr105954.f90: New test.

(cherry picked from commit a312407bd715647f7c11b67e0a52effc94d0f15d)

3 years agoFortran: fix simplification of INDEX(str1,str2) [PR105691]
Harald Anlauf [Tue, 21 Jun 2022 21:20:18 +0000 (23:20 +0200)] 
Fortran: fix simplification of INDEX(str1,str2) [PR105691]

gcc/fortran/ChangeLog:

PR fortran/105691
* simplify.c (gfc_simplify_index): Replace old simplification
code by the equivalent of the runtime library implementation.  Use
HOST_WIDE_INT instead of int for string index, length variables.

gcc/testsuite/ChangeLog:

PR fortran/105691
* gfortran.dg/index_6.f90: New test.

(cherry picked from commit ff35dbc02092fbcd3d814fcd9fe8e871c3f741fd)