]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
19 hours agoDaily bump. releases/gcc-13
GCC Administrator [Thu, 6 Nov 2025 00:26:05 +0000 (00:26 +0000)] 
Daily bump.

43 hours agoDaily bump.
GCC Administrator [Wed, 5 Nov 2025 00:23:33 +0000 (00:23 +0000)] 
Daily bump.

2 days agoDaily bump.
GCC Administrator [Tue, 4 Nov 2025 00:23:23 +0000 (00:23 +0000)] 
Daily bump.

3 days agoDaily bump.
GCC Administrator [Mon, 3 Nov 2025 00:23:01 +0000 (00:23 +0000)] 
Daily bump.

4 days agoDaily bump.
GCC Administrator [Sun, 2 Nov 2025 00:23:47 +0000 (00:23 +0000)] 
Daily bump.

5 days agoDaily bump.
GCC Administrator [Sat, 1 Nov 2025 00:22:15 +0000 (00:22 +0000)] 
Daily bump.

6 days agoDeal with prior EH/abormal cleanup when fixing up noreturn calls
Richard Biener [Wed, 10 Sep 2025 15:14:07 +0000 (17:14 +0200)] 
Deal with prior EH/abormal cleanup when fixing up noreturn calls

When a dead EH or abnormal edge makes a call queued for noreturn fixup
unreachable, just skip processing it.

PR tree-optimization/121870
* tree-ssa-propagate.cc
(substitute_and_fold_engine::substitute_and_fold): Skip
removed stmts from noreturn fixup.

* g++.dg/torture/pr121870.C: New testcase.

(cherry picked from commit 5c4f1313e753aeb6920a48c62c7c99ad36e1adae)

6 days agotree-optimization/121256 - properly support SLP in vectorizable recurrence
Richard Biener [Sun, 27 Jul 2025 16:42:25 +0000 (18:42 +0200)] 
tree-optimization/121256 - properly support SLP in vectorizable recurrence

We failed to build the correct initialization vector.  For VLA
vectors and a non-uniform initialization vector this rejects
vectorization for now.

PR tree-optimization/121256
* tree-vect-loop.cc (vectorizable_recurr): Build a correct
initialization vector for SLP_TREE_LANES > 1.

* gcc.dg/vect/vect-recurr-pr121256.c: New testcase.
* gcc.dg/vect/vect-recurr-pr121256-2.c: Likewise.

(cherry picked from commit 97ec33fed5caa8b64ae054b5bb8b122acb390124)

6 days agotree-optimization/121059 - fixup loop mask query
Richard Biener [Mon, 14 Jul 2025 12:09:28 +0000 (14:09 +0200)] 
tree-optimization/121059 - fixup loop mask query

When we opportunistically mask an operand of a AND with an already
available loop mask we need to query that set with the correct number
of masks we expect.

PR tree-optimization/121059
* tree-vect-stmts.cc (vectorizable_operation): Query
scalar_cond_masked_set with the correct number of masks.

* gcc.dg/vect/pr121059.c: New testcase.

Co-Authored-By: Richard Sandiford <richard.sandiford@arm.com>
(cherry picked from commit 234f122a9be5cc2a30d2a9e94c2fc9cde1d5a64d)

6 days agotree-optimization/120944 - bogus VN with volatile copies
Richard Biener [Fri, 4 Jul 2025 07:08:19 +0000 (09:08 +0200)] 
tree-optimization/120944 - bogus VN with volatile copies

The following avoids translating expressions through volatile
copies.

PR tree-optimization/120944
* tree-ssa-sccvn.cc (vn_reference_lookup_3): Gate optimizations
invalid when volatile is involved.

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

(cherry picked from commit 6ed1e2ae1a742d859c2dd74c9e7cebdd3618e8b1)

6 days agotestsuite: add sve hw check to testcase [PR120817]
Tamar Christina [Mon, 7 Jul 2025 16:05:01 +0000 (17:05 +0100)] 
testsuite: add sve hw check to testcase [PR120817]

Drop down from SVE2 to SVE1 as that's the minimum
required for the test, and since it's a mid-end test
add the aarch64_sve_hw check.

gcc/testsuite/ChangeLog:

PR tree-optimization/120817
* gcc.dg/vect/pr120817.c: Add SVE HW check.

(cherry picked from commit 4b9f760c511a4ef3a390dd6cfab80bada57c2535)

6 days agotree-optimization/120817 - bogus DSE of .MASK_STORE
Richard Biener [Mon, 7 Jul 2025 07:56:50 +0000 (09:56 +0200)] 
tree-optimization/120817 - bogus DSE of .MASK_STORE

DSE used ao_ref_init_from_ptr_and_size for .MASK_STORE but
alias-analysis will use the specified size to disambiguate
against smaller objects.  For .MASK_STORE we instead have to
make the access size unspecified but we can still constrain
the access extent based on the maximum size possible.

