Re: [PATCH][_GLIBCXX_INLINE_VERSION] Fix several test failures

2025-04-28 Thread Jonathan Wakely
On Mon, 28 Apr 2025, 21:37 François Dumont, wrote: > Much better indeed, there is only the aligned_storage adaptation left. > > It will simplify my big versioned namespace patch to use cxx11 abi, very > nice ! > > libstdc++: [_GLIBCXX_INLINE_VERSION] Fix several tests failures > > Adapt

Re: [PATCH] debug/78685 - reword -Og documentation

2025-04-28 Thread Jakub Jelinek
On Tue, Apr 29, 2025 at 08:42:42AM +0200, Richard Biener wrote: > > I think the new version is far more honest. It's been bothering me for a > > bit but couldn't figure out the right phrasing to edit. Thanks. > > Jakub, are the var-tracking -O0 vs. -On bits accurate? Yes. LGTM. Jakub

RE: [PATCH] i386: Add ix86_expand_unsigned_small_int_cst_argument

2025-04-28 Thread Liu, Hongtao
> -Original Message- > From: H.J. Lu > Sent: Tuesday, April 29, 2025 1:58 PM > To: Hongtao Liu > Cc: GCC Patches ; Uros Bizjak > ; Liu, Hongtao > Subject: Re: [PATCH] i386: Add > ix86_expand_unsigned_small_int_cst_argument > > On Tue, Apr 29, 2025 at 1:54 PM H.J. Lu wrote: > > > > On

Re: [PATCH] debug/78685 - reword -Og documentation

2025-04-28 Thread Richard Biener
On Mon, 28 Apr 2025, Sam James wrote: > Richard Biener writes: > > > On Mon, 28 Apr 2025, Alexander Monakov wrote: > > > >> > >> On Mon, 28 Apr 2025, Richard Biener wrote: > >> > >> > The following rewords the documentation for -Og which over-promises > >> > the ability to debug the generated

Re: [PATCH v2 1/3] RISC-V: Combine vec_duplicate + vadd.vv to vadd.vx on GR2VR cost

