Re: [PATCH v4 6/7] OpenMP: Fortran front-end support for dispatch + adjust_args

2025-01-13 Thread Tobias Burnus
Hi PA, Paul-Antoine Arras wrote: Hi Thomas, Added libgomp/testsuite/libgomp.fortran/dispatch-1.f90. I see this new test case FAIL (execution test SIGSEGV) for most (but not all) offloading configurations, both GCN and nvptx: +PASS: libgomp.fortran/dispatch-1.f90   -O  (test for excess e

Re: [PATCH] testsuite: libstdc++: Use effective-target libatomic

2025-01-13 Thread Jonathan Wakely
On Mon, 13 Jan 2025 at 11:12, Thomas Schwinge wrote: > > Hi! > > On 2025-01-13T11:04:50+, Jonathan Wakely wrote: > > On Mon, 13 Jan 2025 at 11:03, Thomas Schwinge > > wrote: > >> On 2025-01-12T08:38:05+0100, Torbjorn SVENSSON > >> wrote: > >> > On 2025-01-12 01:05, Jonathan Wakely wrote:

[PATCH] tree-optimization/118405 - ICE with vector(1) T vs T load

2025-01-13 Thread Richard Biener
When vectorizing a load we are now checking alignment before emitting a vector(1) T load instead of blindly assuming it's OK when we had a scalar T load. For reasons we're not handling alignment computation optimally here but we shouldn't ICE when we fall back to loads of T. The following ensures

Re: [PATCH] gcc/d: give dependency files better filenames

2025-01-13 Thread Rainer Orth
Arsen Arsenović writes: > Regstrapped on x86_64-pc-linux-gnu. I've also checked the generated > dependency files are correct by hand and "instrumented" the build to > fail if two dependency files are the same, by doing the following: > > DPOSTCOMPILE = ! test -f $(DEPFILE).Po && mv ... > > ...

[PATCH] expr: Fix up the divmod cost debugging note [PR115910]

2025-01-13 Thread Jakub Jelinek
Hi! Something I've noticed during working on the crc wrong-code fix. My first version of the patch failed because of no longer matching some expected strings in the assembly, so I had to add TDF_DETAILS debugging into the -fdump-rtl-expand-details dump which the crc tests can use. For PR115910 An

[PATCH] MAINTAINERS: Make contrib/check-MAINTAINERS.py happy

2025-01-13 Thread Martin Jambor
This commit makes the contrib/check-MAINTAINERS.py script happy about our MAINTAINERS file. I hope that it knows best how things ought to be and so am committing this as obvious. ChangeLog: 2025-01-13 Martin Jambor * MAINTAINERS: Fix the name order of the Write After Approval section

Re: [PATCH] Accept commas between clauses in OpenMP declare variant

2025-01-13 Thread Paul-Antoine Arras
Hi Tobias, Here are an updated patch and a few questions. On 07/01/2025 13:18, Tobias Burnus wrote: Paul-Antoine Arras: Add support to the Fortran parser for the new OpenMP syntax that allows a comma after the directive name and between clauses of declare variant. The C and C++ parsers already

Re: [PATCH v4 6/7] OpenMP: Fortran front-end support for dispatch + adjust_args

2025-01-13 Thread Paul-Antoine Arras
On 13/01/2025 14:57, Tobias Burnus wrote: Hi PA, Paul-Antoine Arras wrote: Here is an updated patch following your suggestion. Thanks. It is not clear whether you are just waiting for test result or not before committing it as obvious. Thus, just in case: LGTM. Thanks, Tobias Thanks for

Re: [PATCH] c++: Inhibit subsequent warnings/notes in diagnostic_groups with an inhibited warning [PR118163,PR118392]

2025-01-13 Thread Jason Merrill
On 1/12/25 2:39 PM, Simon Martin wrote: [ Fixing David’s email address :-/ ] Hi, On 9 Jan 2025, at 20:08, Simon Martin wrote: On 9 Jan 2025, at 20:00, Marek Polacek wrote: On Thu, Jan 09, 2025 at 12:05:43PM -0500, Patrick Palka wrote: On Wed, 8 Jan 2025, Jason Merrill wrote: On 12/21/24

Re: [PATCH v2] c: improve UX for -Wincompatible-pointer-types [PR116871]

2025-01-13 Thread David Malcolm
On Tue, 2025-01-14 at 00:08 +, Joseph Myers wrote: > On Sun, 12 Jan 2025, David Malcolm wrote: > > > So I've dropped the takes_int_p, takes_void_p, and > > maybe_inform_empty_args_c23_transition from the patch.  Here's an > > updated version that keeps the rest of the changes.  I'd like to > >

Re: [PATCH] c++: make finish_pseudo_destructor_expr SFINAE-aware [PR116417]

2025-01-13 Thread Jason Merrill
On 1/13/25 2:57 PM, Marek Polacek wrote: On Mon, Jan 13, 2025 at 11:25:25AM -0500, Patrick Palka wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? Looks okay to me. OK. -- >8 -- PR c++/116417 gcc/cp/ChangeLog: * cp-tree.h (finish_pseu

[PATCH] [ifcombine] check and extend constants to compare with bitfields [PR118456]

2025-01-13 Thread Alexandre Oliva
Add logic to check and extend constants compared with bitfields, so that fields are only compared with constants they could actually equal. This involves making sure the signedness doesn't change between loads and conversions before shifts: we'd need to carry a lot more data to deal with all the

Re: [PATCH] RISC-V: Fix the result error caused by not updating ratio when using "use_max_sew" to merge vsetvl.

2025-01-13 Thread Jin Ma
> So as written this test will be totally skipped (and I've verified that > locally). It looks like you just wanted -O2 and we're not cycling > through options, so we don't need/want the dg-skip-if. I'll fix that too. Sorry, I made a mistake again :( > > I'll make the obvious changes and pu

Re: [PATCH] Fortran: Added support for locality specs in DO CONCURRENT (Fortran 2018/23)

2025-01-13 Thread Jerry D
On 1/13/25 12:18 AM, Tobias Burnus wrote: Hi, On 9/25/24 3:18 AM, Andre Vehreschild wrote: @@ -3089,7 +3099,15 @@ typedef struct gfc_code   gfc_inquire *inquire;   gfc_wait *wait;   gfc_dt *dt; -    gfc_forall_iterator *forall_iterator; + +    struct +    { +  gfc_forall_iterat

[PATCH] c++: Add support for vec_dup to constexpr [PR118445]

2025-01-13 Thread Andrew Pinski
With the addition of supporting operations on the SVE scalable vector types, the vec_duplicate tree will show up in expressions and the constexpr handling was not done for this tree code. This is a simple fix to treat VEC_DUPLICATE like any other unary operator and allows the constexpr-add-1.C tes

Re: [PATCH]AArch64: have -mcpu=native detect architecture extensions for unknown non-homogenous systems [PR113257]

2025-01-13 Thread Richard Sandiford
Richard Sandiford writes: > Tamar Christina writes: >>> -Original Message- >>> From: Richard Sandiford >>> Sent: Monday, January 13, 2025 6:35 PM >>> To: Tamar Christina >>> Cc: gcc-patches@gcc.gnu.org; nd ; Richard Earnshaw >>> ; ktkac...@gcc.gnu.org >>> Subject: Re: [PATCH]AArch64: ha

[PATCH] Fix setting of call graph node AutoFDO count [PR116743]

2025-01-13 Thread Eugene Rozenfeld
We are initializing both the call graph node count and the entry block count of the function with the head_count value from the profile. Count propagation algorithm may refine the entry block count and we may end up with a case where the call graph node count is set to 0 but the entry block count

[PATCH] rs6000: Fix ICE for invalid constants in built-in functions

2025-01-13 Thread Peter Bergner
After my other patch, I decided to write a test case with an illegal constant operand value to a built-in to see what the results would be. Without my other patch, we fail to catch the illegal use and emit an invalid rtl insn and hit an unrecognizable insn ICE. With my previous patch, we correctly

[PATCH] c++: dump-lang-raw with obj_type_ref fields

2025-01-13 Thread anetczuk
Raw dump of lang tree was missing information about virtual method call. The information is provided in "tok" field of obj_type_ref. gcc/ChangeLog: * tree-dump.cc (dequeue_and_dump): Handle OBJ_TYPE_REF. gcc/testsuite/ChangeLog: * g++.dg/lang-dump-1.C: New test. --- gcc/testsuite/g++.dg/lan

Re: [PATCH] RISC-V: fix thinko in riscv_register_move_cost ()

2025-01-13 Thread Kito Cheng
Thanks, that's apparently my stupid mistake...:P On Tue, Jan 14, 2025 at 12:26 AM Jeff Law wrote: > > > > On 1/11/25 4:45 PM, Vineet Gupta wrote: > > This seeming benign mistake caused a massive SPEC2017 Cactu regression > > (2.1 trillion insn to 2.5 trillion) wiping out all the gains from my > >

Re: [PATCH] c++: 'this' capture clobbered during recursive inst [PR116756]

2025-01-13 Thread Jason Merrill
On 1/10/25 2:20 PM, Patrick Palka wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? The documentation for LAMBDA_EXPR_THIS_CAPTURE seems outdated because it says the field is only used at parse time, but apparently it's also used at instantiation time. Non-'

Re: [PATCH] c++: Delete defaulted operator <=> if std::strong_ordering::equal doesn't convert to its rettype [PR118387]

2025-01-13 Thread Jason Merrill
On 1/13/25 10:57 AM, Jakub Jelinek wrote: On Fri, Jan 10, 2025 at 12:04:53PM -0500, Jason Merrill wrote: Note, the PR raises another problem. If on the same testcase the B b; line is removed, we silently synthetize operator<=> which will crash at runtime due to returning without a return stateme

Re: [PATCH] Fortran: Added support for locality specs in DO CONCURRENT (Fortran 2018/23)

2025-01-13 Thread Jerry D
Committed as: commit 20b8500cfa522ebe0fcf756d5b32816da7f904dd (HEAD -> master, origin/master, origin/HEAD) Author: Anuj Mohite Date: Mon Jan 13 16:28:57 2025 -0800 Fortran: Add LOCALITY support for DO_CONCURRENT This patch provided by Anuj Mohite as part of the GSoC project

Re: [PATCH] c++: explicit spec of constrained member tmpl [PR107522]

2025-01-13 Thread Jason Merrill
On 9/12/24 1:07 PM, Patrick Palka wrote: (Sorry to resurrect this thread so late, I lost track of this patch...) On Fri, 2 Dec 2022, Jason Merrill wrote: On 12/2/22 09:30, Patrick Palka wrote: On Thu, 1 Dec 2022, Jason Merrill wrote: On 12/1/22 14:51, Patrick Palka wrote: On Thu, 1 Dec 202

[PATCH] lto: Remove link() to fix build with MinGW [PR118238]

2025-01-13 Thread Michal Jires
I used link() to create cheap copies of Incremental LTO cache contents to prevent their deletion once linking is finished. This is unnecessary, since output_files are deleted in our lto-plugin and not in the linker itself. Bootstrapped/regtested on x86_64-linux. lto-wrapper now again builds on Min

Re: [PATCH v2] RISC-V: Fix ICE for unrecognizable insn `UNSPEC_VSETVL` for XTheadVector

2025-01-13 Thread Jin Ma
> > Thank you very much for your professional reply. I am trying to solve the > > problem > > using the "spec_restriction" way. But unfortunately, I have a new problem. > > As > > pattern below, how can I enable "r" and disable "K" when XTheadVector? "rK" > > already > > seems to be the smallest

Re: [PATCH] Fortran: Added support for locality specs in DO CONCURRENT (Fortran 2018/23)

2025-01-13 Thread Tobias Burnus
Hi, On 9/25/24 3:18 AM, Andre Vehreschild wrote: @@ -3089,7 +3099,15 @@ typedef struct gfc_code   gfc_inquire *inquire;   gfc_wait *wait;   gfc_dt *dt; -    gfc_forall_iterator *forall_iterator; + +    struct +    { +  gfc_forall_iterator *forall_iterator; +  gfc_expr_list *

Re: [PATCH v2] RISC-V: Fix ICE for unrecognizable insn `UNSPEC_VSETVL` for XTheadVector

2025-01-13 Thread Robin Dapp
> Thank you very much for your professional reply. I am trying to solve the > problem > using the "spec_restriction" way. But unfortunately, I have a new problem. As > pattern below, how can I enable "r" and disable "K" when XTheadVector? "rK" > already > seems to be the smallest unit and not abl

[PATCH v2 3/4] RISC-V: Add .note.gnu.property for ZICFILP and ZICFISS ISA extension

2025-01-13 Thread Monk Chiang
gcc/ChangeLog: * gcc/config/riscv/riscv.cc (riscv_file_end_indicate_exec_stack): Add .note.gnu.property. * gcc/config/riscv/linux.h (TARGET_ASM_FILE_END): Define. libgcc/ChangeLog: * libgcc/config/riscv/crti.S: Add lpad instructions. * libgcc/config/riscv/cr

GCC 15.0.0 Status Report (2025-01-13), Stage 4 in effect NOW

2025-01-13 Thread Richard Biener
Status == The GCC development branch which will become GCC 15 is now in stage4, open for regression and documentation fixes only. Quality Data Priority # Change from last report --- --- P1 32 + 6 P2

[PATCH] RISC-V: Fix program logic errors caused by data truncation on 32-bit host for zbs, such as i386.

2025-01-13 Thread Jin Ma
Correct logic on 64-bit host: ... bseti a5,zero,38 bseti a5,a5,63 addia5,a5,-1 and a4,a4,a5 ... Wrong logic on 32-bit host: ... li a5,64 bseti a5,a5,31 addia5,a5,-1 and a4,a4,a5

Re: [PATCH v4 6/7] OpenMP: Fortran front-end support for dispatch + adjust_args

2025-01-13 Thread Paul-Antoine Arras
Hi Thomas, On 08/01/2025 10:04, Thomas Schwinge wrote: Hi Paul-Antoine! On 2024-12-16T19:35:01+0100, Paul-Antoine Arras wrote: On 15/11/2024 14:59, Tobias Burnus wrote: Paul-Antoine Arras wrote: This patch adds support for the `dispatch` construct and the `adjust_args` clause to the Fortran

Re: [PATCH] expr: Fix up the divmod cost debugging note [PR115910]

2025-01-13 Thread Richard Biener
On Mon, 13 Jan 2025, Jakub Jelinek wrote: > Hi! > > Something I've noticed during working on the crc wrong-code fix. > My first version of the patch failed because of no longer matching some > expected strings in the assembly, so I had to add TDF_DETAILS debugging > into the -fdump-rtl-expand-det

Re: [PATCH] d, v2: give dependency files better filenames

2025-01-13 Thread Jakub Jelinek
On Mon, Jan 13, 2025 at 11:00:09AM +0100, Jakub Jelinek wrote: > Why do you need there the directory or suffix? > $(*F) is clearly bad, because there are rules like > d/%.o: d/dmd/%.d > $(DCOMPILE) $(D_INCLUDES) $< > $(DPOSTCOMPILE) > > d/common-%.o: d/dmd/common/%.d >

Re: [RFC/RFA] [PR tree-optimization/92539] Improve code and avoid Warray-bounds false positive

2025-01-13 Thread Richard Biener
On Fri, Jan 10, 2025 at 9:43 PM Jeff Law wrote: > > > > On 1/10/25 1:00 AM, Richard Biener wrote: > > > > It's a problem we're never going to fully solve. Some of the > > testcases show missed optimizations which we can work on. Some show > > we diagnose IL we later are able to optimize away, so

Re: [PATCH] rtl: Remove invalid compare simplification [PR117186]

2025-01-13 Thread Tobias Burnus
Andreas Schwab wrote: This breaks m68k: Same issue on GCN, hence I filed https://gcc.gnu.org/PR118418 If I look at the debugging output, see PR, it seems as if the self-test function test_comparisons contains the assumption: FALSE < TRUE but if TRUE is -1, that assumption does not hold (fo

Re: [PATCH] testsuite: libstdc++: Use effective-target libatomic

2025-01-13 Thread Thomas Schwinge
Hi! On 2025-01-12T08:38:05+0100, Torbjorn SVENSSON wrote: > On 2025-01-12 01:05, Jonathan Wakely wrote: >> On Mon, 23 Dec 2024, 19:05 Torbjörn SVENSSON, >> mailto:torbjorn.svens...@foss.st.com>> >> wrote: >> >> Ok for trunk and releases/gcc-14? >> >> OK > > Pushed as r15-6828-g4b0ef49d02

Re: [PATCH] aarch64: Provide initial specifications for Apple CPU cores.

2025-01-13 Thread Kyrylo Tkachov
Hi Iain, > On 11 Jan 2025, at 14:21, Iain Sandoe wrote: > > Hi, > > I originally made this patch for the Darwin Arm64 development branch, > however in discussions on IRC, it seems that it is also relevant to > Linux - since there are implementations running on Apple hardware with > the M1..3 CP

[committed][PR rtl-optimization/107455] Eliminate unnecessary constant load - v3

2025-01-13 Thread Jeff Law
This resurrects a patch from a bit over 2 years ago that I never wrapped up. IIRC, I ended up up catching covid, then in the hospital for an unrelated issue and it just got dropped on the floor in the insanity. The basic idea here is to help postreload-cse eliminate more const/copies by recor

Re: [PATCH] tree-optimization/92539 - missed optimization leads to bogus -Warray-bounds

2025-01-13 Thread Richard Biener
On Mon, 13 Jan 2025, Richard Biener wrote: > The following makes niter analysis recognize a loop with an exit > condition scanning over a STRING_CST. This is done via enhancing > the force evaluation code rather than recognizing for example > strlen (s) as number of iterations because it allows t

Re: [Regression] [PATCH] internal-fn: Do not force vcond operand to reg.

2025-01-13 Thread Torbjorn SVENSSON
On 2025-01-13 15:21, Christophe Lyon wrote: On 1/13/25 15:05, Torbjorn SVENSSON wrote: Hi Richard and Robin, It looks like this patch introduced a regression with MVE (Cortex-M55 and Cortex-M85). If I try to build testsuite/c-c++-common/vector-compare-3.c (there are other test cases th

Re: [PATCH] RISC-V: fix thinko in riscv_register_move_cost ()

2025-01-13 Thread Jeff Law
On 1/11/25 4:45 PM, Vineet Gupta wrote: This seeming benign mistake caused a massive SPEC2017 Cactu regression (2.1 trillion insn to 2.5 trillion) wiping out all the gains from my recent sched1 improvement. Thankfully the issue was trivial to fix even if hard to isolate. On BPI3: Before bug

Re: [PATCH v2] RISC-V: Fix ICE for unrecognizable insn `UNSPEC_VSETVL` for XTheadVector

2025-01-13 Thread Robin Dapp
> Yes. This will solve the problem, but it will lead to very large-scale changes > (splitting each rK, adding 1 column constraint), and make the pattern more > complex > and more difficult to maintain. In contrast, how about replacing "rK" with a > new > constrain in the way jeff mentioned? For e

Re: [PATCH] RISC-V: Fix program logic errors caused by data truncation on 32-bit host for zbs, such as i386.

2025-01-13 Thread Jeff Law
On 1/13/25 2:07 AM, Jin Ma wrote: Correct logic on 64-bit host: ... bseti a5,zero,38 bseti a5,a5,63 addia5,a5,-1 and a4,a4,a5 ... Wrong logic on 32-bit host: ... li a5,64 bseti a5,a5,31

Re: [PATCH] d, v2: give dependency files better filenames

2025-01-13 Thread Iain Buclaw
Excerpts from Jakub Jelinek's message of Januar 13, 2025 2:58 pm: > On Mon, Jan 13, 2025 at 02:45:28PM +0100, Arsen Arsenović wrote: >> > So the former d/.deps/file.Po which handled both d/dmd/common/file.d and >> > d/dmd/root/file.d in your case would be d/.deps/d-common-file.o.d and >> > d/.deps/

Re: [PATCH 1/2] RISC-V: Improve bitwise and ashift reassociation for single-bit immediate without zbs [PR 115921]

2025-01-13 Thread Jeff Law
On 1/12/25 7:49 AM, Xi Ruoyao wrote: When zbs is not available, there's nothing special with single-bit immediates and we should perform reassociation as normal immediates. gcc/ChangeLog: PR target/115921 * config/riscv/riscv.md (_shift_reverse): Only check popcount_h

Re: [PATCH 2/2] RISC-V: Remove zba check in bitwise and ashift reassociation [PR 115921]

2025-01-13 Thread Jeff Law
On 1/12/25 7:49 AM, Xi Ruoyao wrote: The test case long test (long x, long y) { return ((x | 0x1ff) << 3) + y; } is now compiled (-O2 -march=rv64g_zba) to li a4,4096 slliw a5,a0,3 addia4,a4,-8 or a5,a5,a4 addwa0,a5,a1

Re: Subject: [PATCH] RISC-V: testsuite: Skip test with -flto.

2025-01-13 Thread Jeff Law
On 1/10/25 1:38 AM, Robin Dapp wrote: Hi, the zbb-rol-ror and stack_save_restore tests use the -fno-lto option and scan the final assembly. For an invocation like -flto ... -fno-lto the output file we scan is still something like zbb-rol-ror-09.ltrans0.ltrans.s. Therefore skip the tests

Re: [PATCH v5 02/10] OpenMP: Re-work and extend context selector resolution

2025-01-13 Thread Tobias Burnus
Hi all, Tobias Burnus wrote: Tobias Burnus wrote: Sandra Loosemore wrote: This patch reimplements the middle-end support for "declare variant" and extends the resolution mechanism to also handle metadirectives (PR112779).  It also adds partial support for dynamic selectors (PR113904) and fixes

Re: [PATCH] c++/modules: Fix linkage checks for exported using-decls

2025-01-13 Thread Jason Merrill
On 1/12/25 7:20 AM, Nathaniel Shead wrote: On Fri, Jan 03, 2025 at 05:18:55PM +, xxx wrote: From: yxj-github-437 <2457369...@qq.com> This patch attempts to fix an error when build module std. The reason for the error is __builrin_va_list (aka struct __va_list) is an internal linkage. so att

Re: [RFC PATCH v2] RISC-V:Fix th.vsetvli generates from vext_x_v with wrong operand

2025-01-13 Thread Jeff Law
On 12/22/24 11:51 PM, yunze...@linux.alibaba.com wrote: From: Yunze Zhu Fix a bug th.vsetvli generates from vext_x_v with an imm operand, which reports illegal operand. This patch fix this by replacing imm operand with reg operand in th.vsetvli. gcc/ChangeLog: * config/riscv/riscv-

[COMMITTED] RISC-V: fix thinko in riscv_register_move_cost ()

2025-01-13 Thread Vineet Gupta
This seeming benign mistake caused a massive SPEC2017 Cactu regression (2.1 trillion insn to 2.5 trillion) wiping out all the gains from my recent sched1 improvement. Thankfully the issue was trivial to fix even if hard to isolate. On BPI3: Before bug -- | Performance counter stats for '

Re: [PATCH] RISC-V: Fix the result error caused by not updating ratio when using "use_max_sew" to merge vsetvl.

2025-01-13 Thread Jeff Law
On 1/13/25 3:15 AM, Jin Ma wrote: When the vsetvl instructions of the two RVV instructions are merged using "use_max_sew", it is possible to update the sew of prev if prev.sew < next.sew, but keep the original ratio, which is obviously wrong. when the subsequent instructions are equal to the w

Re: [PATCH]AArch64: have -mcpu=native detect architecture extensions for unknown non-homogenous systems [PR113257]

2025-01-13 Thread Richard Sandiford
Tamar Christina writes: > Hi All, > > in g:e91a17fe39c39e98cebe6e1cbc8064ee6846a3a7 we added the ability for > -mcpu=native on unknown CPUs to still enable architecture extensions. > > This has worked great but was only added for homogenous systems. > > However the same thing works for big.LITTLE

[PATCH] Fix build for STORE_FLAG_VALUE<0 targets [PR118418]

2025-01-13 Thread Richard Sandiford
In g:06c4cf398947b53b4bfc65752f9f879bb2d07924 I mishandled signed comparisons of comparison results on STORE_FLAG_VALUE < 0 targets (despite specifically referencing STORE_FLAG_VALUE in the commit message). There, (lt TRUE FALSE) is true, although (ltu FALSE TRUE) still holds. Things get messy wi

Re: [PATCH] d, v2: give dependency files better filenames

2025-01-13 Thread Jakub Jelinek
On Mon, Jan 13, 2025 at 07:29:52PM +0100, Iain Buclaw wrote: > For example, changing the common package sources we end up with the > following, though can't say I'm a strong fan of having test and > optionally mkdir ran on every recipe execution. You also then need to handle it for cleaning etc.

Re: [PATCH] c++: make finish_pseudo_destructor_expr SFINAE-aware [PR116417]

2025-01-13 Thread Marek Polacek
On Mon, Jan 13, 2025 at 11:25:25AM -0500, Patrick Palka wrote: > Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look > OK for trunk? Looks okay to me. > -- >8 -- > > PR c++/116417 > > gcc/cp/ChangeLog: > > * cp-tree.h (finish_pseudo_destructor_expr): Add complain >

Re: [PATCH] AArch64: Deprecate -mabi=ilp32

2025-01-13 Thread Wilco Dijkstra
Hi all, > In that case, I'm coming round to the idea of deprecating ILP32. > I think it was already common ground that the GNU/Linux support is dead. > watchOS would use Mach objects rather than ELF.  As you say, it isn't > clear how much of the current ILP32 support would be relevant for it. > An

Re: [PATCH v2] c++/modules: Don't emit imported deduction guides [PR117397]

2025-01-13 Thread Jason Merrill
On 1/12/25 7:03 AM, Nathaniel Shead wrote: On Sun, Jan 12, 2025 at 04:14:41AM +1100, Nathaniel Shead wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? -- >8 -- The ICE in the linked PR is caused because name lookup finds duplicate copies of the deduction guides, causing a

Re: [PATCH] c++: Add support for vec_dup to constexpr [PR118445]

2025-01-13 Thread Jason Merrill
On 1/13/25 4:55 PM, Andrew Pinski wrote: With the addition of supporting operations on the SVE scalable vector types, the vec_duplicate tree will show up in expressions and the constexpr handling was not done for this tree code. This is a simple fix to treat VEC_DUPLICATE like any other unary ope

Re: [PATCH] c++: pack expansion arg vs non-pack parm checking ICE [PR118454]

2025-01-13 Thread Jason Merrill
On 1/13/25 3:27 PM, Patrick Palka wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? OK, but do we also need this in the "still packed" case earlier in the function? -- >8 -- During ahead of time template argument coercion, we handle the case of passing

Re: [PATCH v2] c: improve UX for -Wincompatible-pointer-types [PR116871]

2025-01-13 Thread Joseph Myers
On Sun, 12 Jan 2025, David Malcolm wrote: > So I've dropped the takes_int_p, takes_void_p, and > maybe_inform_empty_args_c23_transition from the patch. Here's an > updated version that keeps the rest of the changes. I'd like to get > this into GCC 15 to make build failures due to C23-incompatibi

Re: [PATCH] RISC-V: Disallow negative step for interleaving [PR117682].

2025-01-13 Thread Jeff Law
On 12/17/24 8:27 AM, Robin Dapp wrote: Hi, in PR117682 we build an interleaving pattern { 1, 201, 209, 25, 161, 105, 113, 185, 65, 9, 17, 89, 225, 169, 177, 249, 129, 73, 81, 153, 33, 233, 241, 57, 193, 137, 145, 217, 97, 41, 49, 121 }; with negative step expecting wraparo

Re: [PATCH] RISC-V: Expand shift count in Xmode in interleave pattern.

2025-01-13 Thread Jeff Law
On 12/18/24 3:37 AM, Robin Dapp wrote: Hi, currently ssa-dse-1.C ICEs because expand_simple_binop returns NULL when building the scalar that is used to IOR two interleaving sequences. That's because we try to emit a shift in HImode. This patch shifts in Xmode and then lowpart-subregs the re

[COMMITTED 03/14] ada: Warn about redundant parentheses in upper range bounds

2025-01-13 Thread Marc Poulhiès
From: Piotr Trojanek Fix a glitch in condition that effectively caused detection of redundant parentheses in upper range bounds to be dead code. gcc/ada/ChangeLog: * par-ch3.adb (P_Discrete_Range): Replace N_Subexpr, which was catching all subexpressions, with kinds that catch n

[COMMITTED 01/14] ada: Fix parsing of raise expressions with no parens

2025-01-13 Thread Marc Poulhiès
From: Piotr Trojanek According to Ada grammar, raise expression is an expression, but requires parens to be a simple_expression. We wrongly classified raise expressions as expressions, because we mishandled a global state variable in the parser. This patch causes some illegal code to be rejected

[COMMITTED 02/14] ada: Add more commentary to System.Val_Real.Large_Powfive

2025-01-13 Thread Marc Poulhiès
From: Eric Botcazou gcc/ada/ChangeLog: * libgnat/s-valrea.adb (Large_Powfive) [2 parameters]: Add a couple of additional comments. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/libgnat/s-valrea.adb | 5 + 1 file changed, 5 insertions(+) diff --git a/gcc/

[COMMITTED 06/14] ada: Fix spurious warning about redundant parentheses in range bound

2025-01-13 Thread Marc Poulhiès
From: Piotr Trojanek Use the same logic for warning about redundant parentheses in lower and upper bounds of a discrete range. This fixes a spurious warning that, if followed, would render the code illegal. gcc/ada/ChangeLog: * par-ch3.adb (P_Discrete_Range): Detect redundant parenthese

Un-XFAIL 'dg-note's in 'gfortran.dg/goacc/routine-external-level-of-parallelism-2.f' (was: [Patch] Fortran: Fix location_t in gfc_get_extern_function_decl; support 'omp dispatch interop')

2025-01-13 Thread Thomas Schwinge
Hi! On 2025-01-10T13:33:25+0100, Tobias Burnus wrote: > The first change is a simple, generic Fortran change. > > Without it, external declarations have odd locations > (namely their input_location): > > gcc/testsuite/gfortran.dg/gomp/dispatch-11.f90:67:46: > > 67 | !$omp dispatch interop(o

Re: [PATCH] lto: Remove link() to fix build with MinGW [PR118238]

2025-01-13 Thread Richard Biener
On Mon, 13 Jan 2025, Michal Jires wrote: > I used link() to create cheap copies of Incremental LTO cache contents > to prevent their deletion once linking is finished. > This is unnecessary, since output_files are deleted in our lto-plugin > and not in the linker itself. > > Bootstrapped/regteste

[Regression] [PATCH] internal-fn: Do not force vcond operand to reg.

2025-01-13 Thread Torbjorn SVENSSON
Hi Richard and Robin, It looks like this patch introduced a regression with MVE (Cortex-M55 and Cortex-M85). If I try to build testsuite/c-c++-common/vector-compare-3.c (there are other test cases that fail with a similar ICE): arm-none-eabi-gcc /src/gcc/testsuite/c-c++-common/vector-compare-

Re: [Regression] [PATCH] internal-fn: Do not force vcond operand to reg.

2025-01-13 Thread Christophe Lyon
On 1/13/25 15:05, Torbjorn SVENSSON wrote: Hi Richard and Robin, It looks like this patch introduced a regression with MVE (Cortex-M55 and Cortex-M85). If I try to build testsuite/c-c++-common/vector-compare-3.c (there are other test cases that fail with a similar ICE): arm-none-eabi-gc

Re: [PATCH] Accept commas between clauses in OpenMP declare variant

2025-01-13 Thread Tobias Burnus
Hi PA, Paul-Antoine Arras wrote: I am not sure I am getting that part. Is this what you are suggesting? Yes, something like that, but not quite, as you found out. I think we need something like the following (untested): diff --git gcc/fortran/openmp.cc gcc/fortran/openmp.cc index 9d28dc

[PATCH] c++: Delete defaulted operator <=> if std::strong_ordering::equal doesn't convert to its rettype [PR118387]

2025-01-13 Thread Jakub Jelinek
On Fri, Jan 10, 2025 at 12:04:53PM -0500, Jason Merrill wrote: > > Note, the PR raises another problem. > > If on the same testcase the B b; line is removed, we silently synthetize > > operator<=> which will crash at runtime due to returning without a return > > statement. That is because the stan

Re: [PATCH] tree-optimization/92539 - missed optimization leads to bogus -Warray-bounds

2025-01-13 Thread Jeff Law
On 1/13/25 7:47 AM, Richard Biener wrote: On Mon, 13 Jan 2025, Richard Biener wrote: The following makes niter analysis recognize a loop with an exit condition scanning over a STRING_CST. This is done via enhancing the force evaluation code rather than recognizing for example strlen (s) as

Re: [PATCH] aarch64: Provide initial specifications for Apple CPU cores.

2025-01-13 Thread Andrew Carlotti
On Sat, Jan 11, 2025 at 01:21:13PM +, Iain Sandoe wrote: > Hi, > > I originally made this patch for the Darwin Arm64 development branch, > however in discussions on IRC, it seems that it is also relevant to > Linux - since there are implementations running on Apple hardware with > the M1..3 CP

[PATCH] d, v2: give dependency files better filenames

2025-01-13 Thread Jakub Jelinek
On Sun, Jan 12, 2025 at 04:16:58PM +0100, Arsen Arsenović wrote: > Regstrapped on x86_64-pc-linux-gnu. I've also checked the generated > dependency files are correct by hand and "instrumented" the build to > fail if two dependency files are the same, by doing the following: > > DPOSTCOMPILE = !

[PATCH] RISC-V: Fix the result error caused by not updating ratio when using "use_max_sew" to merge vsetvl.

2025-01-13 Thread Jin Ma
When the vsetvl instructions of the two RVV instructions are merged using "use_max_sew", it is possible to update the sew of prev if prev.sew < next.sew, but keep the original ratio, which is obviously wrong. when the subsequent instructions are equal to the wrong ratio, it is possible to generate

[COMMITTED 07/14] ada: Remove redundant parentheses inside unary operators

2025-01-13 Thread Marc Poulhiès
From: Piotr Trojanek GNAT already emits a style warning when redundant parentheses appear inside logical and short-circuit operators. A similar warning will be soon emitted for unary operators as well. This patch removes the redundant parentheses to avoid future build errors. gcc/ada/ChangeLog:

[COMMITTED 05/14] ada: Unbounded recursion on character aggregates with predicated component subtype

2025-01-13 Thread Marc Poulhiès
From: Gary Dismukes The compiler was recursing endlessly when analyzing an aggregate of an array type whose component subtype has a static predicate and the component expressions are static, repeatedly transforming the aggregate first into a string literal and then back into an aggregate. This is

[COMMITTED 13/14] ada: Cleanup preanalysis of static expressions (part 5)

2025-01-13 Thread Marc Poulhiès
From: Javier Miranda Partially revert the fix for sem_ch13.adb as it does not comply with RM 13.14(7.2/5). gcc/ada/ChangeLog: * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Restore calls to Preanalyze_Spec_Expression that were replaced by calls to Preanalyze_And_R

Re: [PATCH v4 6/7] OpenMP: Fortran front-end support for dispatch + adjust_args

2025-01-13 Thread Paul-Antoine Arras
Hi Tobias, On 13/01/2025 13:24, Tobias Burnus wrote: Hi PA, Paul-Antoine Arras wrote: Hi Thomas, Added libgomp/testsuite/libgomp.fortran/dispatch-1.f90. I see this new test case FAIL (execution test SIGSEGV) for most (but not all) offloading configurations, both GCN and nvptx: +PASS: l

Re: [PATCH] d, v2: give dependency files better filenames

2025-01-13 Thread Arsen Arsenović
Jakub Jelinek writes: > On Sun, Jan 12, 2025 at 04:16:58PM +0100, Arsen Arsenović wrote: >> Regstrapped on x86_64-pc-linux-gnu. I've also checked the generated >> dependency files are correct by hand and "instrumented" the build to >> fail if two dependency files are the same, by doing the follo

[ping,patch 1/2] Add new target hook to assemble a variable

2025-01-13 Thread Georg-Johann Lay
Ping for trunk https://gcc.gnu.org/pipermail/gcc-patches/2024-December/672050.html Notice that the patch is bootstrapped and reg-tested and I may commit-after-approval, so no further work from admins is needed. The avr part has already been approved 2024-12-20. The default action is an obvious

Re: [PATCH] testsuite: libstdc++: Use effective-target libatomic

2025-01-13 Thread Jonathan Wakely
On Mon, 13 Jan 2025 at 11:03, Thomas Schwinge wrote: > > Hi! > > On 2025-01-12T08:38:05+0100, Torbjorn SVENSSON > wrote: > > On 2025-01-12 01:05, Jonathan Wakely wrote: > >> On Mon, 23 Dec 2024, 19:05 Torbjörn SVENSSON, > >> mailto:torbjorn.svens...@foss.st.com>> > >> wrote: > >> > >> Ok for

[COMMITTED 04/14] ada: Simplify expansion of negative membership operator

2025-01-13 Thread Marc Poulhiès
From: Piotr Trojanek Code cleanup; semantics is unaffected. gcc/ada/ChangeLog: * exp_ch4.adb: (Expand_N_Not_In): Preserve Alternatives in expanded membership operator just like preserving Right_Opnd (though only one of these fields is present at a time). * par-ch

[COMMITTED 11/14] ada: Remove redundant parentheses inside unary operators (cont.)

2025-01-13 Thread Marc Poulhiès
From: Piotr Trojanek GNAT already emits a style warning when redundant parentheses appear inside logical and short-circuit operators. A similar warning will be soon emitted for unary operators as well. This patch removes the redundant parentheses to avoid build errors. gcc/ada/ChangeLog:

[COMMITTED 10/14] ada: Cleanup preanalysis of static expressions (part 4)

2025-01-13 Thread Marc Poulhiès
From: Javier Miranda Fix regression in the SPARK 2014 testsuite. gcc/ada/ChangeLog: * sem_util.adb (Build_Actual_Subtype_Of_Component): No action under preanalysis. * sem_ch5.adb (Set_Assignment_Type): If the right-hand side contains target names, expansion has b

[COMMITTED 08/14] ada: Remove redundant parentheses inside unary operators in comments

2025-01-13 Thread Marc Poulhiès
From: Piotr Trojanek GNAT already emits a style warning when redundant parentheses appear inside logical and short-circuit operators. A similar warning will be soon emitted for unary operators as well. This patch removes the redundant parentheses to avoid future build errors. gcc/ada/ChangeLog:

[COMMITTED 12/14] ada: Fix relocatable DLL creation with gnatdll

2025-01-13 Thread Marc Poulhiès
From: Pascal Obry gcc/ada/ChangeLog: * mdll.adb: For the created DLL to be relocatable we do not want to use the base file name when calling gnatdll. * gnatdll.adb: Removes option -d which is not working anymore. And when using a truly relocatable DLL the base-add

[COMMITTED 09/14] ada: Warn about redundant parentheses inside unary operators

2025-01-13 Thread Marc Poulhiès
From: Piotr Trojanek GNAT already emits a style warning when redundant parentheses appear inside logical and short-circuit operators. A similar warning is now emitted for unary operators as well. gcc/ada/ChangeLog: * par-ch4.adb (P_Factor): Warn when the operand of a unary operator

[COMMITTED 14/14] ada: Update gnatdll documentation (-b option removed)

2025-01-13 Thread Marc Poulhiès
From: Pascal Obry gcc/ada/ChangeLog: * doc/gnat_ugn/platform_specific_information.rst: Update. * gnat_ugn.texi: Regenerate. Tested on x86_64-pc-linux-gnu, committed on master. --- .../platform_specific_information.rst | 19 ++- gcc/ada/gnat_ugn.texi

Re: [PATCH] testsuite: libstdc++: Use effective-target libatomic

2025-01-13 Thread Thomas Schwinge
Hi! On 2025-01-13T11:04:50+, Jonathan Wakely wrote: > On Mon, 13 Jan 2025 at 11:03, Thomas Schwinge wrote: >> On 2025-01-12T08:38:05+0100, Torbjorn SVENSSON >> wrote: >> > On 2025-01-12 01:05, Jonathan Wakely wrote: >> >> On Mon, 23 Dec 2024, 19:05 Torbjörn SVENSSON, >> >> mailto:torbjorn.

[PATCH] tree-optimization/92539 - missed optimization leads to bogus -Warray-bounds

2025-01-13 Thread Richard Biener
The following makes niter analysis recognize a loop with an exit condition scanning over a STRING_CST. This is done via enhancing the force evaluation code rather than recognizing for example strlen (s) as number of iterations because it allows to handle some more cases. STRING_CSTs are easy to h

Re: [gcc r15-6807] vect: Force alignment peeling to vectorize more early break loops [PR118211]

2025-01-13 Thread Thomas Schwinge
Hi! On 2025-01-10T21:22:03+, Tamar Christina via Gcc-cvs wrote: > https://gcc.gnu.org/g:68326d5d1a593dc0bf098c03aac25916168bc5a9 > > commit r15-6807-g68326d5d1a593dc0bf098c03aac25916168bc5a9 > Author: Alex Coplan > Date: Mon Mar 11 13:09:10 2024 + > > vect: Force alignment peeling

[PATCH] tree-optimization/117119 - ICE with int128 IV in dataref analysis

2025-01-13 Thread Richard Biener
Here's another fix for a missing check that an IV value fits in a HIW. It's originally from Stefan. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR tree-optimization/117119 * tree-data-ref.cc (initialize_matrix_A): Check whether an INTEGER_CST fits in HWI,

Re: [PATCH v4 6/7] OpenMP: Fortran front-end support for dispatch + adjust_args

2025-01-13 Thread Tobias Burnus
Hi PA, Paul-Antoine Arras wrote: Here is an updated patch following your suggestion. Thanks. It is not clear whether you are just waiting for test result or not before committing it as obvious. Thus, just in case: LGTM. Thanks, Tobias

Re: [PATCH] d, v2: give dependency files better filenames

2025-01-13 Thread Jakub Jelinek
On Mon, Jan 13, 2025 at 02:45:28PM +0100, Arsen Arsenović wrote: > > So the former d/.deps/file.Po which handled both d/dmd/common/file.d and > > d/dmd/root/file.d in your case would be d/.deps/d-common-file.o.d and > > d/.deps/d-root-file.o.d while with the above DEPFILE it would be > > d/.deps/co

5th Ping: [Middle-end][PATCH v4 0/3][RFC]Provide more contexts for -Warray-bounds and -Wstringop-* warning messages

2025-01-13 Thread Qing Zhao
Hi, This is the 5th ping of the middle end review of the patch set. Could you please take a look at the patch set for -fdiagnostics-details, and provide more advice on: A. Whether the middle-end design and implementation is reasonable and extendable to more other optimizations (including

Re: [PATCH v5 02/10] OpenMP: Re-work and extend context selector resolution

2025-01-13 Thread Sandra Loosemore
On 1/13/25 16:43, Tobias Burnus wrote: Hi all, Tobias Burnus wrote: Tobias Burnus wrote: Sandra Loosemore wrote: This patch reimplements the middle-end support for "declare variant" and extends the resolution mechanism to also handle metadirectives (PR112779).  It also adds partial support fo

  1   2   >