[PATCH] doc: Fix typos for --enable-host-pie docs in install.texi

2024-12-14 Thread Jonathan Wakely
From: Heiko Eißfeldt gcc/ChangeLog: * doc/install.texi (Configuration): Fix typos in documentation for --enable-host-pie. --- This was reported as https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118041 with a patch attached, but I forgot to put the bug number in the commit. Pushed

Re: The COBOL front end, in 8 notes

2024-12-14 Thread Iain Sandoe
> On 14 Dec 2024, at 11:56, Iain Sandoe wrote: > > > >> On 14 Dec 2024, at 10:11, Sam James wrote: >> >> David Malcolm writes: >> >>> On Thu, 2024-12-12 at 12:56 -0500, James K. Lowden wrote: The following 8 patches constitute the 80 files needed to build and document the COBOL

[PATCH] install.texi --enable-languages: add rust to the list of languages

2024-12-14 Thread Heiko Eißfeldt
While comparing ```grep ^language= */config-lang.in``` with the list from the doc I noticed that the last addition rust was missing. diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index 9109c172039..1904a0e3c12 100644 --- a/gcc/doc/install.texi +++ b/gcc/doc/install.texi @@ -2051,7

Re: The COBOL front end, in 8 notes

2024-12-14 Thread Richard Biener
> Am 14.12.2024 um 14:09 schrieb Iain Sandoe : > >  > >>> On 14 Dec 2024, at 11:56, Iain Sandoe wrote: >>> >>> >>> On 14 Dec 2024, at 10:11, Sam James wrote: >>> >>> David Malcolm writes: >>> On Thu, 2024-12-12 at 12:56 -0500, James K. Lowden wrote: > The following 8 pat

Re: [PATCH] install.texi --enable-languages: add rust to the list of languages

2024-12-14 Thread Xi Ruoyao
On Sat, 2024-12-14 at 15:11 +0100, Heiko Eißfeldt wrote: >   > ```grep ^language= */config-lang.in``` > > with the list from the doc > > I noticed that the last addition rust was missing. I'm not sure if we want to expose it to all the users. As at now the rust FE is still in early development

Re: The COBOL front end, in 8 notes

2024-12-14 Thread Matthias Klose
I tried to use the patches to build binary packages for Debian. Found some issues: gcc/cobol: - the config-lang.in is provided in both patch 04 and patch 08. - the installation path for the gcobc script is missing the gcc/ subdir. Does it make sense to ship the script without the udf files

Re: The COBOL front end, in 8 notes

2024-12-14 Thread Iain Sandoe
> On 14 Dec 2024, at 10:11, Sam James wrote: > > David Malcolm writes: > >> On Thu, 2024-12-12 at 12:56 -0500, James K. Lowden wrote: >>> The following 8 patches constitute the 80 files needed to build and >>> document the COBOL front end. They assume that following exist: >>> >>> gcc/

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

2024-12-14 Thread François Dumont
Hi Here is an update with the alloc ptr specific tests and so fixes. PR updated: https://forge.sourceware.org/gcc/gcc-TEST/pulls/27 François On 09/12/2024 07:05, François Dumont wrote: On 04/12/2024 22:48, Jonathan Wakely wrote: On 04/12/24 19:27 +0100, François Dumont wrote: Hi I've co

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

2024-12-14 Thread Jonathan Wakely
On Mon, 9 Dec 2024, 06:05 François Dumont, wrote: > > On 04/12/2024 22:48, Jonathan Wakely wrote: > > On 04/12/24 19:27 +0100, François Dumont wrote: > >> Hi > >> > >> I've completed the synchronization with your equivalent PR for > >> std::list so here is the updated patch. > >> > >> PR updated

Re: [PATCH] RISC-V: Add Tenstorrent Ascalon 8 wide architecture

2024-12-14 Thread Jeff Law
On 12/14/24 1:09 AM, Anton Blanchard wrote: This adds the Tenstorrent Ascalon 8 wide architecture (tt-ascalon-d8) to the list of known cores. gcc/ChangeLog: * config/riscv/riscv-cores.def: Add tt-ascalon-d8. * config/riscv/riscv.cc (tt_ascalon_d8_tune_info): New. gcc/testsui

