[PATCH] c++: Clear is_unbraced_* when parsing declaration_seq_opt [PR114917]

2024-05-01 Thread Nathaniel Shead
Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? -- >8 -- Currently we incorrectly retain "in_unbraced_linkage_specification_p" and "in_unbraced_export_declaration_p" when parsing a (braced) declaration-seq. This patch ensures that we clear these flags before parsing the

RE: [PATCH v3] Internal-fn: Introduce new internal function SAT_ADD

2024-05-01 Thread Tamar Christina
> -Original Message- > From: Li, Pan2 > Sent: Thursday, May 2, 2024 4:11 AM > To: Tamar Christina ; gcc-patches@gcc.gnu.org > Cc: juzhe.zh...@rivai.ai; kito.ch...@gmail.com; richard.guent...@gmail.com; > Liu, Hongtao > Subject: RE: [PATCH v3] Internal-fn: Introduce new internal function

RE: [PATCH v3] Internal-fn: Introduce new internal function SAT_ADD

2024-05-01 Thread Li, Pan2
Thanks Tamar > Could you also split off the vectorizer change from scalar recog one? > Typically I would structure a change like this as: > 1. create types/structures + scalar recogn > 2. Vector recog code > 3. Backend changes Sure thing, will rearrange the patch like this. > Is ECF_NOTHROW

Re: [COMMITTED] Reduce startup costs for Value_Range.

2024-05-01 Thread Andrew Pinski
On Wed, May 1, 2024 at 7:40 PM Ian Lance Taylor wrote: > > On Wed, May 1, 2024 at 12:43 AM Aldy Hernandez wrote: > > > > gcc/ChangeLog: > > > > * ipa-fnsummary.cc (evaluate_properties_for_edge): Initialize > > Value_Range's. > > * value-range.h (class Value_Range): Add a buffer

Re: [committed] [RISC-V] Improve floor, ceil & related operations for RISC-V

2024-05-01 Thread Jeff Law
On 5/1/24 12:44 PM, Patrick O'Neill wrote: It also introduced: FAIL: gcc.target/riscv/rvv/autovec/unop/math-nearbyint-run-2.c execution test on rv32gcv newlib/linux. I think I see what's going on here as well. Need to ponder this one a bit longer, but I'm confident I'll be able to sort

Re: [COMMITTED] Reduce startup costs for Value_Range.

2024-05-01 Thread Ian Lance Taylor
On Wed, May 1, 2024 at 12:43 AM Aldy Hernandez wrote: > > gcc/ChangeLog: > > * ipa-fnsummary.cc (evaluate_properties_for_edge): Initialize > Value_Range's. > * value-range.h (class Value_Range): Add a buffer and remove > m_irange and m_frange. >

[PATCH v2] c++/modules: Fix dangling pointer with imported_temploid_friends

2024-05-01 Thread Nathaniel Shead
On Thu, May 02, 2024 at 12:15:44AM +1000, Nathaniel Shead wrote: > On Wed, May 01, 2024 at 09:57:38AM -0400, Patrick Palka wrote: > > > > On Wed, 1 May 2024, Nathaniel Shead wrote: > > > > > Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk (and > > > later 14.2)? I don't think

[PATCH] c++/modules: Stream unmergeable temporaries by value again [PR114856]

2024-05-01 Thread Nathaniel Shead
Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk/14.2? Another alternative would be to stream such !DECL_NAME temporaries with a merge key of MK_unique rather than attempting to find the matching (nonexistant) field of the class context. -- >8 -- In r14-9266-g2823b4d96d9ec4 I

[pushed] doc: Describe limitations re Ada, D, and Go on FreeBSD

2024-05-01 Thread Gerald Pfeifer
This should address the majority of issues left from Rainer's report https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112959 . I pushed this for now. Rainer, thank you very much for your report and all the details. I am sorry our documentation was not up-to-date. It would be great could you have

[PATCH] Fix auto deduction for template specialization scopes [114915].

2024-05-01 Thread Seyed Sajad Kahani
When deducing auto for `adc_return_type`, `adc_variable_type`, and `adc_decomp_type` contexts (at the usage time), we try to resolve the outermost template arguments to be used for satisfaction. This is done by one of the following, depending on the scope: 1. Checking the `DECL_TEMPLATE_INFO`

