Re: [PING * 3][PATCH v3] Add new warning Wmissing-designated-initializers [PR39589]

2025-06-05 Thread Peter Frost
Thanks for the review, much appreciated. Agreed on all those points, I'll remove it from -Wextra and just leave it as a standalone warning, and I'll add those tests you suggested. On 02/06/2025 19:08, Joseph Myers wrote: On Sun, 1 Jun 2025, Peter Frost wrote: Ping https://gcc.gnu.org/piperma

Re: [PING * 3][PATCH v3] Add new warning Wmissing-designated-initializers [PR39589]

2025-06-02 Thread Joseph Myers
On Sun, 1 Jun 2025, Peter Frost wrote: > Ping https://gcc.gnu.org/pipermail/gcc-patches/2025-January/672568.html This needs various coding style fixes. Lines should be broken before binary operators such as && or || rather than after, and there should be a space before '(' in function and macr

[PING * 3][PATCH v3] Add new warning Wmissing-designated-initializers [PR39589]

2025-06-01 Thread Peter Frost
Ping https://gcc.gnu.org/pipermail/gcc-patches/2025-January/672568.html

[PING][PATCH v3] Add new warning Wmissing-designated-initializers [PR39589]

2025-04-25 Thread Peter Frost
Ping https://gcc.gnu.org/pipermail/gcc-patches/2025-January/672568.html Missed the version 15 freeze with the last ping, I believe the project is open for general development again now?

Re: [PING][PATCH v3] Add new warning Wmissing-designated-initializers [PR39589]

2025-02-05 Thread Jeff Law
On 2/5/25 3:43 PM, Peter Frost wrote: Ping https://gcc.gnu.org/pipermail/gcc-patches/2025-January/672568.html We're in regression fixes only phase of our development cycle. This doesn't fix a regression, so it'll need to wait for the next development window to open before it gets further at

[PING][PATCH v3] Add new warning Wmissing-designated-initializers [PR39589]

2025-02-05 Thread Peter Frost
Ping https://gcc.gnu.org/pipermail/gcc-patches/2025-January/672568.html

[PATCH v3] Add new warning Wmissing-designated-initializers [PR39589]

2025-01-03 Thread Peter Frost
v3 Patch: * adds documentation * fixes formatting * minor code cleanup Currently the behaviour of Wmissing-field-initializers is inconsistent between C and C++. The C warning assumes that missing designated initializers are deliberate, and does not warn. The C++ warning doe

Re: [PATCH] inline asm, v3: Add new constraint for symbol definitions

