[patch,gensupport] Support (symbol_ref { code }) in insn attributes.

2024-09-29 Thread Georg-Johann Lay
e the capture provides code access to local variables like "insn". Without this patch, the issued code was basically return { code }; The patch bootstraps + regtests with no changes. Ok for trunk? Johann p.s. Some months ago I discussed the feature with Richard, and he said that the

Re: [RFC/RFA] [PATCH v4 09/12] Add symbolic execution support.

2024-09-29 Thread Jeff Law
: New file.     * sym-exec-condition.h: New file.     * sym-exec-expression-is-a-helper.h: New file.     * sym-exec-expression.cc: New file.     * sym-exec-expression.h: New file.     * sym-exec-state.cc: New file.     * sym-exec-state.h: New file. Patch not attached. jeff

Re: [RFC/RFA] [PATCH v4 08/12] Add a new pass for naive CRC loops detection.

2024-09-29 Thread Jeff Law
On 9/13/24 5:06 AM, Mariam Arutunian wrote: This patch adds a new compiler pass aimed at identifying naive CRC implementations, characterized by the presence of a loop calculating a CRC (polynomial long division). Upon detection of a potential CRC, the pass prints an informational message

Re: [RFC/RFA] [PATCH v4 07/12] aarch64: Add CRC built-ins test for the target AES.

2024-09-29 Thread Jeff Law
On 9/13/24 5:06 AM, Mariam Arutunian wrote:   gcc/testsuite/gcc.target/aarch64/     * crc-builtin-pmul64.c: New test. OK jeff

Re: [RFC/RFA][PATCH v4 06/12] aarch64: Implement new expander for efficient CRC computation

2024-09-29 Thread Jeff Law
On 9/13/24 5:06 AM, Mariam Arutunian wrote: This patch introduces two new expanders for the aarch64 backend, dedicated to generate optimized code for CRC computations. The new expanders are designed to leverage specific hardware capabilities to achieve faster CRC calculations, particularly

Re: [RFC/RFA][PATCH v4 05/12] i386: Implement new expander for efficient CRC computation

2024-09-29 Thread Jeff Law
On 9/13/24 5:05 AM, Mariam Arutunian wrote: This patch introduces two new expanders for the i386 backend, dedicated to generating optimized code for CRC computations. The new expanders are designed to leverage specific hardware capabilities to achieve faster CRC calculations, particularly

Re: [RFC/RFA] [PATCH v4 04/12] RISC-V: Add CRC built-ins tests for the target ZBC.

2024-09-29 Thread Jeff Law
On 9/13/24 5:05 AM, Mariam Arutunian wrote:   gcc/testsuite/gcc.target/riscv/     * crc-builtin-zbc32.c: New file.     * crc-builtin-zbc64.c: Likewise. OK jeff

Re: [RFC/RFA] [PATCH v4 03/12] RISC-V: Add CRC expander to generate faster CRC.

2024-09-29 Thread Jeff Law
On 9/13/24 5:05 AM, Mariam Arutunian wrote:  If the target is ZBC or ZBKC, it uses clmul instruction for the CRC  calculation.         Otherwise, if the target is ZBKB, generates table-based  CRC, but for reversing inputs and the output uses bswap and brev8  instructions.         Add new

Re: [RFC PATCH] More detailed diagnostics for section type conflicts

2024-09-29 Thread Florian Weimer
* Andrew Pinski: >> + append (flags & SECTION_CODE, "CODE"); > > I notice you capture result and it seems like you could also capture > flags and change this to: > append (SECTION_CODE, "CODE"); Thanks, I've made the change locally. Florian

Re: [RFC/RFA][PATCH v4 02/12] Add built-ins and tests for bit-forward and bit-reversed CRCs

