[committed] libstdc++: Add missing export for std::is_layout_compatible_v [PR120159]

2025-05-07 Thread Jonathan Wakely
libstdc++-v3/ChangeLog: PR libstdc++/120159 * src/c++23/std.cc.in (is_layout_compatible_v): Export. --- Tested x86_64-linux. Pushed to trunk and gcc-15. libstdc++-v3/src/c++23/std.cc.in | 1 + 1 file changed, 1 insertion(+) diff --git a/libstdc++-v3/src/c++23/std.cc.in b/libstd

[to-be-committed][RISC-V][PR target/120137] Don't create out-of-range permutation constants

2025-05-07 Thread Jeff Law
To make hashing sensible we canonicalize constant vectors in the hash table so that their first entry always has the value zero. That normalization can result in a value that can't be represented in the element mode. So before entering anything into the hash table we need to verify the nor

[committed] libgomp.fortran/map-alloc-comp-9{,-usm}.f90: Add unified_shared_memory variant

2025-05-07 Thread Tobias Burnus
Committed asr16-445-g9565076f9b8105. This test supports mapping + accessing the vtab of the polymorphic variable on the host. Obviously, this only works if the host pointer is device accessible ("unified-shared memory"). In principle, we want to check for this - and enable some sub

[committed] libstdc++: Fix module std export for std::extents

2025-05-07 Thread Jonathan Wakely
libstdc++-v3/ChangeLog: * src/c++23/std.cc.in: Fix export for std::extents. --- Lightly tested x86_64-linux. Pushed to trunk. libstdc++-v3/src/c++23/std.cc.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libstdc++-v3/src/c++23/std.cc.in b/libstdc++-v3/src/c++23/std.cc.in index

[COMMITTED,PATCH] s390: Add cstoreti4 expander

2025-05-07 Thread Stefan Schulze Frielinghaus
For target VXE3 just emit a 128-bit comparison followed by a conditional load. For targets prior VXE3, emulate the 128-bit comparison and make use of a conditional load, too. gcc/ChangeLog: * config/s390/s390-protos.h (s390_expand_cstoreti4): New function. * config/s390/s

[committed] libstdc++: Remove use of undefined GLIBCXX_LANG_{PUSH, POP} [PR120147]

2025-05-07 Thread Jonathan Wakely
Commit r16-427-g86627faec10da5 was using the new GLIBCXX_LANG_PUSH and GLIBCXX_LANG_POP macros from a change that I haven't pushed yet, resulting in changes to CXXFLAGS not being restored after the GLIBCXX_ENABLE_BACKTRACE checks. libstdc++-v3/ChangeLog: PR libstdc++/120147 * acin

[to-be-committed][RISC-V] Avoid unnecessary andi with -1 argument

2025-05-06 Thread Jeff Law
I was preparing to do some testing of Shreya's next patch on spec and stumbled across another "andi dst,src,-1" case. I fixed some stuff like this in the gcc-15 cycle, but this one slipped through. It's probably about 100M instructions on deepsjeng. So tiny, but there's no good reason to lea

Re: [committed v2] libstdc++: Fix dangling pointer in fs::path::operator+=(*this) [PR120029]

2025-05-06 Thread Tomasz Kaminski
On Tue, May 6, 2025 at 6:48 PM Jonathan Wakely wrote: > When concatenating a path we reallocate the left operand's storage to > make room for the new components being added. When the two operands are > the same object, or the right operand is one of the components of the > left operand, the reall

[committed v2] libstdc++: Fix dangling pointer in fs::path::operator+=(*this) [PR120029]

2025-05-06 Thread Jonathan Wakely
When concatenating a path we reallocate the left operand's storage to make room for the new components being added. When the two operands are the same object, or the right operand is one of the components of the left operand, the reallocation invalidates the pointers that refer into the right opera

[committed] libstdc++: Fix -Wmismatched-tags warnings for _Safe_iterator [PR120112]

