Skip to content

Conversation

@dkm
Copy link
Member

@dkm dkm commented Nov 17, 2025

This is a sync with upstream GCC:

-- gerris 🦀

pinskia and others added 30 commits November 13, 2025 12:56
So when we using the newly mapped location, we should check if
it is not unknown location and if so just use the original location.
Note this is a latent bug in remove_forwarder_block_with_phi code too.

This fixes gcc.dg/uninit-pr40635.c when doing more mergephi.

gcc/ChangeLog:

	* tree-cfg.cc (copy_phi_arg_into_existing_phi): Use the original location
	if the mapped location is unknown.

Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
This adds support for merging forwarder blocks with phis in cleanupcfg.
This patch might seem small but that is because the previous patches were
done to build up to make it easier to add this support.

There is still one more patch to merge remove_forwarder_block
and remove_forwarder_block_with_phi since remove_forwarder_block_with_phi
supports splitting an edge which is not supported as an option in remove_forwarder_block.
The splitting edge option should not be enabled for cfgcleanup but only for mergephi.

Note r8-338-ge7d70c6c3bccb2 added always creating a preheader for loops so we should
protect them if we have a phi node as it goes back and forth here. And both the gimple
and RTL loop code likes to have this preheader in the case of having the same constant
value being starting of the loop.

explaination on testcase changes
gcc.target/i386/pr121062-1.c needed a small change because there is a basic block
which is not duplicated so only one `movq reg, -1` is there instead of 2.

uninit-pred-7_a.c is xfailed and filed as PR122660, some analysis in the PR already of
the difference now.

uninit-pred-5.C was actually a false positive because when
m_best_candidate is non-NULL, m_best_candidate_len is always initialized.
The log message on the testcase is wrong if you manually fall the path
you can notice that. With an extra jump threading after the merging of
some bbs, the false positive is now no longer happening. So change the
dg-warning to dg-bogus.

ssa-dom-thread-7.c now jump threads 12 times in thread2 instead of 8

Bootstrapped and tested on x86_64-linux-gnu.

	PR tree-optimization/122493
gcc/ChangeLog:

	* tree-cfgcleanup.cc (tree_forwarder_block_p): Change bool argument
	to a must have phi and allow phis if it is false.
	(remove_forwarder_block): Add support for merging of forwarder blocks
	with phis.

gcc/testsuite/ChangeLog:

	* gcc.target/i386/pr121062-1.c: Update count.
	* gcc.dg/uninit-pred-7_a.c: xfail line 23.
	* g++.dg/uninit-pred-5.C: Change dg-warning to dg-bogus.
	* gcc.dg/tree-ssa/ssa-dom-thread-7.c: Update count of jump thread.

Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
This is the last cleanup in this area. Merges the splitting functionality
of remove_forwarder_block_with_phi into remove_forwarder_block.
Now mergephi still has the ability to split the edges when merging the forwarder
block with a phi. But this reduces the non-shared code a lot.

gcc/ChangeLog:

	* tree-cfgcleanup.cc (tree_forwarder_block_p): Remove must argument.
	(remove_forwarder_block): Add can_split
	argument. Handle the splitting case (iff phis in bb).
	(cleanup_tree_cfg_bb): Update argument to tree_forwarder_block_p.
	(remove_forwarder_block_with_phi): Remove.
	(pass_merge_phi::execute): Update argument to tree_forwarder_block_p
	and call remove_forwarder_block instead of remove_forwarder_block_with_phi.

Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
r16-5173-g52a24bcec9388a fixed this testcase, but I think it's
worthwhile still adding this reduced test for it to the modules.exp set
of tests so we don't need to rely on libstdc++ tests for it yet.

	PR c++/122646

gcc/testsuite/ChangeLog:

	* g++.dg/modules/friend-10_a.C: New test.
	* g++.dg/modules/friend-10_b.C: New test.

Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
Some versions of vxworks define NULL to __nullptr in C++, assuming
C++11, which breaks at least a number of analyzer tests that get
exercised in C++98 mode.