2024-09-29 Thread Jeff Law
On 9/13/24 5:05 AM, Mariam Arutunian wrote: This patch introduces new built-in functions to GCC for computing bit- forward and bit-reversed CRCs. These builtins aim to provide efficient CRC calculation capabilities. When the target architecture supports CRC operations (as indicated by the

Re: [RFC/RFA] [PATCH v4 01/12] Implement internal functions for efficient CRC computation

2024-09-29 Thread Jeff Law
On 9/13/24 5:05 AM, Mariam Arutunian wrote: Add two new internal functions (IFN_CRC, IFN_CRC_REV), to provide faster CRC generation. One performs bit-forward and the other bit-reversed CRC computation. If CRC optabs are supported, they are used for the CRC computation. Otherwise, table-based

Re: [PATCH] SH: Document extended asm operand modifers

2024-09-29 Thread Jeff Law
On 9/20/24 3:48 PM, Pietro Monteiro wrote: From: Pietro Monteiro SH: Document extended asm operand modifers gcc/ChangeLog: * doc/extend.texi (SH Operand Modifiers): New. Signed-off-by: Pietro Monteiro --- Tested by running "make info pdf html" and looking at the pdf and html outpu

Re: [RFC PATCH] More detailed diagnostics for section type conflicts

2024-09-29 Thread Andrew Pinski
On Sun, Sep 29, 2024 at 8:13 AM Florian Weimer wrote: > > Sometimes this is a user error, sometimes it is more of an ICE. > In either case, more information about the conflict is helpful. > > I used to this to get a better idea about what is going on with > PR116887. The original diagnostics look

Re: [PATCH] [PATCH] Avoid integer overflow in gcc.dg/cpp/charconst-3.c (PR testsuite/116806)

2024-09-29 Thread Jeff Law
On 9/22/24 7:00 AM, Mikael Pettersson wrote: The intermediate expression (unsigned char) '\234' * scale overflows int on int16 targets, causing the test case to fail there. Fixed by performing the arithmetic in unsigned type, as suggested by Andrew Pinski. Regression tested on x86_64-pc-linu

Re: [patch,avr] doc: Adjust more web links

2024-09-29 Thread Jeff Law
On 9/17/24 4:44 AM, Georg-Johann Lay wrote: This patch updates more web links from nongnu to Github. The http://www.nongnu.org/avr links still worked, but the "super project" seems to be deserted.  Instead, it now links: * https://avrdudes.github.io/avr-libc/avr-libc-u

Re: [PATCH v2] RISC-V: Improve code generation for select of consecutive constants

2024-09-29 Thread Jeff Law
On 9/27/24 1:36 AM, Jovan Vukic wrote: Based on the valuable feedback I received, I decided to implement the patch in the RTL pipeline. Since a similar optimization already exists in simplify_binary_operation_1, I chose to generalize my original approach and place it directly below that code

Re: [PATCH] gdbhooks: Handle references to vec* in VecPrinter

2024-09-29 Thread Jeff Law
le "$SRC/gcc/gcc/gdbhooks.py", line 168, in intptr return long(gdbval) if sys.version_info.major == 2 else int(gdbval) gdb.error: Cannot convert value to long. This patch makes VecPrinter handle such references by stripping them (dereferencing) at the top of the relevant func

Re: [PATCH] MATCH: Simplify `(trunc)copysign ((extend)x, CST)` to `copysign (x, -1.0/1.0)` [PR112472]

2024-09-29 Thread Jeff Law
On 9/24/24 2:57 AM, Eikansh Gupta wrote: This patch simplify `(trunc)copysign ((extend)x, CST)` to `copysign (x, -1.0/1.0)` depending on the sign of CST. Previously, it was simplified to `copysign (x, CST)`. It can be optimized as the sign of the CST matters, not the value. The patch also

Re: [PATCH v1 2/3] RISC-V: Implement scalar SAT_SUB for signed integer

2024-09-29 Thread Jeff Law
On 9/24/24 8:55 PM, pan2...@intel.com wrote: From: Pan Li This patch would like to implement the sssub form 1. Aka: Form 1: #define DEF_SAT_S_SUB_FMT_1(T, UT, MIN, MAX) \ T __attribute__((noinline)) \ sat_s_sub_##T##_fmt_1 (T x, T y

Re: [PATCH] MATCH: Simplify `min(a, b) op max(a, b)` to `a op b` [PR109401]

2024-09-29 Thread Jeff Law
On 9/25/24 2:30 AM, Eikansh Gupta wrote: This patch simplify `min(a,b) op max(a,b)` to `a op b`. This optimization will work for all the binary commutative operations. So, the `op` here can be one of {plus, mult, bit_and, bit_xor, bit_ior, eq, ne, min, max}. PR tree-optimization

Re: [PATCH v4] RISC-V: Implement __init_riscv_feature_bits, __riscv_feature_bits, and __riscv_vendor_feature_bits

2024-09-29 Thread Jeff Law
On 9/29/24 3:16 AM, Yangyu Chen wrote: Good job. I'm currently working on RISC-V target_clone and target_versions support in GCC and found this patch is needed as my prerequisite. However, I found this tagged as "dropped" on Patchwork. What happened? I think Kito was going

[RFC PATCH] More detailed diagnostics for section type conflicts

2024-09-29 Thread Florian Weimer
Sometimes this is a user error, sometimes it is more of an ICE. In either case, more information about the conflict is helpful. I used to this to get a better idea about what is going on with PR116887. The original diagnostics look like this: dl-find_object.c: In function ‘_dlfo_process_initial’

Re: [PATCH] doc: Document struct-layout-1.exp for ABI checks

2024-09-29 Thread Jakub Jelinek
On Sun, Sep 08, 2024 at 08:48:57AM +0300, Dimitar Dimitrov wrote: > This test helped discover PR116621, so it is worth being documented. > > gcc/ChangeLog: > > * doc/sourcebuild.texi: Document struct-layout-1.exp. > > Signed-off-by: Dimitar Dimitrov LGTM. Jakub

Re: [PATCH] doc: Document struct-layout-1.exp for ABI checks

2024-09-29 Thread Dimitar Dimitrov
On Sun, Sep 08, 2024 at 08:48:57AM +0300, Dimitar Dimitrov wrote: > This test helped discover PR116621, so it is worth being documented. > > gcc/ChangeLog: > > * doc/sourcebuild.texi: Document struct-layout-1.exp. > > Signed-off-by: Dimitar Dimitrov > --- > gcc/doc/sourcebuild.texi | 18

Re: [PATCH v4] RISC-V: Implement __init_riscv_feature_bits, __riscv_feature_bits, and __riscv_vendor_feature_bits

2024-09-29 Thread Yangyu Chen
Good job. I'm currently working on RISC-V target_clone and target_versions support in GCC and found this patch is needed as my prerequisite. However, I found this tagged as "dropped" on Patchwork. What happened?

Re: [patch, Fortran] FINDLOC for unsigned

2024-09-28 Thread Steve Kargl
On Sat, Sep 28, 2024 at 08:32:00PM +0200, Thomas Koenig wrote: > Hello world, > > here's another small patch for FINDLOC for unsigned. > > OK for trunk? > OK. Other than UNSIGNED being a new experimental feature, this patch almost qualifies as "Obvious". -- Steve

Re: [patch, Fortran] CSHIFT and EOSHIFT for unsigned

2024-09-28 Thread Steve Kargl
OK. Thanks for the patch. -- steve On Sat, Sep 28, 2024 at 09:33:20AM +0200, Thomas Koenig wrote: > > this patch, consisting almost entirely of the test cases, implements > CSHIFT and EOSHIFT for unsigneds. > > OK for trunk? > > Implement CSHIFT and EOSHIFT for u

[patch, Fortran] FINDLOC for unsigned

2024-09-28 Thread Thomas Koenig
Hello world, here's another small patch for FINDLOC for unsigned. OK for trunk? Best regards Thomas Implement FINDLOC for UNSIGNED. gcc/fortran/ChangeLog: * check.cc (intrinsic_type_check): Handle unsigned. (gfc_check_findloc): Likewise. * gfortran

Re: [PATCH v2] libgcc, libstdc++: Make TU-local declarations in headers external linkage [PR115126]

2024-09-28 Thread Jason Merrill
define __GTHREAD_INLINE inline __GTHREAD_ALWAYS_INLINE #else # define __GTHREAD_INLINE static inline #endif and then marking maybe even just the new inline functions with visibility hidden should be OK? Nathaniel Here's a new patch that does this. Also since v1 it adds anothe

[PATCH v2] diagnostics: Fix compile error for MinGW <7.0

2024-09-28 Thread Torbjörn SVENSSON
Ok for trunk? Changes since v1: - Updated the commit message to mention the actual build error. - Switch to checking the required define rather than the version number of MinGW. -- The define ENABLE_VIRTUAL_TERMINAL_PROCESSING was introduced in MinGW 7.0 Build failure when building with MinGW

[PATCH] tree-optimization/116842 - vectorizer load hosting breaks UID order

2024-09-28 Thread Richard Biener
The following fixes the case when vectorizing a load hoists an invariant load and dependent stmts, thereby breaking UID order of said stmts. While we duplicate the load we just move the dependences. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. PR tree-optimizat

Re: [PATCH v3 3/4] tree-optimization/116024 - simplify C1-X cmp C2 for wrapping signed types

2024-09-28 Thread Richard Biener
the expression -C2 - 1 can be shortened to > >> bit_not (C2). > >> > >> This transformation allows to occasionally save load-immediate / > >> subtraction instructions, e.g. the following statement: > >> > >> 10 - (int)f() >= 20; > >> >

Re: [PATCH] c++: compile time evaluation of prvalues [PR116416]

2024-09-28 Thread Richard Biener
On Fri, 27 Sep 2024, Jakub Jelinek wrote: > On Fri, Sep 27, 2024 at 12:14:47PM +0200, Richard Biener wrote: > > I can investigate a bit when there's a testcase showing the issue. > > The testcase is pr78687.C with Marek's cp-gimplify.cc patch. OK, I can reproduce. The

Re: [PATCH] x86: Don't use address override with segment regsiter

2024-09-28 Thread Uros Bizjak
On Sat, Sep 28, 2024 at 5:23 AM H.J. Lu wrote: > > On Wed, Sep 25, 2024, 7:06 PM Uros Bizjak wrote: >> >> On Wed, Sep 25, 2024 at 11:42 AM H.J. Lu wrote: >> > >> > Address override only applies to the (reg32) part in the thread address >> > fs:(reg32). Don't rewrite thread address like >> > >>

[patch, Fortran] CSHIFT and EOSHIFT for unsigned

2024-09-28 Thread Thomas Koenig
Hello world, this patch, consisting almost entirely of the test cases, implements CSHIFT and EOSHIFT for unsigneds. OK for trunk? Implement CSHIFT and EOSHIFT for unsigned. gcc/fortran/ChangeLog: * check.cc (gfc_check_eoshift): Handle BT_UNSIGNED

[PATCH] expr: Don't clear whole unions [PR116416]

2024-09-27 Thread Jakub Jelinek
On Fri, Sep 27, 2024 at 04:01:33PM +0200, Jakub Jelinek wrote: > So, I think we should go with (but so far completely untested except > for pr78687.C which is optimized with Marek's patch and the above testcase > which doesn't have the clearing anymore) the following patch. T

Re: [PATCH] x86: Don't use address override with segment regsiter

2024-09-27 Thread H.J. Lu
On Wed, Sep 25, 2024, 7:06 PM Uros Bizjak wrote: > On Wed, Sep 25, 2024 at 11:42 AM H.J. Lu wrote: > > > > Address override only applies to the (reg32) part in the thread address > > fs:(reg32). Don't rewrite thread address like > > > > (set (reg:CCZ 17 flags) > > (compare:CCZ (reg:SI 98 [

Re: [PATCH 07/10] c++/modules: Implement ignored TU-local exposures

2024-09-27 Thread Nathaniel Shead
s where a declaration > > naming a TU-local entity is not an exposure, notably the bodies of > > non-inline templates and friend declarations in classes. This patch > > ensures that these references do not error when exporting the module. > > > > We do need

Re: [PATCH] arm: Force flag_pic for FDPIC

2024-09-27 Thread rep . dot . nop
On 26 September 2024 20:51:55 CEST, Fangrui Song wrote: >On Thu, Sep 26, 2024 at 11:21 AM Ramana Radhakrishnan > wrote: >> >> On Mon, Mar 4, 2024 at 1:43 PM Fangrui Song wrote: >> > >> > From: Fangrui Song >> > >> > -fno-pic -mfdpic generated code is like regular -fno-pic, not suitable >> > for

Re: [PATCH v2] libgcc, libstdc++: Make TU-local declarations in headers external linkage [PR115126]

2024-09-27 Thread Nathaniel Shead
internal linkage to start with). > > > > > > > > > > But it sounds like doing something like > > > > > > > > > > #ifdef __has_attribute > > > > > # if __has_attribute(__always_inline__) > > > > > # define __GTHREAD