Re: [PATCH] c++: problematic assert in reference_binding [PR113141]

2024-05-01 Thread Patrick Palka
On Wed, 1 May 2024, Patrick Palka wrote: > On Wed, 1 May 2024, Jason Merrill wrote: > > > On 4/12/24 13:22, Patrick Palka wrote: > > > On Fri, 12 Apr 2024, Jason Merrill wrote: > > > > > > > On 3/26/24 09:44, Patrick Palka wrote: > > > > > On Thu, 7 Mar 2024, Jason Merrill wrote: > > > > > > >

Re: [committed] [RISC-V] Improve floor, ceil & related operations for RISC-V

2024-05-01 Thread Jeff Law
On 5/1/24 12:44 PM, Patrick O'Neill wrote: Hi Jeff, It looks like this patch's gcc.target/riscv/round_64.c testcase doesn't pass when run with newlib. So I expected this would ultimately end up being a case where certain builtins aren't enabled when we're using a newlib based C library

Re: [PATCH 2/2] c++: remove lookup_template_class's entering_scope flag

2024-05-01 Thread Jason Merrill
On 5/1/24 13:40, Patrick Palka wrote: On Wed, 1 May 2024, Jason Merrill wrote: On 5/1/24 12:41, Patrick Palka wrote: On Fri, 2 Feb 2024, Patrick Palka wrote: Bootstrapped and regtested on x86_64-pc-linux, does this look like an improvement? This is not a bugfix and barely related to the

Re: [PATCH] c++: problematic assert in reference_binding [PR113141]

2024-05-01 Thread Patrick Palka
On Wed, 1 May 2024, Jason Merrill wrote: > On 4/12/24 13:22, Patrick Palka wrote: > > On Fri, 12 Apr 2024, Jason Merrill wrote: > > > > > On 3/26/24 09:44, Patrick Palka wrote: > > > > On Thu, 7 Mar 2024, Jason Merrill wrote: > > > > > > > > > On 1/29/24 17:42, Patrick Palka wrote: > > > > > >

Re: [PATCH 2/2] c++: remove lookup_template_class's entering_scope flag

2024-05-01 Thread Patrick Palka
On Wed, 1 May 2024, Jason Merrill wrote: > On 5/1/24 12:41, Patrick Palka wrote: > > On Fri, 2 Feb 2024, Patrick Palka wrote: > > > > > Bootstrapped and regtested on x86_64-pc-linux, does this look like > > > an improvement? This is not a bugfix and barely related to the previous > > > patch,

Re: [PATCH] c++: problematic assert in reference_binding [PR113141]

2024-05-01 Thread Jason Merrill
On 4/12/24 13:22, Patrick Palka wrote: On Fri, 12 Apr 2024, Jason Merrill wrote: On 3/26/24 09:44, Patrick Palka wrote: On Thu, 7 Mar 2024, Jason Merrill wrote: On 1/29/24 17:42, Patrick Palka wrote: On Mon, 29 Jan 2024, Patrick Palka wrote: On Fri, 26 Jan 2024, Jason Merrill wrote: On

Re: [PATCH 2/4] c++/modules: Track module purview for deferred instantiations [PR114630]

2024-05-01 Thread Jason Merrill
On 5/1/24 12:11, Patrick Palka wrote: On Wed, 1 May 2024, Jason Merrill wrote: On 5/1/24 08:54, Patrick Palka wrote: On Thu, 2 May 2024, Nathaniel Shead wrote: On Wed, May 01, 2024 at 10:11:20AM -0400, Patrick Palka wrote: On Wed, 1 May 2024, Nathaniel Shead wrote: Bootstrapped and

Re: [PATCH 2/2] c++: remove lookup_template_class's entering_scope flag

2024-05-01 Thread Jason Merrill
On 5/1/24 12:41, Patrick Palka wrote: On Fri, 2 Feb 2024, Patrick Palka wrote: Bootstrapped and regtested on x86_64-pc-linux, does this look like an improvement? This is not a bugfix and barely related to the previous patch, but the previous patch's new use of entering_scope=true motivated me