PR tree-optimization/120817
* tree-ssa-dse.cc (initialize_ao_ref_for_dse): Use
ao_ref_init_from_ptr_and_range with unknown size for
.MASK_STORE and .MASK_LEN_STORE.

* gcc.dg/vect/pr120817.c: New testcase.

(cherry picked from commit 439b14e222571da76da2bfec04b9035fb9f1862d)

6 days agoDaily bump.
GCC Administrator [Fri, 31 Oct 2025 00:24:40 +0000 (00:24 +0000)] 
Daily bump.

7 days agoDaily bump.
GCC Administrator [Thu, 30 Oct 2025 00:22:47 +0000 (00:22 +0000)] 
Daily bump.

8 days agoDaily bump.
GCC Administrator [Wed, 29 Oct 2025 00:21:31 +0000 (00:21 +0000)] 
Daily bump.

9 days agoDaily bump.
GCC Administrator [Tue, 28 Oct 2025 00:27:13 +0000 (00:27 +0000)] 
Daily bump.

10 days agoDaily bump.
GCC Administrator [Mon, 27 Oct 2025 00:21:51 +0000 (00:21 +0000)] 
Daily bump.

11 days agox86-64: Use `movsxd` to perform SI-to-DI extension in Intel syntax
LIU Hao [Sat, 25 Oct 2025 09:19:34 +0000 (17:19 +0800)] 
x86-64: Use `movsxd` to perform SI-to-DI extension in Intel syntax

Although there's no possibility of ambiguity, Intel manual says the mnemonic
for DWORD-to-QWORD sign-extension operation should be MOVSXD. Some assemblers
(GNU AS, NASM) also overload MOVSX, but some others don't accept MOVSX (LLVM,
MASM, YASM in NASM mode) and require MOVSXD.

This mnemonic was introduced in r0-34259-g123bf9e3f4056d in 2001, and has not
been updated ever since.

gcc/ChangeLog:

PR target/119079
* config/i386/i386.md: Use `movsxd` to perform SI-to-DI extension in Intel
syntax.

Signed-off-by: LIU Hao <lh_mouse@126.com>
(cherry picked from commit 66b38349273525dfb86f0f74d6c928abdbf7154f)

11 days agoDaily bump.
GCC Administrator [Sun, 26 Oct 2025 00:22:02 +0000 (00:22 +0000)] 
Daily bump.

12 days agoDaily bump.
GCC Administrator [Sat, 25 Oct 2025 00:21:56 +0000 (00:21 +0000)] 
Daily bump.

13 days agoDaily bump.
GCC Administrator [Fri, 24 Oct 2025 00:22:57 +0000 (00:22 +0000)] 
Daily bump.

2 weeks agoDaily bump.
GCC Administrator [Thu, 23 Oct 2025 00:22:03 +0000 (00:22 +0000)] 
Daily bump.

2 weeks agoDaily bump.
GCC Administrator [Wed, 22 Oct 2025 00:22:40 +0000 (00:22 +0000)] 
Daily bump.

2 weeks agoDaily bump.
GCC Administrator [Tue, 21 Oct 2025 00:22:35 +0000 (00:22 +0000)] 
Daily bump.

2 weeks agohurd: Add OPTION_GLIBC_P and OPTION_GLIBC
Svante Signell [Sun, 6 Feb 2022 11:43:23 +0000 (11:43 +0000)] 
hurd: Add OPTION_GLIBC_P and OPTION_GLIBC

GNU/Hurd uses glibc just like GNU/Linux.

This is needed for gcc to notice that glibc supports split stack in
finish_options.

PR go/104290
gcc/ChangeLog:
* config/gnu.h (OPTION_GLIBC_P, OPTION_GLIBC): Define.

(cherry picked from commit 29eacf043b6e8560c5c42d67f7f9b11e4e2cb156)

2 weeks agoAda: Fix spurious warning for renaming of component of VFA record
Eric Botcazou [Mon, 20 Oct 2025 09:21:21 +0000 (11:21 +0200)] 
Ada: Fix spurious warning for renaming of component of VFA record

This is a regression present on the mainline and all active branches: the
compiler gives a spurious "is not referenced" warning for the renaming of
a component of a Volatile_Full_Access record.

gcc/ada/
PR ada/107536
* exp_ch2.adb (Expand_Renaming): Mark the entity as referenced.

gcc/testsuite/
* gnat.dg/renaming18.adb: New test.

2 weeks agoDaily bump.
GCC Administrator [Mon, 20 Oct 2025 00:20:44 +0000 (00:20 +0000)] 
Daily bump.

2 weeks agoDaily bump.
GCC Administrator [Sun, 19 Oct 2025 00:20:06 +0000 (00:20 +0000)] 
Daily bump.

2 weeks agoDaily bump.
GCC Administrator [Sat, 18 Oct 2025 00:21:13 +0000 (00:21 +0000)] 
Daily bump.