2025-05-06 Thread Jonathan Wakely
This causes an ICE as shown in the PR, but it should be fixed in the library code anyway. libstdc++-v3/ChangeLog: PR c++/120112 * include/bits/ptr_traits.h (_Safe_iterator_base): Use class keyword in class-head of declaration. * include/debug/debug.h (_Safe_iterato

[committed v2] libstdc++: Rewrite atomic builtin checks [PR70560]

2025-05-06 Thread Jonathan Wakely
Currently the GLIBCXX_ENABLE_ATOMIC_BUILTINS macro checks for a variety of __atomic built-ins for bool, short and int. If all those checks pass, then it defines _GLIBCXX_ATOMIC_BUILTINS and uses the definitions from config/cpu/generic/atomicity_builtins/atomicity.h for the non-inline versions of __

Re: [to-be-committed][RISC-V][PR target/119971] Avoid losing shift count masking

2025-05-05 Thread Bernhard Reutner-Fischer
On 5 May 2025 20:42:34 CEST, Jeff Law wrote: diff --git a/gcc/testsuite/gcc.target/riscv/pr119971.c b/gcc/testsuite/gcc.target/riscv/pr119971.c new file mode 100644 index 000..c3f23b05ec3 --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/pr119971.c @@ -0,0 +1,24 @@ +/* { dg-do compile

[to-be-committed][RISC-V][PR middle-end/114512] Recognize more bext idioms for RISC-V

2025-05-05 Thread Jeff Law
This is Shreya's next chunk of work. When I was looking for good bugs for her to chase down I cam across PR114512. While the bug isn't necessarily a RISC-V specific bug, its testcases did show how we were failing to recognize certain bit extraction idioms and how the lispy nature of RTL allow

[to-be-committed][RISC-V][PR target/119971] Avoid losing shift count masking

2025-05-05 Thread Jeff Law
As is outlined in the PR, we have a few define_insn_and_split patterns which optimize away explicit masking of shift/bit positions when the masking matches what the hardware's behavior. A small number of those define_insn_and_split patterns generate a single instruction. It's fairly elegant i

[committed] testsuite: Link gcc.dg/lto/modref-2_0 with libm

2025-05-05 Thread John David Anglin
Tested on hppa64-hp-hpux11.11. Committed to trunk. Dave --- testsuite: Link gcc.dg/lto/modref-2_0 with libm 2025-05-05 John David Anglin gcc/testsuite/ChangeLog: PR testsuite/120085 * gcc.dg/lto/modref-2_0.c: Link test with libm. diff --git a/gcc/testsuite/gcc.dg/lto

[committed] i386: Fix comment typo on truncsfbf2 pattern

2025-05-05 Thread Jakub Jelinek
Hi! I've noticed a typo on the flag name, fixed thusly. Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk as obvious. 2025-05-05 Jakub Jelinek * config/i386/i386.md (truncsfbf2): Fix comment typo, unsafte -> unsafe. --- gcc/config/i386/i3

[V2][to-be-committed][RISC-V] Trivial permutation constant derivation

2025-05-04 Thread Jeff Law
This is a patch from late 2024 (just before stage1 freeze), but I never pushed hard to the change, and thus never integrated it. It's mostly unchanged except for updating insn in the hash table after finding an optimizable case. We were holding the deleted insn in the hash table rather than t

[to-be-committed][RISC-V] Adjust rvv tests after recent jump threading change

2025-05-04 Thread Jeff Law
[ Resending with RISC-V tag. ] Richi's jump threading patch is resulting in new jump threading opportunities triggering in various vsetvl related tests. When those new threading opportunities are realized on vector code we usually end up with a different number of vsetvls due to the inherent

[to-be-committed] Adjust rvv tests after recent jump threading change

2025-05-04 Thread Jeff Law
Richi's jump threading patch is resulting in new jump threading opportunities triggering in various vsetvl related tests. When those new threading opportunities are realized on vector code we usually end up with a different number of vsetvls due to the inherent block copying. At first I was a

[to-be-committed][RISC-V] Adjust testcases and finish register move costing fix

2025-05-03 Thread Jeff Law
The recent adjustment to more correctly cost register moves tripped a few testsuite regressions. I'm pretty torn on the thead test adjustments. But in reality they only worked because the register move costing was broken. So I've reverted the scan-asm part of those to a prior state for two o

[patch, wwwdocs, committed] Fix option name in gcc15/changes.html

2025-05-03 Thread Thomas Koenig
Hello world, I just committed the following patch after noticing that an option name was wrong in the gcc15/changes.html file. diff --git a/htdocs/gcc-15/changes.html b/htdocs/gcc-15/changes.html index d851a744..b442b8d9 100644 --- a/htdocs/gcc-15/changes.html +++ b/htdocs/gcc-15/changes.html

[committed] libstdc++: Make __gnu_test::default_init_allocator usable in constexpr

2025-05-02 Thread Jonathan Wakely
If we make this test allocator usable in constant expressions then we'll get an error if the 'state' data member isn't initialized. This makes it a more reliable check that allocators are correctly value-initialized when they're required to be. libstdc++-v3/ChangeLog: * testsuite/23_conta

[committed] libstdc++: Add some more makefile dependencies

2025-05-02 Thread Jonathan Wakely
Add more prerequisites for wchar and dual-abi targets in the src/c++11 directory, and simplify the existing ones (we don't need to add the main xxx.cc source file as a prerequisite of xxx.o because that's implicit, we only need to add the ones that Make can't determine on its own). Also add simila

[PATCH,COMMITTED] Document S/390 changes for GCC 15

2025-05-02 Thread Stefan Schulze Frielinghaus
--- htdocs/gcc-15/changes.html | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/htdocs/gcc-15/changes.html b/htdocs/gcc-15/changes.html index f112af58..d851a744 100644 --- a/htdocs/gcc-15/changes.html +++ b/htdocs/gcc-15/changes.html @@ -1295,7 +1295,28 @

[COMMITTED, OBVIOUS] OpenMP: Restore lost Fortran testcase for 'omp allocate'

2025-05-01 Thread Sandra Loosemore
Tobias asked me to push the attached patch on his behalf. I verified that the testcase still does pass on mainline. :-) -Sandra From 08ce1b9f6707e00089c4d77d2bb82963d531bb1d Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Thu, 1 May 2025 15:39:42 + Subject: [COMMITTED, OBVIOUS

[committed htdocs v2] bugs: improve "ABI changes" subsection

2025-05-01 Thread Sam James
C++ ABI for C++ standards with full support by GCC (rather than those marked as experimental per https://gcc.gnu.org/projects/cxx-status.html) should be stable. It's certainly not the case in 2025 that one needs a full world rebuild for C++ libraries using e.g. the default standard or any other sup

Re: [COMMITTED] PR tree-optimization/119712 - Always reflect lower bits from mask in subranges.

2025-04-30 Thread Andrew MacLeod
On 4/30/25 02:56, Richard Biener wrote: On Wed, Apr 30, 2025 at 12:00 AM Andrew MacLeod wrote: On 4/28/25 17:26, Andrew MacLeod wrote: I have committed this patch to trunk after bootstrap/regression testing again on trunk. I'll get to gcc14/15 once I flush the current queue. Andrew

Re: [COMMITTED] PR tree-optimization/119712 - Always reflect lower bits from mask in subranges.

2025-04-29 Thread Richard Biener
On Wed, Apr 30, 2025 at 12:00 AM Andrew MacLeod wrote: > > > On 4/28/25 17:26, Andrew MacLeod wrote: > > I have committed this patch to trunk after bootstrap/regression > > testing again on trunk. > > > > I'll get to gcc14/15 once I flush the current queue.

Re: [COMMITTED] PR tree-optimization/119712 - Always reflect lower bits from mask in subranges.

2025-04-29 Thread Andrew MacLeod
On 4/28/25 17:26, Andrew MacLeod wrote: I have committed this patch to trunk after bootstrap/regression testing again on trunk. I'll get to gcc14/15 once I flush the current queue. Andrew On 4/17/25 06:44, Richard Biener wrote: On Wed, Apr 16, 2025 at 10:55 PM Andrew MacLeod wrote:

[committed] d: Use __builtin_clear_padding for zeroing alignment holes after set

2025-04-29 Thread Iain Buclaw
tting zero padded was ARRAY_TYPEs, so now `__builtin_clear_padding' is used to fill in all alignment holes in constructed array literals where required. Bootstrapped and regression tested on x86_64-linux-gnu/-m32, committed to mainline. Regards, Iain. --- PR d/103044 gcc/d/ChangeLog:

[committed] libstdc++: Use no_stdname for make_obj_using_allocator feature test macro

2025-04-29 Thread Jonathan Wakely
This is a non-standard feature test macro only used internally, so use the new no_stdname property for it. libstdc++-v3/ChangeLog: * include/bits/version.def (make_obj_using_allocator): Use no_stdname. * include/bits/version.h: Regenerate. --- Tested x86_64-linux. Pushed

[COMMITTED] Do not overwrite relation in range_of_range_op.

2025-04-28 Thread Andrew MacLeod
When auditing the code, I noticed that gimple_range_fold::range_of_range_op was reusing a local variable when it shouldn't. It was picking up a relation between op1 and op2, and using that relation to assist in determining if there was a new relation being formed bet6ween LHS and op1/op2. I

[COMMITTED] Add lhs_op1 relation to pointer_plus.

2025-04-28 Thread Andrew MacLeod
When prange was split from irange, the functionality of lhs_op1_relation () did not get ported.   This means when we see:   ptr_2 = ptr_1 + 1 we do not get the relation ptr2 > ptr1 from the statement. This patch adds that functionality back, and is also good example of how to add new dispatch

[COMMITTED] PR tree-optimization/119712 - Always reflect lower bits from mask in subranges.

2025-04-28 Thread Andrew MacLeod
I have committed this patch to trunk after bootstrap/regression testing again on trunk. I'll get to gcc14/15 once I flush the current queue. Andrew On 4/17/25 06:44, Richard Biener wrote: On Wed, Apr 16, 2025 at 10:55 PM Andrew MacLeod wrote: This was a fun one! An actual bug, a

[COMMITTED ]Use the current Ranger cache when creating inferred ranges.

2025-04-28 Thread Andrew MacLeod
Last fall, infer range processing was adjusted to allow a query to be specified for something Jakub was working on.  During VRP folding there was an oversight, and ranger was not providing a query.   This results in contextual ranges being missed. This patch  corrects the oversight and passes

[COMMITTED] MAINTAINERS: Add my gcc.gnu.org username

2025-04-28 Thread Kwok Cheung Yeung
I committed this patch to add my gcc username to MAINTAINERS in accordance with the new format. Kwok Yeung From 45d82eb7b7389a7c668db29bf2d5ec4ed2bc4da0 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon, 28 Apr 2025 19:27:59 +0100 Subject: [PATCH] MAINTAINERS: Add my gcc.gnu.org

Re: [COMMITTED 09/42] gccrs: Add llvmInlineAsm node

2025-04-28 Thread Arthur Cohen
Hi, On 4/28/25 6:09 PM, Andrew Pinski wrote: On Mon, Apr 28, 2025 at 9:05 AM Andrew Pinski wrote: On Mon, Apr 28, 2025 at 8:48 AM wrote: From: Pierre-Emmanuel Patry InlineAsm node does not support memory clobbers. A few review on this. I think this should just be called extended rather

Re: [COMMITTED 09/42] gccrs: Add llvmInlineAsm node

2025-04-28 Thread Arthur Cohen
Hi Andrew, On 4/28/25 6:05 PM, Andrew Pinski wrote: On Mon, Apr 28, 2025 at 8:48 AM wrote: From: Pierre-Emmanuel Patry InlineAsm node does not support memory clobbers. A few review on this. I think this should just be called extended rather than referencing LLVM here. This node exists s

[COMMITTED 35/42] gccrs: Add pattern bindings

2025-04-28 Thread arthur . cohen
From: Pierre-Emmanuel Patry gcc/rust/ChangeLog: * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Add binding creation in visitor. * resolve/rust-late-name-resolver-2.0.h: Add function prototypes. * resolve/rust-name-resolution-context.h: Add binding context

Re: [COMMITTED 09/42] gccrs: Add llvmInlineAsm node

2025-04-28 Thread Andrew Pinski
On Mon, Apr 28, 2025 at 9:05 AM Andrew Pinski wrote: > > On Mon, Apr 28, 2025 at 8:48 AM wrote: > > > > From: Pierre-Emmanuel Patry > > > > InlineAsm node does not support memory clobbers. > > A few review on this. > I think this should just be called extended rather than referencing LLVM here.

[COMMITTED 42/42] gccrs: Fix narrowing conversion warnings

2025-04-28 Thread arthur . cohen
From: Owen Avery Fixes PR#119641 gcc/rust/ChangeLog: * checks/errors/borrowck/rust-bir-place.h (IndexVec::size_type): Add. (IndexVec::MAX_INDEX): Add. (IndexVec::size): Change the return type to the type of the internal value used by the index type.

[COMMITTED 33/42] gccrs: Add hash function for Identifiers

2025-04-28 Thread arthur . cohen
From: Pierre-Emmanuel Patry gcc/rust/ChangeLog: * ast/rust-ast.h: Add hash function. Signed-off-by: Pierre-Emmanuel Patry --- gcc/rust/ast/rust-ast.h | 13 + 1 file changed, 13 insertions(+) diff --git a/gcc/rust/ast/rust-ast.h b/gcc/rust/ast/rust-ast.h index 94585dc1344.

[COMMITTED 38/42] gccrs: Use specialized param visit function for params

2025-04-28 Thread arthur . cohen
From: Pierre-Emmanuel Patry This commit introduce a new public function to visit function parameters in the default visitor. It allows visitors derived from DefaultVisitor to override only a small part of the default visitor. gcc/rust/ChangeLog: * ast/rust-ast-visitor.cc (DefaultASTVisi

[COMMITTED 31/42] gccrs: Add fn_once and Sized lang items to the test

2025-04-28 Thread arthur . cohen
From: Pierre-Emmanuel Patry gcc/testsuite/ChangeLog: * rust/compile/multiple_bindings1.rs: Add missing lang items. Signed-off-by: Pierre-Emmanuel Patry --- .../rust/compile/multiple_bindings1.rs| 29 --- 1 file changed, 19 insertions(+), 10 deletions(-) diff -

Re: [COMMITTED 09/42] gccrs: Add llvmInlineAsm node

2025-04-28 Thread Andrew Pinski
On Mon, Apr 28, 2025 at 8:48 AM wrote: > > From: Pierre-Emmanuel Patry > > InlineAsm node does not support memory clobbers. A few review on this. I think this should just be called extended rather than referencing LLVM here. > > gcc/rust/ChangeLog: > > * ast/rust-ast-collector.cc (Token

[COMMITTED 27/42] gccrs: Remove error state for GenericArg

2025-04-28 Thread arthur . cohen
From: Pierre-Emmanuel Patry gcc/rust/ChangeLog: * ast/rust-ast-collector.cc (TokenCollector::visit): Remove error kind and change function call. * ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Change call name. * ast/rust-path.cc (ConstGenericParam::as_strin

[COMMITTED 37/42] gccrs: Remove passing test from exclusion list

2025-04-28 Thread arthur . cohen
From: Pierre-Emmanuel Patry gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: Remove passing test from exclusion list. Signed-off-by: Pierre-Emmanuel Patry --- gcc/testsuite/rust/compile/nr2/exclude | 2 -- 1 file changed, 2 deletions(-) diff --git a/gcc/testsuite/rust/compile/nr2

[COMMITTED 41/42] gccrs: Visit visibility in UseDeclaration

2025-04-28 Thread arthur . cohen
From: Pierre-Emmanuel Patry Default visitor should visit all it's children. gcc/rust/ChangeLog: * ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Visit visibility. Signed-off-by: Pierre-Emmanuel Patry --- gcc/rust/ast/rust-ast-visitor.cc | 1 + 1 file changed, 1 insertion(+) dif

[COMMITTED 39/42] gccrs: Completely duplicate path node

2025-04-28 Thread arthur . cohen
From: Pierre-Emmanuel Patry Both nodes had the same id, this led to a resolution conflict. gcc/rust/ChangeLog: * expand/rust-derive-clone.cc (DeriveClone::clone_enum_struct): Clone path to avoid using the same nodeid. gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude

[COMMITTED 28/42] gccrs: Prevent forward declaration in type parameters

2025-04-28 Thread arthur . cohen
From: Pierre-Emmanuel Patry gcc/rust/ChangeLog: * resolve/rust-default-resolver.cc (DefaultResolver::visit): Add visit function for TypeParam. * resolve/rust-default-resolver.h: Add function prototype. * resolve/rust-forever-stack.h: Add function to check for forw

[COMMITTED 40/42] gccrs: Some assorted tweaks and bug fixes

2025-04-28 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Visit the loop labels of WhileLetLoopExpr instances before visiting their scrutinee expressions. * resolve/rust-early-name-resolver-2.0.cc (Early::resolve_gl

[COMMITTED 23/42] gccrs: prealloc the initilizer vector

2025-04-28 Thread arthur . cohen
From: Philip Herron There are two cases when initilizing an array, this is the const context which means we need to build the array ctor, which means using lots of memory, its super inefficient because we are using a big wrapper over the GCC internals here but preallocating the vectors here cause

[COMMITTED 36/42] gccrs: Use stacked context for nested bindings.

2025-04-28 Thread arthur . cohen
From: Pierre-Emmanuel Patry Binding context may be stacked when a new binding group is introduced within a const expression. gcc/rust/ChangeLog: * resolve/rust-name-resolution-context.h: Use BindingLayer instead. * resolve/rust-name-resolution-context.cc (BindingLayer::BindingLa

[COMMITTED 30/42] gccrs: Change expected error output to match nr2

2025-04-28 Thread arthur . cohen
From: Pierre-Emmanuel Patry Name resolution 2.0 message describes the context around the unresolved items and should therefore be kept. gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: Remove test from exclusion list. * rust/compile/use_1.rs: Change expected output and remov

[COMMITTED 26/42] gccrs: Change error message to match expected test output

2025-04-28 Thread arthur . cohen
From: Pierre-Emmanuel Patry gcc/rust/ChangeLog: * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Change error message. gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: Remove passing test from exclusion list. Signed-off-by: Pierre-Emmanuel Patry --- gcc/ru

[COMMITTED 34/42] gccrs: Add binding context class

2025-04-28 Thread arthur . cohen
From: Pierre-Emmanuel Patry We need to differentiate bindings types, so the same binding cannot be reused multiple time in a product binding. gcc/rust/ChangeLog: * resolve/rust-name-resolution-context.h (struct Binding): Add Binding struct to differentiate Or and Product binding

[COMMITTED 22/42] gccrs: Fix ICE with empty generic arguments

2025-04-28 Thread arthur . cohen
From: Philip Herron We have an assertion when accessing generic args if there are any which is really useful so this adds the missing guards for the case where they are specified but empty. Fixes Rust-GCC#3649 gcc/rust/ChangeLog: * ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): ad

[COMMITTED 29/42] gccrs: Update generics9 expected error message

2025-04-28 Thread arthur . cohen
From: Pierre-Emmanuel Patry gcc/testsuite/ChangeLog: * rust/compile/generics9.rs: Change expected error message. * rust/compile/nr2/exclude: Remove test from exclusion list. Signed-off-by: Pierre-Emmanuel Patry --- gcc/testsuite/rust/compile/generics9.rs | 3 ++- gcc/testsuite

[COMMITTED 25/42] gccrs: nr2.0: Improve error handling

2025-04-28 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-early-name-resolver-2.0.cc (Early::build_import_mapping): Avoid outputting an "unresolved import" error if other errors are outputted during resolution. * resolve/rust-early-name-resolver-2.0.h (Early::re

[COMMITTED 32/42] gccrs: Add equality operator for identifiers

2025-04-28 Thread arthur . cohen
From: Pierre-Emmanuel Patry gcc/rust/ChangeLog: * ast/rust-ast.h: Add equality operator. Signed-off-by: Pierre-Emmanuel Patry --- gcc/rust/ast/rust-ast.h | 5 + 1 file changed, 5 insertions(+) diff --git a/gcc/rust/ast/rust-ast.h b/gcc/rust/ast/rust-ast.h index 55f178d782c..94585

[COMMITTED 21/42] gccrs: Adjust segment start position errors

2025-04-28 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-ast-resolve-path.cc (ResolvePath::resolve_path): Adjust error messages. * resolve/rust-ast-resolve-type.cc (ResolveRelativeTypePath::go): Likewise. * resolve/rust-forever-stack.hxx (check_leading_

[COMMITTED 18/42] gccrs: nr2.0: Remove unnecessary copy of Node

2025-04-28 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-forever-stack.hxx (ForeverStack::resolve_path): Pass instance of Node to lambda by reference instead of by value. Signed-off-by: Owen Avery --- gcc/rust/resolve/rust-forever-stack.hxx | 2 +- 1 file changed, 1 inserti

[COMMITTED 24/42] gccrs: nr2.0: Fix derive-debug1.rs

2025-04-28 Thread arthur . cohen
From: Owen Avery gcc/testsuite/ChangeLog: * rust/compile/derive-debug1.rs: Adjust a path. * rust/compile/nr2/exclude: Remove derive-debug1.rs. Signed-off-by: Owen Avery --- gcc/testsuite/rust/compile/derive-debug1.rs | 2 +- gcc/testsuite/rust/compile/nr2/exclude | 1 - 2

[COMMITTED 17/42] gccrs: Fix ICE in struct expressions

2025-04-28 Thread arthur . cohen
From: Philip Herron The error handling here was done long ago when we didnt know how to do any error handling very well. This removed bad fatal_errors and adds in some nice rich_location error diagnostics instead. Fixes Rust-GCC#3628 gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-

[COMMITTED 08/42] gccrs: Emit error with old asm syntax in new asm blocks

2025-04-28 Thread arthur . cohen
) { token = parser.peek_current_token (); + if (token->get_id () == COLON || token->get_id () == SCOPE_RESOLUTION) + { + rust_error_at ( + token->get_locus (), + "the legacy LLVM-style % syntax is no longer supported"); + return tl::un

[COMMITTED 19/42] gccrs: Add test case to show ice is fixed

2025-04-28 Thread arthur . cohen
From: Philip Herron Fixes Rust-GCC#3652 gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: nr2 does not error on the T it should require Self::T * rust/compile/issue-3652.rs: New test. Signed-off-by: Philip Herron --- gcc/testsuite/rust/compile/issue-3652.rs | 7 +++ g

[COMMITTED 13/42] gccrs: Add gimple test for black box intrinsic

2025-04-28 Thread arthur . cohen
From: Pierre-Emmanuel Patry gcc/testsuite/ChangeLog: * rust/compile/black_box.rs: New test. Signed-off-by: Pierre-Emmanuel Patry --- gcc/testsuite/rust/compile/black_box.rs | 28 + 1 file changed, 28 insertions(+) create mode 100644 gcc/testsuite/rust/compile/

[COMMITTED 20/42] gccrs: Fix ICE when handling case of unknown field in HIR::FieldAccess

2025-04-28 Thread arthur . cohen
From: Philip Herron We were wrongly adding the assertion that this must not be an enum but this is a pointless assertion we only care that there are variant in the ADT and if the field exists in the first variant. Fixes Rust-GCC#3581 gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-

[COMMITTED 10/42] gccrs: Parse and lower llvm asm node

2025-04-28 Thread arthur . cohen
From: Pierre-Emmanuel Patry Add a new HIR LlvmInlineAsm HIR node as well as some structures to represent it's options and operands. Lower AST::LlvmInlineAsm node to it and then create a tree from that node. gcc/rust/ChangeLog: * ast/rust-ast-collector.cc (TokenCollector::visit): Remove

[COMMITTED 07/42] gccrs: Add check for placeholder (infer) type in return position

2025-04-28 Thread arthur . cohen
From: Philip Herron It is not allowed to have a declared inference variable in the return position of a function as this may never get infered you need good points of truth. Ideally if we get a student for GSoC 25 we will get the Default Hir Visitor so that we can grab the HIR::InferredType locu

[COMMITTED 14/42] gccrs: Add test case to show issue is fixed

2025-04-28 Thread arthur . cohen
From: Philip Herron This was already fixed in: bb01719f0e1 but we require fn_once lang item to be defined as we are working on libcore support still. Fixes Rust-GCC#3711 gcc/testsuite/ChangeLog: * rust/compile/issue-3711.rs: New test. Signed-off-by: Philip Herron --- gcc/testsuite/r

[COMMITTED 15/42] gccrs: Add test case to show ICE is fixed

2025-04-28 Thread arthur . cohen
From: Philip Herron Fixes Rust-GCC#3662 gcc/testsuite/ChangeLog: * rust/compile/issue-3662.rs: New test. Signed-off-by: Philip Herron --- gcc/testsuite/rust/compile/issue-3662.rs | 8 1 file changed, 8 insertions(+) create mode 100644 gcc/testsuite/rust/compile/issue-3662.r

[COMMITTED 12/42] gccrs: Add execute test for black_box intrinsic

2025-04-28 Thread arthur . cohen
From: Pierre-Emmanuel Patry gcc/testsuite/ChangeLog: * rust/execute/black_box.rs: New test. Signed-off-by: Pierre-Emmanuel Patry --- gcc/testsuite/rust/execute/black_box.rs | 30 + 1 file changed, 30 insertions(+) create mode 100644 gcc/testsuite/rust/execute/

[COMMITTED 05/42] gccrs: Fix crash in hir dump as labels are optional

2025-04-28 Thread arthur . cohen
From: Philip Herron gcc/rust/ChangeLog: * hir/rust-hir-dump.cc (Dump::visit): add guard for optional label Signed-off-by: Philip Herron --- gcc/rust/hir/rust-hir-dump.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/rust/hir/rust-hir-dump.cc b/gcc/rust/hir

[COMMITTED 11/42] gccrs: Add LlvmInlineAsm node dump

2025-04-28 Thread arthur . cohen
From: Pierre-Emmanuel Patry gcc/rust/ChangeLog: * ast/rust-ast-collector.cc (TokenCollector::visit): Dump llvm inline asm tokens. Signed-off-by: Pierre-Emmanuel Patry --- gcc/rust/ast/rust-ast-collector.cc | 39 +- 1 file changed, 38 insertions(+),

[COMMITTED 04/42] gccrs: Update comments in repr parsing code

2025-04-28 Thread arthur . cohen
From: Yap Zhi Heng gcc/rust/ChangeLog: * typecheck/rust-tyty.h: Remove extra redundant comment. * typecheck/rust-hir-type-check-base.cc: Update comment on repr handling. Signed-off-by: Yap Zhi Heng --- gcc/rust/typecheck/rust-hir-type-check-base.cc | 3 ++- gcc/rust/ty

[COMMITTED 03/42] gccrs: Implement integer representation for enums

2025-04-28 Thread arthur . cohen
From: Zhi Heng gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-base.cc: Set enum representing type properly if repr is an integer type. * typecheck/rust-hir-type-check-item.cc: Update comments. Signed-off-by: Yap Zhi Heng --- gcc/rust/typecheck/rust-hir-type-check-

[COMMITTED 16/42] gccrs: nr2.0: Handle StructPatternFieldIdent

2025-04-28 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Handle StructPatternFieldIdent. * resolve/rust-late-name-resolver-2.0.h (Late::visit): Likewise. gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: Remove entr

[COMMITTED 06/42] gccrs: Fix ICE when checking shift's which are behind array refs

2025-04-28 Thread arthur . cohen
From: Philip Herron I copied a bad form of this check from the c front-end this updates it to ensure the rhs is an INTEGER_CST and the lhs needs checked in the first place. Fixes Rust-GCC#3664 gcc/rust/ChangeLog: * rust-gcc.cc (arithmetic_or_logical_expression): Ensure this is an inte

[COMMITTED 09/42] gccrs: Add llvmInlineAsm node

2025-04-28 Thread arthur . cohen
From: Pierre-Emmanuel Patry InlineAsm node does not support memory clobbers. gcc/rust/ChangeLog: * ast/rust-ast-collector.cc (TokenCollector::visit): Make visitor unreachable. * ast/rust-ast-collector.h: Add visit for LlvmInlineAsmNode. * ast/rust-ast-visitor.cc

[COMMITTED 01/42] gccrs: Fix segv in unsafe chcker

2025-04-28 Thread arthur . cohen
From: Philip Herron Trait constants were missing type resolution step, this adds that as if it was a normal constant. The unsafe checker was missing a null check. Fixes Rust-GCC#3612 gcc/rust/ChangeLog: * checks/errors/rust-unsafe-checker.cc (UnsafeChecker::visit): add null check

[COMMITTED 02/42] gccrs: Implement typecheck for zero-variant enums

2025-04-28 Thread arthur . cohen
From: Zhi Heng gcc/rust/ChangeLog: * typecheck/rust-tyty.h: Add new `ReprKind` enum to `ReprOptions`. * typecheck/rust-hir-type-check-base.cc: Handle setting of `repr_kind`. * typecheck/rust-hir-type-check-item.cc: New check for zero-variant enums.

[PATCH][committed][14 backport]AArch64: force operand to fresh register to avoid subreg issues [PR118892]

2025-04-28 Thread Tamar Christina
aarch64-none-linux-gnu and no issues. Committed to GCC-14 Thanks, Tamar gcc/ChangeLog: PR target/118892 * config/aarch64/aarch64.md (copysign3): Use force_lowpart_subreg instead of lowpart_subreg. gcc/testsuite/ChangeLog: PR target/118892 * gcc.target

[PATCH v2][committed][14 backport]middle-end: fix masking for partial vectors and early break [PR119351]

2025-04-28 Thread Tamar Christina
ld1wz28.s, p7/z, [x1, x0, lsl 2] cmple p7.s, p7/z, z28.s, #0 ptest p15, p7.b b.none .L2 This fixes gromacs with > 1 OpenMP threads and improves performance. Bootstrapped Regtested on aarch64-none-linux-gnu, arm-none-linux-gnueabihf, x86_64-pc-linux-gnu -m32

[committed v2] testsuite: Skip tests incompatible with generic thunk support

2025-04-25 Thread Dimitar Dimitrov
Some backends do not define TARGET_ASM_OUTPUT_MI_THUNK. But the generic thunk support cannot emit code for calling variadic methods of multiple-inheritance classes. Example error for pru-unknown-elf: .../gcc/gcc/testsuite/g++.dg/ipa/pr83549.C:7:24: error: generic thunk code fails for method 'v

[committed v2] testsuite: Add require target for SJLJ exception implementation

2025-04-25 Thread Dimitar Dimitrov
Testcases for musttail call optimization fail on pru-unknown-elf: FAIL: c-c++-common/musttail14.c -std=gnu++17 (test for excess errors) Excess errors: .../gcc/gcc/testsuite/c-c++-common/musttail14.c:37:14: error: cannot tail-call: caller uses sjlj exceptions Silence these errors by disabli

[committed] libstdc++: Use markdown in some Doxygen comments

2025-04-25 Thread Jonathan Wakely
libstdc++-v3/ChangeLog: * include/bits/ptr_traits.h (to_address): Use markdown for formatting in Doxygen comments. --- Pushed to trunk. libstdc++-v3/include/bits/ptr_traits.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libstdc++-v3/include/bits/ptr_

[committed] libstdc++: Micro-optimization for std::addressof

2025-04-25 Thread Jonathan Wakely
Currently std::addressof calls std::__addressof which uses __builtin_addressof. This leads to me prefering std::__addressof in some code, to avoid the extra hop. But it's not as though the implementation of std::__addressof is complicated and reusing it avoids any code duplication. So let's just m

[committed] libstdc++: Remove c++26 dg-error lines for -Wdelete-incomplete errors

2025-04-25 Thread Jonathan Wakely
This fixes: FAIL: tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc -std=gnu++26 (test for errors, line 283) FAIL: tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc -std=gnu++26 (test for errors, line 305) This is another consequence of r16-133-g8acea9ffa82ed8 which prevents the -Wdele

[committed] cobol: New testcases.

2025-04-25 Thread Robert Dubner
Fifty-eight new testcases for COBOL. These cover a range of fundamental operations and data representation. >From 591831dcd4bc9cb9c089d952e73ec8bfcb6cb3fb Mon Sep 17 00:00:00 2001 From: Robert Dubner mailto:rdub...@symas.com Date: Fri, 25 Apr 2025 10:19:35 -0400 Subject: [PATCH] cobol: New testca

Re: [committed] libstdc++: Replace leftover std::queue with Adaptor in ranges/adaptors.cc tests.

2025-04-25 Thread Jonathan Wakely
* testsuite/std/format/ranges/adaptors.cc: Updated test. > > --- > > Tested on x86_64-linux. > > OK for trunk and gcc-15. Oh sorry, I just saw it's already [committed] - great. > > > > > libstdc++-v3/testsuite/std/format/ranges/adaptors.cc | 2 +- > >

Re: [committed] libstdc++: Replace leftover std::queue with Adaptor in ranges/adaptors.cc tests.

2025-04-25 Thread Jonathan Wakely
On Fri, 25 Apr 2025 at 15:31, Tomasz Kamiński wrote: > > This was leftover from work-in-progress state, where only std::queue was > tested. > > libstdc++-v3/ChangeLog: > > * testsuite/std/format/ranges/adaptors.cc: Updated test. > --- > Tested on x86_64-linux. OK for trunk and gcc-15. >

[committed] libstdc++: Replace leftover std::queue with Adaptor in ranges/adaptors.cc tests.

2025-04-25 Thread Tomasz Kamiński
This was leftover from work-in-progress state, where only std::queue was tested. libstdc++-v3/ChangeLog: * testsuite/std/format/ranges/adaptors.cc: Updated test. --- Tested on x86_64-linux. libstdc++-v3/testsuite/std/format/ranges/adaptors.cc | 2 +- 1 file changed, 1 insertion(+), 1 d

[committed] libstdc++: Remove c++98_only dg-error

2025-04-25 Thread Jonathan Wakely
This fixes FAIL: 22_locale/ctype/is/string/89728_neg.cc -std=gnu++98 (test for errors, line ) Since r16-133-g8acea9ffa82ed8 we don't keep issuing more errors after the first one, so this dg-error no longer matches anything. libstdc++-v3/ChangeLog: * testsuite/22_locale/ctype/is/string

[committed] wwwdocs: Rotate news

2025-04-25 Thread Jakub Jelinek
Hi! I've committed the following patch to rotate news, chose to move 202{2,3}-ish items to news.html. We'll soon have 14.3/13.4 releases so the first column will be about the same length as the second. diff --git a/htdocs/index.html b/htdocs/index.html index 8bdc4071..a662ab09 10

[committed] Adjust gcc_release for id href web transformations

2025-04-25 Thread Jakub Jelinek
is [129]GCC 15.1 or something like that with an URL later on 129. https://gcc.gnu.org/gcc-15/changes.html#15.1 The following patch handles this. Tested during gcc 15.1 release process, committed to trunk. 2025-04-25 Jakub Jelinek * gcc_release: Allow optional \[[0-9]+\] before GCC

[committed] libstdc++: Remove unnecessary dg-prune-output from tests

2025-04-24 Thread Jonathan Wakely
There are no errors matching this pattern in these tests (only in the deque/48101_neg.cc and vector/48101_neg.cc tests). libstdc++-v3/ChangeLog: * testsuite/23_containers/forward_list/48101_neg.cc: Remove dg-prune-output that doesn't match anything. * testsuite/23_containe

[committed] cobol: Repair some exception processing logic.

2025-04-24 Thread Robert Dubner
>From 5faa0313bd82827f86768553932d55f7b2bc05a2 Mon Sep 17 00:00:00 2001 From: Robert Dubner Date: Thu, 24 Apr 2025 16:26:58 -0400 Subject: [PATCH] cobol: Repair some exception processing logic. This patch changes the exception processing logic for the calculation of reference modifications and ta

[committed] libgomp/testsuite: Fix hip_header_nvidia check, add workaround to test

2025-04-24 Thread Tobias Burnus
completely or use the HIP-header-not-available fallback, which is fine as well. (The tests use different file names + #include such that the test filename tells you which variant worked and which was skipped.) Committed asr16-115-g8ef0518bce489c Tobias PS: The affected testcases are (deprecation

[committed] testsuite: Require fstack_protector for no-stack-protector-attr-3.C

2025-04-23 Thread Dimitar Dimitrov
The test fails on pru-unknown-elf with: cc1plus: warning: '-fstack-protector' not supported for this target Even though the compiled functions have the feature disabled using an attribute, the command line option is still not supported by some targets. Tested x86_64-pc-linux-gnu and ensured th

  1   2   3   4   5   6   7   8   9   10   >