2025-04-28 Thread Robin Dapp
But this is not that good enough here if my understanding is correct. As vmv.v.x is somehow equivalent to vec_dup but doesn't ref GR2VR, But it should. Can't we do something like: if (riscv_v_ext_mode_p (mode)) { switch (GET_CODE (x)) { case VEC_DUPLICATE:

Re: [PATCH] libgomp: Update SVE test

2025-04-28 Thread Tejas Belagod
Ping (for trunk and GCC15)? Thanks, Tejas. On 4/11/25 3:55 PM, Tejas Belagod wrote: Fix udr-sve.c target test that to check for the correct results based on the OpenMP clauses used. The test was first written with a misunderstood functionality of the reduction clause. Tested with aarch64-linu

Re: [PATCH] i386: Add ix86_expand_unsigned_small_int_cst_argument

2025-04-28 Thread H.J. Lu
On Tue, Apr 29, 2025 at 1:54 PM H.J. Lu wrote: > > On Tue, Apr 29, 2025 at 12:56 PM Hongtao Liu wrote: > > > > On Sun, Apr 27, 2025 at 10:58 AM H.J. Lu wrote: > > > > > > When passing 0xff as an unsigned char function argument with the C > > > frontend > > > promotion, expand_normal used to get

Re: [PATCH] i386: Add ix86_expand_unsigned_small_int_cst_argument

2025-04-28 Thread H.J. Lu
On Tue, Apr 29, 2025 at 12:56 PM Hongtao Liu wrote: > > On Sun, Apr 27, 2025 at 10:58 AM H.J. Lu wrote: > > > > When passing 0xff as an unsigned char function argument with the C frontend > > promotion, expand_normal used to get > > > > constant > > 255> > > > > and returned the rtx value using

[PATCH v2] Consider frequency in cost estimation when converting scalar to vector.

2025-04-28 Thread liuhongt
> I am generally trying to get rid of remaing uses of REG_FREQ since the > 1 based fixed point arithmetics iot always working that well. > > You can do the sums in profile_count type (doing something reasonable > when count is uninitialized) and then convert it to sreal for the final > heuristi

RE: [PATCH v2 1/3] RISC-V: Combine vec_duplicate + vadd.vv to vadd.vx on GR2VR cost

2025-04-28 Thread Li, Pan2
Thanks Robin for comments and help. > Yes, at first we must deconstruct all relevant patterns as above for PLUS. > The basic cost for the add is COST_N_INSNS (1) == 4. If one operand is a > VEC_DUPLICATE then we increase the basic cost by GR2VR * COST_N_INSNS (1). > Is > that not sufficient f

[PATCH] i386/cygming: Decrease default preferred stack boundary for 32-bit targets

2025-04-28 Thread LIU Hao
This fixes a long-standing issue that GCC used to assume 16-byte stack alignment on i686-w64-mingw32, which is not always the case for callbacks from system libraries. -- Best regards, LIU Hao From 1b92f8105dbece1694dd3ab398cfb5e3ce2c15d9 Mon Sep 17 00:00:00 2001 From: LIU Hao Date: Tue, 29

Re: [PATCH] i386: Add ix86_expand_unsigned_small_int_cst_argument

2025-04-28 Thread Hongtao Liu
On Sun, Apr 27, 2025 at 10:58 AM H.J. Lu wrote: > > When passing 0xff as an unsigned char function argument with the C frontend > promotion, expand_normal used to get > > constant > 255> > > and returned the rtx value using the sign-extended representation: > > (const_int 255 [0xff]) > > But aft

PING: [PATCH] x86: Add preserve_none and update no_caller_saved_registers attributes

2025-04-28 Thread H.J. Lu
On Fri, Apr 18, 2025 at 7:10 PM H.J. Lu wrote: > > Add preserve_none attribute which is similar to no_callee_saved_registers > attribute, except on x86-64, r12, r13, r14, r15, rdi and rsi registers are > used for integer parameter passing. This can be used in an interpreter > to avoid saving/rest

[PATCH] RISC-V: Allow different dynamic floating point mode to be merged [PR119832]

2025-04-28 Thread Kito Cheng
Although we already try to set the mode needed to FRM_DYN after a function call, there are still some corner cases where both FRM_DYN and FRM_DYN_CALL may appear on incoming edges. Therefore, we use TARGET_MODE_CONFLUENCE to tell GCC that FRM_DYN, FRM_DYN_CALL, and FRM_DYN_EXIT modes are compatibl

Re: [PATCH v2] x86: Add a pass to remove redundant all 0s/1s vector load

2025-04-28 Thread H.J. Lu
On Tue, Apr 29, 2025 at 10:08 AM Hongtao Liu wrote: > > On Mon, Apr 28, 2025 at 5:07 PM H.J. Lu wrote: > > > > On Mon, Apr 28, 2025 at 4:26 PM H.J. Lu wrote: > > > > > > > > > > This is what my patch does: > > > > But it iterates through vector_insns, using a def-ref chain to find > > > > those

RE: [EXTERNAL] [PATCH] Fix name mismatch for fortran.

2025-04-28 Thread Eugene Rozenfeld
The check you added seems correct to me. Do we need to keep the afdo_string_table->get_index (IDENTIFIER_POINTER ( DECL_ASSEMBLER_NAME (edge->callee->decl))) != s->name () check? Should your check replace it rather than be an additional check? -Original Message- From: liuhong

Re: [PATCH] c++: Add attribute handles_virtual_move_assign

2025-04-28 Thread Jason Merrill
On 4/28/25 5:07 PM, Owen Avery wrote: As far as I can tell, that would need to be applied to every class which virtually inherits from such a base class, rather than just the base class's move assignment operator. Ah, sure. But if you replace the lookup_attribute with warning_enabled_at (DEC

Re: [PATCH v2] x86: Add a pass to remove redundant all 0s/1s vector load

2025-04-28 Thread Hongtao Liu
On Mon, Apr 28, 2025 at 5:07 PM H.J. Lu wrote: > > On Mon, Apr 28, 2025 at 4:26 PM H.J. Lu wrote: > > > > > > > This is what my patch does: > > > But it iterates through vector_insns, using a def-ref chain to find > > > those insns. I think we can just record those single_set with src as > > > co

[PATCH] target.def: Remove TARGET_PROMOTE_FUNCTION_RETURN reference

2025-04-28 Thread H.J. Lu
Since TARGET_PROMOTE_FUNCTION_RETURN is no longer used, remove its reference from target.def. PR target/119985 * target.def: Remove TARGET_PROMOTE_FUNCTION_RETURN reference. * doc/tm.texi: Regenerated. OK for master? Thanks. -- H.J. From f6c6dd36de27791fdf8bf156933e0eb807858072 Mon Sep 17 00:0

[PATCH] Remove other processors from X86_TUNE_DEST_FALSE_DEP_FOR_GLC except GLC

2025-04-28 Thread liuhongt
Since the tune if only for GLC(sapphirerapids and alderlake-P). Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. Ready push to trunk and backport to GCC15/GCC14/GCC13 release branches. gcc/ChangeLog: * config/i386/x86-tune.def (X86_TUNE_DEST_FALSE_DEP_FOR_GLC): Remove ot

[pushed: r16-266] analyzer: handle NRVO and DECL_BY_REFERENCE [PR111536]

2025-04-28 Thread David Malcolm
The analyzer was issuing false warnings about uninitialized variables in C++ in places where NRVO was marking DECL_RESULT with DECL_BY_REFERENCE. Fixed thusly. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r16-266-ga1922f0252b3b0. gcc/analyzer/ChangeLog:

[pushed: r16-263] analyzer, c++: add placeholder implementation of ana::translation_unit for C++

2025-04-28 Thread David Malcolm
Implement ana::translation_unit for the C++ frontend with a no-op placeholder implementation, for now. No functional change intended; a follow-up may implement things further. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r16-263-g13f4b12393fa98. gcc/cp/Change

[pushed: r16-258] analyzer: convert various enums to "enum class"

2025-04-28 Thread David Malcolm
Modernization; no functional change intended. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r16-258-g978e9dfc0a1331. gcc/analyzer/ChangeLog: * access-diagram.cc: Convert enum access_direction to "enum class". * bounds-checking.cc: Likewi

[pushed: r16-265] analyzer: fix null deref false negative on std::unique_ptr [PR109366]

2025-04-28 Thread David Malcolm
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r16-265-g2a63dc8c65d469. gcc/analyzer/ChangeLog: PR analyzer/109366 * region-model-manager.cc (region_model_manager::maybe_fold_sub_svalue): Sub-values of zero constants are zero. gcc

[pushed: r16-261] analyzer: use unique_ptr for state_machine instances

2025-04-28 Thread David Malcolm
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r16-261-g6f9764571d2dd1. gcc/analyzer/ChangeLog: * engine.cc (class plugin_analyzer_init_impl): Convert "m_checkers" to use std::vector of std::unique_ptr. Convert "m_known_fn_mgr" to a refer

[pushed: r16-256] analyzer: fail if we see unexpected gimple stmt codes

2025-04-28 Thread David Malcolm
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r16-256-g5ecea59621c63a. gcc/analyzer/ChangeLog: * region-model.cc (region_model::on_stmt_pre): Use internal_error if we see an unexpected gimple stmt code. Signed-off-by: David Malcolm --- gcc/ana

[pushed: r16-255] analyzer: add a call_details::dump (using text_art)

2025-04-28 Thread David Malcolm
Add a new function to help debugging -fanalyzer. No functional change intended. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r16-255-g0ef00f71969f20. gcc/analyzer/ChangeLog: * call-details.cc (call_details::dump): New overload. (call_details::

[pushed: r16-257] analyzer: use analyzer/common.h as a common header

2025-04-28 Thread David Malcolm
Our headers are a major pain to work with: many require certain other headers to be included in a particular (undocumented) order in order to be includable. Simplify includes in the analyzer by renaming analyzer/analyzer.h to analyzer/common.h and have it include all the common headers needed thro

[pushed: r16-252] diagnostics: use diagnostic_option_id for m_opt_permissive

2025-04-28 Thread David Malcolm
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r16-252-gbc39b0072f5660. gcc/ChangeLog: * diagnostic.h (diagnostic_context::m_opt_permissive): Convert from int to diagnostic_option_id. Update comment. Signed-off-by: David Malcolm --- gcc/diagno

gcc-patches@gcc.gnu.org

2025-04-28 Thread David Malcolm
No functional change intended. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r16-260-g4e1f545df9da1d. gcc/analyzer/ChangeLog: * call-summary.cc (call_summary_replay::call_summary_replay): Convert "summary" from call_summary * to call_summary &.

[pushed: r16-259] analyzer: convert gcall * to gcall & in many places

2025-04-28 Thread David Malcolm
No functional change intended. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r16-259-gc2f8c7ad2db225. gcc/analyzer/ChangeLog: * analyzer.cc: Convert gcall * to gcall & where we know the pointer must be non-null. * call-details.cc: Likewi

[pushed: r16-250] sarif output: introduce sarif_generation_options

2025-04-28 Thread David Malcolm
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r16-250-ga25818cd302a77. gcc/ChangeLog: * diagnostic-format-sarif.cc (sarif_builder::get_opts): New accessor. (sarif_builder::get_version): Update for... (sarif_builder::m_version): Re

[pushed: r16-254] pass_manager: add m_ prefix to pass fields accessed via passes.def

2025-04-28 Thread David Malcolm
Make it clearer when we're accessing member data of pass_manager by adding an "m"_ prefix to the fields handled via passes.def macros. No functional change intended. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r16-254-g1dc8916bcbb14c. gcc/ChangeLog:

[pushed: r16-253] c, c++: use unique_ptr in name_hint to reduce naked 'new'

2025-04-28 Thread David Malcolm
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r16-253-g9c4336cbf05228. gcc/c-family/ChangeLog: * name-hint.h (name_hint::name_hint): Use std::unique_ptr for param. gcc/c/ChangeLog: * c-decl.cc: Include "make-unique.h". (lookup_na

[pushed: r16-251] diagnostics: make diagnostic_context::m_abort_on_error private

2025-04-28 Thread David Malcolm
No functional change intended. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r16-251-g0c5b98be0806e2. gcc/ChangeLog: * diagnostic.h (diagnostic_context::set_abort_on_error): New. (diagnostic_context::m_abort_on_error): Make private. (dia

[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

[COMITTED] Add a Relation iterator to the relation oracle.

2025-04-28 Thread Andrew MacLeod
This patch adds a relation iterator to query the oracle to list either all the relations on exit to a block, or just ones involving a specified SSA_NAME. The oracle then uses this iterator internally for printing as proof of concept.  It is also of use in a follow on patch for finding "nearest

[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, and it too

[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

Re: [PATCH] PR tree-optimization/95801 - infer non-zero for integral division RHS.

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 1/23/25 04:39, Richard Biener wrote: On Wed, Jan 22, 2025 at 12:49 AM Andrew MacLeod wrote: This patch simply adds an op2_range to operator_

Re: [PATCH][stage1] tree-optimization/119103 - missed overwidening detection for shift

2025-04-28 Thread H.J. Lu
On Mon, Apr 28, 2025 at 9:09 PM Richard Biener wrote: > > On Wed, Mar 5, 2025 at 12:50 PM Richard Biener wrote: > > > > On Tue, 4 Mar 2025, Richard Sandiford wrote: > > > > > Richard Biener writes: > > > > When vectorizing a shift of u16 data by an amount that's known to > > > > be less than 16

Re: [PATCH] cfgexpand: Change __builtin_unreachable to __builtin_trap if only thing in function [PR109267]

2025-04-28 Thread Andrew Pinski
On Mon, Apr 28, 2025 at 1:23 AM Richard Biener wrote: > > On Sun, Apr 27, 2025 at 1:07 AM Andrew Pinski > wrote: > > > > When we have an empty function, things can go wrong with > > cfi_startproc/cfi_endproc and a few other > > things like exceptions. So if the only thing the function does is a

Re: [PATCH][_GLIBCXX_INLINE_VERSION] Fix several test failures

2025-04-28 Thread François Dumont
Much better indeed, there is only the aligned_storage adaptation left. It will simplify my big versioned namespace patch to use cxx11 abi, very nice !     libstdc++: [_GLIBCXX_INLINE_VERSION] Fix several tests failures     Adapt testsuite v3_target_compile to strip version namespace from com

Re: [PATCH v2] tailcall: Support ERF_RETURNS_ARG for tailcall [PR67797]

2025-04-28 Thread Jakub Jelinek
On Mon, Apr 28, 2025 at 01:03:11PM -0700, Andrew Pinski wrote: > > Otherwise LGTM. > > Just to double check, was this an approval after the fix for the call > to useless_type_conversion_p? Yes. Jakub

Re: [PATCH v2] tailcall: Support ERF_RETURNS_ARG for tailcall [PR67797]

2025-04-28 Thread Andrew Pinski
On Mon, Apr 28, 2025 at 12:37 AM Jakub Jelinek wrote: > > On Fri, Apr 25, 2025 at 09:12:45PM -0700, Andrew Pinski wrote: > > --- a/gcc/tree-tailcall.cc > > +++ b/gcc/tree-tailcall.cc > > @@ -1083,57 +1083,74 @@ find_tail_calls (basic_block bb, struct tailcall > > **ret, bool only_musttail, > >

Re: [PATCH] debug/78685 - reword -Og documentation

2025-04-28 Thread Sam James
Richard Biener writes: > On Mon, 28 Apr 2025, Alexander Monakov wrote: > >> >> On Mon, 28 Apr 2025, Richard Biener wrote: >> >> > The following rewords the documentation for -Og which over-promises >> > the ability to debug the generated code. While -Og enables >> > var-tracking and thus impro

New German PO file for 'gcc' (version 15.1.0)

2025-04-28 Thread Translation Project Robot
Hello, gentle maintainer. This is a message from the Translation Project robot. A revised PO file for textual domain 'gcc' has been submitted by the German team of translators. The file is available at: https://translationproject.org/latest/gcc/de.po (This file, 'gcc-15.1.0.de.po', has jus

[PATCH v4 2/2] Aarch64: Add __sqrt and __sqrtf intrinsics and corresponding tests

2025-04-28 Thread Ayan Shafqat
Rebased with gcc 15.1 This patch introduces two new inline functions, __sqrt and __sqrtf, in arm_acle.h for Aarch64 targets. These functions wrap the new builtins __builtin_aarch64_sqrtdf and __builtin_aarch64_sqrtsf, respectively, providing direct access to hardware instructions without relying o

[PATCH v4 1/2] Aarch64: Use BUILTIN_VHSDF_HSDF for vector and scalar sqrt builtins

2025-04-28 Thread Ayan Shafqat
Rebased with gcc 15.1 This patch changes the `sqrt` builtin definition from `BUILTIN_VHSDF_DF` to `BUILTIN_VHSDF_HSDF` in `aarch64-simd-builtins.def`, ensuring the builtin covers half, single, and double precision variants. The redundant `VAR1 (UNOP, sqrt, 2, FP, hf)` lines are removed, as they ar

Re: [PATCH][_GLIBCXX_INLINE_VERSION] Fix several test failures

2025-04-28 Thread Jonathan Wakely
On 28/04/25 19:11 +0200, François Dumont wrote: Hi Pretty straightforward except for the aligned_storage one for which I just avoid the check when gnu-versioned-namespace mode is being used.     libstdc++: [_GLIBCXX_INLINE_VERSION] Fix several tests failures     Several tests are failing whe

[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 userna

Re: [PATCH] ipa, cgraph: Enable constant propagation to OpenMP kernels

2025-04-28 Thread Josef Melcr
Dne 28. 04. 25 v 10:58 Jakub Jelinek napsal(a): On Sun, Apr 27, 2025 at 11:56:21AM +0200, Josef Melcr wrote: * builtin-attrs.def (0): New int list. This is just weird. Write * builtin-attrs.def: Add DEF_LIST_INT_INT (0,2). ? +DEF_CALLBACK_ATTRIBUTE(GOMP, 1, 0) +DEF_CALLBACK_

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

Re: [PATCH 1/2] gimplefe: Simplify handling of identifier based binary operations

2025-04-28 Thread Andrew Pinski
On Mon, Apr 28, 2025 at 1:13 AM Richard Biener wrote: > > On Sun, Apr 27, 2025 at 12:51 AM Andrew Pinski > wrote: > > > > While looking into adding __ROTATE_LEFT and __ROTATE_RIGHT, I noticed > > this code is just a bunch of if statments repeated. Instead we could just > > use a simple lookup ar

[PATCH][_GLIBCXX_INLINE_VERSION] Fix several test failures

2025-04-28 Thread François Dumont
Hi Pretty straightforward except for the aligned_storage one for which I just avoid the check when gnu-versioned-namespace mode is being used.     libstdc++: [_GLIBCXX_INLINE_VERSION] Fix several tests failures     Several tests are failing when libstdc++ is configured with:     --enable-symv

Re: [PATCH] AArch64: Fold LD1/ST1 with ptrue to LDR/STR for 128-bit VLS

2025-04-28 Thread Jennifer Schmitz
> On 28 Apr 2025, at 15:35, Richard Sandiford wrote: > > External email: Use caution opening links or attachments > > > Kyrylo Tkachov writes: >>> On 25 Apr 2025, at 19:55, Richard Sandiford >>> wrote: >>> >>> Jennifer Schmitz writes: If -msve-vector-bits=128, SVE loads and stores (

[PATCH v2] libstdc++: Cleanup and stabilize format _Spec<_CharT> and _Pres_type.

2025-04-28 Thread Tomasz Kamiński
These patch makes following changes to _Pres_type values: * _Pres_esc is replaced with separate _M_debug flag. * _Pres_s, _Pres_p do not overlap with _Pres_none. * hexadecimal presentation use same values for pointer, integer and floating point types. Instead of `_M_reserved` and `_M_reserve

[PATCH] libstdc++: Cleanup and stabilize format _Spec<_CharT> and _Pres_type.

2025-04-28 Thread Tomasz Kamiński
These patch makes following changes to _Pres_type values: * _Pres_esc is replaced with separate _M_debug flag. * _Pres_s, _Pres_p do not overlap with _Pres_none. * hexadecimal presentation use same values for pointer, integer and floating point types. The `_M_reserved` and `_M_reserved2` are

[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.

Re: [PATCH] libstdc++: Fix availability of std::erase_if(std::flat_foo) [PR119427]

2025-04-28 Thread Jonathan Wakely
On Mon, 28 Apr 2025 at 16:22, Patrick Palka wrote: > > On Mon, 28 Apr 2025, Jonathan Wakely wrote: > > > On Mon, 28 Apr 2025 at 14:59, Patrick Palka wrote: > > > > > > Tested on x86_64-pc-linux-gnu, does this look OK for trunk/15? > > > > > > -- >8 -- > > > > > > These std::erase_if overloads wer

[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

[PATCH v4] arm: Add FMA and FMAF intrinsics with corresponding tests

2025-04-28 Thread Ayan Shafqat
Rebased to GCC 15.1 This patch introduces inline definitions for the __fma and __fmaf functions in arm_acle.h for arm targets. These definitions rely on __builtin_fma and __builtin_fmaf to ensure proper inlining and to meet the ACLE requirements [1]. The patch has been tested locally using a cros

[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
From: Pierre-Emmanuel Patry gcc/rust/ChangeLog: * expand/rust-macro-builtins-asm.cc (parse_asm_arg): Emit error message. Signed-off-by: Pierre-Emmanuel Patry --- gcc/rust/expand/rust-macro-builtins-asm.cc | 8 1 file changed, 8 insertions(+) diff --git a/gcc/rust/exp

[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

  1   2   >