Re: [PATCH v2 4/4] tree-object-size: Fall back to wholesize for non-const offset

2024-09-27 Thread Jakub Jelinek
On Fri, Sep 20, 2024 at 12:40:29PM -0400, Siddhesh Poyarekar wrote: > Don't bail out early if the offset to a pointer in __builtin_object_size > is a variable, return the wholesize instead since that is a better > fallback for maximum estimate. This should keep checks in place for > fortified func

Re: [PATCH] diagnostic: Save/restore diagnostic context history and push/pop state for PCH [PR116847]

2024-09-27 Thread David Malcolm
On Fri, 2024-09-27 at 09:54 -0400, Lewis Hyatt wrote: > On Fri, Sep 27, 2024 at 9:41 AM David Malcolm > wrote: > > > > On Thu, 2024-09-26 at 23:28 +0200, Jakub Jelinek wrote: > > > Hi! > > > > > > The following patch on top of the just

Re: [PATCH] diagnostic: Save/restore diagnostic context history and push/pop state for PCH [PR116847]

2024-09-27 Thread Lewis Hyatt
On Fri, Sep 27, 2024 at 10:26 AM Jakub Jelinek wrote: > > On Fri, Sep 27, 2024 at 09:54:13AM -0400, Lewis Hyatt wrote: > > A couple comments that may be helpful... > > > > -This is also PR 64117 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64117) > > > > -I