Re: [PATCH] RISC-V: Fix compress shuffle pattern [PR117383].

2024-12-14 Thread Jeff Law
On 12/11/24 10:40 PM, Robin Dapp wrote: This one also has a comment saying "but use ta" with TDEFAULT_POLICY_P, IIUC one of those must be wrong too? Yea, I didn't update the comment, thanks for catching. OK with that change. jeff

Re: [PATCH] RISC-V: optimization by converting LUI operands with SMALL_AFTER_COMMON_TRAILING_SHIFT

2024-12-14 Thread Jeff Law
On 12/11/24 3:40 AM, Oliver Kozul wrote: The patch optimizes code generation for comparisons of the form X & C1 == C2. When the bitwise AND mask could fit in a 12-bit immediate operand of RISC-V "andi" instruction with help of right shifting. For example, C1 = 0x5550 and C2 = 0x1450. T

Re: [PATCH 1/3] testsuite: RISC-V: Explicitly specify ABI when adding V and Zvbb options

2024-12-14 Thread Jeff Law
On 12/10/24 12:48 PM, Dimitar Dimitrov wrote: On Mon, Dec 09, 2024 at 06:05:10PM +0100, Robin Dapp wrote: +/* { dg-additional-options "-mabi=lp64d" { target { rv64 } } } */ +/* { dg-additional-options "-mabi=ilp32d" { target { rv32 } } } */ Wouldn't skipping those tests also be reasonable?

Re: [PATCH 0/5] New Asm Constraints and Modifiers - RVC, Raw Encodings, Pairs

2024-12-14 Thread Jeff Law
On 12/9/24 1:56 AM, Kito Cheng wrote: This patch set implements the proposal from riscv-c-api-doc[1]. It adds two constraints and one modifier with the goal of improving the user experience for `.insn`, making it easier for users to experiment with new ISA extensions. A quick summary of this

Re: [PATCH] middle-end/117932 - speed up DF solver

2024-12-14 Thread Jeff Law
On 12/6/24 8:55 AM, Richard Biener wrote: The following addresses slow bitmap operations for maintaining the iteration order of df_worklist_dataflow_doublequeue for large number of basic-blocks. One change is switching the worklist and pending bitmaps to tree view, another change is avoiding

Re: [PATCH 0/5] New Asm Constraints and Modifiers - RVC, Raw Encodings, Pairs

2024-12-14 Thread Jeff Law
On 12/9/24 1:56 AM, Kito Cheng wrote: This patch set implements the proposal from riscv-c-api-doc[1]. It adds two constraints and one modifier with the goal of improving the user experience for `.insn`, making it easier for users to experiment with new ISA extensions. A quick summary of this

Re: [PING][PATCH 00/15] Fix data races with sub-longword accesses on Alpha

2024-12-14 Thread Jeff Law
On 12/3/24 2:02 PM, Maciej W. Rozycki wrote: On Mon, 18 Nov 2024, Maciej W. Rozycki wrote: As it happens these data races also apply to BWX Alpha systems, as I have discovered in the course of this effort, although owing to how the Alpha backend of GCC has implemented block copy and clear

Re: [patch,avr] Skip some tests that don't work on avr

2024-12-14 Thread Jeff Law
On 12/3/24 7:45 AM, Georg-Johann Lay wrote: Am 03.12.24 um 15:36 schrieb Jeff Law: On 12/3/24 3:57 AM, Georg-Johann Lay wrote: This patch skips some tests that don't work on avr. Ok for trunk? Johann -- AVR: Skip some test cases that don't work for it. gcc/testsuite/  * gcc.c-tortu

[COMMITED] bpf: fix build adding new required arg to RESOLVE_OVERLOADED_BUILTIN