2 weeks agoDaily bump.
GCC Administrator [Fri, 17 Oct 2025 00:20:41 +0000 (00:20 +0000)] 
Daily bump.

3 weeks agomatch.pd: Add missing type check to reduc(ctor) pattern [PR121772]
Alex Coplan [Tue, 9 Sep 2025 11:57:14 +0000 (12:57 +0100)] 
match.pd: Add missing type check to reduc(ctor) pattern [PR121772]

This is a cherry-pick of a7a9b7badc0ba95b510c7e61da6439fca78e31d3
together with a follow-up fix to the test
(0c670d38455c788ac0447e3b86ba621521d44bce) squashed into it.

In this PR we have a reduction of a vector constructor, where the
type of the constructor is int16x8_t and the elements are int16x4_t;
i.e. it is representing a concatenation of two vectors.

This triggers a match.pd pattern which looks like it was written to
handle reductions of vector constructors where the elements of the ctor
are scalars, not vectors.  There is no type check to enforce this
property, which leads to the pattern replacing a reduction to scalar
with an int16x4_t vector in this case, which of course is a type error,
leading to an invalid GIMPLE ICE.

This patch adds a type check to the pattern, only going ahead with the
transformation if the element type of the ctor matches that of the
reduction.

gcc/ChangeLog:

PR tree-optimization/121772
* match.pd: Add type check to reduc(ctor) pattern.

gcc/testsuite/ChangeLog:

PR tree-optimization/121772
* gcc.target/aarch64/torture/pr121772.c: New test.

(cherry picked from commit a7a9b7badc0ba95b510c7e61da6439fca78e31d3)

3 weeks agoError out stack-protector unavailability on AIX
Ayappan Perumal [Mon, 1 Sep 2025 13:27:52 +0000 (08:27 -0500)] 
Error out stack-protector unavailability on AIX

stack-protector is not supported in GCC on AIX. This patch is to fail the
compilation if -fstack-protector option is passed.

gcc/ChangeLog:

* config/rs6000/aix.h (SUBTARGET_DRIVER_SELF_SPECS):
Error out when stack-protector option is used in AIX
as it is not supported on AIX

Approved By: Segher Boessenkool <segher@kernel.crashing.org>

(cherry picked from commit dfb7e97dd214f7d8ca0fa970d81ad5ba805aaa8d)

3 weeks agoDaily bump.
GCC Administrator [Thu, 16 Oct 2025 00:23:00 +0000 (00:23 +0000)] 
Daily bump.

3 weeks agoDaily bump.
GCC Administrator [Wed, 15 Oct 2025 00:23:35 +0000 (00:23 +0000)] 
Daily bump.

3 weeks agotree-optimization/120156 - ICE in ptr_derefs_may_alias_p
Richard Biener [Tue, 14 May 2024 09:13:51 +0000 (11:13 +0200)] 
tree-optimization/120156 - ICE in ptr_derefs_may_alias_p

This picks the ptr_derefs_may_alias_p fix from the PR99954 fix
which said:  This makes us run into a latent issue in
ptr_deref_may_alias_decl_p when the pointer is something like &MEM[0].a
in which case we fail to handle non-SSA name pointers.  Add code
similar to what we have in ptr_derefs_may_alias_p.

PR tree-optimization/120156
* tree-ssa-alias.cc (ptr_deref_may_alias_decl_p): Verify
the pointer is an SSA name.

(cherry picked from commit 50d3f67c71cf77a4ec95152079d37adf9d0b0a35)

3 weeks agoDaily bump.
GCC Administrator [Tue, 14 Oct 2025 00:24:00 +0000 (00:24 +0000)] 
Daily bump.

3 weeks agoDaily bump.
GCC Administrator [Mon, 13 Oct 2025 00:21:59 +0000 (00:21 +0000)] 
Daily bump.

3 weeks agoDaily bump.
GCC Administrator [Sun, 12 Oct 2025 00:21:56 +0000 (00:21 +0000)] 
Daily bump.

3 weeks agoDaily bump.
GCC Administrator [Sat, 11 Oct 2025 00:23:40 +0000 (00:23 +0000)] 
Daily bump.

3 weeks agoDaily bump.
GCC Administrator [Fri, 10 Oct 2025 00:24:51 +0000 (00:24 +0000)] 
Daily bump.

4 weeks agoDaily bump.
GCC Administrator [Thu, 9 Oct 2025 00:24:09 +0000 (00:24 +0000)] 
Daily bump.

4 weeks agoDaily bump.
GCC Administrator [Wed, 8 Oct 2025 00:23:32 +0000 (00:23 +0000)] 
Daily bump.

4 weeks agoDaily bump.
GCC Administrator [Tue, 7 Oct 2025 00:24:14 +0000 (00:24 +0000)] 
Daily bump.

4 weeks agoDaily bump.
GCC Administrator [Mon, 6 Oct 2025 00:20:42 +0000 (00:20 +0000)] 
Daily bump.

