Re: [PATCH] testsuite: Fix mistransformed gcov

2022-11-15 Thread Torbjorn SVENSSON via Gcc-patches
Hi, On 2022-11-16 03:11, Hans-Peter Nilsson wrote: How was r13-2619-g34b9a03353d3fd "gcov: Respect triplet when looking for gcov" tested? I'm having a hard time believing it was tested with a *cross-compiler* *in-build-tree*. I think it was only tested for the special-case of an installed cros

Re: [PATCH] doc: Reword the description of -mrelax-cmpxchg-loop [PR 107676]

2022-11-15 Thread Alexander Monakov via Gcc-patches
On Wed, 16 Nov 2022, Hongyu Wang wrote: > > When emitting a compare-and-swap loop for @ref{__sync Builtins} > > and @ref{__atomic Builtins} lacking a native instruction, optimize > > for the highly contended case by issuing an atomic load before the > > @code{CMPXCHG} instruction, and using the

[PATCH] Fix typo in gimple_fold_partial_load_store_mem_ref

2022-11-15 Thread Kewen.Lin via Gcc-patches
Hi, As Robin spotted, my recent commit r13-3716 caused an ICE on s390 if vector access with length is enabled there (his patch for the enablement hasn't been committed yet). The failure is caused by one stupid typo, the bias on s390 is -1, so the assertion should use tree_fits_shwi_p rather than

[PATCH 2/2] rs6000: Refine integer comparison handlings in rs6000_emit_vector_compare

2022-11-15 Thread Kewen.Lin via Gcc-patches
Hi, The current handlings in rs6000_emit_vector_compare is a bit complicated to me, especially after we emit vector float comparison insn with the given code directly. This patch is to refine the handlings for vector integer comparison operators, it becomes not recursive, and we don't need the he

[PATCH 1/2] rs6000: Emit vector fp comparison directly in rs6000_emit_vector_compare

2022-11-15 Thread Kewen.Lin via Gcc-patches
Hi, All kinds of vector float comparison operators have been supported in one rtl comparison pattern as vector.md, we can just emit an rtx comparison insn with the given comparison operator in function rs6000_emit_vector_compare instead of checking and handling the reverse condition cases. This i

[committed] range-op-float: Fix up float_binary_op_range_finish [PR107668]

2022-11-15 Thread Jakub Jelinek via Gcc-patches
Hi! The following testcase ICEs, because when !HONOR_NANS but HONOR_SIGNED_ZEROS, if we see lhs = op1 * op2; and know that lhs is [-0.0, 0.0] and op2 is [0.0, 0.0], the division of these two yields UNDEFINED and clear_nan () on it fails an assert. With HONOR_NANS it would actually result in a kno

Re: [PATCH][i386]: Update ix86_can_change_mode_class target hook to accept QImode conversions

2022-11-15 Thread Hongtao Liu via Gcc-patches
On Mon, Nov 14, 2022 at 10:14 AM Hongtao Liu wrote: > > On Fri, Nov 11, 2022 at 10:47 PM Tamar Christina via Gcc-patches > wrote: > > > > Hi All, > > > > The current i386 implementation of the TARGET_CAN_CHANGE_MODE_CLASS is > > currently > > not useful before re-alloc. > > > > In particular bef

Re: [PATCH] c++, v2: Implement C++23 P2647R1 - Permitting static constexpr variables in constexpr functions

2022-11-15 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 16, 2022 at 12:27:02AM +, Jonathan Wakely wrote: > On Tue, 15 Nov 2022 at 23:50, Jakub Jelinek wrote: > > > > On Tue, Nov 15, 2022 at 06:36:38PM -0500, Jason Merrill wrote: > > > > Here is an updated patch that passed bootstrap/regtest, the only > > > > change is another testcase t

Re: [PATCH] Fix gdb FilteringTypePrinter (again)

2022-11-15 Thread François Dumont via Gcc-patches
On 15/11/22 17:17, Jonathan Wakely wrote: On 06/10/22 19:38 +0200, François Dumont wrote: Hi Looks like the previous patch was not enough. When using it in the context of a build without dual abi and versioned namespace I started having failures again. I guess I hadn't rebuild everything proper

Re: [rs6000, patch] Enable have_cbranchcc4 on rs6000

2022-11-15 Thread HAO CHEN GUI via Gcc-patches
Hi David, I found definition of the operands in 'cbranch'. The argumnets matters. I will create a new expand pattern for cbranchcc4. Thanks a lot for your comments. 'cbranchmode4’ Conditional branch instruction combined with a compare instruction. Operand 0 is a comparison operator. Operand 1 an

Re: [PATCH] doc: Reword the description of -mrelax-cmpxchg-loop [PR 107676]

2022-11-15 Thread Hongyu Wang via Gcc-patches
> When emitting a compare-and-swap loop for @ref{__sync Builtins} > and @ref{__atomic Builtins} lacking a native instruction, optimize > for the highly contended case by issuing an atomic load before the > @code{CMPXCHG} instruction, and using the @code{PAUSE} instruction > to save CPU power when r

Re: [PATCH] libstdc++: Fix stream initialization with static library [PR107701]

2022-11-15 Thread Patrick Palka via Gcc-patches
On Tue, 15 Nov 2022, Patrick Palka wrote: > When linking with a static library, the linker seems to exclude a > constituent .o object (including its global initializers) if nothing > from it is referenced by the program (unless e.g. --whole-archive is > used). This behavior breaks iostream when l

Re: [PATCHv2] Use toplevel configure for GMP and MPFR for gdb

2022-11-15 Thread Jeff Law via Gcc-patches
On 11/10/22 12:05, apinski--- via Gcc-patches wrote: From: Andrew Pinski This patch uses the toplevel configure parts for GMP/MPFR for gdb. The only thing is that gdb now requires MPFR for building. Before it was a recommended but not required library. Also this allows building of GMP and MPF

Re: [PATCH v4] RISC-V: Add support for inlining subword atomic operations

2022-11-15 Thread Jeff Law via Gcc-patches
On 10/28/22 10:55, David Abdurachmanov via Gcc-patches wrote: On Fri, Sep 2, 2022 at 1:09 PM Kito Cheng via Gcc-patches < gcc-patches@gcc.gnu.org> wrote: LGTM with minor comments, it's time to move forward, thanks Patrick and Palmer. Ping. Any plans to finally land this one for GCC 13? Th

Re: [PATCH] gcc: honour -ffile-prefix-map in ASM_MAP [PR93371]

2022-11-15 Thread Jeff Law via Gcc-patches
On 11/3/22 07:29, Rasmus Villemoes wrote: On 02/11/2022 16.45, Jeff Law wrote: On 11/2/22 06:35, Rasmus Villemoes wrote: However, when I try to push the new master branch I get $ git push origin master fatal: remote error: service not enabled: /git/gcc.git I do gcc patches sufficiently rare

Re: [PATCH] RISC-V: Use binvi to cover more immediates than with xori alone

2022-11-15 Thread Jeff Law via Gcc-patches
On 11/10/22 14:35, Philipp Tomsich wrote: Sequences of the form "a ^ C" with C being the positive half of a signed immediate's range with one extra bit set in addtion are mapped to xori and one binvi to avoid using a temporary (and a multi-insn sequence to load C into that temporary). gcc/Chan

Re: [PATCH] RISC-V: Use bseti to cover more immediates than with ori alone

2022-11-15 Thread Jeff Law via Gcc-patches
On 11/10/22 14:34, Philipp Tomsich wrote: Sequences of the form "a | C" with C being the positive half of a signed immediate's range with one extra bit set in addtion are mapped to ori and one binvi to avoid using a temporary (and a multi-insn sequence to load C into that temporary). gcc/Chang

Re: [PATCH] Add a target hook for sibcall epilogues

2022-11-15 Thread Jeff Law via Gcc-patches
On 11/11/22 09:22, Richard Sandiford via Gcc-patches wrote: Epilogues for sibling calls are generated using the sibcall_epilogue pattern. One disadvantage of this approach is that the target doesn't know which call the epilogue is for, even though the code that generates the pattern has the ca

Re: [PATCH] gcc: m68k: fix PR target/107645

2022-11-15 Thread Jeff Law via Gcc-patches
On 11/12/22 20:47, Max Filippov wrote: On Sat, Nov 12, 2022 at 11:42 AM Jeff Law wrote: ISTM that we'd need to strip the unspec and process its argument instead. I tried that first, the result was more ICEs because that pattern wasn't recognized at later stages. Then I read the change to the

Re: [PATCH] doc: invoke: pru/riscv: Fix option list formatting

2022-11-15 Thread Jeff Law via Gcc-patches
On 11/15/22 16:08, Christoph Muellner wrote: From: Christoph Müllner This patch fixes a wrong placed closing bracket in the RISC-V option list and an unneeded @gol in the PRU option list in invoke.texi. gcc/ChangeLog: * doc/invoke.texi: Fix PRU/RISC-V option list formatting. OK.

Re: [PATCH v3] LoongArch: Add prefetch instructions.

2022-11-15 Thread Lulu Cheng
在 2022/11/16 上午11:06, WANG Xuerui 写道: On 2022/11/16 10:10, Lulu Cheng wrote: v2 -> v3: 1. Remove preldx support. --- Enable sw prefetching at -O3 and higher. Co-Authored-By: xujiahao gcc/ChangeLog: * config/loongarch/constraints.md (ZD): New constr

Undeliverable mail: RE:询盘 22310169

2022-11-15 Thread Mail Delivery Subsystem
Failed to deliver to 'enqu...@technochemicals.com.tn' Message detected as SPAM Reporting-MTA: dns; mx01.ingw.orange.tn Original-Recipient: rfc822; Final-Recipient: system; Action: failed Status: 5.0.0 Diagnostic-Code: smtp;Message detected as SPAM Received: by mx01.ingw.orange.tn (CommuniGate Pro

Re: [PATCH v3] LoongArch: Add prefetch instructions.

2022-11-15 Thread WANG Xuerui
On 2022/11/16 10:10, Lulu Cheng wrote: v2 -> v3: 1. Remove preldx support. --- Enable sw prefetching at -O3 and higher. Co-Authored-By: xujiahao gcc/ChangeLog: * config/loongarch/constraints.md (ZD): New constraint. * config/loongarch/loo

Re: [rs6000, patch] Enable have_cbranchcc4 on rs6000

2022-11-15 Thread David Edelsohn via Gcc-patches
On Tue, Nov 15, 2022 at 9:32 PM HAO CHEN GUI wrote: > Hi, > The patch enables have_cbrnachcc4 which is a flag in ifcvt.cc to > indicate if branch by CC bits is invalid or not. As rs6000 already has > "*cbranch" insn which does branching according to CC bits, the flag > should be enabled and rel

[PATCH] libstdc++: Fix stream initialization with static library [PR107701]

2022-11-15 Thread Patrick Palka via Gcc-patches
When linking with a static library, the linker seems to exclude a constituent .o object (including its global initializers) if nothing from it is referenced by the program (unless e.g. --whole-archive is used). This behavior breaks iostream when linking with static libstdc++.a (on systems that sup

Re: [PATCH] rtl: Try to remove EH edges after {pro,epi}logue generation [PR90259]

2022-11-15 Thread Kewen.Lin via Gcc-patches
on 2022/11/10 11:30, Kewen.Lin wrote: > on 2022/11/9 15:56, Eric Botcazou wrote: >>> The previous testings on powerpc64{,le}-linux-gnu covered language Go, but >>> not Ada. I re-tested it with languages c,c++,fortran,objc,obj-c++,go,ada >>> on powerpc64le-linux-gnu, the result looked good. Both x

[rs6000, patch] Enable have_cbranchcc4 on rs6000

2022-11-15 Thread HAO CHEN GUI via Gcc-patches
Hi, The patch enables have_cbrnachcc4 which is a flag in ifcvt.cc to indicate if branch by CC bits is invalid or not. As rs6000 already has "*cbranch" insn which does branching according to CC bits, the flag should be enabled and relevant branches can be optimized out. The test case illustrates t

[PATCH v3] LoongArch: Add prefetch instructions.

2022-11-15 Thread Lulu Cheng
v2 -> v3: 1. Remove preldx support. --- Enable sw prefetching at -O3 and higher. Co-Authored-By: xujiahao gcc/ChangeLog: * config/loongarch/constraints.md (ZD): New constraint. * config/loongarch/loongarch-def.c: Initial number of parallel pr

Re: [PATCH] LoongArch: Fix atomic_exchange make comparison and may jump out

2022-11-15 Thread Jinyang He
On 2022/11/15 下午10:21, Xi Ruoyao wrote: On Tue, 2022-11-15 at 21:03 +0800, Jinyang He wrote: gcc/ChangeLog: * config/loongarch/sync.md: Add atomic_cas_value_exchange_and_7 and fix atomic_exchange. nit: * config/loongarch/sync.md (atomic_cas_value_exchange_and_7): New define_i

[PATCH] testsuite: Fix mistransformed gcov

2022-11-15 Thread Hans-Peter Nilsson via Gcc-patches
How was r13-2619-g34b9a03353d3fd "gcov: Respect triplet when looking for gcov" tested? I'm having a hard time believing it was tested with a *cross-compiler* *in-build-tree*. I think it was only tested for the special-case of an installed cross-compiler; not even with a native build exercising th

RE: [wwwdocs] gcc-13: Mention Intel new ISA and march support.

2022-11-15 Thread Jiang, Haochen via Gcc-patches
Hi Gerald, I will remove "to GCC" here if there is no more comment from others on Thursday. For me it is reasonable. Thx, Haochen > -Original Message- > From: Gerald Pfeifer > Sent: Monday, November 14, 2022 9:56 PM > To: Jiang, Haochen > Cc: gcc-patches@gcc.gnu.org > Subject: Re: [www

Re: [PATCH] RISC-V: Use .p2align for code-alignment

2022-11-15 Thread Philipp Tomsich
On Tue, 15 Nov 2022 at 22:14, Philipp Tomsich wrote: > > Jeff, > > On Tue, 15 Nov 2022 at 17:37, Jeff Law wrote: > > > > > > On 11/13/22 13:41, Philipp Tomsich wrote: > > > > RISC-V's .p2align (currently) ignores the max-skip argument. As we > > have experimental patches underway to address this

Re: [PATCH] c++: Reject UDLs in certain contexts [PR105300]

2022-11-15 Thread Marek Polacek via Gcc-patches
On Tue, Nov 15, 2022 at 06:58:39PM -0500, Jason Merrill wrote: > On 11/12/22 06:53, Marek Polacek wrote: > > In this PR, we are crashing because we've encountered a UDL where a > > string-literal is expected. This patch makes the parser reject string > > and character UDLs in all places where the

[PATCH v2] c++: P2448 - Relaxing some constexpr restrictions [PR106649]

2022-11-15 Thread Marek Polacek via Gcc-patches
On Mon, Nov 14, 2022 at 06:00:58PM -0500, Jason Merrill wrote: > On 11/9/22 10:53, Marek Polacek wrote: > > This patch implements C++23 P2448, which lifts more restrictions on the > > constexpr keyword. It's effectively going the way of being just a hint > > (hello, inline!). > > > > This gist is

Re: [PATCH] c++, v2: Implement C++23 P2647R1 - Permitting static constexpr variables in constexpr functions

2022-11-15 Thread Jonathan Wakely via Gcc-patches
On Tue, 15 Nov 2022 at 23:50, Jakub Jelinek wrote: > > On Tue, Nov 15, 2022 at 06:36:38PM -0500, Jason Merrill wrote: > > > Here is an updated patch that passed bootstrap/regtest, the only > > > change is another testcase tweak. > > > > > > 2022-11-13 Jakub Jelinek > > > > > > gcc/c-family/ > >

Re: [PATCH] c++, v2: Implement C++23 P2647R1 - Permitting static constexpr variables in constexpr functions

2022-11-15 Thread Jonathan Wakely via Gcc-patches
On Tue, 15 Nov 2022 at 23:36, Jason Merrill wrote: > > On 11/13/22 01:45, Jakub Jelinek wrote: > > On Fri, Nov 11, 2022 at 06:07:04PM +0100, Jakub Jelinek wrote: > >> The following patch on top of Marek's P2448 PR106649 patch > >> (mainly because that patch implements the previous __cpp_constexpr

Re: [PATCH 7/7] riscv: Add support for str(n)cmp inline expansion

2022-11-15 Thread Philipp Tomsich
On Tue, 15 Nov 2022 at 01:46, Kito Cheng wrote: > > Hi Christoph: > > > This patch implements expansions for the cmpstrsi and the cmpstrnsi > > builtins using Zbb instructions (if available). > > This allows to inline calls to strcmp() and strncmp(). > > > > The expansion basically emits a peeled

Re: [PATCH v3 1/3] libcpp: reject codepoints above 0x10FFFF

2022-11-15 Thread Jason Merrill via Gcc-patches
On 11/8/22 16:10, Ben Boeckel wrote: Unicode does not support such values because they are unrepresentable in UTF-16. libcpp/ * charset.cc: Reject encodings of codepoints above 0x10. UTF-16 does not support such codepoints and therefore all Unicode rejects such value

Re: [PATCH v3 2/3] libcpp: add a function to determine UTF-8 validity of a C string

2022-11-15 Thread Jason Merrill via Gcc-patches
On 11/8/22 16:10, Ben Boeckel wrote: This simplifies the interface for other UTF-8 validity detections when a simple "yes" or "no" answer is sufficient. libcpp/ * charset.cc: Add `_cpp_valid_utf8_str` which determines whether a C string is valid UTF-8 or not. * internal.

Re: [PATCH] c++: Reject UDLs in certain contexts [PR105300]

2022-11-15 Thread Jason Merrill via Gcc-patches
On 11/12/22 06:53, Marek Polacek wrote: In this PR, we are crashing because we've encountered a UDL where a string-literal is expected. This patch makes the parser reject string and character UDLs in all places where the grammar requires a string-literal and not a user-defined-string-literal. B

Re: [PATCH 2/5] c++: Set the locus of the function result decl

2022-11-15 Thread Jason Merrill via Gcc-patches
On 11/12/22 13:45, Bernhard Reutner-Fischer wrote: gcc/cp/ChangeLog: * decl.cc (start_function): Set the result decl source location to the location of the typespec. --- Bootstrapped and regtested on x86_86-unknown-linux with no regressions. Ok for trunk? Cc: Nathan Sidwell Cc

Re: [PATCH] c++, v2: Implement C++23 P2647R1 - Permitting static constexpr variables in constexpr functions

2022-11-15 Thread Jakub Jelinek via Gcc-patches
On Tue, Nov 15, 2022 at 06:36:38PM -0500, Jason Merrill wrote: > > Here is an updated patch that passed bootstrap/regtest, the only > > change is another testcase tweak. > > > > 2022-11-13 Jakub Jelinek > > > > gcc/c-family/ > > * c-cppbuiltin.cc (c_cpp_builtins): Bump __cpp_constexpr > >

Re: [PATCH] c++, v2: Implement C++23 P2647R1 - Permitting static constexpr variables in constexpr functions

2022-11-15 Thread Jason Merrill via Gcc-patches
On 11/13/22 01:45, Jakub Jelinek wrote: On Fri, Nov 11, 2022 at 06:07:04PM +0100, Jakub Jelinek wrote: The following patch on top of Marek's P2448 PR106649 patch (mainly because that patch implements the previous __cpp_constexpr feature test macro bump so this can't go in earlier; OT, P2280R4 do

Re: [PATCH] c++, v2: Implement CWG 2654 - Un-deprecation of compound volatile assignments

2022-11-15 Thread Jason Merrill via Gcc-patches
On 11/13/22 01:43, Jakub Jelinek wrote: On Fri, Nov 11, 2022 at 08:43:04AM +0100, Jakub Jelinek wrote: Again, because stage1 close is near, posting the following patch to implement CWG 2654. Ok for trunk if it passes bootstrap/regtest and is voted into C++23 and C++20 as a DR? Here is an upda

Re: [PATCH] c++, v2: Implement CWG2635 - Constrained structured bindings

2022-11-15 Thread Jason Merrill via Gcc-patches
On 11/13/22 01:50, Jakub Jelinek wrote: On Sat, Nov 12, 2022 at 12:23:56PM +0100, Jakub Jelinek wrote: The following patch implements CWG2635. So far tested on GXX_TESTSUITE_STDS=98,11,14,17,20,2b make check-g++ RUNTESTFLAGS="dg.exp=decomp*" ok for trunk if it passes full bootstrap/regtest and

[PATCH] doc: invoke: pru/riscv: Fix option list formatting

2022-11-15 Thread Christoph Muellner
From: Christoph Müllner This patch fixes a wrong placed closing bracket in the RISC-V option list and an unneeded @gol in the PRU option list in invoke.texi. gcc/ChangeLog: * doc/invoke.texi: Fix PRU/RISC-V option list formatting. Signed-off-by: Christoph Müllner --- gcc/doc/invoke.t

Re: [PATCH] doc: invoke: riscv: Fix closing block bracket

2022-11-15 Thread Christoph Müllner
On Tue, Nov 15, 2022 at 11:54 PM Andreas Schwab wrote: > On Nov 15 2022, Christoph Muellner wrote: > > > diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi > > index 057439a004c..dfac7c85844 100644 > > --- a/gcc/doc/invoke.texi > > +++ b/gcc/doc/invoke.texi > > @@ -1220,8 +1220,8 @@ See RS/60

Re: [PATCH] c++: Alignment changes to layout compatibility/common initial sequence - DR2583

2022-11-15 Thread Jason Merrill via Gcc-patches
On 11/14/22 01:28, Jakub Jelinek wrote: Hi! Working virtually out of Baker Island. When trying to figure out what to do about alignment, layout_compatible_type_p returns false if TYPE_ALIGN on ENUMERAL_TYPE/CLASS_TYPE_P (but not scalar types?) differ, or if members don't have the same positions

Re: [PATCH] doc: invoke: riscv: Fix closing block bracket

2022-11-15 Thread Andreas Schwab
On Nov 15 2022, Christoph Muellner wrote: > diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi > index 057439a004c..dfac7c85844 100644 > --- a/gcc/doc/invoke.texi > +++ b/gcc/doc/invoke.texi > @@ -1220,8 +1220,8 @@ See RS/6000 and PowerPC Options. > -malign-data=@var{type} @gol > -mbig-endia

[PATCH] doc: invoke: riscv: Fix closing block bracket

2022-11-15 Thread Christoph Muellner
From: Christoph Müllner This patch fixes a wrong placed closing bracket in the RISC-V section of invoke.texi. gcc/ChangeLog: * doc/invoke.texi: Fix closing block bracket Signed-off-by: Christoph Müllner --- gcc/doc/invoke.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

Re: [PATCH 7/7] riscv: Add support for str(n)cmp inline expansion

2022-11-15 Thread Christoph Müllner
On Tue, Nov 15, 2022 at 1:46 AM Kito Cheng wrote: > Hi Christoph: > > > This patch implements expansions for the cmpstrsi and the cmpstrnsi > > builtins using Zbb instructions (if available). > > This allows to inline calls to strcmp() and strncmp(). > > > > The expansion basically emits a peeled

Re: [PATCH] RISC-V: Zihintpause: add __builtin_riscv_pause

2022-11-15 Thread Philipp Tomsich
On Tue, 15 Nov 2022 at 17:40, Jeff Law wrote: > > > On 11/13/22 13:41, Philipp Tomsich wrote: > > The Zihintpause extension uses an opcode from the 'fence' opcode range > > to add a true hint instruction (i.e. if it is not supported on any > > given platform, the 'fence' that is encoded will not e

Re: [PATCH v2] c++: Disable -Wignored-qualifiers for template args [PR107492]

2022-11-15 Thread Jason Merrill via Gcc-patches
On 11/14/22 14:33, Marek Polacek wrote: On Thu, Nov 03, 2022 at 03:22:12PM -0400, Jason Merrill wrote: On 11/1/22 13:01, Marek Polacek wrote: It seems wrong to issue a -Wignored-qualifiers warning for code like: static_assert(!is_same_v); because there the qualifier matters. Likewise in

Re: [PATCH] c++, v2: Allow attributes on concepts - DR 2428

2022-11-15 Thread Jason Merrill via Gcc-patches
On 11/14/22 22:54, Jakub Jelinek wrote: On Tue, Nov 15, 2022 at 09:54:00AM +0100, Jakub Jelinek via Gcc-patches wrote: On Mon, Nov 14, 2022 at 07:00:54PM -0500, Jason Merrill wrote: The following patch adds parsing of attributes to concept definition, allows deprecated attribute to be specified

Re: [PATCH] c++: Fix up calls to static operator() or operator[] [PR107624]

2022-11-15 Thread Jason Merrill via Gcc-patches
On 11/15/22 02:28, Jakub Jelinek wrote: Hi! On Mon, Nov 14, 2022 at 06:29:44PM -0500, Jason Merrill wrote: Indeed. The code in build_new_method_call for this case has the comment /* In an expression of the form `a->f()' where `f' turns out to be a static membe

Re: [PATCH] RISC-V: Use .p2align for code-alignment

2022-11-15 Thread Philipp Tomsich
Jeff, On Tue, 15 Nov 2022 at 17:37, Jeff Law wrote: > > > On 11/13/22 13:41, Philipp Tomsich wrote: > > RISC-V's .p2align (currently) ignores the max-skip argument. As we > have experimental patches underway to address this in a > backwards-compatible manner, let's prepare GCC for the day when >

[PATCH] Fortran: ICE in simplification of array expression involving power [PR107680]

2022-11-15 Thread Harald Anlauf via Gcc-patches
Dear all, when constant expressions involve parentheses, array constructors, typespecs, and the power operator (**), we could fail with an ICE during simplification in arith_power. Debugging of the testcase showed we call the proper type conversions needed for the arithmetic operation, but under

Re: [PATCH Rust front-end v3 01/46] Use DW_ATE_UTF for the Rust 'char' type

2022-11-15 Thread Marc Poulhiès via Gcc-patches
Mark Wielaard writes: > https://code.wildebeest.org/git/user/mjw/gccrs/commit/?h=no-Rust-old > if someone wants to push that, to merge for a v4. Sorry, missed that part, taking care of merging it right now :) https://github.com/Rust-GCC/gccrs/pull/1649 Thanks, Marc

Re: [PATCH] RISC-V uninit-pred-9_b.c failure

2022-11-15 Thread Jeff Law via Gcc-patches
On 11/15/22 12:08, Kevin Lee wrote: The gimple generated by riscv is identical to that of powerpc64 currently. It seems like the change at r12-4790-4b3a325f07acebf47e82de227ce1d5ba62f5bcae also affected riscv64 like powerpc64 and cris. gcc/testsuite/ChangeLog: * gcc.dg/uninit-pred-9

[PATCH] RISC-V uninit-pred-9_b.c failure

2022-11-15 Thread Kevin Lee
The gimple generated by riscv is identical to that of powerpc64 currently. It seems like the change at r12-4790-4b3a325f07acebf47e82de227ce1d5ba62f5bcae also affected riscv64 like powerpc64 and cris. gcc/testsuite/ChangeLog: * gcc.dg/uninit-pred-9_b.c: Xfail for riscv64 --- gcc/testsui

[committed] bpf: avoid possible use of uninitialized variable

2022-11-15 Thread David Faust via Gcc-patches
Fix a maybe-uninitialized warning introduced in commit: 068baae1864 bpf: add preserve_field_info builtin Thanks to Jan-Benedict Glaw for pointing this out. Tested on bpf-unknown-none, committed as obvious. gcc/ * config/bpf/bpf.cc (bpf_expand_builtin): Avoid use of uninitialized

Re: [PATCH v2] analyzer: add warnings relating to sockets [PR106140]

2022-11-15 Thread David Malcolm via Gcc-patches
On Fri, 2022-11-11 at 22:27 -0500, David Malcolm wrote: > Changed in v2: ported doc changes from texinfo to sphinx > > Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. > > I can self-approve this patch, but it depends on the named constants > patch here: >   * [PATCH v2] c, analyzer

Re: why does gcc jit require pthread?

2022-11-15 Thread Jonathan Wakely via Gcc-patches
On Tue, 15 Nov 2022 at 18:50, David Malcolm wrote: > > [Fixing typo in the Subject ("git" -> "jit" ); CCing jit mailing list] > > On Fri, 2022-11-11 at 17:16 +, Jonathan Wakely wrote: > > On Mon, 7 Nov 2022 at 13:51, Jonathan Wakely wrote: > > > > > > On Mon, 7 Nov 2022 at 13:33, LIU Hao wrote

Re: why does gcc jit require pthread?

2022-11-15 Thread David Malcolm via Gcc-patches
[Fixing typo in the Subject ("git" -> "jit" ); CCing jit mailing list] On Fri, 2022-11-11 at 17:16 +, Jonathan Wakely wrote: > On Mon, 7 Nov 2022 at 13:51, Jonathan Wakely wrote: > > > > On Mon, 7 Nov 2022 at 13:33, LIU Hao wrote: > > > > > > 在 2022-11-07 20:57, Jonathan Wakely 写道: > > > > I

[Patch] nvptx/mkoffload.cc: Fix "$nohost" check

2022-11-15 Thread Tobias Burnus
Found when working on real reverse offload - as the reverse-offload stub function was added to the reverse-offload table. Reason - as mentioned in the commit log: lhd_set_decl_assembler_name. I intent to commit it tomorrow as obvious, unless there are further comments. Tobias - S

Re: [PATCH v3] c, analyzer: support named constants in analyzer [PR106302]

2022-11-15 Thread Marek Polacek via Gcc-patches
On Tue, Nov 15, 2022 at 01:35:05PM -0500, David Malcolm wrote: > On Mon, 2022-11-14 at 15:42 -0500, Marek Polacek wrote: > > On Fri, Nov 11, 2022 at 10:23:10PM -0500, David Malcolm wrote: > > > Changes since v1: ported the doc changes from texinfo to sphinx > > > > > > Successfully bootstrapped &

[PATCH v3] c, analyzer: support named constants in analyzer [PR106302]

2022-11-15 Thread David Malcolm via Gcc-patches
On Mon, 2022-11-14 at 15:42 -0500, Marek Polacek wrote: > On Fri, Nov 11, 2022 at 10:23:10PM -0500, David Malcolm wrote: > > Changes since v1: ported the doc changes from texinfo to sphinx > > > > Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. > > > > Are the C frontend parts OK f

Re: [PATCH] libstdc++: Enable building libstdc++.{a,so} when !HOSTED

2022-11-15 Thread Arsen Arsenović via Gcc-patches
Jonathan Wakely writes: > On Thu, 20 Oct 2022 at 16:53, Arsen Arsenović via Libstdc++ > wrote: >> >> This enables us to provide symbols for placeholders and numeric limits, > > > I'm not convinced this is worth doing. > > The placeholders and the numeric_limits members are all inline > variable

Re: [AArch64] Enable generation of FRINTNZ instructions

2022-11-15 Thread Richard Sandiford via Gcc-patches
"Andre Vieira (lists)" writes: > On 07/11/2022 11:05, Richard Biener wrote: >> On Fri, 4 Nov 2022, Andre Vieira (lists) wrote: >> >>> Sorry for the delay, just been reminded I still had this patch outstanding >>> from last stage 1. Hopefully since it has been mostly reviewed it could go >>> in >>

Re: [PATCH 2/2] aarch64: Add support for widening LDAPR instructions

2022-11-15 Thread Richard Sandiford via Gcc-patches
"Andre Vieira (lists)" writes: > Updated version of the patch to account for the testsuite changes in the > first patch. > > On 10/11/2022 11:20, Andre Vieira (lists) via Gcc-patches wrote: >> Hi, >> >> This patch adds support for the widening LDAPR instructions. >> >> Bootstrapped and regression

Re: [PATCH] Allow prologues and epilogues to be inserted later

2022-11-15 Thread Jeff Law via Gcc-patches
On 11/11/22 09:21, Richard Sandiford via Gcc-patches wrote: Arm's SME adds a new processor mode called streaming mode. This mode enables some new (matrix-oriented) instructions and disables several existing groups of instructions, such as most Advanced SIMD vector instructions and a much smalle

Re: [PATCH 3/8]middle-end: Support extractions of subvectors from arbitrary element position inside a vector

2022-11-15 Thread Richard Sandiford via Gcc-patches
Tamar Christina writes: >> -Original Message- >> From: Hongtao Liu >> Sent: Tuesday, November 15, 2022 9:37 AM >> To: Tamar Christina >> Cc: Richard Sandiford ; Tamar Christina via >> Gcc-patches ; nd ; >> rguent...@suse.de >> Subject: Re: [PATCH 3/8]middle-end: Support extractions of su

Re: [PATCH] RISC-V: Split "(a & (1UL << bitno)) ? 0 : 1" to bext + xori

2022-11-15 Thread Jeff Law via Gcc-patches
On 11/13/22 13:48, Philipp Tomsich wrote: We avoid reassociating "(~(a >> BIT_NO)) & 1" into "((~a) >> BIT_NO) & 1" by splitting it into a zero-extraction (bext) and an xori. This both avoids burning a register on a temporary and generates a sequence that clearly captures 'extract bit, then in

Re: [PATCH v2 0/2] Basic support for the Ventana VT1 w/ instruction fusion

2022-11-15 Thread Palmer Dabbelt
On Mon, 14 Nov 2022 23:25:54 PST (-0800), richard.guent...@gmail.com wrote: On Tue, Nov 15, 2022 at 12:01 AM Philipp Tomsich wrote: On Mon, 14 Nov 2022 at 23:47, Palmer Dabbelt wrote: > > [Trying to join the threads here.] > > On Mon, 14 Nov 2022 13:28:23 PST (-0800), philipp.toms...@vrull.eu

Re: [PATCH] RISC-V: Split "(a & (1UL << bitno)) ? 0 : -1" to bext + addi

2022-11-15 Thread Jeff Law via Gcc-patches
On 11/13/22 13:48, Philipp Tomsich wrote: For a straightforward application of bext for the following function long bext64(long a, char bitno) { return (a & (1UL << bitno)) ? 0 : -1; } we generate srl a0,a0,a1# 7 [c=4 l=4] lshrdi3 andia0,a0,1 #

[PATCH] testsuite: Fix missing EFFECTIVE_TARGETS variable errors

2022-11-15 Thread Maciej W. Rozycki
Permit running vector tests outside `check_vect_support_and_set_flags' environment, removing errors such as: ERROR: gcc.dg/analyzer/torture/pr93350.c -O0 : can't read "EFFECTIVE_TARGETS": no such variable for " dg-require-effective-target 1 vect_int " or: ERROR: gcc.dg/bic-bitmask-13.c: err

Re: [PATCH] RISC-V: Zihintpause: add __builtin_riscv_pause

2022-11-15 Thread Jeff Law via Gcc-patches
On 11/13/22 13:41, Philipp Tomsich wrote: The Zihintpause extension uses an opcode from the 'fence' opcode range to add a true hint instruction (i.e. if it is not supported on any given platform, the 'fence' that is encoded will not enforce any specific ordering on memory accesses) for entering

Re: [PATCH] RISC-V: Use .p2align for code-alignment

2022-11-15 Thread Jeff Law via Gcc-patches
On 11/13/22 13:41, Philipp Tomsich wrote: RISC-V's .p2align (currently) ignores the max-skip argument. As we have experimental patches underway to address this in a backwards-compatible manner, let's prepare GCC for the day when binutils gets updated. gcc/ChangeLog: * config/riscv/ri

Re: [RFC PATCH] ipa-guarded-deref: Add new pass to dereference function pointers

2022-11-15 Thread Jeff Law via Gcc-patches
On 11/14/22 08:38, Christoph Müllner wrote: Ok, I will add the check. Still, I don't think that the optimization changes the behavior in the case of different ABIs (i.e. the situation is problematic regardless if there is an indirect call or a guarded direct call). What could be done addition

[PATCH] [range-ops] Minor readability fix.

2022-11-15 Thread Aldy Hernandez via Gcc-patches
I know it's past the end of stage1, but I'm afraid we'll drag this around forever in the GCC12 branch, and it's an easy readbility fix. p.s. Or if you prefer: if (!lb_nan && !ub_nan && !maybe_nan && ) r.clear_nan (); OK for trunk? gcc/ChangeLog: * range-op-float.cc (range_operato

Re: [PATCH]middle-end: replace GET_MODE_WIDER_MODE with GET_MODE_NEXT_MODE

2022-11-15 Thread Jeff Law via Gcc-patches
On 11/15/22 07:54, Richard Sandiford via Gcc-patches wrote: Tamar Christina writes: -Original Message- From: Richard Sandiford Sent: Tuesday, November 15, 2022 11:59 AM To: Tamar Christina via Gcc-patches Cc: Tamar Christina ; nd ; rguent...@suse.de; j...@ventanamicro.com Subject: R

Re: [PATCH] Fix gdb FilteringTypePrinter (again)

2022-11-15 Thread Jonathan Wakely via Gcc-patches
On 06/10/22 19:38 +0200, François Dumont wrote: Hi Looks like the previous patch was not enough. When using it in the context of a build without dual abi and versioned namespace I started having failures again. I guess I hadn't rebuild everything properly. This time I think the problem was in t

Re: [PATCH 2/2] libstdc++: Move stream initialization into compiled library [PR44952]

2022-11-15 Thread Hans-Peter Nilsson via Gcc-patches
> From: Patrick Palka via Gcc-patches > Date: Fri, 4 Nov 2022 16:05:25 +0100 > This patch moves the global object for constructing the standard streams > out from and into the compiled library on targets that support > the init_priority attribute. This means that no longer > introduces a separ

Re: PING: [PATCH v6] tree-optimization/101186 - extend FRE with "equivalence map" for condition prediction

2022-11-15 Thread Jeff Law via Gcc-patches
On 11/15/22 03:44, Di Zhao OS via Gcc-patches wrote: Hi, I saw that Stage 1 of GCC 13 development is just ended. So is this considered? Or should I bring this up when general development is reopened? Yes, it can still be considered.  The guideline is the patch must be posted before stage1 c

Re: [PATCH] libstdc++: Enable building libstdc++.{a,so} when !HOSTED

2022-11-15 Thread Jonathan Wakely via Gcc-patches
On Thu, 20 Oct 2022 at 16:53, Arsen Arsenović via Libstdc++ wrote: > > This enables us to provide symbols for placeholders and numeric limits, I'm not convinced this is worth doing. The placeholders and the numeric_limits members are all inline variables for C++17 and later, and C++17 is the co

Re: [PATCH 2/2] arm: Add support for MVE Tail-Predicated Low Overhead Loops

2022-11-15 Thread Andre Vieira (lists) via Gcc-patches
On 11/11/2022 17:40, Stam Markianos-Wright via Gcc-patches wrote: Hi all, This is the 2/2 patch that contains the functional changes needed for MVE Tail Predicated Low Overhead Loops.  See my previous email for a general introduction of MVE LOLs. This support is added through the already exis

libsanitizer: sync from master

2022-11-15 Thread Martin Liška
Hi. I've just pushed libsanitizer update that was tested on x86_64-linux and ppc64le-linux systems. Moreover, I run bootstrap on x86_64-linux and checked ABI difference with abidiff. Pushed as r13-4068-g3037f11fb86eda. Cheers, Martin

Re: [committed] libstdc++: Fix detection of std::format support for __float128 [PR107693]

2022-11-15 Thread Jonathan Wakely via Gcc-patches
On Tue, 15 Nov 2022 at 14:42, Jakub Jelinek wrote: > > On Tue, Nov 15, 2022 at 02:31:19PM +, Jonathan Wakely via Gcc-patches > wrote: > > Tested x86_64-linux and x86_64-w64-mingw32. Pushed to trunk. > > > > -- >8 -- > > > > std::format gives linker errors on targets that define __float128 but

Re: [PATCH 2/2] Add a new warning option -Wstrict-flex-arrays.

2022-11-15 Thread Qing Zhao via Gcc-patches
Ping on this patch. thanks. Qing > On Nov 8, 2022, at 9:51 AM, Qing Zhao wrote: > > '-Wstrict-flex-arrays' > Warn about inproper usages of flexible array members according to > the LEVEL of the 'strict_flex_array (LEVEL)' attribute attached to > the trailing array field of a struct

[PING] Re: [PATCH v7 00/34] libgcc: Thumb-1 Floating-Point Assembly for Cortex M0

2022-11-15 Thread Daniel Engel
Hello, Is there still any interest in merging this patch? Thanks, Daniel On Mon, Oct 31, 2022, at 8:44 AM, Daniel Engel wrote: > Hi Richard, > > I am re-submitting my libgcc patch from 2021: > > https://gcc.gnu.org/pipermail/gcc-patches/2021-January/563585.html > https://gcc.gnu.org/p

Re: [PATCH]middle-end: replace GET_MODE_WIDER_MODE with GET_MODE_NEXT_MODE

2022-11-15 Thread Richard Sandiford via Gcc-patches
Tamar Christina writes: >> -Original Message- >> From: Richard Sandiford >> Sent: Tuesday, November 15, 2022 11:59 AM >> To: Tamar Christina via Gcc-patches >> Cc: Tamar Christina ; nd ; >> rguent...@suse.de; j...@ventanamicro.com >> Subject: Re: [PATCH]middle-end: replace GET_MODE_WIDER

Re: [committed] libstdc++: Fix detection of std::format support for __float128 [PR107693]

2022-11-15 Thread Jakub Jelinek via Gcc-patches
On Tue, Nov 15, 2022 at 02:31:19PM +, Jonathan Wakely via Gcc-patches wrote: > Tested x86_64-linux and x86_64-w64-mingw32. Pushed to trunk. > > -- >8 -- > > std::format gives linker errors on targets that define __float128 but > do not support using it with std::to_chars. This improves the ha

[committed] libstdc++: Fix std::format test for strict -std=c++20 mode

2022-11-15 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux and x86_64-w64-mingw32. Pushed to trunk. -- >8 -- Adjust a test to avoid using std::make_unsigned_t<__int128>. That's ill-formed in strict modes because std::is_integral_v<__int128> is false. libstdc++-v3/ChangeLog: * testsuite/std/format/functions/format.cc: Do not

[committed] libstc++: std::formattable concept should not be defined for C++20

2022-11-15 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux and x86_64-w64-mingw32. Pushed to trunk. -- >8 -- This concept was added by a C++23 proposal, so don't define it for C++20. Split the format/formatter/formatter.cc test into two parts, one that tests the C++20 requirements and one that tests the C++23 concept. libstdc++-v3/C

[committed] libstdc++: Fix detection of std::format support for __float128 [PR107693]

2022-11-15 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux and x86_64-w64-mingw32. Pushed to trunk. -- >8 -- std::format gives linker errors on targets that define __float128 but do not support using it with std::to_chars. This improves the handling of 128-bit flaoting-point types so they are disabled if unsupportable. libstdc++-v3/C

Re: [PATCH] LoongArch: Fix atomic_exchange make comparison and may jump out

2022-11-15 Thread Xi Ruoyao via Gcc-patches
On Tue, 2022-11-15 at 21:03 +0800, Jinyang He wrote: > gcc/ChangeLog: > > * config/loongarch/sync.md: > Add atomic_cas_value_exchange_and_7 and fix atomic_exchange. nit: * config/loongarch/sync.md (atomic_cas_value_exchange_and_7):  New define_insn. (atomic_exchange): Use

Re: [PATCH] doc: Reword the description of -mrelax-cmpxchg-loop [PR 107676]

2022-11-15 Thread Alexander Monakov via Gcc-patches
On Tue, 15 Nov 2022, Jonathan Wakely wrote: > > How about the following: > > > > When emitting a compare-and-swap loop for @ref{__sync Builtins} > > and @ref{__atomic Builtins} lacking a native instruction, optimize > > for the highly contended case by issuing an atomic load before the > > @code

Re: [PATCH] [PR68097] Try to avoid recursing for floats in tree_*_nonnegative_warnv_p.

2022-11-15 Thread Aldy Hernandez via Gcc-patches
On Mon, Nov 14, 2022 at 10:12 AM Richard Biener wrote: > > On Sat, Nov 12, 2022 at 7:30 PM Aldy Hernandez wrote: > > > > It irks me that a PR named "we should track ranges for floating-point > > hasn't been closed in this release. This is an attempt to do just > > that. > > > > As mentioned in t

Re: [PATCH Rust front-end v3 38/46] gccrs: Add HIR to GCC GENERIC lowering entry point

2022-11-15 Thread Arthur Cohen
On 11/9/22 14:53, Richard Biener wrote: On Wed, Oct 26, 2022 at 10:37 AM wrote: From: Philip Herron This patch contains the entry point and utilities used for the lowering of HIR nodes to `tree`s. It also contains a constant evaluator, ported over from the C++ frontend. Co-authored-by: Da

Re: [PATCH] doc: Reword the description of -mrelax-cmpxchg-loop [PR 107676]

2022-11-15 Thread Jonathan Wakely via Gcc-patches
On Tue, 15 Nov 2022 at 13:34, Alexander Monakov wrote: > > On Tue, 15 Nov 2022, Jonathan Wakely via Gcc-patches wrote: > > > > @item -mrelax-cmpxchg-loop > > > @opindex mrelax-cmpxchg-loop > > >-Relax cmpxchg loop by emitting an early load and compare before cmpxchg, > > >-execute pause if load va

  1   2   >