Wrap the header that defines NULL so that, after including it, we
override the NULL definition with the one provided by stddef.h.

That required some infrastructure to enable subdirectories in extra
headers.  Since USER_H filenames appear as dependencies, that limits
the possibilities or markup, so I went for a filesystem-transparent
sequence that doesn't appear in any extra_headers whatsoever, namely
/././, to mark the beginning of the desired install name.

Co-Authored-By: Olivier Hainque <hainque@adacore.com>

for  gcc/ChangeLog

	* config/vxworks/base/b_NULL.h: New.
	* config.gcc (extra_headers) <*-*-vxworks*>: Add it.
	* Makefile.in (stmp-int-hdrs): Support /././ markers in USER_H
	to mark the beginning of the install name.  Document.
	* doc/sourcebuild.texi (Headers): Document /././ marker.
	PR fortran/96255

gcc/testsuite/ChangeLog:

	* gfortran.dg/do_concurrent_typespec_1.f90: Delete three
	dg-bogus directives not needed.
As for GGC(GCC Garbage Collection), it's use gengtype tool to scan all
source files contain the GTY mark, and generate gt-*.h files. GGC
traversal these file to find gt_root node and marks these objects that
directly or indirectly reference this node as active, then clean up
unmarked object's memory.

For the loongarch-builtins.cc file, it is necessary to add
target_gtfiles in config.gcc to generate gt-loongarch-builtins.h, and
include this header file in the .cc file, prevented the data marked
with GTY in this `.cc` file cleaned up by ggc.

gcc/ChangeLog:

	* config.gcc: Add target_gtfiles.
	* config/loongarch/loongarch-builtins.cc: Add header file.
The predicate checks if the operand is PLUS(symbol_ref, const_int), but
the match (match_operand 0/1) is not equal XEXP(op, 0/1). It should be
adjusted to use match_test and pass XEXP(op, 0/1) into the constraint
function.

gcc/ChangeLog:

	* config/loongarch/predicates.md: Update ops.
Repalce xvpermi to xvbsrl when vector of V4DFmode high 64 bits copy to
low 64 bits, reduce 2 insn delays.

gcc/ChangeLog:

	* config/loongarch/lasx.md (lasx_xvbsrl_d_f): New template.
	* config/loongarch/loongarch.cc (emit_reduc_half): Replace insn.

gcc/testsuite/ChangeLog:

	* gcc.target/loongarch/vec_reduc_half.c: New test.
When I rebased r16-5226 I failed to notice the generated configure is
different after r16-5138.

gcc/

	* configure: Regenerate.
The thumb2_asrl, thumb2_lsll and thumb2_lsrl patterns were incorrecly
using (match_dup 0) for the first argument of the shift operator.

This patch replaces that with (match_operand:DI 1
arm_general_register_operandarm_general_register_operand "0") and
fixes the related expanders in arm.md to use that additional argument
and get rid of the copy of operands[1] to operands[0].

Finally, since these patterns are MVE-only, rename them into mve_XXX
and move them to mve.md.

gcc/ChangeLog:

	PR target/122216
	* config/arm/thumb2.md (thumb2_asrl, thumb2_lsll, thumb2_lsrl):
	Move to ...
	* config/arm/mve.md (mve_asrl, mve_lsll, mve_lsrl): ... here. Use
	match_operand instead of match_dup.
	* config/arm/arm.md (ashldi3, ashrdi3, lshrdi3): Remove useless
	copy. Update for new prototype.
…PR122216]

MVE asrl and lsll instructions have two variants:
- immediate shift amount in the [1..32] range
- shift amount in a register, where negative values reverse the
  direction of the shift

However, RTL assumes that the shift amount is interpreted unsigned, so
we want to make sure undesired simplifications do not take place.
For instance if simplify_rtx optimizes
(set (reg:SI 1) (const_int -5))
(set (reg:DI 2) (ashift:DI (reg:DI 3) (reg:SI 1)))
into:
(set (reg:DI 2) (ashift:DI (reg:DI 3) (const_int -5)))
we do not want this to be interpreted as undefined behavior.