Re: [PATCH v2 1/4] tree-object-size: use size_for_offset in more cases

2024-09-27 Thread Jakub Jelinek
p1, offset_limit) <= 0) > +|| bytes != wholesize || compare_tree_int (op1, offset_limit) <= > 0) > bytes = size_for_offset (bytes, op1, wholesize); > /* In the static case, with a negative offset, the best estimate for >minimum size is size_unk

[PATCH v2] c++: concept in default argument [PR109859]

2024-09-27 Thread Marek Polacek
On Fri, Sep 27, 2024 at 04:57:58PM -0400, Jason Merrill wrote: > On 9/18/24 5:06 PM, Marek Polacek wrote: > > Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? > > > > -- >8 -- > > 1) We're hitting the assert in cp_parser_placeholder_type_specifier. > > It says that if it turns out to b

Re: [PATCH v3 3/4] tree-optimization/116024 - simplify C1-X cmp C2 for wrapping signed types

2024-09-27 Thread Artemiy Volkov
owing statement: >> >> 10 - (int)f() >= 20; >> >> now compiles to >> >> addia0,a0,-11 >> sltia0,a0,-20 >> >> instead of >> >> li a5,10 >> sub a0,a5,a0 >> sltit0,a0,20 >> xoria0,t0,1 >

Re: [PATCH] c++: concept in default argument [PR109859]

2024-09-27 Thread Jason Merrill
On 9/18/24 5:06 PM, Marek Polacek wrote: Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- 1) We're hitting the assert in cp_parser_placeholder_type_specifier. It says that if it turns out to be false, we should do error() instead. Do so, then. 2) lambda-targ8.C should compi

Re: [PATCH] c++: ICE with structured bindings and m-d array [PR102594]

2024-09-27 Thread Jason Merrill
On 9/5/24 6:32 PM, Marek Polacek wrote: Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk/14? OK. -- >8 -- We ICE in decay_conversion with this test: struct S { S() {} }; S arr[1][1]; auto [m](arr3); But not when the last line is: auto [n] = arr3; Therefore t

Re: [PATCH 2/2] c++: Implement resolution for DR 36 [PR116160]

2024-09-27 Thread Jason Merrill
On 9/19/24 7:56 PM, Nathaniel Shead wrote: Noticed how to fix this while working on the other patch. Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? OK. -- >8 -- This implements part of P1787 to no longer complain about redeclaring an entity via using-decl other than i

Re: [PATCH 1/2] c++: Don't strip USING_DECLs when updating local bindings [PR116748]

2024-09-27 Thread Jason Merrill
On 9/19/24 7:53 PM, Nathaniel Shead wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? OK. Alternatively I could solve this the other way around (have a new 'old_target = strip_using_decl (old)' and replace all usages of 'old' except the usages in

Re: [PATCH v2] libgcc, libstdc++: Make TU-local declarations in headers external linkage [PR115126]

2024-09-27 Thread Jason Merrill
en marking maybe even just the new inline functions with visibility hidden should be OK? Nathaniel Here's a new patch that does this. Also since v1 it adds another two internal linkage declarations I'd missed earlier from libstdc++, in pstl; it turns out that doesn't include .

Re: [PATCH v2] libgcc, libstdc++: Make TU-local declarations in headers external linkage [PR115126]

2024-09-27 Thread Jonathan Wakely
e(__always_inline__) > >># define __GTHREAD_ALWAYS_INLINE __attribute__((__always_inline__)) > >># endif > >>#endif > >>#ifndef __GTHREAD_ALWAYS_INLINE > >># define __GTHREAD_ALWAYS_INLINE > >>#endif > >> > >>#ifd

Re: [PATCH v2 3/6] c++/modules: Support anonymous namespaces in header units

2024-09-27 Thread Jason Merrill
On 9/27/24 1:58 AM, Nathaniel Shead wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu and aarch64-unknown-linux-gnu, OK for trunk? -- >8 -- A header unit may contain anonymous namespaces, and those declarations are exported (as with any declaration in a header unit). This patch ensu

Re: Fwd: [patch, fortran] Matmul and dot_product for unsigned

2024-09-27 Thread Mikael Morin
Le 27/09/2024 à 17:08, Thomas Koenig a écrit : Hi Mikael, Now for the remaining intrinsics (FINDLOC, MAXLOC, MINLOC, MAXVAL, MINVAL, CSHIFT and EOSHIFT still missing). I have one patch series touching (inline) MINLOC and MAXLOC to post in the coming days.  Could you please keep away from

[PATCH 3/3] bpf: set index entry for a VAR_DECL in CO-RE relocs

2024-09-27 Thread Cupertino Miranda
CO-RE accesses with non pointer struct variables will also generate a "0" string access within the CO-RE relocation. The first index within the access string, has sort of a different meaning then the remaining of the indexes. For i0:i1:...:in being an access index for "struct A a" declaration, its

Re: [PATCH v2] libgcc, libstdc++: Make TU-local declarations in headers external linkage [PR115126]

2024-09-27 Thread Jason Merrill
define __GTHREAD_ALWAYS_INLINE #endif #ifdef __cplusplus # define __GTHREAD_INLINE inline __GTHREAD_ALWAYS_INLINE #else # define __GTHREAD_INLINE static inline #endif and then marking maybe even just the new inline functions with visibility hidden should be OK? Nathaniel Here'

Re: [Fortran, Patch, PR81265, v1] Fix passing coarrays always w/ descriptor

2024-09-27 Thread Steve Kargl
On Fri, Sep 27, 2024 at 08:12:01PM +0200, Andre Vehreschild wrote: > > the testcase is in the coarray directory, where tests are executed mit > -fcoarray=single and lib. I don't know about none. Because the code stops > compiling when it encounters a coarray with no single or lib. Therefore I > su

Re: [PATCH] c++/modules: Propagate purview/import for templates in duplicate_decls [PR116803]

2024-09-27 Thread Jason Merrill
be something requiring exporting. This is normally handled for a declaration by set_instantiating_module, but when this declaration is a redeclaration duplicate_decls needs to propagate this to olddecl. This patch only changes the logic for template declarations, because in the non-template case

[PATCH v7] Provide new GCC builtin __builtin_counted_by_ref [PR116016]

2024-09-27 Thread Qing Zhao
Hi, this is the 7th version of the patch. Compare to the 6th version, the major changes are several style issues raised by Jakub for the 6th version of the patchs. The 6th version is at: https://gcc.gnu.org/pipermail/gcc-patches/2024-September/663992.html bootstrapped and regress tested on both

Re: [Fortran, Patch, PR81265, v1] Fix passing coarrays always w/ descriptor

2024-09-27 Thread Andre Vehreschild
Hi Steve, the testcase is in the coarray directory, where tests are executed mit -fcoarray=single and lib. I don't know about none. Because the code stops compiling when it encounters a coarray with no single or lib. Therefore I suppose there no way to run it without coarrays. Hope that helps, A

Re: [PATCH 1/2] JSON Dumping of GENERIC trees

2024-09-27 Thread David Malcolm
> > This is the second revision of: > > > > > > > > > https://gcc.gnu.org/pipermail/gcc-patches/2024-September/662849.html > > > > > > I've incorporated the feedback given both by Richard and David - > > > I > > > didn't > >

Re: [Fortran, Patch, PR81265, v1] Fix passing coarrays always w/ descriptor

2024-09-27 Thread Steve Kargl
On Fri, Sep 27, 2024 at 03:20:43PM +0200, Andre Vehreschild wrote: > > attached patch fixes a runtime issue when a coarray was passed as > parameter to a procedure that was itself a parameter. The issue here > was that the coarray was passed as array pointer (i.e. w/o descript

Re: [PATCH] arm: Force flag_pic for FDPIC

2024-09-27 Thread rep . dot . nop
On 27 September 2024 16:05:01 CEST, "Richard Earnshaw (lists)" wrote: >On 26/09/2024 19:21, Ramana Radhakrishnan wrote: >> On Mon, Mar 4, 2024 at 1:43 PM Fangrui Song wrote: >>> >>> From: Fangrui Song >>> >>> -fno-pic -mfdpic generated code is like regular -fno-pic, not suitable >>> for FDPIC (

Ping: [PATCH] PR 99293: Optimize splat of a V2DF/V2DI extract with constant element

2024-09-27 Thread Michael Meissner
This patch seems to have been over looked. https://gcc.gnu.org/pipermail/gcc-patches/2024-September/663101.html I ran a set of spec 2017 benchmarks with this patch applied and compared it to a run without the patch applied. There were no regressions, but 3 benchmarks had slight improvement in

[PATCH 1/3] bpf: make sure CO-RE relocs are never typed with a BTF_KIND_CONST

2024-09-27 Thread Cupertino Miranda
Based on observation within bpf-next selftests and comparisson of GCC and clang compiled code, the BPF loader expects all CO-RE relocations to point to BTF non const type nodes. --- gcc/btfout.cc | 2 +- gcc/config/bpf/btfext-out.cc | 6 gcc/

[PATCH 2/3] bpf: calls do not promote attr access_index on lhs

2024-09-27 Thread Cupertino Miranda
gimple expressions as explicit CO-RE accesses, such that the gimple traverser will further convert the sub-expressions. This patch makes sure that this LHS marking will not happen in case the gimple statement is a function call, which case it is no longer expecting to keep generating CO-RE accesses

[PATCH 0/3] bpf: CO-RE fixes

2024-09-27 Thread Cupertino Miranda
Hi everyone, This patches series includes fixes for bugs uncovered when executing bpf-next selftests. Looking forward to your comments. Regards, Cupertino Cupertino Miranda (3): bpf: make sure CO-RE relocs are never typed with a BTF_KIND_CONST bpf: calls do not promote attr access_index on

Re: [PATCH v3 4/4] tree-optimization/116024 - simplify some cases of X +- C1 cmp C2

2024-09-27 Thread Artemiy Volkov
X (eliminate the right hand side since it holds for any X) >> >> (c) The > and < cases are negations of (a) and (b), respectively. >> >> This transformation allows to occasionally save add / sub instructions, >> for instance the expression >> >> 3 +

Re: [PATCH v2 6/6] c++/modules: Add testcase for standard-library exposures [PR115126]

2024-09-27 Thread Jason Merrill
ch entities. Looks fine, please squash this with the patch that adds the warning. PR c++/115126 gcc/testsuite/ChangeLog: * g++.dg/modules/xtreme-header-8.C: New test. Signed-off-by: Nathaniel Shead --- gcc/testsuite/g++.dg/modules/xtreme-header-8.C | 8 1 file chang

Re: [PATCH v2 5/6] c++/modules: Validate external linkage definitions in header units [PR116401]

2024-09-27 Thread Jason Merrill
." This patch implements this requirement, and cleans up some issues in the testsuite where this was already violated. To handle deduction guides we mark them as inline, since although we give them a definition for implementation reasons, by the standard they have no definition, and so we sho

Re: [PATCH v2 4/6] c++/modules: Check linkage for exported declarations

2024-09-27 Thread Jason Merrill
for some kinds of declarations it's not always obvious where it should be moved to. This patch instead introduces a new function to check that the linkage of a declaration within a module is correct, to be called for all declarations once their linkage is fully determined. As a drive-by fix th

Re: [PATCH 07/10] c++/modules: Implement ignored TU-local exposures

2024-09-27 Thread Jason Merrill
c-linux-gnu, OK for trunk? -- >8 -- [basic.link] p14 lists a number of circumstances where a declaration naming a TU-local entity is not an exposure, notably the bodies of non-inline templates and friend declarations in classes. This patch ensures that these references do not error when exportin

Re: [PATCH 06/10] c++/modules: Detect exposures of TU-local entities

2024-09-27 Thread Jason Merrill
On 9/23/24 7:45 PM, Nathaniel Shead wrote: I feel like there should be a way to make use of LAMBDA_TYPE_EXTRA_SCOPE to avoid the need for the new TYPE_DEFINED_IN_INITIALIZER_P flag, perhaps once something like my patch here[1] is accepted (but with further embellishments for concepts, probably

[PATCH v1 3/4] aarch64: improve assembly debug comments for build attributes

2024-09-27 Thread Matthieu Longo
The previous implementation to emit build attributes did not support string values (asciz) in aeabi_subsection, and was not emitting values associated to tags in the assembly comments. This new approach provides a more user-friendly interface relying on typing, and improves the emitted assembly co

[wwwdocs PATCH] style: add IRC link to nav

2024-09-27 Thread Jason Merrill
I noticed that IRC information was difficult to find on the website. OK? --- htdocs/style.mhtml | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/style.mhtml b/htdocs/style.mhtml index d015029a..f1aa8214 100644 --- a/htdocs/style.mhtml +++ b/htdocs/style.mhtml @@ -67,6 +67,7 @@ Snaps

Re: [PATCH 1/2] JSON Dumping of GENERIC trees

2024-09-27 Thread Thor Preimesberger
f: > > > > > > https://gcc.gnu.org/pipermail/gcc-patches/2024-September/662849.html > > > > I've incorporated the feedback given both by Richard and David - I > > didn't > > find any memory leaks when testing in valgrind :) > > Thanks for the upda

[PATCH v6] Provide new GCC builtin __builtin_counted_by_ref [PR116016]

2024-09-27 Thread Qing Zhao
Hi, this is the 6th version of the patch. Compare to the 5th version, the major changes are (Address Jakub's comments) 1. delete the new global "in_builtin_counted_by_ref" 2. split the "counted_by" specific handling from the routne "build_comp

[PATCH v1 1/4] aarch64: add debug comments to feature properties in .note.gnu.property

2024-09-27 Thread Matthieu Longo
more difficult than needed. This patch adds assembly comments (if -dA is provided) next to the GNU properties. For instance, if PAC and BTI are enabled, it will emit: .word 3 // GNU_PROPERTY_AARCH64_FEATURE_1_AND (BTI, PAC) gcc/ChangeLog: * config/aarch64/aarch64.cc

Re: Fwd: [patch, fortran] Matmul and dot_product for unsigned

2024-09-27 Thread Thomas Koenig
Hi Mikael, Now for the remaining intrinsics (FINDLOC, MAXLOC, MINLOC, MAXVAL, MINVAL, CSHIFT and EOSHIFT still missing). I have one patch series touching (inline) MINLOC and MAXLOC to post in the coming days.  Could you please keep away from them for one more week or two? Looking at the

[PATCH v1 4/4] aarch64: encapsulate note.gnu.property emission into a class

2024-09-27 Thread Matthieu Longo
gcc/ChangeLog: * config.gcc: Add aarch64-dwarf-metadata.o to extra_objs. * config/aarch64/aarch64-dwarf-metadata.h (class section_note_gnu_property): Encapsulate GNU properties code into a class. * config/aarch64/aarch64.cc (GNU_PROPERTY_AARCH64_FEATURE_1_AND): Define. (GNU

[PATCH v1 2/4] aarch64: add minimal support for GCS build attributes

2024-09-27 Thread Matthieu Longo
attributes. This patch adds a first support for AArch64 GCS build attributes. This support includes generating two new assembler directives: .aeabi_subsection and .aeabi_attribute. These directives are generated as per the syntax mentioned in spec "Build Attributes for the Arm® 64-bit Architecture (AA

[PATCH v1 0/4][RFC] aarch64: add minimal support for GCS build attributes

2024-09-27 Thread Matthieu Longo
The primary focus of this patch series is to add support for build attributes in the context of GCS (Guarded Control Stack, an Armv9.4-a extension) to the AArch64 backend. It addresses comments from a previous review [1], and proposes a different approach compared to the previous implementation

Re: [PATCH v6] Provide new GCC builtin __builtin_counted_by_ref [PR116016]

2024-09-27 Thread Qing Zhao
Jakub, Thanks a lot for your comments, I will fix all these issues in the next version. Qing > On Sep 27, 2024, at 10:18, Jakub Jelinek wrote: > > On Fri, Sep 27, 2024 at 02:01:19PM +, Qing Zhao wrote: >> + /* Currently, only when the array_ref is an indirect_ref to a call to the >> +

Re: [PATCH] diagnostic: Save/restore diagnostic context history and push/pop state for PCH [PR116847]

2024-09-27 Thread Lewis Hyatt
On Fri, Sep 27, 2024 at 10:23 AM David Malcolm wrote: > > -I submitted a patch last year for that but did not get any response > > ( > > https://gcc.gnu.org/pipermail/gcc-patches/2023-November/635648.html). > > I guess I never pinged it because I am still trying to

Re: [PATCH] diagnostic: Save/restore diagnostic context history and push/pop state for PCH [PR116847]

2024-09-27 Thread Jakub Jelinek
On Fri, Sep 27, 2024 at 09:54:13AM -0400, Lewis Hyatt wrote: > A couple comments that may be helpful... > > -This is also PR 64117 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64117) > > -I submitted a patch last year for that but did not get any response > (https://gcc.gnu

Re: [PATCH] diagnostic: Save/restore diagnostic context history and push/pop state for PCH [PR116847]

2024-09-27 Thread David Malcolm
On Fri, 2024-09-27 at 10:23 -0400, David Malcolm wrote: > On Fri, 2024-09-27 at 09:54 -0400, Lewis Hyatt wrote: > > On Fri, Sep 27, 2024 at 9:41 AM David Malcolm > > wrote: > > > > > > On Thu, 2024-09-26 at 23:28 +0200, Jakub Jelinek wrote: > > > > Hi

Re: [PATCH v6] Provide new GCC builtin __builtin_counted_by_ref [PR116016]

2024-09-27 Thread Jakub Jelinek
On Fri, Sep 27, 2024 at 02:01:19PM +, Qing Zhao wrote: > + /* Currently, only when the array_ref is an indirect_ref to a call to the > + .ACCESS_WITH_SIZE, return true. > + More cases can be included later when the counted_by attribute is > + extended to other situations. */ > +