Re: [PATCH] libgcc: Rename __trunchfbf2 to __extendhfbf2

2024-05-01 Thread Jakub Jelinek
On Wed, May 01, 2024 at 12:55:25PM -0700, H.J. Lu wrote: > Since bfloat16 has the same range as float32, _Float16 to bfloat16 > conversion is an extension, not a truncation. Rename trunchfbf2.c > to extendhfbf2.c to provide __extendhfbf2, instead of __trunchfbf2. > > Since _Float16 to bfloat16

Re: [committed] [RISC-V] Improve floor, ceil & related operations for RISC-V

2024-05-01 Thread Jeff Law
On 5/1/24 12:44 PM, Patrick O'Neill wrote: Hi Jeff, It looks like this patch's gcc.target/riscv/round_64.c testcase doesn't pass when run with newlib. Looks like a testsuite error as much as anything. The test relies on the gimple optimizers to propagate the input paramters to their use

[PATCH] libgcc: Rename __trunchfbf2 to __extendhfbf2

2024-05-01 Thread H.J. Lu
Since bfloat16 has the same range as float32, _Float16 to bfloat16 conversion is an extension, not a truncation. Rename trunchfbf2.c to extendhfbf2.c to provide __extendhfbf2, instead of __trunchfbf2. Since _Float16 to bfloat16 conversion never worked from the day one, the same libgcc version of

[PATCH] libstdc++: Fix handling of incomplete UTF-8 sequences in _Unicode_view

2024-05-01 Thread Jonathan Wakely
Tested x86_64-linux. I'm considering making the increment of __to_incr conditional: if constexpr (!random_access_iterator<_Iter>) ++__to_incr; and then when we call _M_update using _M_curr() - __g._M_orig for the number of characters consumed. I should benchmark that to see if it

Re: [PATCH 2/2] c++: remove lookup_template_class's entering_scope flag

2024-05-01 Thread Patrick Palka
On Fri, 2 Feb 2024, Patrick Palka wrote: > Bootstrapped and regtested on x86_64-pc-linux, does this look like > an improvement? This is not a bugfix and barely related to the previous > patch, but the previous patch's new use of entering_scope=true motivated > me to submit this patch since it

[PATCH 4/6] btf: refactor and simplify implementation

2024-05-01 Thread David Faust
This patch heavily refactors btfout.cc to take advantage of the structural changes in the prior commits. Now that inter-type references are internally stored as simply pointers, all the painful, brittle, confusing infrastructure that was used in the process of converting CTF type IDs to BTF type

[PATCH 3/6] ctf: use pointers instead of IDs internally

2024-05-01 Thread David Faust
This patch replaces all inter-type references in the ctfc internal data structures with pointers, rather than the references-by-ID which were used previously. A couple of small updates in the BPF backend are included to make it compatible with the change. This change is only to the in-memory

[PATCH 5/6] btf: add -fprune-btf option

2024-05-01 Thread David Faust
This patch adds a new option, -fprune-btf, to control BTF debug info generation. As the name implies, this option enables a kind of "pruning" of the BTF information before it is emitted. When enabled, rather than emitting all type information translated from DWARF, only information for types

[PATCH 6/6] bpf,btf: enable BTF pruning by default for BPF

2024-05-01 Thread David Faust
This patch enables -fprune-btf by default in the BPF backend when generating BTF information, and fixes BPF CO-RE generation when using -fprune-btf. When generating BPF CO-RE information, we must ensure that types used in CO-RE relocations always have sufficient BTF information emited so that the

[PATCH 1/6] ctf, btf: restructure CTF/BTF emission

2024-05-01 Thread David Faust
This commit makes some structural changes to the CTF/BTF debug info emission. In particular: a) CTF is new always fully generated and emitted before any BTF-related procedures are run. This means that BTF-related functions can change, even irreversibly, the shared in-memory

[PATCH 0/6] btf: refactor and add pruning option

2024-05-01 Thread David Faust
This patch series signficantly refactors the BTF generation in gcc, making it simpler and easier to understand, extend and maintain. It also introduces an optional algorithm to "prune" BTF information before emission. This pruning is meant to be used for BPF programs, to alleviate the massive