We handle this using a general pattern where:
- immediates are handled by a define_insn_and_split pattern which
  directly maps immediates in [1..32] to the shift operator and splits
  other cases as needed.
- non-immediates are handled by another pattern

gcc/ChangeLog:

	PR target/122216
	* config/arm/arm.md (ashldi3, ashrdi3): Force shift amount into
	QImode.
	* config/arm/constraints.md: Fix comment, Pg is valid in Thumb-2
	state only.
	* config/arm/mve.md (mve_asrl): Handle various shift amount ranges.
	(mve_asrl_imm, mve_asrl_internal): New patterns.
	(mve_lsll): Handle various shift amount ranges.
	(mve_lsll_imm, mve_lsll_internal): New patterns.

gcc/testsuite/ChangeLog:

	PR target/122216
	* gcc.target/arm/mve/intrinsics/asrl-various-ranges.c: New test.
	* gcc.target/arm/mve/intrinsics/lsll-various-ranges.c: New test.
…R122216]

This patch adds the scalar_s64_shift and scalar_u64_shift shape
descriptions.

gcc/ChangeLog:

	PR target/122216
	* config/arm/arm-mve-builtins-shapes.cc (scalar_s64_shift): New.
	(scalar_u64_shift): New.
	* config/arm/arm-mve-builtins-shapes.h: Likewise.
Implement asrl and lsll using the new MVE builtins framework.

gcc/ChangeLog:

	PR target/122216
	* config/arm/arm-mve-builtins-base.cc (enum which_scalar_shift): New.
	(mve_function_scalar_shift): New.
	(asrl, lsll): New.
	* config/arm/arm-mve-builtins-base.def (asrl, lsll): New.
	* config/arm/arm-mve-builtins-base.h (asrl, lsll): New.
	* config/arm/arm_mve.h (asrl): Delete.
	(lsll): Delete.
	(__arm_asrl): Delete.
	(__arm_lsll): Delete.
I recently noticed that gcc/configure.ac contains quite a number of
checks for Solaris ld and GNU ld versions that can be massively
simplified.  GCC trunk only supports Solaris 11.4, thus Solaris ld is at
least at version 5.11-1.3159 (the one in 11.4 FCS), and GNU ld can be
required to be at least 2.30.1, the version bundled in 11.4 FCS.

This way quite a number of special cases can simply be removed, as well
as some macros that depend on them and the code they guard.

To ensure that nobody tries to use an older self-compiled version of GNU
ld, the minimum version is checked at configure time.

This change also allowed to fix two bugs that were caused by checks for
*_sol2 among the linker emulations listed by gld -V, which are only valid
when targetting Solaris.  Before those checks were done irrespective of
target, causing checks to go wrong when a version of binutils configured
with --enable-targets=all was used.  Since now all versions of GNU ld
supported on Solaris are known to support those *_sol2 emulations, the
checks can be replaced by hardcoding the emulations when targetting
Solaris.

Bootstrapped without regressions on i386-pc-solaris2.11,
sparc-sun-solaris2.11, and x86_64-pc-linux-gnu.

2025-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	gcc:
	PR target/121458
	PR target/121457
	* configure.ac: Fix typos.
	<*-*-solaris2*>: Require GNU ld 2.30.
	(comdat_group) <*-*-solaris2.1[1-9]*>: Always set to yes.
	(ld_ix86_gld_32_opt): Only use -melf_i386_sol2 for Solaris target.
	(ld_ix86_gld_64_opt): Likewise with -melf_x86_64_sol.
	(gcc_cv_ld_eh_frame_hdr) <*-*-solaris2*>: Likewise.
	(gcc_cv_ld_pie) <*-*-solaris2*>: Remove special cases.
	(gcc_cv_ld_compress_debug) <*-*-solaris2*>: Remove guard.
	(gcc_cv_ld_as_needed): Simplify guard.
	(gcc_cv_ld_sol2_emulation): Remove.
	(gcc_cv_solaris_crts): Remove.
	* configure: Regenerate.
	* config.in: Regenerate.

	* config/sol2.h (STARTFILE_CRTBEGIN_SPEC): Remove !HAVE_LD_PIE
	support.
	(ENDFILE_CRTEND_SPEC): Likewise.
	(LD_PIE_SPEC): Likewise.
	[USE_GLD] (LINK_EH_SPEC): Set unconditionally.
	* config/i386/sol2.h [USE_GLD]: Remove !HAVE_LD_SOL2_EMULATION
	support.
	* config/sparc/sol2.h: Likewise.

	* doc/install.texi (Specific, *-*-solaris2*): Update bundled gcc
	versions.
	Raise required binutils version.
	Remove binutils 2.44 caveat.