2024-12-14 Thread Jose E. Marchesi
gcc/ChangeLog * config/bpf/bpf.cc (bpf_resolve_overloaded_builtin): Add argument `complain'. --- gcc/config/bpf/bpf.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/config/bpf/bpf.cc b/gcc/config/bpf/bpf.cc index fd913ecdb65..9a927e3a6ff 100644 --- a/gc

[PATCH] RISC-V: Add Tenstorrent Ascalon 8 wide architecture

2024-12-14 Thread Anton Blanchard
This adds the Tenstorrent Ascalon 8 wide architecture (tt-ascalon-d8) to the list of known cores. gcc/ChangeLog: * config/riscv/riscv-cores.def: Add tt-ascalon-d8. * config/riscv/riscv.cc (tt_ascalon_d8_tune_info): New. gcc/testsuite/ChangeLog: * gcc.target/riscv/mcpu-tt

[PATCH] opts: Use OPTION_SET_P instead of magic value 2 for -fshort-enums default [PR118011]

2024-12-14 Thread Jakub Jelinek
Hi! The magic values for default (usually -1 or sometimes 2) for some options are from times we haven't global_options_set, I think we should eventually get rid of all of those. The PR is about gcc -Q --help=optimizers reporting -fshort-enums as [enabled] when it is disabled. For this the followi

[PATCH] warn-access: Fix up matching_alloc_calls_p [PR118024]

2024-12-14 Thread Jakub Jelinek
Hi! The following testcase ICEs because of a bug in matching_alloc_calls_p. The loop was apparently meant to be walking the two attribute chains in lock-step, but doesn't really do that. If the first lookup_attribute returns non-NULL, the second one is not done, so rmats in that case can be some

Re: [PATCH] opts: Use OPTION_SET_P instead of magic value 2 for -fshort-enums default [PR118011]

2024-12-14 Thread Richard Biener
> Am 14.12.2024 um 09:08 schrieb Jakub Jelinek : > > Hi! > > The magic values for default (usually -1 or sometimes 2) for some options > are from times we haven't global_options_set, I think we should eventually > get rid of all of those. > > The PR is about gcc -Q --help=optimizers reportin

Re: [PATCH] warn-access: Fix up matching_alloc_calls_p [PR118024]

2024-12-14 Thread Richard Biener
> Am 14.12.2024 um 09:20 schrieb Jakub Jelinek : > > Hi! > > The following testcase ICEs because of a bug in matching_alloc_calls_p. > The loop was apparently meant to be walking the two attribute chains > in lock-step, but doesn't really do that. If the first lookup_attribute > returns non-

[PATCH] gimple-fold: Fix the recent ifcombine optimization for _BitInt [PR118023]

2024-12-14 Thread Jakub Jelinek
Hi! The BIT_FIELD_REF verifier has: if (INTEGRAL_TYPE_P (TREE_TYPE (op)) && !type_has_mode_precision_p (TREE_TYPE (op))) { error ("%qs of non-mode-precision operand", code_name); return true; } check among other things, so

[PATCH] c++: Diagnose earlier non-static data members with cv containing class type [PR116108]

2024-12-14 Thread Jakub Jelinek
Hi! In r10-6457 aka PR92593 fix a check has been added to reject earlier non-static data members with current_class_type in templates, as the deduction then can result in endless recursion in reshape_init. It fixed the template struct S { S s = 1; }; S t{2}; crashes, but as the following testcase

Re: [RFC][PATCH] AArch64: Remove AARCH64_EXTRA_TUNE_USE_NEW_VECTOR_COSTS

2024-12-14 Thread Richard Biener
> Am 13.12.2024 um 18:00 schrieb Jennifer Schmitz : > >  > >> On 13 Dec 2024, at 13:40, Richard Biener wrote: >> >> External email: Use caution opening links or attachments >> >> >>> On Thu, Dec 12, 2024 at 5:27 PM Jennifer Schmitz >>> wrote: >>> >>> >>> On 6 Dec 2024, at 08:41,

Re: [PATCH] gimple-fold: Fix the recent ifcombine optimization for _BitInt [PR118023]

2024-12-14 Thread Richard Biener
> Am 14.12.2024 um 09:26 schrieb Jakub Jelinek : > > Hi! > > The BIT_FIELD_REF verifier has: > if (INTEGRAL_TYPE_P (TREE_TYPE (op)) > && !type_has_mode_precision_p (TREE_TYPE (op))) >{ > error ("%qs of non-mode-precision operand", code_name); >

Re: The COBOL front end, in 8 notes

2024-12-14 Thread Sam James
"James K. Lowden" writes: > The following 8 patches constitute the 80 files needed to build and > document the COBOL front end. They assume that following exist: > > gcc/cobol/ChangeLog > libgcobol/ChangeLog > > The messages are grouped by files in a more or less logical order, > but gro

Re: The COBOL front end, in 8 notes

2024-12-14 Thread Sam James
David Malcolm writes: > On Thu, 2024-12-12 at 12:56 -0500, James K. Lowden wrote: >> The following 8 patches constitute the 80 files needed to build and >> document the COBOL front end.  They assume that following exist: >> >>     gcc/cobol/ChangeLog >>     libgcobol/ChangeLog >> >> The message

Re: [PATCH 1/2] middle-end/116083 - vectorizer slowness

2024-12-14 Thread Jeff Law
On 12/3/24 10:07 AM, Richard Biener wrote: Turns out SLP discovery can end up doing a lot of vector type builds from scalar types. Those are all ultimatively cached but end up built and layouted first. The latter is particularly expensive because it does tree node arithmetic to compute TYPE_

Re: [PATCH] COBOL 6/8 lib: libgcobol, all of it

2024-12-14 Thread Jakub Jelinek
On Thu, Dec 12, 2024 at 12:58:23PM -0500, James K. Lowden wrote: > >From 64bcb34e12371f61a8958645e1668e0ac2704391lib.patch 4 Oct 2024 12:01:22 > >-0400 > From: "James K. Lowden" > Date: Thu 12 Dec 2024 06:28:08 PM EST > Subject: [PATCH] Add 'cobol' to 12 files > > libgcobol/ChangeLog > *

[PATCH] Shrink back size of tree_exp from 40 bytes to 32

2024-12-14 Thread Jakub Jelinek
Hi! The following patch implements what I've mentioned in the 64-bit location_t thread. struct tree_exp had unsigned condition_uid member added for something rarely used (-fcondition-coverage) and even there used only on very small subset of trees only for the duration of the gimplification. The

Re: [PATCH] RISC-V: optimization on checking certain bits set ((x & mask) == val)

2024-12-14 Thread Jeff Law
On 12/6/24 6:12 AM, Oliver Kozul wrote: The patch optimizes code generation for comparisons of the form X & C1 == C2 by converting them to (X | ~C1) == (C2 | ~C1). C1 is a constant that requires li and addi to be loaded, while ~C1 requires a single lui instruction. 2024-12-06  Oliver Kozul  

[PATCH] cobol: set SARIF "artifact.sourceLanguage" property

2024-12-14 Thread David Malcolm
With this patch, -fdiagnostics-format=sarif-stderr emits: "sourceLanguage": "cobol" for its artifacts, as per Appendix J of the SARIF spec. gcc/ChangeLog: * cobol/cobol1.cc (cobol_get_sarif_source_language): New. (LANG_HOOKS_GET_SARIF_SOURCE_LANGUAGE): Set it to the above. Si

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

2024-12-14 Thread Jeff Law
On 12/2/24 11:28 PM, Jin Ma wrote: HI, Jeff I am very sorry that I took so long to reply because I was ill and hospitalized. So sorry to hear that, I hope you're feeling better. +{ + rtx tmp = gen_reg_rtx (Pmode); + /* Use UNSPEC to avoid being optimized before vsetvl pass

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

2024-12-14 Thread Jeff Law
On 12/2/24 11:34 PM, Jin Ma wrote: Since XTheadvector does not support vsetivli, vl needs to be put into registers during the expand phase. PR 116593 gcc/ChangeLog: * config/riscv/riscv-vector-builtins.cc (function_expander::add_input_operand): Put const to GPR for

libbacktrace patch committed: Avoid ZSTD_CLEVEL_DEFAULT

2024-12-14 Thread Ian Lance Taylor
PR 117812 reports a libbacktrace test failure when building with a 2018 version of zstd, because ZSTD_CLEVEL_DEFAULT is not defined. This patch avoids using it, replacing it with the default value 3. The test doesn't really care what compression level is used anyhow. Bootstrapped and ran libbacktra

Re: [PATCH] cobol: set SARIF "artifact.sourceLanguage" property

2024-12-14 Thread David Malcolm
On Sat, 2024-12-14 at 19:20 -0500, David Malcolm wrote: > With this patch, -fdiagnostics-format=sarif-stderr emits: > >    "sourceLanguage": "cobol" > > for its artifacts, as per Appendix J of the SARIF spec. > > gcc/ChangeLog: > * cobol/cobol1.cc (cobol_get_sarif_source_language): New. >

[PATCH, part4] Fortran: fix passing of NULL() to assumed-rank, derived type dummy [PR104819]

2024-12-14 Thread Harald Anlauf
Dear all, this patch is the 4th part of a series on the passing of NULL() to assumed-rank dummies. This one handles the case of a derived type dummy and is mostly straightforward. There was one particular problem I encountered: passing NULL() to an allocatable dummy with no intent given. This l

Re: [PATCH] install.texi --enable-languages: add rust to the list of languages

2024-12-14 Thread Arsen Arsenović
Xi Ruoyao writes: > On Sat, 2024-12-14 at 15:11 +0100, Heiko Eißfeldt wrote: >>   >> ```grep ^language= */config-lang.in``` >> >> with the list from the doc >> >> I noticed that the last addition rust was missing. > > I'm not sure if we want to expose it to all the users. As at now the > rust

Re: The COBOL front end, in 8 notes

2024-12-14 Thread Eric Gallager
On Sat, Dec 14, 2024 at 8:09 AM Iain Sandoe wrote: > > > > > On 14 Dec 2024, at 11:56, Iain Sandoe wrote: > > > > > > > >> On 14 Dec 2024, at 10:11, Sam James wrote: > >> > >> David Malcolm writes: > >> > >>> On Thu, 2024-12-12 at 12:56 -0500, James K. Lowden wrote: > The following 8 patch

Re: [PATCH v3] match.pd: Add pattern to simplify `(a - 1) & -a` to `0`

2024-12-14 Thread Jeff Law
On 12/3/24 3:28 AM, Jovan Vukic wrote: Thank you for the feedback. I have made the minor changes that were requested. Additionally, I extracted the repetitive code into a reusable helper function, match_plus_neg_pattern, making the code much more readable. Furthermore, the logic, code, and tes

Re: [PATCH] Fix non-aligned CodeView symbols

2024-12-14 Thread Jeff Law
On 12/1/24 3:30 PM, Mark Harmstone wrote: CodeView symbols in PDB files are aligned to four-byte boundaries. It's not really clear what logic MSVC uses to enforce this; sometimes the symbols are padded in the object file, sometimes the linker seems to do the work. It makes more sense to do th

Re: The COBOL front end, in 8 notes

2024-12-14 Thread David Malcolm
On Sat, 2024-12-14 at 18:34 -0500, David Malcolm wrote: > On Sat, 2024-12-14 at 10:11 +, Sam James wrote: > > David Malcolm writes: > > > > > On Thu, 2024-12-12 at 12:56 -0500, James K. Lowden wrote: > > [...] > > > > > > > > > Thank you for your kind consideration of our work. > > > > >

Re: The COBOL front end, in 8 notes

2024-12-14 Thread David Malcolm
On Sat, 2024-12-14 at 10:11 +, Sam James wrote: > David Malcolm writes: > > > On Thu, 2024-12-12 at 12:56 -0500, James K. Lowden wrote: [...] > > > > > > Thank you for your kind consideration of our work. > > > > Please forgive me if you've already said this elsewhere, but is > > this > >

[PATCH] cobol: regenerate lang.opt.urls

2024-12-14 Thread David Malcolm
I went ahead and ran regenerate-opt-urls.py on a clone of the cobol repo; here's the resulting change. gcc/ChangeLog: * cobol/lang.opt.urls: Regenerate. Signed-off-by: David Malcolm --- gcc/cobol/lang.opt.urls | 40 1 file changed, 20 insertions(

Re: [PATCH] Shrink back size of tree_exp from 40 bytes to 32

2024-12-14 Thread Jeff Law
On 12/14/24 5:16 PM, Jakub Jelinek wrote: Hi! The following patch implements what I've mentioned in the 64-bit location_t thread. struct tree_exp had unsigned condition_uid member added for something rarely used (-fcondition-coverage) and even there used only on very small subset of trees onl