Re: [PATCH 1/2] JSON Dumping of GENERIC trees

2024-09-27 Thread David Malcolm
> find any memory leaks when testing in valgrind :) Thanks for the updated patch. [...snip...] > diff --git a/gcc/tree-emit-json.cc b/gcc/tree-emit-json.cc > new file mode 100644 > index 000..df97069b922 > --- /dev/null > +++ b/gcc/tree-emit-json.cc [...snip...]

Re: [nvptx PATCH] Implement isfinite and isnormal optabs in nvptx.md.

2024-09-27 Thread Thomas Schwinge
Hi Roger! If you don't mind, I could use your help here (but: low priority!): On 2024-07-27T19:18:35+0100, "Roger Sayle" wrote: > Previously, for isnormal, GCC -O2 would generate: [...] > and with this patch becomes: > > mov.f64 %r23, %ar0; >

[PATCH] RISC-V/libgcc: Save/Restore routines for E goes with ABI.

2024-09-27 Thread Tsung Chun Lin
Hi, This is my first patch of GCC. It there are any problems, please let me know. 0001-RISC-V-libgcc-Save-Restore-routines-for-E-goes-with-.patch Description: Binary data

Re: [PATCH] arm: Force flag_pic for FDPIC

2024-09-27 Thread Richard Earnshaw (lists)
On 26/09/2024 19:21, Ramana Radhakrishnan wrote: > On Mon, Mar 4, 2024 at 1:43 PM Fangrui Song wrote: >> >> From: Fangrui Song >> >> -fno-pic -mfdpic generated code is like regular -fno-pic, not suitable >> for FDPIC (absolute addressing for symbol references and no function >> descriptor). The