4 weeks agoFortran: fix TRANSFER with rank 1 unlimited polymorphic SOURCE [PR121263]
Harald Anlauf [Wed, 3 Sep 2025 18:41:20 +0000 (20:41 +0200)] 
Fortran: fix TRANSFER with rank 1 unlimited polymorphic SOURCE [PR121263]

PR fortran/121263

gcc/fortran/ChangeLog:

* trans-intrinsic.cc (gfc_conv_intrinsic_transfer): For an
unlimited polymorphic SOURCE to TRANSFER use saved descriptor
if possible.

gcc/testsuite/ChangeLog:

* gfortran.dg/transfer_class_5.f90: New test.

(cherry picked from commit 692281a38773a70ae795b3b594f0c0f8fd83e5ef)

4 weeks agoDaily bump.
GCC Administrator [Sun, 5 Oct 2025 16:52:52 +0000 (16:52 +0000)] 
Daily bump.

4 weeks ago[committed] [PR rtl-optimization/101188] Fix reload_cse_move2add ignoring clobbers
Jeff Law [Mon, 12 Jun 2023 18:52:10 +0000 (12:52 -0600)] 
[committed] [PR rtl-optimization/101188] Fix reload_cse_move2add ignoring clobbers

So as Georg-Johann discusses in the BZ, reload_cse_move2add can generate
 incorrect code when optimizing code with clobbers.  Specifically in the
case where we try to optimize a sequence of 4 operations down to 3
operations we can reset INSN to the next instruction and continue the loop.

That skips the code to invalidate objects based on things like REG_INC
nodes, stack pushes and most importantly clobbers attached to the current
insn.

This patch factors all of the invalidation code used by reload_cse_move2add
into a new function and calls it at the appropriate time.

Georg-Johann has confirmed this patch fixes his avr bug and I've had it in
my tester over the weekend.  It's bootstrapped and regression tested on
aarch64, m68k, sh4, alpha and hppa.  It's also regression tested successfully
on a wide variety of other targets.

gcc/
PR rtl-optimization/101188
* postreload.cc (reload_cse_move2add_invalidate): New function,
extracted from...
(reload_cse_move2add): Call reload_cse_move2add_invalidate.

gcc/testsuite
PR rtl-optimization/101188
* gcc.c-torture/execute/pr101188.c: New test

(cherry picked from commit ae193f9008e02683e27f3c87f3b06f38e103b1d0)

5 weeks agoDaily bump.
GCC Administrator [Thu, 2 Oct 2025 00:23:04 +0000 (00:23 +0000)] 
Daily bump.

5 weeks agoDaily bump.
GCC Administrator [Wed, 1 Oct 2025 00:24:12 +0000 (00:24 +0000)] 
Daily bump.

5 weeks agoDaily bump.
GCC Administrator [Tue, 30 Sep 2025 00:23:48 +0000 (00:23 +0000)] 
Daily bump.

5 weeks agoDaily bump.
GCC Administrator [Mon, 29 Sep 2025 00:21:22 +0000 (00:21 +0000)] 
Daily bump.

5 weeks agoDaily bump.
GCC Administrator [Sun, 28 Sep 2025 00:21:52 +0000 (00:21 +0000)] 
Daily bump.

5 weeks agoDaily bump.
GCC Administrator [Sat, 27 Sep 2025 00:21:26 +0000 (00:21 +0000)] 
Daily bump.

5 weeks agoDaily bump.
GCC Administrator [Fri, 26 Sep 2025 00:21:41 +0000 (00:21 +0000)] 
Daily bump.

6 weeks agoDaily bump.
GCC Administrator [Thu, 25 Sep 2025 00:22:40 +0000 (00:22 +0000)] 
Daily bump.

6 weeks agoDaily bump.
GCC Administrator [Wed, 24 Sep 2025 00:23:11 +0000 (00:23 +0000)] 
Daily bump.

6 weeks agoDaily bump.
GCC Administrator [Tue, 23 Sep 2025 00:23:01 +0000 (00:23 +0000)] 
Daily bump.

6 weeks agoDaily bump.
GCC Administrator [Mon, 22 Sep 2025 00:21:31 +0000 (00:21 +0000)] 
Daily bump.

6 weeks agoDaily bump.
GCC Administrator [Sun, 21 Sep 2025 00:21:25 +0000 (00:21 +0000)] 
Daily bump.

6 weeks agoDaily bump.
GCC Administrator [Sat, 20 Sep 2025 00:21:59 +0000 (00:21 +0000)] 
Daily bump.

6 weeks agoDaily bump.
GCC Administrator [Fri, 19 Sep 2025 00:21:51 +0000 (00:21 +0000)] 
Daily bump.

7 weeks agoRemove SPR/GNR/DMR from avx512_{move,store}_by pieces tune.
hongtao.liu [Tue, 16 Sep 2025 01:23:45 +0000 (03:23 +0200)] 
Remove SPR/GNR/DMR from avx512_{move,store}_by pieces tune.

