Re: [PATCH] bitint: Handle BIT_FIELD_REF lowering [PR114157]

2024-03-05 Thread Jakub Jelinek
On Tue, Mar 05, 2024 at 09:27:22AM +0100, Richard Biener wrote: > On Tue, 5 Mar 2024, Jakub Jelinek wrote: > > The following patch adds support for BIT_FIELD_REF lowering with > > large/huge _BitInt lhs. BIT_FIELD_REF requires mode argument first > > operand, so the operand shouldn't be any huge

Re: [PATCH] lower-subreg: Fix ROTATE handling [PR114211]

2024-03-05 Thread Jakub Jelinek
On Tue, Mar 05, 2024 at 09:29:38AM +0100, Richard Biener wrote: > I wonder if we need to care about extra temporaries on RTL before > RA, thus whether always using a temporary would be OK? I'd still need to do the resolve_reg_p check, otherwise if it is e.g. a memory, the copying to temporary

Re: [PATCH] bitint: Handle BIT_FIELD_REF lowering [PR114157]

2024-03-05 Thread Richard Biener
On Tue, 5 Mar 2024, Jakub Jelinek wrote: > On Tue, Mar 05, 2024 at 09:27:22AM +0100, Richard Biener wrote: > > On Tue, 5 Mar 2024, Jakub Jelinek wrote: > > > The following patch adds support for BIT_FIELD_REF lowering with > > > large/huge _BitInt lhs. BIT_FIELD_REF requires mode argument first

[PATCH v1] RISC-V: Cleanup unused code in riscv_v_adjust_bytesize [NFC]

2024-03-05 Thread pan2 . li
From: Pan Li Cleanup mode_size related code which is not used anymore. Below tests are passed for this patch. * The RVV fully regresssion test. gcc/ChangeLog: * config/riscv/riscv.cc (riscv_v_adjust_bytesize): Cleanup unused mode_size related code. Signed-off-by: Pan Li ---

Re: RE:[PATCH 3/5] RISC-V: Support vmfxx.vf for autovec comparison of vec and imm