[PATCH 2/6] opts: allow any combination of DWARF, CTF, BTF

2024-05-01 Thread David Faust
Previously it was not supported to generate both CTF and BTF debug info in the same compiler run, as both formats made incompatible changes to the same internal data structures. With the structural change in the prior patch, in particular the guarantee that CTF will always be fully emitted before

Re: [PATCH 2/4] c++/modules: Track module purview for deferred instantiations [PR114630]

2024-05-01 Thread Patrick Palka
On Wed, 1 May 2024, Jason Merrill wrote: > On 5/1/24 08:54, Patrick Palka wrote: > > On Thu, 2 May 2024, Nathaniel Shead wrote: > > > > > On Wed, May 01, 2024 at 10:11:20AM -0400, Patrick Palka wrote: > > > > On Wed, 1 May 2024, Nathaniel Shead wrote: > > > > > > > > > Bootstrapped and

Re: [committed] [RISC-V] Improve floor, ceil & related operations for RISC-V

2024-05-01 Thread Jeff Law
On 5/1/24 12:44 PM, Patrick O'Neill wrote: Hi Jeff, It looks like this patch's gcc.target/riscv/round_64.c testcase doesn't pass when run with newlib. It also introduced: FAIL: gcc.target/riscv/rvv/autovec/unop/math-nearbyint-run-2.c execution test on rv32gcv newlib/linux.

[pushed] c++: drop in-charge for dtors without vbases

2024-05-01 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- Constructors and destructors use the in-charge parameter to decide whether they're responsible for recursing into virtual bases. Historically all destructors had this parameter in order to also distinguish the deleting destructor. But

Re: [PATCH] c++: Implement C++26 P2573R2 - = delete("should have a reason"); [PR114458]

2024-05-01 Thread Jason Merrill
On 5/1/24 23:33, Jakub Jelinek wrote: The following patch implements the C++26 P2573R2 = delete("should have a reason"); paper. I've tried to avoid increasing compile time memory for it when it isn't used (e.g. by adding a new lang_decl tree member), so the reason is represented as STRING_CST

[committed] [RISC-V] Trivial pattern cleanup

2024-05-01 Thread Jeff Law
As I was reviewing and cleaning up some internal work, I noticed a particular idiom being used elsewhere in the RISC-V backend. Specifically the use of explicit subregs when an adjustment to the match_operand would be sufficient. Let's take this example from the and-not splitter:

Re: [PATCH 2/4] c++/modules: Track module purview for deferred instantiations [PR114630]

2024-05-01 Thread Jason Merrill
On 5/1/24 08:54, Patrick Palka wrote: On Thu, 2 May 2024, Nathaniel Shead wrote: On Wed, May 01, 2024 at 10:11:20AM -0400, Patrick Palka wrote: On Wed, 1 May 2024, Nathaniel Shead wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? -- >8 -- When calling

Re: [committed] [RISC-V] Improve floor, ceil & related operations for RISC-V

2024-05-01 Thread Patrick O'Neill
Hi Jeff, It looks like this patch's gcc.target/riscv/round_64.c testcase doesn't pass when run with newlib. It also introduced: FAIL: gcc.target/riscv/rvv/autovec/unop/math-nearbyint-run-2.c execution test on rv32gcv newlib/linux. Precommit with a few targets:

[committed] [RISC-V] Fix detection of store pair fusion cases

2024-05-01 Thread Jeff Law
We've got the ability to count the number of store pair fusions happening in the front-end of the pipeline. When comparing some code from last year vs the current trunk we saw a fairly dramatic drop. The problem is the store pair fusion detection code was actively harmful due to a minor

RE: [PATCH v3] Internal-fn: Introduce new internal function SAT_ADD

2024-05-01 Thread Tamar Christina
Hi, > From: Pan Li > > Update in v3: > * Rebase upstream for conflict. > > Update in v2: > * Fix one failure for x86 bootstrap. > > Original log: > > This patch would like to add the middle-end presentation for the > saturation add. Aka set the result of add to the max when overflow. > It

[PATCH v5 4/4] Update the C/C++ FEs routine