Range queries during analysis on the original loop might not yield
the same result as those on the epilog during transform.  Separate
analysis from transform here.

	PR tree-optimization/122680
	* tree-vect-stmts.cc (vectorizable_conversion): Avoid range
	queries during transform.

	* gcc.dg/vect/pr122680.c: New testcase.
	PR fortran/117070

gcc/fortran/ChangeLog:

	* array.cc (check_constructor): Allow procedures as potential
	target of a procedure pointer.

gcc/testsuite/ChangeLog:

	* gfortran.dg/proc_target_1.f90: New test.
Currently SLP of invariant loads is only supported for the case of
a single load that is splat, as side-effect of supporting this case
even for non-invariant loads.  The following extends this to any
set of invariant loads.  The way we have load permutations for
these makes it a bit awkward, thus adjustments in that area.

	PR tree-optimization/122573
	* tree-vect-slp.cc (vect_build_slp_tree_1): Support
	groups of invariant loads.
	(vect_build_slp_tree_2): Likewise.
	(vect_transform_slp_perm_load_1): Likewise.
	* tree-vect-stmts.cc (vectorizable_load): Handle non-splat
	SLP for invaraint loads.

	* gcc.dg/vect/slp-58.c: New testcase.
…f> [PR122032]

This patch changes the implementation of bind_front<f> and bind_back<f> to
return a _Bind_front_t<_Bind_fn_t<f>, ...> and _Bind_back_t<_Bind_fn_t<f>, ...>
respectively, replacing the previous lambda-based implementation. The prior use
of a lambda caused non-conforming behavior with respect to C++23 [func.require]
p8, which requires that bind_front<f>(s), bind_front<f>(move(s)), and
bind_front<f>(as_const(s)) produce the same type.

Additionally, using specialized structs reduces the size of the resulting functor
in certain scenarios (see PR).

For the zero-argument case, the function still returns a _Bind_fn_t<f>. Since this
type is already a perfect forwarding call wrapper, it yields the same result as
_Bind_front_t<_Bind_fn_t<f>>.

A consequence of this change is that the types returned by bind_front<f>(args...)
and bind_back<f>(args...) are no longer structural - they are not required to be
structural by the standard.

	PR libstdc++/122032

libstdc++-v3/ChangeLog:

	* include/std/functional (std::bind_front<f>, std::bind_back<f>):
	Define in terms of _Bind_front_t/_Bind_back_t.
	* testsuite/20_util/function_objects/bind_back/nttp.cc: New tests.
	* testsuite/20_util/function_objects/bind_front/nttp.cc: New tests.

Reviewed-by: Patrick Palka <ppalka@redhat.com>
Signed-off-by: Tomasz Kamiński <tkaminsk@redhat.com>
We currently remove stmts inside of a FOR_EACH_IMM_USE_STMT iteration
which can be problematical.  The following adjusts purge_all_uses
to gather all stmts to remove and remove them in reverse order
afterwards which also better deals with debug stmt generation.

	PR ipa/122663
	* ipa-param-manipulation.cc (purge_all_uses): Collect
	stmts to remove and process that list in reverse.

	* g++.dg/torture/pr122663.C: New testcase.
It is not possible to use 'i' as output operand constraint.

gcc/ChangeLog:

	* config/i386/i386.md (*sub<mode>_3):
	Remove 'i' from operand 0 constraint.
I removed the only use of this param in r16-348-gc14560907a9586.  Remove
the param.