Align move_max with prefer_vector_width for SPR/GNR/DMR similar as
below commit.

commit 6ea25c041964bf63014fcf7bb68fb1f5a0a4e123
Author: liuhongt <hongtao.liu@intel.com>
Date:   Thu Aug 15 12:54:07 2024 +0800

    Align ix86_{move_max,store_max} with vectorizer.

    When none of mprefer-vector-width, avx256_optimal/avx128_optimal,
    avx256_store_by_pieces/avx512_store_by_pieces is specified, GCC will
    set ix86_{move_max,store_max} as max available vector length except
    for AVX part.

                  if (TARGET_AVX512F_P (opts->x_ix86_isa_flags)
                      && TARGET_EVEX512_P (opts->x_ix86_isa_flags2))
                    opts->x_ix86_move_max = PVW_AVX512;
                  else
                    opts->x_ix86_move_max = PVW_AVX128;

    So for -mavx2, vectorizer will choose 256-bit for vectorization, but
    128-bit is used for struct copy, there could be a potential STLF issue
    due to this "misalign".

gcc/ChangeLog:

* config/i386/x86-tune.def (X86_TUNE_AVX512_MOVE_BY_PIECES):
Remove SPR/GNR/DMR.
(X86_TUNE_AVX512_STORE_BY_PIECES): Ditto.

gcc/testsuite/ChangeLog:

* gcc.target/i386/pieces-memcpy-18.c: Use -mtune=znver5
instead of -mtune=sapphirerapids.
* gcc.target/i386/pieces-memcpy-21.c: Ditto.
* gcc.target/i386/pieces-memset-46.c: Ditto.
* gcc.target/i386/pieces-memset-49.c: Ditto.

(cherry picked from commit dd713d0f3fc88778a9b3d4f8f1895a3cd6c145ca)

7 weeks agoDaily bump.
GCC Administrator [Thu, 18 Sep 2025 00:22:19 +0000 (00:22 +0000)] 
Daily bump.

7 weeks agotree-sra: Avoid total SRA if there are incompat. aggregate accesses (PR119085)
Martin Jambor [Wed, 23 Jul 2025 09:22:33 +0000 (11:22 +0200)] 
tree-sra: Avoid total SRA if there are incompat. aggregate accesses  (PR119085)

We currently use the types encountered in the function body and not in
type declaration to perform total scalarization.  Bug PR 119085
uncovered that we miss a check that when the same data is accessed
with aggregate types that those are actually compatible.  Without it,
we can base total scalarization on a type that does not "cover" all
live data in a different part of the function.  This patch adds the
check.

gcc/ChangeLog:

2025-07-21  Martin Jambor  <mjambor@suse.cz>

PR tree-optimization/119085
* tree-sra.cc (sort_and_splice_var_accesses): Prevent total
scalarization if two incompatible aggregates access the same place.

gcc/testsuite/ChangeLog:

2025-07-21  Martin Jambor  <mjambor@suse.cz>

PR tree-optimization/119085
* gcc.dg/tree-ssa/pr119085.c: New test.

(cherry picked from commit dabac057141c26a69325a410c81de0ff2157c6c9)

7 weeks agotree-sra: Fix grp_covered flag computation when totally scalarizing (PR117423)
Martin Jambor [Thu, 17 Jul 2025 16:28:33 +0000 (18:28 +0200)] 
tree-sra: Fix grp_covered flag computation when totally scalarizing (PR117423)

Testcase of PR 117423 shows a flaw in the fancy way we do "total
scalarization" in SRA now.  We use the types encountered in the
function body and not in type declaration (allowing us to totally
scalarize when only one union field is ever used, since we effectively
"skip" the union then) and can accommodate pre-existing accesses that
happen to fall into padding.

In this case, we skipped the union (bypassing the
totally_scalarizable_type_p check) and the access falling into the
"padding" is an aggregate and so not a candidate for SRA but actually
containing data.  Arguably total scalarization should just bail out
when it encounters this situation (but I decided not to depend on this
mainly because we'd need to detect all cases when we eventually cannot
scalarize, such as when a scalar access has children accesses) but the
actual bug is that the detection if all data in an aggregate is indeed
covered by replacements just assumes that is always the case if total
scalarization triggers which however may not be the case in cases like
this - and perhaps more.

This patch fixes the bug by just assuming that all padding is taken
care of when total scalarization triggered, not that every access was
actually scalarized.

gcc/ChangeLog:

2025-07-17  Martin Jambor  <mjambor@suse.cz>

PR tree-optimization/117423
* tree-sra.cc (analyze_access_subtree): Fix computation of grp_covered
flag.

gcc/testsuite/ChangeLog:

2025-07-17  Martin Jambor  <mjambor@suse.cz>

PR tree-optimization/117423
* gcc.dg/tree-ssa/pr117423.c: New test.

(cherry picked from commit 7efca50a9a18e69a4921140fc5a0325e3f519b1a)