2024-05-01 Thread Qing Zhao
"add_flexible_array_elts_to_size" C++ FE routine "layout_var_decl" to handle the cases when the DECL is union. Add testing cases to test the _bos for flexible array members in unions or alone in structures. gcc/c/ChangeLog: * c-decl.cc (add_flexible_array_elts_to_size): Handle the

[PATCH v5 3/4] Add testing cases for flexible array members in unions and alone in structures.

2024-05-01 Thread Qing Zhao
gcc/testsuite/ChangeLog: * c-c++-common/fam-in-union-alone-in-struct-1.c: New testcase. * c-c++-common/fam-in-union-alone-in-struct-2.c: New testcase. * c-c++-common/fam-in-union-alone-in-struct-3.c: New testcase. --- .../fam-in-union-alone-in-struct-1.c | 52

[PATCH v5 2/4] C and C++ FE changes

2024-05-01 Thread Qing Zhao
to support flexible array members in unions and alone in structures. Adjust testcases for flexible array member in union and alone in structure extension. gcc/c/ChangeLog: * c-decl.cc (finish_struct): Change errors to pedwarns for the cases flexible array members in union or

[PATCH v5 1/4] Allow flexible array members in unions and alone in structures [PR53548]

2024-05-01 Thread Qing Zhao
The request for GCC to accept that the C99 flexible array member can be in a union or alone in a structure has been made a long time ago around 2012 for supporting several practical cases including glibc. A GCC PR has been opened for such request at that time:

[PATCH v5 0/4]Allow flexible array members in unions and alone in structures [PR53548]