gcc/ChangeLog:

	* doc/invoke.texi: Remove mention of switch-lower-slow-alg-max-cases.
	* params.opt: Remove switch-lower-slow-alg-max-cases.

Signed-off-by: Filip Kastl <fkastl@suse.cz>
…[PR121054]

According to the standard the first n characters of a bitset constructor
string need to be checked instead of only N.

libstdc++-v3/ChangeLog:

	PR libstdc++/121054
	* include/std/bitset: Add string check to constructor.
	* testsuite/20_util/bitset/121054.cc: New test.
	* testsuite/20_util/bitset/cons/constexpr_c++23.cc: Fix.

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

	* include/std/bitset: Add comment to feature test macro test.
This patch fixes a regression introduced in r14-8400-g186ae6d2cb93ad.

gcc/fortran/ChangeLog:

	* trans-expr.cc (conv_dummy_value): Add check for NULL allocatable.

gcc/testsuite/ChangeLog:

	* gfortran.dg/value_optional_3.f90: New test.
Previously, _Utf_view accepted any input_range, including reference-to-array
types like char(&)[2], and stored it as the _M_base member. In such cases,
_Utf_view was not assignable, failing the requirements of view concept.

This patch addresses the issue by adding the ranges::view constraint to the
second template parameter of _Utf_view, and for clarity renaming it from
_Range to _View. The constructor is also adjusted to accept its argument
by value (views must be O(1) move-constructible). This prevents implicitly
generated CTAD from deducing a reference type.

This makes _Utf_view consistent with both other standard views and the
wording from P2728R8: Unicode in the Library, Part 1: UTF Transcoding [1].

The explicit CTAD from viewable_range is not defined for _Utf_view because
it depends on views::all_t, views::ref_view, and views::owning_view,
which are declared in <ranges>. Consequently, users must explicitly cast
the argument to a view or specify it as a template parameter.

[1] https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p2728r8.html

libstdc++-v3/ChangeLog:

	* include/bits/unicode.h (_Utf_view): Rename the template parameter
	from _Range to _View and constrain it with ranges::view.
	(_Utf_view::_Utf_view): Accept by value instead of rvalue reference.
	* include/std/format (__format::__write_padded): Replace _Utf_view
	over const char32_t(&)[1] with span<const char32_t, 1>.
	* testsuite/ext/unicode/view.cc: Add checks if specialization
	of _Utf_view satisfy view. Wrap arrays into std::span before
	constructing _Utf_view.

Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Signed-off-by: Tomasz Kamiński <tkaminsk@redhat.com>
A user pointed out that, in DAP mode, gdb would hang while trying to
display a certain vector.  See

    https://sourceware.org/bugzilla/show_bug.cgi?id=33594

This is caused by a combination of things: the vector is
uninitialized, DAP requires a count of the number of children of a
variable, and libstdc++ printers don't implement the 'num_children'
method, so gdb tries to count children by iterating.

In this case, the vector has a nonsensical size:

    (gdb) p myVector
    $1 = std::vector of length -34979931, capacity -33992726

This patch adds a 'num_children' method to a subset of the
pretty-printers, in particular ones where I thought the length might
be arbitrarily large and susceptible to being garbage when the object
isn't initialized.

I've also specifically added a check to the vector printer for the
case where the length is negative.

These container printers could be further improved by adding the
'child' method, allowing random access to child objects.  However I
haven't done that here.

libstdc++-v3/ChangeLog

	* python/libstdcxx/v6/printers.py (StdVectorPrinter._bounds):
	New method.
	(StdVectorPrinter.to_string): Use it.
	(StdVectorPrinter.num_children): New method.
	(StdStackOrQueuePrinter.num_children): New method.
	(StdMapPrinter.num_children): New method.
	(StdSetPrinter.num_children): New method.
	(StdDequePrinter._size): New method.
	(StdDequePrinter.to_string): Use it.
	(StdDequePrinter.num_children): New method.
	(Tr1UnorderedSetPrinter.num_children): New method.
	(Tr1UnorderedMapPrinter.num_children): New method.
	(StdSpanPrinter.num_children): New method.