Re: [PATCH] c++: compile time evaluation of prvalues [PR116416]

2024-09-27 Thread Jakub Jelinek
On Fri, Sep 27, 2024 at 12:14:47PM +0200, Richard Biener wrote: > I can investigate a bit when there's a testcase showing the issue. The testcase is pr78687.C with Marek's cp-gimplify.cc patch. Or the struct S { union U { struct T { void *a, *b, *c, *d, *e; } t; struct V {} v; }

Re: [PATCH 2/2] HTML Dumping of trees from gdb

2024-09-27 Thread David Malcolm
On Sat, 2024-09-21 at 22:49 -0500, -thor wrote: > From: thor > > This patch allows one to dump a tree as HTML from within gdb by > invoking, > i.e, >   htlml-tree tree > > gcc/ChangeLog: >     * gcc/gdbhooks.py: Rudimentary dumping of GENERIC trees as html >

Re: [PATCH] diagnostic: Save/restore diagnostic context history and push/pop state for PCH [PR116847]

2024-09-27 Thread Lewis Hyatt
On Fri, Sep 27, 2024 at 9:41 AM David Malcolm wrote: > > On Thu, 2024-09-26 at 23:28 +0200, Jakub Jelinek wrote: > > Hi! > > > > The following patch on top of the just posted cleanup patch > > saves/restores the m_classification_history and m_push_list > > v

Re: [PATCH] diagnostic: Save/restore diagnostic context history and push/pop state for PCH [PR116847]

2024-09-27 Thread David Malcolm
On Thu, 2024-09-26 at 23:28 +0200, Jakub Jelinek wrote: > Hi! > > The following patch on top of the just posted cleanup patch > saves/restores the m_classification_history and m_push_list > vectors for PCH.  Without that as the testcase shows during parsing > of the templat

Re: [PATCH] diagnostic: Use vec instead of custom array reallocations for m_classification_history/m_push_list [PR116847]

2024-09-27 Thread David Malcolm
On Thu, 2024-09-26 at 23:24 +0200, Jakub Jelinek wrote: > Hi! > > diagnostic.h already relies on vec.h, it uses auto_vec in one spot. > > The following patch converts m_classification_history and m_push_list > hand-managed arrays to vec templates. > The main advantage is ex

Re: [RFC PATCH] Enable vectorization for unknown tripcount in very cheap cost model but disable epilog vectorization.

2024-09-27 Thread Kito Cheng
> > So should we adjust very-cheap to allow niter peeling as proposed or > > should we switch > > the default at -O2 to cheap? > > Any thoughts from other backend maintainers? No preference from RISC-V since is variable length vector flavor, so no epilogue for those case, I mean it's already vecto

[PATCH v2] arm: Prevent ICE when doloop dec_set is not PLUS_EXPR

2024-09-27 Thread Andre Vieira (lists)
Resending as v2 so CI picks it up. This patch refactors and fixes an issue where arm_mve_dlstp_check_dec_counter was making an assumption about the form of what a candidate for a dec_insn. This dec_insn is the instruction that decreases the loop counter inside a decrementing loop and we expect

Re: [PATCH] aarch64: fix build failure on aarch64-none-elf

2024-09-27 Thread Richard Earnshaw (lists)
On 26/09/2024 18:14, Matthieu Longo wrote: > A previous patch ([1]) introduced a build regression on aarch64-none-elf > target. The changes were primarilly tested on aarch64-unknown-linux-gnu, > so the issue was missed during development. > The includes are slighly different bet

[Fortran, Patch, PR81265, v1] Fix passing coarrays always w/ descriptor

2024-09-27 Thread Andre Vehreschild
Hi all, attached patch fixes a runtime issue when a coarray was passed as parameter to a procedure that was itself a parameter. The issue here was that the coarray was passed as array pointer (i.e. w/o descriptor) to the function, but the function expected it to be an array w/ descriptor

<    4   5   6   7   8   9   10   11   12   13   >