2024-12-17 Thread Jason Merrill
On 11/22/24 4:31 AM, Jakub Jelinek wrote: On Thu, Nov 21, 2024 at 11:57:13PM +, Joseph Myers wrote: On Wed, 6 Nov 2024, Jakub Jelinek wrote: + error_at (loc, "%<:%> constraint operand is not address " +"of a function or non-automatic variable

Re: [PATCH] inline asm, v3: Add new constraint for symbol definitions

2024-11-22 Thread Joseph Myers
On Fri, 22 Nov 2024, Jakub Jelinek wrote: > On Thu, Nov 21, 2024 at 11:57:13PM +, Joseph Myers wrote: > > On Wed, 6 Nov 2024, Jakub Jelinek wrote: > > > > > + error_at (loc, "%<:%> constraint operand is not address " > > > + "of a function or non-automatic v

Re: [PATCH] v3: Add -f{, no-}assume-sane-operators-new-delete options [PR110137]

2024-11-22 Thread Richard Biener
On Fri, 22 Nov 2024, Jakub Jelinek wrote: > On Tue, Nov 19, 2024 at 01:52:06PM +0100, Jan Hubicka wrote: > > > On Tue, Nov 19, 2024 at 11:23:31AM +0100, Jakub Jelinek wrote: > > > > On Tue, Nov 19, 2024 at 10:25:16AM +0100, Richard Biener wrote: > > > > > I think it's pretty clear and easy to desc

Re: [PATCH] inline asm, v3: Add new constraint for symbol definitions

2024-11-22 Thread Richard Biener
On Fri, 22 Nov 2024, Jakub Jelinek wrote: > On Thu, Nov 21, 2024 at 11:57:13PM +, Joseph Myers wrote: > > On Wed, 6 Nov 2024, Jakub Jelinek wrote: > > > > > + error_at (loc, "%<:%> constraint operand is not address " > > > + "of a function or non-automatic v

[PATCH] v3: Add -f{,no-}assume-sane-operators-new-delete options [PR110137]

2024-11-22 Thread Jakub Jelinek
On Tue, Nov 19, 2024 at 01:52:06PM +0100, Jan Hubicka wrote: > > On Tue, Nov 19, 2024 at 11:23:31AM +0100, Jakub Jelinek wrote: > > > On Tue, Nov 19, 2024 at 10:25:16AM +0100, Richard Biener wrote: > > > > I think it's pretty clear and easy to describe to users what "m " and > > > > what "mC" do.

[PATCH] inline asm, v3: Add new constraint for symbol definitions

2024-11-22 Thread Jakub Jelinek
On Thu, Nov 21, 2024 at 11:57:13PM +, Joseph Myers wrote: > On Wed, 6 Nov 2024, Jakub Jelinek wrote: > > > + error_at (loc, "%<:%> constraint operand is not address " > > +"of a function or non-automatic variable"); > > I think a testcase for this error

[libstdc++-v3] Add __builtion_unreachable to vector::size(), vector::capacity()

2024-11-16 Thread Jan Hubicka
Hi, This patch makes it clear that vector sizes and capacities are not negative. With recent change to ipa-fnsummary this should not affect inlining and improves codegen of some vector manipulation functions. I tested clang build. Looking for throw_bad calls there are only 3 called considerably

[PATCH][v3] Add missing SLP discovery for CFN[_MASK][_LEN]_SCATTER_STORE

2024-11-11 Thread Richard Biener
This was responsible for a bunch of SVE FAILs with --param vect-force-slp=1 Bootstrapped and tested on x86_64-unknown-linux-gnu. * tree-vect-slp.cc (arg1_arg3_map): New. (arg1_arg3_arg4_map): Likewise. (vect_get_operand_map): Handle IFN_SCATTER_STORE, IFN_MASK_SCAT

Re: [PATCH] c, v3: Add __builtin_stdc_rotate_{left,right} builtins [PR117030]

2024-10-28 Thread Joseph Myers
On Mon, 28 Oct 2024, Jakub Jelinek wrote: > Ok, here is an updated patch, which for ubsan checks just for negative > count and nothing else, does that check before using TRUNC_MOD_EXPR on > the argument and uses it on unsigned types in all cases. > The c_fully_fold_internal new wording is removed

[PATCH] c, v3: Add __builtin_stdc_rotate_{left,right} builtins [PR117030]

2024-10-28 Thread Jakub Jelinek
On Fri, Oct 25, 2024 at 08:06:36PM +, Joseph Myers wrote: > If sanitizing makes sense for these built-in functions, surely it should > check for all negative shifts, including those that are multiples of the > width (and there should be tests for it in the testsuite). So sanitizing > would

Re: [PATCH] libcpp, v3: Add support for gnu::offset #embed/__has_embed parameter

2024-09-11 Thread Joseph Myers
On Fri, 30 Aug 2024, Jakub Jelinek wrote: > On Fri, Aug 16, 2024 at 04:58:58PM +, Joseph Myers wrote: > > On Thu, 15 Aug 2024, Jakub Jelinek wrote: > > > > > + else > > > + { > > > + if (res > INTTYPE_MAXIMUM (off_t)) > > > + cpp_error_with_line (pfile, CPP_DL_ERROR, loc,

Re: [PATCH] libcpp, c-family, v3: Add (dumb) C23 N3017 #embed support [PR105863]

2024-09-02 Thread Jakub Jelinek
On Fri, Aug 16, 2024 at 05:14:42PM +, Joseph Myers wrote: > On Fri, 16 Aug 2024, Jakub Jelinek wrote: > > > Ok. So for now, should I work on a patch variant which tries to follow > > what is in C23 right now? > > Not sure how useful having such a patch variant would be until we have a > bet

[PATCH] libcpp, v3: Add support for gnu::offset #embed/__has_embed parameter

2024-08-30 Thread Jakub Jelinek
On Fri, Aug 16, 2024 at 04:58:58PM +, Joseph Myers wrote: > On Thu, 15 Aug 2024, Jakub Jelinek wrote: > > > + else > > + { > > + if (res > INTTYPE_MAXIMUM (off_t)) > > + cpp_error_with_line (pfile, CPP_DL_ERROR, loc, 0, > > +"too larg

Re: [PATCH] libcpp, v3: Add support for gnu::base64 #embed parameter

2024-08-20 Thread Joseph Myers
On Thu, 15 Aug 2024, Jakub Jelinek wrote: > +#embed __FILE__ gnu::base64(1) prefix() suffix() /* { dg-error "expected > character string literal" } */ > +#embed __FILE__ gnu::base64() prefix() suffix() /* { dg-error "expected > character string literal" } */ Maybe also test this error with a no

Re: [PATCH] libcpp, c-family, v3: Add (dumb) C23 N3017 #embed support [PR105863]

2024-08-16 Thread Joseph Myers
On Fri, 16 Aug 2024, Jakub Jelinek wrote: > Ok. So for now, should I work on a patch variant which tries to follow > what is in C23 right now? Not sure how useful having such a patch variant would be until we have a better idea of what the desired semantics actually are. -- Joseph S. Myers jo

Re: [PATCH] libcpp, c-family, v3: Add (dumb) C23 N3017 #embed support [PR105863]

2024-08-16 Thread Jakub Jelinek
On Fri, Aug 16, 2024 at 04:05:52PM +, Joseph Myers wrote: > On Fri, 16 Aug 2024, Jakub Jelinek wrote: > > > > Apart from any consequences for arguments of prefix/suffix/is_empty > > > (where > > > there is a plausible argument that the argument should get expanded at > > > some point and th

Re: [PATCH] libcpp, c-family, v3: Add (dumb) C23 N3017 #embed support [PR105863]

2024-08-16 Thread Joseph Myers
On Fri, 16 Aug 2024, Jakub Jelinek wrote: > On Fri, Aug 16, 2024 at 01:43:58AM +0200, Jakub Jelinek wrote: > > My reading of it wasn't that whether it is > > # embed < h-char-sequence > embed-parameter-sequence[opt] new-line > > or > > # embed < h-char-sequence > embed-parameter-sequence[opt] new-

Re: [PATCH] libcpp, c-family, v3: Add (dumb) C23 N3017 #embed support [PR105863]

2024-08-16 Thread Joseph Myers
On Fri, 16 Aug 2024, Jakub Jelinek wrote: > > Apart from any consequences for arguments of prefix/suffix/is_empty (where > > there is a plausible argument that the argument should get expanded at > > some point and that the current wording is undesirable for usability), > > this would also mean

Re: [PATCH] libcpp, c-family, v3: Add (dumb) C23 N3017 #embed support [PR105863]

2024-08-16 Thread Jakub Jelinek
On Fri, Aug 16, 2024 at 01:43:58AM +0200, Jakub Jelinek wrote: > My reading of it wasn't that whether it is > # embed < h-char-sequence > embed-parameter-sequence[opt] new-line > or > # embed < h-char-sequence > embed-parameter-sequence[opt] new-line > or > # embed pp-tokens new-line > depends sole

Re: [PATCH] libcpp, c-family, v3: Add (dumb) C23 N3017 #embed support [PR105863]

2024-08-15 Thread Jakub Jelinek
On Thu, Aug 15, 2024 at 10:07:00PM +, Joseph Myers wrote: > On Thu, 15 Aug 2024, Jakub Jelinek wrote: > > > + D(embed, T_EMBED,STDC23,INCL | EXPAND) \ > > I'd like to query the macro expansion handling. My understanding is that > a #embed directive only gets macro

Re: [PATCH] libcpp, c-family, v3: Add (dumb) C23 N3017 #embed support [PR105863]

2024-08-15 Thread Joseph Myers
On Thu, 15 Aug 2024, Jakub Jelinek wrote: > + D(embed, T_EMBED,STDC23,INCL | EXPAND) \ I'd like to query the macro expansion handling. My understanding is that a #embed directive only gets macro-expanded if it fails to match either of the forms # embed < h-char-

[PATCH 3/7] libdiagnostics v3: add C++ wrapper API

2024-08-15 Thread David Malcolm
Changed in v3: * Moved the testsuite to a separate patch * Updated copyright year * class text_sink: New. * class file: Add default ctor, copy ctor, move ctor; make m_inner non-const * class physical_location: Add default ctor * class logical_location: Make m_inner non-const * class execution_pat

[PATCH] libcpp, v3: Add support for gnu::base64 #embed parameter

2024-08-15 Thread Jakub Jelinek
Hi! Here is a new version of the gnu::base64 parameter support, the only changes are in using the EMBED_PARAMS registry of parameters. 2024-08-15 Jakub Jelinek libcpp/ * internal.h (struct cpp_embed_params): Add base64 member. (_cpp_free_embed_params_tokens): Declare.

[PATCH] libcpp, c-family, v3: Add (dumb) C23 N3017 #embed support [PR105863]

2024-08-15 Thread Jakub Jelinek
On Wed, Aug 14, 2024 at 09:58:04PM +, Joseph Myers wrote: > On Tue, 18 Jun 2024, Jakub Jelinek wrote: > > > The following patch implements the C23 N3017 "#embed - a scannable, > > tooling-friendly binary resource inclusion mechanism" paper. > > Some initial comments, not yet reviewed the whol

[PATCH 1/3][v3] Add TARGET_MODE_CAN_TRANSFER_BITS

2024-07-31 Thread Richard Biener
The following adds a target hook to specify whether regs of MODE can be used to transfer bits. The hook is supposed to be used for value-numbering to decide whether a value loaded in such mode can be punned to another mode instead of re-loading the value in the other mode and for SRA to decide whe

[Patch, rs6000, middle-end] v3: Add implementation for different targets for pair mem fusion

2024-06-18 Thread Ajit Agarwal
Hello Richard: All comments are addressed. Common infrastructure using generic code for pair mem fusion of different targets. rs6000 target specific code implement virtual functions defined by generic code. Target specific code are added in rs6000-mem-fusion.cc. Bootstrapped and regtested on p

Re: [PATCH] c, v3: Add stdckdint.h header for C23

2023-08-11 Thread Joseph Myers
On Fri, 11 Aug 2023, Jakub Jelinek wrote: > All that is diagnosed is when result is bool or enum (any kind). Even for I'd suggest tests that other nonsense cases are diagnosed, such as floating-point or pointer arguments or results (hopefully such cases are already diagnosed and just need test

[PATCH] c, v3: Add stdckdint.h header for C23

2023-08-11 Thread Jakub Jelinek via Gcc-patches
On Thu, Aug 10, 2023 at 10:31:12PM +, Joseph Myers wrote: > > The following patch (on top of the stdckdint.h patch and _BitInt patch > > series) adds a test for _BitInt diagnostics of ckd_{add,sub,mul} macros. > > I remain unconvinced that diagnosing use with types where it's clear what > the

Re: [PATCH v3] Add leafy mode for zero-call-used-regs

2023-06-26 Thread Richard Biener via Gcc-patches
On Mon, 26 Jun 2023, Qing Zhao wrote: > > > > On Jun 23, 2023, at 7:27 PM, Alexandre Oliva wrote: > > > > On Jun 23, 2023, Qing Zhao via Gcc-patches wrote: > > > >> It?s better to add this definition earlier in the list of the ?three > >> basic values?, to make it ?four basic values?, like t

Re: [PATCH v3] Add leafy mode for zero-call-used-regs

2023-06-26 Thread Qing Zhao via Gcc-patches
> On Jun 23, 2023, at 7:27 PM, Alexandre Oliva wrote: > > On Jun 23, 2023, Qing Zhao via Gcc-patches wrote: > >> It’s better to add this definition earlier in the list of the “three >> basic values”, to make it “four basic values”, like the following: > > Oh, my, sorry for being so dense, I

[PATCH v3] Add leafy mode for zero-call-used-regs

2023-06-23 Thread Alexandre Oliva via Gcc-patches
On Jun 23, 2023, Qing Zhao via Gcc-patches wrote: > It’s better to add this definition earlier in the list of the “three > basic values”, to make it “four basic values”, like the following: Oh, my, sorry for being so dense, I had managed to miss that bit all this time somehow :-( > The sentence

Ping^^ [PATCH v3] Add condition coverage profiling

2023-05-28 Thread Jørgen Kvalsvik via Gcc-patches
On 11/04/2023 15:23, Jørgen Kvalsvik wrote: > On 05/12/2022 10:40, Jørgen Kvalsvik wrote: >> This patch adds support in gcc+gcov for modified condition/decision >> coverage (MC/DC) with the -fprofile-conditions flag. MC/DC is a type of >> test/code coverage and it is particularly important in the a

Ping^ [PATCH v3] Add condition coverage profiling

2023-05-15 Thread Jørgen Kvalsvik via Gcc-patches
On 11/04/2023 15:23, Jørgen Kvalsvik wrote: > On 05/12/2022 10:40, Jørgen Kvalsvik wrote: >> This patch adds support in gcc+gcov for modified condition/decision >> coverage (MC/DC) with the -fprofile-conditions flag. MC/DC is a type of >> test/code coverage and it is particularly important in the a

Re: [PATCH v3] Add pattern to convert vector shift + bitwise and + multiply to vector compare in some cases.

2023-05-11 Thread Philipp Tomsich
Bootstrapped and reg-tested overnight for x86 and aarch64. Applied to master, thanks! Philipp. On Tue, 9 May 2023 at 09:13, Richard Biener wrote: > > On Tue, Dec 20, 2022 at 1:23 PM Manolis Tsamis > wrote: > > > > When using SWAR (SIMD in a register) techniques a comparison operation > > with

Re: [PATCH v3] Add pattern to convert vector shift + bitwise and + multiply to vector compare in some cases.

2023-05-09 Thread Richard Biener via Gcc-patches
On Tue, Dec 20, 2022 at 1:23 PM Manolis Tsamis wrote: > > When using SWAR (SIMD in a register) techniques a comparison operation within > such a register can be made by using a combination of shifts, bitwise and and > multiplication. If code using this scheme is vectorized then there is > potenti

Ping [PATCH v3] Add condition coverage profiling

2023-04-10 Thread Jørgen Kvalsvik
On 05/12/2022 10:40, Jørgen Kvalsvik wrote: > This patch adds support in gcc+gcov for modified condition/decision > coverage (MC/DC) with the -fprofile-conditions flag. MC/DC is a type of > test/code coverage and it is particularly important in the avation and > automotive industries for safety-cri

Ping [PATCH v3] Add condition coverage profiling

2023-03-05 Thread Jørgen Kvalsvik via Gcc-patches
On 05/12/2022 10:40, Jørgen Kvalsvik wrote: > This patch adds support in gcc+gcov for modified condition/decision > coverage (MC/DC) with the -fprofile-conditions flag. MC/DC is a type of > test/code coverage and it is particularly important in the avation and > automotive industries for safety-cri

Re: [PATCH v3] Add pattern to convert vector shift + bitwise and + multiply to vector compare in some cases.

2023-01-11 Thread Manolis Tsamis
Hi Richard and Tamar, I just wanted to ping you about this patch. Is there a chance to get this into GCC13? Thanks, Manolis On Tue, Dec 20, 2022 at 2:31 PM Manolis Tsamis wrote: > > On Tue, Dec 20, 2022 at 2:23 PM Manolis Tsamis > wrote: > > > > When using SWAR (SIMD in a register) techniques

Re: [PATCH v3] Add pattern to convert vector shift + bitwise and + multiply to vector compare in some cases.

2022-12-20 Thread Manolis Tsamis
On Tue, Dec 20, 2022 at 2:23 PM Manolis Tsamis wrote: > > When using SWAR (SIMD in a register) techniques a comparison operation within > such a register can be made by using a combination of shifts, bitwise and and > multiplication. If code using this scheme is vectorized then there is > potenti

[PATCH v3] Add pattern to convert vector shift + bitwise and + multiply to vector compare in some cases.

2022-12-20 Thread Manolis Tsamis
When using SWAR (SIMD in a register) techniques a comparison operation within such a register can be made by using a combination of shifts, bitwise and and multiplication. If code using this scheme is vectorized then there is potential to replace all these operations with a single vector comparison

Ping [PATCH v3] Add condition coverage profiling

2022-12-19 Thread Jørgen Kvalsvik via Gcc-patches
On 05/12/2022 10:40, Jørgen Kvalsvik wrote: > This patch adds support in gcc+gcov for modified condition/decision > coverage (MC/DC) with the -fprofile-conditions flag. MC/DC is a type of > test/code coverage and it is particularly important in the avation and > automotive industries for safety-cri

[PATCH v3] Add condition coverage profiling

2022-12-04 Thread Jørgen Kvalsvik via Gcc-patches
This patch adds support in gcc+gcov for modified condition/decision coverage (MC/DC) with the -fprofile-conditions flag. MC/DC is a type of test/code coverage and it is particularly important in the avation and automotive industries for safety-critical applications. MC/DC it is required for or reco

Re: [PATCH v3] Add gcc/make-unique.h

2022-11-02 Thread Jason Merrill via Gcc-patches
On 10/26/22 16:40, David Malcolm via Gcc-patches wrote: Changed in v3: added include of v2: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/604137.html v1: https://gcc.gnu.org/pipermail/gcc-patches/2022-July/598189.html On Tue, 2022-07-12 at 07:48 +0100, Jonathan Wakely wrote: On Tue, 1

[PATCH v3] Add gcc/make-unique.h

2022-10-26 Thread David Malcolm via Gcc-patches
Changed in v3: added include of v2: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/604137.html v1: https://gcc.gnu.org/pipermail/gcc-patches/2022-July/598189.html On Tue, 2022-07-12 at 07:48 +0100, Jonathan Wakely wrote: > On Tue, 12 Jul 2022, 01:25 David Malcolm, > wrote: > > > On Fri,

Re: [PATCH] libcpp, v3: Add -Winvalid-utf8 warning [PR106655]

2022-08-31 Thread Jason Merrill via Gcc-patches
On 8/31/22 07:14, Jakub Jelinek wrote: On Tue, Aug 30, 2022 at 05:51:26PM -0400, Jason Merrill wrote: This hunk now seems worth factoring out of the four places it occurs. It also seems the comment for _cpp_valid_utf8 needs to be updated: it currently says it's not called when parsing a string.

[PATCH] libcpp, v3: Add -Winvalid-utf8 warning [PR106655]

2022-08-31 Thread Jakub Jelinek via Gcc-patches
On Tue, Aug 30, 2022 at 05:51:26PM -0400, Jason Merrill wrote: > This hunk now seems worth factoring out of the four places it occurs. > > It also seems the comment for _cpp_valid_utf8 needs to be updated: it > currently says it's not called when parsing a string. Ok, so like this? 2022-08-31 J

Re: [PATCH V3] Add warning options -W[no-]compare-distinct-pointer-types

2022-08-30 Thread Joseph Myers
On Sat, 27 Aug 2022, Jose E. Marchesi via Gcc-patches wrote: > + if (metadata + 1 > data) /* { dg-warning "comparison of distinct pointer > types" } */ > + if (metadata + 1 > data) /* { dg-warning "comparison of distinct pointer > types" } */ > + if (metadata + 1 > data) /* There shouldn't

[PATCH V3] Add warning options -W[no-]compare-distinct-pointer-types

2022-08-27 Thread Jose E. Marchesi via Gcc-patches
GCC emits pedwarns unconditionally when comparing pointers of different types, for example: int xdp_context (struct xdp_md *xdp) { void *data = (void *)(long)xdp->data; __u32 *metadata = (void *)(long)xdp->data_meta; __u32 ret; if (metadata + 1 > data)

Re: [PATCH] c++, v3: Add support for __real__/__imag__ modifications in constant expressions [PR88174]

2022-07-05 Thread Jakub Jelinek via Gcc-patches
On Tue, Jul 05, 2022 at 04:44:41PM -0400, Jason Merrill wrote: > On 7/4/22 11:50, Jakub Jelinek wrote: > > On Mon, Jun 27, 2022 at 06:31:18PM +0200, Jakub Jelinek via Gcc-patches > > wrote: > > > > > Hmm, why do we need to handle complex in the !preeval case? I'd think > > > > we > > > > want t

Re: [PATCH] c++, v3: Add support for __real__/__imag__ modifications in constant expressions [PR88174]

2022-07-05 Thread Jason Merrill via Gcc-patches
On 7/4/22 11:50, Jakub Jelinek wrote: On Mon, Jun 27, 2022 at 06:31:18PM +0200, Jakub Jelinek via Gcc-patches wrote: Hmm, why do we need to handle complex in the !preeval case? I'd think we want to preevaluate all complex values or components thereof. Because the late evaluation of the ini

[PATCH] c++, v3: Add support for __real__/__imag__ modifications in constant expressions [PR88174]

2022-07-04 Thread Jakub Jelinek via Gcc-patches
On Mon, Jun 27, 2022 at 06:31:18PM +0200, Jakub Jelinek via Gcc-patches wrote: > Because the late evaluation of the initializer could have touched > the destination, so we need to reevaluate it. > Same reason why we call get_or_insert_ctor_field again in the second > loop as we call it in the first

Re: [PATCH v3] Add QI vector mode support to by-pieces for memset

2021-07-21 Thread H.J. Lu via Gcc-patches
On Wed, Jul 21, 2021 at 12:42 PM Richard Sandiford wrote: > > Richard Sandiford writes: > > "H.J. Lu via Gcc-patches" writes: > >> On Wed, Jul 21, 2021 at 7:50 AM Richard Sandiford > >> wrote: > >>> > >>> "H.J. Lu" writes: > >>> > diff --git a/gcc/builtins.c b/gcc/builtins.c > >>> > index 39ab

Re: [PATCH v3] Add QI vector mode support to by-pieces for memset

2021-07-21 Thread Richard Sandiford via Gcc-patches
Richard Sandiford writes: > "H.J. Lu via Gcc-patches" writes: >> On Wed, Jul 21, 2021 at 7:50 AM Richard Sandiford >> wrote: >>> >>> "H.J. Lu" writes: >>> > diff --git a/gcc/builtins.c b/gcc/builtins.c >>> > index 39ab139b7e1..1972301ce3c 100644 >>> > --- a/gcc/builtins.c >>> > +++ b/gcc/builti

Re: [PATCH v3] Add QI vector mode support to by-pieces for memset

2021-07-21 Thread H.J. Lu via Gcc-patches
On Wed, Jul 21, 2021 at 12:20 PM Richard Sandiford wrote: > > "H.J. Lu via Gcc-patches" writes: > > On Wed, Jul 21, 2021 at 7:50 AM Richard Sandiford > > wrote: > >> > >> "H.J. Lu" writes: > >> > diff --git a/gcc/builtins.c b/gcc/builtins.c > >> > index 39ab139b7e1..1972301ce3c 100644 > >> > --

Re: [PATCH v3] Add QI vector mode support to by-pieces for memset

2021-07-21 Thread Richard Sandiford via Gcc-patches
"H.J. Lu via Gcc-patches" writes: > On Wed, Jul 21, 2021 at 7:50 AM Richard Sandiford > wrote: >> >> "H.J. Lu" writes: >> > diff --git a/gcc/builtins.c b/gcc/builtins.c >> > index 39ab139b7e1..1972301ce3c 100644 >> > --- a/gcc/builtins.c >> > +++ b/gcc/builtins.c >> > @@ -3890,13 +3890,16 @@ exp

Re: [PATCH v3] Add QI vector mode support to by-pieces for memset

2021-07-21 Thread H.J. Lu via Gcc-patches
On Wed, Jul 21, 2021 at 7:50 AM Richard Sandiford wrote: > > "H.J. Lu" writes: > > diff --git a/gcc/builtins.c b/gcc/builtins.c > > index 39ab139b7e1..1972301ce3c 100644 > > --- a/gcc/builtins.c > > +++ b/gcc/builtins.c > > @@ -3890,13 +3890,16 @@ expand_builtin_strnlen (tree exp, rtx target, >

Re: [PATCH v3] Add QI vector mode support to by-pieces for memset

2021-07-21 Thread Richard Sandiford via Gcc-patches
"H.J. Lu" writes: > diff --git a/gcc/builtins.c b/gcc/builtins.c > index 39ab139b7e1..1972301ce3c 100644 > --- a/gcc/builtins.c > +++ b/gcc/builtins.c > @@ -3890,13 +3890,16 @@ expand_builtin_strnlen (tree exp, rtx target, > machine_mode target_mode) > > static rtx > builtin_memcpy_read_str (

[PATCH v3] Add QI vector mode support to by-pieces for memset

2021-07-20 Thread H.J. Lu via Gcc-patches
1. Replace scalar_int_mode with fixed_size_mode in the by-pieces infrastructure to allow non-integer mode. 2. Rename widest_int_mode_for_size to widest_fixed_size_mode_for_size to return QI vector mode for memset. 3. Add op_by_pieces_d::smallest_fixed_size_mode_for_size to return the smallest integ

[GCC 12] [PATCH v3] Add general_regs_only function attribute

2021-04-14 Thread H.J. Lu via Gcc-patches
h of an opinion on the approach itself (adding > an attribute to avoid the error). I'm trying to help improve > the usability of the feature to prevent gaps (underspecified > aspects) in new attributes that are then hard to sort out after > the attribute has been introduced. This

Re: [PATCH v3] Add retain attribute to place symbols in SHF_GNU_RETAIN section

2021-02-17 Thread Jakub Jelinek via Gcc-patches
On Wed, Feb 17, 2021 at 09:34:34AM -0800, H.J. Lu wrote: > -fretain-used-symols. > +/* Add the NAME attribute to *ANODE. */ > + > +static void > +add_attribute (tree *anode, int flags, tree name, tree args, tree ns, > +const bool cxx11_attr_p, > +const struct attribute_spec

[PATCH v3] Add retain attribute to place symbols in SHF_GNU_RETAIN section

2021-02-17 Thread H.J. Lu via Gcc-patches
N > > + if (flag_gnu_retain > > && (new_section->common.flags & SECTION_NAMED) > > && decl != nullptr > > && DECL_P (decl) > > > --- a/gcc/doc/invoke.texi > > +++ b/gcc/doc/invoke.texi > > @@ -16

[PATCH] libstdc++-v3: Add -fcf-protection=none to -march=i486

2021-01-15 Thread H.J. Lu via Gcc-patches
-fcf-protection is automatically enabled in libstdc++ on Linux/x86. Starting from commit 77d372abec0fbf2cfe922e3140ee3410248f979e Author: H.J. Lu Date: Thu Jan 14 05:56:46 2021 -0800 x86: Error on -fcf-protection with incompatible target GCC issues an error on -fcf-protection with incompa

Re: [PATCH] c++: v3: Add __builtin_bit_cast to implement std::bit_cast [PR93121]

2020-12-03 Thread Jason Merrill via Gcc-patches
On 11/26/20 10:09 AM, Jakub Jelinek wrote: Sorry, thought I had replied to this before. The following patch removes the mask from the new native_interpret_aggregate moved to fold-const.c altogether. Instead, the code uses the __builtin_clear_padding infrastructure (new entrypoint in there). If

[PATCH] c++: v3: Add __builtin_bit_cast to implement std::bit_cast [PR93121]

2020-11-26 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 25, 2020 at 07:52:44PM -0500, Jason Merrill wrote: > > > I think you want to check DECL_PADDING_P here; the C and C++ front ends > > > set > > > it on unnamed bit-fields, and that's what is_empty_type looks at. > > > > Ok, changed in my copy. I'll also post a patch for > > __builtin_

Re: [PATCH] c++, v3: Add __builtin_clear_padding builtin - C++20 P0528R3 compiler side [PR88101]

2020-11-20 Thread Richard Biener
On Fri, 20 Nov 2020, Jakub Jelinek wrote: > On Fri, Nov 20, 2020 at 09:19:31AM +, Richard Biener wrote: > > > --- gcc/builtins.c.jj 2020-11-19 12:34:10.749514278 +0100 > > > +++ gcc/builtins.c2020-11-19 16:23:55.261250903 +0100 > > > @@ -11189,6 +11189,13 @@ fold_builtin_1 (locatio

[PATCH] c++, v3: Add __builtin_clear_padding builtin - C++20 P0528R3 compiler side [PR88101]

2020-11-20 Thread Jakub Jelinek via Gcc-patches
On Fri, Nov 20, 2020 at 09:19:31AM +, Richard Biener wrote: > > --- gcc/builtins.c.jj 2020-11-19 12:34:10.749514278 +0100 > > +++ gcc/builtins.c 2020-11-19 16:23:55.261250903 +0100 > > @@ -11189,6 +11189,13 @@ fold_builtin_1 (location_t loc, tree exp > > return build_empty_stmt (loc)

Re: [PATCH 2/6 v3] Add Dead Field Elimination

2020-11-11 Thread Erick Ochoa
On 11.11.20 03:25, Jakub Jelinek wrote: On Wed, Nov 11, 2020 at 03:14:59AM -0800, Erick Ochoa wrote: Using the Dead Field Analysis, Dead Field Elimination automatically transforms gimple to eliminate fields that are never read. 2020-11-04 Erick Ochoa * gcc/Makefile.in: add file to

Re: [PATCH 2/6 v3] Add Dead Field Elimination

2020-11-11 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 11, 2020 at 03:14:59AM -0800, Erick Ochoa wrote: > > Using the Dead Field Analysis, Dead Field Elimination > automatically transforms gimple to eliminate fields that > are never read. > > 2020-11-04 Erick Ochoa > > * gcc/Makefile.in: add file to list of sources > * gcc/ipa

[PATCH 3/6 v3] Add Field Reordering

2020-11-11 Thread Erick Ochoa
Field reordering of structs at link-time 2020-11-04 Erick Ochoa * gcc/Makefile.in: add new file to list of sources * gcc/common.opt: add new flag for field reordering * gcc/passes.def: add new pass * gcc/tree-pass.h: same * gcc/ipa-field-reorder.c: New file * gcc/ipa

[PATCH 2/6 v3] Add Dead Field Elimination

2020-11-11 Thread Erick Ochoa
Using the Dead Field Analysis, Dead Field Elimination automatically transforms gimple to eliminate fields that are never read. 2020-11-04 Erick Ochoa * gcc/Makefile.in: add file to list of sources * gcc/ipa-dfe.c: New * gcc/ipa-dfe.h: Same * gcc/ipa-type-escape-analysis.h: E

[PATCH 4/6 v3] Add documentation for dead field elimination

2020-11-11 Thread Erick Ochoa
2020-11-04 Erick Ochoa * gcc/Makefile.in: Add file to documentation sources * gcc/doc/dfe.texi: New section * gcc/doc/gccint.texi: Include new section --- gcc/Makefile.in | 3 +- gcc/doc/dfe.texi| 187 gcc/doc/gccint.texi |

[PATCH 6/6 v3] Add heuristic to take into account void* pattern.

2020-11-11 Thread Erick Ochoa
We add a heuristic in order to be able to transform functions which receive void* arguments as a way to generalize over arguments. An example of this is qsort. The heuristic works by first inspecting leaves in the call graph. If the leaves only contain a reference to a single RECORD_TYPE then we

Re: [PATCH v3] Add --ld-path= to specify an arbitrary executable as the linker

2020-07-26 Thread Fāng-ruì Sòng via Gcc-patches
On Sun, Jul 26, 2020 at 4:02 AM Andreas Schwab wrote: > > On Jul 25 2020, Fāng-ruì Sòng wrote: > > > On Sat, Jul 25, 2020 at 12:09 AM Andreas Schwab > > wrote: > >> > >> On Jul 24 2020, Fangrui Song via Gcc-patches wrote: > >> > >> > This is to mimick nearly lines. collect2 should filter out opt

Re: [PATCH v3] Add --ld-path= to specify an arbitrary executable as the linker

2020-07-26 Thread Andreas Schwab
On Jul 25 2020, Fāng-ruì Sòng wrote: > On Sat, Jul 25, 2020 at 12:09 AM Andreas Schwab wrote: >> >> On Jul 24 2020, Fangrui Song via Gcc-patches wrote: >> >> > This is to mimick nearly lines. collect2 should filter out options like >> > -fno-lto, -flto, -fuse-ld= before passing to ld. -f* are ha

Re: [PATCH v3] Add --ld-path= to specify an arbitrary executable as the linker

2020-07-25 Thread Fāng-ruì Sòng via Gcc-patches
On Sat, Jul 25, 2020 at 12:09 AM Andreas Schwab wrote: > > On Jul 24 2020, Fangrui Song via Gcc-patches wrote: > > > This is to mimick nearly lines. collect2 should filter out options like > > -fno-lto, -flto, -fuse-ld= before passing to ld. -f* are handled by case > > 'f'. --ld-path needs its o

Re: [PATCH v3] Add --ld-path= to specify an arbitrary executable as the linker

2020-07-25 Thread Andreas Schwab
On Jul 24 2020, Fangrui Song via Gcc-patches wrote: > This is to mimick nearly lines. collect2 should filter out options like > -fno-lto, -flto, -fuse-ld= before passing to ld. -f* are handled by case 'f'. > --ld-path needs its own `else if`. If you handle --ld-path as -fld-path then you don't

[PATCH v3] Add --ld-path= to specify an arbitrary executable as the linker

2020-07-24 Thread Fangrui Song via Gcc-patches
4 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -1077,7 +1077,7 @@ proper position among the other output files. */ LINK_PLUGIN_SPEC \ "%{flto|flto=*:%max_errors = value; break; +case OPT__ld_path_: case OPT_fuse_ld_bfd: case OPT_fuse_ld_gold: case OPT_fuse_ld_lld: >

Re: [PATCH v3] Add -fuse-ld= to specify an arbitrary executable as the linker

2020-07-01 Thread Fāng-ruì Sòng via Gcc-patches
On 2020-07-01, Martin Liška wrote: On 6/30/20 5:32 PM, Fāng-ruì Sòng wrote: There is some concern about clang's -fuse-ld=path http://lists.llvm.org/pipermail/cfe-dev/2020-June/065710.html and use of COMPILER_PATH vs PATH. Shall we introduce another option like -fld-path=path (PATH is used, COMPI

Re: [PATCH v3] Add -fuse-ld= to specify an arbitrary executable as the linker

2020-07-01 Thread Martin Liška
On 6/30/20 5:32 PM, Fāng-ruì Sòng wrote: There is some concern about clang's -fuse-ld=path http://lists.llvm.org/pipermail/cfe-dev/2020-June/065710.html and use of COMPILER_PATH vs PATH. Shall we introduce another option like -fld-path=path (PATH is used, COMPILER_PATH is not used)? I would rec

Re: [PATCH v3] Add -fuse-ld= to specify an arbitrary executable as the linker

2020-06-30 Thread Fāng-ruì Sòng via Gcc-patches
There is some concern about clang's -fuse-ld=path http://lists.llvm.org/pipermail/cfe-dev/2020-June/065710.html and use of COMPILER_PATH vs PATH. Shall we introduce another option like -fld-path=path (PATH is used, COMPILER_PATH is not used)? On Tue, Jun 30, 2020 at 6:04 AM Martin Liška wrote: >

Re: [PATCH v3] Add -fuse-ld= to specify an arbitrary executable as the linker

2020-06-30 Thread Martin Liška
PING^1 On 5/29/20 3:10 AM, Fangrui Song wrote: On 2020-05-25, Martin Liška wrote: On 5/22/20 6:42 AM, Fangrui Song wrote: but I can't fix this one because joining two lines will break the 80-column  rule. What about this: diff --git a/gcc/collect2.c b/gcc/collect2.c index cc57a20e08b..e5b54

Re: [PATCH v3] Add -fuse-ld= to specify an arbitrary executable as the linker

2020-05-28 Thread Fangrui Song via Gcc-patches
On 2020-05-25, Martin Liška wrote: On 5/22/20 6:42 AM, Fangrui Song wrote: but I can't fix this one because joining two lines will break the 80-column  rule. What about this: diff --git a/gcc/collect2.c b/gcc/collect2.c index cc57a20e08b..e5b54b080f7 100644 --- a/gcc/collect2.c +++ b/gcc/coll

Re: Ping^1 [PATCH 2/4 V3] Add target hook stride_dform_valid_p

2020-05-28 Thread Richard Sandiford
"Kewen.Lin" writes: > Hi, > > Gentle ping patches as below: > > 1/4 v3 https://gcc.gnu.org/pipermail/gcc-patches/2020-February/540171.html > 2/4 v3 https://gcc.gnu.org/pipermail/gcc-patches/2020-March/541387.html > 3/4 v3 https://gcc.gnu.org/pipermail/gcc-patches/2020-May/545643.html > > Or shall

Ping^1 [PATCH 2/4 V3] Add target hook stride_dform_valid_p

2020-05-27 Thread Kewen.Lin via Gcc-patches
Hi, Gentle ping patches as below: 1/4 v3 https://gcc.gnu.org/pipermail/gcc-patches/2020-February/540171.html 2/4 v3 https://gcc.gnu.org/pipermail/gcc-patches/2020-March/541387.html 3/4 v3 https://gcc.gnu.org/pipermail/gcc-patches/2020-May/545643.html Or shall I ping them seperately? Thanks! Kew

Re: [PATCH v3] Add -fuse-ld= to specify an arbitrary executable as the linker

2020-05-25 Thread Martin Liška
On 5/22/20 6:42 AM, Fangrui Song wrote: but I can't fix this one because joining two lines will break the 80-column  rule. What about this: diff --git a/gcc/collect2.c b/gcc/collect2.c index cc57a20e08b..e5b54b080f7 100644 --- a/gcc/collect2.c +++ b/gcc/collect2.c @@ -1138,8 +1138,8 @@ main (i

[PATCH v3] Add -fuse-ld= to specify an arbitrary executable as the linker

2020-05-21 Thread Fangrui Song via Gcc-patches
On 2020-05-21, Martin Liška wrote: On 5/21/20 1:52 AM, Fangrui Song wrote: The above issues motivated me to touch this line in PATCH v2. Dropped in PATCH v2. Thank you for the updated patch. The patch is fine except coding style issues: $ ./contrib/check_GNU_style.py /tmp/0001-Add-fuse-ld-to

Re: [PATCH v3] Add `--with-toolexeclibdir=' configuration option

2020-01-20 Thread Ian Lance Taylor
On Mon, Jan 20, 2020 at 6:46 PM Maciej W. Rozycki wrote: > > Ian: Can we please coordinate this somehow? The libgo/ part, like all, > relies on config/toolexeclibdir.m4, so I can either: > > 1. push the whole change all at once and you'll push the libgo/ part to >your repo independently, whi

Re: [PATCH v3] Add `--with-toolexeclibdir=' configuration option

2020-01-20 Thread Maciej W. Rozycki
On Tue, 21 Jan 2020, Joseph Myers wrote: > > Provide means, in the form of a `--with-toolexeclibdir=' configuration > > option, to override the default installation directory for target > > libraries, otherwise known as $toolexeclibdir. This is so that it is > > possible to get newly-built lib

[PING^4][PATCH v3] Add `--with-toolexeclibdir=' configuration option

2020-01-20 Thread Maciej W. Rozycki
On Mon, 2 Dec 2019, Maciej W. Rozycki wrote: > Provide means, in the form of a `--with-toolexeclibdir=' configuration > option, to override the default installation directory for target > libraries, otherwise known as $toolexeclibdir. This is so that it is > possible to get newly-built librari

Re: [PATCH v3] Add `--with-toolexeclibdir=' configuration option

2020-01-20 Thread Joseph Myers
On Mon, 2 Dec 2019, Maciej W. Rozycki wrote: > Provide means, in the form of a `--with-toolexeclibdir=' configuration > option, to override the default installation directory for target > libraries, otherwise known as $toolexeclibdir. This is so that it is > possible to get newly-built librari

[PING^4][PATCH v3] Add `--with-toolexeclibdir=' configuration option

2020-01-13 Thread Maciej W. Rozycki
On Mon, 2 Dec 2019, Maciej W. Rozycki wrote: > Provide means, in the form of a `--with-toolexeclibdir=' configuration > option, to override the default installation directory for target > libraries, otherwise known as $toolexeclibdir. This is so that it is > possible to get newly-built librari

[PING^3][PATCH v3] Add `--with-toolexeclibdir=' configuration option

2020-01-06 Thread Maciej W. Rozycki
On Mon, 2 Dec 2019, Maciej W. Rozycki wrote: > Provide means, in the form of a `--with-toolexeclibdir=' configuration > option, to override the default installation directory for target > libraries, otherwise known as $toolexeclibdir. This is so that it is > possible to get newly-built librari

[PING^2][PATCH v3] Add `--with-toolexeclibdir=' configuration option

2019-12-16 Thread Maciej W. Rozycki
On Mon, 2 Dec 2019, Maciej W. Rozycki wrote: > Provide means, in the form of a `--with-toolexeclibdir=' configuration > option, to override the default installation directory for target > libraries, otherwise known as $toolexeclibdir. This is so that it is > possible to get newly-built librari

  1   2   3   >