Implement vpnot using the new MVE builtins framework.

gcc/ChangeLog:

	* config/arm/arm-mve-builtins-base.cc (class mve_function_vpnot): New.
	(vpnot): New.
	* config/arm/arm-mve-builtins-base.def (vpnot): New.
	* config/arm/arm-mve-builtins-base.h (vpnot): New.
	* config/arm/arm-mve-builtins-shapes.cc (struct vpnot): New.
	* config/arm/arm-mve-builtins-shapes.h (vpnot): New.
	* config/arm/arm_mve.h (vpnot): Delete.
	(__arm_vpnot): Delete.
Implement uqrshll and uqrshll_sat48 using the new MVE builtins
framework.

gcc/ChangeLog:
	* config/arm/arm-mve-builtins-base.cc (enum which_scalar_shift):
	Add ss_UQRSHLL, ss_UQRSHLL_SAT48.
	(mve_function_scalar_shift): Add support for ss_UQRSHLL,
	ss_UQRSHLL_SAT48.
	* config/arm/arm-mve-builtins-base.def (uqrshll, uqrshll_sat48):
	New.
	* config/arm/arm-mve-builtins-base.h (uqrshll, uqrshll_sat48):
	New.
	* config/arm/arm_mve.h (uqrshll): Delete.
	(uqrshll_sat48): Delete.
	(__arm_uqrshll): Delete.
	(__arm_uqrshll_sat48): Delete.
	* config/arm/mve.md (mve_uqrshll_sat<supf>_di): Add '@' prefix.
powerboat9 and others added 27 commits November 17, 2025 18:41
ChangeLog:

	* .github/workflows/ccpp.yml: Update actions/upload-artifact
	from v3 to v4, handle any artifact name conflicts.
	* .github/workflows/ccpp32alpine.yml: Likewise.

Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
Disable network access via 'unshare' in two CI workflows to catch issues
like PR119333 where importing polonius meant bootstrap tried to pull crates
from the internet.

ChangeLog:
	PR rust/119333

	* .github/workflows/bootstrap.yml: Disable network via 'unshare'.
	* .github/workflows/ccpp.yml: Ditto.
ChangeLog:

	* .github/glibcxx_ubuntu64b_log_expected_warnings: Change line number
	for warning from 2230 to 2236.
	* .github/log_expected_warnings: Likewise.
Bump clang-format version to 16. This is needed as upstream has updated
the config and clang-format 10 doesn't support it.

ChangeLog:
	* .github/workflows/clang-format.yml: Bump clang-format version.

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
ChangeLog:

	* .github/alpine_32bit_log_warnings: Adjust with latest warnings.
	* .github/glibcxx_ubuntu64b_log_expected_warnings: Likewise.
	* .github/log_expected_warnings: Likewise.

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
ChangeLog:

	* .github/workflows/ccpp.yml: Reenable macos runner, add some
	empty lines to improve formatting.

Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
This should make it easier for us to ignore warnings from outside the
rust front end, and therefore make it easier for us to pull from
upstream.

ChangeLog:

	* .github/alpine_32bit_log_warnings: Remove lines.
	* .github/glibcxx_ubuntu64b_log_expected_warnings: Likewise.
	* .github/log_expected_warnings: Likewise.
	* .github/workflows/ccpp.yml: Filter out non-rust warnings.
	* .github/workflows/ccpp32alpine.yml: Likewise and remove
	redundant command.
	* .github/safe-grep: New shell script.

Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
After previous change, removed the last warning from the
expected file.

ChangeLog:

	* .github/glibcxx_ubuntu64b_log_expected_warnings: Remove warning.
	* .github/log_expected_warnings: Likewise.

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
GitHub states it will be retiring macos-13 on the 14th of November.
Merging in a fork of GCC with arm64 support is ugly, but I'm not sure
how else to fix this.

ChangeLog:

	* .github/workflows/ccpp.yml: Use macos-15 instead of macos-13,
	manually specify prerequisite header locations, and merge in a
	fork of GCC with support for arm64.

Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
ChangeLog:

	* .github/workflows/ccpp.yml: Define author name and email while
	creating merge commit.

Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
… this