2024-05-01 Thread Qing Zhao
Hi, This is the 5th version for Allow flexible array members in unions and alone in structures [PR53548] (for your reference, the 1st version is at: https://gcc.gnu.org/pipermail/gcc-patches/2024-April/649737.html The 2nd version is at:

[committed] libstdc++: Guard uses of is_pointer_interconvertible_v [PR114891]

2024-05-01 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. I'll backport this to gcc-14 as well, but it can wait until after the 14.1 release. -- >8 -- This type trait isn't supported by Clang 18. It's only used in static assertions, so they can just be omitted if the trait isn't available. libstdc++-v3/ChangeLog:

Re: [PATCH 4/4] lra: Apply DF_LIVE_SUBREG data

2024-05-01 Thread Vladimir Makarov
On 2/3/24 05:50, Lehua Ding wrote: This patch apply the DF_LIVE_SUBREG to LRA pass. More changes were made to the LRA than the IRA since the LRA will modify the DF data directly. The main big changes are centered on the lra-lives.cc file. gcc/ChangeLog: * lra-coalesce.cc

Re: [PATCH 3/4] ira: Apply DF_LIVE_SUBREG data

2024-05-01 Thread Vladimir Makarov
On 2/3/24 05:50, Lehua Ding wrote: This patch simple replace df_get_live_in to df_get_subreg_live_in and replace df_get_live_out to df_get_subreg_live_out. gcc/ChangeLog: * ira-build.cc (create_bb_allocnos): Switch to DF_LIVE_SUBREG df data. (create_loop_allocnos): Ditto.

Re: [PATCH v4 4/4] Update the C/C++ FE routines

2024-05-01 Thread Qing Zhao
On May 1, 2024, at 09:35, Jason Merrill wrote: On 5/1/24 08:19, Qing Zhao wrote: "add_flexible_array_elts_to_size" and "layout_var_decl" to handle the cases when the DECL is union. Add testing cases to test the _bos for flexible array members in unions or alone in structures.

Re: [PATCH 2/4] c++/modules: Track module purview for deferred instantiations [PR114630]

2024-05-01 Thread Patrick Palka
On Thu, 2 May 2024, Nathaniel Shead wrote: > On Wed, May 01, 2024 at 10:11:20AM -0400, Patrick Palka wrote: > > On Wed, 1 May 2024, Nathaniel Shead wrote: > > > > > Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? > > > > > > -- >8 -- > > > > > > When calling

[pushed] c++: const void* memchr [PR113706]

2024-05-01 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- The C++ standard specifies that the functions have const and non-const overloads, unlike C's single function with const argument and non-const return. Many systems don't actually implement this, but only add an overload with non-const

Re: [PATCH v4 4/4] Update the C/C++ FE routines

2024-05-01 Thread Jason Merrill
On 5/1/24 08:19, Qing Zhao wrote: "add_flexible_array_elts_to_size" and "layout_var_decl" to handle the cases when the DECL is union. Add testing cases to test the _bos for flexible array members in unions or alone in structures. gcc/c/ChangeLog: * c-decl.cc

Re: [PATCH 4/4] c++: Add new xtreme-header testcase for GMF discarding

2024-05-01 Thread Jason Merrill
On 5/1/24 03:01, Nathaniel Shead wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? OK. Another thought would be to replace xtreme-header.h with so that we don't need to keep it up-to-date in the future. But this patch just does the obviously correct thing. -- >8 --

Re: [PATCH 1/4] c++/modules: Don't emit unused GMF partial specializations [PR114630]

2024-05-01 Thread Jason Merrill
On 5/1/24 02:59, Nathaniel Shead wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? OK. -- >8 -- The change in r14-8408 to also emit partial specializations in the global module fragment caused the regression in the linked PR; this patch fixes this by restricting

Re: [PATCH 2/4] c++/modules: Track module purview for deferred instantiations [PR114630]

2024-05-01 Thread Jason Merrill
On 5/1/24 07:11, Patrick Palka wrote: On Wed, 1 May 2024, Nathaniel Shead wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? -- >8 -- When calling instantiate_pending_templates at end of parsing, any new functions that are instantiated from this point have their module

[PATCH v4 2/4] C and C++ FE changes

2024-05-01 Thread Qing Zhao
to support flexible array members in unions and alone in structures. Adjust testcases for flexible array member in union and alone in structure extension. gcc/c/ChangeLog: * c-decl.cc (finish_struct): Change errors to pedwarns for the cases flexible array members in union or

[PATCH v4 4/4] Update the C/C++ FE routines

2024-05-01 Thread Qing Zhao
"add_flexible_array_elts_to_size" and "layout_var_decl" to handle the cases when the DECL is union. Add testing cases to test the _bos for flexible array members in unions or alone in structures. gcc/c/ChangeLog: * c-decl.cc (add_flexible_array_elts_to_size): Handle the cases

[PATCH v4 3/4] Add testing cases for flexible array members in unions and alone in structures.

2024-05-01 Thread Qing Zhao
gcc/testsuite/ChangeLog: * c-c++-common/fam-in-union-alone-in-struct-1.c: New testcase. * c-c++-common/fam-in-union-alone-in-struct-2.c: New testcase. * c-c++-common/fam-in-union-alone-in-struct-3.c: New testcase. --- .../fam-in-union-alone-in-struct-1.c | 52

[PATCH v4 1/4] Allow flexible array members in unions and alone in structures [PR53548]

2024-05-01 Thread Qing Zhao
The request for GCC to accept that the C99 flexible array member can be in a union or alone in a structure has been made a long time ago around 2012 for supporting several practical cases including glibc. A GCC PR has been opened for such request at that time:

[PATCH v4 0/4] Allow flexible array members in unions and alone in structures [PR53548]

2024-05-01 Thread Qing Zhao
Hi, This is the 4th version for Allow flexible array members in unions and alone in structures [PR53548] (for your reference, the 1st version is at: https://gcc.gnu.org/pipermail/gcc-patches/2024-April/649737.html The 2nd version is at:

Re: [PATCH] c++: Implement modules ABI for vtable emissions

2024-05-01 Thread Jason Merrill
On 5/1/24 04:37, Nathaniel Shead wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? -- >8 -- This patch implements the changes described in https://github.com/itanium-cxx-abi/cxx-abi/pull/171. One restriction that is lifted in the ABI that hasn't been updated here is that

[pushed] doc: FreeBSD no longer has a GNU toolchain in base

2024-05-01 Thread Gerald Pfeifer
The recent thread on building on FreeBSD made me release there's quite some cruft to remove (and a note to add) regarding that. Pushed (and more to come). Gerald gcc: PR target/69374 PR target/112959 * doc/install.texi (Specific) <*-*-freebsd*>: No longer refer

Re: [PATCH 2/4] c++/modules: Track module purview for deferred instantiations [PR114630]

2024-05-01 Thread Nathaniel Shead
On Wed, May 01, 2024 at 10:11:20AM -0400, Patrick Palka wrote: > On Wed, 1 May 2024, Nathaniel Shead wrote: > > > Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? > > > > -- >8 -- > > > > When calling instantiate_pending_templates at end of parsing, any new > > functions that

Re: [PATCH] c++/modules: Fix dangling pointer with imported_temploid_friends

2024-05-01 Thread Nathaniel Shead
On Wed, May 01, 2024 at 09:57:38AM -0400, Patrick Palka wrote: > > On Wed, 1 May 2024, Nathaniel Shead wrote: > > > Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk (and > > later 14.2)? I don't think making it a GTY root is necessary but I felt > > perhaps better to be safe than

Re: [PATCH 3/4] c++/modules: Also track module purview from deferred vtable instantiation [PR114630]

2024-05-01 Thread Patrick Palka
On Wed, 1 May 2024, Nathaniel Shead wrote: > Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? LGTM > > -- >8 -- > > Similarly to in the previous commit, templated virtual functions are > sometimes not instantiated until after parsing has completed. This > means that any new

Re: [PATCH 2/4] c++/modules: Track module purview for deferred instantiations [PR114630]

2024-05-01 Thread Patrick Palka
On Wed, 1 May 2024, Nathaniel Shead wrote: > Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? > > -- >8 -- > > When calling instantiate_pending_templates at end of parsing, any new > functions that are instantiated from this point have their module > purview set based on the

Re: [wwwdocs] Porting-to-14: Mention new pragma GCC Target behavior

2024-05-01 Thread Gerald Pfeifer
On Tue, 30 Apr 2024, Martin Jambor wrote: > +Pragma GCC Target now affects preprocessor > symbols Note the id: should be "gcc-target-pragma", though I even suggest to simplify and say "target-pragma". > +The behavior of pragma GCC Target and specifically how it affects ISA Seconding Jakub's

Re: [PATCH v3 1/4] Allow flexible array members in unions and alone in structures [PR53548]

2024-05-01 Thread Qing Zhao
On Apr 30, 2024, at 17:55, Kees Cook wrote: On Tue, Apr 30, 2024 at 05:51:20PM -0400, Jason Merrill wrote: On 4/30/24 14:45, Qing Zhao wrote: On Apr 30, 2024, at 15:27, Jason Merrill wrote: On 4/30/24 07:58, Qing Zhao wrote: The request for GCC to accept that the C99 flexible array member

Re: [PATCH] c++/modules: Fix dangling pointer with imported_temploid_friends

2024-05-01 Thread Patrick Palka
On Wed, 1 May 2024, Nathaniel Shead wrote: > Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk (and > later 14.2)? I don't think making it a GTY root is necessary but I felt > perhaps better to be safe than sorry. > > Potentially another approach would be to use DECL_UID instead

Re: [PATCH][wwwdocs] Improve grammar for AVR changes in GCC 14

2024-05-01 Thread Jonathan Wakely
On Mon, 22 Apr 2024 at 12:35, Georg-Johann Lay wrote: > > Am 22.04.24 um 12:04 schrieb Jonathan Wakely: > > OK for wwwdocs? > > For me it's ok (I am not a native speaker though, > which is the reason the typos are there to begin with). I've pushed this now. > > Johann > > >

Fwd: [PATCH V2 0/4] Add DF_LIVE_SUBREG data and apply to IRA and LRA

2024-05-01 Thread Vladimir Makarov
I am resending this message as the previous one had one wrong response email address "gcc-pat...@gcc.gnu.org" Forwarded Message Subject: Re: [PATCH V2 0/4] Add DF_LIVE_SUBREG data and apply to IRA and LRA Date: Wed, 1 May 2024 08:35:27 -0400 From: Vladimir Makarov

Re: [PATCH] wwwdocs: contribute.html: Update consensus on patch content.

2024-05-01 Thread Carlos O'Donell
On 4/25/24 14:32, Richard Biener wrote: > > >> Am 25.04.2024 um 17:44 schrieb Carlos O'Donell : >> >> Discussion is here: >> https://inbox.sourceware.org/gcc/CAPS5khZeWkAD=v8ka9g5eecdnk3bdhfnzjumpvc+hedmkvj...@mail.gmail.com/ >> >> Rough consensus from Jakub Jelinek, Richard Biener and others

[PATCH] c++: Implement modules ABI for vtable emissions

2024-05-01 Thread Nathaniel Shead
Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? -- >8 -- This patch implements the changes described in https://github.com/itanium-cxx-abi/cxx-abi/pull/171. One restriction that is lifted in the ABI that hasn't been updated here is that the ABI no longer requires unique vtables

Re: [PATCH] wwwdocs: Add note to changes.html for __has_{feature,extension}

2024-05-01 Thread Gerald Pfeifer
On Fri, 26 Apr 2024, Marek Polacek wrote: > Thanks, I think you can go ahead with this. Agreed, thanks. Alex, if you agree, how about simplifying +This is primarily intended to aid the portability of code written +against Clang. to +This is aids the portability of code

[PATCH 4/4] c++: Add new xtreme-header testcase for GMF discarding

2024-05-01 Thread Nathaniel Shead
Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? Another thought would be to replace xtreme-header.h with so that we don't need to keep it up-to-date in the future. But this patch just does the obviously correct thing. -- >8 -- This new testcase helps verify that the issues

[PATCH 3/4] c++/modules: Also track module purview from deferred vtable instantiation [PR114630]

2024-05-01 Thread Nathaniel Shead
Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? -- >8 -- Similarly to in the previous commit, templated virtual functions are sometimes not instantiated until after parsing has completed. This means that any new declarations they instantiate are incorrectly marked as being in

[PATCH 2/4] c++/modules: Track module purview for deferred instantiations [PR114630]

2024-05-01 Thread Nathaniel Shead
Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? -- >8 -- When calling instantiate_pending_templates at end of parsing, any new functions that are instantiated from this point have their module purview set based on the current value of module_kind. This is unideal, however, as

[PATCH 1/4] c++/modules: Don't emit unused GMF partial specializations [PR114630]

2024-05-01 Thread Nathaniel Shead
Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? -- >8 -- The change in r14-8408 to also emit partial specializations in the global module fragment caused the regression in the linked PR; this patch fixes this by restricting emitted GM partial specializations to those that are

[PATCH 0/4] c++/modules: Fix missed GMF discarding

2024-05-01 Thread Nathaniel Shead
This patch series fixes a number of issues with declarations in the GMF not correctly getting discarded, and ending up in the module CMI. The most noticeable outcome of this is users running very quickly into issues with including a header after those names have already been provided by an

[pushed] doc: Remove old details on libunwind for ia64-*-hpux*

2024-05-01 Thread Gerald Pfeifer
Pushed. Gerald gcc: PR target/69374 * doc/install.texi (Specific) : Remove details on libunwind for GCC 3.4 and earlier. --- gcc/doc/install.texi | 6 -- 1 file changed, 6 deletions(-) diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index

[COMMITTED] Reduce startup costs for Value_Range.

2024-05-01 Thread Aldy Hernandez
Value_Range is our polymorphic temporary that can hold any range. It is used for type agnostic code where it isn't known ahead of time, what the type of the range will be (irange, france, etc). Currently, there is a temporary of each type in the object, which means we need to construct each

[COMMITTED] Cleanups to unsupported_range.

2024-05-01 Thread Aldy Hernandez
Here are some cleanups to unsupported_range so the assignment operator takes an unsupported_range and behaves like the other ranges. This makes subsequent cleanups easier. gcc/ChangeLog: * value-range.cc (unsupported_range::union_): Cast vrange to unsupported_range.

[PATCH] c++: Implement C++26 P2573R2 - = delete("should have a reason"); [PR114458]

2024-05-01 Thread Jakub Jelinek
Hi! The following patch implements the C++26 P2573R2 = delete("should have a reason"); paper. I've tried to avoid increasing compile time memory for it when it isn't used (e.g. by adding a new lang_decl tree member), so the reason is represented as STRING_CST in DECL_INITIAL (which normally is