7 weeks agoDaily bump.
GCC Administrator [Wed, 17 Sep 2025 00:22:10 +0000 (00:22 +0000)] 
Daily bump.

7 weeks agoFix latent LRA bug
Jeff Law [Fri, 12 Sep 2025 22:08:38 +0000 (16:08 -0600)] 
Fix latent LRA bug

Shreya's work to add the addptr pattern on the RISC-V port exposed a latent bug
in LRA.

We lazily allocate/reallocate the ira_reg_equiv structure and when we do
(re)allocation we'll over-allocate and zero-fill so that we don't have to
actually allocate and relocate the data so often.

In the case exposed by Shreya's work we had N requested entries at the last
rellocation step.  We actually allocate N+M entries.  During LRA we allocate
enough new pseudos and thus have N+M+1 pseudos.

In get_equiv we read ira_reg_equiv[regno] without bounds checking so we read
past the allocated part of the array and get back junk which we use and
depending on the precise contents we fault in various fun and interesting ways.

We could either arrange to re-allocate ira_reg_equiv again on some path through
LRA (possibly in get_equiv itself).  We could also just insert the bounds check
in get_equiv like is done elsewhere in LRA.  Vlad indicated no strong
preference in an email last week.

So this just adds the bounds check in a manner similar to what's done elsewhere
in LRA.  Bootstrapped and regression tested on x86_64 as well as RISC-V with
Shreya's work enabled and regtested across the various embedded targets.

gcc/
* lra-constraints.cc (get_equiv): Bounds check before accessing
data in ira_reg_equiv.

(cherry picked from commit 0c6ad3f5dfbd45150eeef2474899ba7ef0d8e592)

7 weeks agoDaily bump.
GCC Administrator [Tue, 16 Sep 2025 00:22:12 +0000 (00:22 +0000)] 
Daily bump.

7 weeks agoAVR: Support more AVR-DA-S and AVR-EB devices.
Georg-Johann Lay [Mon, 15 Sep 2025 14:09:06 +0000 (16:09 +0200)] 
AVR: Support more AVR-DA-S and AVR-EB devices.

gcc/
* config/avr/avr-mcus.def: Support AVR32DA28S, AVR32DA32S,
AVR32DA48S, AVR64DA28S, AVR64DA32S, AVR64DA48S AVR64DA64S,
AVR128DA28S, AVR128DA32S, AVR128DA48S, AVR128DA64S,
AVR32EB14, AVR32EB20, AVR32EB28, AVR32EB32.
* doc/avr-mmcu.texi: Rebuild.

7 weeks agoc++: Fix mangling of _Float16 template args [PR121801]
Matthias Kretz [Fri, 5 Sep 2025 10:16:34 +0000 (12:16 +0200)] 
c++: Fix mangling of _Float16 template args [PR121801]

Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
gcc/testsuite/ChangeLog:

PR c++/121801
* g++.dg/abi/pr121801.C: New test.

gcc/cp/ChangeLog:

PR c++/121801
* mangle.cc (write_real_cst): Handle 16-bit real and assert
that reals have 16 bits or a multiple of 32 bits.

(cherry picked from commit 19d1c7c28f4fd0557dd868a7a4041b00ceada890)

7 weeks agoDaily bump.
GCC Administrator [Mon, 15 Sep 2025 00:19:22 +0000 (00:19 +0000)] 
Daily bump.

7 weeks agoDaily bump.
GCC Administrator [Sun, 14 Sep 2025 00:20:56 +0000 (00:20 +0000)] 
Daily bump.

7 weeks agoDaily bump.
GCC Administrator [Sat, 13 Sep 2025 00:20:21 +0000 (00:20 +0000)] 
Daily bump.

7 weeks agoDaily bump.
GCC Administrator [Fri, 12 Sep 2025 00:22:10 +0000 (00:22 +0000)] 
Daily bump.

8 weeks agoDaily bump.
GCC Administrator [Thu, 11 Sep 2025 00:21:42 +0000 (00:21 +0000)] 
Daily bump.

8 weeks agoAVR: Disable tree-switch-conversion per default.
Georg-Johann Lay [Sat, 6 Sep 2025 11:38:48 +0000 (13:38 +0200)] 
AVR: Disable tree-switch-conversion per default.

There are at least two cases where tree-switch-conversion leads
to unpleasant resource allocation:

PR49857
    The lookup table lives in RAM.  This is the case for all
    devices that locate .rodata in RAM, which is for almost
    all AVR devices.

PR81540
    Code is bloated for 64-bit inputs.

As far as PR49857 is concerned, a target hook that may add an
address-space qualifier to the lookup table is the obvious
solution, though a respective patch has always been rejected by
global maintainers for non-technical reasons.

gcc/
PR target/81540
PR target/49857
* common/config/avr/avr-common.cc: Disable -ftree-switch-conversion.

(cherry picked from commit 912159d2b5429c3126756b56723dd4f32dd56bdd)

