Sync with upstream (2026-04-29): c392d64098cc675c804ff4f516548d023a4fe29a #4539
Merged
Conversation
The last patch made me try also pointer arithmetics on incomplete type. And here we ICE before actually diagnosing the error because we try to dereference element_size. Furthermore, TYPE_SIZE_UNIT (element_type) is in sizetype, so we shouldn't use build_one_cst (size_type_node) for the void * case, but size_one_node (aka size_int (1)). 2026-04-22 Jakub Jelinek <jakub@redhat.com> PR sanitizer/124969 * c-typeck.cc (build_access_with_size_for_counted_by): Use size_one_node instead of build_one_cst (size_type_node). Punt if element_size is NULL_TREE. * gcc.dg/ubsan/pr124969-2.c: New test. Reviewed-by: Marek Polacek <polacek@redhat.com>
The while (*templ != '\n' || *templ != '\0') ++templ; loop is due to a wrong logical operator an endless loop, so clearly we don't have any // comments in the new syntax *.md files that are using it in the relevant parts of the patterns. Fixed by using && instead. 2026-04-22 Jakub Jelinek <jakub@redhat.com> PR middle-end/124971 * gensupport.cc (convert_syntax): Fix up // comment handling. Reviewed-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
…ssues. This covers issue affecting pre-C+26 features that were resolved during 2026 Croydon meeting. libstdc++-v3/ChangeLog: * include/bits/chrono_io.h: Add comment for LWG3831. * include/bits/print.h: Add comment for LWG4549. * include/std/condition_variable: Add comment for LWG3504. * include/std/format: Add comments for LWG4522. * include/std/mdspan: Add comment for LWG4314. * include/std/optional: Add comment for LWG2746. Reviewed-by: Jonathan Wakely <jwakely@redhat.com> Signed-off-by: Tomasz Kamiński <tkaminsk@redhat.com>
This makes the deduction guide accepting data_handle_type, mapping and accessor consistent with corresponding constructor. Resolves LWG4511. libstdc++-v3/ChangeLog: * include/std/mdspan (mdspan): Remove reference from _AccessorType::data_handle_type parameteter of deduction guide. * testsuite/23_containers/mdspan/mdspan.cc: New test. Reviewed-by: Jonathan Wakely <jwakely@redhat.com> Signed-off-by: Tomasz Kamiński <tkaminsk@redhat.com>
We should only be using VLD1/VST1 instructions when we have an auto-inc address of some suitable form and only when we have NEON_FP16INST. At other times we should just use VLDR/VSTR. This ensures that the code will assemble on targets that lack Advanced SIMD. Also correct the constraint so that we can use offset addressing on platforms that also have Neon. gcc/ChangeLog: PR target/124933 * config/arm/constraints.md (Uj): Allow offset addressing for all targets, only allow Neon addressing when we have both Neon and FP16INST. * config/arm/vfp.md (mov<mode>_vfp_<mode>16): Only use vld1/vst1 when the pattern needs address write-back. gcc/testsuite/ChangeLog: PR target/124933 * lib/target-supports.exp (v8_1m_main_fp_hard): New arm architecture variant. * gcc.target/arm/pr124933.c: New test. * gcc.target/arm/armv8_2-fp16-move-1.c: Update expected output.
…igned. This implements LWG4290. Missing Mandates clauses on is_sufficiently_aligned. libstdc++-v3/ChangeLog: * include/bits/align.h (is_sufficiently_aligned): Mandate that _Align is power of two. * testsuite/20_util/is_sufficiently_aligned/2_neg.cc: New test. Reviewed-by: Jonathan Wakely <jwakely@redhat.com> Signed-off-by: Tomasz Kamiński <tkaminsk@redhat.com>
On targets that use short enums, this test produces different output since the fold optimization does not apply to sizes smaller than a word. Adjust the expected results until such time as this optimization can be expanded to support shorter input values. gcc/testsuite/ChangeLog: PR tree-optimization/124909 * gcc.dg/match-shift-cmp-3.c: Adjust expected results for target short_enums.
Both __cpp_impl_reflection and __cpp_lib_reflection were increased from 202506L to 202603L post Croydon, I assume to show that P3795R2 (maybe some issues too) have been implemented. Now, we do implement P3795R2 except for the is_applicable_type, is_nothrow_applicable_type and apply_result metafunctions, but Jonathan says there is agreement in LWG that to test for availability of those one should test __cpp_lib_reflection >= 202603L && __cpp_lib_apply >= 202603L. So, this patch bumps both FTMs. 2026-04-22 Jakub Jelinek <jakub@redhat.com> gcc/c-family/ * c-cppbuiltin.cc (c_cpp_builtins): Bump __cpp_impl_reflection value from 202506L to 202603L. gcc/testsuite/ * g++.dg/DRs/dr2581-2.C: Adjust for __cpp_impl_reflection bump from 202506L to 202603L. * g++.dg/reflect/feat1.C: Likewise. Also adjust for __cpp_lib_reflection bump from 202506L to 202603L. * g++.dg/reflect/feat2.C: Likewise. * g++.dg/reflect/feat3.C: Likewise. libstdc++-v3/ * include/bits/version.def (reflection): Bump 202506L to 202603L for both v and in extra_cond. * include/bits/version.h: Regenerate. * include/std/meta: Compare __glibcxx_reflection against 202603L rather than 202506L. * src/c++23/std.cc.in: Likewise. Reviewed-by: Jason Merrill <jason@redhat.com> Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
2026-04-22 Jakub Jelinek <jakub@redhat.com> * BASE-VER: Change from 16.0.1 to 17.0.0.
2026-04-22 Jakub Jelinek <jakub@redhat.com> maintainer-scripts/ * crontab: Snapshots from trunk are now GCC 17 related. Add GCC 16 snapshots from the respective branch. contrib/ * gcc-changelog/git_update_version.py (active_refs): Add releases/gcc-16.
gcc/ada/ChangeLog * gnatvsn.ads: Bump Library_Version to 17. Bump Current_Year to 2026.
svld1rq is a replicated-quadword load: it loads 16 bytes and replicates them to fill the SVE register. When -msve-vector-bits=128 the instruction can be folded to a normal load. The GIMPLE fold for svld1rq transforms the intrinsic into a 128-bit memory load followed by a VEC_PERM_EXPR that replicates the loaded value. When VL == 128, the VEC_PERM_EXPR becomes an identity permutation. The checking assertion that validates the permutation (can_vec_perm_const_p) fails for this degenerate case because the vec_perm_const hook does not recognise the cross-mode identity permutation (e.g. V16QI -> VNx16QI). Fix by detecting when the SVE vector has the same number of elements as the 128-bit quadword (known_eq (lhs_len, source_nelts)) and emitting a VIEW_CONVERT_EXPR instead of a VEC_PERM_EXPR. Bootstrapped and tested on aarch64-none-linux-gnu. Signed-off-by: Kyrylo Tkachov <ktkachov@nvidia.com> gcc/ChangeLog: PR target/124908 * config/aarch64/aarch64-sve-builtins-base.cc (svld1rq_impl::fold): When the SVE vector length equals the quadword width, emit VIEW_CONVERT_EXPR instead of VEC_PERM_EXPR. gcc/testsuite/ChangeLog: PR target/124908 * gcc.target/aarch64/sve/acle/general/ld1rq_2.c: New test.
Adding a trailing directory separator should arguably not change the result of a call to Ada.Directories.Containing_Directory. gcc/ada/ PR ada/85766 * libgnat/a-direct.adb (Containing_Directory): Streamline and strip a trailing directory separator from the name. gcc/testsuite/ * gnat.dg/directory1.adb: New test.
Also replace unspec_volatile with plain unspec - there no need to prevent dead code elimination if the dependencies are correct. gcc/ChangeLog: * config/aarch64/aarch64-sme.md (aarch64_sme_write_zt): Add ZTO_REGNUM use and make unspec non-volatile. gcc/testsuite/ChangeLog: * gcc.target/aarch64/sme/zt0_state_8.c: New test.
In the INACTIVE_CALLER -> INACTIVE LOCAL transition, ensure ZA is active and zeroed before setting tpidr2_el0. gcc/ChangeLog: PR target/119210 * config/aarch64/aarch64.cc (aarch64_mode_emit_local_sme_state): Add PSTATE.ZA enablement, and zero it if already enabled. gcc/testsuite/ChangeLog: PR target/119210 * gcc.target/aarch64/sme/za_state_8.c: New test.
I found a few typos and inconsistent variable names in mode switching comments and documentation. Fix them. gcc/ChangeLog: * config/aarch64/aarch64.cc (aarch64_mode_confluence): Fix comment typo. * target.def (mode_switching): Fix incorrect variable names in documentation. * doc/tm.texi: Regenerate.
Explain why aarch64_start_call_args only needs to save and restore zt0 if the callee shares ZA state. gcc/ChangeLog: * config/aarch64/aarch64.cc (aarch64_start_call_args): Extend comment.
I found this output useful while debugging some incorrect codegen. gcc/ChangeLog: * mode-switching.cc (optimize_mode_switching): Add dump output.
These tests were configured to try assembling whenever the assembler supports sme2. Add dg-do directives to restrict this assemblers that support sme-lutv2 (and otherwise just compile the test). gcc/testsuite/ChangeLog: * gcc.target/aarch64/sme2/acle-asm/svluti4_zt_1.c: Add dg-do. * gcc.target/aarch64/sme2/acle-asm/svwrite_lane_zt_1.c: Ditto. * gcc.target/aarch64/sme2/acle-asm/svwrite_zt_1.c: Ditto. * lib/target-supports.exp: Add sme-lutv2 to exts_sve2.
Now that we support enabling +sme without +sve2, we no longer need to include armv9-a when checking assembler support for SME extensions. Merge exts_sve2 back into exts, and remove the separate handling for exts_sve2. This is a partial revert of r16-2660-g9793ffce933234. gcc/testsuite/ChangeLog: * lib/target-supports.exp: Merge exts_sve2 handling into exts.
Make the ieee directory use dg-* annotations instead of separate test setup files gcc/testsuite/ChangeLog: * gcc.c-torture/execute/ieee/ieee.exp: Replace with slightly adapted copy of execute/execute.exp. * gcc.c-torture/execute/ieee/20000320-1.c: Port to the new format. * gcc.c-torture/execute/ieee/20001122-1.c: Likewise. * gcc.c-torture/execute/ieee/20010114-2.c: Likewise. * gcc.c-torture/execute/ieee/20010226-1.c: Likewise. * gcc.c-torture/execute/ieee/20011123-1.c: Likewise. * gcc.c-torture/execute/ieee/20030331-1.c: Likewise. * gcc.c-torture/execute/ieee/20041213-1.c: Likewise. * gcc.c-torture/execute/ieee/920518-1.c: Likewise. * gcc.c-torture/execute/ieee/920810-1.c: Likewise. * gcc.c-torture/execute/ieee/930529-1.c: Likewise. * gcc.c-torture/execute/ieee/980619-1.c: Likewise. * gcc.c-torture/execute/ieee/acc1.c: Likewise. * gcc.c-torture/execute/ieee/acc2.c: Likewise. * gcc.c-torture/execute/ieee/builtin-nan-1.c: Likewise. * gcc.c-torture/execute/ieee/cdivchkd.c: Likewise. * gcc.c-torture/execute/ieee/cdivchkf.c: Likewise. * gcc.c-torture/execute/ieee/cdivchkld.c: Likewise. * gcc.c-torture/execute/ieee/compare-fp-1.c: Likewise. * gcc.c-torture/execute/ieee/compare-fp-2.c: Likewise. * gcc.c-torture/execute/ieee/compare-fp-3.c: Likewise. * gcc.c-torture/execute/ieee/compare-fp-4.c: Likewise. * gcc.c-torture/execute/ieee/copysign1.c: Likewise. * gcc.c-torture/execute/ieee/copysign2.c: Likewise. * gcc.c-torture/execute/ieee/fp-cmp-1.c: Likewise. * gcc.c-torture/execute/ieee/fp-cmp-2.c: Likewise. * gcc.c-torture/execute/ieee/fp-cmp-3.c: Likewise. * gcc.c-torture/execute/ieee/fp-cmp-4.c: Likewise. * gcc.c-torture/execute/ieee/fp-cmp-4e.c: Likewise. * gcc.c-torture/execute/ieee/fp-cmp-4f.c: Likewise. * gcc.c-torture/execute/ieee/fp-cmp-4l.c: Likewise. * gcc.c-torture/execute/ieee/fp-cmp-5.c: Likewise. * gcc.c-torture/execute/ieee/fp-cmp-6.c: Likewise. * gcc.c-torture/execute/ieee/fp-cmp-7.c: Likewise. * gcc.c-torture/execute/ieee/fp-cmp-8.c: Likewise. * gcc.c-torture/execute/ieee/fp-cmp-8e.c: Likewise. * gcc.c-torture/execute/ieee/fp-cmp-8f.c: Likewise. * gcc.c-torture/execute/ieee/fp-cmp-8l.c: Likewise. * gcc.c-torture/execute/ieee/fp-cmp-9.c: Likewise. * gcc.c-torture/execute/ieee/fp-cmp-cond-1.c: Likewise. * gcc.c-torture/execute/ieee/hugeval.c: Likewise. * gcc.c-torture/execute/ieee/inf-1.c: Likewise. * gcc.c-torture/execute/ieee/inf-2.c: Likewise. * gcc.c-torture/execute/ieee/inf-3.c: Likewise. * gcc.c-torture/execute/ieee/inf-4.c: Likewise. * gcc.c-torture/execute/ieee/minuszero.c: Likewise. * gcc.c-torture/execute/ieee/mul-subnormal-single-1.c: Likewise. * gcc.c-torture/execute/ieee/mzero2.c: Likewise. * gcc.c-torture/execute/ieee/mzero3.c: Likewise. * gcc.c-torture/execute/ieee/mzero4.c: Likewise. * gcc.c-torture/execute/ieee/mzero5.c: Likewise. * gcc.c-torture/execute/ieee/mzero6.c: Likewise. * gcc.c-torture/execute/ieee/pr108540-1.c: Likewise. * gcc.c-torture/execute/ieee/pr108540-2.c: Likewise. * gcc.c-torture/execute/ieee/pr109008.c: Likewise. * gcc.c-torture/execute/ieee/pr109386.c: Likewise. * gcc.c-torture/execute/ieee/pr119002.c: Likewise. * gcc.c-torture/execute/ieee/pr28634.c: Likewise. * gcc.c-torture/execute/ieee/pr29302-1.c: Likewise. * gcc.c-torture/execute/ieee/pr30704.c: Likewise. * gcc.c-torture/execute/ieee/pr36332.c: Likewise. * gcc.c-torture/execute/ieee/pr38016.c: Likewise. * gcc.c-torture/execute/ieee/pr50310.c: Likewise. * gcc.c-torture/execute/ieee/pr67218.c: Likewise. * gcc.c-torture/execute/ieee/pr72824-2.c: Likewise. * gcc.c-torture/execute/ieee/pr72824.c: Likewise. * gcc.c-torture/execute/ieee/pr84235.c: Likewise. * gcc.c-torture/execute/ieee/rbug.c: Likewise. * gcc.c-torture/execute/ieee/unsafe-fp-assoc-1.c: Likewise. * gcc.c-torture/execute/ieee/unsafe-fp-assoc.c: Likewise. * gcc.c-torture/execute/ieee/20000320-1.x: Removed. * gcc.c-torture/execute/ieee/920810-1.x: Removed. * gcc.c-torture/execute/ieee/980619-1.x: Removed. * gcc.c-torture/execute/ieee/cdivchkd.x: Removed. * gcc.c-torture/execute/ieee/cdivchkf.x: Removed. * gcc.c-torture/execute/ieee/cdivchkld.x: Removed. * gcc.c-torture/execute/ieee/compare-fp-3.x: Removed. * gcc.c-torture/execute/ieee/compare-fp-4.x: Removed. * gcc.c-torture/execute/ieee/fp-cmp-1.x: Removed. * gcc.c-torture/execute/ieee/fp-cmp-2.x: Removed. * gcc.c-torture/execute/ieee/fp-cmp-3.x: Removed. * gcc.c-torture/execute/ieee/fp-cmp-4.x: Removed. * gcc.c-torture/execute/ieee/fp-cmp-4f.x: Removed. * gcc.c-torture/execute/ieee/fp-cmp-4l.x: Removed. * gcc.c-torture/execute/ieee/fp-cmp-6.x: Removed. * gcc.c-torture/execute/ieee/fp-cmp-7.x: Removed. * gcc.c-torture/execute/ieee/fp-cmp-9.x: Removed. * gcc.c-torture/execute/ieee/hugeval.x: Removed. * gcc.c-torture/execute/ieee/mul-subnormal-single-1.x: Removed. * gcc.c-torture/execute/ieee/mzero2.x: Removed. * gcc.c-torture/execute/ieee/pr108540-1.x: Removed. * gcc.c-torture/execute/ieee/pr29302-1.x: Removed. * gcc.c-torture/execute/ieee/pr30704.x: Removed. * gcc.c-torture/execute/ieee/pr38016.x: Removed. * gcc.c-torture/execute/ieee/rbug.x: Removed. * gcc.c-torture/execute/ieee/unsafe-fp-assoc-1.x: Removed.
Move tests for signaling floats to ieee directory gcc/testsuite/ChangeLog: * gcc.dg/torture/builtin-issignaling-1.c: Move to... * gcc.c-torture/execute/ieee/builtin-issignaling-1.c: ...here. * gcc.dg/torture/bfloat16-builtin-issignaling-1.c: Move to... * gcc.c-torture/execute/ieee/bfloat16-builtin-issignaling-1.c: ...here. * gcc.dg/torture/float128-builtin-issignaling-1.c: Move to... * gcc.c-torture/execute/ieee/float128-builtin-issignaling-1.c: ...here. * gcc.dg/torture/float128x-builtin-issignaling-1.c: Move to... * gcc.c-torture/execute/ieee/float128x-builtin-issignaling-1.c: ...here. * gcc.dg/torture/float16-builtin-issignaling-1.c: Move to... * gcc.c-torture/execute/ieee/float16-builtin-issignaling-1.c: ...here. * gcc.dg/torture/float32-builtin-issignaling-1.c: Move to... * gcc.c-torture/execute/ieee/float32-builtin-issignaling-1.c: ...here. * gcc.dg/torture/float32x-builtin-issignaling-1.c: Move to... * gcc.c-torture/execute/ieee/float32x-builtin-issignaling-1.c: ...here. * gcc.dg/torture/float64-builtin-issignaling-1.c: Move to... * gcc.c-torture/execute/ieee/float64-builtin-issignaling-1.c: ...here. * gcc.dg/torture/float64x-builtin-issignaling-1.c: Move to... * gcc.c-torture/execute/ieee/float64x-builtin-issignaling-1.c: ...here.
Make floating point test compile on platforms without FE_UPWARD gcc/testsuite/ChangeLog: * gcc.dg/torture/fp-double-convert-float-1.c: Move declaration before the #ifdef
Add missing dg-require-effective-target gcc/testsuite/ChangeLog: * c-c++-common/Wdangling-pointer-9.c: Reqiure label_values. * c-c++-common/analyzer/computed-goto-1.c: Likewise. * c-c++-common/analyzer/pr102695.c: Likewise. * c-c++-common/attr-used-7.c: Likewise. * c-c++-common/attr-used-8.c: Likewise. * c-c++-common/attr-used-9.c: Likewise. * gcc.dg/analyzer/boxed-malloc-1.c: Likewise. * gcc.dg/analyzer/computed-goto-pr110529.c: Likewise. * gcc.dg/analyzer/malloc-1.c: Likewise. * gcc.dg/pr106421.c: Likewise. * gcc.dg/pr110506.c: Likewise. * gcc.dg/pr122773.c: Likewise. * gcc.dg/torture/pr108076.c: Likewise. * gcc.c-torture/compile/pr120250.c: Likewise. * c-c++-common/analyzer/feasibility-3.c: Require named_sections. * c-c++-common/attr-used-5.c: Likewise. * c-c++-common/attr-used-6.c: Likewise. * g++.dg/charset/attribute1.c: Likewise. * gcc.dg/charset/attribute1.c: Likewise. * gcc.dg/pr116887.c: Likewise. * gcc.dg/pr83100-2.c: Likewise. * gcc.dg/pr83100-3.c: Likewise. * gcc.dg/pr87793.c: Likewise. * gcc.dg/special/gcsec-1.c: Likewise. * gcc.dg/tls/data-sections-1.c: Likewise. * c-c++-common/analyzer/infinite-recursion-5.c: Require nonlocal_goto. * gcc.dg/Winfinite-recursion-2.c: Likewise. * gcc.dg/Winfinite-recursion.c: Likewise. * gcc.dg/pr97986-1.c: Likewise. * gcc.dg/pr101156.c: Likewise. * gcc.dg/callgraph-info-1.c: Require alias. * gcc.dg/plugin/diagnostic-test-paths-4.c: Require signal.
It's more common for us to say 'Warn on ...' directly, not 'This option ...'. gcc/ChangeLog: * doc/invoke.texi (-Walloca): Simplify phrasing. (-Walloca-larger-than=-): Ditto.
Consistently use a comma after 'In C' or 'In C++'. gcc/ChangeLog: * doc/invoke.texi: Write 'In C,' and 'In C++,' with a comma consistently.
gcc/ChangeLog: * doc/invoke.texi: Fix whitespace.
We usually don't say 'warning' after @option{-Wxyz}. gcc/ChangeLog: * doc/invoke.texi (-Waddress): Drop unnecessary 'warning'.
gcc/ChangeLog: * doc/invoke.texi (-Wduplicate-decl-specifier): Say 'a duplicate'.
gcc/ChangeLog: * doc/invoke.texi (-ffunction-cse): Add missing full stop.
Signed-off-by: MAHAD <mahadtxt@gmail.com> Signed-off-by: Zhang He <zhanghe9702@163.com> Co-authored-by: MAHAD <mahadtxt@gmail.com> Co-authored-by: Zhang He <zhanghe9702@163.com>
We are using github merge queues for some time now, instead of bors. Remove unmaintained files, and remove bors mentions. ChangeLog: * .github/bors_log_expected_warnings: Move to... * .github/log_expected_warnings: ...here. * .github/workflows/ccpp.yml: * .github/workflows/ccpp32alpine.yml: * CONTRIBUTING.md: * README.md: * .github/bors.toml: Removed. Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
For #2937. ChangeLog: * README.md (gccrs-workspace]): like-wise.
ChangeLog: * CONTRIBUTING.md: Fix invalid line length. * README.md: Likewise.
ChangeLog: * .github/ISSUE_TEMPLATE/bug_report.yml: New file. * .github/ISSUE_TEMPLATE/bug_report.md: Deleted old template. Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
ChangeLog: * README.md: Add fedora deps. Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@iki.fi>
Co-authored-by: Arthur Cohen <arthur.cohen@embecosm.com> Co-authored-by: Sam James <sam@gentoo.org> Co-authored-by: Owen Avery <powerboat9.gamer@gmail.com> Co-authored-by: Philip Herron <herron.philip@googlemail.com> Co-authored-by: Marc Poulhiès <dkm@kataplop.net> Signed-off-by: Philip Herron <herron.philip@googlemail.com> Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com> Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com> Signed-off-by: Marc Poulhiès <dkm@kataplop.net> Co-authored-by: Owen Avery <powerboat9.gamer@gmail.com> Co-authored-by: Marc Poulhiès <dkm@kataplop.net>
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/PR on the github
project.
Authors of commits will be put in Cc: of emails.
Configure it by setting the following secrets in github:
- SMTP_PASSWORD
And the following variables:
- 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.
Co-authored-by: Andrew V. Teylu <andrew.teylu@vector.com>
Signed-off-by: Andrew V. Teylu <andrew.teylu@vector.com>
Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
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>
ChangeLog: * .github/workflows/commit-format.yml: adjust grep. Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
Use dtolnay/rust-toolchain action to install rustc toolchain. Use a composite action for the various build/check on ubuntu. More cleanup possible (the 32/64bits builds could be simplified and only build 1 compiler and split the checks) ChangeLog: * .github/workflows/ccpp.yml: Refactor. * .github/actions/build-gcc/action.yml: New file. Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
ChangeLog: * README.md: Add Fedora WSL deps. Signed-off-by: Osama Albahrani <osalbahr@gmail.com>
We've had at least one case of mails not being sent because the commit log was so big that the $GH_EVENT var couldn't be expanded by the shell. Using envsubst avoids having the shell do the expansion. ChangeLog: * .github/workflows/send-emails.yml: use envsubst. Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
Fixes: #4503 gcc/rust/ChangeLog: * lang.opt (flag_name_resolution_2_0): Remove. * resolve/rust-name-resolver.cc: Remove include. Signed-off-by: Fisnik Hasani <opensource@fisnikhasani.com>
CompoundAssignmentExpr codegen was missing the final assignment statement when it was evaluated in a const context. gcc/rust/ChangeLog: * backend/rust-compile-expr.cc (CompileExpr::visit): Emit the missing assignment for CompoundAssignmentExpr. gcc/testsuite/ChangeLog: * rust/compile/const-compound-assignment.rs: New test. * rust/execute/const-compound-assignment.rs: New test. Signed-off-by: Islam-Imad <islamimad404@gmail.com>
the problem is cfg-strip emits an error for unstrippable expressions but doesn't mark the parent for strip, leaving a broken subtree for later passes to ICE on. gcc/rust/ChangeLog: * expand/rust-cfg-strip.cc (CfgStrip::visit): mark CallExpr for strip when function expression fails stripping. (CfgStrip::visit): mark ArrayIndexExpr for strip when array or index expression fails stripping. gcc/testsuite/ChangeLog: * rust/compile/issue-4167.rs: New test. Signed-off-by: Harishankar <harishankarpp7@gmail.com>
Look for Rust-GCC/gccrs#XXXXXX issue references (and only that) and expand them as github URLs in the email body. See #4529 ChangeLog: * .github/workflows/send-emails.yml: Expand github's issues references in sent emails.
gcc/rust/ChangeLog: * util/rust-attributes.cc (__definitions): Add entries for warn and deny attributes. Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
Fixes #3972. Trait functions without an explicit return type can have a null `return_type` in `TraitFunctionDecl`. When such declarations are copied, the copy constructor and assignment operator currently try to clone the return type unconditionally, and this can lead to an ICE. Handle this case by keeping `nullptr` when there is no return type to clone. Also add a regression test for the example from #3972. gcc/rust/ChangeLog: * hir/tree/rust-hir-item.cc (TraitFunctionDecl::TraitFunctionDecl): Handle null return types in copy constructor. (TraitFunctionDecl::operator=): Likewise. gcc/testsuite/ChangeLog: * rust/compile/issue-3972.rs: New test. Signed-off-by: lishin <lishin1008@gmail.com>
Assert macro handler was missing, insert a basic handler that desugars to a condition and a call to panic. gcc/rust/ChangeLog: * expand/rust-macro-builtins-log-debug.cc (MacroBuiltin::assert_handler): Add basic assert builtin macro handler. gcc/testsuite/ChangeLog: * rust/compile/assert_missing_panic.rs: New test. Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/rust/ChangeLog: * resolve/rust-forever-stack.h: Move declarations from ForeverStack to NRCtx, make most of the ForeverStack members public as it helps the Ctx a lot. * resolve/rust-forever-stack.hxx: Move implementation of resolve_path methods to NRCtx. * resolve/rust-name-resolution-context.h: Declare resolve_path methods. * resolve/rust-name-resolution-context.hxx: New file with resolve_path impls.
gcc/rust/ChangeLog: * resolve/rust-name-resolution-context.hxx: Do segment resolution in types NS for more correctness and correct behavior when later resolving paths that use imports and/or modules.
Number literal evaluation and suffix validation should be done after macro expansion, so we defer these to the parser phase. This preserves source fidelity for macro token trees. gcc/rust/ChangeLog: * ast/rust-ast-collector.cc (TokenCollector::visit): Update Token::make_int and Token::make_float calls to include suffix_start and IntegerLiteralBase::Decimal. * expand/rust-macro-builtins-location.cc (MacroBuiltin::column_handler): Pass string length and base to Token::make_int. (MacroBuiltin::line_handler): Likewise. * lex/rust-lex.cc (Lexer::parse_in_type_suffix): Rename to parse_in_suffix and return string instead of PrimitiveCoreType. (Lexer::parse_in_suffix): Remove underscore stripping to preserve source fidelity for macros. (Lexer::parse_in_exponent_part): Preserve '+' and '-' characters in the raw string. (Lexer::parse_in_decimal): Remove underscore stripping. (Lexer::parse_non_decimal_int_literal): Track suffix start index and pass literal base. (Lexer::parse_non_decimal_int_literals): Use IntegerLiteralBase enum values instead of raw integers. (Lexer::parse_decimal_int_or_float): Track suffix string length and pass base parameters to token creation. * lex/rust-lex.h: Update method signatures for suffix parsing. * lex/rust-token.h (enum class IntegerLiteralBase): New enum to represent numeric bases. * parse/rust-parse-impl-expr.hxx: use LiteralResolve functions to evaluate raw token strings. * parse/rust-parse-impl-pattern.hxx: Use evaluated literal strings for INT and FLOAT tokens. * parse/rust-parse.cc (resolve_literal_suffix): Move suffix validation logic from lexer to parser. (evaluate_integer_literal): New function to strip underscores and convert to decimal via GMP. (evaluate_float_literal): New function to strip underscores from floats. * parse/rust-parse.h (evaluate_integer_literal): Declare in LiteralResolve namespace. (evaluate_float_literal): Likewise. (resolve_literal_suffix): Likewise. * util/rust-token-converter.cc (from_literal): Safely reconstruct raw text and suffix to dynamically determine base and suffix_start for ProcMacros. gcc/testsuite/ChangeLog: * rust/compile/deferred-suffix-validation.rs: New test. * rust/compile/evaluate-integer-or-float.rs: New test. * rust/compile/tuple-index.rs: New test. Signed-off-by: Enes Cevik <nsvke@proton.me>
…se/2026-04-29 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.
Member
Author
Reason for the difference comes from c10e306 that has been applied upstream only (the gccrs/master ref doesn't have it). So the diff is expected and merging the sync will apply the fix |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a sync with upstream GCC:
upstream GCC revision: c392d64
gccrs github: b89cf0b
-- gerris 🦀