2024-03-05 Thread juzhe.zh...@rivai.ai
Yes. I think we are lacking some combine patterns to do all vector-scalar combinations. If you are interested at this topic, you can do some investigations on that (I believe currently no body works on it for now). I bet we should add some patterns for late-combine PASS for example: (set (plus

Re: [PATCH] lower-subreg: Fix ROTATE handling [PR114211]

2024-03-05 Thread Richard Biener
On Tue, 5 Mar 2024, Jakub Jelinek wrote: > Hi! > > On the following testcase, we have > (insn 10 7 11 2 (set (reg/v:TI 106 [ h ]) > (rotate:TI (reg/v:TI 106 [ h ]) > (const_int 64 [0x40]))) "pr114211.c":8:5 1042 > {rotl64ti2_doubleword} > (nil)) > before subreg1 and the

Re: [PATCH v2] Draft|Internal-fn: Introduce internal fn saturation US_PLUS

2024-03-05 Thread Richard Biener
On Tue, Mar 5, 2024 at 8:09 AM Li, Pan2 wrote: > > Thanks Richard for comments. > > > I do wonder what the existing usadd patterns with integer vector modes > > in various targets do? > > Those define_insn will at least not end up in the optab set I guess, > > so they must end up > > being either

RE: Re:[PATCH 3/5] RISC-V: Support vmfxx.vf for autovec comparison of vec and imm

2024-03-05 Thread Demin Han
Hi, I applied the mentioned last_combine patch(https://patchwork.ozlabs.org/project/gcc/patch/mptbka7em9w@arm.com/). And did some initial tests. Found that: 1. Float vector-scalar and vector-imm are OK 2. Integer vector-scalar is OK 3. Integer vector-imm(e.g. a[i] > 16) is

[PATCH, V3] ctf: fix incorrect CTF for multi-dimensional array types

2024-03-05 Thread Indu Bhagat
From: Cupertino Miranda [Changes from V2] - Fixed aarch64 new FAILs reported by Linaro CI. - Fixed typos and other nits pointed out in V2. [End of changes from V2] PR debug/114186 DWARF DIEs of type DW_TAG_subrange_type are linked together to represent the information about the subsequent

Re: [PATCH v1] RISC-V: Cleanup unused code in riscv_v_adjust_bytesize [NFC]

2024-03-05 Thread juzhe.zh...@rivai.ai
LGTM. Thanks for clean up. juzhe.zh...@rivai.ai From: pan2.li Date: 2024-03-05 16:59 To: gcc-patches CC: juzhe.zhong; kito.cheng; yanzhang.wang; Pan Li Subject: [PATCH v1] RISC-V: Cleanup unused code in riscv_v_adjust_bytesize [NFC] From: Pan Li Cleanup mode_size related code which is not

RE: [PATCH v1] RISC-V: Cleanup unused code in riscv_v_adjust_bytesize [NFC]

2024-03-05 Thread Li, Pan2
Committed, thanks Juzhe. Pan From: juzhe.zh...@rivai.ai Sent: Tuesday, March 5, 2024 5:15 PM To: Li, Pan2 ; gcc-patches Cc: kito.cheng ; Wang, Yanzhang ; Li, Pan2 Subject: Re: [PATCH v1] RISC-V: Cleanup unused code in riscv_v_adjust_bytesize [NFC] LGTM. Thanks for clean up.

[PATCH v2] LoongArch: Fix inconsistent description in *sge_

2024-03-05 Thread Guo Jie
The constraint of op[1] is inconsistent with the output template. gcc/ChangeLog: * config/loongarch/loongarch.md (define_insn "*sge_"): Fix inconsistency error. --- Update in v2: Remove useless support for op[1] is const_imm12_operand. ---

Re: [PATCH] bitint: Handle BIT_FIELD_REF lowering [PR114157]

2024-03-05 Thread Richard Biener
On Tue, 5 Mar 2024, Jakub Jelinek wrote: > Hi! > > The following patch adds support for BIT_FIELD_REF lowering with > large/huge _BitInt lhs. BIT_FIELD_REF requires mode argument first > operand, so the operand shouldn't be any huge _BitInt. > If we only access limbs from inside of

Re: [PATCH] middle-end/113680 - Optimize (x - y) CMP 0 as x CMP y

2024-03-05 Thread Richard Biener
On Mon, Mar 4, 2024 at 9:40 PM Ken Matsui wrote: > > (x - y) CMP 0 is equivalent to x CMP y where x and y are signed > integers and CMP is <, <=, >, or >=. Similarly, 0 CMP (x - y) is > equivalent to y CMP x. As reported in PR middle-end/113680, this > equivalence does not hold for types other

[PATCH v3] testsuite: Add a test case for negating FP vectors containing zeros

2024-03-05 Thread Xi Ruoyao
Recently I've fixed two wrong FP vector negate implementation which caused wrong sign bits in zeros in targets (r14-8786 and r14-8801). To prevent a similar issue from happening again, add a test case. Tested on x86_64 (with SSE2, AVX, AVX2, and AVX512F), AArch64, MIPS (with MSA), LoongArch

[PATCH] tree-optimization/114231 - use patterns for BB SLP discovery root stmts

2024-03-05 Thread Richard Biener
The following makes sure to use recognized patterns when vectorizing roots during BB SLP discovery. We need to apply those late since during root discovery we've not yet done pattern recognition. All parts of the vectorizer assume patterns get used, for the testcase we mix this up when doing live

Re: CI for "Option handling: add documentation URLs"

2024-03-05 Thread Mark Wielaard
Hi, On Mon, 2024-03-04 at 08:48 -0500, David Malcolm wrote: > > I have now regenerated the patch to also include the new avr mfuse- > > add change. It would be nice to get this committed so we can turn on the > > automatic checker. > > Please go ahead with that. I committed that patch, but was

Re: [PATCH v2] testsuite, arm: Fix testcase arm/pr112337.c to check for the options first

2024-03-05 Thread Saurabh Jha
Ping On 2/19/2024 10:11 AM, Saurabh Jha wrote: On 2/9/2024 2:57 PM, Richard Earnshaw (lists) wrote: On 30/01/2024 17:07, Saurabh Jha wrote: Hey, Previously, this test was added to fix this bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112337. However, it did not check the compilation

RE: RE:[PATCH 3/5] RISC-V: Support vmfxx.vf for autovec comparison of vec and imm

2024-03-05 Thread Demin Han
OK, I will solve the comparison operation first and then do some check over other operations. Regards, Demin From: juzhe.zh...@rivai.ai Sent: 2024年3月5日 17:02 To: Demin Han ; gcc-patches Cc: kito.cheng ; pan2.li ; jeffreyalaw ; Robin Dapp ; richard.sandiford Subject: Re: RE:[PATCH 3/5]

Re: [PATCH v2] LoongArch: Fix inconsistent description in *sge_

2024-03-05 Thread Xi Ruoyao
On Tue, 2024-03-05 at 16:05 +0800, Guo Jie wrote: > The constraint of op[1] is inconsistent with the output template. > > gcc/ChangeLog: > > * config/loongarch/loongarch.md > (define_insn "*sge_"): Fix inconsistency > error. > > --- > Update in v2: >     Remove useless support

[patch,avr,applied] Improve output of insn "*insv.any_shift.".

2024-03-05 Thread Georg-Johann Lay
Applied Roger's proposed improvements with some changes: Lengthy code is more convenient in avr.cc than in an insn output function, and it makes it easy to work out the exact instruction length. Moreover, the code can handle shifts with offset zero (cases of *and3 insns). Passed with no new

[PATCH v2] LoongArch: Allow s9 as a register alias

2024-03-05 Thread Xi Ruoyao
The psABI allows using s9 as an alias of r22. gcc/ChangeLog: * config/loongarch/loongarch.h (ADDITIONAL_REGISTER_NAMES): Add s9 as an alias of r22. --- v1 -> v2: Add a test case. Ok for trunk? gcc/config/loongarch/loongarch.h | 1 +

Re: [PATCH v2] LoongArch: Allow s9 as a register alias

2024-03-05 Thread chenglulu
在 2024/3/5 下午7:50, Xi Ruoyao 写道: The psABI allows using s9 as an alias of r22. gcc/ChangeLog: * config/loongarch/loongarch.h (ADDITIONAL_REGISTER_NAMES): Add s9 as an alias of r22. --- v1 -> v2: Add a test case. Ok for trunk? Ok. Thanks!

Re: [PATCH] c++: Don't set DECL_CONTEXT to nested template-template parameters [PR98881]

2024-03-05 Thread Patrick Palka
On Tue, 5 Mar 2024, Nathaniel Shead wrote: > On Mon, Mar 04, 2024 at 10:07:33PM -0500, Patrick Palka wrote: > > On Tue, 5 Mar 2024, Nathaniel Shead wrote: > > > > > On Mon, Mar 04, 2024 at 09:26:00PM -0500, Patrick Palka wrote: > > > > On Tue, 5 Mar 2024, Nathaniel Shead wrote: > > > > > > > >

[patch,avr,applied] Add two RTL peepholes.

2024-03-05 Thread Georg-Johann Lay
Register alloc may expand a 3-operand arithmetic X = Y o CST as X = CST X o= Y where it may be better to instead: X = Y X o= CST Johann -- AVR: Add two RTL peepholes. Register alloc may expand a 3-operand arithmetic X = Y o CST as X = CST X o= Y where it may be better to

Re: [PATCH] middle-end/113576 - avoid out-of-bound vector element access

2024-03-05 Thread Jeff Law
On 2/6/24 04:37, Richard Biener wrote: The following avoids accessing out-of-bound vector elements when native encoding a boolean vector with sub-BITS_PER_UNIT precision elements. The error was basing the number of elements to extract on the rounded up total byte size involved and the patch

Frontend access to target features (was Re: [PATCH] libgccjit: Add ability to get CPU features)

2024-03-05 Thread David Malcolm
On Thu, 2023-11-09 at 19:33 -0500, Antoni Boucher wrote: > Hi. > See answers below. > > On Thu, 2023-11-09 at 18:04 -0500, David Malcolm wrote: > > On Thu, 2023-11-09 at 17:27 -0500, Antoni Boucher wrote: > > > Hi. > > > This patch adds support for getting the CPU features in libgccjit > > > (bug

Re: [PATCH] c++/modules: local class merging [PR99426]

2024-03-05 Thread Patrick Palka
On Tue, 27 Feb 2024, Patrick Palka wrote: > On Mon, 26 Feb 2024, Patrick Palka wrote: > > > Bootstrapped and regtested on x86_64-pc-linux-gnu, does this approach > > look reasonable? > > > > -- >8 -- > > > > One known missing piece in the modules implementation is merging of a > > streamed-in

Re: [PATCH v2] testsuite, arm: Fix testcase arm/pr112337.c to check for the options first

2024-03-05 Thread Richard Earnshaw (lists)
On 19/02/2024 10:11, Saurabh Jha wrote: > > On 2/9/2024 2:57 PM, Richard Earnshaw (lists) wrote: >> On 30/01/2024 17:07, Saurabh Jha wrote: >>> Hey, >>> >>> Previously, this test was added to fix this bug: >>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112337. However, it did not >>> check

Re: [PATCH] c++/modules: befriending template from current class scope

2024-03-05 Thread Patrick Palka
On Mon, 26 Feb 2024, Patrick Palka wrote: > Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look > OK for trunk? Ping. > > -- >8 -- > > Here the TEMPLATE_DECL representing the template friend declaration for > B has class scope since B has class scope, but get_merge_kind assumes

Re: [PATCH] middle-end/113680 - Optimize (x - y) CMP 0 as x CMP y

2024-03-05 Thread Richard Biener
On Tue, Mar 5, 2024 at 1:51 PM Ken Matsui wrote: > > On Tue, Mar 5, 2024 at 12:38 AM Richard Biener > wrote: > > > > On Mon, Mar 4, 2024 at 9:40 PM Ken Matsui wrote: > > > > > > (x - y) CMP 0 is equivalent to x CMP y where x and y are signed > > > integers and CMP is <, <=, >, or >=.

[PATCH] doc: Fix docs for -dD regarding predefined macros

2024-03-05 Thread Jonathan Wakely
OK for trunk? Or am I missing something and the docs are right? (sometimes? always?) -- >8 -- The manual has always claimed that -dD differs from -dM by not outputting predefined macros, but that's untrue. It has been untrue since at least GCC 3.2 and probably even older. gcc/ChangeLog:

Re: [PATCH] middle-end/113680 - Optimize (x - y) CMP 0 as x CMP y

2024-03-05 Thread Ken Matsui
On Tue, Mar 5, 2024 at 12:38 AM Richard Biener wrote: > > On Mon, Mar 4, 2024 at 9:40 PM Ken Matsui wrote: > > > > (x - y) CMP 0 is equivalent to x CMP y where x and y are signed > > integers and CMP is <, <=, >, or >=. Similarly, 0 CMP (x - y) is > > equivalent to y CMP x. As reported in PR

Re: CI for "Option handling: add documentation URLs"

2024-03-05 Thread David Malcolm
On Tue, 2024-03-05 at 13:06 +0100, Mark Wielaard wrote: > Hi, > > On Mon, 2024-03-04 at 08:48 -0500, David Malcolm wrote: > > > I have now regenerated the patch to also include the new avr > > > mfuse- > > > add change. It would be nice to get this committed so we can turn > > > on the > > >

[PATCH] LoongArch: testsuite: Rewrite {x, }vfcmp-{d, f}.c to avoid named registers

2024-03-05 Thread Xi Ruoyao
Loops on named vector register are not vectorized (see comment 11 of PR113622), so the these test cases have been failing for a while. Rewrite them using check-function-bodies to remove hard coding register names. A barrier is needed to always load the first operand before the second operand.

Re: [PATCH] doc: Fix docs for -dD regarding predefined macros

2024-03-05 Thread Jakub Jelinek
On Tue, Mar 05, 2024 at 04:16:00PM +, Jonathan Wakely wrote: > OK for trunk? > > Or am I missing something and the docs are right? (sometimes? always?) > > > -- >8 -- > > The manual has always claimed that -dD differs from -dM by not > outputting predefined macros, but that's untrue. It

Re: [C++ coroutines] Initial implementation pushed to master.

2024-03-05 Thread H.J. Lu
On Sat, Jan 18, 2020 at 4:54 AM Iain Sandoe wrote: > > Hi, > > Thanks to: > >* the reviewers, the code was definitely improved by your reviews. > >* those folks who tested the branch and/or compiler explorer > instance and reported problems with reproducers. > > * WG21 colleagues,

[PATCH] arm: check for low register before applying peephole [PR113510]

2024-03-05 Thread Richard Earnshaw
For thumb1, when using a peephole to fuse mov reg, #const add reg, reg, SP into add reg, SP, #const we must first check that reg is a low register, otherwise we will ICE when trying to recognize the resulting insn. gcc/ChangeLog: PR target/113510 *

Re: [PATCH, V3] ctf: fix incorrect CTF for multi-dimensional array types

2024-03-05 Thread David Faust
On 3/5/24 00:47, Indu Bhagat wrote: > From: Cupertino Miranda > > [Changes from V2] > - Fixed aarch64 new FAILs reported by Linaro CI. > - Fixed typos and other nits pointed out in V2. > [End of changes from V2] OK, thanks. > > PR debug/114186 > > DWARF DIEs of type

[pushed] aarch64: Remove SME2.1 forms of LUTI2/4

2024-03-05 Thread Richard Sandiford
I was over-eager when adding support for strided SME2 instructions and accidentally included forms of LUTI2 and LUTI4 that are only available with SME2.1, not SME2. This patch removes them for now. We're planning to add proper support for SME2.1 in the GCC 15 timeframe. Sorry for the blunder :(

[PATCH] asan: Handle poly-int sizes in ASAN_MARK [PR97696]

2024-03-05 Thread Richard Sandiford
This patch makes the expansion of IFN_ASAN_MARK let through poly-int-sized objects. The expansion itself was already generic enough, but the tests for the fast path were too strict. Bootstrapped & regression tested on aarch64-linux-gnu. Is this OK for trunk now, or should it wait for GCC 15?

Re: [PATCH] asan: Handle poly-int sizes in ASAN_MARK [PR97696]

2024-03-05 Thread Jakub Jelinek
On Tue, Mar 05, 2024 at 06:03:41PM +, Richard Sandiford wrote: > This patch makes the expansion of IFN_ASAN_MARK let through > poly-int-sized objects. The expansion itself was already generic > enough, but the tests for the fast path were too strict. > > Bootstrapped & regression tested on

Re: [PATCH] asan: Handle poly-int sizes in ASAN_MARK [PR97696]

2024-03-05 Thread Richard Sandiford
Jakub Jelinek writes: > On Tue, Mar 05, 2024 at 06:03:41PM +, Richard Sandiford wrote: >> This patch makes the expansion of IFN_ASAN_MARK let through >> poly-int-sized objects. The expansion itself was already generic >> enough, but the tests for the fast path were too strict. >> >>

Re: [PATCH] asan: Handle poly-int sizes in ASAN_MARK [PR97696]

2024-03-05 Thread Jakub Jelinek
On Tue, Mar 05, 2024 at 07:49:21PM +, Richard Sandiford wrote: > Jakub Jelinek writes: > > On Tue, Mar 05, 2024 at 06:30:40PM +, Richard Sandiford wrote: > >> (1) Keep the test where it is, taking advantage of the current SVE > >> handling in aarch64-sve.exp, and add: > >> > >>

Re: [PATCH v6] C, ObjC: Add -Wunterminated-string-initialization

2024-03-05 Thread Alejandro Colomar
On Tue, Mar 05, 2024 at 09:20:42PM +0100, Alejandro Colomar wrote: > Hi! > > v6: > - Small wording fix in c.opt > - Document the option in invoke.texi > > I tried again, but didn't find much alphabetic order in there, so put > it where Mike suggested, after -Warray-bounds=n. > > Have a

Re: [patch, libgfortran] Part 2: PR105456 Child I/O does not propage iostat

2024-03-05 Thread Harald Anlauf
Hi Jerry, I think there is the risk of buffer overrun in the following places: + char message[IOMSG_LEN]; + child_iomsg_len = string_len_trim (IOMSG_LEN, child_iomsg) + 1; free_line (dtp); snprintf (message, child_iomsg_len, child_iomsg);

Re: CI for "Option handling: add documentation URLs"

2024-03-05 Thread Mark Wielaard
On Tue, Mar 05, 2024 at 08:34:31AM -0500, David Malcolm wrote: > > I committed that patch, but was not fast enough actually enabling the > > buildbot and missed another fixlet needed first. > > > > OK, to push the attached regeneration patch? > > Yes Thanks, pushed. And now also pushed the

[PATCH] c++: ICE with noexcept and local specialization [PR114114]

2024-03-05 Thread Marek Polacek
Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- Here we ICE because we call register_local_specialization while local_specializations is null, so local_specializations->put (); crashes on null this. It's null since maybe_instantiate_noexcept calls push_to_top_level

Re: [PATCH] doc: Fix docs for -dD regarding predefined macros

2024-03-05 Thread Jonathan Wakely
On Tue, 5 Mar 2024 at 18:31, Joseph Myers wrote: > > On Tue, 5 Mar 2024, Jakub Jelinek wrote: > > > I can't bisect that far, supposedly predefined macros weren't included back > > in 1996 when this was written but maybe it changed in 1999 or even earlier. > > It looks like this changed in 3.0 (so

Re: [PATCHv2] fwprop: Avoid volatile defines to be propagated

2024-03-05 Thread Richard Sandiford
HAO CHEN GUI writes: > Hi, > This patch tries to fix a potential problem which is raised by the patch > for PR111267. The volatile asm operand tries to be propagated to a single > set insn with the patch for PR111267. The volatile asm operand might be > executed for multiple times if the define

[PATCH v6] C, ObjC: Add -Wunterminated-string-initialization

2024-03-05 Thread Alejandro Colomar
Warn about the following: char s[3] = "foo"; Initializing a char array with a string literal of the same length as the size of the array is usually a mistake. Rarely is the case where one wants to create a non-terminated character sequence from a string literal. In some cases, for writing

Re: [PATCH] tree-profile: Don't instrument an IFUNC resolver nor its callees

2024-03-05 Thread H.J. Lu
On Thu, Feb 29, 2024 at 7:11 AM H.J. Lu wrote: > > On Thu, Feb 29, 2024 at 7:06 AM Jan Hubicka wrote: > > > > > > I am worried about scenario where ifunc selector calls function foo > > > > defined locally and foo is also used from other places possibly in hot > > > > loops. > > > > > > > > > >

Re: [PATCH] asan: Handle poly-int sizes in ASAN_MARK [PR97696]

2024-03-05 Thread Jakub Jelinek
On Tue, Mar 05, 2024 at 06:30:40PM +, Richard Sandiford wrote: > (1) Keep the test where it is, taking advantage of the current SVE > handling in aarch64-sve.exp, and add: > > /* { dg-skip-if "" { no_fsanitize_address } } */ I'd go with this. asan/ directory for test would be

[PATCH v7] C, ObjC: Add -Wunterminated-string-initialization

2024-03-05 Thread Alejandro Colomar
Warn about the following: char s[3] = "foo"; Initializing a char array with a string literal of the same length as the size of the array is usually a mistake. Rarely is the case where one wants to create a non-terminated character sequence from a string literal. In some cases, for writing

Re: [patch, libgfortran] Part 2: PR105456 Child I/O does not propage iostat

2024-03-05 Thread Harald Anlauf
Hi Jerry, on further thought, do we sanitize 'child_iomsg'? We pass it to snprintf as format. Wouldn't a strncpy be sufficient? Harald On 3/5/24 22:37, Harald Anlauf wrote: Hi Jerry, I think there is the risk of buffer overrun in the following places: + char

[PATCH] c++: Fix template deduction for conversion operators with xobj parameters [PR113629]

2024-03-05 Thread Nathaniel Shead
Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? -- >8 -- Unification for conversion operators (DEDUCE_CONV) doesn't perform transformations like handling forwarding references. This is correct in general, but not for xobj parameters, which should be handled "normally" for the

Re: [PATCH] doc: Fix docs for -dD regarding predefined macros

2024-03-05 Thread Joseph Myers
On Tue, 5 Mar 2024, Jakub Jelinek wrote: > I can't bisect that far, supposedly predefined macros weren't included back > in 1996 when this was written but maybe it changed in 1999 or even earlier. It looks like this changed in 3.0 (so probably with the move to cpplib to provide the default

Re: [PATCH] asan: Handle poly-int sizes in ASAN_MARK [PR97696]

2024-03-05 Thread Richard Sandiford
Jakub Jelinek writes: > On Tue, Mar 05, 2024 at 06:30:40PM +, Richard Sandiford wrote: >> (1) Keep the test where it is, taking advantage of the current SVE >> handling in aarch64-sve.exp, and add: >> >> /* { dg-skip-if "" { no_fsanitize_address } } */ > > I'd go with this. asan/

[PATCH] Fortran: error recovery while simplifying expressions [PR103707,PR106987]

2024-03-05 Thread Harald Anlauf
Dear all, error recovery on arithmetic errors during simplification has bugged me for a long time, especially since the occurence of ICEs depended on whether -frange-check is specified or not, whether array ctors were involved, etc. I've now come up with the attached patch that classifies the

Re: [patch, libgfortran] Part 2: PR105456 Child I/O does not propage iostat

2024-03-05 Thread rep . dot . nop
On 5 March 2024 04:15:12 CET, Jerry D wrote: > >Attached is the revised patch using the already available string_len_trim >function. > >This hunk is only executed if a user has not passed an iostat or iomsg >variable in the parent I/O statement and an error is triggered which >terminates

[PATCH v2] tree-profile: Don't instrument an IFUNC resolver nor its callees

2024-03-05 Thread H.J. Lu
We can't instrument an IFUNC resolver nor its callees as it may require TLS which hasn't been set up yet when the dynamic linker is resolving IFUNC symbols. Add an IFUNC resolver caller marker to cgraph_node and set it if the function is called by an IFUNC resolver. Update tree_profiling to skip

Re: [PATCH v7] C, ObjC: Add -Wunterminated-string-initialization

2024-03-05 Thread Sandra Loosemore
On 3/5/24 13:33, Alejandro Colomar wrote: Warn about the following: char s[3] = "foo"; Initializing a char array with a string literal of the same length as the size of the array is usually a mistake. Rarely is the case where one wants to create a non-terminated character sequence from

Re: [PATCH] c++: Fix template deduction for conversion operators with xobj parameters [PR113629]

2024-03-05 Thread Jason Merrill
On 3/5/24 17:47, Nathaniel Shead wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? -- >8 -- Unification for conversion operators (DEDUCE_CONV) doesn't perform transformations like handling forwarding references. This is correct in general, but not for xobj parameters,

Re: [PATCH] c++: ICE with noexcept and local specialization [PR114114]

2024-03-05 Thread Jason Merrill
On 3/5/24 15:56, Marek Polacek wrote: Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? OK. -- >8 -- Here we ICE because we call register_local_specialization while local_specializations is null, so local_specializations->put (); crashes on null this. It's null since

[PATCH] LoongArch: Use /lib instead of /lib64 as the library search path for MUSL.

2024-03-05 Thread Yang Yujie
gcc/ChangeLog: * config.gcc: Add a case for loongarch*-*-linux-musl*. * config/loongarch/linux.h: Disable the multilib-compatible treatment for *musl* targets. * config/loongarch/musl.h: New file. --- gcc/config.gcc | 3 +++

Re: [PATCH] c++/modules: befriending template from current class scope

2024-03-05 Thread Jason Merrill
On 2/26/24 15:52, Patrick Palka wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? OK. -- >8 -- Here the TEMPLATE_DECL representing the template friend declaration for B has class scope since B has class scope, but get_merge_kind assumes all

Re: [PATCH] MAINTAINERS: Add myself to write after approval

2024-03-05 Thread juzhe.zh...@rivai.ai
Hi, han. I think you can commit this patch: https://gcc.gnu.org/pipermail/gcc-patches/2024-March/646931.html RISC-V: Refactor expand_vec_cmp It's an NFC patch that I approved. juzhe.zh...@rivai.ai From: demin.han Date: 2024-03-04 14:51 To: gcc-patches CC: juzhe.zhong; kito.cheng Subject:

[PATCH] c++/modules: Prevent emission of really-extern vtables in importers [PR114229]

2024-03-05 Thread Nathaniel Shead
Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? -- >8 -- Currently, reading a variable definition always marks that decl as DECL_NOT_REALLY_EXTERN, with anything else imported still being considered external. This is not sufficient for vtables, however; for an extern template, a

Re: [PATCH v2] c++: Fix template deduction for conversion operators with xobj parameters [PR113629]

2024-03-05 Thread Jason Merrill
On 3/5/24 22:46, Nathaniel Shead wrote: On Tue, Mar 05, 2024 at 06:19:07PM -0500, Jason Merrill wrote: On 3/5/24 17:47, Nathaniel Shead wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? -- >8 -- Unification for conversion operators (DEDUCE_CONV) doesn't perform

Re: [PATCH v1] RISC-V: Introduce gcc attribute riscv_rvv_vector_bits for RVV

2024-03-05 Thread juzhe.zh...@rivai.ai
Thanks for support it. I leave this patch review to kito who is much more familiar with it than me. CCing more folks who may be interested at this stuff. juzhe.zh...@rivai.ai From: pan2.li Date: 2024-03-06 14:38 To: gcc-patches CC: juzhe.zhong; kito.cheng; yanzhang.wang; Pan Li Subject:

[PATCH v2] c++: Fix template deduction for conversion operators with xobj parameters [PR113629]

2024-03-05 Thread Nathaniel Shead
On Tue, Mar 05, 2024 at 06:19:07PM -0500, Jason Merrill wrote: > On 3/5/24 17:47, Nathaniel Shead wrote: > > Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? > > > > -- >8 -- > > > > Unification for conversion operators (DEDUCE_CONV) doesn't perform > > transformations like

Re: [PATCH] arm: Support -mfdpic for more targets

2024-03-05 Thread Fangrui Song
On Fri, Feb 23, 2024 at 7:33 PM Fangrui Song wrote: > > From: Fangrui Song > > Targets that are not arm*-*-uclinuxfdpiceabi can use -S -mfdpic, but -c > -mfdpic does not pass --fdpic to gas. This is an unnecessary > restriction. Just define the ASM_SPEC in bpabi.h. > > Additionally, use

[PATCH v1] RISC-V: Introduce gcc attribute riscv_rvv_vector_bits for RVV

2024-03-05 Thread pan2 . li
From: Pan Li This patch would like to introduce one new gcc attribute for RVV. This attribute is used to define fixed-length variants of one existing sizeless RVV types. This attribute is valid if and only if the mrvv-vector-bits=zvl, the only one args should be the integer constant and its'

Re: [patch, libgfortran] Part 2: PR105456 Child I/O does not propage iostat

2024-03-05 Thread Jerry D
On 3/5/24 1:51 PM, Harald Anlauf wrote: Hi Jerry, on further thought, do we sanitize 'child_iomsg'? We pass it to snprintf as format. Wouldn't a strncpy be sufficient? Harald Just to be safe I will bump char message[IOMSG_LEN] to char message[IOMSG_LEN + 1] This is like a C string vs a

Re: [patch, libgfortran] Part 2: PR105456 Child I/O does not propage iostat

2024-03-05 Thread Steve Kargl
On Tue, Mar 05, 2024 at 08:06:10PM -0800, Jerry D wrote: > On 3/5/24 1:51 PM, Harald Anlauf wrote: > > Hi Jerry, > > > > on further thought, do we sanitize 'child_iomsg'? > > We pass it to snprintf as format. > > > > Wouldn't a strncpy be sufficient? > > > > Harald > > > > > > Just to be

[PATCH v2] RISC-V: Introduce gcc attribute riscv_rvv_vector_bits for RVV

2024-03-05 Thread pan2 . li
From: Pan Li Update in v2: * Cleanup some unused code. * Fix some typo of commit log. Original log: This patch would like to introduce one new gcc attribute for RVV. This attribute is used to define fixed-length variants of one existing sizeless RVV types. This attribute is valid if and only