8 weeks agoDaily bump.
GCC Administrator [Wed, 10 Sep 2025 00:26:21 +0000 (00:26 +0000)] 
Daily bump.

8 weeks agolibstdc++: Document remaining C++17 implementation-defined behavior.
Tomasz Kamiński [Fri, 5 Sep 2025 14:08:12 +0000 (16:08 +0200)] 
libstdc++: Document remaining C++17 implementation-defined behavior.

This also covers bad_function_call::what from C++11.

libstdc++-v3/ChangeLog:

* doc/html/manual/status.html: Regenerate.
* doc/xml/manual/status_cxx2011.xml: Add entry for bad_function_call.
* doc/xml/manual/status_cxx2017.xml: Add entries for bad_any_cast
and nullptr_t output. Update entry for sf.cmath. Fix stable name for
mem.res.

Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Signed-off-by: Tomasz Kamiński <tkaminsk@redhat.com>
(cherry picked from commit 39d7c4d42a764a86644198a517f58a94f467cdbd)

8 weeks agolibstdc++: Document missing implementation defined behavior for std::filesystem.
Tomasz Kamiński [Fri, 5 Sep 2025 11:16:40 +0000 (13:16 +0200)] 
libstdc++: Document missing implementation defined behavior for std::filesystem.

libstdc++-v3/ChangeLog:

* doc/html/manual/status.html: Regenerate the file.
* doc/xml/manual/status_cxx2017.xml: Addd more entires.

Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Signed-off-by: Tomasz Kamiński <tkaminsk@redhat.com>
(cherry picked from commit d6c370b8e96d43448537276d91c2b33fedb9754a)

8 weeks agoDaily bump.
GCC Administrator [Tue, 9 Sep 2025 00:26:33 +0000 (00:26 +0000)] 
Daily bump.

8 weeks agolibstdc++: Fix docs for --enable-vtable-verify [PR120698]
Jonathan Wakely [Wed, 18 Jun 2025 14:46:24 +0000 (15:46 +0100)] 
libstdc++: Fix docs for --enable-vtable-verify [PR120698]

libstdc++-v3/ChangeLog:

PR libstdc++/120698
* doc/xml/manual/configure.xml: Do not claim that vtv is enabled
by default.
* doc/html/manual/configure.html: Regenerate.

(cherry picked from commit d199a9c7c5034d0eddb3380a58342a5bcbe6febd)

8 weeks agoDaily bump.
GCC Administrator [Mon, 8 Sep 2025 00:23:30 +0000 (00:23 +0000)] 
Daily bump.

8 weeks agolibphobos: enable for more hppa tuples
Sam James [Mon, 24 Mar 2025 04:34:06 +0000 (04:34 +0000)] 
libphobos: enable for more hppa tuples

Gentoo uses hppa1.1*-*-linux* and hppa2.0*-*-linux* instead of Debian's
hppa-*-linux*.

libphobos/ChangeLog:

* configure.tgt: Add hppa[12]*-*-linux* as a supported target.

(cherry picked from commit 35cf8d85841a6301eeb12668085e326ddd115f6e)

8 weeks agolibphobos: enable for sparc64-unknown-linux-gnu
Sam James [Sun, 20 Apr 2025 00:43:39 +0000 (01:43 +0100)] 
libphobos: enable for sparc64-unknown-linux-gnu

This bootstraps with some test failures but works well enough to build
11..15.

libphobos/ChangeLog:

* configure.tgt: Add sparc64-unknown-linux-gnu as a supported target.

(cherry picked from commit 2572d46f0d1e426c1091f9b84861ee5213b84b5a)

8 weeks agolibphobos: enable for powerpc64le-linux-gnu
Matthias Klose [Sun, 7 Sep 2025 08:55:47 +0000 (10:55 +0200)] 
libphobos: enable for powerpc64le-linux-gnu

libphobos/ChangeLog:

* configure.tgt: Add powerpc64le--linux-gnu as a supported target
when configured with --with-long-double-format=ieee.

8 weeks agoDaily bump.
GCC Administrator [Sun, 7 Sep 2025 00:22:23 +0000 (00:22 +0000)] 
Daily bump.

2 months agoDaily bump.
GCC Administrator [Sat, 6 Sep 2025 00:23:28 +0000 (00:23 +0000)] 
Daily bump.

2 months agoDaily bump.
GCC Administrator [Fri, 5 Sep 2025 00:21:37 +0000 (00:21 +0000)] 
Daily bump.

2 months agolibstdc++: Make CTAD ignore pair(const T1&, const T2&) constructor [PR110853]
Jonathan Wakely [Tue, 2 Sep 2025 21:30:46 +0000 (22:30 +0100)] 
libstdc++: Make CTAD ignore pair(const T1&, const T2&) constructor [PR110853]

For the pair(T1, T2) explicit deduction type to decay its arguments as
intended, we need the pair(const T1&, const T2&) constructor to not be
used for CTAD. Otherwise we try to instantiate pair<T1, T2> without
decaying, which is ill-formed for function lvalues.