Change this formatting, so clang format stops formatting this wierd for me.

gcc/rust/ChangeLog:

	* typecheck/rust-tyty.cc (VariantDef::clone): remove template param
	(VariantDef::monomorphized_clone): likewise

Signed-off-by: Philip Herron <herron.philip@googlemail.com>
This reverts commit a50fb38 as it breaks
gcc5 bootstrap.

gcc/rust/ChangeLog:

	* typecheck/rust-tyty.cc (VariantDef::clone): revert
	(VariantDef::monomorphized_clone): likewise

Signed-off-by: Philip Herron <herron.philip@googlemail.com>
I dont think this is really being used and its failing.

ChangeLog:

	* .github/workflows/docker.yml: Removed.

Signed-off-by: Philip Herron <herron.philip@googlemail.com>
ChangeLog:

	* .github/workflows/ccpp.yml: Change the commit to merge in from
	https://github.com/iains/gcc-darwin-arm64 and improve related
	comment.

Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
This new workflow is used to send emails to the gcc-patches@ mailing list
after every merged PR.

For each merged PR:
- remove commits touching files not to-be-upstreamed (e.g. github
workflow, README.md, ...)
- send a mail series

Each mail contains explanation + links to commits on the github project.

Authors of commits will be put in Cc: of emails.

Configure it by setting the following secrets in github:
- PATCH_TO: the "To:" field for the emails
- PATCH_CC: optional "Cc:"
- SMTP_FROM, SMTP_PASSWORD, SMTP_PORT, SMTP_SERVER, STMP_USERNAME: self explanatory

ChangeLog:

        * .github/workflows/send-emails.yml: New file.
Since f1982cc, we are using
clang-format-16 instead of clang-format-10. This commit updates the
clang-format version documented in CONTRIBUTING.md so that new
contributors don't get tripped.

ChangeLog:

	* CONTRIBUTING.md: Update clang-format version

Signed-off-by: Ryo Yoshida <low.ryoshida@gmail.com>
Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
It's really getting in the way. It needs special care to be in sync with
Iain's own rebased branch.

Until it is easier to use, remove it from our CI.

ChangeLog:

	* .github/workflows/ccpp.yml (build-and-check-clang-macos): Remove.

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
Only the password needs to be hidden. Makes the maitainance easier.

ChangeLog:

	* .github/workflows/send-emails.yml: Change secrets to vars.

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
Check if parser throw an error to avoid cloning nullptr

Fixes #4140

gcc/rust/ChangeLog:

	* expand/rust-macro-expand.cc (transcribe_expression): Check if
	parser didn't fail.
	(transcribe_type): Likewise.
	(transcribe_pattern): Likewise.

Signed-off-by: lenny.chiadmi-delage <lenny.chiadmi-delage@epita.fr>
Adds tests for testsuite.

Fixes #4140

gcc/testsuite/ChangeLog:

	* rust/compile/issue-4140-1.rs: New test.
	* rust/compile/issue-4140-2.rs: Likewise.

Signed-off-by: lenny.chiadmi-delage <lenny.chiadmi-delage@epita.fr>
Fixes previously added tests.

Fixes #4140

gcc/testsuite/ChangeLog:

	* rust/compile/issue-4140-1.rs: Fixes test.
	* rust/compile/issue-4140-2.rs: Likewise.

Signed-off-by: lenny.chiadmi-delage <lenny.chiadmi-delage@epita.fr>
This should make it easier for us to move away from leaking pointers to
Bvariable everywhere. Since LocalVariable has a single field of type
tree, it should be the same size as a pointer to Bvariable, making the
switch to LocalVariable wherever possible strictly an improvement.

