[PATCH v3] fold fold_truth_andor field merging into ifcombine

2024-12-08 Thread Alexandre Oliva
This patch introduces various improvements to the logic that merges field compares, while moving it into ifcombine. Before the patch, we could merge: (a.x1 EQNE b.x1) ANDOR (a.y1 EQNE b.y1) into something like: (((type *)&a)[Na] & MASK) EQNE (((type *)&b)[Nb] & MASK) if both of A's fie

Re: [PATCH v2] fold fold_truth_andor field merging into ifcombine

2024-12-08 Thread Alexandre Oliva
Here's yet another incremental patchlet, with the changes made in response to your review to v2. I'll post v3 containing it momentarily, but this incremental is supposed to make it easier to review. diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt index 0d255561b1bdc..be7916e957d66 100644 ---

[committed] pru: Implement c and n asm operand modifiers

2024-12-08 Thread Dimitar Dimitrov
Fix c-c++-common/toplevel-asm-1.c failure for PRU backend, caused by missing implementation of the "c" asm operand modifier. Pushed to trunk. gcc/ChangeLog: * config/pru/pru.cc (pru_print_operand): Implement c and n inline assembly operand modifiers. gcc/testsuite/ChangeLog:

[PATCH v1 2/6] RISC-V: Refine unsigned vector SAT_SUB testcase dump check to tree optimized

2024-12-08 Thread pan2 . li
From: Pan Li The sat alu related testcase check the rtl dump for the standard name like .SAT_SUB exist or not. But the rtl pass expand is somehow impressionable by the middle-end change or debug information. Like below new appearance recently. Replacing Expressions _5 replace with --> _5 = .SA

[PATCH v1 6/6] RISC-V: Refine signed vector SAT_TRUNC testcase dump check to tree optimized

2024-12-08 Thread pan2 . li
From: Pan Li The sat alu related testcase check the rtl dump for the standard name like .SAT_TRUNC exist or not. But the rtl pass expand is somehow impressionable by the middle-end change or debug information. Like below new appearance recently. Replacing Expressions _5 replace with --> _5 = .

[PATCH v1 1/6] RISC-V: Refine unsigned vector SAT_ADD testcase dump check to tree optimized

2024-12-08 Thread pan2 . li
From: Pan Li The sat alu related testcase check the rtl dump for the standard name like .SAT_ADD exist or not. But the rtl pass expand is somehow impressionable by the middle-end change or debug information. Like below new appearance recently. Replacing Expressions _5 replace with --> _5 = .SA

[PATCH v1 4/6] [PATCH] RISC-V: Refine signed vector SAT_ADD testcase dump check to tree optimized

2024-12-08 Thread pan2 . li
From: Pan Li The sat alu related testcase check the rtl dump for the standard name like .SAT_ADD exist or not. But the rtl pass expand is somehow impressionable by the middle-end change or debug information. Like below new appearance recently. Replacing Expressions _5 replace with --> _5 = .SA

[PATCH v1 3/6] RISC-V: Refine unsigned vector SAT_TRUNC testcase dump check to tree optimized

2024-12-08 Thread pan2 . li
From: Pan Li The sat alu related testcase check the rtl dump for the standard name like .SAT_TRUNC exist or not. But the rtl pass expand is somehow impressionable by the middle-end change or debug information. Like below new appearance recently. Replacing Expressions _5 replace with --> _5 = .

[PATCH v1 5/6] RISC-V: Refine signed vector SAT_SUB testcase dump check to tree optimized

2024-12-08 Thread pan2 . li
From: Pan Li The sat alu related testcase check the rtl dump for the standard name like .SAT_SUB exist or not. But the rtl pass expand is somehow impressionable by the middle-end change or debug information. Like below new appearance recently. Replacing Expressions _5 replace with --> _5 = .SA

Re: [PATCH] tree-eh: Don't crash on GIMPLE_TRY_FINALLY with empty cleanup sequence [PR117845]