Use std::type_identity_t<T1> to make the constructor unusable for an
implicit deduction guide.

libstdc++-v3/ChangeLog:

PR libstdc++/110853
* include/bits/stl_pair.h [C++20] (pair(const T1&, const T2&)):
Use std::type_identity_t<T1> for first parameter.
* testsuite/20_util/pair/cons/110853.cc: New test.

Reviewed-by: Patrick Palka <ppalka@redhat.com>
Reviewed-by: Tomasz Kamiński <tkaminsk@redhat.com>
(cherry picked from commit 0bb0d1d2880d562298eeec8eee4ab4e8ba943260)

2 months agolibstdc++: Fix std::get<T> for std::pair with reference members [PR121745]
Jonathan Wakely [Mon, 1 Sep 2025 17:12:27 +0000 (18:12 +0100)] 
libstdc++: Fix std::get<T> for std::pair with reference members [PR121745]

Make the std::get<T> overloads for rvalues use std::forward<T>(p.first)
not std::move(p.first), so that lvalue reference members are not
incorrectly converted to rvalues.

It might appear that std::move(p).first would also work, but the
language rules say that for std::pair<T&&, U> that would produce T&
rather than the expected T&& (see the discussion in P2445R1 §8.2).

Additional tests are added to verify all combinations of reference
members, value categories, and const-qualification.

libstdc++-v3/ChangeLog:

PR libstdc++/121745
* include/bits/stl_pair.h (get): Use forward instead of move in
std::get<T> overloads for rvalue pairs.
* testsuite/20_util/pair/astuple/get_by_type.cc: Check all value
categories and cv-qualification.

Reviewed-by: Tomasz Kamiński <tkaminsk@redhat.com>
(cherry picked from commit c8a24f60b6874fca4fb3adb153f8d5f1dd72b951)

2 months agolibstdc++: Use __promote_3 for std::hypot [PR121097]
Jonathan Wakely [Tue, 15 Jul 2025 20:29:33 +0000 (21:29 +0100)] 
libstdc++: Use __promote_3 for std::hypot [PR121097]

The __promoted_t alias is only defined when __cpp_fold_expressions is
defined, which might not be the case for some hypothetical C++17
compilers.

Change the 3-arg std::hypot to just use __gnu_cxx::__promote_3 which is
always available.

libstdc++-v3/ChangeLog:

PR libstdc++/121097
* include/c_global/cmath (hypot): Use __promote_3 instead of
__promoted.

Reviewed-by: Tomasz Kamiński <tkaminsk@redhat.com>
(cherry picked from commit f4932c59df387a505de69a5a1015a03caa4ccf08)

2 months agoDaily bump.
GCC Administrator [Thu, 4 Sep 2025 00:22:54 +0000 (00:22 +0000)] 
Daily bump.

2 months agoDaily bump.
GCC Administrator [Wed, 3 Sep 2025 00:22:42 +0000 (00:22 +0000)] 
Daily bump.

2 months agoDaily bump.
GCC Administrator [Tue, 2 Sep 2025 00:22:53 +0000 (00:22 +0000)] 
Daily bump.

2 months agoDaily bump.
GCC Administrator [Mon, 1 Sep 2025 00:22:26 +0000 (00:22 +0000)] 
Daily bump.

2 months agoDaily bump.
GCC Administrator [Sun, 31 Aug 2025 00:24:52 +0000 (00:24 +0000)] 
Daily bump.

2 months agoRevert "Fix _Decimal128 arithmetic error under FE_UPWARD."
liuhongt [Sat, 30 Aug 2025 02:24:20 +0000 (19:24 -0700)] 
Revert "Fix _Decimal128 arithmetic error under FE_UPWARD."

This reverts commit 44287e850b94de27c3a398fd75936a962c12b1b8.

2 months agoDaily bump.
GCC Administrator [Sat, 30 Aug 2025 00:22:35 +0000 (00:22 +0000)] 
Daily bump.

2 months agoFix _Decimal128 arithmetic error under FE_UPWARD.
liuhongt [Thu, 28 Aug 2025 01:20:09 +0000 (18:20 -0700)] 
Fix _Decimal128 arithmetic error under FE_UPWARD.

libgcc/config/libbid/ChangeLog:

PR target/120691
* bid128_div.c: Fix _Decimal128 arithmetic error under
FE_UPWARD.
* bid128_rem.c: Ditto.
* bid128_sqrt.c: Ditto.
* bid64_div.c (bid64_div): Ditto.
* bid64_sqrt.c (bid64_sqrt): Ditto.

gcc/testsuite/ChangeLog:

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

(cherry picked from commit 50064b2898edfb83bc37f2597a35cbd3c1c853e3)

2 months agoDaily bump.
GCC Administrator [Fri, 29 Aug 2025 00:23:39 +0000 (00:23 +0000)] 
Daily bump.