gcc/rust/ChangeLog:

	* backend/rust-compile-expr.cc (CompileExpr::visit): Implicitly
	convert LocalVariable to pointer to Bvariable.
	* rust-backend.h (local_variable): Return LocalVariable.
	(parameter_variable): Likewise.
	(static_chain_variable): Likewise.
	(temporary_variable): Likewise.
	* rust-gcc.cc (local_variable): Likewise.
	(parameter_variable): Likewise.
	(static_chain_variable): Likewise.
	(temporary_variable): Likewise.
	(LocalVariable::get_tree): New function.
	(LocalVariable::error_variable): Likewise.
	* rust-gcc.h (class LocalVariable): New class.

Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
gcc/rust/ChangeLog:

	* ast/rust-ast.cc (Attribute::check_cfg_predicate): Make error when attribute has no input.

gcc/testsuite/ChangeLog:

	* rust/compile/issue-4262.rs: New test.

Signed-off-by: Lucas Ly Ba <lucas.ly-ba@outlook.com>
This includes a program, written using flex and bison, to extract
information on unstable features from rustc source code and save it to a
header file.

The script does fetch files from https://github.com/rust-lang/rust (the
official rustc git repository), which should be alright, as it's only
intended to be run by maintainers.

See https://doc.rust-lang.org/unstable-book/ for information on unstable
features.

gcc/rust/ChangeLog:

	* checks/errors/feature/rust-feature-gate.cc
	(FeatureGate::gate): Handle removal of Feature::create.
	(FeatureGate::visit): Refer to AUTO_TRAITS as
	OPTIN_BUILTIN_TRAITS.
	* checks/errors/feature/rust-feature.cc (Feature::create):
	Remove.
	(Feature::feature_list): New static member variable.
	(Feature::name_hash_map): Use "rust-feature-defs.h" to define.
	(Feature::lookup): New member function definition.
	* checks/errors/feature/rust-feature.h (Feature::State): Add
	comments.
	(Feature::Name): Use "rust-feature-defs.h" to define.
	(Feature::as_string): Make const.
	(Feature::name): Likewise.
	(Feature::state): Likewise.
	(Feature::issue): Likewise.
	(Feature::description): Remove member function declaration.
	(Feature::create): Remove static member function declaration.
	(Feature::lookup): New member function declarations.
	(Feature::Feature): Adjust arguments.
	(Feature::m_rustc_since): Rename to...
	(Feature::m_rust_since): ...here.
	(Feature::m_description): Remove.
	(Feature::m_reason): New member variable.
	(Feature::feature_list): New static member variable.
	* checks/errors/feature/rust-feature-defs.h: New file.
	* checks/errors/feature/contrib/parse.y: New file.
	* checks/errors/feature/contrib/scan.l: New file.
	* checks/errors/feature/contrib/.gitignore: New file.
	* checks/errors/feature/contrib/Makefile: New file.
	* checks/errors/feature/contrib/fetch: New file.
	* checks/errors/feature/contrib/regen: New file.
	* checks/errors/feature/contrib/copyright-stub.h: New file.
	* checks/errors/feature/contrib/README: New file.

Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
gcc/rust/ChangeLog:

	* backend/rust-compile-expr.cc (compile_float_literal): Add is_negative
	check to compile negative float literals properly.
	* backend/rust-compile-pattern.cc (CompilePatternCheckExpr::visit(RangePattern)):
	Minor optimization to E0579 checks to reduce memory copy.

Signed-off-by: Yap Zhi Heng <yapzhhg@gmail.com>
…se/2025-11-17

This branch has a no-op merge as the last commit:
 - one arm is the "current" development branch from github
 - the other arm is a rebased version of the "current" master branch onto a recent GCC's master

The merge is obtained with "git merge --strategy=ours" to only keep the changes from second arm.
@dkm
Copy link
Member Author

dkm commented Nov 18, 2025

                === rust Summary ===                                                  │                === rust Summary ===
                                                                                      │
# of expected passes            10470                                                 │# of expected passes            10470
# of expected failures          74                                                    │# of expected failures          74
# of unsupported tests          7                                                     │# of unsupported tests          7

Looks correct (rebased upstream branch / current master)

@dkm
Copy link
Member Author

dkm commented Nov 18, 2025

ah, something went in, I've been too slow.

@dkm dkm closed this Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.