2024-12-08 Thread Simon Martin
Hi Richard, On 8 Dec 2024, at 10:27, Richard Biener wrote: > On Sat, Dec 7, 2024 at 9:29 PM Simon Martin > wrote: >> >> The following valid code triggers an ICE with -fsanitize=address >> >> === cut here === >> void l() { >> auto const ints = {0,1,2,3,4,5}; >> for (auto i : { 3 } ) { >>

Re: [PATCH v6 1/7] Honor TARGET_PROMOTE_PROTOTYPES during RTL expand

2024-12-08 Thread H.J. Lu
On Sun, Dec 8, 2024, 5:25 PM Richard Biener wrote: > On Sat, Dec 7, 2024 at 5:23 PM Jeff Law wrote: > > > > > > > > On 12/6/24 5:39 AM, Richard Biener wrote: > > > On Wed, Dec 4, 2024 at 9:48 PM H.J. Lu wrote: > > >> > > >> Promote integer arguments smaller than int if > TARGET_PROMOTE_PROTOTYP

Re: [PATCH] Invalid gimple __BB# accepted due to usage of atoi -> replace atoi with stroul in c_parser_gimple_parse_bb_spec [PR114541]

2024-12-08 Thread Richard Biener
On Sat, Dec 7, 2024 at 12:28 AM Heiko Eißfeldt wrote: > > and here is the forgotten patch (it is late...) Hmm. While this might seem to be "good", the failure mode after fixing the issue with atoi (or the alternate failure mode when using __BBB1234) shows that we are missing handling in the GIMP

Re: [PATCH v6 2/7] Drop targetm.promote_prototypes from C, C++ and Ada frontends

2024-12-08 Thread Richard Biener
On Sat, Dec 7, 2024 at 5:22 PM Jeff Law wrote: > > > > On 12/7/24 8:38 AM, Jason Merrill wrote: > > On 12/6/24 7:37 AM, Richard Biener wrote: > >> On Wed, Dec 4, 2024 at 9:48 PM H.J. Lu wrote: > >>> > >>> Remove the targetm.calls.promote_prototypes call from C, C++ and Ada > >>> frontends. > >> >

Re: [PATCH v6 1/7] Honor TARGET_PROMOTE_PROTOTYPES during RTL expand

2024-12-08 Thread Richard Biener
On Sat, Dec 7, 2024 at 5:23 PM Jeff Law wrote: > > > > On 12/6/24 5:39 AM, Richard Biener wrote: > > On Wed, Dec 4, 2024 at 9:48 PM H.J. Lu wrote: > >> > >> Promote integer arguments smaller than int if TARGET_PROMOTE_PROTOTYPES > >> returns true. > > > > This is OK when 2/7 got no negative comme

Re: [PATCH] tree-eh: Don't crash on GIMPLE_TRY_FINALLY with empty cleanup sequence [PR117845]

2024-12-08 Thread Richard Biener
On Sat, Dec 7, 2024 at 9:29 PM Simon Martin wrote: > > The following valid code triggers an ICE with -fsanitize=address > > === cut here === > void l() { > auto const ints = {0,1,2,3,4,5}; > for (auto i : { 3 } ) { > __builtin_printf("%d ", i); > } > } > === cut here === > > Th

Re: [PATCH] tree-eh: Don't crash on GIMPLE_TRY_FINALLY with empty cleanup sequence [PR117845]

2024-12-08 Thread Richard Biener
> Am 08.12.2024 um 18:11 schrieb Simon Martin : > > On 8 Dec 2024, at 11:10, Simon Martin wrote: > >> Hi Richard, >> >>> On 8 Dec 2024, at 10:27, Richard Biener wrote: >>> >>> On Sat, Dec 7, 2024 at 9:29 PM Simon Martin >>> wrote: The following valid code triggers an ICE with -f

[PATCH] testsuite/gcc.dg/tree-ssa/pr111456-1.c: Handle fallout

2024-12-08 Thread Hans-Peter Nilsson
Forcing a fail and marking as xfail is IMHO better than passing --param=logical-op-non-short-circuit=0 or #pragma GCC unroll, making the test pass. To wit, this makes it observable when it's fixed. Ok to commit? -- >8 -- This is expected fallout from r15-5646-gd1cf0d7a0f27fd as described by that

Re: [PATCH v2] testsuite/gcc.dg/tree-ssa/pr111456-1.c: Handle fallout

2024-12-08 Thread Hans-Peter Nilsson
> From: Sam James > Date: Sun, 08 Dec 2024 19:06:12 + > Hans-Peter Nilsson writes: > > > v2: oops, typo: component is tree-optimization, not tree-ssa. > > Resent for the benefit of autotesters that don't yet > > understand natural language. > > > > Forcing a fail and marking as xfail is IMH

Re: [PATCH v2] testsuite/gcc.dg/tree-ssa/pr111456-1.c: Handle fallout

2024-12-08 Thread Sam James
Hans-Peter Nilsson writes: > v2: oops, typo: component is tree-optimization, not tree-ssa. > Resent for the benefit of autotesters that don't yet > understand natural language. > > Forcing a fail and marking as xfail is IMHO better than > passing --param=logical-op-non-short-circuit=0 or #pragma

[PATCH] gm2: fix bad programming practice warning

2024-12-08 Thread Wilken Gottwalt
Fix identifier names to be too similar to Modula-2 keywords and causing warnings coming from Modula-2's own libraries. m2/m2log/InOut.mod:51:18: note: In implementation module ‘InOut’: either the identifier has the same name as a keyword or alternatively a keyword has the wrong case (‘IN’ and ‘in’

[r15-6016 Regression] FAIL: gfortran.dg/sizeof_6.f90 -O1 execution test on Linux/x86_64

2024-12-08 Thread haochen.jiang
On Linux/x86_64, d9cdc500c1e86b1218a24d1e8469930f000528d0 is the first bad commit commit d9cdc500c1e86b1218a24d1e8469930f000528d0 Author: Lewis Hyatt Date: Sat Nov 16 13:45:22 2024 -0500 Support for 64-bit location_t: Activate 64-bit location_t caused FAIL: gfortran.dg/sizeof_6.f90 -O1

[PATCH] Fortran: fix two minor front-end GMP memleaks

2024-12-08 Thread Harald Anlauf
Dear all, while looking at testcases with inquiry refs, I encountered two minor GMP memleaks due to double-initialization of GMP variables. Easily plugged by the attached patch. Regtested on x86_64-pc-linux-gnu. I intend to commit as obvious within 24h unless there are objections. Thanks, Hara

Re: [PATCH] AIX Build failure with default -std=gnu23.

2024-12-08 Thread David Edelsohn
This revised patch is okay. You are listed in the FSF copyrights file for GCC GDB GLIBC BINUTILS, but do you have write privileges for the GCC repo? You are not listed in gcc/MAINTAINERS for write-after-approval. Thanks, David On Sun, Dec 8, 2024 at 10:49 AM swamy sangamesh wrote: > Thank you

[PATCH v2] testsuite/gcc.dg/tree-ssa/pr111456-1.c: Handle fallout

2024-12-08 Thread Hans-Peter Nilsson
v2: oops, typo: component is tree-optimization, not tree-ssa. Resent for the benefit of autotesters that don't yet understand natural language. Forcing a fail and marking as xfail is IMHO better than passing --param=logical-op-non-short-circuit=0 or #pragma GCC unroll, making the test pass. To wi

Re: [PATCH] Fix type compatibility for types with flexible array member [PR113688,PR114014,PR117724]

2024-12-08 Thread Sam James
Martin Uecker writes: > Hi Richard, > > this is another version. It now adds an "ignore_size" flag > to gimple_canonical_types_compatible_p and uses this instead > of having the complicated special case for arrays at the > end. Also zero-sized members are now ignored again, except > if they are

Re: [PATCH] tree-eh: Don't crash on GIMPLE_TRY_FINALLY with empty cleanup sequence [PR117845]

2024-12-08 Thread Simon Martin
On 8 Dec 2024, at 11:10, Simon Martin wrote: > Hi Richard, > > On 8 Dec 2024, at 10:27, Richard Biener wrote: > >> On Sat, Dec 7, 2024 at 9:29 PM Simon Martin >> wrote: >>> >>> The following valid code triggers an ICE with -fsanitize=address >>> >>> === cut here === >>> void l() { >>> auto co

Re: [PATCH] Fortran: fix two minor front-end GMP memleaks

2024-12-08 Thread Jerry Delisle
Looks good, OK to push. On Sun, Dec 8, 2024, 1:39 PM Harald Anlauf wrote: > Dear all, > > while looking at testcases with inquiry refs, I encountered two minor > GMP memleaks due to double-initialization of GMP variables. Easily > plugged by the attached patch. > > Regtested on x86_64-pc-linux-

[PATCH] Fix type compatibility for types with flexible array member [PR113688,PR114014,PR117724]

2024-12-08 Thread Martin Uecker
Hi Richard, this is another version. It now adds an "ignore_size" flag to gimple_canonical_types_compatible_p and uses this instead of having the complicated special case for arrays at the end. Also zero-sized members are now ignored again, except if they are arrays at the end where then only

Re: 'gcc/config/nvptx/gen-multilib-matches.sh': Support '--selftest'

2024-12-08 Thread Sam James
Thomas Schwinge writes: > Hi Sam! Hi! > > On 2024-12-06T09:34:32+, Sam James wrote: >> The script has #!/bin/sh shebang (and hence must have POSIX shell >> compatibility), but the patch introduces uses of the 'local' keyword >> which isn't in POSIX. >> >> While many shells do have the 'loca

Re: [PATCH] Add fancy pointer support in std::map/set

2024-12-08 Thread François Dumont
On 04/12/2024 22:48, Jonathan Wakely wrote: On 04/12/24 19:27 +0100, François Dumont wrote: Hi I've completed the synchronization with your equivalent PR for std::list so here is the updated patch. PR updated a couple of days ago. Note that I've started to rework the patch for the same in

RE: [PATCH v1] RISC-V: Fix incorrect optimization options passing to partial

2024-12-08 Thread Li, Pan2
Thanks Kito, all issues like below of rvv.exp are fixed. Pan -Original Message- From: Kito Cheng Sent: Monday, December 9, 2024 2:58 PM To: Li, Pan2 Cc: gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai; jeffreya...@gmail.com; rdapp@gmail.com Subject: Re: [PATCH v1] RISC-V: Fix incorr

Re: [PATCH v1] RISC-V: Fix incorrect optimization options passing to partial

2024-12-08 Thread Kito Cheng
ok On Mon, Dec 9, 2024 at 2:13 PM wrote: > > From: Pan Li > > Like the strided load/store, the testcases of vector partial > are designed to pick up different sorts of optimization options but > actually these option are ignored according to the Execution log of > the gcc.log. > > This patch wou

[PATCH v1] RISC-V: Fix incorrect optimization options passing to partial

2024-12-08 Thread pan2 . li
From: Pan Li Like the strided load/store, the testcases of vector partial are designed to pick up different sorts of optimization options but actually these option are ignored according to the Execution log of the gcc.log. This patch would like to make it correct almost the same as how we fixed

Re: [PATCH v1 1/6] RISC-V: Refine unsigned vector SAT_ADD testcase dump check to tree optimized

2024-12-08 Thread Kito Cheng
This patch series is LGTM :) On Sun, Dec 8, 2024 at 8:01 PM wrote: > > From: Pan Li > > The sat alu related testcase check the rtl dump for the standard name > like .SAT_ADD exist or not. But the rtl pass expand is somehow > impressionable by the middle-end change or debug information. Like >

Re: [PATCH] AIX Build failure with default -std=gnu23.

2024-12-08 Thread swamy sangamesh
Hi David, I don't have write privileges for GCC repo. I have raised a request for write access and provided your email address as approver. Please approve the request. Thanks, Sangamesh On Mon, Dec 9, 2024 at 3:17 AM David Edelsohn wrote: > This revised patch is okay. > > You are listed in t

Re: [PATCH v2] fold fold_truth_andor field merging into ifcombine

2024-12-08 Thread Richard Biener
On Sun, Dec 8, 2024 at 11:17 AM Alexandre Oliva wrote: > > Here's yet another incremental patchlet, with the changes made in > response to your review to v2. > > I'll post v3 containing it momentarily, but this incremental is supposed > to make it easier to review. > > diff --git a/gcc/c-family/c.

Re: [patch, avr] Assert minimal required bit width of section_common::flags.

2024-12-08 Thread Denis Chertykov
сб, 7 дек. 2024 г. в 17:39, Georg-Johann Lay : > > ...the patch > > Am 07.12.24 um 14:36 schrieb Georg-Johann Lay: > > This patch implements an alarm should we ever run out of > > section flags bits. > > > > Ok for trunk? Ok. Denis

Re: [RFC 0/4] Hard Register Constraints

2024-12-08 Thread Georg-Johann Lay
Am 07.12.24 um 22:25 schrieb Stefan Schulze Frielinghaus: On Sat, Dec 07, 2024 at 08:49:20AM +0100, Georg-Johann Lay wrote: Is there a PR for this feature? (Just to make sure that I don't miss progress on this I could CC to the PR). No. However, I can CC you in case of further patch revis

Re: [PATCH v3 5/7] Support for 64-bit location_t: Activate 64-bit location_t

2024-12-08 Thread Lewis Hyatt
On Tue, Dec 3, 2024 at 7:33 AM Richard Biener wrote: > > On Mon, Dec 2, 2024 at 1:50 AM Lewis Hyatt wrote: > > > > With the codebase having already been prepared to handle it, change > > location_t to be a 64-bit integer instead of a 32-bit integer. > > OK if there's no comments from others withi

libstdc++: Optimize std::vector

2024-12-08 Thread Jan Hubicka
Hi, std::vector has independent implementation for bool which has its won size/capacity functions. I updated them to add __builtin_unreachable to announce that size is never more than max_size. However while testing the code I noticed that even construction of unused copy is not optimized out. M

Re: [PATCH] AIX Build failure with default -std=gnu23.

2024-12-08 Thread swamy sangamesh
Thank you all for the review and comments. David, I have tested the changes against the latest master and ran default test cases. I have also built and ran the default test cases on RHEL9.0 ppc64le. Please let me know if any other testing needs to be covered. Please find the latest patch attached